diff --git a/kontor-data/build.gradle b/kontor-data/build.gradle deleted file mode 100644 index 9028938..0000000 --- a/kontor-data/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -plugins { - id 'java' - id 'java-library' - id 'maven-publish' - id 'jacoco' - id 'test-report-aggregation' - id 'jacoco-report-aggregation' - alias(libs.plugins.lombok) -} - -repositories { - //maven { setUrl("https://nexus.thpeetz.de/repository/maven-central") } - mavenCentral() - maven { setUrl("https://repo.spring.io/milestone") } -} - -java { - sourceCompatibility = JavaVersion.VERSION_21 -} - -configurations { - developmentOnly - runtimeClasspath { - extendsFrom developmentOnly - } -} - -dependencies { - //implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - //implementation 'org.postgresql:postgresql' - //implementation 'org.hibernate.orm:hibernate-community-dialects' - compileOnly libs.spring.data - compileOnly 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' -} - -wrapper { - gradleVersion = "8.6" -} diff --git a/kontor-spring/application/build.gradle b/kontor-spring/application/build.gradle new file mode 100644 index 0000000..9f091c8 --- /dev/null +++ b/kontor-spring/application/build.gradle @@ -0,0 +1,172 @@ +plugins { + id 'application' + id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.0" + id 'jvm-test-suite' + id 'jacoco' + id 'test-report-aggregation' + id 'jacoco-report-aggregation' + alias(libs.plugins.spring.boot) + alias(libs.plugins.spring.dependencies) + alias(libs.plugins.vaadin) + alias(libs.plugins.lombok) +} + +dependencyManagement { + imports { + mavenBom libs.vaadin.bom.get().toString() + mavenBom libs.camel.bom.get().toString() + } +} + +dependencies { + project(':persistence') + implementation 'com.vaadin:vaadin-core' + implementation 'com.vaadin:vaadin-spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-artemis' + implementation 'org.springframework.boot:spring-boot-starter-security' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'org.apache.camel.springboot:camel-spring-boot-starter' + implementation 'org.apache.camel.springboot:camel-jms-starter' + implementation 'org.apache.activemq:artemis-jakarta-client' + //implementation libs.artemis + implementation 'org.springframework.boot:spring-boot-starter-actuator' + developmentOnly 'org.springframework.boot:spring-boot-devtools' + implementation 'io.micrometer:micrometer-registry-prometheus' + implementation 'org.springframework.security:spring-security-oauth2-jose' + implementation 'org.springframework.security:spring-security-oauth2-resource-server' + implementation 'com.h2database:h2' + implementation libs.hsqldb + implementation 'org.postgresql:postgresql' + //runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' + implementation libs.hypersistence + implementation libs.mail + implementation libs.jackson + implementation libs.gson + implementation libs.json + implementation 'org.hibernate.orm:hibernate-community-dialects' + testImplementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + testImplementation 'org.springframework.security:spring-security-test' + testImplementation 'com.vaadin:vaadin-testbench-junit5' + testImplementation 'io.projectreactor:reactor-test' + testImplementation 'org.apache.camel:camel-test-spring-junit5' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} + +publishing { + publications { + bootJava(MavenPublication) { + artifact tasks.named("bootJar") + } + } + repositories { + maven { + url = version.endsWith('SNAPSHOT') ? + 'https://nexus.thpeetz.de/repository/maven-snapshots' : + 'https://nexus.thpeetz.de/repository/maven-releases' + credentials { + username = project.findProperty('nexusUser') + password = project.findProperty('nexusPassword') + } + } + } +} + +application { + mainClass = 'de.thpeetz.kontor.Application' +} + +bootRun { + args = ["--spring.profiles.active=${project.properties['profile'] ?: 'prod'}"] +} + +vaadin { + productionMode = true +} + +testing { + suites { + configureEach { + useJUnitJupiter() + dependencies { + implementation project() + implementation 'com.vaadin:vaadin-core' + implementation 'com.vaadin:vaadin-spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'com.h2database:h2' + implementation libs.hsqldb + implementation libs.sqlite.jdbc + //runtimeOnly 'com.mysql:mysql-connector-j' + runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' + implementation('org.springframework.boot:spring-boot-starter-test') { + exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' + } + implementation 'org.springframework.security:spring-security-test' + implementation 'com.vaadin:vaadin-testbench-junit5' + implementation 'io.projectreactor:reactor-test' + runtimeOnly 'org.junit.platform:junit-platform-launcher' + } + } + test(JvmTestSuite) { + // testType = TestSuiteType.UNIT_TEST + targets { + all { + testTask.configure { + reports { + junitXml { + outputPerTestCase = true // defaults to false + mergeReruns = true // defaults to false + } + } + finalizedBy(jacocoTestReport) + } + } + } + } + integrationTest(JvmTestSuite) { + // testType = "view-test" + targets { + all { + testTask.configure { + shouldRunAfter(test) + finalizedBy(jacocoTestReport) + } + } + } + } + } +} + +tasks.named('check') { + dependsOn(testing.suites.integrationTest) + dependsOn(testing.suites.test) + dependsOn tasks.named('testAggregateTestReport', TestReport) + dependsOn tasks.named('integrationTestAggregateTestReport', TestReport) +} + + +jacocoTestReport { + dependsOn test, integrationTest + reports { + xml.required = true + csv.required = false + } +} + +reporting { + reports { + testAggregateTestReport(AggregateTestReport) { + // testType = TestSuiteType.UNIT_TEST + } + integrationTestAggregateTestReport(AggregateTestReport) { + // testType = "view-test" + } + integrationTestCodeCoverageReport(JacocoCoverageReport) { + // testType = "view-test" + } + } +} diff --git a/kontor-spring/application/frontend/generated/flow/Flow.tsx b/kontor-spring/application/frontend/generated/flow/Flow.tsx new file mode 100644 index 0000000..a39382d --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/Flow.tsx @@ -0,0 +1,493 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +/// +import { Flow as _Flow } from "Frontend/generated/jar-resources/Flow.js"; +import React, { + useCallback, + useEffect, + useRef, + useState +} from "react"; +import { + matchRoutes, + useBlocker, + useLocation, + useNavigate, + type NavigateOptions, useHref, +} from "react-router-dom"; +import type { AgnosticRouteObject } from '@remix-run/router'; + +const flow = new _Flow({ + imports: () => import("Frontend/generated/flow/generated-flow-imports.js") +}); + +const router = { + render() { + return Promise.resolve(); + } +}; + +// ClickHandler for vaadin-router-go event is copied from vaadin/router click.js +// @ts-ignore +function getAnchorOrigin(anchor) { + // IE11: on HTTP and HTTPS the default port is not included into + // window.location.origin, so won't include it here either. + const port = anchor.port; + const protocol = anchor.protocol; + const defaultHttp = protocol === 'http:' && port === '80'; + const defaultHttps = protocol === 'https:' && port === '443'; + const host = (defaultHttp || defaultHttps) + ? anchor.hostname // does not include the port number (e.g. www.example.org) + : anchor.host; // does include the port number (e.g. www.example.org:80) + return `${protocol}//${host}`; +} + +function normalizeURL(url: URL): void | string { + // ignore click if baseURI does not match the document (external) + if (!url.href.startsWith(document.baseURI)) { + return; + } + + // Normalize path against baseURI + return '/' + url.href.slice(document.baseURI.length); +} + +function extractPath(event: MouseEvent): void | string { + // ignore the click if the default action is prevented + if (event.defaultPrevented) { + return; + } + + // ignore the click if not with the primary mouse button + if (event.button !== 0) { + return; + } + + // ignore the click if a modifier key is pressed + if (event.shiftKey || event.ctrlKey || event.altKey || event.metaKey) { + return; + } + + // find the element that the click is at (or within) + let maybeAnchor = event.target; + const path = event.composedPath + ? event.composedPath() + // @ts-ignore + : (event.path || []); + + // example to check: `for...of` loop here throws the "Not yet implemented" error + for (let i = 0; i < path.length; i++) { + const target = path[i]; + if (target.nodeName && target.nodeName.toLowerCase() === 'a') { + maybeAnchor = target; + break; + } + } + + // @ts-ignore + while (maybeAnchor && maybeAnchor.nodeName.toLowerCase() !== 'a') { + // @ts-ignore + maybeAnchor = maybeAnchor.parentNode; + } + + // ignore the click if not at an element + // @ts-ignore + if (!maybeAnchor || maybeAnchor.nodeName.toLowerCase() !== 'a') { + return; + } + + const anchor = maybeAnchor as HTMLAnchorElement; + + // ignore the click if the element has a non-default target + if (anchor.target && anchor.target.toLowerCase() !== '_self') { + return; + } + + // ignore the click if the element has the 'download' attribute + if (anchor.hasAttribute('download')) { + return; + } + + // ignore the click if the element has the 'router-ignore' attribute + if (anchor.hasAttribute('router-ignore')) { + return; + } + + // ignore the click if the target URL is a fragment on the current page + if (anchor.pathname === window.location.pathname && anchor.hash !== '') { + // @ts-ignore + window.location.hash = anchor.hash; + return; + } + + // ignore the click if the target is external to the app + // In IE11 HTMLAnchorElement does not have the `origin` property + // @ts-ignore + const origin = anchor.origin || getAnchorOrigin(anchor); + if (origin !== window.location.origin) { + return; + } + + return normalizeURL(new URL(anchor.href, anchor.baseURI)); +} + +/** + * Fire 'vaadin-navigated' event to inform components of navigation. + * @param pathname pathname of navigation + * @param search search of navigation + */ +function fireNavigated(pathname:string, search: string) { + setTimeout(() => { + window.dispatchEvent(new CustomEvent('vaadin-navigated', { + detail: { + pathname, + search + } + })); + // @ts-ignore + delete window.Vaadin.Flow.navigation; + } + ) +} + +function postpone() { +} + +const prevent = () => postpone; + +type RouterContainer = Awaited>; + + +type NavigateOpts = { + to: string, + callback: boolean, + opts?: NavigateOptions +}; + +type NavigateFn = (to: string, callback: boolean, opts?: NavigateOptions) => void; + +/** + * A hook providing the `navigate(path: string, opts?: NavigateOptions)` function + * with React Router API that has more consistent history updates. Uses internal + * queue for processing navigate calls. + */ +function useQueuedNavigate(waitReference: React.MutableRefObject | undefined>, navigated: React.MutableRefObject): NavigateFn { + const navigate = useNavigate(); + const navigateQueue = useRef([]).current; + const [navigateQueueLength, setNavigateQueueLength] = useState(0); + + const dequeueNavigation = useCallback(() => { + const navigateArgs = navigateQueue.shift(); + if (navigateArgs === undefined) { + // Empty queue, do nothing. + return; + } + + const blockingNavigate = async () => { + if (waitReference.current) { + await waitReference.current; + waitReference.current = undefined; + } + navigated.current = !navigateArgs.callback; + navigate(navigateArgs.to, navigateArgs.opts); + setNavigateQueueLength(navigateQueue.length); + } + blockingNavigate(); + }, [navigate, setNavigateQueueLength]); + + const dequeueNavigationAfterCurrentTask = useCallback(() => { + queueMicrotask(dequeueNavigation); + }, [dequeueNavigation]); + + const enqueueNavigation = useCallback((to: string, callback: boolean, opts?: NavigateOptions) => { + navigateQueue.push({to: to, callback: callback, opts: opts}); + setNavigateQueueLength(navigateQueue.length); + if (navigateQueue.length === 1) { + // The first navigation can be started right after any pending sync + // jobs, which could add more navigations to the queue. + dequeueNavigationAfterCurrentTask(); + } + }, [setNavigateQueueLength, dequeueNavigationAfterCurrentTask]); + + useEffect(() => () => { + // The Flow component has rendered, but history might not be + // updated yet, as React Router does it asynchronously. + // Use microtask callback for history consistency. + dequeueNavigationAfterCurrentTask(); + }, [navigateQueueLength, dequeueNavigationAfterCurrentTask]); + + return enqueueNavigation; +} + +function Flow() { + const ref = useRef(null); + const navigate = useNavigate(); + const blocker = useBlocker(({ currentLocation, nextLocation }) => { + navigated.current = navigated.current || (nextLocation.pathname === currentLocation.pathname && nextLocation.search === currentLocation.search && nextLocation.hash === currentLocation.hash); + return true; + }); + const location = useLocation(); + const navigated = useRef(false); + const blockerHandled = useRef(false); + const fromAnchor = useRef(false); + const containerRef = useRef(undefined); + const roundTrip = useRef | undefined>(undefined); + const queuedNavigate = useQueuedNavigate(roundTrip, navigated); + const basename = useHref('/'); + + const navigateEventHandler = useCallback((event: MouseEvent) => { + const path = extractPath(event); + if (!path) { + return; + } + + if (event && event.preventDefault) { + event.preventDefault(); + } + + navigated.current = false; + // When navigation is triggered by click on a link, fromAnchor is set to true + // in order to get a server round-trip even when navigating to the same URL again + fromAnchor.current = true; + navigate(path); + // Dispatch close event for overlay drawer on click navigation. + window.dispatchEvent(new CustomEvent('close-overlay-drawer')); + }, [navigate]); + + const vaadinRouterGoEventHandler = useCallback((event: CustomEvent) => { + const url = event.detail; + const path = normalizeURL(url); + if (!path) { + return; + } + + event.preventDefault(); + navigate(path); + }, [navigate]); + + const vaadinNavigateEventHandler = useCallback((event: CustomEvent<{state: unknown, url: string, replace?: boolean, callback: boolean}>) => { + // @ts-ignore + window.Vaadin.Flow.navigation = true; + const path = '/' + event.detail.url; + fromAnchor.current = false; + queuedNavigate(path, event.detail.callback, { state: event.detail.state, replace: event.detail.replace }); + }, [navigate]); + + const redirect = useCallback((path: string) => { + return (() => { + navigate(path, {replace: true}); + }); + }, [navigate]); + + useEffect(() => { + // @ts-ignore + window.addEventListener('vaadin-router-go', vaadinRouterGoEventHandler); + // @ts-ignore + window.addEventListener('vaadin-navigate', vaadinNavigateEventHandler); + + return () => { + // @ts-ignore + window.removeEventListener('vaadin-router-go', vaadinRouterGoEventHandler); + // @ts-ignore + window.removeEventListener('vaadin-navigate', vaadinNavigateEventHandler); + }; + }, [vaadinRouterGoEventHandler, vaadinNavigateEventHandler]); + + useEffect(() => { + return () => { + containerRef.current?.parentNode?.removeChild(containerRef.current); + containerRef.current = undefined; + }; + }, []); + + useEffect(() => { + if (blocker.state === 'blocked') { + if(blockerHandled.current) { + // Blocker is handled and the new navigation + // gets queued to be executed after the current handling ends. + const {pathname, state} = blocker.location; + queuedNavigate(pathname.substring(basename.length), true, { state: state, replace: true }); + return; + } + blockerHandled.current = true; + let blockingPromise: any; + roundTrip.current = new Promise((resolve,reject) => blockingPromise = {resolve:resolve,reject:reject}); + // Release blocker handling after promise is fulfilled + roundTrip.current.then(() => blockerHandled.current = false, () => blockerHandled.current = false); + + // Proceed to the blocked location, unless the navigation originates from a click on a link. + // In that case continue with function execution and perform a server round-trip + if (navigated.current && !fromAnchor.current) { + blocker.proceed(); + blockingPromise.resolve(); + return; + } + fromAnchor.current = false; + const {pathname, search} = blocker.location; + const routes = ((window as any)?.Vaadin?.routesConfig || []) as AgnosticRouteObject[]; + let matched = matchRoutes(Array.from(routes), pathname); + + // Navigation between server routes + // @ts-ignore + if (matched && matched.filter(path => path.route?.element?.type?.name === Flow.name).length != 0) { + containerRef.current?.onBeforeEnter?.call(containerRef?.current, + {pathname, search}, { + prevent() { + blocker.reset(); + blockingPromise.resolve(); + navigated.current = false; + }, + redirect, + continue() { + blocker.proceed(); + blockingPromise.resolve(); + } + }, router); + navigated.current = true; + } else { + // For covering the 'server -> client' use case + Promise.resolve(containerRef.current?.onBeforeLeave?.call(containerRef?.current, { + pathname, + search + }, {prevent}, router)) + .then((cmd: unknown) => { + if (cmd === postpone && containerRef.current) { + // postponed navigation: expose existing blocker to Flow + containerRef.current.serverConnected = (cancel) => { + if (cancel) { + blocker.reset(); + blockingPromise.resolve(); + } else { + blocker.proceed(); + window.removeEventListener('click', navigateEventHandler); + blockingPromise.resolve(); + } + } + } else { + // permitted navigation: proceed with the blocker + blocker.proceed(); + window.removeEventListener('click', navigateEventHandler); + blockingPromise.resolve(); + } + }); + } + } + }, [blocker.state, blocker.location]); + + useEffect(() => { + if (blocker.state === 'blocked') { + return; + } + if (navigated.current) { + navigated.current = false; + fireNavigated(location.pathname,location.search); + return; + } + flow.serverSideRoutes[0].action({pathname: location.pathname, search: location.search}) + .then((container) => { + const outlet = ref.current?.parentNode; + if (outlet && outlet !== container.parentNode) { + outlet.append(container); + window.addEventListener('click', navigateEventHandler); + containerRef.current = container + } + return container.onBeforeEnter?.call(container, {pathname: location.pathname, search: location.search}, {prevent, redirect, continue() { + fireNavigated(location.pathname,location.search);}}, router); + }) + .then((result: unknown) => { + if (typeof result === "function") { + result(); + } + }); + }, [location]); + + return ; +} +Flow.type = 'FlowContainer'; // This is for copilot to recognize this + +export const serverSideRoutes = [ + { path: '/*', element: }, +]; + +/** + * Load the script for an exported WebComponent with the given tag + * + * @param tag name of the exported web-component to load + * + * @returns Promise(resolve, reject) that is fulfilled on script load + */ +export const loadComponentScript = (tag: String): Promise => { + return new Promise((resolve, reject) => { + useEffect(() => { + const script = document.createElement('script'); + script.src = `/web-component/${tag}.js`; + script.onload = function() { + resolve(); + }; + script.onerror = function(err) { + reject(err); + }; + document.head.appendChild(script); + + return () => { + document.head.removeChild(script); + } + }, []); + }); +}; + +interface Properties { + [key: string]: string; +} + +/** + * Load WebComponent script and create a React element for the WebComponent. + * + * @param tag custom web-component tag name. + * @param props optional Properties object to create element attributes with + * @param onload optional callback to be called for script onload + * @param onerror optional callback for error loading the script + */ +export const reactElement = (tag: string, props?: Properties, onload?: () => void, onerror?: (err:any) => void) => { + loadComponentScript(tag).then(() => onload?.(), (err) => { + if(onerror) { + onerror(err); + } else { + console.error(`Failed to load script for ${tag}.`, err); + } + }); + + if(props) { + return React.createElement(tag, props); + } + return React.createElement(tag); +}; + +export default Flow; + +// @ts-ignore +if (import.meta.hot) { + // @ts-ignore + import.meta.hot.accept((newModule) => { + // A hot module replace for Flow.tsx happens when any JS/TS imported through @JsModule + // or similar is updated because this updates generated-flow-imports.js and that in turn + // is imported by this file. We have no means of hot replacing those files, e.g. some + // custom lit element so we need to reload the page. */ + if (newModule) { + window.location.reload(); + } + }); +} diff --git a/kontor-spring/application/frontend/generated/flow/ReactAdapter.tsx b/kontor-spring/application/frontend/generated/flow/ReactAdapter.tsx new file mode 100644 index 0000000..2964eff --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/ReactAdapter.tsx @@ -0,0 +1,238 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +import {createRoot, Root} from "react-dom/client"; +import {createElement, type Dispatch, type ReactElement, useReducer} from "react"; + +type FlowStateKeyChangedAction = Readonly<{ + type: 'stateKeyChanged', + key: K, + value: V, +}>; + +type FlowStateReducerAction = FlowStateKeyChangedAction; + +function stateReducer>>(state: S, action: FlowStateReducerAction): S { + switch (action.type) { + case "stateKeyChanged": + const {key, value} = action; + return { + ...state, + key: value + } as S; + default: + return state; + } +} + +type DispatchEvent = T extends undefined + ? () => boolean + : (value: T) => boolean; + +const emptyAction: Dispatch = () => {}; + +/** + * An object with APIs exposed for using in the {@link ReactAdapterElement#render} + * implementation. + */ +export type RenderHooks = { + /** + * A hook API for using stateful JS properties of the Web Component from + * the React `render()`. + * + * @typeParam T - Type of the state value + * + * @param key - Web Component property name, which is used for two-way + * value propagation from the server and back. + * @param initialValue - Fallback initial value (optional). Only applies if + * the Java component constructor does not invoke `setState`. + * @returns A tuple with two values: + * 1. The current state. + * 2. The `set` function for changing the state and triggering render + * @protected + */ + readonly useState: ReactAdapterElement["useState"] + + /** + * A hook helper to simplify dispatching a `CustomEvent` on the Web + * Component from React. + * + * @typeParam T - The type for `event.detail` value (optional). + * + * @param type - The `CustomEvent` type string. + * @param options - The settings for the `CustomEvent`. + * @returns The `dispatch` function. The function parameters change + * depending on the `T` generic type: + * - For `undefined` type (default), has no parameters. + * - For other types, has one parameter for the `event.detail` value of that type. + * @protected + */ + readonly useCustomEvent: ReactAdapterElement["useCustomEvent"] +}; + +/** + * A base class for Web Components that render using React. Enables creating + * adapters for integrating React components with Flow. Intended for use with + * `ReactAdapterComponent` Flow Java class. + */ +export abstract class ReactAdapterElement extends HTMLElement { + #root: Root | undefined = undefined; + #rootRendered: boolean = false; + + #state: Record = Object.create(null); + #stateSetters = new Map>(); + #customEvents = new Map>(); + #dispatchFlowState: Dispatch = emptyAction; + + readonly #renderHooks: RenderHooks; + + readonly #Wrapper: () => ReactElement | null; + + #unmountComplete = Promise.resolve(); + + constructor() { + super(); + this.#renderHooks = { + useState: this.useState.bind(this), + useCustomEvent: this.useCustomEvent.bind(this) + }; + this.#Wrapper = this.#renderWrapper.bind(this); + this.#markAsUsed(); + } + + public async connectedCallback() { + await this.#unmountComplete; + this.#root = createRoot(this); + this.#maybeRenderRoot(); + } + + public async disconnectedCallback() { + this.#unmountComplete = Promise.resolve(); + await this.#unmountComplete; + this.#root?.unmount(); + this.#root = undefined; + this.#rootRendered = false; + } + + /** + * A hook API for using stateful JS properties of the Web Component from + * the React `render()`. + * + * @typeParam T - Type of the state value + * + * @param key - Web Component property name, which is used for two-way + * value propagation from the server and back. + * @param initialValue - Fallback initial value (optional). Only applies if + * the Java component constructor does not invoke `setState`. + * @returns A tuple with two values: + * 1. The current state. + * 2. The `set` function for changing the state and triggering render + * @protected + */ + protected useState(key: string, initialValue?: T): [value: T, setValue: Dispatch] { + if (this.#stateSetters.has(key)) { + return [this.#state[key] as T, this.#stateSetters.get(key)!]; + } + + const value = ((this as Record)[key] as T) ?? initialValue!; + this.#state[key] = value; + Object.defineProperty(this, key, { + enumerable: true, + get(): T { + return this.#state[key]; + }, + set(nextValue: T) { + this.#state[key] = nextValue; + this.#dispatchFlowState({type: 'stateKeyChanged', key, value}); + } + }); + + const dispatchChangedEvent = this.useCustomEvent<{value: T}>(`${key}-changed`, {detail: {value}}); + const setValue = (value: T) => { + this.#state[key] = value; + dispatchChangedEvent({value}); + this.#dispatchFlowState({type: 'stateKeyChanged', key, value}); + }; + this.#stateSetters.set(key, setValue as Dispatch); + return [value, setValue]; + } + + /** + * A hook helper to simplify dispatching a `CustomEvent` on the Web + * Component from React. + * + * @typeParam T - The type for `event.detail` value (optional). + * + * @param type - The `CustomEvent` type string. + * @param options - The settings for the `CustomEvent`. + * @returns The `dispatch` function. The function parameters change + * depending on the `T` generic type: + * - For `undefined` type (default), has no parameters. + * - For other types, has one parameter for the `event.detail` value of that type. + * @protected + */ + protected useCustomEvent(type: string, options: CustomEventInit = {}): DispatchEvent { + if (!this.#customEvents.has(type)) { + const dispatch = ((detail?: T) => { + const eventInitDict = detail === undefined ? options : { + ...options, + detail + }; + const event = new CustomEvent(type, eventInitDict); + return this.dispatchEvent(event); + }) as DispatchEvent; + this.#customEvents.set(type, dispatch as DispatchEvent); + return dispatch; + } + return this.#customEvents.get(type)! as DispatchEvent; + } + + /** + * The Web Component render function. To be implemented by users with React. + * + * @param hooks - the adapter APIs exposed for the implementation. + * @protected + */ + protected abstract render(hooks: RenderHooks): ReactElement | null; + + #maybeRenderRoot() { + if (this.#rootRendered || !this.#root) { + return; + } + + this.#root.render(createElement(this.#Wrapper)); + this.#rootRendered = true; + } + + #renderWrapper(): ReactElement | null { + const [state, dispatchFlowState] = useReducer(stateReducer, this.#state); + this.#state = state; + this.#dispatchFlowState = dispatchFlowState; + return this.render(this.#renderHooks); + } + + #markAsUsed() : void { + // @ts-ignore + let vaadinObject = window.Vaadin || {}; + // @ts-ignore + if (vaadinObject.developmentMode) { + vaadinObject.registrations = vaadinObject.registrations || []; + vaadinObject.registrations.push({ + is: 'ReactAdapterElement', + version: '24.4.17' + }); + } + } +} diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js new file mode 100644 index 0000000..12128fa --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js @@ -0,0 +1,41 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/upload/src/vaadin-upload.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/avatar/src/vaadin-avatar.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import 'Frontend/generated/jar-resources/menubarConnector.js'; +import '@vaadin/menu-bar/src/vaadin-menu-bar.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js new file mode 100644 index 0000000..c0fc958 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js @@ -0,0 +1,37 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/avatar/src/vaadin-avatar.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import 'Frontend/generated/jar-resources/menubarConnector.js'; +import '@vaadin/menu-bar/src/vaadin-menu-bar.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js new file mode 100644 index 0000000..1c8d969 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js @@ -0,0 +1,31 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js new file mode 100644 index 0000000..6dca164 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js @@ -0,0 +1,40 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/custom-field/src/vaadin-custom-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/select/src/vaadin-select.js'; +import 'Frontend/generated/jar-resources/selectConnector.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js new file mode 100644 index 0000000..52548d8 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js @@ -0,0 +1,38 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/custom-field/src/vaadin-custom-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js new file mode 100644 index 0000000..971c311 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js @@ -0,0 +1,36 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js new file mode 100644 index 0000000..aea33a1 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js @@ -0,0 +1,34 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js new file mode 100644 index 0000000..fa3f12d --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js @@ -0,0 +1,37 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js new file mode 100644 index 0000000..cd5ca6c --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js @@ -0,0 +1,30 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js new file mode 100644 index 0000000..b2898dc --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js @@ -0,0 +1,47 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/upload/src/vaadin-upload.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/avatar/src/vaadin-avatar.js'; +import '@vaadin/custom-field/src/vaadin-custom-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/accordion/src/vaadin-accordion.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/details/src/vaadin-details.js'; +import 'Frontend/generated/jar-resources/menubarConnector.js'; +import '@vaadin/menu-bar/src/vaadin-menu-bar.js'; +import 'Frontend/generated/jar-resources/messageListConnector.js'; +import '@vaadin/message-list/src/vaadin-message-list.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/accordion/src/vaadin-accordion-panel.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js new file mode 100644 index 0000000..c967450 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js @@ -0,0 +1,46 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/upload/src/vaadin-upload.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/avatar/src/vaadin-avatar.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/accordion/src/vaadin-accordion.js'; +import '@vaadin/item/src/vaadin-item.js'; +import '@vaadin/details/src/vaadin-details.js'; +import 'Frontend/generated/jar-resources/menubarConnector.js'; +import '@vaadin/menu-bar/src/vaadin-menu-bar.js'; +import 'Frontend/generated/jar-resources/messageListConnector.js'; +import '@vaadin/message-list/src/vaadin-message-list.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/accordion/src/vaadin-accordion-panel.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js b/kontor-spring/application/frontend/generated/flow/chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js new file mode 100644 index 0000000..5289095 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js @@ -0,0 +1,40 @@ +import 'Frontend/generated/jar-resources/flow-component-renderer.js'; +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/combo-box/src/vaadin-combo-box.js'; +import 'Frontend/generated/jar-resources/comboBoxConnector.js'; +import '@vaadin/list-box/src/vaadin-list-box.js'; +import '@vaadin/app-layout/src/vaadin-app-layout.js'; +import '@vaadin/tooltip/src/vaadin-tooltip.js'; +import '@vaadin/button/src/vaadin-button.js'; +import 'Frontend/generated/jar-resources/buttonFunctions.js'; +import '@vaadin/checkbox-group/src/vaadin-checkbox-group.js'; +import '@vaadin/form-layout/src/vaadin-form-layout.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/grid/src/vaadin-grid-column-group.js'; +import '@vaadin/icon/src/vaadin-icon.js'; +import '@vaadin/grid/src/vaadin-grid.js'; +import '@vaadin/grid/src/vaadin-grid-column.js'; +import '@vaadin/grid/src/vaadin-grid-sorter.js'; +import '@vaadin/checkbox/src/vaadin-checkbox.js'; +import 'Frontend/generated/jar-resources/gridConnector.ts'; +import '@vaadin/app-layout/src/vaadin-drawer-toggle.js'; +import '@vaadin/avatar/src/vaadin-avatar.js'; +import '@vaadin/side-nav/src/vaadin-side-nav.js'; +import 'Frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js'; +import '@vaadin/item/src/vaadin-item.js'; +import 'Frontend/generated/jar-resources/menubarConnector.js'; +import '@vaadin/menu-bar/src/vaadin-menu-bar.js'; +import '@vaadin/horizontal-layout/src/vaadin-horizontal-layout.js'; +import '@vaadin/integer-field/src/vaadin-integer-field.js'; +import '@vaadin/password-field/src/vaadin-password-field.js'; +import '@vaadin/email-field/src/vaadin-email-field.js'; +import '@vaadin/side-nav/src/vaadin-side-nav-item.js'; +import '@vaadin/context-menu/src/vaadin-context-menu.js'; +import 'Frontend/generated/jar-resources/contextMenuConnector.js'; +import 'Frontend/generated/jar-resources/contextMenuTargetConnector.js'; +import '@vaadin/form-layout/src/vaadin-form-item.js'; +import '@vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js'; +import '@vaadin/text-field/src/vaadin-text-field.js'; +import '@vaadin/icons/vaadin-iconset.js'; +import '@vaadin/scroller/src/vaadin-scroller.js'; +import 'Frontend/generated/jar-resources/lit-renderer.ts'; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/generated-flow-imports.d.ts b/kontor-spring/application/frontend/generated/flow/generated-flow-imports.d.ts new file mode 100644 index 0000000..693da49 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/generated-flow-imports.d.ts @@ -0,0 +1 @@ +export {} \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/generated-flow-imports.js b/kontor-spring/application/frontend/generated/flow/generated-flow-imports.js new file mode 100644 index 0000000..6683894 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/generated-flow-imports.js @@ -0,0 +1,129 @@ +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/login/src/vaadin-login-form.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/common-frontend/ConnectionIndicator.js'; +import '@vaadin/vaadin-lumo-styles/color-global.js'; +import '@vaadin/vaadin-lumo-styles/typography-global.js'; +import '@vaadin/vaadin-lumo-styles/sizing.js'; +import '@vaadin/vaadin-lumo-styles/spacing.js'; +import '@vaadin/vaadin-lumo-styles/style.js'; +import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js'; + +const loadOnDemand = (key) => { + const pending = []; + if (key === 'c328bf4e4c470cb597d58899026ba6b89a944dee8ffd3ea011e90ee9aeeee27c') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '9ce37be5a74bf0ff9346f2822bbac9270df4f953da21cb2d785e770ca5dd01d7') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'ccd55787f5a1e343f5dc1254ffc7fab91e1913779dc57cb415ad1300dea4cb1f') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '2cb1880b969b3fedc36eac80054c349df90ddf1cd80ee10b968c29f4eaa88a4e') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'a4c2b914cec6ef827916799d9f759a1f4f76d51ed83273926c90ec09aac6becf') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'db309c5c427d2bdf28b482ca33ed5b07959a29e078fbc382227064eb0bc47cd1') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'c52559b64d6adfff5f69234e7fdb496781e7381311f9f4b9ecfed53fffac5d57') { + pending.push(import('./chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js')); + } + if (key === '5abe8617842b0f1f3f760c1f2646da92447ae772525c9f959dacb56bb6a53951') { + pending.push(import('./chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js')); + } + if (key === '92cc7bc27fb17a2ce7c5e6437206562e88af166d62d4201b3376c89096f2294b') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '8b1c3c53d0fee6dc15701341cd201cba5cf6001f63290b8400c27b705ddc6a69') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '33e92d55f9a1f8728d4b6a2b77866adf628cbcea2f314570ab749e7be65fd4f2') { + pending.push(import('./chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js')); + } + if (key === 'a8644bbdac9f76a186dae33402283360b6298dc5256a9476710657c7a722c138') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '7d5a0beef4287b5aedb42549f517887177d18e56f5e9137696af8122d14267b9') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '4b1578b95f124f37ae3f8f70e0249e97a188ccc65fcdf8d499c46fe2bbb931e1') { + pending.push(import('./chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js')); + } + if (key === 'eef3df7f33228e76092b585d0b298b901795b89e5252d41bfd46b2d93ee54d98') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '1319ee36f1c03b61f0cf5b7db53752d14c1fdcd0ef44ad62d26de022421453d8') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '03224c2c38efec439bff4a3b5fd75c59eb7c7cbe602c4ab6204bf960f4cc8dd1') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === 'c63267ed0b6f3ead3df845d30538006d9c6177004a3d72f75547f47972038c09') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === '347c65b94723c2521c989ed39ca687ebbc3efd511a6dce5643806afc01a09b4d') { + pending.push(import('./chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js')); + } + if (key === 'bd7d312f463946ac90c6b90b50d8ed934ef52f2f322b39de591e9a9bbfed23bb') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'e03d080ce3184deeab00169be431581d11f02d0e5aed273312580052625b6039') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === 'a3b382177d66fb5a68982d662aedbee991fcf10b8b27dc3ec6b8d126249c0de0') { + pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js')); + } + if (key === '424fae8676c2936d10aecdf4a2211bd4b9c0d7f45bbf4d0278cb45a4910a8335') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'c5a1f9fa497c9d3f8488a921fd4ee1d2cc0c7b92470eb414af17ae6ab1e86c8c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'cd52f6b638c5b34e04e89d6d9e7336530164212a857009bfec5b896616ba9d41') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'c05cb991705ee2e170b759b885ac443cc83a9e007d675caa681d0eafd58757cb') { + pending.push(import('./chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js')); + } + if (key === '19423b899367fccfddaddcb5673dec3972d4a05047b84f07116e15f746718e2c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '15e20ce4e95ded8f73b6c07558205c320e82ef36ac6fb0c8e70b4988565d7b6f') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '3da4680876a33e024b7dfb7ca24e355497e1bc913252c5c60463366a250b4990') { + pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js')); + } + if (key === 'd1c0ee1031445d9f49238644266bbf182b15c2e971f3dbfa70c79d48c73bab8c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '74cb640efacbc78ad0cb2c23d263126a4d6bed0102725673c72ba9b98f6e325b') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'b5d8cf1e1d8b41577fd6cc4842702cb1cdc8331a90a7f660debbaf630b1b64f6') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '252419c2d80b6b0ef2146c966be865d2c7d8af687517db47e29911536d8f8b67') { + pending.push(import('./chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js')); + } + if (key === 'eba77023f6ebb6a8e07872c859c84f4743e15aa1be9634ede6104f35f0fbbf4e') { + pending.push(import('./chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js')); + } + if (key === '097cf7e1cd92ac0d2bb9167644ccb0ea371bbf9fd088e935c621ccc80e73466e') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + return Promise.all(pending); +} + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.loadOnDemand = loadOnDemand; +window.Vaadin.Flow.resetFocus = () => { + let ae=document.activeElement; + while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement; + return !ae || ae.blur() || ae.focus() || true; +} \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/flow/generated-flow-webcomponent-imports.js b/kontor-spring/application/frontend/generated/flow/generated-flow-webcomponent-imports.js new file mode 100644 index 0000000..bc32939 --- /dev/null +++ b/kontor-spring/application/frontend/generated/flow/generated-flow-webcomponent-imports.js @@ -0,0 +1,129 @@ +import { injectGlobalWebcomponentCss } from 'Frontend/generated/jar-resources/theme-util.js'; + +import '@vaadin/polymer-legacy-adapter/style-modules.js'; +import '@vaadin/login/src/vaadin-login-form.js'; +import '@vaadin/vertical-layout/src/vaadin-vertical-layout.js'; +import '@vaadin/common-frontend/ConnectionIndicator.js'; +import '@vaadin/vaadin-lumo-styles/sizing.js'; +import '@vaadin/vaadin-lumo-styles/spacing.js'; +import '@vaadin/vaadin-lumo-styles/style.js'; +import '@vaadin/vaadin-lumo-styles/vaadin-iconset.js'; + +const loadOnDemand = (key) => { + const pending = []; + if (key === 'c328bf4e4c470cb597d58899026ba6b89a944dee8ffd3ea011e90ee9aeeee27c') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '9ce37be5a74bf0ff9346f2822bbac9270df4f953da21cb2d785e770ca5dd01d7') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'ccd55787f5a1e343f5dc1254ffc7fab91e1913779dc57cb415ad1300dea4cb1f') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '2cb1880b969b3fedc36eac80054c349df90ddf1cd80ee10b968c29f4eaa88a4e') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'a4c2b914cec6ef827916799d9f759a1f4f76d51ed83273926c90ec09aac6becf') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'db309c5c427d2bdf28b482ca33ed5b07959a29e078fbc382227064eb0bc47cd1') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'c52559b64d6adfff5f69234e7fdb496781e7381311f9f4b9ecfed53fffac5d57') { + pending.push(import('./chunks/chunk-f6178cce1ebec61e59880c992fc82a6e72ccc813d60340c8f06ca55bd9d2ae6e.js')); + } + if (key === '5abe8617842b0f1f3f760c1f2646da92447ae772525c9f959dacb56bb6a53951') { + pending.push(import('./chunks/chunk-d45507d93ce78f2bd5626318d615a77e981f3b67d14e311609fc7e6eb8b4a8dc.js')); + } + if (key === '92cc7bc27fb17a2ce7c5e6437206562e88af166d62d4201b3376c89096f2294b') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '8b1c3c53d0fee6dc15701341cd201cba5cf6001f63290b8400c27b705ddc6a69') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '33e92d55f9a1f8728d4b6a2b77866adf628cbcea2f314570ab749e7be65fd4f2') { + pending.push(import('./chunks/chunk-7e3f67aa42739bbfd7719d491ec96f62aa601afc6ff4c5c137101462407daef7.js')); + } + if (key === 'a8644bbdac9f76a186dae33402283360b6298dc5256a9476710657c7a722c138') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '7d5a0beef4287b5aedb42549f517887177d18e56f5e9137696af8122d14267b9') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '4b1578b95f124f37ae3f8f70e0249e97a188ccc65fcdf8d499c46fe2bbb931e1') { + pending.push(import('./chunks/chunk-1ae26979025aaa18725130a0056c321945542c581500949cd45dd11c177d56be.js')); + } + if (key === 'eef3df7f33228e76092b585d0b298b901795b89e5252d41bfd46b2d93ee54d98') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '1319ee36f1c03b61f0cf5b7db53752d14c1fdcd0ef44ad62d26de022421453d8') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '03224c2c38efec439bff4a3b5fd75c59eb7c7cbe602c4ab6204bf960f4cc8dd1') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === 'c63267ed0b6f3ead3df845d30538006d9c6177004a3d72f75547f47972038c09') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === '347c65b94723c2521c989ed39ca687ebbc3efd511a6dce5643806afc01a09b4d') { + pending.push(import('./chunks/chunk-97f12a0b98e2cbece210aa25828a82e3ec679214726ee376aeb472c1884ffc4d.js')); + } + if (key === 'bd7d312f463946ac90c6b90b50d8ed934ef52f2f322b39de591e9a9bbfed23bb') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'e03d080ce3184deeab00169be431581d11f02d0e5aed273312580052625b6039') { + pending.push(import('./chunks/chunk-a2392017163320906c3d0d360ea1af595f7f5f6b2d6a74b6e495b163e8b07278.js')); + } + if (key === 'a3b382177d66fb5a68982d662aedbee991fcf10b8b27dc3ec6b8d126249c0de0') { + pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js')); + } + if (key === '424fae8676c2936d10aecdf4a2211bd4b9c0d7f45bbf4d0278cb45a4910a8335') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'c5a1f9fa497c9d3f8488a921fd4ee1d2cc0c7b92470eb414af17ae6ab1e86c8c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === 'cd52f6b638c5b34e04e89d6d9e7336530164212a857009bfec5b896616ba9d41') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'c05cb991705ee2e170b759b885ac443cc83a9e007d675caa681d0eafd58757cb') { + pending.push(import('./chunks/chunk-95542ade434d930d459b775493c37336f91ccd3ccd19c9e184c620a2a06d8517.js')); + } + if (key === '19423b899367fccfddaddcb5673dec3972d4a05047b84f07116e15f746718e2c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '15e20ce4e95ded8f73b6c07558205c320e82ef36ac6fb0c8e70b4988565d7b6f') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '3da4680876a33e024b7dfb7ca24e355497e1bc913252c5c60463366a250b4990') { + pending.push(import('./chunks/chunk-83f9d052ebbf451492f3575adb415db173f500f3a1c99dea78179b89635afe0f.js')); + } + if (key === 'd1c0ee1031445d9f49238644266bbf182b15c2e971f3dbfa70c79d48c73bab8c') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + if (key === '74cb640efacbc78ad0cb2c23d263126a4d6bed0102725673c72ba9b98f6e325b') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === 'b5d8cf1e1d8b41577fd6cc4842702cb1cdc8331a90a7f660debbaf630b1b64f6') { + pending.push(import('./chunks/chunk-a900a78598d8c15d51256985883433a4aef6a7f2c243035bd9343252fc2a346f.js')); + } + if (key === '252419c2d80b6b0ef2146c966be865d2c7d8af687517db47e29911536d8f8b67') { + pending.push(import('./chunks/chunk-b916c73213516c68de0414cc97cd440995063e89edd3a41714d78d97e2177dec.js')); + } + if (key === 'eba77023f6ebb6a8e07872c859c84f4743e15aa1be9634ede6104f35f0fbbf4e') { + pending.push(import('./chunks/chunk-7c196ddcbe551673c2245906a7473d7dac950fcaf241e1e921202d07bffd8ebf.js')); + } + if (key === '097cf7e1cd92ac0d2bb9167644ccb0ea371bbf9fd088e935c621ccc80e73466e') { + pending.push(import('./chunks/chunk-e1ef0138e72fccbf4e0ccc75092c9cc85cb0df84cc462bbc35ff7b9dc6090d45.js')); + } + return Promise.all(pending); +} + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.loadOnDemand = loadOnDemand; +window.Vaadin.Flow.resetFocus = () => { + let ae=document.activeElement; + while(ae&&ae.shadowRoot) ae = ae.shadowRoot.activeElement; + return !ae || ae.blur() || ae.focus() || true; +} \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/index.tsx b/kontor-spring/application/frontend/generated/index.tsx new file mode 100644 index 0000000..2535286 --- /dev/null +++ b/kontor-spring/application/frontend/generated/index.tsx @@ -0,0 +1,26 @@ +/****************************************************************************** + * This file is auto-generated by Vaadin. + * If you want to customize the entry point, you can copy this file or create + * your own `index.tsx` in your frontend directory. + * By default, the `index.tsx` file should be in `./frontend/` folder. + * + * NOTE: + * - You need to restart the dev-server after adding the new `index.tsx` file. + * After that, all modifications to `index.tsx` are recompiled automatically. + * - `index.js` is also supported if you don't want to use TypeScript. + ******************************************************************************/ + +import { createElement } from 'react'; +import { createRoot } from 'react-dom/client'; +import { RouterProvider } from 'react-router-dom'; +import { router } from 'Frontend/generated/routes.js'; + +function App() { + return ; +} + +const outlet = document.getElementById('outlet')!; +let root = (outlet as any)._root ?? createRoot(outlet); +(outlet as any)._root = root; +root.render(createElement(App)); + diff --git a/kontor-spring/application/frontend/generated/jar-resources/Flow.d.ts b/kontor-spring/application/frontend/generated/jar-resources/Flow.d.ts new file mode 100644 index 0000000..0a0d24d --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/Flow.d.ts @@ -0,0 +1,76 @@ +export interface FlowConfig { + imports?: () => Promise; +} +interface AppConfig { + productionMode: boolean; + appId: string; + uidl: any; +} +interface AppInitResponse { + appConfig: AppConfig; + pushScript?: string; +} +interface Router { + render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise; +} +interface HTMLRouterContainer extends HTMLElement { + onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise; + onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise; + serverConnected?: (cancel: boolean, url?: NavigationParameters) => void; + serverPaused?: () => void; +} +interface FlowRoute { + action: (params: NavigationParameters) => Promise; + path: string; +} +export interface NavigationParameters { + pathname: string; + search: string; +} +export interface PreventCommands { + prevent: () => any; + continue?: () => any; +} +export interface PreventAndRedirectCommands extends PreventCommands { + redirect: (route: string) => any; +} +/** + * Client API for flow UI operations. + */ +export declare class Flow { + config: FlowConfig; + response?: AppInitResponse; + pathname: string; + container: HTMLRouterContainer; + private isActive; + private baseRegex; + private appShellTitle; + private navigation; + constructor(config?: FlowConfig); + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes(): [FlowRoute]; + loadingStarted(): void; + loadingFinished(): void; + private get action(); + private flowLeave; + private flowNavigate; + private getFlowRoutePath; + private getFlowRouteQuery; + private flowInit; + private loadScript; + private injectAppIdScript; + private flowInitClient; + private flowInitUi; + private addConnectionIndicator; + private offlineStubAction; + private isFlowClientLoaded; +} +export {}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/Flow.js b/kontor-spring/application/frontend/generated/jar-resources/Flow.js new file mode 100644 index 0000000..1558575 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/Flow.js @@ -0,0 +1,374 @@ +import { ConnectionIndicator, ConnectionState } from '@vaadin/common-frontend'; +class FlowUiInitializationError extends Error { +} +// flow uses body for keeping references +const flowRoot = window.document.body; +const $wnd = window; +const ROOT_NODE_ID = 1; // See StateTree.java +function getClients() { + return Object.keys($wnd.Vaadin.Flow.clients) + .filter((key) => key !== 'TypeScript') + .map((id) => $wnd.Vaadin.Flow.clients[id]); +} +function sendEvent(eventName, data) { + getClients().forEach((client) => client.sendEventMessage(ROOT_NODE_ID, eventName, data)); +} +/** + * Client API for flow UI operations. + */ +export class Flow { + constructor(config) { + this.response = undefined; + this.pathname = ''; + // flag used to inform Testbench whether a server route is in progress + this.isActive = false; + this.baseRegex = /^\//; + this.navigation = ''; + flowRoot.$ = flowRoot.$ || []; + this.config = config || {}; + // TB checks for the existence of window.Vaadin.Flow in order + // to consider that TB needs to wait for `initFlow()`. + $wnd.Vaadin = $wnd.Vaadin || {}; + $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {}; + $wnd.Vaadin.Flow.clients = { + TypeScript: { + isActive: () => this.isActive + } + }; + // Regular expression used to remove the app-context + const elm = document.head.querySelector('base'); + this.baseRegex = new RegExp(`^${ + // IE11 does not support document.baseURI + (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\/\/[^/]+/i, '')}`); + this.appShellTitle = document.title; + // Put a vaadin-connection-indicator in the dom + this.addConnectionIndicator(); + } + /** + * Return a `route` object for vaadin-router in an one-element array. + * + * The `FlowRoute` object `path` property handles any route, + * and the `action` returns the flow container without updating the content, + * delaying the actual Flow server call to the `onBeforeEnter` phase. + * + * This is a specific API for its use with `vaadin-router`. + */ + get serverSideRoutes() { + return [ + { + path: '(.*)', + action: this.action + } + ]; + } + loadingStarted() { + // Make Testbench know that server request is in progress + this.isActive = true; + $wnd.Vaadin.connectionState.loadingStarted(); + } + loadingFinished() { + // Make Testbench know that server request has finished + this.isActive = false; + $wnd.Vaadin.connectionState.loadingFinished(); + if ($wnd.Vaadin.listener) { + // Listeners registered, do not register again. + return; + } + $wnd.Vaadin.listener = {}; + // Listen for click on router-links -> 'link' navigation trigger + // and on nodes -> 'client' navigation trigger. + // Use capture phase to detect prevented / stopped events. + document.addEventListener('click', (_e) => { + if (_e.target) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + if (_e.target.hasAttribute('router-link')) { + this.navigation = 'link'; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + } + else if (_e.composedPath().some((node) => node.nodeName === 'A')) { + this.navigation = 'client'; + } + } + }, { + capture: true + }); + } + get action() { + // Return a function which is bound to the flow instance, thus we can use + // the syntax `...serverSideRoutes` in vaadin-router. + return async (params) => { + // Store last action pathname so as we can check it in events + this.pathname = params.pathname; + if ($wnd.Vaadin.connectionState.online) { + try { + await this.flowInit(); + } + catch (error) { + if (error instanceof FlowUiInitializationError) { + // error initializing Flow: assume connection lost + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + return this.offlineStubAction(); + } + else { + throw error; + } + } + } + else { + // insert an offline stub + return this.offlineStubAction(); + } + // When an action happens, navigation will be resolved `onBeforeEnter` + this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd); + // For covering the 'server -> client' use case + this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd); + return this.container; + }; + } + // Send a remote call to `JavaScriptBootstrapUI` to check + // whether navigation has to be cancelled. + async flowLeave(ctx, cmd) { + // server -> server, viewing offline stub, or browser is offline + const { connectionState } = $wnd.Vaadin; + if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) { + return Promise.resolve({}); + } + // 'server -> client' + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side to cancel navigation + this.container.serverConnected = (cancel) => { + var _a; + resolve(cmd && cancel ? cmd.prevent() : (_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd)); + this.loadingFinished(); + }; + // Call server side to check whether we can leave the view + sendEvent('ui-leave-navigation', { route: this.getFlowRoutePath(ctx), query: this.getFlowRouteQuery(ctx) }); + }); + } + // Send the remote call to `JavaScriptBootstrapUI` to render the flow + // route specified by the context + async flowNavigate(ctx, cmd) { + if (this.response) { + return new Promise((resolve) => { + this.loadingStarted(); + // The callback to run from server side once the view is ready + this.container.serverConnected = (cancel, redirectContext) => { + var _a; + if (cmd && cancel) { + resolve(cmd.prevent()); + } + else if (cmd && cmd.redirect && redirectContext) { + resolve(cmd.redirect(redirectContext.pathname)); + } + else { + (_a = cmd === null || cmd === void 0 ? void 0 : cmd.continue) === null || _a === void 0 ? void 0 : _a.call(cmd); + this.container.style.display = ''; + resolve(this.container); + } + this.loadingFinished(); + }; + this.container.serverPaused = () => { + this.loadingFinished(); + }; + // Call server side to navigate to the given route + sendEvent('ui-navigate', { + route: this.getFlowRoutePath(ctx), + query: this.getFlowRouteQuery(ctx), + appShellTitle: this.appShellTitle, + historyState: history.state, + trigger: this.navigation + }); + // Default to history navigation trigger. + // Link and client cases are handled by click listener in loadingFinished(). + this.navigation = 'history'; + }); + } + else { + // No server response => offline or erroneous connection + return Promise.resolve(this.container); + } + } + getFlowRoutePath(context) { + return decodeURIComponent(context.pathname).replace(this.baseRegex, ''); + } + getFlowRouteQuery(context) { + return (context.search && context.search.substring(1)) || ''; + } + // import flow client modules and initialize UI in server side. + async flowInit() { + // Do not start flow twice + if (!this.isFlowClientLoaded()) { + // show flow progress indicator + this.loadingStarted(); + // Initialize server side UI + this.response = await this.flowInitUi(); + const { pushScript, appConfig } = this.response; + if (typeof pushScript === 'string') { + await this.loadScript(pushScript); + } + const { appId } = appConfig; + // we use a custom tag for the flow app container + // This must be created before bootstrapMod.init is called as that call + // can handle a UIDL from the server, which relies on the container being available + const tag = `flow-container-${appId.toLowerCase()}`; + const serverCreatedContainer = document.querySelector(tag); + if (serverCreatedContainer) { + this.container = serverCreatedContainer; + } + else { + this.container = document.createElement(tag); + this.container.id = appId; + } + flowRoot.$[appId] = this.container; + // Load bootstrap script with server side parameters + const bootstrapMod = await import('./FlowBootstrap'); + bootstrapMod.init(this.response); + // Load custom modules defined by user + if (typeof this.config.imports === 'function') { + this.injectAppIdScript(appId); + await this.config.imports(); + } + // Load flow-client module + const clientMod = await import('./FlowClient'); + await this.flowInitClient(clientMod); + // hide flow progress indicator + this.loadingFinished(); + } + // It might be that components created from server expect that their content has been rendered. + // Appending eagerly the container we avoid these kind of errors. + // Note that the client router will move this container to the outlet if the navigation succeed + if (this.container && !this.container.isConnected) { + this.container.style.display = 'none'; + document.body.appendChild(this.container); + } + return this.response; + } + async loadScript(url) { + return new Promise((resolve, reject) => { + const script = document.createElement('script'); + script.onload = () => resolve(); + script.onerror = reject; + script.src = url; + document.body.appendChild(script); + }); + } + injectAppIdScript(appId) { + const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-')); + const scriptAppId = document.createElement('script'); + scriptAppId.type = 'module'; + scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode); + document.body.append(scriptAppId); + } + // After the flow-client javascript module has been loaded, this initializes flow UI + // in the browser. + async flowInitClient(clientMod) { + clientMod.init(); + // client init is async, we need to loop until initialized + return new Promise((resolve) => { + const intervalId = setInterval(() => { + // client `isActive() == true` while initializing or processing + const initializing = getClients().reduce((prev, client) => prev || client.isActive(), false); + if (!initializing) { + clearInterval(intervalId); + resolve(); + } + }, 5); + }); + } + // Returns the `appConfig` object + async flowInitUi() { + // appConfig was sent in the index.html request + const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial; + if (initial) { + $wnd.Vaadin.TypeScript.initial = undefined; + return Promise.resolve(initial); + } + // send a request to the `JavaScriptBootstrapHandler` + return new Promise((resolve, reject) => { + const xhr = new XMLHttpRequest(); + const httpRequest = xhr; + const requestPath = `?v-r=init&location=${encodeURIComponent(this.getFlowRoutePath(location))}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`; + httpRequest.open('GET', requestPath); + httpRequest.onerror = () => reject(new FlowUiInitializationError(`Invalid server response when initializing Flow UI. + ${httpRequest.status} + ${httpRequest.responseText}`)); + httpRequest.onload = () => { + const contentType = httpRequest.getResponseHeader('content-type'); + if (contentType && contentType.indexOf('application/json') !== -1) { + resolve(JSON.parse(httpRequest.responseText)); + } + else { + httpRequest.onerror(); + } + }; + httpRequest.send(); + }); + } + // Create shared connection state store and connection indicator + addConnectionIndicator() { + // add connection indicator to DOM + ConnectionIndicator.create(); + // Listen to browser online/offline events and update the loading indicator accordingly. + // Note: if flow-client is loaded, it instead handles the state transitions. + $wnd.addEventListener('online', () => { + if (!this.isFlowClientLoaded()) { + // Send an HTTP HEAD request for sw.js to verify server reachability. + // We do not expect sw.js to be cached, so the request goes to the + // server rather than being served from local cache. + // Require network-level failure to revert the state to CONNECTION_LOST + // (HTTP error code is ok since it still verifies server's presence). + $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING; + const http = new XMLHttpRequest(); + http.open('HEAD', 'sw.js'); + http.onload = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED; + }; + http.onerror = () => { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + }; + // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED + // errors that sometimes occurs even if browser says it is online + setTimeout(() => http.send(), 50); + } + }); + $wnd.addEventListener('offline', () => { + if (!this.isFlowClientLoaded()) { + $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST; + } + }); + } + async offlineStubAction() { + const offlineStub = document.createElement('iframe'); + const offlineStubPath = './offline-stub.html'; + offlineStub.setAttribute('src', offlineStubPath); + offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0'); + this.response = undefined; + let onlineListener; + const removeOfflineStubAndOnlineListener = () => { + if (onlineListener !== undefined) { + $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener); + onlineListener = undefined; + } + }; + offlineStub.onBeforeEnter = (ctx, _cmds, router) => { + onlineListener = () => { + if ($wnd.Vaadin.connectionState.online) { + removeOfflineStubAndOnlineListener(); + router.render(ctx, false); + } + }; + $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener); + }; + offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => { + removeOfflineStubAndOnlineListener(); + }; + return offlineStub; + } + isFlowClientLoaded() { + return this.response !== undefined; + } +} +//# sourceMappingURL=Flow.js.map \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/jar-resources/Flow.js.map b/kontor-spring/application/frontend/generated/jar-resources/Flow.js.map new file mode 100644 index 0000000..c33c758 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/Flow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Flow.js","sourceRoot":"","sources":["../../../../src/main/frontend/Flow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EAGhB,MAAM,yBAAyB,CAAC;AAMjC,MAAM,yBAA0B,SAAQ,KAAK;CAAG;AAgDhD,wCAAwC;AACxC,MAAM,QAAQ,GAAa,MAAM,CAAC,QAAQ,CAAC,IAAW,CAAC;AACvD,MAAM,IAAI,GAAG,MAOE,CAAC;AAChB,MAAM,YAAY,GAAG,CAAC,CAAC,CAAC,qBAAqB;AAE7C,SAAS,UAAU;IACjB,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;SACzC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,CAAC;SACrC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,SAAS,CAAC,SAAiB,EAAE,IAAS;IAC7C,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,IAAI;IAef,YAAY,MAAmB;QAb/B,aAAQ,GAAqB,SAAS,CAAC;QACvC,aAAQ,GAAG,EAAE,CAAC;QAId,sEAAsE;QAC9D,aAAQ,GAAG,KAAK,CAAC;QAEjB,cAAS,GAAG,KAAK,CAAC;QAGlB,eAAU,GAAW,EAAE,CAAC;QAG9B,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE,CAAC;QAE3B,6DAA6D;QAC7D,sDAAsD;QACtD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG;YACzB,UAAU,EAAE;gBACV,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ;aAC9B;SACF,CAAC;QAEF,oDAAoD;QACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,MAAM,CACzB,IAAI;QACF,yCAAyC;QACzC,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CACjF,EAAE,CACH,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;QACpC,+CAA+C;QAC/C,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,gBAAgB;QAClB,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;SACF,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,yDAAyD;QACzD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,EAAE,CAAC;IAC/C,CAAC;IAED,eAAe;QACb,uDAAuD;QACvD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC;QAE9C,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YACxB,+CAA+C;YAC/C,OAAO;SACR;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;QAC1B,gEAAgE;QAChE,mDAAmD;QACnD,0DAA0D;QAC1D,QAAQ,CAAC,gBAAgB,CACvB,OAAO,EACP,CAAC,EAAE,EAAE,EAAE;YACL,IAAI,EAAE,CAAC,MAAM,EAAE;gBACb,6DAA6D;gBAC7D,aAAa;gBACb,IAAI,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE;oBACzC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC;oBACzB,6DAA6D;oBAC7D,aAAa;iBACd;qBAAM,IAAI,EAAE,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,EAAE;oBAClE,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;iBAC5B;aACF;QACH,CAAC,EACD;YACE,OAAO,EAAE,IAAI;SACd,CACF,CAAC;IACJ,CAAC;IAED,IAAY,MAAM;QAChB,yEAAyE;QACzE,qDAAqD;QACrD,OAAO,KAAK,EAAE,MAA4B,EAAE,EAAE;YAC5C,6DAA6D;YAC7D,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;YAEhC,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;gBACtC,IAAI;oBACF,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACvB;gBAAC,OAAO,KAAK,EAAE;oBACd,IAAI,KAAK,YAAY,yBAAyB,EAAE;wBAC9C,kDAAkD;wBAClD,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;wBACpE,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;qBACjC;yBAAM;wBACL,MAAM,KAAK,CAAC;qBACb;iBACF;aACF;iBAAM;gBACL,yBAAyB;gBACzB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;aACjC;YAED,sEAAsE;YACtE,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACzE,+CAA+C;YAC/C,IAAI,CAAC,SAAS,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACtE,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC;IAED,yDAAyD;IACzD,0CAA0C;IAClC,KAAK,CAAC,SAAS,CAAC,GAAyB,EAAE,GAAqB;QACtE,gEAAgE;QAChE,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,eAAe,CAAC,OAAO,EAAE;YAC3F,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAC5B;QACD,qBAAqB;QACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,4DAA4D;YAC5D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,EAAE;;gBAC1C,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,+CAAb,GAAG,CAAc,CAAC,CAAC;gBAC3D,IAAI,CAAC,eAAe,EAAE,CAAC;YACzB,CAAC,CAAC;YAEF,0DAA0D;YAC1D,SAAS,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC9G,CAAC,CAAC,CAAC;IACL,CAAC;IAED,qEAAqE;IACrE,iCAAiC;IACzB,KAAK,CAAC,YAAY,CAAC,GAAyB,EAAE,GAAgC;QACpF,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC7B,IAAI,CAAC,cAAc,EAAE,CAAC;gBACtB,8DAA8D;gBAC9D,IAAI,CAAC,SAAS,CAAC,eAAe,GAAG,CAAC,MAAM,EAAE,eAAsC,EAAE,EAAE;;oBAClF,IAAI,GAAG,IAAI,MAAM,EAAE;wBACjB,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;qBACxB;yBAAM,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,IAAI,eAAe,EAAE;wBACjD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;qBACjD;yBAAM;wBACL,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,QAAQ,+CAAb,GAAG,CAAc,CAAC;wBAClB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC;wBAClC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;qBACzB;oBACD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,IAAI,CAAC,SAAS,CAAC,YAAY,GAAG,GAAG,EAAE;oBACjC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACzB,CAAC,CAAC;gBAEF,kDAAkD;gBAClD,SAAS,CAAC,aAAa,EAAE;oBACvB,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC;oBACjC,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;oBAClC,aAAa,EAAE,IAAI,CAAC,aAAa;oBACjC,YAAY,EAAE,OAAO,CAAC,KAAK;oBAC3B,OAAO,EAAE,IAAI,CAAC,UAAU;iBACzB,CAAC,CAAC;gBACH,yCAAyC;gBACzC,4EAA4E;gBAC5E,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;YAC9B,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,wDAAwD;YACxD,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxC;IACH,CAAC;IAEO,gBAAgB,CAAC,OAAwC;QAC/D,OAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IAC1E,CAAC;IACO,iBAAiB,CAAC,OAAwC;QAChE,OAAO,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,CAAC;IAED,+DAA+D;IACvD,KAAK,CAAC,QAAQ;QACpB,0BAA0B;QAC1B,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;YAC9B,+BAA+B;YAC/B,IAAI,CAAC,cAAc,EAAE,CAAC;YAEtB,4BAA4B;YAC5B,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YAExC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;YAEhD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;gBAClC,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;aACnC;YACD,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAC;YAE5B,iDAAiD;YACjD,uEAAuE;YACvE,mFAAmF;YACnF,MAAM,GAAG,GAAG,kBAAkB,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACpD,MAAM,sBAAsB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC3D,IAAI,sBAAsB,EAAE;gBAC1B,IAAI,CAAC,SAAS,GAAG,sBAAqC,CAAC;aACxD;iBAAM;gBACL,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBAC7C,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,CAAC;aAC3B;YACD,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YAEnC,oDAAoD;YACpD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;YACrD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAEjC,sCAAsC;YACtC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE;gBAC7C,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;aAC7B;YAED,0BAA0B;YAC1B,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;YAC/C,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAErC,+BAA+B;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SACxB;QAED,+FAA+F;QAC/F,iEAAiE;QACjE,+FAA+F;QAC/F,IAAI,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YACjD,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;YACtC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC3C;QACD,OAAO,IAAI,CAAC,QAAS,CAAC;IACxB,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,GAAW;QAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAChD,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;YAChC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;YACxB,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,iBAAiB,CAAC,KAAa;QACrC,MAAM,oBAAoB,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;QACxE,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACrD,WAAW,CAAC,IAAI,GAAG,QAAQ,CAAC;QAC5B,WAAW,CAAC,YAAY,CAAC,aAAa,EAAE,oBAAoB,CAAC,CAAC;QAC9D,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,oFAAoF;IACpF,kBAAkB;IACV,KAAK,CAAC,cAAc,CAAC,SAAc;QACzC,SAAS,CAAC,IAAI,EAAE,CAAC;QACjB,0DAA0D;QAC1D,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,+DAA+D;gBAC/D,MAAM,YAAY,GAAG,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;gBAC7F,IAAI,CAAC,YAAY,EAAE;oBACjB,aAAa,CAAC,UAAU,CAAC,CAAC;oBAC1B,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC,CAAC,CAAC;IACL,CAAC;IAED,iCAAiC;IACzB,KAAK,CAAC,UAAU;QACtB,+CAA+C;QAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;QACxF,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC;YAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;SACjC;QAED,qDAAqD;QACrD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACrC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YACjC,MAAM,WAAW,GAAG,GAAU,CAAC;YAC/B,MAAM,WAAW,GAAG,sBAAsB,kBAAkB,CAC1D,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAChC,UAAU,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAElE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;YAErC,WAAW,CAAC,OAAO,GAAG,GAAG,EAAE,CACzB,MAAM,CACJ,IAAI,yBAAyB,CAC3B;UACF,WAAW,CAAC,MAAM;UAClB,WAAW,CAAC,YAAY,EAAE,CACzB,CACF,CAAC;YAEJ,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE;gBACxB,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;gBAClE,IAAI,WAAW,IAAI,WAAW,CAAC,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,EAAE;oBACjE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC;iBAC/C;qBAAM;oBACL,WAAW,CAAC,OAAO,EAAE,CAAC;iBACvB;YACH,CAAC,CAAC;YACF,WAAW,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gEAAgE;IACxD,sBAAsB;QAC5B,kCAAkC;QAClC,mBAAmB,CAAC,MAAM,EAAE,CAAC;QAE7B,wFAAwF;QACxF,4EAA4E;QAC5E,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE;YACnC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,qEAAqE;gBACrE,kEAAkE;gBAClE,oDAAoD;gBACpD,uEAAuE;gBACvE,qEAAqE;gBACrE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,YAAY,CAAC;gBACjE,MAAM,IAAI,GAAG,IAAI,cAAc,EAAE,CAAC;gBAClC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC3B,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE;oBACjB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,SAAS,CAAC;gBAChE,CAAC,CAAC;gBACF,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;oBAClB,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;gBACtE,CAAC,CAAC;gBACF,sEAAsE;gBACtE,iEAAiE;gBACjE,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;aACnC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE;gBAC9B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,eAAe,CAAC;aACrE;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,iBAAiB;QAC7B,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAwB,CAAC;QAC5E,MAAM,eAAe,GAAG,qBAAqB,CAAC;QAC9C,WAAW,CAAC,YAAY,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;QACjD,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,sCAAsC,CAAC,CAAC;QAC1E,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAE1B,IAAI,cAAyD,CAAC;QAC9D,MAAM,kCAAkC,GAAG,GAAG,EAAE;YAC9C,IAAI,cAAc,KAAK,SAAS,EAAE;gBAChC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,yBAAyB,CAAC,cAAc,CAAC,CAAC;gBACtE,cAAc,GAAG,SAAS,CAAC;aAC5B;QACH,CAAC,CAAC;QAEF,WAAW,CAAC,aAAa,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YACjD,cAAc,GAAG,GAAG,EAAE;gBACpB,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;oBACtC,kCAAkC,EAAE,CAAC;oBACrC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC;YACF,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;QACrE,CAAC,CAAC;QACF,WAAW,CAAC,aAAa,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;YACnD,kCAAkC,EAAE,CAAC;QACvC,CAAC,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;IAEO,kBAAkB;QACxB,OAAO,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC;IACrC,CAAC;CACF","sourcesContent":["import {\n ConnectionIndicator,\n ConnectionState,\n ConnectionStateChangeListener,\n ConnectionStateStore\n} from '@vaadin/common-frontend';\n\nexport interface FlowConfig {\n imports?: () => Promise;\n}\n\nclass FlowUiInitializationError extends Error {}\n\ninterface AppConfig {\n productionMode: boolean;\n appId: string;\n uidl: any;\n}\n\ninterface AppInitResponse {\n appConfig: AppConfig;\n pushScript?: string;\n}\n\ninterface Router {\n render: (ctx: NavigationParameters, shouldUpdateHistory: boolean) => Promise;\n}\n\ninterface HTMLRouterContainer extends HTMLElement {\n onBeforeEnter?: (ctx: NavigationParameters, cmd: PreventAndRedirectCommands, router: Router) => void | Promise;\n onBeforeLeave?: (ctx: NavigationParameters, cmd: PreventCommands, router: Router) => void | Promise;\n serverConnected?: (cancel: boolean, url?: NavigationParameters) => void;\n serverPaused?: () => void;\n}\n\ninterface FlowRoute {\n action: (params: NavigationParameters) => Promise;\n path: string;\n}\n\ninterface FlowRoot {\n $: any;\n $server: any;\n}\n\nexport interface NavigationParameters {\n pathname: string;\n search: string;\n}\n\nexport interface PreventCommands {\n prevent: () => any;\n continue?: () => any;\n}\n\nexport interface PreventAndRedirectCommands extends PreventCommands {\n redirect: (route: string) => any;\n}\n\n// flow uses body for keeping references\nconst flowRoot: FlowRoot = window.document.body as any;\nconst $wnd = window as any as {\n Vaadin: {\n Flow: any;\n TypeScript: any;\n connectionState: ConnectionStateStore;\n listener: any;\n };\n} & EventTarget;\nconst ROOT_NODE_ID = 1; // See StateTree.java\n\nfunction getClients() {\n return Object.keys($wnd.Vaadin.Flow.clients)\n .filter((key) => key !== 'TypeScript')\n .map((id) => $wnd.Vaadin.Flow.clients[id]);\n}\n\nfunction sendEvent(eventName: string, data: any) {\n getClients().forEach((client) => client.sendEventMessage(ROOT_NODE_ID, eventName, data));\n}\n\n/**\n * Client API for flow UI operations.\n */\nexport class Flow {\n config: FlowConfig;\n response?: AppInitResponse = undefined;\n pathname = '';\n\n container!: HTMLRouterContainer;\n\n // flag used to inform Testbench whether a server route is in progress\n private isActive = false;\n\n private baseRegex = /^\\//;\n private appShellTitle: string;\n\n private navigation: string = '';\n\n constructor(config?: FlowConfig) {\n flowRoot.$ = flowRoot.$ || [];\n this.config = config || {};\n\n // TB checks for the existence of window.Vaadin.Flow in order\n // to consider that TB needs to wait for `initFlow()`.\n $wnd.Vaadin = $wnd.Vaadin || {};\n $wnd.Vaadin.Flow = $wnd.Vaadin.Flow || {};\n $wnd.Vaadin.Flow.clients = {\n TypeScript: {\n isActive: () => this.isActive\n }\n };\n\n // Regular expression used to remove the app-context\n const elm = document.head.querySelector('base');\n this.baseRegex = new RegExp(\n `^${\n // IE11 does not support document.baseURI\n (document.baseURI || (elm && elm.href) || '/').replace(/^https?:\\/\\/[^/]+/i, '')\n }`\n );\n this.appShellTitle = document.title;\n // Put a vaadin-connection-indicator in the dom\n this.addConnectionIndicator();\n }\n\n /**\n * Return a `route` object for vaadin-router in an one-element array.\n *\n * The `FlowRoute` object `path` property handles any route,\n * and the `action` returns the flow container without updating the content,\n * delaying the actual Flow server call to the `onBeforeEnter` phase.\n *\n * This is a specific API for its use with `vaadin-router`.\n */\n get serverSideRoutes(): [FlowRoute] {\n return [\n {\n path: '(.*)',\n action: this.action\n }\n ];\n }\n\n loadingStarted() {\n // Make Testbench know that server request is in progress\n this.isActive = true;\n $wnd.Vaadin.connectionState.loadingStarted();\n }\n\n loadingFinished() {\n // Make Testbench know that server request has finished\n this.isActive = false;\n $wnd.Vaadin.connectionState.loadingFinished();\n\n if ($wnd.Vaadin.listener) {\n // Listeners registered, do not register again.\n return;\n }\n $wnd.Vaadin.listener = {};\n // Listen for click on router-links -> 'link' navigation trigger\n // and on nodes -> 'client' navigation trigger.\n // Use capture phase to detect prevented / stopped events.\n document.addEventListener(\n 'click',\n (_e) => {\n if (_e.target) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (_e.target.hasAttribute('router-link')) {\n this.navigation = 'link';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } else if (_e.composedPath().some((node) => node.nodeName === 'A')) {\n this.navigation = 'client';\n }\n }\n },\n {\n capture: true\n }\n );\n }\n\n private get action(): (params: NavigationParameters) => Promise {\n // Return a function which is bound to the flow instance, thus we can use\n // the syntax `...serverSideRoutes` in vaadin-router.\n return async (params: NavigationParameters) => {\n // Store last action pathname so as we can check it in events\n this.pathname = params.pathname;\n\n if ($wnd.Vaadin.connectionState.online) {\n try {\n await this.flowInit();\n } catch (error) {\n if (error instanceof FlowUiInitializationError) {\n // error initializing Flow: assume connection lost\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n return this.offlineStubAction();\n } else {\n throw error;\n }\n }\n } else {\n // insert an offline stub\n return this.offlineStubAction();\n }\n\n // When an action happens, navigation will be resolved `onBeforeEnter`\n this.container.onBeforeEnter = (ctx, cmd) => this.flowNavigate(ctx, cmd);\n // For covering the 'server -> client' use case\n this.container.onBeforeLeave = (ctx, cmd) => this.flowLeave(ctx, cmd);\n return this.container;\n };\n }\n\n // Send a remote call to `JavaScriptBootstrapUI` to check\n // whether navigation has to be cancelled.\n private async flowLeave(ctx: NavigationParameters, cmd?: PreventCommands): Promise {\n // server -> server, viewing offline stub, or browser is offline\n const { connectionState } = $wnd.Vaadin;\n if (this.pathname === ctx.pathname || !this.isFlowClientLoaded() || connectionState.offline) {\n return Promise.resolve({});\n }\n // 'server -> client'\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side to cancel navigation\n this.container.serverConnected = (cancel) => {\n resolve(cmd && cancel ? cmd.prevent() : cmd?.continue?.());\n this.loadingFinished();\n };\n\n // Call server side to check whether we can leave the view\n sendEvent('ui-leave-navigation', { route: this.getFlowRoutePath(ctx), query: this.getFlowRouteQuery(ctx) });\n });\n }\n\n // Send the remote call to `JavaScriptBootstrapUI` to render the flow\n // route specified by the context\n private async flowNavigate(ctx: NavigationParameters, cmd?: PreventAndRedirectCommands): Promise {\n if (this.response) {\n return new Promise((resolve) => {\n this.loadingStarted();\n // The callback to run from server side once the view is ready\n this.container.serverConnected = (cancel, redirectContext?: NavigationParameters) => {\n if (cmd && cancel) {\n resolve(cmd.prevent());\n } else if (cmd && cmd.redirect && redirectContext) {\n resolve(cmd.redirect(redirectContext.pathname));\n } else {\n cmd?.continue?.();\n this.container.style.display = '';\n resolve(this.container);\n }\n this.loadingFinished();\n };\n\n this.container.serverPaused = () => {\n this.loadingFinished();\n };\n\n // Call server side to navigate to the given route\n sendEvent('ui-navigate', {\n route: this.getFlowRoutePath(ctx),\n query: this.getFlowRouteQuery(ctx),\n appShellTitle: this.appShellTitle,\n historyState: history.state,\n trigger: this.navigation\n });\n // Default to history navigation trigger.\n // Link and client cases are handled by click listener in loadingFinished().\n this.navigation = 'history';\n });\n } else {\n // No server response => offline or erroneous connection\n return Promise.resolve(this.container);\n }\n }\n\n private getFlowRoutePath(context: NavigationParameters | Location): string {\n return decodeURIComponent(context.pathname).replace(this.baseRegex, '');\n }\n private getFlowRouteQuery(context: NavigationParameters | Location): string {\n return (context.search && context.search.substring(1)) || '';\n }\n\n // import flow client modules and initialize UI in server side.\n private async flowInit(): Promise {\n // Do not start flow twice\n if (!this.isFlowClientLoaded()) {\n // show flow progress indicator\n this.loadingStarted();\n\n // Initialize server side UI\n this.response = await this.flowInitUi();\n\n const { pushScript, appConfig } = this.response;\n\n if (typeof pushScript === 'string') {\n await this.loadScript(pushScript);\n }\n const { appId } = appConfig;\n\n // we use a custom tag for the flow app container\n // This must be created before bootstrapMod.init is called as that call\n // can handle a UIDL from the server, which relies on the container being available\n const tag = `flow-container-${appId.toLowerCase()}`;\n const serverCreatedContainer = document.querySelector(tag);\n if (serverCreatedContainer) {\n this.container = serverCreatedContainer as HTMLElement;\n } else {\n this.container = document.createElement(tag);\n this.container.id = appId;\n }\n flowRoot.$[appId] = this.container;\n\n // Load bootstrap script with server side parameters\n const bootstrapMod = await import('./FlowBootstrap');\n bootstrapMod.init(this.response);\n\n // Load custom modules defined by user\n if (typeof this.config.imports === 'function') {\n this.injectAppIdScript(appId);\n await this.config.imports();\n }\n\n // Load flow-client module\n const clientMod = await import('./FlowClient');\n await this.flowInitClient(clientMod);\n\n // hide flow progress indicator\n this.loadingFinished();\n }\n\n // It might be that components created from server expect that their content has been rendered.\n // Appending eagerly the container we avoid these kind of errors.\n // Note that the client router will move this container to the outlet if the navigation succeed\n if (this.container && !this.container.isConnected) {\n this.container.style.display = 'none';\n document.body.appendChild(this.container);\n }\n return this.response!;\n }\n\n private async loadScript(url: string): Promise {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.onload = () => resolve();\n script.onerror = reject;\n script.src = url;\n document.body.appendChild(script);\n });\n }\n\n private injectAppIdScript(appId: string) {\n const appIdWithoutHashCode = appId.substring(0, appId.lastIndexOf('-'));\n const scriptAppId = document.createElement('script');\n scriptAppId.type = 'module';\n scriptAppId.setAttribute('data-app-id', appIdWithoutHashCode);\n document.body.append(scriptAppId);\n }\n\n // After the flow-client javascript module has been loaded, this initializes flow UI\n // in the browser.\n private async flowInitClient(clientMod: any): Promise {\n clientMod.init();\n // client init is async, we need to loop until initialized\n return new Promise((resolve) => {\n const intervalId = setInterval(() => {\n // client `isActive() == true` while initializing or processing\n const initializing = getClients().reduce((prev, client) => prev || client.isActive(), false);\n if (!initializing) {\n clearInterval(intervalId);\n resolve();\n }\n }, 5);\n });\n }\n\n // Returns the `appConfig` object\n private async flowInitUi(): Promise {\n // appConfig was sent in the index.html request\n const initial = $wnd.Vaadin && $wnd.Vaadin.TypeScript && $wnd.Vaadin.TypeScript.initial;\n if (initial) {\n $wnd.Vaadin.TypeScript.initial = undefined;\n return Promise.resolve(initial);\n }\n\n // send a request to the `JavaScriptBootstrapHandler`\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n const httpRequest = xhr as any;\n const requestPath = `?v-r=init&location=${encodeURIComponent(\n this.getFlowRoutePath(location)\n )}&query=${encodeURIComponent(this.getFlowRouteQuery(location))}`;\n\n httpRequest.open('GET', requestPath);\n\n httpRequest.onerror = () =>\n reject(\n new FlowUiInitializationError(\n `Invalid server response when initializing Flow UI.\n ${httpRequest.status}\n ${httpRequest.responseText}`\n )\n );\n\n httpRequest.onload = () => {\n const contentType = httpRequest.getResponseHeader('content-type');\n if (contentType && contentType.indexOf('application/json') !== -1) {\n resolve(JSON.parse(httpRequest.responseText));\n } else {\n httpRequest.onerror();\n }\n };\n httpRequest.send();\n });\n }\n\n // Create shared connection state store and connection indicator\n private addConnectionIndicator() {\n // add connection indicator to DOM\n ConnectionIndicator.create();\n\n // Listen to browser online/offline events and update the loading indicator accordingly.\n // Note: if flow-client is loaded, it instead handles the state transitions.\n $wnd.addEventListener('online', () => {\n if (!this.isFlowClientLoaded()) {\n // Send an HTTP HEAD request for sw.js to verify server reachability.\n // We do not expect sw.js to be cached, so the request goes to the\n // server rather than being served from local cache.\n // Require network-level failure to revert the state to CONNECTION_LOST\n // (HTTP error code is ok since it still verifies server's presence).\n $wnd.Vaadin.connectionState.state = ConnectionState.RECONNECTING;\n const http = new XMLHttpRequest();\n http.open('HEAD', 'sw.js');\n http.onload = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTED;\n };\n http.onerror = () => {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n };\n // Postpone request to reduce potential net::ERR_INTERNET_DISCONNECTED\n // errors that sometimes occurs even if browser says it is online\n setTimeout(() => http.send(), 50);\n }\n });\n $wnd.addEventListener('offline', () => {\n if (!this.isFlowClientLoaded()) {\n $wnd.Vaadin.connectionState.state = ConnectionState.CONNECTION_LOST;\n }\n });\n }\n\n private async offlineStubAction() {\n const offlineStub = document.createElement('iframe') as HTMLRouterContainer;\n const offlineStubPath = './offline-stub.html';\n offlineStub.setAttribute('src', offlineStubPath);\n offlineStub.setAttribute('style', 'width: 100%; height: 100%; border: 0');\n this.response = undefined;\n\n let onlineListener: ConnectionStateChangeListener | undefined;\n const removeOfflineStubAndOnlineListener = () => {\n if (onlineListener !== undefined) {\n $wnd.Vaadin.connectionState.removeStateChangeListener(onlineListener);\n onlineListener = undefined;\n }\n };\n\n offlineStub.onBeforeEnter = (ctx, _cmds, router) => {\n onlineListener = () => {\n if ($wnd.Vaadin.connectionState.online) {\n removeOfflineStubAndOnlineListener();\n router.render(ctx, false);\n }\n };\n $wnd.Vaadin.connectionState.addStateChangeListener(onlineListener);\n };\n offlineStub.onBeforeLeave = (_ctx, _cmds, _router) => {\n removeOfflineStubAndOnlineListener();\n };\n return offlineStub;\n }\n\n private isFlowClientLoaded(): boolean {\n return this.response !== undefined;\n }\n}\n"]} \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.d.ts b/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.d.ts new file mode 100644 index 0000000..0398d57 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.d.ts @@ -0,0 +1 @@ +export const init: (appInitResponse: any) => void; diff --git a/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.js b/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.js new file mode 100644 index 0000000..ed20df0 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/FlowBootstrap.js @@ -0,0 +1,291 @@ +/* This is a copy of the regular `BootstrapHandler.js` in the flow-server + module, but with the following modifications: + - The main function is exported as an ES module for lazy initialization. + - Application configuration is passed as a parameter instead of using + replacement placeholders as in the regular bootstrapping. + - It reuses `Vaadin.Flow.clients` if exists. + - Fixed lint errors. + */ +const init = function (appInitResponse) { + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + var apps = {}; + var widgetsets = {}; + + var log; + if (typeof window.console === undefined || !window.location.search.match(/[&?]debug(&|$)/)) { + /* If no console.log present, just use a no-op */ + log = function () {}; + } else if (typeof window.console.log === 'function') { + /* If it's a function, use it with apply */ + log = function () { + window.console.log.apply(window.console, arguments); + }; + } else { + /* In IE, its a native function for which apply is not defined, but it works + without a proper 'this' reference */ + log = window.console.log; + } + + var isInitializedInDom = function (appId) { + var appDiv = document.getElementById(appId); + if (!appDiv) { + return false; + } + for (var i = 0; i < appDiv.childElementCount; i++) { + var className = appDiv.childNodes[i].className; + /* If the app div contains a child with the class + 'v-app-loading' we have only received the HTML + but not yet started the widget set + (UIConnector removes the v-app-loading div). */ + if (className && className.indexOf('v-app-loading') != -1) { + return false; + } + } + return true; + }; + + /* + * Needed for Testbench compatibility, but prevents any Vaadin 7 app from + * bootstrapping unless the legacy vaadinBootstrap.js file is loaded before + * this script. + */ + window.Vaadin = window.Vaadin || {}; + window.Vaadin.Flow = window.Vaadin.Flow || {}; + + /* + * Needed for wrapping custom javascript functionality in the components (i.e. connectors) + */ + window.Vaadin.Flow.tryCatchWrapper = function (originalFunction, component) { + return function () { + try { + // eslint-disable-next-line + const result = originalFunction.apply(this, arguments); + return result; + } catch (error) { + console.error( + `There seems to be an error in ${component}: +${error.message} +Please submit an issue to https://github.com/vaadin/flow-components/issues/new/choose` + ); + } + }; + }; + + if (!window.Vaadin.Flow.initApplication) { + window.Vaadin.Flow.clients = window.Vaadin.Flow.clients || {}; + + window.Vaadin.Flow.initApplication = function (appId, config) { + var testbenchId = appId.replace(/-\d+$/, ''); + + if (apps[appId]) { + if ( + window.Vaadin && + window.Vaadin.Flow && + window.Vaadin.Flow.clients && + window.Vaadin.Flow.clients[testbenchId] && + window.Vaadin.Flow.clients[testbenchId].initializing + ) { + throw new Error('Application ' + appId + ' is already being initialized'); + } + if (isInitializedInDom(appId)) { + if (appInitResponse.appConfig.productionMode) { + throw new Error('Application ' + appId + ' already initialized'); + } + + // Remove old contents for Flow + var appDiv = document.getElementById(appId); + for (var i = 0; i < appDiv.childElementCount; i++) { + appDiv.childNodes[i].remove(); + } + + // For devMode reset app config and restart widgetset as client + // is up and running after hrm update. + const getConfig = function (name) { + return config[name]; + }; + + /* Export public data */ + const app = { + getConfig: getConfig + }; + apps[appId] = app; + + if (widgetsets['client'].callback) { + log('Starting from bootstrap', appId); + widgetsets['client'].callback(appId); + } else { + log('Setting pending startup', appId); + widgetsets['client'].pendingApps.push(appId); + } + return apps[appId]; + } + } + + log('init application', appId, config); + + window.Vaadin.Flow.clients[testbenchId] = { + isActive: function () { + return true; + }, + initializing: true, + productionMode: mode + }; + + var getConfig = function (name) { + var value = config[name]; + return value; + }; + + /* Export public data */ + var app = { + getConfig: getConfig + }; + apps[appId] = app; + + if (!window.name) { + window.name = appId + '-' + Math.random(); + } + + var widgetset = 'client'; + widgetsets[widgetset] = { + pendingApps: [] + }; + if (widgetsets[widgetset].callback) { + log('Starting from bootstrap', appId); + widgetsets[widgetset].callback(appId); + } else { + log('Setting pending startup', appId); + widgetsets[widgetset].pendingApps.push(appId); + } + + return app; + }; + window.Vaadin.Flow.getAppIds = function () { + var ids = []; + for (var id in apps) { + if (Object.prototype.hasOwnProperty.call(apps, id)) { + ids.push(id); + } + } + return ids; + }; + window.Vaadin.Flow.getApp = function (appId) { + return apps[appId]; + }; + window.Vaadin.Flow.registerWidgetset = function (widgetset, callback) { + log('Widgetset registered', widgetset); + var ws = widgetsets[widgetset]; + if (ws && ws.pendingApps) { + ws.callback = callback; + for (var i = 0; i < ws.pendingApps.length; i++) { + var appId = ws.pendingApps[i]; + log('Starting from register widgetset', appId); + callback(appId); + } + ws.pendingApps = null; + } + }; + window.Vaadin.Flow.getBrowserDetailsParameters = function () { + var params = {}; + + /* Screen height and width */ + params['v-sh'] = window.screen.height; + params['v-sw'] = window.screen.width; + /* Browser window dimensions */ + params['v-wh'] = window.innerHeight; + params['v-ww'] = window.innerWidth; + /* Body element dimensions */ + params['v-bh'] = document.body.clientHeight; + params['v-bw'] = document.body.clientWidth; + + /* Current time */ + var date = new Date(); + params['v-curdate'] = date.getTime(); + + /* Current timezone offset (including DST shift) */ + var tzo1 = date.getTimezoneOffset(); + + /* Compare the current tz offset with the first offset from the end + of the year that differs --- if less that, we are in DST, otherwise + we are in normal time */ + var dstDiff = 0; + var rawTzo = tzo1; + for (var m = 12; m > 0; m--) { + date.setUTCMonth(m); + var tzo2 = date.getTimezoneOffset(); + if (tzo1 != tzo2) { + dstDiff = tzo1 > tzo2 ? tzo1 - tzo2 : tzo2 - tzo1; + rawTzo = tzo1 > tzo2 ? tzo1 : tzo2; + break; + } + } + + /* Time zone offset */ + params['v-tzo'] = tzo1; + + /* DST difference */ + params['v-dstd'] = dstDiff; + + /* Time zone offset without DST */ + params['v-rtzo'] = rawTzo; + + /* DST in effect? */ + params['v-dston'] = tzo1 != rawTzo; + + /* Time zone id (if available) */ + try { + params['v-tzid'] = Intl.DateTimeFormat().resolvedOptions().timeZone; + } catch (err) { + params['v-tzid'] = ''; + } + + /* Window name */ + if (window.name) { + params['v-wn'] = window.name; + } + + /* Detect touch device support */ + var supportsTouch = false; + try { + document.createEvent('TouchEvent'); + supportsTouch = true; + } catch (e) { + /* Chrome and IE10 touch detection */ + supportsTouch = 'ontouchstart' in window || typeof navigator.msMaxTouchPoints !== 'undefined'; + } + params['v-td'] = supportsTouch; + + /* Device Pixel Ratio */ + params['v-pr'] = window.devicePixelRatio; + + if (navigator.platform) { + params['v-np'] = navigator.platform; + } + + /* Stringify each value (they are parsed on the server side) */ + Object.keys(params).forEach(function (key) { + var value = params[key]; + if (typeof value !== 'undefined') { + params[key] = value.toString(); + } + }); + return params; + }; + } + + log('Flow bootstrap loaded'); + if (appInitResponse.appConfig.productionMode && typeof window.__gwtStatsEvent != 'function') { + window.Vaadin.Flow.gwtStatsEvents = []; + window.__gwtStatsEvent = function (event) { + window.Vaadin.Flow.gwtStatsEvents.push(event); + return true; + }; + } + var config = appInitResponse.appConfig; + var mode = appInitResponse.appConfig.productionMode; + window.Vaadin.Flow.initApplication(config.appId, config); +}; + +export { init }; diff --git a/kontor-spring/application/frontend/generated/jar-resources/FlowClient.d.ts b/kontor-spring/application/frontend/generated/jar-resources/FlowClient.d.ts new file mode 100644 index 0000000..7b21f90 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/FlowClient.d.ts @@ -0,0 +1 @@ +export const init: () => void; diff --git a/kontor-spring/application/frontend/generated/jar-resources/FlowClient.js b/kontor-spring/application/frontend/generated/jar-resources/FlowClient.js new file mode 100644 index 0000000..9fa39c6 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/FlowClient.js @@ -0,0 +1,1068 @@ +export function init() { +function client(){var Jb='',Kb=0,Lb='gwt.codesvr=',Mb='gwt.hosted=',Nb='gwt.hybrid',Ob='client',Pb='#',Qb='?',Rb='/',Sb=1,Tb='img',Ub='clear.cache.gif',Vb='baseUrl',Wb='script',Xb='client.nocache.js',Yb='base',Zb='//',$b='meta',_b='name',ac='gwt:property',bc='content',cc='=',dc='gwt:onPropertyErrorFn',ec='Bad handler "',fc='" for "gwt:onPropertyErrorFn"',gc='gwt:onLoadErrorFn',hc='" for "gwt:onLoadErrorFn"',ic='user.agent',jc='webkit',kc='safari',lc='msie',mc=10,nc=11,oc='ie10',pc=9,qc='ie9',rc=8,sc='ie8',tc='gecko',uc='gecko1_8',vc=2,wc=3,xc=4,yc='Single-script hosted mode not yet implemented. See issue ',zc='http://code.google.com/p/google-web-toolkit/issues/detail?id=2079',Ac='CE3BFC933CCF94EA3C0717C2107FADBB',Bc=':1',Cc=':',Dc='DOMContentLoaded',Ec=50;var l=Jb,m=Kb,n=Lb,o=Mb,p=Nb,q=Ob,r=Pb,s=Qb,t=Rb,u=Sb,v=Tb,w=Ub,A=Vb,B=Wb,C=Xb,D=Yb,F=Zb,G=$b,H=_b,I=ac,J=bc,K=cc,L=dc,M=ec,N=fc,O=gc,P=hc,Q=ic,R=jc,S=kc,T=lc,U=mc,V=nc,W=oc,X=pc,Y=qc,Z=rc,$=sc,_=tc,ab=uc,bb=vc,cb=wc,db=xc,eb=yc,fb=zc,gb=Ac,hb=Bc,ib=Cc,jb=Dc,kb=Ec;var lb=window,mb=document,nb,ob,pb=l,qb={},rb=[],sb=[],tb=[],ub=m,vb,wb;if(!lb.__gwt_stylesLoaded){lb.__gwt_stylesLoaded={}}if(!lb.__gwt_scriptsLoaded){lb.__gwt_scriptsLoaded={}}function xb(){var b=false;try{var c=lb.location.search;return (c.indexOf(n)!=-1||(c.indexOf(o)!=-1||lb.external&&lb.external.gwtOnLoad))&&c.indexOf(p)==-1}catch(a){}xb=function(){return b};return b} +function yb(){if(nb&&ob){nb(vb,q,pb,ub)}} +function zb(){function e(a){var b=a.lastIndexOf(r);if(b==-1){b=a.length}var c=a.indexOf(s);if(c==-1){c=a.length}var d=a.lastIndexOf(t,Math.min(c,b));return d>=m?a.substring(m,d+u):l} +function f(a){if(a.match(/^\w+:\/\//)){}else{var b=mb.createElement(v);b.src=a+w;a=e(b.src)}return a} +function g(){var a=Cb(A);if(a!=null){return a}return l} +function h(){var a=mb.getElementsByTagName(B);for(var b=m;bm){return a[a.length-u].href}return l} +function j(){var a=mb.location;return a.href==a.protocol+F+a.host+a.pathname+a.search+a.hash} +var k=g();if(k==l){k=h()}if(k==l){k=i()}if(k==l&&j()){k=e(mb.location.href)}k=f(k);return k} +function Ab(){var b=document.getElementsByTagName(G);for(var c=m,d=b.length;c=m){f=g.substring(m,i);h=g.substring(i+u)}else{f=g;h=l}qb[f]=h}}else if(f==L){g=e.getAttribute(J);if(g){try{wb=eval(g)}catch(a){alert(M+g+N)}}}else if(f==O){g=e.getAttribute(J);if(g){try{vb=eval(g)}catch(a){alert(M+g+P)}}}}}} +var Bb=function(a,b){return b in rb[a]};var Cb=function(a){var b=qb[a];return b==null?null:b};function Db(a,b){var c=tb;for(var d=m,e=a.length-u;d=U&&b=X&&b=Z&&b=V}())return ab;return S};rb[Q]={'gecko1_8':m,'ie10':u,'ie8':bb,'ie9':cb,'safari':db};client.onScriptLoad=function(a){client=null;nb=a;yb()};if(xb()){alert(eb+fb);return}zb();Ab();try{var Fb;Db([ab],gb);Db([S],gb+hb);Fb=tb[Eb(Q)];var Gb=Fb.indexOf(ib);if(Gb!=-1){ub=Number(Fb.substring(Gb+u))}}catch(a){return}var Hb;function Ib(){if(!ob){ob=true;yb();if(mb.removeEventListener){mb.removeEventListener(jb,Ib,false)}if(Hb){clearInterval(Hb)}}} +if(mb.addEventListener){mb.addEventListener(jb,function(){Ib()},false)}var Hb=setInterval(function(){if(/loaded|complete/.test(mb.readyState)){Ib()}},kb)} +client();(function () {var $gwt_version = "2.9.0";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = 'CE3BFC933CCF94EA3C0717C2107FADBB';function I(){} +function Yi(){} +function Ui(){} +function nc(){} +function uc(){} +function cj(){} +function Bj(){} +function Oj(){} +function Sj(){} +function zk(){} +function Bk(){} +function Dk(){} +function $k(){} +function dl(){} +function il(){} +function kl(){} +function ul(){} +function Cm(){} +function Em(){} +function Gm(){} +function cn(){} +function en(){} +function fo(){} +function wo(){} +function fq(){} +function lr(){} +function nr(){} +function pr(){} +function rr(){} +function Qr(){} +function Ur(){} +function gt(){} +function kt(){} +function nt(){} +function It(){} +function ru(){} +function kv(){} +function ov(){} +function Dv(){} +function Mv(){} +function tx(){} +function Ux(){} +function Wx(){} +function Wz(){} +function Ly(){} +function Py(){} +function EA(){} +function LB(){} +function lC(){} +function CD(){} +function gF(){} +function mG(){} +function xG(){} +function zG(){} +function BG(){} +function SG(){} +function Cz(){zz()} +function T(a){S=a;Jb()} +function ek(a){throw a} +function rj(a,b){a.c=b} +function sj(a,b){a.d=b} +function tj(a,b){a.e=b} +function vj(a,b){a.g=b} +function wj(a,b){a.h=b} +function xj(a,b){a.i=b} +function yj(a,b){a.j=b} +function zj(a,b){a.k=b} +function Aj(a,b){a.l=b} +function St(a,b){a.b=b} +function RG(a,b){a.a=b} +function bc(a){this.a=a} +function dc(a){this.a=a} +function Qj(a){this.a=a} +function jk(a){this.a=a} +function lk(a){this.a=a} +function Fk(a){this.a=a} +function Yk(a){this.a=a} +function bl(a){this.a=a} +function gl(a){this.a=a} +function ol(a){this.a=a} +function ql(a){this.a=a} +function sl(a){this.a=a} +function wl(a){this.a=a} +function yl(a){this.a=a} +function am(a){this.a=a} +function Im(a){this.a=a} +function Mm(a){this.a=a} +function Ym(a){this.a=a} +function gn(a){this.a=a} +function Gn(a){this.a=a} +function Jn(a){this.a=a} +function Kn(a){this.a=a} +function Qn(a){this.a=a} +function co(a){this.a=a} +function io(a){this.a=a} +function lo(a){this.a=a} +function no(a){this.a=a} +function po(a){this.a=a} +function ro(a){this.a=a} +function to(a){this.a=a} +function xo(a){this.a=a} +function Do(a){this.a=a} +function Xo(a){this.a=a} +function mp(a){this.a=a} +function Qp(a){this.a=a} +function Xp(a){this.b=a} +function dq(a){this.a=a} +function hq(a){this.a=a} +function jq(a){this.a=a} +function Sq(a){this.a=a} +function Uq(a){this.a=a} +function Wq(a){this.a=a} +function Wr(a){this.a=a} +function dr(a){this.a=a} +function gr(a){this.a=a} +function bs(a){this.a=a} +function ds(a){this.a=a} +function fs(a){this.a=a} +function ys(a){this.a=a} +function Hs(a){this.a=a} +function Ps(a){this.a=a} +function Rs(a){this.a=a} +function Ts(a){this.a=a} +function Vs(a){this.a=a} +function Xs(a){this.a=a} +function Ys(a){this.a=a} +function Yt(a){this.a=a} +function et(a){this.a=a} +function xt(a){this.a=a} +function Gt(a){this.a=a} +function Kt(a){this.a=a} +function Wt(a){this.a=a} +function Wv(a){this.a=a} +function mv(a){this.a=a} +function Sv(a){this.a=a} +function $v(a){this.a=a} +function ju(a){this.a=a} +function pu(a){this.a=a} +function Ku(a){this.a=a} +function Ou(a){this.a=a} +function aw(a){this.a=a} +function cw(a){this.a=a} +function hw(a){this.a=a} +function $x(a){this.a=a} +function Zx(a){this.b=a} +function ss(a){this.d=a} +function Tt(a){this.c=a} +function Ty(a){this.a=a} +function ay(a){this.a=a} +function ny(a){this.a=a} +function ry(a){this.a=a} +function vy(a){this.a=a} +function xy(a){this.a=a} +function Ny(a){this.a=a} +function Vy(a){this.a=a} +function Zy(a){this.a=a} +function fz(a){this.a=a} +function hz(a){this.a=a} +function jz(a){this.a=a} +function lz(a){this.a=a} +function nz(a){this.a=a} +function uz(a){this.a=a} +function wz(a){this.a=a} +function Nz(a){this.a=a} +function Qz(a){this.a=a} +function Yz(a){this.a=a} +function $z(a){this.e=a} +function CA(a){this.a=a} +function GA(a){this.a=a} +function IA(a){this.a=a} +function cB(a){this.a=a} +function sB(a){this.a=a} +function uB(a){this.a=a} +function wB(a){this.a=a} +function HB(a){this.a=a} +function JB(a){this.a=a} +function ZB(a){this.a=a} +function rC(a){this.a=a} +function yD(a){this.a=a} +function AD(a){this.a=a} +function DD(a){this.a=a} +function sE(a){this.a=a} +function VG(a){this.a=a} +function qF(a){this.b=a} +function DF(a){this.c=a} +function R(){this.a=xb()} +function nj(){this.a=++mj} +function Zi(){dp();hp()} +function dp(){dp=Ui;cp=[]} +function gx(a,b){Uw(b,a)} +function bx(a,b){ox(b,a)} +function Yw(a,b){px(b,a)} +function mA(a,b){dv(b,a)} +function Hu(a,b){b.hb(a)} +function kD(b,a){b.log(a)} +function lD(b,a){b.warn(a)} +function eD(b,a){b.data=a} +function at(a,b){gC(a.a,b)} +function WB(a){vA(a.a,a.b)} +function Li(a){return a.e} +function Yb(a){return a.B()} +function Bm(a){return gm(a)} +function hc(a){gc();fc.D(a)} +function ls(a){ks(a)&&ns(a)} +function vr(a){a.i||wr(a.a)} +function vp(a,b){a.push(b)} +function Z(a,b){a.e=b;W(a,b)} +function uj(a,b){a.f=b;ak=!b} +function iD(b,a){b.debug(a)} +function jD(b,a){b.error(a)} +function HD(){kb.call(this)} +function JD(){ab.call(this)} +function kb(){ab.call(this)} +function zE(){kb.call(this)} +function KF(){kb.call(this)} +function zz(){zz=Ui;yz=Lz()} +function pb(){pb=Ui;ob=new I} +function Qb(){Qb=Ui;Pb=new wo} +function Bt(){Bt=Ui;At=new It} +function gk(a){S=a;!!a&&Jb()} +function Uk(a){Lk();this.a=a} +function RF(a){OF();this.a=a} +function $C(b,a){b.display=a} +function Kx(a,b){b.forEach(a)} +function Ul(a,b){a.a.add(b.d)} +function zm(a,b,c){a.set(b,c)} +function wA(a,b,c){a.Pb(c,b)} +function Tl(a,b,c){Ol(a,c,b)} +function zA(a){yA.call(this,a)} +function _A(a){yA.call(this,a)} +function pB(a){yA.call(this,a)} +function FD(a){lb.call(this,a)} +function qE(a){lb.call(this,a)} +function rE(a){lb.call(this,a)} +function BE(a){lb.call(this,a)} +function AE(a){nb.call(this,a)} +function DE(a){qE.call(this,a)} +function GD(a){FD.call(this,a)} +function cF(a){FD.call(this,a)} +function iF(a){lb.call(this,a)} +function aF(){DD.call(this,'')} +function _E(){DD.call(this,'')} +function Oi(){Mi==null&&(Mi=[])} +function dA(){dA=Ui;cA=new EA} +function eF(){eF=Ui;dF=new CD} +function Db(){Db=Ui;!!(gc(),fc)} +function Q(a){return xb()-a.a} +function OD(a){return cH(a),a} +function nE(a){return cH(a),a} +function Wc(a,b){return $c(a,b)} +function xc(a,b){return _D(a,b)} +function Pq(a,b){return a.a>b.a} +function wD(b,a){return a in b} +function TD(a){SD(a);return a.i} +function pz(a){ix(a.b,a.a,a.c)} +function fG(a,b,c){b.fb(a.a[c])} +function MG(a,b,c){b.fb(fF(c))} +function Fx(a,b,c){FB(vx(a,c,b))} +function ax(a,b){RB(new zy(b,a))} +function _w(a,b){RB(new ty(b,a))} +function um(a,b){RB(new Wm(b,a))} +function Sk(a,b){++Kk;b.bb(a,Hk)} +function tn(a,b){a.d?vn(b):Vk()} +function uu(a,b){a.c.forEach(b)} +function DB(a,b){a.e||a.c.add(b)} +function GG(a,b){CG(a);a.a.gc(b)} +function wG(a,b){Ic(a,104).$b(b)} +function WF(a,b){while(a.hc(b));} +function Jx(a,b){return Al(a.b,b)} +function my(a,b){return Hx(a.a,b)} +function eA(a,b){return sA(a.a,b)} +function ex(a,b){return Gw(b.a,a)} +function SA(a,b){return sA(a.a,b)} +function eB(a,b){return sA(a.a,b)} +function fF(a){return Ic(a,5).e} +function vD(a){return Object(a)} +function $i(b,a){return b.exec(a)} +function Ub(a){return !!a.b||!!a.g} +function hA(a){xA(a.a);return a.h} +function lA(a){xA(a.a);return a.c} +function tw(b,a){mw();delete b[a]} +function Ll(a,b){return Nc(a.b[b])} +function ml(a,b){this.a=a;this.b=b} +function Hl(a,b){this.a=a;this.b=b} +function Jl(a,b){this.a=a;this.b=b} +function Yl(a,b){this.a=a;this.b=b} +function $l(a,b){this.a=a;this.b=b} +function Om(a,b){this.a=a;this.b=b} +function Qm(a,b){this.a=a;this.b=b} +function Sm(a,b){this.a=a;this.b=b} +function Um(a,b){this.a=a;this.b=b} +function Wm(a,b){this.a=a;this.b=b} +function Nn(a,b){this.a=a;this.b=b} +function Sn(a,b){this.b=a;this.a=b} +function Un(a,b){this.b=a;this.a=b} +function Uj(a,b){this.b=a;this.a=b} +function Km(a,b){this.b=a;this.a=b} +function tr(a,b){this.b=a;this.a=b} +function Ho(a,b){this.b=a;this.c=b} +function Zr(a,b){this.a=a;this.b=b} +function _r(a,b){this.a=a;this.b=b} +function us(a,b){this.a=a;this.b=b} +function lu(a,b){this.a=a;this.b=b} +function nu(a,b){this.a=a;this.b=b} +function Iu(a,b){this.a=a;this.b=b} +function Mu(a,b){this.a=a;this.b=b} +function Qu(a,b){this.a=a;this.b=b} +function Uv(a,b){this.a=a;this.b=b} +function Zt(a,b){this.b=a;this.a=b} +function cy(a,b){this.b=a;this.a=b} +function ey(a,b){this.b=a;this.a=b} +function ky(a,b){this.b=a;this.a=b} +function ty(a,b){this.b=a;this.a=b} +function zy(a,b){this.b=a;this.a=b} +function Hy(a,b){this.a=a;this.b=b} +function Jy(a,b){this.a=a;this.b=b} +function _y(a,b){this.b=a;this.a=b} +function bz(a,b){this.a=a;this.b=b} +function sz(a,b){this.a=a;this.b=b} +function Gz(a,b){this.a=a;this.b=b} +function Iz(a,b){this.b=a;this.a=b} +function Ro(a,b){Ho.call(this,a,b)} +function bq(a,b){Ho.call(this,a,b)} +function jE(){lb.call(this,null)} +function Ob(){yb!=0&&(yb=0);Cb=-1} +function bu(){this.a=new $wnd.Map} +function kC(){this.c=new $wnd.Map} +function KA(a,b){this.a=a;this.b=b} +function yB(a,b){this.a=a;this.b=b} +function XB(a,b){this.a=a;this.b=b} +function $B(a,b){this.a=a;this.b=b} +function vG(a,b){this.a=a;this.b=b} +function PG(a,b){this.a=a;this.b=b} +function WG(a,b){this.b=a;this.a=b} +function RA(a,b){this.d=a;this.e=b} +function RC(a,b){Ho.call(this,a,b)} +function JC(a,b){Ho.call(this,a,b)} +function tG(a,b){Ho.call(this,a,b)} +function xq(a,b){pq(a,(Oq(),Mq),b)} +function rt(a,b,c,d){qt(a,b.d,c,d)} +function $w(a,b,c){mx(a,b);Pw(c.e)} +function YG(a,b,c){a.splice(b,0,c)} +function Wo(a,b){return Uo(b,Vo(a))} +function Yc(a){return typeof a===tH} +function oE(a){return ad((cH(a),a))} +function SE(a,b){return a.substr(b)} +function Bz(a,b){GB(b);yz.delete(a)} +function nD(b,a){b.clearTimeout(a)} +function Nb(a){$wnd.clearTimeout(a)} +function ej(a){$wnd.clearTimeout(a)} +function mD(b,a){b.clearInterval(a)} +function Kz(a){a.length=0;return a} +function YE(a,b){a.a+=''+b;return a} +function ZE(a,b){a.a+=''+b;return a} +function $E(a,b){a.a+=''+b;return a} +function bd(a){fH(a==null);return a} +function KG(a,b,c){wG(b,c);return b} +function Eq(a,b){pq(a,(Oq(),Nq),b.a)} +function Sl(a,b){return a.a.has(b.d)} +function H(a,b){return _c(a)===_c(b)} +function LE(a,b){return a.indexOf(b)} +function tD(a){return a&&a.valueOf()} +function uD(a){return a&&a.valueOf()} +function MF(a){return a!=null?O(a):0} +function _c(a){return a==null?null:a} +function OF(){OF=Ui;NF=new RF(null)} +function Fv(){Fv=Ui;Ev=new $wnd.Map} +function mw(){mw=Ui;lw=new $wnd.Map} +function ND(){ND=Ui;LD=false;MD=true} +function dj(a){$wnd.clearInterval(a)} +function dk(a){ak&&jD($wnd.console,a)} +function bk(a){ak&&iD($wnd.console,a)} +function hk(a){ak&&kD($wnd.console,a)} +function ik(a){ak&&lD($wnd.console,a)} +function Wn(a){ak&&jD($wnd.console,a)} +function U(a){a.h=zc(di,wH,30,0,0,1)} +function tq(a){!!a.b&&Cq(a,(Oq(),Lq))} +function Hq(a){!!a.b&&Cq(a,(Oq(),Nq))} +function LG(a,b,c){RG(a,UG(b,a.a,c))} +function UG(a,b,c){return KG(a.a,b,c)} +function Gx(a,b,c){return vx(a,c.a,b)} +function zu(a,b){return a.h.delete(b)} +function Bu(a,b){return a.b.delete(b)} +function vA(a,b){return a.a.delete(b)} +function Lz(){return new $wnd.WeakMap} +function yr(a){return sI in a?a[sI]:-1} +function br(a){this.a=a;cj.call(this)} +function Sr(a){this.a=a;cj.call(this)} +function Fs(a){this.a=a;cj.call(this)} +function dt(a){this.a=new kC;this.c=a} +function ab(){U(this);V(this);this.w()} +function bF(a){DD.call(this,(cH(a),a))} +function Pk(a){vo((Qb(),Pb),new sl(a))} +function lp(a){vo((Qb(),Pb),new mp(a))} +function Ap(a){vo((Qb(),Pb),new Qp(a))} +function Gr(a){vo((Qb(),Pb),new fs(a))} +function Nx(a){vo((Qb(),Pb),new nz(a))} +function dx(a,b){var c;c=Gw(b,a);FB(c)} +function Ix(a,b){return mm(a.b.root,b)} +function aD(a,b,c,d){return UC(a,b,c,d)} +function QF(a,b){return a.a!=null?a.a:b} +function Sc(a,b){return a!=null&&Hc(a,b)} +function XE(a){return a==null?zH:Xi(a)} +function iH(a){return a.$H||(a.$H=++hH)} +function an(a){return ''+bn($m.kb()-a,3)} +function xA(a){var b;b=NB;!!b&&AB(b,a.b)} +function xF(){this.a=zc(bi,wH,1,0,5,1)} +function mH(){mH=Ui;jH=new I;lH=new I} +function aH(a){if(!a){throw Li(new KF)}} +function fH(a){if(!a){throw Li(new jE)}} +function _G(a){if(!a){throw Li(new HD)}} +function Cs(a){if(a.a){_i(a.a);a.a=null}} +function EB(a){if(a.d||a.e){return}CB(a)} +function SD(a){if(a.i!=null){return}dE(a)} +function As(a,b){b.a.b==(Qo(),Po)&&Cs(a)} +function UA(a,b){xA(a.a);a.c.forEach(b)} +function fB(a,b){xA(a.a);a.b.forEach(b)} +function bD(a,b){return a.appendChild(b)} +function cD(b,a){return b.appendChild(a)} +function NE(a,b){return a.lastIndexOf(b)} +function ME(a,b,c){return a.indexOf(b,c)} +function TE(a,b,c){return a.substr(b,c-b)} +function Wk(a,b,c){Lk();return a.set(c,b)} +function _C(d,a,b,c){d.setProperty(a,b,c)} +function MA(a,b){$z.call(this,a);this.a=b} +function JG(a,b){EG.call(this,a);this.a=b} +function Jc(a){fH(a==null||Tc(a));return a} +function Kc(a){fH(a==null||Uc(a));return a} +function Lc(a){fH(a==null||Yc(a));return a} +function Pc(a){fH(a==null||Xc(a));return a} +function Xc(a){return typeof a==='string'} +function Uc(a){return typeof a==='number'} +function Tc(a){return typeof a==='boolean'} +function Go(a){return a.b!=null?a.b:''+a.c} +function tb(a){return a==null?null:a.name} +function fD(b,a){return b.createElement(a)} +function PD(a,b){return cH(a),_c(a)===_c(b)} +function JE(a,b){return cH(a),_c(a)===_c(b)} +function $c(a,b){return a&&b&&a instanceof b} +function sb(a){return a==null?null:a.message} +function Eb(a,b,c){return a.apply(b,c);var d} +function kc(a){gc();return parseInt(a)||-1} +function ij(a,b){return $wnd.setTimeout(a,b)} +function yA(a){this.a=new $wnd.Set;this.b=a} +function Nl(){this.a=new $wnd.Map;this.b=[]} +function Bo(){this.b=(Qo(),No);this.a=new kC} +function Yq(a,b){b.a.b==(Qo(),Po)&&_q(a,-1)} +function Yn(a,b){Zn(a,b,Ic(nk(a.a,td),7).j)} +function Fr(a,b){cu(Ic(nk(a.i,Wf),84),b[uI])} +function Xb(a,b){a.b=Zb(a.b,[b,false]);Vb(a)} +function OE(a,b,c){return a.lastIndexOf(b,c)} +function hj(a,b){return $wnd.setInterval(a,b)} +function Ov(a){a.c?mD($wnd,a.d):nD($wnd,a.d)} +function Xk(a){Lk();Kk==0?a.C():Jk.push(a)} +function RB(a){OB==null&&(OB=[]);OB.push(a)} +function SB(a){QB==null&&(QB=[]);QB.push(a)} +function yE(){yE=Ui;xE=zc(Yh,wH,25,256,0,1)} +function Lk(){Lk=Ui;Jk=[];Hk=new $k;Ik=new dl} +function Sp(a,b,c){this.a=a;this.c=b;this.b=c} +function iy(a,b,c){this.b=a;this.c=b;this.a=c} +function gy(a,b,c){this.c=a;this.b=b;this.a=c} +function Ry(a,b,c){this.c=a;this.b=b;this.a=c} +function py(a,b,c){this.a=a;this.b=b;this.c=c} +function By(a,b,c){this.a=a;this.b=b;this.c=c} +function Dy(a,b,c){this.a=a;this.b=b;this.c=c} +function Fy(a,b,c){this.a=a;this.b=b;this.c=c} +function Xy(a,b,c){this.b=a;this.a=b;this.c=c} +function jw(a,b,c){this.b=a;this.a=b;this.c=c} +function qz(a,b,c){this.b=a;this.a=b;this.c=c} +function dz(a,b,c){this.b=a;this.c=b;this.a=c} +function Iv(a,b,c){this.c=a;this.d=b;this.j=c} +function Qq(a,b,c){Ho.call(this,a,b);this.a=c} +function Os(a,b,c){a.set(c,(xA(b.a),Pc(b.h)))} +function jr(a,b,c){a.fb(wE(iA(Ic(c.e,15),b)))} +function rk(a,b,c){qk(a,b,c.ab());a.b.set(b,c)} +function dD(c,a,b){return c.insertBefore(a,b)} +function ZC(b,a){return b.getPropertyValue(a)} +function fj(a,b){return qH(function(){a.H(b)})} +function ew(a,b){return fw(new hw(a),b,19,true)} +function su(a,b){a.b.add(b);return new Qu(a,b)} +function tu(a,b){a.h.add(b);return new Mu(a,b)} +function ts(a,b){$wnd.navigator.sendBeacon(a,b)} +function tF(a,b){a.a[a.a.length]=b;return true} +function uF(a,b){bH(b,a.a.length);return a.a[b]} +function Ic(a,b){fH(a==null||Hc(a,b));return a} +function Oc(a,b){fH(a==null||$c(a,b));return a} +function qD(a){if(a==null){return 0}return +a} +function ZD(a,b){var c;c=WD(a,b);c.e=2;return c} +function ws(a,b){var c;c=ad(nE(Kc(b.a)));Bs(a,c)} +function GB(a){a.e=true;CB(a);a.c.clear();BB(a)} +function oA(a,b){a.d=true;fA(a,b);SB(new GA(a))} +function dC(a,b){a.a==null&&(a.a=[]);a.a.push(b)} +function fC(a,b,c,d){var e;e=hC(a,b,c);e.push(d)} +function Xl(a,b,c){return a.set(c,(xA(b.a),b.h))} +function YC(b,a){return b.getPropertyPriority(a)} +function gp(a){return $wnd.Vaadin.Flow.getApp(a)} +function IF(a){return new JG(null,HF(a,a.length))} +function Vc(a){return a!=null&&Zc(a)&&!(a.kc===Yi)} +function Bc(a){return Array.isArray(a)&&a.kc===Yi} +function Rc(a){return !Array.isArray(a)&&a.kc===Yi} +function Zc(a){return typeof a===rH||typeof a===tH} +function jj(a){a.onreadystatechange=function(){}} +function ok(a,b,c){a.a.delete(c);a.a.set(c,b.ab())} +function XC(a,b,c,d){a.removeEventListener(b,c,d)} +function Uu(a,b){var c;c=b;return Ic(a.a.get(c),6)} +function XD(a,b,c){var d;d=WD(a,b);hE(c,d);return d} +function Zb(a,b){!a&&(a=[]);a[a.length]=b;return a} +function HF(a,b){return XF(b,a.length),new gG(a,b)} +function wm(a,b,c){return a.push(eA(c,new Um(c,b)))} +function UF(a){OF();return a==null?NF:new RF(cH(a))} +function Pw(a){var b;b=a.a;Cu(a,null);Cu(a,b);Cv(a)} +function Tk(a){++Kk;tn(Ic(nk(a.a,te),58),new kl)} +function lb(a){U(this);this.g=a;V(this);this.w()} +function Ft(a){Bt();this.c=[];this.a=At;this.d=a} +function OA(a,b,c){$z.call(this,a);this.b=b;this.a=c} +function Jq(a,b){this.a=a;this.b=b;cj.call(this)} +function Qt(a,b){this.a=a;this.b=b;cj.call(this)} +function _F(a,b){this.d=a;this.c=(b&64)!=0?b|16384:b} +function aG(a,b){cH(b);while(a.c=0){a.a=new Fs(a);bj(a.a,b)}} +function EG(a){if(!a){this.b=null;new xF}else{this.b=a}} +function gD(a,b,c,d){this.b=a;this.c=b;this.a=c;this.d=d} +function Xr(a,b,c,d){this.a=a;this.d=b;this.b=c;this.c=d} +function mC(a,b,c){this.a=a;this.d=b;this.c=null;this.b=c} +function gG(a,b){this.c=0;this.d=b;this.b=17488;this.a=a} +function UB(a,b){var c;c=NB;NB=a;try{b.C()}finally{NB=c}} +function oq(a,b){$n(Ic(nk(a.c,Be),22),'',b,'',null,null)} +function Zn(a,b,c){$n(a,c.caption,c.message,b,c.url,null)} +function av(a,b,c,d){Xu(a,b)&&rt(Ic(nk(a.c,Hf),33),b,c,d)} +function Nc(a){fH(a==null||Zc(a)&&!(a.kc===Yi));return a} +function V(a){if(a.j){a.e!==xH&&a.w();a.h=null}return a} +function nm(a){var b;b=a.f;while(!!b&&!b.a){b=b.f}return b} +function $(a,b){var c;c=TD(a.ic);return b==null?c:c+': '+b} +function An(a,b,c){this.b=a;this.d=b;this.c=c;this.a=new R} +function Am(a,b,c,d,e){a.splice.apply(a,[b,c,d].concat(e))} +function Au(a,b){_c(b.U(a))===_c((ND(),MD))&&a.b.delete(b)} +function Yv(a,b){Pz(b).forEach(Vi(aw.prototype.fb,aw,[a]))} +function WC(a,b){Rc(a)?a.T(b):(a.handleEvent(b),undefined)} +function kr(a){$j('applyDefaultTheme',(ND(),a?true:false))} +function ao(a){GG(IF(Ic(nk(a.a,td),7).c),new fo);a.b=false} +function So(){Qo();return Dc(xc(Fe,1),wH,61,0,[No,Oo,Po])} +function SC(){QC();return Dc(xc(Bh,1),wH,44,0,[OC,NC,PC])} +function Rq(){Oq();return Dc(xc(Te,1),wH,64,0,[Lq,Mq,Nq])} +function uG(){sG();return Dc(xc(xi,1),wH,49,0,[pG,qG,rG])} +function FG(a,b){var c;return IG(a,new xF,(c=new VG(b),c))} +function dH(a,b){if(a<0||a>b){throw Li(new FD(rJ+a+sJ+b))}} +function Dt(a){a.a=At;if(!a.b){return}ns(Ic(nk(a.d,rf),14))} +function Vz(a){if(!Tz){return a}return $wnd.Polymer.dom(a)} +function pD(c,a,b){return c.setTimeout(qH(a.Tb).bind(a),b)} +function oD(c,a,b){return c.setInterval(qH(a.Tb).bind(a),b)} +function Qc(a){return a.ic||Array.isArray(a)&&xc(ed,1)||ed} +function Fp(a){$wnd.vaadinPush.atmosphere.unsubscribeUrl(a)} +function wr(a){a&&a.afterServerUpdate&&a.afterServerUpdate()} +function bE(a){if(a.Zb()){return null}var b=a.h;return Ri[b]} +function Wi(a){function b(){} +;b.prototype=a||{};return new b} +function Vv(a,b){Pz(b).forEach(Vi($v.prototype.fb,$v,[a.a]))} +function bH(a,b){if(a<0||a>=b){throw Li(new FD(rJ+a+sJ+b))}} +function eH(a,b){if(a<0||a>=b){throw Li(new cF(rJ+a+sJ+b))}} +function fA(a,b){if(!a.b&&a.c&&LF(b,a.h)){return}pA(a,b,true)} +function dm(a,b){a.updateComplete.then(qH(function(){b.I()}))} +function hx(a,b,c){return a.set(c,gA(gB(xu(b.e,1),c),b.b[c]))} +function Sz(a,b,c,d){return a.splice.apply(a,[b,c].concat(d))} +function Cn(a,b,c){this.a=a;this.c=b;this.b=c;cj.call(this)} +function En(a,b,c){this.a=a;this.c=b;this.b=c;cj.call(this)} +function ID(a,b){U(this);this.f=b;this.g=a;V(this);this.w()} +function VB(a){this.a=a;this.b=[];this.c=new $wnd.Set;CB(this)} +function gc(){gc=Ui;var a,b;b=!mc();a=new uc;fc=b?new nc:a} +function YD(a,b,c,d){var e;e=WD(a,b);hE(c,e);e.e=d?8:0;return e} +function Vp(a,b,c){return TE(a.b,b,$wnd.Math.min(a.b.length,c))} +function oC(a,b,c,d){return qC(new $wnd.XMLHttpRequest,a,b,c,d)} +function KC(){IC();return Dc(xc(Ah,1),wH,45,0,[HC,FC,GC,EC])} +function cq(){aq();return Dc(xc(Me,1),wH,52,0,[Zp,Yp,_p,$p])} +function vC(a){if(a.length>2){zC(a[0],'OS major');zC(a[1],fJ)}} +function nA(a){if(a.c){a.d=true;pA(a,null,false);SB(new IA(a))}} +function CF(a){aH(a.a-1} +function Gb(b){Db();return function(){return Hb(b,this,arguments);var a}} +function xb(){if(Date.now){return Date.now()}return (new Date).getTime()} +function $t(a,b){if(b==null){debugger;throw Li(new JD)}return a.a.get(b)} +function _t(a,b){if(b==null){debugger;throw Li(new JD)}return a.a.has(b)} +function PE(a,b){b=WE(b);return a.replace(new RegExp('[^0-9].*','g'),b)} +function vm(a,b,c){var d;d=c.a;a.push(eA(d,new Qm(d,b)));RB(new Km(d,b))} +function xs(a,b){var c,d;c=xu(a,8);d=gB(c,'pollInterval');eA(d,new ys(b))} +function Zw(a,b){var c;c=b.f;Tx(Ic(nk(b.e.e.g.c,td),7),a,c,(xA(b.a),b.h))} +function Pz(a){var b;b=[];a.forEach(Vi(Qz.prototype.bb,Qz,[b]));return b} +function bG(a,b){cH(b);if(a.ca||a>b){throw Li(new GD('fromIndex: 0, toIndex: '+a+', length: '+b))}} +function _q(a,b){ak&&kD($wnd.console,'Setting heartbeat interval to '+b+'sec.');a.a=b;Zq(a)} +function vu(a){var b;b=$wnd.Object.create(null);uu(a,Vi(Iu.prototype.bb,Iu,[a,b]));return b} +function rp(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return null}else{return b+''}} +function qp(c,a){var b=c.getConfig(a);if(b===null||b===undefined){return null}else{return wE(b)}} +function Pt(b){if(b.readyState!=1){return false}try{b.send();return true}catch(a){return false}} +function Et(a){if(At!=a.a||a.c.length==0){return}a.b=true;a.a=new Gt(a);vo((Qb(),Pb),new Kt(a))} +function qs(a,b){b&&(!a.b||!wp(a.b))?(a.b=new Ep(a.d)):!b&&!!a.b&&wp(a.b)&&tp(a.b,new us(a,true))} +function Zu(a,b){var c;if(b!=a.e){c=b.a;!!c&&(mw(),!!c[NI])&&sw((mw(),c[NI]));fv(a,b);b.f=null}} +function iv(a,b){var c;if(Sc(a,29)){c=Ic(a,29);ad((cH(b),b))==2?VA(c,(xA(c.a),c.c.length)):TA(c)}} +function lx(a,b){var c;c=Ic(b.d.get(a),46);b.d.delete(a);if(!c){debugger;throw Li(new JD)}c.Eb()} +function Hw(a,b,c,d){var e;e=xu(d,a);fB(e,Vi(cy.prototype.bb,cy,[b,c]));return eB(e,new ey(b,c))} +function aC(b,c,d){return qH(function(){var a=Array.prototype.slice.call(arguments);d.Ab(b,c,a)})} +function _b(b,c){Qb();function d(){var a=qH(Yb)(b);a&&$wnd.setTimeout(d,c)} +$wnd.setTimeout(d,c)} +function Oq(){Oq=Ui;Lq=new Qq('HEARTBEAT',0,0);Mq=new Qq('PUSH',1,1);Nq=new Qq('XHR',2,2)} +function Qo(){Qo=Ui;No=new Ro('INITIALIZING',0);Oo=new Ro('RUNNING',1);Po=new Ro('TERMINATED',2)} +function qn(a,b){var c,d;c=new Jn(a);d=new $wnd.Function(a);zn(a,new Qn(d),new Sn(b,c),new Un(b,c))} +function VC(b){var c=b.handler;if(!c){c=qH(function(a){WC(b,a)});c.listener=b;b.handler=c}return c} +function Uo(a,b){var c;if(a==null){return null}c=To('context://',b,a);c=To('base://','',c);return c} +function Ki(a){var b;if(Sc(a,5)){return a}b=a&&a.__java$exception;if(!b){b=new rb(a);hc(b)}return b} +function Dr(a,b){if(b==-1){return true}if(b==a.f+1){return true}if(a.f==-1){return true}return false} +function sD(c){return $wnd.JSON.stringify(c,function(a,b){if(a=='$H'){return undefined}return b},0)} +function ac(b,c){Qb();var d=$wnd.setInterval(function(){var a=qH(Yb)(b);!a&&$wnd.clearInterval(d)},c)} +function rs(a,b){b&&(!a.b||!wp(a.b))?(a.b=new Ep(a.d)):!b&&!!a.b&&wp(a.b)&&tp(a.b,new us(a,false))} +function Vb(a){if(!a.i){a.i=true;!a.f&&(a.f=new bc(a));_b(a.f,1);!a.h&&(a.h=new dc(a));_b(a.h,50)}} +function Ot(a){this.a=a;UC($wnd,'beforeunload',new Wt(this),false);$s(Ic(nk(a,Df),13),new Yt(this))} +function bv(a,b,c,d,e,f){if(!Su(a,b)){debugger;throw Li(new JD)}st(Ic(nk(a.c,Hf),33),b,c,d,e,f)} +function DC(a,b,c){var d,e;b<0?(e=0):(e=b);c<0||c>a.length?(d=a.length):(d=c);return a.substr(e,d-e)} +function qt(a,b,c,d){var e;e={};e[MH]=BI;e[CI]=Object(b);e[BI]=c;!!d&&(e['data']=d,undefined);ut(a,e)} +function Dc(a,b,c,d,e){e.ic=a;e.jc=b;e.kc=Yi;e.__elementTypeId$=c;e.__elementTypeCategory$=d;return e} +function zp(a,b,c){KE(b,'true')||KE(b,'false')?(a.a[c]=KE(b,'true'),undefined):(a.a[c]=b,undefined)} +function wq(a,b,c){xp(b)&&_s(Ic(nk(a.c,Df),13));Bq(c)||qq(a,'Invalid JSON from server: '+c,null)} +function Aq(a,b){$n(Ic(nk(a.c,Be),22),'',b+' could not be loaded. Push will not work.','',null,null)} +function vq(a){Ic(nk(a.c,_e),26).a>=0&&_q(Ic(nk(a.c,_e),26),Ic(nk(a.c,td),7).d);pq(a,(Oq(),Lq),null)} +function zq(a,b){ak&&($wnd.console.log('Reopening push connection'),undefined);xp(b)&&pq(a,(Oq(),Mq),null)} +function zw(a,b){var c;if(b.d.has(a)){debugger;throw Li(new JD)}c=aD(b.b,a,new Zy(b),false);b.d.set(a,c)} +function iA(a,b){var c;xA(a.a);if(a.c){c=(xA(a.a),a.h);if(c==null){return b}return oE(Kc(c))}else{return b}} +function gu(a,b){var c;c=!!b.a&&!PD((ND(),LD),hA(gB(xu(b,0),GI)));if(!c||!b.f){return c}return gu(a,b.f)} +function qj(a,b){var c;c='/'.length;if(!JE(b.substr(b.length-c,c),'/')){debugger;throw Li(new JD)}a.b=b} +function Rk(a,b){var c;c=new $wnd.Map;b.forEach(Vi(ml.prototype.bb,ml,[a,c]));c.size==0||Xk(new ql(c))} +function Y(a){var b,c,d,e;for(b=(a.h==null&&(a.h=(gc(),e=fc.F(a),ic(e))),a.h),c=0,d=b.length;c-129&&a<128){b=a+128;c=(yE(),xE)[b];!c&&(c=xE[b]=new sE(a));return c}return new sE(a)} +function Bq(a){var b;b=$i(new RegExp('Vaadin-Refresh(:\\s*(.*?))?(\\s|$)'),a);if(b){$o(b[2]);return true}return false} +function wn(a,b,c){var d;d=Mc(c.get(a));if(d==null){d=[];d.push(b);c.set(a,d);return true}else{d.push(b);return false}} +function jA(a){var b;xA(a.a);if(a.c){b=(xA(a.a),a.h);if(b==null){return null}return xA(a.a),Pc(a.h)}else{return null}} +function DG(a){if(a.b){DG(a.b)}else if(a.c){throw Li(new rE("Stream already terminated, can't be modified or used"))}} +function Fw(a){if(!a.b){debugger;throw Li(new KD('Cannot bind client delegate methods to a Node'))}return ew(a.b,a.e)} +function ct(a){if(a.b){throw Li(new rE('Trying to start a new request while another is active'))}a.b=true;at(a,new gt)} +function Eu(a,b){this.c=new $wnd.Map;this.h=new $wnd.Set;this.b=new $wnd.Set;this.e=new $wnd.Map;this.d=a;this.g=b} +function sG(){sG=Ui;pG=new tG('CONCURRENT',0);qG=new tG('IDENTITY_FINISH',1);rG=new tG('UNORDERED',2)} +function fp(a){var b,c,d,e;b=(e=new Bj,e.a=a,jp(e,gp(a)),e);c=new Gj(b);cp.push(c);d=gp(a).getConfig('uidl');Fj(c,d)} +function nq(a){a.b=null;Ic(nk(a.c,Df),13).b&&_s(Ic(nk(a.c,Df),13));_j('connection-lost');_q(Ic(nk(a.c,_e),26),0)} +function Fq(a,b){var c;_s(Ic(nk(a.c,Df),13));c=b.b.responseText;Bq(c)||qq(a,'Invalid JSON response from server: '+c,b)} +function Ql(a){var b;if(!Ic(nk(a.c,_f),9).f){b=new $wnd.Map;a.a.forEach(Vi(Yl.prototype.fb,Yl,[a,b]));SB(new $l(a,b))}} +function uq(a,b){var c;if(b.a.b==(Qo(),Po)){if(a.b){nq(a);c=Ic(nk(a.c,Ge),12);c.b!=Po&&Ao(c,Po)}!!a.d&&!!a.d.f&&_i(a.d)}} +function qq(a,b,c){var d,e;c&&(e=c.b);$n(Ic(nk(a.c,Be),22),'',b,'',null,null);d=Ic(nk(a.c,Ge),12);d.b!=(Qo(),Po)&&Ao(d,Po)} +function Pl(a,b){var c;a.a.clear();while(a.b.length>0){c=Ic(a.b.splice(0,1)[0],15);Vl(c,b)||dv(Ic(nk(a.c,_f),9),c);TB()}} +function jC(a){var b,c;if(a.a!=null){try{for(c=0;c>>0,b.toString(16))}return a.toString()} +function iC(a,b){var c,d;d=Oc(a.c.get(b),$wnd.Map);if(d==null){return []}c=Mc(d.get(null));if(c==null){return []}return c} +function Vl(a,b){var c,d;c=Oc(b.get(a.e.e.d),$wnd.Map);if(c!=null&&c.has(a.f)){d=c.get(a.f);oA(a,d);return true}return false} +function sm(a){while(a.parentNode&&(a=a.parentNode)){if(a.toString()==='[object ShadowRoot]'){return true}}return false} +function qw(a,b){if(typeof a.get===tH){var c=a.get(b);if(typeof c===rH&&typeof c[XH]!==BH){return {nodeId:c[XH]}}}return null} +function Vo(a){var b,c;b=Ic(nk(a.a,td),7).b;c='/'.length;if(!JE(b.substr(b.length-c,c),'/')){debugger;throw Li(new JD)}return b} +function Ew(a,b){var c,d;c=wu(b,11);for(d=0;d<(xA(c.a),c.c.length);d++){Vz(a).classList.add(Pc(c.c[d]))}return SA(c,new fz(a))} +function Nj(a,b,c){var d;if(a==c.d){d=new $wnd.Function('callback','callback();');d.call(null,b);return ND(),true}return ND(),false} +function sw(c){mw();var b=c['}p'].promises;b!==undefined&&b.forEach(function(a){a[1](Error('Client is resynchronizing'))})} +function Tv(a){if(a.a.b){Lv(TI,a.a.b,a.a.a,null);if(a.b.has(SI)){a.a.g=a.a.b;a.a.h=a.a.a}a.a.b=null;a.a.a=null}else{Hv(a.a)}} +function Rv(a){if(a.a.b){Lv(SI,a.a.b,a.a.a,a.a.i);a.a.b=null;a.a.a=null;a.a.i=null}else !!a.a.g&&Lv(SI,a.a.g,a.a.h,null);Hv(a.a)} +function Zj(){return /iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==='MacIntel'&&navigator.maxTouchPoints>1} +function Yj(){this.a=new BC($wnd.navigator.userAgent);this.a.b?'ontouchstart' in window:this.a.f?!!navigator.msMaxTouchPoints:Xj()} +function un(a){this.b=new $wnd.Set;this.a=new $wnd.Map;this.d=!!($wnd.HTMLImports&&$wnd.HTMLImports.whenReady);this.c=a;nn(this)} +function Iq(a){this.c=a;zo(Ic(nk(a,Ge),12),new Sq(this));UC($wnd,'offline',new Uq(this),false);UC($wnd,'online',new Wq(this),false)} +function IC(){IC=Ui;HC=new JC('STYLESHEET',0);FC=new JC('JAVASCRIPT',1);GC=new JC('JS_MODULE',2);EC=new JC('DYNAMIC_IMPORT',3)} +function km(a){var b;if(em==null){return}b=Oc(em.get(a),$wnd.Set);if(b!=null){em.delete(a);b.forEach(Vi(Gm.prototype.fb,Gm,[]))}} +function CB(a){var b;a.d=true;BB(a);a.e||RB(new HB(a));if(a.c.size!=0){b=a.c;a.c=new $wnd.Set;b.forEach(Vi(LB.prototype.fb,LB,[]))}} +function Lv(a,b,c,d){Fv();JE(SI,a)?c.forEach(Vi(cw.prototype.bb,cw,[d])):Pz(c).forEach(Vi(Mv.prototype.fb,Mv,[]));Sx(b.b,b.c,b.a,a)} +function vt(a,b,c,d,e){var f;f={};f[MH]='mSync';f[CI]=vD(b.d);f['feature']=Object(c);f['property']=d;f[UH]=e==null?null:e;ut(a,f)} +function gB(a,b){var c;c=Ic(a.b.get(b),15);if(!c){c=new qA(b,a,JE('innerHTML',b)&&a.d==1);a.b.set(b,c);uA(a.a,new MA(a,c))}return c} +function gE(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;c3.4028234663852886E38){return Infinity}else if(b<-3.4028234663852886E38){return -Infinity}return b} +function QD(a){if(a>=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function mc(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function Mw(a){var b;b=Pc(hA(gB(xu(a,0),'tag')));if(b==null){debugger;throw Li(new KD('New child must have a tag'))}return fD($doc,b)} +function Jw(a){var b;if(!a.b){debugger;throw Li(new KD('Cannot bind shadow root to a Node'))}b=xu(a.e,20);Bw(a);return eB(b,new uz(a))} +function El(a,b){var c,d;d=xu(a,1);if(!a.a){rm(Pc(hA(gB(xu(a,0),'tag'))),new Hl(a,b));return}for(c=0;cd&&Cc(b,d,null);return b} +function ho(a){ak&&($wnd.console.debug('Re-establish PUSH connection'),undefined);qs(Ic(nk(a.a.a,rf),14),true);vo((Qb(),Pb),new no(a))} +function Qk(a){ak&&($wnd.console.log('Finished loading eager dependencies, loading lazy.'),undefined);a.forEach(Vi(ul.prototype.bb,ul,[]))} +function $u(a){UA(wu(a.e,24),Vi(kv.prototype.fb,kv,[]));uu(a.e,Vi(ov.prototype.bb,ov,[]));a.a.forEach(Vi(mv.prototype.bb,mv,[a]));a.d=true} +function KE(a,b){cH(a);if(b==null){return false}if(JE(a,b)){return true}return a.length==b.length&&JE(a.toLowerCase(),b.toLowerCase())} +function aq(){aq=Ui;Zp=new bq('CONNECT_PENDING',0);Yp=new bq('CONNECTED',1);_p=new bq('DISCONNECT_PENDING',2);$p=new bq('DISCONNECTED',3)} +function Cq(a,b){if(a.b!=b){return}a.b=null;a.a=0;_j('connected');ak&&($wnd.console.log('Re-established connection to server'),undefined)} +function tt(a,b,c,d,e){var f;f={};f[MH]='attachExistingElementById';f[CI]=vD(b.d);f[DI]=Object(c);f[EI]=Object(d);f['attachId']=e;ut(a,f)} +function Zv(a,b){if(b.e){!!b.b&&Lv(SI,b.b,b.a,null)}else{Lv(TI,b.b,b.a,null);Qv(b.f,ad(b.j))}if(b.b){tF(a,b.b);b.b=null;b.a=null;b.i=null}} +function oH(a){mH();var b,c,d;c=':'+a;d=lH[c];if(d!=null){return ad((cH(d),d))}d=jH[c];b=d==null?nH(a):ad((cH(d),d));pH();lH[c]=b;return b} +function O(a){return Xc(a)?oH(a):Uc(a)?ad((cH(a),a)):Tc(a)?(cH(a),a)?1231:1237:Rc(a)?a.o():Bc(a)?iH(a):!!a&&!!a.hashCode?a.hashCode():iH(a)} +function qk(a,b,c){if(a.a.has(b)){debugger;throw Li(new KD((SD(b),'Registry already has a class of type '+b.i+' registered')))}a.a.set(b,c)} +function Av(a,b){zv();var c;if(a.g.f){debugger;throw Li(new KD('Binding state node while processing state tree changes'))}c=Bv(a);c.Hb(a,b,xv)} +function aA(a,b,c,d,e){this.e=a;if(c==null){debugger;throw Li(new JD)}if(d==null){debugger;throw Li(new JD)}this.c=b;this.d=c;this.a=d;this.b=e} +function nx(a,b){var c,d;d=gB(b,ZI);xA(d.a);d.c||oA(d,a.getAttribute(ZI));c=gB(b,$I);sm(a)&&(xA(c.a),!c.c)&&!!a.style&&oA(c,a.style.display)} +function Cl(a,b,c,d){var e,f;if(!d){f=Ic(nk(a.g.c,Wd),60);e=Ic(f.a.get(c),25);if(!e){f.b[b]=c;f.a.set(c,wE(b));return wE(b)}return e}return d} +function Ax(a,b){var c,d;while(b!=null){for(c=a.length-1;c>-1;c--){d=Ic(a[c],6);if(b.isSameNode(d.a)){return d.d}}b=Vz(b.parentNode)}return -1} +function Fl(a,b,c){var d;if(Dl(a.a,c)){d=Ic(a.e.get(Tg),77);if(!d||!d.a.has(c)){return}gA(gB(b,c),a.a[c]).I()}else{iB(b,c)||oA(gB(b,c),null)}} +function Ol(a,b,c){var d,e;e=Uu(Ic(nk(a.c,_f),9),ad((cH(b),b)));if(e.c.has(1)){d=new $wnd.Map;fB(xu(e,1),Vi(am.prototype.bb,am,[d]));c.set(b,d)}} +function hC(a,b,c){var d,e;e=Oc(a.c.get(b),$wnd.Map);if(e==null){e=new $wnd.Map;a.c.set(b,e)}d=Mc(e.get(c));if(d==null){d=[];e.set(c,d)}return d} +function zx(a){var b;xw==null&&(xw=new $wnd.Map);b=Lc(xw.get(a));if(b==null){b=Lc(new $wnd.Function(BI,VI,'return ('+a+')'));xw.set(a,b)}return b} +function Mr(){if($wnd.performance&&$wnd.performance.timing){return (new Date).getTime()-$wnd.performance.timing.responseStart}else{return -1}} +function gw(a,b,c,d){var e,f,g,h,i;i=Nc(a.ab());h=d.d;for(g=0;g=1&&zC(a[0],'OS major');if(a.length>=2){b=LE(a[1],VE(45));if(b>-1){c=a[1].substr(0,b-0);zC(c,fJ)}else{zC(a[1],fJ)}}} +function X(a,b,c){var d,e,f,g,h;Y(a);for(e=(a.i==null&&(a.i=zc(ii,wH,5,0,0,1)),a.i),f=0,g=e.length;f0?dC(a,new mC(a,b,c)):(d=hC(a,b,null),d.push(c));return new lC} +function jm(a,b){var c,d,e,f,g;f=a.f;d=a.e.e;g=nm(d);if(!g){ik(YH+d.d+ZH);return}c=gm((xA(a.a),a.h));if(tm(g.a)){e=pm(g,d,f);e!=null&&zm(g.a,e,c);return}b[f]=c} +function Zq(a){if(a.a>0){bk('Scheduling heartbeat in '+a.a+' seconds');aj(a.c,a.a*1000)}else{ak&&($wnd.console.debug('Disabling heartbeat'),undefined);_i(a.c)}} +function Js(a){var b,c,d,e;b=gB(xu(Ic(nk(a.a,_f),9).e,5),'parameters');e=(xA(b.a),Ic(b.h,6));d=xu(e,6);c=new $wnd.Map;fB(d,Vi(Vs.prototype.bb,Vs,[c]));return c} +function Ow(a,b,c,d,e,f){var g,h;if(!rx(a.e,b,e,f)){return}g=Nc(d.ab());if(sx(g,b,e,f,a)){if(!c){h=Ic(nk(b.g.c,Yd),51);h.a.add(b.d);Ql(h)}Cu(b,g);Cv(b)}c||TB()} +function dv(a,b){var c,d;if(!b){debugger;throw Li(new JD)}d=b.e;c=d.e;if(Rl(Ic(nk(a.c,Yd),51),b)||!Xu(a,c)){return}vt(Ic(nk(a.c,Hf),33),c,d.d,b.f,(xA(b.a),b.h))} +function kn(){var a,b,c,d;b=$doc.head.childNodes;c=b.length;for(d=0;d=0;d--){if(JE(a[d].d,b)||JE(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function st(a,b,c,d,e,f){var g;g={};g[MH]='attachExistingElement';g[CI]=vD(b.d);g[DI]=Object(c);g[EI]=Object(d);g['attachTagName']=e;g['attachIndex']=Object(f);ut(a,g)} +function tm(a){var b=typeof $wnd.Polymer===tH&&$wnd.Polymer.Element&&a instanceof $wnd.Polymer.Element;var c=a.constructor.polymerElementVersion!==undefined;return b||c} +function fw(a,b,c,d){var e,f,g,h;h=wu(b,c);xA(h.a);if(h.c.length>0){f=Nc(a.ab());for(e=0;e<(xA(h.a),h.c.length);e++){g=Pc(h.c[e]);nw(f,g,b,d)}}return SA(h,new jw(a,b,d))} +function yx(a,b){var c,d,e,f,g;c=Vz(b).childNodes;for(e=0;e but none was found. Appending instead."),undefined);dD($doc.head,a,b)} +function lE(a){kE==null&&(kE=new RegExp('^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$'));if(!kE.test(a)){throw Li(new DE(oJ+a+'"'))}return parseFloat(a)} +function UE(a){var b,c,d;c=a.length;d=0;while(dd&&(eH(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b=65536){b=55296+(a-65536>>10&1023)&65535;c=56320+(a-65536&1023)&65535;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&65535)}} +function Ib(a){a&&Sb((Qb(),Pb));--yb;if(yb<0){debugger;throw Li(new KD('Negative entryDepth value at exit '+yb))}if(a){if(yb!=0){debugger;throw Li(new KD('Depth not 0'+yb))}if(Cb!=-1){Nb(Cb);Cb=-1}}} +function $n(a,b,c,d,e,f){var g;if(b==null&&c==null&&d==null){Ic(nk(a.a,td),7).l?bo(a):$o(e);return}g=Xn(b,c,d,f);if(!Ic(nk(a.a,td),7).l){UC(g,'click',new ro(e),false);UC($doc,'keydown',new to(e),false)}} +function bC(a,b){var c,d,e,f;if(rD(b)==1){c=b;f=ad(uD(c[0]));switch(f){case 0:{e=ad(uD(c[1]));return d=e,Ic(a.a.get(d),6)}case 1:case 2:return null;default:throw Li(new qE(dJ+sD(c)));}}else{return null}} +function ar(a){this.c=new br(this);this.b=a;_q(this,Ic(nk(a,td),7).d);this.d=Ic(nk(a,td),7).h;this.d=TC(this.d,'v-r=heartbeat');this.d=TC(this.d,jI+(''+Ic(nk(a,td),7).k));zo(Ic(nk(a,Ge),12),new gr(this))} +function Qx(a,b,c,d,e){var f,g,h,i,j,k,l;f=false;for(i=0;i2000){Bb=a;Cb=$wnd.setTimeout(Ob,10)}}if(yb++==0){Rb((Qb(),Pb));return true}return false} +function Wp(a){var b,c,d;if(a.a>=a.b.length){debugger;throw Li(new JD)}if(a.a==0){c=''+a.b.length+'|';b=4095-c.length;d=c+TE(a.b,0,$wnd.Math.min(a.b.length,b));a.a+=b}else{d=Vp(a,a.a,a.a+4095);a.a+=4095}return d} +function Cr(a){var b,c,d,e;if(a.g.length==0){return false}e=-1;for(b=0;b=f&&(eH(b,a.length),a.charCodeAt(b)!=32)){--b}if(b==f){return}d=a.substr(b+1,c-(b+1));e=RE(d,'\\.');vC(e)} +function au(a,b){var c,d,e,f,g,h;if(!b){debugger;throw Li(new JD)}for(d=(g=xD(b),g),e=0,f=d.length;e=0;d--){$E((g.a+=i,g),Pc(c[d]));i='.'}return g.a} +function Dp(a,b){var c,d,e,f,g;if(Hp()){Ap(b.a)}else{f=(Ic(nk(a.d,td),7).f?(e='VAADIN/static/push/vaadinPush-min.js'):(e='VAADIN/static/push/vaadinPush.js'),e);ak&&kD($wnd.console,'Loading '+f);d=Ic(nk(a.d,te),58);g=Ic(nk(a.d,td),7).h+f;c=new Sp(a,f,b);rn(d,g,c,false,RH)}} +function cC(a,b){var c,d,e,f,g,h;if(rD(b)==1){c=b;h=ad(uD(c[0]));switch(h){case 0:{g=ad(uD(c[1]));d=(f=g,Ic(a.a.get(f),6)).a;return d}case 1:return e=Mc(c[1]),e;case 2:return aC(ad(uD(c[1])),ad(uD(c[2])),Ic(nk(a.c,Hf),33));default:throw Li(new qE(dJ+sD(c)));}}else{return b}} +function zr(a,b){var c,d,e,f,g;ak&&($wnd.console.log('Handling dependencies'),undefined);c=new $wnd.Map;for(e=(QC(),Dc(xc(Bh,1),wH,44,0,[OC,NC,PC])),f=0,g=e.length;f0){k=Sw(a,b);d=!k?null:Vz(k.a).nextSibling}else{d=null}for(g=0;ga.a){a.a==0?ak&&kD($wnd.console,'Updating client-to-server id to '+b+' based on server'):ik('Server expects next client-to-server id to be '+b+' but we were going to use '+a.a+'. Will use '+b+'.');a.a=b}} +function Nk(a,b,c){var d,e;e=Ic(nk(a.a,te),58);d=c==(QC(),OC);switch(b.c){case 0:if(d){return new Yk(e)}return new bl(e);case 1:if(d){return new gl(e)}return new wl(e);case 2:if(d){throw Li(new qE('Inline load mode is not supported for JsModule.'))}return new yl(e);case 3:return new il;default:throw Li(new qE('Unknown dependency type '+b));}} +function Hr(b,c){var d,e,f,g;f=Ic(nk(b.i,_f),9);g=uv(f,c['changes']);if(!Ic(nk(b.i,td),7).f){try{d=vu(f.e);ak&&($wnd.console.log('StateTree after applying changes:'),undefined);ak&&kD($wnd.console,d)}catch(a){a=Ki(a);if(Sc(a,8)){e=a;ak&&($wnd.console.error('Failed to log state tree'),undefined);ak&&jD($wnd.console,e)}else throw Li(a)}}SB(new ds(g))} +function nw(n,k,l,m){mw();n[k]=qH(function(c){var d=Object.getPrototypeOf(this);d[k]!==undefined&&d[k].apply(this,arguments);var e=c||$wnd.event;var f=l.Db();var g=ow(this,e,k,l);g===null&&(g=Array.prototype.slice.call(arguments));var h;var i=-1;if(m){var j=this['}p'].promises;i=j.length;h=new Promise(function(a,b){j[i]=[a,b]})}f.Gb(l,k,g,i);return h})} +function Mk(a,b,c){var d,e,f,g,h;f=new $wnd.Map;for(e=0;e0){e=i.length;while(e>0&&i[e-1]==''){--e}e0&&(eH(0,a.length),a.charCodeAt(0)==45||(eH(0,a.length),a.charCodeAt(0)==43))?1:0;for(b=e;b2147483647){throw Li(new DE(oJ+a+'"'))}return f} +function rx(a,b,c,d){var e,f,g,h,i;i=wu(a,24);for(f=0;f<(xA(i.a),i.c.length);f++){e=Ic(i.c[f],6);if(e==b){continue}if(JE((h=xu(b,0),sD(Nc(hA(gB(h,HI))))),(g=xu(e,0),sD(Nc(hA(gB(g,HI))))))){ik('There is already a request to attach element addressed by the '+d+". The existing request's node id='"+e.d+"'. Cannot attach the same element twice.");cv(b.g,a,b.d,e.d,c);return false}}return true} +function wc(a,b){var c;switch(yc(a)){case 6:return Xc(b);case 7:return Uc(b);case 8:return Tc(b);case 3:return Array.isArray(b)&&(c=yc(b),!(c>=14&&c<=16));case 11:return b!=null&&Yc(b);case 12:return b!=null&&(typeof b===rH||typeof b==tH);case 0:return Hc(b,a.__elementTypeId$);case 2:return Zc(b)&&!(b.kc===Yi);case 1:return Zc(b)&&!(b.kc===Yi)||Hc(b,a.__elementTypeId$);default:return true;}} +function Al(b,c){if(document.body.$&&document.body.$.hasOwnProperty&&document.body.$.hasOwnProperty(c)){return document.body.$[c]}else if(b.shadowRoot){return b.shadowRoot.getElementById(c)}else if(b.getElementById){return b.getElementById(c)}else if(c&&c.match('^[a-zA-Z0-9-_]*$')){return b.querySelector('#'+c)}else{return Array.from(b.querySelectorAll('[id]')).find(function(a){return a.id==c})}} +function Cp(a,b){var c,d;if(!xp(a)){throw Li(new rE('This server to client push connection should not be used to send client to server messages'))}if(a.f==(aq(),Yp)){d=_o(b);hk('Sending push ('+a.g+') message to server: '+d);if(JE(a.g,kI)){c=new Xp(d);while(c.a=iA((d=xu(Ic(nk(Ic(nk(a.c,Bf),37).a,_f),9).e,9),gB(d,'reconnectAttempts')),10000)?nq(a):Dq(a,c)} +function Bl(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=null;g=Vz(a.a).childNodes;o=new $wnd.Map;e=!b;i=-1;for(m=0;m=f){debugger;throw Li(new JD)}return g.length==0?null:g}else{return a}} +function Bx(a,b,c,d,e){var f,g,h;h=Uu(e,ad(a));if(!h.c.has(1)){return}if(!wx(h,b)){debugger;throw Li(new KD('Host element is not a parent of the node whose property has changed. This is an implementation error. Most likely it means that there are several StateTrees on the same page (might be possible with portlets) and the target StateTree should not be passed into the method as an argument but somehow detected from the host element. Another option is that host element is calculated incorrectly.'))}f=xu(h,1);g=gB(f,c);gA(g,d).I()} +function Xn(a,b,c,d){var e,f,g,h,i,j;h=$doc;j=h.createElement('div');j.className='v-system-error';if(a!=null){f=h.createElement('div');f.className='caption';f.textContent=a;j.appendChild(f);ak&&jD($wnd.console,a)}if(b!=null){i=h.createElement('div');i.className='message';i.textContent=b;j.appendChild(i);ak&&jD($wnd.console,b)}if(c!=null){g=h.createElement('div');g.className='details';g.textContent=c;j.appendChild(g);ak&&jD($wnd.console,c)}if(d!=null){e=h.querySelector(d);!!e&&bD(Nc(QF(UF(e.shadowRoot),e)),j)}else{cD(h.body,j)}return j} +function jp(a,b){var c,d,e;c=rp(b,'serviceUrl');Aj(a,pp(b,'webComponentMode'));if(c==null){wj(a,Zo('.'));qj(a,Zo(rp(b,hI)))}else{a.h=c;qj(a,Zo(c+(''+rp(b,hI))))}zj(a,qp(b,'v-uiId').a);sj(a,qp(b,'heartbeatInterval').a);tj(a,qp(b,'maxMessageSuspendTimeout').a);xj(a,(d=b.getConfig(iI),d?d.vaadinVersion:null));e=b.getConfig(iI);op();yj(a,b.getConfig('sessExpMsg'));uj(a,!pp(b,'debug'));vj(a,pp(b,'requestTiming'));rj(a,b.getConfig('webcomponents'));pp(b,'devToolsEnabled');rp(b,'liveReloadUrl');rp(b,'liveReloadBackend');rp(b,'springBootLiveReloadPort')} +function qc(a,b){var c,d,e,f,g,h,i,j,k;j='';if(b.length==0){return a.G(FH,DH,-1,-1)}k=UE(b);JE(k.substr(0,3),'at ')&&(k=k.substr(3));k=k.replace(/\[.*?\]/g,'');g=k.indexOf('(');if(g==-1){g=k.indexOf('@');if(g==-1){j=k;k=''}else{j=UE(k.substr(g+1));k=UE(k.substr(0,g))}}else{c=k.indexOf(')',g);j=k.substr(g+1,c-(g+1));k=UE(k.substr(0,g))}g=LE(k,VE(46));g!=-1&&(k=k.substr(g+1));(k.length==0||JE(k,'Anonymous function'))&&(k=DH);h=NE(j,VE(58));e=OE(j,VE(58),h-1);i=-1;d=-1;f=FH;if(h!=-1&&e!=-1){f=j.substr(0,e);i=kc(j.substr(e+1,h-(e+1)));d=kc(j.substr(h+1))}return a.G(f,k,i,d)} +function yk(a,b){var c;this.a=new $wnd.Map;this.b=new $wnd.Map;qk(this,yd,a);qk(this,td,b);qk(this,te,new un(this));qk(this,He,new Xo(this));qk(this,Td,new Uk(this));qk(this,Be,new co(this));rk(this,Ge,new zk);qk(this,_f,new gv(this));qk(this,Df,new dt(this));qk(this,pf,new Lr(this));qk(this,rf,new ss(this));qk(this,Lf,new Ft(this));qk(this,Hf,new xt(this));qk(this,Wf,new ju(this));rk(this,Sf,new Bk);rk(this,Wd,new Dk);qk(this,Yd,new Wl(this));c=new Fk(this);qk(this,_e,new ar(c.a));this.b.set(_e,c);qk(this,Re,new Iq(this));qk(this,Rf,new Ot(this));qk(this,zf,new Ms(this));qk(this,Bf,new Xs(this));qk(this,vf,new Ds(this))} +function wb(b){var c=function(a){return typeof a!=BH};var d=function(a){return a.replace(/\r\n/g,'')};if(c(b.outerHTML))return d(b.outerHTML);c(b.innerHTML)&&b.cloneNode&&$doc.createElement('div').appendChild(b.cloneNode(true)).innerHTML;if(c(b.nodeType)&&b.nodeType==3){return "'"+b.data.replace(/ /g,'\u25AB').replace(/\u00A0/,'\u25AA')+"'"}if(typeof c(b.htmlText)&&b.collapse){var e=b.htmlText;if(e){return 'IETextRange ['+d(e)+']'}else{var f=b.duplicate();f.pasteHTML('|');var g='IETextRange '+d(b.parentElement().outerHTML);f.moveStart('character',-1);f.pasteHTML('');return g}}return b.toString?b.toString():'[JavaScriptObject]'} +function ym(a,b,c){var d,e,f;f=[];if(a.c.has(1)){if(!Sc(b,43)){debugger;throw Li(new KD('Received an inconsistent NodeFeature for a node that has a ELEMENT_PROPERTIES feature. It should be NodeMap, but it is: '+b))}e=Ic(b,43);fB(e,Vi(Sm.prototype.bb,Sm,[f,c]));f.push(eB(e,new Om(f,c)))}else if(a.c.has(16)){if(!Sc(b,29)){debugger;throw Li(new KD('Received an inconsistent NodeFeature for a node that has a TEMPLATE_MODELLIST feature. It should be NodeList, but it is: '+b))}d=Ic(b,29);f.push(SA(d,new Im(c)))}if(f.length==0){debugger;throw Li(new KD('Node should have ELEMENT_PROPERTIES or TEMPLATE_MODELLIST feature'))}f.push(tu(a,new Mm(f)))} +function sx(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;l=e.e;o=Pc(hA(gB(xu(b,0),'tag')));h=false;if(!a){h=true;ak&&lD($wnd.console,_I+d+" is not found. The requested tag name is '"+o+"'")}else if(!(!!a&&KE(o,a.tagName))){h=true;ik(_I+d+" has the wrong tag name '"+a.tagName+"', the requested tag name is '"+o+"'")}if(h){cv(l.g,l,b.d,-1,c);return false}if(!l.c.has(20)){return true}k=xu(l,20);m=Ic(hA(gB(k,WI)),6);if(!m){return true}j=wu(m,2);g=null;for(i=0;i<(xA(j.a),j.c.length);i++){n=Ic(j.c[i],6);f=n.a;if(K(f,a)){g=wE(n.d);break}}if(g){ak&&lD($wnd.console,_I+d+" has been already attached previously via the node id='"+g+"'");cv(l.g,l,b.d,g.a,c);return false}return true} +function fu(b,c,d,e){var f,g,h,i,j,k,l,m,n;if(c.length!=d.length+1){debugger;throw Li(new JD)}try{j=new ($wnd.Function.bind.apply($wnd.Function,[null].concat(c)));j.apply(du(b,e,new pu(b)),d)}catch(a){a=Ki(a);if(Sc(a,8)){i=a;ck(new jk(i));ak&&($wnd.console.error('Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.'),undefined);if(!Ic(nk(b.a,td),7).f){g=new bF('[');h='';for(l=c,m=0,n=l.length;m0&&JE('window.location.reload();',c[0])){ak&&($wnd.console.warn('Executing forced page reload while a resync request is ongoing.'),undefined);$wnd.location.reload();return}}}ak&&($wnd.console.warn('Ignoring message from the server as a resync request is ongoing.'),undefined);return}Ic(nk(a.i,rf),14).e=0;if(e&&!Dr(a,j)){hk('Received resync message with id '+j+' while waiting for '+(a.f+1));a.f=j-1;Jr(a)}i=a.j.size!=0;if(i||!Dr(a,j)){if(i){ak&&($wnd.console.log('Postponing UIDL handling due to lock...'),undefined)}else{if(j<=a.f){ik(vI+j+' but have already seen '+a.f+'. Ignoring it');Er(b)&&_s(Ic(nk(a.i,Df),13));return}hk(vI+j+' but expected '+(a.f+1)+'. Postponing handling until the missing message(s) have been received')}a.g.push(new Wr(b));if(!a.c.f){m=Ic(nk(a.i,td),7).e;aj(a.c,m)}return}tI in b&&$u(Ic(nk(a.i,_f),9));l=xb();h=new I;a.j.add(h);ak&&($wnd.console.log('Handling message from server'),undefined);at(Ic(nk(a.i,Df),13),new nt);if(wI in b){k=b[wI];ps(Ic(nk(a.i,rf),14),k,tI in b)}j!=-1&&(a.f=j);if('redirect' in b){n=b['redirect']['url'];ak&&kD($wnd.console,'redirecting to '+n);$o(n);return}xI in b&&(a.b=b[xI]);yI in b&&(a.h=b[yI]);zr(a,b);a.d||Tk(Ic(nk(a.i,Td),72));'timings' in b&&(a.k=b['timings']);Xk(new Qr);Xk(new Xr(a,b,h,l))} +function BC(b){var c,d,e,f,g;b=b.toLowerCase();this.e=b.indexOf('gecko')!=-1&&b.indexOf('webkit')==-1&&b.indexOf(hJ)==-1;b.indexOf(' presto/')!=-1;this.k=b.indexOf(hJ)!=-1;this.l=!this.k&&b.indexOf('applewebkit')!=-1;this.b=b.indexOf(' chrome/')!=-1||b.indexOf(' crios/')!=-1||b.indexOf(gJ)!=-1;this.i=b.indexOf('opera')!=-1;this.f=b.indexOf('msie')!=-1&&!this.i&&b.indexOf('webtv')==-1;this.f=this.f||this.k;this.j=!this.b&&!this.f&&b.indexOf('safari')!=-1;this.d=b.indexOf(' firefox/')!=-1;if(b.indexOf(' edge/')!=-1||b.indexOf(' edg/')!=-1||b.indexOf(iJ)!=-1||b.indexOf(jJ)!=-1){this.c=true;this.b=false;this.i=false;this.f=false;this.j=false;this.d=false;this.l=false;this.e=false}try{if(this.e){f=b.indexOf('rv:');if(f>=0){g=b.substr(f+3);g=QE(g,kJ,'$1');this.a=pE(g)}}else if(this.l){g=SE(b,b.indexOf('webkit/')+7);g=QE(g,lJ,'$1');this.a=pE(g)}else if(this.k){g=SE(b,b.indexOf(hJ)+8);g=QE(g,lJ,'$1');this.a=pE(g);this.a>7&&(this.a=7)}else this.c&&(this.a=0)}catch(a){a=Ki(a);if(Sc(a,8)){c=a;eF();'Browser engine version parsing failed for: '+b+' '+c.v()}else throw Li(a)}try{if(this.f){if(b.indexOf('msie')!=-1){if(this.k);else{e=SE(b,b.indexOf('msie ')+5);e=DC(e,0,LE(e,VE(59)));AC(e)}}else{f=b.indexOf('rv:');if(f>=0){g=b.substr(f+3);g=QE(g,kJ,'$1');AC(g)}}}else if(this.d){d=b.indexOf(' firefox/')+9;AC(DC(b,d,d+5))}else if(this.b){wC(b)}else if(this.j){d=b.indexOf(' version/');if(d>=0){d+=9;AC(DC(b,d,d+5))}}else if(this.i){d=b.indexOf(' version/');d!=-1?(d+=9):(d=b.indexOf('opera/')+6);AC(DC(b,d,d+5))}else if(this.c){d=b.indexOf(' edge/')+6;b.indexOf(' edg/')!=-1?(d=b.indexOf(' edg/')+5):b.indexOf(iJ)!=-1?(d=b.indexOf(iJ)+6):b.indexOf(jJ)!=-1&&(d=b.indexOf(jJ)+8);AC(DC(b,d,d+8))}}catch(a){a=Ki(a);if(Sc(a,8)){c=a;eF();'Browser version parsing failed for: '+b+' '+c.v()}else throw Li(a)}if(b.indexOf('windows ')!=-1){b.indexOf('windows phone')!=-1}else if(b.indexOf('android')!=-1){tC(b)}else if(b.indexOf('linux')!=-1);else if(b.indexOf('macintosh')!=-1||b.indexOf('mac osx')!=-1||b.indexOf('mac os x')!=-1){this.g=b.indexOf('ipad')!=-1;this.h=b.indexOf('iphone')!=-1;(this.g||this.h)&&xC(b)}else b.indexOf('; cros ')!=-1&&uC(b)} +var rH='object',sH='[object Array]',tH='function',uH='java.lang',vH='com.google.gwt.core.client',wH={4:1},xH='__noinit__',yH={4:1,8:1,10:1,5:1},zH='null',AH='com.google.gwt.core.client.impl',BH='undefined',CH='Working array length changed ',DH='anonymous',EH='fnStack',FH='Unknown',GH='must be non-negative',HH='must be positive',IH='com.google.web.bindery.event.shared',JH='com.vaadin.client',KH={56:1},LH={28:1},MH='type',NH={48:1},OH={24:1},PH={16:1},QH={27:1},RH='text/javascript',SH='constructor',TH='properties',UH='value',VH='com.vaadin.client.flow.reactive',WH={17:1},XH='nodeId',YH='Root node for node ',ZH=' could not be found',_H=' is not an Element',aI={65:1},bI={81:1},cI={47:1},dI='script',eI='stylesheet',fI='pushMode',gI='com.vaadin.flow.shared',hI='contextRootUrl',iI='versionInfo',jI='v-uiId=',kI='websocket',lI='transport',mI='application/json; charset=UTF-8',nI='VAADIN/push',oI='com.vaadin.client.communication',pI={90:1},qI='dialogText',rI='dialogTextGaveUp',sI='syncId',tI='resynchronize',uI='execute',vI='Received message with server id ',wI='clientId',xI='Vaadin-Security-Key',yI='Vaadin-Push-ID',zI='sessionExpired',AI='pushServletMapping',BI='event',CI='node',DI='attachReqId',EI='attachAssignedId',FI='com.vaadin.client.flow',GI='bound',HI='payload',II='subTemplate',JI={46:1},KI='Node is null',LI='Node is not created for this tree',MI='Node id is not registered with this tree',NI='$server',OI='feat',QI='remove',RI='com.vaadin.client.flow.binding',SI='trailing',TI='intermediate',UI='elemental.util',VI='element',WI='shadowRoot',XI='The HTML node for the StateNode with id=',YI='An error occurred when Flow tried to find a state node matching the element ',ZI='hidden',$I='styleDisplay',_I='Element addressed by the ',aJ='dom-repeat',bJ='dom-change',cJ='com.vaadin.client.flow.nodefeature',dJ='Unsupported complex type in ',eJ='com.vaadin.client.gwt.com.google.web.bindery.event.shared',fJ='OS minor',gJ=' headlesschrome/',hJ='trident/',iJ=' edga/',jJ=' edgios/',kJ='(\\.[0-9]+).+',lJ='([0-9]+\\.[0-9]+).*',mJ='com.vaadin.flow.shared.ui',nJ='java.io',oJ='For input string: "',pJ='java.util',qJ='java.util.stream',rJ='Index: ',sJ=', Size: ',tJ='user.agent';var _,Ri,Mi,Ji=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;Si();Ti(1,null,{},I);_.m=function J(a){return H(this,a)};_.n=function L(){return this.ic};_.o=function N(){return iH(this)};_.p=function P(){var a;return TD(M(this))+'@'+(a=O(this)>>>0,a.toString(16))};_.equals=function(a){return this.m(a)};_.hashCode=function(){return this.o()};_.toString=function(){return this.p()};var Ec,Fc,Gc;Ti(67,1,{67:1},UD);_.Ub=function VD(a){var b;b=new UD;b.e=4;a>1?(b.c=_D(this,a-1)):(b.c=this);return b};_.Vb=function $D(){SD(this);return this.b};_.Wb=function aE(){return TD(this)};_.Xb=function cE(){SD(this);return this.g};_.Yb=function eE(){return (this.e&4)!=0};_.Zb=function fE(){return (this.e&1)!=0};_.p=function iE(){return ((this.e&2)!=0?'interface ':(this.e&1)!=0?'':'class ')+(SD(this),this.i)};_.e=0;var RD=1;var bi=XD(uH,'Object',1);var Qh=XD(uH,'Class',67);Ti(95,1,{},R);_.a=0;var cd=XD(vH,'Duration',95);var S=null;Ti(5,1,{4:1,5:1});_.r=function bb(a){return new Error(a)};_.s=function db(){return this.e};_.t=function eb(){var a;return a=Ic(FG(HG(IF((this.i==null&&(this.i=zc(ii,wH,5,0,0,1)),this.i)),new gF),oG(new zG,new xG,new BG,Dc(xc(xi,1),wH,49,0,[(sG(),qG)]))),91),wF(a,zc(bi,wH,1,a.a.length,5,1))};_.u=function fb(){return this.f};_.v=function gb(){return this.g};_.w=function hb(){Z(this,cb(this.r($(this,this.g))));hc(this)};_.p=function jb(){return $(this,this.v())};_.e=xH;_.j=true;var ii=XD(uH,'Throwable',5);Ti(8,5,{4:1,8:1,5:1});var Uh=XD(uH,'Exception',8);Ti(10,8,yH,mb);var ci=XD(uH,'RuntimeException',10);Ti(55,10,yH,nb);var Zh=XD(uH,'JsException',55);Ti(120,55,yH);var gd=XD(AH,'JavaScriptExceptionBase',120);Ti(32,120,{32:1,4:1,8:1,10:1,5:1},rb);_.v=function ub(){return qb(this),this.c};_.A=function vb(){return _c(this.b)===_c(ob)?null:this.b};var ob;var dd=XD(vH,'JavaScriptException',32);var ed=XD(vH,'JavaScriptObject$',0);Ti(310,1,{});var fd=XD(vH,'Scheduler',310);var yb=0,zb=false,Ab,Bb=0,Cb=-1;Ti(130,310,{});_.e=false;_.i=false;var Pb;var kd=XD(AH,'SchedulerImpl',130);Ti(131,1,{},bc);_.B=function cc(){this.a.e=true;Tb(this.a);this.a.e=false;return this.a.i=Ub(this.a)};var hd=XD(AH,'SchedulerImpl/Flusher',131);Ti(132,1,{},dc);_.B=function ec(){this.a.e&&_b(this.a.f,1);return this.a.i};var jd=XD(AH,'SchedulerImpl/Rescuer',132);var fc;Ti(320,1,{});var od=XD(AH,'StackTraceCreator/Collector',320);Ti(121,320,{},nc);_.D=function oc(a){var b={},j;var c=[];a[EH]=c;var d=arguments.callee.caller;while(d){var e=(gc(),d.name||(d.name=jc(d.toString())));c.push(e);var f=':'+e;var g=b[f];if(g){var h,i;for(h=0,i=g.length;h0){mn(this.b,this.c);return false}else if(a==0){ln(this.b,this.c);return true}else if(Q(this.a)>60000){ln(this.b,this.c);return false}else{return true}};var ie=XD(JH,'ResourceLoader/1',189);Ti(190,42,{},Cn);_.I=function Dn(){this.a.b.has(this.c)||ln(this.a,this.b)};var je=XD(JH,'ResourceLoader/2',190);Ti(194,42,{},En);_.I=function Fn(){this.a.b.has(this.c)?mn(this.a,this.b):ln(this.a,this.b)};var ke=XD(JH,'ResourceLoader/3',194);Ti(195,1,OH,Gn);_.cb=function Hn(a){ln(this.a,a)};_.db=function In(a){mn(this.a,a)};var le=XD(JH,'ResourceLoader/4',195);Ti(63,1,{},Jn);var me=XD(JH,'ResourceLoader/ResourceLoadEvent',63);Ti(100,1,OH,Kn);_.cb=function Ln(a){ln(this.a,a)};_.db=function Mn(a){mn(this.a,a)};var oe=XD(JH,'ResourceLoader/SimpleLoadListener',100);Ti(188,1,OH,Nn);_.cb=function On(a){ln(this.a,a)};_.db=function Pn(a){var b;if((!Wj&&(Wj=new Yj),Wj).a.b||(!Wj&&(Wj=new Yj),Wj).a.f||(!Wj&&(Wj=new Yj),Wj).a.c){b=yn(this.b);if(b==0){ln(this.a,a);return}}mn(this.a,a)};var pe=XD(JH,'ResourceLoader/StyleSheetLoadListener',188);Ti(191,1,LH,Qn);_.ab=function Rn(){return this.a.call(null)};var qe=XD(JH,'ResourceLoader/lambda$0$Type',191);Ti(192,1,PH,Sn);_.I=function Tn(){this.b.db(this.a)};var re=XD(JH,'ResourceLoader/lambda$1$Type',192);Ti(193,1,PH,Un);_.I=function Vn(){this.b.cb(this.a)};var se=XD(JH,'ResourceLoader/lambda$2$Type',193);Ti(22,1,{22:1},co);_.b=false;var Be=XD(JH,'SystemErrorHandler',22);Ti(166,1,{},fo);_.fb=function go(a){_n(Pc(a))};var ue=XD(JH,'SystemErrorHandler/0methodref$recreateNodes$Type',166);Ti(162,1,{},io);_.lb=function jo(a,b){var c;_q(Ic(nk(this.a.a,_e),26),Ic(nk(this.a.a,td),7).d);c=b;Wn(c.v())};_.mb=function ko(a){var b,c,d,e;hk('Received xhr HTTP session resynchronization message: '+a.responseText);_q(Ic(nk(this.a.a,_e),26),-1);e=Ic(nk(this.a.a,td),7).k;b=Or(Pr(a.responseText));c=b['uiId'];if(c!=e){ak&&iD($wnd.console,'UI ID switched from '+e+' to '+c+' after resynchronization');zj(Ic(nk(this.a.a,td),7),c)}pk(this.a.a);Ao(Ic(nk(this.a.a,Ge),12),(Qo(),Oo));Br(Ic(nk(this.a.a,pf),21),b);d=Ns(hA(gB(xu(Ic(nk(Ic(nk(this.a.a,zf),36).a,_f),9).e,5),fI)));d?vo((Qb(),Pb),new lo(this)):vo((Qb(),Pb),new po(this))};var ye=XD(JH,'SystemErrorHandler/1',162);Ti(164,1,{},lo);_.C=function mo(){ho(this.a)};var ve=XD(JH,'SystemErrorHandler/1/lambda$0$Type',164);Ti(163,1,{},no);_.C=function oo(){ao(this.a.a)};var we=XD(JH,'SystemErrorHandler/1/lambda$1$Type',163);Ti(165,1,{},po);_.C=function qo(){ao(this.a.a)};var xe=XD(JH,'SystemErrorHandler/1/lambda$2$Type',165);Ti(160,1,{},ro);_.T=function so(a){$o(this.a)};var ze=XD(JH,'SystemErrorHandler/lambda$0$Type',160);Ti(161,1,{},to);_.T=function uo(a){eo(this.a,a)};var Ae=XD(JH,'SystemErrorHandler/lambda$1$Type',161);Ti(134,130,{},wo);_.a=0;var De=XD(JH,'TrackingScheduler',134);Ti(135,1,{},xo);_.C=function yo(){this.a.a--};var Ce=XD(JH,'TrackingScheduler/lambda$0$Type',135);Ti(12,1,{12:1},Bo);var Ge=XD(JH,'UILifecycle',12);Ti(170,327,{},Do);_.K=function Eo(a){Ic(a,90).nb(this)};_.L=function Fo(){return Co};var Co=null;var Ee=XD(JH,'UILifecycle/StateChangeEvent',170);Ti(20,1,{4:1,31:1,20:1});_.m=function Jo(a){return this===a};_.o=function Ko(){return iH(this)};_.p=function Lo(){return this.b!=null?this.b:''+this.c};_.c=0;var Sh=XD(uH,'Enum',20);Ti(61,20,{61:1,4:1,31:1,20:1},Ro);var No,Oo,Po;var Fe=YD(JH,'UILifecycle/UIState',61,So);Ti(326,1,wH);var zh=XD(gI,'VaadinUriResolver',326);Ti(50,326,{50:1,4:1},Xo);_.ob=function Yo(a){return Wo(this,a)};var He=XD(JH,'URIResolver',50);var bp=false,cp;Ti(114,1,{},mp);_.C=function np(){ip(this.a)};var Ie=XD('com.vaadin.client.bootstrap','Bootstrapper/lambda$0$Type',114);Ti(86,1,{},Ep);_.pb=function Gp(){return Ic(nk(this.d,pf),21).f};_.qb=function Ip(a){this.f=(aq(),$p);$n(Ic(nk(Ic(nk(this.d,Re),18).c,Be),22),'','Client unexpectedly disconnected. Ensure client timeout is disabled.','',null,null)};_.rb=function Jp(a){this.f=(aq(),Zp);Ic(nk(this.d,Re),18);ak&&($wnd.console.log('Push connection closed'),undefined)};_.sb=function Kp(a){this.f=(aq(),$p);oq(Ic(nk(this.d,Re),18),'Push connection using '+a[lI]+' failed!')};_.tb=function Lp(a){var b,c;c=a['responseBody'];b=Or(Pr(c));if(!b){wq(Ic(nk(this.d,Re),18),this,c);return}else{hk('Received push ('+this.g+') message: '+c);Br(Ic(nk(this.d,pf),21),b)}};_.ub=function Mp(a){hk('Push connection established using '+a[lI]);Bp(this,a)};_.vb=function Np(a,b){this.f==(aq(),Yp)&&(this.f=Zp);zq(Ic(nk(this.d,Re),18),this)};_.wb=function Op(a){hk('Push connection re-established using '+a[lI]);Bp(this,a)};_.xb=function Pp(){ik('Push connection using primary method ('+this.a[lI]+') failed. Trying with '+this.a['fallbackTransport'])};var Qe=XD(oI,'AtmospherePushConnection',86);Ti(246,1,{},Qp);_.C=function Rp(){sp(this.a)};var Je=XD(oI,'AtmospherePushConnection/0methodref$connect$Type',246);Ti(248,1,OH,Sp);_.cb=function Tp(a){Aq(Ic(nk(this.a.d,Re),18),a.a)};_.db=function Up(a){if(Hp()){hk(this.c+' loaded');Ap(this.b.a)}else{Aq(Ic(nk(this.a.d,Re),18),a.a)}};var Ke=XD(oI,'AtmospherePushConnection/1',248);Ti(243,1,{},Xp);_.a=0;var Le=XD(oI,'AtmospherePushConnection/FragmentedMessage',243);Ti(52,20,{52:1,4:1,31:1,20:1},bq);var Yp,Zp,$p,_p;var Me=YD(oI,'AtmospherePushConnection/State',52,cq);Ti(245,1,pI,dq);_.nb=function eq(a){yp(this.a,a)};var Ne=XD(oI,'AtmospherePushConnection/lambda$0$Type',245);Ti(244,1,QH,fq);_.C=function gq(){};var Oe=XD(oI,'AtmospherePushConnection/lambda$1$Type',244);Ti(358,$wnd.Function,{},hq);_.bb=function iq(a,b){zp(this.a,Pc(a),Pc(b))};Ti(247,1,QH,jq);_.C=function kq(){Ap(this.a)};var Pe=XD(oI,'AtmospherePushConnection/lambda$3$Type',247);var Re=ZD(oI,'ConnectionStateHandler');Ti(217,1,{18:1},Iq);_.a=0;_.b=null;var Xe=XD(oI,'DefaultConnectionStateHandler',217);Ti(219,42,{},Jq);_.I=function Kq(){this.a.d=null;mq(this.a,this.b)};var Se=XD(oI,'DefaultConnectionStateHandler/1',219);Ti(64,20,{64:1,4:1,31:1,20:1},Qq);_.a=0;var Lq,Mq,Nq;var Te=YD(oI,'DefaultConnectionStateHandler/Type',64,Rq);Ti(218,1,pI,Sq);_.nb=function Tq(a){uq(this.a,a)};var Ue=XD(oI,'DefaultConnectionStateHandler/lambda$0$Type',218);Ti(220,1,{},Uq);_.T=function Vq(a){nq(this.a)};var Ve=XD(oI,'DefaultConnectionStateHandler/lambda$1$Type',220);Ti(221,1,{},Wq);_.T=function Xq(a){vq(this.a)};var We=XD(oI,'DefaultConnectionStateHandler/lambda$2$Type',221);Ti(26,1,{26:1},ar);_.a=-1;var _e=XD(oI,'Heartbeat',26);Ti(214,42,{},br);_.I=function cr(){$q(this.a)};var Ye=XD(oI,'Heartbeat/1',214);Ti(216,1,{},dr);_.lb=function er(a,b){!b?this.a.a<0?ak&&($wnd.console.debug('Heartbeat terminated, ignoring failure.'),undefined):sq(Ic(nk(this.a.b,Re),18),a):rq(Ic(nk(this.a.b,Re),18),b);Zq(this.a)};_.mb=function fr(a){tq(Ic(nk(this.a.b,Re),18));Zq(this.a)};var Ze=XD(oI,'Heartbeat/2',216);Ti(215,1,pI,gr);_.nb=function hr(a){Yq(this.a,a)};var $e=XD(oI,'Heartbeat/lambda$0$Type',215);Ti(172,1,{},lr);_.fb=function mr(a){$j('firstDelay',wE(Ic(a,25).a))};var af=XD(oI,'LoadingIndicatorConfigurator/0methodref$setFirstDelay$Type',172);Ti(173,1,{},nr);_.fb=function or(a){$j('secondDelay',wE(Ic(a,25).a))};var bf=XD(oI,'LoadingIndicatorConfigurator/1methodref$setSecondDelay$Type',173);Ti(174,1,{},pr);_.fb=function qr(a){$j('thirdDelay',wE(Ic(a,25).a))};var cf=XD(oI,'LoadingIndicatorConfigurator/2methodref$setThirdDelay$Type',174);Ti(175,1,cI,rr);_.jb=function sr(a){kr(kA(Ic(a.e,15)))};var df=XD(oI,'LoadingIndicatorConfigurator/lambda$3$Type',175);Ti(176,1,cI,tr);_.jb=function ur(a){jr(this.b,this.a,a)};_.a=0;var ef=XD(oI,'LoadingIndicatorConfigurator/lambda$4$Type',176);Ti(21,1,{21:1},Lr);_.a=0;_.b='init';_.d=false;_.e=0;_.f=-1;_.h=null;_.l=0;var pf=XD(oI,'MessageHandler',21);Ti(180,1,QH,Qr);_.C=function Rr(){!Uz&&$wnd.Polymer!=null&&JE($wnd.Polymer.version.substr(0,'1.'.length),'1.')&&(Uz=true,ak&&($wnd.console.log('Polymer micro is now loaded, using Polymer DOM API'),undefined),Tz=new Wz,undefined)};var ff=XD(oI,'MessageHandler/0methodref$updateApiImplementation$Type',180);Ti(179,42,{},Sr);_.I=function Tr(){xr(this.a)};var gf=XD(oI,'MessageHandler/1',179);Ti(346,$wnd.Function,{},Ur);_.fb=function Vr(a){vr(Ic(a,6))};Ti(62,1,{62:1},Wr);var hf=XD(oI,'MessageHandler/PendingUIDLMessage',62);Ti(181,1,QH,Xr);_.C=function Yr(){Ir(this.a,this.d,this.b,this.c)};_.c=0;var jf=XD(oI,'MessageHandler/lambda$1$Type',181);Ti(183,1,WH,Zr);_.eb=function $r(){SB(new _r(this.a,this.b))};var kf=XD(oI,'MessageHandler/lambda$3$Type',183);Ti(182,1,WH,_r);_.eb=function as(){Fr(this.a,this.b)};var lf=XD(oI,'MessageHandler/lambda$4$Type',182);Ti(184,1,{},bs);_.B=function cs(){return Yn(Ic(nk(this.a.i,Be),22),null),false};var mf=XD(oI,'MessageHandler/lambda$5$Type',184);Ti(186,1,WH,ds);_.eb=function es(){Gr(this.a)};var nf=XD(oI,'MessageHandler/lambda$6$Type',186);Ti(185,1,{},fs);_.C=function gs(){this.a.forEach(Vi(Ur.prototype.fb,Ur,[]))};var of=XD(oI,'MessageHandler/lambda$7$Type',185);Ti(14,1,{14:1},ss);_.a=0;_.e=0;var rf=XD(oI,'MessageSender',14);Ti(99,1,QH,us);_.C=function vs(){is(this.a,this.b)};_.b=false;var qf=XD(oI,'MessageSender/lambda$0$Type',99);Ti(167,1,cI,ys);_.jb=function zs(a){ws(this.a,a)};var sf=XD(oI,'PollConfigurator/lambda$0$Type',167);Ti(73,1,{73:1},Ds);_.yb=function Es(){var a;a=Ic(nk(this.b,_f),9);av(a,a.e,'ui-poll',null)};_.a=null;var vf=XD(oI,'Poller',73);Ti(169,42,{},Fs);_.I=function Gs(){var a;a=Ic(nk(this.a.b,_f),9);av(a,a.e,'ui-poll',null)};var tf=XD(oI,'Poller/1',169);Ti(168,1,pI,Hs);_.nb=function Is(a){As(this.a,a)};var uf=XD(oI,'Poller/lambda$0$Type',168);Ti(36,1,{36:1},Ms);var zf=XD(oI,'PushConfiguration',36);Ti(227,1,cI,Ps);_.jb=function Qs(a){Ls(this.a,a)};var wf=XD(oI,'PushConfiguration/0methodref$onPushModeChange$Type',227);Ti(228,1,WH,Rs);_.eb=function Ss(){qs(Ic(nk(this.a.a,rf),14),true)};var xf=XD(oI,'PushConfiguration/lambda$1$Type',228);Ti(229,1,WH,Ts);_.eb=function Us(){qs(Ic(nk(this.a.a,rf),14),false)};var yf=XD(oI,'PushConfiguration/lambda$2$Type',229);Ti(352,$wnd.Function,{},Vs);_.bb=function Ws(a,b){Os(this.a,Ic(a,15),Pc(b))};Ti(37,1,{37:1},Xs);var Bf=XD(oI,'ReconnectConfiguration',37);Ti(171,1,QH,Ys);_.C=function Zs(){lq(this.a)};var Af=XD(oI,'ReconnectConfiguration/lambda$0$Type',171);Ti(13,1,{13:1},dt);_.b=false;var Df=XD(oI,'RequestResponseTracker',13);Ti(178,1,{},et);_.C=function ft(){bt(this.a)};var Cf=XD(oI,'RequestResponseTracker/lambda$0$Type',178);Ti(242,327,{},gt);_.K=function ht(a){bd(a);null.lc()};_.L=function it(){return null};var Ef=XD(oI,'RequestStartingEvent',242);Ti(226,327,{},kt);_.K=function lt(a){Ic(a,331).a.b=false};_.L=function mt(){return jt};var jt;var Ff=XD(oI,'ResponseHandlingEndedEvent',226);Ti(284,327,{},nt);_.K=function ot(a){bd(a);null.lc()};_.L=function pt(){return null};var Gf=XD(oI,'ResponseHandlingStartedEvent',284);Ti(33,1,{33:1},xt);_.zb=function yt(a,b,c){qt(this,a,b,c)};_.Ab=function zt(a,b,c){var d;d={};d[MH]='channel';d[CI]=Object(a);d['channel']=Object(b);d['args']=c;ut(this,d)};var Hf=XD(oI,'ServerConnector',33);Ti(35,1,{35:1},Ft);_.b=false;var At;var Lf=XD(oI,'ServerRpcQueue',35);Ti(208,1,PH,Gt);_.I=function Ht(){Dt(this.a)};var If=XD(oI,'ServerRpcQueue/0methodref$doFlush$Type',208);Ti(207,1,PH,It);_.I=function Jt(){Bt()};var Jf=XD(oI,'ServerRpcQueue/lambda$0$Type',207);Ti(209,1,{},Kt);_.C=function Lt(){this.a.a.I()};var Kf=XD(oI,'ServerRpcQueue/lambda$2$Type',209);Ti(71,1,{71:1},Ot);_.b=false;var Rf=XD(oI,'XhrConnection',71);Ti(225,42,{},Qt);_.I=function Rt(){Pt(this.b)&&this.a.b&&aj(this,250)};var Mf=XD(oI,'XhrConnection/1',225);Ti(222,1,{},Tt);_.lb=function Ut(a,b){var c;c=new Zt(a,this.a);if(!b){Gq(Ic(nk(this.c.a,Re),18),c);return}else{Eq(Ic(nk(this.c.a,Re),18),c)}};_.mb=function Vt(a){var b,c;hk('Server visit took '+an(this.b)+'ms');c=a.responseText;b=Or(Pr(c));if(!b){Fq(Ic(nk(this.c.a,Re),18),new Zt(a,this.a));return}Hq(Ic(nk(this.c.a,Re),18));ak&&kD($wnd.console,'Received xhr message: '+c);Br(Ic(nk(this.c.a,pf),21),b)};_.b=0;var Nf=XD(oI,'XhrConnection/XhrResponseHandler',222);Ti(223,1,{},Wt);_.T=function Xt(a){this.a.b=true};var Of=XD(oI,'XhrConnection/lambda$0$Type',223);Ti(224,1,{331:1},Yt);var Pf=XD(oI,'XhrConnection/lambda$1$Type',224);Ti(103,1,{},Zt);var Qf=XD(oI,'XhrConnectionError',103);Ti(59,1,{59:1},bu);var Sf=XD(FI,'ConstantPool',59);Ti(84,1,{84:1},ju);_.Bb=function ku(){return Ic(nk(this.a,td),7).a};var Wf=XD(FI,'ExecuteJavaScriptProcessor',84);Ti(211,1,KH,lu);_.U=function mu(a){var b;return SB(new nu(this.a,(b=this.b,b))),ND(),true};var Tf=XD(FI,'ExecuteJavaScriptProcessor/lambda$0$Type',211);Ti(210,1,WH,nu);_.eb=function ou(){eu(this.a,this.b)};var Uf=XD(FI,'ExecuteJavaScriptProcessor/lambda$1$Type',210);Ti(212,1,PH,pu);_.I=function qu(){iu(this.a)};var Vf=XD(FI,'ExecuteJavaScriptProcessor/lambda$2$Type',212);Ti(301,1,{},ru);var Xf=XD(FI,'NodeUnregisterEvent',301);Ti(6,1,{6:1},Eu);_.Cb=function Fu(){return vu(this)};_.Db=function Gu(){return this.g};_.d=0;_.i=false;var $f=XD(FI,'StateNode',6);Ti(339,$wnd.Function,{},Iu);_.bb=function Ju(a,b){yu(this.a,this.b,Ic(a,34),Kc(b))};Ti(340,$wnd.Function,{},Ku);_.fb=function Lu(a){Hu(this.a,Ic(a,105))};var Ch=ZD('elemental.events','EventRemover');Ti(152,1,JI,Mu);_.Eb=function Nu(){zu(this.a,this.b)};var Yf=XD(FI,'StateNode/lambda$2$Type',152);Ti(341,$wnd.Function,{},Ou);_.fb=function Pu(a){Au(this.a,Ic(a,56))};Ti(153,1,JI,Qu);_.Eb=function Ru(){Bu(this.a,this.b)};var Zf=XD(FI,'StateNode/lambda$4$Type',153);Ti(9,1,{9:1},gv);_.Fb=function hv(){return this.e};_.Gb=function jv(a,b,c,d){var e;if(Xu(this,a)){e=Nc(c);wt(Ic(nk(this.c,Hf),33),a,b,e,d)}};_.d=false;_.f=false;var _f=XD(FI,'StateTree',9);Ti(344,$wnd.Function,{},kv);_.fb=function lv(a){uu(Ic(a,6),Vi(ov.prototype.bb,ov,[]))};Ti(345,$wnd.Function,{},mv);_.bb=function nv(a,b){var c;Zu(this.a,(c=Ic(a,6),Kc(b),c))};Ti(330,$wnd.Function,{},ov);_.bb=function pv(a,b){iv(Ic(a,34),Kc(b))};var xv,yv;Ti(177,1,{},Dv);var ag=XD(RI,'Binder/BinderContextImpl',177);var bg=ZD(RI,'BindingStrategy');Ti(79,1,{79:1},Iv);_.j=0;var Ev;var eg=XD(RI,'Debouncer',79);Ti(375,$wnd.Function,{},Mv);_.fb=function Nv(a){Ic(a,16).I()};Ti(329,1,{});_.c=false;_.d=0;var Gh=XD(UI,'Timer',329);Ti(304,329,{},Sv);var cg=XD(RI,'Debouncer/1',304);Ti(305,329,{},Uv);var dg=XD(RI,'Debouncer/2',305);Ti(376,$wnd.Function,{},Wv);_.bb=function Xv(a,b){var c;Vv(this,(c=Oc(a,$wnd.Map),Nc(b),c))};Ti(377,$wnd.Function,{},$v);_.fb=function _v(a){Yv(this.a,Oc(a,$wnd.Map))};Ti(378,$wnd.Function,{},aw);_.fb=function bw(a){Zv(this.a,Ic(a,79))};Ti(374,$wnd.Function,{},cw);_.bb=function dw(a,b){Kv(this.a,Ic(a,16),Pc(b))};Ti(299,1,LH,hw);_.ab=function iw(){return uw(this.a)};var fg=XD(RI,'ServerEventHandlerBinder/lambda$0$Type',299);Ti(300,1,aI,jw);_.gb=function kw(a){gw(this.b,this.a,this.c,a)};_.c=false;var gg=XD(RI,'ServerEventHandlerBinder/lambda$1$Type',300);var lw;Ti(249,1,{308:1},tx);_.Hb=function ux(a,b,c){Cw(this,a,b,c)};_.Ib=function xx(a){return Mw(a)};_.Kb=function Cx(a,b){var c,d,e;d=Object.keys(a);e=new qz(d,a,b);c=Ic(b.e.get(ig),76);!c?ix(e.b,e.a,e.c):(c.a=e)};_.Lb=function Dx(r,s){var t=this;var u=s._propertiesChanged;u&&(s._propertiesChanged=function(a,b,c){qH(function(){t.Kb(b,r)})();u.apply(this,arguments)});var v=r.Db();var w=s.ready;s.ready=function(){w.apply(this,arguments);km(s);var q=function(){var o=s.root.querySelector(aJ);if(o){s.removeEventListener(bJ,q)}else{return}if(!o.constructor.prototype.$propChangedModified){o.constructor.prototype.$propChangedModified=true;var p=o.constructor.prototype._propertiesChanged;o.constructor.prototype._propertiesChanged=function(a,b,c){p.apply(this,arguments);var d=Object.getOwnPropertyNames(b);var e='items.';var f;for(f=0;f0){var i=h.substr(0,g);var j=h.substr(g+1);var k=a.items[i];if(k&&k.nodeId){var l=k.nodeId;var m=k[j];var n=this.__dataHost;while(!n.localName||n.__dataHost){n=n.__dataHost}qH(function(){Bx(l,n,j,m,v)})()}}}}}}};s.root&&s.root.querySelector(aJ)?q():s.addEventListener(bJ,q)}};_.Jb=function Ex(a){if(a.c.has(0)){return true}return !!a.g&&K(a,a.g.e)};var ww,xw;var Og=XD(RI,'SimpleElementBindingStrategy',249);Ti(363,$wnd.Function,{},Ux);_.fb=function Vx(a){Ic(a,46).Eb()};Ti(367,$wnd.Function,{},Wx);_.fb=function Xx(a){Ic(a,16).I()};Ti(101,1,{},Yx);var hg=XD(RI,'SimpleElementBindingStrategy/BindingContext',101);Ti(76,1,{76:1},Zx);var ig=XD(RI,'SimpleElementBindingStrategy/InitialPropertyUpdate',76);Ti(250,1,{},$x);_.Mb=function _x(a){Yw(this.a,a)};var jg=XD(RI,'SimpleElementBindingStrategy/lambda$0$Type',250);Ti(251,1,{},ay);_.Mb=function by(a){Zw(this.a,a)};var kg=XD(RI,'SimpleElementBindingStrategy/lambda$1$Type',251);Ti(359,$wnd.Function,{},cy);_.bb=function dy(a,b){var c;Fx(this.b,this.a,(c=Ic(a,15),Pc(b),c))};Ti(260,1,bI,ey);_.ib=function fy(a){Gx(this.b,this.a,a)};var lg=XD(RI,'SimpleElementBindingStrategy/lambda$11$Type',260);Ti(261,1,cI,gy);_.jb=function hy(a){qx(this.c,this.b,this.a)};var mg=XD(RI,'SimpleElementBindingStrategy/lambda$12$Type',261);Ti(262,1,WH,iy);_.eb=function jy(){$w(this.b,this.c,this.a)};var ng=XD(RI,'SimpleElementBindingStrategy/lambda$13$Type',262);Ti(263,1,QH,ky);_.C=function ly(){this.b.Mb(this.a)};var og=XD(RI,'SimpleElementBindingStrategy/lambda$14$Type',263);Ti(264,1,KH,ny);_.U=function oy(a){return my(this,a)};var pg=XD(RI,'SimpleElementBindingStrategy/lambda$15$Type',264);Ti(265,1,QH,py);_.C=function qy(){this.a[this.b]=gm(this.c)};var qg=XD(RI,'SimpleElementBindingStrategy/lambda$16$Type',265);Ti(267,1,aI,ry);_.gb=function sy(a){_w(this.a,a)};var rg=XD(RI,'SimpleElementBindingStrategy/lambda$17$Type',267);Ti(266,1,WH,ty);_.eb=function uy(){Tw(this.b,this.a)};var sg=XD(RI,'SimpleElementBindingStrategy/lambda$18$Type',266);Ti(269,1,aI,vy);_.gb=function wy(a){ax(this.a,a)};var tg=XD(RI,'SimpleElementBindingStrategy/lambda$19$Type',269);Ti(252,1,{},xy);_.Mb=function yy(a){bx(this.a,a)};var ug=XD(RI,'SimpleElementBindingStrategy/lambda$2$Type',252);Ti(268,1,WH,zy);_.eb=function Ay(){cx(this.b,this.a)};var vg=XD(RI,'SimpleElementBindingStrategy/lambda$20$Type',268);Ti(270,1,PH,By);_.I=function Cy(){Vw(this.a,this.b,this.c,false)};var wg=XD(RI,'SimpleElementBindingStrategy/lambda$21$Type',270);Ti(271,1,PH,Dy);_.I=function Ey(){Vw(this.a,this.b,this.c,false)};var xg=XD(RI,'SimpleElementBindingStrategy/lambda$22$Type',271);Ti(272,1,PH,Fy);_.I=function Gy(){Xw(this.a,this.b,this.c,false)};var yg=XD(RI,'SimpleElementBindingStrategy/lambda$23$Type',272);Ti(273,1,LH,Hy);_.ab=function Iy(){return Ix(this.a,this.b)};var zg=XD(RI,'SimpleElementBindingStrategy/lambda$24$Type',273);Ti(274,1,LH,Jy);_.ab=function Ky(){return Jx(this.a,this.b)};var Ag=XD(RI,'SimpleElementBindingStrategy/lambda$25$Type',274);Ti(360,$wnd.Function,{},Ly);_.bb=function My(a,b){var c;GB((c=Ic(a,74),Pc(b),c))};Ti(361,$wnd.Function,{},Ny);_.fb=function Oy(a){Kx(this.a,Oc(a,$wnd.Map))};Ti(362,$wnd.Function,{},Py);_.bb=function Qy(a,b){var c;(c=Ic(a,46),Pc(b),c).Eb()};Ti(253,1,{105:1},Ry);_.hb=function Sy(a){jx(this.c,this.b,this.a)};var Bg=XD(RI,'SimpleElementBindingStrategy/lambda$3$Type',253);Ti(364,$wnd.Function,{},Ty);_.bb=function Uy(a,b){var c;dx(this.a,(c=Ic(a,15),Pc(b),c))};Ti(275,1,bI,Vy);_.ib=function Wy(a){ex(this.a,a)};var Cg=XD(RI,'SimpleElementBindingStrategy/lambda$32$Type',275);Ti(276,1,QH,Xy);_.C=function Yy(){fx(this.b,this.a,this.c)};var Dg=XD(RI,'SimpleElementBindingStrategy/lambda$33$Type',276);Ti(277,1,{},Zy);_.T=function $y(a){gx(this.a,a)};var Eg=XD(RI,'SimpleElementBindingStrategy/lambda$34$Type',277);Ti(365,$wnd.Function,{},_y);_.fb=function az(a){Lx(this.b,this.a,Pc(a))};Ti(366,$wnd.Function,{},bz);_.fb=function cz(a){hx(this.a,this.b,Pc(a))};Ti(278,1,{},dz);_.fb=function ez(a){Sx(this.b,this.c,this.a,Pc(a))};var Fg=XD(RI,'SimpleElementBindingStrategy/lambda$37$Type',278);Ti(279,1,aI,fz);_.gb=function gz(a){Mx(this.a,a)};var Gg=XD(RI,'SimpleElementBindingStrategy/lambda$39$Type',279);Ti(255,1,WH,hz);_.eb=function iz(){Nx(this.a)};var Hg=XD(RI,'SimpleElementBindingStrategy/lambda$4$Type',255);Ti(280,1,LH,jz);_.ab=function kz(){return this.a.b};var Ig=XD(RI,'SimpleElementBindingStrategy/lambda$40$Type',280);Ti(368,$wnd.Function,{},lz);_.fb=function mz(a){this.a.push(Ic(a,6))};Ti(254,1,{},nz);_.C=function oz(){Ox(this.a)};var Jg=XD(RI,'SimpleElementBindingStrategy/lambda$5$Type',254);Ti(257,1,PH,qz);_.I=function rz(){pz(this)};var Kg=XD(RI,'SimpleElementBindingStrategy/lambda$6$Type',257);Ti(256,1,LH,sz);_.ab=function tz(){return this.a[this.b]};var Lg=XD(RI,'SimpleElementBindingStrategy/lambda$7$Type',256);Ti(259,1,bI,uz);_.ib=function vz(a){RB(new wz(this.a))};var Mg=XD(RI,'SimpleElementBindingStrategy/lambda$8$Type',259);Ti(258,1,WH,wz);_.eb=function xz(){Bw(this.a)};var Ng=XD(RI,'SimpleElementBindingStrategy/lambda$9$Type',258);Ti(281,1,{308:1},Cz);_.Hb=function Dz(a,b,c){Az(a,b)};_.Ib=function Ez(a){return $doc.createTextNode('')};_.Jb=function Fz(a){return a.c.has(7)};var yz;var Rg=XD(RI,'TextBindingStrategy',281);Ti(282,1,QH,Gz);_.C=function Hz(){zz();eD(this.a,Pc(hA(this.b)))};var Pg=XD(RI,'TextBindingStrategy/lambda$0$Type',282);Ti(283,1,{105:1},Iz);_.hb=function Jz(a){Bz(this.b,this.a)};var Qg=XD(RI,'TextBindingStrategy/lambda$1$Type',283);Ti(338,$wnd.Function,{},Nz);_.fb=function Oz(a){this.a.add(a)};Ti(342,$wnd.Function,{},Qz);_.bb=function Rz(a,b){this.a.push(a)};var Tz,Uz=false;Ti(291,1,{},Wz);var Sg=XD('com.vaadin.client.flow.dom','PolymerDomApiImpl',291);Ti(77,1,{77:1},Xz);var Tg=XD('com.vaadin.client.flow.model','UpdatableModelProperties',77);Ti(373,$wnd.Function,{},Yz);_.fb=function Zz(a){this.a.add(Pc(a))};Ti(87,1,{});_.Nb=function _z(){return this.e};var sh=XD(VH,'ReactiveValueChangeEvent',87);Ti(54,87,{54:1},aA);_.Nb=function bA(){return Ic(this.e,29)};_.b=false;_.c=0;var Ug=XD(cJ,'ListSpliceEvent',54);Ti(15,1,{15:1,309:1},qA);_.Ob=function rA(a){return tA(this.a,a)};_.b=false;_.c=false;_.d=false;var cA;var bh=XD(cJ,'MapProperty',15);Ti(85,1,{});var rh=XD(VH,'ReactiveEventRouter',85);Ti(235,85,{},zA);_.Pb=function AA(a,b){Ic(a,47).jb(Ic(b,78))};_.Qb=function BA(a){return new CA(a)};var Wg=XD(cJ,'MapProperty/1',235);Ti(236,1,cI,CA);_.jb=function DA(a){EB(this.a)};var Vg=XD(cJ,'MapProperty/1/0methodref$onValueChange$Type',236);Ti(234,1,PH,EA);_.I=function FA(){dA()};var Xg=XD(cJ,'MapProperty/lambda$0$Type',234);Ti(237,1,WH,GA);_.eb=function HA(){this.a.d=false};var Yg=XD(cJ,'MapProperty/lambda$1$Type',237);Ti(238,1,WH,IA);_.eb=function JA(){this.a.d=false};var Zg=XD(cJ,'MapProperty/lambda$2$Type',238);Ti(239,1,PH,KA);_.I=function LA(){mA(this.a,this.b)};var $g=XD(cJ,'MapProperty/lambda$3$Type',239);Ti(88,87,{88:1},MA);_.Nb=function NA(){return Ic(this.e,43)};var _g=XD(cJ,'MapPropertyAddEvent',88);Ti(78,87,{78:1},OA);_.Nb=function PA(){return Ic(this.e,15)};var ah=XD(cJ,'MapPropertyChangeEvent',78);Ti(34,1,{34:1});_.d=0;var dh=XD(cJ,'NodeFeature',34);Ti(29,34,{34:1,29:1,309:1},XA);_.Ob=function YA(a){return tA(this.a,a)};_.Rb=function ZA(a){var b,c,d;c=[];for(b=0;b=0?':'+this.c:'')+')'};_.c=0;var di=XD(uH,'StackTraceElement',30);Gc={4:1,111:1,31:1,2:1};var gi=XD(uH,'String',2);Ti(68,83,{111:1},_E,aF,bF);var ei=XD(uH,'StringBuilder',68);Ti(124,69,yH,cF);var fi=XD(uH,'StringIndexOutOfBoundsException',124);Ti(482,1,{});var dF;Ti(106,1,KH,gF);_.U=function hF(a){return fF(a)};var hi=XD(uH,'Throwable/lambda$0$Type',106);Ti(94,10,yH,iF);var ji=XD(uH,'UnsupportedOperationException',94);Ti(324,1,{104:1});_.$b=function jF(a){throw Li(new iF('Add not supported on this collection'))};_.p=function kF(){var a,b,c;c=new kG;for(b=this._b();b.cc();){a=b.dc();jG(c,a===this?'(this Collection)':a==null?zH:Xi(a))}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)};var ki=XD(pJ,'AbstractCollection',324);Ti(325,324,{104:1,91:1});_.bc=function lF(a,b){throw Li(new iF('Add not supported on this list'))};_.$b=function mF(a){this.bc(this.ac(),a);return true};_.m=function nF(a){var b,c,d,e,f;if(a===this){return true}if(!Sc(a,41)){return false}f=Ic(a,91);if(this.a.length!=f.a.length){return false}e=new DF(f);for(c=new DF(this);c.a { + if (!button.__hasDisableOnClickListener) { + button.addEventListener('click', disableOnClickListener); + button.__hasDisableOnClickListener = true; + } + } +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/comboBoxConnector.js b/kontor-spring/application/frontend/generated/jar-resources/comboBoxConnector.js new file mode 100644 index 0000000..9365cb1 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/comboBoxConnector.js @@ -0,0 +1,273 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; +import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js'; + +window.Vaadin.Flow.comboBoxConnector = {} +window.Vaadin.Flow.comboBoxConnector.initLazy = (comboBox) => { + // Check whether the connector was already initialized for the ComboBox + if (comboBox.$connector) { + return; + } + + comboBox.$connector = {}; + + // holds pageIndex -> callback pairs of subsequent indexes (current active range) + const pageCallbacks = {}; + let cache = {}; + let lastFilter = ''; + const placeHolder = new window.Vaadin.ComboBoxPlaceholder(); + + const serverFacade = (() => { + // Private variables + let lastFilterSentToServer = ''; + let dataCommunicatorResetNeeded = false; + + // Public methods + const needsDataCommunicatorReset = () => (dataCommunicatorResetNeeded = true); + const getLastFilterSentToServer = () => lastFilterSentToServer; + const requestData = (startIndex, endIndex, params) => { + const count = endIndex - startIndex; + const filter = params.filter; + + comboBox.$server.setRequestedRange(startIndex, count, filter); + lastFilterSentToServer = filter; + if (dataCommunicatorResetNeeded) { + comboBox.$server.resetDataCommunicator(); + dataCommunicatorResetNeeded = false; + } + }; + + return { + needsDataCommunicatorReset, + getLastFilterSentToServer, + requestData + }; + })(); + + const clearPageCallbacks = (pages = Object.keys(pageCallbacks)) => { + // Flush and empty the existing requests + pages.forEach((page) => { + pageCallbacks[page]([], comboBox.size); + delete pageCallbacks[page]; + + // Empty the comboBox's internal cache without invoking observers by filling + // the filteredItems array with placeholders (comboBox will request for data when it + // encounters a placeholder) + const pageStart = parseInt(page) * comboBox.pageSize; + const pageEnd = pageStart + comboBox.pageSize; + const end = Math.min(pageEnd, comboBox.filteredItems.length); + for (let i = pageStart; i < end; i++) { + comboBox.filteredItems[i] = placeHolder; + } + }); + }; + + comboBox.dataProvider = function (params, callback) { + if (params.pageSize != comboBox.pageSize) { + throw 'Invalid pageSize'; + } + + if (comboBox._clientSideFilter) { + // For clientside filter we first make sure we have all data which we also + // filter based on comboBox.filter. While later we only filter clientside data. + + if (cache[0]) { + performClientSideFilter(cache[0], params.filter, callback); + return; + } else { + // If client side filter is enabled then we need to first ask all data + // and filter it on client side, otherwise next time when user will + // input another filter, eg. continue to type, the local cache will be only + // what was received for the first filter, which may not be the whole + // data from server (keep in mind that client side filter is enabled only + // when the items count does not exceed one page). + params.filter = ''; + } + } + + const filterChanged = params.filter !== lastFilter; + if (filterChanged) { + cache = {}; + lastFilter = params.filter; + this._filterDebouncer = Debouncer.debounce(this._filterDebouncer, timeOut.after(500), () => { + if (serverFacade.getLastFilterSentToServer() === params.filter) { + // Fixes the case when the filter changes + // to something else and back to the original value + // within debounce timeout, and the + // DataCommunicator thinks it doesn't need to send data + serverFacade.needsDataCommunicatorReset(); + } + if (params.filter !== lastFilter) { + throw new Error("Expected params.filter to be '" + lastFilter + "' but was '" + params.filter + "'"); + } + // Remove the debouncer before clearing page callbacks. + // This makes sure that they are executed. + this._filterDebouncer = undefined; + // Call the method again after debounce. + clearPageCallbacks(); + comboBox.dataProvider(params, callback); + }); + return; + } + + // Postpone the execution of new callbacks if there is an active debouncer. + // They will be executed when the page callbacks are cleared within the debouncer. + if (this._filterDebouncer) { + pageCallbacks[params.page] = callback; + return; + } + + if (cache[params.page]) { + // This may happen after skipping pages by scrolling fast + commitPage(params.page, callback); + } else { + pageCallbacks[params.page] = callback; + const maxRangeCount = Math.max(params.pageSize * 2, 500); // Max item count in active range + const activePages = Object.keys(pageCallbacks).map((page) => parseInt(page)); + const rangeMin = Math.min(...activePages); + const rangeMax = Math.max(...activePages); + + if (activePages.length * params.pageSize > maxRangeCount) { + if (params.page === rangeMin) { + clearPageCallbacks([String(rangeMax)]); + } else { + clearPageCallbacks([String(rangeMin)]); + } + comboBox.dataProvider(params, callback); + } else if (rangeMax - rangeMin + 1 !== activePages.length) { + // Wasn't a sequential page index, clear the cache so combo-box will request for new pages + clearPageCallbacks(); + } else { + // The requested page was sequential, extend the requested range + const startIndex = params.pageSize * rangeMin; + const endIndex = params.pageSize * (rangeMax + 1); + + serverFacade.requestData(startIndex, endIndex, params); + } + } + }; + + comboBox.$connector.clear = (start, length) => { + const firstPageToClear = Math.floor(start / comboBox.pageSize); + const numberOfPagesToClear = Math.ceil(length / comboBox.pageSize); + + for (let i = firstPageToClear; i < firstPageToClear + numberOfPagesToClear; i++) { + delete cache[i]; + } + }; + + comboBox.$connector.filter = (item, filter) => { + filter = filter ? filter.toString().toLowerCase() : ''; + return comboBox._getItemLabel(item, comboBox.itemLabelPath).toString().toLowerCase().indexOf(filter) > -1; + }; + + comboBox.$connector.set = (index, items, filter) => { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + if (index % comboBox.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + comboBox.pageSize; + } + + if (index === 0 && items.length === 0 && pageCallbacks[0]) { + // Makes sure that the dataProvider callback is called even when server + // returns empty data set (no items match the filter). + cache[0] = []; + return; + } + + const firstPageToSet = index / comboBox.pageSize; + const updatedPageCount = Math.ceil(items.length / comboBox.pageSize); + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPageToSet + i; + let slice = items.slice(i * comboBox.pageSize, (i + 1) * comboBox.pageSize); + + cache[page] = slice; + } + }; + + comboBox.$connector.updateData = (items) => { + const itemsMap = new Map(items.map((item) => [item.key, item])); + + comboBox.filteredItems = comboBox.filteredItems.map((item) => { + return itemsMap.get(item.key) || item; + }); + }; + + comboBox.$connector.updateSize = function (newSize) { + if (!comboBox._clientSideFilter) { + // FIXME: It may be that this size set is unnecessary, since when + // providing data to combobox via callback we may use data's size. + // However, if this size reflect the whole data size, including + // data not fetched yet into client side, and combobox expect it + // to be set as such, the at least, we don't need it in case the + // filter is clientSide only, since it'll increase the height of + // the popup at only at first user filter to this size, while the + // filtered items count are less. + comboBox.size = newSize; + } + }; + + comboBox.$connector.reset = function () { + clearPageCallbacks(); + cache = {}; + comboBox.clearCache(); + }; + + comboBox.$connector.confirm = function (id, filter) { + if (filter != serverFacade.getLastFilterSentToServer()) { + return; + } + + // We're done applying changes from this batch, resolve pending + // callbacks + let activePages = Object.getOwnPropertyNames(pageCallbacks); + for (let i = 0; i < activePages.length; i++) { + let page = activePages[i]; + + if (cache[page]) { + commitPage(page, pageCallbacks[page]); + } + } + + // Let server know we're done + comboBox.$server.confirmUpdate(id); + }; + + const commitPage = function (page, callback) { + let data = cache[page]; + + if (comboBox._clientSideFilter) { + performClientSideFilter(data, comboBox.filter, callback); + } else { + // Remove the data if server-side filtering, but keep it for client-side + // filtering + delete cache[page]; + + // FIXME: It may be that we ought to provide data.length instead of + // comboBox.size and remove updateSize function. + callback(data, comboBox.size); + } + }; + + // Perform filter on client side (here) using the items from specified page + // and submitting the filtered items to specified callback. + // The filter used is the one from combobox, not the lastFilter stored since + // that may not reflect user's input. + const performClientSideFilter = function (page, filter, callback) { + let filteredItems = page; + + if (filter) { + filteredItems = page.filter((item) => comboBox.$connector.filter(item, filter)); + } + + callback(filteredItems, filteredItems.length); + }; + + // Prevent setting the custom value as the 'value'-prop automatically + comboBox.addEventListener('custom-value-set', (e) => e.preventDefault()); +} + +window.Vaadin.ComboBoxPlaceholder = ComboBoxPlaceholder; diff --git a/kontor-spring/application/frontend/generated/jar-resources/contextMenuConnector.js b/kontor-spring/application/frontend/generated/jar-resources/contextMenuConnector.js new file mode 100644 index 0000000..351c4a6 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/contextMenuConnector.js @@ -0,0 +1,122 @@ +function getContainer(appId, nodeId) { + try { + return window.Vaadin.Flow.clients[appId].getByNodeId(nodeId); + } catch (error) { + console.error('Could not get node %s from app %s', nodeId, appId); + console.error(error); + } +} + +/** + * Initializes the connector for a context menu element. + * + * @param {HTMLElement} contextMenu + * @param {string} appId + */ +function initLazy(contextMenu, appId) { + if (contextMenu.$connector) { + return; + } + + contextMenu.$connector = { + /** + * Generates and assigns the items to the context menu. + * + * @param {number} nodeId + */ + generateItems(nodeId) { + const items = generateItemsTree(appId, nodeId); + + contextMenu.items = items; + } + }; +} + +/** + * Generates an items tree compatible with the context-menu web component + * by traversing the given Flow DOM tree of context menu item nodes + * whose root node is identified by the `nodeId` argument. + * + * The app id is required to access the store of Flow DOM nodes. + * + * @param {string} appId + * @param {number} nodeId + */ +function generateItemsTree(appId, nodeId) { + const container = getContainer(appId, nodeId); + if (!container) { + return; + } + + return Array.from(container.children).map((child) => { + const item = { + component: child, + checked: child._checked, + keepOpen: child._keepOpen, + className: child.className, + theme: child.__theme + }; + // Do not hardcode tag name to allow `vaadin-menu-bar-item` + if (child._hasVaadinItemMixin && child._containerNodeId) { + item.children = generateItemsTree(appId, child._containerNodeId); + } + child._item = item; + return item; + }); +} + +/** + * Sets the checked state for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {boolean} checked + */ +function setChecked(component, checked) { + if (component._item) { + component._item.checked = checked; + + // Set the attribute in the connector to show the checkmark + // without having to re-render the whole menu while opened. + if (component._item.keepOpen) { + component.toggleAttribute('menu-item-checked', checked); + } + } +} + +/** + * Sets the keep open state for a context menu item. + * + * @param {HTMLElement} component + * @param {boolean} keepOpen + */ +function setKeepOpen(component, keepOpen) { + if (component._item) { + component._item.keepOpen = keepOpen; + } +} + +/** + * Sets the theme for a context menu item. + * + * This method is supposed to be called when the context menu item is closed, + * so there is no need for triggering a re-render eagarly. + * + * @param {HTMLElement} component + * @param {string | undefined | null} theme + */ +function setTheme(component, theme) { + if (component._item) { + component._item.theme = theme; + } +} + +window.Vaadin.Flow.contextMenuConnector = { + initLazy, + generateItemsTree, + setChecked, + setKeepOpen, + setTheme +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/contextMenuTargetConnector.js b/kontor-spring/application/frontend/generated/jar-resources/contextMenuTargetConnector.js new file mode 100644 index 0000000..ded56c4 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/contextMenuTargetConnector.js @@ -0,0 +1,62 @@ +import * as Gestures from '@vaadin/component-base/src/gestures.js'; + +function init(target) { + if (target.$contextMenuTargetConnector) { + return; + } + + target.$contextMenuTargetConnector = { + openOnHandler(e) { + // used by Grid to prevent context menu on selection column click + if (target.preventContextMenu && target.preventContextMenu(e)) { + return; + } + e.preventDefault(); + e.stopPropagation(); + this.$contextMenuTargetConnector.openEvent = e; + let detail = {}; + if (target.getContextMenuBeforeOpenDetail) { + detail = target.getContextMenuBeforeOpenDetail(e); + } + target.dispatchEvent( + new CustomEvent('vaadin-context-menu-before-open', { + detail: detail + }) + ); + }, + + updateOpenOn(eventType) { + this.removeListener(); + this.openOnEventType = eventType; + + customElements.whenDefined('vaadin-context-menu').then(() => { + if (Gestures.gestures[eventType]) { + Gestures.addListener(target, eventType, this.openOnHandler); + } else { + target.addEventListener(eventType, this.openOnHandler); + } + }); + }, + + removeListener() { + if (this.openOnEventType) { + if (Gestures.gestures[this.openOnEventType]) { + Gestures.removeListener(target, this.openOnEventType, this.openOnHandler); + } else { + target.removeEventListener(this.openOnEventType, this.openOnHandler); + } + } + }, + + openMenu(contextMenu) { + contextMenu.open(this.openEvent); + }, + + removeConnector() { + this.removeListener(); + target.$contextMenuTargetConnector = undefined; + }, + }; +} + +window.Vaadin.Flow.contextMenuTargetConnector = { init }; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/base-panel-vYmwbGFU.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/base-panel-vYmwbGFU.js new file mode 100644 index 0000000..94fecdc --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/base-panel-vYmwbGFU.js @@ -0,0 +1,24 @@ +import { M as t, b as n } from "./copilot-ppBO0zjz.js"; +class o extends t { + constructor() { + super(...arguments), this.eventBusRemovers = [], this.messageHandlers = {}; + } + createRenderRoot() { + return this; + } + onEventBus(e, s) { + this.eventBusRemovers.push(n.on(e, s)); + } + disconnectedCallback() { + super.disconnectedCallback(), this.eventBusRemovers.forEach((e) => e()); + } + onCommand(e, s) { + this.messageHandlers[e] = s; + } + handleMessage(e) { + return this.messageHandlers[e.command] ? (this.messageHandlers[e.command].call(this, e), !0) : !1; + } +} +export { + o as B +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-features-plugin-tc1ssT5Q.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-features-plugin-tc1ssT5Q.js new file mode 100644 index 0000000..245c93a --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-features-plugin-tc1ssT5Q.js @@ -0,0 +1,71 @@ +import { x as p, H as c, t as g } from "./copilot-ppBO0zjz.js"; +import { r as f } from "./state-B-CMA1Q2.js"; +import { B as u } from "./base-panel-vYmwbGFU.js"; +import { showNotification as h } from "./copilot-notification-BorVW3EP.js"; +import { i as m } from "./icons-BzskfjAz.js"; +const v = "copilot-features-panel{padding:var(--space-100);font:var(--font-xsmall);display:grid;grid-template-columns:auto 1fr;gap:var(--space-50);height:auto}copilot-features-panel a{display:flex;align-items:center;gap:var(--space-50);white-space:nowrap}copilot-features-panel a svg{height:12px;width:12px;min-height:12px;min-width:12px}"; +var b = Object.defineProperty, F = Object.getOwnPropertyDescriptor, d = (e, t, a, r) => { + for (var o = r > 1 ? void 0 : r ? F(t, a) : t, s = e.length - 1, l; s >= 0; s--) + (l = e[s]) && (o = (r ? l(t, a, o) : l(o)) || o); + return r && o && b(t, a, o), o; +}; +const n = window.Vaadin.devTools; +let i = class extends u { + constructor() { + super(...arguments), this.features = [], this.handleFeatureFlags = (e) => { + this.features = e.data.features; + }; + } + connectedCallback() { + super.connectedCallback(), this.onCommand("featureFlags", this.handleFeatureFlags); + } + render() { + return p` + ${this.features.map( + (e) => p` + this.toggleFeatureFlag(t, e)}> + + learn more ${m.linkExternal} + ` + )}`; + } + toggleFeatureFlag(e, t) { + const a = e.target.checked; + n.frontendConnection ? (n.frontendConnection.send("setFeature", { featureId: t.id, enabled: a }), h({ + type: c.INFORMATION, + message: `“${t.title}” ${a ? "enabled" : "disabled"}`, + details: t.requiresServerRestart ? "This feature requires a server restart" : void 0, + dismissId: `feature${t.id}${a ? "Enabled" : "Disabled"}` + })) : n.log("error", `Unable to toggle feature ${t.title}: No server connection available`); + } +}; +d([ + f() +], i.prototype, "features", 2); +i = d([ + g("copilot-features-panel") +], i); +const w = { + header: "Features", + expanded: !0, + panelOrder: 20, + panel: "right", + floating: !1, + tag: "copilot-features-panel", + helpUrl: "https://vaadin.com/docs/latest/flow/configuration/feature-flags" +}, $ = { + init(e) { + e.addPanel(w); + } +}; +window.Vaadin.copilot.plugins.push($); +export { + i as CopilotFeaturesPanel +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-BEKNiRJC.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-BEKNiRJC.js new file mode 100644 index 0000000..f09487d --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-feedback-plugin-BEKNiRJC.js @@ -0,0 +1,172 @@ +import { x as d, b as c, l as h, s as f, P as v, t as b } from "./copilot-ppBO0zjz.js"; +import { r as p } from "./state-B-CMA1Q2.js"; +import { m, e as g } from "./overlay-monkeypatch-Bx2SPt1s.js"; +import { B as y } from "./base-panel-vYmwbGFU.js"; +import { i as k } from "./icons-BzskfjAz.js"; +const x = "copilot-feedback-panel{display:flex;flex-direction:column;font:var(--font-xsmall);--vaadin-input-field-label-font-size: var(--font-size-1);padding:var(--space-200);gap:var(--space-200);justify-content:space-between}copilot-feedback-panel>p{margin:0}copilot-feedback-panel .dialog-footer{display:flex;gap:var(--space-100)}copilot-feedback-panel vaadin-select,copilot-feedback-panel vaadin-text-area,copilot-feedback-panel vaadin-text-field{padding-top:0;--lumo-text-field-size: 1.75rem;--vaadin-input-field-label-font-size: var(--font-size-2);--vaadin-input-field-background: none;--vaadin-input-field-border-color: transparent;--vaadin-input-field-border-width: 1px;--vaadin-input-field-border-color: var(--border-color-high-contrast);--vaadin-input-field-hover-highlight: var(--gray-100);--vaadin-input-field-hover-highlight-opacity: 1}copilot-feedback-panel vaadin-text-area>textarea{max-height:7em}copilot-feedback-panel vaadin-text-area>textarea{padding:var(--space-100) 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-text-area:hover::part(input-field){background-color:var(--gray-100)}copilot-feedback-panel vaadin-text-field>input{font:var(--font-xsmall)}copilot-feedback-panel vaadin-select::part(input-field){border-radius:var(--radius-1);flex:1;padding:0 var(--space-50)}vaadin-select-overlay[theme=feedback]::part(overlay){--color-high-contrast: var(--gray-500)}copilot-feedback-panel vaadin-select[focus-ring]::part(input-field){box-shadow:none;outline:2px solid var(--selection-color);outline-offset:-2px}copilot-feedback-panel vaadin-select-value-button{padding:0 var(--space-50)}copilot-feedback-panel vaadin-select-item{--_lumo-selected-item-height: 1.75rem;--_lumo-selected-item-padding: 0;font:var(--font-xsmall)}copilot-feedback-panel vaadin-select-item:hover{background:none}"; +var w = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (e, t, l, n) => { + for (var a = n > 1 ? void 0 : n ? $(t, l) : t, s = e.length - 1, r; s >= 0; s--) + (r = e[s]) && (a = (n ? r(t, l, a) : r(a)) || a); + return n && a && w(t, l, a), a; +}; +const u = "https://github.com/vaadin/copilot/issues/new", A = "?template=feature_request.md&title=%5BFEATURE%5D", P = "A short, concise description of the bug and why you consider it a bug. Any details like exceptions and logs can be helpful as well.", T = "Please provide as many details as possible, this will help us deliver a fix as soon as possible.%0AThank you!%0A%0A%23%23%23 Description of the Bug%0A%0A{description}%0A%0A%23%23%23 Expected Behavior%0A%0AA description of what you would expect to happen. (Sometimes it is clear what the expected outcome is if something does not work, other times, it is not super clear.)%0A%0A%23%23%23 Minimal Reproducible Example%0A%0AWe would appreciate the minimum code with which we can reproduce the issue.%0A%0A%23%23%23 Versions%0A{versionsInfo}"; +let i = class extends y { + constructor() { + super(), this.description = "", this.items = [ + { + label: "Report a Bug", + value: "bug", + ghTitle: "[BUG]" + }, + { + label: "Ask a Question", + value: "question", + ghTitle: "[QUESTION]" + }, + { + label: "Share an Idea", + value: "idea", + ghTitle: "[FEATURE]" + } + ]; + } + render() { + return d`${this.renderContent()}${this.renderFooter()}`; + } + firstUpdated() { + m(this); + } + renderContent() { + return this.message === void 0 ? d` +

+ Your insights are incredibly valuable to us. Whether you’ve encountered a hiccup, have questions, or ideas + to make our platform better, we're all ears! If you wish, leave your email and we’ll get back to you. You + can even share your code snippet with us for a clearer picture. +

+ { + this.type = e.detail.value; + }}> + + { + this.descriptionField.invalid = !1, this.descriptionField.placeholder = ""; + }} + @value-changed=${(e) => { + this.description = e.detail.value; + }} + label="Tell Us More" + helper-text="Describe what you're experiencing, wondering about, or envisioning. The more you share, the better we can understand and act on your feedback"> + { + this.email = e.detail.value; + }} + id="email" + label="Your Email (Optional)" + helper-text="Leave your email if you’d like us to follow up. Totally optional, but we’d love to keep the conversation going."> + ` : d`

${this.message}

`; + } + renderFooter() { + return this.message === void 0 ? d` + + ` : d` `; + } + close() { + h.updatePanel("copilot-feedback-panel", { + floating: !1 + }); + } + submit() { + if (this.description.trim() === "") { + this.descriptionField.invalid = !0, this.descriptionField.placeholder = "Please tell us more before sending", this.descriptionField.value = ""; + return; + } + const e = { + description: this.description, + email: this.email, + type: this.type + }; + c.emit("system-info-with-callback", { + callback: (t) => f(`${v}feedback`, { ...e, versions: t }), + notify: !1 + }), this.parentNode?.style.setProperty("--section-height", "150px"), this.message = "Thank you for sharing feedback."; + } + keyDown(e) { + (e.key === "Backspace" || e.key === "Delete") && e.stopPropagation(); + } + openGithub(e, t) { + if (this.type === "idea") { + window.open(`${u}${A}`); + return; + } + const l = e.replace(/\n/g, "%0A"), n = `${t.items.find((r) => r.value === this.type)?.ghTitle}`, a = t.description !== "" ? t.description : P, s = T.replace("{description}", a).replace("{versionsInfo}", l); + window.open(`${u}?title=${n}&body=${s}`, "_blank")?.focus(); + } +}; +o([ + p() +], i.prototype, "description", 2); +o([ + p() +], i.prototype, "type", 2); +o([ + p() +], i.prototype, "email", 2); +o([ + p() +], i.prototype, "message", 2); +o([ + p() +], i.prototype, "items", 2); +o([ + g("vaadin-text-area") +], i.prototype, "descriptionField", 2); +i = o([ + b("copilot-feedback-panel") +], i); +const F = { + header: "Help Us Improve!", + expanded: !0, + expandable: !1, + panelOrder: 0, + floating: !1, + tag: "copilot-feedback-panel", + width: 500, + height: 500, + floatingPosition: { + top: 50, + left: 50 + } +}, D = { + init(e) { + e.addPanel(F); + } +}; +window.Vaadin.copilot.plugins.push(D); +export { + i as CopilotFeedbackPanel +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-global-vars-later-DnZWjL_G.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-global-vars-later-DnZWjL_G.js new file mode 100644 index 0000000..47a6cbe --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-global-vars-later-DnZWjL_G.js @@ -0,0 +1,156128 @@ +import { g as Xut, a as Qut, c as o5e, b as ew, s as c5e, P as l5e, d as m5e, h as g5e, e as Hme, j as Yut, v as Zut, p as u5e, f as _5e, i as Kut, k as e_t } from "./copilot-ppBO0zjz.js"; +import { g as f5e, a as t_t, i as r_t, b as n_t, c as i_t, d as Gme, e as p5e, f as s_t, h as a_t, j as o_t, k as c_t, l as l_t, m as u_t, n as __t } from "./react-utils-D_MlSXfo.js"; +function $me(Cu) { + throw new Error('Could not dynamically require "' + Cu + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} +var h5e = { exports: {} }; +const f_t = {}, p_t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + default: f_t +}, Symbol.toStringTag, { value: "Module" })), gE = /* @__PURE__ */ Xut(p_t); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +(function(Cu) { + var na = {}; + ((Ua) => { + var H_ = Object.defineProperty, Qa = (e, t) => { + for (var n in t) + H_(e, n, { get: t[n], enumerable: !0 }); + }, Cp = (e) => e, Yh = {}; + Qa(Yh, { + ANONYMOUS: () => DU, + AccessFlags: () => yQ, + AssertionLevel: () => PX, + AssignmentDeclarationKind: () => DQ, + AssignmentKind: () => YZ, + Associativity: () => aK, + BreakpointResolver: () => Eq, + BuilderFileEmit: () => Fie, + BuilderProgramKind: () => zie, + BuilderState: () => wd, + CallHierarchy: () => Wx, + CharacterCodes: () => jQ, + CheckFlags: () => dQ, + CheckMode: () => Gz, + ClassificationType: () => FV, + ClassificationTypeNames: () => Gse, + CommentDirectiveType: () => KX, + Comparison: () => pX, + CompletionInfoFlags: () => Jse, + CompletionTriggerKind: () => IV, + Completions: () => $x, + ContainerFlags: () => lne, + ContextFlags: () => aQ, + Debug: () => E, + DiagnosticCategory: () => bI, + Diagnostics: () => p, + DocumentHighlights: () => k9, + ElementFlags: () => hQ, + EmitFlags: () => JR, + EmitHint: () => VQ, + EmitOnly: () => tQ, + EndOfLineState: () => Vse, + ExitStatus: () => rQ, + ExportKind: () => Uae, + Extension: () => BQ, + ExternalEmitHelpers: () => WQ, + FileIncludeKind: () => AR, + FilePreprocessingDiagnosticsKind: () => eQ, + FileSystemEntryKind: () => ZQ, + FileWatcherEventKind: () => XQ, + FindAllReferences: () => yo, + FlattenLevel: () => Mne, + FlowFlags: () => vI, + ForegroundColorEscapeSequences: () => Eie, + FunctionFlags: () => nK, + GeneratedIdentifierFlags: () => wR, + GetLiteralTextFlags: () => _Z, + GoToDefinition: () => b6, + HighlightSpanKind: () => jse, + IdentifierNameMap: () => XC, + IdentifierNameMultiMap: () => wne, + ImportKind: () => Vae, + ImportsNotUsedAsValues: () => OQ, + IndentStyle: () => Bse, + IndexFlags: () => vQ, + IndexKind: () => TQ, + InferenceFlags: () => CQ, + InferencePriority: () => kQ, + InlayHintKind: () => Rse, + InlayHints: () => hH, + InternalEmitFlags: () => JQ, + InternalSymbolName: () => mQ, + IntersectionFlags: () => sQ, + InvalidatedProjectKind: () => _se, + JSDocParsingMode: () => $Q, + JsDoc: () => bv, + JsTyping: () => hm, + JsxEmit: () => IQ, + JsxFlags: () => QX, + JsxReferenceKind: () => bQ, + LanguageFeatureMinimumTarget: () => zQ, + LanguageServiceMode: () => Lse, + LanguageVariant: () => MQ, + LexicalEnvironmentFlags: () => qQ, + ListFormat: () => HQ, + LogLevel: () => BX, + MapCode: () => yH, + MemberOverrideStatus: () => nQ, + ModifierFlags: () => DR, + ModuleDetectionKind: () => PQ, + ModuleInstanceState: () => one, + ModuleKind: () => _w, + ModuleResolutionKind: () => NE, + ModuleSpecifierEnding: () => see, + NavigateTo: () => foe, + NavigationBar: () => doe, + NewLineKind: () => FQ, + NodeBuilderFlags: () => oQ, + NodeCheckFlags: () => OR, + NodeFactoryFlags: () => Nee, + NodeFlags: () => ER, + NodeResolutionFeatures: () => Yre, + ObjectFlags: () => LR, + OperationCanceledException: () => AE, + OperatorPrecedence: () => oK, + OrganizeImports: () => Sv, + OrganizeImportsMode: () => NV, + OuterExpressionKinds: () => UQ, + OutliningElementsCollector: () => SH, + OutliningSpanKind: () => zse, + OutputFileType: () => Wse, + PackageJsonAutoImportPreference: () => Fse, + PackageJsonDependencyGroup: () => Ose, + PatternMatchKind: () => GU, + PollingInterval: () => zR, + PollingWatchKind: () => NQ, + PragmaKindFlags: () => GQ, + PrivateIdentifierKind: () => Wee, + ProcessLevel: () => Wne, + ProgramUpdateLevel: () => Sie, + QuotePreference: () => hae, + RegularExpressionFlags: () => YX, + RelationComparisonResult: () => PR, + Rename: () => lL, + ScriptElementKind: () => qse, + ScriptElementKindModifier: () => Hse, + ScriptKind: () => RR, + ScriptSnapshot: () => NF, + ScriptTarget: () => LQ, + SemanticClassificationFormat: () => Mse, + SemanticMeaning: () => $se, + SemicolonPreference: () => OV, + SignatureCheckMode: () => $z, + SignatureFlags: () => MR, + SignatureHelp: () => WN, + SignatureInfo: () => Oie, + SignatureKind: () => SQ, + SmartSelectionRange: () => kH, + SnippetKind: () => BR, + StatisticType: () => xse, + StructureIsReused: () => NR, + SymbolAccessibility: () => uQ, + SymbolDisplay: () => D0, + SymbolDisplayPartKind: () => OF, + SymbolFlags: () => IR, + SymbolFormatFlags: () => lQ, + SyntaxKind: () => CR, + SyntheticSymbolKind: () => _Q, + Ternary: () => EQ, + ThrottledCancellationToken: () => xce, + TokenClass: () => Use, + TokenFlags: () => ZX, + TransformFlags: () => jR, + TypeFacts: () => Hz, + TypeFlags: () => FR, + TypeFormatFlags: () => cQ, + TypeMapKind: () => xQ, + TypePredicateKind: () => fQ, + TypeReferenceSerializationKind: () => pQ, + UnionReduction: () => iQ, + UpToDateStatusType: () => ise, + VarianceFlags: () => gQ, + Version: () => gd, + VersionRange: () => hI, + WatchDirectoryFlags: () => RQ, + WatchDirectoryKind: () => AQ, + WatchFileKind: () => wQ, + WatchLogLevel: () => xie, + WatchType: () => kl, + accessPrivateIdentifier: () => Fne, + addDisposableResourceHelper: () => gte, + addEmitFlags: () => cm, + addEmitHelper: () => ox, + addEmitHelpers: () => vh, + addInternalEmitFlags: () => sx, + addNodeFactoryPatcher: () => c0e, + addObjectAllocatorPatcher: () => Ghe, + addRange: () => Bn, + addRelatedInfo: () => Fs, + addSyntheticLeadingComment: () => X4, + addSyntheticTrailingComment: () => F5, + addToSeen: () => Kp, + advancedAsyncSuperHelper: () => j5, + affectsDeclarationPathOptionDeclarations: () => yre, + affectsEmitOptionDeclarations: () => hre, + allKeysStartWithDot: () => LO, + altDirectorySeparator: () => kI, + and: () => dI, + append: () => Tr, + appendIfUnique: () => sh, + arrayFrom: () => ts, + arrayIsEqualTo: () => md, + arrayIsHomogeneous: () => dee, + arrayIsSorted: () => nge, + arrayOf: () => xX, + arrayReverseIterator: () => aR, + arrayToMap: () => jk, + arrayToMultiMap: () => sw, + arrayToNumericMap: () => CX, + arraysEqual: () => rw, + assertType: () => _ge, + assign: () => I2, + assignHelper: () => Qee, + asyncDelegator: () => Zee, + asyncGeneratorHelper: () => Yee, + asyncSuperHelper: () => R5, + asyncValues: () => Kee, + attachFileToDiagnostics: () => QT, + awaitHelper: () => Q4, + awaiterHelper: () => tte, + base64decode: () => IK, + base64encode: () => NK, + binarySearch: () => Zh, + binarySearchKey: () => hT, + bindSourceFile: () => une, + breakIntoCharacterSpans: () => ioe, + breakIntoWordSpans: () => soe, + buildLinkParts: () => Eae, + buildOpts: () => vA, + buildOverload: () => $Pe, + bundlerModuleNameResolver: () => Zre, + canBeConvertedToAsync: () => KU, + canHaveDecorators: () => jb, + canHaveExportModifier: () => U3, + canHaveFlowNode: () => g3, + canHaveIllegalDecorators: () => rz, + canHaveIllegalModifiers: () => Zte, + canHaveIllegalType: () => F0e, + canHaveIllegalTypeParameters: () => Yte, + canHaveJSDoc: () => h3, + canHaveLocals: () => Vm, + canHaveModifiers: () => ed, + canHaveSymbol: () => vd, + canIncludeBindAndCheckDiagnsotics: () => V3, + canJsonReportNoInputFiles: () => gD, + canProduceDiagnostics: () => XO, + canUsePropertyAccess: () => fJ, + canWatchAffectingLocation: () => Xie, + canWatchAtTypes: () => $ie, + canWatchDirectoryOrFile: () => pF, + cartesianProduct: () => RX, + cast: () => Is, + chainBundle: () => Pd, + chainDiagnosticMessages: () => us, + changeAnyExtension: () => dw, + changeCompilerHostLikeToUseCache: () => LD, + changeExtension: () => by, + changeFullExtension: () => rY, + changesAffectModuleResolution: () => ZI, + changesAffectingProgramStructure: () => iZ, + characterToRegularExpressionFlag: () => KR, + childIsDecorated: () => a4, + classElementOrClassElementParameterIsDecorated: () => Yj, + classHasClassThisAssignment: () => lW, + classHasDeclaredOrExplicitlyAssignedName: () => uW, + classHasExplicitlyAssignedName: () => HO, + classOrConstructorParameterIsDecorated: () => c0, + classPrivateFieldGetHelper: () => pte, + classPrivateFieldInHelper: () => mte, + classPrivateFieldSetHelper: () => dte, + classicNameResolver: () => sne, + classifier: () => Dce, + cleanExtendedConfigCache: () => nF, + clear: () => bg, + clearMap: () => N_, + clearSharedExtendedConfigFileWatcher: () => xW, + climbPastPropertyAccess: () => MF, + climbPastPropertyOrElementAccess: () => Zse, + clone: () => EX, + cloneCompilerOptions: () => KV, + closeFileWatcher: () => Zp, + closeFileWatcherOf: () => _p, + codefix: () => vu, + collapseTextChangeRangesAcrossMultipleVersions: () => hY, + collectExternalModuleInfo: () => sW, + combine: () => gT, + combinePaths: () => Mn, + commandLineOptionOfCustomType: () => xre, + commentPragmas: () => SI, + commonOptionsWithBuild: () => dO, + commonPackageFolders: () => KK, + compact: () => iw, + compareBooleans: () => I1, + compareDataObjects: () => zB, + compareDiagnostics: () => N4, + compareDiagnosticsSkipRelatedInformation: () => r5, + compareEmitHelpers: () => Uee, + compareNumberOfDirectorySeparators: () => z3, + comparePaths: () => oh, + comparePathsCaseInsensitive: () => Fge, + comparePathsCaseSensitive: () => Oge, + comparePatternKeys: () => Wz, + compareProperties: () => OX, + compareStringsCaseInsensitive: () => ow, + compareStringsCaseInsensitiveEslintCompatible: () => wX, + compareStringsCaseSensitive: () => Kl, + compareStringsCaseSensitiveUI: () => cw, + compareTextSpans: () => fI, + compareValues: () => uo, + compileOnSaveCommandLineOption: () => fO, + compilerOptionsAffectDeclarationPath: () => YK, + compilerOptionsAffectEmit: () => QK, + compilerOptionsAffectSemanticDiagnostics: () => XK, + compilerOptionsDidYouMeanDiagnostics: () => yO, + compilerOptionsIndicateEsModules: () => aU, + compose: () => lge, + computeCommonSourceDirectoryOfFilenames: () => kie, + computeLineAndCharacterOfPosition: () => Vk, + computeLineOfPosition: () => ME, + computeLineStarts: () => kT, + computePositionOfLineAndCharacter: () => wI, + computeSignature: () => Wie, + computeSignatureWithDiagnostics: () => qW, + computeSuggestionDiagnostics: () => QU, + computedOptions: () => Kc, + concatenate: () => Hi, + concatenateDiagnosticMessageChains: () => qK, + configDirTemplateSubstitutionOptions: () => Sre, + configDirTemplateSubstitutionWatchOptions: () => Tre, + consumesNodeCoreModules: () => d9, + contains: () => ls, + containsIgnoredPath: () => W4, + containsObjectRestOrSpread: () => mA, + containsParseError: () => tC, + containsPath: () => Gp, + convertCompilerOptionsForTelemetry: () => Bre, + convertCompilerOptionsFromJson: () => Uye, + convertJsonOption: () => pS, + convertToBase64: () => AK, + convertToJson: () => TA, + convertToObject: () => Ire, + convertToOptionsWithAbsolutePaths: () => TO, + convertToRelativePath: () => FE, + convertToTSConfig: () => kz, + convertTypeAcquisitionFromJson: () => qye, + copyComments: () => vS, + copyEntries: () => KI, + copyLeadingComments: () => _6, + copyProperties: () => fR, + copyTrailingAsLeadingComments: () => mN, + copyTrailingComments: () => QD, + couldStartTrivia: () => oY, + countWhere: () => ty, + createAbstractBuilder: () => Hve, + createAccessorPropertyBackingField: () => sz, + createAccessorPropertyGetRedirector: () => are, + createAccessorPropertySetRedirector: () => ore, + createBaseNodeFactory: () => Eee, + createBinaryExpressionTrampoline: () => lO, + createBindingHelper: () => M5, + createBuildInfo: () => KO, + createBuilderProgram: () => HW, + createBuilderProgramUsingProgramBuildInfo: () => Hie, + createBuilderStatusReporter: () => TF, + createCacheWithRedirects: () => Fz, + createCacheableExportInfoMap: () => jU, + createCachedDirectoryStructureHost: () => tF, + createClassNamedEvaluationHelperBlock: () => zne, + createClassThisAssignmentBlock: () => Bne, + createClassifier: () => C2e, + createCommentDirectivesMap: () => uZ, + createCompilerDiagnostic: () => zo, + createCompilerDiagnosticForInvalidCustomType: () => kre, + createCompilerDiagnosticFromMessageChain: () => t5, + createCompilerHost: () => Cie, + createCompilerHostFromProgramHost: () => fV, + createCompilerHostWorker: () => iF, + createDetachedDiagnostic: () => XT, + createDiagnosticCollection: () => b4, + createDiagnosticForFileFromMessageChain: () => Hj, + createDiagnosticForNode: () => Xr, + createDiagnosticForNodeArray: () => nC, + createDiagnosticForNodeArrayFromMessageChain: () => Hw, + createDiagnosticForNodeFromMessageChain: () => wg, + createDiagnosticForNodeInSourceFile: () => rp, + createDiagnosticForRange: () => kZ, + createDiagnosticMessageChainFromDiagnostic: () => xZ, + createDiagnosticReporter: () => Fx, + createDocumentPositionMapper: () => Dne, + createDocumentRegistry: () => Gae, + createDocumentRegistryInternal: () => UU, + createEmitAndSemanticDiagnosticsBuilderProgram: () => QW, + createEmitHelperFactory: () => Vee, + createEmptyExports: () => cA, + createEvaluator: () => xee, + createExpressionForJsxElement: () => Ute, + createExpressionForJsxFragment: () => qte, + createExpressionForObjectLiteralElementLike: () => Hte, + createExpressionForPropertyName: () => QJ, + createExpressionFromEntityName: () => lA, + createExternalHelpersImportDeclarationIfNeeded: () => KJ, + createFileDiagnostic: () => xl, + createFileDiagnosticFromMessageChain: () => l7, + createFlowNode: () => Zm, + createForOfBindingStatement: () => XJ, + createFutureSourceFile: () => T9, + createGetCanonicalFileName: () => eu, + createGetIsolatedDeclarationErrors: () => _ie, + createGetSourceFile: () => PW, + createGetSymbolAccessibilityDiagnosticForNode: () => b0, + createGetSymbolAccessibilityDiagnosticForNodeName: () => uie, + createGetSymbolWalker: () => _ne, + createIncrementalCompilerHost: () => SF, + createIncrementalProgram: () => nse, + createJsxFactoryExpression: () => $J, + createLanguageService: () => kce, + createLanguageServiceSourceFile: () => J9, + createMemberAccessForPropertyName: () => _S, + createModeAwareCache: () => UC, + createModeAwareCacheKey: () => bD, + createModuleNotFoundChain: () => e7, + createModuleResolutionCache: () => qC, + createModuleResolutionLoader: () => MW, + createModuleResolutionLoaderUsingGlobalCache: () => Kie, + createModuleSpecifierResolutionHost: () => jx, + createMultiMap: () => Kf, + createNameResolver: () => hJ, + createNodeConverters: () => wee, + createNodeFactory: () => $3, + createOptionNameMap: () => gO, + createOverload: () => RH, + createPackageJsonImportFilter: () => f6, + createPackageJsonInfo: () => AU, + createParenthesizerRules: () => Dee, + createPatternMatcher: () => Zae, + createPrinter: () => Iy, + createPrinterWithDefaults: () => vie, + createPrinterWithRemoveComments: () => gS, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => bie, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => eF, + createProgram: () => UA, + createProgramHost: () => pV, + createPropertyNameNodeForIdentifierOrLiteral: () => C5, + createQueue: () => aw, + createRange: () => np, + createRedirectedBuilderProgram: () => XW, + createResolutionCache: () => ZW, + createRuntimeTypeSerializer: () => Gne, + createScanner: () => Eg, + createSemanticDiagnosticsBuilderProgram: () => qve, + createSet: () => pR, + createSolutionBuilder: () => cse, + createSolutionBuilderHost: () => ase, + createSolutionBuilderWithWatch: () => lse, + createSolutionBuilderWithWatchHost: () => ose, + createSortedArray: () => sR, + createSourceFile: () => Cx, + createSourceMapGenerator: () => Sne, + createSourceMapSource: () => f0e, + createSuperAccessVariableStatement: () => $O, + createSymbolTable: () => Ms, + createSymlinkCache: () => ZB, + createSyntacticTypeNodeBuilder: () => Ase, + createSystemWatchFunctions: () => KQ, + createTextChange: () => oN, + createTextChangeFromStartLength: () => QF, + createTextChangeRange: () => xw, + createTextRangeFromNode: () => rU, + createTextRangeFromSpan: () => XF, + createTextSpan: () => jl, + createTextSpanFromBounds: () => Mc, + createTextSpanFromNode: () => e_, + createTextSpanFromRange: () => Fy, + createTextSpanFromStringLiteralLikeContent: () => tU, + createTextWriter: () => P3, + createTokenRange: () => RB, + createTypeChecker: () => vne, + createTypeReferenceDirectiveResolutionCache: () => NO, + createTypeReferenceResolutionLoader: () => sF, + createWatchCompilerHost: () => rbe, + createWatchCompilerHostOfConfigFile: () => dV, + createWatchCompilerHostOfFilesAndCompilerOptions: () => mV, + createWatchFactory: () => _V, + createWatchHost: () => uV, + createWatchProgram: () => gV, + createWatchStatusReporter: () => eV, + createWriteFileMeasuringIO: () => wW, + declarationNameToString: () => ao, + decodeMappings: () => rW, + decodedTextSpanIntersectsWith: () => Tw, + decorateHelper: () => qee, + deduplicate: () => tb, + defaultIncludeSpec: () => Dz, + defaultInitCompilerOptions: () => hz, + defaultMaximumTruncationLength: () => KE, + diagnosticCategoryName: () => M2, + diagnosticToString: () => Gb, + diagnosticsEqualityComparer: () => n5, + directoryProbablyExists: () => Td, + directorySeparator: () => Oo, + displayPart: () => O_, + displayPartsToString: () => PN, + disposeEmitNodes: () => bJ, + disposeResourcesHelper: () => hte, + documentSpansEqual: () => pU, + dumpTracingLegend: () => XX, + elementAt: () => ny, + elideNodes: () => sre, + emitComments: () => vK, + emitDetachedComments: () => bK, + emitFiles: () => SW, + emitFilesAndReportErrors: () => hF, + emitFilesAndReportErrorsAndGetExitStatus: () => lV, + emitModuleKindIsNonNodeESM: () => s5, + emitNewLineBeforeLeadingCommentOfPosition: () => yK, + emitNewLineBeforeLeadingComments: () => gK, + emitNewLineBeforeLeadingCommentsOfPosition: () => hK, + emitResolverSkipsTypeChecking: () => bW, + emitSkippedWithNoDiagnostics: () => WW, + emptyArray: () => He, + emptyFileSystemEntries: () => iJ, + emptyMap: () => YM, + emptyOptions: () => Bp, + emptySet: () => tge, + endsWith: () => nc, + ensurePathIsNonModuleName: () => j2, + ensureScriptKind: () => m5, + ensureTrailingDirectorySeparator: () => bl, + entityNameToString: () => Y_, + enumerateInsertsAndDeletes: () => gI, + equalOwnProperties: () => kX, + equateStringsCaseInsensitive: () => N1, + equateStringsCaseSensitive: () => O2, + equateValues: () => Kh, + esDecorateHelper: () => $ee, + escapeJsxAttributeString: () => TB, + escapeLeadingUnderscores: () => Ko, + escapeNonAsciiString: () => L7, + escapeSnippetText: () => Db, + escapeString: () => $m, + escapeTemplateSubstitution: () => bB, + evaluatorResult: () => pl, + every: () => Ri, + executeCommandLine: () => Rbe, + expandPreOrPostfixIncrementOrDecrementExpression: () => nO, + explainFiles: () => iV, + explainIfFileIsRedirectAndImpliedFormat: () => sV, + exportAssignmentIsAlias: () => pC, + exportStarHelper: () => fte, + expressionResultIsUnused: () => gee, + extend: () => _I, + extendsHelper: () => rte, + extensionFromPath: () => R4, + extensionIsTS: () => S5, + extensionsNotSupportingExtensionlessResolution: () => v5, + externalHelpersModuleNameText: () => z1, + factory: () => N, + fileExtensionIs: () => Go, + fileExtensionIsOneOf: () => Lc, + fileIncludeReasonToDiagnostics: () => cV, + fileShouldUseJavaScriptRequire: () => RU, + filter: () => Ln, + filterMutate: () => eR, + filterSemanticDiagnostics: () => lF, + find: () => Nn, + findAncestor: () => sr, + findBestPatternMatch: () => yR, + findChildOfKind: () => Ya, + findComputedPropertyNameCacheAssignment: () => uO, + findConfigFile: () => EW, + findConstructorDeclaration: () => G3, + findContainingList: () => zF, + findDiagnosticForNode: () => jae, + findFirstNonJsxWhitespaceToken: () => nae, + findIndex: () => rc, + findLast: () => eb, + findLastIndex: () => cI, + findListItemInfo: () => rae, + findMap: () => rge, + findModifier: () => c6, + findNextToken: () => qb, + findPackageJson: () => Mae, + findPackageJsons: () => wU, + findPrecedingMatchingToken: () => GF, + findPrecedingToken: () => sl, + findSuperStatementIndexPath: () => VO, + findTokenOnLeftOfPosition: () => UF, + findUseStrictPrologue: () => ZJ, + first: () => fa, + firstDefined: () => xc, + firstDefinedIterator: () => tw, + firstIterator: () => cR, + firstOrOnly: () => FU, + firstOrUndefined: () => ul, + firstOrUndefinedIterator: () => lI, + fixupCompilerOptions: () => eq, + flatMap: () => Xs, + flatMapIterator: () => tR, + flatMapToMutable: () => vE, + flatten: () => Ep, + flattenCommaList: () => cre, + flattenDestructuringAssignment: () => mS, + flattenDestructuringBinding: () => zb, + flattenDiagnosticMessageText: () => gm, + forEach: () => rr, + forEachAncestor: () => sZ, + forEachAncestorDirectory: () => $p, + forEachChild: () => gs, + forEachChildRecursively: () => kx, + forEachEmittedFile: () => gW, + forEachEnclosingBlockScopeContainer: () => bZ, + forEachEntry: () => Dl, + forEachExternalModuleToImportFrom: () => JU, + forEachImportClauseDeclaration: () => XZ, + forEachKey: () => uh, + forEachLeadingCommentRange: () => hw, + forEachNameInAccessChainWalkingLeft: () => JK, + forEachNameOfDefaultExport: () => zU, + forEachPropertyAssignment: () => aC, + forEachResolvedProjectReference: () => jW, + forEachReturnStatement: () => o0, + forEachRight: () => dX, + forEachTrailingCommentRange: () => yw, + forEachTsConfigPropArray: () => Yw, + forEachUnique: () => mU, + forEachYieldExpression: () => AZ, + forSomeAncestorDirectory: () => qhe, + formatColorAndReset: () => Wb, + formatDiagnostic: () => AW, + formatDiagnostics: () => xve, + formatDiagnosticsWithColorAndContext: () => wie, + formatGeneratedName: () => sv, + formatGeneratedNamePart: () => JC, + formatLocation: () => NW, + formatMessage: () => YT, + formatStringFromArgs: () => Og, + formatting: () => Hc, + fullTripleSlashAMDReferencePathRegEx: () => wZ, + fullTripleSlashReferencePathRegEx: () => PZ, + generateDjb2Hash: () => IE, + generateTSConfig: () => Fre, + generatorHelper: () => lte, + getAdjustedReferenceLocation: () => GV, + getAdjustedRenameLocation: () => VF, + getAliasDeclarationFromName: () => lB, + getAllAccessorDeclarations: () => gy, + getAllDecoratorsOfClass: () => oW, + getAllDecoratorsOfClassElement: () => qO, + getAllJSDocTags: () => RI, + getAllJSDocTagsOfKind: () => rhe, + getAllKeys: () => sge, + getAllProjectOutputs: () => ZO, + getAllSuperTypeNodes: () => d4, + getAllowJSCompilerOption: () => yy, + getAllowSyntheticDefaultImports: () => ZT, + getAncestor: () => $1, + getAnyExtensionFromPath: () => Wk, + getAreDeclarationMapsEnabled: () => i5, + getAssignedExpandoInitializer: () => MT, + getAssignedName: () => LI, + getAssignedNameOfIdentifier: () => AD, + getAssignmentDeclarationKind: () => mc, + getAssignmentDeclarationPropertyAccessKind: () => _3, + getAssignmentTargetKind: () => G1, + getAutomaticTypeDirectiveNames: () => wO, + getBaseFileName: () => Wc, + getBinaryOperatorPrecedence: () => E3, + getBuildInfo: () => TW, + getBuildInfoFileVersionMap: () => $W, + getBuildInfoText: () => hie, + getBuildOrderFromAnyBuildOrder: () => $A, + getBuilderCreationParameters: () => _F, + getBuilderFileEmit: () => Oy, + getCanonicalDiagnostic: () => CZ, + getCheckFlags: () => gc, + getClassExtendsHeritageElement: () => vb, + getClassLikeDeclarationOfSymbol: () => gh, + getCombinedLocalAndExportSymbolFlags: () => TC, + getCombinedModifierFlags: () => L1, + getCombinedNodeFlags: () => ch, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => sj, + getCommentRange: () => lm, + getCommonSourceDirectory: () => FD, + getCommonSourceDirectoryOfConfig: () => Ox, + getCompilerOptionValue: () => c5, + getCompilerOptionsDiffValue: () => Ore, + getConditions: () => Ay, + getConfigFileParsingDiagnostics: () => Vb, + getConstantValue: () => Lee, + getContainerFlags: () => Uz, + getContainerNode: () => yS, + getContainingClass: () => Nl, + getContainingClassExcludingClassDecorators: () => h7, + getContainingClassStaticBlock: () => JZ, + getContainingFunction: () => yf, + getContainingFunctionDeclaration: () => BZ, + getContainingFunctionOrClassStaticBlock: () => g7, + getContainingNodeArray: () => hee, + getContainingObjectLiteralElement: () => wN, + getContextualTypeFromParent: () => a9, + getContextualTypeFromParentOrAncestorTypeNode: () => WF, + getCurrentTime: () => GA, + getDeclarationDiagnostics: () => fie, + getDeclarationEmitExtensionForPath: () => j7, + getDeclarationEmitOutputFilePath: () => _K, + getDeclarationEmitOutputFilePathWorker: () => R7, + getDeclarationFileExtension: () => lz, + getDeclarationFromName: () => p4, + getDeclarationModifierFlagsFromSymbol: () => sp, + getDeclarationOfKind: () => Jo, + getDeclarationsOfKind: () => rZ, + getDeclaredExpandoInitializer: () => l4, + getDecorators: () => cy, + getDefaultCompilerOptions: () => B9, + getDefaultFormatCodeSettings: () => IF, + getDefaultLibFileName: () => bw, + getDefaultLibFilePath: () => Cce, + getDefaultLikeExportInfo: () => x9, + getDefaultLikeExportNameFromDeclaration: () => g9, + getDiagnosticText: () => g_, + getDiagnosticsWithinSpan: () => Bae, + getDirectoryPath: () => Xn, + getDirectoryToWatchFailedLookupLocation: () => YW, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => Yie, + getDocumentPositionMapper: () => XU, + getDocumentSpansEqualityComparer: () => dU, + getESModuleInterop: () => Fg, + getEditsForFileRename: () => Xae, + getEffectiveBaseTypeNode: () => tm, + getEffectiveConstraintOfTypeParameter: () => $k, + getEffectiveContainerForJSDocTemplateTag: () => A7, + getEffectiveImplementsTypeNodes: () => dC, + getEffectiveInitializer: () => o3, + getEffectiveJSDocHost: () => H1, + getEffectiveModifierFlags: () => Au, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => kK, + getEffectiveModifierFlagsNoCache: () => CK, + getEffectiveReturnTypeNode: () => K_, + getEffectiveSetAccessorTypeAnnotationNode: () => mK, + getEffectiveTypeAnnotationNode: () => Vc, + getEffectiveTypeParameterDeclarations: () => ly, + getEffectiveTypeRoots: () => vD, + getElementOrPropertyAccessArgumentExpressionOrName: () => w7, + getElementOrPropertyAccessName: () => _h, + getElementsOfBindingOrAssignmentPattern: () => BC, + getEmitDeclarations: () => op, + getEmitFlags: () => ua, + getEmitHelpers: () => L5, + getEmitModuleDetectionKind: () => HK, + getEmitModuleKind: () => Nu, + getEmitModuleResolutionKind: () => Hu, + getEmitScriptTarget: () => pa, + getEmitStandardClassFields: () => QB, + getEnclosingBlockScopeContainer: () => bd, + getEnclosingContainer: () => c7, + getEncodedSemanticClassifications: () => WU, + getEncodedSyntacticClassifications: () => VU, + getEndLinePosition: () => zw, + getEntityNameFromTypeNode: () => e3, + getEntrypointsFromPackageJsonInfo: () => Bz, + getErrorCountForSummary: () => mF, + getErrorSpanForNode: () => H2, + getErrorSummaryText: () => rV, + getEscapedTextOfIdentifierOrLiteral: () => h4, + getEscapedTextOfJsxAttributeName: () => H4, + getEscapedTextOfJsxNamespacedName: () => rx, + getExpandoInitializer: () => U1, + getExportAssignmentExpression: () => uB, + getExportInfoMap: () => SN, + getExportNeedsImportStarHelper: () => Pne, + getExpressionAssociativity: () => hB, + getExpressionPrecedence: () => v4, + getExternalHelpersModuleName: () => aO, + getExternalModuleImportEqualsDeclarationExpression: () => o4, + getExternalModuleName: () => RT, + getExternalModuleNameFromDeclaration: () => lK, + getExternalModuleNameFromPath: () => CB, + getExternalModuleNameLiteral: () => xx, + getExternalModuleRequireArgument: () => Kj, + getFallbackOptions: () => JA, + getFileEmitOutput: () => Iie, + getFileMatcherPatterns: () => d5, + getFileNamesFromConfigSpecs: () => hD, + getFileWatcherEventKind: () => UR, + getFilesInErrorForSummary: () => gF, + getFirstConstructorWithBody: () => Ng, + getFirstIdentifier: () => tf, + getFirstNonSpaceCharacterPosition: () => wae, + getFirstProjectOutput: () => vW, + getFixableErrorSpanExpression: () => IU, + getFormatCodeSettingsForWriting: () => b9, + getFullWidth: () => Jw, + getFunctionFlags: () => jc, + getHeritageClause: () => T3, + getHostSignatureFromJSDoc: () => q1, + getIdentifierAutoGenerate: () => m0e, + getIdentifierGeneratedImportReference: () => zee, + getIdentifierTypeArguments: () => tS, + getImmediatelyInvokedFunctionExpression: () => db, + getImpliedNodeFormatForFile: () => VA, + getImpliedNodeFormatForFileWorker: () => cF, + getImportNeedsImportDefaultHelper: () => iW, + getImportNeedsImportStarHelper: () => zO, + getIndentSize: () => yC, + getIndentString: () => M7, + getInferredLibraryNameResolveFrom: () => oF, + getInitializedVariables: () => P4, + getInitializerOfBinaryExpression: () => rB, + getInitializerOfBindingOrAssignmentElement: () => fA, + getInterfaceBaseTypeNodes: () => m4, + getInternalEmitFlags: () => Qp, + getInvokedExpression: () => b7, + getIsolatedModules: () => ap, + getJSDocAugmentsTag: () => DY, + getJSDocClassTag: () => cj, + getJSDocCommentRanges: () => $j, + getJSDocCommentsAndTags: () => iB, + getJSDocDeprecatedTag: () => lj, + getJSDocDeprecatedTagNoCache: () => FY, + getJSDocEnumTag: () => uj, + getJSDocHost: () => hb, + getJSDocImplementsTags: () => PY, + getJSDocOverloadTags: () => aB, + getJSDocOverrideTagNoCache: () => OY, + getJSDocParameterTags: () => Gk, + getJSDocParameterTagsNoCache: () => xY, + getJSDocPrivateTag: () => Yge, + getJSDocPrivateTagNoCache: () => AY, + getJSDocProtectedTag: () => Zge, + getJSDocProtectedTagNoCache: () => NY, + getJSDocPublicTag: () => Qge, + getJSDocPublicTagNoCache: () => wY, + getJSDocReadonlyTag: () => Kge, + getJSDocReadonlyTagNoCache: () => IY, + getJSDocReturnTag: () => LY, + getJSDocReturnType: () => Cw, + getJSDocRoot: () => fC, + getJSDocSatisfiesExpressionType: () => dJ, + getJSDocSatisfiesTag: () => _j, + getJSDocTags: () => j1, + getJSDocTagsNoCache: () => the, + getJSDocTemplateTag: () => ehe, + getJSDocThisTag: () => MI, + getJSDocType: () => R1, + getJSDocTypeAliasName: () => tz, + getJSDocTypeAssertionType: () => fD, + getJSDocTypeParameterDeclarations: () => V7, + getJSDocTypeParameterTags: () => kY, + getJSDocTypeParameterTagsNoCache: () => CY, + getJSDocTypeTag: () => M1, + getJSXImplicitImportBase: () => u5, + getJSXRuntimeImport: () => _5, + getJSXTransformEnabled: () => l5, + getKeyForCompilerOptions: () => Oz, + getLanguageVariant: () => R3, + getLastChild: () => WB, + getLeadingCommentRanges: () => kg, + getLeadingCommentRangesOfNode: () => Gj, + getLeftmostAccessExpression: () => xC, + getLeftmostExpression: () => kC, + getLibraryNameFromLibFileName: () => BW, + getLineAndCharacterOfPosition: () => Vs, + getLineInfo: () => tW, + getLineOfLocalPosition: () => S4, + getLineOfLocalPositionFromLineMap: () => K2, + getLineStartPositionForPosition: () => Jp, + getLineStarts: () => Tg, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => RK, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => MK, + getLinesBetweenPositions: () => RE, + getLinesBetweenRangeEndAndRangeStart: () => jB, + getLinesBetweenRangeEndPositions: () => Uhe, + getLiteralText: () => fZ, + getLocalNameForExternalImport: () => jC, + getLocalSymbolForExportDefault: () => C4, + getLocaleSpecificMessage: () => as, + getLocaleTimeString: () => HA, + getMappedContextSpan: () => gU, + getMappedDocumentSpan: () => r9, + getMappedLocation: () => GD, + getMatchedFileSpec: () => aV, + getMatchedIncludeSpec: () => oV, + getMeaningFromDeclaration: () => FF, + getMeaningFromLocation: () => hS, + getMembersOfDeclaration: () => NZ, + getModeForFileReference: () => zA, + getModeForResolutionAtIndex: () => Aie, + getModeForUsageLocation: () => OW, + getModifiedTime: () => TT, + getModifiers: () => sb, + getModuleInstanceState: () => Ch, + getModuleNameStringLiteralAt: () => qA, + getModuleSpecifierEndingPreference: () => oee, + getModuleSpecifierResolverHost: () => oU, + getNameForExportedSymbol: () => m9, + getNameFromImportAttribute: () => w5, + getNameFromIndexInfo: () => SZ, + getNameFromPropertyName: () => lN, + getNameOfAccessExpression: () => UB, + getNameOfCompilerOptionValue: () => Cz, + getNameOfDeclaration: () => es, + getNameOfExpando: () => eB, + getNameOfJSDocTypedef: () => TY, + getNameOfScriptTarget: () => o5, + getNameOrArgument: () => u3, + getNameTable: () => Cq, + getNamesForExportedSymbol: () => Jae, + getNamespaceDeclarationNode: () => uC, + getNewLineCharacter: () => d0, + getNewLineKind: () => bN, + getNewLineOrDefaultFromHost: () => k0, + getNewTargetContainer: () => WZ, + getNextJSDocCommentLocation: () => sB, + getNodeChildren: () => HJ, + getNodeForGeneratedName: () => dA, + getNodeId: () => ja, + getNodeKind: () => Ub, + getNodeModifiers: () => UD, + getNodeModulePathParts: () => E5, + getNonAssignedNameOfDeclaration: () => FI, + getNonAssignmentOperatorForCompoundAssignment: () => DD, + getNonAugmentationDeclaration: () => Jj, + getNonDecoratorTokenPosOfNode: () => Fj, + getNormalizedAbsolutePath: () => Xi, + getNormalizedAbsolutePathWithoutRoot: () => $R, + getNormalizedPathComponents: () => pw, + getObjectFlags: () => wn, + getOperator: () => vB, + getOperatorAssociativity: () => yB, + getOperatorPrecedence: () => C3, + getOptionFromName: () => vz, + getOptionsForLibraryResolution: () => Lz, + getOptionsNameMap: () => WC, + getOrCreateEmitNode: () => nu, + getOrCreateExternalHelpersModuleNameIfNeeded: () => Qte, + getOrUpdate: () => bE, + getOriginalNode: () => Zo, + getOriginalNodeId: () => Ku, + getOriginalSourceFile: () => Ohe, + getOutputDeclarationFileName: () => YC, + getOutputDeclarationFileNameWorker: () => hW, + getOutputExtension: () => YO, + getOutputFileNames: () => Sve, + getOutputJSFileNameWorker: () => yW, + getOutputPathsFor: () => OD, + getOutputPathsForBundle: () => QO, + getOwnEmitOutputFilePath: () => uK, + getOwnKeys: () => Gd, + getOwnValues: () => yT, + getPackageJsonInfo: () => _v, + getPackageJsonTypesVersionsPaths: () => PO, + getPackageJsonsVisibleToFile: () => Rae, + getPackageNameFromTypesPackageName: () => xD, + getPackageScopeForPath: () => TD, + getParameterSymbolFromJSDoc: () => y3, + getParameterTypeNode: () => a0e, + getParentNodeInSpan: () => _N, + getParseTreeNode: () => Ki, + getParsedCommandLineOfConfigFile: () => bA, + getPathComponents: () => vl, + getPathComponentsRelativeTo: () => YR, + getPathFromPathComponents: () => ah, + getPathUpdater: () => HU, + getPathsBasePath: () => B7, + getPatternFromSpec: () => ree, + getPendingEmitKind: () => t6, + getPositionOfLineAndCharacter: () => mw, + getPossibleGenericSignatures: () => XV, + getPossibleOriginalInputExtensionForExtension: () => fK, + getPossibleTypeArgumentsInfo: () => QV, + getPreEmitDiagnostics: () => Tve, + getPrecedingNonSpaceCharacterPosition: () => i9, + getPrivateIdentifier: () => cW, + getProperties: () => aW, + getProperty: () => uI, + getPropertyArrayElementValue: () => jZ, + getPropertyAssignmentAliasLikeExpression: () => rK, + getPropertyNameForPropertyNameNode: () => Y2, + getPropertyNameForUniqueESSymbol: () => Nhe, + getPropertyNameFromType: () => Lp, + getPropertyNameOfBindingOrAssignmentElement: () => ez, + getPropertySymbolFromBindingElement: () => t9, + getPropertySymbolsFromContextualType: () => z9, + getQuoteFromPreference: () => lU, + getQuotePreference: () => Rf, + getRangesWhere: () => iR, + getRefactorContextSpan: () => Bx, + getReferencedFileLocation: () => RD, + getRegexFromPattern: () => vy, + getRegularExpressionForWildcard: () => O4, + getRegularExpressionsForWildcards: () => f5, + getRelativePathFromDirectory: () => hd, + getRelativePathFromFile: () => LE, + getRelativePathToDirectoryOrUrl: () => xT, + getRenameLocation: () => dN, + getReplacementSpanForContextToken: () => eU, + getResolutionDiagnostic: () => UW, + getResolutionModeOverride: () => ZC, + getResolveJsonModule: () => kb, + getResolvePackageJsonExports: () => $B, + getResolvePackageJsonImports: () => XB, + getResolvedExternalModuleName: () => kB, + getRestIndicatorOfBindingOrAssignmentElement: () => oO, + getRestParameterElementType: () => Xj, + getRightMostAssignedExpression: () => c3, + getRootDeclaration: () => nm, + getRootDirectoryOfResolutionCache: () => Zie, + getRootLength: () => zm, + getRootPathSplitLength: () => Qve, + getScriptKind: () => SU, + getScriptKindFromFileName: () => g5, + getScriptTargetFeatures: () => Lj, + getSelectedEffectiveModifierFlags: () => UT, + getSelectedSyntacticModifierFlags: () => TK, + getSemanticClassifications: () => qae, + getSemanticJsxChildren: () => gC, + getSetAccessorTypeAnnotationNode: () => pK, + getSetAccessorValueParameter: () => bC, + getSetExternalModuleIndicator: () => j3, + getShebang: () => NI, + getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => nB, + getSingleVariableOfVariableStatement: () => JT, + getSnapshotText: () => Rx, + getSnippetElement: () => SJ, + getSourceFileOfModule: () => r7, + getSourceFileOfNode: () => xr, + getSourceFilePathInNewDir: () => z7, + getSourceFilePathInNewDirWorker: () => W7, + getSourceFileVersionAsHashFromText: () => yF, + getSourceFilesToEmit: () => J7, + getSourceMapRange: () => g0, + getSourceMapper: () => ooe, + getSourceTextOfNodeFromSourceFile: () => ub, + getSpanOfTokenAtPosition: () => Hm, + getSpellingSuggestion: () => F2, + getStartPositionOfLine: () => dy, + getStartPositionOfRange: () => D4, + getStartsOnNewLine: () => $4, + getStaticPropertiesAndClassStaticBlock: () => UO, + getStrictOptionValue: () => Iu, + getStringComparer: () => Bk, + getSubPatternFromSpec: () => p5, + getSuperCallFromStatement: () => WO, + getSuperContainer: () => Zw, + getSupportedCodeFixes: () => xq, + getSupportedExtensions: () => L4, + getSupportedExtensionsWithJsonIfResolveJsonModule: () => J3, + getSwitchedType: () => EU, + getSymbolId: () => $s, + getSymbolNameForPrivateIdentifier: () => x3, + getSymbolParentOrFail: () => h9, + getSymbolTarget: () => TU, + getSyntacticClassifications: () => Hae, + getSyntacticModifierFlags: () => f0, + getSyntacticModifierFlagsNoCache: () => AB, + getSynthesizedDeepClone: () => qa, + getSynthesizedDeepCloneWithReplacements: () => pN, + getSynthesizedDeepClones: () => Hb, + getSynthesizedDeepClonesWithReplacements: () => xU, + getSyntheticLeadingComments: () => PC, + getSyntheticTrailingComments: () => Z3, + getTargetLabel: () => RF, + getTargetOfBindingOrAssignmentElement: () => wy, + getTemporaryModuleResolutionState: () => SD, + getTextOfConstantValue: () => pZ, + getTextOfIdentifierOrLiteral: () => Ip, + getTextOfJSDocComment: () => Dw, + getTextOfJsxAttributeName: () => H3, + getTextOfJsxNamespacedName: () => G4, + getTextOfNode: () => sc, + getTextOfNodeFromSourceText: () => r4, + getTextOfPropertyName: () => OT, + getThisContainer: () => Uu, + getThisParameter: () => bb, + getTokenAtPosition: () => Ei, + getTokenPosOfNode: () => W1, + getTokenSourceMapRange: () => p0e, + getTouchingPropertyName: () => h_, + getTouchingToken: () => a6, + getTrailingCommentRanges: () => oy, + getTrailingSemicolonDeferringWriter: () => xB, + getTransformFlagsSubtreeExclusions: () => Iee, + getTransformers: () => mie, + getTsBuildInfoEmitOutputFilePath: () => S0, + getTsConfigObjectLiteralExpression: () => s4, + getTsConfigPropArrayElementValue: () => m7, + getTypeAnnotationNode: () => dK, + getTypeArgumentOrTypeParameterList: () => _ae, + getTypeKeywordOfTypeOnlyImport: () => fU, + getTypeNode: () => Bee, + getTypeNodeIfAccessible: () => ZD, + getTypeParameterFromJsDoc: () => QZ, + getTypeParameterOwner: () => Hge, + getTypesPackageName: () => MO, + getUILocale: () => NX, + getUniqueName: () => bS, + getUniqueSymbolId: () => Pae, + getUseDefineForClassFields: () => B3, + getWatchErrorSummaryDiagnosticMessage: () => tV, + getWatchFactory: () => CW, + group: () => TE, + groupBy: () => _R, + guessIndentation: () => eZ, + handleNoEmitOptions: () => VW, + handleWatchOptionsConfigDirTemplateSubstitution: () => xO, + hasAbstractModifier: () => xb, + hasAccessorModifier: () => im, + hasAmbientModifier: () => wB, + hasChangesInResolutions: () => Nj, + hasChildOfKind: () => iN, + hasContextSensitiveParameters: () => k5, + hasDecorators: () => wf, + hasDocComment: () => lae, + hasDynamicName: () => ph, + hasEffectiveModifier: () => ef, + hasEffectiveModifiers: () => PB, + hasEffectiveReadonlyModifier: () => T4, + hasExtension: () => zk, + hasIndexSignature: () => CU, + hasInferredType: () => Cee, + hasInitializer: () => i0, + hasInvalidEscape: () => SB, + hasJSDocNodes: () => gf, + hasJSDocParameterTags: () => EY, + hasJSFileExtension: () => Lg, + hasJsonModuleEmitEnabled: () => a5, + hasOnlyExpressionInitializer: () => U2, + hasOverrideModifier: () => U7, + hasPossibleExternalModuleReference: () => vZ, + hasProperty: () => io, + hasPropertyAccessExpressionWithName: () => KA, + hasQuestionToken: () => BT, + hasRecordedExternalHelpers: () => Xte, + hasResolutionModeOverride: () => Tee, + hasRestParameter: () => Dj, + hasScopeMarker: () => HY, + hasStaticModifier: () => Uc, + hasSyntacticModifier: () => Vn, + hasSyntacticModifiers: () => SK, + hasTSFileExtension: () => ex, + hasTabstop: () => vee, + hasTrailingDirectorySeparator: () => e0, + hasType: () => XI, + hasTypeArguments: () => Ehe, + hasZeroOrOneAsteriskCharacter: () => YB, + helperString: () => kJ, + hostGetCanonicalFileName: () => _0, + hostUsesCaseSensitiveFileNames: () => vC, + idText: () => dn, + identifierIsThisKeyword: () => DB, + identifierToKeywordKind: () => B2, + identity: () => lo, + identitySourceMapConsumer: () => nW, + ignoreSourceNewlines: () => xJ, + ignoredPaths: () => xI, + importDefaultHelper: () => _te, + importFromModuleSpecifier: () => _4, + importStarHelper: () => CJ, + indexOfAnyCharCode: () => gX, + indexOfNode: () => rC, + indicesOf: () => nw, + inferredTypesContainingFile: () => MD, + injectClassNamedEvaluationHelperBlockIfMissing: () => GO, + injectClassThisAssignmentIfMissing: () => Jne, + insertImports: () => _U, + insertLeadingStatement: () => A0e, + insertSorted: () => ry, + insertStatementAfterCustomPrologue: () => q2, + insertStatementAfterStandardPrologue: () => hhe, + insertStatementsAfterCustomPrologue: () => Ij, + insertStatementsAfterStandardPrologue: () => Pg, + intersperse: () => KM, + intrinsicTagNameToString: () => mJ, + introducesArgumentsExoticObject: () => LZ, + inverseJsxOptionMap: () => yA, + isAbstractConstructorSymbol: () => jK, + isAbstractModifier: () => xte, + isAccessExpression: () => go, + isAccessibilityModifier: () => ZV, + isAccessor: () => _y, + isAccessorModifier: () => Cte, + isAliasSymbolDeclaration: () => Phe, + isAliasableExpression: () => S3, + isAmbientModule: () => wu, + isAmbientPropertyDeclaration: () => Wj, + isAnonymousFunctionDefinition: () => y4, + isAnyDirectorySeparator: () => qR, + isAnyImportOrBareOrAccessedRequire: () => hZ, + isAnyImportOrReExport: () => Uw, + isAnyImportOrRequireStatement: () => yZ, + isAnyImportSyntax: () => IT, + isAnySupportedFileExtension: () => i0e, + isApplicableVersionedTypesKey: () => DA, + isArgumentExpressionOfElementAccess: () => zV, + isArray: () => ss, + isArrayBindingElement: () => VI, + isArrayBindingOrAssignmentElement: () => Fw, + isArrayBindingOrAssignmentPattern: () => Sj, + isArrayBindingPattern: () => v0, + isArrayLiteralExpression: () => Wl, + isArrayLiteralOrObjectLiteralDestructuringPattern: () => x0, + isArrayTypeNode: () => iA, + isArrowFunction: () => xo, + isAsExpression: () => tD, + isAssertClause: () => Nte, + isAssertEntry: () => T0e, + isAssertionExpression: () => J1, + isAssertsKeyword: () => Ste, + isAssignmentDeclaration: () => c4, + isAssignmentExpression: () => Tl, + isAssignmentOperator: () => dh, + isAssignmentPattern: () => YE, + isAssignmentTarget: () => u0, + isAsteriskToken: () => tA, + isAsyncFunction: () => g4, + isAsyncModifier: () => Z4, + isAutoAccessorPropertyDeclaration: () => u_, + isAwaitExpression: () => Cy, + isAwaitKeyword: () => AJ, + isBigIntLiteral: () => eA, + isBinaryExpression: () => cn, + isBinaryOperatorToken: () => ire, + isBindableObjectDefinePropertyCall: () => X2, + isBindableStaticAccessExpression: () => gb, + isBindableStaticElementAccessExpression: () => P7, + isBindableStaticNameExpression: () => Q2, + isBindingElement: () => da, + isBindingElementOfBareOrAccessedRequire: () => qZ, + isBindingName: () => W2, + isBindingOrAssignmentElement: () => zY, + isBindingOrAssignmentPattern: () => Iw, + isBindingPattern: () => Ts, + isBlock: () => ms, + isBlockLike: () => d6, + isBlockOrCatchScoped: () => Mj, + isBlockScope: () => Vj, + isBlockScopedContainerTopLevel: () => gZ, + isBooleanLiteral: () => QE, + isBreakOrContinueStatement: () => qE, + isBreakStatement: () => v0e, + isBuild: () => kse, + isBuildInfoFile: () => gie, + isBuilderProgram: () => tse, + isBundle: () => Fte, + isCallChain: () => J2, + isCallExpression: () => Es, + isCallExpressionTarget: () => LV, + isCallLikeExpression: () => lb, + isCallLikeOrFunctionLikeExpression: () => Tj, + isCallOrNewExpression: () => Qd, + isCallOrNewExpressionTarget: () => MV, + isCallSignatureDeclaration: () => px, + isCallToHelper: () => Y4, + isCaseBlock: () => aD, + isCaseClause: () => OC, + isCaseKeyword: () => Ete, + isCaseOrDefaultClause: () => GI, + isCatchClause: () => Rb, + isCatchClauseVariableDeclaration: () => yee, + isCatchClauseVariableDeclarationOrBindingElement: () => Rj, + isCheckJsEnabledForFile: () => j4, + isChildOfNodeWithKind: () => vhe, + isCircularBuildOrder: () => Lx, + isClassDeclaration: () => rl, + isClassElement: () => fl, + isClassExpression: () => tl, + isClassInstanceProperty: () => BY, + isClassLike: () => Qn, + isClassMemberModifier: () => yj, + isClassNamedEvaluationHelperBlock: () => Ix, + isClassOrTypeElement: () => WI, + isClassStaticBlockDeclaration: () => ac, + isClassThisAssignmentBlock: () => wD, + isCollapsedRange: () => Vhe, + isColonToken: () => vte, + isCommaExpression: () => uA, + isCommaListExpression: () => nD, + isCommaSequence: () => _D, + isCommaToken: () => yte, + isComment: () => $F, + isCommonJsExportPropertyAssignment: () => p7, + isCommonJsExportedExpression: () => OZ, + isCompoundAssignment: () => ED, + isComputedNonLiteralName: () => qw, + isComputedPropertyName: () => oa, + isConciseBody: () => qI, + isConditionalExpression: () => yx, + isConditionalTypeNode: () => Ab, + isConstAssertion: () => gJ, + isConstTypeReference: () => yd, + isConstructSignatureDeclaration: () => nA, + isConstructorDeclaration: () => ec, + isConstructorTypeNode: () => wC, + isContextualKeyword: () => I7, + isContinueStatement: () => y0e, + isCustomPrologue: () => Qw, + isDebuggerStatement: () => b0e, + isDeclaration: () => tu, + isDeclarationBindingElement: () => Nw, + isDeclarationFileName: () => Ol, + isDeclarationName: () => Gm, + isDeclarationNameOfEnumOrNamespace: () => BB, + isDeclarationReadonly: () => Gw, + isDeclarationStatement: () => QY, + isDeclarationWithTypeParameterChildren: () => qj, + isDeclarationWithTypeParameters: () => Uj, + isDecorator: () => dl, + isDecoratorTarget: () => Qse, + isDefaultClause: () => cD, + isDefaultImport: () => jT, + isDefaultModifier: () => W5, + isDefaultedExpandoInitializer: () => HZ, + isDeleteExpression: () => Pte, + isDeleteTarget: () => cB, + isDeprecatedDeclaration: () => y9, + isDestructuringAssignment: () => p0, + isDiagnosticWithLocation: () => NU, + isDiskPathRoot: () => HR, + isDoStatement: () => h0e, + isDocumentRegistryEntry: () => TN, + isDotDotDotToken: () => J5, + isDottedName: () => I3, + isDynamicName: () => F7, + isESSymbolIdentifier: () => Ihe, + isEffectiveExternalModule: () => NT, + isEffectiveModuleDeclaration: () => mZ, + isEffectiveStrictModeSourceFile: () => zj, + isElementAccessChain: () => fj, + isElementAccessExpression: () => ho, + isEmittedFileOfProgram: () => Tie, + isEmptyArrayLiteral: () => wK, + isEmptyBindingElement: () => vY, + isEmptyBindingPattern: () => yY, + isEmptyObjectLiteral: () => LB, + isEmptyStatement: () => FJ, + isEmptyStringLiteral: () => Zj, + isEntityName: () => l_, + isEntityNameExpression: () => fo, + isEnumConst: () => fb, + isEnumDeclaration: () => rv, + isEnumMember: () => Py, + isEqualityOperatorKind: () => o9, + isEqualsGreaterThanToken: () => bte, + isExclamationToken: () => rA, + isExcludedFile: () => Mre, + isExclusivelyTypeOnlyImportOrExport: () => IW, + isExpandoPropertyDeclaration: () => nx, + isExportAssignment: () => ko, + isExportDeclaration: () => Ic, + isExportModifier: () => _x, + isExportName: () => iO, + isExportNamespaceAsDefaultDeclaration: () => s7, + isExportOrDefaultModifier: () => pA, + isExportSpecifier: () => pu, + isExportsIdentifier: () => $2, + isExportsOrModuleExportsOrAlias: () => Bb, + isExpression: () => ct, + isExpressionNode: () => Sd, + isExpressionOfExternalModuleImportEqualsDeclaration: () => eae, + isExpressionOfOptionalChainRoot: () => BI, + isExpressionStatement: () => Pl, + isExpressionWithTypeArguments: () => bh, + isExpressionWithTypeArgumentsInClassExtendsClause: () => q7, + isExternalModule: () => il, + isExternalModuleAugmentation: () => _b, + isExternalModuleImportEqualsDeclaration: () => V1, + isExternalModuleIndicator: () => Mw, + isExternalModuleNameRelative: () => Sl, + isExternalModuleReference: () => Sh, + isExternalModuleSymbol: () => Kk, + isExternalOrCommonJsModule: () => A_, + isFileLevelReservedGeneratedIdentifier: () => Aw, + isFileLevelUniqueName: () => n7, + isFileProbablyExternalModule: () => gA, + isFirstDeclarationOfSymbolParameter: () => hU, + isFixablePromiseHandler: () => ZU, + isForInOrOfStatement: () => V2, + isForInStatement: () => X5, + isForInitializer: () => tp, + isForOfStatement: () => sA, + isForStatement: () => tv, + isFullSourceFile: () => l0, + isFunctionBlock: () => pb, + isFunctionBody: () => kj, + isFunctionDeclaration: () => Ac, + isFunctionExpression: () => po, + isFunctionExpressionOrArrowFunction: () => Sy, + isFunctionLike: () => ps, + isFunctionLikeDeclaration: () => so, + isFunctionLikeKind: () => DT, + isFunctionLikeOrClassStaticBlockDeclaration: () => Qk, + isFunctionOrConstructorTypeNode: () => JY, + isFunctionOrModuleBlock: () => vj, + isFunctionSymbol: () => $Z, + isFunctionTypeNode: () => Xm, + isFutureReservedKeyword: () => whe, + isGeneratedIdentifier: () => Fo, + isGeneratedPrivateIdentifier: () => z2, + isGetAccessor: () => n0, + isGetAccessorDeclaration: () => Af, + isGetOrSetAccessorDeclaration: () => Pw, + isGlobalDeclaration: () => T2e, + isGlobalScopeAugmentation: () => Zd, + isGlobalSourceFile: () => s0, + isGrammarError: () => lZ, + isHeritageClause: () => nf, + isHoistedFunction: () => _7, + isHoistedVariableStatement: () => f7, + isIdentifier: () => Re, + isIdentifierANonContextualKeyword: () => pB, + isIdentifierName: () => tK, + isIdentifierOrThisTypeNode: () => ere, + isIdentifierPart: () => t0, + isIdentifierStart: () => Cg, + isIdentifierText: () => X_, + isIdentifierTypePredicate: () => MZ, + isIdentifierTypeReference: () => pee, + isIfStatement: () => ev, + isIgnoredFileFromWildCardWatching: () => BA, + isImplicitGlob: () => eJ, + isImportAttribute: () => Ite, + isImportAttributeName: () => jY, + isImportAttributes: () => aS, + isImportCall: () => hf, + isImportClause: () => kd, + isImportDeclaration: () => oc, + isImportEqualsDeclaration: () => nl, + isImportKeyword: () => eD, + isImportMeta: () => sC, + isImportOrExportSpecifier: () => ET, + isImportOrExportSpecifierName: () => Dae, + isImportSpecifier: () => Yu, + isImportTypeAssertionContainer: () => S0e, + isImportTypeNode: () => Qm, + isImportableFile: () => BU, + isInComment: () => T0, + isInCompoundLikeAssignment: () => oB, + isInExpressionContext: () => S7, + isInJSDoc: () => n3, + isInJSFile: () => Qr, + isInJSXText: () => oae, + isInJsonFile: () => x7, + isInNonReferenceComment: () => dae, + isInReferenceComment: () => pae, + isInRightSideOfInternalImportEqualsDeclaration: () => LF, + isInString: () => Mx, + isInTemplateString: () => $V, + isInTopLevelContext: () => y7, + isInTypeQuery: () => VT, + isIncrementalCompilation: () => I4, + isIndexSignatureDeclaration: () => Pb, + isIndexedAccessTypeNode: () => Nb, + isInferTypeNode: () => rS, + isInfinityOrNaNString: () => V4, + isInitializedProperty: () => IA, + isInitializedVariable: () => M3, + isInsideJsxElement: () => HF, + isInsideJsxElementOrAttribute: () => aae, + isInsideNodeModules: () => yN, + isInsideTemplateLiteral: () => aN, + isInstanceOfExpression: () => H7, + isInstantiatedModule: () => Qz, + isInterfaceDeclaration: () => Vl, + isInternalDeclaration: () => tZ, + isInternalModuleImportEqualsDeclaration: () => LT, + isInternalName: () => YJ, + isIntersectionTypeNode: () => gx, + isIntrinsicJsxName: () => hC, + isIterationStatement: () => fy, + isJSDoc: () => Ed, + isJSDocAllType: () => Rte, + isJSDocAugmentsTag: () => Tx, + isJSDocAuthorTag: () => E0e, + isJSDocCallbackTag: () => BJ, + isJSDocClassTag: () => Bte, + isJSDocCommentContainingNode: () => $I, + isJSDocConstructSignature: () => _C, + isJSDocDeprecatedTag: () => UJ, + isJSDocEnumTag: () => oA, + isJSDocFunctionType: () => LC, + isJSDocImplementsTag: () => eO, + isJSDocImportTag: () => Jg, + isJSDocIndexSignature: () => C7, + isJSDocLikeText: () => az, + isJSDocLink: () => Lte, + isJSDocLinkCode: () => Mte, + isJSDocLinkLike: () => AT, + isJSDocLinkPlain: () => k0e, + isJSDocMemberName: () => iv, + isJSDocNameReference: () => lD, + isJSDocNamepathType: () => C0e, + isJSDocNamespaceBody: () => uhe, + isJSDocNode: () => Yk, + isJSDocNonNullableType: () => Q5, + isJSDocNullableType: () => FC, + isJSDocOptionalParameter: () => D5, + isJSDocOptionalType: () => jJ, + isJSDocOverloadTag: () => MC, + isJSDocOverrideTag: () => Z5, + isJSDocParameterTag: () => up, + isJSDocPrivateTag: () => zJ, + isJSDocPropertyLikeTag: () => HE, + isJSDocPropertyTag: () => Jte, + isJSDocProtectedTag: () => WJ, + isJSDocPublicTag: () => JJ, + isJSDocReadonlyTag: () => VJ, + isJSDocReturnTag: () => K5, + isJSDocSatisfiesExpression: () => pJ, + isJSDocSatisfiesTag: () => tO, + isJSDocSeeTag: () => D0e, + isJSDocSignature: () => Th, + isJSDocTag: () => Zk, + isJSDocTemplateTag: () => jp, + isJSDocThisTag: () => qJ, + isJSDocThrowsTag: () => w0e, + isJSDocTypeAlias: () => Np, + isJSDocTypeAssertion: () => fS, + isJSDocTypeExpression: () => nv, + isJSDocTypeLiteral: () => lS, + isJSDocTypeTag: () => uD, + isJSDocTypedefTag: () => uS, + isJSDocUnknownTag: () => P0e, + isJSDocUnknownType: () => jte, + isJSDocVariadicType: () => Y5, + isJSXTagName: () => cC, + isJsonEqual: () => T5, + isJsonSourceFile: () => Ap, + isJsxAttribute: () => dm, + isJsxAttributeLike: () => HI, + isJsxAttributeName: () => See, + isJsxAttributes: () => Mb, + isJsxChild: () => Bw, + isJsxClosingElement: () => Fb, + isJsxClosingFragment: () => Ote, + isJsxElement: () => jg, + isJsxExpression: () => oD, + isJsxFragment: () => Lb, + isJsxNamespacedName: () => Cd, + isJsxOpeningElement: () => pm, + isJsxOpeningFragment: () => cS, + isJsxOpeningLikeElement: () => ru, + isJsxOpeningLikeElementTagName: () => Yse, + isJsxSelfClosingElement: () => oS, + isJsxSpreadAttribute: () => Sx, + isJsxTagNameExpression: () => ZE, + isJsxText: () => cx, + isJumpStatementTarget: () => eN, + isKeyword: () => qu, + isKeywordOrPunctuation: () => N7, + isKnownSymbol: () => k3, + isLabelName: () => BV, + isLabelOfLabeledStatement: () => jV, + isLabeledStatement: () => Dy, + isLateVisibilityPaintedStatement: () => o7, + isLeftHandSideExpression: () => __, + isLeftHandSideOfAssignment: () => Whe, + isLet: () => u7, + isLineBreak: () => _u, + isLiteralComputedPropertyDeclarationName: () => b3, + isLiteralExpression: () => ob, + isLiteralExpressionOfObject: () => gj, + isLiteralImportTypeNode: () => a0, + isLiteralKind: () => GE, + isLiteralLikeAccess: () => D7, + isLiteralLikeElementAccess: () => l3, + isLiteralNameOfPropertyDeclarationOrIndexAccess: () => jF, + isLiteralTypeLikeExpression: () => L0e, + isLiteralTypeLiteral: () => UY, + isLiteralTypeNode: () => y0, + isLocalName: () => xh, + isLogicalOperator: () => EK, + isLogicalOrCoalescingAssignmentExpression: () => NB, + isLogicalOrCoalescingAssignmentOperator: () => x4, + isLogicalOrCoalescingBinaryExpression: () => N3, + isLogicalOrCoalescingBinaryOperator: () => A3, + isMappedTypeNode: () => iS, + isMemberName: () => Dg, + isMetaProperty: () => rD, + isMethodDeclaration: () => hc, + isMethodOrAccessor: () => PT, + isMethodSignature: () => um, + isMinusToken: () => wJ, + isMissingDeclaration: () => x0e, + isMissingPackageJsonInfo: () => $re, + isModifier: () => Qs, + isModifierKind: () => r0, + isModifierLike: () => Lo, + isModuleAugmentationExternal: () => Bj, + isModuleBlock: () => _m, + isModuleBody: () => GY, + isModuleDeclaration: () => Nc, + isModuleExportsAccessExpression: () => Ag, + isModuleIdentifier: () => tB, + isModuleName: () => nre, + isModuleOrEnumDeclaration: () => Rw, + isModuleReference: () => ZY, + isModuleSpecifierLike: () => e9, + isModuleWithStringLiteralName: () => a7, + isNameOfFunctionDeclaration: () => VV, + isNameOfModuleDeclaration: () => WV, + isNamedClassElement: () => she, + isNamedDeclaration: () => Bl, + isNamedEvaluation: () => Z_, + isNamedEvaluationSource: () => dB, + isNamedExportBindings: () => dj, + isNamedExports: () => lp, + isNamedImportBindings: () => Cj, + isNamedImports: () => fm, + isNamedImportsOrExports: () => K7, + isNamedTupleMember: () => AC, + isNamespaceBody: () => lhe, + isNamespaceExport: () => Ym, + isNamespaceExportDeclaration: () => aA, + isNamespaceImport: () => Rg, + isNamespaceReexportDeclaration: () => UZ, + isNewExpression: () => Ib, + isNewExpressionTarget: () => WD, + isNoSubstitutionTemplateLiteral: () => lx, + isNode: () => nhe, + isNodeArray: () => ab, + isNodeArrayMultiLine: () => LK, + isNodeDescendantOf: () => yb, + isNodeKind: () => ww, + isNodeLikeSystem: () => SR, + isNodeModulesDirectory: () => EI, + isNodeWithPossibleHoistedDeclaration: () => KZ, + isNonContextualKeyword: () => fB, + isNonExportDefaultModifier: () => R0e, + isNonGlobalAmbientModule: () => jj, + isNonGlobalDeclaration: () => Wae, + isNonNullAccess: () => bee, + isNonNullChain: () => JI, + isNonNullExpression: () => vx, + isNonStaticMethodOrAccessorWithPrivateName: () => Ane, + isNotEmittedOrPartiallyEmittedNode: () => che, + isNotEmittedStatement: () => RJ, + isNullishCoalesce: () => pj, + isNumber: () => iy, + isNumericLiteral: () => m_, + isNumericLiteralName: () => Mg, + isObjectBindingElementWithoutPropertyName: () => uN, + isObjectBindingOrAssignmentElement: () => Ow, + isObjectBindingOrAssignmentPattern: () => bj, + isObjectBindingPattern: () => If, + isObjectLiteralElement: () => Ej, + isObjectLiteralElementLike: () => lh, + isObjectLiteralExpression: () => Gs, + isObjectLiteralMethod: () => Yp, + isObjectLiteralOrClassExpressionMethodOrAccessor: () => d7, + isObjectTypeDeclaration: () => $T, + isOctalDigit: () => AI, + isOmittedExpression: () => ml, + isOptionalChain: () => fu, + isOptionalChainRoot: () => VE, + isOptionalDeclaration: () => q4, + isOptionalJSDocPropertyLikeTag: () => q3, + isOptionalTypeNode: () => V5, + isOuterExpression: () => sO, + isOutermostOptionalChain: () => UE, + isOverrideModifier: () => kte, + isPackageJsonInfo: () => AO, + isPackedArrayLiteral: () => _J, + isParameter: () => ji, + isParameterPropertyDeclaration: () => Q_, + isParameterPropertyModifier: () => XE, + isParenthesizedExpression: () => Qu, + isParenthesizedTypeNode: () => nS, + isParseTreeNode: () => WE, + isPartOfParameterDeclaration: () => X1, + isPartOfTypeNode: () => em, + isPartOfTypeQuery: () => T7, + isPartiallyEmittedExpression: () => $5, + isPatternMatch: () => pI, + isPinnedComment: () => i7, + isPlainJsFile: () => t4, + isPlusToken: () => PJ, + isPossiblyTypeArgumentPosition: () => sN, + isPostfixUnaryExpression: () => OJ, + isPrefixUnaryExpression: () => Ey, + isPrimitiveLiteralValue: () => A5, + isPrivateIdentifier: () => wi, + isPrivateIdentifierClassElementDeclaration: () => Pu, + isPrivateIdentifierPropertyAccessExpression: () => Xk, + isPrivateIdentifierSymbol: () => iK, + isProgramBundleEmitBuildInfo: () => Jie, + isProgramUptoDate: () => JW, + isPrologueDirective: () => Kd, + isPropertyAccessChain: () => jI, + isPropertyAccessEntityNameExpression: () => O3, + isPropertyAccessExpression: () => Dn, + isPropertyAccessOrQualifiedName: () => Lw, + isPropertyAccessOrQualifiedNameOrImportTypeNode: () => WY, + isPropertyAssignment: () => qc, + isPropertyDeclaration: () => rs, + isPropertyName: () => Rc, + isPropertyNameLiteral: () => rm, + isPropertySignature: () => I_, + isProtoSetter: () => sK, + isPrototypeAccess: () => hy, + isPrototypePropertyAssignment: () => f3, + isPunctuation: () => _B, + isPushOrUnshiftIdentifier: () => mB, + isQualifiedName: () => $u, + isQuestionDotToken: () => z5, + isQuestionOrExclamationToken: () => Kte, + isQuestionOrPlusOrMinusToken: () => rre, + isQuestionToken: () => xy, + isRawSourceMap: () => kne, + isReadonlyKeyword: () => Tte, + isReadonlyKeywordOrPlusOrMinusToken: () => tre, + isRecognizedTripleSlashComment: () => Oj, + isReferenceFileLocation: () => KC, + isReferencedFile: () => pv, + isRegularExpressionLiteral: () => EJ, + isRequireCall: () => d_, + isRequireVariableStatement: () => s3, + isRestParameter: () => Um, + isRestTypeNode: () => U5, + isReturnStatement: () => Mp, + isReturnStatementWithFixablePromiseHandler: () => C9, + isRightSideOfAccessExpression: () => FB, + isRightSideOfInstanceofExpression: () => PK, + isRightSideOfPropertyAccess: () => i6, + isRightSideOfQualifiedName: () => Kse, + isRightSideOfQualifiedNameOrPropertyAccess: () => k4, + isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => DK, + isRootedDiskPath: () => $_, + isSameEntityName: () => lC, + isSatisfiesExpression: () => G5, + isScopeMarker: () => qY, + isSemicolonClassElement: () => wte, + isSetAccessor: () => Yd, + isSetAccessorDeclaration: () => rf, + isShebangTrivia: () => tj, + isShiftOperatorOrHigher: () => nz, + isShorthandAmbientModuleSymbol: () => Vw, + isShorthandPropertyAssignment: () => du, + isSignedNumericLiteral: () => O7, + isSimpleCopiableExpression: () => Jb, + isSimpleInlineableExpression: () => mm, + isSimpleParameter: () => Lne, + isSimpleParameterList: () => OA, + isSingleOrDoubleQuote: () => a3, + isSourceFile: () => yi, + isSourceFileFromLibrary: () => p6, + isSourceFileJS: () => p_, + isSourceFileNotJS: () => She, + isSourceFileNotJson: () => k7, + isSourceMapping: () => Ene, + isSpecialPropertyDeclaration: () => GZ, + isSpreadAssignment: () => Bg, + isSpreadElement: () => cp, + isStatement: () => hi, + isStatementButNotDeclaration: () => jw, + isStatementOrBlock: () => YY, + isStatementWithLocals: () => cZ, + isStatic: () => Os, + isStaticModifier: () => fx, + isString: () => Gi, + isStringAKeyword: () => Ahe, + isStringANonContextualKeyword: () => WT, + isStringAndEmptyAnonymousObjectIntersection: () => fae, + isStringDoubleQuoted: () => E7, + isStringLiteral: () => Ks, + isStringLiteralLike: () => Ga, + isStringLiteralOrJsxExpression: () => KY, + isStringLiteralOrTemplate: () => Oae, + isStringOrNumericLiteralLike: () => Pf, + isStringOrRegularExpressionOrTemplateLiteral: () => YV, + isStringTextContainingNode: () => hj, + isSuperCall: () => G2, + isSuperKeyword: () => K4, + isSuperOrSuperProperty: () => bhe, + isSuperProperty: () => f_, + isSupportedSourceFileName: () => cee, + isSwitchStatement: () => sD, + isSyntaxList: () => RC, + isSyntheticExpression: () => g0e, + isSyntheticReference: () => bx, + isTagName: () => JV, + isTaggedTemplateExpression: () => Ob, + isTaggedTemplateTag: () => Xse, + isTemplateExpression: () => q5, + isTemplateHead: () => ux, + isTemplateLiteral: () => wT, + isTemplateLiteralKind: () => uy, + isTemplateLiteralToken: () => MY, + isTemplateLiteralTypeNode: () => Dte, + isTemplateLiteralTypeSpan: () => NJ, + isTemplateMiddle: () => DJ, + isTemplateMiddleOrTemplateTail: () => zI, + isTemplateSpan: () => iD, + isTemplateTail: () => B5, + isTextWhiteSpaceLike: () => yae, + isThis: () => s6, + isThisContainerOrFunctionBlock: () => zZ, + isThisIdentifier: () => my, + isThisInTypeQuery: () => Tb, + isThisInitializedDeclaration: () => v7, + isThisInitializedObjectBindingExpression: () => VZ, + isThisProperty: () => Kw, + isThisTypeNode: () => NC, + isThisTypeParameter: () => U4, + isThisTypePredicate: () => RZ, + isThrowStatement: () => MJ, + isToken: () => CT, + isTokenKind: () => mj, + isTraceEnabled: () => kh, + isTransientSymbol: () => qm, + isTrivia: () => mC, + isTryStatement: () => sS, + isTupleTypeNode: () => mx, + isTypeAlias: () => m3, + isTypeAliasDeclaration: () => Rp, + isTypeAssertionExpression: () => IJ, + isTypeDeclaration: () => tx, + isTypeElement: () => cb, + isTypeKeyword: () => qD, + isTypeKeywordToken: () => iU, + isTypeKeywordTokenOrIdentifier: () => YF, + isTypeLiteralNode: () => Xu, + isTypeNode: () => ai, + isTypeNodeKind: () => VB, + isTypeOfExpression: () => IC, + isTypeOnlyExportDeclaration: () => RY, + isTypeOnlyImportDeclaration: () => $E, + isTypeOnlyImportOrExportDeclaration: () => B1, + isTypeOperatorNode: () => K1, + isTypeParameterDeclaration: () => Mo, + isTypePredicateNode: () => dx, + isTypeQueryNode: () => wb, + isTypeReferenceNode: () => Nf, + isTypeReferenceType: () => QI, + isTypeUsableAsPropertyName: () => Fp, + isUMDExportSymbol: () => Z7, + isUnaryExpression: () => xj, + isUnaryExpressionWithWrite: () => VY, + isUnicodeIdentifierStart: () => PI, + isUnionTypeNode: () => ky, + isUrl: () => tY, + isValidBigIntString: () => x5, + isValidESSymbolDeclaration: () => FZ, + isValidTypeOnlyAliasUseSite: () => Y1, + isValueSignatureDeclaration: () => zT, + isVarAwaitUsing: () => $w, + isVarConst: () => iC, + isVarConstLike: () => DZ, + isVarUsing: () => Xw, + isVariableDeclaration: () => ti, + isVariableDeclarationInVariableStatement: () => i4, + isVariableDeclarationInitializedToBareOrAccessedRequire: () => mb, + isVariableDeclarationInitializedToRequire: () => i3, + isVariableDeclarationList: () => Il, + isVariableLike: () => FT, + isVariableLikeOrAccessor: () => IZ, + isVariableStatement: () => yc, + isVoidExpression: () => hx, + isWatchSet: () => JB, + isWhileStatement: () => LJ, + isWhiteSpaceLike: () => xg, + isWhiteSpaceSingleLine: () => Xd, + isWithStatement: () => Ate, + isWriteAccess: () => GT, + isWriteOnlyAccess: () => Y7, + isYieldExpression: () => H5, + jsxModeNeedsExplicitImport: () => MU, + keywordPart: () => af, + last: () => ia, + lastOrUndefined: () => Bo, + length: () => Dr, + libMap: () => fz, + libs: () => pO, + lineBreakPart: () => u6, + linkNamePart: () => Cae, + linkPart: () => vU, + linkTextPart: () => n9, + listFiles: () => nV, + loadModuleFromGlobalCache: () => ane, + loadWithModeAwareCache: () => WA, + makeIdentifierFromModuleName: () => dZ, + makeImport: () => Ly, + makeStringLiteral: () => HD, + mangleScopedPackageName: () => GC, + map: () => or, + mapAllOrFail: () => rR, + mapDefined: () => Ii, + mapDefinedEntries: () => yX, + mapDefinedIterator: () => P1, + mapEntries: () => bX, + mapIterator: () => yE, + mapOneOrMany: () => OU, + mapToDisplayParts: () => My, + matchFiles: () => tJ, + matchPatternOrExact: () => sJ, + matchedText: () => MX, + matchesExclude: () => EO, + maybeBind: () => Ns, + maybeSetLocalizedDiagnosticMessages: () => UK, + memoize: () => Wu, + memoizeCached: () => cge, + memoizeOne: () => Bm, + memoizeWeak: () => oge, + metadataHelper: () => Hee, + min: () => dR, + minAndMax: () => _ee, + missingFileModifiedTime: () => G_, + modifierToFlag: () => qT, + modifiersToFlags: () => sm, + moduleOptionDeclaration: () => dre, + moduleResolutionIsEqualTo: () => aZ, + moduleResolutionNameAndModeGetter: () => LW, + moduleResolutionOptionDeclarations: () => dz, + moduleResolutionSupportsPackageJsonExportsAndImports: () => KT, + moduleResolutionUsesNodeModules: () => ZF, + moduleSpecifierToValidIdentifier: () => vN, + moduleSpecifiers: () => fv, + moduleSymbolToValidIdentifier: () => KD, + moveEmitHelpers: () => Ree, + moveRangeEnd: () => X7, + moveRangePastDecorators: () => mh, + moveRangePastModifiers: () => am, + moveRangePos: () => Q1, + moveSyntheticComments: () => Fee, + mutateMap: () => A4, + mutateMapSkippingNewValues: () => Ig, + needsParentheses: () => s9, + needsScopeMarker: () => UI, + newCaseClauseTracker: () => S9, + newPrivateEnvironment: () => One, + noEmitNotification: () => LA, + noEmitSubstitution: () => ID, + noTransformers: () => die, + noTruncationMaximumTruncationLength: () => wj, + nodeCanBeDecorated: () => t3, + nodeHasName: () => kw, + nodeIsDecorated: () => oC, + nodeIsMissing: () => ic, + nodeIsPresent: () => wp, + nodeIsSynthesized: () => oo, + nodeModuleNameResolver: () => Kre, + nodeModulesPathPart: () => zg, + nodeNextJsonConfigResolver: () => ene, + nodeOrChildIsDecorated: () => r3, + nodeOverlapsWithStartEnd: () => BF, + nodePosToString: () => phe, + nodeSeenTracker: () => o6, + nodeStartsNewLexicalEnvironment: () => gB, + nodeToDisplayParts: () => h2e, + noop: () => ka, + noopFileWatcher: () => jD, + normalizePath: () => Cs, + normalizeSlashes: () => Rl, + not: () => mI, + notImplemented: () => Rs, + notImplementedResolver: () => yie, + nullNodeConverters: () => Aee, + nullParenthesizerRules: () => Pee, + nullTransformationContext: () => RA, + objectAllocator: () => zl, + operatorPart: () => $D, + optionDeclarations: () => Dd, + optionMapToObject: () => bO, + optionsAffectingProgramStructure: () => vre, + optionsForBuild: () => gz, + optionsForWatch: () => Dx, + optionsHaveChanges: () => eC, + optionsHaveModuleResolutionChanges: () => nZ, + or: () => Ef, + orderedRemoveItem: () => xE, + orderedRemoveItemAt: () => ay, + packageIdToPackageName: () => t7, + packageIdToString: () => py, + paramHelper: () => Gee, + parameterIsThisKeyword: () => Sb, + parameterNamePart: () => Sae, + parseBaseNodeFactory: () => lre, + parseBigInt: () => fee, + parseBuildCommand: () => wre, + parseCommandLine: () => Dre, + parseCommandLineWorker: () => yz, + parseConfigFileTextToJson: () => bz, + parseConfigFileWithSystem: () => ese, + parseConfigHostFromCompilerHostLike: () => uF, + parseCustomTypeOption: () => hO, + parseIsolatedEntityName: () => Ex, + parseIsolatedJSDocComment: () => _re, + parseJSDocTypeExpressionForTests: () => iye, + parseJsonConfigFileContent: () => Oye, + parseJsonSourceFileConfigFileContent: () => xA, + parseJsonText: () => hA, + parseListTypeOption: () => Cre, + parseNodeFactory: () => av, + parseNodeModuleFromPath: () => EA, + parsePackageName: () => FO, + parsePseudoBigInt: () => J4, + parseValidBigInt: () => lJ, + pasteEdits: () => MH, + patchWriteFileEnsuringDirectory: () => eY, + pathContainsNodeModules: () => uv, + pathIsAbsolute: () => OE, + pathIsBareSpecifier: () => GR, + pathIsRelative: () => Df, + patternText: () => LX, + perfLogger: () => Vu, + performIncrementalCompilation: () => rse, + performance: () => UX, + plainJSErrors: () => zW, + positionBelongsToNode: () => qV, + positionIsASICandidate: () => l9, + positionIsSynthesized: () => xd, + positionsAreOnSameLine: () => ip, + preProcessFile: () => B2e, + probablyUsesSemicolons: () => gN, + processCommentPragmas: () => uz, + processPragmasIntoFields: () => _z, + processTaggedTemplateExpression: () => _W, + programContainsEsModules: () => gae, + programContainsModules: () => mae, + projectReferenceIsEqualTo: () => Aj, + propKeyHelper: () => ate, + propertyNamePart: () => Tae, + pseudoBigIntToString: () => Eb, + punctuationPart: () => yu, + pushIfUnique: () => Zf, + quote: () => YD, + quotePreferenceFromString: () => cU, + rangeContainsPosition: () => tN, + rangeContainsPositionExclusive: () => rN, + rangeContainsRange: () => Mf, + rangeContainsRangeExclusive: () => tae, + rangeContainsStartEnd: () => nN, + rangeEndIsOnSameLineAsRangeStart: () => L3, + rangeEndPositionsAreOnSameLine: () => OK, + rangeEquals: () => oR, + rangeIsOnSingleLine: () => eS, + rangeOfNode: () => oJ, + rangeOfTypeParameters: () => cJ, + rangeOverlapsWithStartEnd: () => VD, + rangeStartIsOnSameLineAsRangeEnd: () => FK, + rangeStartPositionsAreOnSameLine: () => Q7, + readBuilderProgram: () => bF, + readConfigFile: () => SA, + readHelper: () => ite, + readJson: () => E4, + readJsonConfigFile: () => Are, + readJsonOrUndefined: () => MB, + reduceEachLeadingCommentRange: () => lY, + reduceEachTrailingCommentRange: () => uY, + reduceLeft: () => Eu, + reduceLeftIterator: () => mX, + reducePathComponents: () => R2, + refactor: () => zx, + regExpEscape: () => Khe, + regularExpressionFlagToCharacter: () => jge, + relativeComplement: () => SX, + removeAllComments: () => Q3, + removeEmitHelper: () => d0e, + removeExtension: () => W3, + removeFileExtension: () => Gu, + removeIgnoredPath: () => fF, + removeMinAndVersionNumbers: () => gR, + removeOptionality: () => cae, + removePrefix: () => kE, + removeSuffix: () => Jk, + removeTrailingDirectorySeparator: () => F1, + repeatString: () => cN, + replaceElement: () => uR, + replaceFirstStar: () => ix, + resolutionExtensionIsTSOrJson: () => M4, + resolveConfigFileProjectName: () => hV, + resolveJSModule: () => Qre, + resolveLibrary: () => IO, + resolveModuleName: () => Ax, + resolveModuleNameFromCache: () => o1e, + resolvePackageNameToPackageJson: () => Iz, + resolvePath: () => O1, + resolveProjectReferencePath: () => e6, + resolveTripleslashReference: () => DW, + resolveTypeReferenceDirective: () => Hre, + resolvingEmptyArray: () => Pj, + restHelper: () => ete, + returnFalse: () => $d, + returnNoopFileWatcher: () => BD, + returnTrue: () => A1, + returnUndefined: () => nb, + returnsPromise: () => YU, + runInitializersHelper: () => Xee, + sameFlatMap: () => hX, + sameMap: () => Zc, + sameMapping: () => Y1e, + scanShebangTrivia: () => rj, + scanTokenAtPosition: () => EZ, + scanner: () => Ou, + screenStartingMessageCodes: () => KW, + semanticDiagnosticsOptionDeclarations: () => gre, + serializeCompilerOptions: () => SO, + server: () => Rwe, + servicesVersion: () => LTe, + setCommentRange: () => el, + setConfigFileInOptions: () => Ez, + setConstantValue: () => Mee, + setEachParent: () => s0e, + setEmitFlags: () => Kr, + setFunctionNameHelper: () => ote, + setGetSourceFileAsHashVersioned: () => vF, + setIdentifierAutoGenerate: () => K3, + setIdentifierGeneratedImportReference: () => Jee, + setIdentifierTypeArguments: () => h0, + setInternalEmitFlags: () => Y3, + setLocalizedDiagnosticMessages: () => VK, + setModuleDefaultHelper: () => ute, + setNodeChildren: () => rO, + setNodeFlags: () => mee, + setObjectAllocator: () => WK, + setOriginalNode: () => kn, + setParent: () => Da, + setParentRecursive: () => yh, + setPrivateIdentifier: () => dS, + setSnippetElement: () => TJ, + setSourceMapRange: () => aa, + setStackTraceLimit: () => xge, + setStartsOnNewLine: () => O5, + setSyntheticLeadingComments: () => Z1, + setSyntheticTrailingComments: () => ax, + setSys: () => wge, + setSysLog: () => YQ, + setTextRange: () => ot, + setTextRangeEnd: () => DC, + setTextRangePos: () => z4, + setTextRangePosEnd: () => om, + setTextRangePosWidth: () => uJ, + setTokenSourceMapRange: () => Oee, + setTypeNode: () => jee, + setUILocale: () => IX, + setValueDeclaration: () => p3, + shouldAllowImportingTsExtension: () => $C, + shouldPreserveConstEnums: () => Cb, + shouldUseUriStyleNodeCoreModules: () => v9, + showModuleSpecifier: () => BK, + signatureHasLiteralTypes: () => Yz, + signatureHasRestParameter: () => gu, + signatureToDisplayParts: () => bU, + single: () => lR, + singleElementArray: () => ST, + singleIterator: () => vX, + singleOrMany: () => jm, + singleOrUndefined: () => Rm, + skipAlias: () => Jl, + skipAssertions: () => I0e, + skipConstraint: () => sU, + skipOuterExpressions: () => Bc, + skipParentheses: () => Ja, + skipPartiallyEmittedExpressions: () => Xp, + skipTrivia: () => sa, + skipTypeChecking: () => B4, + skipTypeParentheses: () => f4, + skipWhile: () => jX, + sliceAfter: () => aJ, + some: () => ut, + sort: () => rb, + sortAndDeduplicate: () => SE, + sortAndDeduplicateDiagnostics: () => qk, + sourceFileAffectingCompilerOptions: () => mz, + sourceFileMayBeEmitted: () => Z2, + sourceMapCommentRegExp: () => Kz, + sourceMapCommentRegExpDontCareLineStart: () => Tne, + spacePart: () => _c, + spanMap: () => nR, + spreadArrayHelper: () => ste, + stableSort: () => Sg, + startEndContainsRange: () => UV, + startEndOverlapsWithStartEnd: () => JF, + startOnNewLine: () => mu, + startTracing: () => $X, + startsWith: () => zi, + startsWithDirectory: () => QR, + startsWithUnderscore: () => LU, + startsWithUseStrict: () => Gte, + stringContainsAt: () => zae, + stringToToken: () => ib, + stripQuotes: () => Op, + supportedDeclarationExtensions: () => h5, + supportedJSExtensions: () => iee, + supportedJSExtensionsFlat: () => CC, + supportedLocaleDirectories: () => SY, + supportedTSExtensions: () => F4, + supportedTSExtensionsFlat: () => rJ, + supportedTSImplementationExtensions: () => y5, + suppressLeadingAndTrailingTrivia: () => of, + suppressLeadingTrivia: () => kU, + suppressTrailingTrivia: () => Aae, + symbolEscapedNameNoDefault: () => KF, + symbolName: () => uc, + symbolNameNoDefault: () => uU, + symbolPart: () => bae, + symbolToDisplayParts: () => XD, + syntaxMayBeASICandidate: () => Lae, + syntaxRequiresTrailingSemicolonOrASI: () => c9, + sys: () => _l, + sysLog: () => fw, + tagNamesAreEquivalent: () => cv, + takeWhile: () => bR, + targetOptionDeclaration: () => pz, + templateObjectHelper: () => nte, + testFormatSettings: () => c2e, + textChangeRangeIsUnchanged: () => gY, + textChangeRangeNewSpan: () => zE, + textChanges: () => Yr, + textOrKeywordPart: () => yU, + textPart: () => jf, + textRangeContainsPositionInclusive: () => Sw, + textSpanContainsPosition: () => ij, + textSpanContainsTextSpan: () => fY, + textSpanEnd: () => wc, + textSpanIntersection: () => mY, + textSpanIntersectsWith: () => II, + textSpanIntersectsWithPosition: () => dY, + textSpanIntersectsWithTextSpan: () => qge, + textSpanIsEmpty: () => _Y, + textSpanOverlap: () => pY, + textSpanOverlapsWith: () => Uge, + textSpansEqual: () => l6, + textToKeywordObj: () => DI, + timestamp: () => Io, + toArray: () => vT, + toBuilderFileEmit: () => Uie, + toBuilderStateFileInfoForMultiEmit: () => Vie, + toEditorSettings: () => DN, + toFileNameLowerCase: () => sy, + toLowerCase: () => DX, + toPath: () => _o, + toProgramEmitPending: () => qie, + tokenIsIdentifierOrKeyword: () => Du, + tokenIsIdentifierOrKeywordOrGreaterThan: () => iY, + tokenToString: () => Ws, + trace: () => Wi, + tracing: () => rn, + tracingEnabled: () => uw, + transform: () => qTe, + transformClassFields: () => Hne, + transformDeclarations: () => mW, + transformECMAScriptModule: () => dW, + transformES2015: () => aie, + transformES2016: () => sie, + transformES2017: () => Qne, + transformES2018: () => Yne, + transformES2019: () => Zne, + transformES2020: () => Kne, + transformES2021: () => eie, + transformESDecorators: () => Xne, + transformESNext: () => tie, + transformGenerators: () => oie, + transformJsx: () => iie, + transformLegacyDecorators: () => $ne, + transformModule: () => pW, + transformNamedEvaluation: () => sf, + transformNodeModule: () => lie, + transformNodes: () => MA, + transformSystemModule: () => cie, + transformTypeScript: () => qne, + transpile: () => $2e, + transpileDeclaration: () => H2e, + transpileModule: () => loe, + transpileOptionValueCompilerOptions: () => bre, + tryAddToSet: () => ih, + tryAndIgnoreErrors: () => f9, + tryCast: () => Jn, + tryDirectoryExists: () => _9, + tryExtractTSExtension: () => G7, + tryFileExists: () => hN, + tryGetClassExtendingExpressionWithTypeArguments: () => IB, + tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => OB, + tryGetDirectories: () => u9, + tryGetExtensionFromPath: () => hh, + tryGetImportFromModuleSpecifier: () => d3, + tryGetJSDocSatisfiesTypeNode: () => P5, + tryGetModuleNameFromFile: () => _A, + tryGetModuleSpecifierFromDeclaration: () => u4, + tryGetNativePerformanceHooks: () => VX, + tryGetPropertyAccessOrIdentifierToString: () => F3, + tryGetPropertyNameOfBindingOrAssignmentElement: () => cO, + tryGetSourceMappingURL: () => xne, + tryGetTextOfPropertyName: () => n4, + tryIOAndConsumeErrors: () => p9, + tryParseJson: () => $7, + tryParsePattern: () => EC, + tryParsePatterns: () => b5, + tryParseRawSourceMap: () => Cne, + tryReadDirectory: () => PU, + tryReadFile: () => mD, + tryRemoveDirectoryPrefix: () => KB, + tryRemoveExtension: () => uee, + tryRemovePrefix: () => vR, + tryRemoveSuffix: () => FX, + typeAcquisitionDeclarations: () => mO, + typeAliasNamePart: () => xae, + typeDirectiveIsEqualTo: () => oZ, + typeKeywords: () => nU, + typeParameterNamePart: () => kae, + typeToDisplayParts: () => fN, + unchangedPollThresholds: () => TI, + unchangedTextChangeRange: () => OI, + unescapeLeadingUnderscores: () => Pi, + unmangleScopedPackageName: () => PA, + unorderedRemoveItem: () => bT, + unorderedRemoveItemAt: () => hR, + unreachableCodeIsError: () => GK, + unsetNodeChildren: () => GJ, + unusedLabelIsError: () => $K, + unwrapInnermostStatementOfLabel: () => Qj, + unwrapParenthesizedExpression: () => kee, + updateErrorForNoInputFiles: () => CO, + updateLanguageServiceSourceFile: () => kq, + updateMissingFilePathsWatch: () => kW, + updateResolutionField: () => VC, + updateSharedExtendedConfigFileWatcher: () => rF, + updateSourceFile: () => oz, + updateWatchingWildcardDirectories: () => jA, + usesExtensionsOnImports: () => aee, + usingSingleLineStringWriter: () => e4, + utf16EncodeAsString: () => JE, + validateLocaleAndSetLanguage: () => aj, + valuesHelper: () => cte, + version: () => dd, + versionMajorMinor: () => N2, + visitArray: () => AA, + visitCommaListElements: () => NA, + visitEachChild: () => gr, + visitFunctionBody: () => Lf, + visitIterationBody: () => Zu, + visitLexicalEnvironment: () => Zz, + visitNode: () => Ge, + visitNodes: () => Ar, + visitParameterList: () => cc, + walkUpBindingElementsAndPatterns: () => Hk, + walkUpLexicalEnvironments: () => Ine, + walkUpOuterExpressions: () => $te, + walkUpParenthesizedExpressions: () => fh, + walkUpParenthesizedTypes: () => v3, + walkUpParenthesizedTypesAndGetParentAndChild: () => eK, + whitespaceOrMapCommentRegExp: () => eW, + writeCommentRange: () => SC, + writeFile: () => w3, + writeFileEnsuringDirectories: () => EB, + zipWith: () => ZM + }), Ua.exports = Cp(Yh); + var N2 = "5.5", dd = "5.5.2", pX = /* @__PURE__ */ ((e) => (e[e.LessThan = -1] = "LessThan", e[e.EqualTo = 0] = "EqualTo", e[e.GreaterThan = 1] = "GreaterThan", e))(pX || {}), He = [], YM = /* @__PURE__ */ new Map(), tge = /* @__PURE__ */ new Set(); + function Dr(e) { + return e ? e.length : 0; + } + function rr(e, t) { + if (e) + for (let n = 0; n < e.length; n++) { + const i = t(e[n], n); + if (i) + return i; + } + } + function dX(e, t) { + if (e) + for (let n = e.length - 1; n >= 0; n--) { + const i = t(e[n], n); + if (i) + return i; + } + } + function xc(e, t) { + if (e !== void 0) + for (let n = 0; n < e.length; n++) { + const i = t(e[n], n); + if (i !== void 0) + return i; + } + } + function tw(e, t) { + for (const n of e) { + const i = t(n); + if (i !== void 0) + return i; + } + } + function mX(e, t, n) { + let i = n; + if (e) { + let s = 0; + for (const o of e) + i = t(i, o, s), s++; + } + return i; + } + function ZM(e, t, n) { + const i = []; + E.assertEqual(e.length, t.length); + for (let s = 0; s < e.length; s++) + i.push(n(e[s], t[s], s)); + return i; + } + function KM(e, t) { + if (e.length <= 1) + return e; + const n = []; + for (let i = 0, s = e.length; i < s; i++) + i && n.push(t), n.push(e[i]); + return n; + } + function Ri(e, t) { + if (e) { + for (let n = 0; n < e.length; n++) + if (!t(e[n], n)) + return !1; + } + return !0; + } + function Nn(e, t, n) { + if (e !== void 0) + for (let i = n ?? 0; i < e.length; i++) { + const s = e[i]; + if (t(s, i)) + return s; + } + } + function eb(e, t, n) { + if (e !== void 0) + for (let i = n ?? e.length - 1; i >= 0; i--) { + const s = e[i]; + if (t(s, i)) + return s; + } + } + function rc(e, t, n) { + if (e === void 0) return -1; + for (let i = n ?? 0; i < e.length; i++) + if (t(e[i], i)) + return i; + return -1; + } + function cI(e, t, n) { + if (e === void 0) return -1; + for (let i = n ?? e.length - 1; i >= 0; i--) + if (t(e[i], i)) + return i; + return -1; + } + function rge(e, t) { + for (let n = 0; n < e.length; n++) { + const i = t(e[n], n); + if (i) + return i; + } + return E.fail(); + } + function ls(e, t, n = Kh) { + if (e) { + for (const i of e) + if (n(i, t)) + return !0; + } + return !1; + } + function rw(e, t, n = Kh) { + return e.length === t.length && e.every((i, s) => n(i, t[s])); + } + function gX(e, t, n) { + for (let i = n || 0; i < e.length; i++) + if (ls(t, e.charCodeAt(i))) + return i; + return -1; + } + function ty(e, t) { + let n = 0; + if (e) + for (let i = 0; i < e.length; i++) { + const s = e[i]; + t(s, i) && n++; + } + return n; + } + function Ln(e, t) { + if (e) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) i++; + if (i < n) { + const s = e.slice(0, i); + for (i++; i < n; ) { + const o = e[i]; + t(o) && s.push(o), i++; + } + return s; + } + } + return e; + } + function eR(e, t) { + let n = 0; + for (let i = 0; i < e.length; i++) + t(e[i], i, e) && (e[n] = e[i], n++); + e.length = n; + } + function bg(e) { + e.length = 0; + } + function or(e, t) { + let n; + if (e) { + n = []; + for (let i = 0; i < e.length; i++) + n.push(t(e[i], i)); + } + return n; + } + function* yE(e, t) { + for (const n of e) + yield t(n); + } + function Zc(e, t) { + if (e) + for (let n = 0; n < e.length; n++) { + const i = e[n], s = t(i, n); + if (i !== s) { + const o = e.slice(0, n); + for (o.push(s), n++; n < e.length; n++) + o.push(t(e[n], n)); + return o; + } + } + return e; + } + function Ep(e) { + const t = []; + for (const n of e) + n && (ss(n) ? Bn(t, n) : t.push(n)); + return t; + } + function Xs(e, t) { + let n; + if (e) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s && (ss(s) ? n = Bn(n, s) : n = Tr(n, s)); + } + return n || He; + } + function vE(e, t) { + const n = []; + if (e) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s && (ss(s) ? Bn(n, s) : n.push(s)); + } + return n; + } + function* tR(e, t) { + for (const n of e) { + const i = t(n); + i && (yield* i); + } + } + function hX(e, t) { + let n; + if (e) + for (let i = 0; i < e.length; i++) { + const s = e[i], o = t(s, i); + (n || s !== o || ss(o)) && (n || (n = e.slice(0, i)), ss(o) ? Bn(n, o) : n.push(o)); + } + return n || e; + } + function rR(e, t) { + const n = []; + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + if (s === void 0) + return; + n.push(s); + } + return n; + } + function Ii(e, t) { + const n = []; + if (e) + for (let i = 0; i < e.length; i++) { + const s = t(e[i], i); + s !== void 0 && n.push(s); + } + return n; + } + function* P1(e, t) { + for (const n of e) { + const i = t(n); + i !== void 0 && (yield i); + } + } + function yX(e, t) { + if (!e) + return; + const n = /* @__PURE__ */ new Map(); + return e.forEach((i, s) => { + const o = t(s, i); + if (o !== void 0) { + const [c, _] = o; + c !== void 0 && _ !== void 0 && n.set(c, _); + } + }), n; + } + function bE(e, t, n) { + if (e.has(t)) + return e.get(t); + const i = n(); + return e.set(t, i), i; + } + function ih(e, t) { + return e.has(t) ? !1 : (e.add(t), !0); + } + function* vX(e) { + yield e; + } + function nR(e, t, n) { + let i; + if (e) { + i = []; + const s = e.length; + let o, c, _ = 0, u = 0; + for (; _ < s; ) { + for (; u < s; ) { + const d = e[u]; + if (c = t(d, u), u === 0) + o = c; + else if (c !== o) + break; + u++; + } + if (_ < u) { + const d = n(e.slice(_, u), o, _, u); + d && i.push(d), _ = u; + } + o = c, u++; + } + } + return i; + } + function bX(e, t) { + if (!e) + return; + const n = /* @__PURE__ */ new Map(); + return e.forEach((i, s) => { + const [o, c] = t(s, i); + n.set(o, c); + }), n; + } + function ut(e, t) { + if (e) + if (t) { + for (const n of e) + if (t(n)) + return !0; + } else + return e.length > 0; + return !1; + } + function iR(e, t, n) { + let i; + for (let s = 0; s < e.length; s++) + t(e[s]) ? i = i === void 0 ? s : i : i !== void 0 && (n(i, s), i = void 0); + i !== void 0 && n(i, e.length); + } + function Hi(e, t) { + return ut(t) ? ut(e) ? [...e, ...t] : t : e; + } + function E5e(e, t) { + return t; + } + function nw(e) { + return e.map(E5e); + } + function D5e(e, t, n) { + const i = nw(e); + ige(e, i, n); + let s = e[i[0]]; + const o = [i[0]]; + for (let c = 1; c < i.length; c++) { + const _ = i[c], u = e[_]; + t(s, u) || (o.push(_), s = u); + } + return o.sort(), o.map((c) => e[c]); + } + function P5e(e, t) { + const n = []; + for (const i of e) + Zf(n, i, t); + return n; + } + function tb(e, t, n) { + return e.length === 0 ? [] : e.length === 1 ? e.slice() : n ? D5e(e, t, n) : P5e(e, t); + } + function w5e(e, t) { + if (e.length === 0) return He; + let n = e[0]; + const i = [n]; + for (let s = 1; s < e.length; s++) { + const o = e[s]; + switch (t(o, n)) { + case !0: + case 0: + continue; + case -1: + return E.fail("Array is unsorted."); + } + i.push(n = o); + } + return i; + } + function sR() { + return []; + } + function ry(e, t, n, i, s) { + if (e.length === 0) + return e.push(t), !0; + const o = Zh(e, t, lo, n); + if (o < 0) { + if (i && !s) { + const c = ~o; + if (c > 0 && i(t, e[c - 1])) + return !1; + if (c < e.length && i(t, e[c])) + return e.splice(c, 1, t), !0; + } + return e.splice(~o, 0, t), !0; + } + return s ? (e.splice(o, 0, t), !0) : !1; + } + function SE(e, t, n) { + return w5e(rb(e, t), n || t || Kl); + } + function nge(e, t) { + if (e.length < 2) return !0; + for (let n = 1, i = e.length; n < i; n++) + if (t(e[n - 1], e[n]) === 1) + return !1; + return !0; + } + function md(e, t, n = Kh) { + if (!e || !t) + return e === t; + if (e.length !== t.length) + return !1; + for (let i = 0; i < e.length; i++) + if (!n(e[i], t[i], i)) + return !1; + return !0; + } + function iw(e) { + let t; + if (e) + for (let n = 0; n < e.length; n++) { + const i = e[n]; + (t || !i) && (t || (t = e.slice(0, n)), i && t.push(i)); + } + return t || e; + } + function SX(e, t, n) { + if (!t || !e || t.length === 0 || e.length === 0) return t; + const i = []; + e: + for (let s = 0, o = 0; o < t.length; o++) { + o > 0 && E.assertGreaterThanOrEqual( + n(t[o], t[o - 1]), + 0 + /* EqualTo */ + ); + t: + for (const c = s; s < e.length; s++) + switch (s > c && E.assertGreaterThanOrEqual( + n(e[s], e[s - 1]), + 0 + /* EqualTo */ + ), n(t[o], e[s])) { + case -1: + i.push(t[o]); + continue e; + case 0: + continue e; + case 1: + continue t; + } + } + return i; + } + function Tr(e, t) { + return t === void 0 ? e : e === void 0 ? [t] : (e.push(t), e); + } + function gT(e, t) { + return e === void 0 ? t : t === void 0 ? e : ss(e) ? ss(t) ? Hi(e, t) : Tr(e, t) : ss(t) ? Tr(t, e) : [e, t]; + } + function TX(e, t) { + return t < 0 ? e.length + t : t; + } + function Bn(e, t, n, i) { + if (t === void 0 || t.length === 0) return e; + if (e === void 0) return t.slice(n, i); + n = n === void 0 ? 0 : TX(t, n), i = i === void 0 ? t.length : TX(t, i); + for (let s = n; s < i && s < t.length; s++) + t[s] !== void 0 && e.push(t[s]); + return e; + } + function Zf(e, t, n) { + return ls(e, t, n) ? !1 : (e.push(t), !0); + } + function sh(e, t, n) { + return e ? (Zf(e, t, n), e) : [t]; + } + function ige(e, t, n) { + t.sort((i, s) => n(e[i], e[s]) || uo(i, s)); + } + function rb(e, t) { + return e.length === 0 ? e : e.slice().sort(t); + } + function* aR(e) { + for (let t = e.length - 1; t >= 0; t--) + yield e[t]; + } + function Sg(e, t) { + const n = nw(e); + return ige(e, n, t), n.map((i) => e[i]); + } + function oR(e, t, n, i) { + for (; n < i; ) { + if (e[n] !== t[n]) + return !1; + n++; + } + return !0; + } + var ny = Array.prototype.at ? (e, t) => e?.at(t) : (e, t) => { + if (e && (t = TX(e, t), t < e.length)) + return e[t]; + }; + function ul(e) { + return e === void 0 || e.length === 0 ? void 0 : e[0]; + } + function lI(e) { + if (e) + for (const t of e) + return t; + } + function fa(e) { + return E.assert(e.length !== 0), e[0]; + } + function cR(e) { + for (const t of e) + return t; + E.fail("iterator is empty"); + } + function Bo(e) { + return e === void 0 || e.length === 0 ? void 0 : e[e.length - 1]; + } + function ia(e) { + return E.assert(e.length !== 0), e[e.length - 1]; + } + function Rm(e) { + return e && e.length === 1 ? e[0] : void 0; + } + function lR(e) { + return E.checkDefined(Rm(e)); + } + function jm(e) { + return e && e.length === 1 ? e[0] : e; + } + function uR(e, t, n) { + const i = e.slice(0); + return i[t] = n, i; + } + function Zh(e, t, n, i, s) { + return hT(e, n(t), n, i, s); + } + function hT(e, t, n, i, s) { + if (!ut(e)) + return -1; + let o = s || 0, c = e.length - 1; + for (; o <= c; ) { + const _ = o + (c - o >> 1), u = n(e[_], _); + switch (i(u, t)) { + case -1: + o = _ + 1; + break; + case 0: + return _; + case 1: + c = _ - 1; + break; + } + } + return ~o; + } + function Eu(e, t, n, i, s) { + if (e && e.length > 0) { + const o = e.length; + if (o > 0) { + let c = i === void 0 || i < 0 ? 0 : i; + const _ = s === void 0 || c + s > o - 1 ? o - 1 : c + s; + let u; + for (arguments.length <= 2 ? (u = e[c], c++) : u = n; c <= _; ) + u = t(u, e[c], c), c++; + return u; + } + } + return n; + } + var w1 = Object.prototype.hasOwnProperty; + function io(e, t) { + return w1.call(e, t); + } + function uI(e, t) { + return w1.call(e, t) ? e[t] : void 0; + } + function Gd(e) { + const t = []; + for (const n in e) + w1.call(e, n) && t.push(n); + return t; + } + function sge(e) { + const t = []; + do { + const n = Object.getOwnPropertyNames(e); + for (const i of n) + Zf(t, i); + } while (e = Object.getPrototypeOf(e)); + return t; + } + function yT(e) { + const t = []; + for (const n in e) + w1.call(e, n) && t.push(e[n]); + return t; + } + function xX(e, t) { + const n = new Array(e); + for (let i = 0; i < e; i++) + n[i] = t(i); + return n; + } + function ts(e, t) { + const n = []; + for (const i of e) + n.push(t ? t(i) : i); + return n; + } + function I2(e, ...t) { + for (const n of t) + if (n !== void 0) + for (const i in n) + io(n, i) && (e[i] = n[i]); + return e; + } + function kX(e, t, n = Kh) { + if (e === t) return !0; + if (!e || !t) return !1; + for (const i in e) + if (w1.call(e, i) && (!w1.call(t, i) || !n(e[i], t[i]))) + return !1; + for (const i in t) + if (w1.call(t, i) && !w1.call(e, i)) + return !1; + return !0; + } + function jk(e, t, n = lo) { + const i = /* @__PURE__ */ new Map(); + for (const s of e) { + const o = t(s); + o !== void 0 && i.set(o, n(s)); + } + return i; + } + function CX(e, t, n = lo) { + const i = []; + for (const s of e) + i[t(s)] = n(s); + return i; + } + function sw(e, t, n = lo) { + const i = Kf(); + for (const s of e) + i.add(t(s), n(s)); + return i; + } + function TE(e, t, n = lo) { + return ts(sw(e, t).values(), n); + } + function _R(e, t) { + const n = {}; + if (e) + for (const i of e) { + const s = `${t(i)}`; + (n[s] ?? (n[s] = [])).push(i); + } + return n; + } + function EX(e) { + const t = {}; + for (const n in e) + w1.call(e, n) && (t[n] = e[n]); + return t; + } + function _I(e, t) { + const n = {}; + for (const i in t) + w1.call(t, i) && (n[i] = t[i]); + for (const i in e) + w1.call(e, i) && (n[i] = e[i]); + return n; + } + function fR(e, t) { + for (const n in t) + w1.call(t, n) && (e[n] = t[n]); + } + function Ns(e, t) { + return t ? t.bind(e) : void 0; + } + function Kf() { + const e = /* @__PURE__ */ new Map(); + return e.add = A5e, e.remove = N5e, e; + } + function A5e(e, t) { + let n = this.get(e); + return n ? n.push(t) : this.set(e, n = [t]), n; + } + function N5e(e, t) { + const n = this.get(e); + n && (bT(n, t), n.length || this.delete(e)); + } + function aw(e) { + const t = e?.slice() || []; + let n = 0; + function i() { + return n === t.length; + } + function s(...c) { + t.push(...c); + } + function o() { + if (i()) + throw new Error("Queue is empty"); + const c = t[n]; + if (t[n] = void 0, n++, n > 100 && n > t.length >> 1) { + const _ = t.length - n; + t.copyWithin( + /*target*/ + 0, + /*start*/ + n + ), t.length = _, n = 0; + } + return c; + } + return { + enqueue: s, + dequeue: o, + isEmpty: i + }; + } + function pR(e, t) { + const n = /* @__PURE__ */ new Map(); + let i = 0; + function* s() { + for (const c of n.values()) + ss(c) ? yield* c : yield c; + } + const o = { + has(c) { + const _ = e(c); + if (!n.has(_)) return !1; + const u = n.get(_); + if (!ss(u)) return t(u, c); + for (const d of u) + if (t(d, c)) + return !0; + return !1; + }, + add(c) { + const _ = e(c); + if (n.has(_)) { + const u = n.get(_); + if (ss(u)) + ls(u, c, t) || (u.push(c), i++); + else { + const d = u; + t(d, c) || (n.set(_, [d, c]), i++); + } + } else + n.set(_, c), i++; + return this; + }, + delete(c) { + const _ = e(c); + if (!n.has(_)) return !1; + const u = n.get(_); + if (ss(u)) { + for (let d = 0; d < u.length; d++) + if (t(u[d], c)) + return u.length === 1 ? n.delete(_) : u.length === 2 ? n.set(_, u[1 - d]) : hR(u, d), i--, !0; + } else if (t(u, c)) + return n.delete(_), i--, !0; + return !1; + }, + clear() { + n.clear(), i = 0; + }, + get size() { + return i; + }, + forEach(c) { + for (const _ of ts(n.values())) + if (ss(_)) + for (const u of _) + c(u, u, o); + else { + const u = _; + c(u, u, o); + } + }, + keys() { + return s(); + }, + values() { + return s(); + }, + *entries() { + for (const c of s()) + yield [c, c]; + }, + [Symbol.iterator]: () => s(), + [Symbol.toStringTag]: n[Symbol.toStringTag] + }; + return o; + } + function ss(e) { + return Array.isArray(e); + } + function vT(e) { + return ss(e) ? e : [e]; + } + function Gi(e) { + return typeof e == "string"; + } + function iy(e) { + return typeof e == "number"; + } + function Jn(e, t) { + return e !== void 0 && t(e) ? e : void 0; + } + function Is(e, t) { + return e !== void 0 && t(e) ? e : E.fail(`Invalid cast. The supplied value ${e} did not pass the test '${E.getFunctionName(t)}'.`); + } + function ka(e) { + } + function $d() { + return !1; + } + function A1() { + return !0; + } + function nb() { + } + function lo(e) { + return e; + } + function DX(e) { + return e.toLowerCase(); + } + var age = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; + function sy(e) { + return age.test(e) ? e.replace(age, DX) : e; + } + function Rs() { + throw new Error("Not implemented"); + } + function Wu(e) { + let t; + return () => (e && (t = e(), e = void 0), t); + } + function Bm(e) { + const t = /* @__PURE__ */ new Map(); + return (n) => { + const i = `${typeof n}:${n}`; + let s = t.get(i); + return s === void 0 && !t.has(i) && (s = e(n), t.set(i, s)), s; + }; + } + function oge(e) { + const t = /* @__PURE__ */ new WeakMap(); + return (n) => { + let i = t.get(n); + return i === void 0 && !t.has(n) && (i = e(n), t.set(n, i)), i; + }; + } + function cge(e, t) { + return (...n) => { + let i = t.get(n); + return i === void 0 && !t.has(n) && (i = e(...n), t.set(n, i)), i; + }; + } + function lge(e, t, n, i, s) { + if (s) { + const o = []; + for (let c = 0; c < arguments.length; c++) + o[c] = arguments[c]; + return (c) => Eu(o, (_, u) => u(_), c); + } else return i ? (o) => i(n(t(e(o)))) : n ? (o) => n(t(e(o))) : t ? (o) => t(e(o)) : e ? (o) => e(o) : (o) => o; + } + var PX = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Normal = 1] = "Normal", e[e.Aggressive = 2] = "Aggressive", e[e.VeryAggressive = 3] = "VeryAggressive", e))(PX || {}); + function Kh(e, t) { + return e === t; + } + function N1(e, t) { + return e === t || e !== void 0 && t !== void 0 && e.toUpperCase() === t.toUpperCase(); + } + function O2(e, t) { + return Kh(e, t); + } + function uge(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : e < t ? -1 : 1; + } + function uo(e, t) { + return uge(e, t); + } + function fI(e, t) { + return uo(e?.start, t?.start) || uo(e?.length, t?.length); + } + function dR(e, t) { + return Eu(e, (n, i) => t(n, i) === -1 ? n : i); + } + function ow(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : (e = e.toUpperCase(), t = t.toUpperCase(), e < t ? -1 : e > t ? 1 : 0); + } + function wX(e, t) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : (e = e.toLowerCase(), t = t.toLowerCase(), e < t ? -1 : e > t ? 1 : 0); + } + function Kl(e, t) { + return uge(e, t); + } + function Bk(e) { + return e ? ow : Kl; + } + var I5e = /* @__PURE__ */ (() => { + return t; + function e(n, i, s) { + if (n === i) return 0; + if (n === void 0) return -1; + if (i === void 0) return 1; + const o = s(n, i); + return o < 0 ? -1 : o > 0 ? 1 : 0; + } + function t(n) { + const i = new Intl.Collator(n, { usage: "sort", sensitivity: "variant", numeric: !0 }).compare; + return (s, o) => e(s, o, i); + } + })(), AX, mR; + function NX() { + return mR; + } + function IX(e) { + mR !== e && (mR = e, AX = void 0); + } + function cw(e, t) { + return (AX || (AX = I5e(mR)))(e, t); + } + function OX(e, t, n, i) { + return e === t ? 0 : e === void 0 ? -1 : t === void 0 ? 1 : i(e[n], t[n]); + } + function I1(e, t) { + return uo(e ? 1 : 0, t ? 1 : 0); + } + function F2(e, t, n) { + const i = Math.max(2, Math.floor(e.length * 0.34)); + let s = Math.floor(e.length * 0.4) + 1, o; + for (const c of t) { + const _ = n(c); + if (_ !== void 0 && Math.abs(_.length - e.length) <= i) { + if (_ === e || _.length < 3 && _.toLowerCase() !== e.toLowerCase()) + continue; + const u = O5e(e, _, s - 0.1); + if (u === void 0) + continue; + E.assert(u < s), s = u, o = c; + } + } + return o; + } + function O5e(e, t, n) { + let i = new Array(t.length + 1), s = new Array(t.length + 1); + const o = n + 0.01; + for (let _ = 0; _ <= t.length; _++) + i[_] = _; + for (let _ = 1; _ <= e.length; _++) { + const u = e.charCodeAt(_ - 1), d = Math.ceil(_ > n ? _ - n : 1), g = Math.floor(t.length > n + _ ? n + _ : t.length); + s[0] = _; + let h = _; + for (let T = 1; T < d; T++) + s[T] = o; + for (let T = d; T <= g; T++) { + const C = e[_ - 1].toLowerCase() === t[T - 1].toLowerCase() ? i[T - 1] + 0.1 : i[T - 1] + 2, D = u === t.charCodeAt(T - 1) ? i[T - 1] : Math.min( + /*delete*/ + i[T] + 1, + /*insert*/ + s[T - 1] + 1, + /*substitute*/ + C + ); + s[T] = D, h = Math.min(h, D); + } + for (let T = g + 1; T <= t.length; T++) + s[T] = o; + if (h > n) + return; + const S = i; + i = s, s = S; + } + const c = i[t.length]; + return c > n ? void 0 : c; + } + function nc(e, t, n) { + const i = e.length - t.length; + return i >= 0 && (n ? N1(e.slice(i), t) : e.indexOf(t, i) === i); + } + function Jk(e, t) { + return nc(e, t) ? e.slice(0, e.length - t.length) : e; + } + function FX(e, t) { + return nc(e, t) ? e.slice(0, e.length - t.length) : void 0; + } + function gR(e) { + let t = e.length; + for (let n = t - 1; n > 0; n--) { + let i = e.charCodeAt(n); + if (i >= 48 && i <= 57) + do + --n, i = e.charCodeAt(n); + while (n > 0 && i >= 48 && i <= 57); + else if (n > 4 && (i === 110 || i === 78)) { + if (--n, i = e.charCodeAt(n), i !== 105 && i !== 73 || (--n, i = e.charCodeAt(n), i !== 109 && i !== 77)) + break; + --n, i = e.charCodeAt(n); + } else + break; + if (i !== 45 && i !== 46) + break; + t = n; + } + return t === e.length ? e : e.slice(0, t); + } + function xE(e, t) { + for (let n = 0; n < e.length; n++) + if (e[n] === t) + return ay(e, n), !0; + return !1; + } + function ay(e, t) { + for (let n = t; n < e.length - 1; n++) + e[n] = e[n + 1]; + e.pop(); + } + function hR(e, t) { + e[t] = e[e.length - 1], e.pop(); + } + function bT(e, t) { + return F5e(e, (n) => n === t); + } + function F5e(e, t) { + for (let n = 0; n < e.length; n++) + if (t(e[n])) + return hR(e, n), !0; + return !1; + } + function eu(e) { + return e ? lo : sy; + } + function LX({ prefix: e, suffix: t }) { + return `${e}*${t}`; + } + function MX(e, t) { + return E.assert(pI(e, t)), t.substring(e.prefix.length, t.length - e.suffix.length); + } + function yR(e, t, n) { + let i, s = -1; + for (const o of e) { + const c = t(o); + pI(c, n) && c.prefix.length > s && (s = c.prefix.length, i = o); + } + return i; + } + function zi(e, t, n) { + return n ? N1(e.slice(0, t.length), t) : e.lastIndexOf(t, 0) === 0; + } + function kE(e, t) { + return zi(e, t) ? e.substr(t.length) : e; + } + function vR(e, t, n = lo) { + return zi(n(e), n(t)) ? e.substring(t.length) : void 0; + } + function pI({ prefix: e, suffix: t }, n) { + return n.length >= e.length + t.length && zi(n, e) && nc(n, t); + } + function dI(e, t) { + return (n) => e(n) && t(n); + } + function Ef(...e) { + return (...t) => { + let n; + for (const i of e) + if (n = i(...t), n) + return n; + return n; + }; + } + function mI(e) { + return (...t) => !e(...t); + } + function _ge(e) { + } + function ST(e) { + return e === void 0 ? void 0 : [e]; + } + function gI(e, t, n, i, s, o) { + o = o || ka; + let c = 0, _ = 0; + const u = e.length, d = t.length; + let g = !1; + for (; c < u && _ < d; ) { + const h = e[c], S = t[_], T = n(h, S); + T === -1 ? (i(h), c++, g = !0) : T === 1 ? (s(S), _++, g = !0) : (o(S, h), c++, _++); + } + for (; c < u; ) + i(e[c++]), g = !0; + for (; _ < d; ) + s(t[_++]), g = !0; + return g; + } + function RX(e) { + const t = []; + return fge( + e, + t, + /*outer*/ + void 0, + 0 + ), t; + } + function fge(e, t, n, i) { + for (const s of e[i]) { + let o; + n ? (o = n.slice(), o.push(s)) : o = [s], i === e.length - 1 ? t.push(o) : fge(e, t, o, i + 1); + } + } + function bR(e, t) { + if (e) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) + i++; + return e.slice(0, i); + } + } + function jX(e, t) { + if (e) { + const n = e.length; + let i = 0; + for (; i < n && t(e[i]); ) + i++; + return e.slice(i); + } + } + function SR() { + return typeof process < "u" && !!process.nextTick && !process.browser && typeof $me < "u"; + } + var BX = /* @__PURE__ */ ((e) => (e[e.Off = 0] = "Off", e[e.Error = 1] = "Error", e[e.Warning = 2] = "Warning", e[e.Info = 3] = "Info", e[e.Verbose = 4] = "Verbose", e))(BX || {}), E; + ((e) => { + let t = 0; + e.currentLogLevel = 2, e.isDebugging = !1; + function n(Le) { + return e.currentLogLevel <= Le; + } + e.shouldLog = n; + function i(Le, At) { + e.loggingHost && n(Le) && e.loggingHost.log(Le, At); + } + function s(Le) { + i(3, Le); + } + e.log = s, ((Le) => { + function At(ri) { + i(1, ri); + } + Le.error = At; + function vr(ri) { + i(2, ri); + } + Le.warn = vr; + function ln(ri) { + i(3, ri); + } + Le.log = ln; + function Zn(ri) { + i(4, ri); + } + Le.trace = Zn; + })(s = e.log || (e.log = {})); + const o = {}; + function c() { + return t; + } + e.getAssertionLevel = c; + function _(Le) { + const At = t; + if (t = Le, Le > At) + for (const vr of Gd(o)) { + const ln = o[vr]; + ln !== void 0 && e[vr] !== ln.assertion && Le >= ln.level && (e[vr] = ln, o[vr] = void 0); + } + } + e.setAssertionLevel = _; + function u(Le) { + return t >= Le; + } + e.shouldAssert = u; + function d(Le, At) { + return u(Le) ? !0 : (o[At] = { level: Le, assertion: e[At] }, e[At] = ka, !1); + } + function g(Le, At) { + debugger; + const vr = new Error(Le ? `Debug Failure. ${Le}` : "Debug Failure."); + throw Error.captureStackTrace && Error.captureStackTrace(vr, At || g), vr; + } + e.fail = g; + function h(Le, At, vr) { + return g( + `${At || "Unexpected node."}\r +Node ${ae(Le.kind)} was unexpected.`, + vr || h + ); + } + e.failBadSyntaxKind = h; + function S(Le, At, vr, ln) { + Le || (At = At ? `False expression: ${At}` : "False expression.", vr && (At += `\r +Verbose Debug Information: ` + (typeof vr == "string" ? vr : vr())), g(At, ln || S)); + } + e.assert = S; + function T(Le, At, vr, ln, Zn) { + if (Le !== At) { + const ri = vr ? ln ? `${vr} ${ln}` : vr : ""; + g(`Expected ${Le} === ${At}. ${ri}`, Zn || T); + } + } + e.assertEqual = T; + function C(Le, At, vr, ln) { + Le >= At && g(`Expected ${Le} < ${At}. ${vr || ""}`, ln || C); + } + e.assertLessThan = C; + function D(Le, At, vr) { + Le > At && g(`Expected ${Le} <= ${At}`, vr || D); + } + e.assertLessThanOrEqual = D; + function P(Le, At, vr) { + Le < At && g(`Expected ${Le} >= ${At}`, vr || P); + } + e.assertGreaterThanOrEqual = P; + function O(Le, At, vr) { + Le == null && g(At, vr || O); + } + e.assertIsDefined = O; + function j(Le, At, vr) { + return O(Le, At, vr || j), Le; + } + e.checkDefined = j; + function F(Le, At, vr) { + for (const ln of Le) + O(ln, At, vr || F); + } + e.assertEachIsDefined = F; + function V(Le, At, vr) { + return F(Le, At, vr || V), Le; + } + e.checkEachDefined = V; + function L(Le, At = "Illegal value:", vr) { + const ln = typeof Le == "object" && io(Le, "kind") && io(Le, "pos") ? "SyntaxKind: " + ae(Le.kind) : JSON.stringify(Le); + return g(`${At} ${ln}`, vr || L); + } + e.assertNever = L; + function $(Le, At, vr, ln) { + d(1, "assertEachNode") && S( + At === void 0 || Ri(Le, At), + vr || "Unexpected node.", + () => `Node array did not pass test '${oe(At)}'.`, + ln || $ + ); + } + e.assertEachNode = $; + function U(Le, At, vr, ln) { + d(1, "assertNode") && S( + Le !== void 0 && (At === void 0 || At(Le)), + vr || "Unexpected node.", + () => `Node ${ae(Le?.kind)} did not pass test '${oe(At)}'.`, + ln || U + ); + } + e.assertNode = U; + function G(Le, At, vr, ln) { + d(1, "assertNotNode") && S( + Le === void 0 || At === void 0 || !At(Le), + vr || "Unexpected node.", + () => `Node ${ae(Le.kind)} should not have passed test '${oe(At)}'.`, + ln || G + ); + } + e.assertNotNode = G; + function ce(Le, At, vr, ln) { + d(1, "assertOptionalNode") && S( + At === void 0 || Le === void 0 || At(Le), + vr || "Unexpected node.", + () => `Node ${ae(Le?.kind)} did not pass test '${oe(At)}'.`, + ln || ce + ); + } + e.assertOptionalNode = ce; + function K(Le, At, vr, ln) { + d(1, "assertOptionalToken") && S( + At === void 0 || Le === void 0 || Le.kind === At, + vr || "Unexpected node.", + () => `Node ${ae(Le?.kind)} was not a '${ae(At)}' token.`, + ln || K + ); + } + e.assertOptionalToken = K; + function X(Le, At, vr) { + d(1, "assertMissingNode") && S( + Le === void 0, + At || "Unexpected node.", + () => `Node ${ae(Le.kind)} was unexpected'.`, + vr || X + ); + } + e.assertMissingNode = X; + function Z(Le) { + } + e.type = Z; + function oe(Le) { + if (typeof Le != "function") + return ""; + if (io(Le, "name")) + return Le.name; + { + const At = Function.prototype.toString.call(Le), vr = /^function\s+([\w$]+)\s*\(/.exec(At); + return vr ? vr[1] : ""; + } + } + e.getFunctionName = oe; + function ne(Le) { + return `{ name: ${Pi(Le.escapedName)}; flags: ${Ie(Le.flags)}; declarations: ${or(Le.declarations, (At) => ae(At.kind))} }`; + } + e.formatSymbol = ne; + function pe(Le = 0, At, vr) { + const ln = H(At); + if (Le === 0) + return ln.length > 0 && ln[0][0] === 0 ? ln[0][1] : "0"; + if (vr) { + const Zn = []; + let ri = Le; + for (const [mi, Ps] of ln) { + if (mi > Le) + break; + mi !== 0 && mi & Le && (Zn.push(Ps), ri &= ~mi); + } + if (ri === 0) + return Zn.join("|"); + } else + for (const [Zn, ri] of ln) + if (Zn === Le) + return ri; + return Le.toString(); + } + e.formatEnum = pe; + const fe = /* @__PURE__ */ new Map(); + function H(Le) { + const At = fe.get(Le); + if (At) + return At; + const vr = []; + for (const Zn in Le) { + const ri = Le[Zn]; + typeof ri == "number" && vr.push([ri, Zn]); + } + const ln = Sg(vr, (Zn, ri) => uo(Zn[0], ri[0])); + return fe.set(Le, ln), ln; + } + function ae(Le) { + return pe( + Le, + CR, + /*isFlags*/ + !1 + ); + } + e.formatSyntaxKind = ae; + function le(Le) { + return pe( + Le, + BR, + /*isFlags*/ + !1 + ); + } + e.formatSnippetKind = le; + function Ae(Le) { + return pe( + Le, + RR, + /*isFlags*/ + !1 + ); + } + e.formatScriptKind = Ae; + function ge(Le) { + return pe( + Le, + ER, + /*isFlags*/ + !0 + ); + } + e.formatNodeFlags = ge; + function de(Le) { + return pe( + Le, + OR, + /*isFlags*/ + !0 + ); + } + e.formatNodeCheckFlags = de; + function ve(Le) { + return pe( + Le, + DR, + /*isFlags*/ + !0 + ); + } + e.formatModifierFlags = ve; + function De(Le) { + return pe( + Le, + jR, + /*isFlags*/ + !0 + ); + } + e.formatTransformFlags = De; + function Xe(Le) { + return pe( + Le, + JR, + /*isFlags*/ + !0 + ); + } + e.formatEmitFlags = Xe; + function Ie(Le) { + return pe( + Le, + IR, + /*isFlags*/ + !0 + ); + } + e.formatSymbolFlags = Ie; + function ye(Le) { + return pe( + Le, + FR, + /*isFlags*/ + !0 + ); + } + e.formatTypeFlags = ye; + function Fe(Le) { + return pe( + Le, + MR, + /*isFlags*/ + !0 + ); + } + e.formatSignatureFlags = Fe; + function Qe(Le) { + return pe( + Le, + LR, + /*isFlags*/ + !0 + ); + } + e.formatObjectFlags = Qe; + function Ke(Le) { + return pe( + Le, + vI, + /*isFlags*/ + !0 + ); + } + e.formatFlowFlags = Ke; + function Be(Le) { + return pe( + Le, + PR, + /*isFlags*/ + !0 + ); + } + e.formatRelationComparisonResult = Be; + function at(Le) { + return pe( + Le, + Gz, + /*isFlags*/ + !0 + ); + } + e.formatCheckMode = at; + function Wt(Le) { + return pe( + Le, + $z, + /*isFlags*/ + !0 + ); + } + e.formatSignatureCheckMode = Wt; + function nr(Le) { + return pe( + Le, + Hz, + /*isFlags*/ + !0 + ); + } + e.formatTypeFacts = nr; + let Kt = !1, Pr; + function Vt(Le) { + "__debugFlowFlags" in Le || Object.defineProperties(Le, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const At = this.flags & 2 ? "FlowStart" : this.flags & 4 ? "FlowBranchLabel" : this.flags & 8 ? "FlowLoopLabel" : this.flags & 16 ? "FlowAssignment" : this.flags & 32 ? "FlowTrueCondition" : this.flags & 64 ? "FlowFalseCondition" : this.flags & 128 ? "FlowSwitchClause" : this.flags & 256 ? "FlowArrayMutation" : this.flags & 512 ? "FlowCall" : this.flags & 1024 ? "FlowReduceLabel" : this.flags & 1 ? "FlowUnreachable" : "UnknownFlow", vr = this.flags & -2048; + return `${At}${vr ? ` (${Ke(vr)})` : ""}`; + } + }, + __debugFlowFlags: { + get() { + return pe( + this.flags, + vI, + /*isFlags*/ + !0 + ); + } + }, + __debugToString: { + value() { + return Ss(this); + } + } + }); + } + function zt(Le) { + return Kt && (typeof Object.setPrototypeOf == "function" ? (Pr || (Pr = Object.create(Object.prototype), Vt(Pr)), Object.setPrototypeOf(Le, Pr)) : Vt(Le)), Le; + } + e.attachFlowNodeDebugInfo = zt; + let jr; + function ci(Le) { + "__tsDebuggerDisplay" in Le || Object.defineProperties(Le, { + __tsDebuggerDisplay: { + value(At) { + return At = String(At).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]"), `NodeArray ${At}`; + } + } + }); + } + function Xt(Le) { + Kt && (typeof Object.setPrototypeOf == "function" ? (jr || (jr = Object.create(Array.prototype), ci(jr)), Object.setPrototypeOf(Le, jr)) : ci(Le)); + } + e.attachNodeArrayDebugInfo = Xt; + function Ai() { + if (Kt) return; + const Le = /* @__PURE__ */ new WeakMap(), At = /* @__PURE__ */ new WeakMap(); + Object.defineProperties(zl.getSymbolConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const ln = this.flags & 33554432 ? "TransientSymbol" : "Symbol", Zn = this.flags & -33554433; + return `${ln} '${uc(this)}'${Zn ? ` (${Ie(Zn)})` : ""}`; + } + }, + __debugFlags: { + get() { + return Ie(this.flags); + } + } + }), Object.defineProperties(zl.getTypeConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + const ln = this.flags & 67359327 ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 ? "NullableType" : this.flags & 384 ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 ? "UniqueESSymbolType" : this.flags & 32 ? "EnumType" : this.flags & 1048576 ? "UnionType" : this.flags & 2097152 ? "IntersectionType" : this.flags & 4194304 ? "IndexType" : this.flags & 8388608 ? "IndexedAccessType" : this.flags & 16777216 ? "ConditionalType" : this.flags & 33554432 ? "SubstitutionType" : this.flags & 262144 ? "TypeParameter" : this.flags & 524288 ? this.objectFlags & 3 ? "InterfaceType" : this.objectFlags & 4 ? "TypeReference" : this.objectFlags & 8 ? "TupleType" : this.objectFlags & 16 ? "AnonymousType" : this.objectFlags & 32 ? "MappedType" : this.objectFlags & 1024 ? "ReverseMappedType" : this.objectFlags & 256 ? "EvolvingArrayType" : "ObjectType" : "Type", Zn = this.flags & 524288 ? this.objectFlags & -1344 : 0; + return `${ln}${this.symbol ? ` '${uc(this.symbol)}'` : ""}${Zn ? ` (${Qe(Zn)})` : ""}`; + } + }, + __debugFlags: { + get() { + return ye(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 ? Qe(this.objectFlags) : ""; + } + }, + __debugTypeToString: { + value() { + let ln = Le.get(this); + return ln === void 0 && (ln = this.checker.typeToString(this), Le.set(this, ln)), ln; + } + } + }), Object.defineProperties(zl.getSignatureConstructor().prototype, { + __debugFlags: { + get() { + return Fe(this.flags); + } + }, + __debugSignatureToString: { + value() { + var ln; + return (ln = this.checker) == null ? void 0 : ln.signatureToString(this); + } + } + }); + const vr = [ + zl.getNodeConstructor(), + zl.getIdentifierConstructor(), + zl.getTokenConstructor(), + zl.getSourceFileConstructor() + ]; + for (const ln of vr) + io(ln.prototype, "__debugKind") || Object.defineProperties(ln.prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value() { + return `${Fo(this) ? "GeneratedIdentifier" : Re(this) ? `Identifier '${dn(this)}'` : wi(this) ? `PrivateIdentifier '${dn(this)}'` : Ks(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : m_(this) ? `NumericLiteral ${this.text}` : eA(this) ? `BigIntLiteral ${this.text}n` : Mo(this) ? "TypeParameterDeclaration" : ji(this) ? "ParameterDeclaration" : ec(this) ? "ConstructorDeclaration" : Af(this) ? "GetAccessorDeclaration" : rf(this) ? "SetAccessorDeclaration" : px(this) ? "CallSignatureDeclaration" : nA(this) ? "ConstructSignatureDeclaration" : Pb(this) ? "IndexSignatureDeclaration" : dx(this) ? "TypePredicateNode" : Nf(this) ? "TypeReferenceNode" : Xm(this) ? "FunctionTypeNode" : wC(this) ? "ConstructorTypeNode" : wb(this) ? "TypeQueryNode" : Xu(this) ? "TypeLiteralNode" : iA(this) ? "ArrayTypeNode" : mx(this) ? "TupleTypeNode" : V5(this) ? "OptionalTypeNode" : U5(this) ? "RestTypeNode" : ky(this) ? "UnionTypeNode" : gx(this) ? "IntersectionTypeNode" : Ab(this) ? "ConditionalTypeNode" : rS(this) ? "InferTypeNode" : nS(this) ? "ParenthesizedTypeNode" : NC(this) ? "ThisTypeNode" : K1(this) ? "TypeOperatorNode" : Nb(this) ? "IndexedAccessTypeNode" : iS(this) ? "MappedTypeNode" : y0(this) ? "LiteralTypeNode" : AC(this) ? "NamedTupleMember" : Qm(this) ? "ImportTypeNode" : ae(this.kind)}${this.flags ? ` (${ge(this.flags)})` : ""}`; + } + }, + __debugKind: { + get() { + return ae(this.kind); + } + }, + __debugNodeFlags: { + get() { + return ge(this.flags); + } + }, + __debugModifierFlags: { + get() { + return ve(CK(this)); + } + }, + __debugTransformFlags: { + get() { + return De(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return WE(this); + } + }, + __debugEmitFlags: { + get() { + return Xe(ua(this)); + } + }, + __debugGetText: { + value(Zn) { + if (oo(this)) return ""; + let ri = At.get(this); + if (ri === void 0) { + const mi = Ki(this), Ps = mi && xr(mi); + ri = Ps ? ub(Ps, mi, Zn) : "", At.set(this, ri); + } + return ri; + } + } + }); + Kt = !0; + } + e.enableDebugInfo = Ai; + function _s(Le) { + const At = Le & 7; + let vr = At === 0 ? "in out" : At === 3 ? "[bivariant]" : At === 2 ? "in" : At === 1 ? "out" : At === 4 ? "[independent]" : ""; + return Le & 8 ? vr += " (unmeasurable)" : Le & 16 && (vr += " (unreliable)"), vr; + } + e.formatVariance = _s; + class $n { + __debugToString() { + var At; + switch (this.kind) { + case 3: + return ((At = this.debugInfo) == null ? void 0 : At.call(this)) || "(function mapper)"; + case 0: + return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`; + case 1: + return ZM( + this.sources, + this.targets || or(this.sources, () => "any"), + (vr, ln) => `${vr.__debugTypeToString()} -> ${typeof ln == "string" ? ln : ln.__debugTypeToString()}` + ).join(", "); + case 2: + return ZM( + this.sources, + this.targets, + (vr, ln) => `${vr.__debugTypeToString()} -> ${ln().__debugTypeToString()}` + ).join(", "); + case 5: + case 4: + return `m1: ${this.mapper1.__debugToString().split(` +`).join(` + `)} +m2: ${this.mapper2.__debugToString().split(` +`).join(` + `)}`; + default: + return L(this); + } + } + } + e.DebugTypeMapper = $n; + function os(Le) { + return e.isDebugging ? Object.setPrototypeOf(Le, $n.prototype) : Le; + } + e.attachDebugPrototypeIfDebug = os; + function wr(Le) { + return console.log(Ss(Le)); + } + e.printControlFlowGraph = wr; + function Ss(Le) { + let At = -1; + function vr(he) { + return he.id || (he.id = At, At--), he.id; + } + let ln; + ((he) => { + he.lr = "─", he.ud = "│", he.dr = "╭", he.dl = "╮", he.ul = "╯", he.ur = "╰", he.udr = "├", he.udl = "┤", he.dlr = "┬", he.ulr = "┴", he.udlr = "╫"; + })(ln || (ln = {})); + let Zn; + ((he) => { + he[he.None = 0] = "None", he[he.Up = 1] = "Up", he[he.Down = 2] = "Down", he[he.Left = 4] = "Left", he[he.Right = 8] = "Right", he[he.UpDown = 3] = "UpDown", he[he.LeftRight = 12] = "LeftRight", he[he.UpLeft = 5] = "UpLeft", he[he.UpRight = 9] = "UpRight", he[he.DownLeft = 6] = "DownLeft", he[he.DownRight = 10] = "DownRight", he[he.UpDownLeft = 7] = "UpDownLeft", he[he.UpDownRight = 11] = "UpDownRight", he[he.UpLeftRight = 13] = "UpLeftRight", he[he.DownLeftRight = 14] = "DownLeftRight", he[he.UpDownLeftRight = 15] = "UpDownLeftRight", he[he.NoChildren = 16] = "NoChildren"; + })(Zn || (Zn = {})); + const ri = 2032, mi = 882, Ps = /* @__PURE__ */ Object.create( + /*o*/ + null + ), ws = [], Yt = et(Le, /* @__PURE__ */ new Set()); + for (const he of ws) + he.text = Ut(he.flowNode, he.circular), jt(he); + const Ca = be(Yt), $e = ft(Ca); + return bt(Yt, 0), W(); + function nt(he) { + return !!(he.flags & 128); + } + function te(he) { + return !!(he.flags & 12) && !!he.antecedent; + } + function rt(he) { + return !!(he.flags & ri); + } + function re(he) { + return !!(he.flags & mi); + } + function Ee(he) { + const q = []; + for (const we of he.edges) + we.source === he && q.push(we.target); + return q; + } + function Ne(he) { + const q = []; + for (const we of he.edges) + we.target === he && q.push(we.source); + return q; + } + function et(he, q) { + const we = vr(he); + let _e = Ps[we]; + if (_e && q.has(he)) + return _e.circular = !0, _e = { + id: -1, + flowNode: he, + edges: [], + text: "", + lane: -1, + endLane: -1, + level: -1, + circular: "circularity" + }, ws.push(_e), _e; + if (q.add(he), !_e) + if (Ps[we] = _e = { id: we, flowNode: he, edges: [], text: "", lane: -1, endLane: -1, level: -1, circular: !1 }, ws.push(_e), te(he)) + for (const Te of he.antecedent) + lt(_e, Te, q); + else rt(he) && lt(_e, he.antecedent, q); + return q.delete(he), _e; + } + function lt(he, q, we) { + const _e = et(q, we), Te = { source: he, target: _e }; + he.edges.push(Te), _e.edges.push(Te); + } + function jt(he) { + if (he.level !== -1) + return he.level; + let q = 0; + for (const we of Ne(he)) + q = Math.max(q, jt(we) + 1); + return he.level = q; + } + function be(he) { + let q = 0; + for (const we of Ee(he)) + q = Math.max(q, be(we)); + return q + 1; + } + function ft(he) { + const q = st(Array(he), 0); + for (const we of ws) + q[we.level] = Math.max(q[we.level], we.text.length); + return q; + } + function bt(he, q) { + if (he.lane === -1) { + he.lane = q, he.endLane = q; + const we = Ee(he); + for (let _e = 0; _e < we.length; _e++) { + _e > 0 && q++; + const Te = we[_e]; + bt(Te, q), Te.endLane > he.endLane && (q = Te.endLane); + } + he.endLane = q; + } + } + function kt(he) { + if (he & 2) return "Start"; + if (he & 4) return "Branch"; + if (he & 8) return "Loop"; + if (he & 16) return "Assignment"; + if (he & 32) return "True"; + if (he & 64) return "False"; + if (he & 128) return "SwitchClause"; + if (he & 256) return "ArrayMutation"; + if (he & 512) return "Call"; + if (he & 1024) return "ReduceLabel"; + if (he & 1) return "Unreachable"; + throw new Error(); + } + function yt(he) { + const q = xr(he); + return ub( + q, + he, + /*includeTrivia*/ + !1 + ); + } + function Ut(he, q) { + let we = kt(he.flags); + if (q && (we = `${we}#${vr(he)}`), nt(he)) { + const _e = [], { switchStatement: Te, clauseStart: dt, clauseEnd: xt } = he.node; + for (let wt = dt; wt < xt; wt++) { + const ir = Te.caseBlock.clauses[wt]; + cD(ir) ? _e.push("default") : _e.push(yt(ir.expression)); + } + we += ` (${_e.join(", ")})`; + } else re(he) && he.node && (we += ` (${yt(he.node)})`); + return q === "circularity" ? `Circular(${we})` : we; + } + function W() { + const he = $e.length, q = ws.reduce((xt, wt) => Math.max(xt, wt.lane), 0) + 1, we = st(Array(q), ""), _e = $e.map(() => Array(q)), Te = $e.map(() => st(Array(q), 0)); + for (const xt of ws) { + _e[xt.level][xt.lane] = xt; + const wt = Ee(xt); + for (let br = 0; br < wt.length; br++) { + const Lr = wt[br]; + let en = 8; + Lr.lane === xt.lane && (en |= 4), br > 0 && (en |= 1), br < wt.length - 1 && (en |= 2), Te[xt.level][Lr.lane] |= en; + } + wt.length === 0 && (Te[xt.level][xt.lane] |= 16); + const ir = Ne(xt); + for (let br = 0; br < ir.length; br++) { + const Lr = ir[br]; + let en = 4; + br > 0 && (en |= 1), br < ir.length - 1 && (en |= 2), Te[xt.level - 1][Lr.lane] |= en; + } + } + for (let xt = 0; xt < he; xt++) + for (let wt = 0; wt < q; wt++) { + const ir = xt > 0 ? Te[xt - 1][wt] : 0, br = wt > 0 ? Te[xt][wt - 1] : 0; + let Lr = Te[xt][wt]; + Lr || (ir & 8 && (Lr |= 12), br & 2 && (Lr |= 3), Te[xt][wt] = Lr); + } + for (let xt = 0; xt < he; xt++) + for (let wt = 0; wt < we.length; wt++) { + const ir = Te[xt][wt], br = ir & 4 ? "─" : " ", Lr = _e[xt][wt]; + Lr ? (dt(wt, Lr.text), xt < he - 1 && (dt(wt, " "), dt(wt, z(br, $e[xt] - Lr.text.length)))) : xt < he - 1 && dt(wt, z(br, $e[xt] + 1)), dt(wt, je(ir)), dt(wt, ir & 8 && xt < he - 1 && !_e[xt + 1][wt] ? "─" : " "); + } + return ` +${we.join(` +`)} +`; + function dt(xt, wt) { + we[xt] += wt; + } + } + function je(he) { + switch (he) { + case 3: + return "│"; + case 12: + return "─"; + case 5: + return "╯"; + case 9: + return "╰"; + case 6: + return "╮"; + case 10: + return "╭"; + case 7: + return "┤"; + case 11: + return "├"; + case 13: + return "┴"; + case 14: + return "┬"; + case 15: + return "╫"; + } + return " "; + } + function st(he, q) { + if (he.fill) + he.fill(q); + else + for (let we = 0; we < he.length; we++) + he[we] = q; + return he; + } + function z(he, q) { + if (he.repeat) + return q > 0 ? he.repeat(q) : ""; + let we = ""; + for (; we.length < q; ) + we += he; + return we; + } + } + e.formatControlFlowGraph = Ss; + })(E || (E = {})); + var L5e = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i, M5e = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i, R5e = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i, j5e = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i, B5e = /^[a-z0-9-]+$/i, pge = /^(0|[1-9]\d*)$/, JX = class oI { + constructor(t, n = 0, i = 0, s = "", o = "") { + typeof t == "string" && ({ major: t, minor: n, patch: i, prerelease: s, build: o } = E.checkDefined(dge(t), "Invalid version")), E.assert(t >= 0, "Invalid argument: major"), E.assert(n >= 0, "Invalid argument: minor"), E.assert(i >= 0, "Invalid argument: patch"); + const c = s ? ss(s) ? s : s.split(".") : He, _ = o ? ss(o) ? o : o.split(".") : He; + E.assert(Ri(c, (u) => R5e.test(u)), "Invalid argument: prerelease"), E.assert(Ri(_, (u) => B5e.test(u)), "Invalid argument: build"), this.major = t, this.minor = n, this.patch = i, this.prerelease = c, this.build = _; + } + static tryParse(t) { + const n = dge(t); + if (!n) return; + const { major: i, minor: s, patch: o, prerelease: c, build: _ } = n; + return new oI(i, s, o, c, _); + } + compareTo(t) { + return this === t ? 0 : t === void 0 ? 1 : uo(this.major, t.major) || uo(this.minor, t.minor) || uo(this.patch, t.patch) || J5e(this.prerelease, t.prerelease); + } + increment(t) { + switch (t) { + case "major": + return new oI(this.major + 1, 0, 0); + case "minor": + return new oI(this.major, this.minor + 1, 0); + case "patch": + return new oI(this.major, this.minor, this.patch + 1); + default: + return E.assertNever(t); + } + } + with(t) { + const { + major: n = this.major, + minor: i = this.minor, + patch: s = this.patch, + prerelease: o = this.prerelease, + build: c = this.build + } = t; + return new oI(n, i, s, o, c); + } + toString() { + let t = `${this.major}.${this.minor}.${this.patch}`; + return ut(this.prerelease) && (t += `-${this.prerelease.join(".")}`), ut(this.build) && (t += `+${this.build.join(".")}`), t; + } + }; + JX.zero = new JX(0, 0, 0, ["0"]); + var gd = JX; + function dge(e) { + const t = L5e.exec(e); + if (!t) return; + const [, n, i = "0", s = "0", o = "", c = ""] = t; + if (!(o && !M5e.test(o)) && !(c && !j5e.test(c))) + return { + major: parseInt(n, 10), + minor: parseInt(i, 10), + patch: parseInt(s, 10), + prerelease: o, + build: c + }; + } + function J5e(e, t) { + if (e === t) return 0; + if (e.length === 0) return t.length === 0 ? 0 : 1; + if (t.length === 0) return -1; + const n = Math.min(e.length, t.length); + for (let i = 0; i < n; i++) { + const s = e[i], o = t[i]; + if (s === o) continue; + const c = pge.test(s), _ = pge.test(o); + if (c || _) { + if (c !== _) return c ? -1 : 1; + const u = uo(+s, +o); + if (u) return u; + } else { + const u = Kl(s, o); + if (u) return u; + } + } + return uo(e.length, t.length); + } + var hI = class y5e { + constructor(t) { + this._alternatives = t ? E.checkDefined(mge(t), "Invalid range spec.") : He; + } + static tryParse(t) { + const n = mge(t); + if (n) { + const i = new y5e(""); + return i._alternatives = n, i; + } + } + /** + * Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`. + * in `node-semver`. + */ + test(t) { + return typeof t == "string" && (t = new gd(t)), $5e(t, this._alternatives); + } + toString() { + return Y5e(this._alternatives); + } + }, z5e = /\|\|/g, W5e = /\s+/g, V5e = /^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i, U5e = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i, q5e = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; + function mge(e) { + const t = []; + for (let n of e.trim().split(z5e)) { + if (!n) continue; + const i = []; + n = n.trim(); + const s = U5e.exec(n); + if (s) { + if (!H5e(s[1], s[2], i)) return; + } else + for (const o of n.split(W5e)) { + const c = q5e.exec(o.trim()); + if (!c || !G5e(c[1], c[2], i)) return; + } + t.push(i); + } + return t; + } + function zX(e) { + const t = V5e.exec(e); + if (!t) return; + const [, n, i = "*", s = "*", o, c] = t; + return { version: new gd( + Dp(n) ? 0 : parseInt(n, 10), + Dp(n) || Dp(i) ? 0 : parseInt(i, 10), + Dp(n) || Dp(i) || Dp(s) ? 0 : parseInt(s, 10), + o, + c + ), major: n, minor: i, patch: s }; + } + function H5e(e, t, n) { + const i = zX(e); + if (!i) return !1; + const s = zX(t); + return s ? (Dp(i.major) || n.push(Jm(">=", i.version)), Dp(s.major) || n.push( + Dp(s.minor) ? Jm("<", s.version.increment("major")) : Dp(s.patch) ? Jm("<", s.version.increment("minor")) : Jm("<=", s.version) + ), !0) : !1; + } + function G5e(e, t, n) { + const i = zX(t); + if (!i) return !1; + const { version: s, major: o, minor: c, patch: _ } = i; + if (Dp(o)) + (e === "<" || e === ">") && n.push(Jm("<", gd.zero)); + else switch (e) { + case "~": + n.push(Jm(">=", s)), n.push(Jm( + "<", + s.increment( + Dp(c) ? "major" : "minor" + ) + )); + break; + case "^": + n.push(Jm(">=", s)), n.push(Jm( + "<", + s.increment( + s.major > 0 || Dp(c) ? "major" : s.minor > 0 || Dp(_) ? "minor" : "patch" + ) + )); + break; + case "<": + case ">=": + n.push( + Dp(c) || Dp(_) ? Jm(e, s.with({ prerelease: "0" })) : Jm(e, s) + ); + break; + case "<=": + case ">": + n.push( + Dp(c) ? Jm(e === "<=" ? "<" : ">=", s.increment("major").with({ prerelease: "0" })) : Dp(_) ? Jm(e === "<=" ? "<" : ">=", s.increment("minor").with({ prerelease: "0" })) : Jm(e, s) + ); + break; + case "=": + case void 0: + Dp(c) || Dp(_) ? (n.push(Jm(">=", s.with({ prerelease: "0" }))), n.push(Jm("<", s.increment(Dp(c) ? "major" : "minor").with({ prerelease: "0" })))) : n.push(Jm("=", s)); + break; + default: + return !1; + } + return !0; + } + function Dp(e) { + return e === "*" || e === "x" || e === "X"; + } + function Jm(e, t) { + return { operator: e, operand: t }; + } + function $5e(e, t) { + if (t.length === 0) return !0; + for (const n of t) + if (X5e(e, n)) return !0; + return !1; + } + function X5e(e, t) { + for (const n of t) + if (!Q5e(e, n.operator, n.operand)) return !1; + return !0; + } + function Q5e(e, t, n) { + const i = e.compareTo(n); + switch (t) { + case "<": + return i < 0; + case "<=": + return i <= 0; + case ">": + return i > 0; + case ">=": + return i >= 0; + case "=": + return i === 0; + default: + return E.assertNever(t); + } + } + function Y5e(e) { + return or(e, Z5e).join(" || ") || "*"; + } + function Z5e(e) { + return or(e, K5e).join(" "); + } + function K5e(e) { + return `${e.operator}${e.operand}`; + } + function eOe() { + if (SR()) + try { + const { performance: e } = gE; + return { + shouldWriteNativeEvents: !1, + performance: e + }; + } catch { + } + if (typeof performance == "object") + return { + shouldWriteNativeEvents: !0, + performance + }; + } + function tOe() { + const e = eOe(); + if (!e) return; + const { shouldWriteNativeEvents: t, performance: n } = e, i = { + shouldWriteNativeEvents: t, + performance: void 0, + performanceTime: void 0 + }; + return typeof n.timeOrigin == "number" && typeof n.now == "function" && (i.performanceTime = n), i.performanceTime && typeof n.mark == "function" && typeof n.measure == "function" && typeof n.clearMarks == "function" && typeof n.clearMeasures == "function" && (i.performance = n), i; + } + var WX = tOe(), gge = WX?.performanceTime; + function VX() { + return WX; + } + var Io = gge ? () => gge.now() : Date.now, yI; + try { + const e = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw"; + yI = $me(e); + } catch { + yI = void 0; + } + var Vu = yI?.logEvent ? yI : void 0, UX = {}; + Qa(UX, { + clearMarks: () => Tge, + clearMeasures: () => Sge, + createTimer: () => TR, + createTimerIf: () => hge, + disable: () => GX, + enable: () => kR, + forEachMark: () => bge, + forEachMeasure: () => xR, + getCount: () => vge, + getDuration: () => wE, + isEnabled: () => HX, + mark: () => Yo, + measure: () => ep, + nullTimer: () => qX + }); + var CE, L2; + function hge(e, t, n, i) { + return e ? TR(t, n, i) : qX; + } + function TR(e, t, n) { + let i = 0; + return { + enter: s, + exit: o + }; + function s() { + ++i === 1 && Yo(t); + } + function o() { + --i === 0 ? (Yo(n), ep(e, t, n)) : i < 0 && E.fail("enter/exit count does not match."); + } + } + var qX = { enter: ka, exit: ka }, EE = !1, yge = Io(), DE = /* @__PURE__ */ new Map(), lw = /* @__PURE__ */ new Map(), PE = /* @__PURE__ */ new Map(); + function Yo(e) { + if (EE) { + const t = lw.get(e) ?? 0; + lw.set(e, t + 1), DE.set(e, Io()), L2?.mark(e), typeof onProfilerEvent == "function" && onProfilerEvent(e); + } + } + function ep(e, t, n) { + if (EE) { + const i = (n !== void 0 ? DE.get(n) : void 0) ?? Io(), s = (t !== void 0 ? DE.get(t) : void 0) ?? yge, o = PE.get(e) || 0; + PE.set(e, o + (i - s)), L2?.measure(e, t, n); + } + } + function vge(e) { + return lw.get(e) || 0; + } + function wE(e) { + return PE.get(e) || 0; + } + function xR(e) { + PE.forEach((t, n) => e(n, t)); + } + function bge(e) { + DE.forEach((t, n) => e(n)); + } + function Sge(e) { + e !== void 0 ? PE.delete(e) : PE.clear(), L2?.clearMeasures(e); + } + function Tge(e) { + e !== void 0 ? (lw.delete(e), DE.delete(e)) : (lw.clear(), DE.clear()), L2?.clearMarks(e); + } + function HX() { + return EE; + } + function kR(e = _l) { + var t; + return EE || (EE = !0, CE || (CE = VX()), CE?.performance && (yge = CE.performance.timeOrigin, (CE.shouldWriteNativeEvents || (t = e?.cpuProfilingEnabled) != null && t.call(e) || e?.debugMode) && (L2 = CE.performance))), !0; + } + function GX() { + EE && (DE.clear(), lw.clear(), PE.clear(), L2 = void 0, EE = !1); + } + var rn, uw; + ((e) => { + let t, n = 0, i = 0, s; + const o = []; + let c; + const _ = []; + function u($, U, G) { + if (E.assert(!rn, "Tracing already started"), t === void 0) + try { + t = gE; + } catch (oe) { + throw new Error(`tracing requires having fs +(original error: ${oe.message || oe})`); + } + s = $, o.length = 0, c === void 0 && (c = Mn(U, "legend.json")), t.existsSync(U) || t.mkdirSync(U, { recursive: !0 }); + const ce = s === "build" ? `.${process.pid}-${++n}` : s === "server" ? `.${process.pid}` : "", K = Mn(U, `trace${ce}.json`), X = Mn(U, `types${ce}.json`); + _.push({ + configFilePath: G, + tracePath: K, + typesPath: X + }), i = t.openSync(K, "w"), rn = e; + const Z = { cat: "__metadata", ph: "M", ts: 1e3 * Io(), pid: 1, tid: 1 }; + t.writeSync( + i, + `[ +` + [{ name: "process_name", args: { name: "tsc" }, ...Z }, { name: "thread_name", args: { name: "Main" }, ...Z }, { name: "TracingStartedInBrowser", ...Z, cat: "disabled-by-default-devtools.timeline" }].map((oe) => JSON.stringify(oe)).join(`, +`) + ); + } + e.startTracing = u; + function d() { + E.assert(rn, "Tracing is not in progress"), E.assert(!!o.length == (s !== "server")), t.writeSync(i, ` +] +`), t.closeSync(i), rn = void 0, o.length ? V(o) : _[_.length - 1].typesPath = void 0; + } + e.stopTracing = d; + function g($) { + s !== "server" && o.push($); + } + e.recordType = g, (($) => { + $.Parse = "parse", $.Program = "program", $.Bind = "bind", $.Check = "check", $.CheckTypes = "checkTypes", $.Emit = "emit", $.Session = "session"; + })(e.Phase || (e.Phase = {})); + function h($, U, G) { + j("I", $, U, G, '"s":"g"'); + } + e.instant = h; + const S = []; + function T($, U, G, ce = !1) { + ce && j("B", $, U, G), S.push({ phase: $, name: U, args: G, time: 1e3 * Io(), separateBeginAndEnd: ce }); + } + e.push = T; + function C($) { + E.assert(S.length > 0), O(S.length - 1, 1e3 * Io(), $), S.length--; + } + e.pop = C; + function D() { + const $ = 1e3 * Io(); + for (let U = S.length - 1; U >= 0; U--) + O(U, $); + S.length = 0; + } + e.popAll = D; + const P = 1e3 * 10; + function O($, U, G) { + const { phase: ce, name: K, args: X, time: Z, separateBeginAndEnd: oe } = S[$]; + oe ? (E.assert(!G, "`results` are not supported for events with `separateBeginAndEnd`"), j( + "E", + ce, + K, + X, + /*extras*/ + void 0, + U + )) : P - Z % P <= U - Z && j("X", ce, K, { ...X, results: G }, `"dur":${U - Z}`, Z); + } + function j($, U, G, ce, K, X = 1e3 * Io()) { + s === "server" && U === "checkTypes" || (Yo("beginTracing"), t.writeSync(i, `, +{"pid":1,"tid":1,"ph":"${$}","cat":"${U}","ts":${X},"name":"${G}"`), K && t.writeSync(i, `,${K}`), ce && t.writeSync(i, `,"args":${JSON.stringify(ce)}`), t.writeSync(i, "}"), Yo("endTracing"), ep("Tracing", "beginTracing", "endTracing")); + } + function F($) { + const U = xr($); + return U ? { + path: U.path, + start: G(Vs(U, $.pos)), + end: G(Vs(U, $.end)) + } : void 0; + function G(ce) { + return { + line: ce.line + 1, + character: ce.character + 1 + }; + } + } + function V($) { + var U, G, ce, K, X, Z, oe, ne, pe, fe, H, ae, le, Ae, ge, de, ve, De, Xe; + Yo("beginDumpTypes"); + const Ie = _[_.length - 1].typesPath, ye = t.openSync(Ie, "w"), Fe = /* @__PURE__ */ new Map(); + t.writeSync(ye, "["); + const Qe = $.length; + for (let Ke = 0; Ke < Qe; Ke++) { + const Be = $[Ke], at = Be.objectFlags, Wt = Be.aliasSymbol ?? Be.symbol; + let nr; + if (at & 16 | Be.flags & 2944) + try { + nr = (U = Be.checker) == null ? void 0 : U.typeToString(Be); + } catch { + nr = void 0; + } + let Kt = {}; + if (Be.flags & 8388608) { + const $n = Be; + Kt = { + indexedAccessObjectType: (G = $n.objectType) == null ? void 0 : G.id, + indexedAccessIndexType: (ce = $n.indexType) == null ? void 0 : ce.id + }; + } + let Pr = {}; + if (at & 4) { + const $n = Be; + Pr = { + instantiatedType: (K = $n.target) == null ? void 0 : K.id, + typeArguments: (X = $n.resolvedTypeArguments) == null ? void 0 : X.map((os) => os.id), + referenceLocation: F($n.node) + }; + } + let Vt = {}; + if (Be.flags & 16777216) { + const $n = Be; + Vt = { + conditionalCheckType: (Z = $n.checkType) == null ? void 0 : Z.id, + conditionalExtendsType: (oe = $n.extendsType) == null ? void 0 : oe.id, + conditionalTrueType: ((ne = $n.resolvedTrueType) == null ? void 0 : ne.id) ?? -1, + conditionalFalseType: ((pe = $n.resolvedFalseType) == null ? void 0 : pe.id) ?? -1 + }; + } + let zt = {}; + if (Be.flags & 33554432) { + const $n = Be; + zt = { + substitutionBaseType: (fe = $n.baseType) == null ? void 0 : fe.id, + constraintType: (H = $n.constraint) == null ? void 0 : H.id + }; + } + let jr = {}; + if (at & 1024) { + const $n = Be; + jr = { + reverseMappedSourceType: (ae = $n.source) == null ? void 0 : ae.id, + reverseMappedMappedType: (le = $n.mappedType) == null ? void 0 : le.id, + reverseMappedConstraintType: (Ae = $n.constraintType) == null ? void 0 : Ae.id + }; + } + let ci = {}; + if (at & 256) { + const $n = Be; + ci = { + evolvingArrayElementType: $n.elementType.id, + evolvingArrayFinalType: (ge = $n.finalArrayType) == null ? void 0 : ge.id + }; + } + let Xt; + const Ai = Be.checker.getRecursionIdentity(Be); + Ai && (Xt = Fe.get(Ai), Xt || (Xt = Fe.size, Fe.set(Ai, Xt))); + const _s = { + id: Be.id, + intrinsicName: Be.intrinsicName, + symbolName: Wt?.escapedName && Pi(Wt.escapedName), + recursionId: Xt, + isTuple: at & 8 ? !0 : void 0, + unionTypes: Be.flags & 1048576 ? (de = Be.types) == null ? void 0 : de.map(($n) => $n.id) : void 0, + intersectionTypes: Be.flags & 2097152 ? Be.types.map(($n) => $n.id) : void 0, + aliasTypeArguments: (ve = Be.aliasTypeArguments) == null ? void 0 : ve.map(($n) => $n.id), + keyofType: Be.flags & 4194304 ? (De = Be.type) == null ? void 0 : De.id : void 0, + ...Kt, + ...Pr, + ...Vt, + ...zt, + ...jr, + ...ci, + destructuringPattern: F(Be.pattern), + firstDeclaration: F((Xe = Wt?.declarations) == null ? void 0 : Xe[0]), + flags: E.formatTypeFlags(Be.flags).split("|"), + display: nr + }; + t.writeSync(ye, JSON.stringify(_s)), Ke < Qe - 1 && t.writeSync(ye, `, +`); + } + t.writeSync(ye, `] +`), t.closeSync(ye), Yo("endDumpTypes"), ep("Dump types", "beginDumpTypes", "endDumpTypes"); + } + function L() { + c && t.writeFileSync(c, JSON.stringify(_)); + } + e.dumpLegend = L; + })(uw || (uw = {})); + var $X = uw.startTracing, XX = uw.dumpLegend, CR = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.EndOfFileToken = 1] = "EndOfFileToken", e[e.SingleLineCommentTrivia = 2] = "SingleLineCommentTrivia", e[e.MultiLineCommentTrivia = 3] = "MultiLineCommentTrivia", e[e.NewLineTrivia = 4] = "NewLineTrivia", e[e.WhitespaceTrivia = 5] = "WhitespaceTrivia", e[e.ShebangTrivia = 6] = "ShebangTrivia", e[e.ConflictMarkerTrivia = 7] = "ConflictMarkerTrivia", e[e.NonTextFileMarkerTrivia = 8] = "NonTextFileMarkerTrivia", e[e.NumericLiteral = 9] = "NumericLiteral", e[e.BigIntLiteral = 10] = "BigIntLiteral", e[e.StringLiteral = 11] = "StringLiteral", e[e.JsxText = 12] = "JsxText", e[e.JsxTextAllWhiteSpaces = 13] = "JsxTextAllWhiteSpaces", e[e.RegularExpressionLiteral = 14] = "RegularExpressionLiteral", e[e.NoSubstitutionTemplateLiteral = 15] = "NoSubstitutionTemplateLiteral", e[e.TemplateHead = 16] = "TemplateHead", e[e.TemplateMiddle = 17] = "TemplateMiddle", e[e.TemplateTail = 18] = "TemplateTail", e[e.OpenBraceToken = 19] = "OpenBraceToken", e[e.CloseBraceToken = 20] = "CloseBraceToken", e[e.OpenParenToken = 21] = "OpenParenToken", e[e.CloseParenToken = 22] = "CloseParenToken", e[e.OpenBracketToken = 23] = "OpenBracketToken", e[e.CloseBracketToken = 24] = "CloseBracketToken", e[e.DotToken = 25] = "DotToken", e[e.DotDotDotToken = 26] = "DotDotDotToken", e[e.SemicolonToken = 27] = "SemicolonToken", e[e.CommaToken = 28] = "CommaToken", e[e.QuestionDotToken = 29] = "QuestionDotToken", e[e.LessThanToken = 30] = "LessThanToken", e[e.LessThanSlashToken = 31] = "LessThanSlashToken", e[e.GreaterThanToken = 32] = "GreaterThanToken", e[e.LessThanEqualsToken = 33] = "LessThanEqualsToken", e[e.GreaterThanEqualsToken = 34] = "GreaterThanEqualsToken", e[e.EqualsEqualsToken = 35] = "EqualsEqualsToken", e[e.ExclamationEqualsToken = 36] = "ExclamationEqualsToken", e[e.EqualsEqualsEqualsToken = 37] = "EqualsEqualsEqualsToken", e[e.ExclamationEqualsEqualsToken = 38] = "ExclamationEqualsEqualsToken", e[e.EqualsGreaterThanToken = 39] = "EqualsGreaterThanToken", e[e.PlusToken = 40] = "PlusToken", e[e.MinusToken = 41] = "MinusToken", e[e.AsteriskToken = 42] = "AsteriskToken", e[e.AsteriskAsteriskToken = 43] = "AsteriskAsteriskToken", e[e.SlashToken = 44] = "SlashToken", e[e.PercentToken = 45] = "PercentToken", e[e.PlusPlusToken = 46] = "PlusPlusToken", e[e.MinusMinusToken = 47] = "MinusMinusToken", e[e.LessThanLessThanToken = 48] = "LessThanLessThanToken", e[e.GreaterThanGreaterThanToken = 49] = "GreaterThanGreaterThanToken", e[e.GreaterThanGreaterThanGreaterThanToken = 50] = "GreaterThanGreaterThanGreaterThanToken", e[e.AmpersandToken = 51] = "AmpersandToken", e[e.BarToken = 52] = "BarToken", e[e.CaretToken = 53] = "CaretToken", e[e.ExclamationToken = 54] = "ExclamationToken", e[e.TildeToken = 55] = "TildeToken", e[e.AmpersandAmpersandToken = 56] = "AmpersandAmpersandToken", e[e.BarBarToken = 57] = "BarBarToken", e[e.QuestionToken = 58] = "QuestionToken", e[e.ColonToken = 59] = "ColonToken", e[e.AtToken = 60] = "AtToken", e[e.QuestionQuestionToken = 61] = "QuestionQuestionToken", e[e.BacktickToken = 62] = "BacktickToken", e[e.HashToken = 63] = "HashToken", e[e.EqualsToken = 64] = "EqualsToken", e[e.PlusEqualsToken = 65] = "PlusEqualsToken", e[e.MinusEqualsToken = 66] = "MinusEqualsToken", e[e.AsteriskEqualsToken = 67] = "AsteriskEqualsToken", e[e.AsteriskAsteriskEqualsToken = 68] = "AsteriskAsteriskEqualsToken", e[e.SlashEqualsToken = 69] = "SlashEqualsToken", e[e.PercentEqualsToken = 70] = "PercentEqualsToken", e[e.LessThanLessThanEqualsToken = 71] = "LessThanLessThanEqualsToken", e[e.GreaterThanGreaterThanEqualsToken = 72] = "GreaterThanGreaterThanEqualsToken", e[e.GreaterThanGreaterThanGreaterThanEqualsToken = 73] = "GreaterThanGreaterThanGreaterThanEqualsToken", e[e.AmpersandEqualsToken = 74] = "AmpersandEqualsToken", e[e.BarEqualsToken = 75] = "BarEqualsToken", e[e.BarBarEqualsToken = 76] = "BarBarEqualsToken", e[e.AmpersandAmpersandEqualsToken = 77] = "AmpersandAmpersandEqualsToken", e[e.QuestionQuestionEqualsToken = 78] = "QuestionQuestionEqualsToken", e[e.CaretEqualsToken = 79] = "CaretEqualsToken", e[e.Identifier = 80] = "Identifier", e[e.PrivateIdentifier = 81] = "PrivateIdentifier", e[e.JSDocCommentTextToken = 82] = "JSDocCommentTextToken", e[e.BreakKeyword = 83] = "BreakKeyword", e[e.CaseKeyword = 84] = "CaseKeyword", e[e.CatchKeyword = 85] = "CatchKeyword", e[e.ClassKeyword = 86] = "ClassKeyword", e[e.ConstKeyword = 87] = "ConstKeyword", e[e.ContinueKeyword = 88] = "ContinueKeyword", e[e.DebuggerKeyword = 89] = "DebuggerKeyword", e[e.DefaultKeyword = 90] = "DefaultKeyword", e[e.DeleteKeyword = 91] = "DeleteKeyword", e[e.DoKeyword = 92] = "DoKeyword", e[e.ElseKeyword = 93] = "ElseKeyword", e[e.EnumKeyword = 94] = "EnumKeyword", e[e.ExportKeyword = 95] = "ExportKeyword", e[e.ExtendsKeyword = 96] = "ExtendsKeyword", e[e.FalseKeyword = 97] = "FalseKeyword", e[e.FinallyKeyword = 98] = "FinallyKeyword", e[e.ForKeyword = 99] = "ForKeyword", e[e.FunctionKeyword = 100] = "FunctionKeyword", e[e.IfKeyword = 101] = "IfKeyword", e[e.ImportKeyword = 102] = "ImportKeyword", e[e.InKeyword = 103] = "InKeyword", e[e.InstanceOfKeyword = 104] = "InstanceOfKeyword", e[e.NewKeyword = 105] = "NewKeyword", e[e.NullKeyword = 106] = "NullKeyword", e[e.ReturnKeyword = 107] = "ReturnKeyword", e[e.SuperKeyword = 108] = "SuperKeyword", e[e.SwitchKeyword = 109] = "SwitchKeyword", e[e.ThisKeyword = 110] = "ThisKeyword", e[e.ThrowKeyword = 111] = "ThrowKeyword", e[e.TrueKeyword = 112] = "TrueKeyword", e[e.TryKeyword = 113] = "TryKeyword", e[e.TypeOfKeyword = 114] = "TypeOfKeyword", e[e.VarKeyword = 115] = "VarKeyword", e[e.VoidKeyword = 116] = "VoidKeyword", e[e.WhileKeyword = 117] = "WhileKeyword", e[e.WithKeyword = 118] = "WithKeyword", e[e.ImplementsKeyword = 119] = "ImplementsKeyword", e[e.InterfaceKeyword = 120] = "InterfaceKeyword", e[e.LetKeyword = 121] = "LetKeyword", e[e.PackageKeyword = 122] = "PackageKeyword", e[e.PrivateKeyword = 123] = "PrivateKeyword", e[e.ProtectedKeyword = 124] = "ProtectedKeyword", e[e.PublicKeyword = 125] = "PublicKeyword", e[e.StaticKeyword = 126] = "StaticKeyword", e[e.YieldKeyword = 127] = "YieldKeyword", e[e.AbstractKeyword = 128] = "AbstractKeyword", e[e.AccessorKeyword = 129] = "AccessorKeyword", e[e.AsKeyword = 130] = "AsKeyword", e[e.AssertsKeyword = 131] = "AssertsKeyword", e[e.AssertKeyword = 132] = "AssertKeyword", e[e.AnyKeyword = 133] = "AnyKeyword", e[e.AsyncKeyword = 134] = "AsyncKeyword", e[e.AwaitKeyword = 135] = "AwaitKeyword", e[e.BooleanKeyword = 136] = "BooleanKeyword", e[e.ConstructorKeyword = 137] = "ConstructorKeyword", e[e.DeclareKeyword = 138] = "DeclareKeyword", e[e.GetKeyword = 139] = "GetKeyword", e[e.InferKeyword = 140] = "InferKeyword", e[e.IntrinsicKeyword = 141] = "IntrinsicKeyword", e[e.IsKeyword = 142] = "IsKeyword", e[e.KeyOfKeyword = 143] = "KeyOfKeyword", e[e.ModuleKeyword = 144] = "ModuleKeyword", e[e.NamespaceKeyword = 145] = "NamespaceKeyword", e[e.NeverKeyword = 146] = "NeverKeyword", e[e.OutKeyword = 147] = "OutKeyword", e[e.ReadonlyKeyword = 148] = "ReadonlyKeyword", e[e.RequireKeyword = 149] = "RequireKeyword", e[e.NumberKeyword = 150] = "NumberKeyword", e[e.ObjectKeyword = 151] = "ObjectKeyword", e[e.SatisfiesKeyword = 152] = "SatisfiesKeyword", e[e.SetKeyword = 153] = "SetKeyword", e[e.StringKeyword = 154] = "StringKeyword", e[e.SymbolKeyword = 155] = "SymbolKeyword", e[e.TypeKeyword = 156] = "TypeKeyword", e[e.UndefinedKeyword = 157] = "UndefinedKeyword", e[e.UniqueKeyword = 158] = "UniqueKeyword", e[e.UnknownKeyword = 159] = "UnknownKeyword", e[e.UsingKeyword = 160] = "UsingKeyword", e[e.FromKeyword = 161] = "FromKeyword", e[e.GlobalKeyword = 162] = "GlobalKeyword", e[e.BigIntKeyword = 163] = "BigIntKeyword", e[e.OverrideKeyword = 164] = "OverrideKeyword", e[e.OfKeyword = 165] = "OfKeyword", e[e.QualifiedName = 166] = "QualifiedName", e[e.ComputedPropertyName = 167] = "ComputedPropertyName", e[e.TypeParameter = 168] = "TypeParameter", e[e.Parameter = 169] = "Parameter", e[e.Decorator = 170] = "Decorator", e[e.PropertySignature = 171] = "PropertySignature", e[e.PropertyDeclaration = 172] = "PropertyDeclaration", e[e.MethodSignature = 173] = "MethodSignature", e[e.MethodDeclaration = 174] = "MethodDeclaration", e[e.ClassStaticBlockDeclaration = 175] = "ClassStaticBlockDeclaration", e[e.Constructor = 176] = "Constructor", e[e.GetAccessor = 177] = "GetAccessor", e[e.SetAccessor = 178] = "SetAccessor", e[e.CallSignature = 179] = "CallSignature", e[e.ConstructSignature = 180] = "ConstructSignature", e[e.IndexSignature = 181] = "IndexSignature", e[e.TypePredicate = 182] = "TypePredicate", e[e.TypeReference = 183] = "TypeReference", e[e.FunctionType = 184] = "FunctionType", e[e.ConstructorType = 185] = "ConstructorType", e[e.TypeQuery = 186] = "TypeQuery", e[e.TypeLiteral = 187] = "TypeLiteral", e[e.ArrayType = 188] = "ArrayType", e[e.TupleType = 189] = "TupleType", e[e.OptionalType = 190] = "OptionalType", e[e.RestType = 191] = "RestType", e[e.UnionType = 192] = "UnionType", e[e.IntersectionType = 193] = "IntersectionType", e[e.ConditionalType = 194] = "ConditionalType", e[e.InferType = 195] = "InferType", e[e.ParenthesizedType = 196] = "ParenthesizedType", e[e.ThisType = 197] = "ThisType", e[e.TypeOperator = 198] = "TypeOperator", e[e.IndexedAccessType = 199] = "IndexedAccessType", e[e.MappedType = 200] = "MappedType", e[e.LiteralType = 201] = "LiteralType", e[e.NamedTupleMember = 202] = "NamedTupleMember", e[e.TemplateLiteralType = 203] = "TemplateLiteralType", e[e.TemplateLiteralTypeSpan = 204] = "TemplateLiteralTypeSpan", e[e.ImportType = 205] = "ImportType", e[e.ObjectBindingPattern = 206] = "ObjectBindingPattern", e[e.ArrayBindingPattern = 207] = "ArrayBindingPattern", e[e.BindingElement = 208] = "BindingElement", e[e.ArrayLiteralExpression = 209] = "ArrayLiteralExpression", e[e.ObjectLiteralExpression = 210] = "ObjectLiteralExpression", e[e.PropertyAccessExpression = 211] = "PropertyAccessExpression", e[e.ElementAccessExpression = 212] = "ElementAccessExpression", e[e.CallExpression = 213] = "CallExpression", e[e.NewExpression = 214] = "NewExpression", e[e.TaggedTemplateExpression = 215] = "TaggedTemplateExpression", e[e.TypeAssertionExpression = 216] = "TypeAssertionExpression", e[e.ParenthesizedExpression = 217] = "ParenthesizedExpression", e[e.FunctionExpression = 218] = "FunctionExpression", e[e.ArrowFunction = 219] = "ArrowFunction", e[e.DeleteExpression = 220] = "DeleteExpression", e[e.TypeOfExpression = 221] = "TypeOfExpression", e[e.VoidExpression = 222] = "VoidExpression", e[e.AwaitExpression = 223] = "AwaitExpression", e[e.PrefixUnaryExpression = 224] = "PrefixUnaryExpression", e[e.PostfixUnaryExpression = 225] = "PostfixUnaryExpression", e[e.BinaryExpression = 226] = "BinaryExpression", e[e.ConditionalExpression = 227] = "ConditionalExpression", e[e.TemplateExpression = 228] = "TemplateExpression", e[e.YieldExpression = 229] = "YieldExpression", e[e.SpreadElement = 230] = "SpreadElement", e[e.ClassExpression = 231] = "ClassExpression", e[e.OmittedExpression = 232] = "OmittedExpression", e[e.ExpressionWithTypeArguments = 233] = "ExpressionWithTypeArguments", e[e.AsExpression = 234] = "AsExpression", e[e.NonNullExpression = 235] = "NonNullExpression", e[e.MetaProperty = 236] = "MetaProperty", e[e.SyntheticExpression = 237] = "SyntheticExpression", e[e.SatisfiesExpression = 238] = "SatisfiesExpression", e[e.TemplateSpan = 239] = "TemplateSpan", e[e.SemicolonClassElement = 240] = "SemicolonClassElement", e[e.Block = 241] = "Block", e[e.EmptyStatement = 242] = "EmptyStatement", e[e.VariableStatement = 243] = "VariableStatement", e[e.ExpressionStatement = 244] = "ExpressionStatement", e[e.IfStatement = 245] = "IfStatement", e[e.DoStatement = 246] = "DoStatement", e[e.WhileStatement = 247] = "WhileStatement", e[e.ForStatement = 248] = "ForStatement", e[e.ForInStatement = 249] = "ForInStatement", e[e.ForOfStatement = 250] = "ForOfStatement", e[e.ContinueStatement = 251] = "ContinueStatement", e[e.BreakStatement = 252] = "BreakStatement", e[e.ReturnStatement = 253] = "ReturnStatement", e[e.WithStatement = 254] = "WithStatement", e[e.SwitchStatement = 255] = "SwitchStatement", e[e.LabeledStatement = 256] = "LabeledStatement", e[e.ThrowStatement = 257] = "ThrowStatement", e[e.TryStatement = 258] = "TryStatement", e[e.DebuggerStatement = 259] = "DebuggerStatement", e[e.VariableDeclaration = 260] = "VariableDeclaration", e[e.VariableDeclarationList = 261] = "VariableDeclarationList", e[e.FunctionDeclaration = 262] = "FunctionDeclaration", e[e.ClassDeclaration = 263] = "ClassDeclaration", e[e.InterfaceDeclaration = 264] = "InterfaceDeclaration", e[e.TypeAliasDeclaration = 265] = "TypeAliasDeclaration", e[e.EnumDeclaration = 266] = "EnumDeclaration", e[e.ModuleDeclaration = 267] = "ModuleDeclaration", e[e.ModuleBlock = 268] = "ModuleBlock", e[e.CaseBlock = 269] = "CaseBlock", e[e.NamespaceExportDeclaration = 270] = "NamespaceExportDeclaration", e[e.ImportEqualsDeclaration = 271] = "ImportEqualsDeclaration", e[e.ImportDeclaration = 272] = "ImportDeclaration", e[e.ImportClause = 273] = "ImportClause", e[e.NamespaceImport = 274] = "NamespaceImport", e[e.NamedImports = 275] = "NamedImports", e[e.ImportSpecifier = 276] = "ImportSpecifier", e[e.ExportAssignment = 277] = "ExportAssignment", e[e.ExportDeclaration = 278] = "ExportDeclaration", e[e.NamedExports = 279] = "NamedExports", e[e.NamespaceExport = 280] = "NamespaceExport", e[e.ExportSpecifier = 281] = "ExportSpecifier", e[e.MissingDeclaration = 282] = "MissingDeclaration", e[e.ExternalModuleReference = 283] = "ExternalModuleReference", e[e.JsxElement = 284] = "JsxElement", e[e.JsxSelfClosingElement = 285] = "JsxSelfClosingElement", e[e.JsxOpeningElement = 286] = "JsxOpeningElement", e[e.JsxClosingElement = 287] = "JsxClosingElement", e[e.JsxFragment = 288] = "JsxFragment", e[e.JsxOpeningFragment = 289] = "JsxOpeningFragment", e[e.JsxClosingFragment = 290] = "JsxClosingFragment", e[e.JsxAttribute = 291] = "JsxAttribute", e[e.JsxAttributes = 292] = "JsxAttributes", e[e.JsxSpreadAttribute = 293] = "JsxSpreadAttribute", e[e.JsxExpression = 294] = "JsxExpression", e[e.JsxNamespacedName = 295] = "JsxNamespacedName", e[e.CaseClause = 296] = "CaseClause", e[e.DefaultClause = 297] = "DefaultClause", e[e.HeritageClause = 298] = "HeritageClause", e[e.CatchClause = 299] = "CatchClause", e[e.ImportAttributes = 300] = "ImportAttributes", e[e.ImportAttribute = 301] = "ImportAttribute", e[ + e.AssertClause = 300 + /* ImportAttributes */ + ] = "AssertClause", e[ + e.AssertEntry = 301 + /* ImportAttribute */ + ] = "AssertEntry", e[e.ImportTypeAssertionContainer = 302] = "ImportTypeAssertionContainer", e[e.PropertyAssignment = 303] = "PropertyAssignment", e[e.ShorthandPropertyAssignment = 304] = "ShorthandPropertyAssignment", e[e.SpreadAssignment = 305] = "SpreadAssignment", e[e.EnumMember = 306] = "EnumMember", e[e.SourceFile = 307] = "SourceFile", e[e.Bundle = 308] = "Bundle", e[e.JSDocTypeExpression = 309] = "JSDocTypeExpression", e[e.JSDocNameReference = 310] = "JSDocNameReference", e[e.JSDocMemberName = 311] = "JSDocMemberName", e[e.JSDocAllType = 312] = "JSDocAllType", e[e.JSDocUnknownType = 313] = "JSDocUnknownType", e[e.JSDocNullableType = 314] = "JSDocNullableType", e[e.JSDocNonNullableType = 315] = "JSDocNonNullableType", e[e.JSDocOptionalType = 316] = "JSDocOptionalType", e[e.JSDocFunctionType = 317] = "JSDocFunctionType", e[e.JSDocVariadicType = 318] = "JSDocVariadicType", e[e.JSDocNamepathType = 319] = "JSDocNamepathType", e[e.JSDoc = 320] = "JSDoc", e[ + e.JSDocComment = 320 + /* JSDoc */ + ] = "JSDocComment", e[e.JSDocText = 321] = "JSDocText", e[e.JSDocTypeLiteral = 322] = "JSDocTypeLiteral", e[e.JSDocSignature = 323] = "JSDocSignature", e[e.JSDocLink = 324] = "JSDocLink", e[e.JSDocLinkCode = 325] = "JSDocLinkCode", e[e.JSDocLinkPlain = 326] = "JSDocLinkPlain", e[e.JSDocTag = 327] = "JSDocTag", e[e.JSDocAugmentsTag = 328] = "JSDocAugmentsTag", e[e.JSDocImplementsTag = 329] = "JSDocImplementsTag", e[e.JSDocAuthorTag = 330] = "JSDocAuthorTag", e[e.JSDocDeprecatedTag = 331] = "JSDocDeprecatedTag", e[e.JSDocClassTag = 332] = "JSDocClassTag", e[e.JSDocPublicTag = 333] = "JSDocPublicTag", e[e.JSDocPrivateTag = 334] = "JSDocPrivateTag", e[e.JSDocProtectedTag = 335] = "JSDocProtectedTag", e[e.JSDocReadonlyTag = 336] = "JSDocReadonlyTag", e[e.JSDocOverrideTag = 337] = "JSDocOverrideTag", e[e.JSDocCallbackTag = 338] = "JSDocCallbackTag", e[e.JSDocOverloadTag = 339] = "JSDocOverloadTag", e[e.JSDocEnumTag = 340] = "JSDocEnumTag", e[e.JSDocParameterTag = 341] = "JSDocParameterTag", e[e.JSDocReturnTag = 342] = "JSDocReturnTag", e[e.JSDocThisTag = 343] = "JSDocThisTag", e[e.JSDocTypeTag = 344] = "JSDocTypeTag", e[e.JSDocTemplateTag = 345] = "JSDocTemplateTag", e[e.JSDocTypedefTag = 346] = "JSDocTypedefTag", e[e.JSDocSeeTag = 347] = "JSDocSeeTag", e[e.JSDocPropertyTag = 348] = "JSDocPropertyTag", e[e.JSDocThrowsTag = 349] = "JSDocThrowsTag", e[e.JSDocSatisfiesTag = 350] = "JSDocSatisfiesTag", e[e.JSDocImportTag = 351] = "JSDocImportTag", e[e.SyntaxList = 352] = "SyntaxList", e[e.NotEmittedStatement = 353] = "NotEmittedStatement", e[e.PartiallyEmittedExpression = 354] = "PartiallyEmittedExpression", e[e.CommaListExpression = 355] = "CommaListExpression", e[e.SyntheticReferenceExpression = 356] = "SyntheticReferenceExpression", e[e.Count = 357] = "Count", e[ + e.FirstAssignment = 64 + /* EqualsToken */ + ] = "FirstAssignment", e[ + e.LastAssignment = 79 + /* CaretEqualsToken */ + ] = "LastAssignment", e[ + e.FirstCompoundAssignment = 65 + /* PlusEqualsToken */ + ] = "FirstCompoundAssignment", e[ + e.LastCompoundAssignment = 79 + /* CaretEqualsToken */ + ] = "LastCompoundAssignment", e[ + e.FirstReservedWord = 83 + /* BreakKeyword */ + ] = "FirstReservedWord", e[ + e.LastReservedWord = 118 + /* WithKeyword */ + ] = "LastReservedWord", e[ + e.FirstKeyword = 83 + /* BreakKeyword */ + ] = "FirstKeyword", e[ + e.LastKeyword = 165 + /* OfKeyword */ + ] = "LastKeyword", e[ + e.FirstFutureReservedWord = 119 + /* ImplementsKeyword */ + ] = "FirstFutureReservedWord", e[ + e.LastFutureReservedWord = 127 + /* YieldKeyword */ + ] = "LastFutureReservedWord", e[ + e.FirstTypeNode = 182 + /* TypePredicate */ + ] = "FirstTypeNode", e[ + e.LastTypeNode = 205 + /* ImportType */ + ] = "LastTypeNode", e[ + e.FirstPunctuation = 19 + /* OpenBraceToken */ + ] = "FirstPunctuation", e[ + e.LastPunctuation = 79 + /* CaretEqualsToken */ + ] = "LastPunctuation", e[ + e.FirstToken = 0 + /* Unknown */ + ] = "FirstToken", e[ + e.LastToken = 165 + /* LastKeyword */ + ] = "LastToken", e[ + e.FirstTriviaToken = 2 + /* SingleLineCommentTrivia */ + ] = "FirstTriviaToken", e[ + e.LastTriviaToken = 7 + /* ConflictMarkerTrivia */ + ] = "LastTriviaToken", e[ + e.FirstLiteralToken = 9 + /* NumericLiteral */ + ] = "FirstLiteralToken", e[ + e.LastLiteralToken = 15 + /* NoSubstitutionTemplateLiteral */ + ] = "LastLiteralToken", e[ + e.FirstTemplateToken = 15 + /* NoSubstitutionTemplateLiteral */ + ] = "FirstTemplateToken", e[ + e.LastTemplateToken = 18 + /* TemplateTail */ + ] = "LastTemplateToken", e[ + e.FirstBinaryOperator = 30 + /* LessThanToken */ + ] = "FirstBinaryOperator", e[ + e.LastBinaryOperator = 79 + /* CaretEqualsToken */ + ] = "LastBinaryOperator", e[ + e.FirstStatement = 243 + /* VariableStatement */ + ] = "FirstStatement", e[ + e.LastStatement = 259 + /* DebuggerStatement */ + ] = "LastStatement", e[ + e.FirstNode = 166 + /* QualifiedName */ + ] = "FirstNode", e[ + e.FirstJSDocNode = 309 + /* JSDocTypeExpression */ + ] = "FirstJSDocNode", e[ + e.LastJSDocNode = 351 + /* JSDocImportTag */ + ] = "LastJSDocNode", e[ + e.FirstJSDocTagNode = 327 + /* JSDocTag */ + ] = "FirstJSDocTagNode", e[ + e.LastJSDocTagNode = 351 + /* JSDocImportTag */ + ] = "LastJSDocTagNode", e[ + e.FirstContextualKeyword = 128 + /* AbstractKeyword */ + ] = "FirstContextualKeyword", e[ + e.LastContextualKeyword = 165 + /* OfKeyword */ + ] = "LastContextualKeyword", e))(CR || {}), ER = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Let = 1] = "Let", e[e.Const = 2] = "Const", e[e.Using = 4] = "Using", e[e.AwaitUsing = 6] = "AwaitUsing", e[e.NestedNamespace = 8] = "NestedNamespace", e[e.Synthesized = 16] = "Synthesized", e[e.Namespace = 32] = "Namespace", e[e.OptionalChain = 64] = "OptionalChain", e[e.ExportContext = 128] = "ExportContext", e[e.ContainsThis = 256] = "ContainsThis", e[e.HasImplicitReturn = 512] = "HasImplicitReturn", e[e.HasExplicitReturn = 1024] = "HasExplicitReturn", e[e.GlobalAugmentation = 2048] = "GlobalAugmentation", e[e.HasAsyncFunctions = 4096] = "HasAsyncFunctions", e[e.DisallowInContext = 8192] = "DisallowInContext", e[e.YieldContext = 16384] = "YieldContext", e[e.DecoratorContext = 32768] = "DecoratorContext", e[e.AwaitContext = 65536] = "AwaitContext", e[e.DisallowConditionalTypesContext = 131072] = "DisallowConditionalTypesContext", e[e.ThisNodeHasError = 262144] = "ThisNodeHasError", e[e.JavaScriptFile = 524288] = "JavaScriptFile", e[e.ThisNodeOrAnySubNodesHasError = 1048576] = "ThisNodeOrAnySubNodesHasError", e[e.HasAggregatedChildData = 2097152] = "HasAggregatedChildData", e[e.PossiblyContainsDynamicImport = 4194304] = "PossiblyContainsDynamicImport", e[e.PossiblyContainsImportMeta = 8388608] = "PossiblyContainsImportMeta", e[e.JSDoc = 16777216] = "JSDoc", e[e.Ambient = 33554432] = "Ambient", e[e.InWithStatement = 67108864] = "InWithStatement", e[e.JsonFile = 134217728] = "JsonFile", e[e.TypeCached = 268435456] = "TypeCached", e[e.Deprecated = 536870912] = "Deprecated", e[e.BlockScoped = 7] = "BlockScoped", e[e.Constant = 6] = "Constant", e[e.ReachabilityCheckFlags = 1536] = "ReachabilityCheckFlags", e[e.ReachabilityAndEmitFlags = 5632] = "ReachabilityAndEmitFlags", e[e.ContextFlags = 101441536] = "ContextFlags", e[e.TypeExcludesFlags = 81920] = "TypeExcludesFlags", e[e.PermanentlySetIncrementalFlags = 12582912] = "PermanentlySetIncrementalFlags", e[ + e.IdentifierHasExtendedUnicodeEscape = 256 + /* ContainsThis */ + ] = "IdentifierHasExtendedUnicodeEscape", e[ + e.IdentifierIsInJSDocNamespace = 4096 + /* HasAsyncFunctions */ + ] = "IdentifierIsInJSDocNamespace", e))(ER || {}), DR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Public = 1] = "Public", e[e.Private = 2] = "Private", e[e.Protected = 4] = "Protected", e[e.Readonly = 8] = "Readonly", e[e.Override = 16] = "Override", e[e.Export = 32] = "Export", e[e.Abstract = 64] = "Abstract", e[e.Ambient = 128] = "Ambient", e[e.Static = 256] = "Static", e[e.Accessor = 512] = "Accessor", e[e.Async = 1024] = "Async", e[e.Default = 2048] = "Default", e[e.Const = 4096] = "Const", e[e.In = 8192] = "In", e[e.Out = 16384] = "Out", e[e.Decorator = 32768] = "Decorator", e[e.Deprecated = 65536] = "Deprecated", e[e.JSDocPublic = 8388608] = "JSDocPublic", e[e.JSDocPrivate = 16777216] = "JSDocPrivate", e[e.JSDocProtected = 33554432] = "JSDocProtected", e[e.JSDocReadonly = 67108864] = "JSDocReadonly", e[e.JSDocOverride = 134217728] = "JSDocOverride", e[e.SyntacticOrJSDocModifiers = 31] = "SyntacticOrJSDocModifiers", e[e.SyntacticOnlyModifiers = 65504] = "SyntacticOnlyModifiers", e[e.SyntacticModifiers = 65535] = "SyntacticModifiers", e[e.JSDocCacheOnlyModifiers = 260046848] = "JSDocCacheOnlyModifiers", e[ + e.JSDocOnlyModifiers = 65536 + /* Deprecated */ + ] = "JSDocOnlyModifiers", e[e.NonCacheOnlyModifiers = 131071] = "NonCacheOnlyModifiers", e[e.HasComputedJSDocModifiers = 268435456] = "HasComputedJSDocModifiers", e[e.HasComputedFlags = 536870912] = "HasComputedFlags", e[e.AccessibilityModifier = 7] = "AccessibilityModifier", e[e.ParameterPropertyModifier = 31] = "ParameterPropertyModifier", e[e.NonPublicAccessibilityModifier = 6] = "NonPublicAccessibilityModifier", e[e.TypeScriptModifier = 28895] = "TypeScriptModifier", e[e.ExportDefault = 2080] = "ExportDefault", e[e.All = 131071] = "All", e[e.Modifier = 98303] = "Modifier", e))(DR || {}), QX = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IntrinsicNamedElement = 1] = "IntrinsicNamedElement", e[e.IntrinsicIndexedElement = 2] = "IntrinsicIndexedElement", e[e.IntrinsicElement = 3] = "IntrinsicElement", e))(QX || {}), PR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Succeeded = 1] = "Succeeded", e[e.Failed = 2] = "Failed", e[e.Reported = 4] = "Reported", e[e.ReportsUnmeasurable = 8] = "ReportsUnmeasurable", e[e.ReportsUnreliable = 16] = "ReportsUnreliable", e[e.ReportsMask = 24] = "ReportsMask", e))(PR || {}), wR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Auto = 1] = "Auto", e[e.Loop = 2] = "Loop", e[e.Unique = 3] = "Unique", e[e.Node = 4] = "Node", e[e.KindMask = 7] = "KindMask", e[e.ReservedInNestedScopes = 8] = "ReservedInNestedScopes", e[e.Optimistic = 16] = "Optimistic", e[e.FileLevel = 32] = "FileLevel", e[e.AllowNameSubstitution = 64] = "AllowNameSubstitution", e))(wR || {}), YX = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasIndices = 1] = "HasIndices", e[e.Global = 2] = "Global", e[e.IgnoreCase = 4] = "IgnoreCase", e[e.Multiline = 8] = "Multiline", e[e.DotAll = 16] = "DotAll", e[e.Unicode = 32] = "Unicode", e[e.UnicodeSets = 64] = "UnicodeSets", e[e.Sticky = 128] = "Sticky", e[e.AnyUnicodeMode = 96] = "AnyUnicodeMode", e[e.Modifiers = 28] = "Modifiers", e))(YX || {}), ZX = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.PrecedingLineBreak = 1] = "PrecedingLineBreak", e[e.PrecedingJSDocComment = 2] = "PrecedingJSDocComment", e[e.Unterminated = 4] = "Unterminated", e[e.ExtendedUnicodeEscape = 8] = "ExtendedUnicodeEscape", e[e.Scientific = 16] = "Scientific", e[e.Octal = 32] = "Octal", e[e.HexSpecifier = 64] = "HexSpecifier", e[e.BinarySpecifier = 128] = "BinarySpecifier", e[e.OctalSpecifier = 256] = "OctalSpecifier", e[e.ContainsSeparator = 512] = "ContainsSeparator", e[e.UnicodeEscape = 1024] = "UnicodeEscape", e[e.ContainsInvalidEscape = 2048] = "ContainsInvalidEscape", e[e.HexEscape = 4096] = "HexEscape", e[e.ContainsLeadingZero = 8192] = "ContainsLeadingZero", e[e.ContainsInvalidSeparator = 16384] = "ContainsInvalidSeparator", e[e.BinaryOrOctalSpecifier = 384] = "BinaryOrOctalSpecifier", e[e.WithSpecifier = 448] = "WithSpecifier", e[e.StringLiteralFlags = 7176] = "StringLiteralFlags", e[e.NumericLiteralFlags = 25584] = "NumericLiteralFlags", e[e.TemplateLiteralLikeFlags = 7176] = "TemplateLiteralLikeFlags", e[e.IsInvalid = 26656] = "IsInvalid", e))(ZX || {}), vI = /* @__PURE__ */ ((e) => (e[e.Unreachable = 1] = "Unreachable", e[e.Start = 2] = "Start", e[e.BranchLabel = 4] = "BranchLabel", e[e.LoopLabel = 8] = "LoopLabel", e[e.Assignment = 16] = "Assignment", e[e.TrueCondition = 32] = "TrueCondition", e[e.FalseCondition = 64] = "FalseCondition", e[e.SwitchClause = 128] = "SwitchClause", e[e.ArrayMutation = 256] = "ArrayMutation", e[e.Call = 512] = "Call", e[e.ReduceLabel = 1024] = "ReduceLabel", e[e.Referenced = 2048] = "Referenced", e[e.Shared = 4096] = "Shared", e[e.Label = 12] = "Label", e[e.Condition = 96] = "Condition", e))(vI || {}), KX = /* @__PURE__ */ ((e) => (e[e.ExpectError = 0] = "ExpectError", e[e.Ignore = 1] = "Ignore", e))(KX || {}), AE = class { + }, AR = /* @__PURE__ */ ((e) => (e[e.RootFile = 0] = "RootFile", e[e.SourceFromProjectReference = 1] = "SourceFromProjectReference", e[e.OutputFromProjectReference = 2] = "OutputFromProjectReference", e[e.Import = 3] = "Import", e[e.ReferenceFile = 4] = "ReferenceFile", e[e.TypeReferenceDirective = 5] = "TypeReferenceDirective", e[e.LibFile = 6] = "LibFile", e[e.LibReferenceDirective = 7] = "LibReferenceDirective", e[e.AutomaticTypeDirectiveFile = 8] = "AutomaticTypeDirectiveFile", e))(AR || {}), eQ = /* @__PURE__ */ ((e) => (e[e.FilePreprocessingLibReferenceDiagnostic = 0] = "FilePreprocessingLibReferenceDiagnostic", e[e.FilePreprocessingFileExplainingDiagnostic = 1] = "FilePreprocessingFileExplainingDiagnostic", e[e.ResolutionDiagnostics = 2] = "ResolutionDiagnostics", e))(eQ || {}), tQ = /* @__PURE__ */ ((e) => (e[e.Js = 0] = "Js", e[e.Dts = 1] = "Dts", e))(tQ || {}), NR = /* @__PURE__ */ ((e) => (e[e.Not = 0] = "Not", e[e.SafeModules = 1] = "SafeModules", e[e.Completely = 2] = "Completely", e))(NR || {}), rQ = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.DiagnosticsPresent_OutputsSkipped = 1] = "DiagnosticsPresent_OutputsSkipped", e[e.DiagnosticsPresent_OutputsGenerated = 2] = "DiagnosticsPresent_OutputsGenerated", e[e.InvalidProject_OutputsSkipped = 3] = "InvalidProject_OutputsSkipped", e[e.ProjectReferenceCycle_OutputsSkipped = 4] = "ProjectReferenceCycle_OutputsSkipped", e))(rQ || {}), nQ = /* @__PURE__ */ ((e) => (e[e.Ok = 0] = "Ok", e[e.NeedsOverride = 1] = "NeedsOverride", e[e.HasInvalidOverride = 2] = "HasInvalidOverride", e))(nQ || {}), iQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Literal = 1] = "Literal", e[e.Subtype = 2] = "Subtype", e))(iQ || {}), sQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoSupertypeReduction = 1] = "NoSupertypeReduction", e[e.NoConstraintReduction = 2] = "NoConstraintReduction", e))(sQ || {}), aQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Signature = 1] = "Signature", e[e.NoConstraints = 2] = "NoConstraints", e[e.Completions = 4] = "Completions", e[e.SkipBindingPatterns = 8] = "SkipBindingPatterns", e))(aQ || {}), oQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoTruncation = 1] = "NoTruncation", e[e.WriteArrayAsGenericType = 2] = "WriteArrayAsGenericType", e[e.GenerateNamesForShadowedTypeParams = 4] = "GenerateNamesForShadowedTypeParams", e[e.UseStructuralFallback = 8] = "UseStructuralFallback", e[e.ForbidIndexedAccessSymbolReferences = 16] = "ForbidIndexedAccessSymbolReferences", e[e.WriteTypeArgumentsOfSignature = 32] = "WriteTypeArgumentsOfSignature", e[e.UseFullyQualifiedType = 64] = "UseFullyQualifiedType", e[e.UseOnlyExternalAliasing = 128] = "UseOnlyExternalAliasing", e[e.SuppressAnyReturnType = 256] = "SuppressAnyReturnType", e[e.WriteTypeParametersInQualifiedName = 512] = "WriteTypeParametersInQualifiedName", e[e.MultilineObjectLiterals = 1024] = "MultilineObjectLiterals", e[e.WriteClassExpressionAsTypeLiteral = 2048] = "WriteClassExpressionAsTypeLiteral", e[e.UseTypeOfFunction = 4096] = "UseTypeOfFunction", e[e.OmitParameterModifiers = 8192] = "OmitParameterModifiers", e[e.UseAliasDefinedOutsideCurrentScope = 16384] = "UseAliasDefinedOutsideCurrentScope", e[e.UseSingleQuotesForStringLiteralType = 268435456] = "UseSingleQuotesForStringLiteralType", e[e.NoTypeReduction = 536870912] = "NoTypeReduction", e[e.OmitThisParameter = 33554432] = "OmitThisParameter", e[e.AllowThisInObjectLiteral = 32768] = "AllowThisInObjectLiteral", e[e.AllowQualifiedNameInPlaceOfIdentifier = 65536] = "AllowQualifiedNameInPlaceOfIdentifier", e[e.AllowAnonymousIdentifier = 131072] = "AllowAnonymousIdentifier", e[e.AllowEmptyUnionOrIntersection = 262144] = "AllowEmptyUnionOrIntersection", e[e.AllowEmptyTuple = 524288] = "AllowEmptyTuple", e[e.AllowUniqueESSymbolType = 1048576] = "AllowUniqueESSymbolType", e[e.AllowEmptyIndexInfoType = 2097152] = "AllowEmptyIndexInfoType", e[e.WriteComputedProps = 1073741824] = "WriteComputedProps", e[e.NoSyntacticPrinter = -2147483648] = "NoSyntacticPrinter", e[e.AllowNodeModulesRelativePaths = 67108864] = "AllowNodeModulesRelativePaths", e[e.DoNotIncludeSymbolChain = 134217728] = "DoNotIncludeSymbolChain", e[e.AllowUnresolvedNames = 1] = "AllowUnresolvedNames", e[e.IgnoreErrors = 70221824] = "IgnoreErrors", e[e.InObjectTypeLiteral = 4194304] = "InObjectTypeLiteral", e[e.InTypeAlias = 8388608] = "InTypeAlias", e[e.InInitialEntityName = 16777216] = "InInitialEntityName", e))(oQ || {}), cQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoTruncation = 1] = "NoTruncation", e[e.WriteArrayAsGenericType = 2] = "WriteArrayAsGenericType", e[e.GenerateNamesForShadowedTypeParams = 4] = "GenerateNamesForShadowedTypeParams", e[e.UseStructuralFallback = 8] = "UseStructuralFallback", e[e.WriteTypeArgumentsOfSignature = 32] = "WriteTypeArgumentsOfSignature", e[e.UseFullyQualifiedType = 64] = "UseFullyQualifiedType", e[e.SuppressAnyReturnType = 256] = "SuppressAnyReturnType", e[e.MultilineObjectLiterals = 1024] = "MultilineObjectLiterals", e[e.WriteClassExpressionAsTypeLiteral = 2048] = "WriteClassExpressionAsTypeLiteral", e[e.UseTypeOfFunction = 4096] = "UseTypeOfFunction", e[e.OmitParameterModifiers = 8192] = "OmitParameterModifiers", e[e.UseAliasDefinedOutsideCurrentScope = 16384] = "UseAliasDefinedOutsideCurrentScope", e[e.UseSingleQuotesForStringLiteralType = 268435456] = "UseSingleQuotesForStringLiteralType", e[e.NoTypeReduction = 536870912] = "NoTypeReduction", e[e.OmitThisParameter = 33554432] = "OmitThisParameter", e[e.AllowUniqueESSymbolType = 1048576] = "AllowUniqueESSymbolType", e[e.AddUndefined = 131072] = "AddUndefined", e[e.WriteArrowStyleSignature = 262144] = "WriteArrowStyleSignature", e[e.InArrayType = 524288] = "InArrayType", e[e.InElementType = 2097152] = "InElementType", e[e.InFirstTypeArgument = 4194304] = "InFirstTypeArgument", e[e.InTypeAlias = 8388608] = "InTypeAlias", e[e.NodeBuilderFlagsMask = 848330095] = "NodeBuilderFlagsMask", e))(cQ || {}), lQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.WriteTypeParametersOrArguments = 1] = "WriteTypeParametersOrArguments", e[e.UseOnlyExternalAliasing = 2] = "UseOnlyExternalAliasing", e[e.AllowAnyNodeKind = 4] = "AllowAnyNodeKind", e[e.UseAliasDefinedOutsideCurrentScope = 8] = "UseAliasDefinedOutsideCurrentScope", e[e.WriteComputedProps = 16] = "WriteComputedProps", e[e.DoNotIncludeSymbolChain = 32] = "DoNotIncludeSymbolChain", e))(lQ || {}), uQ = /* @__PURE__ */ ((e) => (e[e.Accessible = 0] = "Accessible", e[e.NotAccessible = 1] = "NotAccessible", e[e.CannotBeNamed = 2] = "CannotBeNamed", e[e.NotResolved = 3] = "NotResolved", e))(uQ || {}), _Q = /* @__PURE__ */ ((e) => (e[e.UnionOrIntersection = 0] = "UnionOrIntersection", e[e.Spread = 1] = "Spread", e))(_Q || {}), fQ = /* @__PURE__ */ ((e) => (e[e.This = 0] = "This", e[e.Identifier = 1] = "Identifier", e[e.AssertsThis = 2] = "AssertsThis", e[e.AssertsIdentifier = 3] = "AssertsIdentifier", e))(fQ || {}), pQ = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.TypeWithConstructSignatureAndValue = 1] = "TypeWithConstructSignatureAndValue", e[e.VoidNullableOrNeverType = 2] = "VoidNullableOrNeverType", e[e.NumberLikeType = 3] = "NumberLikeType", e[e.BigIntLikeType = 4] = "BigIntLikeType", e[e.StringLikeType = 5] = "StringLikeType", e[e.BooleanType = 6] = "BooleanType", e[e.ArrayLikeType = 7] = "ArrayLikeType", e[e.ESSymbolType = 8] = "ESSymbolType", e[e.Promise = 9] = "Promise", e[e.TypeWithCallSignature = 10] = "TypeWithCallSignature", e[e.ObjectType = 11] = "ObjectType", e))(pQ || {}), IR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.FunctionScopedVariable = 1] = "FunctionScopedVariable", e[e.BlockScopedVariable = 2] = "BlockScopedVariable", e[e.Property = 4] = "Property", e[e.EnumMember = 8] = "EnumMember", e[e.Function = 16] = "Function", e[e.Class = 32] = "Class", e[e.Interface = 64] = "Interface", e[e.ConstEnum = 128] = "ConstEnum", e[e.RegularEnum = 256] = "RegularEnum", e[e.ValueModule = 512] = "ValueModule", e[e.NamespaceModule = 1024] = "NamespaceModule", e[e.TypeLiteral = 2048] = "TypeLiteral", e[e.ObjectLiteral = 4096] = "ObjectLiteral", e[e.Method = 8192] = "Method", e[e.Constructor = 16384] = "Constructor", e[e.GetAccessor = 32768] = "GetAccessor", e[e.SetAccessor = 65536] = "SetAccessor", e[e.Signature = 131072] = "Signature", e[e.TypeParameter = 262144] = "TypeParameter", e[e.TypeAlias = 524288] = "TypeAlias", e[e.ExportValue = 1048576] = "ExportValue", e[e.Alias = 2097152] = "Alias", e[e.Prototype = 4194304] = "Prototype", e[e.ExportStar = 8388608] = "ExportStar", e[e.Optional = 16777216] = "Optional", e[e.Transient = 33554432] = "Transient", e[e.Assignment = 67108864] = "Assignment", e[e.ModuleExports = 134217728] = "ModuleExports", e[e.All = -1] = "All", e[e.Enum = 384] = "Enum", e[e.Variable = 3] = "Variable", e[e.Value = 111551] = "Value", e[e.Type = 788968] = "Type", e[e.Namespace = 1920] = "Namespace", e[e.Module = 1536] = "Module", e[e.Accessor = 98304] = "Accessor", e[e.FunctionScopedVariableExcludes = 111550] = "FunctionScopedVariableExcludes", e[ + e.BlockScopedVariableExcludes = 111551 + /* Value */ + ] = "BlockScopedVariableExcludes", e[ + e.ParameterExcludes = 111551 + /* Value */ + ] = "ParameterExcludes", e[ + e.PropertyExcludes = 0 + /* None */ + ] = "PropertyExcludes", e[e.EnumMemberExcludes = 900095] = "EnumMemberExcludes", e[e.FunctionExcludes = 110991] = "FunctionExcludes", e[e.ClassExcludes = 899503] = "ClassExcludes", e[e.InterfaceExcludes = 788872] = "InterfaceExcludes", e[e.RegularEnumExcludes = 899327] = "RegularEnumExcludes", e[e.ConstEnumExcludes = 899967] = "ConstEnumExcludes", e[e.ValueModuleExcludes = 110735] = "ValueModuleExcludes", e[e.NamespaceModuleExcludes = 0] = "NamespaceModuleExcludes", e[e.MethodExcludes = 103359] = "MethodExcludes", e[e.GetAccessorExcludes = 46015] = "GetAccessorExcludes", e[e.SetAccessorExcludes = 78783] = "SetAccessorExcludes", e[e.AccessorExcludes = 13247] = "AccessorExcludes", e[e.TypeParameterExcludes = 526824] = "TypeParameterExcludes", e[ + e.TypeAliasExcludes = 788968 + /* Type */ + ] = "TypeAliasExcludes", e[ + e.AliasExcludes = 2097152 + /* Alias */ + ] = "AliasExcludes", e[e.ModuleMember = 2623475] = "ModuleMember", e[e.ExportHasLocal = 944] = "ExportHasLocal", e[e.BlockScoped = 418] = "BlockScoped", e[e.PropertyOrAccessor = 98308] = "PropertyOrAccessor", e[e.ClassMember = 106500] = "ClassMember", e[e.ExportSupportsDefaultModifier = 112] = "ExportSupportsDefaultModifier", e[e.ExportDoesNotSupportDefaultModifier = -113] = "ExportDoesNotSupportDefaultModifier", e[e.Classifiable = 2885600] = "Classifiable", e[e.LateBindingContainer = 6256] = "LateBindingContainer", e))(IR || {}), dQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Instantiated = 1] = "Instantiated", e[e.SyntheticProperty = 2] = "SyntheticProperty", e[e.SyntheticMethod = 4] = "SyntheticMethod", e[e.Readonly = 8] = "Readonly", e[e.ReadPartial = 16] = "ReadPartial", e[e.WritePartial = 32] = "WritePartial", e[e.HasNonUniformType = 64] = "HasNonUniformType", e[e.HasLiteralType = 128] = "HasLiteralType", e[e.ContainsPublic = 256] = "ContainsPublic", e[e.ContainsProtected = 512] = "ContainsProtected", e[e.ContainsPrivate = 1024] = "ContainsPrivate", e[e.ContainsStatic = 2048] = "ContainsStatic", e[e.Late = 4096] = "Late", e[e.ReverseMapped = 8192] = "ReverseMapped", e[e.OptionalParameter = 16384] = "OptionalParameter", e[e.RestParameter = 32768] = "RestParameter", e[e.DeferredType = 65536] = "DeferredType", e[e.HasNeverType = 131072] = "HasNeverType", e[e.Mapped = 262144] = "Mapped", e[e.StripOptional = 524288] = "StripOptional", e[e.Unresolved = 1048576] = "Unresolved", e[e.Synthetic = 6] = "Synthetic", e[e.Discriminant = 192] = "Discriminant", e[e.Partial = 48] = "Partial", e))(dQ || {}), mQ = /* @__PURE__ */ ((e) => (e.Call = "__call", e.Constructor = "__constructor", e.New = "__new", e.Index = "__index", e.ExportStar = "__export", e.Global = "__global", e.Missing = "__missing", e.Type = "__type", e.Object = "__object", e.JSXAttributes = "__jsxAttributes", e.Class = "__class", e.Function = "__function", e.Computed = "__computed", e.Resolving = "__resolving__", e.ExportEquals = "export=", e.Default = "default", e.This = "this", e.InstantiationExpression = "__instantiationExpression", e.ImportAttributes = "__importAttributes", e))(mQ || {}), OR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeChecked = 1] = "TypeChecked", e[e.LexicalThis = 2] = "LexicalThis", e[e.CaptureThis = 4] = "CaptureThis", e[e.CaptureNewTarget = 8] = "CaptureNewTarget", e[e.SuperInstance = 16] = "SuperInstance", e[e.SuperStatic = 32] = "SuperStatic", e[e.ContextChecked = 64] = "ContextChecked", e[e.MethodWithSuperPropertyAccessInAsync = 128] = "MethodWithSuperPropertyAccessInAsync", e[e.MethodWithSuperPropertyAssignmentInAsync = 256] = "MethodWithSuperPropertyAssignmentInAsync", e[e.CaptureArguments = 512] = "CaptureArguments", e[e.EnumValuesComputed = 1024] = "EnumValuesComputed", e[e.LexicalModuleMergesWithClass = 2048] = "LexicalModuleMergesWithClass", e[e.LoopWithCapturedBlockScopedBinding = 4096] = "LoopWithCapturedBlockScopedBinding", e[e.ContainsCapturedBlockScopeBinding = 8192] = "ContainsCapturedBlockScopeBinding", e[e.CapturedBlockScopedBinding = 16384] = "CapturedBlockScopedBinding", e[e.BlockScopedBindingInLoop = 32768] = "BlockScopedBindingInLoop", e[e.NeedsLoopOutParameter = 65536] = "NeedsLoopOutParameter", e[e.AssignmentsMarked = 131072] = "AssignmentsMarked", e[e.ContainsConstructorReference = 262144] = "ContainsConstructorReference", e[e.ConstructorReference = 536870912] = "ConstructorReference", e[e.ContainsClassWithPrivateIdentifiers = 1048576] = "ContainsClassWithPrivateIdentifiers", e[e.ContainsSuperPropertyInStaticInitializer = 2097152] = "ContainsSuperPropertyInStaticInitializer", e[e.InCheckIdentifier = 4194304] = "InCheckIdentifier", e[e.LazyFlags = 539358128] = "LazyFlags", e))(OR || {}), FR = /* @__PURE__ */ ((e) => (e[e.Any = 1] = "Any", e[e.Unknown = 2] = "Unknown", e[e.String = 4] = "String", e[e.Number = 8] = "Number", e[e.Boolean = 16] = "Boolean", e[e.Enum = 32] = "Enum", e[e.BigInt = 64] = "BigInt", e[e.StringLiteral = 128] = "StringLiteral", e[e.NumberLiteral = 256] = "NumberLiteral", e[e.BooleanLiteral = 512] = "BooleanLiteral", e[e.EnumLiteral = 1024] = "EnumLiteral", e[e.BigIntLiteral = 2048] = "BigIntLiteral", e[e.ESSymbol = 4096] = "ESSymbol", e[e.UniqueESSymbol = 8192] = "UniqueESSymbol", e[e.Void = 16384] = "Void", e[e.Undefined = 32768] = "Undefined", e[e.Null = 65536] = "Null", e[e.Never = 131072] = "Never", e[e.TypeParameter = 262144] = "TypeParameter", e[e.Object = 524288] = "Object", e[e.Union = 1048576] = "Union", e[e.Intersection = 2097152] = "Intersection", e[e.Index = 4194304] = "Index", e[e.IndexedAccess = 8388608] = "IndexedAccess", e[e.Conditional = 16777216] = "Conditional", e[e.Substitution = 33554432] = "Substitution", e[e.NonPrimitive = 67108864] = "NonPrimitive", e[e.TemplateLiteral = 134217728] = "TemplateLiteral", e[e.StringMapping = 268435456] = "StringMapping", e[e.Reserved1 = 536870912] = "Reserved1", e[e.Reserved2 = 1073741824] = "Reserved2", e[e.AnyOrUnknown = 3] = "AnyOrUnknown", e[e.Nullable = 98304] = "Nullable", e[e.Literal = 2944] = "Literal", e[e.Unit = 109472] = "Unit", e[e.Freshable = 2976] = "Freshable", e[e.StringOrNumberLiteral = 384] = "StringOrNumberLiteral", e[e.StringOrNumberLiteralOrUnique = 8576] = "StringOrNumberLiteralOrUnique", e[e.DefinitelyFalsy = 117632] = "DefinitelyFalsy", e[e.PossiblyFalsy = 117724] = "PossiblyFalsy", e[e.Intrinsic = 67359327] = "Intrinsic", e[e.StringLike = 402653316] = "StringLike", e[e.NumberLike = 296] = "NumberLike", e[e.BigIntLike = 2112] = "BigIntLike", e[e.BooleanLike = 528] = "BooleanLike", e[e.EnumLike = 1056] = "EnumLike", e[e.ESSymbolLike = 12288] = "ESSymbolLike", e[e.VoidLike = 49152] = "VoidLike", e[e.Primitive = 402784252] = "Primitive", e[e.DefinitelyNonNullable = 470302716] = "DefinitelyNonNullable", e[e.DisjointDomains = 469892092] = "DisjointDomains", e[e.UnionOrIntersection = 3145728] = "UnionOrIntersection", e[e.StructuredType = 3670016] = "StructuredType", e[e.TypeVariable = 8650752] = "TypeVariable", e[e.InstantiableNonPrimitive = 58982400] = "InstantiableNonPrimitive", e[e.InstantiablePrimitive = 406847488] = "InstantiablePrimitive", e[e.Instantiable = 465829888] = "Instantiable", e[e.StructuredOrInstantiable = 469499904] = "StructuredOrInstantiable", e[e.ObjectFlagsType = 3899393] = "ObjectFlagsType", e[e.Simplifiable = 25165824] = "Simplifiable", e[e.Singleton = 67358815] = "Singleton", e[e.Narrowable = 536624127] = "Narrowable", e[e.IncludesMask = 473694207] = "IncludesMask", e[ + e.IncludesMissingType = 262144 + /* TypeParameter */ + ] = "IncludesMissingType", e[ + e.IncludesNonWideningType = 4194304 + /* Index */ + ] = "IncludesNonWideningType", e[ + e.IncludesWildcard = 8388608 + /* IndexedAccess */ + ] = "IncludesWildcard", e[ + e.IncludesEmptyObject = 16777216 + /* Conditional */ + ] = "IncludesEmptyObject", e[ + e.IncludesInstantiable = 33554432 + /* Substitution */ + ] = "IncludesInstantiable", e[ + e.IncludesConstrainedTypeVariable = 536870912 + /* Reserved1 */ + ] = "IncludesConstrainedTypeVariable", e[ + e.IncludesError = 1073741824 + /* Reserved2 */ + ] = "IncludesError", e[e.NotPrimitiveUnion = 36323331] = "NotPrimitiveUnion", e))(FR || {}), LR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Class = 1] = "Class", e[e.Interface = 2] = "Interface", e[e.Reference = 4] = "Reference", e[e.Tuple = 8] = "Tuple", e[e.Anonymous = 16] = "Anonymous", e[e.Mapped = 32] = "Mapped", e[e.Instantiated = 64] = "Instantiated", e[e.ObjectLiteral = 128] = "ObjectLiteral", e[e.EvolvingArray = 256] = "EvolvingArray", e[e.ObjectLiteralPatternWithComputedProperties = 512] = "ObjectLiteralPatternWithComputedProperties", e[e.ReverseMapped = 1024] = "ReverseMapped", e[e.JsxAttributes = 2048] = "JsxAttributes", e[e.JSLiteral = 4096] = "JSLiteral", e[e.FreshLiteral = 8192] = "FreshLiteral", e[e.ArrayLiteral = 16384] = "ArrayLiteral", e[e.PrimitiveUnion = 32768] = "PrimitiveUnion", e[e.ContainsWideningType = 65536] = "ContainsWideningType", e[e.ContainsObjectOrArrayLiteral = 131072] = "ContainsObjectOrArrayLiteral", e[e.NonInferrableType = 262144] = "NonInferrableType", e[e.CouldContainTypeVariablesComputed = 524288] = "CouldContainTypeVariablesComputed", e[e.CouldContainTypeVariables = 1048576] = "CouldContainTypeVariables", e[e.ClassOrInterface = 3] = "ClassOrInterface", e[e.RequiresWidening = 196608] = "RequiresWidening", e[e.PropagatingFlags = 458752] = "PropagatingFlags", e[e.InstantiatedMapped = 96] = "InstantiatedMapped", e[e.ObjectTypeKindMask = 1343] = "ObjectTypeKindMask", e[e.ContainsSpread = 2097152] = "ContainsSpread", e[e.ObjectRestType = 4194304] = "ObjectRestType", e[e.InstantiationExpressionType = 8388608] = "InstantiationExpressionType", e[e.SingleSignatureType = 134217728] = "SingleSignatureType", e[e.IsClassInstanceClone = 16777216] = "IsClassInstanceClone", e[e.IdenticalBaseTypeCalculated = 33554432] = "IdenticalBaseTypeCalculated", e[e.IdenticalBaseTypeExists = 67108864] = "IdenticalBaseTypeExists", e[e.IsGenericTypeComputed = 2097152] = "IsGenericTypeComputed", e[e.IsGenericObjectType = 4194304] = "IsGenericObjectType", e[e.IsGenericIndexType = 8388608] = "IsGenericIndexType", e[e.IsGenericType = 12582912] = "IsGenericType", e[e.ContainsIntersections = 16777216] = "ContainsIntersections", e[e.IsUnknownLikeUnionComputed = 33554432] = "IsUnknownLikeUnionComputed", e[e.IsUnknownLikeUnion = 67108864] = "IsUnknownLikeUnion", e[e.IsNeverIntersectionComputed = 16777216] = "IsNeverIntersectionComputed", e[e.IsNeverIntersection = 33554432] = "IsNeverIntersection", e[e.IsConstrainedTypeVariable = 67108864] = "IsConstrainedTypeVariable", e))(LR || {}), gQ = /* @__PURE__ */ ((e) => (e[e.Invariant = 0] = "Invariant", e[e.Covariant = 1] = "Covariant", e[e.Contravariant = 2] = "Contravariant", e[e.Bivariant = 3] = "Bivariant", e[e.Independent = 4] = "Independent", e[e.VarianceMask = 7] = "VarianceMask", e[e.Unmeasurable = 8] = "Unmeasurable", e[e.Unreliable = 16] = "Unreliable", e[e.AllowsStructuralFallback = 24] = "AllowsStructuralFallback", e))(gQ || {}), hQ = /* @__PURE__ */ ((e) => (e[e.Required = 1] = "Required", e[e.Optional = 2] = "Optional", e[e.Rest = 4] = "Rest", e[e.Variadic = 8] = "Variadic", e[e.Fixed = 3] = "Fixed", e[e.Variable = 12] = "Variable", e[e.NonRequired = 14] = "NonRequired", e[e.NonRest = 11] = "NonRest", e))(hQ || {}), yQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IncludeUndefined = 1] = "IncludeUndefined", e[e.NoIndexSignatures = 2] = "NoIndexSignatures", e[e.Writing = 4] = "Writing", e[e.CacheSymbol = 8] = "CacheSymbol", e[e.NoTupleBoundsCheck = 16] = "NoTupleBoundsCheck", e[e.ExpressionPosition = 32] = "ExpressionPosition", e[e.ReportDeprecated = 64] = "ReportDeprecated", e[e.SuppressNoImplicitAnyError = 128] = "SuppressNoImplicitAnyError", e[e.Contextual = 256] = "Contextual", e[ + e.Persistent = 1 + /* IncludeUndefined */ + ] = "Persistent", e))(yQ || {}), vQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.StringsOnly = 1] = "StringsOnly", e[e.NoIndexSignatures = 2] = "NoIndexSignatures", e[e.NoReducibleCheck = 4] = "NoReducibleCheck", e))(vQ || {}), bQ = /* @__PURE__ */ ((e) => (e[e.Component = 0] = "Component", e[e.Function = 1] = "Function", e[e.Mixed = 2] = "Mixed", e))(bQ || {}), SQ = /* @__PURE__ */ ((e) => (e[e.Call = 0] = "Call", e[e.Construct = 1] = "Construct", e))(SQ || {}), MR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasRestParameter = 1] = "HasRestParameter", e[e.HasLiteralTypes = 2] = "HasLiteralTypes", e[e.Abstract = 4] = "Abstract", e[e.IsInnerCallChain = 8] = "IsInnerCallChain", e[e.IsOuterCallChain = 16] = "IsOuterCallChain", e[e.IsUntypedSignatureInJSFile = 32] = "IsUntypedSignatureInJSFile", e[e.IsNonInferrable = 64] = "IsNonInferrable", e[e.IsSignatureCandidateForOverloadFailure = 128] = "IsSignatureCandidateForOverloadFailure", e[e.PropagatingFlags = 167] = "PropagatingFlags", e[e.CallChainFlags = 24] = "CallChainFlags", e))(MR || {}), TQ = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Number = 1] = "Number", e))(TQ || {}), xQ = /* @__PURE__ */ ((e) => (e[e.Simple = 0] = "Simple", e[e.Array = 1] = "Array", e[e.Deferred = 2] = "Deferred", e[e.Function = 3] = "Function", e[e.Composite = 4] = "Composite", e[e.Merged = 5] = "Merged", e))(xQ || {}), kQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NakedTypeVariable = 1] = "NakedTypeVariable", e[e.SpeculativeTuple = 2] = "SpeculativeTuple", e[e.SubstituteSource = 4] = "SubstituteSource", e[e.HomomorphicMappedType = 8] = "HomomorphicMappedType", e[e.PartialHomomorphicMappedType = 16] = "PartialHomomorphicMappedType", e[e.MappedTypeConstraint = 32] = "MappedTypeConstraint", e[e.ContravariantConditional = 64] = "ContravariantConditional", e[e.ReturnType = 128] = "ReturnType", e[e.LiteralKeyof = 256] = "LiteralKeyof", e[e.NoConstraints = 512] = "NoConstraints", e[e.AlwaysStrict = 1024] = "AlwaysStrict", e[e.MaxValue = 2048] = "MaxValue", e[e.PriorityImpliesCombination = 416] = "PriorityImpliesCombination", e[e.Circularity = -1] = "Circularity", e))(kQ || {}), CQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoDefault = 1] = "NoDefault", e[e.AnyDefault = 2] = "AnyDefault", e[e.SkippedGenericFunction = 4] = "SkippedGenericFunction", e))(CQ || {}), EQ = /* @__PURE__ */ ((e) => (e[e.False = 0] = "False", e[e.Unknown = 1] = "Unknown", e[e.Maybe = 3] = "Maybe", e[e.True = -1] = "True", e))(EQ || {}), DQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ExportsProperty = 1] = "ExportsProperty", e[e.ModuleExports = 2] = "ModuleExports", e[e.PrototypeProperty = 3] = "PrototypeProperty", e[e.ThisProperty = 4] = "ThisProperty", e[e.Property = 5] = "Property", e[e.Prototype = 6] = "Prototype", e[e.ObjectDefinePropertyValue = 7] = "ObjectDefinePropertyValue", e[e.ObjectDefinePropertyExports = 8] = "ObjectDefinePropertyExports", e[e.ObjectDefinePrototypeProperty = 9] = "ObjectDefinePrototypeProperty", e))(DQ || {}), bI = /* @__PURE__ */ ((e) => (e[e.Warning = 0] = "Warning", e[e.Error = 1] = "Error", e[e.Suggestion = 2] = "Suggestion", e[e.Message = 3] = "Message", e))(bI || {}); + function M2(e, t = !0) { + const n = bI[e.category]; + return t ? n.toLowerCase() : n; + } + var NE = /* @__PURE__ */ ((e) => (e[e.Classic = 1] = "Classic", e[e.NodeJs = 2] = "NodeJs", e[e.Node10 = 2] = "Node10", e[e.Node16 = 3] = "Node16", e[e.NodeNext = 99] = "NodeNext", e[e.Bundler = 100] = "Bundler", e))(NE || {}), PQ = /* @__PURE__ */ ((e) => (e[e.Legacy = 1] = "Legacy", e[e.Auto = 2] = "Auto", e[e.Force = 3] = "Force", e))(PQ || {}), wQ = /* @__PURE__ */ ((e) => (e[e.FixedPollingInterval = 0] = "FixedPollingInterval", e[e.PriorityPollingInterval = 1] = "PriorityPollingInterval", e[e.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", e[e.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", e[e.UseFsEvents = 4] = "UseFsEvents", e[e.UseFsEventsOnParentDirectory = 5] = "UseFsEventsOnParentDirectory", e))(wQ || {}), AQ = /* @__PURE__ */ ((e) => (e[e.UseFsEvents = 0] = "UseFsEvents", e[e.FixedPollingInterval = 1] = "FixedPollingInterval", e[e.DynamicPriorityPolling = 2] = "DynamicPriorityPolling", e[e.FixedChunkSizePolling = 3] = "FixedChunkSizePolling", e))(AQ || {}), NQ = /* @__PURE__ */ ((e) => (e[e.FixedInterval = 0] = "FixedInterval", e[e.PriorityInterval = 1] = "PriorityInterval", e[e.DynamicPriority = 2] = "DynamicPriority", e[e.FixedChunkSize = 3] = "FixedChunkSize", e))(NQ || {}), _w = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.CommonJS = 1] = "CommonJS", e[e.AMD = 2] = "AMD", e[e.UMD = 3] = "UMD", e[e.System = 4] = "System", e[e.ES2015 = 5] = "ES2015", e[e.ES2020 = 6] = "ES2020", e[e.ES2022 = 7] = "ES2022", e[e.ESNext = 99] = "ESNext", e[e.Node16 = 100] = "Node16", e[e.NodeNext = 199] = "NodeNext", e[e.Preserve = 200] = "Preserve", e))(_w || {}), IQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Preserve = 1] = "Preserve", e[e.React = 2] = "React", e[e.ReactNative = 3] = "ReactNative", e[e.ReactJSX = 4] = "ReactJSX", e[e.ReactJSXDev = 5] = "ReactJSXDev", e))(IQ || {}), OQ = /* @__PURE__ */ ((e) => (e[e.Remove = 0] = "Remove", e[e.Preserve = 1] = "Preserve", e[e.Error = 2] = "Error", e))(OQ || {}), FQ = /* @__PURE__ */ ((e) => (e[e.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", e[e.LineFeed = 1] = "LineFeed", e))(FQ || {}), RR = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.JS = 1] = "JS", e[e.JSX = 2] = "JSX", e[e.TS = 3] = "TS", e[e.TSX = 4] = "TSX", e[e.External = 5] = "External", e[e.JSON = 6] = "JSON", e[e.Deferred = 7] = "Deferred", e))(RR || {}), LQ = /* @__PURE__ */ ((e) => (e[e.ES3 = 0] = "ES3", e[e.ES5 = 1] = "ES5", e[e.ES2015 = 2] = "ES2015", e[e.ES2016 = 3] = "ES2016", e[e.ES2017 = 4] = "ES2017", e[e.ES2018 = 5] = "ES2018", e[e.ES2019 = 6] = "ES2019", e[e.ES2020 = 7] = "ES2020", e[e.ES2021 = 8] = "ES2021", e[e.ES2022 = 9] = "ES2022", e[e.ES2023 = 10] = "ES2023", e[e.ESNext = 99] = "ESNext", e[e.JSON = 100] = "JSON", e[ + e.Latest = 99 + /* ESNext */ + ] = "Latest", e))(LQ || {}), MQ = /* @__PURE__ */ ((e) => (e[e.Standard = 0] = "Standard", e[e.JSX = 1] = "JSX", e))(MQ || {}), RQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Recursive = 1] = "Recursive", e))(RQ || {}), jQ = /* @__PURE__ */ ((e) => (e[e.EOF = -1] = "EOF", e[e.nullCharacter = 0] = "nullCharacter", e[e.maxAsciiCharacter = 127] = "maxAsciiCharacter", e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.lineSeparator = 8232] = "lineSeparator", e[e.paragraphSeparator = 8233] = "paragraphSeparator", e[e.nextLine = 133] = "nextLine", e[e.space = 32] = "space", e[e.nonBreakingSpace = 160] = "nonBreakingSpace", e[e.enQuad = 8192] = "enQuad", e[e.emQuad = 8193] = "emQuad", e[e.enSpace = 8194] = "enSpace", e[e.emSpace = 8195] = "emSpace", e[e.threePerEmSpace = 8196] = "threePerEmSpace", e[e.fourPerEmSpace = 8197] = "fourPerEmSpace", e[e.sixPerEmSpace = 8198] = "sixPerEmSpace", e[e.figureSpace = 8199] = "figureSpace", e[e.punctuationSpace = 8200] = "punctuationSpace", e[e.thinSpace = 8201] = "thinSpace", e[e.hairSpace = 8202] = "hairSpace", e[e.zeroWidthSpace = 8203] = "zeroWidthSpace", e[e.narrowNoBreakSpace = 8239] = "narrowNoBreakSpace", e[e.ideographicSpace = 12288] = "ideographicSpace", e[e.mathematicalSpace = 8287] = "mathematicalSpace", e[e.ogham = 5760] = "ogham", e[e.replacementCharacter = 65533] = "replacementCharacter", e[e._ = 95] = "_", e[e.$ = 36] = "$", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.ampersand = 38] = "ampersand", e[e.asterisk = 42] = "asterisk", e[e.at = 64] = "at", e[e.backslash = 92] = "backslash", e[e.backtick = 96] = "backtick", e[e.bar = 124] = "bar", e[e.caret = 94] = "caret", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.closeParen = 41] = "closeParen", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.equals = 61] = "equals", e[e.exclamation = 33] = "exclamation", e[e.greaterThan = 62] = "greaterThan", e[e.hash = 35] = "hash", e[e.lessThan = 60] = "lessThan", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.openParen = 40] = "openParen", e[e.percent = 37] = "percent", e[e.plus = 43] = "plus", e[e.question = 63] = "question", e[e.semicolon = 59] = "semicolon", e[e.singleQuote = 39] = "singleQuote", e[e.slash = 47] = "slash", e[e.tilde = 126] = "tilde", e[e.backspace = 8] = "backspace", e[e.formFeed = 12] = "formFeed", e[e.byteOrderMark = 65279] = "byteOrderMark", e[e.tab = 9] = "tab", e[e.verticalTab = 11] = "verticalTab", e))(jQ || {}), BQ = /* @__PURE__ */ ((e) => (e.Ts = ".ts", e.Tsx = ".tsx", e.Dts = ".d.ts", e.Js = ".js", e.Jsx = ".jsx", e.Json = ".json", e.TsBuildInfo = ".tsbuildinfo", e.Mjs = ".mjs", e.Mts = ".mts", e.Dmts = ".d.mts", e.Cjs = ".cjs", e.Cts = ".cts", e.Dcts = ".d.cts", e))(BQ || {}), jR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ContainsTypeScript = 1] = "ContainsTypeScript", e[e.ContainsJsx = 2] = "ContainsJsx", e[e.ContainsESNext = 4] = "ContainsESNext", e[e.ContainsES2022 = 8] = "ContainsES2022", e[e.ContainsES2021 = 16] = "ContainsES2021", e[e.ContainsES2020 = 32] = "ContainsES2020", e[e.ContainsES2019 = 64] = "ContainsES2019", e[e.ContainsES2018 = 128] = "ContainsES2018", e[e.ContainsES2017 = 256] = "ContainsES2017", e[e.ContainsES2016 = 512] = "ContainsES2016", e[e.ContainsES2015 = 1024] = "ContainsES2015", e[e.ContainsGenerator = 2048] = "ContainsGenerator", e[e.ContainsDestructuringAssignment = 4096] = "ContainsDestructuringAssignment", e[e.ContainsTypeScriptClassSyntax = 8192] = "ContainsTypeScriptClassSyntax", e[e.ContainsLexicalThis = 16384] = "ContainsLexicalThis", e[e.ContainsRestOrSpread = 32768] = "ContainsRestOrSpread", e[e.ContainsObjectRestOrSpread = 65536] = "ContainsObjectRestOrSpread", e[e.ContainsComputedPropertyName = 131072] = "ContainsComputedPropertyName", e[e.ContainsBlockScopedBinding = 262144] = "ContainsBlockScopedBinding", e[e.ContainsBindingPattern = 524288] = "ContainsBindingPattern", e[e.ContainsYield = 1048576] = "ContainsYield", e[e.ContainsAwait = 2097152] = "ContainsAwait", e[e.ContainsHoistedDeclarationOrCompletion = 4194304] = "ContainsHoistedDeclarationOrCompletion", e[e.ContainsDynamicImport = 8388608] = "ContainsDynamicImport", e[e.ContainsClassFields = 16777216] = "ContainsClassFields", e[e.ContainsDecorators = 33554432] = "ContainsDecorators", e[e.ContainsPossibleTopLevelAwait = 67108864] = "ContainsPossibleTopLevelAwait", e[e.ContainsLexicalSuper = 134217728] = "ContainsLexicalSuper", e[e.ContainsUpdateExpressionForIdentifier = 268435456] = "ContainsUpdateExpressionForIdentifier", e[e.ContainsPrivateIdentifierInExpression = 536870912] = "ContainsPrivateIdentifierInExpression", e[e.HasComputedFlags = -2147483648] = "HasComputedFlags", e[ + e.AssertTypeScript = 1 + /* ContainsTypeScript */ + ] = "AssertTypeScript", e[ + e.AssertJsx = 2 + /* ContainsJsx */ + ] = "AssertJsx", e[ + e.AssertESNext = 4 + /* ContainsESNext */ + ] = "AssertESNext", e[ + e.AssertES2022 = 8 + /* ContainsES2022 */ + ] = "AssertES2022", e[ + e.AssertES2021 = 16 + /* ContainsES2021 */ + ] = "AssertES2021", e[ + e.AssertES2020 = 32 + /* ContainsES2020 */ + ] = "AssertES2020", e[ + e.AssertES2019 = 64 + /* ContainsES2019 */ + ] = "AssertES2019", e[ + e.AssertES2018 = 128 + /* ContainsES2018 */ + ] = "AssertES2018", e[ + e.AssertES2017 = 256 + /* ContainsES2017 */ + ] = "AssertES2017", e[ + e.AssertES2016 = 512 + /* ContainsES2016 */ + ] = "AssertES2016", e[ + e.AssertES2015 = 1024 + /* ContainsES2015 */ + ] = "AssertES2015", e[ + e.AssertGenerator = 2048 + /* ContainsGenerator */ + ] = "AssertGenerator", e[ + e.AssertDestructuringAssignment = 4096 + /* ContainsDestructuringAssignment */ + ] = "AssertDestructuringAssignment", e[ + e.OuterExpressionExcludes = -2147483648 + /* HasComputedFlags */ + ] = "OuterExpressionExcludes", e[ + e.PropertyAccessExcludes = -2147483648 + /* OuterExpressionExcludes */ + ] = "PropertyAccessExcludes", e[ + e.NodeExcludes = -2147483648 + /* PropertyAccessExcludes */ + ] = "NodeExcludes", e[e.ArrowFunctionExcludes = -2072174592] = "ArrowFunctionExcludes", e[e.FunctionExcludes = -1937940480] = "FunctionExcludes", e[e.ConstructorExcludes = -1937948672] = "ConstructorExcludes", e[e.MethodOrAccessorExcludes = -2005057536] = "MethodOrAccessorExcludes", e[e.PropertyExcludes = -2013249536] = "PropertyExcludes", e[e.ClassExcludes = -2147344384] = "ClassExcludes", e[e.ModuleExcludes = -1941676032] = "ModuleExcludes", e[e.TypeExcludes = -2] = "TypeExcludes", e[e.ObjectLiteralExcludes = -2147278848] = "ObjectLiteralExcludes", e[e.ArrayLiteralOrCallOrNewExcludes = -2147450880] = "ArrayLiteralOrCallOrNewExcludes", e[e.VariableDeclarationListExcludes = -2146893824] = "VariableDeclarationListExcludes", e[ + e.ParameterExcludes = -2147483648 + /* NodeExcludes */ + ] = "ParameterExcludes", e[e.CatchClauseExcludes = -2147418112] = "CatchClauseExcludes", e[e.BindingPatternExcludes = -2147450880] = "BindingPatternExcludes", e[e.ContainsLexicalThisOrSuper = 134234112] = "ContainsLexicalThisOrSuper", e[e.PropertyNamePropagatingFlags = 134234112] = "PropertyNamePropagatingFlags", e))(jR || {}), BR = /* @__PURE__ */ ((e) => (e[e.TabStop = 0] = "TabStop", e[e.Placeholder = 1] = "Placeholder", e[e.Choice = 2] = "Choice", e[e.Variable = 3] = "Variable", e))(BR || {}), JR = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.SingleLine = 1] = "SingleLine", e[e.MultiLine = 2] = "MultiLine", e[e.AdviseOnEmitNode = 4] = "AdviseOnEmitNode", e[e.NoSubstitution = 8] = "NoSubstitution", e[e.CapturesThis = 16] = "CapturesThis", e[e.NoLeadingSourceMap = 32] = "NoLeadingSourceMap", e[e.NoTrailingSourceMap = 64] = "NoTrailingSourceMap", e[e.NoSourceMap = 96] = "NoSourceMap", e[e.NoNestedSourceMaps = 128] = "NoNestedSourceMaps", e[e.NoTokenLeadingSourceMaps = 256] = "NoTokenLeadingSourceMaps", e[e.NoTokenTrailingSourceMaps = 512] = "NoTokenTrailingSourceMaps", e[e.NoTokenSourceMaps = 768] = "NoTokenSourceMaps", e[e.NoLeadingComments = 1024] = "NoLeadingComments", e[e.NoTrailingComments = 2048] = "NoTrailingComments", e[e.NoComments = 3072] = "NoComments", e[e.NoNestedComments = 4096] = "NoNestedComments", e[e.HelperName = 8192] = "HelperName", e[e.ExportName = 16384] = "ExportName", e[e.LocalName = 32768] = "LocalName", e[e.InternalName = 65536] = "InternalName", e[e.Indented = 131072] = "Indented", e[e.NoIndentation = 262144] = "NoIndentation", e[e.AsyncFunctionBody = 524288] = "AsyncFunctionBody", e[e.ReuseTempVariableScope = 1048576] = "ReuseTempVariableScope", e[e.CustomPrologue = 2097152] = "CustomPrologue", e[e.NoHoisting = 4194304] = "NoHoisting", e[e.Iterator = 8388608] = "Iterator", e[e.NoAsciiEscaping = 16777216] = "NoAsciiEscaping", e))(JR || {}), JQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeScriptClassWrapper = 1] = "TypeScriptClassWrapper", e[e.NeverApplyImportHelper = 2] = "NeverApplyImportHelper", e[e.IgnoreSourceNewlines = 4] = "IgnoreSourceNewlines", e[e.Immutable = 8] = "Immutable", e[e.IndirectCall = 16] = "IndirectCall", e[e.TransformPrivateStaticElements = 32] = "TransformPrivateStaticElements", e))(JQ || {}), zQ = /* @__PURE__ */ ((e) => (e[ + e.Classes = 2 + /* ES2015 */ + ] = "Classes", e[ + e.ForOf = 2 + /* ES2015 */ + ] = "ForOf", e[ + e.Generators = 2 + /* ES2015 */ + ] = "Generators", e[ + e.Iteration = 2 + /* ES2015 */ + ] = "Iteration", e[ + e.SpreadElements = 2 + /* ES2015 */ + ] = "SpreadElements", e[ + e.RestElements = 2 + /* ES2015 */ + ] = "RestElements", e[ + e.TaggedTemplates = 2 + /* ES2015 */ + ] = "TaggedTemplates", e[ + e.DestructuringAssignment = 2 + /* ES2015 */ + ] = "DestructuringAssignment", e[ + e.BindingPatterns = 2 + /* ES2015 */ + ] = "BindingPatterns", e[ + e.ArrowFunctions = 2 + /* ES2015 */ + ] = "ArrowFunctions", e[ + e.BlockScopedVariables = 2 + /* ES2015 */ + ] = "BlockScopedVariables", e[ + e.ObjectAssign = 2 + /* ES2015 */ + ] = "ObjectAssign", e[ + e.RegularExpressionFlagsUnicode = 2 + /* ES2015 */ + ] = "RegularExpressionFlagsUnicode", e[ + e.RegularExpressionFlagsSticky = 2 + /* ES2015 */ + ] = "RegularExpressionFlagsSticky", e[ + e.Exponentiation = 3 + /* ES2016 */ + ] = "Exponentiation", e[ + e.AsyncFunctions = 4 + /* ES2017 */ + ] = "AsyncFunctions", e[ + e.ForAwaitOf = 5 + /* ES2018 */ + ] = "ForAwaitOf", e[ + e.AsyncGenerators = 5 + /* ES2018 */ + ] = "AsyncGenerators", e[ + e.AsyncIteration = 5 + /* ES2018 */ + ] = "AsyncIteration", e[ + e.ObjectSpreadRest = 5 + /* ES2018 */ + ] = "ObjectSpreadRest", e[ + e.RegularExpressionFlagsDotAll = 5 + /* ES2018 */ + ] = "RegularExpressionFlagsDotAll", e[ + e.BindinglessCatch = 6 + /* ES2019 */ + ] = "BindinglessCatch", e[ + e.BigInt = 7 + /* ES2020 */ + ] = "BigInt", e[ + e.NullishCoalesce = 7 + /* ES2020 */ + ] = "NullishCoalesce", e[ + e.OptionalChaining = 7 + /* ES2020 */ + ] = "OptionalChaining", e[ + e.LogicalAssignment = 8 + /* ES2021 */ + ] = "LogicalAssignment", e[ + e.TopLevelAwait = 9 + /* ES2022 */ + ] = "TopLevelAwait", e[ + e.ClassFields = 9 + /* ES2022 */ + ] = "ClassFields", e[ + e.PrivateNamesAndClassStaticBlocks = 9 + /* ES2022 */ + ] = "PrivateNamesAndClassStaticBlocks", e[ + e.RegularExpressionFlagsHasIndices = 9 + /* ES2022 */ + ] = "RegularExpressionFlagsHasIndices", e[ + e.ShebangComments = 99 + /* ESNext */ + ] = "ShebangComments", e[ + e.UsingAndAwaitUsing = 99 + /* ESNext */ + ] = "UsingAndAwaitUsing", e[ + e.ClassAndClassElementDecorators = 99 + /* ESNext */ + ] = "ClassAndClassElementDecorators", e[ + e.RegularExpressionFlagsUnicodeSets = 99 + /* ESNext */ + ] = "RegularExpressionFlagsUnicodeSets", e))(zQ || {}), WQ = /* @__PURE__ */ ((e) => (e[e.Extends = 1] = "Extends", e[e.Assign = 2] = "Assign", e[e.Rest = 4] = "Rest", e[e.Decorate = 8] = "Decorate", e[ + e.ESDecorateAndRunInitializers = 8 + /* Decorate */ + ] = "ESDecorateAndRunInitializers", e[e.Metadata = 16] = "Metadata", e[e.Param = 32] = "Param", e[e.Awaiter = 64] = "Awaiter", e[e.Generator = 128] = "Generator", e[e.Values = 256] = "Values", e[e.Read = 512] = "Read", e[e.SpreadArray = 1024] = "SpreadArray", e[e.Await = 2048] = "Await", e[e.AsyncGenerator = 4096] = "AsyncGenerator", e[e.AsyncDelegator = 8192] = "AsyncDelegator", e[e.AsyncValues = 16384] = "AsyncValues", e[e.ExportStar = 32768] = "ExportStar", e[e.ImportStar = 65536] = "ImportStar", e[e.ImportDefault = 131072] = "ImportDefault", e[e.MakeTemplateObject = 262144] = "MakeTemplateObject", e[e.ClassPrivateFieldGet = 524288] = "ClassPrivateFieldGet", e[e.ClassPrivateFieldSet = 1048576] = "ClassPrivateFieldSet", e[e.ClassPrivateFieldIn = 2097152] = "ClassPrivateFieldIn", e[e.SetFunctionName = 4194304] = "SetFunctionName", e[e.PropKey = 8388608] = "PropKey", e[e.AddDisposableResourceAndDisposeResources = 16777216] = "AddDisposableResourceAndDisposeResources", e[ + e.FirstEmitHelper = 1 + /* Extends */ + ] = "FirstEmitHelper", e[ + e.LastEmitHelper = 16777216 + /* AddDisposableResourceAndDisposeResources */ + ] = "LastEmitHelper", e[ + e.ForOfIncludes = 256 + /* Values */ + ] = "ForOfIncludes", e[ + e.ForAwaitOfIncludes = 16384 + /* AsyncValues */ + ] = "ForAwaitOfIncludes", e[e.AsyncGeneratorIncludes = 6144] = "AsyncGeneratorIncludes", e[e.AsyncDelegatorIncludes = 26624] = "AsyncDelegatorIncludes", e[e.SpreadIncludes = 1536] = "SpreadIncludes", e))(WQ || {}), VQ = /* @__PURE__ */ ((e) => (e[e.SourceFile = 0] = "SourceFile", e[e.Expression = 1] = "Expression", e[e.IdentifierName = 2] = "IdentifierName", e[e.MappedTypeParameter = 3] = "MappedTypeParameter", e[e.Unspecified = 4] = "Unspecified", e[e.EmbeddedStatement = 5] = "EmbeddedStatement", e[e.JsxAttributeValue = 6] = "JsxAttributeValue", e[e.ImportTypeNodeAttributes = 7] = "ImportTypeNodeAttributes", e))(VQ || {}), UQ = /* @__PURE__ */ ((e) => (e[e.Parentheses = 1] = "Parentheses", e[e.TypeAssertions = 2] = "TypeAssertions", e[e.NonNullAssertions = 4] = "NonNullAssertions", e[e.PartiallyEmittedExpressions = 8] = "PartiallyEmittedExpressions", e[e.Assertions = 6] = "Assertions", e[e.All = 15] = "All", e[e.ExcludeJSDocTypeAssertion = 16] = "ExcludeJSDocTypeAssertion", e))(UQ || {}), qQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InParameters = 1] = "InParameters", e[e.VariablesHoistedInParameters = 2] = "VariablesHoistedInParameters", e))(qQ || {}), HQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.SingleLine = 0] = "SingleLine", e[e.MultiLine = 1] = "MultiLine", e[e.PreserveLines = 2] = "PreserveLines", e[e.LinesMask = 3] = "LinesMask", e[e.NotDelimited = 0] = "NotDelimited", e[e.BarDelimited = 4] = "BarDelimited", e[e.AmpersandDelimited = 8] = "AmpersandDelimited", e[e.CommaDelimited = 16] = "CommaDelimited", e[e.AsteriskDelimited = 32] = "AsteriskDelimited", e[e.DelimitersMask = 60] = "DelimitersMask", e[e.AllowTrailingComma = 64] = "AllowTrailingComma", e[e.Indented = 128] = "Indented", e[e.SpaceBetweenBraces = 256] = "SpaceBetweenBraces", e[e.SpaceBetweenSiblings = 512] = "SpaceBetweenSiblings", e[e.Braces = 1024] = "Braces", e[e.Parenthesis = 2048] = "Parenthesis", e[e.AngleBrackets = 4096] = "AngleBrackets", e[e.SquareBrackets = 8192] = "SquareBrackets", e[e.BracketsMask = 15360] = "BracketsMask", e[e.OptionalIfUndefined = 16384] = "OptionalIfUndefined", e[e.OptionalIfEmpty = 32768] = "OptionalIfEmpty", e[e.Optional = 49152] = "Optional", e[e.PreferNewLine = 65536] = "PreferNewLine", e[e.NoTrailingNewLine = 131072] = "NoTrailingNewLine", e[e.NoInterveningComments = 262144] = "NoInterveningComments", e[e.NoSpaceIfEmpty = 524288] = "NoSpaceIfEmpty", e[e.SingleElement = 1048576] = "SingleElement", e[e.SpaceAfterList = 2097152] = "SpaceAfterList", e[e.Modifiers = 2359808] = "Modifiers", e[e.HeritageClauses = 512] = "HeritageClauses", e[e.SingleLineTypeLiteralMembers = 768] = "SingleLineTypeLiteralMembers", e[e.MultiLineTypeLiteralMembers = 32897] = "MultiLineTypeLiteralMembers", e[e.SingleLineTupleTypeElements = 528] = "SingleLineTupleTypeElements", e[e.MultiLineTupleTypeElements = 657] = "MultiLineTupleTypeElements", e[e.UnionTypeConstituents = 516] = "UnionTypeConstituents", e[e.IntersectionTypeConstituents = 520] = "IntersectionTypeConstituents", e[e.ObjectBindingPatternElements = 525136] = "ObjectBindingPatternElements", e[e.ArrayBindingPatternElements = 524880] = "ArrayBindingPatternElements", e[e.ObjectLiteralExpressionProperties = 526226] = "ObjectLiteralExpressionProperties", e[e.ImportAttributes = 526226] = "ImportAttributes", e[ + e.ImportClauseEntries = 526226 + /* ImportAttributes */ + ] = "ImportClauseEntries", e[e.ArrayLiteralExpressionElements = 8914] = "ArrayLiteralExpressionElements", e[e.CommaListElements = 528] = "CommaListElements", e[e.CallExpressionArguments = 2576] = "CallExpressionArguments", e[e.NewExpressionArguments = 18960] = "NewExpressionArguments", e[e.TemplateExpressionSpans = 262144] = "TemplateExpressionSpans", e[e.SingleLineBlockStatements = 768] = "SingleLineBlockStatements", e[e.MultiLineBlockStatements = 129] = "MultiLineBlockStatements", e[e.VariableDeclarationList = 528] = "VariableDeclarationList", e[e.SingleLineFunctionBodyStatements = 768] = "SingleLineFunctionBodyStatements", e[ + e.MultiLineFunctionBodyStatements = 1 + /* MultiLine */ + ] = "MultiLineFunctionBodyStatements", e[ + e.ClassHeritageClauses = 0 + /* SingleLine */ + ] = "ClassHeritageClauses", e[e.ClassMembers = 129] = "ClassMembers", e[e.InterfaceMembers = 129] = "InterfaceMembers", e[e.EnumMembers = 145] = "EnumMembers", e[e.CaseBlockClauses = 129] = "CaseBlockClauses", e[e.NamedImportsOrExportsElements = 525136] = "NamedImportsOrExportsElements", e[e.JsxElementOrFragmentChildren = 262144] = "JsxElementOrFragmentChildren", e[e.JsxElementAttributes = 262656] = "JsxElementAttributes", e[e.CaseOrDefaultClauseStatements = 163969] = "CaseOrDefaultClauseStatements", e[e.HeritageClauseTypes = 528] = "HeritageClauseTypes", e[e.SourceFileStatements = 131073] = "SourceFileStatements", e[e.Decorators = 2146305] = "Decorators", e[e.TypeArguments = 53776] = "TypeArguments", e[e.TypeParameters = 53776] = "TypeParameters", e[e.Parameters = 2576] = "Parameters", e[e.IndexSignatureParameters = 8848] = "IndexSignatureParameters", e[e.JSDocComment = 33] = "JSDocComment", e))(HQ || {}), GQ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TripleSlashXML = 1] = "TripleSlashXML", e[e.SingleLine = 2] = "SingleLine", e[e.MultiLine = 4] = "MultiLine", e[e.All = 7] = "All", e[ + e.Default = 7 + /* All */ + ] = "Default", e))(GQ || {}), SI = { + reference: { + args: [ + { name: "types", optional: !0, captureSpan: !0 }, + { name: "lib", optional: !0, captureSpan: !0 }, + { name: "path", optional: !0, captureSpan: !0 }, + { name: "no-default-lib", optional: !0 }, + { name: "resolution-mode", optional: !0 }, + { name: "preserve", optional: !0 } + ], + kind: 1 + /* TripleSlashXML */ + }, + "amd-dependency": { + args: [{ name: "path" }, { name: "name", optional: !0 }], + kind: 1 + /* TripleSlashXML */ + }, + "amd-module": { + args: [{ name: "name" }], + kind: 1 + /* TripleSlashXML */ + }, + "ts-check": { + kind: 2 + /* SingleLine */ + }, + "ts-nocheck": { + kind: 2 + /* SingleLine */ + }, + jsx: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsxfrag: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsximportsource: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + }, + jsxruntime: { + args: [{ name: "factory" }], + kind: 4 + /* MultiLine */ + } + }, $Q = /* @__PURE__ */ ((e) => (e[e.ParseAll = 0] = "ParseAll", e[e.ParseNone = 1] = "ParseNone", e[e.ParseForTypeErrors = 2] = "ParseForTypeErrors", e[e.ParseForTypeInfo = 3] = "ParseForTypeInfo", e))($Q || {}); + function IE(e) { + let t = 5381; + for (let n = 0; n < e.length; n++) + t = (t << 5) + t + e.charCodeAt(n); + return t.toString(); + } + function xge() { + Error.stackTraceLimit < 100 && (Error.stackTraceLimit = 100); + } + var XQ = /* @__PURE__ */ ((e) => (e[e.Created = 0] = "Created", e[e.Changed = 1] = "Changed", e[e.Deleted = 2] = "Deleted", e))(XQ || {}), zR = /* @__PURE__ */ ((e) => (e[e.High = 2e3] = "High", e[e.Medium = 500] = "Medium", e[e.Low = 250] = "Low", e))(zR || {}), G_ = /* @__PURE__ */ new Date(0); + function TT(e, t) { + return e.getModifiedTime(t) || G_; + } + function QQ(e) { + return { + 250: e.Low, + 500: e.Medium, + 2e3: e.High + }; + } + var WR = { Low: 32, Medium: 64, High: 256 }, VR = QQ(WR), TI = QQ(WR); + function rOe(e) { + if (!e.getEnvironmentVariable) + return; + const t = s("TSC_WATCH_POLLINGINTERVAL", zR); + VR = o("TSC_WATCH_POLLINGCHUNKSIZE", WR) || VR, TI = o("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", WR) || TI; + function n(c, _) { + return e.getEnvironmentVariable(`${c}_${_.toUpperCase()}`); + } + function i(c) { + let _; + return u("Low"), u("Medium"), u("High"), _; + function u(d) { + const g = n(c, d); + g && ((_ || (_ = {}))[d] = Number(g)); + } + } + function s(c, _) { + const u = i(c); + if (u) + return d("Low"), d("Medium"), d("High"), !0; + return !1; + function d(g) { + _[g] = u[g] || _[g]; + } + } + function o(c, _) { + const u = i(c); + return (t || u) && QQ(u ? { ..._, ...u } : _); + } + } + function kge(e, t, n, i, s) { + let o = n; + for (let _ = t.length; i && _; c(), _--) { + const u = t[n]; + if (u) { + if (u.isClosed) { + t[n] = void 0; + continue; + } + } else continue; + i--; + const d = aOe(u, TT(e, u.fileName)); + if (u.isClosed) { + t[n] = void 0; + continue; + } + s?.(u, n, d), t[n] && (o < n && (t[o] = u, t[n] = void 0), o++); + } + return n; + function c() { + n++, n === t.length && (o < n && (t.length = o), n = 0, o = 0); + } + } + function nOe(e) { + const t = [], n = [], i = _( + 250 + /* Low */ + ), s = _( + 500 + /* Medium */ + ), o = _( + 2e3 + /* High */ + ); + return c; + function c(P, O, j) { + const F = { + fileName: P, + callback: O, + unchangedPolls: 0, + mtime: TT(e, P) + }; + return t.push(F), S(F, j), { + close: () => { + F.isClosed = !0, bT(t, F); + } + }; + } + function _(P) { + const O = []; + return O.pollingInterval = P, O.pollIndex = 0, O.pollScheduled = !1, O; + } + function u(P, O) { + O.pollIndex = g(O, O.pollingInterval, O.pollIndex, VR[O.pollingInterval]), O.length ? D(O.pollingInterval) : (E.assert(O.pollIndex === 0), O.pollScheduled = !1); + } + function d(P, O) { + g( + n, + 250, + /*pollIndex*/ + 0, + n.length + ), u(P, O), !O.pollScheduled && n.length && D( + 250 + /* Low */ + ); + } + function g(P, O, j, F) { + return kge( + e, + P, + j, + F, + V + ); + function V(L, $, U) { + U ? (L.unchangedPolls = 0, P !== n && (P[$] = void 0, T(L))) : L.unchangedPolls !== TI[O] ? L.unchangedPolls++ : P === n ? (L.unchangedPolls = 1, P[$] = void 0, S( + L, + 250 + /* Low */ + )) : O !== 2e3 && (L.unchangedPolls++, P[$] = void 0, S( + L, + O === 250 ? 500 : 2e3 + /* High */ + )); + } + } + function h(P) { + switch (P) { + case 250: + return i; + case 500: + return s; + case 2e3: + return o; + } + } + function S(P, O) { + h(O).push(P), C(O); + } + function T(P) { + n.push(P), C( + 250 + /* Low */ + ); + } + function C(P) { + h(P).pollScheduled || D(P); + } + function D(P) { + h(P).pollScheduled = e.setTimeout(P === 250 ? d : u, P, P === 250 ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", h(P)); + } + } + function iOe(e, t, n, i) { + const s = Kf(), o = i ? /* @__PURE__ */ new Map() : void 0, c = /* @__PURE__ */ new Map(), _ = eu(t); + return u; + function u(g, h, S, T) { + const C = _(g); + s.add(C, h).length === 1 && o && o.set(C, n(g) || G_); + const D = Xn(C) || ".", P = c.get(D) || d(Xn(g) || ".", D, T); + return P.referenceCount++, { + close: () => { + P.referenceCount === 1 ? (P.close(), c.delete(D)) : P.referenceCount--, s.remove(C, h); + } + }; + } + function d(g, h, S) { + const T = e( + g, + 1, + (C, D) => { + if (!Gi(D)) return; + const P = Xi(D, g), O = _(P), j = P && s.get(O); + if (j) { + let F, V = 1; + if (o) { + const L = o.get(O); + if (C === "change" && (F = n(P) || G_, F.getTime() === L.getTime())) + return; + F || (F = n(P) || G_), o.set(O, F), L === G_ ? V = 0 : F === G_ && (V = 2); + } + for (const L of j) + L(P, V, F); + } + }, + /*recursive*/ + !1, + 500, + S + ); + return T.referenceCount = 0, c.set(h, T), T; + } + } + function sOe(e) { + const t = []; + let n = 0, i; + return s; + function s(_, u) { + const d = { + fileName: _, + callback: u, + mtime: TT(e, _) + }; + return t.push(d), c(), { + close: () => { + d.isClosed = !0, bT(t, d); + } + }; + } + function o() { + i = void 0, n = kge(e, t, n, VR[ + 250 + /* Low */ + ]), c(); + } + function c() { + !t.length || i || (i = e.setTimeout(o, 2e3, "pollQueue")); + } + } + function Cge(e, t, n, i, s) { + const c = eu(t)(n), _ = e.get(c); + return _ ? _.callbacks.push(i) : e.set(c, { + watcher: s( + // Cant infer types correctly so lets satisfy checker + (u, d, g) => { + var h; + return (h = e.get(c)) == null ? void 0 : h.callbacks.slice().forEach((S) => S(u, d, g)); + } + ), + callbacks: [i] + }), { + close: () => { + const u = e.get(c); + u && (!xE(u.callbacks, i) || u.callbacks.length || (e.delete(c), _p(u))); + } + }; + } + function aOe(e, t) { + const n = e.mtime.getTime(), i = t.getTime(); + return n !== i ? (e.mtime = t, e.callback(e.fileName, UR(n, i), t), !0) : !1; + } + function UR(e, t) { + return e === 0 ? 0 : t === 0 ? 2 : 1; + } + var xI = ["/node_modules/.", "/.git", "/.#"], Ege = ka; + function fw(e) { + return Ege(e); + } + function YQ(e) { + Ege = e; + } + function oOe({ + watchDirectory: e, + useCaseSensitiveFileNames: t, + getCurrentDirectory: n, + getAccessibleSortedChildDirectories: i, + fileSystemEntryExists: s, + realpath: o, + setTimeout: c, + clearTimeout: _ + }) { + const u = /* @__PURE__ */ new Map(), d = Kf(), g = /* @__PURE__ */ new Map(); + let h; + const S = Bk(!t), T = eu(t); + return (G, ce, K, X) => K ? C(G, X, ce) : e(G, ce, K, X); + function C(G, ce, K, X) { + const Z = T(G); + let oe = u.get(Z); + oe ? oe.refCount++ : (oe = { + watcher: e( + G, + (pe) => { + var fe; + $(pe, ce) || (ce?.synchronousWatchDirectory ? ((fe = u.get(Z)) != null && fe.targetWatcher || D(G, Z, pe), L(G, Z, ce)) : P(G, Z, pe, ce)); + }, + /*recursive*/ + !1, + ce + ), + refCount: 1, + childWatches: He, + targetWatcher: void 0, + links: void 0 + }, u.set(Z, oe), L(G, Z, ce)), X && (oe.links ?? (oe.links = /* @__PURE__ */ new Set())).add(X); + const ne = K && { dirName: G, callback: K }; + return ne && d.add(Z, ne), { + dirName: G, + close: () => { + var pe; + const fe = E.checkDefined(u.get(Z)); + ne && d.remove(Z, ne), X && ((pe = fe.links) == null || pe.delete(X)), fe.refCount--, !fe.refCount && (u.delete(Z), fe.links = void 0, _p(fe), V(fe), fe.childWatches.forEach(Zp)); + } + }; + } + function D(G, ce, K, X) { + var Z, oe; + let ne, pe; + Gi(K) ? ne = K : pe = K, d.forEach((fe, H) => { + if (!(pe && pe.get(H) === !0) && (H === ce || zi(ce, H) && ce[H.length] === Oo)) + if (pe) + if (X) { + const ae = pe.get(H); + ae ? ae.push(...X) : pe.set(H, X.slice()); + } else + pe.set(H, !0); + else + fe.forEach(({ callback: ae }) => ae(ne)); + }), (oe = (Z = u.get(ce)) == null ? void 0 : Z.links) == null || oe.forEach((fe) => { + const H = (ae) => Mn(fe, hd(G, ae, T)); + pe ? D(fe, T(fe), pe, X?.map(H)) : D(fe, T(fe), H(ne)); + }); + } + function P(G, ce, K, X) { + const Z = u.get(ce); + if (Z && s( + G, + 1 + /* Directory */ + )) { + O(G, ce, K, X); + return; + } + D(G, ce, K), V(Z), F(Z); + } + function O(G, ce, K, X) { + const Z = g.get(ce); + Z ? Z.fileNames.push(K) : g.set(ce, { dirName: G, options: X, fileNames: [K] }), h && (_(h), h = void 0), h = c(j, 1e3, "timerToUpdateChildWatches"); + } + function j() { + var G; + h = void 0, fw(`sysLog:: onTimerToUpdateChildWatches:: ${g.size}`); + const ce = Io(), K = /* @__PURE__ */ new Map(); + for (; !h && g.size; ) { + const Z = g.entries().next(); + E.assert(!Z.done); + const { value: [oe, { dirName: ne, options: pe, fileNames: fe }] } = Z; + g.delete(oe); + const H = L(ne, oe, pe); + (G = u.get(oe)) != null && G.targetWatcher || D(ne, oe, K, H ? void 0 : fe); + } + fw(`sysLog:: invokingWatchers:: Elapsed:: ${Io() - ce}ms:: ${g.size}`), d.forEach((Z, oe) => { + const ne = K.get(oe); + ne && Z.forEach(({ callback: pe, dirName: fe }) => { + ss(ne) ? ne.forEach(pe) : pe(fe); + }); + }); + const X = Io() - ce; + fw(`sysLog:: Elapsed:: ${X}ms:: onTimerToUpdateChildWatches:: ${g.size} ${h}`); + } + function F(G) { + if (!G) return; + const ce = G.childWatches; + G.childWatches = He; + for (const K of ce) + K.close(), F(u.get(T(K.dirName))); + } + function V(G) { + G?.targetWatcher && (G.targetWatcher.close(), G.targetWatcher = void 0); + } + function L(G, ce, K) { + const X = u.get(ce); + if (!X) return !1; + const Z = Cs(o(G)); + let oe, ne; + return S(Z, G) === 0 ? oe = gI( + s( + G, + 1 + /* Directory */ + ) ? Ii(i(G), (H) => { + const ae = Xi(H, G); + return !$(ae, K) && S(ae, Cs(o(ae))) === 0 ? ae : void 0; + }) : He, + X.childWatches, + (H, ae) => S(H, ae.dirName), + pe, + Zp, + fe + ) : X.targetWatcher && S(Z, X.targetWatcher.dirName) === 0 ? (oe = !1, E.assert(X.childWatches === He)) : (V(X), X.targetWatcher = C( + Z, + K, + /*callback*/ + void 0, + G + ), X.childWatches.forEach(Zp), oe = !0), X.childWatches = ne || He, oe; + function pe(H) { + const ae = C(H, K); + fe(ae); + } + function fe(H) { + (ne || (ne = [])).push(H); + } + } + function $(G, ce) { + return ut(xI, (K) => U(G, K)) || Dge(G, ce, t, n); + } + function U(G, ce) { + return G.includes(ce) ? !0 : t ? !1 : T(G).includes(ce); + } + } + var ZQ = /* @__PURE__ */ ((e) => (e[e.File = 0] = "File", e[e.Directory = 1] = "Directory", e))(ZQ || {}); + function cOe(e) { + return (t, n, i) => e(n === 1 ? "change" : "rename", "", i); + } + function lOe(e, t, n) { + return (i, s, o) => { + i === "rename" ? (o || (o = n(e) || G_), t(e, o !== G_ ? 0 : 2, o)) : t(e, 1, o); + }; + } + function Dge(e, t, n, i) { + return (t?.excludeDirectories || t?.excludeFiles) && (EO(e, t?.excludeFiles, n, i()) || EO(e, t?.excludeDirectories, n, i())); + } + function Pge(e, t, n, i, s) { + return (o, c) => { + if (o === "rename") { + const _ = c ? Cs(Mn(e, c)) : e; + (!c || !Dge(_, n, i, s)) && t(_); + } + }; + } + function KQ({ + pollingWatchFileWorker: e, + getModifiedTime: t, + setTimeout: n, + clearTimeout: i, + fsWatchWorker: s, + fileSystemEntryExists: o, + useCaseSensitiveFileNames: c, + getCurrentDirectory: _, + fsSupportsRecursiveFsWatch: u, + getAccessibleSortedChildDirectories: d, + realpath: g, + tscWatchFile: h, + useNonPollingWatchers: S, + tscWatchDirectory: T, + inodeWatching: C, + fsWatchWithTimestamp: D, + sysLog: P + }) { + const O = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ new Map(); + let V, L, $, U, G = !1; + return { + watchFile: ce, + watchDirectory: ne + }; + function ce(ge, de, ve, De) { + De = Z(De, S); + const Xe = E.checkDefined(De.watchFile); + switch (Xe) { + case 0: + return H( + ge, + de, + 250, + /*options*/ + void 0 + ); + case 1: + return H( + ge, + de, + ve, + /*options*/ + void 0 + ); + case 2: + return K()( + ge, + de, + ve, + /*options*/ + void 0 + ); + case 3: + return X()( + ge, + de, + /* pollingInterval */ + void 0, + /*options*/ + void 0 + ); + case 4: + return ae( + ge, + 0, + lOe(ge, de, t), + /*recursive*/ + !1, + ve, + JA(De) + ); + case 5: + return $ || ($ = iOe(ae, c, t, D)), $(ge, de, ve, JA(De)); + default: + E.assertNever(Xe); + } + } + function K() { + return V || (V = nOe({ getModifiedTime: t, setTimeout: n })); + } + function X() { + return L || (L = sOe({ getModifiedTime: t, setTimeout: n })); + } + function Z(ge, de) { + if (ge && ge.watchFile !== void 0) return ge; + switch (h) { + case "PriorityPollingInterval": + return { + watchFile: 1 + /* PriorityPollingInterval */ + }; + case "DynamicPriorityPolling": + return { + watchFile: 2 + /* DynamicPriorityPolling */ + }; + case "UseFsEvents": + return oe(4, 1, ge); + case "UseFsEventsWithFallbackDynamicPolling": + return oe(4, 2, ge); + case "UseFsEventsOnParentDirectory": + de = !0; + default: + return de ? ( + // Use notifications from FS to watch with falling back to fs.watchFile + oe(5, 1, ge) + ) : ( + // Default to using fs events + { + watchFile: 4 + /* UseFsEvents */ + } + ); + } + } + function oe(ge, de, ve) { + const De = ve?.fallbackPolling; + return { + watchFile: ge, + fallbackPolling: De === void 0 ? de : De + }; + } + function ne(ge, de, ve, De) { + return u ? ae( + ge, + 1, + Pge(ge, de, De, c, _), + ve, + 500, + JA(De) + ) : (U || (U = oOe({ + useCaseSensitiveFileNames: c, + getCurrentDirectory: _, + fileSystemEntryExists: o, + getAccessibleSortedChildDirectories: d, + watchDirectory: pe, + realpath: g, + setTimeout: n, + clearTimeout: i + })), U(ge, de, ve, De)); + } + function pe(ge, de, ve, De) { + E.assert(!ve); + const Xe = fe(De), Ie = E.checkDefined(Xe.watchDirectory); + switch (Ie) { + case 1: + return H( + ge, + () => de(ge), + 500, + /*options*/ + void 0 + ); + case 2: + return K()( + ge, + () => de(ge), + 500, + /*options*/ + void 0 + ); + case 3: + return X()( + ge, + () => de(ge), + /* pollingInterval */ + void 0, + /*options*/ + void 0 + ); + case 0: + return ae( + ge, + 1, + Pge(ge, de, De, c, _), + ve, + 500, + JA(Xe) + ); + default: + E.assertNever(Ie); + } + } + function fe(ge) { + if (ge && ge.watchDirectory !== void 0) return ge; + switch (T) { + case "RecursiveDirectoryUsingFsWatchFile": + return { + watchDirectory: 1 + /* FixedPollingInterval */ + }; + case "RecursiveDirectoryUsingDynamicPriorityPolling": + return { + watchDirectory: 2 + /* DynamicPriorityPolling */ + }; + default: + const de = ge?.fallbackPolling; + return { + watchDirectory: 0, + fallbackPolling: de !== void 0 ? de : void 0 + }; + } + } + function H(ge, de, ve, De) { + return Cge( + O, + c, + ge, + de, + (Xe) => e(ge, Xe, ve, De) + ); + } + function ae(ge, de, ve, De, Xe, Ie) { + return Cge( + De ? F : j, + c, + ge, + ve, + (ye) => le(ge, de, ye, De, Xe, Ie) + ); + } + function le(ge, de, ve, De, Xe, Ie) { + let ye, Fe; + C && (ye = ge.substring(ge.lastIndexOf(Oo)), Fe = ye.slice(Oo.length)); + let Qe = o(ge, de) ? Be() : nr(); + return { + close: () => { + Qe && (Qe.close(), Qe = void 0); + } + }; + function Ke(Kt) { + Qe && (P(`sysLog:: ${ge}:: Changing watcher to ${Kt === Be ? "Present" : "Missing"}FileSystemEntryWatcher`), Qe.close(), Qe = Kt()); + } + function Be() { + if (G) + return P(`sysLog:: ${ge}:: Defaulting to watchFile`), Wt(); + try { + const Kt = (de === 1 || !D ? s : Ae)( + ge, + De, + C ? at : ve + ); + return Kt.on("error", () => { + ve("rename", ""), Ke(nr); + }), Kt; + } catch (Kt) { + return G || (G = Kt.code === "ENOSPC"), P(`sysLog:: ${ge}:: Changing to watchFile`), Wt(); + } + } + function at(Kt, Pr) { + let Vt; + if (Pr && nc(Pr, "~") && (Vt = Pr, Pr = Pr.slice(0, Pr.length - 1)), Kt === "rename" && (!Pr || Pr === Fe || nc(Pr, ye))) { + const zt = t(ge) || G_; + Vt && ve(Kt, Vt, zt), ve(Kt, Pr, zt), C ? Ke(zt === G_ ? nr : Be) : zt === G_ && Ke(nr); + } else + Vt && ve(Kt, Vt), ve(Kt, Pr); + } + function Wt() { + return ce( + ge, + cOe(ve), + Xe, + Ie + ); + } + function nr() { + return ce( + ge, + (Kt, Pr, Vt) => { + Pr === 0 && (Vt || (Vt = t(ge) || G_), Vt !== G_ && (ve("rename", "", Vt), Ke(Be))); + }, + Xe, + Ie + ); + } + } + function Ae(ge, de, ve) { + let De = t(ge) || G_; + return s(ge, de, (Xe, Ie, ye) => { + Xe === "change" && (ye || (ye = t(ge) || G_), ye.getTime() === De.getTime()) || (De = ye || t(ge) || G_, ve(Xe, Ie, De)); + }); + } + } + function eY(e) { + const t = e.writeFile; + e.writeFile = (n, i, s) => EB( + n, + i, + !!s, + (o, c, _) => t.call(e, o, c, _), + (o) => e.createDirectory(o), + (o) => e.directoryExists(o) + ); + } + var _l = (() => { + const e = "\uFEFF"; + function t() { + const i = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/, s = gE, o = gE, c = gE; + let _; + try { + _ = gE; + } catch { + _ = void 0; + } + let u, d = "./profile.cpuprofile"; + const g = process.platform === "darwin", h = process.platform === "linux" || g, S = c.platform(), T = ce(), C = s.realpathSync.native ? process.platform === "win32" ? de : s.realpathSync.native : s.realpathSync, D = __filename.endsWith("sys.js") ? o.join(o.dirname(__dirname), "__fake__.js") : __filename, P = process.platform === "win32" || g, O = Wu(() => process.cwd()), { watchFile: j, watchDirectory: F } = KQ({ + pollingWatchFileWorker: X, + getModifiedTime: De, + setTimeout, + clearTimeout, + fsWatchWorker: Z, + useCaseSensitiveFileNames: T, + getCurrentDirectory: O, + fileSystemEntryExists: ae, + // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows + // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) + fsSupportsRecursiveFsWatch: P, + getAccessibleSortedChildDirectories: (Fe) => fe(Fe).directories, + realpath: ve, + tscWatchFile: process.env.TSC_WATCHFILE, + useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER, + tscWatchDirectory: process.env.TSC_WATCHDIRECTORY, + inodeWatching: h, + fsWatchWithTimestamp: g, + sysLog: fw + }), V = { + args: process.argv.slice(2), + newLine: c.EOL, + useCaseSensitiveFileNames: T, + write(Fe) { + process.stdout.write(Fe); + }, + getWidthOfTerminal() { + return process.stdout.columns; + }, + writeOutputIsTTY() { + return process.stdout.isTTY; + }, + readFile: ne, + writeFile: pe, + watchFile: j, + watchDirectory: F, + resolvePath: (Fe) => o.resolve(Fe), + fileExists: le, + directoryExists: Ae, + getAccessibleFileSystemEntries: fe, + createDirectory(Fe) { + if (!V.directoryExists(Fe)) + try { + s.mkdirSync(Fe); + } catch (Qe) { + if (Qe.code !== "EEXIST") + throw Qe; + } + }, + getExecutingFilePath() { + return D; + }, + getCurrentDirectory: O, + getDirectories: ge, + getEnvironmentVariable(Fe) { + return process.env[Fe] || ""; + }, + readDirectory: H, + getModifiedTime: De, + setModifiedTime: Xe, + deleteFile: Ie, + createHash: _ ? ye : IE, + createSHA256Hash: _ ? ye : void 0, + getMemoryUsage() { + return o5e.gc && o5e.gc(), process.memoryUsage().heapUsed; + }, + getFileSize(Fe) { + try { + const Qe = L(Fe); + if (Qe?.isFile()) + return Qe.size; + } catch { + } + return 0; + }, + exit(Fe) { + G(() => process.exit(Fe)); + }, + enableCPUProfiler: $, + disableCPUProfiler: G, + cpuProfilingEnabled: () => !!u || ls(process.execArgv, "--cpu-prof") || ls(process.execArgv, "--prof"), + realpath: ve, + debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || ut(process.execArgv, (Fe) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(Fe)) || !!process.recordreplay, + tryEnableSourceMapsForHost() { + try { + gE.install(); + } catch { + } + }, + setTimeout, + clearTimeout, + clearScreen: () => { + process.stdout.write("\x1Bc"); + }, + setBlocking: () => { + var Fe; + const Qe = (Fe = process.stdout) == null ? void 0 : Fe._handle; + Qe && Qe.setBlocking && Qe.setBlocking(!0); + }, + base64decode: (Fe) => Buffer.from(Fe, "base64").toString("utf8"), + base64encode: (Fe) => Buffer.from(Fe).toString("base64"), + require: (Fe, Qe) => { + try { + const Ke = Qre(Qe, Fe, V); + return { module: $me(Ke), modulePath: Ke, error: void 0 }; + } catch (Ke) { + return { module: void 0, modulePath: void 0, error: Ke }; + } + } + }; + return V; + function L(Fe) { + return s.statSync(Fe, { throwIfNoEntry: !1 }); + } + function $(Fe, Qe) { + if (u) + return Qe(), !1; + const Ke = gE; + if (!Ke || !Ke.Session) + return Qe(), !1; + const Be = new Ke.Session(); + return Be.connect(), Be.post("Profiler.enable", () => { + Be.post("Profiler.start", () => { + u = Be, d = Fe, Qe(); + }); + }), !0; + } + function U(Fe) { + let Qe = 0; + const Ke = /* @__PURE__ */ new Map(), Be = Rl(o.dirname(D)), at = `file://${zm(Be) === 1 ? "" : "/"}${Be}`; + for (const Wt of Fe.nodes) + if (Wt.callFrame.url) { + const nr = Rl(Wt.callFrame.url); + Gp(at, nr, T) ? Wt.callFrame.url = xT( + at, + nr, + at, + eu(T), + /*isAbsolutePathAnUrl*/ + !0 + ) : i.test(nr) || (Wt.callFrame.url = (Ke.has(nr) ? Ke : Ke.set(nr, `external${Qe}.js`)).get(nr), Qe++); + } + return Fe; + } + function G(Fe) { + if (u && u !== "stopping") { + const Qe = u; + return u.post("Profiler.stop", (Ke, { profile: Be }) => { + var at; + if (!Ke) { + try { + (at = L(d)) != null && at.isDirectory() && (d = o.join(d, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`)); + } catch { + } + try { + s.mkdirSync(o.dirname(d), { recursive: !0 }); + } catch { + } + s.writeFileSync(d, JSON.stringify(U(Be))); + } + u = void 0, Qe.disconnect(), Fe(); + }), u = "stopping", !0; + } else + return Fe(), !1; + } + function ce() { + return S === "win32" || S === "win64" ? !1 : !le(K(__filename)); + } + function K(Fe) { + return Fe.replace(/\w/g, (Qe) => { + const Ke = Qe.toUpperCase(); + return Qe === Ke ? Qe.toLowerCase() : Ke; + }); + } + function X(Fe, Qe, Ke) { + s.watchFile(Fe, { persistent: !0, interval: Ke }, at); + let Be; + return { + close: () => s.unwatchFile(Fe, at) + }; + function at(Wt, nr) { + const Kt = +nr.mtime == 0 || Be === 2; + if (+Wt.mtime == 0) { + if (Kt) + return; + Be = 2; + } else if (Kt) + Be = 0; + else { + if (+Wt.mtime == +nr.mtime) + return; + Be = 1; + } + Qe(Fe, Be, Wt.mtime); + } + } + function Z(Fe, Qe, Ke) { + return s.watch( + Fe, + P ? { persistent: !0, recursive: !!Qe } : { persistent: !0 }, + Ke + ); + } + function oe(Fe, Qe) { + let Ke; + try { + Ke = s.readFileSync(Fe); + } catch { + return; + } + let Be = Ke.length; + if (Be >= 2 && Ke[0] === 254 && Ke[1] === 255) { + Be &= -2; + for (let at = 0; at < Be; at += 2) { + const Wt = Ke[at]; + Ke[at] = Ke[at + 1], Ke[at + 1] = Wt; + } + return Ke.toString("utf16le", 2); + } + return Be >= 2 && Ke[0] === 255 && Ke[1] === 254 ? Ke.toString("utf16le", 2) : Be >= 3 && Ke[0] === 239 && Ke[1] === 187 && Ke[2] === 191 ? Ke.toString("utf8", 3) : Ke.toString("utf8"); + } + function ne(Fe, Qe) { + var Ke, Be; + (Ke = Vu) == null || Ke.logStartReadFile(Fe); + const at = oe(Fe); + return (Be = Vu) == null || Be.logStopReadFile(), at; + } + function pe(Fe, Qe, Ke) { + var Be; + (Be = Vu) == null || Be.logEvent("WriteFile: " + Fe), Ke && (Qe = e + Qe); + let at; + try { + at = s.openSync(Fe, "w"), s.writeSync( + at, + Qe, + /*position*/ + void 0, + "utf8" + ); + } finally { + at !== void 0 && s.closeSync(at); + } + } + function fe(Fe) { + var Qe; + (Qe = Vu) == null || Qe.logEvent("ReadDir: " + (Fe || ".")); + try { + const Ke = s.readdirSync(Fe || ".", { withFileTypes: !0 }), Be = [], at = []; + for (const Wt of Ke) { + const nr = typeof Wt == "string" ? Wt : Wt.name; + if (nr === "." || nr === "..") + continue; + let Kt; + if (typeof Wt == "string" || Wt.isSymbolicLink()) { + const Pr = Mn(Fe, nr); + try { + if (Kt = L(Pr), !Kt) + continue; + } catch { + continue; + } + } else + Kt = Wt; + Kt.isFile() ? Be.push(nr) : Kt.isDirectory() && at.push(nr); + } + return Be.sort(), at.sort(), { files: Be, directories: at }; + } catch { + return iJ; + } + } + function H(Fe, Qe, Ke, Be, at) { + return tJ(Fe, Qe, Ke, Be, T, process.cwd(), at, fe, ve); + } + function ae(Fe, Qe) { + const Ke = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + try { + const Be = L(Fe); + if (!Be) + return !1; + switch (Qe) { + case 0: + return Be.isFile(); + case 1: + return Be.isDirectory(); + default: + return !1; + } + } catch { + return !1; + } finally { + Error.stackTraceLimit = Ke; + } + } + function le(Fe) { + return ae( + Fe, + 0 + /* File */ + ); + } + function Ae(Fe) { + return ae( + Fe, + 1 + /* Directory */ + ); + } + function ge(Fe) { + return fe(Fe).directories.slice(); + } + function de(Fe) { + return Fe.length < 260 ? s.realpathSync.native(Fe) : s.realpathSync(Fe); + } + function ve(Fe) { + try { + return C(Fe); + } catch { + return Fe; + } + } + function De(Fe) { + var Qe; + const Ke = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + try { + return (Qe = L(Fe)) == null ? void 0 : Qe.mtime; + } catch { + return; + } finally { + Error.stackTraceLimit = Ke; + } + } + function Xe(Fe, Qe) { + try { + s.utimesSync(Fe, Qe, Qe); + } catch { + return; + } + } + function Ie(Fe) { + try { + return s.unlinkSync(Fe); + } catch { + return; + } + } + function ye(Fe) { + const Qe = _.createHash("sha256"); + return Qe.update(Fe), Qe.digest("hex"); + } + } + let n; + return SR() && (n = t()), n && eY(n), n; + })(); + function wge(e) { + _l = e; + } + _l && _l.getEnvironmentVariable && (rOe(_l), E.setAssertionLevel( + /^development$/i.test(_l.getEnvironmentVariable("NODE_ENV")) ? 1 : 0 + /* None */ + )), _l && _l.debugMode && (E.isDebugging = !0); + var Oo = "/", kI = "\\", Age = "://", uOe = /\\/g; + function qR(e) { + return e === 47 || e === 92; + } + function tY(e) { + return CI(e) < 0; + } + function $_(e) { + return CI(e) > 0; + } + function HR(e) { + const t = CI(e); + return t > 0 && t === e.length; + } + function OE(e) { + return CI(e) !== 0; + } + function Df(e) { + return /^\.\.?($|[\\/])/.test(e); + } + function GR(e) { + return !OE(e) && !Df(e); + } + function zk(e) { + return Wc(e).includes("."); + } + function Go(e, t) { + return e.length > t.length && nc(e, t); + } + function Lc(e, t) { + for (const n of t) + if (Go(e, n)) + return !0; + return !1; + } + function e0(e) { + return e.length > 0 && qR(e.charCodeAt(e.length - 1)); + } + function Nge(e) { + return e >= 97 && e <= 122 || e >= 65 && e <= 90; + } + function _Oe(e, t) { + const n = e.charCodeAt(t); + if (n === 58) return t + 1; + if (n === 37 && e.charCodeAt(t + 1) === 51) { + const i = e.charCodeAt(t + 2); + if (i === 97 || i === 65) return t + 3; + } + return -1; + } + function CI(e) { + if (!e) return 0; + const t = e.charCodeAt(0); + if (t === 47 || t === 92) { + if (e.charCodeAt(1) !== t) return 1; + const i = e.indexOf(t === 47 ? Oo : kI, 2); + return i < 0 ? e.length : i + 1; + } + if (Nge(t) && e.charCodeAt(1) === 58) { + const i = e.charCodeAt(2); + if (i === 47 || i === 92) return 3; + if (e.length === 2) return 2; + } + const n = e.indexOf(Age); + if (n !== -1) { + const i = n + Age.length, s = e.indexOf(Oo, i); + if (s !== -1) { + const o = e.slice(0, n), c = e.slice(i, s); + if (o === "file" && (c === "" || c === "localhost") && Nge(e.charCodeAt(s + 1))) { + const _ = _Oe(e, s + 2); + if (_ !== -1) { + if (e.charCodeAt(_) === 47) + return ~(_ + 1); + if (_ === e.length) + return ~_; + } + } + return ~(s + 1); + } + return ~e.length; + } + return 0; + } + function zm(e) { + const t = CI(e); + return t < 0 ? ~t : t; + } + function Xn(e) { + e = Rl(e); + const t = zm(e); + return t === e.length ? e : (e = F1(e), e.slice(0, Math.max(t, e.lastIndexOf(Oo)))); + } + function Wc(e, t, n) { + if (e = Rl(e), zm(e) === e.length) return ""; + e = F1(e); + const s = e.slice(Math.max(zm(e), e.lastIndexOf(Oo) + 1)), o = t !== void 0 && n !== void 0 ? Wk(s, t, n) : void 0; + return o ? s.slice(0, s.length - o.length) : s; + } + function Ige(e, t, n) { + if (zi(t, ".") || (t = "." + t), e.length >= t.length && e.charCodeAt(e.length - t.length) === 46) { + const i = e.slice(e.length - t.length); + if (n(i, t)) + return i; + } + } + function fOe(e, t, n) { + if (typeof t == "string") + return Ige(e, t, n) || ""; + for (const i of t) { + const s = Ige(e, i, n); + if (s) return s; + } + return ""; + } + function Wk(e, t, n) { + if (t) + return fOe(F1(e), t, n ? N1 : O2); + const i = Wc(e), s = i.lastIndexOf("."); + return s >= 0 ? i.substring(s) : ""; + } + function pOe(e, t) { + const n = e.substring(0, t), i = e.substring(t).split(Oo); + return i.length && !Bo(i) && i.pop(), [n, ...i]; + } + function vl(e, t = "") { + return e = Mn(t, e), pOe(e, zm(e)); + } + function ah(e, t) { + return e.length === 0 ? "" : (e[0] && bl(e[0])) + e.slice(1, t).join(Oo); + } + function Rl(e) { + return e.includes("\\") ? e.replace(uOe, Oo) : e; + } + function R2(e) { + if (!ut(e)) return []; + const t = [e[0]]; + for (let n = 1; n < e.length; n++) { + const i = e[n]; + if (i && i !== ".") { + if (i === "..") { + if (t.length > 1) { + if (t[t.length - 1] !== "..") { + t.pop(); + continue; + } + } else if (t[0]) continue; + } + t.push(i); + } + } + return t; + } + function Mn(e, ...t) { + e && (e = Rl(e)); + for (let n of t) + n && (n = Rl(n), !e || zm(n) !== 0 ? e = n : e = bl(e) + n); + return e; + } + function O1(e, ...t) { + return Cs(ut(t) ? Mn(e, ...t) : Rl(e)); + } + function pw(e, t) { + return R2(vl(e, t)); + } + function Xi(e, t) { + return ah(pw(e, t)); + } + function Cs(e) { + if (e = Rl(e), !XR.test(e)) + return e; + const t = e.replace(/\/\.\//g, "/").replace(/^\.\//, ""); + if (t !== e && (e = t, !XR.test(e))) + return e; + const n = ah(R2(vl(e))); + return n && e0(e) ? bl(n) : n; + } + function dOe(e) { + return e.length === 0 ? "" : e.slice(1).join(Oo); + } + function $R(e, t) { + return dOe(pw(e, t)); + } + function _o(e, t, n) { + const i = $_(e) ? Cs(e) : Xi(e, t); + return n(i); + } + function F1(e) { + return e0(e) ? e.substr(0, e.length - 1) : e; + } + function bl(e) { + return e0(e) ? e : e + Oo; + } + function j2(e) { + return !OE(e) && !Df(e) ? "./" + e : e; + } + function dw(e, t, n, i) { + const s = n !== void 0 && i !== void 0 ? Wk(e, n, i) : Wk(e); + return s ? e.slice(0, e.length - s.length) + (zi(t, ".") ? t : "." + t) : e; + } + function rY(e, t) { + const n = lz(e); + return n ? e.slice(0, e.length - n.length) + (zi(t, ".") ? t : "." + t) : dw(e, t); + } + var XR = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; + function nY(e, t, n) { + if (e === t) return 0; + if (e === void 0) return -1; + if (t === void 0) return 1; + const i = e.substring(0, zm(e)), s = t.substring(0, zm(t)), o = ow(i, s); + if (o !== 0) + return o; + const c = e.substring(i.length), _ = t.substring(s.length); + if (!XR.test(c) && !XR.test(_)) + return n(c, _); + const u = R2(vl(e)), d = R2(vl(t)), g = Math.min(u.length, d.length); + for (let h = 1; h < g; h++) { + const S = n(u[h], d[h]); + if (S !== 0) + return S; + } + return uo(u.length, d.length); + } + function Oge(e, t) { + return nY(e, t, Kl); + } + function Fge(e, t) { + return nY(e, t, ow); + } + function oh(e, t, n, i) { + return typeof n == "string" ? (e = Mn(n, e), t = Mn(n, t)) : typeof n == "boolean" && (i = n), nY(e, t, Bk(i)); + } + function Gp(e, t, n, i) { + if (typeof n == "string" ? (e = Mn(n, e), t = Mn(n, t)) : typeof n == "boolean" && (i = n), e === void 0 || t === void 0) return !1; + if (e === t) return !0; + const s = R2(vl(e)), o = R2(vl(t)); + if (o.length < s.length) + return !1; + const c = i ? N1 : O2; + for (let _ = 0; _ < s.length; _++) + if (!(_ === 0 ? N1 : c)(s[_], o[_])) + return !1; + return !0; + } + function QR(e, t, n) { + const i = n(e), s = n(t); + return zi(i, s + "/") || zi(i, s + "\\"); + } + function YR(e, t, n, i) { + const s = R2(vl(e)), o = R2(vl(t)); + let c; + for (c = 0; c < s.length && c < o.length; c++) { + const d = i(s[c]), g = i(o[c]); + if (!(c === 0 ? N1 : n)(d, g)) break; + } + if (c === 0) + return o; + const _ = o.slice(c), u = []; + for (; c < s.length; c++) + u.push(".."); + return ["", ...u, ..._]; + } + function hd(e, t, n) { + E.assert(zm(e) > 0 == zm(t) > 0, "Paths must either both be absolute or both be relative"); + const o = YR(e, t, (typeof n == "boolean" ? n : !1) ? N1 : O2, typeof n == "function" ? n : lo); + return ah(o); + } + function FE(e, t, n) { + return $_(e) ? xT( + t, + e, + t, + n, + /*isAbsolutePathAnUrl*/ + !1 + ) : e; + } + function LE(e, t, n) { + return j2(hd(Xn(e), t, n)); + } + function xT(e, t, n, i, s) { + const o = YR( + O1(n, e), + O1(n, t), + O2, + i + ), c = o[0]; + if (s && $_(c)) { + const _ = c.charAt(0) === Oo ? "file://" : "file:///"; + o[0] = _ + c; + } + return ah(o); + } + function $p(e, t) { + for (; ; ) { + const n = t(e); + if (n !== void 0) + return n; + const i = Xn(e); + if (i === e) + return; + e = i; + } + } + function EI(e) { + return nc(e, "/node_modules"); + } + function b(e, t, n, i, s, o, c) { + return { code: e, category: t, key: n, message: i, reportsUnnecessary: s, elidedInCompatabilityPyramid: o, reportsDeprecated: c }; + } + var p = { + Unterminated_string_literal: b(1002, 1, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: b(1003, 1, "Identifier_expected_1003", "Identifier expected."), + _0_expected: b(1005, 1, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: b(1006, 1, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + The_parser_expected_to_find_a_1_to_match_the_0_token_here: b(1007, 1, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), + Trailing_comma_not_allowed: b(1009, 1, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: b(1010, 1, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: b(1011, 1, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: b(1012, 1, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: b(1013, 1, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: b(1014, 1, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: b(1015, 1, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: b(1016, 1, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: b(1017, 1, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: b(1018, 1, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: b(1019, 1, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: b(1020, 1, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: b(1021, 1, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: b(1022, 1, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: b(1024, 1, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + An_index_signature_cannot_have_a_trailing_comma: b(1025, 1, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), + Accessibility_modifier_already_seen: b(1028, 1, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: b(1029, 1, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: b(1030, 1, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_class_elements_of_this_kind: b(1031, 1, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), + super_must_be_followed_by_an_argument_list_or_member_access: b(1034, 1, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: b(1035, 1, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: b(1036, 1, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: b(1038, 1, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: b(1039, 1, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: b(1040, 1, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_here: b(1042, 1, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: b(1044, 1, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: b(1046, 1, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), + A_rest_parameter_cannot_be_optional: b(1047, 1, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: b(1048, 1, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: b(1049, 1, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: b(1051, 1, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: b(1052, 1, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: b(1053, 1, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: b(1054, 1, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: b(1055, 1, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compa_1055", "Type '{0}' is not a valid async function return type in ES5 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: b(1056, 1, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1058, 1, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: b(1059, 1, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: b(1060, 1, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: b(1061, 1, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: b(1062, 1, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: b(1063, 1, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: b(1064, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: b(1065, 1, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: b(1066, 1, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: b(1068, 1, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: b(1069, 1, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: b(1070, 1, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: b(1071, 1, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: b(1079, 1, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: b(1084, 1, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + _0_modifier_cannot_appear_on_a_constructor_declaration: b(1089, 1, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: b(1090, 1, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: b(1091, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: b(1092, 1, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: b(1093, 1, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: b(1094, 1, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: b(1095, 1, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: b(1096, 1, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: b(1097, 1, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: b(1098, 1, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: b(1099, 1, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: b(1100, 1, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: b(1101, 1, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: b(1102, 1, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(1103, 1, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: b(1104, 1, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: b(1105, 1, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + The_left_hand_side_of_a_for_of_statement_may_not_be_async: b(1106, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), + Jump_target_cannot_cross_function_boundary: b(1107, 1, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: b(1108, 1, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: b(1109, 1, "Expression_expected_1109", "Expression expected."), + Type_expected: b(1110, 1, "Type_expected_1110", "Type expected."), + Private_field_0_must_be_declared_in_an_enclosing_class: b(1111, 1, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: b(1113, 1, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: b(1114, 1, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: b(1115, 1, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: b(1116, 1, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name: b(1117, 1, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: b(1118, 1, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: b(1119, 1, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: b(1120, 1, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_Use_the_syntax_0: b(1121, 1, "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", "Octal literals are not allowed. Use the syntax '{0}'."), + Variable_declaration_list_cannot_be_empty: b(1123, 1, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: b(1124, 1, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: b(1125, 1, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: b(1126, 1, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: b(1127, 1, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: b(1128, 1, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: b(1129, 1, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: b(1130, 1, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: b(1131, 1, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: b(1132, 1, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: b(1134, 1, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: b(1135, 1, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: b(1136, 1, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: b(1137, 1, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: b(1138, 1, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: b(1139, 1, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: b(1140, 1, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: b(1141, 1, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: b(1142, 1, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: b(1144, 1, "or_expected_1144", "'{' or ';' expected."), + or_JSX_element_expected: b(1145, 1, "or_JSX_element_expected_1145", "'{' or JSX element expected."), + Declaration_expected: b(1146, 1, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: b(1147, 1, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: b(1148, 1, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: b(1149, 1, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + _0_declarations_must_be_initialized: b(1155, 1, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), + _0_declarations_can_only_be_declared_inside_a_block: b(1156, 1, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), + Unterminated_template_literal: b(1160, 1, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: b(1161, 1, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: b(1162, 1, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: b(1163, 1, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: b(1164, 1, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1165, 1, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: b(1166, 1, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1168, 1, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1169, 1, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: b(1170, 1, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: b(1171, 1, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: b(1172, 1, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: b(1173, 1, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: b(1174, 1, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: b(1175, 1, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: b(1176, 1, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: b(1177, 1, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: b(1178, 1, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: b(1179, 1, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: b(1180, 1, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: b(1181, 1, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: b(1182, 1, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: b(1183, 1, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: b(1184, 1, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: b(1185, 1, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: b(1186, 1, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: b(1187, 1, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: b(1188, 1, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: b(1189, 1, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: b(1190, 1, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: b(1191, 1, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: b(1192, 1, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: b(1193, 1, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: b(1194, 1, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + export_Asterisk_does_not_re_export_a_default: b(1195, 1, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), + Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: b(1196, 1, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), + Catch_clause_variable_cannot_have_an_initializer: b(1197, 1, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: b(1198, 1, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: b(1199, 1, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: b(1200, 1, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: b(1202, 1, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", `Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.`), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: b(1203, 1, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Re_exporting_a_type_when_0_is_enabled_requires_using_export_type: b(1205, 1, "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", "Re-exporting a type when '{0}' is enabled requires using 'export type'."), + Decorators_are_not_valid_here: b(1206, 1, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: b(1207, 1, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: b(1209, 1, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), + Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: b(1210, 1, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: b(1211, 1, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: b(1212, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: b(1213, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: b(1214, 1, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: b(1215, 1, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: b(1216, 1, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: b(1218, 1, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Generators_are_not_allowed_in_an_ambient_context: b(1221, 1, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: b(1222, 1, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: b(1223, 1, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: b(1224, 1, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: b(1225, 1, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: b(1226, 1, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: b(1227, 1, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: b(1228, 1, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: b(1229, 1, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: b(1230, 1, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: b(1231, 1, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: b(1232, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: b(1233, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: b(1234, 1, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: b(1235, 1, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: b(1236, 1, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: b(1237, 1, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: b(1238, 1, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: b(1239, 1, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: b(1240, 1, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: b(1241, 1, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: b(1242, 1, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: b(1243, 1, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: b(1244, 1, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: b(1245, 1, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: b(1246, 1, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: b(1247, 1, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: b(1248, 1, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: b(1249, 1, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5: b(1250, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode: b(1251, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definiti_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode: b(1252, 1, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_au_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES5'. Modules are automatically in strict mode."), + Abstract_properties_can_only_appear_within_an_abstract_class: b(1253, 1, "Abstract_properties_can_only_appear_within_an_abstract_class_1253", "Abstract properties can only appear within an abstract class."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: b(1254, 1, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: b(1255, 1, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + A_required_element_cannot_follow_an_optional_element: b(1257, 1, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), + A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: b(1258, 1, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), + Module_0_can_only_be_default_imported_using_the_1_flag: b(1259, 1, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: b(1260, 1, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), + Already_included_file_name_0_differs_from_file_name_1_only_in_casing: b(1261, 1, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), + Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: b(1262, 1, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), + Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: b(1263, 1, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), + Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: b(1264, 1, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), + A_rest_element_cannot_follow_another_rest_element: b(1265, 1, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), + An_optional_element_cannot_follow_a_rest_element: b(1266, 1, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), + Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: b(1267, 1, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), + An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: b(1268, 1, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), + Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: b(1269, 1, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."), + Decorator_function_return_type_0_is_not_assignable_to_type_1: b(1270, 1, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), + Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: b(1271, 1, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), + A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: b(1272, 1, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), + _0_modifier_cannot_appear_on_a_type_parameter: b(1273, 1, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: b(1274, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), + accessor_modifier_can_only_appear_on_a_property_declaration: b(1275, 1, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), + An_accessor_property_cannot_be_declared_optional: b(1276, 1, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: b(1277, 1, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: b(1278, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."), + The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: b(1279, 1, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."), + Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: b(1280, 1, "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."), + Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: b(1281, 1, "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."), + An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: b(1282, 1, "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: b(1283, 1, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: b(1284, 1, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), + An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: b(1285, 1, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), + ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: b(1286, 1, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: b(1287, 1, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."), + An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: b(1288, 1, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: b(1289, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: b(1290, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: b(1291, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."), + _0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: b(1292, 1, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."), + with_statements_are_not_allowed_in_an_async_function_block: b(1300, 1, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(1308, 1, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), + The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: b(1309, 1, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), + Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: b(1312, 1, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: b(1313, 1, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: b(1314, 1, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: b(1315, 1, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: b(1316, 1, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: b(1317, 1, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: b(1318, 1, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: b(1319, 1, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1320, 1, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1321, 1, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: b(1322, 1, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: b(1323, 1, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: b(1324, 1, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), + Argument_of_dynamic_import_cannot_be_spread_element: b(1325, 1, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), + This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: b(1326, 1, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), + String_literal_with_double_quotes_expected: b(1327, 1, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: b(1328, 1, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: b(1329, 1, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: b(1330, 1, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: b(1331, 1, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: b(1332, 1, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: b(1333, 1, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: b(1334, 1, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: b(1335, 1, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: b(1337, 1, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: b(1338, 1, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: b(1339, 1, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: b(1340, 1, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), + Class_constructor_may_not_be_an_accessor: b(1341, 1, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: b(1343, 1, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), + A_label_is_not_allowed_here: b(1344, 1, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), + An_expression_of_type_void_cannot_be_tested_for_truthiness: b(1345, 1, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), + This_parameter_is_not_allowed_with_use_strict_directive: b(1346, 1, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), + use_strict_directive_cannot_be_used_with_non_simple_parameter_list: b(1347, 1, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), + Non_simple_parameter_declared_here: b(1348, 1, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), + use_strict_directive_used_here: b(1349, 1, "use_strict_directive_used_here_1349", "'use strict' directive used here."), + Print_the_final_configuration_instead_of_building: b(1350, 3, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), + An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: b(1351, 1, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), + A_bigint_literal_cannot_use_exponential_notation: b(1352, 1, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), + A_bigint_literal_must_be_an_integer: b(1353, 1, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), + readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: b(1354, 1, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), + A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: b(1355, 1, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), + Did_you_mean_to_mark_this_function_as_async: b(1356, 1, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), + An_enum_member_name_must_be_followed_by_a_or: b(1357, 1, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), + Tagged_template_expressions_are_not_permitted_in_an_optional_chain: b(1358, 1, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), + Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: b(1359, 1, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Type_0_does_not_satisfy_the_expected_type_1: b(1360, 1, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: b(1361, 1, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: b(1362, 1, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), + A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: b(1363, 1, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), + Convert_to_type_only_export: b(1364, 3, "Convert_to_type_only_export_1364", "Convert to type-only export"), + Convert_all_re_exported_types_to_type_only_exports: b(1365, 3, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), + Split_into_two_separate_import_declarations: b(1366, 3, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), + Split_all_invalid_type_only_imports: b(1367, 3, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), + Class_constructor_may_not_be_a_generator: b(1368, 1, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), + Did_you_mean_0: b(1369, 3, "Did_you_mean_0_1369", "Did you mean '{0}'?"), + await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(1375, 1, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + _0_was_imported_here: b(1376, 3, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: b(1377, 3, "_0_was_exported_here_1377", "'{0}' was exported here."), + Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(1378, 1, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: b(1379, 1, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: b(1380, 1, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: b(1381, 1, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: b(1382, 1, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), + Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: b(1385, 1, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: b(1386, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), + Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: b(1387, 1, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: b(1388, 1, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), + _0_is_not_allowed_as_a_variable_declaration_name: b(1389, 1, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), + _0_is_not_allowed_as_a_parameter_name: b(1390, 1, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), + An_import_alias_cannot_use_import_type: b(1392, 1, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), + Imported_via_0_from_file_1: b(1393, 3, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), + Imported_via_0_from_file_1_with_packageId_2: b(1394, 3, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), + Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: b(1395, 3, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: b(1396, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: b(1397, 3, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: b(1398, 3, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), + File_is_included_via_import_here: b(1399, 3, "File_is_included_via_import_here_1399", "File is included via import here."), + Referenced_via_0_from_file_1: b(1400, 3, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), + File_is_included_via_reference_here: b(1401, 3, "File_is_included_via_reference_here_1401", "File is included via reference here."), + Type_library_referenced_via_0_from_file_1: b(1402, 3, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), + Type_library_referenced_via_0_from_file_1_with_packageId_2: b(1403, 3, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), + File_is_included_via_type_library_reference_here: b(1404, 3, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), + Library_referenced_via_0_from_file_1: b(1405, 3, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), + File_is_included_via_library_reference_here: b(1406, 3, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), + Matched_by_include_pattern_0_in_1: b(1407, 3, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), + File_is_matched_by_include_pattern_specified_here: b(1408, 3, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), + Part_of_files_list_in_tsconfig_json: b(1409, 3, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), + File_is_matched_by_files_list_specified_here: b(1410, 3, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), + Output_from_referenced_project_0_included_because_1_specified: b(1411, 3, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), + Output_from_referenced_project_0_included_because_module_is_specified_as_none: b(1412, 3, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_output_from_referenced_project_specified_here: b(1413, 3, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), + Source_from_referenced_project_0_included_because_1_specified: b(1414, 3, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), + Source_from_referenced_project_0_included_because_module_is_specified_as_none: b(1415, 3, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_source_from_referenced_project_specified_here: b(1416, 3, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), + Entry_point_of_type_library_0_specified_in_compilerOptions: b(1417, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), + Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: b(1418, 3, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), + File_is_entry_point_of_type_library_specified_here: b(1419, 3, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), + Entry_point_for_implicit_type_library_0: b(1420, 3, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), + Entry_point_for_implicit_type_library_0_with_packageId_1: b(1421, 3, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), + Library_0_specified_in_compilerOptions: b(1422, 3, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), + File_is_library_specified_here: b(1423, 3, "File_is_library_specified_here_1423", "File is library specified here."), + Default_library: b(1424, 3, "Default_library_1424", "Default library"), + Default_library_for_target_0: b(1425, 3, "Default_library_for_target_0_1425", "Default library for target '{0}'"), + File_is_default_library_for_target_specified_here: b(1426, 3, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), + Root_file_specified_for_compilation: b(1427, 3, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), + File_is_output_of_project_reference_source_0: b(1428, 3, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), + File_redirects_to_file_0: b(1429, 3, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), + The_file_is_in_the_program_because_Colon: b(1430, 3, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), + for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(1431, 1, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(1432, 1, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: b(1433, 1, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."), + Unexpected_keyword_or_identifier: b(1434, 1, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), + Unknown_keyword_or_identifier_Did_you_mean_0: b(1435, 1, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), + Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: b(1436, 1, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), + Namespace_must_be_given_a_name: b(1437, 1, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), + Interface_must_be_given_a_name: b(1438, 1, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), + Type_alias_must_be_given_a_name: b(1439, 1, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), + Variable_declaration_not_allowed_at_this_location: b(1440, 1, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), + Cannot_start_a_function_call_in_a_type_annotation: b(1441, 1, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), + Expected_for_property_initializer: b(1442, 1, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), + Module_declaration_names_may_only_use_or_quoted_strings: b(1443, 1, "Module_declaration_names_may_only_use_or_quoted_strings_1443", `Module declaration names may only use ' or " quoted strings.`), + _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: b(1448, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), + Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: b(1449, 3, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: b(1450, 3, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), + Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: b(1451, 1, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), + resolution_mode_should_be_either_require_or_import: b(1453, 1, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), + resolution_mode_can_only_be_set_for_type_only_imports: b(1454, 1, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), + resolution_mode_is_the_only_valid_key_for_type_import_assertions: b(1455, 1, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), + Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: b(1456, 1, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), + Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: b(1457, 3, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), + File_is_ECMAScript_module_because_0_has_field_type_with_value_module: b(1458, 3, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", `File is ECMAScript module because '{0}' has field "type" with value "module"`), + File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: b(1459, 3, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), + File_is_CommonJS_module_because_0_does_not_have_field_type: b(1460, 3, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), + File_is_CommonJS_module_because_package_json_was_not_found: b(1461, 3, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: b(1463, 1, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: b(1464, 1, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), + The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: b(1470, 1, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), + Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: b(1471, 1, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), + catch_or_finally_expected: b(1472, 1, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: b(1473, 1, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: b(1474, 1, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), + Control_what_method_is_used_to_detect_module_format_JS_files: b(1475, 3, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), + auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: b(1476, 3, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", '"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'), + An_instantiation_expression_cannot_be_followed_by_a_property_access: b(1477, 1, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), + Identifier_or_string_literal_expected: b(1478, 1, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), + The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: b(1479, 1, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", `The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: b(1480, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", 'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: b(1481, 3, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`), + To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: b(1482, 3, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", 'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'), + To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: b(1483, 3, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'), + _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: b(1484, 1, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: b(1485, 1, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), + Decorator_used_before_export_here: b(1486, 1, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."), + Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: b(1487, 1, "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", "Octal escape sequences are not allowed. Use the syntax '{0}'."), + Escape_sequence_0_is_not_allowed: b(1488, 1, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), + Decimals_with_leading_zeros_are_not_allowed: b(1489, 1, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), + File_appears_to_be_binary: b(1490, 1, "File_appears_to_be_binary_1490", "File appears to be binary."), + _0_modifier_cannot_appear_on_a_using_declaration: b(1491, 1, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), + _0_declarations_may_not_have_binding_patterns: b(1492, 1, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: b(1493, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), + The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: b(1494, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), + _0_modifier_cannot_appear_on_an_await_using_declaration: b(1495, 1, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: b(1496, 1, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), + Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator: b(1497, 1, "Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator_1497", "Expression must be enclosed in parentheses to be used as a decorator."), + Invalid_syntax_in_decorator: b(1498, 1, "Invalid_syntax_in_decorator_1498", "Invalid syntax in decorator."), + Unknown_regular_expression_flag: b(1499, 1, "Unknown_regular_expression_flag_1499", "Unknown regular expression flag."), + Duplicate_regular_expression_flag: b(1500, 1, "Duplicate_regular_expression_flag_1500", "Duplicate regular expression flag."), + This_regular_expression_flag_is_only_available_when_targeting_0_or_later: b(1501, 1, "This_regular_expression_flag_is_only_available_when_targeting_0_or_later_1501", "This regular expression flag is only available when targeting '{0}' or later."), + The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously: b(1502, 1, "The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously_1502", "The Unicode (u) flag and the Unicode Sets (v) flag cannot be set simultaneously."), + Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later: b(1503, 1, "Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later_1503", "Named capturing groups are only available when targeting 'ES2018' or later."), + Subpattern_flags_must_be_present_when_there_is_a_minus_sign: b(1504, 1, "Subpattern_flags_must_be_present_when_there_is_a_minus_sign_1504", "Subpattern flags must be present when there is a minus sign."), + Incomplete_quantifier_Digit_expected: b(1505, 1, "Incomplete_quantifier_Digit_expected_1505", "Incomplete quantifier. Digit expected."), + Numbers_out_of_order_in_quantifier: b(1506, 1, "Numbers_out_of_order_in_quantifier_1506", "Numbers out of order in quantifier."), + There_is_nothing_available_for_repetition: b(1507, 1, "There_is_nothing_available_for_repetition_1507", "There is nothing available for repetition."), + Unexpected_0_Did_you_mean_to_escape_it_with_backslash: b(1508, 1, "Unexpected_0_Did_you_mean_to_escape_it_with_backslash_1508", "Unexpected '{0}'. Did you mean to escape it with backslash?"), + This_regular_expression_flag_cannot_be_toggled_within_a_subpattern: b(1509, 1, "This_regular_expression_flag_cannot_be_toggled_within_a_subpattern_1509", "This regular expression flag cannot be toggled within a subpattern."), + k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets: b(1510, 1, "k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets_1510", "'\\k' must be followed by a capturing group name enclosed in angle brackets."), + q_is_only_available_inside_character_class: b(1511, 1, "q_is_only_available_inside_character_class_1511", "'\\q' is only available inside character class."), + c_must_be_followed_by_an_ASCII_letter: b(1512, 1, "c_must_be_followed_by_an_ASCII_letter_1512", "'\\c' must be followed by an ASCII letter."), + Undetermined_character_escape: b(1513, 1, "Undetermined_character_escape_1513", "Undetermined character escape."), + Expected_a_capturing_group_name: b(1514, 1, "Expected_a_capturing_group_name_1514", "Expected a capturing group name."), + Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other: b(1515, 1, "Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other_1515", "Named capturing groups with the same name must be mutually exclusive to each other."), + A_character_class_range_must_not_be_bounded_by_another_character_class: b(1516, 1, "A_character_class_range_must_not_be_bounded_by_another_character_class_1516", "A character class range must not be bounded by another character class."), + Range_out_of_order_in_character_class: b(1517, 1, "Range_out_of_order_in_character_class_1517", "Range out of order in character class."), + Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class: b(1518, 1, "Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_characte_1518", "Anything that would possibly match more than a single character is invalid inside a negated character class."), + Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead: b(1519, 1, "Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead_1519", "Operators must not be mixed within a character class. Wrap it in a nested class instead."), + Expected_a_class_set_operand: b(1520, 1, "Expected_a_class_set_operand_1520", "Expected a class set operand."), + q_must_be_followed_by_string_alternatives_enclosed_in_braces: b(1521, 1, "q_must_be_followed_by_string_alternatives_enclosed_in_braces_1521", "'\\q' must be followed by string alternatives enclosed in braces."), + A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash: b(1522, 1, "A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backs_1522", "A character class must not contain a reserved double punctuator. Did you mean to escape it with backslash?"), + Expected_a_Unicode_property_name: b(1523, 1, "Expected_a_Unicode_property_name_1523", "Expected a Unicode property name."), + Unknown_Unicode_property_name: b(1524, 1, "Unknown_Unicode_property_name_1524", "Unknown Unicode property name."), + Expected_a_Unicode_property_value: b(1525, 1, "Expected_a_Unicode_property_value_1525", "Expected a Unicode property value."), + Unknown_Unicode_property_value: b(1526, 1, "Unknown_Unicode_property_value_1526", "Unknown Unicode property value."), + Expected_a_Unicode_property_name_or_value: b(1527, 1, "Expected_a_Unicode_property_name_or_value_1527", "Expected a Unicode property name or value."), + Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set: b(1528, 1, "Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_t_1528", "Any Unicode property that would possibly match more than a single character is only available when the Unicode Sets (v) flag is set."), + Unknown_Unicode_property_name_or_value: b(1529, 1, "Unknown_Unicode_property_name_or_value_1529", "Unknown Unicode property name or value."), + Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set: b(1530, 1, "Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v__1530", "Unicode property value expressions are only available when the Unicode (u) flag or the Unicode Sets (v) flag is set."), + _0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces: b(1531, 1, "_0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces_1531", "'\\{0}' must be followed by a Unicode property value expression enclosed in braces."), + There_is_no_capturing_group_named_0_in_this_regular_expression: b(1532, 1, "There_is_no_capturing_group_named_0_in_this_regular_expression_1532", "There is no capturing group named '{0}' in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression: b(1533, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_r_1533", "This backreference refers to a group that does not exist. There are only {0} capturing groups in this regular expression."), + This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression: b(1534, 1, "This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regul_1534", "This backreference refers to a group that does not exist. There are no capturing groups in this regular expression."), + This_character_cannot_be_escaped_in_a_regular_expression: b(1535, 1, "This_character_cannot_be_escaped_in_a_regular_expression_1535", "This character cannot be escaped in a regular expression."), + Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead: b(1536, 1, "Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended__1536", "Octal escape sequences and backreferences are not allowed in a character class. If this was intended as an escape sequence, use the syntax '{0}' instead."), + Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class: b(1537, 1, "Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_1537", "Decimal escape sequences and backreferences are not allowed in a character class."), + The_types_of_0_are_incompatible_between_these_types: b(2200, 1, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), + The_types_returned_by_0_are_incompatible_between_these_types: b(2201, 1, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), + Call_signature_return_types_0_and_1_are_incompatible: b( + 2202, + 1, + "Call_signature_return_types_0_and_1_are_incompatible_2202", + "Call signature return types '{0}' and '{1}' are incompatible.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Construct_signature_return_types_0_and_1_are_incompatible: b( + 2203, + 1, + "Construct_signature_return_types_0_and_1_are_incompatible_2203", + "Construct signature return types '{0}' and '{1}' are incompatible.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: b( + 2204, + 1, + "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", + "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: b( + 2205, + 1, + "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", + "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + !0 + ), + The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: b(2206, 1, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), + The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: b(2207, 1, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), + This_type_parameter_might_need_an_extends_0_constraint: b(2208, 1, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), + The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: b(2209, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: b(2210, 1, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + Add_extends_constraint: b(2211, 3, "Add_extends_constraint_2211", "Add `extends` constraint."), + Add_extends_constraint_to_all_type_parameters: b(2212, 3, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), + Duplicate_identifier_0: b(2300, 1, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: b(2301, 1, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: b(2302, 1, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: b(2303, 1, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: b(2304, 1, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: b(2305, 1, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: b(2306, 1, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0_or_its_corresponding_type_declarations: b(2307, 1, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: b(2308, 1, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: b(2309, 1, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: b(2310, 1, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: b(2311, 1, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), + An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2312, 1, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), + Type_parameter_0_has_a_circular_constraint: b(2313, 1, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: b(2314, 1, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: b(2315, 1, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: b(2316, 1, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: b(2317, 1, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: b(2318, 1, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: b(2319, 1, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: b(2320, 1, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: b(2321, 1, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: b(2322, 1, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: b(2323, 1, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: b(2324, 1, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: b(2325, 1, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: b(2326, 1, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: b(2327, 1, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: b(2328, 1, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_for_type_0_is_missing_in_type_1: b(2329, 1, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), + _0_and_1_index_signatures_are_incompatible: b(2330, 1, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: b(2331, 1, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: b(2332, 1, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_a_static_property_initializer: b(2334, 1, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: b(2335, 1, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: b(2336, 1, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: b(2337, 1, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: b(2338, 1, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: b(2339, 1, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: b(2340, 1, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: b(2341, 1, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: b(2343, 1, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), + Type_0_does_not_satisfy_the_constraint_1: b(2344, 1, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: b(2345, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Untyped_function_calls_may_not_accept_type_arguments: b(2347, 1, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: b(2348, 1, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + This_expression_is_not_callable: b(2349, 1, "This_expression_is_not_callable_2349", "This expression is not callable."), + Only_a_void_function_can_be_called_with_the_new_keyword: b(2350, 1, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + This_expression_is_not_constructable: b(2351, 1, "This_expression_is_not_constructable_2351", "This expression is not constructable."), + Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: b(2352, 1, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: b(2353, 1, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: b(2354, 1, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value: b(2355, 1, "A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: b(2356, 1, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: b(2357, 1, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: b(2358, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: b(2359, 1, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: b(2362, 1, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: b(2363, 1, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: b(2364, 1, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: b(2365, 1, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: b(2366, 1, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: b(2367, 1, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), + Type_parameter_name_cannot_be_0: b(2368, 1, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: b(2369, 1, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: b(2370, 1, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: b(2371, 1, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_reference_itself: b(2372, 1, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), + Parameter_0_cannot_reference_identifier_1_declared_after_it: b(2373, 1, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_index_signature_for_type_0: b(2374, 1, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: b(2375, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: b(2376, 1, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), + Constructors_for_derived_classes_must_contain_a_super_call: b(2377, 1, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: b(2378, 1, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: b(2379, 1, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + Overload_signatures_must_all_be_exported_or_non_exported: b(2383, 1, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: b(2384, 1, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: b(2385, 1, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: b(2386, 1, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: b(2387, 1, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: b(2388, 1, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: b(2389, 1, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: b(2390, 1, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: b(2391, 1, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: b(2392, 1, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: b(2393, 1, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + This_overload_signature_is_not_compatible_with_its_implementation_signature: b(2394, 1, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: b(2395, 1, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: b(2396, 1, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: b(2397, 1, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + constructor_cannot_be_used_as_a_parameter_property_name: b(2398, 1, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: b(2399, 1, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: b(2400, 1, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: b(2401, 1, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: b(2402, 1, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: b(2403, 1, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: b(2404, 1, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: b(2405, 1, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: b(2406, 1, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: b(2407, 1, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: b(2408, 1, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: b(2409, 1, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: b(2410, 1, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: b(2412, 1, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), + Property_0_of_type_1_is_not_assignable_to_2_index_type_3: b(2411, 1, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), + _0_index_type_1_is_not_assignable_to_2_index_type_3: b(2413, 1, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), + Class_name_cannot_be_0: b(2414, 1, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: b(2415, 1, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: b(2416, 1, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: b(2417, 1, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: b(2418, 1, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), + Types_of_construct_signatures_are_incompatible: b(2419, 1, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), + Class_0_incorrectly_implements_interface_1: b(2420, 1, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2422, 1, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: b(2423, 1, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: b(2425, 1, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: b(2426, 1, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: b(2427, 1, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: b(2428, 1, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: b(2430, 1, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: b(2431, 1, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: b(2432, 1, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: b(2433, 1, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: b(2434, 1, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: b(2435, 1, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: b(2436, 1, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: b(2437, 1, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: b(2438, 1, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: b(2439, 1, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: b(2440, 1, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: b(2441, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: b(2442, 1, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: b(2443, 1, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: b(2444, 1, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: b(2445, 1, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: b(2446, 1, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: b(2447, 1, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: b(2448, 1, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: b(2449, 1, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: b(2450, 1, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: b(2451, 1, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: b(2452, 1, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + Variable_0_is_used_before_being_assigned: b(2454, 1, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_alias_0_circularly_references_itself: b(2456, 1, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: b(2457, 1, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: b(2458, 1, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: b(2459, 1, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: b(2460, 1, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), + Type_0_is_not_an_array_type: b(2461, 1, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: b(2462, 1, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: b(2463, 1, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: b(2464, 1, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: b(2465, 1, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: b(2466, 1, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: b(2467, 1, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: b(2468, 1, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: b(2469, 1, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: b(2472, 1, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: b(2473, 1, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + const_enum_member_initializers_must_be_constant_expressions: b(2474, 1, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: b(2475, 1, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: b(2476, 1, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: b(2477, 1, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: b(2478, 1, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: b(2480, 1, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: b(2481, 1, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: b(2483, 1, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: b(2484, 1, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: b(2487, 1, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2488, 1, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: b(2489, 1, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: b(2490, 1, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: b(2491, 1, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: b(2492, 1, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_of_length_1_has_no_element_at_index_2: b(2493, 1, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: b(2494, 1, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: b(2495, 1, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression: b(2496, 1, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_func_2496", "The 'arguments' object cannot be referenced in an arrow function in ES5. Consider using a standard function expression."), + This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: b(2497, 1, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: b(2498, 1, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: b(2499, 1, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: b(2500, 1, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: b(2501, 1, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: b(2502, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: b(2503, 1, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: b(2504, 1, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: b(2505, 1, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: b(2506, 1, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: b(2507, 1, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: b(2508, 1, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: b(2509, 1, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), + Base_constructors_must_all_have_the_same_return_type: b(2510, 1, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: b(2511, 1, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: b(2512, 1, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: b(2513, 1, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + A_tuple_type_cannot_be_indexed_with_a_negative_value: b(2514, 1, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: b(2515, 1, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: b(2516, 1, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: b(2517, 1, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: b(2518, 1, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: b(2519, 1, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: b(2520, 1, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method: b(2522, 1, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_sta_2522", "The 'arguments' object cannot be referenced in an async function or method in ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: b(2523, 1, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: b(2524, 1, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: b(2525, 1, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: b(2526, 1, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: b(2527, 1, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: b(2528, 1, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: b(2529, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: b(2530, 1, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: b(2531, 1, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: b(2532, 1, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: b(2533, 1, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: b(2534, 1, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Type_0_cannot_be_used_to_index_type_1: b(2536, 1, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: b(2537, 1, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: b(2538, 1, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: b(2539, 1, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_read_only_property: b(2540, 1, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), + Index_signature_in_type_0_only_permits_reading: b(2542, 1, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: b(2543, 1, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: b(2544, 1, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: b(2545, 1, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: b(2547, 1, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2548, 1, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: b(2549, 1, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: b(2550, 1, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: b(2551, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: b(2552, 1, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: b(2553, 1, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: b(2554, 1, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: b(2555, 1, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: b(2556, 1, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), + Expected_0_type_arguments_but_got_1: b(2558, 1, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: b(2559, 1, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: b(2560, 1, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: b(2561, 1, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: b(2562, 1, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: b(2563, 1, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: b(2564, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: b(2565, 1, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: b(2566, 1, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: b(2567, 1, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Property_0_may_not_exist_on_type_1_Did_you_mean_2: b(2568, 1, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), + Could_not_find_name_0_Did_you_mean_1: b(2570, 1, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), + Object_is_of_type_unknown: b(2571, 1, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + A_rest_element_type_must_be_an_array_type: b(2574, 1, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), + No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: b(2575, 1, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), + Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: b(2576, 1, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), + Return_type_annotation_circularly_references_itself: b(2577, 1, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), + Unused_ts_expect_error_directive: b(2578, 1, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: b(2580, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: b(2581, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: b(2582, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: b(2583, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: b(2584, 1, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: b(2585, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), + Cannot_assign_to_0_because_it_is_a_constant: b(2588, 1, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), + Type_instantiation_is_excessively_deep_and_possibly_infinite: b(2589, 1, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), + Expression_produces_a_union_type_that_is_too_complex_to_represent: b(2590, 1, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: b(2591, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: b(2592, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: b(2593, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), + This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: b(2594, 1, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), + _0_can_only_be_imported_by_using_a_default_import: b(2595, 1, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), + _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2596, 1, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: b(2597, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2598, 1, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: b(2602, 1, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: b(2603, 1, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: b(2604, 1, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: b(2606, 1, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: b(2607, 1, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: b(2608, 1, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: b(2609, 1, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: b(2610, 1, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: b(2611, 1, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), + Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: b(2612, 1, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), + Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: b(2613, 1, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), + Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: b(2614, 1, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), + Type_of_property_0_circularly_references_itself_in_mapped_type_1: b(2615, 1, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), + _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: b(2616, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), + _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: b(2617, 1, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), + Source_has_0_element_s_but_target_requires_1: b(2618, 1, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), + Source_has_0_element_s_but_target_allows_only_1: b(2619, 1, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), + Target_requires_0_element_s_but_source_may_have_fewer: b(2620, 1, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), + Target_allows_only_0_element_s_but_source_may_have_more: b(2621, 1, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), + Source_provides_no_match_for_required_element_at_position_0_in_target: b(2623, 1, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), + Source_provides_no_match_for_variadic_element_at_position_0_in_target: b(2624, 1, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), + Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: b(2625, 1, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), + Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: b(2626, 1, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), + Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: b(2627, 1, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), + Cannot_assign_to_0_because_it_is_an_enum: b(2628, 1, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), + Cannot_assign_to_0_because_it_is_a_class: b(2629, 1, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), + Cannot_assign_to_0_because_it_is_a_function: b(2630, 1, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), + Cannot_assign_to_0_because_it_is_a_namespace: b(2631, 1, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), + Cannot_assign_to_0_because_it_is_an_import: b(2632, 1, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), + JSX_property_access_expressions_cannot_include_JSX_namespace_names: b(2633, 1, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), + _0_index_signatures_are_incompatible: b(2634, 1, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), + Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: b(2635, 1, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), + Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: b(2636, 1, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), + Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: b(2637, 1, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), + Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: b(2638, 1, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), + React_components_cannot_include_JSX_namespace_names: b(2639, 1, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: b(2649, 1, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: b(2650, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: b(2651, 1, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: b(2652, 1, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: b(2653, 1, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: b(2654, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."), + Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: b(2655, 1, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."), + Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: b(2656, 1, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."), + JSX_expressions_must_have_one_parent_element: b(2657, 1, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: b(2658, 1, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: b(2659, 1, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: b(2660, 1, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: b(2661, 1, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: b(2662, 1, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: b(2663, 1, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: b(2664, 1, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: b(2665, 1, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: b(2666, 1, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: b(2667, 1, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: b(2668, 1, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: b(2669, 1, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: b(2670, 1, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: b(2671, 1, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: b(2672, 1, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: b(2673, 1, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: b(2674, 1, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: b(2675, 1, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: b(2676, 1, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: b(2677, 1, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: b(2678, 1, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: b(2679, 1, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: b(2680, 1, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: b(2681, 1, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: b(2683, 1, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: b(2684, 1, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: b(2685, 1, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: b(2686, 1, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: b(2687, 1, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: b(2688, 1, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: b(2689, 1, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: b(2690, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: b(2692, 1, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: b(2693, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: b(2694, 1, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: b( + 2695, + 1, + "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", + "Left side of comma operator is unused and has no side effects.", + /*reportsUnnecessary*/ + !0 + ), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: b(2696, 1, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: b(2697, 1, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + Spread_types_may_only_be_created_from_object_types: b(2698, 1, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: b(2699, 1, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: b(2700, 1, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: b(2701, 1, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: b(2702, 1, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: b(2703, 1, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: b(2704, 1, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: b(2705, 1, "An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_2705", "An async function or method in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Required_type_parameters_may_not_follow_optional_type_parameters: b(2706, 1, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: b(2707, 1, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: b(2708, 1, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: b(2709, 1, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: b(2710, 1, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: b(2711, 1, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: b(2712, 1, "A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_t_2712", "A dynamic import call in ES5 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: b(2713, 1, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", `Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}["{1}"]'?`), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: b(2714, 1, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: b(2715, 1, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: b(2716, 1, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: b(2717, 1, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_property_0: b(2718, 1, "Duplicate_property_0_2718", "Duplicate property '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: b(2719, 1, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: b(2720, 1, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: b(2721, 1, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: b(2722, 1, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: b(2723, 1, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + _0_has_no_exported_member_named_1_Did_you_mean_2: b(2724, 1, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: b(2725, 1, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Cannot_find_lib_definition_for_0: b(2726, 1, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: b(2727, 1, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + _0_is_declared_here: b(2728, 3, "_0_is_declared_here_2728", "'{0}' is declared here."), + Property_0_is_used_before_its_initialization: b(2729, 1, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), + An_arrow_function_cannot_have_a_this_parameter: b(2730, 1, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), + Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: b(2731, 1, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), + Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: b(2732, 1, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), + Property_0_was_also_declared_here: b(2733, 1, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), + Are_you_missing_a_semicolon: b(2734, 1, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), + Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: b(2735, 1, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), + Operator_0_cannot_be_applied_to_type_1: b(2736, 1, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), + BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: b(2737, 1, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), + An_outer_value_of_this_is_shadowed_by_this_container: b(2738, 3, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2: b(2739, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: b(2740, 1, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), + Property_0_is_missing_in_type_1_but_required_in_type_2: b(2741, 1, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), + The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: b(2742, 1, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), + No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: b(2743, 1, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), + Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: b(2744, 1, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), + This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: b(2745, 1, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), + This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: b(2746, 1, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), + _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: b(2747, 1, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), + Cannot_access_ambient_const_enums_when_0_is_enabled: b(2748, 1, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."), + _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: b(2749, 1, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), + The_implementation_signature_is_declared_here: b(2750, 1, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), + Circularity_originates_in_type_at_this_location: b(2751, 1, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), + The_first_export_default_is_here: b(2752, 1, "The_first_export_default_is_here_2752", "The first export default is here."), + Another_export_default_is_here: b(2753, 1, "Another_export_default_is_here_2753", "Another export default is here."), + super_may_not_use_type_arguments: b(2754, 1, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: b(2755, 1, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: b(2756, 1, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: b(2757, 1, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: b(2758, 1, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: b(2759, 1, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: b(2760, 1, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: b(2761, 1, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: b(2762, 1, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: b(2763, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: b(2764, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: b(2765, 1, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: b(2766, 1, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: b(2767, 1, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: b(2768, 1, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: b(2769, 1, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: b(2770, 1, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: b(2771, 1, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: b(2772, 1, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: b(2773, 1, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), + This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: b(2774, 1, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), + Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: b(2775, 1, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), + Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: b(2776, 1, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), + The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: b(2777, 1, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), + The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: b(2778, 1, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), + The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: b(2779, 1, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), + The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: b(2780, 1, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), + The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: b(2781, 1, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), + _0_needs_an_explicit_type_annotation: b(2782, 3, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: b(2783, 1, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), + get_and_set_accessors_cannot_declare_this_parameters: b(2784, 1, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), + This_spread_always_overwrites_this_property: b(2785, 1, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), + _0_cannot_be_used_as_a_JSX_component: b(2786, 1, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), + Its_return_type_0_is_not_a_valid_JSX_element: b(2787, 1, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), + Its_instance_type_0_is_not_a_valid_JSX_element: b(2788, 1, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), + Its_element_type_0_is_not_a_valid_JSX_element: b(2789, 1, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), + The_operand_of_a_delete_operator_must_be_optional: b(2790, 1, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), + Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: b(2791, 1, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), + Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option: b(2792, 1, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?"), + The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: b(2793, 1, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), + Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: b(2794, 1, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), + The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: b(2795, 1, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), + It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: b(2796, 1, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), + A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: b(2797, 1, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), + The_declaration_was_marked_as_deprecated_here: b(2798, 1, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), + Type_produces_a_tuple_type_that_is_too_large_to_represent: b(2799, 1, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), + Expression_produces_a_tuple_type_that_is_too_large_to_represent: b(2800, 1, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), + This_condition_will_always_return_true_since_this_0_is_always_defined: b(2801, 1, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), + Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: b(2802, 1, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), + Cannot_assign_to_private_method_0_Private_methods_are_not_writable: b(2803, 1, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), + Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: b(2804, 1, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), + Private_accessor_was_defined_without_a_getter: b(2806, 1, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), + This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: b(2807, 1, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), + A_get_accessor_must_be_at_least_as_accessible_as_the_setter: b(2808, 1, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), + Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses: b(2809, 1, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."), + Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: b(2810, 1, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), + Initializer_for_property_0: b(2811, 1, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), + Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: b(2812, 1, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), + Class_declaration_cannot_implement_overload_list_for_0: b(2813, 1, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), + Function_with_bodies_can_only_merge_with_classes_that_are_ambient: b(2814, 1, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), + arguments_cannot_be_referenced_in_property_initializers: b(2815, 1, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), + Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: b(2816, 1, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: b(2817, 1, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), + Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: b(2818, 1, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), + Namespace_name_cannot_be_0: b(2819, 1, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), + Type_0_is_not_assignable_to_type_1_Did_you_mean_2: b(2820, 1, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: b(2821, 1, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2821", "Import assertions are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Import_assertions_cannot_be_used_with_type_only_imports_or_exports: b(2822, 1, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve: b(2823, 1, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve_2823", "Import attributes are only supported when the '--module' option is set to 'esnext', 'nodenext', or 'preserve'."), + Cannot_find_namespace_0_Did_you_mean_1: b(2833, 1, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: b(2834, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: b(2835, 1, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: b(2836, 1, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), + Import_assertion_values_must_be_string_literal_expressions: b(2837, 1, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), + All_declarations_of_0_must_have_identical_constraints: b(2838, 1, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), + This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: b(2839, 1, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: b(2840, 1, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), + _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: b(2842, 1, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), + We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: b(2843, 1, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), + Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: b(2844, 1, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + This_condition_will_always_return_0: b(2845, 1, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), + A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: b(2846, 1, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), + The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: b(2848, 1, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), + Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: b(2849, 1, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), + The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: b(2850, 1, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: b(2851, 1, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), + await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: b(2852, 1, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), + await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: b(2853, 1, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher: b(2854, 1, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', 'nodenext', or 'preserve', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: b(2855, 1, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: b(2856, 1, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: b(2857, 1, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: b(2858, 1, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: b(2859, 1, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: b(2860, 1, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: b(2861, 1, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: b(2862, 1, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: b(2863, 1, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: b(2864, 1, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), + Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: b(2865, 1, "Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_2865", "Import '{0}' conflicts with local value, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled: b(2866, 1, "Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_w_2866", "Import '{0}' conflicts with global value used in this file, so must be declared with a type-only import when 'isolatedModules' is enabled."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun: b(2867, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2867", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig: b(2868, 1, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_2868", "Cannot find name '{0}'. Do you need to install type definitions for Bun? Try `npm i --save-dev @types/bun` and then add 'bun' to the types field in your tsconfig."), + Import_declaration_0_is_using_private_name_1: b(4e3, 1, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: b(4002, 1, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: b(4004, 1, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: b(4006, 1, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: b(4008, 1, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: b(4010, 1, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: b(4012, 1, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: b(4014, 1, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: b(4016, 1, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: b(4019, 1, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: b(4020, 1, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_has_or_is_using_private_name_0: b(4021, 1, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: b(4022, 1, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4023, 1, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: b(4024, 1, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: b(4025, 1, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4026, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4027, 1, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: b(4028, 1, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4029, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4030, 1, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: b(4031, 1, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4032, 1, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: b(4033, 1, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4034, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: b(4035, 1, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4036, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: b(4037, 1, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4038, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4039, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: b(4040, 1, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4041, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4042, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: b(4043, 1, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4044, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: b(4045, 1, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4046, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: b(4047, 1, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4048, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: b(4049, 1, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4050, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: b(4051, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: b(4052, 1, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4053, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: b(4054, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: b(4055, 1, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: b(4056, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: b(4057, 1, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: b(4058, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: b(4059, 1, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: b(4060, 1, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4061, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4062, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: b(4063, 1, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4064, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: b(4065, 1, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4066, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: b(4067, 1, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4068, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4069, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: b(4070, 1, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4071, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: b(4072, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: b(4073, 1, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4074, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: b(4075, 1, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4076, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: b(4077, 1, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: b(4078, 1, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: b(4081, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: b(4082, 1, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: b(4083, 1, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: b(4084, 1, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), + Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: b(4085, 1, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' has or is using private name '{1}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4091, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: b(4092, 1, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_class_expression_may_not_be_private_or_protected: b(4094, 1, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4095, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4096, 1, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: b(4097, 1, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4098, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: b(4099, 1, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: b(4100, 1, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: b(4101, 1, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: b(4102, 1, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: b(4103, 1, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), + The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: b(4104, 1, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: b(4105, 1, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), + Parameter_0_of_accessor_has_or_is_using_private_name_1: b(4106, 1, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: b(4107, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: b(4108, 1, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: b(4109, 1, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: b(4110, 1, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), + Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: b(4111, 1, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), + This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: b(4112, 1, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: b(4113, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: b(4114, 1, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: b(4115, 1, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: b(4116, 1, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: b(4117, 1, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: b(4118, 1, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), + This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: b(4119, 1, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: b(4120, 1, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: b(4121, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: b(4122, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: b(4123, 1, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: b(4124, 1, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: b(4125, 1, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."), + One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: b(4126, 1, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."), + The_current_host_does_not_support_the_0_option: b(5001, 1, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: b(5009, 1, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: b(5010, 1, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: b(5012, 1, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Failed_to_parse_file_0_Colon_1: b(5014, 1, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), + Unknown_compiler_option_0: b(5023, 1, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: b(5024, 1, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: b(5025, 1, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), + Could_not_write_file_0_Colon_1: b(5033, 1, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: b(5042, 1, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: b(5047, 1, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: b(5051, 1, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: b(5052, 1, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: b(5053, 1, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: b(5054, 1, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: b(5055, 1, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: b(5056, 1, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: b(5057, 1, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: b(5058, 1, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: b(5059, 1, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Pattern_0_can_have_at_most_one_Asterisk_character: b(5061, 1, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: b(5062, 1, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: b(5063, 1, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: b(5064, 1, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: b(5065, 1, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: b(5066, 1, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: b(5067, 1, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: b(5068, 1, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: b(5069, 1, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic: b(5070, 1, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."), + Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd: b(5071, 1, "Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd_5071", "Option '--resolveJsonModule' cannot be specified when 'module' is set to 'none', 'system', or 'umd'."), + Unknown_build_option_0: b(5072, 1, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), + Build_option_0_requires_a_value_of_type_1: b(5073, 1, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), + Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: b(5074, 1, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), + _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: b(5075, 1, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), + _0_and_1_operations_cannot_be_mixed_without_parentheses: b(5076, 1, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: b(5077, 1, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), + Unknown_watch_option_0: b(5078, 1, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), + Unknown_watch_option_0_Did_you_mean_1: b(5079, 1, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), + Watch_option_0_requires_a_value_of_type_1: b(5080, 1, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), + Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: b(5081, 1, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), + _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: b(5082, 1, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), + Cannot_read_file_0: b(5083, 1, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), + A_tuple_member_cannot_be_both_optional_and_rest: b(5085, 1, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), + A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: b(5086, 1, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), + A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: b(5087, 1, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), + The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: b(5088, 1, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), + Option_0_cannot_be_specified_when_option_jsx_is_1: b(5089, 1, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), + Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: b(5090, 1, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), + Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: b(5091, 1, "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."), + The_root_value_of_a_0_file_must_be_an_object: b(5092, 1, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), + Compiler_option_0_may_only_be_used_with_build: b(5093, 1, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), + Compiler_option_0_may_not_be_used_with_build: b(5094, 1, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), + Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later: b(5095, 1, "Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'preserve' or to 'es2015' or later."), + Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: b(5096, 1, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), + An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: b(5097, 1, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), + Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: b(5098, 1, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), + Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: b(5101, 1, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), + Option_0_has_been_removed_Please_remove_it_from_your_configuration: b(5102, 1, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), + Invalid_value_for_ignoreDeprecations: b(5103, 1, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), + Option_0_is_redundant_and_cannot_be_specified_with_option_1: b(5104, 1, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), + Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: b(5105, 1, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), + Use_0_instead: b(5106, 3, "Use_0_instead_5106", "Use '{0}' instead."), + Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: b(5107, 1, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), + Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: b(5108, 1, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), + Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: b(5109, 1, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), + Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: b(5110, 1, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: b(6e3, 3, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: b(6001, 3, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: b(6002, 3, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: b(6004, 3, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: b(6005, 3, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: b(6006, 3, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: b(6007, 3, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: b(6008, 3, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: b(6009, 3, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: b(6010, 3, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: b(6011, 3, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: b(6012, 3, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: b(6013, 3, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: b(6014, 3, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version: b(6015, 3, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), + Specify_module_code_generation: b(6016, 3, "Specify_module_code_generation_6016", "Specify module code generation."), + Print_this_message: b(6017, 3, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: b(6019, 3, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: b(6020, 3, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: b(6023, 3, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: b(6024, 3, "options_6024", "options"), + file: b(6025, 3, "file_6025", "file"), + Examples_Colon_0: b(6026, 3, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: b(6027, 3, "Options_Colon_6027", "Options:"), + Version_0: b(6029, 3, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: b(6030, 3, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: b(6031, 3, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: b(6032, 3, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: b(6034, 3, "KIND_6034", "KIND"), + FILE: b(6035, 3, "FILE_6035", "FILE"), + VERSION: b(6036, 3, "VERSION_6036", "VERSION"), + LOCATION: b(6037, 3, "LOCATION_6037", "LOCATION"), + DIRECTORY: b(6038, 3, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: b(6039, 3, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: b(6040, 3, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Errors_Files: b(6041, 3, "Errors_Files_6041", "Errors Files"), + Generates_corresponding_map_file: b(6043, 3, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: b(6044, 1, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: b(6045, 1, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: b(6046, 1, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: b(6048, 1, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unable_to_open_file_0: b(6050, 1, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: b(6051, 1, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: b(6052, 3, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: b(6053, 1, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: b(6054, 1, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: b(6055, 3, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: b(6056, 3, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: b(6058, 3, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: b(6059, 1, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: b(6060, 3, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: b(6061, 3, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: b(6064, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), + Enables_experimental_support_for_ES7_decorators: b(6065, 3, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: b(6066, 3, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: b(6070, 3, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: b(6071, 3, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: b(6072, 3, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: b(6073, 3, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: b(6074, 3, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: b(6075, 3, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: b(6076, 3, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: b(6077, 3, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: b(6078, 3, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: b(6079, 3, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation: b(6080, 3, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), + Only_amd_and_system_modules_are_supported_alongside_0: b(6082, 1, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: b(6083, 3, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: b(6084, 3, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: b(6085, 3, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: b(6086, 3, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: b(6087, 3, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: b(6088, 3, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: b(6089, 3, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: b(6090, 3, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: b(6091, 3, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: b(6092, 3, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: b(6093, 3, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: b(6094, 3, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: b(6095, 3, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), + File_0_does_not_exist: b(6096, 3, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exists_use_it_as_a_name_resolution_result: b(6097, 3, "File_0_exists_use_it_as_a_name_resolution_result_6097", "File '{0}' exists - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: b(6098, 3, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), + Found_package_json_at_0: b(6099, 3, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: b(6100, 3, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: b(6101, 3, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: b(6102, 3, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: b(6104, 3, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_1_got_2: b(6105, 3, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: b(6106, 3, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: b(6107, 3, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: b(6108, 3, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: b(6109, 3, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: b(6110, 3, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: b(6111, 3, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: b(6112, 3, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: b(6113, 3, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: b(6114, 1, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: b(6115, 3, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: b(6116, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: b(6119, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: b(6120, 3, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: b(6121, 3, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: b(6122, 3, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: b(6123, 3, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: b(6124, 3, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: b(6125, 3, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: b(6126, 3, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: b(6127, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: b(6128, 3, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: b(6130, 3, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: b(6131, 1, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: b(6132, 3, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: b( + 6133, + 1, + "_0_is_declared_but_its_value_is_never_read_6133", + "'{0}' is declared but its value is never read.", + /*reportsUnnecessary*/ + !0 + ), + Report_errors_on_unused_locals: b(6134, 3, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: b(6135, 3, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: b(6136, 3, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: b(6137, 1, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: b( + 6138, + 1, + "Property_0_is_declared_but_its_value_is_never_read_6138", + "Property '{0}' is declared but its value is never read.", + /*reportsUnnecessary*/ + !0 + ), + Import_emit_helpers_from_tslib: b(6139, 3, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: b(6140, 1, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: b(6141, 3, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", 'Parse in strict mode and emit "use strict" for each source file.'), + Module_0_was_resolved_to_1_but_jsx_is_not_set: b(6142, 1, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: b(6144, 3, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: b(6145, 3, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: b(6146, 3, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: b(6147, 3, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: b(6148, 3, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: b(6149, 3, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: b(6150, 3, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: b(6151, 3, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: b(6152, 3, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: b(6153, 3, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: b(6154, 3, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: b(6155, 3, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: b(6156, 3, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: b(6157, 3, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: b(6158, 3, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: b(6159, 3, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: b(6160, 3, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: b(6161, 3, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: b(6162, 3, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: b(6163, 3, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1: b(6164, 3, "Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164", "Skipping module '{0}' that looks like an absolute URI, target file types: {1}."), + Do_not_truncate_error_messages: b(6165, 3, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: b(6166, 3, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: b(6167, 3, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: b(6168, 3, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: b(6169, 3, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: b(6170, 3, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: b(6171, 3, "Command_line_Options_6171", "Command-line Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5: b(6179, 3, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5'."), + Enable_all_strict_type_checking_options: b(6180, 3, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + Scoped_package_detected_looking_in_0: b(6182, 3, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: b(6183, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: b(6184, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Enable_strict_checking_of_function_types: b(6186, 3, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: b(6187, 3, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: b(6188, 1, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: b(6189, 1, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: b(6191, 3, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: b( + 6192, + 1, + "All_imports_in_import_declaration_are_unused_6192", + "All imports in import declaration are unused.", + /*reportsUnnecessary*/ + !0 + ), + Found_1_error_Watching_for_file_changes: b(6193, 3, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: b(6194, 3, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: b(6195, 3, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: b( + 6196, + 1, + "_0_is_declared_but_never_used_6196", + "'{0}' is declared but never used.", + /*reportsUnnecessary*/ + !0 + ), + Include_modules_imported_with_json_extension: b(6197, 3, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: b( + 6198, + 1, + "All_destructured_elements_are_unused_6198", + "All destructured elements are unused.", + /*reportsUnnecessary*/ + !0 + ), + All_variables_are_unused: b( + 6199, + 1, + "All_variables_are_unused_6199", + "All variables are unused.", + /*reportsUnnecessary*/ + !0 + ), + Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: b(6200, 1, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), + Conflicts_are_in_this_file: b(6201, 3, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: b(6202, 1, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + _0_was_also_declared_here: b(6203, 3, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), + and_here: b(6204, 3, "and_here_6204", "and here."), + All_type_parameters_are_unused: b(6205, 1, "All_type_parameters_are_unused_6205", "All type parameters are unused."), + package_json_has_a_typesVersions_field_with_version_specific_path_mappings: b(6206, 3, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), + package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: b(6207, 3, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), + package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: b(6208, 3, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), + package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: b(6209, 3, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), + An_argument_for_0_was_not_provided: b(6210, 3, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), + An_argument_matching_this_binding_pattern_was_not_provided: b(6211, 3, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), + Did_you_mean_to_call_this_expression: b(6212, 3, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), + Did_you_mean_to_use_new_with_this_expression: b(6213, 3, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), + Enable_strict_bind_call_and_apply_methods_on_functions: b(6214, 3, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), + Using_compiler_options_of_project_reference_redirect_0: b(6215, 3, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), + Found_1_error: b(6216, 3, "Found_1_error_6216", "Found 1 error."), + Found_0_errors: b(6217, 3, "Found_0_errors_6217", "Found {0} errors."), + Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: b(6218, 3, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: b(6219, 3, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), + package_json_had_a_falsy_0_field: b(6220, 3, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), + Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: b(6221, 3, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), + Emit_class_fields_with_Define_instead_of_Set: b(6222, 3, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), + Generates_a_CPU_profile: b(6223, 3, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), + Disable_solution_searching_for_this_project: b(6224, 3, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), + Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: b(6225, 3, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), + Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: b(6226, 3, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), + Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: b(6227, 3, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: b(6229, 1, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: b(6230, 1, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), + Could_not_resolve_the_path_0_with_the_extensions_Colon_1: b(6231, 1, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), + Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: b(6232, 1, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), + This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: b(6233, 1, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), + This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: b(6234, 1, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), + Disable_loading_referenced_projects: b(6235, 3, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), + Arguments_for_the_rest_parameter_0_were_not_provided: b(6236, 1, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), + Generates_an_event_trace_and_a_list_of_types: b(6237, 3, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), + Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: b(6238, 1, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), + File_0_exists_according_to_earlier_cached_lookups: b(6239, 3, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), + File_0_does_not_exist_according_to_earlier_cached_lookups: b(6240, 3, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), + Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: b(6241, 3, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), + Resolving_type_reference_directive_0_containing_file_1: b(6242, 3, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), + Interpret_optional_property_types_as_written_rather_than_adding_undefined: b(6243, 3, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), + Modules: b(6244, 3, "Modules_6244", "Modules"), + File_Management: b(6245, 3, "File_Management_6245", "File Management"), + Emit: b(6246, 3, "Emit_6246", "Emit"), + JavaScript_Support: b(6247, 3, "JavaScript_Support_6247", "JavaScript Support"), + Type_Checking: b(6248, 3, "Type_Checking_6248", "Type Checking"), + Editor_Support: b(6249, 3, "Editor_Support_6249", "Editor Support"), + Watch_and_Build_Modes: b(6250, 3, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), + Compiler_Diagnostics: b(6251, 3, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), + Interop_Constraints: b(6252, 3, "Interop_Constraints_6252", "Interop Constraints"), + Backwards_Compatibility: b(6253, 3, "Backwards_Compatibility_6253", "Backwards Compatibility"), + Language_and_Environment: b(6254, 3, "Language_and_Environment_6254", "Language and Environment"), + Projects: b(6255, 3, "Projects_6255", "Projects"), + Output_Formatting: b(6256, 3, "Output_Formatting_6256", "Output Formatting"), + Completeness: b(6257, 3, "Completeness_6257", "Completeness"), + _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: b(6258, 1, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), + Found_1_error_in_0: b(6259, 3, "Found_1_error_in_0_6259", "Found 1 error in {0}"), + Found_0_errors_in_the_same_file_starting_at_Colon_1: b(6260, 3, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), + Found_0_errors_in_1_files: b(6261, 3, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), + File_name_0_has_a_1_extension_looking_up_2_instead: b(6262, 3, "File_name_0_has_a_1_extension_looking_up_2_instead_6262", "File name '{0}' has a '{1}' extension - looking up '{2}' instead."), + Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set: b(6263, 1, "Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263", "Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."), + Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present: b(6264, 3, "Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264", "Enable importing files with any extension, provided a declaration file is present."), + Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder: b(6265, 3, "Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265", "Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."), + Option_0_can_only_be_specified_on_command_line: b(6266, 1, "Option_0_can_only_be_specified_on_command_line_6266", "Option '{0}' can only be specified on command line."), + Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: b(6270, 3, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), + Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: b(6271, 3, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), + Invalid_import_specifier_0_has_no_possible_resolutions: b(6272, 3, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), + package_json_scope_0_has_no_imports_defined: b(6273, 3, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), + package_json_scope_0_explicitly_maps_specifier_1_to_null: b(6274, 3, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), + package_json_scope_0_has_invalid_type_for_target_of_specifier_1: b(6275, 3, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), + Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: b(6276, 3, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), + Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: b(6277, 3, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: b(6278, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`), + Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update: b(6279, 3, "Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_ne_6279", "Resolution of non-relative name failed; trying with '--moduleResolution bundler' to see if project may need configuration update."), + There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler: b(6280, 3, "There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setti_6280", "There are types at '{0}', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'."), + package_json_has_a_peerDependencies_field: b(6281, 3, "package_json_has_a_peerDependencies_field_6281", "'package.json' has a 'peerDependencies' field."), + Found_peerDependency_0_with_1_version: b(6282, 3, "Found_peerDependency_0_with_1_version_6282", "Found peerDependency '{0}' with '{1}' version."), + Failed_to_find_peerDependency_0: b(6283, 3, "Failed_to_find_peerDependency_0_6283", "Failed to find peerDependency '{0}'."), + Enable_project_compilation: b(6302, 3, "Enable_project_compilation_6302", "Enable project compilation"), + Composite_projects_may_not_disable_declaration_emit: b(6304, 1, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: b(6305, 1, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: b(6306, 1, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", `Referenced project '{0}' must have setting "composite": true.`), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: b(6307, 1, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), + Referenced_project_0_may_not_disable_emit: b(6310, 1, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), + Project_0_is_out_of_date_because_output_1_is_older_than_input_2: b(6350, 3, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: b(6351, 3, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: b(6352, 3, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: b(6353, 3, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: b(6354, 3, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: b(6355, 3, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: b(6356, 3, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: b(6357, 3, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: b(6358, 3, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: b(6359, 3, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + Project_0_is_up_to_date: b(6361, 3, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: b(6362, 3, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: b(6363, 3, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: b(6364, 3, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: b(6365, 3, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), + Show_what_would_be_built_or_deleted_if_specified_with_clean: b(6367, 3, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Option_build_must_be_the_first_command_line_argument: b(6369, 1, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: b(6370, 1, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Updating_unchanged_output_timestamps_of_project_0: b(6371, 3, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), + A_non_dry_build_would_update_timestamps_for_output_of_project_0: b(6374, 3, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), + Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: b(6377, 1, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), + Composite_projects_may_not_disable_incremental_compilation: b(6379, 1, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), + Specify_file_to_store_incremental_compilation_information: b(6380, 3, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), + Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: b(6381, 3, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), + Skipping_build_of_project_0_because_its_dependency_1_was_not_built: b(6382, 3, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), + Project_0_can_t_be_built_because_its_dependency_1_was_not_built: b(6383, 3, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), + Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: b(6384, 3, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), + _0_is_deprecated: b( + 6385, + 2, + "_0_is_deprecated_6385", + "'{0}' is deprecated.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + !0 + ), + Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: b(6386, 3, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), + The_signature_0_of_1_is_deprecated: b( + 6387, + 2, + "The_signature_0_of_1_is_deprecated_6387", + "The signature '{0}' of '{1}' is deprecated.", + /*reportsUnnecessary*/ + void 0, + /*elidedInCompatabilityPyramid*/ + void 0, + /*reportsDeprecated*/ + !0 + ), + Project_0_is_being_forcibly_rebuilt: b(6388, 3, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: b(6389, 3, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: b(6390, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: b(6391, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: b(6392, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: b(6393, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: b(6394, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: b(6395, 3, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: b(6396, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: b(6397, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: b(6398, 3, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: b(6399, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), + Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: b(6400, 3, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), + Project_0_is_out_of_date_because_there_was_error_reading_file_1: b(6401, 3, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), + Resolving_in_0_mode_with_conditions_1: b(6402, 3, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), + Matched_0_condition_1: b(6403, 3, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), + Using_0_subpath_1_with_target_2: b(6404, 3, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), + Saw_non_matching_condition_0: b(6405, 3, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: b(6406, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), + Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set: b(6407, 3, "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407", "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."), + Use_the_package_json_exports_field_when_resolving_package_imports: b(6408, 3, "Use_the_package_json_exports_field_when_resolving_package_imports_6408", "Use the package.json 'exports' field when resolving package imports."), + Use_the_package_json_imports_field_when_resolving_imports: b(6409, 3, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."), + Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: b(6410, 3, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."), + true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: b(6411, 3, "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: b(6412, 3, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."), + Entering_conditional_exports: b(6413, 3, "Entering_conditional_exports_6413", "Entering conditional exports."), + Resolved_under_condition_0: b(6414, 3, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), + Failed_to_resolve_under_condition_0: b(6415, 3, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), + Exiting_conditional_exports: b(6416, 3, "Exiting_conditional_exports_6416", "Exiting conditional exports."), + Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: b(6417, 3, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), + Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: b(6418, 3, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), + The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: b(6500, 3, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), + The_expected_type_comes_from_this_index_signature: b(6501, 3, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), + The_expected_type_comes_from_the_return_type_of_this_signature: b(6502, 3, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: b(6503, 3, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: b(6504, 1, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), + Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: b(6505, 3, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), + Consider_adding_a_declare_modifier_to_this_class: b(6506, 3, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: b(6600, 3, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), + Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: b(6601, 3, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), + Allow_accessing_UMD_globals_from_modules: b(6602, 3, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), + Disable_error_reporting_for_unreachable_code: b(6603, 3, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), + Disable_error_reporting_for_unused_labels: b(6604, 3, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), + Ensure_use_strict_is_always_emitted: b(6605, 3, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), + Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: b(6606, 3, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), + Specify_the_base_directory_to_resolve_non_relative_module_names: b(6607, 3, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), + No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: b(6608, 3, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), + Enable_error_reporting_in_type_checked_JavaScript_files: b(6609, 3, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), + Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: b(6611, 3, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), + Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: b(6612, 3, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), + Specify_the_output_directory_for_generated_declaration_files: b(6613, 3, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), + Create_sourcemaps_for_d_ts_files: b(6614, 3, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), + Output_compiler_performance_information_after_building: b(6615, 3, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), + Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: b(6616, 3, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), + Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: b(6617, 3, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), + Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: b(6618, 3, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), + Opt_a_project_out_of_multi_project_reference_checking_when_editing: b(6619, 3, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), + Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: b(6620, 3, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), + Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: b(6621, 3, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: b(6622, 3, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Only_output_d_ts_files_and_not_JavaScript_files: b(6623, 3, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), + Emit_design_type_metadata_for_decorated_declarations_in_source_files: b(6624, 3, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), + Disable_the_type_acquisition_for_JavaScript_projects: b(6625, 3, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), + Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: b(6626, 3, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), + Filters_results_from_the_include_option: b(6627, 3, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), + Remove_a_list_of_directories_from_the_watch_process: b(6628, 3, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), + Remove_a_list_of_files_from_the_watch_mode_s_processing: b(6629, 3, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), + Enable_experimental_support_for_legacy_experimental_decorators: b(6630, 3, "Enable_experimental_support_for_legacy_experimental_decorators_6630", "Enable experimental support for legacy experimental decorators."), + Print_files_read_during_the_compilation_including_why_it_was_included: b(6631, 3, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), + Output_more_detailed_compiler_performance_information_after_building: b(6632, 3, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), + Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: b(6633, 3, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), + Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: b(6634, 3, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), + Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: b(6635, 3, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), + Build_all_projects_including_those_that_appear_to_be_up_to_date: b(6636, 3, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), + Ensure_that_casing_is_correct_in_imports: b(6637, 3, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), + Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: b(6638, 3, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), + Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: b(6639, 3, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: b(6641, 3, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), + Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: b(6642, 3, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), + Include_sourcemap_files_inside_the_emitted_JavaScript: b(6643, 3, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), + Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: b(6644, 3, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), + Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: b(6645, 3, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), + Specify_what_JSX_code_is_generated: b(6646, 3, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), + Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: b(6647, 3, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), + Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: b(6648, 3, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), + Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: b(6649, 3, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), + Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: b(6650, 3, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), + Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: b(6651, 3, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), + Print_the_names_of_emitted_files_after_a_compilation: b(6652, 3, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), + Print_all_of_the_files_read_during_the_compilation: b(6653, 3, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), + Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: b(6654, 3, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: b(6655, 3, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: b(6656, 3, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), + Specify_what_module_code_is_generated: b(6657, 3, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), + Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: b(6658, 3, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), + Set_the_newline_character_for_emitting_files: b(6659, 3, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), + Disable_emitting_files_from_a_compilation: b(6660, 3, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), + Disable_generating_custom_helper_functions_like_extends_in_compiled_output: b(6661, 3, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), + Disable_emitting_files_if_any_type_checking_errors_are_reported: b(6662, 3, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), + Disable_truncating_types_in_error_messages: b(6663, 3, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), + Enable_error_reporting_for_fallthrough_cases_in_switch_statements: b(6664, 3, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), + Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: b(6665, 3, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), + Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: b(6666, 3, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), + Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: b(6667, 3, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), + Enable_error_reporting_when_this_is_given_the_type_any: b(6668, 3, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), + Disable_adding_use_strict_directives_in_emitted_JavaScript_files: b(6669, 3, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), + Disable_including_any_library_files_including_the_default_lib_d_ts: b(6670, 3, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), + Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: b(6671, 3, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), + Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: b(6672, 3, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), + Disable_strict_checking_of_generic_signatures_in_function_types: b(6673, 3, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), + Add_undefined_to_a_type_when_accessed_using_an_index: b(6674, 3, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), + Enable_error_reporting_when_local_variables_aren_t_read: b(6675, 3, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), + Raise_an_error_when_a_function_parameter_isn_t_read: b(6676, 3, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), + Deprecated_setting_Use_outFile_instead: b(6677, 3, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), + Specify_an_output_folder_for_all_emitted_files: b(6678, 3, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), + Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: b(6679, 3, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), + Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: b(6680, 3, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), + Specify_a_list_of_language_service_plugins_to_include: b(6681, 3, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), + Disable_erasing_const_enum_declarations_in_generated_code: b(6682, 3, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), + Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: b(6683, 3, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), + Disable_wiping_the_console_in_watch_mode: b(6684, 3, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), + Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: b(6685, 3, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), + Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: b(6686, 3, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), + Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: b(6687, 3, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), + Disable_emitting_comments: b(6688, 3, "Disable_emitting_comments_6688", "Disable emitting comments."), + Enable_importing_json_files: b(6689, 3, "Enable_importing_json_files_6689", "Enable importing .json files."), + Specify_the_root_folder_within_your_source_files: b(6690, 3, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), + Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: b(6691, 3, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), + Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: b(6692, 3, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), + Skip_type_checking_all_d_ts_files: b(6693, 3, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), + Create_source_map_files_for_emitted_JavaScript_files: b(6694, 3, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), + Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: b(6695, 3, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), + Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: b(6697, 3, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), + When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: b(6698, 3, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), + When_type_checking_take_into_account_null_and_undefined: b(6699, 3, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), + Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: b(6700, 3, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), + Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: b(6701, 3, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), + Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: b(6702, 3, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), + Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: b(6703, 3, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), + Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: b(6704, 3, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), + Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: b(6705, 3, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), + Log_paths_used_during_the_moduleResolution_process: b(6706, 3, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), + Specify_the_path_to_tsbuildinfo_incremental_compilation_file: b(6707, 3, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), + Specify_options_for_automatic_acquisition_of_declaration_files: b(6709, 3, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), + Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: b(6710, 3, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), + Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: b(6711, 3, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), + Emit_ECMAScript_standard_compliant_class_fields: b(6712, 3, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), + Enable_verbose_logging: b(6713, 3, "Enable_verbose_logging_6713", "Enable verbose logging."), + Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: b(6714, 3, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), + Specify_how_the_TypeScript_watch_mode_works: b(6715, 3, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), + Require_undeclared_properties_from_index_signatures_to_use_element_accesses: b(6717, 3, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), + Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: b(6718, 3, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), + Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files: b(6719, 3, "Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files_6719", "Require sufficient annotation on exports so other tools can trivially generate declaration files."), + Default_catch_clause_variables_as_unknown_instead_of_any: b(6803, 3, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), + Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: b(6804, 3, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."), + Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported: b(6805, 3, "Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported_6805", "Disable full type checking (only critical parse and emit errors will be reported)."), + one_of_Colon: b(6900, 3, "one_of_Colon_6900", "one of:"), + one_or_more_Colon: b(6901, 3, "one_or_more_Colon_6901", "one or more:"), + type_Colon: b(6902, 3, "type_Colon_6902", "type:"), + default_Colon: b(6903, 3, "default_Colon_6903", "default:"), + module_system_or_esModuleInterop: b(6904, 3, "module_system_or_esModuleInterop_6904", 'module === "system" or esModuleInterop'), + false_unless_strict_is_set: b(6905, 3, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), + false_unless_composite_is_set: b(6906, 3, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), + node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: b(6907, 3, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", '`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'), + if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: b(6908, 3, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", '`[]` if `files` is specified, otherwise `["**/*"]`'), + true_if_composite_false_otherwise: b(6909, 3, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), + module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: b(69010, 3, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), + Computed_from_the_list_of_input_files: b(6911, 3, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), + Platform_specific: b(6912, 3, "Platform_specific_6912", "Platform specific"), + You_can_learn_about_all_of_the_compiler_options_at_0: b(6913, 3, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), + Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: b(6914, 3, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), + Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: b(6915, 3, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), + COMMON_COMMANDS: b(6916, 3, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), + ALL_COMPILER_OPTIONS: b(6917, 3, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), + WATCH_OPTIONS: b(6918, 3, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), + BUILD_OPTIONS: b(6919, 3, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), + COMMON_COMPILER_OPTIONS: b(6920, 3, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), + COMMAND_LINE_FLAGS: b(6921, 3, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), + tsc_Colon_The_TypeScript_Compiler: b(6922, 3, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), + Compiles_the_current_project_tsconfig_json_in_the_working_directory: b(6923, 3, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), + Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: b(6924, 3, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), + Build_a_composite_project_in_the_working_directory: b(6925, 3, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), + Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: b(6926, 3, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), + Compiles_the_TypeScript_project_located_at_the_specified_path: b(6927, 3, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), + An_expanded_version_of_this_information_showing_all_possible_compiler_options: b(6928, 3, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), + Compiles_the_current_project_with_additional_settings: b(6929, 3, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), + true_for_ES2022_and_above_including_ESNext: b(6930, 3, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), + List_of_file_name_suffixes_to_search_when_resolving_a_module: b(6931, 1, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), + Variable_0_implicitly_has_an_1_type: b(7005, 1, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: b(7006, 1, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: b(7008, 1, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: b(7009, 1, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: b(7010, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: b(7011, 1, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: b(7012, 1, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: b(7013, 1, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: b(7014, 1, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: b(7015, 1, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: b(7016, 1, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: b(7017, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: b(7018, 1, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: b(7019, 1, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: b(7020, 1, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: b(7022, 1, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: b(7023, 1, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: b(7024, 1, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: b(7025, 1, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: b(7026, 1, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: b( + 7027, + 1, + "Unreachable_code_detected_7027", + "Unreachable code detected.", + /*reportsUnnecessary*/ + !0 + ), + Unused_label: b( + 7028, + 1, + "Unused_label_7028", + "Unused label.", + /*reportsUnnecessary*/ + !0 + ), + Fallthrough_case_in_switch: b(7029, 1, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: b(7030, 1, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: b(7031, 1, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: b(7032, 1, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: b(7033, 1, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: b(7034, 1, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: b(7035, 1, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: b(7036, 1, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: b(7037, 3, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: b(7038, 3, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), + Mapped_object_type_implicitly_has_an_any_template_type: b(7039, 1, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: b(7040, 1, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), + The_containing_arrow_function_captures_the_global_value_of_this: b(7041, 1, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), + Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: b(7042, 1, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), + Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7043, 2, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7044, 2, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: b(7045, 2, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: b(7046, 2, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), + Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: b(7047, 2, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: b(7048, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: b(7049, 2, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), + _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: b(7050, 2, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), + Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: b(7051, 1, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: b(7052, 1, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), + Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: b(7053, 1, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), + No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: b(7054, 1, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: b(7055, 1, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), + The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: b(7056, 1, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), + yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: b(7057, 1, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), + If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: b(7058, 1, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: b(7059, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: b(7060, 1, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), + A_mapped_type_may_not_declare_properties_or_methods: b(7061, 1, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), + You_cannot_rename_this_element: b(8e3, 1, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: b(8001, 1, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_TypeScript_files: b(8002, 1, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), + export_can_only_be_used_in_TypeScript_files: b(8003, 1, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), + Type_parameter_declarations_can_only_be_used_in_TypeScript_files: b(8004, 1, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), + implements_clauses_can_only_be_used_in_TypeScript_files: b(8005, 1, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), + _0_declarations_can_only_be_used_in_TypeScript_files: b(8006, 1, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), + Type_aliases_can_only_be_used_in_TypeScript_files: b(8008, 1, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), + The_0_modifier_can_only_be_used_in_TypeScript_files: b(8009, 1, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), + Type_annotations_can_only_be_used_in_TypeScript_files: b(8010, 1, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), + Type_arguments_can_only_be_used_in_TypeScript_files: b(8011, 1, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), + Parameter_modifiers_can_only_be_used_in_TypeScript_files: b(8012, 1, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), + Non_null_assertions_can_only_be_used_in_TypeScript_files: b(8013, 1, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), + Type_assertion_expressions_can_only_be_used_in_TypeScript_files: b(8016, 1, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Signature_declarations_can_only_be_used_in_TypeScript_files: b(8017, 1, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), + Report_errors_in_js_files: b(8019, 3, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: b(8020, 1, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: b(8021, 1, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: b(8022, 1, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: b(8023, 1, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: b(8024, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: b(8025, 1, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: b(8026, 1, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: b(8027, 1, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: b(8028, 1, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: b(8029, 1, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + The_type_of_a_function_declaration_must_match_the_function_s_signature: b(8030, 1, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), + You_cannot_rename_a_module_via_a_global_import: b(8031, 1, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), + Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: b(8032, 1, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), + A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: b(8033, 1, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), + The_tag_was_first_specified_here: b(8034, 1, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), + You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: b(8035, 1, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), + You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: b(8036, 1, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), + Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: b(8037, 1, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), + Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: b(8038, 1, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."), + A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag: b(8039, 1, "A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039", "A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"), + Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: b(9005, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: b(9006, 1, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), + Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: b(9007, 1, "Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9007", "Function must have an explicit return type annotation with --isolatedDeclarations."), + Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: b(9008, 1, "Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9008", "Method must have an explicit return type annotation with --isolatedDeclarations."), + At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations: b(9009, 1, "At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations_9009", "At least one accessor must have an explicit return type annotation with --isolatedDeclarations."), + Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9010, 1, "Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9010", "Variable must have an explicit type annotation with --isolatedDeclarations."), + Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9011, 1, "Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9011", "Parameter must have an explicit type annotation with --isolatedDeclarations."), + Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations: b(9012, 1, "Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations_9012", "Property must have an explicit type annotation with --isolatedDeclarations."), + Expression_type_can_t_be_inferred_with_isolatedDeclarations: b(9013, 1, "Expression_type_can_t_be_inferred_with_isolatedDeclarations_9013", "Expression type can't be inferred with --isolatedDeclarations."), + Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations: b(9014, 1, "Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedD_9014", "Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations."), + Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations: b(9015, 1, "Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations_9015", "Objects that contain spread assignments can't be inferred with --isolatedDeclarations."), + Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations: b(9016, 1, "Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations_9016", "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations."), + Only_const_arrays_can_be_inferred_with_isolatedDeclarations: b(9017, 1, "Only_const_arrays_can_be_inferred_with_isolatedDeclarations_9017", "Only const arrays can be inferred with --isolatedDeclarations."), + Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations: b(9018, 1, "Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations_9018", "Arrays with spread elements can't inferred with --isolatedDeclarations."), + Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations: b(9019, 1, "Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations_9019", "Binding elements can't be exported directly with --isolatedDeclarations."), + Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations: b(9020, 1, "Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDecl_9020", "Enum member initializers must be computable without references to external symbols with --isolatedDeclarations."), + Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations: b(9021, 1, "Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations_9021", "Extends clause can't contain an expression with --isolatedDeclarations."), + Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations: b(9022, 1, "Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations_9022", "Inference from class expressions is not supported with --isolatedDeclarations."), + Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function: b(9023, 1, "Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations__9023", "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function."), + Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations: b(9025, 1, "Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_su_9025", "Declaration emit for this parameter requires implicitly adding undefined to it's type. This is not supported with --isolatedDeclarations."), + Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations: b(9026, 1, "Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_support_9026", "Declaration emit for this file requires preserving this import for augmentations. This is not supported with --isolatedDeclarations."), + Add_a_type_annotation_to_the_variable_0: b(9027, 1, "Add_a_type_annotation_to_the_variable_0_9027", "Add a type annotation to the variable {0}."), + Add_a_type_annotation_to_the_parameter_0: b(9028, 1, "Add_a_type_annotation_to_the_parameter_0_9028", "Add a type annotation to the parameter {0}."), + Add_a_type_annotation_to_the_property_0: b(9029, 1, "Add_a_type_annotation_to_the_property_0_9029", "Add a type annotation to the property {0}."), + Add_a_return_type_to_the_function_expression: b(9030, 1, "Add_a_return_type_to_the_function_expression_9030", "Add a return type to the function expression."), + Add_a_return_type_to_the_function_declaration: b(9031, 1, "Add_a_return_type_to_the_function_declaration_9031", "Add a return type to the function declaration."), + Add_a_return_type_to_the_get_accessor_declaration: b(9032, 1, "Add_a_return_type_to_the_get_accessor_declaration_9032", "Add a return type to the get accessor declaration."), + Add_a_type_to_parameter_of_the_set_accessor_declaration: b(9033, 1, "Add_a_type_to_parameter_of_the_set_accessor_declaration_9033", "Add a type to parameter of the set accessor declaration."), + Add_a_return_type_to_the_method: b(9034, 1, "Add_a_return_type_to_the_method_9034", "Add a return type to the method"), + Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit: b(9035, 1, "Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit_9035", "Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit."), + Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it: b(9036, 1, "Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it_9036", "Move the expression in default export to a variable and add a type annotation to it."), + Default_exports_can_t_be_inferred_with_isolatedDeclarations: b(9037, 1, "Default_exports_can_t_be_inferred_with_isolatedDeclarations_9037", "Default exports can't be inferred with --isolatedDeclarations."), + Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations: b(9038, 1, "Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations_9038", "Computed property names on class or object literals cannot be inferred with --isolatedDeclarations."), + Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations: b(9039, 1, "Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations_9039", "Type containing private name '{0}' can't be used with --isolatedDeclarations."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: b(17e3, 1, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: b(17001, 1, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: b(17002, 1, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: b(17004, 1, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: b(17005, 1, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: b(17006, 1, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: b(17007, 1, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: b(17008, 1, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: b(17009, 1, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: b(17010, 1, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: b(17011, 1, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: b(17012, 1, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: b(17013, 1, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: b(17014, 1, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: b(17015, 1, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: b(17016, 1, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), + An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: b(17017, 1, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), + Unknown_type_acquisition_option_0_Did_you_mean_1: b(17018, 1, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), + _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: b(17019, 1, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: b(17020, 1, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: b(17021, 1, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), + Circularity_detected_while_resolving_configuration_Colon_0: b(18e3, 1, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + The_files_list_in_config_file_0_is_empty: b(18002, 1, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: b(18003, 1, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: b(80001, 2, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), + This_constructor_function_may_be_converted_to_a_class_declaration: b(80002, 2, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: b(80003, 2, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: b(80004, 2, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: b(80005, 2, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + This_may_be_converted_to_an_async_function: b(80006, 2, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: b(80007, 2, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), + Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: b(80008, 2, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), + JSDoc_typedef_may_be_converted_to_TypeScript_type: b(80009, 2, "JSDoc_typedef_may_be_converted_to_TypeScript_type_80009", "JSDoc typedef may be converted to TypeScript type."), + JSDoc_typedefs_may_be_converted_to_TypeScript_types: b(80010, 2, "JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010", "JSDoc typedefs may be converted to TypeScript types."), + Add_missing_super_call: b(90001, 3, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: b(90002, 3, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: b(90003, 3, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_unused_declaration_for_Colon_0: b(90004, 3, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), + Remove_import_from_0: b(90005, 3, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: b(90006, 3, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: b(90007, 3, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: b(90008, 3, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_variable_statement: b(90010, 3, "Remove_variable_statement_90010", "Remove variable statement"), + Remove_template_tag: b(90011, 3, "Remove_template_tag_90011", "Remove template tag"), + Remove_type_parameters: b(90012, 3, "Remove_type_parameters_90012", "Remove type parameters"), + Import_0_from_1: b(90013, 3, "Import_0_from_1_90013", `Import '{0}' from "{1}"`), + Change_0_to_1: b(90014, 3, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Declare_property_0: b(90016, 3, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: b(90017, 3, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: b(90018, 3, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: b(90019, 3, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: b(90020, 3, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: b(90021, 3, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: b(90022, 3, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: b(90023, 3, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: b(90024, 3, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: b(90025, 3, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: b(90026, 3, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: b(90027, 3, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: b(90028, 3, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: b(90029, 3, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Replace_infer_0_with_unknown: b(90030, 3, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), + Replace_all_unused_infer_with_unknown: b(90031, 3, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), + Add_parameter_name: b(90034, 3, "Add_parameter_name_90034", "Add parameter name"), + Declare_private_property_0: b(90035, 3, "Declare_private_property_0_90035", "Declare private property '{0}'"), + Replace_0_with_Promise_1: b(90036, 3, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), + Fix_all_incorrect_return_type_of_an_async_functions: b(90037, 3, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), + Declare_private_method_0: b(90038, 3, "Declare_private_method_0_90038", "Declare private method '{0}'"), + Remove_unused_destructuring_declaration: b(90039, 3, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), + Remove_unused_declarations_for_Colon_0: b(90041, 3, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), + Declare_a_private_field_named_0: b(90053, 3, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), + Includes_imports_of_types_referenced_by_0: b(90054, 3, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), + Remove_type_from_import_declaration_from_0: b(90055, 3, "Remove_type_from_import_declaration_from_0_90055", `Remove 'type' from import declaration from "{0}"`), + Remove_type_from_import_of_0_from_1: b(90056, 3, "Remove_type_from_import_of_0_from_1_90056", `Remove 'type' from import of '{0}' from "{1}"`), + Add_import_from_0: b(90057, 3, "Add_import_from_0_90057", 'Add import from "{0}"'), + Update_import_from_0: b(90058, 3, "Update_import_from_0_90058", 'Update import from "{0}"'), + Export_0_from_module_1: b(90059, 3, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), + Export_all_referenced_locals: b(90060, 3, "Export_all_referenced_locals_90060", "Export all referenced locals"), + Update_modifiers_of_0: b(90061, 3, "Update_modifiers_of_0_90061", "Update modifiers of '{0}'"), + Add_annotation_of_type_0: b(90062, 3, "Add_annotation_of_type_0_90062", "Add annotation of type '{0}'"), + Add_return_type_0: b(90063, 3, "Add_return_type_0_90063", "Add return type '{0}'"), + Extract_base_class_to_variable: b(90064, 3, "Extract_base_class_to_variable_90064", "Extract base class to variable"), + Extract_default_export_to_variable: b(90065, 3, "Extract_default_export_to_variable_90065", "Extract default export to variable"), + Extract_binding_expressions_to_variable: b(90066, 3, "Extract_binding_expressions_to_variable_90066", "Extract binding expressions to variable"), + Add_all_missing_type_annotations: b(90067, 3, "Add_all_missing_type_annotations_90067", "Add all missing type annotations"), + Add_satisfies_and_an_inline_type_assertion_with_0: b(90068, 3, "Add_satisfies_and_an_inline_type_assertion_with_0_90068", "Add satisfies and an inline type assertion with '{0}'"), + Extract_to_variable_and_replace_with_0_as_typeof_0: b(90069, 3, "Extract_to_variable_and_replace_with_0_as_typeof_0_90069", "Extract to variable and replace with '{0} as typeof {0}'"), + Mark_array_literal_as_const: b(90070, 3, "Mark_array_literal_as_const_90070", "Mark array literal as const"), + Annotate_types_of_properties_expando_function_in_a_namespace: b(90071, 3, "Annotate_types_of_properties_expando_function_in_a_namespace_90071", "Annotate types of properties expando function in a namespace"), + Convert_function_to_an_ES2015_class: b(95001, 3, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_0_to_1_in_0: b(95003, 3, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), + Extract_to_0_in_1: b(95004, 3, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: b(95005, 3, "Extract_function_95005", "Extract function"), + Extract_constant: b(95006, 3, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: b(95007, 3, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: b(95008, 3, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: b(95009, 3, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Infer_type_of_0_from_usage: b(95011, 3, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: b(95012, 3, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: b(95013, 3, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: b(95014, 3, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: b(95015, 3, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: b(95016, 3, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES_module: b(95017, 3, "Convert_to_ES_module_95017", "Convert to ES module"), + Add_undefined_type_to_property_0: b(95018, 3, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: b(95019, 3, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: b(95020, 3, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Convert_all_type_literals_to_mapped_type: b(95021, 3, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), + Add_all_missing_members: b(95022, 3, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: b(95023, 3, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: b(95024, 3, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: b(95025, 3, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: b(95026, 3, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: b(95027, 3, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: b(95028, 3, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: b(95029, 3, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: b(95030, 3, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: b(95031, 3, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: b(95032, 3, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: b(95033, 3, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: b(95034, 3, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: b(95035, 3, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: b(95036, 3, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: b(95037, 3, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: b(95038, 3, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: b(95039, 3, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: b(95040, 3, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: b(95041, 3, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: b(95042, 3, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: b(95043, 3, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: b(95044, 3, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: b(95045, 3, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: b(95046, 3, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: b(95047, 3, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: b(95048, 3, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: b(95049, 3, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: b(95050, 3, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: b(95051, 3, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: b(95052, 3, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: b(95053, 3, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: b(95054, 3, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: b(95055, 3, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: b(95056, 3, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: b(95057, 3, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + Add_or_remove_braces_in_an_arrow_function: b(95058, 3, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), + Add_braces_to_arrow_function: b(95059, 3, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), + Remove_braces_from_arrow_function: b(95060, 3, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), + Convert_default_export_to_named_export: b(95061, 3, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), + Convert_named_export_to_default_export: b(95062, 3, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), + Add_missing_enum_member_0: b(95063, 3, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), + Add_all_missing_imports: b(95064, 3, "Add_all_missing_imports_95064", "Add all missing imports"), + Convert_to_async_function: b(95065, 3, "Convert_to_async_function_95065", "Convert to async function"), + Convert_all_to_async_functions: b(95066, 3, "Convert_all_to_async_functions_95066", "Convert all to async functions"), + Add_missing_call_parentheses: b(95067, 3, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), + Add_all_missing_call_parentheses: b(95068, 3, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), + Add_unknown_conversion_for_non_overlapping_types: b(95069, 3, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), + Add_unknown_to_all_conversions_of_non_overlapping_types: b(95070, 3, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), + Add_missing_new_operator_to_call: b(95071, 3, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), + Add_missing_new_operator_to_all_calls: b(95072, 3, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), + Add_names_to_all_parameters_without_names: b(95073, 3, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), + Enable_the_experimentalDecorators_option_in_your_configuration_file: b(95074, 3, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), + Convert_parameters_to_destructured_object: b(95075, 3, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), + Extract_type: b(95077, 3, "Extract_type_95077", "Extract type"), + Extract_to_type_alias: b(95078, 3, "Extract_to_type_alias_95078", "Extract to type alias"), + Extract_to_typedef: b(95079, 3, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: b(95080, 3, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: b(95081, 3, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: b(95082, 3, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: b(95083, 3, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: b(95084, 3, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: b(95085, 3, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: b(95086, 3, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: b(95087, 3, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), + Enable_the_jsx_flag_in_your_configuration_file: b(95088, 3, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), + Add_await_to_initializers: b(95089, 3, "Add_await_to_initializers_95089", "Add 'await' to initializers"), + Extract_to_interface: b(95090, 3, "Extract_to_interface_95090", "Extract to interface"), + Convert_to_a_bigint_numeric_literal: b(95091, 3, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), + Convert_all_to_bigint_numeric_literals: b(95092, 3, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), + Convert_const_to_let: b(95093, 3, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), + Prefix_with_declare: b(95094, 3, "Prefix_with_declare_95094", "Prefix with 'declare'"), + Prefix_all_incorrect_property_declarations_with_declare: b(95095, 3, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), + Convert_to_template_string: b(95096, 3, "Convert_to_template_string_95096", "Convert to template string"), + Add_export_to_make_this_file_into_a_module: b(95097, 3, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), + Set_the_target_option_in_your_configuration_file_to_0: b(95098, 3, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), + Set_the_module_option_in_your_configuration_file_to_0: b(95099, 3, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: b(95100, 3, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Convert_all_invalid_characters_to_HTML_entity_code: b(95101, 3, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), + Convert_all_const_to_let: b(95102, 3, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), + Convert_function_expression_0_to_arrow_function: b(95105, 3, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), + Convert_function_declaration_0_to_arrow_function: b(95106, 3, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), + Fix_all_implicit_this_errors: b(95107, 3, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), + Wrap_invalid_character_in_an_expression_container: b(95108, 3, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), + Wrap_all_invalid_characters_in_an_expression_container: b(95109, 3, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), + Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: b(95110, 3, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), + Add_a_return_statement: b(95111, 3, "Add_a_return_statement_95111", "Add a return statement"), + Remove_braces_from_arrow_function_body: b(95112, 3, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), + Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: b(95113, 3, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), + Add_all_missing_return_statement: b(95114, 3, "Add_all_missing_return_statement_95114", "Add all missing return statement"), + Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: b(95115, 3, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), + Wrap_all_object_literal_with_parentheses: b(95116, 3, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), + Move_labeled_tuple_element_modifiers_to_labels: b(95117, 3, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), + Convert_overload_list_to_single_signature: b(95118, 3, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), + Generate_get_and_set_accessors_for_all_overriding_properties: b(95119, 3, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), + Wrap_in_JSX_fragment: b(95120, 3, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), + Wrap_all_unparented_JSX_in_JSX_fragment: b(95121, 3, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), + Convert_arrow_function_or_function_expression: b(95122, 3, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), + Convert_to_anonymous_function: b(95123, 3, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), + Convert_to_named_function: b(95124, 3, "Convert_to_named_function_95124", "Convert to named function"), + Convert_to_arrow_function: b(95125, 3, "Convert_to_arrow_function_95125", "Convert to arrow function"), + Remove_parentheses: b(95126, 3, "Remove_parentheses_95126", "Remove parentheses"), + Could_not_find_a_containing_arrow_function: b(95127, 3, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), + Containing_function_is_not_an_arrow_function: b(95128, 3, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), + Could_not_find_export_statement: b(95129, 3, "Could_not_find_export_statement_95129", "Could not find export statement"), + This_file_already_has_a_default_export: b(95130, 3, "This_file_already_has_a_default_export_95130", "This file already has a default export"), + Could_not_find_import_clause: b(95131, 3, "Could_not_find_import_clause_95131", "Could not find import clause"), + Could_not_find_namespace_import_or_named_imports: b(95132, 3, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), + Selection_is_not_a_valid_type_node: b(95133, 3, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), + No_type_could_be_extracted_from_this_type_node: b(95134, 3, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), + Could_not_find_property_for_which_to_generate_accessor: b(95135, 3, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), + Name_is_not_valid: b(95136, 3, "Name_is_not_valid_95136", "Name is not valid"), + Can_only_convert_property_with_modifier: b(95137, 3, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), + Switch_each_misused_0_to_1: b(95138, 3, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), + Convert_to_optional_chain_expression: b(95139, 3, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), + Could_not_find_convertible_access_expression: b(95140, 3, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), + Could_not_find_matching_access_expressions: b(95141, 3, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), + Can_only_convert_logical_AND_access_chains: b(95142, 3, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), + Add_void_to_Promise_resolved_without_a_value: b(95143, 3, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), + Add_void_to_all_Promises_resolved_without_a_value: b(95144, 3, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), + Use_element_access_for_0: b(95145, 3, "Use_element_access_for_0_95145", "Use element access for '{0}'"), + Use_element_access_for_all_undeclared_properties: b(95146, 3, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), + Delete_all_unused_imports: b(95147, 3, "Delete_all_unused_imports_95147", "Delete all unused imports"), + Infer_function_return_type: b(95148, 3, "Infer_function_return_type_95148", "Infer function return type"), + Return_type_must_be_inferred_from_a_function: b(95149, 3, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), + Could_not_determine_function_return_type: b(95150, 3, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), + Could_not_convert_to_arrow_function: b(95151, 3, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), + Could_not_convert_to_named_function: b(95152, 3, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), + Could_not_convert_to_anonymous_function: b(95153, 3, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), + Can_only_convert_string_concatenations_and_string_literals: b(95154, 3, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), + Selection_is_not_a_valid_statement_or_statements: b(95155, 3, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), + Add_missing_function_declaration_0: b(95156, 3, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), + Add_all_missing_function_declarations: b(95157, 3, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), + Method_not_implemented: b(95158, 3, "Method_not_implemented_95158", "Method not implemented."), + Function_not_implemented: b(95159, 3, "Function_not_implemented_95159", "Function not implemented."), + Add_override_modifier: b(95160, 3, "Add_override_modifier_95160", "Add 'override' modifier"), + Remove_override_modifier: b(95161, 3, "Remove_override_modifier_95161", "Remove 'override' modifier"), + Add_all_missing_override_modifiers: b(95162, 3, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), + Remove_all_unnecessary_override_modifiers: b(95163, 3, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), + Can_only_convert_named_export: b(95164, 3, "Can_only_convert_named_export_95164", "Can only convert named export"), + Add_missing_properties: b(95165, 3, "Add_missing_properties_95165", "Add missing properties"), + Add_all_missing_properties: b(95166, 3, "Add_all_missing_properties_95166", "Add all missing properties"), + Add_missing_attributes: b(95167, 3, "Add_missing_attributes_95167", "Add missing attributes"), + Add_all_missing_attributes: b(95168, 3, "Add_all_missing_attributes_95168", "Add all missing attributes"), + Add_undefined_to_optional_property_type: b(95169, 3, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), + Convert_named_imports_to_default_import: b(95170, 3, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), + Delete_unused_param_tag_0: b(95171, 3, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), + Delete_all_unused_param_tags: b(95172, 3, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), + Rename_param_tag_name_0_to_1: b(95173, 3, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), + Use_0: b(95174, 3, "Use_0_95174", "Use `{0}`."), + Use_Number_isNaN_in_all_conditions: b(95175, 3, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), + Convert_typedef_to_TypeScript_type: b(95176, 3, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."), + Convert_all_typedef_to_TypeScript_types: b(95177, 3, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), + Move_to_file: b(95178, 3, "Move_to_file_95178", "Move to file"), + Cannot_move_to_file_selected_file_is_invalid: b(95179, 3, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), + Use_import_type: b(95180, 3, "Use_import_type_95180", "Use 'import type'"), + Use_type_0: b(95181, 3, "Use_type_0_95181", "Use 'type {0}'"), + Fix_all_with_type_only_imports: b(95182, 3, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), + Cannot_move_statements_to_the_selected_file: b(95183, 3, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), + Inline_variable: b(95184, 3, "Inline_variable_95184", "Inline variable"), + Could_not_find_variable_to_inline: b(95185, 3, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), + Variables_with_multiple_declarations_cannot_be_inlined: b(95186, 3, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), + Add_missing_comma_for_object_member_completion_0: b(95187, 3, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), + Add_missing_parameter_to_0: b(95188, 3, "Add_missing_parameter_to_0_95188", "Add missing parameter to '{0}'"), + Add_missing_parameters_to_0: b(95189, 3, "Add_missing_parameters_to_0_95189", "Add missing parameters to '{0}'"), + Add_all_missing_parameters: b(95190, 3, "Add_all_missing_parameters_95190", "Add all missing parameters"), + Add_optional_parameter_to_0: b(95191, 3, "Add_optional_parameter_to_0_95191", "Add optional parameter to '{0}'"), + Add_optional_parameters_to_0: b(95192, 3, "Add_optional_parameters_to_0_95192", "Add optional parameters to '{0}'"), + Add_all_optional_parameters: b(95193, 3, "Add_all_optional_parameters_95193", "Add all optional parameters"), + Wrap_in_parentheses: b(95194, 3, "Wrap_in_parentheses_95194", "Wrap in parentheses"), + Wrap_all_invalid_decorator_expressions_in_parentheses: b(95195, 3, "Wrap_all_invalid_decorator_expressions_in_parentheses_95195", "Wrap all invalid decorator expressions in parentheses"), + No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: b(18004, 1, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), + Classes_may_not_have_a_field_named_constructor: b(18006, 1, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: b(18007, 1, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), + Private_identifiers_cannot_be_used_as_parameters: b(18009, 1, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), + An_accessibility_modifier_cannot_be_used_with_a_private_identifier: b(18010, 1, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), + The_operand_of_a_delete_operator_cannot_be_a_private_identifier: b(18011, 1, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), + constructor_is_a_reserved_word: b(18012, 1, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), + Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: b(18013, 1, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), + The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: b(18014, 1, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), + Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: b(18015, 1, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), + Private_identifiers_are_not_allowed_outside_class_bodies: b(18016, 1, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), + The_shadowing_declaration_of_0_is_defined_here: b(18017, 1, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), + The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: b(18018, 1, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), + _0_modifier_cannot_be_used_with_a_private_identifier: b(18019, 1, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), + An_enum_member_cannot_be_named_with_a_private_identifier: b(18024, 1, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), + can_only_be_used_at_the_start_of_a_file: b(18026, 1, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), + Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: b(18027, 1, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), + Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: b(18028, 1, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), + Private_identifiers_are_not_allowed_in_variable_declarations: b(18029, 1, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), + An_optional_chain_cannot_contain_private_identifiers: b(18030, 1, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), + The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: b(18031, 1, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), + The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: b(18032, 1, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), + Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: b(18033, 1, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), + Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: b(18034, 3, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), + Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: b(18035, 1, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), + Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: b(18036, 1, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), + await_expression_cannot_be_used_inside_a_class_static_block: b(18037, 1, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), + for_await_loops_cannot_be_used_inside_a_class_static_block: b(18038, 1, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), + Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: b(18039, 1, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), + A_return_statement_cannot_be_used_inside_a_class_static_block: b(18041, 1, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), + _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: b(18042, 1, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), + Types_cannot_appear_in_export_declarations_in_JavaScript_files: b(18043, 1, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), + _0_is_automatically_exported_here: b(18044, 3, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), + Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: b(18045, 1, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), + _0_is_of_type_unknown: b(18046, 1, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), + _0_is_possibly_null: b(18047, 1, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), + _0_is_possibly_undefined: b(18048, 1, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), + _0_is_possibly_null_or_undefined: b(18049, 1, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), + The_value_0_cannot_be_used_here: b(18050, 1, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), + Compiler_option_0_cannot_be_given_an_empty_string: b(18051, 1, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), + Its_type_0_is_not_a_valid_JSX_element_type: b(18053, 1, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), + await_using_statements_cannot_be_used_inside_a_class_static_block: b(18054, 1, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block."), + _0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled: b(18055, 1, "_0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is__18055", "'{0}' has a string type, but must have syntactically recognizable string syntax when 'isolatedModules' is enabled."), + Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled: b(18056, 1, "Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is__18056", "Enum member following a non-literal numeric member must have an initializer when 'isolatedModules' is enabled.") + }; + function Du(e) { + return e >= 80; + } + function iY(e) { + return e === 32 || Du(e); + } + var DI = { + abstract: 128, + accessor: 129, + any: 133, + as: 130, + asserts: 131, + assert: 132, + bigint: 163, + boolean: 136, + break: 83, + case: 84, + catch: 85, + class: 86, + continue: 88, + const: 87, + constructor: 137, + debugger: 89, + declare: 138, + default: 90, + delete: 91, + do: 92, + else: 93, + enum: 94, + export: 95, + extends: 96, + false: 97, + finally: 98, + for: 99, + from: 161, + function: 100, + get: 139, + if: 101, + implements: 119, + import: 102, + in: 103, + infer: 140, + instanceof: 104, + interface: 120, + intrinsic: 141, + is: 142, + keyof: 143, + let: 121, + module: 144, + namespace: 145, + never: 146, + new: 105, + null: 106, + number: 150, + object: 151, + package: 122, + private: 123, + protected: 124, + public: 125, + override: 164, + out: 147, + readonly: 148, + require: 149, + global: 162, + return: 107, + satisfies: 152, + set: 153, + static: 126, + string: 154, + super: 108, + switch: 109, + symbol: 155, + this: 110, + throw: 111, + true: 112, + try: 113, + type: 156, + typeof: 114, + undefined: 157, + unique: 158, + unknown: 159, + using: 160, + var: 115, + void: 116, + while: 117, + with: 118, + yield: 127, + async: 134, + await: 135, + of: 165 + /* OfKeyword */ + }, mOe = new Map(Object.entries(DI)), Lge = new Map(Object.entries({ + ...DI, + "{": 19, + "}": 20, + "(": 21, + ")": 22, + "[": 23, + "]": 24, + ".": 25, + "...": 26, + ";": 27, + ",": 28, + "<": 30, + ">": 32, + "<=": 33, + ">=": 34, + "==": 35, + "!=": 36, + "===": 37, + "!==": 38, + "=>": 39, + "+": 40, + "-": 41, + "**": 43, + "*": 42, + "/": 44, + "%": 45, + "++": 46, + "--": 47, + "<<": 48, + ">": 49, + ">>>": 50, + "&": 51, + "|": 52, + "^": 53, + "!": 54, + "~": 55, + "&&": 56, + "||": 57, + "?": 58, + "??": 61, + "?.": 29, + ":": 59, + "=": 64, + "+=": 65, + "-=": 66, + "*=": 67, + "**=": 68, + "/=": 69, + "%=": 70, + "<<=": 71, + ">>=": 72, + ">>>=": 73, + "&=": 74, + "|=": 75, + "^=": 79, + "||=": 76, + "&&=": 77, + "??=": 78, + "@": 60, + "#": 63, + "`": 62 + /* BacktickToken */ + })), Mge = new Map(Object.entries({ + d: 1, + g: 2, + i: 4, + m: 8, + s: 16, + u: 32, + v: 64, + y: 128 + /* Sticky */ + })), gOe = /* @__PURE__ */ new Map([ + [ + 1, + 9 + /* RegularExpressionFlagsHasIndices */ + ], + [ + 16, + 5 + /* RegularExpressionFlagsDotAll */ + ], + [ + 32, + 2 + /* RegularExpressionFlagsUnicode */ + ], + [ + 64, + 99 + /* RegularExpressionFlagsUnicodeSets */ + ], + [ + 128, + 2 + /* RegularExpressionFlagsSticky */ + ] + ]), hOe = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500], yOe = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43e3, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500], vOe = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2160, 2183, 2185, 2190, 2208, 2249, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3165, 3165, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3293, 3294, 3296, 3297, 3313, 3314, 3332, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5905, 5919, 5937, 5952, 5969, 5984, 5996, 5998, 6e3, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6988, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69248, 69289, 69296, 69297, 69376, 69404, 69415, 69415, 69424, 69445, 69488, 69505, 69552, 69572, 69600, 69622, 69635, 69687, 69745, 69746, 69749, 69749, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69959, 69959, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70207, 70208, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70753, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71488, 71494, 71680, 71723, 71840, 71903, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71983, 71999, 71999, 72001, 72001, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73474, 73474, 73476, 73488, 73490, 73523, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78913, 78918, 82944, 83526, 92160, 92728, 92736, 92766, 92784, 92862, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 122624, 122654, 122661, 122666, 122928, 122989, 123136, 123180, 123191, 123197, 123214, 123214, 123536, 123565, 123584, 123627, 124112, 124139, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743], bOe = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2160, 2183, 2185, 2190, 2200, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2901, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3132, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3165, 3165, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3293, 3294, 3296, 3299, 3302, 3311, 3313, 3315, 3328, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3457, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3790, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5909, 5919, 5940, 5952, 5971, 5984, 5996, 5998, 6e3, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6159, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6847, 6862, 6912, 6988, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12543, 12549, 12591, 12593, 12686, 12704, 12735, 12784, 12799, 13312, 19903, 19968, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42954, 42960, 42961, 42963, 42963, 42965, 42969, 42994, 43047, 43052, 43052, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43881, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 66928, 66938, 66940, 66954, 66956, 66962, 66964, 66965, 66967, 66977, 66979, 66993, 66995, 67001, 67003, 67004, 67072, 67382, 67392, 67413, 67424, 67431, 67456, 67461, 67463, 67504, 67506, 67514, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69248, 69289, 69291, 69292, 69296, 69297, 69373, 69404, 69415, 69415, 69424, 69456, 69488, 69509, 69552, 69572, 69600, 69622, 69632, 69702, 69734, 69749, 69759, 69818, 69826, 69826, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69959, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70094, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70209, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70753, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71488, 71494, 71680, 71738, 71840, 71913, 71935, 71942, 71945, 71945, 71948, 71955, 71957, 71958, 71960, 71989, 71991, 71992, 71995, 72003, 72016, 72025, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72368, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73472, 73488, 73490, 73530, 73534, 73538, 73552, 73561, 73648, 73648, 73728, 74649, 74752, 74862, 74880, 75075, 77712, 77808, 77824, 78895, 78912, 78933, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92784, 92862, 92864, 92873, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94180, 94192, 94193, 94208, 100343, 100352, 101589, 101632, 101640, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 118528, 118573, 118576, 118598, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122624, 122654, 122661, 122666, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 122928, 122989, 123023, 123023, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123536, 123566, 123584, 123641, 124112, 124153, 124896, 124902, 124904, 124907, 124909, 124910, 124912, 124926, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 130032, 130041, 131072, 173791, 173824, 177977, 177984, 178205, 178208, 183969, 183984, 191456, 191472, 192093, 194560, 195101, 196608, 201546, 201552, 205743, 917760, 917999], SOe = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/, TOe = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/, xOe = /@(?:see|link)/i; + function ZR(e, t) { + if (e < t[0]) + return !1; + let n = 0, i = t.length, s; + for (; n + 1 < i; ) { + if (s = n + (i - n) / 2, s -= s % 2, t[s] <= e && e <= t[s + 1]) + return !0; + e < t[s] ? i = s : n = s + 2; + } + return !1; + } + function PI(e, t) { + return t >= 2 ? ZR(e, vOe) : ZR(e, hOe); + } + function kOe(e, t) { + return t >= 2 ? ZR(e, bOe) : ZR(e, yOe); + } + function Rge(e) { + const t = []; + return e.forEach((n, i) => { + t[n] = i; + }), t; + } + var COe = Rge(Lge); + function Ws(e) { + return COe[e]; + } + function ib(e) { + return Lge.get(e); + } + var EOe = Rge(Mge); + function jge(e) { + return EOe[e]; + } + function KR(e) { + return Mge.get(e); + } + function kT(e) { + const t = []; + let n = 0, i = 0; + for (; n < e.length; ) { + const s = e.charCodeAt(n); + switch (n++, s) { + case 13: + e.charCodeAt(n) === 10 && n++; + case 10: + t.push(i), i = n; + break; + default: + s > 127 && _u(s) && (t.push(i), i = n); + break; + } + } + return t.push(i), t; + } + function mw(e, t, n, i) { + return e.getPositionOfLineAndCharacter ? e.getPositionOfLineAndCharacter(t, n, i) : wI(Tg(e), t, n, e.text, i); + } + function wI(e, t, n, i, s) { + (t < 0 || t >= e.length) && (s ? t = t < 0 ? 0 : t >= e.length ? e.length - 1 : t : E.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${i !== void 0 ? rw(e, kT(i)) : "unknown"}`)); + const o = e[t] + n; + return s ? o > e[t + 1] ? e[t + 1] : typeof i == "string" && o > i.length ? i.length : o : (t < e.length - 1 ? E.assert(o < e[t + 1]) : i !== void 0 && E.assert(o <= i.length), o); + } + function Tg(e) { + return e.lineMap || (e.lineMap = kT(e.text)); + } + function Vk(e, t) { + const n = ME(e, t); + return { + line: n, + character: t - e[n] + }; + } + function ME(e, t, n) { + let i = Zh(e, t, lo, uo, n); + return i < 0 && (i = ~i - 1, E.assert(i !== -1, "position cannot precede the beginning of the file")), i; + } + function RE(e, t, n) { + if (t === n) return 0; + const i = Tg(e), s = Math.min(t, n), o = s === n, c = o ? t : n, _ = ME(i, s), u = ME(i, c, _); + return o ? _ - u : u - _; + } + function Vs(e, t) { + return Vk(Tg(e), t); + } + function xg(e) { + return Xd(e) || _u(e); + } + function Xd(e) { + return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e === 133 || e === 5760 || e >= 8192 && e <= 8203 || e === 8239 || e === 8287 || e === 12288 || e === 65279; + } + function _u(e) { + return e === 10 || e === 13 || e === 8232 || e === 8233; + } + function Uk(e) { + return e >= 48 && e <= 57; + } + function sY(e) { + return Uk(e) || e >= 65 && e <= 70 || e >= 97 && e <= 102; + } + function aY(e) { + return e >= 65 && e <= 90 || e >= 97 && e <= 122; + } + function Bge(e) { + return aY(e) || Uk(e) || e === 95; + } + function AI(e) { + return e >= 48 && e <= 55; + } + function oY(e, t) { + const n = e.charCodeAt(t); + switch (n) { + case 13: + case 10: + case 9: + case 11: + case 12: + case 32: + case 47: + case 60: + case 124: + case 61: + case 62: + return !0; + case 35: + return t === 0; + default: + return n > 127; + } + } + function sa(e, t, n, i, s) { + if (xd(t)) + return t; + let o = !1; + for (; ; ) { + const c = e.charCodeAt(t); + switch (c) { + case 13: + e.charCodeAt(t + 1) === 10 && t++; + case 10: + if (t++, n) + return t; + o = !!s; + continue; + case 9: + case 11: + case 12: + case 32: + t++; + continue; + case 47: + if (i) + break; + if (e.charCodeAt(t + 1) === 47) { + for (t += 2; t < e.length && !_u(e.charCodeAt(t)); ) + t++; + o = !1; + continue; + } + if (e.charCodeAt(t + 1) === 42) { + for (t += 2; t < e.length; ) { + if (e.charCodeAt(t) === 42 && e.charCodeAt(t + 1) === 47) { + t += 2; + break; + } + t++; + } + o = !1; + continue; + } + break; + case 60: + case 124: + case 61: + case 62: + if (jE(e, t)) { + t = gw(e, t), o = !1; + continue; + } + break; + case 35: + if (t === 0 && tj(e, t)) { + t = rj(e, t), o = !1; + continue; + } + break; + case 42: + if (o) { + t++, o = !1; + continue; + } + break; + default: + if (c > 127 && xg(c)) { + t++; + continue; + } + break; + } + return t; + } + } + var ej = 7; + function jE(e, t) { + if (E.assert(t >= 0), t === 0 || _u(e.charCodeAt(t - 1))) { + const n = e.charCodeAt(t); + if (t + ej < e.length) { + for (let i = 0; i < ej; i++) + if (e.charCodeAt(t + i) !== n) + return !1; + return n === 61 || e.charCodeAt(t + ej) === 32; + } + } + return !1; + } + function gw(e, t, n) { + n && n(p.Merge_conflict_marker_encountered, t, ej); + const i = e.charCodeAt(t), s = e.length; + if (i === 60 || i === 62) + for (; t < s && !_u(e.charCodeAt(t)); ) + t++; + else + for (E.assert( + i === 124 || i === 61 + /* equals */ + ); t < s; ) { + const o = e.charCodeAt(t); + if ((o === 61 || o === 62) && o !== i && jE(e, t)) + break; + t++; + } + return t; + } + var cY = /^#!.*/; + function tj(e, t) { + return E.assert(t === 0), cY.test(e); + } + function rj(e, t) { + const n = cY.exec(e)[0]; + return t = t + n.length, t; + } + function nj(e, t, n, i, s, o, c) { + let _, u, d, g, h = !1, S = i, T = c; + if (n === 0) { + S = !0; + const C = NI(t); + C && (n = C.length); + } + e: + for (; n >= 0 && n < t.length; ) { + const C = t.charCodeAt(n); + switch (C) { + case 13: + t.charCodeAt(n + 1) === 10 && n++; + case 10: + if (n++, i) + break e; + S = !0, h && (g = !0); + continue; + case 9: + case 11: + case 12: + case 32: + n++; + continue; + case 47: + const D = t.charCodeAt(n + 1); + let P = !1; + if (D === 47 || D === 42) { + const O = D === 47 ? 2 : 3, j = n; + if (n += 2, D === 47) + for (; n < t.length; ) { + if (_u(t.charCodeAt(n))) { + P = !0; + break; + } + n++; + } + else + for (; n < t.length; ) { + if (t.charCodeAt(n) === 42 && t.charCodeAt(n + 1) === 47) { + n += 2; + break; + } + n++; + } + if (S) { + if (h && (T = s(_, u, d, g, o, T), !e && T)) + return T; + _ = j, u = n, d = O, g = P, h = !0; + } + continue; + } + break e; + default: + if (C > 127 && xg(C)) { + h && _u(C) && (g = !0), n++; + continue; + } + break e; + } + } + return h && (T = s(_, u, d, g, o, T)), T; + } + function hw(e, t, n, i) { + return nj( + /*reduce*/ + !1, + e, + t, + /*trailing*/ + !1, + n, + i + ); + } + function yw(e, t, n, i) { + return nj( + /*reduce*/ + !1, + e, + t, + /*trailing*/ + !0, + n, + i + ); + } + function lY(e, t, n, i, s) { + return nj( + /*reduce*/ + !0, + e, + t, + /*trailing*/ + !1, + n, + i, + s + ); + } + function uY(e, t, n, i, s) { + return nj( + /*reduce*/ + !0, + e, + t, + /*trailing*/ + !0, + n, + i, + s + ); + } + function Jge(e, t, n, i, s, o = []) { + return o.push({ kind: n, pos: e, end: t, hasTrailingNewLine: i }), o; + } + function kg(e, t) { + return lY( + e, + t, + Jge, + /*state*/ + void 0, + /*initial*/ + void 0 + ); + } + function oy(e, t) { + return uY( + e, + t, + Jge, + /*state*/ + void 0, + /*initial*/ + void 0 + ); + } + function NI(e) { + const t = cY.exec(e); + if (t) + return t[0]; + } + function Cg(e, t) { + return aY(e) || e === 36 || e === 95 || e > 127 && PI(e, t); + } + function t0(e, t, n) { + return Bge(e) || e === 36 || // "-" and ":" are valid in JSX Identifiers + (n === 1 ? e === 45 || e === 58 : !1) || e > 127 && kOe(e, t); + } + function X_(e, t, n) { + let i = BE(e, 0); + if (!Cg(i, t)) + return !1; + for (let s = Wm(i); s < e.length; s += Wm(i)) + if (!t0(i = BE(e, s), t, n)) + return !1; + return !0; + } + function Eg(e, t, n = 0, i, s, o, c) { + var _ = i, u, d, g, h, S, T, C, D, P = 0, O = 0, j = 0; + Ps(_, o, c); + var F = { + getTokenFullStart: () => g, + getStartPos: () => g, + getTokenEnd: () => u, + getTextPos: () => u, + getToken: () => S, + getTokenStart: () => h, + getTokenPos: () => h, + getTokenText: () => _.substring(h, u), + getTokenValue: () => T, + hasUnicodeEscape: () => (C & 1024) !== 0, + hasExtendedUnicodeEscape: () => (C & 8) !== 0, + hasPrecedingLineBreak: () => (C & 1) !== 0, + hasPrecedingJSDocComment: () => (C & 2) !== 0, + isIdentifier: () => S === 80 || S > 118, + isReservedWord: () => S >= 83 && S <= 118, + isUnterminated: () => (C & 4) !== 0, + getCommentDirectives: () => D, + getNumericLiteralFlags: () => C & 25584, + getTokenFlags: () => C, + reScanGreaterToken: Ke, + reScanAsteriskEqualsToken: Be, + reScanSlashToken: at, + reScanTemplateToken: Vt, + reScanTemplateHeadOrNoSubstitutionTemplate: zt, + scanJsxIdentifier: $n, + scanJsxAttributeValue: os, + reScanJsxAttributeValue: wr, + reScanJsxToken: jr, + reScanLessThanToken: ci, + reScanHashToken: Xt, + reScanQuestionToken: Ai, + reScanInvalidIdentifier: Fe, + scanJsxToken: _s, + scanJsDocToken: Le, + scanJSDocCommentTextToken: Ss, + scan: Ie, + getText: ri, + clearCommentDirectives: mi, + setText: Ps, + setScriptTarget: Yt, + setLanguageVariant: Ca, + setScriptKind: $e, + setJSDocParsingMode: nt, + setOnError: ws, + resetTokenState: te, + setTextPos: te, + setSkipJsDocLeadingAsterisks: rt, + tryScan: Zn, + lookAhead: ln, + scanRange: vr + }; + return E.isDebugging && Object.defineProperty(F, "__debugShowCurrentPositionInText", { + get: () => { + const re = F.getText(); + return re.slice(0, F.getTokenFullStart()) + "║" + re.slice(F.getTokenFullStart()); + } + }), F; + function V(re) { + return BE(_, re); + } + function L(re) { + return re >= 0 && re < d ? V(re) : -1; + } + function $(re) { + return _.charCodeAt(re); + } + function U(re) { + return re >= 0 && re < d ? $(re) : -1; + } + function G(re, Ee = u, Ne, et) { + if (s) { + const lt = u; + u = Ee, s(re, Ne || 0, et), u = lt; + } + } + function ce() { + let re = u, Ee = !1, Ne = !1, et = ""; + for (; ; ) { + const lt = $(u); + if (lt === 95) { + C |= 512, Ee ? (Ee = !1, Ne = !0, et += _.substring(re, u)) : (C |= 16384, G(Ne ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1)), u++, re = u; + continue; + } + if (Uk(lt)) { + Ee = !0, Ne = !1, u++; + continue; + } + break; + } + return $(u - 1) === 95 && (C |= 16384, G(p.Numeric_separators_are_not_allowed_here, u - 1, 1)), et + _.substring(re, u); + } + function K() { + let re = u, Ee; + if ($(u) === 48) + if (u++, $(u) === 95) + C |= 16896, G(p.Numeric_separators_are_not_allowed_here, u, 1), u--, Ee = ce(); + else if (!Z()) + C |= 8192, Ee = "" + +T; + else if (!T) + Ee = "0"; + else { + T = "" + parseInt(T, 8), C |= 32; + const be = S === 41, ft = (be ? "-" : "") + "0o" + (+T).toString(8); + return be && re--, G(p.Octal_literals_are_not_allowed_Use_the_syntax_0, re, u - re, ft), 9; + } + else + Ee = ce(); + let Ne, et; + $(u) === 46 && (u++, Ne = ce()); + let lt = u; + if ($(u) === 69 || $(u) === 101) { + u++, C |= 16, ($(u) === 43 || $(u) === 45) && u++; + const be = u, ft = ce(); + ft ? (et = _.substring(lt, be) + ft, lt = u) : G(p.Digit_expected); + } + let jt; + if (C & 512 ? (jt = Ee, Ne && (jt += "." + Ne), et && (jt += et)) : jt = _.substring(re, lt), C & 8192) + return G(p.Decimals_with_leading_zeros_are_not_allowed, re, lt - re), T = "" + +jt, 9; + if (Ne !== void 0 || C & 16) + return X(re, Ne === void 0 && !!(C & 16)), T = "" + +jt, 9; + { + T = jt; + const be = Xe(); + return X(re), be; + } + } + function X(re, Ee) { + if (!Cg(V(u), e)) + return; + const Ne = u, { length: et } = de(); + et === 1 && _[Ne] === "n" ? G(Ee ? p.A_bigint_literal_cannot_use_exponential_notation : p.A_bigint_literal_must_be_an_integer, re, Ne - re + 1) : (G(p.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, Ne, et), u = Ne); + } + function Z() { + const re = u; + let Ee = !0; + for (; Uk(U(u)); ) + AI($(u)) || (Ee = !1), u++; + return T = _.substring(re, u), Ee; + } + function oe(re, Ee) { + const Ne = pe( + /*minCount*/ + re, + /*scanAsManyAsPossible*/ + !1, + Ee + ); + return Ne ? parseInt(Ne, 16) : -1; + } + function ne(re, Ee) { + return pe( + /*minCount*/ + re, + /*scanAsManyAsPossible*/ + !0, + Ee + ); + } + function pe(re, Ee, Ne) { + let et = [], lt = !1, jt = !1; + for (; et.length < re || Ee; ) { + let be = $(u); + if (Ne && be === 95) { + C |= 512, lt ? (lt = !1, jt = !0) : G(jt ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1), u++; + continue; + } + if (lt = Ne, be >= 65 && be <= 70) + be += 32; + else if (!(be >= 48 && be <= 57 || be >= 97 && be <= 102)) + break; + et.push(be), u++, jt = !1; + } + return et.length < re && (et = []), $(u - 1) === 95 && G(p.Numeric_separators_are_not_allowed_here, u - 1, 1), String.fromCharCode(...et); + } + function fe(re = !1) { + const Ee = $(u); + u++; + let Ne = "", et = u; + for (; ; ) { + if (u >= d) { + Ne += _.substring(et, u), C |= 4, G(p.Unterminated_string_literal); + break; + } + const lt = $(u); + if (lt === Ee) { + Ne += _.substring(et, u), u++; + break; + } + if (lt === 92 && !re) { + Ne += _.substring(et, u), Ne += ae( + 3 + /* ReportErrors */ + ), et = u; + continue; + } + if ((lt === 10 || lt === 13) && !re) { + Ne += _.substring(et, u), C |= 4, G(p.Unterminated_string_literal); + break; + } + u++; + } + return Ne; + } + function H(re) { + const Ee = $(u) === 96; + u++; + let Ne = u, et = "", lt; + for (; ; ) { + if (u >= d) { + et += _.substring(Ne, u), C |= 4, G(p.Unterminated_template_literal), lt = Ee ? 15 : 18; + break; + } + const jt = $(u); + if (jt === 96) { + et += _.substring(Ne, u), u++, lt = Ee ? 15 : 18; + break; + } + if (jt === 36 && u + 1 < d && $(u + 1) === 123) { + et += _.substring(Ne, u), u += 2, lt = Ee ? 16 : 17; + break; + } + if (jt === 92) { + et += _.substring(Ne, u), et += ae(1 | (re ? 2 : 0)), Ne = u; + continue; + } + if (jt === 13) { + et += _.substring(Ne, u), u++, u < d && $(u) === 10 && u++, et += ` +`, Ne = u; + continue; + } + u++; + } + return E.assert(lt !== void 0), T = et, lt; + } + function ae(re) { + const Ee = u; + if (u++, u >= d) + return G(p.Unexpected_end_of_text), ""; + const Ne = $(u); + switch (u++, Ne) { + case 48: + if (u >= d || !Uk($(u))) + return "\0"; + case 49: + case 50: + case 51: + u < d && AI($(u)) && u++; + case 52: + case 53: + case 54: + case 55: + if (u < d && AI($(u)) && u++, C |= 2048, re & 6) { + const jt = parseInt(_.substring(Ee + 1, u), 8); + return re & 4 && !(re & 32) && Ne !== 48 ? G(p.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead, Ee, u - Ee, "\\x" + jt.toString(16).padStart(2, "0")) : G(p.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, Ee, u - Ee, "\\x" + jt.toString(16).padStart(2, "0")), String.fromCharCode(jt); + } + return _.substring(Ee, u); + case 56: + case 57: + return C |= 2048, re & 6 ? (re & 4 && !(re & 32) ? G(p.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class, Ee, u - Ee) : G(p.Escape_sequence_0_is_not_allowed, Ee, u - Ee, _.substring(Ee, u)), String.fromCharCode(Ne)) : _.substring(Ee, u); + case 98: + return "\b"; + case 116: + return " "; + case 110: + return ` +`; + case 118: + return "\v"; + case 102: + return "\f"; + case 114: + return "\r"; + case 39: + return "'"; + case 34: + return '"'; + case 117: + if (re & 17 && u < d && $(u) === 123) + return u -= 2, le(!!(re & 6)); + for (; u < Ee + 6; u++) + if (!(u < d && sY($(u)))) + return C |= 2048, re & 6 && G(p.Hexadecimal_digit_expected), _.substring(Ee, u); + C |= 1024; + const et = parseInt(_.substring(Ee + 2, u), 16), lt = String.fromCharCode(et); + if (re & 16 && et >= 55296 && et <= 56319 && u + 6 < d && _.substring(u, u + 2) === "\\u" && $(u + 2) !== 123) { + const jt = u; + let be = u + 2; + for (; be < jt + 6; be++) + if (!sY($(u))) + return lt; + const ft = parseInt(_.substring(jt + 2, be), 16); + if (ft >= 56320 && ft <= 57343) + return u = be, lt + String.fromCharCode(ft); + } + return lt; + case 120: + for (; u < Ee + 4; u++) + if (!(u < d && sY($(u)))) + return C |= 2048, re & 6 && G(p.Hexadecimal_digit_expected), _.substring(Ee, u); + return C |= 4096, String.fromCharCode(parseInt(_.substring(Ee + 2, u), 16)); + case 13: + u < d && $(u) === 10 && u++; + case 10: + case 8232: + case 8233: + return ""; + default: + return (re & 16 || re & 4 && !(re & 8) && t0(Ne, e)) && G(p.This_character_cannot_be_escaped_in_a_regular_expression, u - 2, 2), String.fromCharCode(Ne); + } + } + function le(re) { + const Ee = u; + u += 3; + const Ne = u, et = ne( + 1, + /*canHaveSeparators*/ + !1 + ), lt = et ? parseInt(et, 16) : -1; + let jt = !1; + return lt < 0 ? (re && G(p.Hexadecimal_digit_expected), jt = !0) : lt > 1114111 && (re && G(p.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive, Ne, u - Ne), jt = !0), u >= d ? (re && G(p.Unexpected_end_of_text), jt = !0) : $(u) === 125 ? u++ : (re && G(p.Unterminated_Unicode_escape_sequence), jt = !0), jt ? (C |= 2048, _.substring(Ee, u)) : (C |= 8, JE(lt)); + } + function Ae() { + if (u + 5 < d && $(u + 1) === 117) { + const re = u; + u += 2; + const Ee = oe( + 4, + /*canHaveSeparators*/ + !1 + ); + return u = re, Ee; + } + return -1; + } + function ge() { + if (V(u + 1) === 117 && V(u + 2) === 123) { + const re = u; + u += 3; + const Ee = ne( + 1, + /*canHaveSeparators*/ + !1 + ), Ne = Ee ? parseInt(Ee, 16) : -1; + return u = re, Ne; + } + return -1; + } + function de() { + let re = "", Ee = u; + for (; u < d; ) { + let Ne = V(u); + if (t0(Ne, e)) + u += Wm(Ne); + else if (Ne === 92) { + if (Ne = ge(), Ne >= 0 && t0(Ne, e)) { + re += le( + /*shouldEmitInvalidEscapeError*/ + !0 + ), Ee = u; + continue; + } + if (Ne = Ae(), !(Ne >= 0 && t0(Ne, e))) + break; + C |= 1024, re += _.substring(Ee, u), re += JE(Ne), u += 6, Ee = u; + } else + break; + } + return re += _.substring(Ee, u), re; + } + function ve() { + const re = T.length; + if (re >= 2 && re <= 12) { + const Ee = T.charCodeAt(0); + if (Ee >= 97 && Ee <= 122) { + const Ne = mOe.get(T); + if (Ne !== void 0) + return S = Ne; + } + } + return S = 80; + } + function De(re) { + let Ee = "", Ne = !1, et = !1; + for (; ; ) { + const lt = $(u); + if (lt === 95) { + C |= 512, Ne ? (Ne = !1, et = !0) : G(et ? p.Multiple_consecutive_numeric_separators_are_not_permitted : p.Numeric_separators_are_not_allowed_here, u, 1), u++; + continue; + } + if (Ne = !0, !Uk(lt) || lt - 48 >= re) + break; + Ee += _[u], u++, et = !1; + } + return $(u - 1) === 95 && G(p.Numeric_separators_are_not_allowed_here, u - 1, 1), Ee; + } + function Xe() { + return $(u) === 110 ? (T += "n", C & 384 && (T = J4(T) + "n"), u++, 10) : (T = "" + (C & 128 ? parseInt(T.slice(2), 2) : C & 256 ? parseInt(T.slice(2), 8) : +T), 9); + } + function Ie() { + g = u, C = 0; + let re = !1; + for (; ; ) { + if (h = u, u >= d) + return S = 1; + const Ee = V(u); + if (u === 0 && Ee === 35 && tj(_, u)) { + if (u = rj(_, u), t) + continue; + return S = 6; + } + switch (Ee) { + case 10: + case 13: + if (C |= 1, t) { + u++; + continue; + } else + return Ee === 13 && u + 1 < d && $(u + 1) === 10 ? u += 2 : u++, S = 4; + case 9: + case 11: + case 12: + case 32: + case 160: + case 5760: + case 8192: + case 8193: + case 8194: + case 8195: + case 8196: + case 8197: + case 8198: + case 8199: + case 8200: + case 8201: + case 8202: + case 8203: + case 8239: + case 8287: + case 12288: + case 65279: + if (t) { + u++; + continue; + } else { + for (; u < d && Xd($(u)); ) + u++; + return S = 5; + } + case 33: + return $(u + 1) === 61 ? $(u + 2) === 61 ? (u += 3, S = 38) : (u += 2, S = 36) : (u++, S = 54); + case 34: + case 39: + return T = fe(), S = 11; + case 96: + return S = H( + /*shouldEmitInvalidEscapeError*/ + !1 + ); + case 37: + return $(u + 1) === 61 ? (u += 2, S = 70) : (u++, S = 45); + case 38: + return $(u + 1) === 38 ? $(u + 2) === 61 ? (u += 3, S = 77) : (u += 2, S = 56) : $(u + 1) === 61 ? (u += 2, S = 74) : (u++, S = 51); + case 40: + return u++, S = 21; + case 41: + return u++, S = 22; + case 42: + if ($(u + 1) === 61) + return u += 2, S = 67; + if ($(u + 1) === 42) + return $(u + 2) === 61 ? (u += 3, S = 68) : (u += 2, S = 43); + if (u++, P && !re && C & 1) { + re = !0; + continue; + } + return S = 42; + case 43: + return $(u + 1) === 43 ? (u += 2, S = 46) : $(u + 1) === 61 ? (u += 2, S = 65) : (u++, S = 40); + case 44: + return u++, S = 28; + case 45: + return $(u + 1) === 45 ? (u += 2, S = 47) : $(u + 1) === 61 ? (u += 2, S = 66) : (u++, S = 41); + case 46: + return Uk($(u + 1)) ? (K(), S = 9) : $(u + 1) === 46 && $(u + 2) === 46 ? (u += 3, S = 26) : (u++, S = 25); + case 47: + if ($(u + 1) === 47) { + for (u += 2; u < d && !_u($(u)); ) + u++; + if (D = Kt( + D, + _.slice(h, u), + SOe, + h + ), t) + continue; + return S = 2; + } + if ($(u + 1) === 42) { + u += 2; + const ft = $(u) === 42 && $(u + 1) !== 47; + let bt = !1, kt = h; + for (; u < d; ) { + const yt = $(u); + if (yt === 42 && $(u + 1) === 47) { + u += 2, bt = !0; + break; + } + u++, _u(yt) && (kt = u, C |= 1); + } + if (ft && ye() && (C |= 2), D = Kt(D, _.slice(kt, u), TOe, kt), bt || G(p.Asterisk_Slash_expected), t) + continue; + return bt || (C |= 4), S = 3; + } + return $(u + 1) === 61 ? (u += 2, S = 69) : (u++, S = 44); + case 48: + if (u + 2 < d && ($(u + 1) === 88 || $(u + 1) === 120)) + return u += 2, T = ne( + 1, + /*canHaveSeparators*/ + !0 + ), T || (G(p.Hexadecimal_digit_expected), T = "0"), T = "0x" + T, C |= 64, S = Xe(); + if (u + 2 < d && ($(u + 1) === 66 || $(u + 1) === 98)) + return u += 2, T = De( + /* base */ + 2 + ), T || (G(p.Binary_digit_expected), T = "0"), T = "0b" + T, C |= 128, S = Xe(); + if (u + 2 < d && ($(u + 1) === 79 || $(u + 1) === 111)) + return u += 2, T = De( + /* base */ + 8 + ), T || (G(p.Octal_digit_expected), T = "0"), T = "0o" + T, C |= 256, S = Xe(); + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return S = K(); + case 58: + return u++, S = 59; + case 59: + return u++, S = 27; + case 60: + if (jE(_, u)) { + if (u = gw(_, u, G), t) + continue; + return S = 7; + } + return $(u + 1) === 60 ? $(u + 2) === 61 ? (u += 3, S = 71) : (u += 2, S = 48) : $(u + 1) === 61 ? (u += 2, S = 33) : n === 1 && $(u + 1) === 47 && $(u + 2) !== 42 ? (u += 2, S = 31) : (u++, S = 30); + case 61: + if (jE(_, u)) { + if (u = gw(_, u, G), t) + continue; + return S = 7; + } + return $(u + 1) === 61 ? $(u + 2) === 61 ? (u += 3, S = 37) : (u += 2, S = 35) : $(u + 1) === 62 ? (u += 2, S = 39) : (u++, S = 64); + case 62: + if (jE(_, u)) { + if (u = gw(_, u, G), t) + continue; + return S = 7; + } + return u++, S = 32; + case 63: + return $(u + 1) === 46 && !Uk($(u + 2)) ? (u += 2, S = 29) : $(u + 1) === 63 ? $(u + 2) === 61 ? (u += 3, S = 78) : (u += 2, S = 61) : (u++, S = 58); + case 91: + return u++, S = 23; + case 93: + return u++, S = 24; + case 94: + return $(u + 1) === 61 ? (u += 2, S = 79) : (u++, S = 53); + case 123: + return u++, S = 19; + case 124: + if (jE(_, u)) { + if (u = gw(_, u, G), t) + continue; + return S = 7; + } + return $(u + 1) === 124 ? $(u + 2) === 61 ? (u += 3, S = 76) : (u += 2, S = 57) : $(u + 1) === 61 ? (u += 2, S = 75) : (u++, S = 52); + case 125: + return u++, S = 20; + case 126: + return u++, S = 55; + case 64: + return u++, S = 60; + case 92: + const Ne = ge(); + if (Ne >= 0 && Cg(Ne, e)) + return T = le( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + de(), S = ve(); + const et = Ae(); + return et >= 0 && Cg(et, e) ? (u += 6, C |= 1024, T = String.fromCharCode(et) + de(), S = ve()) : (G(p.Invalid_character), u++, S = 0); + case 35: + if (u !== 0 && _[u + 1] === "!") + return G(p.can_only_be_used_at_the_start_of_a_file, u, 2), u++, S = 0; + const lt = V(u + 1); + if (lt === 92) { + u++; + const ft = ge(); + if (ft >= 0 && Cg(ft, e)) + return T = "#" + le( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + de(), S = 81; + const bt = Ae(); + if (bt >= 0 && Cg(bt, e)) + return u += 6, C |= 1024, T = "#" + String.fromCharCode(bt) + de(), S = 81; + u--; + } + return Cg(lt, e) ? (u++, Qe(lt, e)) : (T = "#", G(p.Invalid_character, u++, Wm(Ee))), S = 81; + case 65533: + return G(p.File_appears_to_be_binary, 0, 0), u = d, S = 8; + default: + const jt = Qe(Ee, e); + if (jt) + return S = jt; + if (Xd(Ee)) { + u += Wm(Ee); + continue; + } else if (_u(Ee)) { + C |= 1, u += Wm(Ee); + continue; + } + const be = Wm(Ee); + return G(p.Invalid_character, u, be), u += be, S = 0; + } + } + } + function ye() { + switch (j) { + case 0: + return !0; + case 1: + return !1; + } + return O !== 3 && O !== 4 ? !0 : j === 3 ? !1 : xOe.test(_.slice(g, u)); + } + function Fe() { + E.assert(S === 0, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."), u = h = g, C = 0; + const re = V(u), Ee = Qe( + re, + 99 + /* ESNext */ + ); + return Ee ? S = Ee : (u += Wm(re), S); + } + function Qe(re, Ee) { + let Ne = re; + if (Cg(Ne, Ee)) { + for (u += Wm(Ne); u < d && t0(Ne = V(u), Ee); ) u += Wm(Ne); + return T = _.substring(h, u), Ne === 92 && (T += de()), ve(); + } + } + function Ke() { + if (S === 32) { + if ($(u) === 62) + return $(u + 1) === 62 ? $(u + 2) === 61 ? (u += 3, S = 73) : (u += 2, S = 50) : $(u + 1) === 61 ? (u += 2, S = 72) : (u++, S = 49); + if ($(u) === 61) + return u++, S = 34; + } + return S; + } + function Be() { + return E.assert(S === 67, "'reScanAsteriskEqualsToken' should only be called on a '*='"), u = h + 1, S = 64; + } + function at(re) { + if (S === 44 || S === 69) { + const Ee = h + 1; + u = Ee; + let Ne = !1, et = !1, lt = !1; + for (; ; ) { + const be = U(u); + if (be === -1 || _u(be)) { + C |= 4; + break; + } + if (Ne) + Ne = !1; + else { + if (be === 47 && !lt) + break; + be === 91 ? lt = !0 : be === 92 ? Ne = !0 : be === 93 ? lt = !1 : !lt && be === 40 && U(u + 1) === 63 && U(u + 2) === 60 && U(u + 3) !== 61 && U(u + 3) !== 33 && (et = !0); + } + u++; + } + const jt = u; + if (C & 4) { + u = Ee, Ne = !1; + let be = 0, ft = !1, bt = 0; + for (; u < jt; ) { + const kt = $(u); + if (Ne) + Ne = !1; + else if (kt === 92) + Ne = !0; + else if (kt === 91) + be++; + else if (kt === 93 && be) + be--; + else if (!be) { + if (kt === 123) + ft = !0; + else if (kt === 125 && ft) + ft = !1; + else if (!ft) { + if (kt === 40) + bt++; + else if (kt === 41 && bt) + bt--; + else if (kt === 41 || kt === 93 || kt === 125) + break; + } + } + u++; + } + for (; xg(U(u - 1)) || U(u - 1) === 59; ) u--; + G(p.Unterminated_regular_expression_literal, h, u - h); + } else { + u++; + let be = 0; + for (; ; ) { + const ft = U(u); + if (ft === -1 || !t0(ft, e)) + break; + if (re) { + const bt = KR(String.fromCharCode(ft)); + bt === void 0 ? G(p.Unknown_regular_expression_flag, u, 1) : be & bt ? G(p.Duplicate_regular_expression_flag, u, 1) : ((be | bt) & 96) === 96 ? G(p.The_Unicode_u_flag_and_the_Unicode_Sets_v_flag_cannot_be_set_simultaneously, u, 1) : (be |= bt, nr(bt, u)); + } + u++; + } + re && vr(Ee, jt - Ee, () => { + Wt( + be, + /*annexB*/ + !0, + et + ); + }); + } + T = _.substring(h, u), S = 14; + } + return S; + } + function Wt(re, Ee, Ne) { + var et = !!(re & 64), lt = !!(re & 96), jt = lt || !Ee, be = !1, ft = 0, bt, kt, yt, Ut = [], W; + function je(ur) { + for (; ; ) { + if (Ut.push(W), W = void 0, st(ur), W = Ut.pop(), U(u) !== 124) + return; + u++; + } + } + function st(ur) { + let Mr = !1; + for (; ; ) { + const Or = u, tn = U(u); + switch (tn) { + case -1: + return; + case 94: + case 36: + u++, Mr = !1; + break; + case 92: + switch (u++, U(u)) { + case 98: + case 66: + u++, Mr = !1; + break; + default: + he(), Mr = !0; + break; + } + break; + case 40: + if (u++, U(u) === 63) + switch (u++, U(u)) { + case 61: + case 33: + u++, Mr = !jt; + break; + case 60: + const $a = u; + switch (u++, U(u)) { + case 61: + case 33: + u++, Mr = !1; + break; + default: + _e( + /*isReference*/ + !1 + ), Fi( + 62 + /* greaterThan */ + ), e < 5 && G(p.Named_capturing_groups_are_only_available_when_targeting_ES2018_or_later, $a, u - $a), ft++, Mr = !0; + break; + } + break; + default: + const Ro = u, Vo = z( + 0 + /* None */ + ); + U(u) === 45 && (u++, z(Vo), u === Ro + 1 && G(p.Subpattern_flags_must_be_present_when_there_is_a_minus_sign, Ro, u - Ro)), Fi( + 58 + /* colon */ + ), Mr = !0; + break; + } + else + ft++, Mr = !0; + je( + /*isInGroup*/ + !0 + ), Fi( + 41 + /* closeParen */ + ); + break; + case 123: + u++; + const qt = u; + Z(); + const ma = T; + if (!jt && !ma) { + Mr = !0; + break; + } + if (U(u) === 44) { + u++, Z(); + const $a = T; + if (ma) + $a && Number.parseInt(ma) > Number.parseInt($a) && (jt || U(u) === 125) && G(p.Numbers_out_of_order_in_quantifier, qt, u - qt); + else if ($a || U(u) === 125) + G(p.Incomplete_quantifier_Digit_expected, qt, 0); + else { + G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, Or, 1, String.fromCharCode(tn)), Mr = !0; + break; + } + } else if (!ma) { + jt && G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, Or, 1, String.fromCharCode(tn)), Mr = !0; + break; + } + if (U(u) !== 125) + if (jt) + G(p._0_expected, u, 0, "}"), u--; + else { + Mr = !0; + break; + } + case 42: + case 43: + case 63: + u++, U(u) === 63 && u++, Mr || G(p.There_is_nothing_available_for_repetition, Or, u - Or), Mr = !1; + break; + case 46: + u++, Mr = !0; + break; + case 91: + u++, et ? xt() : dt(), Fi( + 93 + /* closeBracket */ + ), Mr = !0; + break; + case 41: + if (ur) + return; + case 93: + case 125: + (jt || tn === 41) && G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(tn)), u++, Mr = !0; + break; + case 47: + case 124: + return; + default: + Di(), Mr = !0; + break; + } + } + } + function z(ur) { + for (; ; ) { + const Mr = U(u); + if (Mr === -1 || !t0(Mr, e)) + break; + const Or = KR(String.fromCharCode(Mr)); + Or === void 0 ? G(p.Unknown_regular_expression_flag, u, 1) : ur & Or ? G(p.Duplicate_regular_expression_flag, u, 1) : Or & 28 ? (ur |= Or, nr(Or, u)) : G(p.This_regular_expression_flag_cannot_be_toggled_within_a_subpattern, u, 1), u++; + } + return ur; + } + function he() { + switch (E.assertEqual( + $(u - 1), + 92 + /* backslash */ + ), U(u)) { + case 107: + u++, U(u) === 60 ? (u++, _e( + /*isReference*/ + !0 + ), Fi( + 62 + /* greaterThan */ + )) : (jt || Ne) && G(p.k_must_be_followed_by_a_capturing_group_name_enclosed_in_angle_brackets, u - 2, 2); + break; + case 113: + if (et) { + u++, G(p.q_is_only_available_inside_character_class, u - 2, 2); + break; + } + default: + E.assert(fr() || q() || we( + /*atomEscape*/ + !0 + )); + break; + } + } + function q() { + E.assertEqual( + $(u - 1), + 92 + /* backslash */ + ); + const ur = U(u); + if (ur >= 49 && ur <= 57) { + const Mr = u; + return Z(), yt = Tr(yt, { pos: Mr, end: u, value: +T }), !0; + } + return !1; + } + function we(ur) { + E.assertEqual( + $(u - 1), + 92 + /* backslash */ + ); + let Mr = U(u); + switch (Mr) { + case -1: + return G(p.Undetermined_character_escape, u - 1, 1), "\\"; + case 99: + if (u++, Mr = U(u), aY(Mr)) + return u++, String.fromCharCode(Mr & 31); + if (jt) + G(p.c_must_be_followed_by_an_ASCII_letter, u - 2, 2); + else if (ur) + return u--, "\\"; + return String.fromCharCode(Mr); + case 94: + case 36: + case 47: + case 92: + case 46: + case 42: + case 43: + case 63: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 124: + return u++, String.fromCharCode(Mr); + default: + return u--, ae( + 4 | (Ee ? 8 : 0) | (lt ? 16 : 0) | (ur ? 32 : 0) + ); + } + } + function _e(ur) { + E.assertEqual( + $(u - 1), + 60 + /* lessThan */ + ), h = u, Qe(L(u), e), u === h ? G(p.Expected_a_capturing_group_name) : ur ? kt = Tr(kt, { pos: h, end: u, name: T }) : W?.has(T) || Ut.some((Mr) => Mr?.has(T)) ? G(p.Named_capturing_groups_with_the_same_name_must_be_mutually_exclusive_to_each_other, h, u - h) : (W ?? (W = /* @__PURE__ */ new Set()), W.add(T), bt ?? (bt = /* @__PURE__ */ new Set()), bt.add(T)); + } + function Te(ur) { + return ur === 93 || ur === -1 || u >= d; + } + function dt() { + for (E.assertEqual( + $(u - 1), + 91 + /* openBracket */ + ), U(u) === 94 && u++; ; ) { + const ur = U(u); + if (Te(ur)) + return; + const Mr = u, Or = en(); + if (U(u) === 45) { + u++; + const tn = U(u); + if (Te(tn)) + return; + !Or && jt && G(p.A_character_class_range_must_not_be_bounded_by_another_character_class, Mr, u - 1 - Mr); + const qt = u, ma = en(); + if (!ma && jt) { + G(p.A_character_class_range_must_not_be_bounded_by_another_character_class, qt, u - qt); + continue; + } + if (!Or) + continue; + const $a = BE(Or, 0), Ro = BE(ma, 0); + Or.length === Wm($a) && ma.length === Wm(Ro) && $a > Ro && G(p.Range_out_of_order_in_character_class, Mr, u - Mr); + } + } + } + function xt() { + E.assertEqual( + $(u - 1), + 91 + /* openBracket */ + ); + let ur = !1; + U(u) === 94 && (u++, ur = !0); + let Mr = !1, Or = U(u); + if (Te(Or)) + return; + let tn = u, qt; + switch (_.slice(u, u + 2)) { + case "--": + case "&&": + G(p.Expected_a_class_set_operand), be = !1; + break; + default: + qt = ir(); + break; + } + switch (U(u)) { + case 45: + if (U(u + 1) === 45) { + ur && be && G(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, tn, u - tn), Mr = be, wt( + 3 + /* ClassSubtraction */ + ), be = !ur && Mr; + return; + } + break; + case 38: + if (U(u + 1) === 38) { + wt( + 2 + /* ClassIntersection */ + ), ur && be && G(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, tn, u - tn), Mr = be, be = !ur && Mr; + return; + } else + G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Or)); + break; + default: + ur && be && G(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, tn, u - tn), Mr = be; + break; + } + for (; Or = U(u), Or !== -1; ) { + switch (Or) { + case 45: + if (u++, Or = U(u), Te(Or)) { + be = !ur && Mr; + return; + } + if (Or === 45) { + u++, G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), tn = u - 2, qt = _.slice(tn, u); + continue; + } else { + qt || G(p.A_character_class_range_must_not_be_bounded_by_another_character_class, tn, u - 1 - tn); + const ma = u, $a = ir(); + if (ur && be && G(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, ma, u - ma), Mr || (Mr = be), !$a) { + G(p.A_character_class_range_must_not_be_bounded_by_another_character_class, ma, u - ma); + break; + } + if (!qt) + break; + const Ro = BE(qt, 0), Vo = BE($a, 0); + qt.length === Wm(Ro) && $a.length === Wm(Vo) && Ro > Vo && G(p.Range_out_of_order_in_character_class, tn, u - tn); + } + break; + case 38: + tn = u, u++, U(u) === 38 ? (u++, G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), U(u) === 38 && (G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Or)), u++)) : G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u - 1, 1, String.fromCharCode(Or)), qt = _.slice(tn, u); + continue; + } + if (Te(U(u))) + break; + switch (tn = u, _.slice(u, u + 2)) { + case "--": + case "&&": + G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u, 2), u += 2, qt = _.slice(tn, u); + break; + default: + qt = ir(); + break; + } + } + be = !ur && Mr; + } + function wt(ur) { + let Mr = be; + for (; ; ) { + let Or = U(u); + if (Te(Or)) + break; + switch (Or) { + case 45: + u++, U(u) === 45 ? (u++, ur !== 3 && G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2)) : G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 1, 1); + break; + case 38: + u++, U(u) === 38 ? (u++, ur !== 2 && G(p.Operators_must_not_be_mixed_within_a_character_class_Wrap_it_in_a_nested_class_instead, u - 2, 2), U(u) === 38 && (G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(Or)), u++)) : G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u - 1, 1, String.fromCharCode(Or)); + break; + default: + switch (ur) { + case 3: + G(p._0_expected, u, 0, "--"); + break; + case 2: + G(p._0_expected, u, 0, "&&"); + break; + } + break; + } + if (Or = U(u), Te(Or)) { + G(p.Expected_a_class_set_operand); + break; + } + ir(), Mr && (Mr = be); + } + be = Mr; + } + function ir() { + switch (be = !1, U(u)) { + case -1: + return ""; + case 91: + return u++, xt(), Fi( + 93 + /* closeBracket */ + ), ""; + case 92: + if (u++, fr()) + return ""; + if (U(u) === 113) + return u++, U(u) === 123 ? (u++, br(), Fi( + 125 + /* closeBrace */ + ), "") : (G(p.q_must_be_followed_by_string_alternatives_enclosed_in_braces, u - 2, 2), "q"); + u--; + default: + return Lr(); + } + } + function br() { + E.assertEqual( + $(u - 1), + 123 + /* openBrace */ + ); + let ur = 0; + for (; ; ) + switch (U(u)) { + case -1: + return; + case 125: + ur !== 1 && (be = !0); + return; + case 124: + ur !== 1 && (be = !0), u++, o = u, ur = 0; + break; + default: + Lr(), ur++; + break; + } + } + function Lr() { + const ur = U(u); + if (ur === -1) + return ""; + if (ur === 92) { + u++; + const Mr = U(u); + switch (Mr) { + case 98: + return u++, "\b"; + case 38: + case 45: + case 33: + case 35: + case 37: + case 44: + case 58: + case 59: + case 60: + case 61: + case 62: + case 64: + case 96: + case 126: + return u++, String.fromCharCode(Mr); + default: + return we( + /*atomEscape*/ + !1 + ); + } + } else if (ur === U(u + 1)) + switch (ur) { + case 38: + case 33: + case 35: + case 37: + case 42: + case 43: + case 44: + case 46: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 96: + case 126: + return G(p.A_character_class_must_not_contain_a_reserved_double_punctuator_Did_you_mean_to_escape_it_with_backslash, u, 2), u += 2, _.substring(u - 2, u); + } + switch (ur) { + case 47: + case 40: + case 41: + case 91: + case 93: + case 123: + case 125: + case 45: + case 124: + return G(p.Unexpected_0_Did_you_mean_to_escape_it_with_backslash, u, 1, String.fromCharCode(ur)), u++, String.fromCharCode(ur); + } + return Di(); + } + function en() { + if (U(u) === 92) { + u++; + const ur = U(u); + switch (ur) { + case 98: + return u++, "\b"; + case 45: + return u++, String.fromCharCode(ur); + default: + return fr() ? "" : we( + /*atomEscape*/ + !1 + ); + } + } else + return Di(); + } + function fr() { + E.assertEqual( + $(u - 1), + 92 + /* backslash */ + ); + let ur = !1; + const Mr = u - 1, Or = U(u); + switch (Or) { + case 100: + case 68: + case 115: + case 83: + case 119: + case 87: + return u++, !0; + case 80: + ur = !0; + case 112: + if (u++, U(u) === 123) { + u++; + const tn = u, qt = mn(); + if (U(u) === 61) { + const ma = zge.get(qt); + if (u === tn) + G(p.Expected_a_Unicode_property_name); + else if (ma === void 0) { + G(p.Unknown_Unicode_property_name, tn, u - tn); + const Vo = F2(qt, zge.keys(), lo); + Vo && G(p.Did_you_mean_0, tn, u - tn, Vo); + } + u++; + const $a = u, Ro = mn(); + if (u === $a) + G(p.Expected_a_Unicode_property_value); + else if (ma !== void 0 && !vw[ma].has(Ro)) { + G(p.Unknown_Unicode_property_value, $a, u - $a); + const Vo = F2(Ro, vw[ma], lo); + Vo && G(p.Did_you_mean_0, $a, u - $a, Vo); + } + } else if (u === tn) + G(p.Expected_a_Unicode_property_name_or_value); + else if (Vge.has(qt)) + et ? ur ? G(p.Anything_that_would_possibly_match_more_than_a_single_character_is_invalid_inside_a_negated_character_class, tn, u - tn) : be = !0 : G(p.Any_Unicode_property_that_would_possibly_match_more_than_a_single_character_is_only_available_when_the_Unicode_Sets_v_flag_is_set, tn, u - tn); + else if (!vw.General_Category.has(qt) && !Wge.has(qt)) { + G(p.Unknown_Unicode_property_name_or_value, tn, u - tn); + const ma = F2(qt, [...vw.General_Category, ...Wge, ...Vge], lo); + ma && G(p.Did_you_mean_0, tn, u - tn, ma); + } + Fi( + 125 + /* closeBrace */ + ), lt || G(p.Unicode_property_value_expressions_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set, Mr, u - Mr); + } else if (jt) + G(p._0_must_be_followed_by_a_Unicode_property_value_expression_enclosed_in_braces, u - 2, 2, String.fromCharCode(Or)); + else + return u--, !1; + return !0; + } + return !1; + } + function mn() { + let ur = ""; + for (; ; ) { + const Mr = U(u); + if (Mr === -1 || !Bge(Mr)) + break; + ur += String.fromCharCode(Mr), u++; + } + return ur; + } + function Di() { + const ur = lt ? Wm(U(u)) : 1; + return u += ur, ur > 0 ? _.substring(u - ur, u) : ""; + } + function Fi(ur) { + U(u) === ur ? u++ : G(p._0_expected, u, 0, String.fromCharCode(ur)); + } + je( + /*isInGroup*/ + !1 + ), rr(kt, (ur) => { + bt?.has(ur.name) || G(p.There_is_no_capturing_group_named_0_in_this_regular_expression, ur.pos, ur.end - ur.pos, ur.name); + }), rr(yt, (ur) => { + ur.value > ft && (ft ? G(p.This_backreference_refers_to_a_group_that_does_not_exist_There_are_only_0_capturing_groups_in_this_regular_expression, ur.pos, ur.end - ur.pos, ft) : G(p.This_backreference_refers_to_a_group_that_does_not_exist_There_are_no_capturing_groups_in_this_regular_expression, ur.pos, ur.end - ur.pos)); + }); + } + function nr(re, Ee) { + const Ne = gOe.get(re); + Ne && e < Ne && G(p.This_regular_expression_flag_is_only_available_when_targeting_0_or_later, Ee, 1, o5(Ne)); + } + function Kt(re, Ee, Ne, et) { + const lt = Pr(Ee.trimStart(), Ne); + return lt === void 0 ? re : Tr( + re, + { + range: { pos: et, end: u }, + type: lt + } + ); + } + function Pr(re, Ee) { + const Ne = Ee.exec(re); + if (Ne) + switch (Ne[1]) { + case "ts-expect-error": + return 0; + case "ts-ignore": + return 1; + } + } + function Vt(re) { + return u = h, S = H(!re); + } + function zt() { + return u = h, S = H( + /*shouldEmitInvalidEscapeError*/ + !0 + ); + } + function jr(re = !0) { + return u = h = g, S = _s(re); + } + function ci() { + return S === 48 ? (u = h + 1, S = 30) : S; + } + function Xt() { + return S === 81 ? (u = h + 1, S = 63) : S; + } + function Ai() { + return E.assert(S === 61, "'reScanQuestionToken' should only be called on a '??'"), u = h + 1, S = 58; + } + function _s(re = !0) { + if (g = h = u, u >= d) + return S = 1; + let Ee = $(u); + if (Ee === 60) + return $(u + 1) === 47 ? (u += 2, S = 31) : (u++, S = 30); + if (Ee === 123) + return u++, S = 19; + let Ne = 0; + for (; u < d && (Ee = $(u), Ee !== 123); ) { + if (Ee === 60) { + if (jE(_, u)) + return u = gw(_, u, G), S = 7; + break; + } + if (Ee === 62 && G(p.Unexpected_token_Did_you_mean_or_gt, u, 1), Ee === 125 && G(p.Unexpected_token_Did_you_mean_or_rbrace, u, 1), _u(Ee) && Ne === 0) + Ne = -1; + else { + if (!re && _u(Ee) && Ne > 0) + break; + xg(Ee) || (Ne = u); + } + u++; + } + return T = _.substring(g, u), Ne === -1 ? 13 : 12; + } + function $n() { + if (Du(S)) { + for (; u < d; ) { + if ($(u) === 45) { + T += "-", u++; + continue; + } + const Ee = u; + if (T += de(), u === Ee) + break; + } + return ve(); + } + return S; + } + function os() { + switch (g = u, $(u)) { + case 34: + case 39: + return T = fe( + /*jsxAttributeString*/ + !0 + ), S = 11; + default: + return Ie(); + } + } + function wr() { + return u = h = g, os(); + } + function Ss(re) { + if (g = h = u, C = 0, u >= d) + return S = 1; + for (let Ee = $(u); u < d && !_u(Ee) && Ee !== 96; Ee = V(++u)) + if (!re) { + if (Ee === 123) + break; + if (Ee === 64 && u - 1 >= 0 && Xd($(u - 1)) && !(u + 1 < d && xg($(u + 1)))) + break; + } + return u === h ? Le() : (T = _.substring(h, u), S = 82); + } + function Le() { + if (g = h = u, C = 0, u >= d) + return S = 1; + const re = V(u); + switch (u += Wm(re), re) { + case 9: + case 11: + case 12: + case 32: + for (; u < d && Xd($(u)); ) + u++; + return S = 5; + case 64: + return S = 60; + case 13: + $(u) === 10 && u++; + case 10: + return C |= 1, S = 4; + case 42: + return S = 42; + case 123: + return S = 19; + case 125: + return S = 20; + case 91: + return S = 23; + case 93: + return S = 24; + case 40: + return S = 21; + case 41: + return S = 22; + case 60: + return S = 30; + case 62: + return S = 32; + case 61: + return S = 64; + case 44: + return S = 28; + case 46: + return S = 25; + case 96: + return S = 62; + case 35: + return S = 63; + case 92: + u--; + const Ee = ge(); + if (Ee >= 0 && Cg(Ee, e)) + return T = le( + /*shouldEmitInvalidEscapeError*/ + !0 + ) + de(), S = ve(); + const Ne = Ae(); + return Ne >= 0 && Cg(Ne, e) ? (u += 6, C |= 1024, T = String.fromCharCode(Ne) + de(), S = ve()) : (u++, S = 0); + } + if (Cg(re, e)) { + let Ee = re; + for (; u < d && t0(Ee = V(u), e) || Ee === 45; ) u += Wm(Ee); + return T = _.substring(h, u), Ee === 92 && (T += de()), S = ve(); + } else + return S = 0; + } + function At(re, Ee) { + const Ne = u, et = g, lt = h, jt = S, be = T, ft = C, bt = re(); + return (!bt || Ee) && (u = Ne, g = et, h = lt, S = jt, T = be, C = ft), bt; + } + function vr(re, Ee, Ne) { + const et = d, lt = u, jt = g, be = h, ft = S, bt = T, kt = C, yt = D; + Ps(_, re, Ee); + const Ut = Ne(); + return d = et, u = lt, g = jt, h = be, S = ft, T = bt, C = kt, D = yt, Ut; + } + function ln(re) { + return At( + re, + /*isLookahead*/ + !0 + ); + } + function Zn(re) { + return At( + re, + /*isLookahead*/ + !1 + ); + } + function ri() { + return _; + } + function mi() { + D = void 0; + } + function Ps(re, Ee, Ne) { + _ = re || "", d = Ne === void 0 ? _.length : Ee + Ne, te(Ee || 0); + } + function ws(re) { + s = re; + } + function Yt(re) { + e = re; + } + function Ca(re) { + n = re; + } + function $e(re) { + O = re; + } + function nt(re) { + j = re; + } + function te(re) { + E.assert(re >= 0), u = re, g = re, h = re, S = 0, T = void 0, C = 0; + } + function rt(re) { + P += re ? 1 : -1; + } + } + function BE(e, t) { + return e.codePointAt(t); + } + function Wm(e) { + return e >= 65536 ? 2 : e === -1 ? 0 : 1; + } + function DOe(e) { + if (E.assert(0 <= e && e <= 1114111), e <= 65535) + return String.fromCharCode(e); + const t = Math.floor((e - 65536) / 1024) + 55296, n = (e - 65536) % 1024 + 56320; + return String.fromCharCode(t, n); + } + var POe = String.fromCodePoint ? (e) => String.fromCodePoint(e) : DOe; + function JE(e) { + return POe(e); + } + var zge = new Map(Object.entries({ + General_Category: "General_Category", + gc: "General_Category", + Script: "Script", + sc: "Script", + Script_Extensions: "Script_Extensions", + scx: "Script_Extensions" + })), Wge = /* @__PURE__ */ new Set(["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", "EComp", "Emoji_Modifier", "EMod", "Emoji_Modifier_Base", "EBase", "Emoji_Presentation", "EPres", "Extended_Pictographic", "ExtPict", "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"]), Vge = /* @__PURE__ */ new Set(["Basic_Emoji", "Emoji_Keycap_Sequence", "RGI_Emoji_Modifier_Sequence", "RGI_Emoji_Flag_Sequence", "RGI_Emoji_Tag_Sequence", "RGI_Emoji_ZWJ_Sequence", "RGI_Emoji"]), vw = { + General_Category: /* @__PURE__ */ new Set(["C", "Other", "Cc", "Control", "cntrl", "Cf", "Format", "Cn", "Unassigned", "Co", "Private_Use", "Cs", "Surrogate", "L", "Letter", "LC", "Cased_Letter", "Ll", "Lowercase_Letter", "Lm", "Modifier_Letter", "Lo", "Other_Letter", "Lt", "Titlecase_Letter", "Lu", "Uppercase_Letter", "M", "Mark", "Combining_Mark", "Mc", "Spacing_Mark", "Me", "Enclosing_Mark", "Mn", "Nonspacing_Mark", "N", "Number", "Nd", "Decimal_Number", "digit", "Nl", "Letter_Number", "No", "Other_Number", "P", "Punctuation", "punct", "Pc", "Connector_Punctuation", "Pd", "Dash_Punctuation", "Pe", "Close_Punctuation", "Pf", "Final_Punctuation", "Pi", "Initial_Punctuation", "Po", "Other_Punctuation", "Ps", "Open_Punctuation", "S", "Symbol", "Sc", "Currency_Symbol", "Sk", "Modifier_Symbol", "Sm", "Math_Symbol", "So", "Other_Symbol", "Z", "Separator", "Zl", "Line_Separator", "Zp", "Paragraph_Separator", "Zs", "Space_Separator"]), + Script: /* @__PURE__ */ new Set(["Adlm", "Adlam", "Aghb", "Caucasian_Albanian", "Ahom", "Arab", "Arabic", "Armi", "Imperial_Aramaic", "Armn", "Armenian", "Avst", "Avestan", "Bali", "Balinese", "Bamu", "Bamum", "Bass", "Bassa_Vah", "Batk", "Batak", "Beng", "Bengali", "Bhks", "Bhaiksuki", "Bopo", "Bopomofo", "Brah", "Brahmi", "Brai", "Braille", "Bugi", "Buginese", "Buhd", "Buhid", "Cakm", "Chakma", "Cans", "Canadian_Aboriginal", "Cari", "Carian", "Cham", "Cher", "Cherokee", "Chrs", "Chorasmian", "Copt", "Coptic", "Qaac", "Cpmn", "Cypro_Minoan", "Cprt", "Cypriot", "Cyrl", "Cyrillic", "Deva", "Devanagari", "Diak", "Dives_Akuru", "Dogr", "Dogra", "Dsrt", "Deseret", "Dupl", "Duployan", "Egyp", "Egyptian_Hieroglyphs", "Elba", "Elbasan", "Elym", "Elymaic", "Ethi", "Ethiopic", "Geor", "Georgian", "Glag", "Glagolitic", "Gong", "Gunjala_Gondi", "Gonm", "Masaram_Gondi", "Goth", "Gothic", "Gran", "Grantha", "Grek", "Greek", "Gujr", "Gujarati", "Guru", "Gurmukhi", "Hang", "Hangul", "Hani", "Han", "Hano", "Hanunoo", "Hatr", "Hatran", "Hebr", "Hebrew", "Hira", "Hiragana", "Hluw", "Anatolian_Hieroglyphs", "Hmng", "Pahawh_Hmong", "Hmnp", "Nyiakeng_Puachue_Hmong", "Hrkt", "Katakana_Or_Hiragana", "Hung", "Old_Hungarian", "Ital", "Old_Italic", "Java", "Javanese", "Kali", "Kayah_Li", "Kana", "Katakana", "Kawi", "Khar", "Kharoshthi", "Khmr", "Khmer", "Khoj", "Khojki", "Kits", "Khitan_Small_Script", "Knda", "Kannada", "Kthi", "Kaithi", "Lana", "Tai_Tham", "Laoo", "Lao", "Latn", "Latin", "Lepc", "Lepcha", "Limb", "Limbu", "Lina", "Linear_A", "Linb", "Linear_B", "Lisu", "Lyci", "Lycian", "Lydi", "Lydian", "Mahj", "Mahajani", "Maka", "Makasar", "Mand", "Mandaic", "Mani", "Manichaean", "Marc", "Marchen", "Medf", "Medefaidrin", "Mend", "Mende_Kikakui", "Merc", "Meroitic_Cursive", "Mero", "Meroitic_Hieroglyphs", "Mlym", "Malayalam", "Modi", "Mong", "Mongolian", "Mroo", "Mro", "Mtei", "Meetei_Mayek", "Mult", "Multani", "Mymr", "Myanmar", "Nagm", "Nag_Mundari", "Nand", "Nandinagari", "Narb", "Old_North_Arabian", "Nbat", "Nabataean", "Newa", "Nkoo", "Nko", "Nshu", "Nushu", "Ogam", "Ogham", "Olck", "Ol_Chiki", "Orkh", "Old_Turkic", "Orya", "Oriya", "Osge", "Osage", "Osma", "Osmanya", "Ougr", "Old_Uyghur", "Palm", "Palmyrene", "Pauc", "Pau_Cin_Hau", "Perm", "Old_Permic", "Phag", "Phags_Pa", "Phli", "Inscriptional_Pahlavi", "Phlp", "Psalter_Pahlavi", "Phnx", "Phoenician", "Plrd", "Miao", "Prti", "Inscriptional_Parthian", "Rjng", "Rejang", "Rohg", "Hanifi_Rohingya", "Runr", "Runic", "Samr", "Samaritan", "Sarb", "Old_South_Arabian", "Saur", "Saurashtra", "Sgnw", "SignWriting", "Shaw", "Shavian", "Shrd", "Sharada", "Sidd", "Siddham", "Sind", "Khudawadi", "Sinh", "Sinhala", "Sogd", "Sogdian", "Sogo", "Old_Sogdian", "Sora", "Sora_Sompeng", "Soyo", "Soyombo", "Sund", "Sundanese", "Sylo", "Syloti_Nagri", "Syrc", "Syriac", "Tagb", "Tagbanwa", "Takr", "Takri", "Tale", "Tai_Le", "Talu", "New_Tai_Lue", "Taml", "Tamil", "Tang", "Tangut", "Tavt", "Tai_Viet", "Telu", "Telugu", "Tfng", "Tifinagh", "Tglg", "Tagalog", "Thaa", "Thaana", "Thai", "Tibt", "Tibetan", "Tirh", "Tirhuta", "Tnsa", "Tangsa", "Toto", "Ugar", "Ugaritic", "Vaii", "Vai", "Vith", "Vithkuqi", "Wara", "Warang_Citi", "Wcho", "Wancho", "Xpeo", "Old_Persian", "Xsux", "Cuneiform", "Yezi", "Yezidi", "Yiii", "Yi", "Zanb", "Zanabazar_Square", "Zinh", "Inherited", "Qaai", "Zyyy", "Common", "Zzzz", "Unknown"]), + Script_Extensions: void 0 + }; + vw.Script_Extensions = vw.Script; + function Sl(e) { + return Df(e) || $_(e); + } + function qk(e) { + return SE(e, N4, n5); + } + function bw(e) { + switch (pa(e)) { + case 99: + return "lib.esnext.full.d.ts"; + case 10: + return "lib.es2023.full.d.ts"; + case 9: + return "lib.es2022.full.d.ts"; + case 8: + return "lib.es2021.full.d.ts"; + case 7: + return "lib.es2020.full.d.ts"; + case 6: + return "lib.es2019.full.d.ts"; + case 5: + return "lib.es2018.full.d.ts"; + case 4: + return "lib.es2017.full.d.ts"; + case 3: + return "lib.es2016.full.d.ts"; + case 2: + return "lib.es6.d.ts"; + default: + return "lib.d.ts"; + } + } + function wc(e) { + return e.start + e.length; + } + function _Y(e) { + return e.length === 0; + } + function ij(e, t) { + return t >= e.start && t < wc(e); + } + function Sw(e, t) { + return t >= e.pos && t <= e.end; + } + function fY(e, t) { + return t.start >= e.start && wc(t) <= wc(e); + } + function Uge(e, t) { + return pY(e, t) !== void 0; + } + function pY(e, t) { + const n = mY(e, t); + return n && n.length === 0 ? void 0 : n; + } + function qge(e, t) { + return Tw(e.start, e.length, t.start, t.length); + } + function II(e, t, n) { + return Tw(e.start, e.length, t, n); + } + function Tw(e, t, n, i) { + const s = e + t, o = n + i; + return n <= s && o >= e; + } + function dY(e, t) { + return t <= wc(e) && t >= e.start; + } + function mY(e, t) { + const n = Math.max(e.start, t.start), i = Math.min(wc(e), wc(t)); + return n <= i ? Mc(n, i) : void 0; + } + function jl(e, t) { + if (e < 0) + throw new Error("start < 0"); + if (t < 0) + throw new Error("length < 0"); + return { start: e, length: t }; + } + function Mc(e, t) { + return jl(e, t - e); + } + function zE(e) { + return jl(e.span.start, e.newLength); + } + function gY(e) { + return _Y(e.span) && e.newLength === 0; + } + function xw(e, t) { + if (t < 0) + throw new Error("newLength < 0"); + return { span: e, newLength: t }; + } + var OI = xw(jl(0, 0), 0); + function hY(e) { + if (e.length === 0) + return OI; + if (e.length === 1) + return e[0]; + const t = e[0]; + let n = t.span.start, i = wc(t.span), s = n + t.newLength; + for (let o = 1; o < e.length; o++) { + const c = e[o], _ = n, u = i, d = s, g = c.span.start, h = wc(c.span), S = g + c.newLength; + n = Math.min(_, g), i = Math.max(u, u + (h - d)), s = Math.max(S, S + (d - h)); + } + return xw( + Mc(n, i), + /*newLength*/ + s - n + ); + } + function Hge(e) { + if (e && e.kind === 168) { + for (let t = e; t; t = t.parent) + if (ps(t) || Qn(t) || t.kind === 264) + return t; + } + } + function Q_(e, t) { + return ji(e) && Vn( + e, + 31 + /* ParameterPropertyModifier */ + ) && t.kind === 176; + } + function yY(e) { + return Ts(e) ? Ri(e.elements, vY) : !1; + } + function vY(e) { + return ml(e) ? !0 : yY(e.name); + } + function Hk(e) { + let t = e.parent; + for (; da(t.parent); ) + t = t.parent.parent; + return t.parent; + } + function bY(e, t) { + da(e) && (e = Hk(e)); + let n = t(e); + return e.kind === 260 && (e = e.parent), e && e.kind === 261 && (n |= t(e), e = e.parent), e && e.kind === 243 && (n |= t(e)), n; + } + function L1(e) { + return bY(e, Au); + } + function sj(e) { + return bY(e, kK); + } + function ch(e) { + return bY(e, wOe); + } + function wOe(e) { + return e.flags; + } + var SY = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; + function aj(e, t, n) { + const i = e.toLowerCase(), s = /^([a-z]+)([_-]([a-z]+))?$/.exec(i); + if (!s) { + n && n.push(zo(p.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); + return; + } + const o = s[1], c = s[3]; + ls(SY, i) && !_(o, c, n) && _( + o, + /*territory*/ + void 0, + n + ), IX(e); + function _(u, d, g) { + const h = Cs(t.getExecutingFilePath()), S = Xn(h); + let T = Mn(S, u); + if (d && (T = T + "-" + d), T = t.resolvePath(Mn(T, "diagnosticMessages.generated.json")), !t.fileExists(T)) + return !1; + let C = ""; + try { + C = t.readFile(T); + } catch { + return g && g.push(zo(p.Unable_to_open_file_0, T)), !1; + } + try { + VK(JSON.parse(C)); + } catch { + return g && g.push(zo(p.Corrupted_locale_file_0, T)), !1; + } + return !0; + } + } + function Zo(e, t) { + if (e) + for (; e.original !== void 0; ) + e = e.original; + return !e || !t || t(e) ? e : void 0; + } + function sr(e, t) { + for (; e; ) { + const n = t(e); + if (n === "quit") + return; + if (n) + return e; + e = e.parent; + } + } + function WE(e) { + return (e.flags & 16) === 0; + } + function Ki(e, t) { + if (e === void 0 || WE(e)) + return e; + for (e = e.original; e; ) { + if (WE(e)) + return !t || t(e) ? e : void 0; + e = e.original; + } + } + function Ko(e) { + return e.length >= 2 && e.charCodeAt(0) === 95 && e.charCodeAt(1) === 95 ? "_" + e : e; + } + function Pi(e) { + const t = e; + return t.length >= 3 && t.charCodeAt(0) === 95 && t.charCodeAt(1) === 95 && t.charCodeAt(2) === 95 ? t.substr(1) : t; + } + function dn(e) { + return Pi(e.escapedText); + } + function B2(e) { + const t = ib(e.escapedText); + return t ? Jn(t, qu) : void 0; + } + function uc(e) { + return e.valueDeclaration && Pu(e.valueDeclaration) ? dn(e.valueDeclaration.name) : Pi(e.escapedName); + } + function Gge(e) { + const t = e.parent.parent; + if (t) { + if (tu(t)) + return oj(t); + switch (t.kind) { + case 243: + if (t.declarationList && t.declarationList.declarations[0]) + return oj(t.declarationList.declarations[0]); + break; + case 244: + let n = t.expression; + switch (n.kind === 226 && n.operatorToken.kind === 64 && (n = n.left), n.kind) { + case 211: + return n.name; + case 212: + const i = n.argumentExpression; + if (Re(i)) + return i; + } + break; + case 217: + return oj(t.expression); + case 256: { + if (tu(t.statement) || ct(t.statement)) + return oj(t.statement); + break; + } + } + } + } + function oj(e) { + const t = es(e); + return t && Re(t) ? t : void 0; + } + function kw(e, t) { + return !!(Bl(e) && Re(e.name) && dn(e.name) === dn(t) || yc(e) && ut(e.declarationList.declarations, (n) => kw(n, t))); + } + function TY(e) { + return e.name || Gge(e); + } + function Bl(e) { + return !!e.name; + } + function FI(e) { + switch (e.kind) { + case 80: + return e; + case 348: + case 341: { + const { name: n } = e; + if (n.kind === 166) + return n.right; + break; + } + case 213: + case 226: { + const n = e; + switch (mc(n)) { + case 1: + case 4: + case 5: + case 3: + return w7(n.left); + case 7: + case 8: + case 9: + return n.arguments[1]; + default: + return; + } + } + case 346: + return TY(e); + case 340: + return Gge(e); + case 277: { + const { expression: n } = e; + return Re(n) ? n : void 0; + } + case 212: + const t = e; + if (P7(t)) + return t.argumentExpression; + } + return e.name; + } + function es(e) { + if (e !== void 0) + return FI(e) || (po(e) || xo(e) || tl(e) ? LI(e) : void 0); + } + function LI(e) { + if (e.parent) { + if (qc(e.parent) || da(e.parent)) + return e.parent.name; + if (cn(e.parent) && e === e.parent.right) { + if (Re(e.parent.left)) + return e.parent.left; + if (go(e.parent.left)) + return w7(e.parent.left); + } else if (ti(e.parent) && Re(e.parent.name)) + return e.parent.name; + } else return; + } + function cy(e) { + if (wf(e)) + return Ln(e.modifiers, dl); + } + function sb(e) { + if (Vn( + e, + 98303 + /* Modifier */ + )) + return Ln(e.modifiers, Qs); + } + function $ge(e, t) { + if (e.name) + if (Re(e.name)) { + const n = e.name.escapedText; + return Ew(e.parent, t).filter((i) => up(i) && Re(i.name) && i.name.escapedText === n); + } else { + const n = e.parent.parameters.indexOf(e); + E.assert(n > -1, "Parameters should always be in their parents' parameter list"); + const i = Ew(e.parent, t).filter(up); + if (n < i.length) + return [i[n]]; + } + return He; + } + function Gk(e) { + return $ge( + e, + /*noCache*/ + !1 + ); + } + function xY(e) { + return $ge( + e, + /*noCache*/ + !0 + ); + } + function Xge(e, t) { + const n = e.name.escapedText; + return Ew(e.parent, t).filter((i) => jp(i) && i.typeParameters.some((s) => s.name.escapedText === n)); + } + function kY(e) { + return Xge( + e, + /*noCache*/ + !1 + ); + } + function CY(e) { + return Xge( + e, + /*noCache*/ + !0 + ); + } + function EY(e) { + return !!Pp(e, up); + } + function DY(e) { + return Pp(e, Tx); + } + function PY(e) { + return RI(e, eO); + } + function cj(e) { + return Pp(e, Bte); + } + function Qge(e) { + return Pp(e, JJ); + } + function wY(e) { + return Pp( + e, + JJ, + /*noCache*/ + !0 + ); + } + function Yge(e) { + return Pp(e, zJ); + } + function AY(e) { + return Pp( + e, + zJ, + /*noCache*/ + !0 + ); + } + function Zge(e) { + return Pp(e, WJ); + } + function NY(e) { + return Pp( + e, + WJ, + /*noCache*/ + !0 + ); + } + function Kge(e) { + return Pp(e, VJ); + } + function IY(e) { + return Pp( + e, + VJ, + /*noCache*/ + !0 + ); + } + function OY(e) { + return Pp( + e, + Z5, + /*noCache*/ + !0 + ); + } + function lj(e) { + return Pp(e, UJ); + } + function FY(e) { + return Pp( + e, + UJ, + /*noCache*/ + !0 + ); + } + function uj(e) { + return Pp(e, oA); + } + function MI(e) { + return Pp(e, qJ); + } + function LY(e) { + return Pp(e, K5); + } + function ehe(e) { + return Pp(e, jp); + } + function _j(e) { + return Pp(e, tO); + } + function M1(e) { + const t = Pp(e, uD); + if (t && t.typeExpression && t.typeExpression.type) + return t; + } + function R1(e) { + let t = Pp(e, uD); + return !t && ji(e) && (t = Nn(Gk(e), (n) => !!n.typeExpression)), t && t.typeExpression && t.typeExpression.type; + } + function Cw(e) { + const t = LY(e); + if (t && t.typeExpression) + return t.typeExpression.type; + const n = M1(e); + if (n && n.typeExpression) { + const i = n.typeExpression.type; + if (Xu(i)) { + const s = Nn(i.members, px); + return s && s.type; + } + if (Xm(i) || LC(i)) + return i.type; + } + } + function Ew(e, t) { + var n; + if (!h3(e)) return He; + let i = (n = e.jsDoc) == null ? void 0 : n.jsDocCache; + if (i === void 0 || t) { + const s = iB(e, t); + E.assert(s.length < 2 || s[0] !== s[1]), i = Xs(s, (o) => Ed(o) ? o.tags : o), t || (e.jsDoc ?? (e.jsDoc = []), e.jsDoc.jsDocCache = i); + } + return i; + } + function j1(e) { + return Ew( + e, + /*noCache*/ + !1 + ); + } + function the(e) { + return Ew( + e, + /*noCache*/ + !0 + ); + } + function Pp(e, t, n) { + return Nn(Ew(e, n), t); + } + function RI(e, t) { + return j1(e).filter(t); + } + function rhe(e, t) { + return j1(e).filter((n) => n.kind === t); + } + function Dw(e) { + return typeof e == "string" ? e : e?.map((t) => t.kind === 321 ? t.text : AOe(t)).join(""); + } + function AOe(e) { + const t = e.kind === 324 ? "link" : e.kind === 325 ? "linkcode" : "linkplain", n = e.name ? Y_(e.name) : "", i = e.name && (e.text === "" || e.text.startsWith("://")) ? "" : " "; + return `{@${t} ${n}${i}${e.text}}`; + } + function ly(e) { + if (Th(e)) { + if (MC(e.parent)) { + const t = fC(e.parent); + if (t && Dr(t.tags)) + return Xs(t.tags, (n) => jp(n) ? n.typeParameters : void 0); + } + return He; + } + if (Np(e)) + return E.assert( + e.parent.kind === 320 + /* JSDoc */ + ), Xs(e.parent.tags, (t) => jp(t) ? t.typeParameters : void 0); + if (e.typeParameters || Yte(e) && e.typeParameters) + return e.typeParameters; + if (Qr(e)) { + const t = V7(e); + if (t.length) + return t; + const n = R1(e); + if (n && Xm(n) && n.typeParameters) + return n.typeParameters; + } + return He; + } + function $k(e) { + return e.constraint ? e.constraint : jp(e.parent) && e === e.parent.typeParameters[0] ? e.parent.constraint : void 0; + } + function Dg(e) { + return e.kind === 80 || e.kind === 81; + } + function Pw(e) { + return e.kind === 178 || e.kind === 177; + } + function jI(e) { + return Dn(e) && !!(e.flags & 64); + } + function fj(e) { + return ho(e) && !!(e.flags & 64); + } + function J2(e) { + return Es(e) && !!(e.flags & 64); + } + function fu(e) { + const t = e.kind; + return !!(e.flags & 64) && (t === 211 || t === 212 || t === 213 || t === 235); + } + function VE(e) { + return fu(e) && !vx(e) && !!e.questionDotToken; + } + function BI(e) { + return VE(e.parent) && e.parent.expression === e; + } + function UE(e) { + return !fu(e.parent) || VE(e.parent) || e !== e.parent.expression; + } + function pj(e) { + return e.kind === 226 && e.operatorToken.kind === 61; + } + function yd(e) { + return Nf(e) && Re(e.typeName) && e.typeName.escapedText === "const" && !e.typeArguments; + } + function Xp(e) { + return Bc( + e, + 8 + /* PartiallyEmittedExpressions */ + ); + } + function JI(e) { + return vx(e) && !!(e.flags & 64); + } + function qE(e) { + return e.kind === 252 || e.kind === 251; + } + function dj(e) { + return e.kind === 280 || e.kind === 279; + } + function HE(e) { + return e.kind === 348 || e.kind === 341; + } + function nhe(e) { + return ww(e.kind); + } + function ww(e) { + return e >= 166; + } + function mj(e) { + return e >= 0 && e <= 165; + } + function CT(e) { + return mj(e.kind); + } + function ab(e) { + return io(e, "pos") && io(e, "end"); + } + function GE(e) { + return 9 <= e && e <= 15; + } + function ob(e) { + return GE(e.kind); + } + function gj(e) { + switch (e.kind) { + case 210: + case 209: + case 14: + case 218: + case 231: + return !0; + } + return !1; + } + function uy(e) { + return 15 <= e && e <= 18; + } + function MY(e) { + return uy(e.kind); + } + function zI(e) { + const t = e.kind; + return t === 17 || t === 18; + } + function ET(e) { + return Yu(e) || pu(e); + } + function $E(e) { + switch (e.kind) { + case 276: + return e.isTypeOnly || e.parent.parent.isTypeOnly; + case 274: + return e.parent.isTypeOnly; + case 273: + case 271: + return e.isTypeOnly; + } + return !1; + } + function RY(e) { + switch (e.kind) { + case 281: + return e.isTypeOnly || e.parent.parent.isTypeOnly; + case 278: + return e.isTypeOnly && !!e.moduleSpecifier && !e.exportClause; + case 280: + return e.parent.isTypeOnly; + } + return !1; + } + function B1(e) { + return $E(e) || RY(e); + } + function hj(e) { + return e.kind === 11 || uy(e.kind); + } + function jY(e) { + return Ks(e) || Re(e); + } + function Fo(e) { + var t; + return Re(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; + } + function z2(e) { + var t; + return wi(e) && ((t = e.emitNode) == null ? void 0 : t.autoGenerate) !== void 0; + } + function Aw(e) { + const t = e.emitNode.autoGenerate.flags; + return !!(t & 32) && !!(t & 16) && !!(t & 8); + } + function Pu(e) { + return (rs(e) || PT(e)) && wi(e.name); + } + function Xk(e) { + return Dn(e) && wi(e.name); + } + function r0(e) { + switch (e) { + case 128: + case 129: + case 134: + case 87: + case 138: + case 90: + case 95: + case 103: + case 125: + case 123: + case 124: + case 148: + case 126: + case 147: + case 164: + return !0; + } + return !1; + } + function XE(e) { + return !!(qT(e) & 31); + } + function yj(e) { + return XE(e) || e === 126 || e === 164 || e === 129; + } + function Qs(e) { + return r0(e.kind); + } + function l_(e) { + const t = e.kind; + return t === 166 || t === 80; + } + function Rc(e) { + const t = e.kind; + return t === 80 || t === 81 || t === 11 || t === 9 || t === 167; + } + function W2(e) { + const t = e.kind; + return t === 80 || t === 206 || t === 207; + } + function ps(e) { + return !!e && DT(e.kind); + } + function Qk(e) { + return !!e && (DT(e.kind) || ac(e)); + } + function so(e) { + return e && ihe(e.kind); + } + function QE(e) { + return e.kind === 112 || e.kind === 97; + } + function ihe(e) { + switch (e) { + case 262: + case 174: + case 176: + case 177: + case 178: + case 218: + case 219: + return !0; + default: + return !1; + } + } + function DT(e) { + switch (e) { + case 173: + case 179: + case 323: + case 180: + case 181: + case 184: + case 317: + case 185: + return !0; + default: + return ihe(e); + } + } + function vj(e) { + return yi(e) || _m(e) || ms(e) && ps(e.parent); + } + function fl(e) { + const t = e.kind; + return t === 176 || t === 172 || t === 174 || t === 177 || t === 178 || t === 181 || t === 175 || t === 240; + } + function Qn(e) { + return e && (e.kind === 263 || e.kind === 231); + } + function _y(e) { + return e && (e.kind === 177 || e.kind === 178); + } + function u_(e) { + return rs(e) && im(e); + } + function BY(e) { + return Qr(e) && nx(e) ? (!gb(e) || !hy(e.expression)) && !Q2( + e, + /*excludeThisKeyword*/ + !0 + ) : e.parent && Qn(e.parent) && rs(e) && !im(e); + } + function PT(e) { + switch (e.kind) { + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + } + function she(e) { + switch (e.kind) { + case 174: + case 177: + case 178: + case 172: + return !0; + default: + return !1; + } + } + function Lo(e) { + return Qs(e) || dl(e); + } + function cb(e) { + const t = e.kind; + return t === 180 || t === 179 || t === 171 || t === 173 || t === 181 || t === 177 || t === 178; + } + function WI(e) { + return cb(e) || fl(e); + } + function lh(e) { + const t = e.kind; + return t === 303 || t === 304 || t === 305 || t === 174 || t === 177 || t === 178; + } + function ai(e) { + return VB(e.kind); + } + function JY(e) { + switch (e.kind) { + case 184: + case 185: + return !0; + } + return !1; + } + function Ts(e) { + if (e) { + const t = e.kind; + return t === 207 || t === 206; + } + return !1; + } + function YE(e) { + const t = e.kind; + return t === 209 || t === 210; + } + function VI(e) { + const t = e.kind; + return t === 208 || t === 232; + } + function Nw(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + return !0; + } + return !1; + } + function zY(e) { + return ti(e) || ji(e) || Ow(e) || Fw(e); + } + function Iw(e) { + return bj(e) || Sj(e); + } + function bj(e) { + switch (e.kind) { + case 206: + case 210: + return !0; + } + return !1; + } + function Ow(e) { + switch (e.kind) { + case 208: + case 303: + case 304: + case 305: + return !0; + } + return !1; + } + function Sj(e) { + switch (e.kind) { + case 207: + case 209: + return !0; + } + return !1; + } + function Fw(e) { + switch (e.kind) { + case 208: + case 232: + case 230: + case 209: + case 210: + case 80: + case 211: + case 212: + return !0; + } + return Tl( + e, + /*excludeCompoundAssignment*/ + !0 + ); + } + function WY(e) { + const t = e.kind; + return t === 211 || t === 166 || t === 205; + } + function Lw(e) { + const t = e.kind; + return t === 211 || t === 166; + } + function Tj(e) { + return lb(e) || Sy(e); + } + function lb(e) { + switch (e.kind) { + case 286: + case 285: + case 213: + case 214: + case 215: + case 170: + return !0; + default: + return !1; + } + } + function Qd(e) { + return e.kind === 213 || e.kind === 214; + } + function wT(e) { + const t = e.kind; + return t === 228 || t === 15; + } + function __(e) { + return ahe(Xp(e).kind); + } + function ahe(e) { + switch (e) { + case 211: + case 212: + case 214: + case 213: + case 284: + case 285: + case 288: + case 215: + case 209: + case 217: + case 210: + case 231: + case 218: + case 80: + case 81: + case 14: + case 9: + case 10: + case 11: + case 15: + case 228: + case 97: + case 106: + case 110: + case 112: + case 108: + case 235: + case 233: + case 236: + case 102: + case 282: + return !0; + default: + return !1; + } + } + function xj(e) { + return ohe(Xp(e).kind); + } + function ohe(e) { + switch (e) { + case 224: + case 225: + case 220: + case 221: + case 222: + case 223: + case 216: + return !0; + default: + return ahe(e); + } + } + function VY(e) { + switch (e.kind) { + case 225: + return !0; + case 224: + return e.operator === 46 || e.operator === 47; + default: + return !1; + } + } + function UY(e) { + switch (e.kind) { + case 106: + case 112: + case 97: + case 224: + return !0; + default: + return ob(e); + } + } + function ct(e) { + return NOe(Xp(e).kind); + } + function NOe(e) { + switch (e) { + case 227: + case 229: + case 219: + case 226: + case 230: + case 234: + case 232: + case 355: + case 354: + case 238: + return !0; + default: + return ohe(e); + } + } + function J1(e) { + const t = e.kind; + return t === 216 || t === 234; + } + function che(e) { + return RJ(e) || $5(e); + } + function fy(e, t) { + switch (e.kind) { + case 248: + case 249: + case 250: + case 246: + case 247: + return !0; + case 256: + return t && fy(e.statement, t); + } + return !1; + } + function qY(e) { + return ko(e) || Ic(e); + } + function HY(e) { + return ut(e, qY); + } + function UI(e) { + return !Uw(e) && !ko(e) && !Vn( + e, + 32 + /* Export */ + ) && !wu(e); + } + function Mw(e) { + return Uw(e) || ko(e) || Vn( + e, + 32 + /* Export */ + ); + } + function V2(e) { + return e.kind === 249 || e.kind === 250; + } + function qI(e) { + return ms(e) || ct(e); + } + function kj(e) { + return ms(e); + } + function tp(e) { + return Il(e) || ct(e); + } + function GY(e) { + const t = e.kind; + return t === 268 || t === 267 || t === 80; + } + function lhe(e) { + const t = e.kind; + return t === 268 || t === 267; + } + function uhe(e) { + const t = e.kind; + return t === 80 || t === 267; + } + function Cj(e) { + const t = e.kind; + return t === 275 || t === 274; + } + function Rw(e) { + return e.kind === 267 || e.kind === 266; + } + function vd(e) { + switch (e.kind) { + case 219: + case 226: + case 208: + case 213: + case 179: + case 263: + case 231: + case 175: + case 176: + case 185: + case 180: + case 212: + case 266: + case 306: + case 277: + case 278: + case 281: + case 262: + case 218: + case 184: + case 177: + case 80: + case 273: + case 271: + case 276: + case 181: + case 264: + case 338: + case 340: + case 317: + case 341: + case 348: + case 323: + case 346: + case 322: + case 291: + case 292: + case 293: + case 200: + case 174: + case 173: + case 267: + case 202: + case 280: + case 270: + case 274: + case 214: + case 15: + case 9: + case 210: + case 169: + case 211: + case 303: + case 172: + case 171: + case 178: + case 304: + case 307: + case 305: + case 11: + case 265: + case 187: + case 168: + case 260: + return !0; + default: + return !1; + } + } + function Vm(e) { + switch (e.kind) { + case 219: + case 241: + case 179: + case 269: + case 299: + case 175: + case 194: + case 176: + case 185: + case 180: + case 248: + case 249: + case 250: + case 262: + case 218: + case 184: + case 177: + case 181: + case 338: + case 340: + case 317: + case 323: + case 346: + case 200: + case 174: + case 173: + case 267: + case 178: + case 307: + case 265: + return !0; + default: + return !1; + } + } + function IOe(e) { + return e === 219 || e === 208 || e === 263 || e === 231 || e === 175 || e === 176 || e === 266 || e === 306 || e === 281 || e === 262 || e === 218 || e === 177 || e === 273 || e === 271 || e === 276 || e === 264 || e === 291 || e === 174 || e === 173 || e === 267 || e === 270 || e === 274 || e === 280 || e === 169 || e === 303 || e === 172 || e === 171 || e === 178 || e === 304 || e === 265 || e === 168 || e === 260 || e === 346 || e === 338 || e === 348 || e === 202; + } + function $Y(e) { + return e === 262 || e === 282 || e === 263 || e === 264 || e === 265 || e === 266 || e === 267 || e === 272 || e === 271 || e === 278 || e === 277 || e === 270; + } + function XY(e) { + return e === 252 || e === 251 || e === 259 || e === 246 || e === 244 || e === 242 || e === 249 || e === 250 || e === 248 || e === 245 || e === 256 || e === 253 || e === 255 || e === 257 || e === 258 || e === 243 || e === 247 || e === 254 || e === 353; + } + function tu(e) { + return e.kind === 168 ? e.parent && e.parent.kind !== 345 || Qr(e) : IOe(e.kind); + } + function QY(e) { + return $Y(e.kind); + } + function jw(e) { + return XY(e.kind); + } + function hi(e) { + const t = e.kind; + return XY(t) || $Y(t) || OOe(e); + } + function OOe(e) { + return e.kind !== 241 || e.parent !== void 0 && (e.parent.kind === 258 || e.parent.kind === 299) ? !1 : !pb(e); + } + function YY(e) { + const t = e.kind; + return XY(t) || $Y(t) || t === 241; + } + function ZY(e) { + const t = e.kind; + return t === 283 || t === 166 || t === 80; + } + function ZE(e) { + const t = e.kind; + return t === 110 || t === 80 || t === 211 || t === 295; + } + function Bw(e) { + const t = e.kind; + return t === 284 || t === 294 || t === 285 || t === 12 || t === 288; + } + function HI(e) { + const t = e.kind; + return t === 291 || t === 293; + } + function KY(e) { + const t = e.kind; + return t === 11 || t === 294; + } + function ru(e) { + const t = e.kind; + return t === 286 || t === 285; + } + function GI(e) { + const t = e.kind; + return t === 296 || t === 297; + } + function Yk(e) { + return e.kind >= 309 && e.kind <= 351; + } + function $I(e) { + return e.kind === 320 || e.kind === 319 || e.kind === 321 || AT(e) || Zk(e) || lS(e) || Th(e); + } + function Zk(e) { + return e.kind >= 327 && e.kind <= 351; + } + function Yd(e) { + return e.kind === 178; + } + function n0(e) { + return e.kind === 177; + } + function gf(e) { + if (!h3(e)) return !1; + const { jsDoc: t } = e; + return !!t && t.length > 0; + } + function XI(e) { + return !!e.type; + } + function i0(e) { + return !!e.initializer; + } + function U2(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + case 306: + return !0; + default: + return !1; + } + } + function Ej(e) { + return e.kind === 291 || e.kind === 293 || lh(e); + } + function QI(e) { + return e.kind === 183 || e.kind === 233; + } + var _he = 1073741823; + function eZ(e) { + let t = _he; + for (const n of e) { + if (!n.length) + continue; + let i = 0; + for (; i < n.length && i < t && xg(n.charCodeAt(i)); i++) + ; + if (i < t && (t = i), t === 0) + return 0; + } + return t === _he ? void 0 : t; + } + function Ga(e) { + return e.kind === 11 || e.kind === 15; + } + function AT(e) { + return e.kind === 324 || e.kind === 325 || e.kind === 326; + } + function Dj(e) { + const t = Bo(e.parameters); + return !!t && Um(t); + } + function Um(e) { + const t = up(e) ? e.typeExpression && e.typeExpression.type : e.type; + return e.dotDotDotToken !== void 0 || !!t && t.kind === 318; + } + function fhe(e, t) { + return t.text.substring(e.pos, e.end).includes("@internal"); + } + function tZ(e, t) { + t ?? (t = xr(e)); + const n = Ki(e); + if (n && n.kind === 169) { + const s = n.parent.parameters.indexOf(n), o = s > 0 ? n.parent.parameters[s - 1] : void 0, c = t.text, _ = o ? Hi( + // to handle + // ... parameters, /** @internal */ + // public param: string + oy(c, sa( + c, + o.end + 1, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + )), + kg(c, e.pos) + ) : oy(c, sa( + c, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + )); + return ut(_) && fhe(ia(_), t); + } + const i = n && Gj(n, t); + return !!rr(i, (s) => fhe(s, t)); + } + var Pj = [], z1 = "tslib", KE = 160, wj = 1e6; + function Jo(e, t) { + const n = e.declarations; + if (n) { + for (const i of n) + if (i.kind === t) + return i; + } + } + function rZ(e, t) { + return Ln(e.declarations || He, (n) => n.kind === t); + } + function Ms(e) { + const t = /* @__PURE__ */ new Map(); + if (e) + for (const n of e) + t.set(n.escapedName, n); + return t; + } + function qm(e) { + return (e.flags & 33554432) !== 0; + } + function Kk(e) { + return !!(e.flags & 1536) && e.escapedName.charCodeAt(0) === 34; + } + var YI = FOe(); + function FOe() { + var e = ""; + const t = (n) => e += n; + return { + getText: () => e, + write: t, + rawWrite: t, + writeKeyword: t, + writeOperator: t, + writePunctuation: t, + writeSpace: t, + writeStringLiteral: t, + writeLiteral: t, + writeParameter: t, + writeProperty: t, + writeSymbol: (n, i) => t(n), + writeTrailingSemicolon: t, + writeComment: t, + getTextPos: () => e.length, + getLine: () => 0, + getColumn: () => 0, + getIndent: () => 0, + isAtStartOfLine: () => !1, + hasTrailingComment: () => !1, + hasTrailingWhitespace: () => !!e.length && xg(e.charCodeAt(e.length - 1)), + // Completely ignore indentation for string writers. And map newlines to + // a single space. + writeLine: () => e += " ", + increaseIndent: ka, + decreaseIndent: ka, + clear: () => e = "" + }; + } + function ZI(e, t) { + return e.configFilePath !== t.configFilePath || nZ(e, t); + } + function nZ(e, t) { + return eC(e, t, dz); + } + function iZ(e, t) { + return eC(e, t, vre); + } + function eC(e, t, n) { + return e !== t && n.some((i) => !T5(c5(e, i), c5(t, i))); + } + function sZ(e, t) { + for (; ; ) { + const n = t(e); + if (n === "quit") return; + if (n !== void 0) return n; + if (yi(e)) return; + e = e.parent; + } + } + function Dl(e, t) { + const n = e.entries(); + for (const [i, s] of n) { + const o = t(s, i); + if (o) + return o; + } + } + function uh(e, t) { + const n = e.keys(); + for (const i of n) { + const s = t(i); + if (s) + return s; + } + } + function KI(e, t) { + e.forEach((n, i) => { + t.set(i, n); + }); + } + function e4(e) { + const t = YI.getText(); + try { + return e(YI), YI.getText(); + } finally { + YI.clear(), YI.writeKeyword(t); + } + } + function Jw(e) { + return e.end - e.pos; + } + function Aj(e, t) { + return e.path === t.path && !e.prepend == !t.prepend && !e.circular == !t.circular; + } + function aZ(e, t) { + return e === t || e.resolvedModule === t.resolvedModule || !!e.resolvedModule && !!t.resolvedModule && e.resolvedModule.isExternalLibraryImport === t.resolvedModule.isExternalLibraryImport && e.resolvedModule.extension === t.resolvedModule.extension && e.resolvedModule.resolvedFileName === t.resolvedModule.resolvedFileName && e.resolvedModule.originalPath === t.resolvedModule.originalPath && LOe(e.resolvedModule.packageId, t.resolvedModule.packageId) && e.alternateResult === t.alternateResult; + } + function e7(e, t, n, i, s) { + var o; + const c = (o = t.getResolvedModule(e, n, i)) == null ? void 0 : o.alternateResult, _ = c && (Hu(t.getCompilerOptions()) === 2 ? [p.There_are_types_at_0_but_this_result_could_not_be_resolved_under_your_current_moduleResolution_setting_Consider_updating_to_node16_nodenext_or_bundler, [c]] : [ + p.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, + [c, c.includes(zg + "@types/") ? `@types/${GC(s)}` : s] + ]), u = _ ? us( + /*details*/ + void 0, + _[0], + ..._[1] + ) : t.typesPackageExists(s) ? us( + /*details*/ + void 0, + p.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, + s, + GC(s) + ) : t.packageBundlesTypes(s) ? us( + /*details*/ + void 0, + p.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, + s, + n + ) : us( + /*details*/ + void 0, + p.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, + n, + GC(s) + ); + return u && (u.repopulateInfo = () => ({ moduleReference: n, mode: i, packageName: s === n ? void 0 : s })), u; + } + function LOe(e, t) { + return e === t || !!e && !!t && e.name === t.name && e.subModuleName === t.subModuleName && e.version === t.version && e.peerDependencies === t.peerDependencies; + } + function t7({ name: e, subModuleName: t }) { + return t ? `${e}/${t}` : e; + } + function py(e) { + return `${t7(e)}@${e.version}${e.peerDependencies ?? ""}`; + } + function oZ(e, t) { + return e === t || e.resolvedTypeReferenceDirective === t.resolvedTypeReferenceDirective || !!e.resolvedTypeReferenceDirective && !!t.resolvedTypeReferenceDirective && e.resolvedTypeReferenceDirective.resolvedFileName === t.resolvedTypeReferenceDirective.resolvedFileName && !!e.resolvedTypeReferenceDirective.primary == !!t.resolvedTypeReferenceDirective.primary && e.resolvedTypeReferenceDirective.originalPath === t.resolvedTypeReferenceDirective.originalPath; + } + function Nj(e, t, n, i) { + E.assert(e.length === t.length); + for (let s = 0; s < e.length; s++) { + const o = t[s], c = e[s], _ = n(c); + if (_ ? !o || !i(_, o) : o) + return !0; + } + return !1; + } + function tC(e) { + return MOe(e), (e.flags & 1048576) !== 0; + } + function MOe(e) { + e.flags & 2097152 || ((e.flags & 262144 || gs(e, tC)) && (e.flags |= 1048576), e.flags |= 2097152); + } + function xr(e) { + for (; e && e.kind !== 307; ) + e = e.parent; + return e; + } + function r7(e) { + return xr(e.valueDeclaration || Jj(e)); + } + function t4(e, t) { + return !!e && (e.scriptKind === 1 || e.scriptKind === 2) && !e.checkJsDirective && t === void 0; + } + function cZ(e) { + switch (e.kind) { + case 241: + case 269: + case 248: + case 249: + case 250: + return !0; + } + return !1; + } + function dy(e, t) { + return E.assert(e >= 0), Tg(t)[e]; + } + function phe(e) { + const t = xr(e), n = Vs(t, e.pos); + return `${t.fileName}(${n.line + 1},${n.character + 1})`; + } + function zw(e, t) { + E.assert(e >= 0); + const n = Tg(t), i = e, s = t.text; + if (i + 1 === n.length) + return s.length - 1; + { + const o = n[i]; + let c = n[i + 1] - 1; + for (E.assert(_u(s.charCodeAt(c))); o <= c && _u(s.charCodeAt(c)); ) + c--; + return c; + } + } + function n7(e, t, n) { + return !(n && n(t)) && !e.identifiers.has(t); + } + function ic(e) { + return e === void 0 ? !0 : e.pos === e.end && e.pos >= 0 && e.kind !== 1; + } + function wp(e) { + return !ic(e); + } + function lZ(e, t) { + return Mo(e) ? t === e.expression : ac(e) ? t === e.modifiers : I_(e) ? t === e.initializer : rs(e) ? t === e.questionToken && u_(e) : qc(e) ? t === e.modifiers || t === e.questionToken || t === e.exclamationToken || Ww(e.modifiers, t, Lo) : du(e) ? t === e.equalsToken || t === e.modifiers || t === e.questionToken || t === e.exclamationToken || Ww(e.modifiers, t, Lo) : hc(e) ? t === e.exclamationToken : ec(e) ? t === e.typeParameters || t === e.type || Ww(e.typeParameters, t, Mo) : Af(e) ? t === e.typeParameters || Ww(e.typeParameters, t, Mo) : rf(e) ? t === e.typeParameters || t === e.type || Ww(e.typeParameters, t, Mo) : aA(e) ? t === e.modifiers || Ww(e.modifiers, t, Lo) : !1; + } + function Ww(e, t, n) { + return !e || ss(t) || !n(t) ? !1 : ls(e, t); + } + function dhe(e, t, n) { + if (t === void 0 || t.length === 0) return e; + let i = 0; + for (; i < e.length && n(e[i]); ++i) + ; + return e.splice(i, 0, ...t), e; + } + function mhe(e, t, n) { + if (t === void 0) return e; + let i = 0; + for (; i < e.length && n(e[i]); ++i) + ; + return e.splice(i, 0, t), e; + } + function ghe(e) { + return Kd(e) || !!(ua(e) & 2097152); + } + function Pg(e, t) { + return dhe(e, t, Kd); + } + function Ij(e, t) { + return dhe(e, t, ghe); + } + function hhe(e, t) { + return mhe(e, t, Kd); + } + function q2(e, t) { + return mhe(e, t, ghe); + } + function Oj(e, t, n) { + if (e.charCodeAt(t + 1) === 47 && t + 2 < n && e.charCodeAt(t + 2) === 47) { + const i = e.substring(t, n); + return !!(PZ.test(i) || wZ.test(i) || HOe.test(i) || UOe.test(i) || qOe.test(i) || GOe.test(i)); + } + return !1; + } + function i7(e, t) { + return e.charCodeAt(t + 1) === 42 && e.charCodeAt(t + 2) === 33; + } + function uZ(e, t) { + const n = new Map( + t.map((c) => [ + `${Vs(e, c.range.end).line}`, + c + ]) + ), i = /* @__PURE__ */ new Map(); + return { getUnusedExpectations: s, markUsed: o }; + function s() { + return ts(n.entries()).filter(([c, _]) => _.type === 0 && !i.get(c)).map(([c, _]) => _); + } + function o(c) { + return n.has(`${c}`) ? (i.set(`${c}`, !0), !0) : !1; + } + } + function W1(e, t, n) { + if (ic(e)) + return e.pos; + if (Yk(e) || e.kind === 12) + return sa( + (t || xr(e)).text, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + if (n && gf(e)) + return W1(e.jsDoc[0], t); + if (e.kind === 352) { + const i = ul(HJ(e)); + if (i) + return W1(i, t, n); + } + return sa( + (t || xr(e)).text, + e.pos, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !1, + n3(e) + ); + } + function Fj(e, t) { + const n = !ic(e) && ed(e) ? eb(e.modifiers, dl) : void 0; + return n ? sa((t || xr(e)).text, n.end) : W1(e, t); + } + function ub(e, t, n = !1) { + return r4(e.text, t, n); + } + function ROe(e) { + return !!sr(e, nv); + } + function s7(e) { + return !!(Ic(e) && e.exportClause && Ym(e.exportClause) && e.exportClause.name.escapedText === "default"); + } + function r4(e, t, n = !1) { + if (ic(t)) + return ""; + let i = e.substring(n ? t.pos : sa(e, t.pos), t.end); + return ROe(t) && (i = i.split(/\r\n|\n|\r/).map((s) => s.replace(/^\s*\*/, "").trimStart()).join(` +`)), i; + } + function sc(e, t = !1) { + return ub(xr(e), e, t); + } + function jOe(e) { + return e.pos; + } + function rC(e, t) { + return Zh(e, t, jOe, uo); + } + function ua(e) { + const t = e.emitNode; + return t && t.flags || 0; + } + function Qp(e) { + const t = e.emitNode; + return t && t.internalFlags || 0; + } + var Lj = /* @__PURE__ */ Wu( + () => new Map(Object.entries({ + Array: new Map(Object.entries({ + es2015: [ + "find", + "findIndex", + "fill", + "copyWithin", + "entries", + "keys", + "values" + ], + es2016: [ + "includes" + ], + es2019: [ + "flat", + "flatMap" + ], + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Iterator: new Map(Object.entries({ + es2015: He + })), + AsyncIterator: new Map(Object.entries({ + es2015: He + })), + Atomics: new Map(Object.entries({ + es2017: He + })), + SharedArrayBuffer: new Map(Object.entries({ + es2017: He + })), + AsyncIterable: new Map(Object.entries({ + es2018: He + })), + AsyncIterableIterator: new Map(Object.entries({ + es2018: He + })), + AsyncGenerator: new Map(Object.entries({ + es2018: He + })), + AsyncGeneratorFunction: new Map(Object.entries({ + es2018: He + })), + RegExp: new Map(Object.entries({ + es2015: [ + "flags", + "sticky", + "unicode" + ], + es2018: [ + "dotAll" + ] + })), + Reflect: new Map(Object.entries({ + es2015: [ + "apply", + "construct", + "defineProperty", + "deleteProperty", + "get", + "getOwnPropertyDescriptor", + "getPrototypeOf", + "has", + "isExtensible", + "ownKeys", + "preventExtensions", + "set", + "setPrototypeOf" + ] + })), + ArrayConstructor: new Map(Object.entries({ + es2015: [ + "from", + "of" + ], + esnext: [ + "fromAsync" + ] + })), + ObjectConstructor: new Map(Object.entries({ + es2015: [ + "assign", + "getOwnPropertySymbols", + "keys", + "is", + "setPrototypeOf" + ], + es2017: [ + "values", + "entries", + "getOwnPropertyDescriptors" + ], + es2019: [ + "fromEntries" + ], + es2022: [ + "hasOwn" + ] + })), + NumberConstructor: new Map(Object.entries({ + es2015: [ + "isFinite", + "isInteger", + "isNaN", + "isSafeInteger", + "parseFloat", + "parseInt" + ] + })), + Math: new Map(Object.entries({ + es2015: [ + "clz32", + "imul", + "sign", + "log10", + "log2", + "log1p", + "expm1", + "cosh", + "sinh", + "tanh", + "acosh", + "asinh", + "atanh", + "hypot", + "trunc", + "fround", + "cbrt" + ] + })), + Map: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + Set: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + PromiseConstructor: new Map(Object.entries({ + es2015: [ + "all", + "race", + "reject", + "resolve" + ], + es2020: [ + "allSettled" + ], + es2021: [ + "any" + ] + })), + Symbol: new Map(Object.entries({ + es2015: [ + "for", + "keyFor" + ], + es2019: [ + "description" + ] + })), + WeakMap: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + WeakSet: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + String: new Map(Object.entries({ + es2015: [ + "codePointAt", + "includes", + "endsWith", + "normalize", + "repeat", + "startsWith", + "anchor", + "big", + "blink", + "bold", + "fixed", + "fontcolor", + "fontsize", + "italics", + "link", + "small", + "strike", + "sub", + "sup" + ], + es2017: [ + "padStart", + "padEnd" + ], + es2019: [ + "trimStart", + "trimEnd", + "trimLeft", + "trimRight" + ], + es2020: [ + "matchAll" + ], + es2021: [ + "replaceAll" + ], + es2022: [ + "at" + ], + esnext: [ + "isWellFormed", + "toWellFormed" + ] + })), + StringConstructor: new Map(Object.entries({ + es2015: [ + "fromCodePoint", + "raw" + ] + })), + DateTimeFormat: new Map(Object.entries({ + es2017: [ + "formatToParts" + ] + })), + Promise: new Map(Object.entries({ + es2015: He, + es2018: [ + "finally" + ] + })), + RegExpMatchArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + RegExpExecArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + Intl: new Map(Object.entries({ + es2018: [ + "PluralRules" + ] + })), + NumberFormat: new Map(Object.entries({ + es2018: [ + "formatToParts" + ] + })), + SymbolConstructor: new Map(Object.entries({ + es2020: [ + "matchAll" + ] + })), + DataView: new Map(Object.entries({ + es2020: [ + "setBigInt64", + "setBigUint64", + "getBigInt64", + "getBigUint64" + ] + })), + BigInt: new Map(Object.entries({ + es2020: He + })), + RelativeTimeFormat: new Map(Object.entries({ + es2020: [ + "format", + "formatToParts", + "resolvedOptions" + ] + })), + Int8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint8ClampedArray: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Int16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Int32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Float32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Float64Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + BigInt64Array: new Map(Object.entries({ + es2020: He, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + BigUint64Array: new Map(Object.entries({ + es2020: He, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Error: new Map(Object.entries({ + es2022: [ + "cause" + ] + })) + })) + ), _Z = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NeverAsciiEscape = 1] = "NeverAsciiEscape", e[e.JsxAttributeEscape = 2] = "JsxAttributeEscape", e[e.TerminateUnterminatedLiterals = 4] = "TerminateUnterminatedLiterals", e[e.AllowNumericSeparator = 8] = "AllowNumericSeparator", e))(_Z || {}); + function fZ(e, t, n) { + if (t && BOe(e, n)) + return ub(t, e); + switch (e.kind) { + case 11: { + const i = n & 2 ? TB : n & 1 || ua(e) & 16777216 ? $m : L7; + return e.singleQuote ? "'" + i( + e.text, + 39 + /* singleQuote */ + ) + "'" : '"' + i( + e.text, + 34 + /* doubleQuote */ + ) + '"'; + } + case 15: + case 16: + case 17: + case 18: { + const i = n & 1 || ua(e) & 16777216 ? $m : L7, s = e.rawText ?? bB(i( + e.text, + 96 + /* backtick */ + )); + switch (e.kind) { + case 15: + return "`" + s + "`"; + case 16: + return "`" + s + "${"; + case 17: + return "}" + s + "${"; + case 18: + return "}" + s + "`"; + } + break; + } + case 9: + case 10: + return e.text; + case 14: + return n & 4 && e.isUnterminated ? e.text + (e.text.charCodeAt(e.text.length - 1) === 92 ? " /" : "/") : e.text; + } + return E.fail(`Literal kind '${e.kind}' not accounted for.`); + } + function BOe(e, t) { + if (oo(e) || !e.parent || t & 4 && e.isUnterminated) + return !1; + if (m_(e)) { + if (e.numericLiteralFlags & 26656) + return !1; + if (e.numericLiteralFlags & 512) + return !!(t & 8); + } + return !eA(e); + } + function pZ(e) { + return Gi(e) ? `"${$m(e)}"` : "" + e; + } + function dZ(e) { + return Wc(e).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); + } + function Mj(e) { + return (ch(e) & 7) !== 0 || Rj(e); + } + function Rj(e) { + const t = nm(e); + return t.kind === 260 && t.parent.kind === 299; + } + function wu(e) { + return Nc(e) && (e.name.kind === 11 || Zd(e)); + } + function a7(e) { + return Nc(e) && e.name.kind === 11; + } + function jj(e) { + return Nc(e) && Ks(e.name); + } + function mZ(e) { + return Nc(e) || Re(e); + } + function Vw(e) { + return JOe(e.valueDeclaration); + } + function JOe(e) { + return !!e && e.kind === 267 && !e.body; + } + function gZ(e) { + return e.kind === 307 || e.kind === 267 || Qk(e); + } + function Zd(e) { + return !!(e.flags & 2048); + } + function _b(e) { + return wu(e) && Bj(e); + } + function Bj(e) { + switch (e.parent.kind) { + case 307: + return il(e.parent); + case 268: + return wu(e.parent.parent) && yi(e.parent.parent.parent) && !il(e.parent.parent.parent); + } + return !1; + } + function Jj(e) { + var t; + return (t = e.declarations) == null ? void 0 : t.find((n) => !_b(n) && !(Nc(n) && Zd(n))); + } + function zOe(e) { + return e === 1 || e === 100 || e === 199; + } + function NT(e, t) { + return il(e) || zOe(Nu(t)) && !!e.commonJsModuleIndicator; + } + function zj(e, t) { + switch (e.scriptKind) { + case 1: + case 3: + case 2: + case 4: + break; + default: + return !1; + } + return e.isDeclarationFile ? !1 : !!(Iu(t, "alwaysStrict") || Gte(e.statements) || il(e) || ap(t)); + } + function Wj(e) { + return !!(e.flags & 33554432) || Vn( + e, + 128 + /* Ambient */ + ); + } + function Vj(e, t) { + switch (e.kind) { + case 307: + case 269: + case 299: + case 267: + case 248: + case 249: + case 250: + case 176: + case 174: + case 177: + case 178: + case 262: + case 218: + case 219: + case 172: + case 175: + return !0; + case 241: + return !Qk(t); + } + return !1; + } + function Uj(e) { + switch (E.type(e), e.kind) { + case 338: + case 346: + case 323: + return !0; + default: + return qj(e); + } + } + function qj(e) { + switch (E.type(e), e.kind) { + case 179: + case 180: + case 173: + case 181: + case 184: + case 185: + case 317: + case 263: + case 231: + case 264: + case 265: + case 345: + case 262: + case 174: + case 176: + case 177: + case 178: + case 218: + case 219: + return !0; + default: + return !1; + } + } + function IT(e) { + switch (e.kind) { + case 272: + case 271: + return !0; + default: + return !1; + } + } + function hZ(e) { + return IT(e) || mb(e); + } + function yZ(e) { + return IT(e) || s3(e); + } + function o7(e) { + switch (e.kind) { + case 272: + case 271: + case 243: + case 263: + case 262: + case 267: + case 265: + case 264: + case 266: + return !0; + default: + return !1; + } + } + function vZ(e) { + return Uw(e) || Nc(e) || Qm(e) || hf(e); + } + function Uw(e) { + return IT(e) || Ic(e); + } + function c7(e) { + return sr(e.parent, (t) => !!(Uz(t) & 1)); + } + function bd(e) { + return sr(e.parent, (t) => Vj(t, t.parent)); + } + function bZ(e, t) { + let n = bd(e); + for (; n; ) + t(n), n = bd(n); + } + function ao(e) { + return !e || Jw(e) === 0 ? "(Missing)" : sc(e); + } + function SZ(e) { + return e.declaration ? ao(e.declaration.parameters[0].name) : void 0; + } + function qw(e) { + return e.kind === 167 && !Pf(e.expression); + } + function n4(e) { + var t; + switch (e.kind) { + case 80: + case 81: + return (t = e.emitNode) != null && t.autoGenerate ? void 0 : e.escapedText; + case 11: + case 9: + case 15: + return Ko(e.text); + case 167: + return Pf(e.expression) ? Ko(e.expression.text) : void 0; + case 295: + return rx(e); + default: + return E.assertNever(e); + } + } + function OT(e) { + return E.checkDefined(n4(e)); + } + function Y_(e) { + switch (e.kind) { + case 110: + return "this"; + case 81: + case 80: + return Jw(e) === 0 ? dn(e) : sc(e); + case 166: + return Y_(e.left) + "." + Y_(e.right); + case 211: + return Re(e.name) || wi(e.name) ? Y_(e.expression) + "." + Y_(e.name) : E.assertNever(e.name); + case 311: + return Y_(e.left) + "#" + Y_(e.right); + case 295: + return Y_(e.namespace) + ":" + Y_(e.name); + default: + return E.assertNever(e); + } + } + function Xr(e, t, ...n) { + const i = xr(e); + return rp(i, e, t, ...n); + } + function nC(e, t, n, ...i) { + const s = sa(e.text, t.pos); + return xl(e, s, t.end - s, n, ...i); + } + function rp(e, t, n, ...i) { + const s = H2(e, t); + return xl(e, s.start, s.length, n, ...i); + } + function wg(e, t, n, i) { + const s = H2(e, t); + return l7(e, s.start, s.length, n, i); + } + function Hw(e, t, n, i) { + const s = sa(e.text, t.pos); + return l7(e, s, t.end - s, n, i); + } + function TZ(e, t, n) { + E.assertGreaterThanOrEqual(t, 0), E.assertGreaterThanOrEqual(n, 0), E.assertLessThanOrEqual(t, e.length), E.assertLessThanOrEqual(t + n, e.length); + } + function l7(e, t, n, i, s) { + return TZ(e.text, t, n), { + file: e, + start: t, + length: n, + code: i.code, + category: i.category, + messageText: i.next ? i : i.messageText, + relatedInformation: s, + canonicalHead: i.canonicalHead + }; + } + function Hj(e, t, n) { + return { + file: e, + start: 0, + length: 0, + code: t.code, + category: t.category, + messageText: t.next ? t : t.messageText, + relatedInformation: n + }; + } + function xZ(e) { + return typeof e.messageText == "string" ? { + code: e.code, + category: e.category, + messageText: e.messageText, + next: e.next + } : e.messageText; + } + function kZ(e, t, n) { + return { + file: e, + start: t.pos, + length: t.end - t.pos, + code: n.code, + category: n.category, + messageText: n.message + }; + } + function CZ(e, ...t) { + return { + code: e.code, + messageText: YT(e, ...t) + }; + } + function Hm(e, t) { + const n = Eg( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + t + ); + n.scan(); + const i = n.getTokenStart(); + return Mc(i, n.getTokenEnd()); + } + function EZ(e, t) { + const n = Eg( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + t + ); + return n.scan(), n.getToken(); + } + function WOe(e, t) { + const n = sa(e.text, t.pos); + if (t.body && t.body.kind === 241) { + const { line: i } = Vs(e, t.body.pos), { line: s } = Vs(e, t.body.end); + if (i < s) + return jl(n, zw(i, e) - n + 1); + } + return Mc(n, t.end); + } + function H2(e, t) { + let n = t; + switch (t.kind) { + case 307: { + const o = sa( + e.text, + 0, + /*stopAfterLineBreak*/ + !1 + ); + return o === e.text.length ? jl(0, 0) : Hm(e, o); + } + case 260: + case 208: + case 263: + case 231: + case 264: + case 267: + case 266: + case 306: + case 262: + case 218: + case 174: + case 177: + case 178: + case 265: + case 172: + case 171: + case 274: + n = t.name; + break; + case 219: + return WOe(e, t); + case 296: + case 297: { + const o = sa(e.text, t.pos), c = t.statements.length > 0 ? t.statements[0].pos : t.end; + return Mc(o, c); + } + case 253: + case 229: { + const o = sa(e.text, t.pos); + return Hm(e, o); + } + case 238: { + const o = sa(e.text, t.expression.end); + return Hm(e, o); + } + case 350: { + const o = sa(e.text, t.tagName.pos); + return Hm(e, o); + } + case 176: { + const o = t, c = sa(e.text, o.pos), _ = Eg( + e.languageVersion, + /*skipTrivia*/ + !0, + e.languageVariant, + e.text, + /*onError*/ + void 0, + c + ); + let u = _.scan(); + for (; u !== 137 && u !== 1; ) + u = _.scan(); + const d = _.getTokenEnd(); + return Mc(c, d); + } + } + if (n === void 0) + return Hm(e, t.pos); + E.assert(!Ed(n)); + const i = ic(n), s = i || cx(t) ? n.pos : sa(e.text, n.pos); + return i ? (E.assert(s === n.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"), E.assert(s === n.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")) : (E.assert(s >= n.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"), E.assert(s <= n.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")), Mc(s, n.end); + } + function s0(e) { + return e.kind === 307 && !A_(e); + } + function A_(e) { + return (e.externalModuleIndicator || e.commonJsModuleIndicator) !== void 0; + } + function Ap(e) { + return e.scriptKind === 6; + } + function fb(e) { + return !!(L1(e) & 4096); + } + function Gw(e) { + return !!(L1(e) & 8 && !Q_(e, e.parent)); + } + function $w(e) { + return (ch(e) & 7) === 6; + } + function Xw(e) { + return (ch(e) & 7) === 4; + } + function iC(e) { + return (ch(e) & 7) === 2; + } + function DZ(e) { + const t = ch(e) & 7; + return t === 2 || t === 4 || t === 6; + } + function u7(e) { + return (ch(e) & 7) === 1; + } + function G2(e) { + return e.kind === 213 && e.expression.kind === 108; + } + function hf(e) { + return e.kind === 213 && e.expression.kind === 102; + } + function sC(e) { + return rD(e) && e.keywordToken === 102 && e.name.escapedText === "meta"; + } + function a0(e) { + return Qm(e) && y0(e.argument) && Ks(e.argument.literal); + } + function Kd(e) { + return e.kind === 244 && e.expression.kind === 11; + } + function Qw(e) { + return !!(ua(e) & 2097152); + } + function _7(e) { + return Qw(e) && Ac(e); + } + function VOe(e) { + return Re(e.name) && !e.initializer; + } + function f7(e) { + return Qw(e) && yc(e) && Ri(e.declarationList.declarations, VOe); + } + function Gj(e, t) { + return e.kind !== 12 ? kg(t.text, e.pos) : void 0; + } + function $j(e, t) { + const n = e.kind === 169 || e.kind === 168 || e.kind === 218 || e.kind === 219 || e.kind === 217 || e.kind === 260 || e.kind === 281 ? Hi(oy(t, e.pos), kg(t, e.pos)) : kg(t, e.pos); + return Ln( + n, + (i) => i.end <= e.end && // Due to parse errors sometime empty parameter may get comments assigned to it that end up not in parameter range + t.charCodeAt(i.pos + 1) === 42 && t.charCodeAt(i.pos + 2) === 42 && t.charCodeAt(i.pos + 3) !== 47 + /* slash */ + ); + } + var PZ = /^(\/\/\/\s*/, UOe = /^(\/\/\/\s*/, qOe = /^(\/\/\/\s*/, wZ = /^(\/\/\/\s*/, HOe = /^\/\/\/\s*/, GOe = /^(\/\/\/\s*/; + function em(e) { + if (182 <= e.kind && e.kind <= 205) + return !0; + switch (e.kind) { + case 133: + case 159: + case 150: + case 163: + case 154: + case 136: + case 155: + case 151: + case 157: + case 106: + case 146: + return !0; + case 116: + return e.parent.kind !== 222; + case 233: + return yhe(e); + case 168: + return e.parent.kind === 200 || e.parent.kind === 195; + case 80: + (e.parent.kind === 166 && e.parent.right === e || e.parent.kind === 211 && e.parent.name === e) && (e = e.parent), E.assert(e.kind === 80 || e.kind === 166 || e.kind === 211, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + case 166: + case 211: + case 110: { + const { parent: t } = e; + if (t.kind === 186) + return !1; + if (t.kind === 205) + return !t.isTypeOf; + if (182 <= t.kind && t.kind <= 205) + return !0; + switch (t.kind) { + case 233: + return yhe(t); + case 168: + return e === t.constraint; + case 345: + return e === t.constraint; + case 172: + case 171: + case 169: + case 260: + return e === t.type; + case 262: + case 218: + case 219: + case 176: + case 174: + case 173: + case 177: + case 178: + return e === t.type; + case 179: + case 180: + case 181: + return e === t.type; + case 216: + return e === t.type; + case 213: + case 214: + case 215: + return ls(t.typeArguments, e); + } + } + } + return !1; + } + function yhe(e) { + return eO(e.parent) || Tx(e.parent) || nf(e.parent) && !q7(e); + } + function vhe(e, t) { + for (; e; ) { + if (e.kind === t) + return !0; + e = e.parent; + } + return !1; + } + function o0(e, t) { + return n(e); + function n(i) { + switch (i.kind) { + case 253: + return t(i); + case 269: + case 241: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 254: + case 255: + case 296: + case 297: + case 256: + case 258: + case 299: + return gs(i, n); + } + } + } + function AZ(e, t) { + return n(e); + function n(i) { + switch (i.kind) { + case 229: + t(i); + const s = i.expression; + s && n(s); + return; + case 266: + case 264: + case 267: + case 265: + return; + default: + if (ps(i)) { + if (i.name && i.name.kind === 167) { + n(i.name.expression); + return; + } + } else em(i) || gs(i, n); + } + } + } + function Xj(e) { + return e && e.kind === 188 ? e.elementType : e && e.kind === 183 ? Rm(e.typeArguments) : void 0; + } + function NZ(e) { + switch (e.kind) { + case 264: + case 263: + case 231: + case 187: + return e.members; + case 210: + return e.properties; + } + } + function FT(e) { + if (e) + switch (e.kind) { + case 208: + case 306: + case 169: + case 303: + case 172: + case 171: + case 304: + case 260: + return !0; + } + return !1; + } + function IZ(e) { + return FT(e) || _y(e); + } + function i4(e) { + return e.parent.kind === 261 && e.parent.parent.kind === 243; + } + function OZ(e) { + return Qr(e) ? Gs(e.parent) && cn(e.parent.parent) && mc(e.parent.parent) === 2 || p7(e.parent) : !1; + } + function p7(e) { + return Qr(e) ? cn(e) && mc(e) === 1 : !1; + } + function FZ(e) { + return (ti(e) ? iC(e) && Re(e.name) && i4(e) : rs(e) ? T4(e) && Uc(e) : I_(e) && T4(e)) || p7(e); + } + function LZ(e) { + switch (e.kind) { + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + return !0; + } + return !1; + } + function Qj(e, t) { + for (; ; ) { + if (t && t(e), e.statement.kind !== 256) + return e.statement; + e = e.statement; + } + } + function pb(e) { + return e && e.kind === 241 && ps(e.parent); + } + function Yp(e) { + return e && e.kind === 174 && e.parent.kind === 210; + } + function d7(e) { + return (e.kind === 174 || e.kind === 177 || e.kind === 178) && (e.parent.kind === 210 || e.parent.kind === 231); + } + function MZ(e) { + return e && e.kind === 1; + } + function RZ(e) { + return e && e.kind === 0; + } + function aC(e, t, n, i) { + return rr(e?.properties, (s) => { + if (!qc(s)) return; + const o = n4(s.name); + return t === o || i && i === o ? n(s) : void 0; + }); + } + function jZ(e, t, n) { + return aC(e, t, (i) => Wl(i.initializer) ? Nn(i.initializer.elements, (s) => Ks(s) && s.text === n) : void 0); + } + function s4(e) { + if (e && e.statements.length) { + const t = e.statements[0].expression; + return Jn(t, Gs); + } + } + function m7(e, t, n) { + return Yw(e, t, (i) => Wl(i.initializer) ? Nn(i.initializer.elements, (s) => Ks(s) && s.text === n) : void 0); + } + function Yw(e, t, n) { + return aC(s4(e), t, n); + } + function yf(e) { + return sr(e.parent, ps); + } + function BZ(e) { + return sr(e.parent, so); + } + function Nl(e) { + return sr(e.parent, Qn); + } + function JZ(e) { + return sr(e.parent, (t) => Qn(t) || ps(t) ? "quit" : ac(t)); + } + function g7(e) { + return sr(e.parent, Qk); + } + function h7(e) { + const t = sr(e.parent, (n) => Qn(n) ? "quit" : dl(n)); + return t && Qn(t.parent) ? Nl(t.parent) : Nl(t ?? e); + } + function Uu(e, t, n) { + for (E.assert( + e.kind !== 307 + /* SourceFile */ + ); ; ) { + if (e = e.parent, !e) + return E.fail(); + switch (e.kind) { + case 167: + if (n && Qn(e.parent.parent)) + return e; + e = e.parent.parent; + break; + case 170: + e.parent.kind === 169 && fl(e.parent.parent) ? e = e.parent.parent : fl(e.parent) && (e = e.parent); + break; + case 219: + if (!t) + continue; + case 262: + case 218: + case 267: + case 175: + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + case 179: + case 180: + case 181: + case 266: + case 307: + return e; + } + } + } + function zZ(e) { + switch (e.kind) { + case 219: + case 262: + case 218: + case 172: + return !0; + case 241: + switch (e.parent.kind) { + case 176: + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + default: + return !1; + } + } + function y7(e) { + Re(e) && (rl(e.parent) || Ac(e.parent)) && e.parent.name === e && (e = e.parent); + const t = Uu( + e, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !1 + ); + return yi(t); + } + function WZ(e) { + const t = Uu( + e, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (t) + switch (t.kind) { + case 176: + case 262: + case 218: + return t; + } + } + function Zw(e, t) { + for (; ; ) { + if (e = e.parent, !e) + return; + switch (e.kind) { + case 167: + e = e.parent; + break; + case 262: + case 218: + case 219: + if (!t) + continue; + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + case 175: + return e; + case 170: + e.parent.kind === 169 && fl(e.parent.parent) ? e = e.parent.parent : fl(e.parent) && (e = e.parent); + break; + } + } + } + function db(e) { + if (e.kind === 218 || e.kind === 219) { + let t = e, n = e.parent; + for (; n.kind === 217; ) + t = n, n = n.parent; + if (n.kind === 213 && n.expression === t) + return n; + } + } + function bhe(e) { + return e.kind === 108 || f_(e); + } + function f_(e) { + const t = e.kind; + return (t === 211 || t === 212) && e.expression.kind === 108; + } + function Kw(e) { + const t = e.kind; + return (t === 211 || t === 212) && e.expression.kind === 110; + } + function v7(e) { + var t; + return !!e && ti(e) && ((t = e.initializer) == null ? void 0 : t.kind) === 110; + } + function VZ(e) { + return !!e && (du(e) || qc(e)) && cn(e.parent.parent) && e.parent.parent.operatorToken.kind === 64 && e.parent.parent.right.kind === 110; + } + function e3(e) { + switch (e.kind) { + case 183: + return e.typeName; + case 233: + return fo(e.expression) ? e.expression : void 0; + case 80: + case 166: + return e; + } + } + function b7(e) { + switch (e.kind) { + case 215: + return e.tag; + case 286: + case 285: + return e.tagName; + case 226: + return e.right; + default: + return e.expression; + } + } + function t3(e, t, n, i) { + if (e && Bl(t) && wi(t.name)) + return !1; + switch (t.kind) { + case 263: + return !0; + case 231: + return !e; + case 172: + return n !== void 0 && (e ? rl(n) : Qn(n) && !xb(t) && !wB(t)); + case 177: + case 178: + case 174: + return t.body !== void 0 && n !== void 0 && (e ? rl(n) : Qn(n)); + case 169: + return e ? n !== void 0 && n.body !== void 0 && (n.kind === 176 || n.kind === 174 || n.kind === 178) && bb(n) !== t && i !== void 0 && i.kind === 263 : !1; + } + return !1; + } + function oC(e, t, n, i) { + return wf(t) && t3(e, t, n, i); + } + function r3(e, t, n, i) { + return oC(e, t, n, i) || a4(e, t, n); + } + function a4(e, t, n) { + switch (t.kind) { + case 263: + return ut(t.members, (i) => r3(e, i, t, n)); + case 231: + return !e && ut(t.members, (i) => r3(e, i, t, n)); + case 174: + case 178: + case 176: + return ut(t.parameters, (i) => oC(e, i, t, n)); + default: + return !1; + } + } + function c0(e, t) { + if (oC(e, t)) return !0; + const n = Ng(t); + return !!n && a4(e, n, t); + } + function Yj(e, t, n) { + let i; + if (_y(t)) { + const { firstAccessor: s, secondAccessor: o, setAccessor: c } = gy(n.members, t), _ = wf(s) ? s : o && wf(o) ? o : void 0; + if (!_ || t !== _) + return !1; + i = c?.parameters; + } else hc(t) && (i = t.parameters); + if (oC(e, t, n)) + return !0; + if (i) { + for (const s of i) + if (!Sb(s) && oC(e, s, t, n)) + return !0; + } + return !1; + } + function Zj(e) { + if (e.textSourceNode) { + switch (e.textSourceNode.kind) { + case 11: + return Zj(e.textSourceNode); + case 15: + return e.text === ""; + } + return !1; + } + return e.text === ""; + } + function cC(e) { + const { parent: t } = e; + return t.kind === 286 || t.kind === 285 || t.kind === 287 ? t.tagName === e : !1; + } + function Sd(e) { + switch (e.kind) { + case 108: + case 106: + case 112: + case 97: + case 14: + case 209: + case 210: + case 211: + case 212: + case 213: + case 214: + case 215: + case 234: + case 216: + case 238: + case 235: + case 217: + case 218: + case 231: + case 219: + case 222: + case 220: + case 221: + case 224: + case 225: + case 226: + case 227: + case 230: + case 228: + case 232: + case 284: + case 285: + case 288: + case 229: + case 223: + case 236: + return !0; + case 233: + return !nf(e.parent) && !Tx(e.parent); + case 166: + for (; e.parent.kind === 166; ) + e = e.parent; + return e.parent.kind === 186 || AT(e.parent) || lD(e.parent) || iv(e.parent) || cC(e); + case 311: + for (; iv(e.parent); ) + e = e.parent; + return e.parent.kind === 186 || AT(e.parent) || lD(e.parent) || iv(e.parent) || cC(e); + case 81: + return cn(e.parent) && e.parent.left === e && e.parent.operatorToken.kind === 103; + case 80: + if (e.parent.kind === 186 || AT(e.parent) || lD(e.parent) || iv(e.parent) || cC(e)) + return !0; + case 9: + case 10: + case 11: + case 15: + case 110: + return S7(e); + default: + return !1; + } + } + function S7(e) { + const { parent: t } = e; + switch (t.kind) { + case 260: + case 169: + case 172: + case 171: + case 306: + case 303: + case 208: + return t.initializer === e; + case 244: + case 245: + case 246: + case 247: + case 253: + case 254: + case 255: + case 296: + case 257: + return t.expression === e; + case 248: + const n = t; + return n.initializer === e && n.initializer.kind !== 261 || n.condition === e || n.incrementor === e; + case 249: + case 250: + const i = t; + return i.initializer === e && i.initializer.kind !== 261 || i.expression === e; + case 216: + case 234: + return e === t.expression; + case 239: + return e === t.expression; + case 167: + return e === t.expression; + case 170: + case 294: + case 293: + case 305: + return !0; + case 233: + return t.expression === e && !em(t); + case 304: + return t.objectAssignmentInitializer === e; + case 238: + return e === t.expression; + default: + return Sd(t); + } + } + function T7(e) { + for (; e.kind === 166 || e.kind === 80; ) + e = e.parent; + return e.kind === 186; + } + function UZ(e) { + return Ym(e) && !!e.parent.moduleSpecifier; + } + function V1(e) { + return e.kind === 271 && e.moduleReference.kind === 283; + } + function o4(e) { + return E.assert(V1(e)), e.moduleReference.expression; + } + function Kj(e) { + return mb(e) && xC(e.initializer).arguments[0]; + } + function LT(e) { + return e.kind === 271 && e.moduleReference.kind !== 283; + } + function l0(e) { + return e?.kind === 307; + } + function p_(e) { + return Qr(e); + } + function She(e) { + return !Qr(e); + } + function Qr(e) { + return !!e && !!(e.flags & 524288); + } + function x7(e) { + return !!e && !!(e.flags & 134217728); + } + function k7(e) { + return !Ap(e); + } + function n3(e) { + return !!e && !!(e.flags & 16777216); + } + function C7(e) { + return Nf(e) && Re(e.typeName) && e.typeName.escapedText === "Object" && e.typeArguments && e.typeArguments.length === 2 && (e.typeArguments[0].kind === 154 || e.typeArguments[0].kind === 150); + } + function d_(e, t) { + if (e.kind !== 213) + return !1; + const { expression: n, arguments: i } = e; + if (n.kind !== 80 || n.escapedText !== "require" || i.length !== 1) + return !1; + const s = i[0]; + return !t || Ga(s); + } + function i3(e) { + return The( + e, + /*allowAccessedRequire*/ + !1 + ); + } + function mb(e) { + return The( + e, + /*allowAccessedRequire*/ + !0 + ); + } + function qZ(e) { + return da(e) && mb(e.parent.parent); + } + function The(e, t) { + return ti(e) && !!e.initializer && d_( + t ? xC(e.initializer) : e.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ); + } + function s3(e) { + return yc(e) && e.declarationList.declarations.length > 0 && Ri(e.declarationList.declarations, (t) => i3(t)); + } + function a3(e) { + return e === 39 || e === 34; + } + function E7(e, t) { + return ub(t, e).charCodeAt(0) === 34; + } + function c4(e) { + return cn(e) || go(e) || Re(e) || Es(e); + } + function o3(e) { + return Qr(e) && e.initializer && cn(e.initializer) && (e.initializer.operatorToken.kind === 57 || e.initializer.operatorToken.kind === 61) && e.name && fo(e.name) && lC(e.name, e.initializer.left) ? e.initializer.right : e.initializer; + } + function l4(e) { + const t = o3(e); + return t && U1(t, hy(e.name)); + } + function $Oe(e, t) { + return rr(e.properties, (n) => qc(n) && Re(n.name) && n.name.escapedText === "value" && n.initializer && U1(n.initializer, t)); + } + function MT(e) { + if (e && e.parent && cn(e.parent) && e.parent.operatorToken.kind === 64) { + const t = hy(e.parent.left); + return U1(e.parent.right, t) || XOe(e.parent.left, e.parent.right, t); + } + if (e && Es(e) && X2(e)) { + const t = $Oe(e.arguments[2], e.arguments[1].text === "prototype"); + if (t) + return t; + } + } + function U1(e, t) { + if (Es(e)) { + const n = Ja(e.expression); + return n.kind === 218 || n.kind === 219 ? e : void 0; + } + if (e.kind === 218 || e.kind === 231 || e.kind === 219 || Gs(e) && (e.properties.length === 0 || t)) + return e; + } + function XOe(e, t, n) { + const i = cn(t) && (t.operatorToken.kind === 57 || t.operatorToken.kind === 61) && U1(t.right, n); + if (i && lC(e, t.left)) + return i; + } + function HZ(e) { + const t = ti(e.parent) ? e.parent.name : cn(e.parent) && e.parent.operatorToken.kind === 64 ? e.parent.left : void 0; + return t && U1(e.right, hy(t)) && fo(t) && lC(t, e.left); + } + function eB(e) { + if (cn(e.parent)) { + const t = (e.parent.operatorToken.kind === 57 || e.parent.operatorToken.kind === 61) && cn(e.parent.parent) ? e.parent.parent : e.parent; + if (t.operatorToken.kind === 64 && Re(t.left)) + return t.left; + } else if (ti(e.parent)) + return e.parent.name; + } + function lC(e, t) { + return rm(e) && rm(t) ? Ip(e) === Ip(t) : Dg(e) && D7(t) && (t.expression.kind === 110 || Re(t.expression) && (t.expression.escapedText === "window" || t.expression.escapedText === "self" || t.expression.escapedText === "global")) ? lC(e, u3(t)) : D7(e) && D7(t) ? _h(e) === _h(t) && lC(e.expression, t.expression) : !1; + } + function c3(e) { + for (; Tl( + e, + /*excludeCompoundAssignment*/ + !0 + ); ) + e = e.right; + return e; + } + function $2(e) { + return Re(e) && e.escapedText === "exports"; + } + function tB(e) { + return Re(e) && e.escapedText === "module"; + } + function Ag(e) { + return (Dn(e) || l3(e)) && tB(e.expression) && _h(e) === "exports"; + } + function mc(e) { + const t = QOe(e); + return t === 5 || Qr(e) ? t : 0; + } + function X2(e) { + return Dr(e.arguments) === 3 && Dn(e.expression) && Re(e.expression.expression) && dn(e.expression.expression) === "Object" && dn(e.expression.name) === "defineProperty" && Pf(e.arguments[1]) && Q2( + e.arguments[0], + /*excludeThisKeyword*/ + !0 + ); + } + function D7(e) { + return Dn(e) || l3(e); + } + function l3(e) { + return ho(e) && Pf(e.argumentExpression); + } + function gb(e, t) { + return Dn(e) && (!t && e.expression.kind === 110 || Re(e.name) && Q2( + e.expression, + /*excludeThisKeyword*/ + !0 + )) || P7(e, t); + } + function P7(e, t) { + return l3(e) && (!t && e.expression.kind === 110 || fo(e.expression) || gb( + e.expression, + /*excludeThisKeyword*/ + !0 + )); + } + function Q2(e, t) { + return fo(e) || gb(e, t); + } + function u3(e) { + return Dn(e) ? e.name : e.argumentExpression; + } + function QOe(e) { + if (Es(e)) { + if (!X2(e)) + return 0; + const t = e.arguments[0]; + return $2(t) || Ag(t) ? 8 : gb(t) && _h(t) === "prototype" ? 9 : 7; + } + return e.operatorToken.kind !== 64 || !go(e.left) || YOe(c3(e)) ? 0 : Q2( + e.left.expression, + /*excludeThisKeyword*/ + !0 + ) && _h(e.left) === "prototype" && Gs(rB(e)) ? 6 : _3(e.left); + } + function YOe(e) { + return hx(e) && m_(e.expression) && e.expression.text === "0"; + } + function w7(e) { + if (Dn(e)) + return e.name; + const t = Ja(e.argumentExpression); + return m_(t) || Ga(t) ? t : e; + } + function _h(e) { + const t = w7(e); + if (t) { + if (Re(t)) + return t.escapedText; + if (Ga(t) || m_(t)) + return Ko(t.text); + } + } + function _3(e) { + if (e.expression.kind === 110) + return 4; + if (Ag(e)) + return 2; + if (Q2( + e.expression, + /*excludeThisKeyword*/ + !0 + )) { + if (hy(e.expression)) + return 3; + let t = e; + for (; !Re(t.expression); ) + t = t.expression; + const n = t.expression; + if ((n.escapedText === "exports" || n.escapedText === "module" && _h(t) === "exports") && // ExportsProperty does not support binding with computed names + gb(e)) + return 1; + if (Q2( + e, + /*excludeThisKeyword*/ + !0 + ) || ho(e) && F7(e)) + return 5; + } + return 0; + } + function rB(e) { + for (; cn(e.right); ) + e = e.right; + return e.right; + } + function f3(e) { + return cn(e) && mc(e) === 3; + } + function GZ(e) { + return Qr(e) && e.parent && e.parent.kind === 244 && (!ho(e) || l3(e)) && !!M1(e.parent); + } + function p3(e, t) { + const { valueDeclaration: n } = e; + (!n || !(t.flags & 33554432 && !Qr(t) && !(n.flags & 33554432)) && c4(n) && !c4(t) || n.kind !== t.kind && mZ(n)) && (e.valueDeclaration = t); + } + function $Z(e) { + if (!e || !e.valueDeclaration) + return !1; + const t = e.valueDeclaration; + return t.kind === 262 || ti(t) && t.initializer && ps(t.initializer); + } + function u4(e) { + var t, n; + switch (e.kind) { + case 260: + case 208: + return (t = sr(e.initializer, (i) => d_( + i, + /*requireStringLiteralLikeArgument*/ + !0 + ))) == null ? void 0 : t.arguments[0]; + case 272: + case 278: + case 351: + return Jn(e.moduleSpecifier, Ga); + case 271: + return Jn((n = Jn(e.moduleReference, Sh)) == null ? void 0 : n.expression, Ga); + case 273: + case 280: + return Jn(e.parent.moduleSpecifier, Ga); + case 274: + case 281: + return Jn(e.parent.parent.moduleSpecifier, Ga); + case 276: + return Jn(e.parent.parent.parent.moduleSpecifier, Ga); + case 205: + return a0(e) ? e.argument.literal : void 0; + default: + E.assertNever(e); + } + } + function _4(e) { + return d3(e) || E.failBadSyntaxKind(e.parent); + } + function d3(e) { + switch (e.parent.kind) { + case 272: + case 278: + case 351: + return e.parent; + case 283: + return e.parent.parent; + case 213: + return hf(e.parent) || d_( + e.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) ? e.parent : void 0; + case 201: + return E.assert(Ks(e)), Jn(e.parent.parent, Qm); + default: + return; + } + } + function RT(e) { + switch (e.kind) { + case 272: + case 278: + case 351: + return e.moduleSpecifier; + case 271: + return e.moduleReference.kind === 283 ? e.moduleReference.expression : void 0; + case 205: + return a0(e) ? e.argument.literal : void 0; + case 213: + return e.arguments[0]; + case 267: + return e.name.kind === 11 ? e.name : void 0; + default: + return E.assertNever(e); + } + } + function uC(e) { + switch (e.kind) { + case 272: + return e.importClause && Jn(e.importClause.namedBindings, Rg); + case 271: + return e; + case 278: + return e.exportClause && Jn(e.exportClause, Ym); + default: + return E.assertNever(e); + } + } + function jT(e) { + return (e.kind === 272 || e.kind === 351) && !!e.importClause && !!e.importClause.name; + } + function XZ(e, t) { + if (e.name) { + const n = t(e); + if (n) return n; + } + if (e.namedBindings) { + const n = Rg(e.namedBindings) ? t(e.namedBindings) : rr(e.namedBindings.elements, t); + if (n) return n; + } + } + function BT(e) { + if (e) + switch (e.kind) { + case 169: + case 174: + case 173: + case 304: + case 303: + case 172: + case 171: + return e.questionToken !== void 0; + } + return !1; + } + function _C(e) { + const t = LC(e) ? ul(e.parameters) : void 0, n = Jn(t && t.name, Re); + return !!n && n.escapedText === "new"; + } + function Np(e) { + return e.kind === 346 || e.kind === 338 || e.kind === 340; + } + function m3(e) { + return Np(e) || Rp(e); + } + function ZOe(e) { + return Pl(e) && cn(e.expression) && e.expression.operatorToken.kind === 64 ? c3(e.expression) : void 0; + } + function xhe(e) { + return Pl(e) && cn(e.expression) && mc(e.expression) !== 0 && cn(e.expression.right) && (e.expression.right.operatorToken.kind === 57 || e.expression.right.operatorToken.kind === 61) ? e.expression.right.right : void 0; + } + function nB(e) { + switch (e.kind) { + case 243: + const t = JT(e); + return t && t.initializer; + case 172: + return e.initializer; + case 303: + return e.initializer; + } + } + function JT(e) { + return yc(e) ? ul(e.declarationList.declarations) : void 0; + } + function khe(e) { + return Nc(e) && e.body && e.body.kind === 267 ? e.body : void 0; + } + function g3(e) { + if (e.kind >= 243 && e.kind <= 259) + return !0; + switch (e.kind) { + case 80: + case 110: + case 108: + case 166: + case 236: + case 212: + case 211: + case 208: + case 218: + case 219: + case 174: + case 177: + case 178: + return !0; + default: + return !1; + } + } + function h3(e) { + switch (e.kind) { + case 219: + case 226: + case 241: + case 252: + case 179: + case 296: + case 263: + case 231: + case 175: + case 176: + case 185: + case 180: + case 251: + case 259: + case 246: + case 212: + case 242: + case 1: + case 266: + case 306: + case 277: + case 278: + case 281: + case 244: + case 249: + case 250: + case 248: + case 262: + case 218: + case 184: + case 177: + case 80: + case 245: + case 272: + case 271: + case 181: + case 264: + case 317: + case 323: + case 256: + case 174: + case 173: + case 267: + case 202: + case 270: + case 210: + case 169: + case 217: + case 211: + case 303: + case 172: + case 171: + case 253: + case 240: + case 178: + case 304: + case 305: + case 255: + case 257: + case 258: + case 265: + case 168: + case 260: + case 243: + case 247: + case 254: + return !0; + default: + return !1; + } + } + function iB(e, t) { + let n; + FT(e) && i0(e) && gf(e.initializer) && (n = Bn(n, Che(e, e.initializer.jsDoc))); + let i = e; + for (; i && i.parent; ) { + if (gf(i) && (n = Bn(n, Che(e, i.jsDoc))), i.kind === 169) { + n = Bn(n, (t ? xY : Gk)(i)); + break; + } + if (i.kind === 168) { + n = Bn(n, (t ? CY : kY)(i)); + break; + } + i = sB(i); + } + return n || He; + } + function Che(e, t) { + const n = ia(t); + return Xs(t, (i) => { + if (i === n) { + const s = Ln(i.tags, (o) => KOe(e, o)); + return i.tags === s ? [i] : s; + } else + return Ln(i.tags, MC); + }); + } + function KOe(e, t) { + return !(uD(t) || tO(t)) || !t.parent || !Ed(t.parent) || !Qu(t.parent.parent) || t.parent.parent === e; + } + function sB(e) { + const t = e.parent; + if (t.kind === 303 || t.kind === 277 || t.kind === 172 || t.kind === 244 && e.kind === 211 || t.kind === 253 || khe(t) || Tl(e)) + return t; + if (t.parent && (JT(t.parent) === e || Tl(t))) + return t.parent; + if (t.parent && t.parent.parent && (JT(t.parent.parent) || nB(t.parent.parent) === e || xhe(t.parent.parent))) + return t.parent.parent; + } + function y3(e) { + if (e.symbol) + return e.symbol; + if (!Re(e.name)) + return; + const t = e.name.escapedText, n = q1(e); + if (!n) + return; + const i = Nn(n.parameters, (s) => s.name.kind === 80 && s.name.escapedText === t); + return i && i.symbol; + } + function A7(e) { + if (Ed(e.parent) && e.parent.tags) { + const t = Nn(e.parent.tags, Np); + if (t) + return t; + } + return q1(e); + } + function aB(e) { + return RI(e, MC); + } + function q1(e) { + const t = H1(e); + if (t) + return I_(t) && t.type && ps(t.type) ? t.type : ps(t) ? t : void 0; + } + function H1(e) { + const t = hb(e); + if (t) + return xhe(t) || ZOe(t) || nB(t) || JT(t) || khe(t) || t; + } + function hb(e) { + const t = fC(e); + if (!t) + return; + const n = t.parent; + if (n && n.jsDoc && t === Bo(n.jsDoc)) + return n; + } + function fC(e) { + return sr(e.parent, Ed); + } + function QZ(e) { + const t = e.name.escapedText, { typeParameters: n } = e.parent.parent.parent; + return n && Nn(n, (i) => i.name.escapedText === t); + } + function Ehe(e) { + return !!e.typeArguments; + } + var YZ = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Definite = 1] = "Definite", e[e.Compound = 2] = "Compound", e))(YZ || {}); + function ZZ(e) { + let t = e.parent; + for (; ; ) { + switch (t.kind) { + case 226: + const n = t, i = n.operatorToken.kind; + return dh(i) && n.left === e ? n : void 0; + case 224: + case 225: + const s = t, o = s.operator; + return o === 46 || o === 47 ? s : void 0; + case 249: + case 250: + const c = t; + return c.initializer === e ? c : void 0; + case 217: + case 209: + case 230: + case 235: + e = t; + break; + case 305: + e = t.parent; + break; + case 304: + if (t.name !== e) + return; + e = t.parent; + break; + case 303: + if (t.name === e) + return; + e = t.parent; + break; + default: + return; + } + t = e.parent; + } + } + function G1(e) { + const t = ZZ(e); + if (!t) + return 0; + switch (t.kind) { + case 226: + const n = t.operatorToken.kind; + return n === 64 || x4(n) ? 1 : 2; + case 224: + case 225: + return 2; + case 249: + case 250: + return 1; + } + } + function u0(e) { + return !!ZZ(e); + } + function eFe(e) { + const t = Ja(e.right); + return t.kind === 226 && nz(t.operatorToken.kind); + } + function oB(e) { + const t = ZZ(e); + return !!t && Tl( + t, + /*excludeCompoundAssignment*/ + !0 + ) && eFe(t); + } + function KZ(e) { + switch (e.kind) { + case 241: + case 243: + case 254: + case 245: + case 255: + case 269: + case 296: + case 297: + case 256: + case 248: + case 249: + case 250: + case 246: + case 247: + case 258: + case 299: + return !0; + } + return !1; + } + function zT(e) { + return po(e) || xo(e) || PT(e) || Ac(e) || ec(e); + } + function Dhe(e, t) { + for (; e && e.kind === t; ) + e = e.parent; + return e; + } + function v3(e) { + return Dhe( + e, + 196 + /* ParenthesizedType */ + ); + } + function fh(e) { + return Dhe( + e, + 217 + /* ParenthesizedExpression */ + ); + } + function eK(e) { + let t; + for (; e && e.kind === 196; ) + t = e, e = e.parent; + return [t, e]; + } + function f4(e) { + for (; nS(e); ) e = e.type; + return e; + } + function Ja(e, t) { + return Bc(e, t ? 17 : 1); + } + function cB(e) { + return e.kind !== 211 && e.kind !== 212 ? !1 : (e = fh(e.parent), e && e.kind === 220); + } + function yb(e, t) { + for (; e; ) { + if (e === t) return !0; + e = e.parent; + } + return !1; + } + function Gm(e) { + return !yi(e) && !Ts(e) && tu(e.parent) && e.parent.name === e; + } + function p4(e) { + const t = e.parent; + switch (e.kind) { + case 11: + case 15: + case 9: + if (oa(t)) return t.parent; + case 80: + if (tu(t)) + return t.name === e ? t : void 0; + if ($u(t)) { + const n = t.parent; + return up(n) && n.name === t ? n : void 0; + } else { + const n = t.parent; + return cn(n) && mc(n) !== 0 && (n.left.symbol || n.symbol) && es(n) === e ? n : void 0; + } + case 81: + return tu(t) && t.name === e ? t : void 0; + default: + return; + } + } + function b3(e) { + return Pf(e) && e.parent.kind === 167 && tu(e.parent.parent); + } + function tK(e) { + const t = e.parent; + switch (t.kind) { + case 172: + case 171: + case 174: + case 173: + case 177: + case 178: + case 306: + case 303: + case 211: + return t.name === e; + case 166: + return t.right === e; + case 208: + case 276: + return t.propertyName === e; + case 281: + case 291: + case 285: + case 286: + case 287: + return !0; + } + return !1; + } + function Phe(e) { + return e.kind === 271 || e.kind === 270 || e.kind === 273 && e.name || e.kind === 274 || e.kind === 280 || e.kind === 276 || e.kind === 281 || e.kind === 277 && pC(e) ? !0 : Qr(e) && (cn(e) && mc(e) === 2 && pC(e) || Dn(e) && cn(e.parent) && e.parent.left === e && e.parent.operatorToken.kind === 64 && S3(e.parent.right)); + } + function lB(e) { + switch (e.parent.kind) { + case 273: + case 276: + case 274: + case 281: + case 277: + case 271: + case 280: + return e.parent; + case 166: + do + e = e.parent; + while (e.parent.kind === 166); + return lB(e); + } + } + function S3(e) { + return fo(e) || tl(e); + } + function pC(e) { + const t = uB(e); + return S3(t); + } + function uB(e) { + return ko(e) ? e.expression : e.right; + } + function rK(e) { + return e.kind === 304 ? e.name : e.kind === 303 ? e.initializer : e.parent.right; + } + function tm(e) { + const t = vb(e); + if (t && Qr(e)) { + const n = DY(e); + if (n) + return n.class; + } + return t; + } + function vb(e) { + const t = T3( + e.heritageClauses, + 96 + /* ExtendsKeyword */ + ); + return t && t.types.length > 0 ? t.types[0] : void 0; + } + function dC(e) { + if (Qr(e)) + return PY(e).map((t) => t.class); + { + const t = T3( + e.heritageClauses, + 119 + /* ImplementsKeyword */ + ); + return t?.types; + } + } + function d4(e) { + return Vl(e) ? m4(e) || He : Qn(e) && Hi(ST(tm(e)), dC(e)) || He; + } + function m4(e) { + const t = T3( + e.heritageClauses, + 96 + /* ExtendsKeyword */ + ); + return t ? t.types : void 0; + } + function T3(e, t) { + if (e) { + for (const n of e) + if (n.token === t) + return n; + } + } + function $1(e, t) { + for (; e; ) { + if (e.kind === t) + return e; + e = e.parent; + } + } + function qu(e) { + return 83 <= e && e <= 165; + } + function _B(e) { + return 19 <= e && e <= 79; + } + function N7(e) { + return qu(e) || _B(e); + } + function I7(e) { + return 128 <= e && e <= 165; + } + function fB(e) { + return qu(e) && !I7(e); + } + function whe(e) { + return 119 <= e && e <= 127; + } + function WT(e) { + const t = ib(e); + return t !== void 0 && fB(t); + } + function Ahe(e) { + const t = ib(e); + return t !== void 0 && qu(t); + } + function pB(e) { + const t = B2(e); + return !!t && !I7(t); + } + function mC(e) { + return 2 <= e && e <= 7; + } + var nK = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Generator = 1] = "Generator", e[e.Async = 2] = "Async", e[e.Invalid = 4] = "Invalid", e[e.AsyncGenerator = 3] = "AsyncGenerator", e))(nK || {}); + function jc(e) { + if (!e) + return 4; + let t = 0; + switch (e.kind) { + case 262: + case 218: + case 174: + e.asteriskToken && (t |= 1); + case 219: + Vn( + e, + 1024 + /* Async */ + ) && (t |= 2); + break; + } + return e.body || (t |= 4), t; + } + function g4(e) { + switch (e.kind) { + case 262: + case 218: + case 219: + case 174: + return e.body !== void 0 && e.asteriskToken === void 0 && Vn( + e, + 1024 + /* Async */ + ); + } + return !1; + } + function Pf(e) { + return Ga(e) || m_(e); + } + function O7(e) { + return Ey(e) && (e.operator === 40 || e.operator === 41) && m_(e.operand); + } + function ph(e) { + const t = es(e); + return !!t && F7(t); + } + function F7(e) { + if (!(e.kind === 167 || e.kind === 212)) + return !1; + const t = ho(e) ? Ja(e.argumentExpression) : e.expression; + return !Pf(t) && !O7(t); + } + function Y2(e) { + switch (e.kind) { + case 80: + case 81: + return e.escapedText; + case 11: + case 15: + case 9: + return Ko(e.text); + case 167: + const t = e.expression; + return Pf(t) ? Ko(t.text) : O7(t) ? t.operator === 41 ? Ws(t.operator) + t.operand.text : t.operand.text : void 0; + case 295: + return rx(e); + default: + return E.assertNever(e); + } + } + function rm(e) { + switch (e.kind) { + case 80: + case 11: + case 15: + case 9: + return !0; + default: + return !1; + } + } + function Ip(e) { + return Dg(e) ? dn(e) : Cd(e) ? G4(e) : e.text; + } + function h4(e) { + return Dg(e) ? e.escapedText : Cd(e) ? rx(e) : Ko(e.text); + } + function Nhe(e) { + return `__@${$s(e)}@${e.escapedName}`; + } + function x3(e, t) { + return `__#${$s(e)}@${t}`; + } + function k3(e) { + return zi(e.escapedName, "__@"); + } + function iK(e) { + return zi(e.escapedName, "__#"); + } + function Ihe(e) { + return e.kind === 80 && e.escapedText === "Symbol"; + } + function sK(e) { + return Re(e) ? dn(e) === "__proto__" : Ks(e) && e.text === "__proto__"; + } + function y4(e, t) { + switch (e = Bc(e), e.kind) { + case 231: + if (uW(e)) + return !1; + break; + case 218: + if (e.name) + return !1; + break; + case 219: + break; + default: + return !1; + } + return typeof t == "function" ? t(e) : !0; + } + function dB(e) { + switch (e.kind) { + case 303: + return !sK(e.name); + case 304: + return !!e.objectAssignmentInitializer; + case 260: + return Re(e.name) && !!e.initializer; + case 169: + return Re(e.name) && !!e.initializer && !e.dotDotDotToken; + case 208: + return Re(e.name) && !!e.initializer && !e.dotDotDotToken; + case 172: + return !!e.initializer; + case 226: + switch (e.operatorToken.kind) { + case 64: + case 77: + case 76: + case 78: + return Re(e.left); + } + break; + case 277: + return !0; + } + return !1; + } + function Z_(e, t) { + if (!dB(e)) return !1; + switch (e.kind) { + case 303: + return y4(e.initializer, t); + case 304: + return y4(e.objectAssignmentInitializer, t); + case 260: + case 169: + case 208: + case 172: + return y4(e.initializer, t); + case 226: + return y4(e.right, t); + case 277: + return y4(e.expression, t); + } + } + function mB(e) { + return e.escapedText === "push" || e.escapedText === "unshift"; + } + function X1(e) { + return nm(e).kind === 169; + } + function nm(e) { + for (; e.kind === 208; ) + e = e.parent.parent; + return e; + } + function gB(e) { + const t = e.kind; + return t === 176 || t === 218 || t === 262 || t === 219 || t === 174 || t === 177 || t === 178 || t === 267 || t === 307; + } + function oo(e) { + return xd(e.pos) || xd(e.end); + } + function Ohe(e) { + return Ki(e, yi) || e; + } + var aK = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(aK || {}); + function hB(e) { + const t = vB(e), n = e.kind === 214 && e.arguments !== void 0; + return yB(e.kind, t, n); + } + function yB(e, t, n) { + switch (e) { + case 214: + return n ? 0 : 1; + case 224: + case 221: + case 222: + case 220: + case 223: + case 227: + case 229: + return 1; + case 226: + switch (t) { + case 43: + case 64: + case 65: + case 66: + case 68: + case 67: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 79: + case 75: + case 76: + case 77: + case 78: + return 1; + } + } + return 0; + } + function v4(e) { + const t = vB(e), n = e.kind === 214 && e.arguments !== void 0; + return C3(e.kind, t, n); + } + function vB(e) { + return e.kind === 226 ? e.operatorToken.kind : e.kind === 224 || e.kind === 225 ? e.operator : e.kind; + } + var oK = /* @__PURE__ */ ((e) => (e[e.Comma = 0] = "Comma", e[e.Spread = 1] = "Spread", e[e.Yield = 2] = "Yield", e[e.Assignment = 3] = "Assignment", e[e.Conditional = 4] = "Conditional", e[ + e.Coalesce = 4 + /* Conditional */ + ] = "Coalesce", e[e.LogicalOR = 5] = "LogicalOR", e[e.LogicalAND = 6] = "LogicalAND", e[e.BitwiseOR = 7] = "BitwiseOR", e[e.BitwiseXOR = 8] = "BitwiseXOR", e[e.BitwiseAND = 9] = "BitwiseAND", e[e.Equality = 10] = "Equality", e[e.Relational = 11] = "Relational", e[e.Shift = 12] = "Shift", e[e.Additive = 13] = "Additive", e[e.Multiplicative = 14] = "Multiplicative", e[e.Exponentiation = 15] = "Exponentiation", e[e.Unary = 16] = "Unary", e[e.Update = 17] = "Update", e[e.LeftHandSide = 18] = "LeftHandSide", e[e.Member = 19] = "Member", e[e.Primary = 20] = "Primary", e[ + e.Highest = 20 + /* Primary */ + ] = "Highest", e[ + e.Lowest = 0 + /* Comma */ + ] = "Lowest", e[e.Invalid = -1] = "Invalid", e))(oK || {}); + function C3(e, t, n) { + switch (e) { + case 355: + return 0; + case 230: + return 1; + case 229: + return 2; + case 227: + return 4; + case 226: + switch (t) { + case 28: + return 0; + case 64: + case 65: + case 66: + case 68: + case 67: + case 69: + case 70: + case 71: + case 72: + case 73: + case 74: + case 79: + case 75: + case 76: + case 77: + case 78: + return 3; + default: + return E3(t); + } + case 216: + case 235: + case 224: + case 221: + case 222: + case 220: + case 223: + return 16; + case 225: + return 17; + case 213: + return 18; + case 214: + return n ? 19 : 18; + case 215: + case 211: + case 212: + case 236: + return 19; + case 234: + case 238: + return 11; + case 110: + case 108: + case 80: + case 81: + case 106: + case 112: + case 97: + case 9: + case 10: + case 11: + case 209: + case 210: + case 218: + case 219: + case 231: + case 14: + case 15: + case 228: + case 217: + case 232: + case 284: + case 285: + case 288: + return 20; + default: + return -1; + } + } + function E3(e) { + switch (e) { + case 61: + return 4; + case 57: + return 5; + case 56: + return 6; + case 52: + return 7; + case 53: + return 8; + case 51: + return 9; + case 35: + case 36: + case 37: + case 38: + return 10; + case 30: + case 32: + case 33: + case 34: + case 104: + case 103: + case 130: + case 152: + return 11; + case 48: + case 49: + case 50: + return 12; + case 40: + case 41: + return 13; + case 42: + case 44: + case 45: + return 14; + case 43: + return 15; + } + return -1; + } + function gC(e) { + return Ln(e, (t) => { + switch (t.kind) { + case 294: + return !!t.expression; + case 12: + return !t.containsOnlyTriviaWhiteSpaces; + default: + return !0; + } + }); + } + function b4() { + let e = []; + const t = [], n = /* @__PURE__ */ new Map(); + let i = !1; + return { + add: o, + lookup: s, + getGlobalDiagnostics: c, + getDiagnostics: _ + }; + function s(u) { + let d; + if (u.file ? d = n.get(u.file.fileName) : d = e, !d) + return; + const g = Zh(d, u, lo, r5); + if (g >= 0) + return d[g]; + if (~g > 0 && n5(u, d[~g - 1])) + return d[~g - 1]; + } + function o(u) { + let d; + u.file ? (d = n.get(u.file.fileName), d || (d = [], n.set(u.file.fileName, d), ry(t, u.file.fileName, Kl))) : (i && (i = !1, e = e.slice()), d = e), ry(d, u, r5, n5); + } + function c() { + return i = !0, e; + } + function _(u) { + if (u) + return n.get(u) || []; + const d = vE(t, (g) => n.get(g)); + return e.length && d.unshift(...e), d; + } + } + var tFe = /\$\{/g; + function bB(e) { + return e.replace(tFe, "\\${"); + } + function cK(e) { + return !!((e.templateFlags || 0) & 2048); + } + function SB(e) { + return e && !!(lx(e) ? cK(e) : cK(e.head) || ut(e.templateSpans, (t) => cK(t.literal))); + } + var rFe = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g, nFe = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g, iFe = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g, sFe = new Map(Object.entries({ + " ": "\\t", + "\v": "\\v", + "\f": "\\f", + "\b": "\\b", + "\r": "\\r", + "\n": "\\n", + "\\": "\\\\", + '"': '\\"', + "'": "\\'", + "`": "\\`", + "\u2028": "\\u2028", + // lineSeparator + "\u2029": "\\u2029", + // paragraphSeparator + "…": "\\u0085", + // nextLine + "\r\n": "\\r\\n" + // special case for CRLFs in backticks + })); + function Fhe(e) { + return "\\u" + ("0000" + e.toString(16).toUpperCase()).slice(-4); + } + function aFe(e, t, n) { + if (e.charCodeAt(0) === 0) { + const i = n.charCodeAt(t + e.length); + return i >= 48 && i <= 57 ? "\\x00" : "\\0"; + } + return sFe.get(e) || Fhe(e.charCodeAt(0)); + } + function $m(e, t) { + const n = t === 96 ? iFe : t === 39 ? nFe : rFe; + return e.replace(n, aFe); + } + var Lhe = /[^\u0000-\u007F]/g; + function L7(e, t) { + return e = $m(e, t), Lhe.test(e) ? e.replace(Lhe, (n) => Fhe(n.charCodeAt(0))) : e; + } + var oFe = /["\u0000-\u001f\u2028\u2029\u0085]/g, cFe = /['\u0000-\u001f\u2028\u2029\u0085]/g, lFe = new Map(Object.entries({ + '"': """, + "'": "'" + })); + function uFe(e) { + return "&#x" + e.toString(16).toUpperCase() + ";"; + } + function _Fe(e) { + return e.charCodeAt(0) === 0 ? "�" : lFe.get(e) || uFe(e.charCodeAt(0)); + } + function TB(e, t) { + const n = t === 39 ? cFe : oFe; + return e.replace(n, _Fe); + } + function Op(e) { + const t = e.length; + return t >= 2 && e.charCodeAt(0) === e.charCodeAt(t - 1) && fFe(e.charCodeAt(0)) ? e.substring(1, t - 1) : e; + } + function fFe(e) { + return e === 39 || e === 34 || e === 96; + } + function hC(e) { + const t = e.charCodeAt(0); + return t >= 97 && t <= 122 || e.includes("-"); + } + var D3 = ["", " "]; + function M7(e) { + const t = D3[1]; + for (let n = D3.length; n <= e; n++) + D3.push(D3[n - 1] + t); + return D3[e]; + } + function yC() { + return D3[1].length; + } + function P3(e) { + var t, n, i, s, o, c = !1; + function _(D) { + const P = kT(D); + P.length > 1 ? (s = s + P.length - 1, o = t.length - D.length + ia(P), i = o - t.length === 0) : i = !1; + } + function u(D) { + D && D.length && (i && (D = M7(n) + D, i = !1), t += D, _(D)); + } + function d(D) { + D && (c = !1), u(D); + } + function g(D) { + D && (c = !0), u(D); + } + function h() { + t = "", n = 0, i = !0, s = 0, o = 0, c = !1; + } + function S(D) { + D !== void 0 && (t += D, _(D), c = !1); + } + function T(D) { + D && D.length && d(D); + } + function C(D) { + (!i || D) && (t += e, s++, o = t.length, i = !0, c = !1); + } + return h(), { + write: d, + rawWrite: S, + writeLiteral: T, + writeLine: C, + increaseIndent: () => { + n++; + }, + decreaseIndent: () => { + n--; + }, + getIndent: () => n, + getTextPos: () => t.length, + getLine: () => s, + getColumn: () => i ? n * yC() : t.length - o, + getText: () => t, + isAtStartOfLine: () => i, + hasTrailingComment: () => c, + hasTrailingWhitespace: () => !!t.length && xg(t.charCodeAt(t.length - 1)), + clear: h, + writeKeyword: d, + writeOperator: d, + writeParameter: d, + writeProperty: d, + writePunctuation: d, + writeSpace: d, + writeStringLiteral: d, + writeSymbol: (D, P) => d(D), + writeTrailingSemicolon: d, + writeComment: g + }; + } + function xB(e) { + let t = !1; + function n() { + t && (e.writeTrailingSemicolon(";"), t = !1); + } + return { + ...e, + writeTrailingSemicolon() { + t = !0; + }, + writeLiteral(i) { + n(), e.writeLiteral(i); + }, + writeStringLiteral(i) { + n(), e.writeStringLiteral(i); + }, + writeSymbol(i, s) { + n(), e.writeSymbol(i, s); + }, + writePunctuation(i) { + n(), e.writePunctuation(i); + }, + writeKeyword(i) { + n(), e.writeKeyword(i); + }, + writeOperator(i) { + n(), e.writeOperator(i); + }, + writeParameter(i) { + n(), e.writeParameter(i); + }, + writeSpace(i) { + n(), e.writeSpace(i); + }, + writeProperty(i) { + n(), e.writeProperty(i); + }, + writeComment(i) { + n(), e.writeComment(i); + }, + writeLine() { + n(), e.writeLine(); + }, + increaseIndent() { + n(), e.increaseIndent(); + }, + decreaseIndent() { + n(), e.decreaseIndent(); + } + }; + } + function vC(e) { + return e.useCaseSensitiveFileNames ? e.useCaseSensitiveFileNames() : !1; + } + function _0(e) { + return eu(vC(e)); + } + function kB(e, t, n) { + return t.moduleName || CB(e, t.fileName, n && n.fileName); + } + function Mhe(e, t) { + return e.getCanonicalFileName(Xi(t, e.getCurrentDirectory())); + } + function lK(e, t, n) { + const i = t.getExternalModuleFileFromDeclaration(n); + if (!i || i.isDeclarationFile) + return; + const s = RT(n); + if (!(s && Ga(s) && !Df(s.text) && !Mhe(e, i.path).includes(Mhe(e, bl(e.getCommonSourceDirectory()))))) + return kB(e, i); + } + function CB(e, t, n) { + const i = (u) => e.getCanonicalFileName(u), s = _o(n ? Xn(n) : e.getCommonSourceDirectory(), e.getCurrentDirectory(), i), o = Xi(t, e.getCurrentDirectory()), c = xT( + s, + o, + s, + i, + /*isAbsolutePathAnUrl*/ + !1 + ), _ = Gu(c); + return n ? j2(_) : _; + } + function uK(e, t, n) { + const i = t.getCompilerOptions(); + let s; + return i.outDir ? s = Gu(z7(e, t, i.outDir)) : s = Gu(e), s + n; + } + function _K(e, t) { + return R7(e, t.getCompilerOptions(), t.getCurrentDirectory(), t.getCommonSourceDirectory(), (n) => t.getCanonicalFileName(n)); + } + function R7(e, t, n, i, s) { + const o = t.declarationDir || t.outDir, c = o ? W7(e, o, n, i, s) : e, _ = j7(c); + return Gu(c) + _; + } + function j7(e) { + return Lc(e, [ + ".mjs", + ".mts" + /* Mts */ + ]) ? ".d.mts" : Lc(e, [ + ".cjs", + ".cts" + /* Cts */ + ]) ? ".d.cts" : Lc(e, [ + ".json" + /* Json */ + ]) ? ".d.json.ts" : ( + // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well + ".d.ts" + ); + } + function fK(e) { + return Lc(e, [ + ".d.mts", + ".mjs", + ".mts" + /* Mts */ + ]) ? [ + ".mts", + ".mjs" + /* Mjs */ + ] : Lc(e, [ + ".d.cts", + ".cjs", + ".cts" + /* Cts */ + ]) ? [ + ".cts", + ".cjs" + /* Cjs */ + ] : Lc(e, [".d.json.ts"]) ? [ + ".json" + /* Json */ + ] : [ + ".tsx", + ".ts", + ".jsx", + ".js" + /* Js */ + ]; + } + function B7(e, t) { + var n; + if (e.paths) + return e.baseUrl ?? E.checkDefined(e.pathsBasePath || ((n = t.getCurrentDirectory) == null ? void 0 : n.call(t)), "Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'."); + } + function J7(e, t, n) { + const i = e.getCompilerOptions(); + if (i.outFile) { + const s = Nu(i), o = i.emitDeclarationOnly || s === 2 || s === 4; + return Ln( + e.getSourceFiles(), + (c) => (o || !il(c)) && Z2(c, e, n) + ); + } else { + const s = t === void 0 ? e.getSourceFiles() : [t]; + return Ln( + s, + (o) => Z2(o, e, n) + ); + } + } + function Z2(e, t, n) { + const i = t.getCompilerOptions(); + if (i.noEmitForJsFiles && p_(e) || e.isDeclarationFile || t.isSourceFileFromExternalLibrary(e)) return !1; + if (n) return !0; + if (t.isSourceOfProjectReferenceRedirect(e.fileName)) return !1; + if (!Ap(e)) return !0; + if (t.getResolvedProjectReferenceToRedirect(e.fileName)) return !1; + if (i.outFile) return !0; + if (!i.outDir) return !1; + if (i.rootDir || i.composite && i.configFilePath) { + const s = Xi(FD(i, () => [], t.getCurrentDirectory(), t.getCanonicalFileName), t.getCurrentDirectory()), o = W7(e.fileName, i.outDir, t.getCurrentDirectory(), s, t.getCanonicalFileName); + if (oh(e.fileName, o, t.getCurrentDirectory(), !t.useCaseSensitiveFileNames()) === 0) return !1; + } + return !0; + } + function z7(e, t, n) { + return W7(e, n, t.getCurrentDirectory(), t.getCommonSourceDirectory(), (i) => t.getCanonicalFileName(i)); + } + function W7(e, t, n, i, s) { + let o = Xi(e, n); + return o = s(o).indexOf(s(i)) === 0 ? o.substring(i.length) : o, Mn(t, o); + } + function w3(e, t, n, i, s, o, c) { + e.writeFile( + n, + i, + s, + (_) => { + t.add(zo(p.Could_not_write_file_0_Colon_1, n, _)); + }, + o, + c + ); + } + function Rhe(e, t, n) { + if (e.length > zm(e) && !n(e)) { + const i = Xn(e); + Rhe(i, t, n), t(e); + } + } + function EB(e, t, n, i, s, o) { + try { + i(e, t, n); + } catch { + Rhe(Xn(Cs(e)), s, o), i(e, t, n); + } + } + function S4(e, t) { + const n = Tg(e); + return ME(n, t); + } + function K2(e, t) { + return ME(e, t); + } + function Ng(e) { + return Nn(e.members, (t) => ec(t) && wp(t.body)); + } + function bC(e) { + if (e && e.parameters.length > 0) { + const t = e.parameters.length === 2 && Sb(e.parameters[0]); + return e.parameters[t ? 1 : 0]; + } + } + function pK(e) { + const t = bC(e); + return t && t.type; + } + function bb(e) { + if (e.parameters.length && !Th(e)) { + const t = e.parameters[0]; + if (Sb(t)) + return t; + } + } + function Sb(e) { + return my(e.name); + } + function my(e) { + return !!e && e.kind === 80 && DB(e); + } + function VT(e) { + return !!sr( + e, + (t) => t.kind === 186 ? !0 : t.kind === 80 || t.kind === 166 ? !1 : "quit" + ); + } + function Tb(e) { + if (!my(e)) + return !1; + for (; $u(e.parent) && e.parent.left === e; ) + e = e.parent; + return e.parent.kind === 186; + } + function DB(e) { + return e.escapedText === "this"; + } + function gy(e, t) { + let n, i, s, o; + return ph(t) ? (n = t, t.kind === 177 ? s = t : t.kind === 178 ? o = t : E.fail("Accessor has wrong kind")) : rr(e, (c) => { + if (_y(c) && Os(c) === Os(t)) { + const _ = Y2(c.name), u = Y2(t.name); + _ === u && (n ? i || (i = c) : n = c, c.kind === 177 && !s && (s = c), c.kind === 178 && !o && (o = c)); + } + }), { + firstAccessor: n, + secondAccessor: i, + getAccessor: s, + setAccessor: o + }; + } + function Vc(e) { + if (!Qr(e) && Ac(e) || Rp(e)) return; + const t = e.type; + return t || !Qr(e) ? t : HE(e) ? e.typeExpression && e.typeExpression.type : R1(e); + } + function dK(e) { + return e.type; + } + function K_(e) { + return Th(e) ? e.type && e.type.typeExpression && e.type.typeExpression.type : e.type || (Qr(e) ? Cw(e) : void 0); + } + function V7(e) { + return Xs(j1(e), (t) => pFe(t) ? t.typeParameters : void 0); + } + function pFe(e) { + return jp(e) && !(e.parent.kind === 320 && (e.parent.tags.some(Np) || e.parent.tags.some(MC))); + } + function mK(e) { + const t = bC(e); + return t && Vc(t); + } + function gK(e, t, n, i) { + hK(e, t, n.pos, i); + } + function hK(e, t, n, i) { + i && i.length && n !== i[0].pos && K2(e, n) !== K2(e, i[0].pos) && t.writeLine(); + } + function yK(e, t, n, i) { + n !== i && K2(e, n) !== K2(e, i) && t.writeLine(); + } + function vK(e, t, n, i, s, o, c, _) { + if (i && i.length > 0) { + s && n.writeSpace(" "); + let u = !1; + for (const d of i) + u && (n.writeSpace(" "), u = !1), _(e, t, n, d.pos, d.end, c), d.hasTrailingNewLine ? n.writeLine() : u = !0; + u && o && n.writeSpace(" "); + } + } + function bK(e, t, n, i, s, o, c) { + let _, u; + if (c ? s.pos === 0 && (_ = Ln(kg(e, s.pos), d)) : _ = kg(e, s.pos), _) { + const g = []; + let h; + for (const S of _) { + if (h) { + const T = K2(t, h.end); + if (K2(t, S.pos) >= T + 2) + break; + } + g.push(S), h = S; + } + if (g.length) { + const S = K2(t, ia(g).end); + K2(t, sa(e, s.pos)) >= S + 2 && (gK(t, n, s, _), vK( + e, + t, + n, + g, + /*leadingSeparator*/ + !1, + /*trailingSeparator*/ + !0, + o, + i + ), u = { nodePos: s.pos, detachedCommentEndPos: ia(g).end }); + } + } + return u; + function d(g) { + return i7(e, g.pos); + } + } + function SC(e, t, n, i, s, o) { + if (e.charCodeAt(i + 1) === 42) { + const c = Vk(t, i), _ = t.length; + let u; + for (let d = i, g = c.line; d < s; g++) { + const h = g + 1 === _ ? e.length + 1 : t[g + 1]; + if (d !== i) { + u === void 0 && (u = jhe(e, t[c.line], i)); + const T = n.getIndent() * yC() - u + jhe(e, d, h); + if (T > 0) { + let C = T % yC(); + const D = M7((T - C) / yC()); + for (n.rawWrite(D); C; ) + n.rawWrite(" "), C--; + } else + n.rawWrite(""); + } + dFe(e, s, n, o, d, h), d = h; + } + } else + n.writeComment(e.substring(i, s)); + } + function dFe(e, t, n, i, s, o) { + const c = Math.min(t, o - 1), _ = e.substring(s, c).trim(); + _ ? (n.writeComment(_), c !== t && n.writeLine()) : n.rawWrite(i); + } + function jhe(e, t, n) { + let i = 0; + for (; t < n && Xd(e.charCodeAt(t)); t++) + e.charCodeAt(t) === 9 ? i += yC() - i % yC() : i++; + return i; + } + function PB(e) { + return Au(e) !== 0; + } + function SK(e) { + return f0(e) !== 0; + } + function ef(e, t) { + return !!UT(e, t); + } + function Vn(e, t) { + return !!TK(e, t); + } + function Os(e) { + return fl(e) && Uc(e) || ac(e); + } + function Uc(e) { + return Vn( + e, + 256 + /* Static */ + ); + } + function U7(e) { + return ef( + e, + 16 + /* Override */ + ); + } + function xb(e) { + return Vn( + e, + 64 + /* Abstract */ + ); + } + function wB(e) { + return Vn( + e, + 128 + /* Ambient */ + ); + } + function im(e) { + return Vn( + e, + 512 + /* Accessor */ + ); + } + function T4(e) { + return ef( + e, + 8 + /* Readonly */ + ); + } + function wf(e) { + return Vn( + e, + 32768 + /* Decorator */ + ); + } + function UT(e, t) { + return Au(e) & t; + } + function TK(e, t) { + return f0(e) & t; + } + function xK(e, t, n) { + return e.kind >= 0 && e.kind <= 165 ? 0 : (e.modifierFlagsCache & 536870912 || (e.modifierFlagsCache = AB(e) | 536870912), n || t && Qr(e) ? (!(e.modifierFlagsCache & 268435456) && e.parent && (e.modifierFlagsCache |= Bhe(e) | 268435456), Jhe(e.modifierFlagsCache)) : mFe(e.modifierFlagsCache)); + } + function Au(e) { + return xK( + e, + /*includeJSDoc*/ + !0 + ); + } + function kK(e) { + return xK( + e, + /*includeJSDoc*/ + !0, + /*alwaysIncludeJSDoc*/ + !0 + ); + } + function f0(e) { + return xK( + e, + /*includeJSDoc*/ + !1 + ); + } + function Bhe(e) { + let t = 0; + return e.parent && !ji(e) && (Qr(e) && (wY(e) && (t |= 8388608), AY(e) && (t |= 16777216), NY(e) && (t |= 33554432), IY(e) && (t |= 67108864), OY(e) && (t |= 134217728)), FY(e) && (t |= 65536)), t; + } + function mFe(e) { + return e & 65535; + } + function Jhe(e) { + return e & 131071 | (e & 260046848) >>> 23; + } + function gFe(e) { + return Jhe(Bhe(e)); + } + function CK(e) { + return AB(e) | gFe(e); + } + function AB(e) { + let t = ed(e) ? sm(e.modifiers) : 0; + return (e.flags & 8 || e.kind === 80 && e.flags & 4096) && (t |= 32), t; + } + function sm(e) { + let t = 0; + if (e) + for (const n of e) + t |= qT(n.kind); + return t; + } + function qT(e) { + switch (e) { + case 126: + return 256; + case 125: + return 1; + case 124: + return 4; + case 123: + return 2; + case 128: + return 64; + case 129: + return 512; + case 95: + return 32; + case 138: + return 128; + case 87: + return 4096; + case 90: + return 2048; + case 134: + return 1024; + case 148: + return 8; + case 164: + return 16; + case 103: + return 8192; + case 147: + return 16384; + case 170: + return 32768; + } + return 0; + } + function zhe(e) { + return e === 57 || e === 56; + } + function EK(e) { + return zhe(e) || e === 54; + } + function x4(e) { + return e === 76 || e === 77 || e === 78; + } + function NB(e) { + return cn(e) && x4(e.operatorToken.kind); + } + function A3(e) { + return zhe(e) || e === 61; + } + function N3(e) { + return cn(e) && A3(e.operatorToken.kind); + } + function dh(e) { + return e >= 64 && e <= 79; + } + function IB(e) { + const t = OB(e); + return t && !t.isImplements ? t.class : void 0; + } + function OB(e) { + if (bh(e)) { + if (nf(e.parent) && Qn(e.parent.parent)) + return { + class: e.parent.parent, + isImplements: e.parent.token === 119 + /* ImplementsKeyword */ + }; + if (Tx(e.parent)) { + const t = H1(e.parent); + if (t && Qn(t)) + return { class: t, isImplements: !1 }; + } + } + } + function Tl(e, t) { + return cn(e) && (t ? e.operatorToken.kind === 64 : dh(e.operatorToken.kind)) && __(e.left); + } + function Whe(e) { + return Tl(e.parent) && e.parent.left === e; + } + function p0(e) { + if (Tl( + e, + /*excludeCompoundAssignment*/ + !0 + )) { + const t = e.left.kind; + return t === 210 || t === 209; + } + return !1; + } + function q7(e) { + return IB(e) !== void 0; + } + function fo(e) { + return e.kind === 80 || O3(e); + } + function tf(e) { + switch (e.kind) { + case 80: + return e; + case 166: + do + e = e.left; + while (e.kind !== 80); + return e; + case 211: + do + e = e.expression; + while (e.kind !== 80); + return e; + } + } + function I3(e) { + return e.kind === 80 || e.kind === 110 || e.kind === 108 || e.kind === 236 || e.kind === 211 && I3(e.expression) || e.kind === 217 && I3(e.expression); + } + function O3(e) { + return Dn(e) && Re(e.name) && fo(e.expression); + } + function F3(e) { + if (Dn(e)) { + const t = F3(e.expression); + if (t !== void 0) + return t + "." + Y_(e.name); + } else if (ho(e)) { + const t = F3(e.expression); + if (t !== void 0 && Rc(e.argumentExpression)) + return t + "." + Y2(e.argumentExpression); + } else { + if (Re(e)) + return Pi(e.escapedText); + if (Cd(e)) + return G4(e); + } + } + function hy(e) { + return gb(e) && _h(e) === "prototype"; + } + function k4(e) { + return e.parent.kind === 166 && e.parent.right === e || e.parent.kind === 211 && e.parent.name === e || e.parent.kind === 236 && e.parent.name === e; + } + function FB(e) { + return !!e.parent && (Dn(e.parent) && e.parent.name === e || ho(e.parent) && e.parent.argumentExpression === e); + } + function DK(e) { + return $u(e.parent) && e.parent.right === e || Dn(e.parent) && e.parent.name === e || iv(e.parent) && e.parent.right === e; + } + function H7(e) { + return cn(e) && e.operatorToken.kind === 104; + } + function PK(e) { + return H7(e.parent) && e === e.parent.right; + } + function LB(e) { + return e.kind === 210 && e.properties.length === 0; + } + function wK(e) { + return e.kind === 209 && e.elements.length === 0; + } + function C4(e) { + if (!(!hFe(e) || !e.declarations)) { + for (const t of e.declarations) + if (t.localSymbol) return t.localSymbol; + } + } + function hFe(e) { + return e && Dr(e.declarations) > 0 && Vn( + e.declarations[0], + 2048 + /* Default */ + ); + } + function G7(e) { + return Nn(UFe, (t) => Go(e, t)); + } + function yFe(e) { + const t = [], n = e.length; + for (let i = 0; i < n; i++) { + const s = e.charCodeAt(i); + s < 128 ? t.push(s) : s < 2048 ? (t.push(s >> 6 | 192), t.push(s & 63 | 128)) : s < 65536 ? (t.push(s >> 12 | 224), t.push(s >> 6 & 63 | 128), t.push(s & 63 | 128)) : s < 131072 ? (t.push(s >> 18 | 240), t.push(s >> 12 & 63 | 128), t.push(s >> 6 & 63 | 128), t.push(s & 63 | 128)) : E.assert(!1, "Unexpected code point"); + } + return t; + } + var HT = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + function AK(e) { + let t = ""; + const n = yFe(e); + let i = 0; + const s = n.length; + let o, c, _, u; + for (; i < s; ) + o = n[i] >> 2, c = (n[i] & 3) << 4 | n[i + 1] >> 4, _ = (n[i + 1] & 15) << 2 | n[i + 2] >> 6, u = n[i + 2] & 63, i + 1 >= s ? _ = u = 64 : i + 2 >= s && (u = 64), t += HT.charAt(o) + HT.charAt(c) + HT.charAt(_) + HT.charAt(u), i += 3; + return t; + } + function vFe(e) { + let t = "", n = 0; + const i = e.length; + for (; n < i; ) { + const s = e[n]; + if (s < 128) + t += String.fromCharCode(s), n++; + else if ((s & 192) === 192) { + let o = s & 63; + n++; + let c = e[n]; + for (; (c & 192) === 128; ) + o = o << 6 | c & 63, n++, c = e[n]; + t += String.fromCharCode(o); + } else + t += String.fromCharCode(s), n++; + } + return t; + } + function NK(e, t) { + return e && e.base64encode ? e.base64encode(t) : AK(t); + } + function IK(e, t) { + if (e && e.base64decode) + return e.base64decode(t); + const n = t.length, i = []; + let s = 0; + for (; s < n && t.charCodeAt(s) !== HT.charCodeAt(64); ) { + const o = HT.indexOf(t[s]), c = HT.indexOf(t[s + 1]), _ = HT.indexOf(t[s + 2]), u = HT.indexOf(t[s + 3]), d = (o & 63) << 2 | c >> 4 & 3, g = (c & 15) << 4 | _ >> 2 & 15, h = (_ & 3) << 6 | u & 63; + g === 0 && _ !== 0 ? i.push(d) : h === 0 && u !== 0 ? i.push(d, g) : i.push(d, g, h), s += 4; + } + return vFe(i); + } + function MB(e, t) { + const n = Gi(t) ? t : t.readFile(e); + if (!n) return; + const i = bz(e, n); + return i.error ? void 0 : i.config; + } + function E4(e, t) { + return MB(e, t) || {}; + } + function $7(e) { + try { + return JSON.parse(e); + } catch { + return; + } + } + function Td(e, t) { + return !t.directoryExists || t.directoryExists(e); + } + var bFe = `\r +`, SFe = ` +`; + function d0(e) { + switch (e.newLine) { + case 0: + return bFe; + case 1: + case void 0: + return SFe; + } + } + function np(e, t = e) { + return E.assert(t >= e || t === -1), { pos: e, end: t }; + } + function X7(e, t) { + return np(e.pos, t); + } + function Q1(e, t) { + return np(t, e.end); + } + function mh(e) { + const t = ed(e) ? eb(e.modifiers, dl) : void 0; + return t && !xd(t.end) ? Q1(e, t.end) : e; + } + function am(e) { + if (rs(e) || hc(e)) + return Q1(e, e.name.pos); + const t = ed(e) ? Bo(e.modifiers) : void 0; + return t && !xd(t.end) ? Q1(e, t.end) : mh(e); + } + function Vhe(e) { + return e.pos === e.end; + } + function RB(e, t) { + return np(e, e + Ws(t).length); + } + function eS(e, t) { + return FK(e, e, t); + } + function Q7(e, t, n) { + return ip( + D4( + e, + n, + /*includeComments*/ + !1 + ), + D4( + t, + n, + /*includeComments*/ + !1 + ), + n + ); + } + function OK(e, t, n) { + return ip(e.end, t.end, n); + } + function FK(e, t, n) { + return ip(D4( + e, + n, + /*includeComments*/ + !1 + ), t.end, n); + } + function L3(e, t, n) { + return ip(e.end, D4( + t, + n, + /*includeComments*/ + !1 + ), n); + } + function jB(e, t, n, i) { + const s = D4(t, n, i); + return RE(n, e.end, s); + } + function Uhe(e, t, n) { + return RE(n, e.end, t.end); + } + function LK(e, t) { + return !ip(e.pos, e.end, t); + } + function ip(e, t, n) { + return RE(n, e, t) === 0; + } + function D4(e, t, n) { + return xd(e.pos) ? -1 : sa( + t.text, + e.pos, + /*stopAfterLineBreak*/ + !1, + n + ); + } + function MK(e, t, n, i) { + const s = sa( + n.text, + e, + /*stopAfterLineBreak*/ + !1, + i + ), o = TFe(s, t, n); + return RE(n, o ?? t, s); + } + function RK(e, t, n, i) { + const s = sa( + n.text, + e, + /*stopAfterLineBreak*/ + !1, + i + ); + return RE(n, e, Math.min(t, s)); + } + function TFe(e, t = 0, n) { + for (; e-- > t; ) + if (!xg(n.text.charCodeAt(e))) + return e; + } + function BB(e) { + const t = Ki(e); + if (t) + switch (t.parent.kind) { + case 266: + case 267: + return t === t.parent.name; + } + return !1; + } + function P4(e) { + return Ln(e.declarations, M3); + } + function M3(e) { + return ti(e) && e.initializer !== void 0; + } + function JB(e) { + return e.watch && io(e, "watch"); + } + function Zp(e) { + e.close(); + } + function gc(e) { + return e.flags & 33554432 ? e.links.checkFlags : 0; + } + function sp(e, t = !1) { + if (e.valueDeclaration) { + const n = t && e.declarations && Nn(e.declarations, rf) || e.flags & 32768 && Nn(e.declarations, Af) || e.valueDeclaration, i = L1(n); + return e.parent && e.parent.flags & 32 ? i : i & -8; + } + if (gc(e) & 6) { + const n = e.links.checkFlags, i = n & 1024 ? 2 : n & 256 ? 1 : 4, s = n & 2048 ? 256 : 0; + return i | s; + } + return e.flags & 4194304 ? 257 : 0; + } + function Jl(e, t) { + return e.flags & 2097152 ? t.getAliasedSymbol(e) : e; + } + function TC(e) { + return e.exportSymbol ? e.exportSymbol.flags | e.flags : e.flags; + } + function Y7(e) { + return w4(e) === 1; + } + function GT(e) { + return w4(e) !== 0; + } + function w4(e) { + const { parent: t } = e; + switch (t?.kind) { + case 217: + return w4(t); + case 225: + case 224: + const { operator: n } = t; + return n === 46 || n === 47 ? 2 : 0; + case 226: + const { left: i, operatorToken: s } = t; + return i === e && dh(s.kind) ? s.kind === 64 ? 1 : 2 : 0; + case 211: + return t.name !== e ? 0 : w4(t); + case 303: { + const o = w4(t.parent); + return e === t.name ? xFe(o) : o; + } + case 304: + return e === t.objectAssignmentInitializer ? 0 : w4(t.parent); + case 209: + return w4(t); + default: + return 0; + } + } + function xFe(e) { + switch (e) { + case 0: + return 1; + case 1: + return 0; + case 2: + return 2; + default: + return E.assertNever(e); + } + } + function zB(e, t) { + if (!e || !t || Object.keys(e).length !== Object.keys(t).length) + return !1; + for (const n in e) + if (typeof e[n] == "object") { + if (!zB(e[n], t[n])) + return !1; + } else if (typeof e[n] != "function" && e[n] !== t[n]) + return !1; + return !0; + } + function N_(e, t) { + e.forEach(t), e.clear(); + } + function Ig(e, t, n) { + const { onDeleteValue: i, onExistingValue: s } = n; + e.forEach((o, c) => { + var _; + t?.has(c) ? s && s(o, (_ = t.get) == null ? void 0 : _.call(t, c), c) : (e.delete(c), i(o, c)); + }); + } + function A4(e, t, n) { + Ig(e, t, n); + const { createNewValue: i } = n; + t?.forEach((s, o) => { + e.has(o) || e.set(o, i(o, s)); + }); + } + function jK(e) { + if (e.flags & 32) { + const t = gh(e); + return !!t && Vn( + t, + 64 + /* Abstract */ + ); + } + return !1; + } + function gh(e) { + var t; + return (t = e.declarations) == null ? void 0 : t.find(Qn); + } + function wn(e) { + return e.flags & 3899393 ? e.objectFlags : 0; + } + function qhe(e, t) { + return !!$p(e, (n) => t(n) ? !0 : void 0); + } + function Z7(e) { + return !!e && !!e.declarations && !!e.declarations[0] && aA(e.declarations[0]); + } + function BK({ moduleSpecifier: e }) { + return Ks(e) ? e.text : sc(e); + } + function WB(e) { + let t; + return gs(e, (n) => { + wp(n) && (t = n); + }, (n) => { + for (let i = n.length - 1; i >= 0; i--) + if (wp(n[i])) { + t = n[i]; + break; + } + }), t; + } + function Kp(e, t, n = !0) { + return e.has(t) ? !1 : (e.set(t, n), !0); + } + function $T(e) { + return Qn(e) || Vl(e) || Xu(e); + } + function VB(e) { + return e >= 182 && e <= 205 || e === 133 || e === 159 || e === 150 || e === 163 || e === 151 || e === 136 || e === 154 || e === 155 || e === 116 || e === 157 || e === 146 || e === 141 || e === 233 || e === 312 || e === 313 || e === 314 || e === 315 || e === 316 || e === 317 || e === 318; + } + function go(e) { + return e.kind === 211 || e.kind === 212; + } + function UB(e) { + return e.kind === 211 ? e.name : (E.assert( + e.kind === 212 + /* ElementAccessExpression */ + ), e.argumentExpression); + } + function K7(e) { + return e.kind === 275 || e.kind === 279; + } + function xC(e) { + for (; go(e); ) + e = e.expression; + return e; + } + function JK(e, t) { + if (go(e.parent) && FB(e)) + return n(e.parent); + function n(i) { + if (i.kind === 211) { + const s = t(i.name); + if (s !== void 0) + return s; + } else if (i.kind === 212) + if (Re(i.argumentExpression) || Ga(i.argumentExpression)) { + const s = t(i.argumentExpression); + if (s !== void 0) + return s; + } else + return; + if (go(i.expression)) + return n(i.expression); + if (Re(i.expression)) + return t(i.expression); + } + } + function kC(e, t) { + for (; ; ) { + switch (e.kind) { + case 225: + e = e.operand; + continue; + case 226: + e = e.left; + continue; + case 227: + e = e.condition; + continue; + case 215: + e = e.tag; + continue; + case 213: + if (t) + return e; + case 234: + case 212: + case 211: + case 235: + case 354: + case 238: + e = e.expression; + continue; + } + return e; + } + } + function kFe(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; + } + function CFe(e, t) { + this.flags = t, (E.isDebugging || rn) && (this.checker = e); + } + function EFe(e, t) { + this.flags = t, E.isDebugging && (this.checker = e); + } + function zK(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + function DFe(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; + } + function PFe(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + function wFe(e, t, n) { + this.fileName = e, this.text = t, this.skipTrivia = n || ((i) => i); + } + var zl = { + getNodeConstructor: () => zK, + getTokenConstructor: () => DFe, + getIdentifierConstructor: () => PFe, + getPrivateIdentifierConstructor: () => zK, + getSourceFileConstructor: () => zK, + getSymbolConstructor: () => kFe, + getTypeConstructor: () => CFe, + getSignatureConstructor: () => EFe, + getSourceMapSourceConstructor: () => wFe + }, Hhe = []; + function Ghe(e) { + Hhe.push(e), e(zl); + } + function WK(e) { + Object.assign(zl, e), rr(Hhe, (t) => t(zl)); + } + function Og(e, t) { + return e.replace(/{(\d+)}/g, (n, i) => "" + E.checkDefined(t[+i])); + } + var e5; + function VK(e) { + e5 = e; + } + function UK(e) { + !e5 && e && (e5 = e()); + } + function as(e) { + return e5 && e5[e.key] || e.message; + } + function XT(e, t, n, i, s, ...o) { + n + i > t.length && (i = t.length - n), TZ(t, n, i); + let c = as(s); + return ut(o) && (c = Og(c, o)), { + file: void 0, + start: n, + length: i, + messageText: c, + category: s.category, + code: s.code, + reportsUnnecessary: s.reportsUnnecessary, + fileName: e + }; + } + function AFe(e) { + return e.file === void 0 && e.start !== void 0 && e.length !== void 0 && typeof e.fileName == "string"; + } + function $he(e, t) { + const n = t.fileName || "", i = t.text.length; + E.assertEqual(e.fileName, n), E.assertLessThanOrEqual(e.start, i), E.assertLessThanOrEqual(e.start + e.length, i); + const s = { + file: t, + start: e.start, + length: e.length, + messageText: e.messageText, + category: e.category, + code: e.code, + reportsUnnecessary: e.reportsUnnecessary + }; + if (e.relatedInformation) { + s.relatedInformation = []; + for (const o of e.relatedInformation) + AFe(o) && o.fileName === n ? (E.assertLessThanOrEqual(o.start, i), E.assertLessThanOrEqual(o.start + o.length, i), s.relatedInformation.push($he(o, t))) : s.relatedInformation.push(o); + } + return s; + } + function QT(e, t) { + const n = []; + for (const i of e) + n.push($he(i, t)); + return n; + } + function xl(e, t, n, i, ...s) { + TZ(e.text, t, n); + let o = as(i); + return ut(s) && (o = Og(o, s)), { + file: e, + start: t, + length: n, + messageText: o, + category: i.category, + code: i.code, + reportsUnnecessary: i.reportsUnnecessary, + reportsDeprecated: i.reportsDeprecated + }; + } + function YT(e, ...t) { + let n = as(e); + return ut(t) && (n = Og(n, t)), n; + } + function zo(e, ...t) { + let n = as(e); + return ut(t) && (n = Og(n, t)), { + file: void 0, + start: void 0, + length: void 0, + messageText: n, + category: e.category, + code: e.code, + reportsUnnecessary: e.reportsUnnecessary, + reportsDeprecated: e.reportsDeprecated + }; + } + function t5(e, t) { + return { + file: void 0, + start: void 0, + length: void 0, + code: e.code, + category: e.category, + messageText: e.next ? e : e.messageText, + relatedInformation: t + }; + } + function us(e, t, ...n) { + let i = as(t); + return ut(n) && (i = Og(i, n)), { + messageText: i, + category: t.category, + code: t.code, + next: e === void 0 || Array.isArray(e) ? e : [e] + }; + } + function qK(e, t) { + let n = e; + for (; n.next; ) + n = n.next[0]; + n.next = [t]; + } + function qB(e) { + return e.file ? e.file.path : void 0; + } + function N4(e, t) { + return r5(e, t) || NFe(e, t) || 0; + } + function r5(e, t) { + const n = HB(e), i = HB(t); + return Kl(qB(e), qB(t)) || uo(e.start, t.start) || uo(e.length, t.length) || uo(n, i) || IFe(e, t) || 0; + } + function NFe(e, t) { + return !e.relatedInformation && !t.relatedInformation ? 0 : e.relatedInformation && t.relatedInformation ? uo(t.relatedInformation.length, e.relatedInformation.length) || rr(e.relatedInformation, (n, i) => { + const s = t.relatedInformation[i]; + return N4(n, s); + }) || 0 : e.relatedInformation ? -1 : 1; + } + function IFe(e, t) { + let n = GB(e), i = GB(t); + typeof n != "string" && (n = n.messageText), typeof i != "string" && (i = i.messageText); + const s = typeof e.messageText != "string" ? e.messageText.next : void 0, o = typeof t.messageText != "string" ? t.messageText.next : void 0; + let c = Kl(n, i); + return c || (c = OFe(s, o), c) ? c : e.canonicalHead && !t.canonicalHead ? -1 : t.canonicalHead && !e.canonicalHead ? 1 : 0; + } + function OFe(e, t) { + return e === void 0 && t === void 0 ? 0 : e === void 0 ? 1 : t === void 0 ? -1 : Xhe(e, t) || Qhe(e, t); + } + function Xhe(e, t) { + if (e === void 0 && t === void 0) + return 0; + if (e === void 0) + return 1; + if (t === void 0) + return -1; + let n = uo(t.length, e.length); + if (n) + return n; + for (let i = 0; i < t.length; i++) + if (n = Xhe(e[i].next, t[i].next), n) + return n; + return 0; + } + function Qhe(e, t) { + let n; + for (let i = 0; i < t.length; i++) { + if (n = Kl(e[i].messageText, t[i].messageText), n) + return n; + if (e[i].next !== void 0 && (n = Qhe(e[i].next, t[i].next), n)) + return n; + } + return 0; + } + function n5(e, t) { + const n = HB(e), i = HB(t), s = GB(e), o = GB(t); + return Kl(qB(e), qB(t)) === 0 && uo(e.start, t.start) === 0 && uo(e.length, t.length) === 0 && uo(n, i) === 0 && FFe(s, o); + } + function HB(e) { + var t; + return ((t = e.canonicalHead) == null ? void 0 : t.code) || e.code; + } + function GB(e) { + var t; + return ((t = e.canonicalHead) == null ? void 0 : t.messageText) || e.messageText; + } + function FFe(e, t) { + const n = typeof e == "string" ? e : e.messageText, i = typeof t == "string" ? t : t.messageText; + return Kl(n, i) === 0; + } + function R3(e) { + return e === 4 || e === 2 || e === 1 || e === 6 ? 1 : 0; + } + function Yhe(e) { + if (e.transformFlags & 2) + return ru(e) || Lb(e) ? e : gs(e, Yhe); + } + function LFe(e) { + return e.isDeclarationFile ? void 0 : Yhe(e); + } + function MFe(e) { + return (e.impliedNodeFormat === 99 || Lc(e.fileName, [ + ".cjs", + ".cts", + ".mjs", + ".mts" + /* Mts */ + ])) && !e.isDeclarationFile ? !0 : void 0; + } + function j3(e) { + switch (HK(e)) { + case 3: + return (s) => { + s.externalModuleIndicator = gA(s) || !s.isDeclarationFile || void 0; + }; + case 1: + return (s) => { + s.externalModuleIndicator = gA(s); + }; + case 2: + const t = [gA]; + (e.jsx === 4 || e.jsx === 5) && t.push(LFe), t.push(MFe); + const n = Ef(...t); + return (s) => void (s.externalModuleIndicator = n(s)); + } + } + function v_t(e) { + return e; + } + var Kc = { + target: { + dependencies: ["module"], + computeValue: (e) => (e.target === 0 ? void 0 : e.target) ?? (e.module === 100 && 9 || e.module === 199 && 99 || 1) + }, + module: { + dependencies: ["target"], + computeValue: (e) => typeof e.module == "number" ? e.module : Kc.target.computeValue(e) >= 2 ? 5 : 1 + }, + moduleResolution: { + dependencies: ["module", "target"], + computeValue: (e) => { + let t = e.moduleResolution; + if (t === void 0) + switch (Kc.module.computeValue(e)) { + case 1: + t = 2; + break; + case 100: + t = 3; + break; + case 199: + t = 99; + break; + case 200: + t = 100; + break; + default: + t = 1; + break; + } + return t; + } + }, + moduleDetection: { + dependencies: ["module", "target"], + computeValue: (e) => e.moduleDetection || (Kc.module.computeValue(e) === 100 || Kc.module.computeValue(e) === 199 ? 3 : 2) + }, + isolatedModules: { + dependencies: ["verbatimModuleSyntax"], + computeValue: (e) => !!(e.isolatedModules || e.verbatimModuleSyntax) + }, + esModuleInterop: { + dependencies: ["module", "target"], + computeValue: (e) => { + if (e.esModuleInterop !== void 0) + return e.esModuleInterop; + switch (Kc.module.computeValue(e)) { + case 100: + case 199: + case 200: + return !0; + } + return !1; + } + }, + allowSyntheticDefaultImports: { + dependencies: ["module", "target", "moduleResolution"], + computeValue: (e) => e.allowSyntheticDefaultImports !== void 0 ? e.allowSyntheticDefaultImports : Kc.esModuleInterop.computeValue(e) || Kc.module.computeValue(e) === 4 || Kc.moduleResolution.computeValue(e) === 100 + }, + resolvePackageJsonExports: { + dependencies: ["moduleResolution"], + computeValue: (e) => { + const t = Kc.moduleResolution.computeValue(e); + if (!KT(t)) + return !1; + if (e.resolvePackageJsonExports !== void 0) + return e.resolvePackageJsonExports; + switch (t) { + case 3: + case 99: + case 100: + return !0; + } + return !1; + } + }, + resolvePackageJsonImports: { + dependencies: ["moduleResolution", "resolvePackageJsonExports"], + computeValue: (e) => { + const t = Kc.moduleResolution.computeValue(e); + if (!KT(t)) + return !1; + if (e.resolvePackageJsonExports !== void 0) + return e.resolvePackageJsonExports; + switch (t) { + case 3: + case 99: + case 100: + return !0; + } + return !1; + } + }, + resolveJsonModule: { + dependencies: ["moduleResolution", "module", "target"], + computeValue: (e) => e.resolveJsonModule !== void 0 ? e.resolveJsonModule : Kc.moduleResolution.computeValue(e) === 100 + }, + declaration: { + dependencies: ["composite"], + computeValue: (e) => !!(e.declaration || e.composite) + }, + preserveConstEnums: { + dependencies: ["isolatedModules", "verbatimModuleSyntax"], + computeValue: (e) => !!(e.preserveConstEnums || Kc.isolatedModules.computeValue(e)) + }, + incremental: { + dependencies: ["composite"], + computeValue: (e) => !!(e.incremental || e.composite) + }, + declarationMap: { + dependencies: ["declaration", "composite"], + computeValue: (e) => !!(e.declarationMap && Kc.declaration.computeValue(e)) + }, + allowJs: { + dependencies: ["checkJs"], + computeValue: (e) => e.allowJs === void 0 ? !!e.checkJs : e.allowJs + }, + useDefineForClassFields: { + dependencies: ["target", "module"], + computeValue: (e) => e.useDefineForClassFields === void 0 ? Kc.target.computeValue(e) >= 9 : e.useDefineForClassFields + }, + noImplicitAny: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "noImplicitAny") + }, + noImplicitThis: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "noImplicitThis") + }, + strictNullChecks: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "strictNullChecks") + }, + strictFunctionTypes: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "strictFunctionTypes") + }, + strictBindCallApply: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "strictBindCallApply") + }, + strictPropertyInitialization: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "strictPropertyInitialization") + }, + alwaysStrict: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "alwaysStrict") + }, + useUnknownInCatchVariables: { + dependencies: ["strict"], + computeValue: (e) => Iu(e, "useUnknownInCatchVariables") + } + }, pa = Kc.target.computeValue, Nu = Kc.module.computeValue, Hu = Kc.moduleResolution.computeValue, HK = Kc.moduleDetection.computeValue, ap = Kc.isolatedModules.computeValue, Fg = Kc.esModuleInterop.computeValue, ZT = Kc.allowSyntheticDefaultImports.computeValue, $B = Kc.resolvePackageJsonExports.computeValue, XB = Kc.resolvePackageJsonImports.computeValue, kb = Kc.resolveJsonModule.computeValue, op = Kc.declaration.computeValue, Cb = Kc.preserveConstEnums.computeValue, I4 = Kc.incremental.computeValue, i5 = Kc.declarationMap.computeValue, yy = Kc.allowJs.computeValue, B3 = Kc.useDefineForClassFields.computeValue; + function s5(e) { + return e >= 5 && e <= 99; + } + function a5(e) { + switch (Nu(e)) { + case 0: + case 4: + case 3: + return !1; + } + return !0; + } + function GK(e) { + return e.allowUnreachableCode === !1; + } + function $K(e) { + return e.allowUnusedLabels === !1; + } + function KT(e) { + return e >= 3 && e <= 99 || e === 100; + } + function Iu(e, t) { + return e[t] === void 0 ? !!e.strict : !!e[t]; + } + function o5(e) { + return Dl(pz.type, (t, n) => t === e ? n : void 0); + } + function QB(e) { + return e.useDefineForClassFields !== !1 && pa(e) >= 9; + } + function XK(e, t) { + return eC(t, e, gre); + } + function QK(e, t) { + return eC(t, e, hre); + } + function YK(e, t) { + return eC(t, e, yre); + } + function c5(e, t) { + return t.strictFlag ? Iu(e, t.name) : t.allowJsFlag ? yy(e) : e[t.name]; + } + function l5(e) { + const t = e.jsx; + return t === 2 || t === 4 || t === 5; + } + function u5(e, t) { + const n = t?.pragmas.get("jsximportsource"), i = ss(n) ? n[n.length - 1] : n; + return e.jsx === 4 || e.jsx === 5 || e.jsxImportSource || i ? i?.arguments.factory || e.jsxImportSource || "react" : void 0; + } + function _5(e, t) { + return e ? `${e}/${t.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime"}` : void 0; + } + function YB(e) { + let t = !1; + for (let n = 0; n < e.length; n++) + if (e.charCodeAt(n) === 42) + if (!t) + t = !0; + else + return !1; + return !0; + } + function ZB(e, t) { + let n, i, s, o = !1; + return { + getSymlinkedFiles: () => s, + getSymlinkedDirectories: () => n, + getSymlinkedDirectoriesByRealpath: () => i, + setSymlinkedFile: (u, d) => (s || (s = /* @__PURE__ */ new Map())).set(u, d), + setSymlinkedDirectory: (u, d) => { + let g = _o(u, e, t); + W4(g) || (g = bl(g), d !== !1 && !n?.has(g) && (i || (i = Kf())).add(d.realPath, u), (n || (n = /* @__PURE__ */ new Map())).set(g, d)); + }, + setSymlinksFromResolutions(u, d, g) { + E.assert(!o), o = !0, u((h) => _(this, h.resolvedModule)), d((h) => _(this, h.resolvedTypeReferenceDirective)), g.forEach((h) => _(this, h.resolvedTypeReferenceDirective)); + }, + hasProcessedResolutions: () => o, + setSymlinksFromResolution(u) { + _(this, u); + }, + hasAnySymlinks: c + }; + function c() { + return !!s?.size || !!n && !!Dl(n, (u) => !!u); + } + function _(u, d) { + if (!d || !d.originalPath || !d.resolvedFileName) return; + const { resolvedFileName: g, originalPath: h } = d; + u.setSymlinkedFile(_o(h, e, t), g); + const [S, T] = RFe(g, h, e, t) || He; + S && T && u.setSymlinkedDirectory( + T, + { + real: bl(S), + realPath: bl(_o(S, e, t)) + } + ); + } + } + function RFe(e, t, n, i) { + const s = vl(Xi(e, n)), o = vl(Xi(t, n)); + let c = !1; + for (; s.length >= 2 && o.length >= 2 && !Zhe(s[s.length - 2], i) && !Zhe(o[o.length - 2], i) && i(s[s.length - 1]) === i(o[o.length - 1]); ) + s.pop(), o.pop(), c = !0; + return c ? [ah(s), ah(o)] : void 0; + } + function Zhe(e, t) { + return e !== void 0 && (t(e) === "node_modules" || zi(e, "@")); + } + function jFe(e) { + return qR(e.charCodeAt(0)) ? e.slice(1) : void 0; + } + function KB(e, t, n) { + const i = vR(e, t, n); + return i === void 0 ? void 0 : jFe(i); + } + var ZK = /[^\w\s/]/g; + function Khe(e) { + return e.replace(ZK, BFe); + } + function BFe(e) { + return "\\" + e; + } + var JFe = [ + 42, + 63 + /* question */ + ], KK = ["node_modules", "bower_components", "jspm_packages"], eee = `(?!(${KK.join("|")})(/|$))`, e0e = { + /** + * Matches any single directory segment unless it is the last segment and a .min.js file + * Breakdown: + * [^./] # matches everything up to the first . character (excluding directory separators) + * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension + */ + singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${eee}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => nee(e, e0e.singleAsteriskRegexFragment) + }, t0e = { + singleAsteriskRegexFragment: "[^/]*", + /** + * Regex for the ** wildcard. Matches any number of subdirectories. When used for including + * files or directories, does not match subdirectories that start with a . character + */ + doubleAsteriskRegexFragment: `(/${eee}[^/.][^/]*)*?`, + replaceWildcardCharacter: (e) => nee(e, t0e.singleAsteriskRegexFragment) + }, r0e = { + singleAsteriskRegexFragment: "[^/]*", + doubleAsteriskRegexFragment: "(/.+?)?", + replaceWildcardCharacter: (e) => nee(e, r0e.singleAsteriskRegexFragment) + }, tee = { + files: e0e, + directories: t0e, + exclude: r0e + }; + function O4(e, t, n) { + const i = f5(e, t, n); + return !i || !i.length ? void 0 : `^(${i.map((c) => `(${c})`).join("|")})${n === "exclude" ? "($|/)" : "$"}`; + } + function f5(e, t, n) { + if (!(e === void 0 || e.length === 0)) + return Xs(e, (i) => i && p5(i, t, n, tee[n])); + } + function eJ(e) { + return !/[.*?]/.test(e); + } + function ree(e, t, n) { + const i = e && p5(e, t, n, tee[n]); + return i && `^(${i})${n === "exclude" ? "($|/)" : "$"}`; + } + function p5(e, t, n, { singleAsteriskRegexFragment: i, doubleAsteriskRegexFragment: s, replaceWildcardCharacter: o } = tee[n]) { + let c = "", _ = !1; + const u = pw(e, t), d = ia(u); + if (n !== "exclude" && d === "**") + return; + u[0] = F1(u[0]), eJ(d) && u.push("**", "*"); + let g = 0; + for (let h of u) { + if (h === "**") + c += s; + else if (n === "directories" && (c += "(", g++), _ && (c += Oo), n !== "exclude") { + let S = ""; + h.charCodeAt(0) === 42 ? (S += "([^./]" + i + ")?", h = h.substr(1)) : h.charCodeAt(0) === 63 && (S += "[^./]", h = h.substr(1)), S += h.replace(ZK, o), S !== h && (c += eee), c += S; + } else + c += h.replace(ZK, o); + _ = !0; + } + for (; g > 0; ) + c += ")?", g--; + return c; + } + function nee(e, t) { + return e === "*" ? t : e === "?" ? "[^/]" : "\\" + e; + } + function d5(e, t, n, i, s) { + e = Cs(e), s = Cs(s); + const o = Mn(s, e); + return { + includeFilePatterns: or(f5(n, o, "files"), (c) => `^${c}$`), + includeFilePattern: O4(n, o, "files"), + includeDirectoryPattern: O4(n, o, "directories"), + excludePattern: O4(t, o, "exclude"), + basePaths: zFe(e, n, i) + }; + } + function vy(e, t) { + return new RegExp(e, t ? "" : "i"); + } + function tJ(e, t, n, i, s, o, c, _, u) { + e = Cs(e), o = Cs(o); + const d = d5(e, n, i, s, o), g = d.includeFilePatterns && d.includeFilePatterns.map((O) => vy(O, s)), h = d.includeDirectoryPattern && vy(d.includeDirectoryPattern, s), S = d.excludePattern && vy(d.excludePattern, s), T = g ? g.map(() => []) : [[]], C = /* @__PURE__ */ new Map(), D = eu(s); + for (const O of d.basePaths) + P(O, Mn(o, O), c); + return Ep(T); + function P(O, j, F) { + const V = D(u(j)); + if (C.has(V)) return; + C.set(V, !0); + const { files: L, directories: $ } = _(O); + for (const U of rb(L, Kl)) { + const G = Mn(O, U), ce = Mn(j, U); + if (!(t && !Lc(G, t)) && !(S && S.test(ce))) + if (!g) + T[0].push(G); + else { + const K = rc(g, (X) => X.test(ce)); + K !== -1 && T[K].push(G); + } + } + if (!(F !== void 0 && (F--, F === 0))) + for (const U of rb($, Kl)) { + const G = Mn(O, U), ce = Mn(j, U); + (!h || h.test(ce)) && (!S || !S.test(ce)) && P(G, ce, F); + } + } + } + function zFe(e, t, n) { + const i = [e]; + if (t) { + const s = []; + for (const o of t) { + const c = $_(o) ? o : Cs(Mn(e, o)); + s.push(WFe(c)); + } + s.sort(Bk(!n)); + for (const o of s) + Ri(i, (c) => !Gp(c, o, e, !n)) && i.push(o); + } + return i; + } + function WFe(e) { + const t = gX(e, JFe); + return t < 0 ? zk(e) ? F1(Xn(e)) : e : e.substring(0, e.lastIndexOf(Oo, t)); + } + function m5(e, t) { + return t || g5(e) || 3; + } + function g5(e) { + switch (e.substr(e.lastIndexOf(".")).toLowerCase()) { + case ".js": + case ".cjs": + case ".mjs": + return 1; + case ".jsx": + return 2; + case ".ts": + case ".cts": + case ".mts": + return 3; + case ".tsx": + return 4; + case ".json": + return 6; + default: + return 0; + } + } + var F4 = [[ + ".ts", + ".tsx", + ".d.ts" + /* Dts */ + ], [ + ".cts", + ".d.cts" + /* Dcts */ + ], [ + ".mts", + ".d.mts" + /* Dmts */ + ]], rJ = Ep(F4), VFe = [...F4, [ + ".json" + /* Json */ + ]], UFe = [ + ".d.ts", + ".d.cts", + ".d.mts", + ".cts", + ".mts", + ".ts", + ".tsx" + /* Tsx */ + ], iee = [[ + ".js", + ".jsx" + /* Jsx */ + ], [ + ".mjs" + /* Mjs */ + ], [ + ".cjs" + /* Cjs */ + ]], CC = Ep(iee), nJ = [[ + ".ts", + ".tsx", + ".d.ts", + ".js", + ".jsx" + /* Jsx */ + ], [ + ".cts", + ".d.cts", + ".cjs" + /* Cjs */ + ], [ + ".mts", + ".d.mts", + ".mjs" + /* Mjs */ + ]], qFe = [...nJ, [ + ".json" + /* Json */ + ]], h5 = [ + ".d.ts", + ".d.cts", + ".d.mts" + /* Dmts */ + ], y5 = [ + ".ts", + ".cts", + ".mts", + ".tsx" + /* Tsx */ + ], v5 = [ + ".mts", + ".d.mts", + ".mjs", + ".cts", + ".d.cts", + ".cjs" + /* Cjs */ + ]; + function L4(e, t) { + const n = e && yy(e); + if (!t || t.length === 0) + return n ? nJ : F4; + const i = n ? nJ : F4, s = Ep(i); + return [ + ...i, + ...Ii(t, (c) => c.scriptKind === 7 || n && HFe(c.scriptKind) && !s.includes(c.extension) ? [c.extension] : void 0) + ]; + } + function J3(e, t) { + return !e || !kb(e) ? t : t === nJ ? qFe : t === F4 ? VFe : [...t, [ + ".json" + /* Json */ + ]]; + } + function HFe(e) { + return e === 1 || e === 2; + } + function Lg(e) { + return ut(CC, (t) => Go(e, t)); + } + function ex(e) { + return ut(rJ, (t) => Go(e, t)); + } + var see = /* @__PURE__ */ ((e) => (e[e.Minimal = 0] = "Minimal", e[e.Index = 1] = "Index", e[e.JsExtension = 2] = "JsExtension", e[e.TsExtension = 3] = "TsExtension", e))(see || {}); + function aee({ imports: e }, t = Ef(Lg, ex)) { + return xc(e, ({ text: n }) => Df(n) && !Lc(n, v5) ? t(n) : void 0) || !1; + } + function oee(e, t, n, i) { + const s = Hu(n), o = 3 <= s && s <= 99; + if (e === "js" || t === 99 && o) + return $C(n) && c() !== 2 ? 3 : 2; + if (e === "minimal") + return 0; + if (e === "index") + return 1; + if (!$C(n)) + return i && aee(i) ? 2 : 0; + return c(); + function c() { + let _ = !1; + const u = i?.imports.length ? i.imports : i && p_(i) ? GFe(i).map((d) => d.arguments[0]) : He; + for (const d of u) + if (Df(d.text)) { + if (o && t === 1 && OW(i, d, n) === 99 || Lc(d.text, v5)) + continue; + if (ex(d.text)) + return 3; + Lg(d.text) && (_ = !0); + } + return _ ? 2 : 0; + } + } + function GFe(e) { + let t = 0, n; + for (const i of e.statements) { + if (t > 3) + break; + s3(i) ? n = Hi(n, i.declarationList.declarations.map((s) => s.initializer)) : Pl(i) && d_( + i.expression, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? n = Tr(n, i.expression) : t++; + } + return n || He; + } + function cee(e, t, n) { + if (!e) return !1; + const i = L4(t, n); + for (const s of Ep(J3(t, i))) + if (Go(e, s)) + return !0; + return !1; + } + function n0e(e) { + const t = e.match(/\//g); + return t ? t.length : 0; + } + function z3(e, t) { + return uo( + n0e(e), + n0e(t) + ); + } + var lee = [ + ".d.ts", + ".d.mts", + ".d.cts", + ".mjs", + ".mts", + ".cjs", + ".cts", + ".ts", + ".js", + ".tsx", + ".jsx", + ".json" + /* Json */ + ]; + function Gu(e) { + for (const t of lee) { + const n = uee(e, t); + if (n !== void 0) + return n; + } + return e; + } + function uee(e, t) { + return Go(e, t) ? W3(e, t) : void 0; + } + function W3(e, t) { + return e.substring(0, e.length - t.length); + } + function by(e, t) { + return dw( + e, + t, + lee, + /*ignoreCase*/ + !1 + ); + } + function EC(e) { + const t = e.indexOf("*"); + return t === -1 ? e : e.indexOf("*", t + 1) !== -1 ? void 0 : { + prefix: e.substr(0, t), + suffix: e.substr(t + 1) + }; + } + function b5(e) { + return Ii(Gd(e), (t) => EC(t)); + } + function xd(e) { + return !(e >= 0); + } + function S5(e) { + return e === ".ts" || e === ".tsx" || e === ".d.ts" || e === ".cts" || e === ".mts" || e === ".d.mts" || e === ".d.cts" || zi(e, ".d.") && nc(e, ".ts"); + } + function M4(e) { + return S5(e) || e === ".json"; + } + function R4(e) { + const t = hh(e); + return t !== void 0 ? t : E.fail(`File ${e} has unknown extension.`); + } + function i0e(e) { + return hh(e) !== void 0; + } + function hh(e) { + return Nn(lee, (t) => Go(e, t)); + } + function j4(e, t) { + return e.checkJsDirective ? e.checkJsDirective.enabled : t.checkJs; + } + var iJ = { + files: He, + directories: He + }; + function sJ(e, t) { + const n = []; + for (const i of e) { + if (i === t) + return t; + Gi(i) || n.push(i); + } + return yR(n, (i) => i, t); + } + function aJ(e, t) { + const n = e.indexOf(t); + return E.assert(n !== -1), e.slice(n); + } + function Fs(e, ...t) { + return t.length && (e.relatedInformation || (e.relatedInformation = []), E.assert(e.relatedInformation !== He, "Diagnostic had empty array singleton for related info, but is still being constructed!"), e.relatedInformation.push(...t)), e; + } + function _ee(e, t) { + E.assert(e.length !== 0); + let n = t(e[0]), i = n; + for (let s = 1; s < e.length; s++) { + const o = t(e[s]); + o < n ? n = o : o > i && (i = o); + } + return { min: n, max: i }; + } + function oJ(e) { + return { pos: W1(e), end: e.end }; + } + function cJ(e, t) { + const n = t.pos - 1, i = Math.min(e.text.length, sa(e.text, t.end) + 1); + return { pos: n, end: i }; + } + function B4(e, t, n) { + return t.skipLibCheck && e.isDeclarationFile || t.skipDefaultLibCheck && e.hasNoDefaultLib || t.noCheck || n.isSourceOfProjectReferenceRedirect(e.fileName) || !V3(e, t); + } + function V3(e, t) { + if (e.checkJsDirective && e.checkJsDirective.enabled === !1) return !1; + if (e.scriptKind === 3 || e.scriptKind === 4 || e.scriptKind === 5) return !0; + const i = (e.scriptKind === 1 || e.scriptKind === 2) && j4(e, t); + return t4(e, t.checkJs) || i || e.scriptKind === 7; + } + function T5(e, t) { + return e === t || typeof e == "object" && e !== null && typeof t == "object" && t !== null && kX(e, t, T5); + } + function J4(e) { + let t; + switch (e.charCodeAt(1)) { + case 98: + case 66: + t = 1; + break; + case 111: + case 79: + t = 3; + break; + case 120: + case 88: + t = 4; + break; + default: + const d = e.length - 1; + let g = 0; + for (; e.charCodeAt(g) === 48; ) + g++; + return e.slice(g, d) || "0"; + } + const n = 2, i = e.length - 1, s = (i - n) * t, o = new Uint16Array((s >>> 4) + (s & 15 ? 1 : 0)); + for (let d = i - 1, g = 0; d >= n; d--, g += t) { + const h = g >>> 4, S = e.charCodeAt(d), C = (S <= 57 ? S - 48 : 10 + S - (S <= 70 ? 65 : 97)) << (g & 15); + o[h] |= C; + const D = C >>> 16; + D && (o[h + 1] |= D); + } + let c = "", _ = o.length - 1, u = !0; + for (; u; ) { + let d = 0; + u = !1; + for (let g = _; g >= 0; g--) { + const h = d << 16 | o[g], S = h / 10 | 0; + o[g] = S, d = h - S * 10, S && !u && (_ = g, u = !0); + } + c = d + c; + } + return c; + } + function Eb({ negative: e, base10Value: t }) { + return (e && t !== "0" ? "-" : "") + t; + } + function fee(e) { + if (x5( + e, + /*roundTripOnly*/ + !1 + )) + return lJ(e); + } + function lJ(e) { + const t = e.startsWith("-"), n = J4(`${t ? e.slice(1) : e}n`); + return { negative: t, base10Value: n }; + } + function x5(e, t) { + if (e === "") return !1; + const n = Eg( + 99, + /*skipTrivia*/ + !1 + ); + let i = !0; + n.setOnError(() => i = !1), n.setText(e + "n"); + let s = n.scan(); + const o = s === 41; + o && (s = n.scan()); + const c = n.getTokenFlags(); + return i && s === 10 && n.getTokenEnd() === e.length + 1 && !(c & 512) && (!t || e === Eb({ negative: o, base10Value: J4(n.getTokenValue()) })); + } + function Y1(e) { + return !!(e.flags & 33554432) || T7(e) || QFe(e) || XFe(e) || !(Sd(e) || $Fe(e)); + } + function $Fe(e) { + return Re(e) && du(e.parent) && e.parent.name === e; + } + function XFe(e) { + for (; e.kind === 80 || e.kind === 211; ) + e = e.parent; + if (e.kind !== 167) + return !1; + if (Vn( + e.parent, + 64 + /* Abstract */ + )) + return !0; + const t = e.parent.parent.kind; + return t === 264 || t === 187; + } + function QFe(e) { + if (e.kind !== 80) return !1; + const t = sr(e.parent, (n) => { + switch (n.kind) { + case 298: + return !0; + case 211: + case 233: + return !1; + default: + return "quit"; + } + }); + return t?.token === 119 || t?.parent.kind === 264; + } + function pee(e) { + return Nf(e) && Re(e.typeName); + } + function dee(e, t = Kh) { + if (e.length < 2) return !0; + const n = e[0]; + for (let i = 1, s = e.length; i < s; i++) { + const o = e[i]; + if (!t(n, o)) return !1; + } + return !0; + } + function z4(e, t) { + return e.pos = t, e; + } + function DC(e, t) { + return e.end = t, e; + } + function om(e, t, n) { + return DC(z4(e, t), n); + } + function uJ(e, t, n) { + return om(e, t, t + n); + } + function mee(e, t) { + return e && (e.flags = t), e; + } + function Da(e, t) { + return e && t && (e.parent = t), e; + } + function s0e(e, t) { + if (e) + for (const n of e) + Da(n, t); + return e; + } + function yh(e, t) { + if (!e) return e; + return kx(e, Yk(e) ? n : s), e; + function n(o, c) { + if (t && o.parent === c) + return "skip"; + Da(o, c); + } + function i(o) { + if (gf(o)) + for (const c of o.jsDoc) + n(c, o), kx(c, n); + } + function s(o, c) { + return n(o, c) || i(o); + } + } + function YFe(e) { + return !ml(e); + } + function _J(e) { + return Wl(e) && Ri(e.elements, YFe); + } + function gee(e) { + for (E.assertIsDefined(e.parent); ; ) { + const t = e.parent; + if (Qu(t)) { + e = t; + continue; + } + if (Pl(t) || hx(t) || tv(t) && (t.initializer === e || t.incrementor === e)) + return !0; + if (nD(t)) { + if (e !== ia(t.elements)) return !0; + e = t; + continue; + } + if (cn(t) && t.operatorToken.kind === 28) { + if (e === t.left) return !0; + e = t; + continue; + } + return !1; + } + } + function W4(e) { + return ut(xI, (t) => e.includes(t)); + } + function hee(e) { + if (!e.parent) return; + switch (e.kind) { + case 168: + const { parent: n } = e; + return n.kind === 195 ? void 0 : n.typeParameters; + case 169: + return e.parent.parameters; + case 204: + return e.parent.templateSpans; + case 239: + return e.parent.templateSpans; + case 170: { + const { parent: i } = e; + return jb(i) ? i.modifiers : void 0; + } + case 298: + return e.parent.heritageClauses; + } + const { parent: t } = e; + if (Zk(e)) + return lS(e.parent) ? void 0 : e.parent.tags; + switch (t.kind) { + case 187: + case 264: + return cb(e) ? t.members : void 0; + case 192: + case 193: + return t.types; + case 189: + case 209: + case 355: + case 275: + case 279: + return t.elements; + case 210: + case 292: + return t.properties; + case 213: + case 214: + return ai(e) ? t.typeArguments : t.expression === e ? void 0 : t.arguments; + case 284: + case 288: + return Bw(e) ? t.children : void 0; + case 286: + case 285: + return ai(e) ? t.typeArguments : void 0; + case 241: + case 296: + case 297: + case 268: + return t.statements; + case 269: + return t.clauses; + case 263: + case 231: + return fl(e) ? t.members : void 0; + case 266: + return Py(e) ? t.members : void 0; + case 307: + return t.statements; + } + } + function k5(e) { + if (!e.typeParameters) { + if (ut(e.parameters, (t) => !Vc(t))) + return !0; + if (e.kind !== 219) { + const t = ul(e.parameters); + if (!(t && Sb(t))) + return !0; + } + } + return !1; + } + function V4(e) { + return e === "Infinity" || e === "-Infinity" || e === "NaN"; + } + function yee(e) { + return e.kind === 260 && e.parent.kind === 299; + } + function Sy(e) { + return e.kind === 218 || e.kind === 219; + } + function Db(e) { + return e.replace(/\$/gm, () => "\\$"); + } + function Mg(e) { + return (+e).toString() === e; + } + function C5(e, t, n, i, s) { + const o = s && e === "new"; + return !o && X_(e, t) ? N.createIdentifier(e) : !i && !o && Mg(e) && +e >= 0 ? N.createNumericLiteral(+e) : N.createStringLiteral(e, !!n); + } + function U4(e) { + return !!(e.flags & 262144 && e.isThisType); + } + function E5(e) { + let t = 0, n = 0, i = 0, s = 0, o; + ((d) => { + d[d.BeforeNodeModules = 0] = "BeforeNodeModules", d[d.NodeModules = 1] = "NodeModules", d[d.Scope = 2] = "Scope", d[d.PackageContent = 3] = "PackageContent"; + })(o || (o = {})); + let c = 0, _ = 0, u = 0; + for (; _ >= 0; ) + switch (c = _, _ = e.indexOf("/", c + 1), u) { + case 0: + e.indexOf(zg, c) === c && (t = c, n = _, u = 1); + break; + case 1: + case 2: + u === 1 && e.charAt(c + 1) === "@" ? u = 2 : (i = _, u = 3); + break; + case 3: + e.indexOf(zg, c) === c ? u = 1 : u = 3; + break; + } + return s = c, u > 1 ? { topLevelNodeModulesIndex: t, topLevelPackageNameIndex: n, packageRootIndex: i, fileNameIndex: s } : void 0; + } + function a0e(e) { + var t; + return e.kind === 341 ? (t = e.typeExpression) == null ? void 0 : t.type : e.type; + } + function tx(e) { + switch (e.kind) { + case 168: + case 263: + case 264: + case 265: + case 266: + case 346: + case 338: + case 340: + return !0; + case 273: + return e.isTypeOnly; + case 276: + case 281: + return e.parent.parent.isTypeOnly; + default: + return !1; + } + } + function U3(e) { + return rv(e) || yc(e) || Ac(e) || rl(e) || Vl(e) || tx(e) || Nc(e) && !_b(e) && !Zd(e); + } + function q3(e) { + if (!HE(e)) + return !1; + const { isBracketed: t, typeExpression: n } = e; + return t || !!n && n.type.kind === 316; + } + function fJ(e, t) { + if (e.length === 0) + return !1; + const n = e.charCodeAt(0); + return n === 35 ? e.length > 1 && Cg(e.charCodeAt(1), t) : Cg(n, t); + } + function vee(e) { + var t; + return ((t = SJ(e)) == null ? void 0 : t.kind) === 0; + } + function D5(e) { + return Qr(e) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType + (e.type && e.type.kind === 316 || Gk(e).some(q3)); + } + function q4(e) { + switch (e.kind) { + case 172: + case 171: + return !!e.questionToken; + case 169: + return !!e.questionToken || D5(e); + case 348: + case 341: + return q3(e); + default: + return !1; + } + } + function bee(e) { + const t = e.kind; + return (t === 211 || t === 212) && vx(e.expression); + } + function pJ(e) { + return Qr(e) && Qu(e) && gf(e) && !!_j(e); + } + function dJ(e) { + return E.checkDefined(P5(e)); + } + function P5(e) { + const t = _j(e); + return t && t.typeExpression && t.typeExpression.type; + } + function H4(e) { + return Re(e) ? e.escapedText : rx(e); + } + function H3(e) { + return Re(e) ? dn(e) : G4(e); + } + function See(e) { + const t = e.kind; + return t === 80 || t === 295; + } + function rx(e) { + return `${e.namespace.escapedText}:${dn(e.name)}`; + } + function G4(e) { + return `${dn(e.namespace)}:${dn(e.name)}`; + } + function mJ(e) { + return Re(e) ? dn(e) : G4(e); + } + function Fp(e) { + return !!(e.flags & 8576); + } + function Lp(e) { + return e.flags & 8192 ? e.escapedName : e.flags & 384 ? Ko("" + e.value) : E.fail(); + } + function nx(e) { + return !!e && (Dn(e) || ho(e) || cn(e)); + } + function Tee(e) { + return e === void 0 ? !1 : !!ZC(e.attributes); + } + var ZFe = String.prototype.replace; + function ix(e, t) { + return ZFe.call(e, "*", t); + } + function w5(e) { + return Re(e.name) ? e.name.escapedText : Ko(e.name.text); + } + function pl(e, t = !1, n = !1, i = !1) { + return { value: e, isSyntacticallyString: t, resolvedOtherFiles: n, hasExternalReferences: i }; + } + function xee({ evaluateElementAccessExpression: e, evaluateEntityNameExpression: t }) { + function n(s, o) { + let c = !1, _ = !1, u = !1; + switch (s = Ja(s), s.kind) { + case 224: + const d = n(s.operand, o); + if (_ = d.resolvedOtherFiles, u = d.hasExternalReferences, typeof d.value == "number") + switch (s.operator) { + case 40: + return pl(d.value, c, _, u); + case 41: + return pl(-d.value, c, _, u); + case 55: + return pl(~d.value, c, _, u); + } + break; + case 226: { + const g = n(s.left, o), h = n(s.right, o); + if (c = (g.isSyntacticallyString || h.isSyntacticallyString) && s.operatorToken.kind === 40, _ = g.resolvedOtherFiles || h.resolvedOtherFiles, u = g.hasExternalReferences || h.hasExternalReferences, typeof g.value == "number" && typeof h.value == "number") + switch (s.operatorToken.kind) { + case 52: + return pl(g.value | h.value, c, _, u); + case 51: + return pl(g.value & h.value, c, _, u); + case 49: + return pl(g.value >> h.value, c, _, u); + case 50: + return pl(g.value >>> h.value, c, _, u); + case 48: + return pl(g.value << h.value, c, _, u); + case 53: + return pl(g.value ^ h.value, c, _, u); + case 42: + return pl(g.value * h.value, c, _, u); + case 44: + return pl(g.value / h.value, c, _, u); + case 40: + return pl(g.value + h.value, c, _, u); + case 41: + return pl(g.value - h.value, c, _, u); + case 45: + return pl(g.value % h.value, c, _, u); + case 43: + return pl(g.value ** h.value, c, _, u); + } + else if ((typeof g.value == "string" || typeof g.value == "number") && (typeof h.value == "string" || typeof h.value == "number") && s.operatorToken.kind === 40) + return pl( + "" + g.value + h.value, + c, + _, + u + ); + break; + } + case 11: + case 15: + return pl( + s.text, + /*isSyntacticallyString*/ + !0 + ); + case 228: + return i(s, o); + case 9: + return pl(+s.text); + case 80: + return t(s, o); + case 211: + if (fo(s)) + return t(s, o); + break; + case 212: + return e(s, o); + } + return pl( + /*value*/ + void 0, + c, + _, + u + ); + } + function i(s, o) { + let c = s.head.text, _ = !1, u = !1; + for (const d of s.templateSpans) { + const g = n(d.expression, o); + if (g.value === void 0) + return pl( + /*value*/ + void 0, + /*isSyntacticallyString*/ + !0 + ); + c += g.value, c += d.literal.text, _ || (_ = g.resolvedOtherFiles), u || (u = g.hasExternalReferences); + } + return pl( + c, + /*isSyntacticallyString*/ + !0, + _, + u + ); + } + return n; + } + function gJ(e) { + return J1(e) && yd(e.type) || uD(e) && yd(e.typeExpression); + } + function G3(e) { + const t = e.members; + for (const n of t) + if (n.kind === 176 && wp(n.body)) + return n; + } + function hJ({ + compilerOptions: e, + requireSymbol: t, + argumentsSymbol: n, + error: i, + getSymbolOfDeclaration: s, + globals: o, + lookup: c, + setRequiresScopeChangeCache: _ = nb, + getRequiresScopeChangeCache: u = nb, + onPropertyWithInvalidInitializer: d = $d, + onFailedToResolveSymbol: g = nb, + onSuccessfullyResolvedSymbol: h = nb + }) { + var S = e.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", T = QB(e), C = Ms(); + return D; + function D(V, L, $, U, G, ce) { + var K, X, Z; + const oe = V; + let ne, pe, fe, H, ae, le = !1, Ae; + const ge = Gi(L) ? L : L.escapedText; + e: + for (; V; ) { + if (ge === "const" && gJ(V)) + return; + if (Rw(V) && pe && V.name === pe && (pe = V, V = V.parent), Vm(V) && V.locals && !s0(V) && (ne = c(V.locals, ge, $))) { + let de = !0; + if (ps(V) && pe && pe !== V.body ? ($ & ne.flags & 788968 && pe.kind !== 320 && (de = ne.flags & 262144 ? !!(pe.flags & 16) || // Synthetic fake scopes are added for signatures so type parameters are accessible from them + pe === V.type || pe.kind === 169 || pe.kind === 341 || pe.kind === 342 || pe.kind === 168 : !1), $ & ne.flags & 3 && (P(ne, V, pe) ? de = !1 : ne.flags & 1 && (de = pe.kind === 169 || !!(pe.flags & 16) || // Synthetic fake scopes are added for signatures so parameters are accessible from them + pe === V.type && !!sr(ne.valueDeclaration, ji)))) : V.kind === 194 && (de = pe === V.trueType), de) + break e; + ne = void 0; + } + switch (le = le || O(V, pe), V.kind) { + case 307: + if (!A_(V)) break; + case 267: + const de = ((K = s(V)) == null ? void 0 : K.exports) || C; + if (V.kind === 307 || Nc(V) && V.flags & 33554432 && !Zd(V)) { + if (ne = de.get( + "default" + /* Default */ + )) { + const Xe = C4(ne); + if (Xe && ne.flags & $ && Xe.escapedName === ge) + break e; + ne = void 0; + } + const De = de.get(ge); + if (De && De.flags === 2097152 && (Jo( + De, + 281 + /* ExportSpecifier */ + ) || Jo( + De, + 280 + /* NamespaceExport */ + ))) + break; + } + if (ge !== "default" && (ne = c( + de, + ge, + $ & 2623475 + /* ModuleMember */ + ))) + if (yi(V) && V.commonJsModuleIndicator && !((X = ne.declarations) != null && X.some(Np))) + ne = void 0; + else + break e; + break; + case 266: + if (ne = c( + ((Z = s(V)) == null ? void 0 : Z.exports) || C, + ge, + $ & 8 + /* EnumMember */ + )) { + U && ap(e) && !(V.flags & 33554432) && xr(V) !== xr(ne.valueDeclaration) && i( + oe, + p.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, + Pi(ge), + S, + `${Pi(s(V).escapedName)}.${Pi(ge)}` + ); + break e; + } + break; + case 172: + if (!Os(V)) { + const De = G3(V.parent); + De && De.locals && c( + De.locals, + ge, + $ & 111551 + /* Value */ + ) && (E.assertNode(V, rs), H = V); + } + break; + case 263: + case 231: + case 264: + if (ne = c( + s(V).members || C, + ge, + $ & 788968 + /* Type */ + )) { + if (!F(ne, V)) { + ne = void 0; + break; + } + if (pe && Os(pe)) { + U && i(oe, p.Static_members_cannot_reference_class_type_parameters); + return; + } + break e; + } + if (tl(V) && $ & 32) { + const De = V.name; + if (De && ge === De.escapedText) { + ne = V.symbol; + break e; + } + } + break; + case 233: + if (pe === V.expression && V.parent.token === 96) { + const De = V.parent.parent; + if (Qn(De) && (ne = c( + s(De).members, + ge, + $ & 788968 + /* Type */ + ))) { + U && i(oe, p.Base_class_expressions_cannot_reference_class_type_parameters); + return; + } + } + break; + case 167: + if (Ae = V.parent.parent, (Qn(Ae) || Ae.kind === 264) && (ne = c( + s(Ae).members, + ge, + $ & 788968 + /* Type */ + ))) { + U && i(oe, p.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); + return; + } + break; + case 219: + if (pa(e) >= 2) + break; + case 174: + case 176: + case 177: + case 178: + case 262: + if ($ & 3 && ge === "arguments") { + ne = n; + break e; + } + break; + case 218: + if ($ & 3 && ge === "arguments") { + ne = n; + break e; + } + if ($ & 16) { + const De = V.name; + if (De && ge === De.escapedText) { + ne = V.symbol; + break e; + } + } + break; + case 170: + V.parent && V.parent.kind === 169 && (V = V.parent), V.parent && (fl(V.parent) || V.parent.kind === 263) && (V = V.parent); + break; + case 346: + case 338: + case 340: + case 351: + const ve = fC(V); + ve && (V = ve.parent); + break; + case 169: + pe && (pe === V.initializer || pe === V.name && Ts(pe)) && (ae || (ae = V)); + break; + case 208: + pe && (pe === V.initializer || pe === V.name && Ts(pe)) && X1(V) && !ae && (ae = V); + break; + case 195: + if ($ & 262144) { + const De = V.typeParameter.name; + if (De && ge === De.escapedText) { + ne = V.typeParameter.symbol; + break e; + } + } + break; + case 281: + pe && pe === V.propertyName && V.parent.parent.moduleSpecifier && (V = V.parent.parent.parent); + break; + } + j(V, pe) && (fe = V), pe = V, V = jp(V) ? A7(V) || V.parent : (up(V) || K5(V)) && q1(V) || V.parent; + } + if (G && ne && (!fe || ne !== fe.symbol) && (ne.isReferenced |= $), !ne) { + if (pe && (E.assertNode(pe, yi), pe.commonJsModuleIndicator && ge === "exports" && $ & pe.symbol.flags)) + return pe.symbol; + ce || (ne = c(o, ge, $)); + } + if (!ne && oe && Qr(oe) && oe.parent && d_( + oe.parent, + /*requireStringLiteralLikeArgument*/ + !1 + )) + return t; + if (U) { + if (H && d(oe, ge, H, ne)) + return; + ne ? h(oe, ne, $, pe, ae, le) : g(oe, L, $, U); + } + return ne; + } + function P(V, L, $) { + const U = pa(e), G = L; + if (ji($) && G.body && V.valueDeclaration && V.valueDeclaration.pos >= G.body.pos && V.valueDeclaration.end <= G.body.end && U >= 2) { + let X = u(G); + return X === void 0 && (X = rr(G.parameters, ce) || !1, _(G, X)), !X; + } + return !1; + function ce(X) { + return K(X.name) || !!X.initializer && K(X.initializer); + } + function K(X) { + switch (X.kind) { + case 219: + case 218: + case 262: + case 176: + return !1; + case 174: + case 177: + case 178: + case 303: + return K(X.name); + case 172: + return Uc(X) ? !T : K(X.name); + default: + return pj(X) || fu(X) ? U < 7 : da(X) && X.dotDotDotToken && If(X.parent) ? U < 4 : ai(X) ? !1 : gs(X, K) || !1; + } + } + } + function O(V, L) { + return V.kind !== 219 && V.kind !== 218 ? wb(V) || (so(V) || V.kind === 172 && !Os(V)) && (!L || L !== V.name) : L && L === V.name ? !1 : V.asteriskToken || Vn( + V, + 1024 + /* Async */ + ) ? !0 : !db(V); + } + function j(V, L) { + switch (V.kind) { + case 169: + return !!L && L === V.name; + case 262: + case 263: + case 264: + case 266: + case 265: + case 267: + return !0; + default: + return !1; + } + } + function F(V, L) { + if (V.declarations) { + for (const $ of V.declarations) + if ($.kind === 168 && (jp($.parent) ? hb($.parent) : $.parent) === L) + return !(jp($.parent) && Nn($.parent.parent.tags, Np)); + } + return !1; + } + } + function A5(e, t = !0) { + switch (E.type(e), e.kind) { + case 112: + case 97: + case 9: + case 11: + case 15: + return !0; + case 10: + return t; + case 224: + return e.operator === 41 ? m_(e.operand) || t && eA(e.operand) : e.operator === 40 ? m_(e.operand) : !1; + default: + return !1; + } + } + function kee(e) { + for (; e.kind === 217; ) + e = e.expression; + return e; + } + function Cee(e) { + switch (E.type(e), e.kind) { + case 169: + case 171: + case 172: + case 208: + case 211: + case 212: + case 226: + case 260: + case 277: + case 303: + return !0; + default: + return !1; + } + } + function Eee() { + let e, t, n, i, s; + return { + createBaseSourceFileNode: o, + createBaseIdentifierNode: c, + createBasePrivateIdentifierNode: _, + createBaseTokenNode: u, + createBaseNode: d + }; + function o(g) { + return new (s || (s = zl.getSourceFileConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function c(g) { + return new (n || (n = zl.getIdentifierConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function _(g) { + return new (i || (i = zl.getPrivateIdentifierConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function u(g) { + return new (t || (t = zl.getTokenConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + function d(g) { + return new (e || (e = zl.getNodeConstructor()))( + g, + /*pos*/ + -1, + /*end*/ + -1 + ); + } + } + function Dee(e) { + let t, n; + return { + getParenthesizeLeftSideOfBinaryForOperator: i, + getParenthesizeRightSideOfBinaryForOperator: s, + parenthesizeLeftSideOfBinary: d, + parenthesizeRightSideOfBinary: g, + parenthesizeExpressionOfComputedPropertyName: h, + parenthesizeConditionOfConditionalExpression: S, + parenthesizeBranchOfConditionalExpression: T, + parenthesizeExpressionOfExportDefault: C, + parenthesizeExpressionOfNew: D, + parenthesizeLeftSideOfAccess: P, + parenthesizeOperandOfPostfixUnary: O, + parenthesizeOperandOfPrefixUnary: j, + parenthesizeExpressionsOfCommaDelimitedList: F, + parenthesizeExpressionForDisallowedComma: V, + parenthesizeExpressionOfExpressionStatement: L, + parenthesizeConciseBodyOfArrowFunction: $, + parenthesizeCheckTypeOfConditionalType: U, + parenthesizeExtendsTypeOfConditionalType: G, + parenthesizeConstituentTypesOfUnionType: K, + parenthesizeConstituentTypeOfUnionType: ce, + parenthesizeConstituentTypesOfIntersectionType: Z, + parenthesizeConstituentTypeOfIntersectionType: X, + parenthesizeOperandOfTypeOperator: oe, + parenthesizeOperandOfReadonlyTypeOperator: ne, + parenthesizeNonArrayTypeOfPostfixType: pe, + parenthesizeElementTypesOfTupleType: fe, + parenthesizeElementTypeOfTupleType: H, + parenthesizeTypeOfOptionalType: le, + parenthesizeTypeArguments: de, + parenthesizeLeadingTypeArgument: Ae + }; + function i(ve) { + t || (t = /* @__PURE__ */ new Map()); + let De = t.get(ve); + return De || (De = (Xe) => d(ve, Xe), t.set(ve, De)), De; + } + function s(ve) { + n || (n = /* @__PURE__ */ new Map()); + let De = n.get(ve); + return De || (De = (Xe) => g( + ve, + /*leftSide*/ + void 0, + Xe + ), n.set(ve, De)), De; + } + function o(ve, De, Xe, Ie) { + const ye = C3(226, ve), Fe = yB(226, ve), Qe = Xp(De); + if (!Xe && De.kind === 219 && ye > 3) + return !0; + const Ke = v4(Qe); + switch (uo(Ke, ye)) { + case -1: + return !(!Xe && Fe === 1 && De.kind === 229); + case 1: + return !1; + case 0: + if (Xe) + return Fe === 1; + if (cn(Qe) && Qe.operatorToken.kind === ve) { + if (c(ve)) + return !1; + if (ve === 40) { + const at = Ie ? _(Ie) : 0; + if (GE(at) && at === _(Qe)) + return !1; + } + } + return hB(Qe) === 0; + } + } + function c(ve) { + return ve === 42 || ve === 52 || ve === 51 || ve === 53 || ve === 28; + } + function _(ve) { + if (ve = Xp(ve), GE(ve.kind)) + return ve.kind; + if (ve.kind === 226 && ve.operatorToken.kind === 40) { + if (ve.cachedLiteralKind !== void 0) + return ve.cachedLiteralKind; + const De = _(ve.left), Xe = GE(De) && De === _(ve.right) ? De : 0; + return ve.cachedLiteralKind = Xe, Xe; + } + return 0; + } + function u(ve, De, Xe, Ie) { + return Xp(De).kind === 217 ? De : o(ve, De, Xe, Ie) ? e.createParenthesizedExpression(De) : De; + } + function d(ve, De) { + return u( + ve, + De, + /*isLeftSideOfBinary*/ + !0 + ); + } + function g(ve, De, Xe) { + return u( + ve, + Xe, + /*isLeftSideOfBinary*/ + !1, + De + ); + } + function h(ve) { + return _D(ve) ? e.createParenthesizedExpression(ve) : ve; + } + function S(ve) { + const De = C3( + 227, + 58 + /* QuestionToken */ + ), Xe = Xp(ve), Ie = v4(Xe); + return uo(Ie, De) !== 1 ? e.createParenthesizedExpression(ve) : ve; + } + function T(ve) { + const De = Xp(ve); + return _D(De) ? e.createParenthesizedExpression(ve) : ve; + } + function C(ve) { + const De = Xp(ve); + let Xe = _D(De); + if (!Xe) + switch (kC( + De, + /*stopAtCallExpressions*/ + !1 + ).kind) { + case 231: + case 218: + Xe = !0; + } + return Xe ? e.createParenthesizedExpression(ve) : ve; + } + function D(ve) { + const De = kC( + ve, + /*stopAtCallExpressions*/ + !0 + ); + switch (De.kind) { + case 213: + return e.createParenthesizedExpression(ve); + case 214: + return De.arguments ? ve : e.createParenthesizedExpression(ve); + } + return P(ve); + } + function P(ve, De) { + const Xe = Xp(ve); + return __(Xe) && (Xe.kind !== 214 || Xe.arguments) && (De || !fu(Xe)) ? ve : ot(e.createParenthesizedExpression(ve), ve); + } + function O(ve) { + return __(ve) ? ve : ot(e.createParenthesizedExpression(ve), ve); + } + function j(ve) { + return xj(ve) ? ve : ot(e.createParenthesizedExpression(ve), ve); + } + function F(ve) { + const De = Zc(ve, V); + return ot(e.createNodeArray(De, ve.hasTrailingComma), ve); + } + function V(ve) { + const De = Xp(ve), Xe = v4(De), Ie = C3( + 226, + 28 + /* CommaToken */ + ); + return Xe > Ie ? ve : ot(e.createParenthesizedExpression(ve), ve); + } + function L(ve) { + const De = Xp(ve); + if (Es(De)) { + const Ie = De.expression, ye = Xp(Ie).kind; + if (ye === 218 || ye === 219) { + const Fe = e.updateCallExpression( + De, + ot(e.createParenthesizedExpression(Ie), Ie), + De.typeArguments, + De.arguments + ); + return e.restoreOuterExpressions( + ve, + Fe, + 8 + /* PartiallyEmittedExpressions */ + ); + } + } + const Xe = kC( + De, + /*stopAtCallExpressions*/ + !1 + ).kind; + return Xe === 210 || Xe === 218 ? ot(e.createParenthesizedExpression(ve), ve) : ve; + } + function $(ve) { + return !ms(ve) && (_D(ve) || kC( + ve, + /*stopAtCallExpressions*/ + !1 + ).kind === 210) ? ot(e.createParenthesizedExpression(ve), ve) : ve; + } + function U(ve) { + switch (ve.kind) { + case 184: + case 185: + case 194: + return e.createParenthesizedType(ve); + } + return ve; + } + function G(ve) { + switch (ve.kind) { + case 194: + return e.createParenthesizedType(ve); + } + return ve; + } + function ce(ve) { + switch (ve.kind) { + case 192: + case 193: + return e.createParenthesizedType(ve); + } + return U(ve); + } + function K(ve) { + return e.createNodeArray(Zc(ve, ce)); + } + function X(ve) { + switch (ve.kind) { + case 192: + case 193: + return e.createParenthesizedType(ve); + } + return ce(ve); + } + function Z(ve) { + return e.createNodeArray(Zc(ve, X)); + } + function oe(ve) { + switch (ve.kind) { + case 193: + return e.createParenthesizedType(ve); + } + return X(ve); + } + function ne(ve) { + switch (ve.kind) { + case 198: + return e.createParenthesizedType(ve); + } + return oe(ve); + } + function pe(ve) { + switch (ve.kind) { + case 195: + case 198: + case 186: + return e.createParenthesizedType(ve); + } + return oe(ve); + } + function fe(ve) { + return e.createNodeArray(Zc(ve, H)); + } + function H(ve) { + return ae(ve) ? e.createParenthesizedType(ve) : ve; + } + function ae(ve) { + return FC(ve) ? ve.postfix : AC(ve) || Xm(ve) || wC(ve) || K1(ve) ? ae(ve.type) : Ab(ve) ? ae(ve.falseType) : ky(ve) || gx(ve) ? ae(ia(ve.types)) : rS(ve) ? !!ve.typeParameter.constraint && ae(ve.typeParameter.constraint) : !1; + } + function le(ve) { + return ae(ve) ? e.createParenthesizedType(ve) : pe(ve); + } + function Ae(ve) { + return JY(ve) && ve.typeParameters ? e.createParenthesizedType(ve) : ve; + } + function ge(ve, De) { + return De === 0 ? Ae(ve) : ve; + } + function de(ve) { + if (ut(ve)) + return e.createNodeArray(Zc(ve, ge)); + } + } + var Pee = { + getParenthesizeLeftSideOfBinaryForOperator: (e) => lo, + getParenthesizeRightSideOfBinaryForOperator: (e) => lo, + parenthesizeLeftSideOfBinary: (e, t) => t, + parenthesizeRightSideOfBinary: (e, t, n) => n, + parenthesizeExpressionOfComputedPropertyName: lo, + parenthesizeConditionOfConditionalExpression: lo, + parenthesizeBranchOfConditionalExpression: lo, + parenthesizeExpressionOfExportDefault: lo, + parenthesizeExpressionOfNew: (e) => Is(e, __), + parenthesizeLeftSideOfAccess: (e) => Is(e, __), + parenthesizeOperandOfPostfixUnary: (e) => Is(e, __), + parenthesizeOperandOfPrefixUnary: (e) => Is(e, xj), + parenthesizeExpressionsOfCommaDelimitedList: (e) => Is(e, ab), + parenthesizeExpressionForDisallowedComma: lo, + parenthesizeExpressionOfExpressionStatement: lo, + parenthesizeConciseBodyOfArrowFunction: lo, + parenthesizeCheckTypeOfConditionalType: lo, + parenthesizeExtendsTypeOfConditionalType: lo, + parenthesizeConstituentTypesOfUnionType: (e) => Is(e, ab), + parenthesizeConstituentTypeOfUnionType: lo, + parenthesizeConstituentTypesOfIntersectionType: (e) => Is(e, ab), + parenthesizeConstituentTypeOfIntersectionType: lo, + parenthesizeOperandOfTypeOperator: lo, + parenthesizeOperandOfReadonlyTypeOperator: lo, + parenthesizeNonArrayTypeOfPostfixType: lo, + parenthesizeElementTypesOfTupleType: (e) => Is(e, ab), + parenthesizeElementTypeOfTupleType: lo, + parenthesizeTypeOfOptionalType: lo, + parenthesizeTypeArguments: (e) => e && Is(e, ab), + parenthesizeLeadingTypeArgument: lo + }; + function wee(e) { + return { + convertToFunctionBlock: t, + convertToFunctionExpression: n, + convertToClassExpression: i, + convertToArrayAssignmentElement: s, + convertToObjectAssignmentElement: o, + convertToAssignmentPattern: c, + convertToObjectAssignmentPattern: _, + convertToArrayAssignmentPattern: u, + convertToAssignmentElementTarget: d + }; + function t(g, h) { + if (ms(g)) return g; + const S = e.createReturnStatement(g); + ot(S, g); + const T = e.createBlock([S], h); + return ot(T, g), T; + } + function n(g) { + var h; + if (!g.body) return E.fail("Cannot convert a FunctionDeclaration without a body"); + const S = e.createFunctionExpression( + (h = sb(g)) == null ? void 0 : h.filter((T) => !_x(T) && !W5(T)), + g.asteriskToken, + g.name, + g.typeParameters, + g.parameters, + g.type, + g.body + ); + return kn(S, g), ot(S, g), $4(g) && O5( + S, + /*newLine*/ + !0 + ), S; + } + function i(g) { + var h; + const S = e.createClassExpression( + (h = g.modifiers) == null ? void 0 : h.filter((T) => !_x(T) && !W5(T)), + g.name, + g.typeParameters, + g.heritageClauses, + g.members + ); + return kn(S, g), ot(S, g), $4(g) && O5( + S, + /*newLine*/ + !0 + ), S; + } + function s(g) { + if (da(g)) { + if (g.dotDotDotToken) + return E.assertNode(g.name, Re), kn(ot(e.createSpreadElement(g.name), g), g); + const h = d(g.name); + return g.initializer ? kn( + ot( + e.createAssignment(h, g.initializer), + g + ), + g + ) : h; + } + return Is(g, ct); + } + function o(g) { + if (da(g)) { + if (g.dotDotDotToken) + return E.assertNode(g.name, Re), kn(ot(e.createSpreadAssignment(g.name), g), g); + if (g.propertyName) { + const h = d(g.name); + return kn(ot(e.createPropertyAssignment(g.propertyName, g.initializer ? e.createAssignment(h, g.initializer) : h), g), g); + } + return E.assertNode(g.name, Re), kn(ot(e.createShorthandPropertyAssignment(g.name, g.initializer), g), g); + } + return Is(g, lh); + } + function c(g) { + switch (g.kind) { + case 207: + case 209: + return u(g); + case 206: + case 210: + return _(g); + } + } + function _(g) { + return If(g) ? kn( + ot( + e.createObjectLiteralExpression(or(g.elements, o)), + g + ), + g + ) : Is(g, Gs); + } + function u(g) { + return v0(g) ? kn( + ot( + e.createArrayLiteralExpression(or(g.elements, s)), + g + ), + g + ) : Is(g, Wl); + } + function d(g) { + return Ts(g) ? c(g) : Is(g, ct); + } + } + var Aee = { + convertToFunctionBlock: Rs, + convertToFunctionExpression: Rs, + convertToClassExpression: Rs, + convertToArrayAssignmentElement: Rs, + convertToObjectAssignmentElement: Rs, + convertToAssignmentPattern: Rs, + convertToObjectAssignmentPattern: Rs, + convertToArrayAssignmentPattern: Rs, + convertToAssignmentElementTarget: Rs + }, yJ = 0, Nee = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.NoParenthesizerRules = 1] = "NoParenthesizerRules", e[e.NoNodeConverters = 2] = "NoNodeConverters", e[e.NoIndentationOnFreshPropertyAccess = 4] = "NoIndentationOnFreshPropertyAccess", e[e.NoOriginalNode = 8] = "NoOriginalNode", e))(Nee || {}), o0e = []; + function c0e(e) { + o0e.push(e); + } + function $3(e, t) { + const n = e & 8 ? lo : kn, i = Wu(() => e & 1 ? Pee : Dee(O)), s = Wu(() => e & 2 ? Aee : wee(O)), o = Bm((v) => (w, B) => zr(w, v, B)), c = Bm((v) => (w) => tt(v, w)), _ = Bm((v) => (w) => It(w, v)), u = Bm((v) => () => ns(v)), d = Bm((v) => (w) => Ev(v, w)), g = Bm((v) => (w, B) => sn(v, w, B)), h = Bm((v) => (w, B) => k_(v, w, B)), S = Bm((v) => (w, B) => Xy(v, w, B)), T = Bm((v) => (w, B) => Av(v, w, B)), C = Bm((v) => (w, B, se) => No(v, w, B, se)), D = Bm((v) => (w, B, se) => M6(v, w, B, se)), P = Bm((v) => (w, B, se, ze) => yP(v, w, B, se, ze)), O = { + get parenthesizer() { + return i(); + }, + get converters() { + return s(); + }, + baseFactory: t, + flags: e, + createNodeArray: j, + createNumericLiteral: $, + createBigIntLiteral: U, + createStringLiteral: ce, + createStringLiteralFromNode: K, + createRegularExpressionLiteral: X, + createLiteralLikeNode: Z, + createIdentifier: pe, + createTempVariable: fe, + createLoopVariable: H, + createUniqueName: ae, + getGeneratedNameForNode: le, + createPrivateIdentifier: ge, + createUniquePrivateName: ve, + getGeneratedPrivateNameForNode: De, + createToken: Ie, + createSuper: ye, + createThis: Fe, + createNull: Qe, + createTrue: Ke, + createFalse: Be, + createModifier: at, + createModifiersFromModifierFlags: Wt, + createQualifiedName: nr, + updateQualifiedName: Kt, + createComputedPropertyName: Pr, + updateComputedPropertyName: Vt, + createTypeParameterDeclaration: zt, + updateTypeParameterDeclaration: jr, + createParameterDeclaration: ci, + updateParameterDeclaration: Xt, + createDecorator: Ai, + updateDecorator: _s, + createPropertySignature: $n, + updatePropertySignature: os, + createPropertyDeclaration: Ss, + updatePropertyDeclaration: Le, + createMethodSignature: At, + updateMethodSignature: vr, + createMethodDeclaration: ln, + updateMethodDeclaration: Zn, + createConstructorDeclaration: Yt, + updateConstructorDeclaration: Ca, + createGetAccessorDeclaration: nt, + updateGetAccessorDeclaration: te, + createSetAccessorDeclaration: re, + updateSetAccessorDeclaration: Ee, + createCallSignature: et, + updateCallSignature: lt, + createConstructSignature: jt, + updateConstructSignature: be, + createIndexSignature: ft, + updateIndexSignature: bt, + createClassStaticBlockDeclaration: mi, + updateClassStaticBlockDeclaration: Ps, + createTemplateLiteralTypeSpan: kt, + updateTemplateLiteralTypeSpan: yt, + createKeywordTypeNode: Ut, + createTypePredicateNode: W, + updateTypePredicateNode: je, + createTypeReferenceNode: st, + updateTypeReferenceNode: z, + createFunctionTypeNode: he, + updateFunctionTypeNode: q, + createConstructorTypeNode: _e, + updateConstructorTypeNode: xt, + createTypeQueryNode: br, + updateTypeQueryNode: Lr, + createTypeLiteralNode: en, + updateTypeLiteralNode: fr, + createArrayTypeNode: mn, + updateArrayTypeNode: Di, + createTupleTypeNode: Fi, + updateTupleTypeNode: ur, + createNamedTupleMember: Mr, + updateNamedTupleMember: Or, + createOptionalTypeNode: tn, + updateOptionalTypeNode: qt, + createRestTypeNode: ma, + updateRestTypeNode: $a, + createUnionTypeNode: hs, + updateUnionTypeNode: ga, + createIntersectionTypeNode: Co, + updateIntersectionTypeNode: Li, + createConditionalTypeNode: bi, + updateConditionalTypeNode: wl, + createInferTypeNode: jo, + updateInferTypeNode: Su, + createImportTypeNode: ea, + updateImportTypeNode: wo, + createParenthesizedType: Ka, + updateParenthesizedType: Fa, + createThisTypeNode: Bt, + createTypeOperatorNode: lc, + updateTypeOperatorNode: Fu, + createIndexedAccessTypeNode: Lu, + updateIndexedAccessTypeNode: y_, + createMappedTypeNode: Ao, + updateMappedTypeNode: Uo, + createLiteralTypeNode: A, + updateLiteralTypeNode: Me, + createTemplateLiteralType: fc, + updateTemplateLiteralType: ql, + createObjectBindingPattern: it, + updateObjectBindingPattern: Ot, + createArrayBindingPattern: kr, + updateArrayBindingPattern: qn, + createBindingElement: Ht, + updateBindingElement: yn, + createArrayLiteralExpression: li, + updateArrayLiteralExpression: _i, + createObjectLiteralExpression: eo, + updateObjectLiteralExpression: qo, + createPropertyAccessExpression: e & 4 ? (v, w) => Kr( + vo(v, w), + 262144 + /* NoIndentation */ + ) : vo, + updatePropertyAccessExpression: cl, + createPropertyAccessChain: e & 4 ? (v, w, B) => Kr( + Eo(v, w, B), + 262144 + /* NoIndentation */ + ) : Eo, + updatePropertyAccessChain: gl, + createElementAccessExpression: kc, + updateElementAccessExpression: F_, + createElementAccessChain: Jf, + updateElementAccessChain: Pe, + createCallExpression: Jr, + updateCallExpression: Vi, + createCallChain: ha, + updateCallChain: Pa, + createNewExpression: vc, + updateNewExpression: Do, + createTaggedTemplateExpression: to, + updateTaggedTemplateExpression: pc, + createTypeAssertion: Cc, + updateTypeAssertion: bf, + createParenthesizedExpression: Id, + updateParenthesizedExpression: zf, + createFunctionExpression: v_, + updateFunctionExpression: pp, + createArrowFunction: Wf, + updateArrowFunction: tg, + createDeleteExpression: rg, + updateDeleteExpression: b_, + createTypeOfExpression: Gc, + updateTypeOfExpression: ng, + createVoidExpression: L_, + updateVoidExpression: bm, + createAwaitExpression: Vf, + updateAwaitExpression: Y, + createPrefixUnaryExpression: tt, + updatePrefixUnaryExpression: Pt, + createPostfixUnaryExpression: It, + updatePostfixUnaryExpression: hr, + createBinaryExpression: zr, + updateBinaryExpression: ei, + createConditionalExpression: M, + updateConditionalExpression: ke, + createTemplateExpression: vt, + updateTemplateExpression: Nr, + createTemplateHead: ya, + createTemplateMiddle: tc, + createTemplateTail: dp, + createNoSubstitutionTemplateLiteral: rd, + createTemplateLiteralLikeNode: wa, + createYieldExpression: ig, + updateYieldExpression: Ug, + createSpreadElement: w0, + updateSpreadElement: qg, + createClassExpression: Uf, + updateClassExpression: cf, + createOmittedExpression: za, + createExpressionWithTypeArguments: t_, + updateExpressionWithTypeArguments: S_, + createAsExpression: Od, + updateAsExpression: A0, + createNonNullExpression: N0, + updateNonNullExpression: zp, + createSatisfiesExpression: jy, + updateSatisfiesExpression: I0, + createNonNullChain: nd, + updateNonNullChain: Hg, + createMetaProperty: wh, + updateMetaProperty: Sf, + createTemplateSpan: sg, + updateTemplateSpan: Oe, + createSemicolonClassElement: Ue, + createBlock: Tt, + updateBlock: Lt, + createVariableStatement: lr, + updateVariableStatement: Gr, + createEmptyStatement: _r, + createExpressionStatement: _n, + updateExpressionStatement: gi, + createIfStatement: nn, + updateIfStatement: ii, + createDoStatement: Vr, + updateDoStatement: Yi, + createWhileStatement: ca, + updateWhileStatement: El, + createForStatement: Tu, + updateForStatement: mp, + createForInStatement: By, + updateForInStatement: Wp, + createForOfStatement: Zx, + updateForOfStatement: P6, + createContinueStatement: Kb, + updateContinueStatement: e2, + createBreakStatement: Jy, + updateBreakStatement: Tv, + createReturnStatement: CS, + updateReturnStatement: zy, + createWithStatement: xv, + updateWithStatement: t2, + createSwitchStatement: ag, + updateSwitchStatement: La, + createLabeledStatement: ES, + updateLabeledStatement: w6, + createThrowStatement: Ah, + updateThrowStatement: O0, + createTryStatement: og, + updateTryStatement: qf, + createDebuggerStatement: lf, + createVariableDeclaration: r_, + updateVariableDeclaration: Tf, + createVariableDeclarationList: Gg, + updateVariableDeclarationList: gP, + createFunctionDeclaration: F0, + updateFunctionDeclaration: Wy, + createClassDeclaration: PS, + updateClassDeclaration: kv, + createInterfaceDeclaration: A6, + updateInterfaceDeclaration: Al, + createTypeAliasDeclaration: Fd, + updateTypeAliasDeclaration: r2, + createEnumDeclaration: We, + updateEnumDeclaration: Vy, + createModuleDeclaration: ll, + updateModuleDeclaration: id, + createModuleBlock: T_, + updateModuleBlock: Uy, + createCaseBlock: Vp, + updateCaseBlock: Hf, + createNamespaceExportDeclaration: qy, + updateNamespaceExportDeclaration: va, + createImportEqualsDeclaration: wS, + updateImportEqualsDeclaration: n2, + createImportDeclaration: AS, + updateImportDeclaration: NS, + createImportClause: Nh, + updateImportClause: Hy, + createAssertClause: i2, + updateAssertClause: Cv, + createAssertEntry: sd, + updateAssertEntry: xf, + createImportTypeAssertionContainer: L0, + updateImportTypeAssertionContainer: Ni, + createImportAttributes: bn, + updateImportAttributes: x_, + createImportAttribute: Gy, + updateImportAttribute: cg, + createNamespaceImport: Kx, + updateNamespaceImport: Ih, + createNamespaceExport: N6, + updateNamespaceExport: $g, + createNamedImports: M0, + updateNamedImports: Tm, + createImportSpecifier: ad, + updateImportSpecifier: IS, + createExportAssignment: $y, + updateExportAssignment: s2, + createExportDeclaration: bo, + updateExportDeclaration: Oh, + createNamedExports: OS, + updateNamedExports: FS, + createExportSpecifier: tk, + updateExportSpecifier: hP, + createMissingDeclaration: I6, + createExternalModuleReference: hn, + updateExternalModuleReference: iu, + // lazily load factory members for JSDoc types with similar structure + get createJSDocAllType() { + return u( + 312 + /* JSDocAllType */ + ); + }, + get createJSDocUnknownType() { + return u( + 313 + /* JSDocUnknownType */ + ); + }, + get createJSDocNonNullableType() { + return h( + 315 + /* JSDocNonNullableType */ + ); + }, + get updateJSDocNonNullableType() { + return S( + 315 + /* JSDocNonNullableType */ + ); + }, + get createJSDocNullableType() { + return h( + 314 + /* JSDocNullableType */ + ); + }, + get updateJSDocNullableType() { + return S( + 314 + /* JSDocNullableType */ + ); + }, + get createJSDocOptionalType() { + return d( + 316 + /* JSDocOptionalType */ + ); + }, + get updateJSDocOptionalType() { + return g( + 316 + /* JSDocOptionalType */ + ); + }, + get createJSDocVariadicType() { + return d( + 318 + /* JSDocVariadicType */ + ); + }, + get updateJSDocVariadicType() { + return g( + 318 + /* JSDocVariadicType */ + ); + }, + get createJSDocNamepathType() { + return d( + 319 + /* JSDocNamepathType */ + ); + }, + get updateJSDocNamepathType() { + return g( + 319 + /* JSDocNamepathType */ + ); + }, + createJSDocFunctionType: O6, + updateJSDocFunctionType: Dv, + createJSDocTypeLiteral: Mu, + updateJSDocTypeLiteral: od, + createJSDocTypeExpression: gp, + updateJSDocTypeExpression: Qy, + createJSDocSignature: Pv, + updateJSDocSignature: Xg, + createJSDocTemplateTag: R0, + updateJSDocTemplateTag: wv, + createJSDocTypedefTag: rk, + updateJSDocTypedefTag: LS, + createJSDocParameterTag: a2, + updateJSDocParameterTag: MS, + createJSDocPropertyTag: o2, + updateJSDocPropertyTag: RS, + createJSDocCallbackTag: Ld, + updateJSDocCallbackTag: F6, + createJSDocOverloadTag: Yy, + updateJSDocOverloadTag: Zy, + createJSDocAugmentsTag: Fh, + updateJSDocAugmentsTag: j0, + createJSDocImplementsTag: hp, + updateJSDocImplementsTag: L6, + createJSDocSeeTag: B0, + updateJSDocSeeTag: Lh, + createJSDocImportTag: Nv, + updateJSDocImportTag: ak, + createJSDocNameReference: hl, + updateJSDocNameReference: bc, + createJSDocMemberName: Ec, + updateJSDocMemberName: jS, + createJSDocLink: n_, + updateJSDocLink: i_, + createJSDocLinkCode: nk, + updateJSDocLinkCode: ud, + createJSDocLinkPlain: ik, + updateJSDocLinkPlain: Ky, + // lazily load factory members for JSDoc tags with similar structure + get createJSDocTypeTag() { + return D( + 344 + /* JSDocTypeTag */ + ); + }, + get updateJSDocTypeTag() { + return P( + 344 + /* JSDocTypeTag */ + ); + }, + get createJSDocReturnTag() { + return D( + 342 + /* JSDocReturnTag */ + ); + }, + get updateJSDocReturnTag() { + return P( + 342 + /* JSDocReturnTag */ + ); + }, + get createJSDocThisTag() { + return D( + 343 + /* JSDocThisTag */ + ); + }, + get updateJSDocThisTag() { + return P( + 343 + /* JSDocThisTag */ + ); + }, + get createJSDocAuthorTag() { + return T( + 330 + /* JSDocAuthorTag */ + ); + }, + get updateJSDocAuthorTag() { + return C( + 330 + /* JSDocAuthorTag */ + ); + }, + get createJSDocClassTag() { + return T( + 332 + /* JSDocClassTag */ + ); + }, + get updateJSDocClassTag() { + return C( + 332 + /* JSDocClassTag */ + ); + }, + get createJSDocPublicTag() { + return T( + 333 + /* JSDocPublicTag */ + ); + }, + get updateJSDocPublicTag() { + return C( + 333 + /* JSDocPublicTag */ + ); + }, + get createJSDocPrivateTag() { + return T( + 334 + /* JSDocPrivateTag */ + ); + }, + get updateJSDocPrivateTag() { + return C( + 334 + /* JSDocPrivateTag */ + ); + }, + get createJSDocProtectedTag() { + return T( + 335 + /* JSDocProtectedTag */ + ); + }, + get updateJSDocProtectedTag() { + return C( + 335 + /* JSDocProtectedTag */ + ); + }, + get createJSDocReadonlyTag() { + return T( + 336 + /* JSDocReadonlyTag */ + ); + }, + get updateJSDocReadonlyTag() { + return C( + 336 + /* JSDocReadonlyTag */ + ); + }, + get createJSDocOverrideTag() { + return T( + 337 + /* JSDocOverrideTag */ + ); + }, + get updateJSDocOverrideTag() { + return C( + 337 + /* JSDocOverrideTag */ + ); + }, + get createJSDocDeprecatedTag() { + return T( + 331 + /* JSDocDeprecatedTag */ + ); + }, + get updateJSDocDeprecatedTag() { + return C( + 331 + /* JSDocDeprecatedTag */ + ); + }, + get createJSDocThrowsTag() { + return D( + 349 + /* JSDocThrowsTag */ + ); + }, + get updateJSDocThrowsTag() { + return P( + 349 + /* JSDocThrowsTag */ + ); + }, + get createJSDocSatisfiesTag() { + return D( + 350 + /* JSDocSatisfiesTag */ + ); + }, + get updateJSDocSatisfiesTag() { + return P( + 350 + /* JSDocSatisfiesTag */ + ); + }, + createJSDocEnumTag: Ru, + updateJSDocEnumTag: sk, + createJSDocUnknownTag: BS, + updateJSDocUnknownTag: R6, + createJSDocText: M_, + updateJSDocText: c2, + createJSDocComment: e1, + updateJSDocComment: j6, + createJsxElement: l2, + updateJsxElement: ok, + createJsxSelfClosingElement: JS, + updateJsxSelfClosingElement: ck, + createJsxOpeningElement: zS, + updateJsxOpeningElement: WS, + createJsxClosingElement: kf, + updateJsxClosingElement: _f, + createJsxFragment: Md, + createJsxText: Iv, + updateJsxText: Ma, + createJsxOpeningFragment: xn, + createJsxJsxClosingFragment: C_, + updateJsxFragment: B6, + createJsxAttribute: s_, + updateJsxAttribute: lk, + createJsxAttributes: Mh, + updateJsxAttributes: J6, + createJsxSpreadAttribute: z6, + updateJsxSpreadAttribute: Ov, + createJsxExpression: Qg, + updateJsxExpression: Rd, + createJsxNamespacedName: R_, + updateJsxNamespacedName: t1, + createCaseClause: Yg, + updateCaseClause: jd, + createDefaultClause: u2, + updateDefaultClause: $c, + createHeritageClause: uk, + updateHeritageClause: yp, + createCatchClause: _d, + updateCatchClause: ff, + createPropertyAssignment: lg, + updatePropertyAssignment: r1, + createShorthandPropertyAssignment: _k, + updateShorthandPropertyAssignment: k, + createSpreadAssignment: _t, + updateSpreadAssignment: Qt, + createEnumMember: Hn, + updateEnumMember: Ui, + createSourceFile: Zi, + updateSourceFile: xm, + createRedirectedSourceFile: fs, + createBundle: E_, + updateBundle: i1, + createSyntheticExpression: Fv, + createSyntaxList: Rh, + createNotEmittedStatement: fk, + createPartiallyEmittedExpression: VS, + updatePartiallyEmittedExpression: Lv, + createCommaListExpression: km, + updateCommaListExpression: Ur, + createSyntheticReferenceExpression: pk, + updateSyntheticReferenceExpression: dk, + cloneNode: SP, + // Lazily load factory methods for common operator factories and utilities + get createComma() { + return o( + 28 + /* CommaToken */ + ); + }, + get createAssignment() { + return o( + 64 + /* EqualsToken */ + ); + }, + get createLogicalOr() { + return o( + 57 + /* BarBarToken */ + ); + }, + get createLogicalAnd() { + return o( + 56 + /* AmpersandAmpersandToken */ + ); + }, + get createBitwiseOr() { + return o( + 52 + /* BarToken */ + ); + }, + get createBitwiseXor() { + return o( + 53 + /* CaretToken */ + ); + }, + get createBitwiseAnd() { + return o( + 51 + /* AmpersandToken */ + ); + }, + get createStrictEquality() { + return o( + 37 + /* EqualsEqualsEqualsToken */ + ); + }, + get createStrictInequality() { + return o( + 38 + /* ExclamationEqualsEqualsToken */ + ); + }, + get createEquality() { + return o( + 35 + /* EqualsEqualsToken */ + ); + }, + get createInequality() { + return o( + 36 + /* ExclamationEqualsToken */ + ); + }, + get createLessThan() { + return o( + 30 + /* LessThanToken */ + ); + }, + get createLessThanEquals() { + return o( + 33 + /* LessThanEqualsToken */ + ); + }, + get createGreaterThan() { + return o( + 32 + /* GreaterThanToken */ + ); + }, + get createGreaterThanEquals() { + return o( + 34 + /* GreaterThanEqualsToken */ + ); + }, + get createLeftShift() { + return o( + 48 + /* LessThanLessThanToken */ + ); + }, + get createRightShift() { + return o( + 49 + /* GreaterThanGreaterThanToken */ + ); + }, + get createUnsignedRightShift() { + return o( + 50 + /* GreaterThanGreaterThanGreaterThanToken */ + ); + }, + get createAdd() { + return o( + 40 + /* PlusToken */ + ); + }, + get createSubtract() { + return o( + 41 + /* MinusToken */ + ); + }, + get createMultiply() { + return o( + 42 + /* AsteriskToken */ + ); + }, + get createDivide() { + return o( + 44 + /* SlashToken */ + ); + }, + get createModulo() { + return o( + 45 + /* PercentToken */ + ); + }, + get createExponent() { + return o( + 43 + /* AsteriskAsteriskToken */ + ); + }, + get createPrefixPlus() { + return c( + 40 + /* PlusToken */ + ); + }, + get createPrefixMinus() { + return c( + 41 + /* MinusToken */ + ); + }, + get createPrefixIncrement() { + return c( + 46 + /* PlusPlusToken */ + ); + }, + get createPrefixDecrement() { + return c( + 47 + /* MinusMinusToken */ + ); + }, + get createBitwiseNot() { + return c( + 55 + /* TildeToken */ + ); + }, + get createLogicalNot() { + return c( + 54 + /* ExclamationToken */ + ); + }, + get createPostfixIncrement() { + return _( + 46 + /* PlusPlusToken */ + ); + }, + get createPostfixDecrement() { + return _( + 47 + /* MinusMinusToken */ + ); + }, + // Compound nodes + createImmediatelyInvokedFunctionExpression: Mv, + createImmediatelyInvokedArrowFunction: vL, + createVoidZero: Rv, + createExportDefault: o8, + createExternalModuleExport: c8, + createTypeCheck: U6, + createIsNotTypeCheck: l8, + createMethodCall: ug, + createGlobalMethodCall: jv, + createFunctionBindCall: jh, + createFunctionCallCall: TP, + createFunctionApplyCall: _g, + createArraySliceCall: mk, + createArrayConcatCall: fg, + createObjectDefinePropertyCall: _2, + createObjectGetOwnPropertyDescriptorCall: bL, + createReflectGetCall: Xc, + createReflectSetCall: q6, + createPropertyDescriptor: Aa, + createCallBinding: xe, + createAssignmentTargetWrapper: qe, + // Utilities + inlineExpressions: gt, + getInternalName: dr, + getLocalName: In, + getExportName: Ti, + getDeclarationName: fi, + getNamespaceMemberName: ni, + getExternalModuleOrNamespaceExportName: oi, + restoreOuterExpressions: kP, + restoreEnclosingLabel: gk, + createUseStrictPrologue: Ta, + copyPrologue: ro, + copyStandardPrologue: Gf, + copyCustomPrologue: Cm, + ensureUseStrict: s1, + liftToBlock: J0, + mergeLexicalEnvironment: z0, + replaceModifiers: u8, + replaceDecoratorsAndModifiers: _8, + replacePropertyName: SL + }; + return rr(o0e, (v) => v(O)), O; + function j(v, w) { + if (v === void 0 || v === He) + v = []; + else if (ab(v)) { + if (w === void 0 || v.hasTrailingComma === w) + return v.transformFlags === void 0 && u0e(v), E.attachNodeArrayDebugInfo(v), v; + const ze = v.slice(); + return ze.pos = v.pos, ze.end = v.end, ze.hasTrailingComma = w, ze.transformFlags = v.transformFlags, E.attachNodeArrayDebugInfo(ze), ze; + } + const B = v.length, se = B >= 1 && B <= 4 ? v.slice() : v; + return se.pos = -1, se.end = -1, se.hasTrailingComma = !!w, se.transformFlags = 0, u0e(se), E.attachNodeArrayDebugInfo(se), se; + } + function F(v) { + return t.createBaseNode(v); + } + function V(v) { + const w = F(v); + return w.symbol = void 0, w.localSymbol = void 0, w; + } + function L(v, w) { + return v !== w && (v.typeArguments = w.typeArguments), $r(v, w); + } + function $(v, w = 0) { + const B = typeof v == "number" ? v + "" : v; + E.assert(B.charCodeAt(0) !== 45, "Negative numbers should be created in combination with createPrefixUnaryExpression"); + const se = V( + 9 + /* NumericLiteral */ + ); + return se.text = B, se.numericLiteralFlags = w, w & 384 && (se.transformFlags |= 1024), se; + } + function U(v) { + const w = Xe( + 10 + /* BigIntLiteral */ + ); + return w.text = typeof v == "string" ? v : Eb(v) + "n", w.transformFlags |= 32, w; + } + function G(v, w) { + const B = V( + 11 + /* StringLiteral */ + ); + return B.text = v, B.singleQuote = w, B; + } + function ce(v, w, B) { + const se = G(v, w); + return se.hasExtendedUnicodeEscape = B, B && (se.transformFlags |= 1024), se; + } + function K(v) { + const w = G( + Ip(v), + /*isSingleQuote*/ + void 0 + ); + return w.textSourceNode = v, w; + } + function X(v) { + const w = Xe( + 14 + /* RegularExpressionLiteral */ + ); + return w.text = v, w; + } + function Z(v, w) { + switch (v) { + case 9: + return $( + w, + /*numericLiteralFlags*/ + 0 + ); + case 10: + return U(w); + case 11: + return ce( + w, + /*isSingleQuote*/ + void 0 + ); + case 12: + return Iv( + w, + /*containsOnlyTriviaWhiteSpaces*/ + !1 + ); + case 13: + return Iv( + w, + /*containsOnlyTriviaWhiteSpaces*/ + !0 + ); + case 14: + return X(w); + case 15: + return wa( + v, + w, + /*rawText*/ + void 0, + /*templateFlags*/ + 0 + ); + } + } + function oe(v) { + const w = t.createBaseIdentifierNode( + 80 + /* Identifier */ + ); + return w.escapedText = v, w.jsDoc = void 0, w.flowNode = void 0, w.symbol = void 0, w; + } + function ne(v, w, B, se) { + const ze = oe(Ko(v)); + return K3(ze, { + flags: w, + id: yJ, + prefix: B, + suffix: se + }), yJ++, ze; + } + function pe(v, w, B) { + w === void 0 && v && (w = ib(v)), w === 80 && (w = void 0); + const se = oe(Ko(v)); + return B && (se.flags |= 256), se.escapedText === "await" && (se.transformFlags |= 67108864), se.flags & 256 && (se.transformFlags |= 1024), se; + } + function fe(v, w, B, se) { + let ze = 1; + w && (ze |= 8); + const Ft = ne("", ze, B, se); + return v && v(Ft), Ft; + } + function H(v) { + let w = 2; + return v && (w |= 8), ne( + "", + w, + /*prefix*/ + void 0, + /*suffix*/ + void 0 + ); + } + function ae(v, w = 0, B, se) { + return E.assert(!(w & 7), "Argument out of range: flags"), E.assert((w & 48) !== 32, "GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"), ne(v, 3 | w, B, se); + } + function le(v, w = 0, B, se) { + E.assert(!(w & 7), "Argument out of range: flags"); + const ze = v ? Dg(v) ? sv( + /*privateName*/ + !1, + B, + v, + se, + dn + ) : `generated@${ja(v)}` : ""; + (B || se) && (w |= 16); + const Ft = ne(ze, 4 | w, B, se); + return Ft.original = v, Ft; + } + function Ae(v) { + const w = t.createBasePrivateIdentifierNode( + 81 + /* PrivateIdentifier */ + ); + return w.escapedText = v, w.transformFlags |= 16777216, w; + } + function ge(v) { + return zi(v, "#") || E.fail("First character of private identifier must be #: " + v), Ae(Ko(v)); + } + function de(v, w, B, se) { + const ze = Ae(Ko(v)); + return K3(ze, { + flags: w, + id: yJ, + prefix: B, + suffix: se + }), yJ++, ze; + } + function ve(v, w, B) { + v && !zi(v, "#") && E.fail("First character of private identifier must be #: " + v); + const se = 8 | (v ? 3 : 1); + return de(v ?? "", se, w, B); + } + function De(v, w, B) { + const se = Dg(v) ? sv( + /*privateName*/ + !0, + w, + v, + B, + dn + ) : `#generated@${ja(v)}`, Ft = de(se, 4 | (w || B ? 16 : 0), w, B); + return Ft.original = v, Ft; + } + function Xe(v) { + return t.createBaseTokenNode(v); + } + function Ie(v) { + E.assert(v >= 0 && v <= 165, "Invalid token"), E.assert(v <= 15 || v >= 18, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."), E.assert(v <= 9 || v >= 15, "Invalid token. Use 'createLiteralLikeNode' to create literals."), E.assert(v !== 80, "Invalid token. Use 'createIdentifier' to create identifiers"); + const w = Xe(v); + let B = 0; + switch (v) { + case 134: + B = 384; + break; + case 160: + B = 4; + break; + case 125: + case 123: + case 124: + case 148: + case 128: + case 138: + case 87: + case 133: + case 150: + case 163: + case 146: + case 151: + case 103: + case 147: + case 164: + case 154: + case 136: + case 155: + case 116: + case 159: + case 157: + B = 1; + break; + case 108: + B = 134218752, w.flowNode = void 0; + break; + case 126: + B = 1024; + break; + case 129: + B = 16777216; + break; + case 110: + B = 16384, w.flowNode = void 0; + break; + } + return B && (w.transformFlags |= B), w; + } + function ye() { + return Ie( + 108 + /* SuperKeyword */ + ); + } + function Fe() { + return Ie( + 110 + /* ThisKeyword */ + ); + } + function Qe() { + return Ie( + 106 + /* NullKeyword */ + ); + } + function Ke() { + return Ie( + 112 + /* TrueKeyword */ + ); + } + function Be() { + return Ie( + 97 + /* FalseKeyword */ + ); + } + function at(v) { + return Ie(v); + } + function Wt(v) { + const w = []; + return v & 32 && w.push(at( + 95 + /* ExportKeyword */ + )), v & 128 && w.push(at( + 138 + /* DeclareKeyword */ + )), v & 2048 && w.push(at( + 90 + /* DefaultKeyword */ + )), v & 4096 && w.push(at( + 87 + /* ConstKeyword */ + )), v & 1 && w.push(at( + 125 + /* PublicKeyword */ + )), v & 2 && w.push(at( + 123 + /* PrivateKeyword */ + )), v & 4 && w.push(at( + 124 + /* ProtectedKeyword */ + )), v & 64 && w.push(at( + 128 + /* AbstractKeyword */ + )), v & 256 && w.push(at( + 126 + /* StaticKeyword */ + )), v & 16 && w.push(at( + 164 + /* OverrideKeyword */ + )), v & 8 && w.push(at( + 148 + /* ReadonlyKeyword */ + )), v & 512 && w.push(at( + 129 + /* AccessorKeyword */ + )), v & 1024 && w.push(at( + 134 + /* AsyncKeyword */ + )), v & 8192 && w.push(at( + 103 + /* InKeyword */ + )), v & 16384 && w.push(at( + 147 + /* OutKeyword */ + )), w.length ? w : void 0; + } + function nr(v, w) { + const B = F( + 166 + /* QualifiedName */ + ); + return B.left = v, B.right = Qc(w), B.transformFlags |= gn(B.left) | X3(B.right), B.flowNode = void 0, B; + } + function Kt(v, w, B) { + return v.left !== w || v.right !== B ? $r(nr(w, B), v) : v; + } + function Pr(v) { + const w = F( + 167 + /* ComputedPropertyName */ + ); + return w.expression = i().parenthesizeExpressionOfComputedPropertyName(v), w.transformFlags |= gn(w.expression) | 1024 | 131072, w; + } + function Vt(v, w) { + return v.expression !== w ? $r(Pr(w), v) : v; + } + function zt(v, w, B, se) { + const ze = V( + 168 + /* TypeParameter */ + ); + return ze.modifiers = Na(v), ze.name = Qc(w), ze.constraint = B, ze.default = se, ze.transformFlags = 1, ze.expression = void 0, ze.jsDoc = void 0, ze; + } + function jr(v, w, B, se, ze) { + return v.modifiers !== w || v.name !== B || v.constraint !== se || v.default !== ze ? $r(zt(w, B, se, ze), v) : v; + } + function ci(v, w, B, se, ze, Ft) { + const fn = V( + 169 + /* Parameter */ + ); + return fn.modifiers = Na(v), fn.dotDotDotToken = w, fn.name = Qc(B), fn.questionToken = se, fn.type = ze, fn.initializer = fd(Ft), my(fn.name) ? fn.transformFlags = 1 : fn.transformFlags = Sa(fn.modifiers) | gn(fn.dotDotDotToken) | Ty(fn.name) | gn(fn.questionToken) | gn(fn.initializer) | (fn.questionToken ?? fn.type ? 1 : 0) | (fn.dotDotDotToken ?? fn.initializer ? 1024 : 0) | (sm(fn.modifiers) & 31 ? 8192 : 0), fn.jsDoc = void 0, fn; + } + function Xt(v, w, B, se, ze, Ft, fn) { + return v.modifiers !== w || v.dotDotDotToken !== B || v.name !== se || v.questionToken !== ze || v.type !== Ft || v.initializer !== fn ? $r(ci(w, B, se, ze, Ft, fn), v) : v; + } + function Ai(v) { + const w = F( + 170 + /* Decorator */ + ); + return w.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), w.transformFlags |= gn(w.expression) | 1 | 8192 | 33554432, w; + } + function _s(v, w) { + return v.expression !== w ? $r(Ai(w), v) : v; + } + function $n(v, w, B, se) { + const ze = V( + 171 + /* PropertySignature */ + ); + return ze.modifiers = Na(v), ze.name = Qc(w), ze.type = se, ze.questionToken = B, ze.transformFlags = 1, ze.initializer = void 0, ze.jsDoc = void 0, ze; + } + function os(v, w, B, se, ze) { + return v.modifiers !== w || v.name !== B || v.questionToken !== se || v.type !== ze ? wr($n(w, B, se, ze), v) : v; + } + function wr(v, w) { + return v !== w && (v.initializer = w.initializer), $r(v, w); + } + function Ss(v, w, B, se, ze) { + const Ft = V( + 172 + /* PropertyDeclaration */ + ); + Ft.modifiers = Na(v), Ft.name = Qc(w), Ft.questionToken = B && xy(B) ? B : void 0, Ft.exclamationToken = B && rA(B) ? B : void 0, Ft.type = se, Ft.initializer = fd(ze); + const fn = Ft.flags & 33554432 || sm(Ft.modifiers) & 128; + return Ft.transformFlags = Sa(Ft.modifiers) | Ty(Ft.name) | gn(Ft.initializer) | (fn || Ft.questionToken || Ft.exclamationToken || Ft.type ? 1 : 0) | (oa(Ft.name) || sm(Ft.modifiers) & 256 && Ft.initializer ? 8192 : 0) | 16777216, Ft.jsDoc = void 0, Ft; + } + function Le(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.name !== B || v.questionToken !== (se !== void 0 && xy(se) ? se : void 0) || v.exclamationToken !== (se !== void 0 && rA(se) ? se : void 0) || v.type !== ze || v.initializer !== Ft ? $r(Ss(w, B, se, ze, Ft), v) : v; + } + function At(v, w, B, se, ze, Ft) { + const fn = V( + 173 + /* MethodSignature */ + ); + return fn.modifiers = Na(v), fn.name = Qc(w), fn.questionToken = B, fn.typeParameters = Na(se), fn.parameters = Na(ze), fn.type = Ft, fn.transformFlags = 1, fn.jsDoc = void 0, fn.locals = void 0, fn.nextContainer = void 0, fn.typeArguments = void 0, fn; + } + function vr(v, w, B, se, ze, Ft, fn) { + return v.modifiers !== w || v.name !== B || v.questionToken !== se || v.typeParameters !== ze || v.parameters !== Ft || v.type !== fn ? L(At(w, B, se, ze, Ft, fn), v) : v; + } + function ln(v, w, B, se, ze, Ft, fn, $i) { + const Ba = V( + 174 + /* MethodDeclaration */ + ); + if (Ba.modifiers = Na(v), Ba.asteriskToken = w, Ba.name = Qc(B), Ba.questionToken = se, Ba.exclamationToken = void 0, Ba.typeParameters = Na(ze), Ba.parameters = j(Ft), Ba.type = fn, Ba.body = $i, !Ba.body) + Ba.transformFlags = 1; + else { + const Cf = sm(Ba.modifiers) & 1024, o1 = !!Ba.asteriskToken, c1 = Cf && o1; + Ba.transformFlags = Sa(Ba.modifiers) | gn(Ba.asteriskToken) | Ty(Ba.name) | gn(Ba.questionToken) | Sa(Ba.typeParameters) | Sa(Ba.parameters) | gn(Ba.type) | gn(Ba.body) & -67108865 | (c1 ? 128 : Cf ? 256 : o1 ? 2048 : 0) | (Ba.questionToken || Ba.typeParameters || Ba.type ? 1 : 0) | 1024; + } + return Ba.typeArguments = void 0, Ba.jsDoc = void 0, Ba.locals = void 0, Ba.nextContainer = void 0, Ba.flowNode = void 0, Ba.endFlowNode = void 0, Ba.returnFlowNode = void 0, Ba; + } + function Zn(v, w, B, se, ze, Ft, fn, $i, Ba) { + return v.modifiers !== w || v.asteriskToken !== B || v.name !== se || v.questionToken !== ze || v.typeParameters !== Ft || v.parameters !== fn || v.type !== $i || v.body !== Ba ? ri(ln(w, B, se, ze, Ft, fn, $i, Ba), v) : v; + } + function ri(v, w) { + return v !== w && (v.exclamationToken = w.exclamationToken), $r(v, w); + } + function mi(v) { + const w = V( + 175 + /* ClassStaticBlockDeclaration */ + ); + return w.body = v, w.transformFlags = gn(v) | 16777216, w.modifiers = void 0, w.jsDoc = void 0, w.locals = void 0, w.nextContainer = void 0, w.endFlowNode = void 0, w.returnFlowNode = void 0, w; + } + function Ps(v, w) { + return v.body !== w ? ws(mi(w), v) : v; + } + function ws(v, w) { + return v !== w && (v.modifiers = w.modifiers), $r(v, w); + } + function Yt(v, w, B) { + const se = V( + 176 + /* Constructor */ + ); + return se.modifiers = Na(v), se.parameters = j(w), se.body = B, se.transformFlags = Sa(se.modifiers) | Sa(se.parameters) | gn(se.body) & -67108865 | 1024, se.typeParameters = void 0, se.type = void 0, se.typeArguments = void 0, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.endFlowNode = void 0, se.returnFlowNode = void 0, se; + } + function Ca(v, w, B, se) { + return v.modifiers !== w || v.parameters !== B || v.body !== se ? $e(Yt(w, B, se), v) : v; + } + function $e(v, w) { + return v !== w && (v.typeParameters = w.typeParameters, v.type = w.type), L(v, w); + } + function nt(v, w, B, se, ze) { + const Ft = V( + 177 + /* GetAccessor */ + ); + return Ft.modifiers = Na(v), Ft.name = Qc(w), Ft.parameters = j(B), Ft.type = se, Ft.body = ze, Ft.body ? Ft.transformFlags = Sa(Ft.modifiers) | Ty(Ft.name) | Sa(Ft.parameters) | gn(Ft.type) | gn(Ft.body) & -67108865 | (Ft.type ? 1 : 0) : Ft.transformFlags = 1, Ft.typeArguments = void 0, Ft.typeParameters = void 0, Ft.jsDoc = void 0, Ft.locals = void 0, Ft.nextContainer = void 0, Ft.flowNode = void 0, Ft.endFlowNode = void 0, Ft.returnFlowNode = void 0, Ft; + } + function te(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.name !== B || v.parameters !== se || v.type !== ze || v.body !== Ft ? rt(nt(w, B, se, ze, Ft), v) : v; + } + function rt(v, w) { + return v !== w && (v.typeParameters = w.typeParameters), L(v, w); + } + function re(v, w, B, se) { + const ze = V( + 178 + /* SetAccessor */ + ); + return ze.modifiers = Na(v), ze.name = Qc(w), ze.parameters = j(B), ze.body = se, ze.body ? ze.transformFlags = Sa(ze.modifiers) | Ty(ze.name) | Sa(ze.parameters) | gn(ze.body) & -67108865 | (ze.type ? 1 : 0) : ze.transformFlags = 1, ze.typeArguments = void 0, ze.typeParameters = void 0, ze.type = void 0, ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze.flowNode = void 0, ze.endFlowNode = void 0, ze.returnFlowNode = void 0, ze; + } + function Ee(v, w, B, se, ze) { + return v.modifiers !== w || v.name !== B || v.parameters !== se || v.body !== ze ? Ne(re(w, B, se, ze), v) : v; + } + function Ne(v, w) { + return v !== w && (v.typeParameters = w.typeParameters, v.type = w.type), L(v, w); + } + function et(v, w, B) { + const se = V( + 179 + /* CallSignature */ + ); + return se.typeParameters = Na(v), se.parameters = Na(w), se.type = B, se.transformFlags = 1, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.typeArguments = void 0, se; + } + function lt(v, w, B, se) { + return v.typeParameters !== w || v.parameters !== B || v.type !== se ? L(et(w, B, se), v) : v; + } + function jt(v, w, B) { + const se = V( + 180 + /* ConstructSignature */ + ); + return se.typeParameters = Na(v), se.parameters = Na(w), se.type = B, se.transformFlags = 1, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.typeArguments = void 0, se; + } + function be(v, w, B, se) { + return v.typeParameters !== w || v.parameters !== B || v.type !== se ? L(jt(w, B, se), v) : v; + } + function ft(v, w, B) { + const se = V( + 181 + /* IndexSignature */ + ); + return se.modifiers = Na(v), se.parameters = Na(w), se.type = B, se.transformFlags = 1, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.typeArguments = void 0, se; + } + function bt(v, w, B, se) { + return v.parameters !== B || v.type !== se || v.modifiers !== w ? L(ft(w, B, se), v) : v; + } + function kt(v, w) { + const B = F( + 204 + /* TemplateLiteralTypeSpan */ + ); + return B.type = v, B.literal = w, B.transformFlags = 1, B; + } + function yt(v, w, B) { + return v.type !== w || v.literal !== B ? $r(kt(w, B), v) : v; + } + function Ut(v) { + return Ie(v); + } + function W(v, w, B) { + const se = F( + 182 + /* TypePredicate */ + ); + return se.assertsModifier = v, se.parameterName = Qc(w), se.type = B, se.transformFlags = 1, se; + } + function je(v, w, B, se) { + return v.assertsModifier !== w || v.parameterName !== B || v.type !== se ? $r(W(w, B, se), v) : v; + } + function st(v, w) { + const B = F( + 183 + /* TypeReference */ + ); + return B.typeName = Qc(v), B.typeArguments = w && i().parenthesizeTypeArguments(j(w)), B.transformFlags = 1, B; + } + function z(v, w, B) { + return v.typeName !== w || v.typeArguments !== B ? $r(st(w, B), v) : v; + } + function he(v, w, B) { + const se = V( + 184 + /* FunctionType */ + ); + return se.typeParameters = Na(v), se.parameters = Na(w), se.type = B, se.transformFlags = 1, se.modifiers = void 0, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.typeArguments = void 0, se; + } + function q(v, w, B, se) { + return v.typeParameters !== w || v.parameters !== B || v.type !== se ? we(he(w, B, se), v) : v; + } + function we(v, w) { + return v !== w && (v.modifiers = w.modifiers), L(v, w); + } + function _e(...v) { + return v.length === 4 ? Te(...v) : v.length === 3 ? dt(...v) : E.fail("Incorrect number of arguments specified."); + } + function Te(v, w, B, se) { + const ze = V( + 185 + /* ConstructorType */ + ); + return ze.modifiers = Na(v), ze.typeParameters = Na(w), ze.parameters = Na(B), ze.type = se, ze.transformFlags = 1, ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze.typeArguments = void 0, ze; + } + function dt(v, w, B) { + return Te( + /*modifiers*/ + void 0, + v, + w, + B + ); + } + function xt(...v) { + return v.length === 5 ? wt(...v) : v.length === 4 ? ir(...v) : E.fail("Incorrect number of arguments specified."); + } + function wt(v, w, B, se, ze) { + return v.modifiers !== w || v.typeParameters !== B || v.parameters !== se || v.type !== ze ? L(_e(w, B, se, ze), v) : v; + } + function ir(v, w, B, se) { + return wt(v, v.modifiers, w, B, se); + } + function br(v, w) { + const B = F( + 186 + /* TypeQuery */ + ); + return B.exprName = v, B.typeArguments = w && i().parenthesizeTypeArguments(w), B.transformFlags = 1, B; + } + function Lr(v, w, B) { + return v.exprName !== w || v.typeArguments !== B ? $r(br(w, B), v) : v; + } + function en(v) { + const w = V( + 187 + /* TypeLiteral */ + ); + return w.members = j(v), w.transformFlags = 1, w; + } + function fr(v, w) { + return v.members !== w ? $r(en(w), v) : v; + } + function mn(v) { + const w = F( + 188 + /* ArrayType */ + ); + return w.elementType = i().parenthesizeNonArrayTypeOfPostfixType(v), w.transformFlags = 1, w; + } + function Di(v, w) { + return v.elementType !== w ? $r(mn(w), v) : v; + } + function Fi(v) { + const w = F( + 189 + /* TupleType */ + ); + return w.elements = j(i().parenthesizeElementTypesOfTupleType(v)), w.transformFlags = 1, w; + } + function ur(v, w) { + return v.elements !== w ? $r(Fi(w), v) : v; + } + function Mr(v, w, B, se) { + const ze = V( + 202 + /* NamedTupleMember */ + ); + return ze.dotDotDotToken = v, ze.name = w, ze.questionToken = B, ze.type = se, ze.transformFlags = 1, ze.jsDoc = void 0, ze; + } + function Or(v, w, B, se, ze) { + return v.dotDotDotToken !== w || v.name !== B || v.questionToken !== se || v.type !== ze ? $r(Mr(w, B, se, ze), v) : v; + } + function tn(v) { + const w = F( + 190 + /* OptionalType */ + ); + return w.type = i().parenthesizeTypeOfOptionalType(v), w.transformFlags = 1, w; + } + function qt(v, w) { + return v.type !== w ? $r(tn(w), v) : v; + } + function ma(v) { + const w = F( + 191 + /* RestType */ + ); + return w.type = v, w.transformFlags = 1, w; + } + function $a(v, w) { + return v.type !== w ? $r(ma(w), v) : v; + } + function Ro(v, w, B) { + const se = F(v); + return se.types = O.createNodeArray(B(w)), se.transformFlags = 1, se; + } + function Vo(v, w, B) { + return v.types !== w ? $r(Ro(v.kind, w, B), v) : v; + } + function hs(v) { + return Ro(192, v, i().parenthesizeConstituentTypesOfUnionType); + } + function ga(v, w) { + return Vo(v, w, i().parenthesizeConstituentTypesOfUnionType); + } + function Co(v) { + return Ro(193, v, i().parenthesizeConstituentTypesOfIntersectionType); + } + function Li(v, w) { + return Vo(v, w, i().parenthesizeConstituentTypesOfIntersectionType); + } + function bi(v, w, B, se) { + const ze = F( + 194 + /* ConditionalType */ + ); + return ze.checkType = i().parenthesizeCheckTypeOfConditionalType(v), ze.extendsType = i().parenthesizeExtendsTypeOfConditionalType(w), ze.trueType = B, ze.falseType = se, ze.transformFlags = 1, ze.locals = void 0, ze.nextContainer = void 0, ze; + } + function wl(v, w, B, se, ze) { + return v.checkType !== w || v.extendsType !== B || v.trueType !== se || v.falseType !== ze ? $r(bi(w, B, se, ze), v) : v; + } + function jo(v) { + const w = F( + 195 + /* InferType */ + ); + return w.typeParameter = v, w.transformFlags = 1, w; + } + function Su(v, w) { + return v.typeParameter !== w ? $r(jo(w), v) : v; + } + function fc(v, w) { + const B = F( + 203 + /* TemplateLiteralType */ + ); + return B.head = v, B.templateSpans = j(w), B.transformFlags = 1, B; + } + function ql(v, w, B) { + return v.head !== w || v.templateSpans !== B ? $r(fc(w, B), v) : v; + } + function ea(v, w, B, se, ze = !1) { + const Ft = F( + 205 + /* ImportType */ + ); + return Ft.argument = v, Ft.attributes = w, Ft.assertions && Ft.assertions.assertClause && Ft.attributes && (Ft.assertions.assertClause = Ft.attributes), Ft.qualifier = B, Ft.typeArguments = se && i().parenthesizeTypeArguments(se), Ft.isTypeOf = ze, Ft.transformFlags = 1, Ft; + } + function wo(v, w, B, se, ze, Ft = v.isTypeOf) { + return v.argument !== w || v.attributes !== B || v.qualifier !== se || v.typeArguments !== ze || v.isTypeOf !== Ft ? $r(ea(w, B, se, ze, Ft), v) : v; + } + function Ka(v) { + const w = F( + 196 + /* ParenthesizedType */ + ); + return w.type = v, w.transformFlags = 1, w; + } + function Fa(v, w) { + return v.type !== w ? $r(Ka(w), v) : v; + } + function Bt() { + const v = F( + 197 + /* ThisType */ + ); + return v.transformFlags = 1, v; + } + function lc(v, w) { + const B = F( + 198 + /* TypeOperator */ + ); + return B.operator = v, B.type = v === 148 ? i().parenthesizeOperandOfReadonlyTypeOperator(w) : i().parenthesizeOperandOfTypeOperator(w), B.transformFlags = 1, B; + } + function Fu(v, w) { + return v.type !== w ? $r(lc(v.operator, w), v) : v; + } + function Lu(v, w) { + const B = F( + 199 + /* IndexedAccessType */ + ); + return B.objectType = i().parenthesizeNonArrayTypeOfPostfixType(v), B.indexType = w, B.transformFlags = 1, B; + } + function y_(v, w, B) { + return v.objectType !== w || v.indexType !== B ? $r(Lu(w, B), v) : v; + } + function Ao(v, w, B, se, ze, Ft) { + const fn = V( + 200 + /* MappedType */ + ); + return fn.readonlyToken = v, fn.typeParameter = w, fn.nameType = B, fn.questionToken = se, fn.type = ze, fn.members = Ft && j(Ft), fn.transformFlags = 1, fn.locals = void 0, fn.nextContainer = void 0, fn; + } + function Uo(v, w, B, se, ze, Ft, fn) { + return v.readonlyToken !== w || v.typeParameter !== B || v.nameType !== se || v.questionToken !== ze || v.type !== Ft || v.members !== fn ? $r(Ao(w, B, se, ze, Ft, fn), v) : v; + } + function A(v) { + const w = F( + 201 + /* LiteralType */ + ); + return w.literal = v, w.transformFlags = 1, w; + } + function Me(v, w) { + return v.literal !== w ? $r(A(w), v) : v; + } + function it(v) { + const w = F( + 206 + /* ObjectBindingPattern */ + ); + return w.elements = j(v), w.transformFlags |= Sa(w.elements) | 1024 | 524288, w.transformFlags & 32768 && (w.transformFlags |= 65664), w; + } + function Ot(v, w) { + return v.elements !== w ? $r(it(w), v) : v; + } + function kr(v) { + const w = F( + 207 + /* ArrayBindingPattern */ + ); + return w.elements = j(v), w.transformFlags |= Sa(w.elements) | 1024 | 524288, w; + } + function qn(v, w) { + return v.elements !== w ? $r(kr(w), v) : v; + } + function Ht(v, w, B, se) { + const ze = V( + 208 + /* BindingElement */ + ); + return ze.dotDotDotToken = v, ze.propertyName = Qc(w), ze.name = Qc(B), ze.initializer = fd(se), ze.transformFlags |= gn(ze.dotDotDotToken) | Ty(ze.propertyName) | Ty(ze.name) | gn(ze.initializer) | (ze.dotDotDotToken ? 32768 : 0) | 1024, ze.flowNode = void 0, ze; + } + function yn(v, w, B, se, ze) { + return v.propertyName !== B || v.dotDotDotToken !== w || v.name !== se || v.initializer !== ze ? $r(Ht(w, B, se, ze), v) : v; + } + function li(v, w) { + const B = F( + 209 + /* ArrayLiteralExpression */ + ), se = v && Bo(v), ze = j(v, se && ml(se) ? !0 : void 0); + return B.elements = i().parenthesizeExpressionsOfCommaDelimitedList(ze), B.multiLine = w, B.transformFlags |= Sa(B.elements), B; + } + function _i(v, w) { + return v.elements !== w ? $r(li(w, v.multiLine), v) : v; + } + function eo(v, w) { + const B = V( + 210 + /* ObjectLiteralExpression */ + ); + return B.properties = j(v), B.multiLine = w, B.transformFlags |= Sa(B.properties), B.jsDoc = void 0, B; + } + function qo(v, w) { + return v.properties !== w ? $r(eo(w, v.multiLine), v) : v; + } + function ol(v, w, B) { + const se = V( + 211 + /* PropertyAccessExpression */ + ); + return se.expression = v, se.questionDotToken = w, se.name = B, se.transformFlags = gn(se.expression) | gn(se.questionDotToken) | (Re(se.name) ? X3(se.name) : gn(se.name) | 536870912), se.jsDoc = void 0, se.flowNode = void 0, se; + } + function vo(v, w) { + const B = ol( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + Qc(w) + ); + return K4(v) && (B.transformFlags |= 384), B; + } + function cl(v, w, B) { + return jI(v) ? gl(v, w, v.questionDotToken, Is(B, Re)) : v.expression !== w || v.name !== B ? $r(vo(w, B), v) : v; + } + function Eo(v, w, B) { + const se = ol( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + w, + Qc(B) + ); + return se.flags |= 64, se.transformFlags |= 32, se; + } + function gl(v, w, B, se) { + return E.assert(!!(v.flags & 64), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."), v.expression !== w || v.questionDotToken !== B || v.name !== se ? $r(Eo(w, B, se), v) : v; + } + function Cl(v, w, B) { + const se = V( + 212 + /* ElementAccessExpression */ + ); + return se.expression = v, se.questionDotToken = w, se.argumentExpression = B, se.transformFlags |= gn(se.expression) | gn(se.questionDotToken) | gn(se.argumentExpression), se.jsDoc = void 0, se.flowNode = void 0, se; + } + function kc(v, w) { + const B = Cl( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + a1(w) + ); + return K4(v) && (B.transformFlags |= 384), B; + } + function F_(v, w, B) { + return fj(v) ? Pe(v, w, v.questionDotToken, B) : v.expression !== w || v.argumentExpression !== B ? $r(kc(w, B), v) : v; + } + function Jf(v, w, B) { + const se = Cl( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + w, + a1(B) + ); + return se.flags |= 64, se.transformFlags |= 32, se; + } + function Pe(v, w, B, se) { + return E.assert(!!(v.flags & 64), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."), v.expression !== w || v.questionDotToken !== B || v.argumentExpression !== se ? $r(Jf(w, B, se), v) : v; + } + function Ct(v, w, B, se) { + const ze = V( + 213 + /* CallExpression */ + ); + return ze.expression = v, ze.questionDotToken = w, ze.typeArguments = B, ze.arguments = se, ze.transformFlags |= gn(ze.expression) | gn(ze.questionDotToken) | Sa(ze.typeArguments) | Sa(ze.arguments), ze.typeArguments && (ze.transformFlags |= 1), f_(ze.expression) && (ze.transformFlags |= 16384), ze; + } + function Jr(v, w, B) { + const se = Ct( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), + /*questionDotToken*/ + void 0, + Na(w), + i().parenthesizeExpressionsOfCommaDelimitedList(j(B)) + ); + return eD(se.expression) && (se.transformFlags |= 8388608), se; + } + function Vi(v, w, B, se) { + return J2(v) ? Pa(v, w, v.questionDotToken, B, se) : v.expression !== w || v.typeArguments !== B || v.arguments !== se ? $r(Jr(w, B, se), v) : v; + } + function ha(v, w, B, se) { + const ze = Ct( + i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), + w, + Na(B), + i().parenthesizeExpressionsOfCommaDelimitedList(j(se)) + ); + return ze.flags |= 64, ze.transformFlags |= 32, ze; + } + function Pa(v, w, B, se, ze) { + return E.assert(!!(v.flags & 64), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."), v.expression !== w || v.questionDotToken !== B || v.typeArguments !== se || v.arguments !== ze ? $r(ha(w, B, se, ze), v) : v; + } + function vc(v, w, B) { + const se = V( + 214 + /* NewExpression */ + ); + return se.expression = i().parenthesizeExpressionOfNew(v), se.typeArguments = Na(w), se.arguments = B ? i().parenthesizeExpressionsOfCommaDelimitedList(B) : void 0, se.transformFlags |= gn(se.expression) | Sa(se.typeArguments) | Sa(se.arguments) | 32, se.typeArguments && (se.transformFlags |= 1), se; + } + function Do(v, w, B, se) { + return v.expression !== w || v.typeArguments !== B || v.arguments !== se ? $r(vc(w, B, se), v) : v; + } + function to(v, w, B) { + const se = F( + 215 + /* TaggedTemplateExpression */ + ); + return se.tag = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), se.typeArguments = Na(w), se.template = B, se.transformFlags |= gn(se.tag) | Sa(se.typeArguments) | gn(se.template) | 1024, se.typeArguments && (se.transformFlags |= 1), SB(se.template) && (se.transformFlags |= 128), se; + } + function pc(v, w, B, se) { + return v.tag !== w || v.typeArguments !== B || v.template !== se ? $r(to(w, B, se), v) : v; + } + function Cc(v, w) { + const B = F( + 216 + /* TypeAssertionExpression */ + ); + return B.expression = i().parenthesizeOperandOfPrefixUnary(w), B.type = v, B.transformFlags |= gn(B.expression) | gn(B.type) | 1, B; + } + function bf(v, w, B) { + return v.type !== w || v.expression !== B ? $r(Cc(w, B), v) : v; + } + function Id(v) { + const w = F( + 217 + /* ParenthesizedExpression */ + ); + return w.expression = v, w.transformFlags = gn(w.expression), w.jsDoc = void 0, w; + } + function zf(v, w) { + return v.expression !== w ? $r(Id(w), v) : v; + } + function v_(v, w, B, se, ze, Ft, fn) { + const $i = V( + 218 + /* FunctionExpression */ + ); + $i.modifiers = Na(v), $i.asteriskToken = w, $i.name = Qc(B), $i.typeParameters = Na(se), $i.parameters = j(ze), $i.type = Ft, $i.body = fn; + const Ba = sm($i.modifiers) & 1024, Cf = !!$i.asteriskToken, o1 = Ba && Cf; + return $i.transformFlags = Sa($i.modifiers) | gn($i.asteriskToken) | Ty($i.name) | Sa($i.typeParameters) | Sa($i.parameters) | gn($i.type) | gn($i.body) & -67108865 | (o1 ? 128 : Ba ? 256 : Cf ? 2048 : 0) | ($i.typeParameters || $i.type ? 1 : 0) | 4194304, $i.typeArguments = void 0, $i.jsDoc = void 0, $i.locals = void 0, $i.nextContainer = void 0, $i.flowNode = void 0, $i.endFlowNode = void 0, $i.returnFlowNode = void 0, $i; + } + function pp(v, w, B, se, ze, Ft, fn, $i) { + return v.name !== se || v.modifiers !== w || v.asteriskToken !== B || v.typeParameters !== ze || v.parameters !== Ft || v.type !== fn || v.body !== $i ? L(v_(w, B, se, ze, Ft, fn, $i), v) : v; + } + function Wf(v, w, B, se, ze, Ft) { + const fn = V( + 219 + /* ArrowFunction */ + ); + fn.modifiers = Na(v), fn.typeParameters = Na(w), fn.parameters = j(B), fn.type = se, fn.equalsGreaterThanToken = ze ?? Ie( + 39 + /* EqualsGreaterThanToken */ + ), fn.body = i().parenthesizeConciseBodyOfArrowFunction(Ft); + const $i = sm(fn.modifiers) & 1024; + return fn.transformFlags = Sa(fn.modifiers) | Sa(fn.typeParameters) | Sa(fn.parameters) | gn(fn.type) | gn(fn.equalsGreaterThanToken) | gn(fn.body) & -67108865 | (fn.typeParameters || fn.type ? 1 : 0) | ($i ? 16640 : 0) | 1024, fn.typeArguments = void 0, fn.jsDoc = void 0, fn.locals = void 0, fn.nextContainer = void 0, fn.flowNode = void 0, fn.endFlowNode = void 0, fn.returnFlowNode = void 0, fn; + } + function tg(v, w, B, se, ze, Ft, fn) { + return v.modifiers !== w || v.typeParameters !== B || v.parameters !== se || v.type !== ze || v.equalsGreaterThanToken !== Ft || v.body !== fn ? L(Wf(w, B, se, ze, Ft, fn), v) : v; + } + function rg(v) { + const w = F( + 220 + /* DeleteExpression */ + ); + return w.expression = i().parenthesizeOperandOfPrefixUnary(v), w.transformFlags |= gn(w.expression), w; + } + function b_(v, w) { + return v.expression !== w ? $r(rg(w), v) : v; + } + function Gc(v) { + const w = F( + 221 + /* TypeOfExpression */ + ); + return w.expression = i().parenthesizeOperandOfPrefixUnary(v), w.transformFlags |= gn(w.expression), w; + } + function ng(v, w) { + return v.expression !== w ? $r(Gc(w), v) : v; + } + function L_(v) { + const w = F( + 222 + /* VoidExpression */ + ); + return w.expression = i().parenthesizeOperandOfPrefixUnary(v), w.transformFlags |= gn(w.expression), w; + } + function bm(v, w) { + return v.expression !== w ? $r(L_(w), v) : v; + } + function Vf(v) { + const w = F( + 223 + /* AwaitExpression */ + ); + return w.expression = i().parenthesizeOperandOfPrefixUnary(v), w.transformFlags |= gn(w.expression) | 256 | 128 | 2097152, w; + } + function Y(v, w) { + return v.expression !== w ? $r(Vf(w), v) : v; + } + function tt(v, w) { + const B = F( + 224 + /* PrefixUnaryExpression */ + ); + return B.operator = v, B.operand = i().parenthesizeOperandOfPrefixUnary(w), B.transformFlags |= gn(B.operand), (v === 46 || v === 47) && Re(B.operand) && !Fo(B.operand) && !xh(B.operand) && (B.transformFlags |= 268435456), B; + } + function Pt(v, w) { + return v.operand !== w ? $r(tt(v.operator, w), v) : v; + } + function It(v, w) { + const B = F( + 225 + /* PostfixUnaryExpression */ + ); + return B.operator = w, B.operand = i().parenthesizeOperandOfPostfixUnary(v), B.transformFlags |= gn(B.operand), Re(B.operand) && !Fo(B.operand) && !xh(B.operand) && (B.transformFlags |= 268435456), B; + } + function hr(v, w) { + return v.operand !== w ? $r(It(w, v.operator), v) : v; + } + function zr(v, w, B) { + const se = V( + 226 + /* BinaryExpression */ + ), ze = Bv(w), Ft = ze.kind; + return se.left = i().parenthesizeLeftSideOfBinary(Ft, v), se.operatorToken = ze, se.right = i().parenthesizeRightSideOfBinary(Ft, se.left, B), se.transformFlags |= gn(se.left) | gn(se.operatorToken) | gn(se.right), Ft === 61 ? se.transformFlags |= 32 : Ft === 64 ? Gs(se.left) ? se.transformFlags |= 5248 | Cn(se.left) : Wl(se.left) && (se.transformFlags |= 5120 | Cn(se.left)) : Ft === 43 || Ft === 68 ? se.transformFlags |= 512 : x4(Ft) && (se.transformFlags |= 16), Ft === 103 && wi(se.left) && (se.transformFlags |= 536870912), se.jsDoc = void 0, se; + } + function Cn(v) { + return mA(v) ? 65536 : 0; + } + function ei(v, w, B, se) { + return v.left !== w || v.operatorToken !== B || v.right !== se ? $r(zr(w, B, se), v) : v; + } + function M(v, w, B, se, ze) { + const Ft = F( + 227 + /* ConditionalExpression */ + ); + return Ft.condition = i().parenthesizeConditionOfConditionalExpression(v), Ft.questionToken = w ?? Ie( + 58 + /* QuestionToken */ + ), Ft.whenTrue = i().parenthesizeBranchOfConditionalExpression(B), Ft.colonToken = se ?? Ie( + 59 + /* ColonToken */ + ), Ft.whenFalse = i().parenthesizeBranchOfConditionalExpression(ze), Ft.transformFlags |= gn(Ft.condition) | gn(Ft.questionToken) | gn(Ft.whenTrue) | gn(Ft.colonToken) | gn(Ft.whenFalse), Ft; + } + function ke(v, w, B, se, ze, Ft) { + return v.condition !== w || v.questionToken !== B || v.whenTrue !== se || v.colonToken !== ze || v.whenFalse !== Ft ? $r(M(w, B, se, ze, Ft), v) : v; + } + function vt(v, w) { + const B = F( + 228 + /* TemplateExpression */ + ); + return B.head = v, B.templateSpans = j(w), B.transformFlags |= gn(B.head) | Sa(B.templateSpans) | 1024, B; + } + function Nr(v, w, B) { + return v.head !== w || v.templateSpans !== B ? $r(vt(w, B), v) : v; + } + function ui(v, w, B, se = 0) { + E.assert(!(se & -7177), "Unsupported template flags."); + let ze; + if (B !== void 0 && B !== w && (ze = KFe(v, B), typeof ze == "object")) + return E.fail("Invalid raw text"); + if (w === void 0) { + if (ze === void 0) + return E.fail("Arguments 'text' and 'rawText' may not both be undefined."); + w = ze; + } else ze !== void 0 && E.assert(w === ze, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."); + return w; + } + function ds(v) { + let w = 1024; + return v && (w |= 128), w; + } + function Qi(v, w, B, se) { + const ze = Xe(v); + return ze.text = w, ze.rawText = B, ze.templateFlags = se & 7176, ze.transformFlags = ds(ze.templateFlags), ze; + } + function ys(v, w, B, se) { + const ze = V(v); + return ze.text = w, ze.rawText = B, ze.templateFlags = se & 7176, ze.transformFlags = ds(ze.templateFlags), ze; + } + function wa(v, w, B, se) { + return v === 15 ? ys(v, w, B, se) : Qi(v, w, B, se); + } + function ya(v, w, B) { + return v = ui(16, v, w, B), wa(16, v, w, B); + } + function tc(v, w, B) { + return v = ui(16, v, w, B), wa(17, v, w, B); + } + function dp(v, w, B) { + return v = ui(16, v, w, B), wa(18, v, w, B); + } + function rd(v, w, B) { + return v = ui(16, v, w, B), ys(15, v, w, B); + } + function ig(v, w) { + E.assert(!v || !!w, "A `YieldExpression` with an asteriskToken must have an expression."); + const B = F( + 229 + /* YieldExpression */ + ); + return B.expression = w && i().parenthesizeExpressionForDisallowedComma(w), B.asteriskToken = v, B.transformFlags |= gn(B.expression) | gn(B.asteriskToken) | 1024 | 128 | 1048576, B; + } + function Ug(v, w, B) { + return v.expression !== B || v.asteriskToken !== w ? $r(ig(w, B), v) : v; + } + function w0(v) { + const w = F( + 230 + /* SpreadElement */ + ); + return w.expression = i().parenthesizeExpressionForDisallowedComma(v), w.transformFlags |= gn(w.expression) | 1024 | 32768, w; + } + function qg(v, w) { + return v.expression !== w ? $r(w0(w), v) : v; + } + function Uf(v, w, B, se, ze) { + const Ft = V( + 231 + /* ClassExpression */ + ); + return Ft.modifiers = Na(v), Ft.name = Qc(w), Ft.typeParameters = Na(B), Ft.heritageClauses = Na(se), Ft.members = j(ze), Ft.transformFlags |= Sa(Ft.modifiers) | Ty(Ft.name) | Sa(Ft.typeParameters) | Sa(Ft.heritageClauses) | Sa(Ft.members) | (Ft.typeParameters ? 1 : 0) | 1024, Ft.jsDoc = void 0, Ft; + } + function cf(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.name !== B || v.typeParameters !== se || v.heritageClauses !== ze || v.members !== Ft ? $r(Uf(w, B, se, ze, Ft), v) : v; + } + function za() { + return F( + 232 + /* OmittedExpression */ + ); + } + function t_(v, w) { + const B = F( + 233 + /* ExpressionWithTypeArguments */ + ); + return B.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), B.typeArguments = w && i().parenthesizeTypeArguments(w), B.transformFlags |= gn(B.expression) | Sa(B.typeArguments) | 1024, B; + } + function S_(v, w, B) { + return v.expression !== w || v.typeArguments !== B ? $r(t_(w, B), v) : v; + } + function Od(v, w) { + const B = F( + 234 + /* AsExpression */ + ); + return B.expression = v, B.type = w, B.transformFlags |= gn(B.expression) | gn(B.type) | 1, B; + } + function A0(v, w, B) { + return v.expression !== w || v.type !== B ? $r(Od(w, B), v) : v; + } + function N0(v) { + const w = F( + 235 + /* NonNullExpression */ + ); + return w.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + ), w.transformFlags |= gn(w.expression) | 1, w; + } + function zp(v, w) { + return JI(v) ? Hg(v, w) : v.expression !== w ? $r(N0(w), v) : v; + } + function jy(v, w) { + const B = F( + 238 + /* SatisfiesExpression */ + ); + return B.expression = v, B.type = w, B.transformFlags |= gn(B.expression) | gn(B.type) | 1, B; + } + function I0(v, w, B) { + return v.expression !== w || v.type !== B ? $r(jy(w, B), v) : v; + } + function nd(v) { + const w = F( + 235 + /* NonNullExpression */ + ); + return w.flags |= 64, w.expression = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !0 + ), w.transformFlags |= gn(w.expression) | 1, w; + } + function Hg(v, w) { + return E.assert(!!(v.flags & 64), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."), v.expression !== w ? $r(nd(w), v) : v; + } + function wh(v, w) { + const B = F( + 236 + /* MetaProperty */ + ); + switch (B.keywordToken = v, B.name = w, B.transformFlags |= gn(B.name), v) { + case 105: + B.transformFlags |= 1024; + break; + case 102: + B.transformFlags |= 32; + break; + default: + return E.assertNever(v); + } + return B.flowNode = void 0, B; + } + function Sf(v, w) { + return v.name !== w ? $r(wh(v.keywordToken, w), v) : v; + } + function sg(v, w) { + const B = F( + 239 + /* TemplateSpan */ + ); + return B.expression = v, B.literal = w, B.transformFlags |= gn(B.expression) | gn(B.literal) | 1024, B; + } + function Oe(v, w, B) { + return v.expression !== w || v.literal !== B ? $r(sg(w, B), v) : v; + } + function Ue() { + const v = F( + 240 + /* SemicolonClassElement */ + ); + return v.transformFlags |= 1024, v; + } + function Tt(v, w) { + const B = F( + 241 + /* Block */ + ); + return B.statements = j(v), B.multiLine = w, B.transformFlags |= Sa(B.statements), B.jsDoc = void 0, B.locals = void 0, B.nextContainer = void 0, B; + } + function Lt(v, w) { + return v.statements !== w ? $r(Tt(w, v.multiLine), v) : v; + } + function lr(v, w) { + const B = F( + 243 + /* VariableStatement */ + ); + return B.modifiers = Na(v), B.declarationList = ss(w) ? Gg(w) : w, B.transformFlags |= Sa(B.modifiers) | gn(B.declarationList), sm(B.modifiers) & 128 && (B.transformFlags = 1), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function Gr(v, w, B) { + return v.modifiers !== w || v.declarationList !== B ? $r(lr(w, B), v) : v; + } + function _r() { + const v = F( + 242 + /* EmptyStatement */ + ); + return v.jsDoc = void 0, v; + } + function _n(v) { + const w = F( + 244 + /* ExpressionStatement */ + ); + return w.expression = i().parenthesizeExpressionOfExpressionStatement(v), w.transformFlags |= gn(w.expression), w.jsDoc = void 0, w.flowNode = void 0, w; + } + function gi(v, w) { + return v.expression !== w ? $r(_n(w), v) : v; + } + function nn(v, w, B) { + const se = F( + 245 + /* IfStatement */ + ); + return se.expression = v, se.thenStatement = W0(w), se.elseStatement = W0(B), se.transformFlags |= gn(se.expression) | gn(se.thenStatement) | gn(se.elseStatement), se.jsDoc = void 0, se.flowNode = void 0, se; + } + function ii(v, w, B, se) { + return v.expression !== w || v.thenStatement !== B || v.elseStatement !== se ? $r(nn(w, B, se), v) : v; + } + function Vr(v, w) { + const B = F( + 246 + /* DoStatement */ + ); + return B.statement = W0(v), B.expression = w, B.transformFlags |= gn(B.statement) | gn(B.expression), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function Yi(v, w, B) { + return v.statement !== w || v.expression !== B ? $r(Vr(w, B), v) : v; + } + function ca(v, w) { + const B = F( + 247 + /* WhileStatement */ + ); + return B.expression = v, B.statement = W0(w), B.transformFlags |= gn(B.expression) | gn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function El(v, w, B) { + return v.expression !== w || v.statement !== B ? $r(ca(w, B), v) : v; + } + function Tu(v, w, B, se) { + const ze = F( + 248 + /* ForStatement */ + ); + return ze.initializer = v, ze.condition = w, ze.incrementor = B, ze.statement = W0(se), ze.transformFlags |= gn(ze.initializer) | gn(ze.condition) | gn(ze.incrementor) | gn(ze.statement), ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze.flowNode = void 0, ze; + } + function mp(v, w, B, se, ze) { + return v.initializer !== w || v.condition !== B || v.incrementor !== se || v.statement !== ze ? $r(Tu(w, B, se, ze), v) : v; + } + function By(v, w, B) { + const se = F( + 249 + /* ForInStatement */ + ); + return se.initializer = v, se.expression = w, se.statement = W0(B), se.transformFlags |= gn(se.initializer) | gn(se.expression) | gn(se.statement), se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se.flowNode = void 0, se; + } + function Wp(v, w, B, se) { + return v.initializer !== w || v.expression !== B || v.statement !== se ? $r(By(w, B, se), v) : v; + } + function Zx(v, w, B, se) { + const ze = F( + 250 + /* ForOfStatement */ + ); + return ze.awaitModifier = v, ze.initializer = w, ze.expression = i().parenthesizeExpressionForDisallowedComma(B), ze.statement = W0(se), ze.transformFlags |= gn(ze.awaitModifier) | gn(ze.initializer) | gn(ze.expression) | gn(ze.statement) | 1024, v && (ze.transformFlags |= 128), ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze.flowNode = void 0, ze; + } + function P6(v, w, B, se, ze) { + return v.awaitModifier !== w || v.initializer !== B || v.expression !== se || v.statement !== ze ? $r(Zx(w, B, se, ze), v) : v; + } + function Kb(v) { + const w = F( + 251 + /* ContinueStatement */ + ); + return w.label = Qc(v), w.transformFlags |= gn(w.label) | 4194304, w.jsDoc = void 0, w.flowNode = void 0, w; + } + function e2(v, w) { + return v.label !== w ? $r(Kb(w), v) : v; + } + function Jy(v) { + const w = F( + 252 + /* BreakStatement */ + ); + return w.label = Qc(v), w.transformFlags |= gn(w.label) | 4194304, w.jsDoc = void 0, w.flowNode = void 0, w; + } + function Tv(v, w) { + return v.label !== w ? $r(Jy(w), v) : v; + } + function CS(v) { + const w = F( + 253 + /* ReturnStatement */ + ); + return w.expression = v, w.transformFlags |= gn(w.expression) | 128 | 4194304, w.jsDoc = void 0, w.flowNode = void 0, w; + } + function zy(v, w) { + return v.expression !== w ? $r(CS(w), v) : v; + } + function xv(v, w) { + const B = F( + 254 + /* WithStatement */ + ); + return B.expression = v, B.statement = W0(w), B.transformFlags |= gn(B.expression) | gn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function t2(v, w, B) { + return v.expression !== w || v.statement !== B ? $r(xv(w, B), v) : v; + } + function ag(v, w) { + const B = F( + 255 + /* SwitchStatement */ + ); + return B.expression = i().parenthesizeExpressionForDisallowedComma(v), B.caseBlock = w, B.transformFlags |= gn(B.expression) | gn(B.caseBlock), B.jsDoc = void 0, B.flowNode = void 0, B.possiblyExhaustive = !1, B; + } + function La(v, w, B) { + return v.expression !== w || v.caseBlock !== B ? $r(ag(w, B), v) : v; + } + function ES(v, w) { + const B = F( + 256 + /* LabeledStatement */ + ); + return B.label = Qc(v), B.statement = W0(w), B.transformFlags |= gn(B.label) | gn(B.statement), B.jsDoc = void 0, B.flowNode = void 0, B; + } + function w6(v, w, B) { + return v.label !== w || v.statement !== B ? $r(ES(w, B), v) : v; + } + function Ah(v) { + const w = F( + 257 + /* ThrowStatement */ + ); + return w.expression = v, w.transformFlags |= gn(w.expression), w.jsDoc = void 0, w.flowNode = void 0, w; + } + function O0(v, w) { + return v.expression !== w ? $r(Ah(w), v) : v; + } + function og(v, w, B) { + const se = F( + 258 + /* TryStatement */ + ); + return se.tryBlock = v, se.catchClause = w, se.finallyBlock = B, se.transformFlags |= gn(se.tryBlock) | gn(se.catchClause) | gn(se.finallyBlock), se.jsDoc = void 0, se.flowNode = void 0, se; + } + function qf(v, w, B, se) { + return v.tryBlock !== w || v.catchClause !== B || v.finallyBlock !== se ? $r(og(w, B, se), v) : v; + } + function lf() { + const v = F( + 259 + /* DebuggerStatement */ + ); + return v.jsDoc = void 0, v.flowNode = void 0, v; + } + function r_(v, w, B, se) { + const ze = V( + 260 + /* VariableDeclaration */ + ); + return ze.name = Qc(v), ze.exclamationToken = w, ze.type = B, ze.initializer = fd(se), ze.transformFlags |= Ty(ze.name) | gn(ze.initializer) | (ze.exclamationToken ?? ze.type ? 1 : 0), ze.jsDoc = void 0, ze; + } + function Tf(v, w, B, se, ze) { + return v.name !== w || v.type !== se || v.exclamationToken !== B || v.initializer !== ze ? $r(r_(w, B, se, ze), v) : v; + } + function Gg(v, w = 0) { + const B = F( + 261 + /* VariableDeclarationList */ + ); + return B.flags |= w & 7, B.declarations = j(v), B.transformFlags |= Sa(B.declarations) | 4194304, w & 7 && (B.transformFlags |= 263168), w & 4 && (B.transformFlags |= 4), B; + } + function gP(v, w) { + return v.declarations !== w ? $r(Gg(w, v.flags), v) : v; + } + function F0(v, w, B, se, ze, Ft, fn) { + const $i = V( + 262 + /* FunctionDeclaration */ + ); + if ($i.modifiers = Na(v), $i.asteriskToken = w, $i.name = Qc(B), $i.typeParameters = Na(se), $i.parameters = j(ze), $i.type = Ft, $i.body = fn, !$i.body || sm($i.modifiers) & 128) + $i.transformFlags = 1; + else { + const Ba = sm($i.modifiers) & 1024, Cf = !!$i.asteriskToken, o1 = Ba && Cf; + $i.transformFlags = Sa($i.modifiers) | gn($i.asteriskToken) | Ty($i.name) | Sa($i.typeParameters) | Sa($i.parameters) | gn($i.type) | gn($i.body) & -67108865 | (o1 ? 128 : Ba ? 256 : Cf ? 2048 : 0) | ($i.typeParameters || $i.type ? 1 : 0) | 4194304; + } + return $i.typeArguments = void 0, $i.jsDoc = void 0, $i.locals = void 0, $i.nextContainer = void 0, $i.endFlowNode = void 0, $i.returnFlowNode = void 0, $i; + } + function Wy(v, w, B, se, ze, Ft, fn, $i) { + return v.modifiers !== w || v.asteriskToken !== B || v.name !== se || v.typeParameters !== ze || v.parameters !== Ft || v.type !== fn || v.body !== $i ? DS(F0(w, B, se, ze, Ft, fn, $i), v) : v; + } + function DS(v, w) { + return v !== w && v.modifiers === w.modifiers && (v.modifiers = w.modifiers), L(v, w); + } + function PS(v, w, B, se, ze) { + const Ft = V( + 263 + /* ClassDeclaration */ + ); + return Ft.modifiers = Na(v), Ft.name = Qc(w), Ft.typeParameters = Na(B), Ft.heritageClauses = Na(se), Ft.members = j(ze), sm(Ft.modifiers) & 128 ? Ft.transformFlags = 1 : (Ft.transformFlags |= Sa(Ft.modifiers) | Ty(Ft.name) | Sa(Ft.typeParameters) | Sa(Ft.heritageClauses) | Sa(Ft.members) | (Ft.typeParameters ? 1 : 0) | 1024, Ft.transformFlags & 8192 && (Ft.transformFlags |= 1)), Ft.jsDoc = void 0, Ft; + } + function kv(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.name !== B || v.typeParameters !== se || v.heritageClauses !== ze || v.members !== Ft ? $r(PS(w, B, se, ze, Ft), v) : v; + } + function A6(v, w, B, se, ze) { + const Ft = V( + 264 + /* InterfaceDeclaration */ + ); + return Ft.modifiers = Na(v), Ft.name = Qc(w), Ft.typeParameters = Na(B), Ft.heritageClauses = Na(se), Ft.members = j(ze), Ft.transformFlags = 1, Ft.jsDoc = void 0, Ft; + } + function Al(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.name !== B || v.typeParameters !== se || v.heritageClauses !== ze || v.members !== Ft ? $r(A6(w, B, se, ze, Ft), v) : v; + } + function Fd(v, w, B, se) { + const ze = V( + 265 + /* TypeAliasDeclaration */ + ); + return ze.modifiers = Na(v), ze.name = Qc(w), ze.typeParameters = Na(B), ze.type = se, ze.transformFlags = 1, ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze; + } + function r2(v, w, B, se, ze) { + return v.modifiers !== w || v.name !== B || v.typeParameters !== se || v.type !== ze ? $r(Fd(w, B, se, ze), v) : v; + } + function We(v, w, B) { + const se = V( + 266 + /* EnumDeclaration */ + ); + return se.modifiers = Na(v), se.name = Qc(w), se.members = j(B), se.transformFlags |= Sa(se.modifiers) | gn(se.name) | Sa(se.members) | 1, se.transformFlags &= -67108865, se.jsDoc = void 0, se; + } + function Vy(v, w, B, se) { + return v.modifiers !== w || v.name !== B || v.members !== se ? $r(We(w, B, se), v) : v; + } + function ll(v, w, B, se = 0) { + const ze = V( + 267 + /* ModuleDeclaration */ + ); + return ze.modifiers = Na(v), ze.flags |= se & 2088, ze.name = w, ze.body = B, sm(ze.modifiers) & 128 ? ze.transformFlags = 1 : ze.transformFlags |= Sa(ze.modifiers) | gn(ze.name) | gn(ze.body) | 1, ze.transformFlags &= -67108865, ze.jsDoc = void 0, ze.locals = void 0, ze.nextContainer = void 0, ze; + } + function id(v, w, B, se) { + return v.modifiers !== w || v.name !== B || v.body !== se ? $r(ll(w, B, se, v.flags), v) : v; + } + function T_(v) { + const w = F( + 268 + /* ModuleBlock */ + ); + return w.statements = j(v), w.transformFlags |= Sa(w.statements), w.jsDoc = void 0, w; + } + function Uy(v, w) { + return v.statements !== w ? $r(T_(w), v) : v; + } + function Vp(v) { + const w = F( + 269 + /* CaseBlock */ + ); + return w.clauses = j(v), w.transformFlags |= Sa(w.clauses), w.locals = void 0, w.nextContainer = void 0, w; + } + function Hf(v, w) { + return v.clauses !== w ? $r(Vp(w), v) : v; + } + function qy(v) { + const w = V( + 270 + /* NamespaceExportDeclaration */ + ); + return w.name = Qc(v), w.transformFlags |= X3(w.name) | 1, w.modifiers = void 0, w.jsDoc = void 0, w; + } + function va(v, w) { + return v.name !== w ? Sm(qy(w), v) : v; + } + function Sm(v, w) { + return v !== w && (v.modifiers = w.modifiers), $r(v, w); + } + function wS(v, w, B, se) { + const ze = V( + 271 + /* ImportEqualsDeclaration */ + ); + return ze.modifiers = Na(v), ze.name = Qc(B), ze.isTypeOnly = w, ze.moduleReference = se, ze.transformFlags |= Sa(ze.modifiers) | X3(ze.name) | gn(ze.moduleReference), Sh(ze.moduleReference) || (ze.transformFlags |= 1), ze.transformFlags &= -67108865, ze.jsDoc = void 0, ze; + } + function n2(v, w, B, se, ze) { + return v.modifiers !== w || v.isTypeOnly !== B || v.name !== se || v.moduleReference !== ze ? $r(wS(w, B, se, ze), v) : v; + } + function AS(v, w, B, se) { + const ze = F( + 272 + /* ImportDeclaration */ + ); + return ze.modifiers = Na(v), ze.importClause = w, ze.moduleSpecifier = B, ze.attributes = ze.assertClause = se, ze.transformFlags |= gn(ze.importClause) | gn(ze.moduleSpecifier), ze.transformFlags &= -67108865, ze.jsDoc = void 0, ze; + } + function NS(v, w, B, se, ze) { + return v.modifiers !== w || v.importClause !== B || v.moduleSpecifier !== se || v.attributes !== ze ? $r(AS(w, B, se, ze), v) : v; + } + function Nh(v, w, B) { + const se = V( + 273 + /* ImportClause */ + ); + return se.isTypeOnly = v, se.name = w, se.namedBindings = B, se.transformFlags |= gn(se.name) | gn(se.namedBindings), v && (se.transformFlags |= 1), se.transformFlags &= -67108865, se; + } + function Hy(v, w, B, se) { + return v.isTypeOnly !== w || v.name !== B || v.namedBindings !== se ? $r(Nh(w, B, se), v) : v; + } + function i2(v, w) { + const B = F( + 300 + /* AssertClause */ + ); + return B.elements = j(v), B.multiLine = w, B.token = 132, B.transformFlags |= 4, B; + } + function Cv(v, w, B) { + return v.elements !== w || v.multiLine !== B ? $r(i2(w, B), v) : v; + } + function sd(v, w) { + const B = F( + 301 + /* AssertEntry */ + ); + return B.name = v, B.value = w, B.transformFlags |= 4, B; + } + function xf(v, w, B) { + return v.name !== w || v.value !== B ? $r(sd(w, B), v) : v; + } + function L0(v, w) { + const B = F( + 302 + /* ImportTypeAssertionContainer */ + ); + return B.assertClause = v, B.multiLine = w, B; + } + function Ni(v, w, B) { + return v.assertClause !== w || v.multiLine !== B ? $r(L0(w, B), v) : v; + } + function bn(v, w, B) { + const se = F( + 300 + /* ImportAttributes */ + ); + return se.token = B ?? 118, se.elements = j(v), se.multiLine = w, se.transformFlags |= 4, se; + } + function x_(v, w, B) { + return v.elements !== w || v.multiLine !== B ? $r(bn(w, B, v.token), v) : v; + } + function Gy(v, w) { + const B = F( + 301 + /* ImportAttribute */ + ); + return B.name = v, B.value = w, B.transformFlags |= 4, B; + } + function cg(v, w, B) { + return v.name !== w || v.value !== B ? $r(Gy(w, B), v) : v; + } + function Kx(v) { + const w = V( + 274 + /* NamespaceImport */ + ); + return w.name = v, w.transformFlags |= gn(w.name), w.transformFlags &= -67108865, w; + } + function Ih(v, w) { + return v.name !== w ? $r(Kx(w), v) : v; + } + function N6(v) { + const w = V( + 280 + /* NamespaceExport */ + ); + return w.name = v, w.transformFlags |= gn(w.name) | 32, w.transformFlags &= -67108865, w; + } + function $g(v, w) { + return v.name !== w ? $r(N6(w), v) : v; + } + function M0(v) { + const w = F( + 275 + /* NamedImports */ + ); + return w.elements = j(v), w.transformFlags |= Sa(w.elements), w.transformFlags &= -67108865, w; + } + function Tm(v, w) { + return v.elements !== w ? $r(M0(w), v) : v; + } + function ad(v, w, B) { + const se = V( + 276 + /* ImportSpecifier */ + ); + return se.isTypeOnly = v, se.propertyName = w, se.name = B, se.transformFlags |= gn(se.propertyName) | gn(se.name), se.transformFlags &= -67108865, se; + } + function IS(v, w, B, se) { + return v.isTypeOnly !== w || v.propertyName !== B || v.name !== se ? $r(ad(w, B, se), v) : v; + } + function $y(v, w, B) { + const se = V( + 277 + /* ExportAssignment */ + ); + return se.modifiers = Na(v), se.isExportEquals = w, se.expression = w ? i().parenthesizeRightSideOfBinary( + 64, + /*leftSide*/ + void 0, + B + ) : i().parenthesizeExpressionOfExportDefault(B), se.transformFlags |= Sa(se.modifiers) | gn(se.expression), se.transformFlags &= -67108865, se.jsDoc = void 0, se; + } + function s2(v, w, B) { + return v.modifiers !== w || v.expression !== B ? $r($y(w, v.isExportEquals, B), v) : v; + } + function bo(v, w, B, se, ze) { + const Ft = V( + 278 + /* ExportDeclaration */ + ); + return Ft.modifiers = Na(v), Ft.isTypeOnly = w, Ft.exportClause = B, Ft.moduleSpecifier = se, Ft.attributes = Ft.assertClause = ze, Ft.transformFlags |= Sa(Ft.modifiers) | gn(Ft.exportClause) | gn(Ft.moduleSpecifier), Ft.transformFlags &= -67108865, Ft.jsDoc = void 0, Ft; + } + function Oh(v, w, B, se, ze, Ft) { + return v.modifiers !== w || v.isTypeOnly !== B || v.exportClause !== se || v.moduleSpecifier !== ze || v.attributes !== Ft ? ek(bo(w, B, se, ze, Ft), v) : v; + } + function ek(v, w) { + return v !== w && v.modifiers === w.modifiers && (v.modifiers = w.modifiers), $r(v, w); + } + function OS(v) { + const w = F( + 279 + /* NamedExports */ + ); + return w.elements = j(v), w.transformFlags |= Sa(w.elements), w.transformFlags &= -67108865, w; + } + function FS(v, w) { + return v.elements !== w ? $r(OS(w), v) : v; + } + function tk(v, w, B) { + const se = F( + 281 + /* ExportSpecifier */ + ); + return se.isTypeOnly = v, se.propertyName = Qc(w), se.name = Qc(B), se.transformFlags |= gn(se.propertyName) | gn(se.name), se.transformFlags &= -67108865, se.jsDoc = void 0, se; + } + function hP(v, w, B, se) { + return v.isTypeOnly !== w || v.propertyName !== B || v.name !== se ? $r(tk(w, B, se), v) : v; + } + function I6() { + const v = V( + 282 + /* MissingDeclaration */ + ); + return v.jsDoc = void 0, v; + } + function hn(v) { + const w = F( + 283 + /* ExternalModuleReference */ + ); + return w.expression = v, w.transformFlags |= gn(w.expression), w.transformFlags &= -67108865, w; + } + function iu(v, w) { + return v.expression !== w ? $r(hn(w), v) : v; + } + function ns(v) { + return F(v); + } + function k_(v, w, B = !1) { + const se = Ev( + v, + B ? w && i().parenthesizeNonArrayTypeOfPostfixType(w) : w + ); + return se.postfix = B, se; + } + function Ev(v, w) { + const B = F(v); + return B.type = w, B; + } + function Xy(v, w, B) { + return w.type !== B ? $r(k_(v, B, w.postfix), w) : w; + } + function sn(v, w, B) { + return w.type !== B ? $r(Ev(v, B), w) : w; + } + function O6(v, w) { + const B = V( + 317 + /* JSDocFunctionType */ + ); + return B.parameters = Na(v), B.type = w, B.transformFlags = Sa(B.parameters) | (B.type ? 1 : 0), B.jsDoc = void 0, B.locals = void 0, B.nextContainer = void 0, B.typeArguments = void 0, B; + } + function Dv(v, w, B) { + return v.parameters !== w || v.type !== B ? $r(O6(w, B), v) : v; + } + function Mu(v, w = !1) { + const B = V( + 322 + /* JSDocTypeLiteral */ + ); + return B.jsDocPropertyTags = Na(v), B.isArrayType = w, B; + } + function od(v, w, B) { + return v.jsDocPropertyTags !== w || v.isArrayType !== B ? $r(Mu(w, B), v) : v; + } + function gp(v) { + const w = F( + 309 + /* JSDocTypeExpression */ + ); + return w.type = v, w; + } + function Qy(v, w) { + return v.type !== w ? $r(gp(w), v) : v; + } + function Pv(v, w, B) { + const se = V( + 323 + /* JSDocSignature */ + ); + return se.typeParameters = Na(v), se.parameters = j(w), se.type = B, se.jsDoc = void 0, se.locals = void 0, se.nextContainer = void 0, se; + } + function Xg(v, w, B, se) { + return v.typeParameters !== w || v.parameters !== B || v.type !== se ? $r(Pv(w, B, se), v) : v; + } + function uf(v) { + const w = vJ(v.kind); + return v.tagName.escapedText === Ko(w) ? v.tagName : pe(w); + } + function cd(v, w, B) { + const se = F(v); + return se.tagName = w, se.comment = B, se; + } + function ld(v, w, B) { + const se = V(v); + return se.tagName = w, se.comment = B, se; + } + function R0(v, w, B, se) { + const ze = cd(345, v ?? pe("template"), se); + return ze.constraint = w, ze.typeParameters = j(B), ze; + } + function wv(v, w = uf(v), B, se, ze) { + return v.tagName !== w || v.constraint !== B || v.typeParameters !== se || v.comment !== ze ? $r(R0(w, B, se, ze), v) : v; + } + function rk(v, w, B, se) { + const ze = ld(346, v ?? pe("typedef"), se); + return ze.typeExpression = w, ze.fullName = B, ze.name = tz(B), ze.locals = void 0, ze.nextContainer = void 0, ze; + } + function LS(v, w = uf(v), B, se, ze) { + return v.tagName !== w || v.typeExpression !== B || v.fullName !== se || v.comment !== ze ? $r(rk(w, B, se, ze), v) : v; + } + function a2(v, w, B, se, ze, Ft) { + const fn = ld(341, v ?? pe("param"), Ft); + return fn.typeExpression = se, fn.name = w, fn.isNameFirst = !!ze, fn.isBracketed = B, fn; + } + function MS(v, w = uf(v), B, se, ze, Ft, fn) { + return v.tagName !== w || v.name !== B || v.isBracketed !== se || v.typeExpression !== ze || v.isNameFirst !== Ft || v.comment !== fn ? $r(a2(w, B, se, ze, Ft, fn), v) : v; + } + function o2(v, w, B, se, ze, Ft) { + const fn = ld(348, v ?? pe("prop"), Ft); + return fn.typeExpression = se, fn.name = w, fn.isNameFirst = !!ze, fn.isBracketed = B, fn; + } + function RS(v, w = uf(v), B, se, ze, Ft, fn) { + return v.tagName !== w || v.name !== B || v.isBracketed !== se || v.typeExpression !== ze || v.isNameFirst !== Ft || v.comment !== fn ? $r(o2(w, B, se, ze, Ft, fn), v) : v; + } + function Ld(v, w, B, se) { + const ze = ld(338, v ?? pe("callback"), se); + return ze.typeExpression = w, ze.fullName = B, ze.name = tz(B), ze.locals = void 0, ze.nextContainer = void 0, ze; + } + function F6(v, w = uf(v), B, se, ze) { + return v.tagName !== w || v.typeExpression !== B || v.fullName !== se || v.comment !== ze ? $r(Ld(w, B, se, ze), v) : v; + } + function Yy(v, w, B) { + const se = cd(339, v ?? pe("overload"), B); + return se.typeExpression = w, se; + } + function Zy(v, w = uf(v), B, se) { + return v.tagName !== w || v.typeExpression !== B || v.comment !== se ? $r(Yy(w, B, se), v) : v; + } + function Fh(v, w, B) { + const se = cd(328, v ?? pe("augments"), B); + return se.class = w, se; + } + function j0(v, w = uf(v), B, se) { + return v.tagName !== w || v.class !== B || v.comment !== se ? $r(Fh(w, B, se), v) : v; + } + function hp(v, w, B) { + const se = cd(329, v ?? pe("implements"), B); + return se.class = w, se; + } + function B0(v, w, B) { + const se = cd(347, v ?? pe("see"), B); + return se.name = w, se; + } + function Lh(v, w, B, se) { + return v.tagName !== w || v.name !== B || v.comment !== se ? $r(B0(w, B, se), v) : v; + } + function hl(v) { + const w = F( + 310 + /* JSDocNameReference */ + ); + return w.name = v, w; + } + function bc(v, w) { + return v.name !== w ? $r(hl(w), v) : v; + } + function Ec(v, w) { + const B = F( + 311 + /* JSDocMemberName */ + ); + return B.left = v, B.right = w, B.transformFlags |= gn(B.left) | gn(B.right), B; + } + function jS(v, w, B) { + return v.left !== w || v.right !== B ? $r(Ec(w, B), v) : v; + } + function n_(v, w) { + const B = F( + 324 + /* JSDocLink */ + ); + return B.name = v, B.text = w, B; + } + function i_(v, w, B) { + return v.name !== w ? $r(n_(w, B), v) : v; + } + function nk(v, w) { + const B = F( + 325 + /* JSDocLinkCode */ + ); + return B.name = v, B.text = w, B; + } + function ud(v, w, B) { + return v.name !== w ? $r(nk(w, B), v) : v; + } + function ik(v, w) { + const B = F( + 326 + /* JSDocLinkPlain */ + ); + return B.name = v, B.text = w, B; + } + function Ky(v, w, B) { + return v.name !== w ? $r(ik(w, B), v) : v; + } + function L6(v, w = uf(v), B, se) { + return v.tagName !== w || v.class !== B || v.comment !== se ? $r(hp(w, B, se), v) : v; + } + function Av(v, w, B) { + return cd(v, w ?? pe(vJ(v)), B); + } + function No(v, w, B = uf(w), se) { + return w.tagName !== B || w.comment !== se ? $r(Av(v, B, se), w) : w; + } + function M6(v, w, B, se) { + const ze = cd(v, w ?? pe(vJ(v)), se); + return ze.typeExpression = B, ze; + } + function yP(v, w, B = uf(w), se, ze) { + return w.tagName !== B || w.typeExpression !== se || w.comment !== ze ? $r(M6(v, B, se, ze), w) : w; + } + function BS(v, w) { + return cd(327, v, w); + } + function R6(v, w, B) { + return v.tagName !== w || v.comment !== B ? $r(BS(w, B), v) : v; + } + function Ru(v, w, B) { + const se = ld(340, v ?? pe(vJ( + 340 + /* JSDocEnumTag */ + )), B); + return se.typeExpression = w, se.locals = void 0, se.nextContainer = void 0, se; + } + function sk(v, w = uf(v), B, se) { + return v.tagName !== w || v.typeExpression !== B || v.comment !== se ? $r(Ru(w, B, se), v) : v; + } + function Nv(v, w, B, se, ze) { + const Ft = cd(351, v ?? pe("import"), ze); + return Ft.importClause = w, Ft.moduleSpecifier = B, Ft.attributes = se, Ft.comment = ze, Ft; + } + function ak(v, w, B, se, ze, Ft) { + return v.tagName !== w || v.comment !== Ft || v.importClause !== B || v.moduleSpecifier !== se || v.attributes !== ze ? $r(Nv(w, B, se, ze, Ft), v) : v; + } + function M_(v) { + const w = F( + 321 + /* JSDocText */ + ); + return w.text = v, w; + } + function c2(v, w) { + return v.text !== w ? $r(M_(w), v) : v; + } + function e1(v, w) { + const B = F( + 320 + /* JSDoc */ + ); + return B.comment = v, B.tags = Na(w), B; + } + function j6(v, w, B) { + return v.comment !== w || v.tags !== B ? $r(e1(w, B), v) : v; + } + function l2(v, w, B) { + const se = F( + 284 + /* JsxElement */ + ); + return se.openingElement = v, se.children = j(w), se.closingElement = B, se.transformFlags |= gn(se.openingElement) | Sa(se.children) | gn(se.closingElement) | 2, se; + } + function ok(v, w, B, se) { + return v.openingElement !== w || v.children !== B || v.closingElement !== se ? $r(l2(w, B, se), v) : v; + } + function JS(v, w, B) { + const se = F( + 285 + /* JsxSelfClosingElement */ + ); + return se.tagName = v, se.typeArguments = Na(w), se.attributes = B, se.transformFlags |= gn(se.tagName) | Sa(se.typeArguments) | gn(se.attributes) | 2, se.typeArguments && (se.transformFlags |= 1), se; + } + function ck(v, w, B, se) { + return v.tagName !== w || v.typeArguments !== B || v.attributes !== se ? $r(JS(w, B, se), v) : v; + } + function zS(v, w, B) { + const se = F( + 286 + /* JsxOpeningElement */ + ); + return se.tagName = v, se.typeArguments = Na(w), se.attributes = B, se.transformFlags |= gn(se.tagName) | Sa(se.typeArguments) | gn(se.attributes) | 2, w && (se.transformFlags |= 1), se; + } + function WS(v, w, B, se) { + return v.tagName !== w || v.typeArguments !== B || v.attributes !== se ? $r(zS(w, B, se), v) : v; + } + function kf(v) { + const w = F( + 287 + /* JsxClosingElement */ + ); + return w.tagName = v, w.transformFlags |= gn(w.tagName) | 2, w; + } + function _f(v, w) { + return v.tagName !== w ? $r(kf(w), v) : v; + } + function Md(v, w, B) { + const se = F( + 288 + /* JsxFragment */ + ); + return se.openingFragment = v, se.children = j(w), se.closingFragment = B, se.transformFlags |= gn(se.openingFragment) | Sa(se.children) | gn(se.closingFragment) | 2, se; + } + function B6(v, w, B, se) { + return v.openingFragment !== w || v.children !== B || v.closingFragment !== se ? $r(Md(w, B, se), v) : v; + } + function Iv(v, w) { + const B = F( + 12 + /* JsxText */ + ); + return B.text = v, B.containsOnlyTriviaWhiteSpaces = !!w, B.transformFlags |= 2, B; + } + function Ma(v, w, B) { + return v.text !== w || v.containsOnlyTriviaWhiteSpaces !== B ? $r(Iv(w, B), v) : v; + } + function xn() { + const v = F( + 289 + /* JsxOpeningFragment */ + ); + return v.transformFlags |= 2, v; + } + function C_() { + const v = F( + 290 + /* JsxClosingFragment */ + ); + return v.transformFlags |= 2, v; + } + function s_(v, w) { + const B = V( + 291 + /* JsxAttribute */ + ); + return B.name = v, B.initializer = w, B.transformFlags |= gn(B.name) | gn(B.initializer) | 2, B; + } + function lk(v, w, B) { + return v.name !== w || v.initializer !== B ? $r(s_(w, B), v) : v; + } + function Mh(v) { + const w = V( + 292 + /* JsxAttributes */ + ); + return w.properties = j(v), w.transformFlags |= Sa(w.properties) | 2, w; + } + function J6(v, w) { + return v.properties !== w ? $r(Mh(w), v) : v; + } + function z6(v) { + const w = F( + 293 + /* JsxSpreadAttribute */ + ); + return w.expression = v, w.transformFlags |= gn(w.expression) | 2, w; + } + function Ov(v, w) { + return v.expression !== w ? $r(z6(w), v) : v; + } + function Qg(v, w) { + const B = F( + 294 + /* JsxExpression */ + ); + return B.dotDotDotToken = v, B.expression = w, B.transformFlags |= gn(B.dotDotDotToken) | gn(B.expression) | 2, B; + } + function Rd(v, w) { + return v.expression !== w ? $r(Qg(v.dotDotDotToken, w), v) : v; + } + function R_(v, w) { + const B = F( + 295 + /* JsxNamespacedName */ + ); + return B.namespace = v, B.name = w, B.transformFlags |= gn(B.namespace) | gn(B.name) | 2, B; + } + function t1(v, w, B) { + return v.namespace !== w || v.name !== B ? $r(R_(w, B), v) : v; + } + function Yg(v, w) { + const B = F( + 296 + /* CaseClause */ + ); + return B.expression = i().parenthesizeExpressionForDisallowedComma(v), B.statements = j(w), B.transformFlags |= gn(B.expression) | Sa(B.statements), B.jsDoc = void 0, B; + } + function jd(v, w, B) { + return v.expression !== w || v.statements !== B ? $r(Yg(w, B), v) : v; + } + function u2(v) { + const w = F( + 297 + /* DefaultClause */ + ); + return w.statements = j(v), w.transformFlags = Sa(w.statements), w; + } + function $c(v, w) { + return v.statements !== w ? $r(u2(w), v) : v; + } + function uk(v, w) { + const B = F( + 298 + /* HeritageClause */ + ); + switch (B.token = v, B.types = j(w), B.transformFlags |= Sa(B.types), v) { + case 96: + B.transformFlags |= 1024; + break; + case 119: + B.transformFlags |= 1; + break; + default: + return E.assertNever(v); + } + return B; + } + function yp(v, w) { + return v.types !== w ? $r(uk(v.token, w), v) : v; + } + function _d(v, w) { + const B = F( + 299 + /* CatchClause */ + ); + return B.variableDeclaration = j_(v), B.block = w, B.transformFlags |= gn(B.variableDeclaration) | gn(B.block) | (v ? 0 : 64), B.locals = void 0, B.nextContainer = void 0, B; + } + function ff(v, w, B) { + return v.variableDeclaration !== w || v.block !== B ? $r(_d(w, B), v) : v; + } + function lg(v, w) { + const B = V( + 303 + /* PropertyAssignment */ + ); + return B.name = Qc(v), B.initializer = i().parenthesizeExpressionForDisallowedComma(w), B.transformFlags |= Ty(B.name) | gn(B.initializer), B.modifiers = void 0, B.questionToken = void 0, B.exclamationToken = void 0, B.jsDoc = void 0, B; + } + function r1(v, w, B) { + return v.name !== w || v.initializer !== B ? W6(lg(w, B), v) : v; + } + function W6(v, w) { + return v !== w && (v.modifiers = w.modifiers, v.questionToken = w.questionToken, v.exclamationToken = w.exclamationToken), $r(v, w); + } + function _k(v, w) { + const B = V( + 304 + /* ShorthandPropertyAssignment */ + ); + return B.name = Qc(v), B.objectAssignmentInitializer = w && i().parenthesizeExpressionForDisallowedComma(w), B.transformFlags |= X3(B.name) | gn(B.objectAssignmentInitializer) | 1024, B.equalsToken = void 0, B.modifiers = void 0, B.questionToken = void 0, B.exclamationToken = void 0, B.jsDoc = void 0, B; + } + function k(v, w, B) { + return v.name !== w || v.objectAssignmentInitializer !== B ? ie(_k(w, B), v) : v; + } + function ie(v, w) { + return v !== w && (v.modifiers = w.modifiers, v.questionToken = w.questionToken, v.exclamationToken = w.exclamationToken, v.equalsToken = w.equalsToken), $r(v, w); + } + function _t(v) { + const w = V( + 305 + /* SpreadAssignment */ + ); + return w.expression = i().parenthesizeExpressionForDisallowedComma(v), w.transformFlags |= gn(w.expression) | 128 | 65536, w.jsDoc = void 0, w; + } + function Qt(v, w) { + return v.expression !== w ? $r(_t(w), v) : v; + } + function Hn(v, w) { + const B = V( + 306 + /* EnumMember */ + ); + return B.name = Qc(v), B.initializer = w && i().parenthesizeExpressionForDisallowedComma(w), B.transformFlags |= gn(B.name) | gn(B.initializer) | 1, B.jsDoc = void 0, B; + } + function Ui(v, w, B) { + return v.name !== w || v.initializer !== B ? $r(Hn(w, B), v) : v; + } + function Zi(v, w, B) { + const se = t.createBaseSourceFileNode( + 307 + /* SourceFile */ + ); + return se.statements = j(v), se.endOfFileToken = w, se.flags |= B, se.text = "", se.fileName = "", se.path = "", se.resolvedPath = "", se.originalFileName = "", se.languageVersion = 1, se.languageVariant = 0, se.scriptKind = 0, se.isDeclarationFile = !1, se.hasNoDefaultLib = !1, se.transformFlags |= Sa(se.statements) | gn(se.endOfFileToken), se.locals = void 0, se.nextContainer = void 0, se.endFlowNode = void 0, se.nodeCount = 0, se.identifierCount = 0, se.symbolCount = 0, se.parseDiagnostics = void 0, se.bindDiagnostics = void 0, se.bindSuggestionDiagnostics = void 0, se.lineMap = void 0, se.externalModuleIndicator = void 0, se.setExternalModuleIndicator = void 0, se.pragmas = void 0, se.checkJsDirective = void 0, se.referencedFiles = void 0, se.typeReferenceDirectives = void 0, se.libReferenceDirectives = void 0, se.amdDependencies = void 0, se.commentDirectives = void 0, se.identifiers = void 0, se.packageJsonLocations = void 0, se.packageJsonScope = void 0, se.imports = void 0, se.moduleAugmentations = void 0, se.ambientModuleNames = void 0, se.classifiableNames = void 0, se.impliedNodeFormat = void 0, se; + } + function fs(v) { + const w = Object.create(v.redirectTarget); + return Object.defineProperties(w, { + id: { + get() { + return this.redirectInfo.redirectTarget.id; + }, + set(B) { + this.redirectInfo.redirectTarget.id = B; + } + }, + symbol: { + get() { + return this.redirectInfo.redirectTarget.symbol; + }, + set(B) { + this.redirectInfo.redirectTarget.symbol = B; + } + } + }), w.redirectInfo = v, w; + } + function ta(v) { + const w = fs(v.redirectInfo); + return w.flags |= v.flags & -17, w.fileName = v.fileName, w.path = v.path, w.resolvedPath = v.resolvedPath, w.originalFileName = v.originalFileName, w.packageJsonLocations = v.packageJsonLocations, w.packageJsonScope = v.packageJsonScope, w.emitNode = void 0, w; + } + function su(v) { + const w = t.createBaseSourceFileNode( + 307 + /* SourceFile */ + ); + w.flags |= v.flags & -17; + for (const B in v) + if (!(io(w, B) || !io(v, B))) { + if (B === "emitNode") { + w.emitNode = void 0; + continue; + } + w[B] = v[B]; + } + return w; + } + function au(v) { + const w = v.redirectInfo ? ta(v) : su(v); + return n(w, v), w; + } + function n1(v, w, B, se, ze, Ft, fn) { + const $i = au(v); + return $i.statements = j(w), $i.isDeclarationFile = B, $i.referencedFiles = se, $i.typeReferenceDirectives = ze, $i.hasNoDefaultLib = Ft, $i.libReferenceDirectives = fn, $i.transformFlags = Sa($i.statements) | gn($i.endOfFileToken), $i; + } + function xm(v, w, B = v.isDeclarationFile, se = v.referencedFiles, ze = v.typeReferenceDirectives, Ft = v.hasNoDefaultLib, fn = v.libReferenceDirectives) { + return v.statements !== w || v.isDeclarationFile !== B || v.referencedFiles !== se || v.typeReferenceDirectives !== ze || v.hasNoDefaultLib !== Ft || v.libReferenceDirectives !== fn ? $r(n1(v, w, B, se, ze, Ft, fn), v) : v; + } + function E_(v) { + const w = F( + 308 + /* Bundle */ + ); + return w.sourceFiles = v, w.syntheticFileReferences = void 0, w.syntheticTypeReferences = void 0, w.syntheticLibReferences = void 0, w.hasNoDefaultLib = void 0, w; + } + function i1(v, w) { + return v.sourceFiles !== w ? $r(E_(w), v) : v; + } + function Fv(v, w = !1, B) { + const se = F( + 237 + /* SyntheticExpression */ + ); + return se.type = v, se.isSpread = w, se.tupleNameSource = B, se; + } + function Rh(v) { + const w = F( + 352 + /* SyntaxList */ + ); + return rO(w, v), w; + } + function fk(v) { + const w = F( + 353 + /* NotEmittedStatement */ + ); + return w.original = v, ot(w, v), w; + } + function VS(v, w) { + const B = F( + 354 + /* PartiallyEmittedExpression */ + ); + return B.expression = v, B.original = w, B.transformFlags |= gn(B.expression) | 1, ot(B, w), B; + } + function Lv(v, w) { + return v.expression !== w ? $r(VS(w, v.original), v) : v; + } + function Si(v) { + if (oo(v) && !WE(v) && !v.original && !v.emitNode && !v.id) { + if (nD(v)) + return v.elements; + if (cn(v) && yte(v.operatorToken)) + return [v.left, v.right]; + } + return v; + } + function km(v) { + const w = F( + 355 + /* CommaListExpression */ + ); + return w.elements = j(hX(v, Si)), w.transformFlags |= Sa(w.elements), w; + } + function Ur(v, w) { + return v.elements !== w ? $r(km(w), v) : v; + } + function pk(v, w) { + const B = F( + 356 + /* SyntheticReferenceExpression */ + ); + return B.expression = v, B.thisArg = w, B.transformFlags |= gn(B.expression) | gn(B.thisArg), B; + } + function dk(v, w, B) { + return v.expression !== w || v.thisArg !== B ? $r(pk(w, B), v) : v; + } + function V6(v) { + const w = oe(v.escapedText); + return w.flags |= v.flags & -17, w.transformFlags = v.transformFlags, n(w, v), K3(w, { ...v.emitNode.autoGenerate }), w; + } + function vP(v) { + const w = oe(v.escapedText); + w.flags |= v.flags & -17, w.jsDoc = v.jsDoc, w.flowNode = v.flowNode, w.symbol = v.symbol, w.transformFlags = v.transformFlags, n(w, v); + const B = tS(v); + return B && h0(w, B), w; + } + function bP(v) { + const w = Ae(v.escapedText); + return w.flags |= v.flags & -17, w.transformFlags = v.transformFlags, n(w, v), K3(w, { ...v.emitNode.autoGenerate }), w; + } + function a8(v) { + const w = Ae(v.escapedText); + return w.flags |= v.flags & -17, w.transformFlags = v.transformFlags, n(w, v), w; + } + function SP(v) { + if (v === void 0) + return v; + if (yi(v)) + return au(v); + if (Fo(v)) + return V6(v); + if (Re(v)) + return vP(v); + if (z2(v)) + return bP(v); + if (wi(v)) + return a8(v); + const w = ww(v.kind) ? t.createBaseNode(v.kind) : t.createBaseTokenNode(v.kind); + w.flags |= v.flags & -17, w.transformFlags = v.transformFlags, n(w, v); + for (const B in v) + io(w, B) || !io(v, B) || (w[B] = v[B]); + return w; + } + function Mv(v, w, B) { + return Jr( + v_( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + w ? [w] : [], + /*type*/ + void 0, + Tt( + v, + /*multiLine*/ + !0 + ) + ), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + B ? [B] : [] + ); + } + function vL(v, w, B) { + return Jr( + Wf( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + w ? [w] : [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + Tt( + v, + /*multiLine*/ + !0 + ) + ), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + B ? [B] : [] + ); + } + function Rv() { + return L_($("0")); + } + function o8(v) { + return $y( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + v + ); + } + function c8(v) { + return bo( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + OS([ + tk( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + v + ) + ]) + ); + } + function U6(v, w) { + return w === "null" ? O.createStrictEquality(v, Qe()) : w === "undefined" ? O.createStrictEquality(v, Rv()) : O.createStrictEquality(Gc(v), ce(w)); + } + function l8(v, w) { + return w === "null" ? O.createStrictInequality(v, Qe()) : w === "undefined" ? O.createStrictInequality(v, Rv()) : O.createStrictInequality(Gc(v), ce(w)); + } + function ug(v, w, B) { + return J2(v) ? ha( + Eo( + v, + /*questionDotToken*/ + void 0, + w + ), + /*questionDotToken*/ + void 0, + /*typeArguments*/ + void 0, + B + ) : Jr( + vo(v, w), + /*typeArguments*/ + void 0, + B + ); + } + function jh(v, w, B) { + return ug(v, "bind", [w, ...B]); + } + function TP(v, w, B) { + return ug(v, "call", [w, ...B]); + } + function _g(v, w, B) { + return ug(v, "apply", [w, B]); + } + function jv(v, w, B) { + return ug(pe(v), w, B); + } + function mk(v, w) { + return ug(v, "slice", w === void 0 ? [] : [a1(w)]); + } + function fg(v, w) { + return ug(v, "concat", w); + } + function _2(v, w, B) { + return jv("Object", "defineProperty", [v, a1(w), B]); + } + function bL(v, w) { + return jv("Object", "getOwnPropertyDescriptor", [v, a1(w)]); + } + function Xc(v, w, B) { + return jv("Reflect", "get", B ? [v, w, B] : [v, w]); + } + function q6(v, w, B, se) { + return jv("Reflect", "set", se ? [v, w, B, se] : [v, w, B]); + } + function Ea(v, w, B) { + return B ? (v.push(lg(w, B)), !0) : !1; + } + function Aa(v, w) { + const B = []; + Ea(B, "enumerable", a1(v.enumerable)), Ea(B, "configurable", a1(v.configurable)); + let se = Ea(B, "writable", a1(v.writable)); + se = Ea(B, "value", v.value) || se; + let ze = Ea(B, "get", v.get); + return ze = Ea(B, "set", v.set) || ze, E.assert(!(se && ze), "A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."), eo(B, !w); + } + function xP(v, w) { + switch (v.kind) { + case 217: + return zf(v, w); + case 216: + return bf(v, v.type, w); + case 234: + return A0(v, w, v.type); + case 238: + return I0(v, w, v.type); + case 235: + return zp(v, w); + case 354: + return Lv(v, w); + } + } + function H6(v) { + return Qu(v) && oo(v) && oo(g0(v)) && oo(lm(v)) && !ut(PC(v)) && !ut(Z3(v)); + } + function kP(v, w, B = 15) { + return v && sO(v, B) && !H6(v) ? xP( + v, + kP(v.expression, w) + ) : w; + } + function gk(v, w, B) { + if (!w) + return v; + const se = w6( + w, + w.label, + Dy(w.statement) ? gk(v, w.statement) : v + ); + return B && B(w), se; + } + function Q(v, w) { + const B = Ja(v); + switch (B.kind) { + case 80: + return w; + case 110: + case 9: + case 10: + case 11: + return !1; + case 209: + return B.elements.length !== 0; + case 210: + return B.properties.length > 0; + default: + return !0; + } + } + function xe(v, w, B, se = !1) { + const ze = Bc( + v, + 15 + /* All */ + ); + let Ft, fn; + return f_(ze) ? (Ft = Fe(), fn = ze) : K4(ze) ? (Ft = Fe(), fn = B !== void 0 && B < 2 ? ot(pe("_super"), ze) : ze) : ua(ze) & 8192 ? (Ft = Rv(), fn = i().parenthesizeLeftSideOfAccess( + ze, + /*optionalChain*/ + !1 + )) : Dn(ze) ? Q(ze.expression, se) ? (Ft = fe(w), fn = vo( + ot( + O.createAssignment( + Ft, + ze.expression + ), + ze.expression + ), + ze.name + ), ot(fn, ze)) : (Ft = ze.expression, fn = ze) : ho(ze) ? Q(ze.expression, se) ? (Ft = fe(w), fn = kc( + ot( + O.createAssignment( + Ft, + ze.expression + ), + ze.expression + ), + ze.argumentExpression + ), ot(fn, ze)) : (Ft = ze.expression, fn = ze) : (Ft = Rv(), fn = i().parenthesizeLeftSideOfAccess( + v, + /*optionalChain*/ + !1 + )), { target: fn, thisArg: Ft }; + } + function qe(v, w) { + return vo( + // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560) + Id( + eo([ + re( + /*modifiers*/ + void 0, + "value", + [ci( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + v, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )], + Tt([ + _n(w) + ]) + ) + ]) + ), + "value" + ); + } + function gt(v) { + return v.length > 10 ? km(v) : Eu(v, O.createComma); + } + function Nt(v, w, B, se = 0, ze) { + const Ft = ze ? v && FI(v) : es(v); + if (Ft && Re(Ft) && !Fo(Ft)) { + const fn = Da(ot(SP(Ft), Ft), Ft.parent); + return se |= ua(Ft), B || (se |= 96), w || (se |= 3072), se && Kr(fn, se), fn; + } + return le(v); + } + function dr(v, w, B) { + return Nt( + v, + w, + B, + 98304 + /* InternalName */ + ); + } + function In(v, w, B, se) { + return Nt(v, w, B, 32768, se); + } + function Ti(v, w, B) { + return Nt( + v, + w, + B, + 16384 + /* ExportName */ + ); + } + function fi(v, w, B) { + return Nt(v, w, B); + } + function ni(v, w, B, se) { + const ze = vo(v, oo(w) ? w : SP(w)); + ot(ze, w); + let Ft = 0; + return se || (Ft |= 96), B || (Ft |= 3072), Ft && Kr(ze, Ft), ze; + } + function oi(v, w, B, se) { + return v && Vn( + w, + 32 + /* Export */ + ) ? ni(v, Nt(w), B, se) : Ti(w, B, se); + } + function ro(v, w, B, se) { + const ze = Gf(v, w, 0, B); + return Cm(v, w, ze, se); + } + function no(v) { + return Ks(v.expression) && v.expression.text === "use strict"; + } + function Ta() { + return mu(_n(ce("use strict"))); + } + function Gf(v, w, B = 0, se) { + E.assert(w.length === 0, "Prologue directives should be at the first statement in the target statements array"); + let ze = !1; + const Ft = v.length; + for (; B < Ft; ) { + const fn = v[B]; + if (Kd(fn)) + no(fn) && (ze = !0), w.push(fn); + else + break; + B++; + } + return se && !ze && w.push(Ta()), B; + } + function Cm(v, w, B, se, ze = A1) { + const Ft = v.length; + for (; B !== void 0 && B < Ft; ) { + const fn = v[B]; + if (ua(fn) & 2097152 && ze(fn)) + Tr(w, se ? Ge(fn, se, hi) : fn); + else + break; + B++; + } + return B; + } + function s1(v) { + return ZJ(v) ? v : ot(j([Ta(), ...v]), v); + } + function J0(v) { + return E.assert(Ri(v, YY), "Cannot lift nodes to a Block."), Rm(v) || Tt(v); + } + function $f(v, w, B) { + let se = B; + for (; se < v.length && w(v[se]); ) + se++; + return se; + } + function z0(v, w) { + if (!ut(w)) + return v; + const B = $f(v, Kd, 0), se = $f(v, _7, B), ze = $f(v, f7, se), Ft = $f(w, Kd, 0), fn = $f(w, _7, Ft), $i = $f(w, f7, fn), Ba = $f(w, Qw, $i); + E.assert(Ba === w.length, "Expected declarations to be valid standard or custom prologues"); + const Cf = ab(v) ? v.slice() : v; + if (Ba > $i && Cf.splice(ze, 0, ...w.slice($i, Ba)), $i > fn && Cf.splice(se, 0, ...w.slice(fn, $i)), fn > Ft && Cf.splice(B, 0, ...w.slice(Ft, fn)), Ft > 0) + if (B === 0) + Cf.splice(0, 0, ...w.slice(0, Ft)); + else { + const o1 = /* @__PURE__ */ new Map(); + for (let c1 = 0; c1 < B; c1++) { + const Jv = v[c1]; + o1.set(Jv.expression.text, !0); + } + for (let c1 = Ft - 1; c1 >= 0; c1--) { + const Jv = w[c1]; + o1.has(Jv.expression.text) || Cf.unshift(Jv); + } + } + return ab(v) ? ot(j(Cf, v.hasTrailingComma), v) : v; + } + function u8(v, w) { + let B; + return typeof w == "number" ? B = Wt(w) : B = w, Mo(v) ? jr(v, B, v.name, v.constraint, v.default) : ji(v) ? Xt(v, B, v.dotDotDotToken, v.name, v.questionToken, v.type, v.initializer) : wC(v) ? wt(v, B, v.typeParameters, v.parameters, v.type) : I_(v) ? os(v, B, v.name, v.questionToken, v.type) : rs(v) ? Le(v, B, v.name, v.questionToken ?? v.exclamationToken, v.type, v.initializer) : um(v) ? vr(v, B, v.name, v.questionToken, v.typeParameters, v.parameters, v.type) : hc(v) ? Zn(v, B, v.asteriskToken, v.name, v.questionToken, v.typeParameters, v.parameters, v.type, v.body) : ec(v) ? Ca(v, B, v.parameters, v.body) : Af(v) ? te(v, B, v.name, v.parameters, v.type, v.body) : rf(v) ? Ee(v, B, v.name, v.parameters, v.body) : Pb(v) ? bt(v, B, v.parameters, v.type) : po(v) ? pp(v, B, v.asteriskToken, v.name, v.typeParameters, v.parameters, v.type, v.body) : xo(v) ? tg(v, B, v.typeParameters, v.parameters, v.type, v.equalsGreaterThanToken, v.body) : tl(v) ? cf(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : yc(v) ? Gr(v, B, v.declarationList) : Ac(v) ? Wy(v, B, v.asteriskToken, v.name, v.typeParameters, v.parameters, v.type, v.body) : rl(v) ? kv(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : Vl(v) ? Al(v, B, v.name, v.typeParameters, v.heritageClauses, v.members) : Rp(v) ? r2(v, B, v.name, v.typeParameters, v.type) : rv(v) ? Vy(v, B, v.name, v.members) : Nc(v) ? id(v, B, v.name, v.body) : nl(v) ? n2(v, B, v.isTypeOnly, v.name, v.moduleReference) : oc(v) ? NS(v, B, v.importClause, v.moduleSpecifier, v.attributes) : ko(v) ? s2(v, B, v.expression) : Ic(v) ? Oh(v, B, v.isTypeOnly, v.exportClause, v.moduleSpecifier, v.attributes) : E.assertNever(v); + } + function _8(v, w) { + return ji(v) ? Xt(v, w, v.dotDotDotToken, v.name, v.questionToken, v.type, v.initializer) : rs(v) ? Le(v, w, v.name, v.questionToken ?? v.exclamationToken, v.type, v.initializer) : hc(v) ? Zn(v, w, v.asteriskToken, v.name, v.questionToken, v.typeParameters, v.parameters, v.type, v.body) : Af(v) ? te(v, w, v.name, v.parameters, v.type, v.body) : rf(v) ? Ee(v, w, v.name, v.parameters, v.body) : tl(v) ? cf(v, w, v.name, v.typeParameters, v.heritageClauses, v.members) : rl(v) ? kv(v, w, v.name, v.typeParameters, v.heritageClauses, v.members) : E.assertNever(v); + } + function SL(v, w) { + switch (v.kind) { + case 177: + return te(v, v.modifiers, w, v.parameters, v.type, v.body); + case 178: + return Ee(v, v.modifiers, w, v.parameters, v.body); + case 174: + return Zn(v, v.modifiers, v.asteriskToken, w, v.questionToken, v.typeParameters, v.parameters, v.type, v.body); + case 173: + return vr(v, v.modifiers, w, v.questionToken, v.typeParameters, v.parameters, v.type); + case 172: + return Le(v, v.modifiers, w, v.questionToken ?? v.exclamationToken, v.type, v.initializer); + case 171: + return os(v, v.modifiers, w, v.questionToken, v.type); + case 303: + return r1(v, w, v.initializer); + } + } + function Na(v) { + return v ? j(v) : void 0; + } + function Qc(v) { + return typeof v == "string" ? pe(v) : v; + } + function a1(v) { + return typeof v == "string" ? ce(v) : typeof v == "number" ? $(v) : typeof v == "boolean" ? v ? Ke() : Be() : v; + } + function fd(v) { + return v && i().parenthesizeExpressionForDisallowedComma(v); + } + function Bv(v) { + return typeof v == "number" ? Ie(v) : v; + } + function W0(v) { + return v && RJ(v) ? ot(n(_r(), v), v) : v; + } + function j_(v) { + return typeof v == "string" || v && !ti(v) ? r_( + v, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : v; + } + function $r(v, w) { + return v !== w && (n(v, w), ot(v, w)), v; + } + } + function vJ(e) { + switch (e) { + case 344: + return "type"; + case 342: + return "returns"; + case 343: + return "this"; + case 340: + return "enum"; + case 330: + return "author"; + case 332: + return "class"; + case 333: + return "public"; + case 334: + return "private"; + case 335: + return "protected"; + case 336: + return "readonly"; + case 337: + return "override"; + case 345: + return "template"; + case 346: + return "typedef"; + case 341: + return "param"; + case 348: + return "prop"; + case 338: + return "callback"; + case 339: + return "overload"; + case 328: + return "augments"; + case 329: + return "implements"; + case 351: + return "import"; + default: + return E.fail(`Unsupported kind: ${E.formatSyntaxKind(e)}`); + } + } + var m0, l0e = {}; + function KFe(e, t) { + switch (m0 || (m0 = Eg( + 99, + /*skipTrivia*/ + !1, + 0 + /* Standard */ + )), e) { + case 15: + m0.setText("`" + t + "`"); + break; + case 16: + m0.setText("`" + t + "${"); + break; + case 17: + m0.setText("}" + t + "${"); + break; + case 18: + m0.setText("}" + t + "`"); + break; + } + let n = m0.scan(); + if (n === 20 && (n = m0.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + )), m0.isUnterminated()) + return m0.setText(void 0), l0e; + let i; + switch (n) { + case 15: + case 16: + case 17: + case 18: + i = m0.getTokenValue(); + break; + } + return i === void 0 || m0.scan() !== 1 ? (m0.setText(void 0), l0e) : (m0.setText(void 0), i); + } + function Ty(e) { + return e && Re(e) ? X3(e) : gn(e); + } + function X3(e) { + return gn(e) & -67108865; + } + function e9e(e, t) { + return t | e.transformFlags & 134234112; + } + function gn(e) { + if (!e) return 0; + const t = e.transformFlags & ~Iee(e.kind); + return Bl(e) && Rc(e.name) ? e9e(e.name, t) : t; + } + function Sa(e) { + return e ? e.transformFlags : 0; + } + function u0e(e) { + let t = 0; + for (const n of e) + t |= gn(n); + e.transformFlags = t; + } + function Iee(e) { + if (e >= 182 && e <= 205) + return -2; + switch (e) { + case 213: + case 214: + case 209: + return -2147450880; + case 267: + return -1941676032; + case 169: + return -2147483648; + case 219: + return -2072174592; + case 218: + case 262: + return -1937940480; + case 261: + return -2146893824; + case 263: + case 231: + return -2147344384; + case 176: + return -1937948672; + case 172: + return -2013249536; + case 174: + case 177: + case 178: + return -2005057536; + case 133: + case 150: + case 163: + case 146: + case 154: + case 151: + case 136: + case 155: + case 116: + case 168: + case 171: + case 173: + case 179: + case 180: + case 181: + case 264: + case 265: + return -2; + case 210: + return -2147278848; + case 299: + return -2147418112; + case 206: + case 207: + return -2147450880; + case 216: + case 238: + case 234: + case 354: + case 217: + case 108: + return -2147483648; + case 211: + case 212: + return -2147483648; + default: + return -2147483648; + } + } + var N5 = Eee(); + function I5(e) { + return e.flags |= 16, e; + } + var t9e = { + createBaseSourceFileNode: (e) => I5(N5.createBaseSourceFileNode(e)), + createBaseIdentifierNode: (e) => I5(N5.createBaseIdentifierNode(e)), + createBasePrivateIdentifierNode: (e) => I5(N5.createBasePrivateIdentifierNode(e)), + createBaseTokenNode: (e) => I5(N5.createBaseTokenNode(e)), + createBaseNode: (e) => I5(N5.createBaseNode(e)) + }, N = $3(4, t9e), _0e; + function f0e(e, t, n) { + return new (_0e || (_0e = zl.getSourceMapSourceConstructor()))(e, t, n); + } + function kn(e, t) { + if (e.original !== t && (e.original = t, t)) { + const n = t.emitNode; + n && (e.emitNode = r9e(n, e.emitNode)); + } + return e; + } + function r9e(e, t) { + const { + flags: n, + internalFlags: i, + leadingComments: s, + trailingComments: o, + commentRange: c, + sourceMapRange: _, + tokenSourceMapRanges: u, + constantValue: d, + helpers: g, + startsOnNewLine: h, + snippetElement: S, + classThis: T, + assignedName: C + } = e; + if (t || (t = {}), n && (t.flags = n), i && (t.internalFlags = i & -9), s && (t.leadingComments = Bn(s.slice(), t.leadingComments)), o && (t.trailingComments = Bn(o.slice(), t.trailingComments)), c && (t.commentRange = c), _ && (t.sourceMapRange = _), u && (t.tokenSourceMapRanges = n9e(u, t.tokenSourceMapRanges)), d !== void 0 && (t.constantValue = d), g) + for (const D of g) + t.helpers = sh(t.helpers, D); + return h !== void 0 && (t.startsOnNewLine = h), S !== void 0 && (t.snippetElement = S), T && (t.classThis = T), C && (t.assignedName = C), t; + } + function n9e(e, t) { + t || (t = []); + for (const n in e) + t[n] = e[n]; + return t; + } + function nu(e) { + if (e.emitNode) + E.assert(!(e.emitNode.internalFlags & 8), "Invalid attempt to mutate an immutable node."); + else { + if (WE(e)) { + if (e.kind === 307) + return e.emitNode = { annotatedNodes: [e] }; + const t = xr(Ki(xr(e))) ?? E.fail("Could not determine parsed source file."); + nu(t).annotatedNodes.push(e); + } + e.emitNode = {}; + } + return e.emitNode; + } + function bJ(e) { + var t, n; + const i = (n = (t = xr(Ki(e))) == null ? void 0 : t.emitNode) == null ? void 0 : n.annotatedNodes; + if (i) + for (const s of i) + s.emitNode = void 0; + } + function Q3(e) { + const t = nu(e); + return t.flags |= 3072, t.leadingComments = void 0, t.trailingComments = void 0, e; + } + function Kr(e, t) { + return nu(e).flags = t, e; + } + function cm(e, t) { + const n = nu(e); + return n.flags = n.flags | t, e; + } + function Y3(e, t) { + return nu(e).internalFlags = t, e; + } + function sx(e, t) { + const n = nu(e); + return n.internalFlags = n.internalFlags | t, e; + } + function g0(e) { + var t; + return ((t = e.emitNode) == null ? void 0 : t.sourceMapRange) ?? e; + } + function aa(e, t) { + return nu(e).sourceMapRange = t, e; + } + function p0e(e, t) { + var n, i; + return (i = (n = e.emitNode) == null ? void 0 : n.tokenSourceMapRanges) == null ? void 0 : i[t]; + } + function Oee(e, t, n) { + const i = nu(e), s = i.tokenSourceMapRanges ?? (i.tokenSourceMapRanges = []); + return s[t] = n, e; + } + function $4(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.startsOnNewLine; + } + function O5(e, t) { + return nu(e).startsOnNewLine = t, e; + } + function lm(e) { + var t; + return ((t = e.emitNode) == null ? void 0 : t.commentRange) ?? e; + } + function el(e, t) { + return nu(e).commentRange = t, e; + } + function PC(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.leadingComments; + } + function Z1(e, t) { + return nu(e).leadingComments = t, e; + } + function X4(e, t, n, i) { + return Z1(e, Tr(PC(e), { kind: t, pos: -1, end: -1, hasTrailingNewLine: i, text: n })); + } + function Z3(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.trailingComments; + } + function ax(e, t) { + return nu(e).trailingComments = t, e; + } + function F5(e, t, n, i) { + return ax(e, Tr(Z3(e), { kind: t, pos: -1, end: -1, hasTrailingNewLine: i, text: n })); + } + function Fee(e, t) { + Z1(e, PC(t)), ax(e, Z3(t)); + const n = nu(t); + return n.leadingComments = void 0, n.trailingComments = void 0, e; + } + function Lee(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.constantValue; + } + function Mee(e, t) { + const n = nu(e); + return n.constantValue = t, e; + } + function ox(e, t) { + const n = nu(e); + return n.helpers = Tr(n.helpers, t), e; + } + function vh(e, t) { + if (ut(t)) { + const n = nu(e); + for (const i of t) + n.helpers = sh(n.helpers, i); + } + return e; + } + function d0e(e, t) { + var n; + const i = (n = e.emitNode) == null ? void 0 : n.helpers; + return i ? xE(i, t) : !1; + } + function L5(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.helpers; + } + function Ree(e, t, n) { + const i = e.emitNode, s = i && i.helpers; + if (!ut(s)) return; + const o = nu(t); + let c = 0; + for (let _ = 0; _ < s.length; _++) { + const u = s[_]; + n(u) ? (c++, o.helpers = sh(o.helpers, u)) : c > 0 && (s[_ - c] = u); + } + c > 0 && (s.length -= c); + } + function SJ(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.snippetElement; + } + function TJ(e, t) { + const n = nu(e); + return n.snippetElement = t, e; + } + function xJ(e) { + return nu(e).internalFlags |= 4, e; + } + function jee(e, t) { + const n = nu(e); + return n.typeNode = t, e; + } + function Bee(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.typeNode; + } + function h0(e, t) { + return nu(e).identifierTypeArguments = t, e; + } + function tS(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.identifierTypeArguments; + } + function K3(e, t) { + return nu(e).autoGenerate = t, e; + } + function m0e(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.autoGenerate; + } + function Jee(e, t) { + return nu(e).generatedImportReference = t, e; + } + function zee(e) { + var t; + return (t = e.emitNode) == null ? void 0 : t.generatedImportReference; + } + var Wee = /* @__PURE__ */ ((e) => (e.Field = "f", e.Method = "m", e.Accessor = "a", e))(Wee || {}); + function Vee(e) { + const t = e.factory, n = Wu(() => Y3( + t.createTrue(), + 8 + /* Immutable */ + )), i = Wu(() => Y3( + t.createFalse(), + 8 + /* Immutable */ + )); + return { + getUnscopedHelperName: s, + // TypeScript Helpers + createDecorateHelper: o, + createMetadataHelper: c, + createParamHelper: _, + // ES Decorators Helpers + createESDecorateHelper: D, + createRunInitializersHelper: P, + // ES2018 Helpers + createAssignHelper: O, + createAwaitHelper: j, + createAsyncGeneratorHelper: F, + createAsyncDelegatorHelper: V, + createAsyncValuesHelper: L, + // ES2018 Destructuring Helpers + createRestHelper: $, + // ES2017 Helpers + createAwaiterHelper: U, + // ES2015 Helpers + createExtendsHelper: G, + createTemplateObjectHelper: ce, + createSpreadArrayHelper: K, + createPropKeyHelper: X, + createSetFunctionNameHelper: Z, + // ES2015 Destructuring Helpers + createValuesHelper: oe, + createReadHelper: ne, + // ES2015 Generator Helpers + createGeneratorHelper: pe, + // ES Module Helpers + createImportStarHelper: fe, + createImportStarCallbackHelper: H, + createImportDefaultHelper: ae, + createExportStarHelper: le, + // Class Fields Helpers + createClassPrivateFieldGetHelper: Ae, + createClassPrivateFieldSetHelper: ge, + createClassPrivateFieldInHelper: de, + // 'using' helpers + createAddDisposableResourceHelper: ve, + createDisposeResourcesHelper: De + }; + function s(Xe) { + return Kr( + t.createIdentifier(Xe), + 8196 + /* AdviseOnEmitNode */ + ); + } + function o(Xe, Ie, ye, Fe) { + e.requestEmitHelper(qee); + const Qe = []; + return Qe.push(t.createArrayLiteralExpression( + Xe, + /*multiLine*/ + !0 + )), Qe.push(Ie), ye && (Qe.push(ye), Fe && Qe.push(Fe)), t.createCallExpression( + s("__decorate"), + /*typeArguments*/ + void 0, + Qe + ); + } + function c(Xe, Ie) { + return e.requestEmitHelper(Hee), t.createCallExpression( + s("__metadata"), + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(Xe), + Ie + ] + ); + } + function _(Xe, Ie, ye) { + return e.requestEmitHelper(Gee), ot( + t.createCallExpression( + s("__param"), + /*typeArguments*/ + void 0, + [ + t.createNumericLiteral(Ie + ""), + Xe + ] + ), + ye + ); + } + function u(Xe) { + const Ie = [ + t.createPropertyAssignment(t.createIdentifier("kind"), t.createStringLiteral("class")), + t.createPropertyAssignment(t.createIdentifier("name"), Xe.name), + t.createPropertyAssignment(t.createIdentifier("metadata"), Xe.metadata) + ]; + return t.createObjectLiteralExpression(Ie); + } + function d(Xe) { + const Ie = Xe.computed ? t.createElementAccessExpression(t.createIdentifier("obj"), Xe.name) : t.createPropertyAccessExpression(t.createIdentifier("obj"), Xe.name); + return t.createPropertyAssignment( + "get", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + )], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + Ie + ) + ); + } + function g(Xe) { + const Ie = Xe.computed ? t.createElementAccessExpression(t.createIdentifier("obj"), Xe.name) : t.createPropertyAccessExpression(t.createIdentifier("obj"), Xe.name); + return t.createPropertyAssignment( + "set", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [ + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + ), + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("value") + ) + ], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + Ie, + t.createIdentifier("value") + ) + ) + ]) + ) + ); + } + function h(Xe) { + const Ie = Xe.computed ? Xe.name : Re(Xe.name) ? t.createStringLiteralFromNode(Xe.name) : Xe.name; + return t.createPropertyAssignment( + "has", + t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.createIdentifier("obj") + )], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBinaryExpression( + Ie, + 103, + t.createIdentifier("obj") + ) + ) + ); + } + function S(Xe, Ie) { + const ye = []; + return ye.push(h(Xe)), Ie.get && ye.push(d(Xe)), Ie.set && ye.push(g(Xe)), t.createObjectLiteralExpression(ye); + } + function T(Xe) { + const Ie = [ + t.createPropertyAssignment(t.createIdentifier("kind"), t.createStringLiteral(Xe.kind)), + t.createPropertyAssignment(t.createIdentifier("name"), Xe.name.computed ? Xe.name.name : t.createStringLiteralFromNode(Xe.name.name)), + t.createPropertyAssignment(t.createIdentifier("static"), Xe.static ? t.createTrue() : t.createFalse()), + t.createPropertyAssignment(t.createIdentifier("private"), Xe.private ? t.createTrue() : t.createFalse()), + t.createPropertyAssignment(t.createIdentifier("access"), S(Xe.name, Xe.access)), + t.createPropertyAssignment(t.createIdentifier("metadata"), Xe.metadata) + ]; + return t.createObjectLiteralExpression(Ie); + } + function C(Xe) { + return Xe.kind === "class" ? u(Xe) : T(Xe); + } + function D(Xe, Ie, ye, Fe, Qe, Ke) { + return e.requestEmitHelper($ee), t.createCallExpression( + s("__esDecorate"), + /*typeArguments*/ + void 0, + [ + Xe ?? t.createNull(), + Ie ?? t.createNull(), + ye, + C(Fe), + Qe, + Ke + ] + ); + } + function P(Xe, Ie, ye) { + return e.requestEmitHelper(Xee), t.createCallExpression( + s("__runInitializers"), + /*typeArguments*/ + void 0, + ye ? [Xe, Ie, ye] : [Xe, Ie] + ); + } + function O(Xe) { + return pa(e.getCompilerOptions()) >= 2 ? t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "assign"), + /*typeArguments*/ + void 0, + Xe + ) : (e.requestEmitHelper(Qee), t.createCallExpression( + s("__assign"), + /*typeArguments*/ + void 0, + Xe + )); + } + function j(Xe) { + return e.requestEmitHelper(Q4), t.createCallExpression( + s("__await"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function F(Xe, Ie) { + return e.requestEmitHelper(Q4), e.requestEmitHelper(Yee), (Xe.emitNode || (Xe.emitNode = {})).flags |= 1572864, t.createCallExpression( + s("__asyncGenerator"), + /*typeArguments*/ + void 0, + [ + Ie ? t.createThis() : t.createVoidZero(), + t.createIdentifier("arguments"), + Xe + ] + ); + } + function V(Xe) { + return e.requestEmitHelper(Q4), e.requestEmitHelper(Zee), t.createCallExpression( + s("__asyncDelegator"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function L(Xe) { + return e.requestEmitHelper(Kee), t.createCallExpression( + s("__asyncValues"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function $(Xe, Ie, ye, Fe) { + e.requestEmitHelper(ete); + const Qe = []; + let Ke = 0; + for (let Be = 0; Be < Ie.length - 1; Be++) { + const at = ez(Ie[Be]); + if (at) + if (oa(at)) { + E.assertIsDefined(ye, "Encountered computed property name but 'computedTempVariables' argument was not provided."); + const Wt = ye[Ke]; + Ke++, Qe.push( + t.createConditionalExpression( + t.createTypeCheck(Wt, "symbol"), + /*questionToken*/ + void 0, + Wt, + /*colonToken*/ + void 0, + t.createAdd(Wt, t.createStringLiteral("")) + ) + ); + } else + Qe.push(t.createStringLiteralFromNode(at)); + } + return t.createCallExpression( + s("__rest"), + /*typeArguments*/ + void 0, + [ + Xe, + ot( + t.createArrayLiteralExpression(Qe), + Fe + ) + ] + ); + } + function U(Xe, Ie, ye, Fe, Qe) { + e.requestEmitHelper(tte); + const Ke = t.createFunctionExpression( + /*modifiers*/ + void 0, + t.createToken( + 42 + /* AsteriskToken */ + ), + /*name*/ + void 0, + /*typeParameters*/ + void 0, + Fe ?? [], + /*type*/ + void 0, + Qe + ); + return (Ke.emitNode || (Ke.emitNode = {})).flags |= 1572864, t.createCallExpression( + s("__awaiter"), + /*typeArguments*/ + void 0, + [ + Xe ? t.createThis() : t.createVoidZero(), + Ie ?? t.createVoidZero(), + ye ? lA(t, ye) : t.createVoidZero(), + Ke + ] + ); + } + function G(Xe) { + return e.requestEmitHelper(rte), t.createCallExpression( + s("__extends"), + /*typeArguments*/ + void 0, + [Xe, t.createUniqueName( + "_super", + 48 + /* FileLevel */ + )] + ); + } + function ce(Xe, Ie) { + return e.requestEmitHelper(nte), t.createCallExpression( + s("__makeTemplateObject"), + /*typeArguments*/ + void 0, + [Xe, Ie] + ); + } + function K(Xe, Ie, ye) { + return e.requestEmitHelper(ste), t.createCallExpression( + s("__spreadArray"), + /*typeArguments*/ + void 0, + [Xe, Ie, ye ? n() : i()] + ); + } + function X(Xe) { + return e.requestEmitHelper(ate), t.createCallExpression( + s("__propKey"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function Z(Xe, Ie, ye) { + return e.requestEmitHelper(ote), e.factory.createCallExpression( + s("__setFunctionName"), + /*typeArguments*/ + void 0, + ye ? [Xe, Ie, e.factory.createStringLiteral(ye)] : [Xe, Ie] + ); + } + function oe(Xe) { + return e.requestEmitHelper(cte), t.createCallExpression( + s("__values"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function ne(Xe, Ie) { + return e.requestEmitHelper(ite), t.createCallExpression( + s("__read"), + /*typeArguments*/ + void 0, + Ie !== void 0 ? [Xe, t.createNumericLiteral(Ie + "")] : [Xe] + ); + } + function pe(Xe) { + return e.requestEmitHelper(lte), t.createCallExpression( + s("__generator"), + /*typeArguments*/ + void 0, + [t.createThis(), Xe] + ); + } + function fe(Xe) { + return e.requestEmitHelper(CJ), t.createCallExpression( + s("__importStar"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function H() { + return e.requestEmitHelper(CJ), s("__importStar"); + } + function ae(Xe) { + return e.requestEmitHelper(_te), t.createCallExpression( + s("__importDefault"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + function le(Xe, Ie = t.createIdentifier("exports")) { + return e.requestEmitHelper(fte), e.requestEmitHelper(M5), t.createCallExpression( + s("__exportStar"), + /*typeArguments*/ + void 0, + [Xe, Ie] + ); + } + function Ae(Xe, Ie, ye, Fe) { + e.requestEmitHelper(pte); + let Qe; + return Fe ? Qe = [Xe, Ie, t.createStringLiteral(ye), Fe] : Qe = [Xe, Ie, t.createStringLiteral(ye)], t.createCallExpression( + s("__classPrivateFieldGet"), + /*typeArguments*/ + void 0, + Qe + ); + } + function ge(Xe, Ie, ye, Fe, Qe) { + e.requestEmitHelper(dte); + let Ke; + return Qe ? Ke = [Xe, Ie, ye, t.createStringLiteral(Fe), Qe] : Ke = [Xe, Ie, ye, t.createStringLiteral(Fe)], t.createCallExpression( + s("__classPrivateFieldSet"), + /*typeArguments*/ + void 0, + Ke + ); + } + function de(Xe, Ie) { + return e.requestEmitHelper(mte), t.createCallExpression( + s("__classPrivateFieldIn"), + /*typeArguments*/ + void 0, + [Xe, Ie] + ); + } + function ve(Xe, Ie, ye) { + return e.requestEmitHelper(gte), t.createCallExpression( + s("__addDisposableResource"), + /*typeArguments*/ + void 0, + [Xe, Ie, ye ? t.createTrue() : t.createFalse()] + ); + } + function De(Xe) { + return e.requestEmitHelper(hte), t.createCallExpression( + s("__disposeResources"), + /*typeArguments*/ + void 0, + [Xe] + ); + } + } + function Uee(e, t) { + return e === t || e.priority === t.priority ? 0 : e.priority === void 0 ? 1 : t.priority === void 0 ? -1 : uo(e.priority, t.priority); + } + function kJ(e, ...t) { + return (n) => { + let i = ""; + for (let s = 0; s < t.length; s++) + i += e[s], i += n(t[s]); + return i += e[e.length - 1], i; + }; + } + var qee = { + name: "typescript:decorate", + importName: "__decorate", + scoped: !1, + priority: 2, + text: ` + var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + };` + }, Hee = { + name: "typescript:metadata", + importName: "__metadata", + scoped: !1, + priority: 3, + text: ` + var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + };` + }, Gee = { + name: "typescript:param", + importName: "__param", + scoped: !1, + priority: 4, + text: ` + var __param = (this && this.__param) || function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + };` + }, $ee = { + name: "typescript:esDecorate", + importName: "__esDecorate", + scoped: !1, + priority: 2, + text: ` + var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _, done = false; + for (var i = decorators.length - 1; i >= 0; i--) { + var context = {}; + for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; + for (var p in contextIn.access) context.access[p] = contextIn.access[p]; + context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; + var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) continue; + if (result === null || typeof result !== "object") throw new TypeError("Object expected"); + if (_ = accept(result.get)) descriptor.get = _; + if (_ = accept(result.set)) descriptor.set = _; + if (_ = accept(result.init)) initializers.unshift(_); + } + else if (_ = accept(result)) { + if (kind === "field") initializers.unshift(_); + else descriptor[key] = _; + } + } + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + };` + }, Xee = { + name: "typescript:runInitializers", + importName: "__runInitializers", + scoped: !1, + priority: 2, + text: ` + var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i = 0; i < initializers.length; i++) { + value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); + } + return useValue ? value : void 0; + };` + }, Qee = { + name: "typescript:assign", + importName: "__assign", + scoped: !1, + priority: 1, + text: ` + var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); + };` + }, Q4 = { + name: "typescript:await", + importName: "__await", + scoped: !1, + text: ` + var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }` + }, Yee = { + name: "typescript:asyncGenerator", + importName: "__asyncGenerator", + scoped: !1, + dependencies: [Q4], + text: ` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };` + }, Zee = { + name: "typescript:asyncDelegator", + importName: "__asyncDelegator", + scoped: !1, + dependencies: [Q4], + text: ` + var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } + };` + }, Kee = { + name: "typescript:asyncValues", + importName: "__asyncValues", + scoped: !1, + text: ` + var __asyncValues = (this && this.__asyncValues) || function (o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } + };` + }, ete = { + name: "typescript:rest", + importName: "__rest", + scoped: !1, + text: ` + var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; + };` + }, tte = { + name: "typescript:awaiter", + importName: "__awaiter", + scoped: !1, + priority: 5, + text: ` + var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + };` + }, rte = { + name: "typescript:extends", + importName: "__extends", + scoped: !1, + priority: 0, + text: ` + var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + })();` + }, nte = { + name: "typescript:makeTemplateObject", + importName: "__makeTemplateObject", + scoped: !1, + priority: 0, + text: ` + var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + };` + }, ite = { + name: "typescript:read", + importName: "__read", + scoped: !1, + text: ` + var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + };` + }, ste = { + name: "typescript:spreadArray", + importName: "__spreadArray", + scoped: !1, + text: ` + var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + };` + }, ate = { + name: "typescript:propKey", + importName: "__propKey", + scoped: !1, + text: ` + var __propKey = (this && this.__propKey) || function (x) { + return typeof x === "symbol" ? x : "".concat(x); + };` + }, ote = { + name: "typescript:setFunctionName", + importName: "__setFunctionName", + scoped: !1, + text: ` + var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + };` + }, cte = { + name: "typescript:values", + importName: "__values", + scoped: !1, + text: ` + var __values = (this && this.__values) || function(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + };` + }, lte = { + name: "typescript:generator", + importName: "__generator", + scoped: !1, + priority: 6, + text: ` + var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + };` + }, M5 = { + name: "typescript:commonjscreatebinding", + importName: "__createBinding", + scoped: !1, + priority: 1, + text: ` + var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }));` + }, ute = { + name: "typescript:commonjscreatevalue", + importName: "__setModuleDefault", + scoped: !1, + priority: 1, + text: ` + var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + });` + }, CJ = { + name: "typescript:commonjsimportstar", + importName: "__importStar", + scoped: !1, + dependencies: [M5, ute], + priority: 2, + text: ` + var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; + };` + }, _te = { + name: "typescript:commonjsimportdefault", + importName: "__importDefault", + scoped: !1, + text: ` + var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + };` + }, fte = { + name: "typescript:export-star", + importName: "__exportStar", + scoped: !1, + dependencies: [M5], + priority: 2, + text: ` + var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + };` + }, pte = { + name: "typescript:classPrivateFieldGet", + importName: "__classPrivateFieldGet", + scoped: !1, + text: ` + var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + };` + }, dte = { + name: "typescript:classPrivateFieldSet", + importName: "__classPrivateFieldSet", + scoped: !1, + text: ` + var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + };` + }, mte = { + name: "typescript:classPrivateFieldIn", + importName: "__classPrivateFieldIn", + scoped: !1, + text: ` + var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) { + if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + };` + }, gte = { + name: "typescript:addDisposableResource", + importName: "__addDisposableResource", + scoped: !1, + text: ` + var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose, inner; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + if (async) inner = dispose; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } }; + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + };` + }, hte = { + name: "typescript:disposeResources", + importName: "__disposeResources", + scoped: !1, + text: ` + var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; + });` + }, R5 = { + name: "typescript:async-super", + scoped: !0, + text: kJ` + const ${"_superIndex"} = name => super[name];` + }, j5 = { + name: "typescript:advanced-async-super", + scoped: !0, + text: kJ` + const ${"_superIndex"} = (function (geti, seti) { + const cache = Object.create(null); + return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); + })(name => super[name], (name, value) => super[name] = value);` + }; + function Y4(e, t) { + return Es(e) && Re(e.expression) && (ua(e.expression) & 8192) !== 0 && e.expression.escapedText === t; + } + function m_(e) { + return e.kind === 9; + } + function eA(e) { + return e.kind === 10; + } + function Ks(e) { + return e.kind === 11; + } + function cx(e) { + return e.kind === 12; + } + function EJ(e) { + return e.kind === 14; + } + function lx(e) { + return e.kind === 15; + } + function ux(e) { + return e.kind === 16; + } + function DJ(e) { + return e.kind === 17; + } + function B5(e) { + return e.kind === 18; + } + function J5(e) { + return e.kind === 26; + } + function yte(e) { + return e.kind === 28; + } + function PJ(e) { + return e.kind === 40; + } + function wJ(e) { + return e.kind === 41; + } + function tA(e) { + return e.kind === 42; + } + function rA(e) { + return e.kind === 54; + } + function xy(e) { + return e.kind === 58; + } + function vte(e) { + return e.kind === 59; + } + function z5(e) { + return e.kind === 29; + } + function bte(e) { + return e.kind === 39; + } + function Re(e) { + return e.kind === 80; + } + function wi(e) { + return e.kind === 81; + } + function _x(e) { + return e.kind === 95; + } + function W5(e) { + return e.kind === 90; + } + function Z4(e) { + return e.kind === 134; + } + function Ste(e) { + return e.kind === 131; + } + function AJ(e) { + return e.kind === 135; + } + function Tte(e) { + return e.kind === 148; + } + function fx(e) { + return e.kind === 126; + } + function xte(e) { + return e.kind === 128; + } + function kte(e) { + return e.kind === 164; + } + function Cte(e) { + return e.kind === 129; + } + function K4(e) { + return e.kind === 108; + } + function eD(e) { + return e.kind === 102; + } + function Ete(e) { + return e.kind === 84; + } + function $u(e) { + return e.kind === 166; + } + function oa(e) { + return e.kind === 167; + } + function Mo(e) { + return e.kind === 168; + } + function ji(e) { + return e.kind === 169; + } + function dl(e) { + return e.kind === 170; + } + function I_(e) { + return e.kind === 171; + } + function rs(e) { + return e.kind === 172; + } + function um(e) { + return e.kind === 173; + } + function hc(e) { + return e.kind === 174; + } + function ac(e) { + return e.kind === 175; + } + function ec(e) { + return e.kind === 176; + } + function Af(e) { + return e.kind === 177; + } + function rf(e) { + return e.kind === 178; + } + function px(e) { + return e.kind === 179; + } + function nA(e) { + return e.kind === 180; + } + function Pb(e) { + return e.kind === 181; + } + function dx(e) { + return e.kind === 182; + } + function Nf(e) { + return e.kind === 183; + } + function Xm(e) { + return e.kind === 184; + } + function wC(e) { + return e.kind === 185; + } + function wb(e) { + return e.kind === 186; + } + function Xu(e) { + return e.kind === 187; + } + function iA(e) { + return e.kind === 188; + } + function mx(e) { + return e.kind === 189; + } + function AC(e) { + return e.kind === 202; + } + function V5(e) { + return e.kind === 190; + } + function U5(e) { + return e.kind === 191; + } + function ky(e) { + return e.kind === 192; + } + function gx(e) { + return e.kind === 193; + } + function Ab(e) { + return e.kind === 194; + } + function rS(e) { + return e.kind === 195; + } + function nS(e) { + return e.kind === 196; + } + function NC(e) { + return e.kind === 197; + } + function K1(e) { + return e.kind === 198; + } + function Nb(e) { + return e.kind === 199; + } + function iS(e) { + return e.kind === 200; + } + function y0(e) { + return e.kind === 201; + } + function Qm(e) { + return e.kind === 205; + } + function NJ(e) { + return e.kind === 204; + } + function Dte(e) { + return e.kind === 203; + } + function If(e) { + return e.kind === 206; + } + function v0(e) { + return e.kind === 207; + } + function da(e) { + return e.kind === 208; + } + function Wl(e) { + return e.kind === 209; + } + function Gs(e) { + return e.kind === 210; + } + function Dn(e) { + return e.kind === 211; + } + function ho(e) { + return e.kind === 212; + } + function Es(e) { + return e.kind === 213; + } + function Ib(e) { + return e.kind === 214; + } + function Ob(e) { + return e.kind === 215; + } + function IJ(e) { + return e.kind === 216; + } + function Qu(e) { + return e.kind === 217; + } + function po(e) { + return e.kind === 218; + } + function xo(e) { + return e.kind === 219; + } + function Pte(e) { + return e.kind === 220; + } + function IC(e) { + return e.kind === 221; + } + function hx(e) { + return e.kind === 222; + } + function Cy(e) { + return e.kind === 223; + } + function Ey(e) { + return e.kind === 224; + } + function OJ(e) { + return e.kind === 225; + } + function cn(e) { + return e.kind === 226; + } + function yx(e) { + return e.kind === 227; + } + function q5(e) { + return e.kind === 228; + } + function H5(e) { + return e.kind === 229; + } + function cp(e) { + return e.kind === 230; + } + function tl(e) { + return e.kind === 231; + } + function ml(e) { + return e.kind === 232; + } + function bh(e) { + return e.kind === 233; + } + function tD(e) { + return e.kind === 234; + } + function G5(e) { + return e.kind === 238; + } + function vx(e) { + return e.kind === 235; + } + function rD(e) { + return e.kind === 236; + } + function g0e(e) { + return e.kind === 237; + } + function $5(e) { + return e.kind === 354; + } + function nD(e) { + return e.kind === 355; + } + function iD(e) { + return e.kind === 239; + } + function wte(e) { + return e.kind === 240; + } + function ms(e) { + return e.kind === 241; + } + function yc(e) { + return e.kind === 243; + } + function FJ(e) { + return e.kind === 242; + } + function Pl(e) { + return e.kind === 244; + } + function ev(e) { + return e.kind === 245; + } + function h0e(e) { + return e.kind === 246; + } + function LJ(e) { + return e.kind === 247; + } + function tv(e) { + return e.kind === 248; + } + function X5(e) { + return e.kind === 249; + } + function sA(e) { + return e.kind === 250; + } + function y0e(e) { + return e.kind === 251; + } + function v0e(e) { + return e.kind === 252; + } + function Mp(e) { + return e.kind === 253; + } + function Ate(e) { + return e.kind === 254; + } + function sD(e) { + return e.kind === 255; + } + function Dy(e) { + return e.kind === 256; + } + function MJ(e) { + return e.kind === 257; + } + function sS(e) { + return e.kind === 258; + } + function b0e(e) { + return e.kind === 259; + } + function ti(e) { + return e.kind === 260; + } + function Il(e) { + return e.kind === 261; + } + function Ac(e) { + return e.kind === 262; + } + function rl(e) { + return e.kind === 263; + } + function Vl(e) { + return e.kind === 264; + } + function Rp(e) { + return e.kind === 265; + } + function rv(e) { + return e.kind === 266; + } + function Nc(e) { + return e.kind === 267; + } + function _m(e) { + return e.kind === 268; + } + function aD(e) { + return e.kind === 269; + } + function aA(e) { + return e.kind === 270; + } + function nl(e) { + return e.kind === 271; + } + function oc(e) { + return e.kind === 272; + } + function kd(e) { + return e.kind === 273; + } + function S0e(e) { + return e.kind === 302; + } + function Nte(e) { + return e.kind === 300; + } + function T0e(e) { + return e.kind === 301; + } + function aS(e) { + return e.kind === 300; + } + function Ite(e) { + return e.kind === 301; + } + function Rg(e) { + return e.kind === 274; + } + function Ym(e) { + return e.kind === 280; + } + function fm(e) { + return e.kind === 275; + } + function Yu(e) { + return e.kind === 276; + } + function ko(e) { + return e.kind === 277; + } + function Ic(e) { + return e.kind === 278; + } + function lp(e) { + return e.kind === 279; + } + function pu(e) { + return e.kind === 281; + } + function x0e(e) { + return e.kind === 282; + } + function RJ(e) { + return e.kind === 353; + } + function bx(e) { + return e.kind === 356; + } + function Sh(e) { + return e.kind === 283; + } + function jg(e) { + return e.kind === 284; + } + function oS(e) { + return e.kind === 285; + } + function pm(e) { + return e.kind === 286; + } + function Fb(e) { + return e.kind === 287; + } + function Lb(e) { + return e.kind === 288; + } + function cS(e) { + return e.kind === 289; + } + function Ote(e) { + return e.kind === 290; + } + function dm(e) { + return e.kind === 291; + } + function Mb(e) { + return e.kind === 292; + } + function Sx(e) { + return e.kind === 293; + } + function oD(e) { + return e.kind === 294; + } + function Cd(e) { + return e.kind === 295; + } + function OC(e) { + return e.kind === 296; + } + function cD(e) { + return e.kind === 297; + } + function nf(e) { + return e.kind === 298; + } + function Rb(e) { + return e.kind === 299; + } + function qc(e) { + return e.kind === 303; + } + function du(e) { + return e.kind === 304; + } + function Bg(e) { + return e.kind === 305; + } + function Py(e) { + return e.kind === 306; + } + function yi(e) { + return e.kind === 307; + } + function Fte(e) { + return e.kind === 308; + } + function nv(e) { + return e.kind === 309; + } + function lD(e) { + return e.kind === 310; + } + function iv(e) { + return e.kind === 311; + } + function Lte(e) { + return e.kind === 324; + } + function Mte(e) { + return e.kind === 325; + } + function k0e(e) { + return e.kind === 326; + } + function Rte(e) { + return e.kind === 312; + } + function jte(e) { + return e.kind === 313; + } + function FC(e) { + return e.kind === 314; + } + function Q5(e) { + return e.kind === 315; + } + function jJ(e) { + return e.kind === 316; + } + function LC(e) { + return e.kind === 317; + } + function Y5(e) { + return e.kind === 318; + } + function C0e(e) { + return e.kind === 319; + } + function Ed(e) { + return e.kind === 320; + } + function lS(e) { + return e.kind === 322; + } + function Th(e) { + return e.kind === 323; + } + function Tx(e) { + return e.kind === 328; + } + function E0e(e) { + return e.kind === 330; + } + function Bte(e) { + return e.kind === 332; + } + function BJ(e) { + return e.kind === 338; + } + function JJ(e) { + return e.kind === 333; + } + function zJ(e) { + return e.kind === 334; + } + function WJ(e) { + return e.kind === 335; + } + function VJ(e) { + return e.kind === 336; + } + function Z5(e) { + return e.kind === 337; + } + function MC(e) { + return e.kind === 339; + } + function UJ(e) { + return e.kind === 331; + } + function D0e(e) { + return e.kind === 347; + } + function oA(e) { + return e.kind === 340; + } + function up(e) { + return e.kind === 341; + } + function K5(e) { + return e.kind === 342; + } + function qJ(e) { + return e.kind === 343; + } + function uD(e) { + return e.kind === 344; + } + function jp(e) { + return e.kind === 345; + } + function uS(e) { + return e.kind === 346; + } + function P0e(e) { + return e.kind === 327; + } + function Jte(e) { + return e.kind === 348; + } + function eO(e) { + return e.kind === 329; + } + function tO(e) { + return e.kind === 350; + } + function w0e(e) { + return e.kind === 349; + } + function Jg(e) { + return e.kind === 351; + } + function RC(e) { + return e.kind === 352; + } + var zte = /* @__PURE__ */ new WeakMap(); + function HJ(e) { + return ww(e.kind) ? zte.get(e) : He; + } + function rO(e, t) { + return zte.set(e, t), t; + } + function GJ(e) { + zte.delete(e); + } + function cA(e) { + return e.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + e.createNamedExports([]), + /*moduleSpecifier*/ + void 0 + ); + } + function _S(e, t, n, i) { + if (oa(n)) + return ot(e.createElementAccessExpression(t, n.expression), i); + { + const s = ot( + Dg(n) ? e.createPropertyAccessExpression(t, n) : e.createElementAccessExpression(t, n), + n + ); + return cm( + s, + 128 + /* NoNestedSourceMaps */ + ), s; + } + } + function Wte(e, t) { + const n = av.createIdentifier(e || "React"); + return Da(n, Ki(t)), n; + } + function Vte(e, t, n) { + if ($u(t)) { + const i = Vte(e, t.left, n), s = e.createIdentifier(dn(t.right)); + return s.escapedText = t.right.escapedText, e.createPropertyAccessExpression(i, s); + } else + return Wte(dn(t), n); + } + function $J(e, t, n, i) { + return t ? Vte(e, t, i) : e.createPropertyAccessExpression( + Wte(n, i), + "createElement" + ); + } + function i9e(e, t, n, i) { + return t ? Vte(e, t, i) : e.createPropertyAccessExpression( + Wte(n, i), + "Fragment" + ); + } + function Ute(e, t, n, i, s, o) { + const c = [n]; + if (i && c.push(i), s && s.length > 0) + if (i || c.push(e.createNull()), s.length > 1) + for (const _ of s) + mu(_), c.push(_); + else + c.push(s[0]); + return ot( + e.createCallExpression( + t, + /*typeArguments*/ + void 0, + c + ), + o + ); + } + function qte(e, t, n, i, s, o, c) { + const u = [i9e(e, n, i, o), e.createNull()]; + if (s && s.length > 0) + if (s.length > 1) + for (const d of s) + mu(d), u.push(d); + else + u.push(s[0]); + return ot( + e.createCallExpression( + $J(e, t, i, o), + /*typeArguments*/ + void 0, + u + ), + c + ); + } + function XJ(e, t, n) { + if (Il(t)) { + const i = fa(t.declarations), s = e.updateVariableDeclaration( + i, + i.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n + ); + return ot( + e.createVariableStatement( + /*modifiers*/ + void 0, + e.updateVariableDeclarationList(t, [s]) + ), + /*location*/ + t + ); + } else { + const i = ot( + e.createAssignment(t, n), + /*location*/ + t + ); + return ot( + e.createExpressionStatement(i), + /*location*/ + t + ); + } + } + function A0e(e, t, n) { + return ms(t) ? e.updateBlock(t, ot(e.createNodeArray([n, ...t.statements]), t.statements)) : e.createBlock( + e.createNodeArray([t, n]), + /*multiLine*/ + !0 + ); + } + function lA(e, t) { + if ($u(t)) { + const n = lA(e, t.left), i = Da(ot(e.cloneNode(t.right), t.right), t.right.parent); + return ot(e.createPropertyAccessExpression(n, i), t); + } else + return Da(ot(e.cloneNode(t), t), t.parent); + } + function QJ(e, t) { + return Re(t) ? e.createStringLiteralFromNode(t) : oa(t) ? Da(ot(e.cloneNode(t.expression), t.expression), t.expression.parent) : Da(ot(e.cloneNode(t), t), t.parent); + } + function s9e(e, t, n, i, s) { + const { firstAccessor: o, getAccessor: c, setAccessor: _ } = gy(t, n); + if (n === o) + return ot( + e.createObjectDefinePropertyCall( + i, + QJ(e, n.name), + e.createPropertyDescriptor({ + enumerable: e.createFalse(), + configurable: !0, + get: c && ot( + kn( + e.createFunctionExpression( + sb(c), + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + c.parameters, + /*type*/ + void 0, + c.body + // TODO: GH#18217 + ), + c + ), + c + ), + set: _ && ot( + kn( + e.createFunctionExpression( + sb(_), + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + _.parameters, + /*type*/ + void 0, + _.body + // TODO: GH#18217 + ), + _ + ), + _ + ) + }, !s) + ), + o + ); + } + function a9e(e, t, n) { + return kn( + ot( + e.createAssignment( + _S( + e, + n, + t.name, + /*location*/ + t.name + ), + t.initializer + ), + t + ), + t + ); + } + function o9e(e, t, n) { + return kn( + ot( + e.createAssignment( + _S( + e, + n, + t.name, + /*location*/ + t.name + ), + e.cloneNode(t.name) + ), + /*location*/ + t + ), + /*original*/ + t + ); + } + function c9e(e, t, n) { + return kn( + ot( + e.createAssignment( + _S( + e, + n, + t.name, + /*location*/ + t.name + ), + kn( + ot( + e.createFunctionExpression( + sb(t), + t.asteriskToken, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + t.parameters, + /*type*/ + void 0, + t.body + // TODO: GH#18217 + ), + /*location*/ + t + ), + /*original*/ + t + ) + ), + /*location*/ + t + ), + /*original*/ + t + ); + } + function Hte(e, t, n, i) { + switch (n.name && wi(n.name) && E.failBadSyntaxKind(n.name, "Private identifiers are not allowed in object literals."), n.kind) { + case 177: + case 178: + return s9e(e, t.properties, n, i, !!t.multiLine); + case 303: + return a9e(e, n, i); + case 304: + return o9e(e, n, i); + case 174: + return c9e(e, n, i); + } + } + function nO(e, t, n, i, s) { + const o = t.operator; + E.assert(o === 46 || o === 47, "Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression"); + const c = e.createTempVariable(i); + n = e.createAssignment(c, n), ot(n, t.operand); + let _ = Ey(t) ? e.createPrefixUnaryExpression(o, c) : e.createPostfixUnaryExpression(c, o); + return ot(_, t), s && (_ = e.createAssignment(s, _), ot(_, t)), n = e.createComma(n, _), ot(n, t), OJ(t) && (n = e.createComma(n, c), ot(n, t)), n; + } + function YJ(e) { + return (ua(e) & 65536) !== 0; + } + function xh(e) { + return (ua(e) & 32768) !== 0; + } + function iO(e) { + return (ua(e) & 16384) !== 0; + } + function N0e(e) { + return Ks(e.expression) && e.expression.text === "use strict"; + } + function ZJ(e) { + for (const t of e) + if (Kd(t)) { + if (N0e(t)) + return t; + } else + break; + } + function Gte(e) { + const t = ul(e); + return t !== void 0 && Kd(t) && N0e(t); + } + function uA(e) { + return e.kind === 226 && e.operatorToken.kind === 28; + } + function _D(e) { + return uA(e) || nD(e); + } + function fS(e) { + return Qu(e) && Qr(e) && !!M1(e); + } + function fD(e) { + const t = R1(e); + return E.assertIsDefined(t), t; + } + function sO(e, t = 15) { + switch (e.kind) { + case 217: + return t & 16 && fS(e) ? !1 : (t & 1) !== 0; + case 216: + case 234: + case 233: + case 238: + return (t & 2) !== 0; + case 235: + return (t & 4) !== 0; + case 354: + return (t & 8) !== 0; + } + return !1; + } + function Bc(e, t = 15) { + for (; sO(e, t); ) + e = e.expression; + return e; + } + function $te(e, t = 15) { + let n = e.parent; + for (; sO(n, t); ) + n = n.parent, E.assert(n); + return n; + } + function I0e(e) { + return Bc( + e, + 6 + /* Assertions */ + ); + } + function mu(e) { + return O5( + e, + /*newLine*/ + !0 + ); + } + function aO(e) { + const t = Zo(e, yi), n = t && t.emitNode; + return n && n.externalHelpersModuleName; + } + function Xte(e) { + const t = Zo(e, yi), n = t && t.emitNode; + return !!n && (!!n.externalHelpersModuleName || !!n.externalHelpers); + } + function KJ(e, t, n, i, s, o, c) { + if (i.importHelpers && NT(n, i)) { + let _; + const u = Nu(i); + if (u >= 5 && u <= 99 || n.impliedNodeFormat === 99) { + const d = L5(n); + if (d) { + const g = []; + for (const h of d) + if (!h.scoped) { + const S = h.importName; + S && Zf(g, S); + } + if (ut(g)) { + g.sort(Kl), _ = e.createNamedImports( + or(g, (T) => n7(n, T) ? e.createImportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + e.createIdentifier(T) + ) : e.createImportSpecifier( + /*isTypeOnly*/ + !1, + e.createIdentifier(T), + t.getUnscopedHelperName(T) + )) + ); + const h = Zo(n, yi), S = nu(h); + S.externalHelpers = !0; + } + } + } else { + const d = Qte(e, n, i, s, o || c); + d && (_ = e.createNamespaceImport(d)); + } + if (_) { + const d = e.createImportDeclaration( + /*modifiers*/ + void 0, + e.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + _ + ), + e.createStringLiteral(z1), + /*attributes*/ + void 0 + ); + return sx( + d, + 2 + /* NeverApplyImportHelper */ + ), d; + } + } + } + function Qte(e, t, n, i, s) { + if (n.importHelpers && NT(t, n)) { + const o = aO(t); + if (o) + return o; + const c = Nu(n); + let _ = (i || Fg(n) && s) && c !== 4 && (c < 5 || t.impliedNodeFormat === 1); + if (!_) { + const u = L5(t); + if (u) { + for (const d of u) + if (!d.scoped) { + _ = !0; + break; + } + } + } + if (_) { + const u = Zo(t, yi), d = nu(u); + return d.externalHelpersModuleName || (d.externalHelpersModuleName = e.createUniqueName(z1)); + } + } + } + function jC(e, t, n) { + const i = uC(t); + if (i && !jT(t) && !s7(t)) { + const s = i.name; + return Fo(s) ? s : e.createIdentifier(ub(n, s) || dn(s)); + } + if (t.kind === 272 && t.importClause || t.kind === 278 && t.moduleSpecifier) + return e.getGeneratedNameForNode(t); + } + function xx(e, t, n, i, s, o) { + const c = RT(t); + if (c && Ks(c)) + return u9e(t, i, e, s, o) || l9e(e, c, n) || e.cloneNode(c); + } + function l9e(e, t, n) { + const i = n.renamedDependencies && n.renamedDependencies.get(t.text); + return i ? e.createStringLiteral(i) : void 0; + } + function _A(e, t, n, i) { + if (t) { + if (t.moduleName) + return e.createStringLiteral(t.moduleName); + if (!t.isDeclarationFile && i.outFile) + return e.createStringLiteral(CB(n, t.fileName)); + } + } + function u9e(e, t, n, i, s) { + return _A(n, i.getExternalModuleFileFromDeclaration(e), t, s); + } + function fA(e) { + if (Nw(e)) + return e.initializer; + if (qc(e)) { + const t = e.initializer; + return Tl( + t, + /*excludeCompoundAssignment*/ + !0 + ) ? t.right : void 0; + } + if (du(e)) + return e.objectAssignmentInitializer; + if (Tl( + e, + /*excludeCompoundAssignment*/ + !0 + )) + return e.right; + if (cp(e)) + return fA(e.expression); + } + function wy(e) { + if (Nw(e)) + return e.name; + if (lh(e)) { + switch (e.kind) { + case 303: + return wy(e.initializer); + case 304: + return e.name; + case 305: + return wy(e.expression); + } + return; + } + return Tl( + e, + /*excludeCompoundAssignment*/ + !0 + ) ? wy(e.left) : cp(e) ? wy(e.expression) : e; + } + function oO(e) { + switch (e.kind) { + case 169: + case 208: + return e.dotDotDotToken; + case 230: + case 305: + return e; + } + } + function ez(e) { + const t = cO(e); + return E.assert(!!t || Bg(e), "Invalid property name for binding element."), t; + } + function cO(e) { + switch (e.kind) { + case 208: + if (e.propertyName) { + const n = e.propertyName; + return wi(n) ? E.failBadSyntaxKind(n) : oa(n) && O0e(n.expression) ? n.expression : n; + } + break; + case 303: + if (e.name) { + const n = e.name; + return wi(n) ? E.failBadSyntaxKind(n) : oa(n) && O0e(n.expression) ? n.expression : n; + } + break; + case 305: + return e.name && wi(e.name) ? E.failBadSyntaxKind(e.name) : e.name; + } + const t = wy(e); + if (t && Rc(t)) + return t; + } + function O0e(e) { + const t = e.kind; + return t === 11 || t === 9; + } + function BC(e) { + switch (e.kind) { + case 206: + case 207: + case 209: + return e.elements; + case 210: + return e.properties; + } + } + function tz(e) { + if (e) { + let t = e; + for (; ; ) { + if (Re(t) || !t.body) + return Re(t) ? t : t.name; + t = t.body; + } + } + } + function F0e(e) { + const t = e.kind; + return t === 176 || t === 178; + } + function Yte(e) { + const t = e.kind; + return t === 176 || t === 177 || t === 178; + } + function rz(e) { + const t = e.kind; + return t === 303 || t === 304 || t === 262 || t === 176 || t === 181 || t === 175 || t === 282 || t === 243 || t === 264 || t === 265 || t === 266 || t === 267 || t === 271 || t === 272 || t === 270 || t === 278 || t === 277; + } + function Zte(e) { + const t = e.kind; + return t === 175 || t === 303 || t === 304 || t === 282 || t === 270; + } + function Kte(e) { + return xy(e) || rA(e); + } + function ere(e) { + return Re(e) || NC(e); + } + function tre(e) { + return Tte(e) || PJ(e) || wJ(e); + } + function rre(e) { + return xy(e) || PJ(e) || wJ(e); + } + function nre(e) { + return Re(e) || Ks(e); + } + function L0e(e) { + const t = e.kind; + return t === 106 || t === 112 || t === 97 || ob(e) || Ey(e); + } + function _9e(e) { + return e === 43; + } + function f9e(e) { + return e === 42 || e === 44 || e === 45; + } + function p9e(e) { + return _9e(e) || f9e(e); + } + function d9e(e) { + return e === 40 || e === 41; + } + function m9e(e) { + return d9e(e) || p9e(e); + } + function g9e(e) { + return e === 48 || e === 49 || e === 50; + } + function nz(e) { + return g9e(e) || m9e(e); + } + function h9e(e) { + return e === 30 || e === 33 || e === 32 || e === 34 || e === 104 || e === 103; + } + function y9e(e) { + return h9e(e) || nz(e); + } + function v9e(e) { + return e === 35 || e === 37 || e === 36 || e === 38; + } + function b9e(e) { + return v9e(e) || y9e(e); + } + function S9e(e) { + return e === 51 || e === 52 || e === 53; + } + function T9e(e) { + return S9e(e) || b9e(e); + } + function x9e(e) { + return e === 56 || e === 57; + } + function k9e(e) { + return x9e(e) || T9e(e); + } + function C9e(e) { + return e === 61 || k9e(e) || dh(e); + } + function E9e(e) { + return C9e(e) || e === 28; + } + function ire(e) { + return E9e(e.kind); + } + var iz; + ((e) => { + function t(g, h, S, T, C, D, P) { + const O = h > 0 ? C[h - 1] : void 0; + return E.assertEqual(S[h], t), C[h] = g.onEnter(T[h], O, P), S[h] = _(g, t), h; + } + e.enter = t; + function n(g, h, S, T, C, D, P) { + E.assertEqual(S[h], n), E.assertIsDefined(g.onLeft), S[h] = _(g, n); + const O = g.onLeft(T[h].left, C[h], T[h]); + return O ? (d(h, T, O), u(h, S, T, C, O)) : h; + } + e.left = n; + function i(g, h, S, T, C, D, P) { + return E.assertEqual(S[h], i), E.assertIsDefined(g.onOperator), S[h] = _(g, i), g.onOperator(T[h].operatorToken, C[h], T[h]), h; + } + e.operator = i; + function s(g, h, S, T, C, D, P) { + E.assertEqual(S[h], s), E.assertIsDefined(g.onRight), S[h] = _(g, s); + const O = g.onRight(T[h].right, C[h], T[h]); + return O ? (d(h, T, O), u(h, S, T, C, O)) : h; + } + e.right = s; + function o(g, h, S, T, C, D, P) { + E.assertEqual(S[h], o), S[h] = _(g, o); + const O = g.onExit(T[h], C[h]); + if (h > 0) { + if (h--, g.foldState) { + const j = S[h] === o ? "right" : "left"; + C[h] = g.foldState(C[h], O, j); + } + } else + D.value = O; + return h; + } + e.exit = o; + function c(g, h, S, T, C, D, P) { + return E.assertEqual(S[h], c), h; + } + e.done = c; + function _(g, h) { + switch (h) { + case t: + if (g.onLeft) return n; + case n: + if (g.onOperator) return i; + case i: + if (g.onRight) return s; + case s: + return o; + case o: + return c; + case c: + return c; + default: + E.fail("Invalid state"); + } + } + e.nextState = _; + function u(g, h, S, T, C) { + return g++, h[g] = t, S[g] = C, T[g] = void 0, g; + } + function d(g, h, S) { + if (E.shouldAssert( + 2 + /* Aggressive */ + )) + for (; g >= 0; ) + E.assert(h[g] !== S, "Circular traversal detected."), g--; + } + })(iz || (iz = {})); + var D9e = class { + constructor(e, t, n, i, s, o) { + this.onEnter = e, this.onLeft = t, this.onOperator = n, this.onRight = i, this.onExit = s, this.foldState = o; + } + }; + function lO(e, t, n, i, s, o) { + const c = new D9e(e, t, n, i, s, o); + return _; + function _(u, d) { + const g = { value: void 0 }, h = [iz.enter], S = [u], T = [void 0]; + let C = 0; + for (; h[C] !== iz.done; ) + C = h[C](c, C, h, S, T, g, d); + return E.assertEqual(C, 0), g.value; + } + } + function M0e(e) { + return e === 95 || e === 90; + } + function pA(e) { + const t = e.kind; + return M0e(t); + } + function R0e(e) { + const t = e.kind; + return r0(t) && !M0e(t); + } + function sre(e, t) { + if (t !== void 0) + return t.length === 0 ? t : ot(e.createNodeArray([], t.hasTrailingComma), t); + } + function dA(e) { + var t; + const n = e.emitNode.autoGenerate; + if (n.flags & 4) { + const i = n.id; + let s = e, o = s.original; + for (; o; ) { + s = o; + const c = (t = s.emitNode) == null ? void 0 : t.autoGenerate; + if (Dg(s) && (c === void 0 || c.flags & 4 && c.id !== i)) + break; + o = s.original; + } + return s; + } + return e; + } + function JC(e, t) { + return typeof e == "object" ? sv( + /*privateName*/ + !1, + e.prefix, + e.node, + e.suffix, + t + ) : typeof e == "string" ? e.length > 0 && e.charCodeAt(0) === 35 ? e.slice(1) : e : ""; + } + function P9e(e, t) { + return typeof e == "string" ? e : w9e(e, E.checkDefined(t)); + } + function w9e(e, t) { + return z2(e) ? t(e).slice(1) : Fo(e) ? t(e) : wi(e) ? e.escapedText.slice(1) : dn(e); + } + function sv(e, t, n, i, s) { + return t = JC(t, s), i = JC(i, s), n = P9e(n, s), `${e ? "#" : ""}${t}${n}${i}`; + } + function sz(e, t, n, i) { + return e.updatePropertyDeclaration( + t, + n, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + i + ); + } + function are(e, t, n, i, s = e.createThis()) { + return e.createGetAccessorDeclaration( + n, + i, + [], + /*type*/ + void 0, + e.createBlock([ + e.createReturnStatement( + e.createPropertyAccessExpression( + s, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ) + ) + ) + ]) + ); + } + function ore(e, t, n, i, s = e.createThis()) { + return e.createSetAccessorDeclaration( + n, + i, + [e.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + e.createBlock([ + e.createExpressionStatement( + e.createAssignment( + e.createPropertyAccessExpression( + s, + e.getGeneratedPrivateNameForNode( + t.name, + /*prefix*/ + void 0, + "_accessor_storage" + ) + ), + e.createIdentifier("value") + ) + ) + ]) + ); + } + function uO(e) { + let t = e.expression; + for (; ; ) { + if (t = Bc(t), nD(t)) { + t = ia(t.elements); + continue; + } + if (uA(t)) { + t = t.right; + continue; + } + if (Tl( + t, + /*excludeCompoundAssignment*/ + !0 + ) && Fo(t.left)) + return t; + break; + } + } + function A9e(e) { + return Qu(e) && oo(e) && !e.emitNode; + } + function _O(e, t) { + if (A9e(e)) + _O(e.expression, t); + else if (uA(e)) + _O(e.left, t), _O(e.right, t); + else if (nD(e)) + for (const n of e.elements) + _O(n, t); + else + t.push(e); + } + function cre(e) { + const t = []; + return _O(e, t), t; + } + function mA(e) { + if (e.transformFlags & 65536) return !0; + if (e.transformFlags & 128) + for (const t of BC(e)) { + const n = wy(t); + if (n && YE(n) && (n.transformFlags & 65536 || n.transformFlags & 128 && mA(n))) + return !0; + } + return !1; + } + function ot(e, t) { + return t ? om(e, t.pos, t.end) : e; + } + function ed(e) { + const t = e.kind; + return t === 168 || t === 169 || t === 171 || t === 172 || t === 173 || t === 174 || t === 176 || t === 177 || t === 178 || t === 181 || t === 185 || t === 218 || t === 219 || t === 231 || t === 243 || t === 262 || t === 263 || t === 264 || t === 265 || t === 266 || t === 267 || t === 271 || t === 272 || t === 277 || t === 278; + } + function jb(e) { + const t = e.kind; + return t === 169 || t === 172 || t === 174 || t === 177 || t === 178 || t === 231 || t === 263; + } + var j0e, B0e, J0e, z0e, W0e, lre = { + createBaseSourceFileNode: (e) => new (W0e || (W0e = zl.getSourceFileConstructor()))(e, -1, -1), + createBaseIdentifierNode: (e) => new (J0e || (J0e = zl.getIdentifierConstructor()))(e, -1, -1), + createBasePrivateIdentifierNode: (e) => new (z0e || (z0e = zl.getPrivateIdentifierConstructor()))(e, -1, -1), + createBaseTokenNode: (e) => new (B0e || (B0e = zl.getTokenConstructor()))(e, -1, -1), + createBaseNode: (e) => new (j0e || (j0e = zl.getNodeConstructor()))(e, -1, -1) + }, av = $3(1, lre); + function Mt(e, t) { + return t && e(t); + } + function vi(e, t, n) { + if (n) { + if (t) + return t(n); + for (const i of n) { + const s = e(i); + if (s) + return s; + } + } + } + function az(e, t) { + return e.charCodeAt(t + 1) === 42 && e.charCodeAt(t + 2) === 42 && e.charCodeAt(t + 3) !== 47; + } + function gA(e) { + return rr(e.statements, N9e) || I9e(e); + } + function N9e(e) { + return ed(e) && O9e( + e, + 95 + /* ExportKeyword */ + ) || nl(e) && Sh(e.moduleReference) || oc(e) || ko(e) || Ic(e) ? e : void 0; + } + function I9e(e) { + return e.flags & 8388608 ? V0e(e) : void 0; + } + function V0e(e) { + return F9e(e) ? e : gs(e, V0e); + } + function O9e(e, t) { + return ut(e.modifiers, (n) => n.kind === t); + } + function F9e(e) { + return rD(e) && e.keywordToken === 102 && e.name.escapedText === "meta"; + } + var L9e = { + 166: function(t, n, i) { + return Mt(n, t.left) || Mt(n, t.right); + }, + 168: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.constraint) || Mt(n, t.default) || Mt(n, t.expression); + }, + 304: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.exclamationToken) || Mt(n, t.equalsToken) || Mt(n, t.objectAssignmentInitializer); + }, + 305: function(t, n, i) { + return Mt(n, t.expression); + }, + 169: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.dotDotDotToken) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.type) || Mt(n, t.initializer); + }, + 172: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.exclamationToken) || Mt(n, t.type) || Mt(n, t.initializer); + }, + 171: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.type) || Mt(n, t.initializer); + }, + 303: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.exclamationToken) || Mt(n, t.initializer); + }, + 260: function(t, n, i) { + return Mt(n, t.name) || Mt(n, t.exclamationToken) || Mt(n, t.type) || Mt(n, t.initializer); + }, + 208: function(t, n, i) { + return Mt(n, t.dotDotDotToken) || Mt(n, t.propertyName) || Mt(n, t.name) || Mt(n, t.initializer); + }, + 181: function(t, n, i) { + return vi(n, i, t.modifiers) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type); + }, + 185: function(t, n, i) { + return vi(n, i, t.modifiers) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type); + }, + 184: function(t, n, i) { + return vi(n, i, t.modifiers) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type); + }, + 179: U0e, + 180: U0e, + 174: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.asteriskToken) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.exclamationToken) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 173: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.questionToken) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type); + }, + 176: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 177: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 178: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 262: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.asteriskToken) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 218: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.asteriskToken) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.body); + }, + 219: function(t, n, i) { + return vi(n, i, t.modifiers) || vi(n, i, t.typeParameters) || vi(n, i, t.parameters) || Mt(n, t.type) || Mt(n, t.equalsGreaterThanToken) || Mt(n, t.body); + }, + 175: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.body); + }, + 183: function(t, n, i) { + return Mt(n, t.typeName) || vi(n, i, t.typeArguments); + }, + 182: function(t, n, i) { + return Mt(n, t.assertsModifier) || Mt(n, t.parameterName) || Mt(n, t.type); + }, + 186: function(t, n, i) { + return Mt(n, t.exprName) || vi(n, i, t.typeArguments); + }, + 187: function(t, n, i) { + return vi(n, i, t.members); + }, + 188: function(t, n, i) { + return Mt(n, t.elementType); + }, + 189: function(t, n, i) { + return vi(n, i, t.elements); + }, + 192: q0e, + 193: q0e, + 194: function(t, n, i) { + return Mt(n, t.checkType) || Mt(n, t.extendsType) || Mt(n, t.trueType) || Mt(n, t.falseType); + }, + 195: function(t, n, i) { + return Mt(n, t.typeParameter); + }, + 205: function(t, n, i) { + return Mt(n, t.argument) || Mt(n, t.attributes) || Mt(n, t.qualifier) || vi(n, i, t.typeArguments); + }, + 302: function(t, n, i) { + return Mt(n, t.assertClause); + }, + 196: H0e, + 198: H0e, + 199: function(t, n, i) { + return Mt(n, t.objectType) || Mt(n, t.indexType); + }, + 200: function(t, n, i) { + return Mt(n, t.readonlyToken) || Mt(n, t.typeParameter) || Mt(n, t.nameType) || Mt(n, t.questionToken) || Mt(n, t.type) || vi(n, i, t.members); + }, + 201: function(t, n, i) { + return Mt(n, t.literal); + }, + 202: function(t, n, i) { + return Mt(n, t.dotDotDotToken) || Mt(n, t.name) || Mt(n, t.questionToken) || Mt(n, t.type); + }, + 206: G0e, + 207: G0e, + 209: function(t, n, i) { + return vi(n, i, t.elements); + }, + 210: function(t, n, i) { + return vi(n, i, t.properties); + }, + 211: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.questionDotToken) || Mt(n, t.name); + }, + 212: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.questionDotToken) || Mt(n, t.argumentExpression); + }, + 213: $0e, + 214: $0e, + 215: function(t, n, i) { + return Mt(n, t.tag) || Mt(n, t.questionDotToken) || vi(n, i, t.typeArguments) || Mt(n, t.template); + }, + 216: function(t, n, i) { + return Mt(n, t.type) || Mt(n, t.expression); + }, + 217: function(t, n, i) { + return Mt(n, t.expression); + }, + 220: function(t, n, i) { + return Mt(n, t.expression); + }, + 221: function(t, n, i) { + return Mt(n, t.expression); + }, + 222: function(t, n, i) { + return Mt(n, t.expression); + }, + 224: function(t, n, i) { + return Mt(n, t.operand); + }, + 229: function(t, n, i) { + return Mt(n, t.asteriskToken) || Mt(n, t.expression); + }, + 223: function(t, n, i) { + return Mt(n, t.expression); + }, + 225: function(t, n, i) { + return Mt(n, t.operand); + }, + 226: function(t, n, i) { + return Mt(n, t.left) || Mt(n, t.operatorToken) || Mt(n, t.right); + }, + 234: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.type); + }, + 235: function(t, n, i) { + return Mt(n, t.expression); + }, + 238: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.type); + }, + 236: function(t, n, i) { + return Mt(n, t.name); + }, + 227: function(t, n, i) { + return Mt(n, t.condition) || Mt(n, t.questionToken) || Mt(n, t.whenTrue) || Mt(n, t.colonToken) || Mt(n, t.whenFalse); + }, + 230: function(t, n, i) { + return Mt(n, t.expression); + }, + 241: X0e, + 268: X0e, + 307: function(t, n, i) { + return vi(n, i, t.statements) || Mt(n, t.endOfFileToken); + }, + 243: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.declarationList); + }, + 261: function(t, n, i) { + return vi(n, i, t.declarations); + }, + 244: function(t, n, i) { + return Mt(n, t.expression); + }, + 245: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.thenStatement) || Mt(n, t.elseStatement); + }, + 246: function(t, n, i) { + return Mt(n, t.statement) || Mt(n, t.expression); + }, + 247: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.statement); + }, + 248: function(t, n, i) { + return Mt(n, t.initializer) || Mt(n, t.condition) || Mt(n, t.incrementor) || Mt(n, t.statement); + }, + 249: function(t, n, i) { + return Mt(n, t.initializer) || Mt(n, t.expression) || Mt(n, t.statement); + }, + 250: function(t, n, i) { + return Mt(n, t.awaitModifier) || Mt(n, t.initializer) || Mt(n, t.expression) || Mt(n, t.statement); + }, + 251: Q0e, + 252: Q0e, + 253: function(t, n, i) { + return Mt(n, t.expression); + }, + 254: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.statement); + }, + 255: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.caseBlock); + }, + 269: function(t, n, i) { + return vi(n, i, t.clauses); + }, + 296: function(t, n, i) { + return Mt(n, t.expression) || vi(n, i, t.statements); + }, + 297: function(t, n, i) { + return vi(n, i, t.statements); + }, + 256: function(t, n, i) { + return Mt(n, t.label) || Mt(n, t.statement); + }, + 257: function(t, n, i) { + return Mt(n, t.expression); + }, + 258: function(t, n, i) { + return Mt(n, t.tryBlock) || Mt(n, t.catchClause) || Mt(n, t.finallyBlock); + }, + 299: function(t, n, i) { + return Mt(n, t.variableDeclaration) || Mt(n, t.block); + }, + 170: function(t, n, i) { + return Mt(n, t.expression); + }, + 263: Y0e, + 231: Y0e, + 264: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.typeParameters) || vi(n, i, t.heritageClauses) || vi(n, i, t.members); + }, + 265: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.typeParameters) || Mt(n, t.type); + }, + 266: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || vi(n, i, t.members); + }, + 306: function(t, n, i) { + return Mt(n, t.name) || Mt(n, t.initializer); + }, + 267: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.body); + }, + 271: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name) || Mt(n, t.moduleReference); + }, + 272: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.importClause) || Mt(n, t.moduleSpecifier) || Mt(n, t.attributes); + }, + 273: function(t, n, i) { + return Mt(n, t.name) || Mt(n, t.namedBindings); + }, + 300: function(t, n, i) { + return vi(n, i, t.elements); + }, + 301: function(t, n, i) { + return Mt(n, t.name) || Mt(n, t.value); + }, + 270: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.name); + }, + 274: function(t, n, i) { + return Mt(n, t.name); + }, + 280: function(t, n, i) { + return Mt(n, t.name); + }, + 275: Z0e, + 279: Z0e, + 278: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.exportClause) || Mt(n, t.moduleSpecifier) || Mt(n, t.attributes); + }, + 276: K0e, + 281: K0e, + 277: function(t, n, i) { + return vi(n, i, t.modifiers) || Mt(n, t.expression); + }, + 228: function(t, n, i) { + return Mt(n, t.head) || vi(n, i, t.templateSpans); + }, + 239: function(t, n, i) { + return Mt(n, t.expression) || Mt(n, t.literal); + }, + 203: function(t, n, i) { + return Mt(n, t.head) || vi(n, i, t.templateSpans); + }, + 204: function(t, n, i) { + return Mt(n, t.type) || Mt(n, t.literal); + }, + 167: function(t, n, i) { + return Mt(n, t.expression); + }, + 298: function(t, n, i) { + return vi(n, i, t.types); + }, + 233: function(t, n, i) { + return Mt(n, t.expression) || vi(n, i, t.typeArguments); + }, + 283: function(t, n, i) { + return Mt(n, t.expression); + }, + 282: function(t, n, i) { + return vi(n, i, t.modifiers); + }, + 355: function(t, n, i) { + return vi(n, i, t.elements); + }, + 284: function(t, n, i) { + return Mt(n, t.openingElement) || vi(n, i, t.children) || Mt(n, t.closingElement); + }, + 288: function(t, n, i) { + return Mt(n, t.openingFragment) || vi(n, i, t.children) || Mt(n, t.closingFragment); + }, + 285: eye, + 286: eye, + 292: function(t, n, i) { + return vi(n, i, t.properties); + }, + 291: function(t, n, i) { + return Mt(n, t.name) || Mt(n, t.initializer); + }, + 293: function(t, n, i) { + return Mt(n, t.expression); + }, + 294: function(t, n, i) { + return Mt(n, t.dotDotDotToken) || Mt(n, t.expression); + }, + 287: function(t, n, i) { + return Mt(n, t.tagName); + }, + 295: function(t, n, i) { + return Mt(n, t.namespace) || Mt(n, t.name); + }, + 190: pD, + 191: pD, + 309: pD, + 315: pD, + 314: pD, + 316: pD, + 318: pD, + 317: function(t, n, i) { + return vi(n, i, t.parameters) || Mt(n, t.type); + }, + 320: function(t, n, i) { + return (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)) || vi(n, i, t.tags); + }, + 347: function(t, n, i) { + return Mt(n, t.tagName) || Mt(n, t.name) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 310: function(t, n, i) { + return Mt(n, t.name); + }, + 311: function(t, n, i) { + return Mt(n, t.left) || Mt(n, t.right); + }, + 341: tye, + 348: tye, + 330: function(t, n, i) { + return Mt(n, t.tagName) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 329: function(t, n, i) { + return Mt(n, t.tagName) || Mt(n, t.class) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 328: function(t, n, i) { + return Mt(n, t.tagName) || Mt(n, t.class) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 345: function(t, n, i) { + return Mt(n, t.tagName) || Mt(n, t.constraint) || vi(n, i, t.typeParameters) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 346: function(t, n, i) { + return Mt(n, t.tagName) || (t.typeExpression && t.typeExpression.kind === 309 ? Mt(n, t.typeExpression) || Mt(n, t.fullName) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)) : Mt(n, t.fullName) || Mt(n, t.typeExpression) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment))); + }, + 338: function(t, n, i) { + return Mt(n, t.tagName) || Mt(n, t.fullName) || Mt(n, t.typeExpression) || (typeof t.comment == "string" ? void 0 : vi(n, i, t.comment)); + }, + 342: dD, + 344: dD, + 343: dD, + 340: dD, + 350: dD, + 349: dD, + 339: dD, + 323: function(t, n, i) { + return rr(t.typeParameters, n) || rr(t.parameters, n) || Mt(n, t.type); + }, + 324: ure, + 325: ure, + 326: ure, + 322: function(t, n, i) { + return rr(t.jsDocPropertyTags, n); + }, + 327: zC, + 332: zC, + 333: zC, + 334: zC, + 335: zC, + 336: zC, + 331: zC, + 337: zC, + 351: M9e, + 354: R9e + }; + function U0e(e, t, n) { + return vi(t, n, e.typeParameters) || vi(t, n, e.parameters) || Mt(t, e.type); + } + function q0e(e, t, n) { + return vi(t, n, e.types); + } + function H0e(e, t, n) { + return Mt(t, e.type); + } + function G0e(e, t, n) { + return vi(t, n, e.elements); + } + function $0e(e, t, n) { + return Mt(t, e.expression) || // TODO: should we separate these branches out? + Mt(t, e.questionDotToken) || vi(t, n, e.typeArguments) || vi(t, n, e.arguments); + } + function X0e(e, t, n) { + return vi(t, n, e.statements); + } + function Q0e(e, t, n) { + return Mt(t, e.label); + } + function Y0e(e, t, n) { + return vi(t, n, e.modifiers) || Mt(t, e.name) || vi(t, n, e.typeParameters) || vi(t, n, e.heritageClauses) || vi(t, n, e.members); + } + function Z0e(e, t, n) { + return vi(t, n, e.elements); + } + function K0e(e, t, n) { + return Mt(t, e.propertyName) || Mt(t, e.name); + } + function eye(e, t, n) { + return Mt(t, e.tagName) || vi(t, n, e.typeArguments) || Mt(t, e.attributes); + } + function pD(e, t, n) { + return Mt(t, e.type); + } + function tye(e, t, n) { + return Mt(t, e.tagName) || (e.isNameFirst ? Mt(t, e.name) || Mt(t, e.typeExpression) : Mt(t, e.typeExpression) || Mt(t, e.name)) || (typeof e.comment == "string" ? void 0 : vi(t, n, e.comment)); + } + function dD(e, t, n) { + return Mt(t, e.tagName) || Mt(t, e.typeExpression) || (typeof e.comment == "string" ? void 0 : vi(t, n, e.comment)); + } + function ure(e, t, n) { + return Mt(t, e.name); + } + function zC(e, t, n) { + return Mt(t, e.tagName) || (typeof e.comment == "string" ? void 0 : vi(t, n, e.comment)); + } + function M9e(e, t, n) { + return Mt(t, e.tagName) || Mt(t, e.importClause) || Mt(t, e.moduleSpecifier) || Mt(t, e.attributes) || (typeof e.comment == "string" ? void 0 : vi(t, n, e.comment)); + } + function R9e(e, t, n) { + return Mt(t, e.expression); + } + function gs(e, t, n) { + if (e === void 0 || e.kind <= 165) + return; + const i = L9e[e.kind]; + return i === void 0 ? void 0 : i(e, t, n); + } + function kx(e, t, n) { + const i = rye(e), s = []; + for (; s.length < i.length; ) + s.push(e); + for (; i.length !== 0; ) { + const o = i.pop(), c = s.pop(); + if (ss(o)) { + if (n) { + const _ = n(o, c); + if (_) { + if (_ === "skip") continue; + return _; + } + } + for (let _ = o.length - 1; _ >= 0; --_) + i.push(o[_]), s.push(c); + } else { + const _ = t(o, c); + if (_) { + if (_ === "skip") continue; + return _; + } + if (o.kind >= 166) + for (const u of rye(o)) + i.push(u), s.push(o); + } + } + } + function rye(e) { + const t = []; + return gs(e, n, n), t; + function n(i) { + t.unshift(i); + } + } + function nye(e) { + e.externalModuleIndicator = gA(e); + } + function Cx(e, t, n, i = !1, s) { + var o, c, _, u; + (o = rn) == null || o.push( + rn.Phase.Parse, + "createSourceFile", + { path: e }, + /*separateBeginAndEnd*/ + !0 + ), Yo("beforeParse"); + let d; + (c = Vu) == null || c.logStartParseSourceFile(e); + const { + languageVersion: g, + setExternalModuleIndicator: h, + impliedNodeFormat: S, + jsDocParsingMode: T + } = typeof n == "object" ? n : { languageVersion: n }; + if (g === 100) + d = ov.parseSourceFile( + e, + t, + g, + /*syntaxCursor*/ + void 0, + i, + 6, + ka, + T + ); + else { + const C = S === void 0 ? h : (D) => (D.impliedNodeFormat = S, (h || nye)(D)); + d = ov.parseSourceFile( + e, + t, + g, + /*syntaxCursor*/ + void 0, + i, + s, + C, + T + ); + } + return (_ = Vu) == null || _.logStopParseSourceFile(), Yo("afterParse"), ep("Parse", "beforeParse", "afterParse"), (u = rn) == null || u.pop(), d; + } + function Ex(e, t) { + return ov.parseIsolatedEntityName(e, t); + } + function hA(e, t) { + return ov.parseJsonText(e, t); + } + function il(e) { + return e.externalModuleIndicator !== void 0; + } + function oz(e, t, n, i = !1) { + const s = cz.updateSourceFile(e, t, n, i); + return s.flags |= e.flags & 12582912, s; + } + function _re(e, t, n) { + const i = ov.JSDocParser.parseIsolatedJSDocComment(e, t, n); + return i && i.jsDoc && ov.fixupParentReferences(i.jsDoc), i; + } + function iye(e, t, n) { + return ov.JSDocParser.parseJSDocTypeExpressionForTests(e, t, n); + } + var ov; + ((e) => { + var t = Eg( + 99, + /*skipTrivia*/ + !0 + ), n = 40960, i, s, o, c, _; + function u(Q) { + return Be++, Q; + } + var d = { + createBaseSourceFileNode: (Q) => u(new _( + Q, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseIdentifierNode: (Q) => u(new o( + Q, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBasePrivateIdentifierNode: (Q) => u(new c( + Q, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseTokenNode: (Q) => u(new s( + Q, + /*pos*/ + 0, + /*end*/ + 0 + )), + createBaseNode: (Q) => u(new i( + Q, + /*pos*/ + 0, + /*end*/ + 0 + )) + }, g = $3(11, d), { + createNodeArray: h, + createNumericLiteral: S, + createStringLiteral: T, + createLiteralLikeNode: C, + createIdentifier: D, + createPrivateIdentifier: P, + createToken: O, + createArrayLiteralExpression: j, + createObjectLiteralExpression: F, + createPropertyAccessExpression: V, + createPropertyAccessChain: L, + createElementAccessExpression: $, + createElementAccessChain: U, + createCallExpression: G, + createCallChain: ce, + createNewExpression: K, + createParenthesizedExpression: X, + createBlock: Z, + createVariableStatement: oe, + createExpressionStatement: ne, + createIfStatement: pe, + createWhileStatement: fe, + createForStatement: H, + createForOfStatement: ae, + createVariableDeclaration: le, + createVariableDeclarationList: Ae + } = g, ge, de, ve, De, Xe, Ie, ye, Fe, Qe, Ke, Be, at, Wt, nr, Kt, Pr, Vt = !0, zt = !1; + function jr(Q, xe, qe, gt, Nt = !1, dr, In, Ti = 0) { + var fi; + if (dr = m5(Q, dr), dr === 6) { + const oi = Xt(Q, xe, qe, gt, Nt); + return TA( + oi, + (fi = oi.statements[0]) == null ? void 0 : fi.expression, + oi.parseDiagnostics, + /*returnValue*/ + !1, + /*jsonConversionNotifier*/ + void 0 + ), oi.referencedFiles = He, oi.typeReferenceDirectives = He, oi.libReferenceDirectives = He, oi.amdDependencies = He, oi.hasNoDefaultLib = !1, oi.pragmas = YM, oi; + } + Ai(Q, xe, qe, gt, dr, Ti); + const ni = $n(qe, Nt, dr, In || nye, Ti); + return _s(), ni; + } + e.parseSourceFile = jr; + function ci(Q, xe) { + Ai( + "", + Q, + xe, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ), Te(); + const qe = Y( + /*allowReservedWords*/ + !0 + ), gt = q() === 1 && !ye.length; + return _s(), gt ? qe : void 0; + } + e.parseIsolatedEntityName = ci; + function Xt(Q, xe, qe = 2, gt, Nt = !1) { + Ai( + Q, + xe, + qe, + gt, + 6, + 0 + /* ParseAll */ + ), de = Pr, Te(); + const dr = z(); + let In, Ti; + if (q() === 1) + In = Fa([], dr, dr), Ti = fc(); + else { + let oi; + for (; q() !== 1; ) { + let Ta; + switch (q()) { + case 23: + Ta = Ld(); + break; + case 112: + case 97: + case 106: + Ta = fc(); + break; + case 41: + ur( + () => Te() === 9 && Te() !== 59 + /* ColonToken */ + ) ? Ta = Gy() : Ta = Yy(); + break; + case 9: + case 11: + if (ur( + () => Te() !== 59 + /* ColonToken */ + )) { + Ta = vt(); + break; + } + default: + Ta = Yy(); + break; + } + oi && ss(oi) ? oi.push(Ta) : oi ? oi = [oi, Ta] : (oi = Ta, q() !== 1 && yt(p.Unexpected_token)); + } + const ro = ss(oi) ? Bt(j(oi), dr) : E.checkDefined(oi), no = ne(ro); + Bt(no, dr), In = Fa([no], dr), Ti = jo(1, p.Unexpected_token); + } + const fi = At( + Q, + 2, + 6, + /*isDeclarationFile*/ + !1, + In, + Ti, + de, + ka + ); + Nt && Le(fi), fi.nodeCount = Be, fi.identifierCount = Wt, fi.identifiers = at, fi.parseDiagnostics = QT(ye, fi), Fe && (fi.jsDocDiagnostics = QT(Fe, fi)); + const ni = fi; + return _s(), ni; + } + e.parseJsonText = Xt; + function Ai(Q, xe, qe, gt, Nt, dr) { + switch (i = zl.getNodeConstructor(), s = zl.getTokenConstructor(), o = zl.getIdentifierConstructor(), c = zl.getPrivateIdentifierConstructor(), _ = zl.getSourceFileConstructor(), ge = Cs(Q), ve = xe, De = qe, Qe = gt, Xe = Nt, Ie = R3(Nt), ye = [], nr = 0, at = /* @__PURE__ */ new Map(), Wt = 0, Be = 0, de = 0, Vt = !0, Xe) { + case 1: + case 2: + Pr = 524288; + break; + case 6: + Pr = 134742016; + break; + default: + Pr = 0; + break; + } + zt = !1, t.setText(ve), t.setOnError(st), t.setScriptTarget(De), t.setLanguageVariant(Ie), t.setScriptKind(Xe), t.setJSDocParsingMode(dr); + } + function _s() { + t.clearCommentDirectives(), t.setText(""), t.setOnError(void 0), t.setScriptKind( + 0 + /* Unknown */ + ), t.setJSDocParsingMode( + 0 + /* ParseAll */ + ), ve = void 0, De = void 0, Qe = void 0, Xe = void 0, Ie = void 0, de = 0, ye = void 0, Fe = void 0, nr = 0, at = void 0, Kt = void 0, Vt = !0; + } + function $n(Q, xe, qe, gt, Nt) { + const dr = Ol(ge); + dr && (Pr |= 33554432), de = Pr, Te(); + const In = Pa(0, kf); + E.assert( + q() === 1 + /* EndOfFileToken */ + ); + const Ti = he(), fi = wr(fc(), Ti), ni = At(ge, Q, qe, dr, In, fi, de, gt); + return uz(ni, ve), _z(ni, oi), ni.commentDirectives = t.getCommentDirectives(), ni.nodeCount = Be, ni.identifierCount = Wt, ni.identifiers = at, ni.parseDiagnostics = QT(ye, ni), ni.jsDocParsingMode = Nt, Fe && (ni.jsDocDiagnostics = QT(Fe, ni)), xe && Le(ni), ni; + function oi(ro, no, Ta) { + ye.push(XT(ge, ve, ro, no, Ta)); + } + } + let os = !1; + function wr(Q, xe) { + if (!xe) + return Q; + E.assert(!Q.jsDoc); + const qe = Ii($j(Q, ve), (gt) => gk.parseJSDocComment(Q, gt.pos, gt.end - gt.pos)); + return qe.length && (Q.jsDoc = qe), os && (os = !1, Q.flags |= 536870912), Q; + } + function Ss(Q) { + const xe = Qe, qe = cz.createSyntaxCursor(Q); + Qe = { currentNode: oi }; + const gt = [], Nt = ye; + ye = []; + let dr = 0, In = fi(Q.statements, 0); + for (; In !== -1; ) { + const ro = Q.statements[dr], no = Q.statements[In]; + Bn(gt, Q.statements, dr, In), dr = ni(Q.statements, In); + const Ta = rc(Nt, (Cm) => Cm.start >= ro.pos), Gf = Ta >= 0 ? rc(Nt, (Cm) => Cm.start >= no.pos, Ta) : -1; + Ta >= 0 && Bn(ye, Nt, Ta, Gf >= 0 ? Gf : void 0), Fi( + () => { + const Cm = Pr; + for (Pr |= 65536, t.resetTokenState(no.pos), Te(); q() !== 1; ) { + const s1 = t.getTokenFullStart(), J0 = vc(0, kf); + if (gt.push(J0), s1 === t.getTokenFullStart() && Te(), dr >= 0) { + const $f = Q.statements[dr]; + if (J0.end === $f.pos) + break; + J0.end > $f.pos && (dr = ni(Q.statements, dr + 1)); + } + } + Pr = Cm; + }, + 2 + /* Reparse */ + ), In = dr >= 0 ? fi(Q.statements, dr) : -1; + } + if (dr >= 0) { + const ro = Q.statements[dr]; + Bn(gt, Q.statements, dr); + const no = rc(Nt, (Ta) => Ta.start >= ro.pos); + no >= 0 && Bn(ye, Nt, no); + } + return Qe = xe, g.updateSourceFile(Q, ot(h(gt), Q.statements)); + function Ti(ro) { + return !(ro.flags & 65536) && !!(ro.transformFlags & 67108864); + } + function fi(ro, no) { + for (let Ta = no; Ta < ro.length; Ta++) + if (Ti(ro[Ta])) + return Ta; + return -1; + } + function ni(ro, no) { + for (let Ta = no; Ta < ro.length; Ta++) + if (!Ti(ro[Ta])) + return Ta; + return -1; + } + function oi(ro) { + const no = qe.currentNode(ro); + return Vt && no && Ti(no) && fre(no), no; + } + } + function Le(Q) { + yh( + Q, + /*incremental*/ + !0 + ); + } + e.fixupParentReferences = Le; + function At(Q, xe, qe, gt, Nt, dr, In, Ti) { + let fi = g.createSourceFile(Nt, dr, In); + if (uJ(fi, 0, ve.length), ni(fi), !gt && il(fi) && fi.transformFlags & 67108864) { + const oi = fi; + fi = Ss(fi), oi !== fi && ni(fi); + } + return fi; + function ni(oi) { + oi.text = ve, oi.bindDiagnostics = [], oi.bindSuggestionDiagnostics = void 0, oi.languageVersion = xe, oi.fileName = Q, oi.languageVariant = R3(qe), oi.isDeclarationFile = gt, oi.scriptKind = qe, Ti(oi), oi.setExternalModuleIndicator = Ti; + } + } + function vr(Q, xe) { + Q ? Pr |= xe : Pr &= ~xe; + } + function ln(Q) { + vr( + Q, + 8192 + /* DisallowInContext */ + ); + } + function Zn(Q) { + vr( + Q, + 16384 + /* YieldContext */ + ); + } + function ri(Q) { + vr( + Q, + 32768 + /* DecoratorContext */ + ); + } + function mi(Q) { + vr( + Q, + 65536 + /* AwaitContext */ + ); + } + function Ps(Q, xe) { + const qe = Q & Pr; + if (qe) { + vr( + /*val*/ + !1, + qe + ); + const gt = xe(); + return vr( + /*val*/ + !0, + qe + ), gt; + } + return xe(); + } + function ws(Q, xe) { + const qe = Q & ~Pr; + if (qe) { + vr( + /*val*/ + !0, + qe + ); + const gt = xe(); + return vr( + /*val*/ + !1, + qe + ), gt; + } + return xe(); + } + function Yt(Q) { + return Ps(8192, Q); + } + function Ca(Q) { + return ws(8192, Q); + } + function $e(Q) { + return Ps(131072, Q); + } + function nt(Q) { + return ws(131072, Q); + } + function te(Q) { + return ws(16384, Q); + } + function rt(Q) { + return ws(32768, Q); + } + function re(Q) { + return ws(65536, Q); + } + function Ee(Q) { + return Ps(65536, Q); + } + function Ne(Q) { + return ws(81920, Q); + } + function et(Q) { + return Ps(81920, Q); + } + function lt(Q) { + return (Pr & Q) !== 0; + } + function jt() { + return lt( + 16384 + /* YieldContext */ + ); + } + function be() { + return lt( + 8192 + /* DisallowInContext */ + ); + } + function ft() { + return lt( + 131072 + /* DisallowConditionalTypesContext */ + ); + } + function bt() { + return lt( + 32768 + /* DecoratorContext */ + ); + } + function kt() { + return lt( + 65536 + /* AwaitContext */ + ); + } + function yt(Q, ...xe) { + return W(t.getTokenStart(), t.getTokenEnd(), Q, ...xe); + } + function Ut(Q, xe, qe, ...gt) { + const Nt = Bo(ye); + let dr; + return (!Nt || Q !== Nt.start) && (dr = XT(ge, ve, Q, xe, qe, ...gt), ye.push(dr)), zt = !0, dr; + } + function W(Q, xe, qe, ...gt) { + return Ut(Q, xe - Q, qe, ...gt); + } + function je(Q, xe, ...qe) { + W(Q.pos, Q.end, xe, ...qe); + } + function st(Q, xe, qe) { + Ut(t.getTokenEnd(), xe, Q, qe); + } + function z() { + return t.getTokenFullStart(); + } + function he() { + return t.hasPrecedingJSDocComment(); + } + function q() { + return Ke; + } + function we() { + return Ke = t.scan(); + } + function _e(Q) { + return Te(), Q(); + } + function Te() { + return qu(Ke) && (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && W(t.getTokenStart(), t.getTokenEnd(), p.Keywords_cannot_contain_escape_characters), we(); + } + function dt() { + return Ke = t.scanJsDocToken(); + } + function xt(Q) { + return Ke = t.scanJSDocCommentTextToken(Q); + } + function wt() { + return Ke = t.reScanGreaterToken(); + } + function ir() { + return Ke = t.reScanSlashToken(); + } + function br(Q) { + return Ke = t.reScanTemplateToken(Q); + } + function Lr() { + return Ke = t.reScanLessThanToken(); + } + function en() { + return Ke = t.reScanHashToken(); + } + function fr() { + return Ke = t.scanJsxIdentifier(); + } + function mn() { + return Ke = t.scanJsxToken(); + } + function Di() { + return Ke = t.scanJsxAttributeValue(); + } + function Fi(Q, xe) { + const qe = Ke, gt = ye.length, Nt = zt, dr = Pr, In = xe !== 0 ? t.lookAhead(Q) : t.tryScan(Q); + return E.assert(dr === Pr), (!In || xe !== 0) && (Ke = qe, xe !== 2 && (ye.length = gt), zt = Nt), In; + } + function ur(Q) { + return Fi( + Q, + 1 + /* Lookahead */ + ); + } + function Mr(Q) { + return Fi( + Q, + 0 + /* TryParse */ + ); + } + function Or() { + return q() === 80 ? !0 : q() > 118; + } + function tn() { + return q() === 80 ? !0 : q() === 127 && jt() || q() === 135 && kt() ? !1 : q() > 118; + } + function qt(Q, xe, qe = !0) { + return q() === Q ? (qe && Te(), !0) : (xe ? yt(xe) : yt(p._0_expected, Ws(Q)), !1); + } + const ma = Object.keys(DI).filter((Q) => Q.length > 2); + function $a(Q) { + if (Ob(Q)) { + W(sa(ve, Q.template.pos), Q.template.end, p.Module_declaration_names_may_only_use_or_quoted_strings); + return; + } + const xe = Re(Q) ? dn(Q) : void 0; + if (!xe || !X_(xe, De)) { + yt(p._0_expected, Ws( + 27 + /* SemicolonToken */ + )); + return; + } + const qe = sa(ve, Q.pos); + switch (xe) { + case "const": + case "let": + case "var": + W(qe, Q.end, p.Variable_declaration_not_allowed_at_this_location); + return; + case "declare": + return; + case "interface": + Ro( + p.Interface_name_cannot_be_0, + p.Interface_must_be_given_a_name, + 19 + /* OpenBraceToken */ + ); + return; + case "is": + W(qe, t.getTokenStart(), p.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + return; + case "module": + case "namespace": + Ro( + p.Namespace_name_cannot_be_0, + p.Namespace_must_be_given_a_name, + 19 + /* OpenBraceToken */ + ); + return; + case "type": + Ro( + p.Type_alias_name_cannot_be_0, + p.Type_alias_must_be_given_a_name, + 64 + /* EqualsToken */ + ); + return; + } + const gt = F2(xe, ma, lo) ?? Vo(xe); + if (gt) { + W(qe, Q.end, p.Unknown_keyword_or_identifier_Did_you_mean_0, gt); + return; + } + q() !== 0 && W(qe, Q.end, p.Unexpected_keyword_or_identifier); + } + function Ro(Q, xe, qe) { + q() === qe ? yt(xe) : yt(Q, t.getTokenValue()); + } + function Vo(Q) { + for (const xe of ma) + if (Q.length > xe.length + 2 && zi(Q, xe)) + return `${xe} ${Q.slice(xe.length)}`; + } + function hs(Q, xe, qe) { + if (q() === 60 && !t.hasPrecedingLineBreak()) { + yt(p.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations); + return; + } + if (q() === 21) { + yt(p.Cannot_start_a_function_call_in_a_type_annotation), Te(); + return; + } + if (xe && !ea()) { + qe ? yt(p._0_expected, Ws( + 27 + /* SemicolonToken */ + )) : yt(p.Expected_for_property_initializer); + return; + } + if (!wo()) { + if (qe) { + yt(p._0_expected, Ws( + 27 + /* SemicolonToken */ + )); + return; + } + $a(Q); + } + } + function ga(Q) { + return q() === Q ? (dt(), !0) : (E.assert(N7(Q)), yt(p._0_expected, Ws(Q)), !1); + } + function Co(Q, xe, qe, gt) { + if (q() === xe) { + Te(); + return; + } + const Nt = yt(p._0_expected, Ws(xe)); + qe && Nt && Fs( + Nt, + XT(ge, ve, gt, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, Ws(Q), Ws(xe)) + ); + } + function Li(Q) { + return q() === Q ? (Te(), !0) : !1; + } + function bi(Q) { + if (q() === Q) + return fc(); + } + function wl(Q) { + if (q() === Q) + return ql(); + } + function jo(Q, xe, qe) { + return bi(Q) || lc( + Q, + /*reportAtCurrentPosition*/ + !1, + xe || p._0_expected, + qe || Ws(Q) + ); + } + function Su(Q) { + const xe = wl(Q); + return xe || (E.assert(N7(Q)), lc( + Q, + /*reportAtCurrentPosition*/ + !1, + p._0_expected, + Ws(Q) + )); + } + function fc() { + const Q = z(), xe = q(); + return Te(), Bt(O(xe), Q); + } + function ql() { + const Q = z(), xe = q(); + return dt(), Bt(O(xe), Q); + } + function ea() { + return q() === 27 ? !0 : q() === 20 || q() === 1 || t.hasPrecedingLineBreak(); + } + function wo() { + return ea() ? (q() === 27 && Te(), !0) : !1; + } + function Ka() { + return wo() || qt( + 27 + /* SemicolonToken */ + ); + } + function Fa(Q, xe, qe, gt) { + const Nt = h(Q, gt); + return om(Nt, xe, qe ?? t.getTokenFullStart()), Nt; + } + function Bt(Q, xe, qe) { + return om(Q, xe, qe ?? t.getTokenFullStart()), Pr && (Q.flags |= Pr), zt && (zt = !1, Q.flags |= 262144), Q; + } + function lc(Q, xe, qe, ...gt) { + xe ? Ut(t.getTokenFullStart(), 0, qe, ...gt) : qe && yt(qe, ...gt); + const Nt = z(), dr = Q === 80 ? D( + "", + /*originalKeywordKind*/ + void 0 + ) : uy(Q) ? g.createTemplateLiteralLikeNode( + Q, + "", + "", + /*templateFlags*/ + void 0 + ) : Q === 9 ? S( + "", + /*numericLiteralFlags*/ + void 0 + ) : Q === 11 ? T( + "", + /*isSingleQuote*/ + void 0 + ) : Q === 282 ? g.createMissingDeclaration() : O(Q); + return Bt(dr, Nt); + } + function Fu(Q) { + let xe = at.get(Q); + return xe === void 0 && at.set(Q, xe = Q), xe; + } + function Lu(Q, xe, qe) { + if (Q) { + Wt++; + const Ti = z(), fi = q(), ni = Fu(t.getTokenValue()), oi = t.hasExtendedUnicodeEscape(); + return we(), Bt(D(ni, fi, oi), Ti); + } + if (q() === 81) + return yt(qe || p.Private_identifiers_are_not_allowed_outside_class_bodies), Lu( + /*isIdentifier*/ + !0 + ); + if (q() === 0 && t.tryScan( + () => t.reScanInvalidIdentifier() === 80 + /* Identifier */ + )) + return Lu( + /*isIdentifier*/ + !0 + ); + Wt++; + const gt = q() === 1, Nt = t.isReservedWord(), dr = t.getTokenText(), In = Nt ? p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here : p.Identifier_expected; + return lc(80, gt, xe || In, dr); + } + function y_(Q) { + return Lu( + Or(), + /*diagnosticMessage*/ + void 0, + Q + ); + } + function Ao(Q, xe) { + return Lu(tn(), Q, xe); + } + function Uo(Q) { + return Lu(Du(q()), Q); + } + function A() { + return (t.hasUnicodeEscape() || t.hasExtendedUnicodeEscape()) && yt(p.Unicode_escape_sequence_cannot_appear_here), Lu(Du(q())); + } + function Me() { + return Du(q()) || q() === 11 || q() === 9; + } + function it() { + return Du(q()) || q() === 11; + } + function Ot(Q) { + if (q() === 11 || q() === 9) { + const xe = vt(); + return xe.text = Fu(xe.text), xe; + } + return Q && q() === 23 ? qn() : q() === 81 ? Ht() : Uo(); + } + function kr() { + return Ot( + /*allowComputedPropertyNames*/ + !0 + ); + } + function qn() { + const Q = z(); + qt( + 23 + /* OpenBracketToken */ + ); + const xe = Yt(ll); + return qt( + 24 + /* CloseBracketToken */ + ), Bt(g.createComputedPropertyName(xe), Q); + } + function Ht() { + const Q = z(), xe = P(Fu(t.getTokenValue())); + return Te(), Bt(xe, Q); + } + function yn(Q) { + return q() === Q && Mr(_i); + } + function li() { + return Te(), t.hasPrecedingLineBreak() ? !1 : vo(); + } + function _i() { + switch (q()) { + case 87: + return Te() === 94; + case 95: + return Te(), q() === 90 ? ur(cl) : q() === 156 ? ur(qo) : eo(); + case 90: + return cl(); + case 126: + case 139: + case 153: + return Te(), vo(); + default: + return li(); + } + } + function eo() { + return q() === 60 || q() !== 42 && q() !== 130 && q() !== 19 && vo(); + } + function qo() { + return Te(), eo(); + } + function ol() { + return r0(q()) && Mr(_i); + } + function vo() { + return q() === 23 || q() === 19 || q() === 42 || q() === 26 || Me(); + } + function cl() { + return Te(), q() === 86 || q() === 100 || q() === 120 || q() === 60 || q() === 128 && ur(sk) || q() === 134 && ur(Nv); + } + function Eo(Q, xe) { + if (Do(Q)) + return !0; + switch (Q) { + case 0: + case 1: + case 3: + return !(q() === 27 && xe) && e1(); + case 2: + return q() === 84 || q() === 90; + case 4: + return ur(Gr); + case 5: + return ur(r1) || q() === 27 && !xe; + case 6: + return q() === 23 || Me(); + case 12: + switch (q()) { + case 23: + case 42: + case 26: + case 25: + return !0; + default: + return Me(); + } + case 18: + return Me(); + case 9: + return q() === 23 || q() === 26 || Me(); + case 24: + return it(); + case 7: + return q() === 19 ? ur(gl) : xe ? tn() && !Jf() : r2() && !Jf(); + case 8: + return Ov(); + case 10: + return q() === 28 || q() === 26 || Ov(); + case 19: + return q() === 103 || q() === 87 || tn(); + case 15: + switch (q()) { + case 28: + case 25: + return !0; + } + case 11: + return q() === 26 || We(); + case 16: + return Od( + /*isJSDocParameter*/ + !1 + ); + case 17: + return Od( + /*isJSDocParameter*/ + !0 + ); + case 20: + case 21: + return q() === 28 || ag(); + case 22: + return Rh(); + case 23: + return q() === 161 && ur(Ma) ? !1 : Du(q()); + case 13: + return Du(q()) || q() === 19; + case 14: + return !0; + case 25: + return !0; + case 26: + return E.fail("ParsingContext.Count used as a context"); + default: + E.assertNever(Q, "Non-exhaustive case in 'isListElement'."); + } + } + function gl() { + if (E.assert( + q() === 19 + /* OpenBraceToken */ + ), Te() === 20) { + const Q = Te(); + return Q === 28 || Q === 19 || Q === 96 || Q === 119; + } + return !0; + } + function Cl() { + return Te(), tn(); + } + function kc() { + return Te(), Du(q()); + } + function F_() { + return Te(), iY(q()); + } + function Jf() { + return q() === 119 || q() === 96 ? ur(Pe) : !1; + } + function Pe() { + return Te(), We(); + } + function Ct() { + return Te(), ag(); + } + function Jr(Q) { + if (q() === 1) + return !0; + switch (Q) { + case 1: + case 2: + case 4: + case 5: + case 6: + case 12: + case 9: + case 23: + case 24: + return q() === 20; + case 3: + return q() === 20 || q() === 84 || q() === 90; + case 7: + return q() === 19 || q() === 96 || q() === 119; + case 8: + return Vi(); + case 19: + return q() === 32 || q() === 21 || q() === 19 || q() === 96 || q() === 119; + case 11: + return q() === 22 || q() === 27; + case 15: + case 21: + case 10: + return q() === 24; + case 17: + case 16: + case 18: + return q() === 22 || q() === 24; + case 20: + return q() !== 28; + case 22: + return q() === 19 || q() === 20; + case 13: + return q() === 32 || q() === 44; + case 14: + return q() === 30 && ur(SP); + default: + return !1; + } + } + function Vi() { + return !!(ea() || sd(q()) || q() === 39); + } + function ha() { + E.assert(nr, "Missing parsing context"); + for (let Q = 0; Q < 26; Q++) + if (nr & 1 << Q && (Eo( + Q, + /*inErrorRecovery*/ + !0 + ) || Jr(Q))) + return !0; + return !1; + } + function Pa(Q, xe) { + const qe = nr; + nr |= 1 << Q; + const gt = [], Nt = z(); + for (; !Jr(Q); ) { + if (Eo( + Q, + /*inErrorRecovery*/ + !1 + )) { + gt.push(vc(Q, xe)); + continue; + } + if (rg(Q)) + break; + } + return nr = qe, Fa(gt, Nt); + } + function vc(Q, xe) { + const qe = Do(Q); + return qe ? to(qe) : xe(); + } + function Do(Q, xe) { + var qe; + if (!Qe || !pc(Q) || zt) + return; + const gt = Qe.currentNode(xe ?? t.getTokenFullStart()); + if (!(ic(gt) || B9e(gt) || tC(gt) || (gt.flags & 101441536) !== Pr) && Cc(gt, Q)) + return h3(gt) && ((qe = gt.jsDoc) != null && qe.jsDocCache) && (gt.jsDoc.jsDocCache = void 0), gt; + } + function to(Q) { + return t.resetTokenState(Q.end), Te(), Q; + } + function pc(Q) { + switch (Q) { + case 5: + case 2: + case 0: + case 1: + case 3: + case 6: + case 4: + case 8: + case 17: + case 16: + return !0; + } + return !1; + } + function Cc(Q, xe) { + switch (xe) { + case 5: + return bf(Q); + case 2: + return Id(Q); + case 0: + case 1: + case 3: + return zf(Q); + case 6: + return v_(Q); + case 4: + return pp(Q); + case 8: + return Wf(Q); + case 17: + case 16: + return tg(Q); + } + return !1; + } + function bf(Q) { + if (Q) + switch (Q.kind) { + case 176: + case 181: + case 177: + case 178: + case 172: + case 240: + return !0; + case 174: + const xe = Q; + return !(xe.name.kind === 80 && xe.name.escapedText === "constructor"); + } + return !1; + } + function Id(Q) { + if (Q) + switch (Q.kind) { + case 296: + case 297: + return !0; + } + return !1; + } + function zf(Q) { + if (Q) + switch (Q.kind) { + case 262: + case 243: + case 241: + case 245: + case 244: + case 257: + case 253: + case 255: + case 252: + case 251: + case 249: + case 250: + case 248: + case 247: + case 254: + case 242: + case 258: + case 256: + case 246: + case 259: + case 272: + case 271: + case 278: + case 277: + case 267: + case 263: + case 264: + case 266: + case 265: + return !0; + } + return !1; + } + function v_(Q) { + return Q.kind === 306; + } + function pp(Q) { + if (Q) + switch (Q.kind) { + case 180: + case 173: + case 181: + case 171: + case 179: + return !0; + } + return !1; + } + function Wf(Q) { + return Q.kind !== 260 ? !1 : Q.initializer === void 0; + } + function tg(Q) { + return Q.kind !== 169 ? !1 : Q.initializer === void 0; + } + function rg(Q) { + return b_(Q), ha() ? !0 : (Te(), !1); + } + function b_(Q) { + switch (Q) { + case 0: + return q() === 90 ? yt(p._0_expected, Ws( + 95 + /* ExportKeyword */ + )) : yt(p.Declaration_or_statement_expected); + case 1: + return yt(p.Declaration_or_statement_expected); + case 2: + return yt(p.case_or_default_expected); + case 3: + return yt(p.Statement_expected); + case 18: + case 4: + return yt(p.Property_or_signature_expected); + case 5: + return yt(p.Unexpected_token_A_constructor_method_accessor_or_property_was_expected); + case 6: + return yt(p.Enum_member_expected); + case 7: + return yt(p.Expression_expected); + case 8: + return qu(q()) ? yt(p._0_is_not_allowed_as_a_variable_declaration_name, Ws(q())) : yt(p.Variable_declaration_expected); + case 9: + return yt(p.Property_destructuring_pattern_expected); + case 10: + return yt(p.Array_element_destructuring_pattern_expected); + case 11: + return yt(p.Argument_expression_expected); + case 12: + return yt(p.Property_assignment_expected); + case 15: + return yt(p.Expression_or_comma_expected); + case 17: + return yt(p.Parameter_declaration_expected); + case 16: + return qu(q()) ? yt(p._0_is_not_allowed_as_a_parameter_name, Ws(q())) : yt(p.Parameter_declaration_expected); + case 19: + return yt(p.Type_parameter_declaration_expected); + case 20: + return yt(p.Type_argument_expected); + case 21: + return yt(p.Type_expected); + case 22: + return yt(p.Unexpected_token_expected); + case 23: + return q() === 161 ? yt(p._0_expected, "}") : yt(p.Identifier_expected); + case 13: + return yt(p.Identifier_expected); + case 14: + return yt(p.Identifier_expected); + case 24: + return yt(p.Identifier_or_string_literal_expected); + case 25: + return yt(p.Identifier_expected); + case 26: + return E.fail("ParsingContext.Count used as a context"); + default: + E.assertNever(Q); + } + } + function Gc(Q, xe, qe) { + const gt = nr; + nr |= 1 << Q; + const Nt = [], dr = z(); + let In = -1; + for (; ; ) { + if (Eo( + Q, + /*inErrorRecovery*/ + !1 + )) { + const Ti = t.getTokenFullStart(), fi = vc(Q, xe); + if (!fi) { + nr = gt; + return; + } + if (Nt.push(fi), In = t.getTokenStart(), Li( + 28 + /* CommaToken */ + )) + continue; + if (In = -1, Jr(Q)) + break; + qt(28, ng(Q)), qe && q() === 27 && !t.hasPrecedingLineBreak() && Te(), Ti === t.getTokenFullStart() && Te(); + continue; + } + if (Jr(Q) || rg(Q)) + break; + } + return nr = gt, Fa( + Nt, + dr, + /*end*/ + void 0, + In >= 0 + ); + } + function ng(Q) { + return Q === 6 ? p.An_enum_member_name_must_be_followed_by_a_or : void 0; + } + function L_() { + const Q = Fa([], z()); + return Q.isMissingList = !0, Q; + } + function bm(Q) { + return !!Q.isMissingList; + } + function Vf(Q, xe, qe, gt) { + if (qt(qe)) { + const Nt = Gc(Q, xe); + return qt(gt), Nt; + } + return L_(); + } + function Y(Q, xe) { + const qe = z(); + let gt = Q ? Uo(xe) : Ao(xe); + for (; Li( + 25 + /* DotToken */ + ) && q() !== 30; ) + gt = Bt( + g.createQualifiedName( + gt, + Pt( + Q, + /*allowPrivateIdentifiers*/ + !1, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + ) + ), + qe + ); + return gt; + } + function tt(Q, xe) { + return Bt(g.createQualifiedName(Q, xe), Q.pos); + } + function Pt(Q, xe, qe) { + if (t.hasPrecedingLineBreak() && Du(q()) && ur(Ru)) + return lc( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Identifier_expected + ); + if (q() === 81) { + const gt = Ht(); + return xe ? gt : lc( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Identifier_expected + ); + } + return Q ? qe ? Uo() : A() : Ao(); + } + function It(Q) { + const xe = z(), qe = []; + let gt; + do + gt = ke(Q), qe.push(gt); + while (gt.literal.kind === 17); + return Fa(qe, xe); + } + function hr(Q) { + const xe = z(); + return Bt( + g.createTemplateExpression( + Nr(Q), + It(Q) + ), + xe + ); + } + function zr() { + const Q = z(); + return Bt( + g.createTemplateLiteralType( + Nr( + /*isTaggedTemplate*/ + !1 + ), + Cn() + ), + Q + ); + } + function Cn() { + const Q = z(), xe = []; + let qe; + do + qe = ei(), xe.push(qe); + while (qe.literal.kind === 17); + return Fa(xe, Q); + } + function ei() { + const Q = z(); + return Bt( + g.createTemplateLiteralTypeSpan( + Al(), + M( + /*isTaggedTemplate*/ + !1 + ) + ), + Q + ); + } + function M(Q) { + return q() === 20 ? (br(Q), ui()) : jo(18, p._0_expected, Ws( + 20 + /* CloseBraceToken */ + )); + } + function ke(Q) { + const xe = z(); + return Bt( + g.createTemplateSpan( + Yt(ll), + M(Q) + ), + xe + ); + } + function vt() { + return Qi(q()); + } + function Nr(Q) { + !Q && t.getTokenFlags() & 26656 && br( + /*isTaggedTemplate*/ + !1 + ); + const xe = Qi(q()); + return E.assert(xe.kind === 16, "Template head has wrong token kind"), xe; + } + function ui() { + const Q = Qi(q()); + return E.assert(Q.kind === 17 || Q.kind === 18, "Template fragment has wrong token kind"), Q; + } + function ds(Q) { + const xe = Q === 15 || Q === 18, qe = t.getTokenText(); + return qe.substring(1, qe.length - (t.isUnterminated() ? 0 : xe ? 1 : 2)); + } + function Qi(Q) { + const xe = z(), qe = uy(Q) ? g.createTemplateLiteralLikeNode( + Q, + t.getTokenValue(), + ds(Q), + t.getTokenFlags() & 7176 + /* TemplateLiteralLikeFlags */ + ) : ( + // Note that theoretically the following condition would hold true literals like 009, + // which is not octal. But because of how the scanner separates the tokens, we would + // never get a token like this. Instead, we would get 00 and 9 as two separate tokens. + // We also do not need to check for negatives because any prefix operator would be part of a + // parent unary expression. + Q === 9 ? S(t.getTokenValue(), t.getNumericLiteralFlags()) : Q === 11 ? T( + t.getTokenValue(), + /*isSingleQuote*/ + void 0, + t.hasExtendedUnicodeEscape() + ) : GE(Q) ? C(Q, t.getTokenValue()) : E.fail() + ); + return t.hasExtendedUnicodeEscape() && (qe.hasExtendedUnicodeEscape = !0), t.isUnterminated() && (qe.isUnterminated = !0), Te(), Bt(qe, xe); + } + function ys() { + return Y( + /*allowReservedWords*/ + !0, + p.Type_expected + ); + } + function wa() { + if (!t.hasPrecedingLineBreak() && Lr() === 30) + return Vf( + 20, + Al, + 30, + 32 + /* GreaterThanToken */ + ); + } + function ya() { + const Q = z(); + return Bt( + g.createTypeReferenceNode( + ys(), + wa() + ), + Q + ); + } + function tc(Q) { + switch (Q.kind) { + case 183: + return ic(Q.typeName); + case 184: + case 185: { + const { parameters: xe, type: qe } = Q; + return bm(xe) || tc(qe); + } + case 196: + return tc(Q.type); + default: + return !1; + } + } + function dp(Q) { + return Te(), Bt(g.createTypePredicateNode( + /*assertsModifier*/ + void 0, + Q, + Al() + ), Q.pos); + } + function rd() { + const Q = z(); + return Te(), Bt(g.createThisTypeNode(), Q); + } + function ig() { + const Q = z(); + return Te(), Bt(g.createJSDocAllType(), Q); + } + function Ug() { + const Q = z(); + return Te(), Bt(g.createJSDocNonNullableType( + t2(), + /*postfix*/ + !1 + ), Q); + } + function w0() { + const Q = z(); + return Te(), q() === 28 || q() === 20 || q() === 22 || q() === 32 || q() === 64 || q() === 52 ? Bt(g.createJSDocUnknownType(), Q) : Bt(g.createJSDocNullableType( + Al(), + /*postfix*/ + !1 + ), Q); + } + function qg() { + const Q = z(), xe = he(); + if (Mr(bP)) { + const qe = Sf( + 36 + /* JSDoc */ + ), gt = nd( + 59, + /*isType*/ + !1 + ); + return wr(Bt(g.createJSDocFunctionType(qe, gt), Q), xe); + } + return Bt(g.createTypeReferenceNode( + Uo(), + /*typeArguments*/ + void 0 + ), Q); + } + function Uf() { + const Q = z(); + let xe; + return (q() === 110 || q() === 105) && (xe = Uo(), qt( + 59 + /* ColonToken */ + )), Bt( + g.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + // TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier? + xe, + /*questionToken*/ + void 0, + cf(), + /*initializer*/ + void 0 + ), + Q + ); + } + function cf() { + t.setSkipJsDocLeadingAsterisks(!0); + const Q = z(); + if (Li( + 144 + /* ModuleKeyword */ + )) { + const gt = g.createJSDocNamepathType( + /*type*/ + void 0 + ); + e: + for (; ; ) + switch (q()) { + case 20: + case 1: + case 28: + case 5: + break e; + default: + dt(); + } + return t.setSkipJsDocLeadingAsterisks(!1), Bt(gt, Q); + } + const xe = Li( + 26 + /* DotDotDotToken */ + ); + let qe = PS(); + return t.setSkipJsDocLeadingAsterisks(!1), xe && (qe = Bt(g.createJSDocVariadicType(qe), Q)), q() === 64 ? (Te(), Bt(g.createJSDocOptionalType(qe), Q)) : qe; + } + function za() { + const Q = z(); + qt( + 114 + /* TypeOfKeyword */ + ); + const xe = Y( + /*allowReservedWords*/ + !0 + ), qe = t.hasPrecedingLineBreak() ? void 0 : Fv(); + return Bt(g.createTypeQueryNode(xe, qe), Q); + } + function t_() { + const Q = z(), xe = Qt( + /*allowDecorators*/ + !1, + /*permitConstAsModifier*/ + !0 + ), qe = Ao(); + let gt, Nt; + Li( + 96 + /* ExtendsKeyword */ + ) && (ag() || !We() ? gt = Al() : Nt = M0()); + const dr = Li( + 64 + /* EqualsToken */ + ) ? Al() : void 0, In = g.createTypeParameterDeclaration(xe, qe, gt, dr); + return In.expression = Nt, Bt(In, Q); + } + function S_() { + if (q() === 30) + return Vf( + 19, + t_, + 30, + 32 + /* GreaterThanToken */ + ); + } + function Od(Q) { + return q() === 26 || Ov() || r0(q()) || q() === 60 || ag( + /*inStartOfParameter*/ + !Q + ); + } + function A0(Q) { + const xe = Qg(p.Private_identifiers_cannot_be_used_as_parameters); + return Jw(xe) === 0 && !ut(Q) && r0(q()) && Te(), xe; + } + function N0() { + return Or() || q() === 23 || q() === 19; + } + function zp(Q) { + return I0(Q); + } + function jy(Q) { + return I0( + Q, + /*allowAmbiguity*/ + !1 + ); + } + function I0(Q, xe = !0) { + const qe = z(), gt = he(), Nt = Q ? re(() => Qt( + /*allowDecorators*/ + !0 + )) : Ee(() => Qt( + /*allowDecorators*/ + !0 + )); + if (q() === 110) { + const fi = g.createParameterDeclaration( + Nt, + /*dotDotDotToken*/ + void 0, + Lu( + /*isIdentifier*/ + !0 + ), + /*questionToken*/ + void 0, + Fd(), + /*initializer*/ + void 0 + ), ni = ul(Nt); + return ni && je(ni, p.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters), wr(Bt(fi, qe), gt); + } + const dr = Vt; + Vt = !1; + const In = bi( + 26 + /* DotDotDotToken */ + ); + if (!xe && !N0()) + return; + const Ti = wr( + Bt( + g.createParameterDeclaration( + Nt, + In, + A0(Nt), + bi( + 58 + /* QuestionToken */ + ), + Fd(), + id() + ), + qe + ), + gt + ); + return Vt = dr, Ti; + } + function nd(Q, xe) { + if (Hg(Q, xe)) + return $e(PS); + } + function Hg(Q, xe) { + return Q === 39 ? (qt(Q), !0) : Li( + 59 + /* ColonToken */ + ) ? !0 : xe && q() === 39 ? (yt(p._0_expected, Ws( + 59 + /* ColonToken */ + )), Te(), !0) : !1; + } + function wh(Q, xe) { + const qe = jt(), gt = kt(); + Zn(!!(Q & 1)), mi(!!(Q & 2)); + const Nt = Q & 32 ? Gc(17, Uf) : Gc(16, () => xe ? zp(gt) : jy(gt)); + return Zn(qe), mi(gt), Nt; + } + function Sf(Q) { + if (!qt( + 21 + /* OpenParenToken */ + )) + return L_(); + const xe = wh( + Q, + /*allowAmbiguity*/ + !0 + ); + return qt( + 22 + /* CloseParenToken */ + ), xe; + } + function sg() { + Li( + 28 + /* CommaToken */ + ) || Ka(); + } + function Oe(Q) { + const xe = z(), qe = he(); + Q === 180 && qt( + 105 + /* NewKeyword */ + ); + const gt = S_(), Nt = Sf( + 4 + /* Type */ + ), dr = nd( + 59, + /*isType*/ + !0 + ); + sg(); + const In = Q === 179 ? g.createCallSignature(gt, Nt, dr) : g.createConstructSignature(gt, Nt, dr); + return wr(Bt(In, xe), qe); + } + function Ue() { + return q() === 23 && ur(Tt); + } + function Tt() { + if (Te(), q() === 26 || q() === 24) + return !0; + if (r0(q())) { + if (Te(), tn()) + return !0; + } else if (tn()) + Te(); + else + return !1; + return q() === 59 || q() === 28 ? !0 : q() !== 58 ? !1 : (Te(), q() === 59 || q() === 28 || q() === 24); + } + function Lt(Q, xe, qe) { + const gt = Vf( + 16, + () => zp( + /*inOuterAwaitContext*/ + !1 + ), + 23, + 24 + /* CloseBracketToken */ + ), Nt = Fd(); + sg(); + const dr = g.createIndexSignature(qe, gt, Nt); + return wr(Bt(dr, Q), xe); + } + function lr(Q, xe, qe) { + const gt = kr(), Nt = bi( + 58 + /* QuestionToken */ + ); + let dr; + if (q() === 21 || q() === 30) { + const In = S_(), Ti = Sf( + 4 + /* Type */ + ), fi = nd( + 59, + /*isType*/ + !0 + ); + dr = g.createMethodSignature(qe, gt, Nt, In, Ti, fi); + } else { + const In = Fd(); + dr = g.createPropertySignature(qe, gt, Nt, In), q() === 64 && (dr.initializer = id()); + } + return sg(), wr(Bt(dr, Q), xe); + } + function Gr() { + if (q() === 21 || q() === 30 || q() === 139 || q() === 153) + return !0; + let Q = !1; + for (; r0(q()); ) + Q = !0, Te(); + return q() === 23 ? !0 : (Me() && (Q = !0, Te()), Q ? q() === 21 || q() === 30 || q() === 58 || q() === 59 || q() === 28 || ea() : !1); + } + function _r() { + if (q() === 21 || q() === 30) + return Oe( + 179 + /* CallSignature */ + ); + if (q() === 105 && ur(_n)) + return Oe( + 180 + /* ConstructSignature */ + ); + const Q = z(), xe = he(), qe = Qt( + /*allowDecorators*/ + !1 + ); + return yn( + 139 + /* GetKeyword */ + ) ? lg( + Q, + xe, + qe, + 177, + 4 + /* Type */ + ) : yn( + 153 + /* SetKeyword */ + ) ? lg( + Q, + xe, + qe, + 178, + 4 + /* Type */ + ) : Ue() ? Lt(Q, xe, qe) : lr(Q, xe, qe); + } + function _n() { + return Te(), q() === 21 || q() === 30; + } + function gi() { + return Te() === 25; + } + function nn() { + switch (Te()) { + case 21: + case 30: + case 25: + return !0; + } + return !1; + } + function ii() { + const Q = z(); + return Bt(g.createTypeLiteralNode(Vr()), Q); + } + function Vr() { + let Q; + return qt( + 19 + /* OpenBraceToken */ + ) ? (Q = Pa(4, _r), qt( + 20 + /* CloseBraceToken */ + )) : Q = L_(), Q; + } + function Yi() { + return Te(), q() === 40 || q() === 41 ? Te() === 148 : (q() === 148 && Te(), q() === 23 && Cl() && Te() === 103); + } + function ca() { + const Q = z(), xe = Uo(); + qt( + 103 + /* InKeyword */ + ); + const qe = Al(); + return Bt(g.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + xe, + qe, + /*defaultType*/ + void 0 + ), Q); + } + function El() { + const Q = z(); + qt( + 19 + /* OpenBraceToken */ + ); + let xe; + (q() === 148 || q() === 40 || q() === 41) && (xe = fc(), xe.kind !== 148 && qt( + 148 + /* ReadonlyKeyword */ + )), qt( + 23 + /* OpenBracketToken */ + ); + const qe = ca(), gt = Li( + 130 + /* AsKeyword */ + ) ? Al() : void 0; + qt( + 24 + /* CloseBracketToken */ + ); + let Nt; + (q() === 58 || q() === 40 || q() === 41) && (Nt = fc(), Nt.kind !== 58 && qt( + 58 + /* QuestionToken */ + )); + const dr = Fd(); + Ka(); + const In = Pa(4, _r); + return qt( + 20 + /* CloseBraceToken */ + ), Bt(g.createMappedTypeNode(xe, qe, gt, Nt, dr, In), Q); + } + function Tu() { + const Q = z(); + if (Li( + 26 + /* DotDotDotToken */ + )) + return Bt(g.createRestTypeNode(Al()), Q); + const xe = Al(); + if (FC(xe) && xe.pos === xe.type.pos) { + const qe = g.createOptionalTypeNode(xe.type); + return ot(qe, xe), qe.flags = xe.flags, qe; + } + return xe; + } + function mp() { + return Te() === 59 || q() === 58 && Te() === 59; + } + function By() { + return q() === 26 ? Du(Te()) && mp() : Du(q()) && mp(); + } + function Wp() { + if (ur(By)) { + const Q = z(), xe = he(), qe = bi( + 26 + /* DotDotDotToken */ + ), gt = Uo(), Nt = bi( + 58 + /* QuestionToken */ + ); + qt( + 59 + /* ColonToken */ + ); + const dr = Tu(), In = g.createNamedTupleMember(qe, gt, Nt, dr); + return wr(Bt(In, Q), xe); + } + return Tu(); + } + function Zx() { + const Q = z(); + return Bt( + g.createTupleTypeNode( + Vf( + 21, + Wp, + 23, + 24 + /* CloseBracketToken */ + ) + ), + Q + ); + } + function P6() { + const Q = z(); + qt( + 21 + /* OpenParenToken */ + ); + const xe = Al(); + return qt( + 22 + /* CloseParenToken */ + ), Bt(g.createParenthesizedType(xe), Q); + } + function Kb() { + let Q; + if (q() === 128) { + const xe = z(); + Te(); + const qe = Bt(O( + 128 + /* AbstractKeyword */ + ), xe); + Q = Fa([qe], xe); + } + return Q; + } + function e2() { + const Q = z(), xe = he(), qe = Kb(), gt = Li( + 105 + /* NewKeyword */ + ); + E.assert(!qe || gt, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); + const Nt = S_(), dr = Sf( + 4 + /* Type */ + ), In = nd( + 39, + /*isType*/ + !1 + ), Ti = gt ? g.createConstructorTypeNode(qe, Nt, dr, In) : g.createFunctionTypeNode(Nt, dr, In); + return wr(Bt(Ti, Q), xe); + } + function Jy() { + const Q = fc(); + return q() === 25 ? void 0 : Q; + } + function Tv(Q) { + const xe = z(); + Q && Te(); + let qe = q() === 112 || q() === 97 || q() === 106 ? fc() : Qi(q()); + return Q && (qe = Bt(g.createPrefixUnaryExpression(41, qe), xe)), Bt(g.createLiteralTypeNode(qe), xe); + } + function CS() { + return Te(), q() === 102; + } + function zy() { + de |= 4194304; + const Q = z(), xe = Li( + 114 + /* TypeOfKeyword */ + ); + qt( + 102 + /* ImportKeyword */ + ), qt( + 21 + /* OpenParenToken */ + ); + const qe = Al(); + let gt; + if (Li( + 28 + /* CommaToken */ + )) { + const In = t.getTokenStart(); + qt( + 19 + /* OpenBraceToken */ + ); + const Ti = q(); + if (Ti === 118 || Ti === 132 ? Te() : yt(p._0_expected, Ws( + 118 + /* WithKeyword */ + )), qt( + 59 + /* ColonToken */ + ), gt = U6( + Ti, + /*skipKeyword*/ + !0 + ), !qt( + 20 + /* CloseBraceToken */ + )) { + const fi = Bo(ye); + fi && fi.code === p._0_expected.code && Fs( + fi, + XT(ge, ve, In, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } + qt( + 22 + /* CloseParenToken */ + ); + const Nt = Li( + 25 + /* DotToken */ + ) ? ys() : void 0, dr = wa(); + return Bt(g.createImportTypeNode(qe, gt, Nt, dr, xe), Q); + } + function xv() { + return Te(), q() === 9 || q() === 10; + } + function t2() { + switch (q()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 155: + case 136: + case 157: + case 146: + case 151: + return Mr(Jy) || ya(); + case 67: + t.reScanAsteriskEqualsToken(); + case 42: + return ig(); + case 61: + t.reScanQuestionToken(); + case 58: + return w0(); + case 100: + return qg(); + case 54: + return Ug(); + case 15: + case 11: + case 9: + case 10: + case 112: + case 97: + case 106: + return Tv(); + case 41: + return ur(xv) ? Tv( + /*negative*/ + !0 + ) : ya(); + case 116: + return fc(); + case 110: { + const Q = rd(); + return q() === 142 && !t.hasPrecedingLineBreak() ? dp(Q) : Q; + } + case 114: + return ur(CS) ? zy() : za(); + case 19: + return ur(Yi) ? El() : ii(); + case 23: + return Zx(); + case 21: + return P6(); + case 102: + return zy(); + case 131: + return ur(Ru) ? A6() : ya(); + case 16: + return zr(); + default: + return ya(); + } + } + function ag(Q) { + switch (q()) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 136: + case 148: + case 155: + case 158: + case 116: + case 157: + case 106: + case 110: + case 114: + case 146: + case 19: + case 23: + case 30: + case 52: + case 51: + case 105: + case 11: + case 9: + case 10: + case 112: + case 97: + case 151: + case 42: + case 58: + case 54: + case 26: + case 140: + case 102: + case 131: + case 15: + case 16: + return !0; + case 100: + return !Q; + case 41: + return !Q && ur(xv); + case 21: + return !Q && ur(La); + default: + return tn(); + } + } + function La() { + return Te(), q() === 22 || Od( + /*isJSDocParameter*/ + !1 + ) || ag(); + } + function ES() { + const Q = z(); + let xe = t2(); + for (; !t.hasPrecedingLineBreak(); ) + switch (q()) { + case 54: + Te(), xe = Bt(g.createJSDocNonNullableType( + xe, + /*postfix*/ + !0 + ), Q); + break; + case 58: + if (ur(Ct)) + return xe; + Te(), xe = Bt(g.createJSDocNullableType( + xe, + /*postfix*/ + !0 + ), Q); + break; + case 23: + if (qt( + 23 + /* OpenBracketToken */ + ), ag()) { + const qe = Al(); + qt( + 24 + /* CloseBracketToken */ + ), xe = Bt(g.createIndexedAccessTypeNode(xe, qe), Q); + } else + qt( + 24 + /* CloseBracketToken */ + ), xe = Bt(g.createArrayTypeNode(xe), Q); + break; + default: + return xe; + } + return xe; + } + function w6(Q) { + const xe = z(); + return qt(Q), Bt(g.createTypeOperatorNode(Q, qf()), xe); + } + function Ah() { + if (Li( + 96 + /* ExtendsKeyword */ + )) { + const Q = nt(Al); + if (ft() || q() !== 58) + return Q; + } + } + function O0() { + const Q = z(), xe = Ao(), qe = Mr(Ah), gt = g.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + xe, + qe + ); + return Bt(gt, Q); + } + function og() { + const Q = z(); + return qt( + 140 + /* InferKeyword */ + ), Bt(g.createInferTypeNode(O0()), Q); + } + function qf() { + const Q = q(); + switch (Q) { + case 143: + case 158: + case 148: + return w6(Q); + case 140: + return og(); + } + return $e(ES); + } + function lf(Q) { + if (F0()) { + const xe = e2(); + let qe; + return Xm(xe) ? qe = Q ? p.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type : p.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type : qe = Q ? p.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type : p.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type, je(xe, qe), xe; + } + } + function r_(Q, xe, qe) { + const gt = z(), Nt = Q === 52, dr = Li(Q); + let In = dr && lf(Nt) || xe(); + if (q() === Q || dr) { + const Ti = [In]; + for (; Li(Q); ) + Ti.push(lf(Nt) || xe()); + In = Bt(qe(Fa(Ti, gt)), gt); + } + return In; + } + function Tf() { + return r_(51, qf, g.createIntersectionTypeNode); + } + function Gg() { + return r_(52, Tf, g.createUnionTypeNode); + } + function gP() { + return Te(), q() === 105; + } + function F0() { + return q() === 30 || q() === 21 && ur(DS) ? !0 : q() === 105 || q() === 128 && ur(gP); + } + function Wy() { + if (r0(q()) && Qt( + /*allowDecorators*/ + !1 + ), tn() || q() === 110) + return Te(), !0; + if (q() === 23 || q() === 19) { + const Q = ye.length; + return Qg(), Q === ye.length; + } + return !1; + } + function DS() { + return Te(), !!(q() === 22 || q() === 26 || Wy() && (q() === 59 || q() === 28 || q() === 58 || q() === 64 || q() === 22 && (Te(), q() === 39))); + } + function PS() { + const Q = z(), xe = tn() && Mr(kv), qe = Al(); + return xe ? Bt(g.createTypePredicateNode( + /*assertsModifier*/ + void 0, + xe, + qe + ), Q) : qe; + } + function kv() { + const Q = Ao(); + if (q() === 142 && !t.hasPrecedingLineBreak()) + return Te(), Q; + } + function A6() { + const Q = z(), xe = jo( + 131 + /* AssertsKeyword */ + ), qe = q() === 110 ? rd() : Ao(), gt = Li( + 142 + /* IsKeyword */ + ) ? Al() : void 0; + return Bt(g.createTypePredicateNode(xe, qe, gt), Q); + } + function Al() { + if (Pr & 81920) + return Ps(81920, Al); + if (F0()) + return e2(); + const Q = z(), xe = Gg(); + if (!ft() && !t.hasPrecedingLineBreak() && Li( + 96 + /* ExtendsKeyword */ + )) { + const qe = nt(Al); + qt( + 58 + /* QuestionToken */ + ); + const gt = $e(Al); + qt( + 59 + /* ColonToken */ + ); + const Nt = $e(Al); + return Bt(g.createConditionalTypeNode(xe, qe, gt, Nt), Q); + } + return xe; + } + function Fd() { + return Li( + 59 + /* ColonToken */ + ) ? Al() : void 0; + } + function r2() { + switch (q()) { + case 110: + case 108: + case 106: + case 112: + case 97: + case 9: + case 10: + case 11: + case 15: + case 16: + case 21: + case 23: + case 19: + case 100: + case 86: + case 105: + case 44: + case 69: + case 80: + return !0; + case 102: + return ur(nn); + default: + return tn(); + } + } + function We() { + if (r2()) + return !0; + switch (q()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 46: + case 47: + case 30: + case 135: + case 127: + case 81: + case 60: + return !0; + default: + return L0() ? !0 : tn(); + } + } + function Vy() { + return q() !== 19 && q() !== 100 && q() !== 86 && q() !== 60 && We(); + } + function ll() { + const Q = bt(); + Q && ri( + /*val*/ + !1 + ); + const xe = z(); + let qe = T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ), gt; + for (; gt = bi( + 28 + /* CommaToken */ + ); ) + qe = bn(qe, gt, T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ), xe); + return Q && ri( + /*val*/ + !0 + ), qe; + } + function id() { + return Li( + 64 + /* EqualsToken */ + ) ? T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ) : void 0; + } + function T_(Q) { + if (Uy()) + return Hf(); + const xe = va(Q) || AS(Q); + if (xe) + return xe; + const qe = z(), gt = he(), Nt = Cv( + 0 + /* Lowest */ + ); + return Nt.kind === 80 && q() === 39 ? qy( + qe, + Nt, + Q, + gt, + /*asyncModifier*/ + void 0 + ) : __(Nt) && dh(wt()) ? bn(Nt, fc(), T_(Q), qe) : i2(Nt, qe, Q); + } + function Uy() { + return q() === 127 ? jt() ? !0 : ur(ak) : !1; + } + function Vp() { + return Te(), !t.hasPrecedingLineBreak() && tn(); + } + function Hf() { + const Q = z(); + return Te(), !t.hasPrecedingLineBreak() && (q() === 42 || We()) ? Bt( + g.createYieldExpression( + bi( + 42 + /* AsteriskToken */ + ), + T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ) + ), + Q + ) : Bt(g.createYieldExpression( + /*asteriskToken*/ + void 0, + /*expression*/ + void 0 + ), Q); + } + function qy(Q, xe, qe, gt, Nt) { + E.assert(q() === 39, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); + const dr = g.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + xe, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ); + Bt(dr, xe.pos); + const In = Fa([dr], dr.pos, dr.end), Ti = jo( + 39 + /* EqualsGreaterThanToken */ + ), fi = Hy( + /*isAsync*/ + !!Nt, + qe + ), ni = g.createArrowFunction( + Nt, + /*typeParameters*/ + void 0, + In, + /*type*/ + void 0, + Ti, + fi + ); + return wr(Bt(ni, Q), gt); + } + function va(Q) { + const xe = Sm(); + if (xe !== 0) + return xe === 1 ? Nh( + /*allowAmbiguity*/ + !0, + /*allowReturnTypeInArrowFunction*/ + !0 + ) : Mr(() => n2(Q)); + } + function Sm() { + return q() === 21 || q() === 30 || q() === 134 ? ur(wS) : q() === 39 ? 1 : 0; + } + function wS() { + if (q() === 134 && (Te(), t.hasPrecedingLineBreak() || q() !== 21 && q() !== 30)) + return 0; + const Q = q(), xe = Te(); + if (Q === 21) { + if (xe === 22) + switch (Te()) { + case 39: + case 59: + case 19: + return 1; + default: + return 0; + } + if (xe === 23 || xe === 19) + return 2; + if (xe === 26) + return 1; + if (r0(xe) && xe !== 134 && ur(Cl)) + return Te() === 130 ? 0 : 1; + if (!tn() && xe !== 110) + return 0; + switch (Te()) { + case 59: + return 1; + case 58: + return Te(), q() === 59 || q() === 28 || q() === 64 || q() === 22 ? 1 : 0; + case 28: + case 64: + case 22: + return 2; + } + return 0; + } else + return E.assert( + Q === 30 + /* LessThanToken */ + ), !tn() && q() !== 87 ? 0 : Ie === 1 ? ur(() => { + Li( + 87 + /* ConstKeyword */ + ); + const gt = Te(); + if (gt === 96) + switch (Te()) { + case 64: + case 32: + case 44: + return !1; + default: + return !0; + } + else if (gt === 28 || gt === 64) + return !0; + return !1; + }) ? 1 : 0 : 2; + } + function n2(Q) { + const xe = t.getTokenStart(); + if (Kt?.has(xe)) + return; + const qe = Nh( + /*allowAmbiguity*/ + !1, + Q + ); + return qe || (Kt || (Kt = /* @__PURE__ */ new Set())).add(xe), qe; + } + function AS(Q) { + if (q() === 134 && ur(NS) === 1) { + const xe = z(), qe = he(), gt = Hn(), Nt = Cv( + 0 + /* Lowest */ + ); + return qy(xe, Nt, Q, qe, gt); + } + } + function NS() { + if (q() === 134) { + if (Te(), t.hasPrecedingLineBreak() || q() === 39) + return 0; + const Q = Cv( + 0 + /* Lowest */ + ); + if (!t.hasPrecedingLineBreak() && Q.kind === 80 && q() === 39) + return 1; + } + return 0; + } + function Nh(Q, xe) { + const qe = z(), gt = he(), Nt = Hn(), dr = ut(Nt, Z4) ? 2 : 0, In = S_(); + let Ti; + if (qt( + 21 + /* OpenParenToken */ + )) { + if (Q) + Ti = wh(dr, Q); + else { + const s1 = wh(dr, Q); + if (!s1) + return; + Ti = s1; + } + if (!qt( + 22 + /* CloseParenToken */ + ) && !Q) + return; + } else { + if (!Q) + return; + Ti = L_(); + } + const fi = q() === 59, ni = nd( + 59, + /*isType*/ + !1 + ); + if (ni && !Q && tc(ni)) + return; + let oi = ni; + for (; oi?.kind === 196; ) + oi = oi.type; + const ro = oi && LC(oi); + if (!Q && q() !== 39 && (ro || q() !== 19)) + return; + const no = q(), Ta = jo( + 39 + /* EqualsGreaterThanToken */ + ), Gf = no === 39 || no === 19 ? Hy(ut(Nt, Z4), xe) : Ao(); + if (!xe && fi && q() !== 59) + return; + const Cm = g.createArrowFunction(Nt, In, Ti, ni, Ta, Gf); + return wr(Bt(Cm, qe), gt); + } + function Hy(Q, xe) { + if (q() === 19) + return B0( + Q ? 2 : 0 + /* None */ + ); + if (q() !== 27 && q() !== 100 && q() !== 86 && e1() && !Vy()) + return B0(16 | (Q ? 2 : 0)); + const qe = Vt; + Vt = !1; + const gt = Q ? re(() => T_(xe)) : Ee(() => T_(xe)); + return Vt = qe, gt; + } + function i2(Q, xe, qe) { + const gt = bi( + 58 + /* QuestionToken */ + ); + if (!gt) + return Q; + let Nt; + return Bt( + g.createConditionalExpression( + Q, + gt, + Ps(n, () => T_( + /*allowReturnTypeInArrowFunction*/ + !1 + )), + Nt = jo( + 59 + /* ColonToken */ + ), + wp(Nt) ? T_(qe) : lc( + 80, + /*reportAtCurrentPosition*/ + !1, + p._0_expected, + Ws( + 59 + /* ColonToken */ + ) + ) + ), + xe + ); + } + function Cv(Q) { + const xe = z(), qe = M0(); + return xf(Q, qe, xe); + } + function sd(Q) { + return Q === 103 || Q === 165; + } + function xf(Q, xe, qe) { + for (; ; ) { + wt(); + const gt = E3(q()); + if (!(q() === 43 ? gt >= Q : gt > Q) || q() === 103 && be()) + break; + if (q() === 130 || q() === 152) { + if (t.hasPrecedingLineBreak()) + break; + { + const dr = q(); + Te(), xe = dr === 152 ? Ni(xe, Al()) : x_(xe, Al()); + } + } else + xe = bn(xe, fc(), Cv(gt), qe); + } + return xe; + } + function L0() { + return be() && q() === 103 ? !1 : E3(q()) > 0; + } + function Ni(Q, xe) { + return Bt(g.createSatisfiesExpression(Q, xe), Q.pos); + } + function bn(Q, xe, qe, gt) { + return Bt(g.createBinaryExpression(Q, xe, qe), gt); + } + function x_(Q, xe) { + return Bt(g.createAsExpression(Q, xe), Q.pos); + } + function Gy() { + const Q = z(); + return Bt(g.createPrefixUnaryExpression(q(), _e(Tm)), Q); + } + function cg() { + const Q = z(); + return Bt(g.createDeleteExpression(_e(Tm)), Q); + } + function Kx() { + const Q = z(); + return Bt(g.createTypeOfExpression(_e(Tm)), Q); + } + function Ih() { + const Q = z(); + return Bt(g.createVoidExpression(_e(Tm)), Q); + } + function N6() { + return q() === 135 ? kt() ? !0 : ur(ak) : !1; + } + function $g() { + const Q = z(); + return Bt(g.createAwaitExpression(_e(Tm)), Q); + } + function M0() { + if (ad()) { + const qe = z(), gt = IS(); + return q() === 43 ? xf(E3(q()), gt, qe) : gt; + } + const Q = q(), xe = Tm(); + if (q() === 43) { + const qe = sa(ve, xe.pos), { end: gt } = xe; + xe.kind === 216 ? W(qe, gt, p.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses) : (E.assert(N7(Q)), W(qe, gt, p.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, Ws(Q))); + } + return xe; + } + function Tm() { + switch (q()) { + case 40: + case 41: + case 55: + case 54: + return Gy(); + case 91: + return cg(); + case 114: + return Kx(); + case 116: + return Ih(); + case 30: + return Ie === 1 ? Oh( + /*inExpressionContext*/ + !0, + /*topInvalidNodePosition*/ + void 0, + /*openingTag*/ + void 0, + /*mustBeUnary*/ + !0 + ) : Dv(); + case 135: + if (N6()) + return $g(); + default: + return IS(); + } + } + function ad() { + switch (q()) { + case 40: + case 41: + case 55: + case 54: + case 91: + case 114: + case 116: + case 135: + return !1; + case 30: + if (Ie !== 1) + return !1; + default: + return !0; + } + } + function IS() { + if (q() === 46 || q() === 47) { + const xe = z(); + return Bt(g.createPrefixUnaryExpression(q(), _e($y)), xe); + } else if (Ie === 1 && q() === 30 && ur(F_)) + return Oh( + /*inExpressionContext*/ + !0 + ); + const Q = $y(); + if (E.assert(__(Q)), (q() === 46 || q() === 47) && !t.hasPrecedingLineBreak()) { + const xe = q(); + return Te(), Bt(g.createPostfixUnaryExpression(Q, xe), Q.pos); + } + return Q; + } + function $y() { + const Q = z(); + let xe; + return q() === 102 ? ur(_n) ? (de |= 4194304, xe = fc()) : ur(gi) ? (Te(), Te(), xe = Bt(g.createMetaProperty(102, Uo()), Q), de |= 8388608) : xe = s2() : xe = q() === 108 ? bo() : s2(), ld(Q, xe); + } + function s2() { + const Q = z(), xe = LS(); + return Xg( + Q, + xe, + /*allowOptionalChain*/ + !0 + ); + } + function bo() { + const Q = z(); + let xe = fc(); + if (q() === 30) { + const qe = z(), gt = Mr(wv); + gt !== void 0 && (W(qe, z(), p.super_may_not_use_type_arguments), uf() || (xe = g.createExpressionWithTypeArguments(xe, gt))); + } + return q() === 21 || q() === 25 || q() === 23 ? xe : (jo(25, p.super_must_be_followed_by_an_argument_list_or_member_access), Bt(V(xe, Pt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !0, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + )), Q)); + } + function Oh(Q, xe, qe, gt = !1) { + const Nt = z(), dr = hP(Q); + let In; + if (dr.kind === 286) { + let Ti = FS(dr), fi; + const ni = Ti[Ti.length - 1]; + if (ni?.kind === 284 && !cv(ni.openingElement.tagName, ni.closingElement.tagName) && cv(dr.tagName, ni.closingElement.tagName)) { + const oi = ni.children.end, ro = Bt( + g.createJsxElement( + ni.openingElement, + ni.children, + Bt(g.createJsxClosingElement(Bt(D(""), oi, oi)), oi, oi) + ), + ni.openingElement.pos, + oi + ); + Ti = Fa([...Ti.slice(0, Ti.length - 1), ro], Ti.pos, oi), fi = ni.closingElement; + } else + fi = sn(dr, Q), cv(dr.tagName, fi.tagName) || (qe && pm(qe) && cv(fi.tagName, qe.tagName) ? je(dr.tagName, p.JSX_element_0_has_no_corresponding_closing_tag, r4(ve, dr.tagName)) : je(fi.tagName, p.Expected_corresponding_JSX_closing_tag_for_0, r4(ve, dr.tagName))); + In = Bt(g.createJsxElement(dr, Ti, fi), Nt); + } else dr.kind === 289 ? In = Bt(g.createJsxFragment(dr, FS(dr), O6(Q)), Nt) : (E.assert( + dr.kind === 285 + /* JsxSelfClosingElement */ + ), In = dr); + if (!gt && Q && q() === 30) { + const Ti = typeof xe > "u" ? In.pos : xe, fi = Mr(() => Oh( + /*inExpressionContext*/ + !0, + Ti + )); + if (fi) { + const ni = lc( + 28, + /*reportAtCurrentPosition*/ + !1 + ); + return uJ(ni, fi.pos, 0), W(sa(ve, Ti), fi.end, p.JSX_expressions_must_have_one_parent_element), Bt(g.createBinaryExpression(In, ni, fi), Nt); + } + } + return In; + } + function ek() { + const Q = z(), xe = g.createJsxText( + t.getTokenValue(), + Ke === 13 + /* JsxTextAllWhiteSpaces */ + ); + return Ke = t.scanJsxToken(), Bt(xe, Q); + } + function OS(Q, xe) { + switch (xe) { + case 1: + if (cS(Q)) + je(Q, p.JSX_fragment_has_no_corresponding_closing_tag); + else { + const qe = Q.tagName, gt = Math.min(sa(ve, qe.pos), qe.end); + W(gt, qe.end, p.JSX_element_0_has_no_corresponding_closing_tag, r4(ve, Q.tagName)); + } + return; + case 31: + case 7: + return; + case 12: + case 13: + return ek(); + case 19: + return iu( + /*inExpressionContext*/ + !1 + ); + case 30: + return Oh( + /*inExpressionContext*/ + !1, + /*topInvalidNodePosition*/ + void 0, + Q + ); + default: + return E.assertNever(xe); + } + } + function FS(Q) { + const xe = [], qe = z(), gt = nr; + for (nr |= 16384; ; ) { + const Nt = OS(Q, Ke = t.reScanJsxToken()); + if (!Nt || (xe.push(Nt), pm(Q) && Nt?.kind === 284 && !cv(Nt.openingElement.tagName, Nt.closingElement.tagName) && cv(Q.tagName, Nt.closingElement.tagName))) + break; + } + return nr = gt, Fa(xe, qe); + } + function tk() { + const Q = z(); + return Bt(g.createJsxAttributes(Pa(13, ns)), Q); + } + function hP(Q) { + const xe = z(); + if (qt( + 30 + /* LessThanToken */ + ), q() === 32) + return mn(), Bt(g.createJsxOpeningFragment(), xe); + const qe = I6(), gt = Pr & 524288 ? void 0 : Fv(), Nt = tk(); + let dr; + return q() === 32 ? (mn(), dr = g.createJsxOpeningElement(qe, gt, Nt)) : (qt( + 44 + /* SlashToken */ + ), qt( + 32, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && (Q ? Te() : mn()), dr = g.createJsxSelfClosingElement(qe, gt, Nt)), Bt(dr, xe); + } + function I6() { + const Q = z(), xe = hn(); + if (Cd(xe)) + return xe; + let qe = xe; + for (; Li( + 25 + /* DotToken */ + ); ) + qe = Bt(V(qe, Pt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !1, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !1 + )), Q); + return qe; + } + function hn() { + const Q = z(); + fr(); + const xe = q() === 110, qe = A(); + return Li( + 59 + /* ColonToken */ + ) ? (fr(), Bt(g.createJsxNamespacedName(qe, A()), Q)) : xe ? Bt(g.createToken( + 110 + /* ThisKeyword */ + ), Q) : qe; + } + function iu(Q) { + const xe = z(); + if (!qt( + 19 + /* OpenBraceToken */ + )) + return; + let qe, gt; + return q() !== 20 && (Q || (qe = bi( + 26 + /* DotDotDotToken */ + )), gt = ll()), Q ? qt( + 20 + /* CloseBraceToken */ + ) : qt( + 20, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && mn(), Bt(g.createJsxExpression(qe, gt), xe); + } + function ns() { + if (q() === 19) + return Xy(); + const Q = z(); + return Bt(g.createJsxAttribute(Ev(), k_()), Q); + } + function k_() { + if (q() === 64) { + if (Di() === 11) + return vt(); + if (q() === 19) + return iu( + /*inExpressionContext*/ + !0 + ); + if (q() === 30) + return Oh( + /*inExpressionContext*/ + !0 + ); + yt(p.or_JSX_element_expected); + } + } + function Ev() { + const Q = z(); + fr(); + const xe = A(); + return Li( + 59 + /* ColonToken */ + ) ? (fr(), Bt(g.createJsxNamespacedName(xe, A()), Q)) : xe; + } + function Xy() { + const Q = z(); + qt( + 19 + /* OpenBraceToken */ + ), qt( + 26 + /* DotDotDotToken */ + ); + const xe = ll(); + return qt( + 20 + /* CloseBraceToken */ + ), Bt(g.createJsxSpreadAttribute(xe), Q); + } + function sn(Q, xe) { + const qe = z(); + qt( + 31 + /* LessThanSlashToken */ + ); + const gt = I6(); + return qt( + 32, + /*diagnosticMessage*/ + void 0, + /*shouldAdvance*/ + !1 + ) && (xe || !cv(Q.tagName, gt) ? Te() : mn()), Bt(g.createJsxClosingElement(gt), qe); + } + function O6(Q) { + const xe = z(); + return qt( + 31 + /* LessThanSlashToken */ + ), qt( + 32, + p.Expected_corresponding_closing_tag_for_JSX_fragment, + /*shouldAdvance*/ + !1 + ) && (Q ? Te() : mn()), Bt(g.createJsxJsxClosingFragment(), xe); + } + function Dv() { + E.assert(Ie !== 1, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments."); + const Q = z(); + qt( + 30 + /* LessThanToken */ + ); + const xe = Al(); + qt( + 32 + /* GreaterThanToken */ + ); + const qe = Tm(); + return Bt(g.createTypeAssertion(xe, qe), Q); + } + function Mu() { + return Te(), Du(q()) || q() === 23 || uf(); + } + function od() { + return q() === 29 && ur(Mu); + } + function gp(Q) { + if (Q.flags & 64) + return !0; + if (vx(Q)) { + let xe = Q.expression; + for (; vx(xe) && !(xe.flags & 64); ) + xe = xe.expression; + if (xe.flags & 64) { + for (; vx(Q); ) + Q.flags |= 64, Q = Q.expression; + return !0; + } + } + return !1; + } + function Qy(Q, xe, qe) { + const gt = Pt( + /*allowIdentifierNames*/ + !0, + /*allowPrivateIdentifiers*/ + !0, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + !0 + ), Nt = qe || gp(xe), dr = Nt ? L(xe, qe, gt) : V(xe, gt); + if (Nt && wi(dr.name) && je(dr.name, p.An_optional_chain_cannot_contain_private_identifiers), bh(xe) && xe.typeArguments) { + const In = xe.typeArguments.pos - 1, Ti = sa(ve, xe.typeArguments.end) + 1; + W(In, Ti, p.An_instantiation_expression_cannot_be_followed_by_a_property_access); + } + return Bt(dr, Q); + } + function Pv(Q, xe, qe) { + let gt; + if (q() === 24) + gt = lc( + 80, + /*reportAtCurrentPosition*/ + !0, + p.An_element_access_expression_should_take_an_argument + ); + else { + const dr = Yt(ll); + Pf(dr) && (dr.text = Fu(dr.text)), gt = dr; + } + qt( + 24 + /* CloseBracketToken */ + ); + const Nt = qe || gp(xe) ? U(xe, qe, gt) : $(xe, gt); + return Bt(Nt, Q); + } + function Xg(Q, xe, qe) { + for (; ; ) { + let gt, Nt = !1; + if (qe && od() ? (gt = jo( + 29 + /* QuestionDotToken */ + ), Nt = Du(q())) : Nt = Li( + 25 + /* DotToken */ + ), Nt) { + xe = Qy(Q, xe, gt); + continue; + } + if ((gt || !bt()) && Li( + 23 + /* OpenBracketToken */ + )) { + xe = Pv(Q, xe, gt); + continue; + } + if (uf()) { + xe = !gt && xe.kind === 233 ? cd(Q, xe.expression, gt, xe.typeArguments) : cd( + Q, + xe, + gt, + /*typeArguments*/ + void 0 + ); + continue; + } + if (!gt) { + if (q() === 54 && !t.hasPrecedingLineBreak()) { + Te(), xe = Bt(g.createNonNullExpression(xe), Q); + continue; + } + const dr = Mr(wv); + if (dr) { + xe = Bt(g.createExpressionWithTypeArguments(xe, dr), Q); + continue; + } + } + return xe; + } + } + function uf() { + return q() === 15 || q() === 16; + } + function cd(Q, xe, qe, gt) { + const Nt = g.createTaggedTemplateExpression( + xe, + gt, + q() === 15 ? (br( + /*isTaggedTemplate*/ + !0 + ), vt()) : hr( + /*isTaggedTemplate*/ + !0 + ) + ); + return (qe || xe.flags & 64) && (Nt.flags |= 64), Nt.questionDotToken = qe, Bt(Nt, Q); + } + function ld(Q, xe) { + for (; ; ) { + xe = Xg( + Q, + xe, + /*allowOptionalChain*/ + !0 + ); + let qe; + const gt = bi( + 29 + /* QuestionDotToken */ + ); + if (gt && (qe = Mr(wv), uf())) { + xe = cd(Q, xe, gt, qe); + continue; + } + if (qe || q() === 21) { + !gt && xe.kind === 233 && (qe = xe.typeArguments, xe = xe.expression); + const Nt = R0(), dr = gt || gp(xe) ? ce(xe, gt, qe, Nt) : G(xe, qe, Nt); + xe = Bt(dr, Q); + continue; + } + if (gt) { + const Nt = lc( + 80, + /*reportAtCurrentPosition*/ + !1, + p.Identifier_expected + ); + xe = Bt(L(xe, gt, Nt), Q); + } + break; + } + return xe; + } + function R0() { + qt( + 21 + /* OpenParenToken */ + ); + const Q = Gc(11, RS); + return qt( + 22 + /* CloseParenToken */ + ), Q; + } + function wv() { + if (Pr & 524288 || Lr() !== 30) + return; + Te(); + const Q = Gc(20, Al); + if (wt() === 32) + return Te(), Q && rk() ? Q : void 0; + } + function rk() { + switch (q()) { + case 21: + case 15: + case 16: + return !0; + case 30: + case 32: + case 40: + case 41: + return !1; + } + return t.hasPrecedingLineBreak() || L0() || !We(); + } + function LS() { + switch (q()) { + case 15: + t.getTokenFlags() & 26656 && br( + /*isTaggedTemplate*/ + !1 + ); + case 9: + case 10: + case 11: + return vt(); + case 110: + case 108: + case 106: + case 112: + case 97: + return fc(); + case 21: + return a2(); + case 23: + return Ld(); + case 19: + return Yy(); + case 134: + if (!ur(Nv)) + break; + return Zy(); + case 60: + return Zi(); + case 86: + return fs(); + case 100: + return Zy(); + case 105: + return j0(); + case 44: + case 69: + if (ir() === 14) + return vt(); + break; + case 16: + return hr( + /*isTaggedTemplate*/ + !1 + ); + case 81: + return Ht(); + } + return Ao(p.Expression_expected); + } + function a2() { + const Q = z(), xe = he(); + qt( + 21 + /* OpenParenToken */ + ); + const qe = Yt(ll); + return qt( + 22 + /* CloseParenToken */ + ), wr(Bt(X(qe), Q), xe); + } + function MS() { + const Q = z(); + qt( + 26 + /* DotDotDotToken */ + ); + const xe = T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return Bt(g.createSpreadElement(xe), Q); + } + function o2() { + return q() === 26 ? MS() : q() === 28 ? Bt(g.createOmittedExpression(), z()) : T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + } + function RS() { + return Ps(n, o2); + } + function Ld() { + const Q = z(), xe = t.getTokenStart(), qe = qt( + 23 + /* OpenBracketToken */ + ), gt = t.hasPrecedingLineBreak(), Nt = Gc(15, o2); + return Co(23, 24, qe, xe), Bt(j(Nt, gt), Q); + } + function F6() { + const Q = z(), xe = he(); + if (bi( + 26 + /* DotDotDotToken */ + )) { + const oi = T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return wr(Bt(g.createSpreadAssignment(oi), Q), xe); + } + const qe = Qt( + /*allowDecorators*/ + !0 + ); + if (yn( + 139 + /* GetKeyword */ + )) + return lg( + Q, + xe, + qe, + 177, + 0 + /* None */ + ); + if (yn( + 153 + /* SetKeyword */ + )) + return lg( + Q, + xe, + qe, + 178, + 0 + /* None */ + ); + const gt = bi( + 42 + /* AsteriskToken */ + ), Nt = tn(), dr = kr(), In = bi( + 58 + /* QuestionToken */ + ), Ti = bi( + 54 + /* ExclamationToken */ + ); + if (gt || q() === 21 || q() === 30) + return yp(Q, xe, qe, gt, dr, In, Ti); + let fi; + if (Nt && q() !== 59) { + const oi = bi( + 64 + /* EqualsToken */ + ), ro = oi ? Yt(() => T_( + /*allowReturnTypeInArrowFunction*/ + !0 + )) : void 0; + fi = g.createShorthandPropertyAssignment(dr, ro), fi.equalsToken = oi; + } else { + qt( + 59 + /* ColonToken */ + ); + const oi = Yt(() => T_( + /*allowReturnTypeInArrowFunction*/ + !0 + )); + fi = g.createPropertyAssignment(dr, oi); + } + return fi.modifiers = qe, fi.questionToken = In, fi.exclamationToken = Ti, wr(Bt(fi, Q), xe); + } + function Yy() { + const Q = z(), xe = t.getTokenStart(), qe = qt( + 19 + /* OpenBraceToken */ + ), gt = t.hasPrecedingLineBreak(), Nt = Gc( + 12, + F6, + /*considerSemicolonAsDelimiter*/ + !0 + ); + return Co(19, 20, qe, xe), Bt(F(Nt, gt), Q); + } + function Zy() { + const Q = bt(); + ri( + /*val*/ + !1 + ); + const xe = z(), qe = he(), gt = Qt( + /*allowDecorators*/ + !1 + ); + qt( + 100 + /* FunctionKeyword */ + ); + const Nt = bi( + 42 + /* AsteriskToken */ + ), dr = Nt ? 1 : 0, In = ut(gt, Z4) ? 2 : 0, Ti = dr && In ? Ne(Fh) : dr ? te(Fh) : In ? re(Fh) : Fh(), fi = S_(), ni = Sf(dr | In), oi = nd( + 59, + /*isType*/ + !1 + ), ro = B0(dr | In); + ri(Q); + const no = g.createFunctionExpression(gt, Nt, Ti, fi, ni, oi, ro); + return wr(Bt(no, xe), qe); + } + function Fh() { + return Or() ? y_() : void 0; + } + function j0() { + const Q = z(); + if (qt( + 105 + /* NewKeyword */ + ), Li( + 25 + /* DotToken */ + )) { + const dr = Uo(); + return Bt(g.createMetaProperty(105, dr), Q); + } + const xe = z(); + let qe = Xg( + xe, + LS(), + /*allowOptionalChain*/ + !1 + ), gt; + qe.kind === 233 && (gt = qe.typeArguments, qe = qe.expression), q() === 29 && yt(p.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, r4(ve, qe)); + const Nt = q() === 21 ? R0() : void 0; + return Bt(K(qe, gt, Nt), Q); + } + function hp(Q, xe) { + const qe = z(), gt = he(), Nt = t.getTokenStart(), dr = qt(19, xe); + if (dr || Q) { + const In = t.hasPrecedingLineBreak(), Ti = Pa(1, kf); + Co(19, 20, dr, Nt); + const fi = wr(Bt(Z(Ti, In), qe), gt); + return q() === 64 && (yt(p.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses), Te()), fi; + } else { + const In = L_(); + return wr(Bt(Z( + In, + /*multiLine*/ + void 0 + ), qe), gt); + } + } + function B0(Q, xe) { + const qe = jt(); + Zn(!!(Q & 1)); + const gt = kt(); + mi(!!(Q & 2)); + const Nt = Vt; + Vt = !1; + const dr = bt(); + dr && ri( + /*val*/ + !1 + ); + const In = hp(!!(Q & 16), xe); + return dr && ri( + /*val*/ + !0 + ), Vt = Nt, Zn(qe), mi(gt), In; + } + function Lh() { + const Q = z(), xe = he(); + return qt( + 27 + /* SemicolonToken */ + ), wr(Bt(g.createEmptyStatement(), Q), xe); + } + function hl() { + const Q = z(), xe = he(); + qt( + 101 + /* IfKeyword */ + ); + const qe = t.getTokenStart(), gt = qt( + 21 + /* OpenParenToken */ + ), Nt = Yt(ll); + Co(21, 22, gt, qe); + const dr = kf(), In = Li( + 93 + /* ElseKeyword */ + ) ? kf() : void 0; + return wr(Bt(pe(Nt, dr, In), Q), xe); + } + function bc() { + const Q = z(), xe = he(); + qt( + 92 + /* DoKeyword */ + ); + const qe = kf(); + qt( + 117 + /* WhileKeyword */ + ); + const gt = t.getTokenStart(), Nt = qt( + 21 + /* OpenParenToken */ + ), dr = Yt(ll); + return Co(21, 22, Nt, gt), Li( + 27 + /* SemicolonToken */ + ), wr(Bt(g.createDoStatement(qe, dr), Q), xe); + } + function Ec() { + const Q = z(), xe = he(); + qt( + 117 + /* WhileKeyword */ + ); + const qe = t.getTokenStart(), gt = qt( + 21 + /* OpenParenToken */ + ), Nt = Yt(ll); + Co(21, 22, gt, qe); + const dr = kf(); + return wr(Bt(fe(Nt, dr), Q), xe); + } + function jS() { + const Q = z(), xe = he(); + qt( + 99 + /* ForKeyword */ + ); + const qe = bi( + 135 + /* AwaitKeyword */ + ); + qt( + 21 + /* OpenParenToken */ + ); + let gt; + q() !== 27 && (q() === 115 || q() === 121 || q() === 87 || q() === 160 && ur(ok) || // this one is meant to allow of + q() === 135 && ur(zS) ? gt = t1( + /*inForStatementInitializer*/ + !0 + ) : gt = Ca(ll)); + let Nt; + if (qe ? qt( + 165 + /* OfKeyword */ + ) : Li( + 165 + /* OfKeyword */ + )) { + const dr = Yt(() => T_( + /*allowReturnTypeInArrowFunction*/ + !0 + )); + qt( + 22 + /* CloseParenToken */ + ), Nt = ae(qe, gt, dr, kf()); + } else if (Li( + 103 + /* InKeyword */ + )) { + const dr = Yt(ll); + qt( + 22 + /* CloseParenToken */ + ), Nt = g.createForInStatement(gt, dr, kf()); + } else { + qt( + 27 + /* SemicolonToken */ + ); + const dr = q() !== 27 && q() !== 22 ? Yt(ll) : void 0; + qt( + 27 + /* SemicolonToken */ + ); + const In = q() !== 22 ? Yt(ll) : void 0; + qt( + 22 + /* CloseParenToken */ + ), Nt = H(gt, dr, In, kf()); + } + return wr(Bt(Nt, Q), xe); + } + function n_(Q) { + const xe = z(), qe = he(); + qt( + Q === 252 ? 83 : 88 + /* ContinueKeyword */ + ); + const gt = ea() ? void 0 : Ao(); + Ka(); + const Nt = Q === 252 ? g.createBreakStatement(gt) : g.createContinueStatement(gt); + return wr(Bt(Nt, xe), qe); + } + function i_() { + const Q = z(), xe = he(); + qt( + 107 + /* ReturnKeyword */ + ); + const qe = ea() ? void 0 : Yt(ll); + return Ka(), wr(Bt(g.createReturnStatement(qe), Q), xe); + } + function nk() { + const Q = z(), xe = he(); + qt( + 118 + /* WithKeyword */ + ); + const qe = t.getTokenStart(), gt = qt( + 21 + /* OpenParenToken */ + ), Nt = Yt(ll); + Co(21, 22, gt, qe); + const dr = ws(67108864, kf); + return wr(Bt(g.createWithStatement(Nt, dr), Q), xe); + } + function ud() { + const Q = z(), xe = he(); + qt( + 84 + /* CaseKeyword */ + ); + const qe = Yt(ll); + qt( + 59 + /* ColonToken */ + ); + const gt = Pa(3, kf); + return wr(Bt(g.createCaseClause(qe, gt), Q), xe); + } + function ik() { + const Q = z(); + qt( + 90 + /* DefaultKeyword */ + ), qt( + 59 + /* ColonToken */ + ); + const xe = Pa(3, kf); + return Bt(g.createDefaultClause(xe), Q); + } + function Ky() { + return q() === 84 ? ud() : ik(); + } + function L6() { + const Q = z(); + qt( + 19 + /* OpenBraceToken */ + ); + const xe = Pa(2, Ky); + return qt( + 20 + /* CloseBraceToken */ + ), Bt(g.createCaseBlock(xe), Q); + } + function Av() { + const Q = z(), xe = he(); + qt( + 109 + /* SwitchKeyword */ + ), qt( + 21 + /* OpenParenToken */ + ); + const qe = Yt(ll); + qt( + 22 + /* CloseParenToken */ + ); + const gt = L6(); + return wr(Bt(g.createSwitchStatement(qe, gt), Q), xe); + } + function No() { + const Q = z(), xe = he(); + qt( + 111 + /* ThrowKeyword */ + ); + let qe = t.hasPrecedingLineBreak() ? void 0 : Yt(ll); + return qe === void 0 && (Wt++, qe = Bt(D(""), z())), wo() || $a(qe), wr(Bt(g.createThrowStatement(qe), Q), xe); + } + function M6() { + const Q = z(), xe = he(); + qt( + 113 + /* TryKeyword */ + ); + const qe = hp( + /*ignoreMissingOpenBrace*/ + !1 + ), gt = q() === 85 ? yP() : void 0; + let Nt; + return (!gt || q() === 98) && (qt(98, p.catch_or_finally_expected), Nt = hp( + /*ignoreMissingOpenBrace*/ + !1 + )), wr(Bt(g.createTryStatement(qe, gt, Nt), Q), xe); + } + function yP() { + const Q = z(); + qt( + 85 + /* CatchKeyword */ + ); + let xe; + Li( + 21 + /* OpenParenToken */ + ) ? (xe = R_(), qt( + 22 + /* CloseParenToken */ + )) : xe = void 0; + const qe = hp( + /*ignoreMissingOpenBrace*/ + !1 + ); + return Bt(g.createCatchClause(xe, qe), Q); + } + function BS() { + const Q = z(), xe = he(); + return qt( + 89 + /* DebuggerKeyword */ + ), Ka(), wr(Bt(g.createDebuggerStatement(), Q), xe); + } + function R6() { + const Q = z(); + let xe = he(), qe; + const gt = q() === 21, Nt = Yt(ll); + return Re(Nt) && Li( + 59 + /* ColonToken */ + ) ? qe = g.createLabeledStatement(Nt, kf()) : (wo() || $a(Nt), qe = ne(Nt), gt && (xe = !1)), wr(Bt(qe, Q), xe); + } + function Ru() { + return Te(), Du(q()) && !t.hasPrecedingLineBreak(); + } + function sk() { + return Te(), q() === 86 && !t.hasPrecedingLineBreak(); + } + function Nv() { + return Te(), q() === 100 && !t.hasPrecedingLineBreak(); + } + function ak() { + return Te(), (Du(q()) || q() === 9 || q() === 10 || q() === 11) && !t.hasPrecedingLineBreak(); + } + function M_() { + for (; ; ) + switch (q()) { + case 115: + case 121: + case 87: + case 100: + case 86: + case 94: + return !0; + case 160: + return ck(); + case 135: + return WS(); + case 120: + case 156: + return Vp(); + case 144: + case 145: + return C_(); + case 128: + case 129: + case 134: + case 138: + case 123: + case 124: + case 125: + case 148: + const Q = q(); + if (Te(), t.hasPrecedingLineBreak()) + return !1; + if (Q === 138 && q() === 156) + return !0; + continue; + case 162: + return Te(), q() === 19 || q() === 80 || q() === 95; + case 102: + return Te(), q() === 11 || q() === 42 || q() === 19 || Du(q()); + case 95: + let xe = Te(); + if (xe === 156 && (xe = ur(Te)), xe === 64 || xe === 42 || xe === 19 || xe === 90 || xe === 130 || xe === 60) + return !0; + continue; + case 126: + Te(); + continue; + default: + return !1; + } + } + function c2() { + return ur(M_); + } + function e1() { + switch (q()) { + case 60: + case 27: + case 19: + case 115: + case 121: + case 160: + case 100: + case 86: + case 94: + case 101: + case 92: + case 117: + case 99: + case 88: + case 83: + case 107: + case 118: + case 109: + case 111: + case 113: + case 89: + case 85: + case 98: + return !0; + case 102: + return c2() || ur(nn); + case 87: + case 95: + return c2(); + case 134: + case 138: + case 120: + case 144: + case 145: + case 156: + case 162: + return !0; + case 129: + case 125: + case 123: + case 124: + case 126: + case 148: + return c2() || !ur(Ru); + default: + return We(); + } + } + function j6() { + return Te(), Or() || q() === 19 || q() === 23; + } + function l2() { + return ur(j6); + } + function ok() { + return JS( + /*disallowOf*/ + !0 + ); + } + function JS(Q) { + return Te(), Q && q() === 165 ? !1 : (Or() || q() === 19) && !t.hasPrecedingLineBreak(); + } + function ck() { + return ur(JS); + } + function zS(Q) { + return Te() === 160 ? JS(Q) : !1; + } + function WS() { + return ur(zS); + } + function kf() { + switch (q()) { + case 27: + return Lh(); + case 19: + return hp( + /*ignoreMissingOpenBrace*/ + !1 + ); + case 115: + return jd( + z(), + he(), + /*modifiers*/ + void 0 + ); + case 121: + if (l2()) + return jd( + z(), + he(), + /*modifiers*/ + void 0 + ); + break; + case 135: + if (WS()) + return jd( + z(), + he(), + /*modifiers*/ + void 0 + ); + break; + case 160: + if (ck()) + return jd( + z(), + he(), + /*modifiers*/ + void 0 + ); + break; + case 100: + return u2( + z(), + he(), + /*modifiers*/ + void 0 + ); + case 86: + return ta( + z(), + he(), + /*modifiers*/ + void 0 + ); + case 101: + return hl(); + case 92: + return bc(); + case 117: + return Ec(); + case 99: + return jS(); + case 88: + return n_( + 251 + /* ContinueStatement */ + ); + case 83: + return n_( + 252 + /* BreakStatement */ + ); + case 107: + return i_(); + case 118: + return nk(); + case 109: + return Av(); + case 111: + return No(); + case 113: + case 85: + case 98: + return M6(); + case 89: + return BS(); + case 60: + return Md(); + case 134: + case 120: + case 156: + case 144: + case 145: + case 138: + case 87: + case 94: + case 95: + case 102: + case 123: + case 124: + case 125: + case 128: + case 129: + case 126: + case 148: + case 162: + if (c2()) + return Md(); + break; + } + return R6(); + } + function _f(Q) { + return Q.kind === 138; + } + function Md() { + const Q = z(), xe = he(), qe = Qt( + /*allowDecorators*/ + !0 + ); + if (ut(qe, _f)) { + const Nt = B6(Q); + if (Nt) + return Nt; + for (const dr of qe) + dr.flags |= 33554432; + return ws(33554432, () => Iv(Q, xe, qe)); + } else + return Iv(Q, xe, qe); + } + function B6(Q) { + return ws(33554432, () => { + const xe = Do(nr, Q); + if (xe) + return to(xe); + }); + } + function Iv(Q, xe, qe) { + switch (q()) { + case 115: + case 121: + case 87: + case 160: + case 135: + return jd(Q, xe, qe); + case 100: + return u2(Q, xe, qe); + case 86: + return ta(Q, xe, qe); + case 120: + return VS(Q, xe, qe); + case 156: + return Lv(Q, xe, qe); + case 94: + return km(Q, xe, qe); + case 162: + case 144: + case 145: + return V6(Q, xe, qe); + case 102: + return vL(Q, xe, qe); + case 95: + switch (Te(), q()) { + case 90: + case 64: + return xP(Q, xe, qe); + case 130: + return Mv(Q, xe, qe); + default: + return Aa(Q, xe, qe); + } + default: + if (qe) { + const gt = lc( + 282, + /*reportAtCurrentPosition*/ + !0, + p.Declaration_expected + ); + return z4(gt, Q), gt.modifiers = qe, gt; + } + return; + } + } + function Ma() { + return Te() === 11; + } + function xn() { + return Te(), q() === 161 || q() === 64; + } + function C_() { + return Te(), !t.hasPrecedingLineBreak() && (tn() || q() === 11); + } + function s_(Q, xe) { + if (q() !== 19) { + if (Q & 4) { + sg(); + return; + } + if (ea()) { + Ka(); + return; + } + } + return B0(Q, xe); + } + function lk() { + const Q = z(); + if (q() === 28) + return Bt(g.createOmittedExpression(), Q); + const xe = bi( + 26 + /* DotDotDotToken */ + ), qe = Qg(), gt = id(); + return Bt(g.createBindingElement( + xe, + /*propertyName*/ + void 0, + qe, + gt + ), Q); + } + function Mh() { + const Q = z(), xe = bi( + 26 + /* DotDotDotToken */ + ), qe = Or(); + let gt = kr(), Nt; + qe && q() !== 59 ? (Nt = gt, gt = void 0) : (qt( + 59 + /* ColonToken */ + ), Nt = Qg()); + const dr = id(); + return Bt(g.createBindingElement(xe, gt, Nt, dr), Q); + } + function J6() { + const Q = z(); + qt( + 19 + /* OpenBraceToken */ + ); + const xe = Yt(() => Gc(9, Mh)); + return qt( + 20 + /* CloseBraceToken */ + ), Bt(g.createObjectBindingPattern(xe), Q); + } + function z6() { + const Q = z(); + qt( + 23 + /* OpenBracketToken */ + ); + const xe = Yt(() => Gc(10, lk)); + return qt( + 24 + /* CloseBracketToken */ + ), Bt(g.createArrayBindingPattern(xe), Q); + } + function Ov() { + return q() === 19 || q() === 23 || q() === 81 || Or(); + } + function Qg(Q) { + return q() === 23 ? z6() : q() === 19 ? J6() : y_(Q); + } + function Rd() { + return R_( + /*allowExclamation*/ + !0 + ); + } + function R_(Q) { + const xe = z(), qe = he(), gt = Qg(p.Private_identifiers_are_not_allowed_in_variable_declarations); + let Nt; + Q && gt.kind === 80 && q() === 54 && !t.hasPrecedingLineBreak() && (Nt = fc()); + const dr = Fd(), In = sd(q()) ? void 0 : id(), Ti = le(gt, Nt, dr, In); + return wr(Bt(Ti, xe), qe); + } + function t1(Q) { + const xe = z(); + let qe = 0; + switch (q()) { + case 115: + break; + case 121: + qe |= 1; + break; + case 87: + qe |= 2; + break; + case 160: + qe |= 4; + break; + case 135: + E.assert(WS()), qe |= 6, Te(); + break; + default: + E.fail(); + } + Te(); + let gt; + if (q() === 165 && ur(Yg)) + gt = L_(); + else { + const Nt = be(); + ln(Q), gt = Gc( + 8, + Q ? R_ : Rd + ), ln(Nt); + } + return Bt(Ae(gt, qe), xe); + } + function Yg() { + return Cl() && Te() === 22; + } + function jd(Q, xe, qe) { + const gt = t1( + /*inForStatementInitializer*/ + !1 + ); + Ka(); + const Nt = oe(qe, gt); + return wr(Bt(Nt, Q), xe); + } + function u2(Q, xe, qe) { + const gt = kt(), Nt = sm(qe); + qt( + 100 + /* FunctionKeyword */ + ); + const dr = bi( + 42 + /* AsteriskToken */ + ), In = Nt & 2048 ? Fh() : y_(), Ti = dr ? 1 : 0, fi = Nt & 1024 ? 2 : 0, ni = S_(); + Nt & 32 && mi( + /*value*/ + !0 + ); + const oi = Sf(Ti | fi), ro = nd( + 59, + /*isType*/ + !1 + ), no = s_(Ti | fi, p.or_expected); + mi(gt); + const Ta = g.createFunctionDeclaration(qe, dr, In, ni, oi, ro, no); + return wr(Bt(Ta, Q), xe); + } + function $c() { + if (q() === 137) + return qt( + 137 + /* ConstructorKeyword */ + ); + if (q() === 11 && ur(Te) === 21) + return Mr(() => { + const Q = vt(); + return Q.text === "constructor" ? Q : void 0; + }); + } + function uk(Q, xe, qe) { + return Mr(() => { + if ($c()) { + const gt = S_(), Nt = Sf( + 0 + /* None */ + ), dr = nd( + 59, + /*isType*/ + !1 + ), In = s_(0, p.or_expected), Ti = g.createConstructorDeclaration(qe, Nt, In); + return Ti.typeParameters = gt, Ti.type = dr, wr(Bt(Ti, Q), xe); + } + }); + } + function yp(Q, xe, qe, gt, Nt, dr, In, Ti) { + const fi = gt ? 1 : 0, ni = ut(qe, Z4) ? 2 : 0, oi = S_(), ro = Sf(fi | ni), no = nd( + 59, + /*isType*/ + !1 + ), Ta = s_(fi | ni, Ti), Gf = g.createMethodDeclaration( + qe, + gt, + Nt, + dr, + oi, + ro, + no, + Ta + ); + return Gf.exclamationToken = In, wr(Bt(Gf, Q), xe); + } + function _d(Q, xe, qe, gt, Nt) { + const dr = !Nt && !t.hasPrecedingLineBreak() ? bi( + 54 + /* ExclamationToken */ + ) : void 0, In = Fd(), Ti = Ps(90112, id); + hs(gt, In, Ti); + const fi = g.createPropertyDeclaration( + qe, + gt, + Nt || dr, + In, + Ti + ); + return wr(Bt(fi, Q), xe); + } + function ff(Q, xe, qe) { + const gt = bi( + 42 + /* AsteriskToken */ + ), Nt = kr(), dr = bi( + 58 + /* QuestionToken */ + ); + return gt || q() === 21 || q() === 30 ? yp( + Q, + xe, + qe, + gt, + Nt, + dr, + /*exclamationToken*/ + void 0, + p.or_expected + ) : _d(Q, xe, qe, Nt, dr); + } + function lg(Q, xe, qe, gt, Nt) { + const dr = kr(), In = S_(), Ti = Sf( + 0 + /* None */ + ), fi = nd( + 59, + /*isType*/ + !1 + ), ni = s_(Nt), oi = gt === 177 ? g.createGetAccessorDeclaration(qe, dr, Ti, fi, ni) : g.createSetAccessorDeclaration(qe, dr, Ti, ni); + return oi.typeParameters = In, rf(oi) && (oi.type = fi), wr(Bt(oi, Q), xe); + } + function r1() { + let Q; + if (q() === 60) + return !0; + for (; r0(q()); ) { + if (Q = q(), yj(Q)) + return !0; + Te(); + } + if (q() === 42 || (Me() && (Q = q(), Te()), q() === 23)) + return !0; + if (Q !== void 0) { + if (!qu(Q) || Q === 153 || Q === 139) + return !0; + switch (q()) { + case 21: + case 30: + case 54: + case 59: + case 64: + case 58: + return !0; + default: + return ea(); + } + } + return !1; + } + function W6(Q, xe, qe) { + jo( + 126 + /* StaticKeyword */ + ); + const gt = _k(), Nt = wr(Bt(g.createClassStaticBlockDeclaration(gt), Q), xe); + return Nt.modifiers = qe, Nt; + } + function _k() { + const Q = jt(), xe = kt(); + Zn(!1), mi(!0); + const qe = hp( + /*ignoreMissingOpenBrace*/ + !1 + ); + return Zn(Q), mi(xe), qe; + } + function k() { + if (kt() && q() === 135) { + const Q = z(), xe = Ao(p.Expression_expected); + Te(); + const qe = Xg( + Q, + xe, + /*allowOptionalChain*/ + !0 + ); + return ld(Q, qe); + } + return $y(); + } + function ie() { + const Q = z(); + if (!Li( + 60 + /* AtToken */ + )) + return; + const xe = rt(k); + return Bt(g.createDecorator(xe), Q); + } + function _t(Q, xe, qe) { + const gt = z(), Nt = q(); + if (q() === 87 && xe) { + if (!Mr(li)) + return; + } else { + if (qe && q() === 126 && ur(a8)) + return; + if (Q && q() === 126) + return; + if (!ol()) + return; + } + return Bt(O(Nt), gt); + } + function Qt(Q, xe, qe) { + const gt = z(); + let Nt, dr, In, Ti = !1, fi = !1, ni = !1; + if (Q && q() === 60) + for (; dr = ie(); ) + Nt = Tr(Nt, dr); + for (; In = _t(Ti, xe, qe); ) + In.kind === 126 && (Ti = !0), Nt = Tr(Nt, In), fi = !0; + if (fi && Q && q() === 60) + for (; dr = ie(); ) + Nt = Tr(Nt, dr), ni = !0; + if (ni) + for (; In = _t(Ti, xe, qe); ) + In.kind === 126 && (Ti = !0), Nt = Tr(Nt, In); + return Nt && Fa(Nt, gt); + } + function Hn() { + let Q; + if (q() === 134) { + const xe = z(); + Te(); + const qe = Bt(O( + 134 + /* AsyncKeyword */ + ), xe); + Q = Fa([qe], xe); + } + return Q; + } + function Ui() { + const Q = z(), xe = he(); + if (q() === 27) + return Te(), wr(Bt(g.createSemicolonClassElement(), Q), xe); + const qe = Qt( + /*allowDecorators*/ + !0, + /*permitConstAsModifier*/ + !0, + /*stopOnStartOfClassStaticBlock*/ + !0 + ); + if (q() === 126 && ur(a8)) + return W6(Q, xe, qe); + if (yn( + 139 + /* GetKeyword */ + )) + return lg( + Q, + xe, + qe, + 177, + 0 + /* None */ + ); + if (yn( + 153 + /* SetKeyword */ + )) + return lg( + Q, + xe, + qe, + 178, + 0 + /* None */ + ); + if (q() === 137 || q() === 11) { + const gt = uk(Q, xe, qe); + if (gt) + return gt; + } + if (Ue()) + return Lt(Q, xe, qe); + if (Du(q()) || q() === 11 || q() === 9 || q() === 42 || q() === 23) + if (ut(qe, _f)) { + for (const Nt of qe) + Nt.flags |= 33554432; + return ws(33554432, () => ff(Q, xe, qe)); + } else + return ff(Q, xe, qe); + if (qe) { + const gt = lc( + 80, + /*reportAtCurrentPosition*/ + !0, + p.Declaration_expected + ); + return _d( + Q, + xe, + qe, + gt, + /*questionToken*/ + void 0 + ); + } + return E.fail("Should not have attempted to parse class member declaration."); + } + function Zi() { + const Q = z(), xe = he(), qe = Qt( + /*allowDecorators*/ + !0 + ); + if (q() === 86) + return su( + Q, + xe, + qe, + 231 + /* ClassExpression */ + ); + const gt = lc( + 282, + /*reportAtCurrentPosition*/ + !0, + p.Expression_expected + ); + return z4(gt, Q), gt.modifiers = qe, gt; + } + function fs() { + return su( + z(), + he(), + /*modifiers*/ + void 0, + 231 + /* ClassExpression */ + ); + } + function ta(Q, xe, qe) { + return su( + Q, + xe, + qe, + 263 + /* ClassDeclaration */ + ); + } + function su(Q, xe, qe, gt) { + const Nt = kt(); + qt( + 86 + /* ClassKeyword */ + ); + const dr = au(), In = S_(); + ut(qe, _x) && mi( + /*value*/ + !0 + ); + const Ti = xm(); + let fi; + qt( + 19 + /* OpenBraceToken */ + ) ? (fi = fk(), qt( + 20 + /* CloseBraceToken */ + )) : fi = L_(), mi(Nt); + const ni = gt === 263 ? g.createClassDeclaration(qe, dr, In, Ti, fi) : g.createClassExpression(qe, dr, In, Ti, fi); + return wr(Bt(ni, Q), xe); + } + function au() { + return Or() && !n1() ? Lu(Or()) : void 0; + } + function n1() { + return q() === 119 && ur(kc); + } + function xm() { + if (Rh()) + return Pa(22, E_); + } + function E_() { + const Q = z(), xe = q(); + E.assert( + xe === 96 || xe === 119 + /* ImplementsKeyword */ + ), Te(); + const qe = Gc(7, i1); + return Bt(g.createHeritageClause(xe, qe), Q); + } + function i1() { + const Q = z(), xe = $y(); + if (xe.kind === 233) + return xe; + const qe = Fv(); + return Bt(g.createExpressionWithTypeArguments(xe, qe), Q); + } + function Fv() { + return q() === 30 ? Vf( + 20, + Al, + 30, + 32 + /* GreaterThanToken */ + ) : void 0; + } + function Rh() { + return q() === 96 || q() === 119; + } + function fk() { + return Pa(5, Ui); + } + function VS(Q, xe, qe) { + qt( + 120 + /* InterfaceKeyword */ + ); + const gt = Ao(), Nt = S_(), dr = xm(), In = Vr(), Ti = g.createInterfaceDeclaration(qe, gt, Nt, dr, In); + return wr(Bt(Ti, Q), xe); + } + function Lv(Q, xe, qe) { + qt( + 156 + /* TypeKeyword */ + ), t.hasPrecedingLineBreak() && yt(p.Line_break_not_permitted_here); + const gt = Ao(), Nt = S_(); + qt( + 64 + /* EqualsToken */ + ); + const dr = q() === 141 && Mr(Jy) || Al(); + Ka(); + const In = g.createTypeAliasDeclaration(qe, gt, Nt, dr); + return wr(Bt(In, Q), xe); + } + function Si() { + const Q = z(), xe = he(), qe = kr(), gt = Yt(id); + return wr(Bt(g.createEnumMember(qe, gt), Q), xe); + } + function km(Q, xe, qe) { + qt( + 94 + /* EnumKeyword */ + ); + const gt = Ao(); + let Nt; + qt( + 19 + /* OpenBraceToken */ + ) ? (Nt = et(() => Gc(6, Si)), qt( + 20 + /* CloseBraceToken */ + )) : Nt = L_(); + const dr = g.createEnumDeclaration(qe, gt, Nt); + return wr(Bt(dr, Q), xe); + } + function Ur() { + const Q = z(); + let xe; + return qt( + 19 + /* OpenBraceToken */ + ) ? (xe = Pa(1, kf), qt( + 20 + /* CloseBraceToken */ + )) : xe = L_(), Bt(g.createModuleBlock(xe), Q); + } + function pk(Q, xe, qe, gt) { + const Nt = gt & 32, dr = gt & 8 ? Uo() : Ao(), In = Li( + 25 + /* DotToken */ + ) ? pk( + z(), + /*hasJSDoc*/ + !1, + /*modifiers*/ + void 0, + 8 | Nt + ) : Ur(), Ti = g.createModuleDeclaration(qe, dr, In, gt); + return wr(Bt(Ti, Q), xe); + } + function dk(Q, xe, qe) { + let gt = 0, Nt; + q() === 162 ? (Nt = Ao(), gt |= 2048) : (Nt = vt(), Nt.text = Fu(Nt.text)); + let dr; + q() === 19 ? dr = Ur() : Ka(); + const In = g.createModuleDeclaration(qe, Nt, dr, gt); + return wr(Bt(In, Q), xe); + } + function V6(Q, xe, qe) { + let gt = 0; + if (q() === 162) + return dk(Q, xe, qe); + if (Li( + 145 + /* NamespaceKeyword */ + )) + gt |= 32; + else if (qt( + 144 + /* ModuleKeyword */ + ), q() === 11) + return dk(Q, xe, qe); + return pk(Q, xe, qe, gt); + } + function vP() { + return q() === 149 && ur(bP); + } + function bP() { + return Te() === 21; + } + function a8() { + return Te() === 19; + } + function SP() { + return Te() === 44; + } + function Mv(Q, xe, qe) { + qt( + 130 + /* AsKeyword */ + ), qt( + 145 + /* NamespaceKeyword */ + ); + const gt = Ao(); + Ka(); + const Nt = g.createNamespaceExportDeclaration(gt); + return Nt.modifiers = qe, wr(Bt(Nt, Q), xe); + } + function vL(Q, xe, qe) { + qt( + 102 + /* ImportKeyword */ + ); + const gt = t.getTokenFullStart(); + let Nt; + tn() && (Nt = Ao()); + let dr = !1; + if (Nt?.escapedText === "type" && (q() !== 161 || tn() && ur(xn)) && (tn() || l8()) && (dr = !0, Nt = tn() ? Ao() : void 0), Nt && !ug()) + return jh(Q, xe, qe, Nt, dr); + const In = Rv(Nt, gt, dr), Ti = mk(), fi = o8(); + Ka(); + const ni = g.createImportDeclaration(qe, In, Ti, fi); + return wr(Bt(ni, Q), xe); + } + function Rv(Q, xe, qe, gt = !1) { + let Nt; + return (Q || // import id + q() === 42 || // import * + q() === 19) && (Nt = TP(Q, xe, qe, gt), qt( + 161 + /* FromKeyword */ + )), Nt; + } + function o8() { + const Q = q(); + if ((Q === 118 || Q === 132) && !t.hasPrecedingLineBreak()) + return U6(Q); + } + function c8() { + const Q = z(), xe = Du(q()) ? Uo() : Qi( + 11 + /* StringLiteral */ + ); + qt( + 59 + /* ColonToken */ + ); + const qe = T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + return Bt(g.createImportAttribute(xe, qe), Q); + } + function U6(Q, xe) { + const qe = z(); + xe || qt(Q); + const gt = t.getTokenStart(); + if (qt( + 19 + /* OpenBraceToken */ + )) { + const Nt = t.hasPrecedingLineBreak(), dr = Gc( + 24, + c8, + /*considerSemicolonAsDelimiter*/ + !0 + ); + if (!qt( + 20 + /* CloseBraceToken */ + )) { + const In = Bo(ye); + In && In.code === p._0_expected.code && Fs( + In, + XT(ge, ve, gt, 1, p.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + return Bt(g.createImportAttributes(dr, Nt, Q), qe); + } else { + const Nt = Fa( + [], + z(), + /*end*/ + void 0, + /*hasTrailingComma*/ + !1 + ); + return Bt(g.createImportAttributes( + Nt, + /*multiLine*/ + !1, + Q + ), qe); + } + } + function l8() { + return q() === 42 || q() === 19; + } + function ug() { + return q() === 28 || q() === 161; + } + function jh(Q, xe, qe, gt, Nt) { + qt( + 64 + /* EqualsToken */ + ); + const dr = _g(); + Ka(); + const In = g.createImportEqualsDeclaration(qe, Nt, gt, dr); + return wr(Bt(In, Q), xe); + } + function TP(Q, xe, qe, gt) { + let Nt; + return (!Q || Li( + 28 + /* CommaToken */ + )) && (gt && t.setSkipJsDocLeadingAsterisks(!0), Nt = q() === 42 ? fg() : _2( + 275 + /* NamedImports */ + ), gt && t.setSkipJsDocLeadingAsterisks(!1)), Bt(g.createImportClause(qe, Q, Nt), xe); + } + function _g() { + return vP() ? jv() : Y( + /*allowReservedWords*/ + !1 + ); + } + function jv() { + const Q = z(); + qt( + 149 + /* RequireKeyword */ + ), qt( + 21 + /* OpenParenToken */ + ); + const xe = mk(); + return qt( + 22 + /* CloseParenToken */ + ), Bt(g.createExternalModuleReference(xe), Q); + } + function mk() { + if (q() === 11) { + const Q = vt(); + return Q.text = Fu(Q.text), Q; + } else + return ll(); + } + function fg() { + const Q = z(); + qt( + 42 + /* AsteriskToken */ + ), qt( + 130 + /* AsKeyword */ + ); + const xe = Ao(); + return Bt(g.createNamespaceImport(xe), Q); + } + function _2(Q) { + const xe = z(), qe = Q === 275 ? g.createNamedImports(Vf( + 23, + Xc, + 19, + 20 + /* CloseBraceToken */ + )) : g.createNamedExports(Vf( + 23, + bL, + 19, + 20 + /* CloseBraceToken */ + )); + return Bt(qe, xe); + } + function bL() { + const Q = he(); + return wr(q6( + 281 + /* ExportSpecifier */ + ), Q); + } + function Xc() { + return q6( + 276 + /* ImportSpecifier */ + ); + } + function q6(Q) { + const xe = z(); + let qe = qu(q()) && !tn(), gt = t.getTokenStart(), Nt = t.getTokenEnd(), dr = !1, In, Ti = !0, fi = Uo(); + if (fi.escapedText === "type") + if (q() === 130) { + const ro = Uo(); + if (q() === 130) { + const no = Uo(); + Du(q()) ? (dr = !0, In = ro, fi = oi(), Ti = !1) : (In = fi, fi = no, Ti = !1); + } else Du(q()) ? (In = fi, Ti = !1, fi = oi()) : (dr = !0, fi = ro); + } else Du(q()) && (dr = !0, fi = oi()); + Ti && q() === 130 && (In = fi, qt( + 130 + /* AsKeyword */ + ), fi = oi()), Q === 276 && qe && W(gt, Nt, p.Identifier_expected); + const ni = Q === 276 ? g.createImportSpecifier(dr, In, fi) : g.createExportSpecifier(dr, In, fi); + return Bt(ni, xe); + function oi() { + return qe = qu(q()) && !tn(), gt = t.getTokenStart(), Nt = t.getTokenEnd(), Uo(); + } + } + function Ea(Q) { + return Bt(g.createNamespaceExport(Uo()), Q); + } + function Aa(Q, xe, qe) { + const gt = kt(); + mi( + /*value*/ + !0 + ); + let Nt, dr, In; + const Ti = Li( + 156 + /* TypeKeyword */ + ), fi = z(); + Li( + 42 + /* AsteriskToken */ + ) ? (Li( + 130 + /* AsKeyword */ + ) && (Nt = Ea(fi)), qt( + 161 + /* FromKeyword */ + ), dr = mk()) : (Nt = _2( + 279 + /* NamedExports */ + ), (q() === 161 || q() === 11 && !t.hasPrecedingLineBreak()) && (qt( + 161 + /* FromKeyword */ + ), dr = mk())); + const ni = q(); + dr && (ni === 118 || ni === 132) && !t.hasPrecedingLineBreak() && (In = U6(ni)), Ka(), mi(gt); + const oi = g.createExportDeclaration(qe, Ti, Nt, dr, In); + return wr(Bt(oi, Q), xe); + } + function xP(Q, xe, qe) { + const gt = kt(); + mi( + /*value*/ + !0 + ); + let Nt; + Li( + 64 + /* EqualsToken */ + ) ? Nt = !0 : qt( + 90 + /* DefaultKeyword */ + ); + const dr = T_( + /*allowReturnTypeInArrowFunction*/ + !0 + ); + Ka(), mi(gt); + const In = g.createExportAssignment(qe, Nt, dr); + return wr(Bt(In, Q), xe); + } + let H6; + ((Q) => { + Q[Q.SourceElements = 0] = "SourceElements", Q[Q.BlockStatements = 1] = "BlockStatements", Q[Q.SwitchClauses = 2] = "SwitchClauses", Q[Q.SwitchClauseStatements = 3] = "SwitchClauseStatements", Q[Q.TypeMembers = 4] = "TypeMembers", Q[Q.ClassMembers = 5] = "ClassMembers", Q[Q.EnumMembers = 6] = "EnumMembers", Q[Q.HeritageClauseElement = 7] = "HeritageClauseElement", Q[Q.VariableDeclarations = 8] = "VariableDeclarations", Q[Q.ObjectBindingElements = 9] = "ObjectBindingElements", Q[Q.ArrayBindingElements = 10] = "ArrayBindingElements", Q[Q.ArgumentExpressions = 11] = "ArgumentExpressions", Q[Q.ObjectLiteralMembers = 12] = "ObjectLiteralMembers", Q[Q.JsxAttributes = 13] = "JsxAttributes", Q[Q.JsxChildren = 14] = "JsxChildren", Q[Q.ArrayLiteralMembers = 15] = "ArrayLiteralMembers", Q[Q.Parameters = 16] = "Parameters", Q[Q.JSDocParameters = 17] = "JSDocParameters", Q[Q.RestProperties = 18] = "RestProperties", Q[Q.TypeParameters = 19] = "TypeParameters", Q[Q.TypeArguments = 20] = "TypeArguments", Q[Q.TupleElementTypes = 21] = "TupleElementTypes", Q[Q.HeritageClauses = 22] = "HeritageClauses", Q[Q.ImportOrExportSpecifiers = 23] = "ImportOrExportSpecifiers", Q[Q.ImportAttributes = 24] = "ImportAttributes", Q[Q.JSDocComment = 25] = "JSDocComment", Q[Q.Count = 26] = "Count"; + })(H6 || (H6 = {})); + let kP; + ((Q) => { + Q[Q.False = 0] = "False", Q[Q.True = 1] = "True", Q[Q.Unknown = 2] = "Unknown"; + })(kP || (kP = {})); + let gk; + ((Q) => { + function xe(ni, oi, ro) { + Ai( + "file.js", + ni, + 99, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ), t.setText(ni, oi, ro), Ke = t.scan(); + const no = qe(), Ta = At( + "file.js", + 99, + 1, + /*isDeclarationFile*/ + !1, + [], + O( + 1 + /* EndOfFileToken */ + ), + 0, + ka + ), Gf = QT(ye, Ta); + return Fe && (Ta.jsDocDiagnostics = QT(Fe, Ta)), _s(), no ? { jsDocTypeExpression: no, diagnostics: Gf } : void 0; + } + Q.parseJSDocTypeExpressionForTests = xe; + function qe(ni) { + const oi = z(), ro = (ni ? Li : qt)( + 19 + /* OpenBraceToken */ + ), no = ws(16777216, cf); + (!ni || ro) && ga( + 20 + /* CloseBraceToken */ + ); + const Ta = g.createJSDocTypeExpression(no); + return Le(Ta), Bt(Ta, oi); + } + Q.parseJSDocTypeExpression = qe; + function gt() { + const ni = z(), oi = Li( + 19 + /* OpenBraceToken */ + ), ro = z(); + let no = Y( + /*allowReservedWords*/ + !1 + ); + for (; q() === 81; ) + en(), dt(), no = Bt(g.createJSDocMemberName(no, Ao()), ro); + oi && ga( + 20 + /* CloseBraceToken */ + ); + const Ta = g.createJSDocNameReference(no); + return Le(Ta), Bt(Ta, ni); + } + Q.parseJSDocNameReference = gt; + function Nt(ni, oi, ro) { + Ai( + "", + ni, + 99, + /*syntaxCursor*/ + void 0, + 1, + 0 + /* ParseAll */ + ); + const no = ws(16777216, () => fi(oi, ro)), Gf = QT(ye, { languageVariant: 0, text: ni }); + return _s(), no ? { jsDoc: no, diagnostics: Gf } : void 0; + } + Q.parseIsolatedJSDocComment = Nt; + function dr(ni, oi, ro) { + const no = Ke, Ta = ye.length, Gf = zt, Cm = ws(16777216, () => fi(oi, ro)); + return Da(Cm, ni), Pr & 524288 && (Fe || (Fe = []), Bn(Fe, ye, Ta)), Ke = no, ye.length = Ta, zt = Gf, Cm; + } + Q.parseJSDocComment = dr; + let In; + ((ni) => { + ni[ni.BeginningOfLine = 0] = "BeginningOfLine", ni[ni.SawAsterisk = 1] = "SawAsterisk", ni[ni.SavingComments = 2] = "SavingComments", ni[ni.SavingBackticks = 3] = "SavingBackticks"; + })(In || (In = {})); + let Ti; + ((ni) => { + ni[ni.Property = 1] = "Property", ni[ni.Parameter = 2] = "Parameter", ni[ni.CallbackParameter = 4] = "CallbackParameter"; + })(Ti || (Ti = {})); + function fi(ni = 0, oi) { + const ro = ve, no = oi === void 0 ? ro.length : ni + oi; + if (oi = no - ni, E.assert(ni >= 0), E.assert(ni <= no), E.assert(no <= ro.length), !az(ro, ni)) + return; + let Ta, Gf, Cm, s1, J0, $f = []; + const z0 = [], u8 = nr; + nr |= 1 << 25; + const _8 = t.scanRange(ni + 3, oi - 5, SL); + return nr = u8, _8; + function SL() { + let yr = 1, un, On = ni - (ro.lastIndexOf(` +`, ni) + 1) + 4; + function pi(co) { + un || (un = On), $f.push(co), On += co.length; + } + for (dt(); f2( + 5 + /* WhitespaceTrivia */ + ); ) ; + f2( + 4 + /* NewLineTrivia */ + ) && (yr = 0, On = 0); + e: + for (; ; ) { + switch (q()) { + case 60: + Qc($f), J0 || (J0 = z()), Ft(W0(On)), yr = 0, un = void 0; + break; + case 4: + $f.push(t.getTokenText()), yr = 0, On = 0; + break; + case 42: + const co = t.getTokenText(); + yr === 1 ? (yr = 2, pi(co)) : (E.assert( + yr === 0 + /* BeginningOfLine */ + ), yr = 1, On += co.length); + break; + case 5: + E.assert(yr !== 2, "whitespace shouldn't come from the scanner while saving top-level comment text"); + const ou = t.getTokenText(); + un !== void 0 && On + ou.length > un && $f.push(ou.slice(un - On)), On += ou.length; + break; + case 1: + break e; + case 82: + yr = 2, pi(t.getTokenValue()); + break; + case 19: + yr = 2; + const Yc = t.getTokenFullStart(), Bd = t.getTokenEnd() - 1, vp = v(Bd); + if (vp) { + s1 || Na($f), z0.push(Bt(g.createJSDocText($f.join("")), s1 ?? ni, Yc)), z0.push(vp), $f = [], s1 = t.getTokenEnd(); + break; + } + default: + yr = 2, pi(t.getTokenText()); + break; + } + yr === 2 ? xt( + /*inBackticks*/ + !1 + ) : dt(); + } + const di = $f.join("").trimEnd(); + z0.length && di.length && z0.push(Bt(g.createJSDocText(di), s1 ?? ni, J0)), z0.length && Ta && E.assertIsDefined(J0, "having parsed tags implies that the end of the comment span should be set"); + const ba = Ta && Fa(Ta, Gf, Cm); + return Bt(g.createJSDocComment(z0.length ? Fa(z0, ni, J0) : di.length ? di : void 0, ba), ni, no); + } + function Na(yr) { + for (; yr.length && (yr[0] === ` +` || yr[0] === "\r"); ) + yr.shift(); + } + function Qc(yr) { + for (; yr.length; ) { + const un = yr[yr.length - 1].trimEnd(); + if (un === "") + yr.pop(); + else if (un.length < yr[yr.length - 1].length) { + yr[yr.length - 1] = un; + break; + } else + break; + } + } + function a1() { + for (; ; ) { + if (dt(), q() === 1) + return !0; + if (!(q() === 5 || q() === 4)) + return !1; + } + } + function fd() { + if (!((q() === 5 || q() === 4) && ur(a1))) + for (; q() === 5 || q() === 4; ) + dt(); + } + function Bv() { + if ((q() === 5 || q() === 4) && ur(a1)) + return ""; + let yr = t.hasPrecedingLineBreak(), un = !1, On = ""; + for (; yr && q() === 42 || q() === 5 || q() === 4; ) + On += t.getTokenText(), q() === 4 ? (yr = !0, un = !0, On = "") : q() === 42 && (yr = !1), dt(); + return un ? On : ""; + } + function W0(yr) { + E.assert( + q() === 60 + /* AtToken */ + ); + const un = t.getTokenStart(); + dt(); + const On = US( + /*message*/ + void 0 + ), pi = Bv(); + let di; + switch (On.escapedText) { + case "author": + di = CP(un, On, yr, pi); + break; + case "implements": + di = fG(un, On, yr, pi); + break; + case "augments": + case "extends": + di = gfe(un, On, yr, pi); + break; + case "class": + case "constructor": + di = yk(un, g.createJSDocClassTag, On, yr, pi); + break; + case "public": + di = yk(un, g.createJSDocPublicTag, On, yr, pi); + break; + case "private": + di = yk(un, g.createJSDocPrivateTag, On, yr, pi); + break; + case "protected": + di = yk(un, g.createJSDocProtectedTag, On, yr, pi); + break; + case "readonly": + di = yk(un, g.createJSDocReadonlyTag, On, yr, pi); + break; + case "override": + di = yk(un, g.createJSDocOverrideTag, On, yr, pi); + break; + case "deprecated": + os = !0, di = yk(un, g.createJSDocDeprecatedTag, On, yr, pi); + break; + case "this": + di = l1(un, On, yr, pi); + break; + case "enum": + di = Zr(un, On, yr, pi); + break; + case "arg": + case "argument": + case "param": + return Cf(un, On, 2, yr); + case "return": + case "returns": + di = c1(un, On, yr, pi); + break; + case "template": + di = EL(un, On, yr, pi); + break; + case "type": + di = Jv(un, On, yr, pi); + break; + case "typedef": + di = u1(un, On, yr, pi); + break; + case "callback": + di = TL(un, On, yr, pi); + break; + case "overload": + di = $6(un, On, yr, pi); + break; + case "satisfies": + di = hfe(un, On, yr, pi); + break; + case "see": + di = uG(un, On, yr, pi); + break; + case "exception": + case "throws": + di = _G(un, On, yr, pi); + break; + case "import": + di = yfe(un, On, yr, pi); + break; + default: + di = ze(un, On, yr, pi); + break; + } + return di; + } + function j_(yr, un, On, pi) { + return pi || (On += un - yr), $r(On, pi.slice(On)); + } + function $r(yr, un) { + const On = z(); + let pi = []; + const di = []; + let ba, co = 0, ou; + function Yc(Bh) { + ou || (ou = yr), pi.push(Bh), yr += Bh.length; + } + un !== void 0 && (un !== "" && Yc(un), co = 1); + let Bd = q(); + e: + for (; ; ) { + switch (Bd) { + case 4: + co = 0, pi.push(t.getTokenText()), yr = 0; + break; + case 60: + t.resetTokenState(t.getTokenEnd() - 1); + break e; + case 1: + break e; + case 5: + E.assert(co !== 2 && co !== 3, "whitespace shouldn't come from the scanner while saving comment text"); + const Bh = t.getTokenText(); + ou !== void 0 && yr + Bh.length > ou && (pi.push(Bh.slice(ou - yr)), co = 2), yr += Bh.length; + break; + case 19: + co = 2; + const EP = t.getTokenFullStart(), bk = t.getTokenEnd() - 1, Zg = v(bk); + Zg ? (di.push(Bt(g.createJSDocText(pi.join("")), ba ?? On, EP)), di.push(Zg), pi = [], ba = t.getTokenEnd()) : Yc(t.getTokenText()); + break; + case 62: + co === 3 ? co = 2 : co = 3, Yc(t.getTokenText()); + break; + case 82: + co !== 3 && (co = 2), Yc(t.getTokenValue()); + break; + case 42: + if (co === 0) { + co = 1, yr += 1; + break; + } + default: + co !== 3 && (co = 2), Yc(t.getTokenText()); + break; + } + co === 2 || co === 3 ? Bd = xt( + co === 3 + /* SavingBackticks */ + ) : Bd = dt(); + } + Na(pi); + const vp = pi.join("").trimEnd(); + if (di.length) + return vp.length && di.push(Bt(g.createJSDocText(vp), ba ?? On)), Fa(di, On, t.getTokenEnd()); + if (vp.length) + return vp; + } + function v(yr) { + const un = Mr(B); + if (!un) + return; + dt(), fd(); + const On = w(), pi = []; + for (; q() !== 20 && q() !== 4 && q() !== 1; ) + pi.push(t.getTokenText()), dt(); + const di = un === "link" ? g.createJSDocLink : un === "linkcode" ? g.createJSDocLinkCode : g.createJSDocLinkPlain; + return Bt(di(On, pi.join("")), yr, t.getTokenEnd()); + } + function w() { + if (Du(q())) { + const yr = z(); + let un = Uo(); + for (; Li( + 25 + /* DotToken */ + ); ) + un = Bt(g.createQualifiedName(un, q() === 81 ? lc( + 80, + /*reportAtCurrentPosition*/ + !1 + ) : Uo()), yr); + for (; q() === 81; ) + en(), dt(), un = Bt(g.createJSDocMemberName(un, Ao()), yr); + return un; + } + } + function B() { + if (Bv(), q() === 19 && dt() === 60 && Du(dt())) { + const yr = t.getTokenValue(); + if (se(yr)) return yr; + } + } + function se(yr) { + return yr === "link" || yr === "linkcode" || yr === "linkplain"; + } + function ze(yr, un, On, pi) { + return Bt(g.createJSDocUnknownTag(un, j_(yr, z(), On, pi)), yr); + } + function Ft(yr) { + yr && (Ta ? Ta.push(yr) : (Ta = [yr], Gf = yr.pos), Cm = yr.end); + } + function fn() { + return Bv(), q() === 19 ? qe() : void 0; + } + function $i() { + const yr = f2( + 23 + /* OpenBracketToken */ + ); + yr && fd(); + const un = f2( + 62 + /* BacktickToken */ + ), On = zv(); + return un && Su( + 62 + /* BacktickToken */ + ), yr && (fd(), bi( + 64 + /* EqualsToken */ + ) && ll(), qt( + 24 + /* CloseBracketToken */ + )), { name: On, isBracketed: yr }; + } + function Ba(yr) { + switch (yr.kind) { + case 151: + return !0; + case 188: + return Ba(yr.elementType); + default: + return Nf(yr) && Re(yr.typeName) && yr.typeName.escapedText === "Object" && !yr.typeArguments; + } + } + function Cf(yr, un, On, pi) { + let di = fn(), ba = !di; + Bv(); + const { name: co, isBracketed: ou } = $i(), Yc = Bv(); + ba && !ur(B) && (di = fn()); + const Bd = j_(yr, z(), pi, Yc), vp = o1(di, co, On, pi); + vp && (di = vp, ba = !0); + const Bh = On === 1 ? g.createJSDocPropertyTag(un, co, ou, di, ba, Bd) : g.createJSDocParameterTag(un, co, ou, di, ba, Bd); + return Bt(Bh, yr); + } + function o1(yr, un, On, pi) { + if (yr && Ba(yr.type)) { + const di = z(); + let ba, co; + for (; ba = Mr(() => xL(On, pi, un)); ) + ba.kind === 341 || ba.kind === 348 ? co = Tr(co, ba) : ba.kind === 345 && je(ba.tagName, p.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + if (co) { + const ou = Bt(g.createJSDocTypeLiteral( + co, + yr.type.kind === 188 + /* ArrayType */ + ), di); + return Bt(g.createJSDocTypeExpression(ou), di); + } + } + } + function c1(yr, un, On, pi) { + ut(Ta, K5) && W(un.pos, t.getTokenStart(), p._0_tag_already_specified, Pi(un.escapedText)); + const di = fn(); + return Bt(g.createJSDocReturnTag(un, di, j_(yr, z(), On, pi)), yr); + } + function Jv(yr, un, On, pi) { + ut(Ta, uD) && W(un.pos, t.getTokenStart(), p._0_tag_already_specified, Pi(un.escapedText)); + const di = qe( + /*mayOmitBraces*/ + !0 + ), ba = On !== void 0 && pi !== void 0 ? j_(yr, z(), On, pi) : void 0; + return Bt(g.createJSDocTypeTag(un, di, ba), yr); + } + function uG(yr, un, On, pi) { + const ba = q() === 23 || ur(() => dt() === 60 && Du(dt()) && se(t.getTokenValue())) ? void 0 : gt(), co = On !== void 0 && pi !== void 0 ? j_(yr, z(), On, pi) : void 0; + return Bt(g.createJSDocSeeTag(un, ba, co), yr); + } + function _G(yr, un, On, pi) { + const di = fn(), ba = j_(yr, z(), On, pi); + return Bt(g.createJSDocThrowsTag(un, di, ba), yr); + } + function CP(yr, un, On, pi) { + const di = z(), ba = mfe(); + let co = t.getTokenFullStart(); + const ou = j_(yr, co, On, pi); + ou || (co = t.getTokenFullStart()); + const Yc = typeof ou != "string" ? Fa(Hi([Bt(ba, di, co)], ou), di) : ba.text + ou; + return Bt(g.createJSDocAuthorTag(un, Yc), yr); + } + function mfe() { + const yr = []; + let un = !1, On = t.getToken(); + for (; On !== 1 && On !== 4; ) { + if (On === 30) + un = !0; + else { + if (On === 60 && !un) + break; + if (On === 32 && un) { + yr.push(t.getTokenText()), t.resetTokenState(t.getTokenEnd()); + break; + } + } + yr.push(t.getTokenText()), On = dt(); + } + return g.createJSDocText(yr.join("")); + } + function fG(yr, un, On, pi) { + const di = hk(); + return Bt(g.createJSDocImplementsTag(un, di, j_(yr, z(), On, pi)), yr); + } + function gfe(yr, un, On, pi) { + const di = hk(); + return Bt(g.createJSDocAugmentsTag(un, di, j_(yr, z(), On, pi)), yr); + } + function hfe(yr, un, On, pi) { + const di = qe( + /*mayOmitBraces*/ + !1 + ), ba = On !== void 0 && pi !== void 0 ? j_(yr, z(), On, pi) : void 0; + return Bt(g.createJSDocSatisfiesTag(un, di, ba), yr); + } + function yfe(yr, un, On, pi) { + const di = t.getTokenFullStart(); + let ba; + tn() && (ba = Ao()); + const co = Rv( + ba, + di, + /*isTypeOnly*/ + !0, + /*skipJsDocLeadingAsterisks*/ + !0 + ), ou = mk(), Yc = o8(), Bd = On !== void 0 && pi !== void 0 ? j_(yr, z(), On, pi) : void 0; + return Bt(g.createJSDocImportTag(un, co, ou, Yc, Bd), yr); + } + function hk() { + const yr = Li( + 19 + /* OpenBraceToken */ + ), un = z(), On = pG(); + t.setSkipJsDocLeadingAsterisks(!0); + const pi = Fv(); + t.setSkipJsDocLeadingAsterisks(!1); + const di = g.createExpressionWithTypeArguments(On, pi), ba = Bt(di, un); + return yr && qt( + 20 + /* CloseBraceToken */ + ), ba; + } + function pG() { + const yr = z(); + let un = US(); + for (; Li( + 25 + /* DotToken */ + ); ) { + const On = US(); + un = Bt(V(un, On), yr); + } + return un; + } + function yk(yr, un, On, pi, di) { + return Bt(un(On, j_(yr, z(), pi, di)), yr); + } + function l1(yr, un, On, pi) { + const di = qe( + /*mayOmitBraces*/ + !0 + ); + return fd(), Bt(g.createJSDocThisTag(un, di, j_(yr, z(), On, pi)), yr); + } + function Zr(yr, un, On, pi) { + const di = qe( + /*mayOmitBraces*/ + !0 + ); + return fd(), Bt(g.createJSDocEnumTag(un, di, j_(yr, z(), On, pi)), yr); + } + function u1(yr, un, On, pi) { + let di = fn(); + Bv(); + const ba = V0(); + fd(); + let co = $r(On), ou; + if (!di || Ba(di.type)) { + let Bd, vp, Bh, EP = !1; + for (; (Bd = Mr(() => U0(On))) && Bd.kind !== 345; ) + if (EP = !0, Bd.kind === 344) + if (vp) { + const bk = yt(p.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); + bk && Fs(bk, XT(ge, ve, 0, 0, p.The_tag_was_first_specified_here)); + break; + } else + vp = Bd; + else + Bh = Tr(Bh, Bd); + if (EP) { + const bk = di && di.type.kind === 188, Zg = g.createJSDocTypeLiteral(Bh, bk); + di = vp && vp.typeExpression && !Ba(vp.typeExpression.type) ? vp.typeExpression : Bt(Zg, yr), ou = di.end; + } + } + ou = ou || co !== void 0 ? z() : (ba ?? di ?? un).end, co || (co = j_(yr, ou, On, pi)); + const Yc = g.createJSDocTypedefTag(un, di, ba, co); + return Bt(Yc, yr, ou); + } + function V0(yr) { + const un = t.getTokenStart(); + if (!Du(q())) + return; + const On = US(); + if (Li( + 25 + /* DotToken */ + )) { + const pi = V0( + /*nested*/ + !0 + ), di = g.createModuleDeclaration( + /*modifiers*/ + void 0, + On, + pi, + yr ? 8 : void 0 + ); + return Bt(di, un); + } + return yr && (On.flags |= 4096), On; + } + function G6(yr) { + const un = z(); + let On, pi; + for (; On = Mr(() => xL(4, yr)); ) { + if (On.kind === 345) { + je(On.tagName, p.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); + break; + } + pi = Tr(pi, On); + } + return Fa(pi || [], un); + } + function vk(yr, un) { + const On = G6(un), pi = Mr(() => { + if (f2( + 60 + /* AtToken */ + )) { + const di = W0(un); + if (di && di.kind === 342) + return di; + } + }); + return Bt(g.createJSDocSignature( + /*typeParameters*/ + void 0, + On, + pi + ), yr); + } + function TL(yr, un, On, pi) { + const di = V0(); + fd(); + let ba = $r(On); + const co = vk(yr, On); + ba || (ba = j_(yr, z(), On, pi)); + const ou = ba !== void 0 ? z() : co.end; + return Bt(g.createJSDocCallbackTag(un, co, di, ba), yr, ou); + } + function $6(yr, un, On, pi) { + fd(); + let di = $r(On); + const ba = vk(yr, On); + di || (di = j_(yr, z(), On, pi)); + const co = di !== void 0 ? z() : ba.end; + return Bt(g.createJSDocOverloadTag(un, ba, di), yr, co); + } + function dG(yr, un) { + for (; !Re(yr) || !Re(un); ) + if (!Re(yr) && !Re(un) && yr.right.escapedText === un.right.escapedText) + yr = yr.left, un = un.left; + else + return !1; + return yr.escapedText === un.escapedText; + } + function U0(yr) { + return xL(1, yr); + } + function xL(yr, un, On) { + let pi = !0, di = !1; + for (; ; ) + switch (dt()) { + case 60: + if (pi) { + const ba = kL(yr, un); + return ba && (ba.kind === 341 || ba.kind === 348) && On && (Re(ba.name) || !dG(On, ba.name.left)) ? !1 : ba; + } + di = !1; + break; + case 4: + pi = !0, di = !1; + break; + case 42: + di && (pi = !1), di = !0; + break; + case 80: + pi = !1; + break; + case 1: + return !1; + } + } + function kL(yr, un) { + E.assert( + q() === 60 + /* AtToken */ + ); + const On = t.getTokenFullStart(); + dt(); + const pi = US(), di = Bv(); + let ba; + switch (pi.escapedText) { + case "type": + return yr === 1 && Jv(On, pi); + case "prop": + case "property": + ba = 1; + break; + case "arg": + case "argument": + case "param": + ba = 6; + break; + case "template": + return EL(On, pi, un, di); + case "this": + return l1(On, pi, un, di); + default: + return !1; + } + return yr & ba ? Cf(On, pi, yr, un) : !1; + } + function CL() { + const yr = z(), un = f2( + 23 + /* OpenBracketToken */ + ); + un && fd(); + const On = Qt( + /*allowDecorators*/ + !1, + /*permitConstAsModifier*/ + !0 + ), pi = US(p.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); + let di; + if (un && (fd(), qt( + 64 + /* EqualsToken */ + ), di = ws(16777216, cf), qt( + 24 + /* CloseBracketToken */ + )), !ic(pi)) + return Bt(g.createTypeParameterDeclaration( + On, + pi, + /*constraint*/ + void 0, + di + ), yr); + } + function f8() { + const yr = z(), un = []; + do { + fd(); + const On = CL(); + On !== void 0 && un.push(On), Bv(); + } while (f2( + 28 + /* CommaToken */ + )); + return Fa(un, yr); + } + function EL(yr, un, On, pi) { + const di = q() === 19 ? qe() : void 0, ba = f8(); + return Bt(g.createJSDocTemplateTag(un, di, ba, j_(yr, z(), On, pi)), yr); + } + function f2(yr) { + return q() === yr ? (dt(), !0) : !1; + } + function zv() { + let yr = US(); + for (Li( + 23 + /* OpenBracketToken */ + ) && qt( + 24 + /* CloseBracketToken */ + ); Li( + 25 + /* DotToken */ + ); ) { + const un = US(); + Li( + 23 + /* OpenBracketToken */ + ) && qt( + 24 + /* CloseBracketToken */ + ), yr = tt(yr, un); + } + return yr; + } + function US(yr) { + if (!Du(q())) + return lc( + 80, + /*reportAtCurrentPosition*/ + !yr, + yr || p.Identifier_expected + ); + Wt++; + const un = t.getTokenStart(), On = t.getTokenEnd(), pi = q(), di = Fu(t.getTokenValue()), ba = Bt(D(di, pi), un, On); + return dt(), ba; + } + } + })(gk = e.JSDocParser || (e.JSDocParser = {})); + })(ov || (ov = {})); + var sye = /* @__PURE__ */ new WeakSet(); + function j9e(e) { + sye.has(e) && E.fail("Source file has already been incrementally parsed"), sye.add(e); + } + var aye = /* @__PURE__ */ new WeakSet(); + function B9e(e) { + return aye.has(e); + } + function fre(e) { + aye.add(e); + } + var cz; + ((e) => { + function t(T, C, D, P) { + if (P = P || E.shouldAssert( + 2 + /* Aggressive */ + ), g(T, C, D, P), gY(D)) + return T; + if (T.statements.length === 0) + return ov.parseSourceFile( + T.fileName, + C, + T.languageVersion, + /*syntaxCursor*/ + void 0, + /*setParentNodes*/ + !0, + T.scriptKind, + T.setExternalModuleIndicator, + T.jsDocParsingMode + ); + j9e(T), ov.fixupParentReferences(T); + const O = T.text, j = h(T), F = u(T, D); + g(T, C, F, P), E.assert(F.span.start <= D.span.start), E.assert(wc(F.span) === wc(D.span)), E.assert(wc(zE(F)) === wc(zE(D))); + const V = zE(F).length - F.span.length; + _(T, F.span.start, wc(F.span), wc(zE(F)), V, O, C, P); + const L = ov.parseSourceFile( + T.fileName, + C, + T.languageVersion, + j, + /*setParentNodes*/ + !0, + T.scriptKind, + T.setExternalModuleIndicator, + T.jsDocParsingMode + ); + return L.commentDirectives = n( + T.commentDirectives, + L.commentDirectives, + F.span.start, + wc(F.span), + V, + O, + C, + P + ), L.impliedNodeFormat = T.impliedNodeFormat, L; + } + e.updateSourceFile = t; + function n(T, C, D, P, O, j, F, V) { + if (!T) return C; + let L, $ = !1; + for (const G of T) { + const { range: ce, type: K } = G; + if (ce.end < D) + L = Tr(L, G); + else if (ce.pos > P) { + U(); + const X = { + range: { pos: ce.pos + O, end: ce.end + O }, + type: K + }; + L = Tr(L, X), V && E.assert(j.substring(ce.pos, ce.end) === F.substring(X.range.pos, X.range.end)); + } + } + return U(), L; + function U() { + $ || ($ = !0, L ? C && L.push(...C) : L = C); + } + } + function i(T, C, D, P, O, j) { + C ? V(T) : F(T); + return; + function F(L) { + let $ = ""; + if (j && s(L) && ($ = P.substring(L.pos, L.end)), GJ(L), om(L, L.pos + D, L.end + D), j && s(L) && E.assert($ === O.substring(L.pos, L.end)), gs(L, F, V), gf(L)) + for (const U of L.jsDoc) + F(U); + c(L, j); + } + function V(L) { + om(L, L.pos + D, L.end + D); + for (const $ of L) + F($); + } + } + function s(T) { + switch (T.kind) { + case 11: + case 9: + case 80: + return !0; + } + return !1; + } + function o(T, C, D, P, O) { + E.assert(T.end >= C, "Adjusting an element that was entirely before the change range"), E.assert(T.pos <= D, "Adjusting an element that was entirely after the change range"), E.assert(T.pos <= T.end); + const j = Math.min(T.pos, P), F = T.end >= D ? ( + // Element ends after the change range. Always adjust the end pos. + T.end + O + ) : ( + // Element ends in the change range. The element will keep its position if + // possible. Or Move backward to the new-end if it's in the 'Y' range. + Math.min(T.end, P) + ); + if (E.assert(j <= F), T.parent) { + const V = T.parent; + E.assertGreaterThanOrEqual(j, V.pos), E.assertLessThanOrEqual(F, V.end); + } + om(T, j, F); + } + function c(T, C) { + if (C) { + let D = T.pos; + const P = (O) => { + E.assert(O.pos >= D), D = O.end; + }; + if (gf(T)) + for (const O of T.jsDoc) + P(O); + gs(T, P), E.assert(D <= T.end); + } + } + function _(T, C, D, P, O, j, F, V) { + L(T); + return; + function L(U) { + if (E.assert(U.pos <= U.end), U.pos > D) { + i( + U, + /*isArray*/ + !1, + O, + j, + F, + V + ); + return; + } + const G = U.end; + if (G >= C) { + if (fre(U), GJ(U), o(U, C, D, P, O), gs(U, L, $), gf(U)) + for (const ce of U.jsDoc) + L(ce); + c(U, V); + return; + } + E.assert(G < C); + } + function $(U) { + if (E.assert(U.pos <= U.end), U.pos > D) { + i( + U, + /*isArray*/ + !0, + O, + j, + F, + V + ); + return; + } + const G = U.end; + if (G >= C) { + fre(U), o(U, C, D, P, O); + for (const ce of U) + L(ce); + return; + } + E.assert(G < C); + } + } + function u(T, C) { + let P = C.span.start; + for (let F = 0; P > 0 && F <= 1; F++) { + const V = d(T, P); + E.assert(V.pos <= P); + const L = V.pos; + P = Math.max(0, L - 1); + } + const O = Mc(P, wc(C.span)), j = C.newLength + (C.span.start - P); + return xw(O, j); + } + function d(T, C) { + let D = T, P; + if (gs(T, j), P) { + const F = O(P); + F.pos > D.pos && (D = F); + } + return D; + function O(F) { + for (; ; ) { + const V = WB(F); + if (V) + F = V; + else + return F; + } + } + function j(F) { + if (!ic(F)) + if (F.pos <= C) { + if (F.pos >= D.pos && (D = F), C < F.end) + return gs(F, j), !0; + E.assert(F.end <= C), P = F; + } else + return E.assert(F.pos > C), !0; + } + } + function g(T, C, D, P) { + const O = T.text; + if (D && (E.assert(O.length - D.span.length + D.newLength === C.length), P || E.shouldAssert( + 3 + /* VeryAggressive */ + ))) { + const j = O.substr(0, D.span.start), F = C.substr(0, D.span.start); + E.assert(j === F); + const V = O.substring(wc(D.span), O.length), L = C.substring(wc(zE(D)), C.length); + E.assert(V === L); + } + } + function h(T) { + let C = T.statements, D = 0; + E.assert(D < C.length); + let P = C[D], O = -1; + return { + currentNode(F) { + return F !== O && (P && P.end === F && D < C.length - 1 && (D++, P = C[D]), (!P || P.pos !== F) && j(F)), O = F, E.assert(!P || P.pos === F), P; + } + }; + function j(F) { + C = void 0, D = -1, P = void 0, gs(T, V, L); + return; + function V($) { + return F >= $.pos && F < $.end ? (gs($, V, L), !0) : !1; + } + function L($) { + if (F >= $.pos && F < $.end) + for (let U = 0; U < $.length; U++) { + const G = $[U]; + if (G) { + if (G.pos === F) + return C = $, D = U, P = G, !0; + if (G.pos < F && F < G.end) + return gs(G, V, L), !0; + } + } + return !1; + } + } + } + e.createSyntaxCursor = h; + let S; + ((T) => { + T[T.Value = -1] = "Value"; + })(S || (S = {})); + })(cz || (cz = {})); + function Ol(e) { + return lz(e) !== void 0; + } + function lz(e) { + const t = Wk( + e, + h5, + /*ignoreCase*/ + !1 + ); + if (t) + return t; + if (Go( + e, + ".ts" + /* Ts */ + )) { + const n = Wc(e).lastIndexOf(".d."); + if (n >= 0) + return e.substring(n); + } + } + function J9e(e, t, n, i) { + if (e) { + if (e === "import") + return 99; + if (e === "require") + return 1; + i(t, n - t, p.resolution_mode_should_be_either_require_or_import); + } + } + function uz(e, t) { + const n = []; + for (const i of kg(t, 0) || He) { + const s = t.substring(i.pos, i.end); + U9e(n, i, s); + } + e.pragmas = /* @__PURE__ */ new Map(); + for (const i of n) { + if (e.pragmas.has(i.name)) { + const s = e.pragmas.get(i.name); + s instanceof Array ? s.push(i.args) : e.pragmas.set(i.name, [s, i.args]); + continue; + } + e.pragmas.set(i.name, i.args); + } + } + function _z(e, t) { + e.checkJsDirective = void 0, e.referencedFiles = [], e.typeReferenceDirectives = [], e.libReferenceDirectives = [], e.amdDependencies = [], e.hasNoDefaultLib = !1, e.pragmas.forEach((n, i) => { + switch (i) { + case "reference": { + const s = e.referencedFiles, o = e.typeReferenceDirectives, c = e.libReferenceDirectives; + rr(vT(n), (_) => { + const { types: u, lib: d, path: g, ["resolution-mode"]: h, preserve: S } = _.arguments, T = S === "true" ? !0 : void 0; + if (_.arguments["no-default-lib"] === "true") + e.hasNoDefaultLib = !0; + else if (u) { + const C = J9e(h, u.pos, u.end, t); + o.push({ pos: u.pos, end: u.end, fileName: u.value, ...C ? { resolutionMode: C } : {}, ...T ? { preserve: T } : {} }); + } else d ? c.push({ pos: d.pos, end: d.end, fileName: d.value, ...T ? { preserve: T } : {} }) : g ? s.push({ pos: g.pos, end: g.end, fileName: g.value, ...T ? { preserve: T } : {} }) : t(_.range.pos, _.range.end - _.range.pos, p.Invalid_reference_directive_syntax); + }); + break; + } + case "amd-dependency": { + e.amdDependencies = or( + vT(n), + (s) => ({ name: s.arguments.name, path: s.arguments.path }) + ); + break; + } + case "amd-module": { + if (n instanceof Array) + for (const s of n) + e.moduleName && t(s.range.pos, s.range.end - s.range.pos, p.An_AMD_module_cannot_have_multiple_name_assignments), e.moduleName = s.arguments.name; + else + e.moduleName = n.arguments.name; + break; + } + case "ts-nocheck": + case "ts-check": { + rr(vT(n), (s) => { + (!e.checkJsDirective || s.range.pos > e.checkJsDirective.pos) && (e.checkJsDirective = { + enabled: i === "ts-check", + end: s.range.end, + pos: s.range.pos + }); + }); + break; + } + case "jsx": + case "jsxfrag": + case "jsximportsource": + case "jsxruntime": + return; + default: + E.fail("Unhandled pragma kind"); + } + }); + } + var pre = /* @__PURE__ */ new Map(); + function z9e(e) { + if (pre.has(e)) + return pre.get(e); + const t = new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`, "im"); + return pre.set(e, t), t; + } + var W9e = /^\/\/\/\s*<(\S+)\s.*?\/>/im, V9e = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; + function U9e(e, t, n) { + const i = t.kind === 2 && W9e.exec(n); + if (i) { + const o = i[1].toLowerCase(), c = SI[o]; + if (!c || !(c.kind & 1)) + return; + if (c.args) { + const _ = {}; + for (const u of c.args) { + const g = z9e(u.name).exec(n); + if (!g && !u.optional) + return; + if (g) { + const h = g[2] || g[3]; + if (u.captureSpan) { + const S = t.pos + g.index + g[1].length + 1; + _[u.name] = { + value: h, + pos: S, + end: S + h.length + }; + } else + _[u.name] = h; + } + } + e.push({ name: o, args: { arguments: _, range: t } }); + } else + e.push({ name: o, args: { arguments: {}, range: t } }); + return; + } + const s = t.kind === 2 && V9e.exec(n); + if (s) + return oye(e, t, 2, s); + if (t.kind === 3) { + const o = /@(\S+)(\s+.*)?$/gim; + let c; + for (; c = o.exec(n); ) + oye(e, t, 4, c); + } + } + function oye(e, t, n, i) { + if (!i) return; + const s = i[1].toLowerCase(), o = SI[s]; + if (!o || !(o.kind & n)) + return; + const c = i[2], _ = q9e(o, c); + _ !== "fail" && e.push({ name: s, args: { arguments: _, range: t } }); + } + function q9e(e, t) { + if (!t) return {}; + if (!e.args) return {}; + const n = t.trim().split(/\s+/), i = {}; + for (let s = 0; s < e.args.length; s++) { + const o = e.args[s]; + if (!n[s] && !o.optional) + return "fail"; + if (o.captureSpan) + return E.fail("Capture spans not yet implemented for non-xml pragmas"); + i[o.name] = n[s]; + } + return i; + } + function cv(e, t) { + return e.kind !== t.kind ? !1 : e.kind === 80 ? e.escapedText === t.escapedText : e.kind === 110 ? !0 : e.kind === 295 ? e.namespace.escapedText === t.namespace.escapedText && e.name.escapedText === t.name.escapedText : e.name.escapedText === t.name.escapedText && cv(e.expression, t.expression); + } + var fO = { + name: "compileOnSave", + type: "boolean", + defaultValueDescription: !1 + }, cye = new Map(Object.entries({ + preserve: 1, + "react-native": 3, + react: 2, + "react-jsx": 4, + "react-jsxdev": 5 + /* ReactJSXDev */ + })), yA = new Map(yE(cye.entries(), ([e, t]) => ["" + t, e])), lye = [ + // JavaScript only + ["es5", "lib.es5.d.ts"], + ["es6", "lib.es2015.d.ts"], + ["es2015", "lib.es2015.d.ts"], + ["es7", "lib.es2016.d.ts"], + ["es2016", "lib.es2016.d.ts"], + ["es2017", "lib.es2017.d.ts"], + ["es2018", "lib.es2018.d.ts"], + ["es2019", "lib.es2019.d.ts"], + ["es2020", "lib.es2020.d.ts"], + ["es2021", "lib.es2021.d.ts"], + ["es2022", "lib.es2022.d.ts"], + ["es2023", "lib.es2023.d.ts"], + ["esnext", "lib.esnext.d.ts"], + // Host only + ["dom", "lib.dom.d.ts"], + ["dom.iterable", "lib.dom.iterable.d.ts"], + ["dom.asynciterable", "lib.dom.asynciterable.d.ts"], + ["webworker", "lib.webworker.d.ts"], + ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], + ["webworker.iterable", "lib.webworker.iterable.d.ts"], + ["webworker.asynciterable", "lib.webworker.asynciterable.d.ts"], + ["scripthost", "lib.scripthost.d.ts"], + // ES2015 Or ESNext By-feature options + ["es2015.core", "lib.es2015.core.d.ts"], + ["es2015.collection", "lib.es2015.collection.d.ts"], + ["es2015.generator", "lib.es2015.generator.d.ts"], + ["es2015.iterable", "lib.es2015.iterable.d.ts"], + ["es2015.promise", "lib.es2015.promise.d.ts"], + ["es2015.proxy", "lib.es2015.proxy.d.ts"], + ["es2015.reflect", "lib.es2015.reflect.d.ts"], + ["es2015.symbol", "lib.es2015.symbol.d.ts"], + ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], + ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2016.intl", "lib.es2016.intl.d.ts"], + ["es2017.date", "lib.es2017.date.d.ts"], + ["es2017.object", "lib.es2017.object.d.ts"], + ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], + ["es2017.string", "lib.es2017.string.d.ts"], + ["es2017.intl", "lib.es2017.intl.d.ts"], + ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], + ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], + ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["es2018.intl", "lib.es2018.intl.d.ts"], + ["es2018.promise", "lib.es2018.promise.d.ts"], + ["es2018.regexp", "lib.es2018.regexp.d.ts"], + ["es2019.array", "lib.es2019.array.d.ts"], + ["es2019.object", "lib.es2019.object.d.ts"], + ["es2019.string", "lib.es2019.string.d.ts"], + ["es2019.symbol", "lib.es2019.symbol.d.ts"], + ["es2019.intl", "lib.es2019.intl.d.ts"], + ["es2020.bigint", "lib.es2020.bigint.d.ts"], + ["es2020.date", "lib.es2020.date.d.ts"], + ["es2020.promise", "lib.es2020.promise.d.ts"], + ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], + ["es2020.string", "lib.es2020.string.d.ts"], + ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], + ["es2020.intl", "lib.es2020.intl.d.ts"], + ["es2020.number", "lib.es2020.number.d.ts"], + ["es2021.promise", "lib.es2021.promise.d.ts"], + ["es2021.string", "lib.es2021.string.d.ts"], + ["es2021.weakref", "lib.es2021.weakref.d.ts"], + ["es2021.intl", "lib.es2021.intl.d.ts"], + ["es2022.array", "lib.es2022.array.d.ts"], + ["es2022.error", "lib.es2022.error.d.ts"], + ["es2022.intl", "lib.es2022.intl.d.ts"], + ["es2022.object", "lib.es2022.object.d.ts"], + ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], + ["es2022.string", "lib.es2022.string.d.ts"], + ["es2022.regexp", "lib.es2022.regexp.d.ts"], + ["es2023.array", "lib.es2023.array.d.ts"], + ["es2023.collection", "lib.es2023.collection.d.ts"], + ["es2023.intl", "lib.es2023.intl.d.ts"], + ["esnext.array", "lib.es2023.array.d.ts"], + ["esnext.collection", "lib.esnext.collection.d.ts"], + ["esnext.symbol", "lib.es2019.symbol.d.ts"], + ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.disposable", "lib.esnext.disposable.d.ts"], + ["esnext.bigint", "lib.es2020.bigint.d.ts"], + ["esnext.string", "lib.es2022.string.d.ts"], + ["esnext.promise", "lib.esnext.promise.d.ts"], + ["esnext.weakref", "lib.es2021.weakref.d.ts"], + ["esnext.decorators", "lib.esnext.decorators.d.ts"], + ["esnext.object", "lib.esnext.object.d.ts"], + ["esnext.array", "lib.esnext.array.d.ts"], + ["esnext.regexp", "lib.esnext.regexp.d.ts"], + ["esnext.string", "lib.esnext.string.d.ts"], + ["decorators", "lib.decorators.d.ts"], + ["decorators.legacy", "lib.decorators.legacy.d.ts"] + ], pO = lye.map((e) => e[0]), fz = new Map(lye), Dx = [ + { + name: "watchFile", + type: new Map(Object.entries({ + fixedpollinginterval: 0, + prioritypollinginterval: 1, + dynamicprioritypolling: 2, + fixedchunksizepolling: 3, + usefsevents: 4, + usefseventsonparentdirectory: 5 + /* UseFsEventsOnParentDirectory */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_how_the_TypeScript_watch_mode_works, + defaultValueDescription: 4 + /* UseFsEvents */ + }, + { + name: "watchDirectory", + type: new Map(Object.entries({ + usefsevents: 0, + fixedpollinginterval: 1, + dynamicprioritypolling: 2, + fixedchunksizepolling: 3 + /* FixedChunkSizePolling */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality, + defaultValueDescription: 0 + /* UseFsEvents */ + }, + { + name: "fallbackPolling", + type: new Map(Object.entries({ + fixedinterval: 0, + priorityinterval: 1, + dynamicpriority: 2, + fixedchunksize: 3 + /* FixedChunkSize */ + })), + category: p.Watch_and_Build_Modes, + description: p.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers, + defaultValueDescription: 1 + /* PriorityInterval */ + }, + { + name: "synchronousWatchDirectory", + type: "boolean", + category: p.Watch_and_Build_Modes, + description: p.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively, + defaultValueDescription: !1 + }, + { + name: "excludeDirectories", + type: "list", + element: { + name: "excludeDirectory", + type: "string", + isFilePath: !0, + extraValidation: Rre + }, + allowConfigDirTemplateSubstitution: !0, + category: p.Watch_and_Build_Modes, + description: p.Remove_a_list_of_directories_from_the_watch_process + }, + { + name: "excludeFiles", + type: "list", + element: { + name: "excludeFile", + type: "string", + isFilePath: !0, + extraValidation: Rre + }, + allowConfigDirTemplateSubstitution: !0, + category: p.Watch_and_Build_Modes, + description: p.Remove_a_list_of_files_from_the_watch_mode_s_processing + } + ], dO = [ + { + name: "help", + shortName: "h", + type: "boolean", + showInSimplifiedHelpView: !0, + isCommandLineOnly: !0, + category: p.Command_line_Options, + description: p.Print_this_message, + defaultValueDescription: !1 + }, + { + name: "help", + shortName: "?", + type: "boolean", + isCommandLineOnly: !0, + category: p.Command_line_Options, + defaultValueDescription: !1 + }, + { + name: "watch", + shortName: "w", + type: "boolean", + showInSimplifiedHelpView: !0, + isCommandLineOnly: !0, + category: p.Command_line_Options, + description: p.Watch_input_files, + defaultValueDescription: !1 + }, + { + name: "preserveWatchOutput", + type: "boolean", + showInSimplifiedHelpView: !1, + category: p.Output_Formatting, + description: p.Disable_wiping_the_console_in_watch_mode, + defaultValueDescription: !1 + }, + { + name: "listFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_all_of_the_files_read_during_the_compilation, + defaultValueDescription: !1 + }, + { + name: "explainFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_files_read_during_the_compilation_including_why_it_was_included, + defaultValueDescription: !1 + }, + { + name: "listEmittedFiles", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Print_the_names_of_emitted_files_after_a_compilation, + defaultValueDescription: !1 + }, + { + name: "pretty", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Output_Formatting, + description: p.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read, + defaultValueDescription: !0 + }, + { + name: "traceResolution", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Log_paths_used_during_the_moduleResolution_process, + defaultValueDescription: !1 + }, + { + name: "diagnostics", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Output_compiler_performance_information_after_building, + defaultValueDescription: !1 + }, + { + name: "extendedDiagnostics", + type: "boolean", + category: p.Compiler_Diagnostics, + description: p.Output_more_detailed_compiler_performance_information_after_building, + defaultValueDescription: !1 + }, + { + name: "generateCpuProfile", + type: "string", + isFilePath: !0, + paramType: p.FILE_OR_DIRECTORY, + category: p.Compiler_Diagnostics, + description: p.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, + defaultValueDescription: "profile.cpuprofile" + }, + { + name: "generateTrace", + type: "string", + isFilePath: !0, + isCommandLineOnly: !0, + paramType: p.DIRECTORY, + category: p.Compiler_Diagnostics, + description: p.Generates_an_event_trace_and_a_list_of_types + }, + { + name: "incremental", + shortName: "i", + type: "boolean", + category: p.Projects, + description: p.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, + transpileOptionValue: void 0, + defaultValueDescription: p.false_unless_composite_is_set + }, + { + name: "declaration", + shortName: "d", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project, + defaultValueDescription: p.false_unless_composite_is_set + }, + { + name: "declarationMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + transpileOptionValue: void 0, + defaultValueDescription: !1, + description: p.Create_sourcemaps_for_d_ts_files + }, + { + name: "emitDeclarationOnly", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Only_output_d_ts_files_and_not_JavaScript_files, + transpileOptionValue: void 0, + defaultValueDescription: !1 + }, + { + name: "sourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + defaultValueDescription: !1, + description: p.Create_source_map_files_for_emitted_JavaScript_files + }, + { + name: "inlineSourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + category: p.Emit, + description: p.Include_sourcemap_files_inside_the_emitted_JavaScript, + defaultValueDescription: !1 + }, + { + name: "assumeChangesOnlyAffectDirectDependencies", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Watch_and_Build_Modes, + description: p.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it, + defaultValueDescription: !1 + }, + { + name: "locale", + type: "string", + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, + defaultValueDescription: p.Platform_specific + } + ], pz = { + name: "target", + shortName: "t", + type: new Map(Object.entries({ + es3: 0, + es5: 1, + es6: 2, + es2015: 2, + es2016: 3, + es2017: 4, + es2018: 5, + es2019: 6, + es2020: 7, + es2021: 8, + es2022: 9, + es2023: 10, + esnext: 99 + /* ESNext */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + deprecatedKeys: /* @__PURE__ */ new Set(["es3"]), + paramType: p.VERSION, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, + defaultValueDescription: 1 + /* ES5 */ + }, dre = { + name: "module", + shortName: "m", + type: new Map(Object.entries({ + none: 0, + commonjs: 1, + amd: 2, + system: 4, + umd: 3, + es6: 5, + es2015: 5, + es2020: 6, + es2022: 7, + esnext: 99, + node16: 100, + nodenext: 199, + preserve: 200 + /* Preserve */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.KIND, + showInSimplifiedHelpView: !0, + category: p.Modules, + description: p.Specify_what_module_code_is_generated, + defaultValueDescription: void 0 + }, mre = [ + // CommandLine only options + { + name: "all", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Show_all_compiler_options, + defaultValueDescription: !1 + }, + { + name: "version", + shortName: "v", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Print_the_compiler_s_version, + defaultValueDescription: !1 + }, + { + name: "init", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file, + defaultValueDescription: !1 + }, + { + name: "project", + shortName: "p", + type: "string", + isFilePath: !0, + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + paramType: p.FILE_OR_DIRECTORY, + description: p.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json + }, + { + name: "build", + type: "boolean", + shortName: "b", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + description: p.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, + defaultValueDescription: !1 + }, + { + name: "showConfig", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Print_the_final_configuration_instead_of_building, + defaultValueDescription: !1 + }, + { + name: "listFilesOnly", + type: "boolean", + category: p.Command_line_Options, + isCommandLineOnly: !0, + description: p.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing, + defaultValueDescription: !1 + }, + // Basic + pz, + dre, + { + name: "lib", + type: "list", + element: { + name: "lib", + type: fz, + defaultValueDescription: void 0 + }, + affectsProgramStructure: !0, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, + transpileOptionValue: void 0 + }, + { + name: "allowJs", + type: "boolean", + allowJsFlag: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.JavaScript_Support, + description: p.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, + defaultValueDescription: !1 + }, + { + name: "checkJs", + type: "boolean", + affectsModuleResolution: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.JavaScript_Support, + description: p.Enable_error_reporting_in_type_checked_JavaScript_files, + defaultValueDescription: !1 + }, + { + name: "jsx", + type: cye, + affectsSourceFile: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + affectsModuleResolution: !0, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: !0, + paramType: p.KIND, + showInSimplifiedHelpView: !0, + category: p.Language_and_Environment, + description: p.Specify_what_JSX_code_is_generated, + defaultValueDescription: void 0 + }, + { + name: "outFile", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.FILE, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output, + transpileOptionValue: void 0 + }, + { + name: "outDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.DIRECTORY, + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Specify_an_output_folder_for_all_emitted_files + }, + { + name: "rootDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.LOCATION, + category: p.Modules, + description: p.Specify_the_root_folder_within_your_source_files, + defaultValueDescription: p.Computed_from_the_list_of_input_files + }, + { + name: "composite", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: !0, + isTSConfigOnly: !0, + category: p.Projects, + transpileOptionValue: void 0, + defaultValueDescription: !1, + description: p.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references + }, + { + name: "tsBuildInfoFile", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + isFilePath: !0, + paramType: p.FILE, + category: p.Projects, + transpileOptionValue: void 0, + defaultValueDescription: ".tsbuildinfo", + description: p.Specify_the_path_to_tsbuildinfo_incremental_compilation_file + }, + { + name: "removeComments", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Emit, + defaultValueDescription: !1, + description: p.Disable_emitting_comments + }, + { + name: "noCheck", + type: "boolean", + showInSimplifiedHelpView: !1, + category: p.Compiler_Diagnostics, + description: p.Disable_full_type_checking_only_critical_parse_and_emit_errors_will_be_reported, + transpileOptionValue: !0, + defaultValueDescription: !1, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + extraValidation() { + return [p.Unknown_compiler_option_0, "noCheck"]; + } + }, + { + name: "noEmit", + type: "boolean", + showInSimplifiedHelpView: !0, + category: p.Emit, + description: p.Disable_emitting_files_from_a_compilation, + transpileOptionValue: void 0, + defaultValueDescription: !1 + }, + { + name: "importHelpers", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, + defaultValueDescription: !1 + }, + { + name: "importsNotUsedAsValues", + type: new Map(Object.entries({ + remove: 0, + preserve: 1, + error: 2 + /* Error */ + })), + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types, + defaultValueDescription: 0 + /* Remove */ + }, + { + name: "downlevelIteration", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration, + defaultValueDescription: !1 + }, + { + name: "isolatedModules", + type: "boolean", + category: p.Interop_Constraints, + description: p.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports, + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "verbatimModuleSyntax", + type: "boolean", + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Interop_Constraints, + description: p.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting, + defaultValueDescription: !1 + }, + { + name: "isolatedDeclarations", + type: "boolean", + category: p.Interop_Constraints, + description: p.Require_sufficient_annotation_on_exports_so_other_tools_can_trivially_generate_declaration_files, + defaultValueDescription: !1, + affectsBuildInfo: !0, + affectsSemanticDiagnostics: !0 + }, + // Strict Type Checks + { + name: "strict", + type: "boolean", + // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here + // The value of each strictFlag depends on own strictFlag value or this and never accessed directly. + // But we need to store `strict` in builf info, even though it won't be examined directly, so that the + // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Type_Checking, + description: p.Enable_all_strict_type_checking_options, + defaultValueDescription: !1 + }, + { + name: "noImplicitAny", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictNullChecks", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.When_type_checking_take_into_account_null_and_undefined, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictFunctionTypes", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictBindCallApply", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "strictPropertyInitialization", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "noImplicitThis", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_when_this_is_given_the_type_any, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "useUnknownInCatchVariables", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Default_catch_clause_variables_as_unknown_instead_of_any, + defaultValueDescription: p.false_unless_strict_is_set + }, + { + name: "alwaysStrict", + type: "boolean", + affectsSourceFile: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + strictFlag: !0, + category: p.Type_Checking, + description: p.Ensure_use_strict_is_always_emitted, + defaultValueDescription: p.false_unless_strict_is_set + }, + // Additional Checks + { + name: "noUnusedLocals", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_when_local_variables_aren_t_read, + defaultValueDescription: !1 + }, + { + name: "noUnusedParameters", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Raise_an_error_when_a_function_parameter_isn_t_read, + defaultValueDescription: !1 + }, + { + name: "exactOptionalPropertyTypes", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Interpret_optional_property_types_as_written_rather_than_adding_undefined, + defaultValueDescription: !1 + }, + { + name: "noImplicitReturns", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function, + defaultValueDescription: !1 + }, + { + name: "noFallthroughCasesInSwitch", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Enable_error_reporting_for_fallthrough_cases_in_switch_statements, + defaultValueDescription: !1 + }, + { + name: "noUncheckedIndexedAccess", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Add_undefined_to_a_type_when_accessed_using_an_index, + defaultValueDescription: !1 + }, + { + name: "noImplicitOverride", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier, + defaultValueDescription: !1 + }, + { + name: "noPropertyAccessFromIndexSignature", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !1, + category: p.Type_Checking, + description: p.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type, + defaultValueDescription: !1 + }, + // Module Resolution + { + name: "moduleResolution", + type: new Map(Object.entries({ + // N.B. The first entry specifies the value shown in `tsc --init` + node10: 2, + node: 2, + classic: 1, + node16: 3, + nodenext: 99, + bundler: 100 + /* Bundler */ + })), + deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: !0, + affectsModuleResolution: !0, + paramType: p.STRATEGY, + category: p.Modules, + description: p.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, + defaultValueDescription: p.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node + }, + { + name: "baseUrl", + type: "string", + affectsModuleResolution: !0, + isFilePath: !0, + category: p.Modules, + description: p.Specify_the_base_directory_to_resolve_non_relative_module_names + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "paths", + type: "object", + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + isTSConfigOnly: !0, + category: p.Modules, + description: p.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, + transpileOptionValue: void 0 + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "rootDirs", + type: "list", + isTSConfigOnly: !0, + element: { + name: "rootDirs", + type: "string", + isFilePath: !0 + }, + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + category: p.Modules, + description: p.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, + transpileOptionValue: void 0, + defaultValueDescription: p.Computed_from_the_list_of_input_files + }, + { + name: "typeRoots", + type: "list", + element: { + name: "typeRoots", + type: "string", + isFilePath: !0 + }, + affectsModuleResolution: !0, + allowConfigDirTemplateSubstitution: !0, + category: p.Modules, + description: p.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types + }, + { + name: "types", + type: "list", + element: { + name: "types", + type: "string" + }, + affectsProgramStructure: !0, + showInSimplifiedHelpView: !0, + category: p.Modules, + description: p.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, + transpileOptionValue: void 0 + }, + { + name: "allowSyntheticDefaultImports", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Interop_Constraints, + description: p.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, + defaultValueDescription: p.module_system_or_esModuleInterop + }, + { + name: "esModuleInterop", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + showInSimplifiedHelpView: !0, + category: p.Interop_Constraints, + description: p.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility, + defaultValueDescription: !1 + }, + { + name: "preserveSymlinks", + type: "boolean", + category: p.Interop_Constraints, + description: p.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node, + defaultValueDescription: !1 + }, + { + name: "allowUmdGlobalAccess", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Allow_accessing_UMD_globals_from_modules, + defaultValueDescription: !1 + }, + { + name: "moduleSuffixes", + type: "list", + element: { + name: "suffix", + type: "string" + }, + listPreserveFalsyValues: !0, + affectsModuleResolution: !0, + category: p.Modules, + description: p.List_of_file_name_suffixes_to_search_when_resolving_a_module + }, + { + name: "allowImportingTsExtensions", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Modules, + description: p.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set, + defaultValueDescription: !1, + transpileOptionValue: void 0 + }, + { + name: "resolvePackageJsonExports", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Use_the_package_json_exports_field_when_resolving_package_imports, + defaultValueDescription: p.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false + }, + { + name: "resolvePackageJsonImports", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Use_the_package_json_imports_field_when_resolving_imports, + defaultValueDescription: p.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false + }, + { + name: "customConditions", + type: "list", + element: { + name: "condition", + type: "string" + }, + affectsModuleResolution: !0, + category: p.Modules, + description: p.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports + }, + // Source Maps + { + name: "sourceRoot", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.LOCATION, + category: p.Emit, + description: p.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code + }, + { + name: "mapRoot", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.LOCATION, + category: p.Emit, + description: p.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations + }, + { + name: "inlineSources", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript, + defaultValueDescription: !1 + }, + // Experimental + { + name: "experimentalDecorators", + type: "boolean", + affectsEmit: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Enable_experimental_support_for_legacy_experimental_decorators, + defaultValueDescription: !1 + }, + { + name: "emitDecoratorMetadata", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Emit_design_type_metadata_for_decorated_declarations_in_source_files, + defaultValueDescription: !1 + }, + // Advanced + { + name: "jsxFactory", + type: "string", + category: p.Language_and_Environment, + description: p.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, + defaultValueDescription: "`React.createElement`" + }, + { + name: "jsxFragmentFactory", + type: "string", + category: p.Language_and_Environment, + description: p.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment, + defaultValueDescription: "React.Fragment" + }, + { + name: "jsxImportSource", + type: "string", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + affectsModuleResolution: !0, + category: p.Language_and_Environment, + description: p.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, + defaultValueDescription: "react" + }, + { + name: "resolveJsonModule", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Enable_importing_json_files, + defaultValueDescription: !1 + }, + { + name: "allowArbitraryExtensions", + type: "boolean", + affectsProgramStructure: !0, + category: p.Modules, + description: p.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present, + defaultValueDescription: !1 + }, + { + name: "out", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !1, + // This is intentionally broken to support compatibility with existing tsconfig files + // for correct behaviour, please use outFile + category: p.Backwards_Compatibility, + paramType: p.FILE, + transpileOptionValue: void 0, + description: p.Deprecated_setting_Use_outFile_instead + }, + { + name: "reactNamespace", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit, + defaultValueDescription: "`React`" + }, + { + name: "skipDefaultLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: !0, + category: p.Completeness, + description: p.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, + defaultValueDescription: !1 + }, + { + name: "charset", + type: "string", + category: p.Backwards_Compatibility, + description: p.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, + defaultValueDescription: "utf8" + }, + { + name: "emitBOM", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files, + defaultValueDescription: !1 + }, + { + name: "newLine", + type: new Map(Object.entries({ + crlf: 0, + lf: 1 + /* LineFeed */ + })), + affectsEmit: !0, + affectsBuildInfo: !0, + paramType: p.NEWLINE, + category: p.Emit, + description: p.Set_the_newline_character_for_emitting_files, + defaultValueDescription: "lf" + }, + { + name: "noErrorTruncation", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Output_Formatting, + description: p.Disable_truncating_types_in_error_messages, + defaultValueDescription: !1 + }, + { + name: "noLib", + type: "boolean", + category: p.Language_and_Environment, + affectsProgramStructure: !0, + description: p.Disable_including_any_library_files_including_the_default_lib_d_ts, + // We are not returning a sourceFile for lib file when asked by the program, + // so pass --noLib to avoid reporting a file not found error. + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "noResolve", + type: "boolean", + affectsModuleResolution: !0, + category: p.Modules, + description: p.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project, + // We are not doing a full typecheck, we are not resolving the whole context, + // so pass --noResolve to avoid reporting missing file errors. + transpileOptionValue: !0, + defaultValueDescription: !1 + }, + { + name: "stripInternal", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments, + defaultValueDescription: !1 + }, + { + name: "disableSizeLimit", + type: "boolean", + affectsProgramStructure: !0, + category: p.Editor_Support, + description: p.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server, + defaultValueDescription: !1 + }, + { + name: "disableSourceOfProjectReferenceRedirect", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects, + defaultValueDescription: !1 + }, + { + name: "disableSolutionSearching", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Opt_a_project_out_of_multi_project_reference_checking_when_editing, + defaultValueDescription: !1 + }, + { + name: "disableReferencedProjectLoad", + type: "boolean", + isTSConfigOnly: !0, + category: p.Projects, + description: p.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, + defaultValueDescription: !1 + }, + { + name: "noImplicitUseStrict", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, + defaultValueDescription: !1 + }, + { + name: "noEmitHelpers", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_generating_custom_helper_functions_like_extends_in_compiled_output, + defaultValueDescription: !1 + }, + { + name: "noEmitOnError", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Disable_emitting_files_if_any_type_checking_errors_are_reported, + defaultValueDescription: !1 + }, + { + name: "preserveConstEnums", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Emit, + description: p.Disable_erasing_const_enum_declarations_in_generated_code, + defaultValueDescription: !1 + }, + { + name: "declarationDir", + type: "string", + affectsEmit: !0, + affectsBuildInfo: !0, + affectsDeclarationPath: !0, + isFilePath: !0, + paramType: p.DIRECTORY, + category: p.Emit, + transpileOptionValue: void 0, + description: p.Specify_the_output_directory_for_generated_declaration_files + }, + { + name: "skipLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: !0, + category: p.Completeness, + description: p.Skip_type_checking_all_d_ts_files, + defaultValueDescription: !1 + }, + { + name: "allowUnusedLabels", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Disable_error_reporting_for_unused_labels, + defaultValueDescription: void 0 + }, + { + name: "allowUnreachableCode", + type: "boolean", + affectsBindDiagnostics: !0, + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Type_Checking, + description: p.Disable_error_reporting_for_unreachable_code, + defaultValueDescription: void 0 + }, + { + name: "suppressExcessPropertyErrors", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, + defaultValueDescription: !1 + }, + { + name: "suppressImplicitAnyIndexErrors", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, + defaultValueDescription: !1 + }, + { + name: "forceConsistentCasingInFileNames", + type: "boolean", + affectsModuleResolution: !0, + category: p.Interop_Constraints, + description: p.Ensure_that_casing_is_correct_in_imports, + defaultValueDescription: !0 + }, + { + name: "maxNodeModuleJsDepth", + type: "number", + affectsModuleResolution: !0, + category: p.JavaScript_Support, + description: p.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, + defaultValueDescription: 0 + }, + { + name: "noStrictGenericChecks", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Disable_strict_checking_of_generic_signatures_in_function_types, + defaultValueDescription: !1 + }, + { + name: "useDefineForClassFields", + type: "boolean", + affectsSemanticDiagnostics: !0, + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Language_and_Environment, + description: p.Emit_ECMAScript_standard_compliant_class_fields, + defaultValueDescription: p.true_for_ES2022_and_above_including_ESNext + }, + { + name: "preserveValueImports", + type: "boolean", + affectsEmit: !0, + affectsBuildInfo: !0, + category: p.Backwards_Compatibility, + description: p.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed, + defaultValueDescription: !1 + }, + { + name: "keyofStringsOnly", + type: "boolean", + category: p.Backwards_Compatibility, + description: p.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, + defaultValueDescription: !1 + }, + { + // A list of plugins to load in the language service + name: "plugins", + type: "list", + isTSConfigOnly: !0, + element: { + name: "plugin", + type: "object" + }, + description: p.Specify_a_list_of_language_service_plugins_to_include, + category: p.Editor_Support + }, + { + name: "moduleDetection", + type: new Map(Object.entries({ + auto: 2, + legacy: 1, + force: 3 + /* Force */ + })), + affectsSourceFile: !0, + affectsModuleResolution: !0, + description: p.Control_what_method_is_used_to_detect_module_format_JS_files, + category: p.Language_and_Environment, + defaultValueDescription: p.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules + }, + { + name: "ignoreDeprecations", + type: "string", + defaultValueDescription: void 0 + } + ], Dd = [ + ...dO, + ...mre + ], gre = Dd.filter((e) => !!e.affectsSemanticDiagnostics), hre = Dd.filter((e) => !!e.affectsEmit), yre = Dd.filter((e) => !!e.affectsDeclarationPath), dz = Dd.filter((e) => !!e.affectsModuleResolution), mz = Dd.filter((e) => !!e.affectsSourceFile || !!e.affectsBindDiagnostics), vre = Dd.filter((e) => !!e.affectsProgramStructure), bre = Dd.filter((e) => io(e, "transpileOptionValue")), Sre = Dd.filter( + (e) => e.allowConfigDirTemplateSubstitution || !e.isCommandLineOnly && e.isFilePath + ), Tre = Dx.filter( + (e) => e.allowConfigDirTemplateSubstitution || !e.isCommandLineOnly && e.isFilePath + ), xre = Dd.filter(H9e); + function H9e(e) { + return !Gi(e.type); + } + var gz = [ + { + name: "verbose", + shortName: "v", + category: p.Command_line_Options, + description: p.Enable_verbose_logging, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "dry", + shortName: "d", + category: p.Command_line_Options, + description: p.Show_what_would_be_built_or_deleted_if_specified_with_clean, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "force", + shortName: "f", + category: p.Command_line_Options, + description: p.Build_all_projects_including_those_that_appear_to_be_up_to_date, + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "clean", + category: p.Command_line_Options, + description: p.Delete_the_outputs_of_all_projects, + type: "boolean", + defaultValueDescription: !1 + } + ], vA = [ + ...dO, + ...gz + ], mO = [ + { + name: "enable", + type: "boolean", + defaultValueDescription: !1 + }, + { + name: "include", + type: "list", + element: { + name: "include", + type: "string" + } + }, + { + name: "exclude", + type: "list", + element: { + name: "exclude", + type: "string" + } + }, + { + name: "disableFilenameBasedTypeAcquisition", + type: "boolean", + defaultValueDescription: !1 + } + ]; + function gO(e) { + const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); + return rr(e, (i) => { + t.set(i.name.toLowerCase(), i), i.shortName && n.set(i.shortName, i.name); + }), { optionsNameMap: t, shortOptionNames: n }; + } + var uye; + function WC() { + return uye || (uye = gO(Dd)); + } + var G9e = { + diagnostic: p.Compiler_option_0_may_only_be_used_with_build, + getOptionsNameMap: mye + }, hz = { + module: 1, + target: 3, + strict: !0, + esModuleInterop: !0, + forceConsistentCasingInFileNames: !0, + skipLibCheck: !0 + }; + function kre(e) { + return _ye(e, zo); + } + function _ye(e, t) { + const n = ts(e.type.keys()), i = (e.deprecatedKeys ? n.filter((s) => !e.deprecatedKeys.has(s)) : n).map((s) => `'${s}'`).join(", "); + return t(p.Argument_for_0_option_must_be_Colon_1, `--${e.name}`, i); + } + function hO(e, t, n) { + return Xye(e, (t ?? "").trim(), n); + } + function Cre(e, t = "", n) { + if (t = t.trim(), zi(t, "-")) + return; + if (e.type === "listOrElement" && !t.includes(",")) + return Px(e, t, n); + if (t === "") + return []; + const i = t.split(","); + switch (e.element.type) { + case "number": + return Ii(i, (s) => Px(e.element, parseInt(s), n)); + case "string": + return Ii(i, (s) => Px(e.element, s || "", n)); + case "boolean": + case "object": + return E.fail(`List of ${e.element.type} is not yet supported.`); + default: + return Ii(i, (s) => hO(e.element, s, n)); + } + } + function fye(e) { + return e.name; + } + function Ere(e, t, n, i, s) { + var o; + if ((o = t.alternateMode) != null && o.getOptionsNameMap().optionsNameMap.has(e.toLowerCase())) + return lv(s, i, t.alternateMode.diagnostic, e); + const c = F2(e, t.optionDeclarations, fye); + return c ? lv(s, i, t.unknownDidYouMeanDiagnostic, n || e, c.name) : lv(s, i, t.unknownOptionDiagnostic, n || e); + } + function yz(e, t, n) { + const i = {}; + let s; + const o = [], c = []; + return _(t), { + options: i, + watchOptions: s, + fileNames: o, + errors: c + }; + function _(d) { + let g = 0; + for (; g < d.length; ) { + const h = d[g]; + if (g++, h.charCodeAt(0) === 64) + u(h.slice(1)); + else if (h.charCodeAt(0) === 45) { + const S = h.slice(h.charCodeAt(1) === 45 ? 2 : 1), T = Pre( + e.getOptionsNameMap, + S, + /*allowShort*/ + !0 + ); + if (T) + g = pye(d, g, e, T, i, c); + else { + const C = Pre( + Tz.getOptionsNameMap, + S, + /*allowShort*/ + !0 + ); + C ? g = pye(d, g, Tz, C, s || (s = {}), c) : c.push(Ere(S, e, h)); + } + } else + o.push(h); + } + } + function u(d) { + const g = mD(d, n || ((T) => _l.readFile(T))); + if (!Gi(g)) { + c.push(g); + return; + } + const h = []; + let S = 0; + for (; ; ) { + for (; S < g.length && g.charCodeAt(S) <= 32; ) S++; + if (S >= g.length) break; + const T = S; + if (g.charCodeAt(T) === 34) { + for (S++; S < g.length && g.charCodeAt(S) !== 34; ) S++; + S < g.length ? (h.push(g.substring(T + 1, S)), S++) : c.push(zo(p.Unterminated_quoted_string_in_response_file_0, d)); + } else { + for (; g.charCodeAt(S) > 32; ) S++; + h.push(g.substring(T, S)); + } + } + _(h); + } + } + function pye(e, t, n, i, s, o) { + if (i.isTSConfigOnly) { + const c = e[t]; + c === "null" ? (s[i.name] = void 0, t++) : i.type === "boolean" ? c === "false" ? (s[i.name] = Px( + i, + /*value*/ + !1, + o + ), t++) : (c === "true" && t++, o.push(zo(p.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, i.name))) : (o.push(zo(p.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, i.name)), c && !zi(c, "-") && t++); + } else if (!e[t] && i.type !== "boolean" && o.push(zo(n.optionTypeMismatchDiagnostic, i.name, xz(i))), e[t] !== "null") + switch (i.type) { + case "number": + s[i.name] = Px(i, parseInt(e[t]), o), t++; + break; + case "boolean": + const c = e[t]; + s[i.name] = Px(i, c !== "false", o), (c === "false" || c === "true") && t++; + break; + case "string": + s[i.name] = Px(i, e[t] || "", o), t++; + break; + case "list": + const _ = Cre(i, e[t], o); + s[i.name] = _ || [], _ && t++; + break; + case "listOrElement": + E.fail("listOrElement not supported here"); + break; + default: + s[i.name] = hO(i, e[t], o), t++; + break; + } + else + s[i.name] = void 0, t++; + return t; + } + var yO = { + alternateMode: G9e, + getOptionsNameMap: WC, + optionDeclarations: Dd, + unknownOptionDiagnostic: p.Unknown_compiler_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_compiler_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Compiler_option_0_expects_an_argument + }; + function Dre(e, t) { + return yz(yO, e, t); + } + function vz(e, t) { + return Pre(WC, e, t); + } + function Pre(e, t, n = !1) { + t = t.toLowerCase(); + const { optionsNameMap: i, shortOptionNames: s } = e(); + if (n) { + const o = s.get(t); + o !== void 0 && (t = o); + } + return i.get(t); + } + var dye; + function mye() { + return dye || (dye = gO(vA)); + } + var $9e = { + diagnostic: p.Compiler_option_0_may_not_be_used_with_build, + getOptionsNameMap: WC + }, X9e = { + alternateMode: $9e, + getOptionsNameMap: mye, + optionDeclarations: vA, + unknownOptionDiagnostic: p.Unknown_build_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_build_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Build_option_0_requires_a_value_of_type_1 + }; + function wre(e) { + const { options: t, watchOptions: n, fileNames: i, errors: s } = yz( + X9e, + e + ), o = t; + return i.length === 0 && i.push("."), o.clean && o.force && s.push(zo(p.Options_0_and_1_cannot_be_combined, "clean", "force")), o.clean && o.verbose && s.push(zo(p.Options_0_and_1_cannot_be_combined, "clean", "verbose")), o.clean && o.watch && s.push(zo(p.Options_0_and_1_cannot_be_combined, "clean", "watch")), o.watch && o.dry && s.push(zo(p.Options_0_and_1_cannot_be_combined, "watch", "dry")), { buildOptions: o, watchOptions: n, projects: i, errors: s }; + } + function g_(e, ...t) { + return Is(zo(e, ...t).messageText, Gi); + } + function bA(e, t, n, i, s, o) { + const c = mD(e, (d) => n.readFile(d)); + if (!Gi(c)) { + n.onUnRecoverableConfigFileDiagnostic(c); + return; + } + const _ = hA(e, c), u = n.getCurrentDirectory(); + return _.path = _o(e, u, eu(n.useCaseSensitiveFileNames)), _.resolvedPath = _.path, _.originalFileName = _.fileName, xA( + _, + n, + Xi(Xn(e), u), + t, + Xi(e, u), + /*resolutionStack*/ + void 0, + o, + i, + s + ); + } + function SA(e, t) { + const n = mD(e, t); + return Gi(n) ? bz(e, n) : { config: {}, error: n }; + } + function bz(e, t) { + const n = hA(e, t); + return { + config: Pye( + n, + n.parseDiagnostics, + /*jsonConversionNotifier*/ + void 0 + ), + error: n.parseDiagnostics.length ? n.parseDiagnostics[0] : void 0 + }; + } + function Are(e, t) { + const n = mD(e, t); + return Gi(n) ? hA(e, n) : { fileName: e, parseDiagnostics: [n] }; + } + function mD(e, t) { + let n; + try { + n = t(e); + } catch (i) { + return zo(p.Cannot_read_file_0_Colon_1, e, i.message); + } + return n === void 0 ? zo(p.Cannot_read_file_0, e) : n; + } + function Sz(e) { + return jk(e, fye); + } + var gye = { + optionDeclarations: mO, + unknownOptionDiagnostic: p.Unknown_type_acquisition_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_type_acquisition_option_0_Did_you_mean_1 + }, hye; + function yye() { + return hye || (hye = gO(Dx)); + } + var Tz = { + getOptionsNameMap: yye, + optionDeclarations: Dx, + unknownOptionDiagnostic: p.Unknown_watch_option_0, + unknownDidYouMeanDiagnostic: p.Unknown_watch_option_0_Did_you_mean_1, + optionTypeMismatchDiagnostic: p.Watch_option_0_requires_a_value_of_type_1 + }, vye; + function bye() { + return vye || (vye = Sz(Dd)); + } + var Sye; + function Tye() { + return Sye || (Sye = Sz(Dx)); + } + var xye; + function kye() { + return xye || (xye = Sz(mO)); + } + var vO = { + name: "extends", + type: "listOrElement", + element: { + name: "extends", + type: "string" + }, + category: p.File_Management, + disallowNullOrUndefined: !0 + }, Cye = { + name: "compilerOptions", + type: "object", + elementOptions: bye(), + extraKeyDiagnostics: yO + }, Eye = { + name: "watchOptions", + type: "object", + elementOptions: Tye(), + extraKeyDiagnostics: Tz + }, Dye = { + name: "typeAcquisition", + type: "object", + elementOptions: kye(), + extraKeyDiagnostics: gye + }, Nre; + function Q9e() { + return Nre === void 0 && (Nre = { + name: void 0, + // should never be needed since this is root + type: "object", + elementOptions: Sz([ + Cye, + Eye, + Dye, + vO, + { + name: "references", + type: "list", + element: { + name: "references", + type: "object" + }, + category: p.Projects + }, + { + name: "files", + type: "list", + element: { + name: "files", + type: "string" + }, + category: p.File_Management + }, + { + name: "include", + type: "list", + element: { + name: "include", + type: "string" + }, + category: p.File_Management, + defaultValueDescription: p.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk + }, + { + name: "exclude", + type: "list", + element: { + name: "exclude", + type: "string" + }, + category: p.File_Management, + defaultValueDescription: p.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified + }, + fO + ]) + }), Nre; + } + function Pye(e, t, n) { + var i; + const s = (i = e.statements[0]) == null ? void 0 : i.expression; + if (s && s.kind !== 210) { + if (t.push(rp( + e, + s, + p.The_root_value_of_a_0_file_must_be_an_object, + Wc(e.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json" + )), Wl(s)) { + const o = Nn(s.elements, Gs); + if (o) + return TA( + e, + o, + t, + /*returnValue*/ + !0, + n + ); + } + return {}; + } + return TA( + e, + s, + t, + /*returnValue*/ + !0, + n + ); + } + function Ire(e, t) { + var n; + return TA( + e, + (n = e.statements[0]) == null ? void 0 : n.expression, + t, + /*returnValue*/ + !0, + /*jsonConversionNotifier*/ + void 0 + ); + } + function TA(e, t, n, i, s) { + if (!t) + return i ? {} : void 0; + return _(t, s?.rootOptions); + function o(d, g) { + var h; + const S = i ? {} : void 0; + for (const T of d.properties) { + if (T.kind !== 303) { + n.push(rp(e, T, p.Property_assignment_expected)); + continue; + } + T.questionToken && n.push(rp(e, T.questionToken, p.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")), u(T.name) || n.push(rp(e, T.name, p.String_literal_with_double_quotes_expected)); + const C = qw(T.name) ? void 0 : OT(T.name), D = C && Pi(C), P = D ? (h = g?.elementOptions) == null ? void 0 : h.get(D) : void 0, O = _(T.initializer, P); + typeof D < "u" && (i && (S[D] = O), s?.onPropertySet(D, O, T, g, P)); + } + return S; + } + function c(d, g) { + if (!i) { + d.forEach((h) => _(h, g)); + return; + } + return Ln(d.map((h) => _(h, g)), (h) => h !== void 0); + } + function _(d, g) { + switch (d.kind) { + case 112: + return !0; + case 97: + return !1; + case 106: + return null; + case 11: + return u(d) || n.push(rp(e, d, p.String_literal_with_double_quotes_expected)), d.text; + case 9: + return Number(d.text); + case 224: + if (d.operator !== 41 || d.operand.kind !== 9) + break; + return -Number(d.operand.text); + case 210: + return o(d, g); + case 209: + return c( + d.elements, + g && g.element + ); + } + g ? n.push(rp(e, d, p.Compiler_option_0_requires_a_value_of_type_1, g.name, xz(g))) : n.push(rp(e, d, p.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal)); + } + function u(d) { + return Ks(d) && E7(d, e); + } + } + function xz(e) { + return e.type === "listOrElement" ? `${xz(e.element)} or Array` : e.type === "list" ? "Array" : Gi(e.type) ? e.type : "string"; + } + function wye(e, t) { + if (e) { + if (kA(t)) return !e.disallowNullOrUndefined; + if (e.type === "list") + return ss(t); + if (e.type === "listOrElement") + return ss(t) || wye(e.element, t); + const n = Gi(e.type) ? e.type : "string"; + return typeof t === n; + } + return !1; + } + function kz(e, t, n) { + var i, s, o; + const c = eu(n.useCaseSensitiveFileNames), _ = or( + Ln( + e.fileNames, + (s = (i = e.options.configFile) == null ? void 0 : i.configFileSpecs) != null && s.validatedIncludeSpecs ? Z9e( + t, + e.options.configFile.configFileSpecs.validatedIncludeSpecs, + e.options.configFile.configFileSpecs.validatedExcludeSpecs, + n + ) : A1 + ), + (C) => LE(Xi(t, n.getCurrentDirectory()), Xi(C, n.getCurrentDirectory()), c) + ), u = { configFilePath: Xi(t, n.getCurrentDirectory()), useCaseSensitiveFileNames: n.useCaseSensitiveFileNames }, d = SO(e.options, u), g = e.watchOptions && K9e(e.watchOptions), h = { + compilerOptions: { + ...bO(d), + showConfig: void 0, + configFile: void 0, + configFilePath: void 0, + help: void 0, + init: void 0, + listFiles: void 0, + listEmittedFiles: void 0, + project: void 0, + build: void 0, + version: void 0 + }, + watchOptions: g && bO(g), + references: or(e.projectReferences, (C) => ({ ...C, path: C.originalPath ? C.originalPath : "", originalPath: void 0 })), + files: Dr(_) ? _ : void 0, + ...(o = e.options.configFile) != null && o.configFileSpecs ? { + include: Y9e(e.options.configFile.configFileSpecs.validatedIncludeSpecs), + exclude: e.options.configFile.configFileSpecs.validatedExcludeSpecs + } : {}, + compileOnSave: e.compileOnSave ? !0 : void 0 + }, S = new Set(d.keys()), T = {}; + for (const C in Kc) + if (!S.has(C) && ut(Kc[C].dependencies, (D) => S.has(D))) { + const D = Kc[C].computeValue(e.options), P = Kc[C].computeValue({}); + D !== P && (T[C] = Kc[C].computeValue(e.options)); + } + return I2(h.compilerOptions, bO(SO(T, u))), h; + } + function bO(e) { + return { + ...ts(e.entries()).reduce((t, n) => ({ ...t, [n[0]]: n[1] }), {}) + }; + } + function Y9e(e) { + if (Dr(e)) { + if (Dr(e) !== 1) return e; + if (e[0] !== Dz) + return e; + } + } + function Z9e(e, t, n, i) { + if (!t) return A1; + const s = d5(e, n, t, i.useCaseSensitiveFileNames, i.getCurrentDirectory()), o = s.excludePattern && vy(s.excludePattern, i.useCaseSensitiveFileNames), c = s.includeFilePattern && vy(s.includeFilePattern, i.useCaseSensitiveFileNames); + return c ? o ? (_) => !(c.test(_) && !o.test(_)) : (_) => !c.test(_) : o ? (_) => o.test(_) : A1; + } + function Aye(e) { + switch (e.type) { + case "string": + case "number": + case "boolean": + case "object": + return; + case "list": + case "listOrElement": + return Aye(e.element); + default: + return e.type; + } + } + function Cz(e, t) { + return Dl(t, (n, i) => { + if (n === e) + return i; + }); + } + function SO(e, t) { + return Nye(e, WC(), t); + } + function K9e(e) { + return Nye(e, yye()); + } + function Nye(e, { optionsNameMap: t }, n) { + const i = /* @__PURE__ */ new Map(), s = n && eu(n.useCaseSensitiveFileNames); + for (const o in e) + if (io(e, o)) { + if (t.has(o) && (t.get(o).category === p.Command_line_Options || t.get(o).category === p.Output_Formatting)) + continue; + const c = e[o], _ = t.get(o.toLowerCase()); + if (_) { + E.assert(_.type !== "listOrElement"); + const u = Aye(_); + u ? _.type === "list" ? i.set(o, c.map((d) => Cz(d, u))) : i.set(o, Cz(c, u)) : n && _.isFilePath ? i.set(o, LE(n.configFilePath, Xi(c, Xn(n.configFilePath)), s)) : n && _.type === "list" && _.element.isFilePath ? i.set(o, c.map((d) => LE(n.configFilePath, Xi(d, Xn(n.configFilePath)), s))) : i.set(o, c); + } + } + return i; + } + function Ore(e, t) { + const n = Iye(e); + return s(); + function i(o) { + return Array(o + 1).join(" "); + } + function s() { + const o = [], c = i(2); + return mre.forEach((_) => { + if (!n.has(_.name)) + return; + const u = n.get(_.name), d = zre(_); + u !== d ? o.push(`${c}${_.name}: ${u}`) : io(hz, _.name) && o.push(`${c}${_.name}: ${d}`); + }), o.join(t) + t; + } + } + function Iye(e) { + const t = _I(e, hz); + return SO(t); + } + function Fre(e, t, n) { + const i = Iye(e); + return c(); + function s(_) { + return Array(_ + 1).join(" "); + } + function o({ category: _, name: u, isCommandLineOnly: d }) { + const g = [p.Command_line_Options, p.Editor_Support, p.Compiler_Diagnostics, p.Backwards_Compatibility, p.Watch_and_Build_Modes, p.Output_Formatting]; + return !d && _ !== void 0 && (!g.includes(_) || i.has(u)); + } + function c() { + const _ = /* @__PURE__ */ new Map(); + _.set(p.Projects, []), _.set(p.Language_and_Environment, []), _.set(p.Modules, []), _.set(p.JavaScript_Support, []), _.set(p.Emit, []), _.set(p.Interop_Constraints, []), _.set(p.Type_Checking, []), _.set(p.Completeness, []); + for (const T of Dd) + if (o(T)) { + let C = _.get(T.category); + C || _.set(T.category, C = []), C.push(T); + } + let u = 0, d = 0; + const g = []; + _.forEach((T, C) => { + g.length !== 0 && g.push({ value: "" }), g.push({ value: `/* ${as(C)} */` }); + for (const D of T) { + let P; + i.has(D.name) ? P = `"${D.name}": ${JSON.stringify(i.get(D.name))}${(d += 1) === i.size ? "" : ","}` : P = `// "${D.name}": ${JSON.stringify(zre(D))},`, g.push({ + value: P, + description: `/* ${D.description && as(D.description) || D.name} */` + }), u = Math.max(P.length, u); + } + }); + const h = s(2), S = []; + S.push("{"), S.push(`${h}"compilerOptions": {`), S.push(`${h}${h}/* ${as(p.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`), S.push(""); + for (const T of g) { + const { value: C, description: D = "" } = T; + S.push(C && `${h}${h}${C}${D && s(u - C.length + 2) + D}`); + } + if (t.length) { + S.push(`${h}},`), S.push(`${h}"files": [`); + for (let T = 0; T < t.length; T++) + S.push(`${h}${h}${JSON.stringify(t[T])}${T === t.length - 1 ? "" : ","}`); + S.push(`${h}]`); + } else + S.push(`${h}}`); + return S.push("}"), S.join(n) + n; + } + } + function TO(e, t) { + const n = {}, i = WC().optionsNameMap; + for (const s in e) + io(e, s) && (n[s] = eLe( + i.get(s.toLowerCase()), + e[s], + t + )); + return n.configFilePath && (n.configFilePath = t(n.configFilePath)), n; + } + function eLe(e, t, n) { + if (e && !kA(t)) { + if (e.type === "list") { + const i = t; + if (e.element.isFilePath && i.length) + return i.map(n); + } else if (e.isFilePath) + return n(t); + E.assert(e.type !== "listOrElement"); + } + return t; + } + function Oye(e, t, n, i, s, o, c, _, u) { + return Lye( + e, + /*sourceFile*/ + void 0, + t, + n, + i, + u, + s, + o, + c, + _ + ); + } + function xA(e, t, n, i, s, o, c, _, u) { + var d, g; + (d = rn) == null || d.push(rn.Phase.Parse, "parseJsonSourceFileConfigFileContent", { path: e.fileName }); + const h = Lye( + /*json*/ + void 0, + e, + t, + n, + i, + u, + s, + o, + c, + _ + ); + return (g = rn) == null || g.pop(), h; + } + function Ez(e, t) { + t && Object.defineProperty(e, "configFile", { enumerable: !1, writable: !1, value: t }); + } + function kA(e) { + return e == null; + } + function Fye(e, t) { + return Xn(Xi(e, t)); + } + var Dz = "**/*"; + function Lye(e, t, n, i, s = {}, o, c, _ = [], u = [], d) { + E.assert(e === void 0 && t !== void 0 || e !== void 0 && t === void 0); + const g = [], h = zye(e, t, n, i, c, _, g, d), { raw: S } = h, T = Mye( + _I(s, h.options || {}), + Sre, + i + ), C = xO( + o && h.watchOptions ? _I(o, h.watchOptions) : h.watchOptions || o, + i + ); + T.configFilePath = c && Rl(c); + const D = Cs(c ? Fye(c, i) : i), P = O(); + return t && (t.configFileSpecs = P), Ez(T, t), { + options: T, + watchOptions: C, + fileNames: j(D), + projectReferences: F(D), + typeAcquisition: h.typeAcquisition || wz(), + raw: S, + errors: g, + // Wildcard directories (provided as part of a wildcard path) are stored in a + // file map that marks whether it was a regular wildcard match (with a `*` or `?` token), + // or a recursive directory. This information is used by filesystem watchers to monitor for + // new entries in these paths. + wildcardDirectories: fLe(P, D, n.useCaseSensitiveFileNames), + compileOnSave: !!S.compileOnSave + }; + function O() { + const G = $("references", (Ae) => typeof Ae == "object", "object"), ce = V(L("files")); + if (ce) { + const Ae = G === "no-prop" || ss(G) && G.length === 0, ge = io(S, "extends"); + if (ce.length === 0 && Ae && !ge) + if (t) { + const de = c || "tsconfig.json", ve = p.The_files_list_in_config_file_0_is_empty, De = Yw(t, "files", (Ie) => Ie.initializer), Xe = lv(t, De, ve, de); + g.push(Xe); + } else + U(p.The_files_list_in_config_file_0_is_empty, c || "tsconfig.json"); + } + let K = V(L("include")); + const X = L("exclude"); + let Z = !1, oe = V(X); + if (X === "no-prop") { + const Ae = T.outDir, ge = T.declarationDir; + (Ae || ge) && (oe = Ln([Ae, ge], (de) => !!de)); + } + ce === void 0 && K === void 0 && (K = [Dz], Z = !0); + let ne, pe, fe, H; + K && (ne = Kye( + K, + g, + /*disallowTrailingRecursion*/ + !0, + t, + "include" + ), fe = kO( + ne, + D + ) || ne), oe && (pe = Kye( + oe, + g, + /*disallowTrailingRecursion*/ + !1, + t, + "exclude" + ), H = kO( + pe, + D + ) || pe); + const ae = Ln(ce, Gi), le = kO( + ae, + D + ) || ae; + return { + filesSpecs: ce, + includeSpecs: K, + excludeSpecs: oe, + validatedFilesSpec: le, + validatedIncludeSpecs: fe, + validatedExcludeSpecs: H, + validatedFilesSpecBeforeSubstitution: ae, + validatedIncludeSpecsBeforeSubstitution: ne, + validatedExcludeSpecsBeforeSubstitution: pe, + pathPatterns: void 0, + // Initialized on first use + isDefaultIncludeSpec: Z + }; + } + function j(G) { + const ce = hD(P, G, T, n, u); + return Jye(ce, gD(S), _) && g.push(Bye(P, c)), ce; + } + function F(G) { + let ce; + const K = $("references", (X) => typeof X == "object", "object"); + if (ss(K)) + for (const X of K) + typeof X.path != "string" ? U(p.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string") : (ce || (ce = [])).push({ + path: Xi(X.path, G), + originalPath: X.path, + prepend: X.prepend, + circular: X.circular + }); + return ce; + } + function V(G) { + return ss(G) ? G : void 0; + } + function L(G) { + return $(G, Gi, "string"); + } + function $(G, ce, K) { + if (io(S, G) && !kA(S[G])) + if (ss(S[G])) { + const X = S[G]; + return !t && !Ri(X, ce) && g.push(zo(p.Compiler_option_0_requires_a_value_of_type_1, G, K)), X; + } else + return U(p.Compiler_option_0_requires_a_value_of_type_1, G, "Array"), "not-array"; + return "no-prop"; + } + function U(G, ...ce) { + t || g.push(zo(G, ...ce)); + } + } + function xO(e, t) { + return Mye(e, Tre, t); + } + function Mye(e, t, n) { + if (!e) return e; + let i; + for (const o of t) + if (e[o.name] !== void 0) { + const c = e[o.name]; + switch (o.type) { + case "string": + E.assert(o.isFilePath), Pz(c) && s(o, jye(c, n)); + break; + case "list": + E.assert(o.element.isFilePath); + const _ = kO(c, n); + _ && s(o, _); + break; + case "object": + E.assert(o.name === "paths"); + const u = tLe(c, n); + u && s(o, u); + break; + default: + E.fail("option type not supported"); + } + } + return i || e; + function s(o, c) { + (i ?? (i = I2({}, e)))[o.name] = c; + } + } + var Rye = "${configDir}"; + function Pz(e) { + return Gi(e) && zi( + e, + Rye, + /*ignoreCase*/ + !0 + ); + } + function jye(e, t) { + return Xi(e.replace(Rye, "./"), t); + } + function kO(e, t) { + if (!e) return e; + let n; + return e.forEach((i, s) => { + Pz(i) && ((n ?? (n = e.slice()))[s] = jye(i, t)); + }), n; + } + function tLe(e, t) { + let n; + return Gd(e).forEach((s) => { + if (!ss(e[s])) return; + const o = kO(e[s], t); + o && ((n ?? (n = I2({}, e)))[s] = o); + }), n; + } + function rLe(e) { + return e.code === p.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; + } + function Bye({ includeSpecs: e, excludeSpecs: t }, n) { + return zo( + p.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, + n || "tsconfig.json", + JSON.stringify(e || []), + JSON.stringify(t || []) + ); + } + function Jye(e, t, n) { + return e.length === 0 && t && (!n || n.length === 0); + } + function gD(e) { + return !io(e, "files") && !io(e, "references"); + } + function CO(e, t, n, i, s) { + const o = i.length; + return Jye(e, s) ? i.push(Bye(n, t)) : eR(i, (c) => !rLe(c)), o !== i.length; + } + function nLe(e) { + return !!e.options; + } + function zye(e, t, n, i, s, o, c, _) { + var u; + i = Rl(i); + const d = Xi(s || "", i); + if (o.includes(d)) + return c.push(zo(p.Circularity_detected_while_resolving_configuration_Colon_0, [...o, d].join(" -> "))), { raw: e || Ire(t, c) }; + const g = e ? iLe(e, n, i, s, c) : sLe(t, n, i, s, c); + if ((u = g.options) != null && u.paths && (g.options.pathsBasePath = i), g.extendedConfigPath) { + o = o.concat([d]); + const S = { options: {} }; + Gi(g.extendedConfigPath) ? h(S, g.extendedConfigPath) : g.extendedConfigPath.forEach((T) => h(S, T)), S.include && (g.raw.include = S.include), S.exclude && (g.raw.exclude = S.exclude), S.files && (g.raw.files = S.files), g.raw.compileOnSave === void 0 && S.compileOnSave && (g.raw.compileOnSave = S.compileOnSave), t && S.extendedSourceFiles && (t.extendedSourceFiles = ts(S.extendedSourceFiles.keys())), g.options = I2(S.options, g.options), g.watchOptions = g.watchOptions && S.watchOptions ? I2(S.watchOptions, g.watchOptions) : g.watchOptions || S.watchOptions; + } + return g; + function h(S, T) { + const C = aLe(t, T, n, o, c, _, S); + if (C && nLe(C)) { + const D = C.raw; + let P; + const O = (j) => { + g.raw[j] || D[j] && (S[j] = or(D[j], (F) => Pz(F) || $_(F) ? F : Mn( + P || (P = FE(Xn(T), i, eu(n.useCaseSensitiveFileNames))), + F + ))); + }; + O("include"), O("exclude"), O("files"), D.compileOnSave !== void 0 && (S.compileOnSave = D.compileOnSave), I2(S.options, C.options), S.watchOptions = S.watchOptions && C.watchOptions ? I2({}, S.watchOptions, C.watchOptions) : S.watchOptions || C.watchOptions; + } + } + } + function iLe(e, t, n, i, s) { + io(e, "excludes") && s.push(zo(p.Unknown_option_excludes_Did_you_mean_exclude)); + const o = Gye(e.compilerOptions, n, s, i), c = $ye(e.typeAcquisition, n, s, i), _ = cLe(e.watchOptions, n, s); + e.compileOnSave = oLe(e, n, s); + const u = e.extends || e.extends === "" ? Wye(e.extends, t, n, i, s) : void 0; + return { raw: e, options: o, watchOptions: _, typeAcquisition: c, extendedConfigPath: u }; + } + function Wye(e, t, n, i, s, o, c, _) { + let u; + const d = i ? Fye(i, n) : n; + if (Gi(e)) + u = Vye( + e, + t, + d, + s, + c, + _ + ); + else if (ss(e)) { + u = []; + for (let g = 0; g < e.length; g++) { + const h = e[g]; + Gi(h) ? u = Tr( + u, + Vye( + h, + t, + d, + s, + c?.elements[g], + _ + ) + ) : pS(vO.element, e, n, s, o, c?.elements[g], _); + } + } else + pS(vO, e, n, s, o, c, _); + return u; + } + function sLe(e, t, n, i, s) { + const o = Hye(i); + let c, _, u, d; + const g = Q9e(), h = Pye( + e, + s, + { rootOptions: g, onPropertySet: S } + ); + return c || (c = wz(i)), d && h && h.compilerOptions === void 0 && s.push(rp(e, d[0], p._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, OT(d[0]))), { raw: h, options: o, watchOptions: _, typeAcquisition: c, extendedConfigPath: u }; + function S(T, C, D, P, O) { + if (O && O !== vO && (C = pS(O, C, n, s, D, D.initializer, e)), P?.name) + if (O) { + let j; + P === Cye ? j = o : P === Eye ? j = _ ?? (_ = {}) : P === Dye ? j = c ?? (c = wz(i)) : E.fail("Unknown option"), j[O.name] = C; + } else T && P?.extraKeyDiagnostics && (P.elementOptions ? s.push(Ere( + T, + P.extraKeyDiagnostics, + /*unknownOptionErrorText*/ + void 0, + D.name, + e + )) : s.push(rp(e, D.name, P.extraKeyDiagnostics.unknownOptionDiagnostic, T))); + else P === g && (O === vO ? u = Wye(C, t, n, i, s, D, D.initializer, e) : O || (T === "excludes" && s.push(rp(e, D.name, p.Unknown_option_excludes_Did_you_mean_exclude)), Nn(mre, (j) => j.name === T) && (d = Tr(d, D.name)))); + } + } + function Vye(e, t, n, i, s, o) { + if (e = Rl(e), $_(e) || zi(e, "./") || zi(e, "../")) { + let _ = Xi(e, n); + if (!t.fileExists(_) && !nc( + _, + ".json" + /* Json */ + ) && (_ = `${_}.json`, !t.fileExists(_))) { + i.push(lv(o, s, p.File_0_not_found, e)); + return; + } + return _; + } + const c = ene(e, Mn(n, "tsconfig.json"), t); + if (c.resolvedModule) + return c.resolvedModule.resolvedFileName; + e === "" ? i.push(lv(o, s, p.Compiler_option_0_cannot_be_given_an_empty_string, "extends")) : i.push(lv(o, s, p.File_0_not_found, e)); + } + function aLe(e, t, n, i, s, o, c) { + const _ = n.useCaseSensitiveFileNames ? t : sy(t); + let u, d, g; + if (o && (u = o.get(_)) ? { extendedResult: d, extendedConfig: g } = u : (d = Are(t, (h) => n.readFile(h)), d.parseDiagnostics.length || (g = zye( + /*json*/ + void 0, + d, + n, + Xn(t), + Wc(t), + i, + s, + o + )), o && o.set(_, { extendedResult: d, extendedConfig: g })), e && ((c.extendedSourceFiles ?? (c.extendedSourceFiles = /* @__PURE__ */ new Set())).add(d.fileName), d.extendedSourceFiles)) + for (const h of d.extendedSourceFiles) + c.extendedSourceFiles.add(h); + if (d.parseDiagnostics.length) { + s.push(...d.parseDiagnostics); + return; + } + return g; + } + function oLe(e, t, n) { + if (!io(e, fO.name)) + return !1; + const i = pS(fO, e.compileOnSave, t, n); + return typeof i == "boolean" && i; + } + function Uye(e, t, n) { + const i = []; + return { options: Gye(e, t, i, n), errors: i }; + } + function qye(e, t, n) { + const i = []; + return { options: $ye(e, t, i, n), errors: i }; + } + function Hye(e) { + return e && Wc(e) === "jsconfig.json" ? { allowJs: !0, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: !0, skipLibCheck: !0, noEmit: !0 } : {}; + } + function Gye(e, t, n, i) { + const s = Hye(i); + return Lre(bye(), e, t, s, yO, n), i && (s.configFilePath = Rl(i)), s; + } + function wz(e) { + return { enable: !!e && Wc(e) === "jsconfig.json", include: [], exclude: [] }; + } + function $ye(e, t, n, i) { + const s = wz(i); + return Lre(kye(), e, t, s, gye, n), s; + } + function cLe(e, t, n) { + return Lre( + Tye(), + e, + t, + /*defaultOptions*/ + void 0, + Tz, + n + ); + } + function Lre(e, t, n, i, s, o) { + if (t) { + for (const c in t) { + const _ = e.get(c); + _ ? (i || (i = {}))[_.name] = pS(_, t[c], n, o) : o.push(Ere(c, s)); + } + return i; + } + } + function lv(e, t, n, ...i) { + return e && t ? rp(e, t, n, ...i) : zo(n, ...i); + } + function pS(e, t, n, i, s, o, c) { + if (e.isCommandLineOnly) { + i.push(lv(c, s?.name, p.Option_0_can_only_be_specified_on_command_line, e.name)); + return; + } + if (wye(e, t)) { + const _ = e.type; + if (_ === "list" && ss(t)) + return Qye(e, t, n, i, s, o, c); + if (_ === "listOrElement") + return ss(t) ? Qye(e, t, n, i, s, o, c) : pS(e.element, t, n, i, s, o, c); + if (!Gi(e.type)) + return Xye(e, t, i, o, c); + const u = Px(e, t, i, o, c); + return kA(u) ? u : lLe(e, n, u); + } else + i.push(lv(c, o, p.Compiler_option_0_requires_a_value_of_type_1, e.name, xz(e))); + } + function lLe(e, t, n) { + return e.isFilePath && (n = Rl(n), n = Pz(n) ? n : Xi(n, t), n === "" && (n = ".")), n; + } + function Px(e, t, n, i, s) { + var o; + if (kA(t)) return; + const c = (o = e.extraValidation) == null ? void 0 : o.call(e, t); + if (!c) return t; + n.push(lv(s, i, ...c)); + } + function Xye(e, t, n, i, s) { + if (kA(t)) return; + const o = t.toLowerCase(), c = e.type.get(o); + if (c !== void 0) + return Px(e, c, n, i, s); + n.push(_ye(e, (_, ...u) => lv(s, i, _, ...u))); + } + function Qye(e, t, n, i, s, o, c) { + return Ln(or(t, (_, u) => pS(e.element, _, n, i, s, o?.elements[u], c)), (_) => e.listPreserveFalsyValues ? !0 : !!_); + } + var uLe = /(^|\/)\*\*\/?$/, _Le = /^[^*?]*(?=\/[^/]*[*?])/; + function hD(e, t, n, i, s = He) { + t = Cs(t); + const o = eu(i.useCaseSensitiveFileNames), c = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), { validatedFilesSpec: d, validatedIncludeSpecs: g, validatedExcludeSpecs: h } = e, S = L4(n, s), T = J3(n, S); + if (d) + for (const O of d) { + const j = Xi(O, t); + c.set(o(j), j); + } + let C; + if (g && g.length > 0) + for (const O of i.readDirectory( + t, + Ep(T), + h, + g, + /*depth*/ + void 0 + )) { + if (Go( + O, + ".json" + /* Json */ + )) { + if (!C) { + const V = g.filter(($) => nc( + $, + ".json" + /* Json */ + )), L = or(f5(V, t, "files"), ($) => `^${$}$`); + C = L ? L.map(($) => vy($, i.useCaseSensitiveFileNames)) : He; + } + if (rc(C, (V) => V.test(O)) !== -1) { + const V = o(O); + !c.has(V) && !u.has(V) && u.set(V, O); + } + continue; + } + if (dLe(O, c, _, S, o)) + continue; + mLe(O, _, S, o); + const j = o(O); + !c.has(j) && !_.has(j) && _.set(j, O); + } + const D = ts(c.values()), P = ts(_.values()); + return D.concat(P, ts(u.values())); + } + function Mre(e, t, n, i, s) { + const { validatedFilesSpec: o, validatedIncludeSpecs: c, validatedExcludeSpecs: _ } = t; + if (!Dr(c) || !Dr(_)) return !1; + n = Cs(n); + const u = eu(i); + if (o) { + for (const d of o) + if (u(Xi(d, n)) === e) return !1; + } + return Zye(e, _, i, s, n); + } + function Yye(e) { + const t = zi(e, "**/") ? 0 : e.indexOf("/**/"); + return t === -1 ? !1 : (nc(e, "/..") ? e.length : e.lastIndexOf("/../")) > t; + } + function EO(e, t, n, i) { + return Zye( + e, + Ln(t, (s) => !Yye(s)), + n, + i + ); + } + function Zye(e, t, n, i, s) { + const o = O4(t, Mn(Cs(i), s), "exclude"), c = o && vy(o, n); + return c ? c.test(e) ? !0 : !zk(e) && c.test(bl(e)) : !1; + } + function Kye(e, t, n, i, s) { + return e.filter((c) => { + if (!Gi(c)) return !1; + const _ = Rre(c, n); + return _ !== void 0 && t.push(o(..._)), _ === void 0; + }); + function o(c, _) { + const u = m7(i, s, _); + return lv(i, u, c, _); + } + } + function Rre(e, t) { + if (E.assert(typeof e == "string"), t && uLe.test(e)) + return [p.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, e]; + if (Yye(e)) + return [p.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, e]; + } + function fLe({ validatedIncludeSpecs: e, validatedExcludeSpecs: t }, n, i) { + const s = O4(t, n, "exclude"), o = s && new RegExp(s, i ? "" : "i"), c = {}, _ = /* @__PURE__ */ new Map(); + if (e !== void 0) { + const u = []; + for (const d of e) { + const g = Cs(Mn(n, d)); + if (o && o.test(g)) + continue; + const h = pLe(g, i); + if (h) { + const { key: S, path: T, flags: C } = h, D = _.get(S), P = D !== void 0 ? c[D] : void 0; + (P === void 0 || P < C) && (c[D !== void 0 ? D : T] = C, D === void 0 && _.set(S, T), C === 1 && u.push(S)); + } + } + for (const d in c) + if (io(c, d)) + for (const g of u) { + const h = jre(d, i); + h !== g && Gp(g, h, n, !i) && delete c[d]; + } + } + return c; + } + function jre(e, t) { + return t ? e : sy(e); + } + function pLe(e, t) { + const n = _Le.exec(e); + if (n) { + const i = e.indexOf("?"), s = e.indexOf("*"), o = e.lastIndexOf(Oo); + return { + key: jre(n[0], t), + path: n[0], + flags: i !== -1 && i < o || s !== -1 && s < o ? 1 : 0 + /* None */ + }; + } + if (eJ(e.substring(e.lastIndexOf(Oo) + 1))) { + const i = F1(e); + return { + key: jre(i, t), + path: i, + flags: 1 + /* Recursive */ + }; + } + } + function dLe(e, t, n, i, s) { + const o = rr(i, (c) => Lc(e, c) ? c : void 0); + if (!o) + return !1; + for (const c of o) { + if (Go(e, c) && (c !== ".ts" || !Go( + e, + ".d.ts" + /* Dts */ + ))) + return !1; + const _ = s(by(e, c)); + if (t.has(_) || n.has(_)) { + if (c === ".d.ts" && (Go( + e, + ".js" + /* Js */ + ) || Go( + e, + ".jsx" + /* Jsx */ + ))) + continue; + return !0; + } + } + return !1; + } + function mLe(e, t, n, i) { + const s = rr(n, (o) => Lc(e, o) ? o : void 0); + if (s) + for (let o = s.length - 1; o >= 0; o--) { + const c = s[o]; + if (Go(e, c)) + return; + const _ = i(by(e, c)); + t.delete(_); + } + } + function Bre(e) { + const t = {}; + for (const n in e) + if (io(e, n)) { + const i = vz(n); + i !== void 0 && (t[n] = Jre(e[n], i)); + } + return t; + } + function Jre(e, t) { + if (e === void 0) return e; + switch (t.type) { + case "object": + return ""; + case "string": + return ""; + case "number": + return typeof e == "number" ? e : ""; + case "boolean": + return typeof e == "boolean" ? e : ""; + case "listOrElement": + if (!ss(e)) return Jre(e, t.element); + case "list": + const n = t.element; + return ss(e) ? Ii(e, (i) => Jre(i, n)) : ""; + default: + return Dl(t.type, (i, s) => { + if (i === e) + return s; + }); + } + } + function zre(e) { + switch (e.type) { + case "number": + return 1; + case "boolean": + return !0; + case "string": + const t = e.defaultValueDescription; + return e.isFilePath ? `./${t && typeof t == "string" ? t : ""}` : ""; + case "list": + return []; + case "listOrElement": + return zre(e.element); + case "object": + return {}; + default: + const n = lI(e.type.keys()); + return n !== void 0 ? n : E.fail("Expected 'option.type' to have entries."); + } + } + function Wi(e, t, ...n) { + e.trace(YT(t, ...n)); + } + function kh(e, t) { + return !!e.traceResolution && t.trace !== void 0; + } + function wx(e, t, n) { + let i; + if (t && e) { + const s = e.contents.packageJsonContent; + typeof s.name == "string" && typeof s.version == "string" && (i = { + name: s.name, + subModuleName: t.path.slice(e.packageDirectory.length + Oo.length), + version: s.version, + peerDependencies: RLe(e, n) + }); + } + return t && { path: t.path, extension: t.ext, packageId: i, resolvedUsingTsExtension: t.resolvedUsingTsExtension }; + } + function Az(e) { + return wx( + /*packageInfo*/ + void 0, + e, + /*state*/ + void 0 + ); + } + function e1e(e) { + if (e) + return E.assert(e.packageId === void 0), { path: e.path, ext: e.extension, resolvedUsingTsExtension: e.resolvedUsingTsExtension }; + } + function DO(e) { + const t = []; + return e & 1 && t.push("TypeScript"), e & 2 && t.push("JavaScript"), e & 4 && t.push("Declaration"), e & 8 && t.push("JSON"), t.join(", "); + } + function gLe(e) { + const t = []; + return e & 1 && t.push(...y5), e & 2 && t.push(...CC), e & 4 && t.push(...h5), e & 8 && t.push( + ".json" + /* Json */ + ), t; + } + function Wre(e) { + if (e) + return E.assert(S5(e.extension)), { fileName: e.path, packageId: e.packageId }; + } + function t1e(e, t, n, i, s, o, c, _, u) { + if (!c.resultFromCache && !c.compilerOptions.preserveSymlinks && t && n && !t.originalPath && !Sl(e)) { + const { resolvedFileName: d, originalPath: g } = n1e(t.path, c.host, c.traceEnabled); + g && (t = { ...t, path: d, originalPath: g }); + } + return r1e( + t, + n, + i, + s, + o, + c.resultFromCache, + _, + u + ); + } + function r1e(e, t, n, i, s, o, c, _) { + return o ? c?.isReadonly ? { + ...o, + failedLookupLocations: Vre(o.failedLookupLocations, n), + affectingLocations: Vre(o.affectingLocations, i), + resolutionDiagnostics: Vre(o.resolutionDiagnostics, s) + } : (o.failedLookupLocations = VC(o.failedLookupLocations, n), o.affectingLocations = VC(o.affectingLocations, i), o.resolutionDiagnostics = VC(o.resolutionDiagnostics, s), o) : { + resolvedModule: e && { + resolvedFileName: e.path, + originalPath: e.originalPath === !0 ? void 0 : e.originalPath, + extension: e.extension, + isExternalLibraryImport: t, + packageId: e.packageId, + resolvedUsingTsExtension: !!e.resolvedUsingTsExtension + }, + failedLookupLocations: yD(n), + affectingLocations: yD(i), + resolutionDiagnostics: yD(s), + alternateResult: _ + }; + } + function yD(e) { + return e.length ? e : void 0; + } + function VC(e, t) { + return t?.length ? e?.length ? (e.push(...t), e) : t : e; + } + function Vre(e, t) { + return e?.length ? t.length ? [...e, ...t] : e.slice() : yD(t); + } + function Ure(e, t, n, i) { + if (!io(e, t)) { + i.traceEnabled && Wi(i.host, p.package_json_does_not_have_a_0_field, t); + return; + } + const s = e[t]; + if (typeof s !== n || s === null) { + i.traceEnabled && Wi(i.host, p.Expected_type_of_0_field_in_package_json_to_be_1_got_2, t, n, s === null ? "null" : typeof s); + return; + } + return s; + } + function Nz(e, t, n, i) { + const s = Ure(e, t, "string", i); + if (s === void 0) + return; + if (!s) { + i.traceEnabled && Wi(i.host, p.package_json_had_a_falsy_0_field, t); + return; + } + const o = Cs(Mn(n, s)); + return i.traceEnabled && Wi(i.host, p.package_json_has_0_field_1_that_references_2, t, s, o), o; + } + function hLe(e, t, n) { + return Nz(e, "typings", t, n) || Nz(e, "types", t, n); + } + function yLe(e, t, n) { + return Nz(e, "tsconfig", t, n); + } + function vLe(e, t, n) { + return Nz(e, "main", t, n); + } + function bLe(e, t) { + const n = Ure(e, "typesVersions", "object", t); + if (n !== void 0) + return t.traceEnabled && Wi(t.host, p.package_json_has_a_typesVersions_field_with_version_specific_path_mappings), n; + } + function SLe(e, t) { + const n = bLe(e, t); + if (n === void 0) return; + if (t.traceEnabled) + for (const c in n) + io(n, c) && !hI.tryParse(c) && Wi(t.host, p.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, c); + const i = PO(n); + if (!i) { + t.traceEnabled && Wi(t.host, p.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0, N2); + return; + } + const { version: s, paths: o } = i; + if (typeof o != "object") { + t.traceEnabled && Wi(t.host, p.Expected_type_of_0_field_in_package_json_to_be_1_got_2, `typesVersions['${s}']`, "object", typeof o); + return; + } + return i; + } + var qre; + function PO(e) { + qre || (qre = new gd(dd)); + for (const t in e) { + if (!io(e, t)) continue; + const n = hI.tryParse(t); + if (n !== void 0 && n.test(qre)) + return { version: t, paths: e[t] }; + } + } + function vD(e, t) { + if (e.typeRoots) + return e.typeRoots; + let n; + if (e.configFilePath ? n = Xn(e.configFilePath) : t.getCurrentDirectory && (n = t.getCurrentDirectory()), n !== void 0) + return TLe(n); + } + function TLe(e) { + let t; + return $p(Cs(e), (n) => { + const i = Mn(n, xLe); + (t ?? (t = [])).push(i); + }), t; + } + var xLe = Mn("node_modules", "@types"); + function kLe(e, t, n) { + const i = typeof n.useCaseSensitiveFileNames == "function" ? n.useCaseSensitiveFileNames() : n.useCaseSensitiveFileNames; + return oh(e, t, !i) === 0; + } + function n1e(e, t, n) { + const i = _1e(e, t, n), s = kLe(e, i, t); + return { + // If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames + resolvedFileName: s ? e : i, + originalPath: s ? void 0 : e + }; + } + function i1e(e, t, n) { + const i = nc(e, "/node_modules/@types") || nc(e, "/node_modules/@types/") ? x1e(t, n) : t; + return Mn(e, i); + } + function Hre(e, t, n, i, s, o, c) { + E.assert(typeof e == "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself."); + const _ = kh(n, i); + s && (n = s.commandLine.options); + const u = t ? Xn(t) : void 0; + let d = u ? o?.getFromDirectoryCache(e, c, u, s) : void 0; + if (!d && u && !Sl(e) && (d = o?.getFromNonRelativeNameCache(e, c, u, s)), d) + return _ && (Wi(i, p.Resolving_type_reference_directive_0_containing_file_1, e, t), s && Wi(i, p.Using_compiler_options_of_project_reference_redirect_0, s.sourceFile.fileName), Wi(i, p.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1, e, u), L(d)), d; + const g = vD(n, i); + _ && (t === void 0 ? g === void 0 ? Wi(i, p.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, e) : Wi(i, p.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, e, g) : g === void 0 ? Wi(i, p.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, e, t) : Wi(i, p.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, e, t, g), s && Wi(i, p.Using_compiler_options_of_project_reference_redirect_0, s.sourceFile.fileName)); + const h = [], S = []; + let T = Gre(n); + c !== void 0 && (T |= 30); + const C = Hu(n); + c === 99 && 3 <= C && C <= 99 && (T |= 32); + const D = T & 8 ? Ay(n, c) : [], P = [], O = { + compilerOptions: n, + host: i, + traceEnabled: _, + failedLookupLocations: h, + affectingLocations: S, + packageJsonInfoCache: o, + features: T, + conditions: D, + requestContainingDirectory: u, + reportDiagnostic: (G) => void P.push(G), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + let j = $(), F = !0; + j || (j = U(), F = !1); + let V; + if (j) { + const { fileName: G, packageId: ce } = j; + let K = G, X; + n.preserveSymlinks || ({ resolvedFileName: K, originalPath: X } = n1e(G, i, _)), V = { + primary: F, + resolvedFileName: K, + originalPath: X, + packageId: ce, + isExternalLibraryImport: uv(G) + }; + } + return d = { + resolvedTypeReferenceDirective: V, + failedLookupLocations: yD(h), + affectingLocations: yD(S), + resolutionDiagnostics: yD(P) + }, u && o && !o.isReadonly && (o.getOrCreateCacheForDirectory(u, s).set( + e, + /*mode*/ + c, + d + ), Sl(e) || o.getOrCreateCacheForNonRelativeName(e, c, s).set(u, d)), _ && L(d), d; + function L(G) { + var ce; + (ce = G.resolvedTypeReferenceDirective) != null && ce.resolvedFileName ? G.resolvedTypeReferenceDirective.packageId ? Wi(i, p.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, e, G.resolvedTypeReferenceDirective.resolvedFileName, py(G.resolvedTypeReferenceDirective.packageId), G.resolvedTypeReferenceDirective.primary) : Wi(i, p.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, e, G.resolvedTypeReferenceDirective.resolvedFileName, G.resolvedTypeReferenceDirective.primary) : Wi(i, p.Type_reference_directive_0_was_not_resolved, e); + } + function $() { + if (g && g.length) + return _ && Wi(i, p.Resolving_with_primary_search_path_0, g.join(", ")), xc(g, (G) => { + const ce = i1e(G, e, O), K = Td(G, i); + if (!K && _ && Wi(i, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, G), n.typeRoots) { + const X = HC(4, ce, !K, O); + if (X) { + const Z = EA(X.path), oe = Z ? _v( + Z, + /*onlyRecordFailures*/ + !1, + O + ) : void 0; + return Wre(wx(oe, X, O)); + } + } + return Wre( + rne(4, ce, !K, O) + ); + }); + _ && Wi(i, p.Root_directory_cannot_be_determined_skipping_primary_search_paths); + } + function U() { + const G = t && Xn(t); + if (G !== void 0) { + let ce; + if (!n.typeRoots || !nc(t, MD)) + if (_ && Wi(i, p.Looking_up_in_node_modules_folder_initial_location_0, G), Sl(e)) { + const { path: K } = u1e(G, e); + ce = Mz( + 4, + K, + /*onlyRecordFailures*/ + !1, + O, + /*considerPackageJson*/ + !0 + ); + } else { + const K = v1e( + 4, + e, + G, + O, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + ce = K && K.value; + } + else _ && Wi(i, p.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder); + return Wre(ce); + } else + _ && Wi(i, p.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder); + } + } + function Gre(e) { + let t = 0; + switch (Hu(e)) { + case 3: + t = 30; + break; + case 99: + t = 30; + break; + case 100: + t = 30; + break; + } + return e.resolvePackageJsonExports ? t |= 8 : e.resolvePackageJsonExports === !1 && (t &= -9), e.resolvePackageJsonImports ? t |= 2 : e.resolvePackageJsonImports === !1 && (t &= -3), t; + } + function Ay(e, t) { + const n = Hu(e); + if (t === void 0) { + if (n === 100) + t = 99; + else if (n === 2) + return []; + } + const i = t === 99 ? ["import"] : ["require"]; + return e.noDtsResolution || i.push("types"), n !== 100 && i.push("node"), Hi(i, e.customConditions); + } + function Iz(e, t, n, i, s) { + const o = SD(s?.getPackageJsonInfoCache(), i, n); + return $p(t, (c) => { + if (Wc(c) !== "node_modules") { + const _ = Mn(c, "node_modules"), u = Mn(_, e); + return _v( + u, + /*onlyRecordFailures*/ + !1, + o + ); + } + }); + } + function wO(e, t) { + if (e.types) + return e.types; + const n = []; + if (t.directoryExists && t.getDirectories) { + const i = vD(e, t); + if (i) { + for (const s of i) + if (t.directoryExists(s)) + for (const o of t.getDirectories(s)) { + const c = Cs(o), _ = Mn(s, c, "package.json"); + if (!(t.fileExists(_) && E4(_, t).typings === null)) { + const d = Wc(c); + d.charCodeAt(0) !== 46 && n.push(d); + } + } + } + } + return n; + } + function AO(e) { + return !!e?.contents; + } + function $re(e) { + return !!e && !e.contents; + } + function Xre(e) { + var t; + if (e === null || typeof e != "object") + return "" + e; + if (ss(e)) + return `[${(t = e.map((i) => Xre(i))) == null ? void 0 : t.join(",")}]`; + let n = "{"; + for (const i in e) + io(e, i) && (n += `${i}: ${Xre(e[i])}`); + return n + "}"; + } + function Oz(e, t) { + return t.map((n) => Xre(c5(e, n))).join("|") + `|${e.pathsBasePath}`; + } + function Fz(e, t) { + const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(); + let s = /* @__PURE__ */ new Map(); + return e && n.set(e, s), { + getMapOfCacheRedirects: o, + getOrCreateMapOfCacheRedirects: c, + update: _, + clear: d, + getOwnMap: () => s + }; + function o(h) { + return h ? u( + h.commandLine.options, + /*create*/ + !1 + ) : s; + } + function c(h) { + return h ? u( + h.commandLine.options, + /*create*/ + !0 + ) : s; + } + function _(h) { + e !== h && (e ? s = u( + h, + /*create*/ + !0 + ) : n.set(h, s), e = h); + } + function u(h, S) { + let T = n.get(h); + if (T) return T; + const C = g(h); + if (T = i.get(C), !T) { + if (e) { + const D = g(e); + D === C ? T = s : i.has(D) || i.set(D, s); + } + S && (T ?? (T = /* @__PURE__ */ new Map())), T && i.set(C, T); + } + return T && n.set(h, T), T; + } + function d() { + const h = e && t.get(e); + s.clear(), n.clear(), t.clear(), i.clear(), e && (h && t.set(e, h), n.set(e, s)); + } + function g(h) { + let S = t.get(h); + return S || t.set(h, S = Oz(h, dz)), S; + } + } + function CLe(e, t) { + let n; + return { getPackageJsonInfo: i, setPackageJsonInfo: s, clear: o, getInternalMap: c }; + function i(_) { + return n?.get(_o(_, e, t)); + } + function s(_, u) { + (n || (n = /* @__PURE__ */ new Map())).set(_o(_, e, t), u); + } + function o() { + n = void 0; + } + function c() { + return n; + } + } + function s1e(e, t, n, i) { + const s = e.getOrCreateMapOfCacheRedirects(t); + let o = s.get(n); + return o || (o = i(), s.set(n, o)), o; + } + function ELe(e, t, n, i) { + const s = Fz(n, i); + return { + getFromDirectoryCache: u, + getOrCreateCacheForDirectory: _, + clear: o, + update: c, + directoryToModuleNameMap: s + }; + function o() { + s.clear(); + } + function c(d) { + s.update(d); + } + function _(d, g) { + const h = _o(d, e, t); + return s1e(s, g, h, () => UC()); + } + function u(d, g, h, S) { + var T, C; + const D = _o(h, e, t); + return (C = (T = s.getMapOfCacheRedirects(S)) == null ? void 0 : T.get(D)) == null ? void 0 : C.get(d, g); + } + } + function bD(e, t) { + return t === void 0 ? e : `${t}|${e}`; + } + function UC() { + const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = { + get(s, o) { + return e.get(i(s, o)); + }, + set(s, o, c) { + return e.set(i(s, o), c), n; + }, + delete(s, o) { + return e.delete(i(s, o)), n; + }, + has(s, o) { + return e.has(i(s, o)); + }, + forEach(s) { + return e.forEach((o, c) => { + const [_, u] = t.get(c); + return s(o, _, u); + }); + }, + size() { + return e.size; + } + }; + return n; + function i(s, o) { + const c = bD(s, o); + return t.set(c, [s, o]), c; + } + } + function DLe(e) { + return e.resolvedModule && (e.resolvedModule.originalPath || e.resolvedModule.resolvedFileName); + } + function PLe(e) { + return e.resolvedTypeReferenceDirective && (e.resolvedTypeReferenceDirective.originalPath || e.resolvedTypeReferenceDirective.resolvedFileName); + } + function wLe(e, t, n, i, s) { + const o = Fz(n, s); + return { + getFromNonRelativeNameCache: u, + getOrCreateCacheForNonRelativeName: d, + clear: c, + update: _ + }; + function c() { + o.clear(); + } + function _(h) { + o.update(h); + } + function u(h, S, T, C) { + var D, P; + return E.assert(!Sl(h)), (P = (D = o.getMapOfCacheRedirects(C)) == null ? void 0 : D.get(bD(h, S))) == null ? void 0 : P.get(T); + } + function d(h, S, T) { + return E.assert(!Sl(h)), s1e(o, T, bD(h, S), g); + } + function g() { + const h = /* @__PURE__ */ new Map(); + return { get: S, set: T }; + function S(D) { + return h.get(_o(D, e, t)); + } + function T(D, P) { + const O = _o(D, e, t); + if (h.has(O)) + return; + h.set(O, P); + const j = i(P), F = j && C(O, j); + let V = O; + for (; V !== F; ) { + const L = Xn(V); + if (L === V || h.has(L)) + break; + h.set(L, P), V = L; + } + } + function C(D, P) { + const O = _o(Xn(P), e, t); + let j = 0; + const F = Math.min(D.length, O.length); + for (; j < F && D.charCodeAt(j) === O.charCodeAt(j); ) + j++; + if (j === D.length && (O.length === j || O[j] === Oo)) + return D; + const V = zm(D); + if (j < V) + return; + const L = D.lastIndexOf(Oo, j - 1); + if (L !== -1) + return D.substr(0, Math.max(L, V)); + } + } + } + function a1e(e, t, n, i, s, o) { + o ?? (o = /* @__PURE__ */ new Map()); + const c = ELe( + e, + t, + n, + o + ), _ = wLe( + e, + t, + n, + s, + o + ); + return i ?? (i = CLe(e, t)), { + ...i, + ...c, + ..._, + clear: u, + update: g, + getPackageJsonInfoCache: () => i, + clearAllExceptPackageJsonInfoCache: d, + optionsToRedirectsKey: o + }; + function u() { + d(), i.clear(); + } + function d() { + c.clear(), _.clear(); + } + function g(h) { + c.update(h), _.update(h); + } + } + function qC(e, t, n, i, s) { + const o = a1e( + e, + t, + n, + i, + DLe, + s + ); + return o.getOrCreateCacheForModuleName = (c, _, u) => o.getOrCreateCacheForNonRelativeName(c, _, u), o; + } + function NO(e, t, n, i, s) { + return a1e( + e, + t, + n, + i, + PLe, + s + ); + } + function Lz(e) { + return { moduleResolution: 2, traceResolution: e.traceResolution }; + } + function IO(e, t, n, i, s) { + return Ax(e, t, Lz(n), i, s); + } + function o1e(e, t, n, i) { + const s = Xn(t); + return n.getFromDirectoryCache( + e, + i, + s, + /*redirectedReference*/ + void 0 + ); + } + function Ax(e, t, n, i, s, o, c) { + var _, u, d; + const g = kh(n, i); + o && (n = o.commandLine.options), g && (Wi(i, p.Resolving_module_0_from_1, e, t), o && Wi(i, p.Using_compiler_options_of_project_reference_redirect_0, o.sourceFile.fileName)); + const h = Xn(t); + let S = s?.getFromDirectoryCache(e, c, h, o); + if (S) + g && Wi(i, p.Resolution_for_module_0_was_found_in_cache_from_location_1, e, h); + else { + let T = n.moduleResolution; + switch (T === void 0 ? (T = Hu(n), g && Wi(i, p.Module_resolution_kind_is_not_specified_using_0, NE[T])) : g && Wi(i, p.Explicitly_specified_module_resolution_kind_Colon_0, NE[T]), (_ = Vu) == null || _.logStartResolveModule(e), T) { + case 3: + S = OLe(e, t, n, i, s, o, c); + break; + case 99: + S = FLe(e, t, n, i, s, o, c); + break; + case 2: + S = Kre(e, t, n, i, s, o, c ? Ay(n, c) : void 0); + break; + case 1: + S = sne(e, t, n, i, s, o); + break; + case 100: + S = Zre(e, t, n, i, s, o, c ? Ay(n, c) : void 0); + break; + default: + return E.fail(`Unexpected moduleResolution: ${T}`); + } + S && S.resolvedModule && ((u = Vu) == null || u.logInfoEvent(`Module "${e}" resolved to "${S.resolvedModule.resolvedFileName}"`)), (d = Vu) == null || d.logStopResolveModule(S && S.resolvedModule ? "" + S.resolvedModule.resolvedFileName : "null"), s && !s.isReadonly && (s.getOrCreateCacheForDirectory(h, o).set(e, c, S), Sl(e) || s.getOrCreateCacheForNonRelativeName(e, c, o).set(h, S)); + } + return g && (S.resolvedModule ? S.resolvedModule.packageId ? Wi(i, p.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2, e, S.resolvedModule.resolvedFileName, py(S.resolvedModule.packageId)) : Wi(i, p.Module_name_0_was_successfully_resolved_to_1, e, S.resolvedModule.resolvedFileName) : Wi(i, p.Module_name_0_was_not_resolved, e)), S; + } + function c1e(e, t, n, i, s) { + const o = ALe(e, t, i, s); + return o ? o.value : Sl(t) ? NLe(e, t, n, i, s) : ILe(e, t, i, s); + } + function ALe(e, t, n, i) { + var s; + const { baseUrl: o, paths: c, configFile: _ } = i.compilerOptions; + if (c && !Df(t)) { + i.traceEnabled && (o && Wi(i.host, p.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, o, t), Wi(i.host, p.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, t)); + const u = B7(i.compilerOptions, i.host), d = _?.configFileSpecs ? (s = _.configFileSpecs).pathPatterns || (s.pathPatterns = b5(c)) : void 0; + return nne( + e, + t, + u, + c, + d, + n, + /*onlyRecordFailures*/ + !1, + i + ); + } + } + function NLe(e, t, n, i, s) { + if (!s.compilerOptions.rootDirs) + return; + s.traceEnabled && Wi(s.host, p.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, t); + const o = Cs(Mn(n, t)); + let c, _; + for (const u of s.compilerOptions.rootDirs) { + let d = Cs(u); + nc(d, Oo) || (d += Oo); + const g = zi(o, d) && (_ === void 0 || _.length < d.length); + s.traceEnabled && Wi(s.host, p.Checking_if_0_is_the_longest_matching_prefix_for_1_2, d, o, g), g && (_ = d, c = u); + } + if (_) { + s.traceEnabled && Wi(s.host, p.Longest_matching_prefix_for_0_is_1, o, _); + const u = o.substr(_.length); + s.traceEnabled && Wi(s.host, p.Loading_0_from_the_root_dir_1_candidate_location_2, u, _, o); + const d = i(e, o, !Td(n, s.host), s); + if (d) + return d; + s.traceEnabled && Wi(s.host, p.Trying_other_entries_in_rootDirs); + for (const g of s.compilerOptions.rootDirs) { + if (g === c) + continue; + const h = Mn(Cs(g), u); + s.traceEnabled && Wi(s.host, p.Loading_0_from_the_root_dir_1_candidate_location_2, u, g, h); + const S = Xn(h), T = i(e, h, !Td(S, s.host), s); + if (T) + return T; + } + s.traceEnabled && Wi(s.host, p.Module_resolution_using_rootDirs_has_failed); + } + } + function ILe(e, t, n, i) { + const { baseUrl: s } = i.compilerOptions; + if (!s) + return; + i.traceEnabled && Wi(i.host, p.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, s, t); + const o = Cs(Mn(s, t)); + return i.traceEnabled && Wi(i.host, p.Resolving_module_name_0_relative_to_base_url_1_2, t, s, o), n(e, o, !Td(Xn(o), i.host), i); + } + function Qre(e, t, n) { + const { resolvedModule: i, failedLookupLocations: s } = LLe(e, t, n); + if (!i) + throw new Error(`Could not resolve JS module '${e}' starting at '${t}'. Looked in: ${s?.join(", ")}`); + return i.resolvedFileName; + } + var Yre = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Imports = 2] = "Imports", e[e.SelfName = 4] = "SelfName", e[e.Exports = 8] = "Exports", e[e.ExportsPatternTrailers = 16] = "ExportsPatternTrailers", e[e.AllFeatures = 30] = "AllFeatures", e[e.Node16Default = 30] = "Node16Default", e[ + e.NodeNextDefault = 30 + /* AllFeatures */ + ] = "NodeNextDefault", e[e.BundlerDefault = 30] = "BundlerDefault", e[e.EsmMode = 32] = "EsmMode", e))(Yre || {}); + function OLe(e, t, n, i, s, o, c) { + return l1e( + 30, + e, + t, + n, + i, + s, + o, + c + ); + } + function FLe(e, t, n, i, s, o, c) { + return l1e( + 30, + e, + t, + n, + i, + s, + o, + c + ); + } + function l1e(e, t, n, i, s, o, c, _, u) { + const d = Xn(n), g = _ === 99 ? 32 : 0; + let h = i.noDtsResolution ? 3 : 7; + return kb(i) && (h |= 8), CA( + e | g, + t, + d, + i, + s, + o, + h, + /*isConfigLookup*/ + !1, + c, + u + ); + } + function LLe(e, t, n) { + return CA( + 0, + e, + t, + { moduleResolution: 2, allowJs: !0 }, + n, + /*cache*/ + void 0, + 2, + /*isConfigLookup*/ + !1, + /*redirectedReference*/ + void 0, + /*conditions*/ + void 0 + ); + } + function Zre(e, t, n, i, s, o, c) { + const _ = Xn(t); + let u = n.noDtsResolution ? 3 : 7; + return kb(n) && (u |= 8), CA( + Gre(n), + e, + _, + n, + i, + s, + u, + /*isConfigLookup*/ + !1, + o, + c + ); + } + function Kre(e, t, n, i, s, o, c, _) { + let u; + return _ ? u = 8 : n.noDtsResolution ? (u = 3, kb(n) && (u |= 8)) : u = kb(n) ? 15 : 7, CA(c ? 30 : 0, e, Xn(t), n, i, s, u, !!_, o, c); + } + function ene(e, t, n) { + return CA( + 30, + e, + Xn(t), + { + moduleResolution: 99 + /* NodeNext */ + }, + n, + /*cache*/ + void 0, + 8, + /*isConfigLookup*/ + !0, + /*redirectedReference*/ + void 0, + /*conditions*/ + void 0 + ); + } + function CA(e, t, n, i, s, o, c, _, u, d) { + var g, h, S, T, C; + const D = kh(i, s), P = [], O = [], j = Hu(i); + d ?? (d = Ay( + i, + j === 100 || j === 2 ? void 0 : e & 32 ? 99 : 1 + /* CommonJS */ + )); + const F = [], V = { + compilerOptions: i, + host: s, + traceEnabled: D, + failedLookupLocations: P, + affectingLocations: O, + packageJsonInfoCache: o, + features: e, + conditions: d ?? He, + requestContainingDirectory: n, + reportDiagnostic: (G) => void F.push(G), + isConfigLookup: _, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + D && KT(j) && Wi(s, p.Resolving_in_0_mode_with_conditions_1, e & 32 ? "ESM" : "CJS", V.conditions.map((G) => `'${G}'`).join(", ")); + let L; + if (j === 2) { + const G = c & 5, ce = c & -6; + L = G && U(G, V) || ce && U(ce, V) || void 0; + } else + L = U(c, V); + let $; + if (V.resolvedPackageDirectory && !_ && !Sl(t)) { + const G = L?.value && c & 5 && !g1e(5, L.value.resolved.extension); + if ((g = L?.value) != null && g.isExternalLibraryImport && G && e & 8 && d?.includes("import")) { + Ny(V, p.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); + const ce = { + ...V, + features: V.features & -9, + reportDiagnostic: ka + }, K = U(c & 5, ce); + (h = K?.value) != null && h.isExternalLibraryImport && ($ = K.value.resolved.path); + } else if ((!L?.value || G) && j === 2) { + Ny(V, p.Resolution_of_non_relative_name_failed_trying_with_moduleResolution_bundler_to_see_if_project_may_need_configuration_update); + const ce = { + ...V.compilerOptions, + moduleResolution: 100 + /* Bundler */ + }, K = { + ...V, + compilerOptions: ce, + features: 30, + conditions: Ay(ce), + reportDiagnostic: ka + }, X = U(c & 5, K); + (S = X?.value) != null && S.isExternalLibraryImport && ($ = X.value.resolved.path); + } + } + return t1e( + t, + (T = L?.value) == null ? void 0 : T.resolved, + (C = L?.value) == null ? void 0 : C.isExternalLibraryImport, + P, + O, + F, + V, + o, + $ + ); + function U(G, ce) { + const X = c1e(G, t, n, (Z, oe, ne, pe) => Mz( + Z, + oe, + ne, + pe, + /*considerPackageJson*/ + !0 + ), ce); + if (X) + return Of({ resolved: X, isExternalLibraryImport: uv(X.path) }); + if (Sl(t)) { + const { path: Z, parts: oe } = u1e(n, t), ne = Mz( + G, + Z, + /*onlyRecordFailures*/ + !1, + ce, + /*considerPackageJson*/ + !0 + ); + return ne && Of({ resolved: ne, isExternalLibraryImport: ls(oe, "node_modules") }); + } else { + let Z; + if (e & 2 && zi(t, "#") && (Z = zLe(G, t, n, ce, o, u)), !Z && e & 4 && (Z = JLe(G, t, n, ce, o, u)), !Z) { + if (t.includes(":")) { + D && Wi(s, p.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, t, DO(G)); + return; + } + D && Wi(s, p.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, t, DO(G)), Z = v1e(G, t, n, ce, o, u); + } + return G & 4 && (Z ?? (Z = C1e(t, ce))), Z && { value: Z.value && { resolved: Z.value, isExternalLibraryImport: !0 } }; + } + } + } + function u1e(e, t) { + const n = Mn(e, t), i = vl(n), s = Bo(i); + return { path: s === "." || s === ".." ? bl(Cs(n)) : Cs(n), parts: i }; + } + function _1e(e, t, n) { + if (!t.realpath) + return e; + const i = Cs(t.realpath(e)); + return n && Wi(t, p.Resolving_real_path_for_0_result_1, e, i), i; + } + function Mz(e, t, n, i, s) { + if (i.traceEnabled && Wi(i.host, p.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1, t, DO(e)), !e0(t)) { + if (!n) { + const c = Xn(t); + Td(c, i.host) || (i.traceEnabled && Wi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, c), n = !0); + } + const o = HC(e, t, n, i); + if (o) { + const c = s ? EA(o.path) : void 0, _ = c ? _v( + c, + /*onlyRecordFailures*/ + !1, + i + ) : void 0; + return wx(_, o, i); + } + } + if (n || Td(t, i.host) || (i.traceEnabled && Wi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, t), n = !0), !(i.features & 32)) + return rne(e, t, n, i, s); + } + var zg = "/node_modules/"; + function uv(e) { + return e.includes(zg); + } + function EA(e, t) { + const n = Cs(e), i = n.lastIndexOf(zg); + if (i === -1) + return; + const s = i + zg.length; + let o = f1e(n, s, t); + return n.charCodeAt(s) === 64 && (o = f1e(n, o, t)), n.slice(0, o); + } + function f1e(e, t, n) { + const i = e.indexOf(Oo, t + 1); + return i === -1 ? n ? e.length : t : i; + } + function tne(e, t, n, i) { + return Az(HC(e, t, n, i)); + } + function HC(e, t, n, i) { + const s = p1e(e, t, n, i); + if (s) + return s; + if (!(i.features & 32)) { + const o = d1e(t, e, "", n, i); + if (o) + return o; + } + } + function p1e(e, t, n, i) { + if (!Wc(t).includes(".")) + return; + let o = Gu(t); + o === t && (o = t.substring(0, t.lastIndexOf("."))); + const c = t.substring(o.length); + return i.traceEnabled && Wi(i.host, p.File_name_0_has_a_1_extension_stripping_it, t, c), d1e(o, e, c, n, i); + } + function Rz(e, t, n, i) { + return e & 1 && Lc(t, y5) || e & 4 && Lc(t, h5) ? jz(t, n, i) !== void 0 ? { path: t, ext: G7(t), resolvedUsingTsExtension: void 0 } : void 0 : i.isConfigLookup && e === 8 && Go( + t, + ".json" + /* Json */ + ) ? jz(t, n, i) !== void 0 ? { path: t, ext: ".json", resolvedUsingTsExtension: void 0 } : void 0 : p1e(e, t, n, i); + } + function d1e(e, t, n, i, s) { + if (!i) { + const c = Xn(e); + c && (i = !Td(c, s.host)); + } + switch (n) { + case ".mjs": + case ".mts": + case ".d.mts": + return t & 1 && o( + ".mts", + n === ".mts" || n === ".d.mts" + /* Dmts */ + ) || t & 4 && o( + ".d.mts", + n === ".mts" || n === ".d.mts" + /* Dmts */ + ) || t & 2 && o( + ".mjs" + /* Mjs */ + ) || void 0; + case ".cjs": + case ".cts": + case ".d.cts": + return t & 1 && o( + ".cts", + n === ".cts" || n === ".d.cts" + /* Dcts */ + ) || t & 4 && o( + ".d.cts", + n === ".cts" || n === ".d.cts" + /* Dcts */ + ) || t & 2 && o( + ".cjs" + /* Cjs */ + ) || void 0; + case ".json": + return t & 4 && o(".d.json.ts") || t & 8 && o( + ".json" + /* Json */ + ) || void 0; + case ".tsx": + case ".jsx": + return t & 1 && (o( + ".tsx", + n === ".tsx" + /* Tsx */ + ) || o( + ".ts", + n === ".tsx" + /* Tsx */ + )) || t & 4 && o( + ".d.ts", + n === ".tsx" + /* Tsx */ + ) || t & 2 && (o( + ".jsx" + /* Jsx */ + ) || o( + ".js" + /* Js */ + )) || void 0; + case ".ts": + case ".d.ts": + case ".js": + case "": + return t & 1 && (o( + ".ts", + n === ".ts" || n === ".d.ts" + /* Dts */ + ) || o( + ".tsx", + n === ".ts" || n === ".d.ts" + /* Dts */ + )) || t & 4 && o( + ".d.ts", + n === ".ts" || n === ".d.ts" + /* Dts */ + ) || t & 2 && (o( + ".js" + /* Js */ + ) || o( + ".jsx" + /* Jsx */ + )) || s.isConfigLookup && o( + ".json" + /* Json */ + ) || void 0; + default: + return t & 4 && !Ol(e + n) && o(`.d${n}.ts`) || void 0; + } + function o(c, _) { + const u = jz(e + c, i, s); + return u === void 0 ? void 0 : { path: u, ext: c, resolvedUsingTsExtension: !s.candidateIsFromPackageJsonField && _ }; + } + } + function jz(e, t, n) { + var i; + if (!((i = n.compilerOptions.moduleSuffixes) != null && i.length)) + return m1e(e, t, n); + const s = hh(e) ?? "", o = s ? W3(e, s) : e; + return rr(n.compilerOptions.moduleSuffixes, (c) => m1e(o + c + s, t, n)); + } + function m1e(e, t, n) { + var i; + if (!t) { + if (n.host.fileExists(e)) + return n.traceEnabled && Wi(n.host, p.File_0_exists_use_it_as_a_name_resolution_result, e), e; + n.traceEnabled && Wi(n.host, p.File_0_does_not_exist, e); + } + (i = n.failedLookupLocations) == null || i.push(e); + } + function rne(e, t, n, i, s = !0) { + const o = s ? _v(t, n, i) : void 0, c = o && o.contents.packageJsonContent, _ = o && OO(o, i); + return wx(o, Jz(e, t, n, i, c, _), i); + } + function Bz(e, t, n, i, s) { + if (!s && e.contents.resolvedEntrypoints !== void 0) + return e.contents.resolvedEntrypoints; + let o; + const c = 5 | (s ? 2 : 0), _ = Gre(t), u = SD(i?.getPackageJsonInfoCache(), n, t); + u.conditions = Ay(t), u.requestContainingDirectory = e.packageDirectory; + const d = Jz( + c, + e.packageDirectory, + /*onlyRecordFailures*/ + !1, + u, + e.contents.packageJsonContent, + OO(e, u) + ); + if (o = Tr(o, d?.path), _ & 8 && e.contents.packageJsonContent.exports) { + const g = tb( + [Ay( + t, + 99 + /* ESNext */ + ), Ay( + t, + 1 + /* CommonJS */ + )], + md + ); + for (const h of g) { + const S = { ...u, failedLookupLocations: [], conditions: h, host: n }, T = MLe( + e, + e.contents.packageJsonContent.exports, + S, + c + ); + if (T) + for (const C of T) + o = sh(o, C.path); + } + } + return e.contents.resolvedEntrypoints = o || !1; + } + function MLe(e, t, n, i) { + let s; + if (ss(t)) + for (const c of t) + o(c); + else if (typeof t == "object" && t !== null && LO(t)) + for (const c in t) + o(t[c]); + else + o(t); + return s; + function o(c) { + var _, u; + if (typeof c == "string" && zi(c, "./")) + if (c.includes("*") && n.host.readDirectory) { + if (c.indexOf("*") !== c.lastIndexOf("*")) + return !1; + n.host.readDirectory( + e.packageDirectory, + gLe(i), + /*excludes*/ + void 0, + [ + rY(ix(c, "**/*"), ".*") + ] + ).forEach((d) => { + s = sh(s, { + path: d, + ext: Wk(d), + resolvedUsingTsExtension: void 0 + }); + }); + } else { + const d = vl(c).slice(2); + if (d.includes("..") || d.includes(".") || d.includes("node_modules")) + return !1; + const g = Mn(e.packageDirectory, c), h = Xi(g, (u = (_ = n.host).getCurrentDirectory) == null ? void 0 : u.call(_)), S = Rz( + i, + h, + /*onlyRecordFailures*/ + !1, + n + ); + if (S) + return s = sh(s, S, (T, C) => T.path === C.path), !0; + } + else if (Array.isArray(c)) { + for (const d of c) + if (o(d)) + return !0; + } else if (typeof c == "object" && c !== null) + return rr(Gd(c), (d) => { + if (d === "default" || ls(n.conditions, d) || DA(n.conditions, d)) + return o(c[d]), !0; + }); + } + } + function SD(e, t, n) { + return { + host: t, + compilerOptions: n, + traceEnabled: kh(n, t), + failedLookupLocations: void 0, + affectingLocations: void 0, + packageJsonInfoCache: e, + features: 0, + conditions: He, + requestContainingDirectory: void 0, + reportDiagnostic: ka, + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }; + } + function TD(e, t) { + const n = vl(e); + for (n.pop(); n.length > 0; ) { + const i = _v( + ah(n), + /*onlyRecordFailures*/ + !1, + t + ); + if (i) + return i; + n.pop(); + } + } + function OO(e, t) { + return e.contents.versionPaths === void 0 && (e.contents.versionPaths = SLe(e.contents.packageJsonContent, t) || !1), e.contents.versionPaths || void 0; + } + function RLe(e, t) { + return e.contents.peerDependencies === void 0 && (e.contents.peerDependencies = jLe(e, t) || !1), e.contents.peerDependencies || void 0; + } + function jLe(e, t) { + const n = Ure(e.contents.packageJsonContent, "peerDependencies", "object", t); + if (n === void 0) return; + t.traceEnabled && Wi(t.host, p.package_json_has_a_peerDependencies_field); + const i = _1e(e.packageDirectory, t.host, t.traceEnabled), s = i.substring(0, i.lastIndexOf("node_modules") + 12) + Oo; + let o = ""; + for (const c in n) + if (io(n, c)) { + const _ = _v( + s + c, + /*onlyRecordFailures*/ + !1, + t + ); + if (_) { + const u = _.contents.packageJsonContent.version; + o += `+${c}@${u}`, t.traceEnabled && Wi(t.host, p.Found_peerDependency_0_with_1_version, c, u); + } else + t.traceEnabled && Wi(t.host, p.Failed_to_find_peerDependency_0, c); + } + return o; + } + function _v(e, t, n) { + var i, s, o, c, _, u; + const { host: d, traceEnabled: g } = n, h = Mn(e, "package.json"); + if (t) { + (i = n.failedLookupLocations) == null || i.push(h); + return; + } + const S = (s = n.packageJsonInfoCache) == null ? void 0 : s.getPackageJsonInfo(h); + if (S !== void 0) { + if (AO(S)) + return g && Wi(d, p.File_0_exists_according_to_earlier_cached_lookups, h), (o = n.affectingLocations) == null || o.push(h), S.packageDirectory === e ? S : { packageDirectory: e, contents: S.contents }; + S.directoryExists && g && Wi(d, p.File_0_does_not_exist_according_to_earlier_cached_lookups, h), (c = n.failedLookupLocations) == null || c.push(h); + return; + } + const T = Td(e, d); + if (T && d.fileExists(h)) { + const C = E4(h, d); + g && Wi(d, p.Found_package_json_at_0, h); + const D = { packageDirectory: e, contents: { packageJsonContent: C, versionPaths: void 0, resolvedEntrypoints: void 0, peerDependencies: void 0 } }; + return n.packageJsonInfoCache && !n.packageJsonInfoCache.isReadonly && n.packageJsonInfoCache.setPackageJsonInfo(h, D), (_ = n.affectingLocations) == null || _.push(h), D; + } else + T && g && Wi(d, p.File_0_does_not_exist, h), n.packageJsonInfoCache && !n.packageJsonInfoCache.isReadonly && n.packageJsonInfoCache.setPackageJsonInfo(h, { packageDirectory: e, directoryExists: T }), (u = n.failedLookupLocations) == null || u.push(h); + } + function Jz(e, t, n, i, s, o) { + let c; + s && (i.isConfigLookup ? c = yLe(s, t, i) : c = e & 4 && hLe(s, t, i) || e & 7 && vLe(s, t, i) || void 0); + const _ = (S, T, C, D) => { + const P = Rz(S, T, C, D); + if (P) + return Az(P); + const O = S === 4 ? 5 : S, j = D.features, F = D.candidateIsFromPackageJsonField; + D.candidateIsFromPackageJsonField = !0, s?.type !== "module" && (D.features &= -33); + const V = Mz( + O, + T, + C, + D, + /*considerPackageJson*/ + !1 + ); + return D.features = j, D.candidateIsFromPackageJsonField = F, V; + }, u = c ? !Td(Xn(c), i.host) : void 0, d = n || !Td(t, i.host), g = Mn(t, i.isConfigLookup ? "tsconfig" : "index"); + if (o && (!c || Gp(t, c))) { + const S = hd( + t, + c || g, + /*ignoreCase*/ + !1 + ); + i.traceEnabled && Wi(i.host, p.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, o.version, dd, S); + const T = nne( + e, + S, + t, + o.paths, + /*pathPatterns*/ + void 0, + _, + u || d, + i + ); + if (T) + return e1e(T.value); + } + const h = c && e1e(_(e, c, u, i)); + if (h) return h; + if (!(i.features & 32)) + return HC(e, g, d, i); + } + function g1e(e, t) { + return e & 2 && (t === ".js" || t === ".jsx" || t === ".mjs" || t === ".cjs") || e & 1 && (t === ".ts" || t === ".tsx" || t === ".mts" || t === ".cts") || e & 4 && (t === ".d.ts" || t === ".d.mts" || t === ".d.cts") || e & 8 && t === ".json" || !1; + } + function FO(e) { + let t = e.indexOf(Oo); + return e[0] === "@" && (t = e.indexOf(Oo, t + 1)), t === -1 ? { packageName: e, rest: "" } : { packageName: e.slice(0, t), rest: e.slice(t + 1) }; + } + function LO(e) { + return Ri(Gd(e), (t) => zi(t, ".")); + } + function BLe(e) { + return !ut(Gd(e), (t) => zi(t, ".")); + } + function JLe(e, t, n, i, s, o) { + var c, _; + const u = Xi(Mn(n, "dummy"), (_ = (c = i.host).getCurrentDirectory) == null ? void 0 : _.call(c)), d = TD(u, i); + if (!d || !d.contents.packageJsonContent.exports || typeof d.contents.packageJsonContent.name != "string") + return; + const g = vl(t), h = vl(d.contents.packageJsonContent.name); + if (!Ri(h, (P, O) => g[O] === P)) + return; + const S = g.slice(h.length), T = Dr(S) ? `.${Oo}${S.join(Oo)}` : "."; + if (yy(i.compilerOptions) && !uv(n)) + return zz(d, e, T, i, s, o); + const C = e & 5, D = e & -6; + return zz(d, C, T, i, s, o) || zz(d, D, T, i, s, o); + } + function zz(e, t, n, i, s, o) { + if (e.contents.packageJsonContent.exports) { + if (n === ".") { + let c; + if (typeof e.contents.packageJsonContent.exports == "string" || Array.isArray(e.contents.packageJsonContent.exports) || typeof e.contents.packageJsonContent.exports == "object" && BLe(e.contents.packageJsonContent.exports) ? c = e.contents.packageJsonContent.exports : io(e.contents.packageJsonContent.exports, ".") && (c = e.contents.packageJsonContent.exports["."]), c) + return y1e( + t, + i, + s, + o, + n, + e, + /*isImports*/ + !1 + )( + c, + "", + /*pattern*/ + !1, + "." + ); + } else if (LO(e.contents.packageJsonContent.exports)) { + if (typeof e.contents.packageJsonContent.exports != "object") + return i.traceEnabled && Wi(i.host, p.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, n, e.packageDirectory), Of( + /*value*/ + void 0 + ); + const c = h1e( + t, + i, + s, + o, + n, + e.contents.packageJsonContent.exports, + e, + /*isImports*/ + !1 + ); + if (c) + return c; + } + return i.traceEnabled && Wi(i.host, p.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, n, e.packageDirectory), Of( + /*value*/ + void 0 + ); + } + } + function zLe(e, t, n, i, s, o) { + var c, _; + if (t === "#" || zi(t, "#/")) + return i.traceEnabled && Wi(i.host, p.Invalid_import_specifier_0_has_no_possible_resolutions, t), Of( + /*value*/ + void 0 + ); + const u = Xi(Mn(n, "dummy"), (_ = (c = i.host).getCurrentDirectory) == null ? void 0 : _.call(c)), d = TD(u, i); + if (!d) + return i.traceEnabled && Wi(i.host, p.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, u), Of( + /*value*/ + void 0 + ); + if (!d.contents.packageJsonContent.imports) + return i.traceEnabled && Wi(i.host, p.package_json_scope_0_has_no_imports_defined, d.packageDirectory), Of( + /*value*/ + void 0 + ); + const g = h1e( + e, + i, + s, + o, + t, + d.contents.packageJsonContent.imports, + d, + /*isImports*/ + !0 + ); + return g || (i.traceEnabled && Wi(i.host, p.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, t, d.packageDirectory), Of( + /*value*/ + void 0 + )); + } + function Wz(e, t) { + const n = e.indexOf("*"), i = t.indexOf("*"), s = n === -1 ? e.length : n + 1, o = i === -1 ? t.length : i + 1; + return s > o ? -1 : o > s || n === -1 ? 1 : i === -1 || e.length > t.length ? -1 : t.length > e.length ? 1 : 0; + } + function h1e(e, t, n, i, s, o, c, _) { + const u = y1e(e, t, n, i, s, c, _); + if (!nc(s, Oo) && !s.includes("*") && io(o, s)) { + const h = o[s]; + return u( + h, + /*subpath*/ + "", + /*pattern*/ + !1, + s + ); + } + const d = rb(Ln(Gd(o), (h) => WLe(h) || nc(h, "/")), Wz); + for (const h of d) + if (t.features & 16 && g(h, s)) { + const S = o[h], T = h.indexOf("*"), C = s.substring(h.substring(0, T).length, s.length - (h.length - 1 - T)); + return u( + S, + C, + /*pattern*/ + !0, + h + ); + } else if (nc(h, "*") && zi(s, h.substring(0, h.length - 1))) { + const S = o[h], T = s.substring(h.length - 1); + return u( + S, + T, + /*pattern*/ + !0, + h + ); + } else if (zi(s, h)) { + const S = o[h], T = s.substring(h.length); + return u( + S, + T, + /*pattern*/ + !1, + h + ); + } + function g(h, S) { + if (nc(h, "*")) return !1; + const T = h.indexOf("*"); + return T === -1 ? !1 : zi(S, h.substring(0, T)) && nc(S, h.substring(T + 1)); + } + } + function WLe(e) { + const t = e.indexOf("*"); + return t !== -1 && t === e.lastIndexOf("*"); + } + function y1e(e, t, n, i, s, o, c) { + return _; + function _(u, d, g, h) { + if (typeof u == "string") { + if (!g && d.length > 0 && !nc(u, "/")) + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + if (!zi(u, "./")) { + if (c && !zi(u, "../") && !zi(u, "/") && !$_(u)) { + const L = g ? u.replace(/\*/g, d) : u + d; + Ny(t, p.Using_0_subpath_1_with_target_2, "imports", h, L), Ny(t, p.Resolving_module_0_from_1, L, o.packageDirectory + "/"); + const $ = CA( + t.features, + L, + o.packageDirectory + "/", + t.compilerOptions, + t.host, + n, + e, + /*isConfigLookup*/ + !1, + i, + t.conditions + ); + return Of( + $.resolvedModule ? { + path: $.resolvedModule.resolvedFileName, + extension: $.resolvedModule.extension, + packageId: $.resolvedModule.packageId, + originalPath: $.resolvedModule.originalPath, + resolvedUsingTsExtension: $.resolvedModule.resolvedUsingTsExtension + } : void 0 + ); + } + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + } + const P = (Df(u) ? vl(u).slice(1) : vl(u)).slice(1); + if (P.includes("..") || P.includes(".") || P.includes("node_modules")) + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + const O = Mn(o.packageDirectory, u), j = vl(d); + if (j.includes("..") || j.includes(".") || j.includes("node_modules")) + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + t.traceEnabled && Wi(t.host, p.Using_0_subpath_1_with_target_2, c ? "imports" : "exports", h, g ? u.replace(/\*/g, d) : u + d); + const F = S(g ? O.replace(/\*/g, d) : O + d), V = C(F, d, Mn(o.packageDirectory, "package.json"), c); + return V || Of(wx(o, Rz( + e, + F, + /*onlyRecordFailures*/ + !1, + t + ), t)); + } else if (typeof u == "object" && u !== null) + if (Array.isArray(u)) { + if (!Dr(u)) + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + for (const D of u) { + const P = _(D, d, g, h); + if (P) + return P; + } + } else { + Ny(t, p.Entering_conditional_exports); + for (const D of Gd(u)) + if (D === "default" || t.conditions.includes(D) || DA(t.conditions, D)) { + Ny(t, p.Matched_0_condition_1, c ? "imports" : "exports", D); + const P = u[D], O = _(P, d, g, h); + if (O) + return Ny(t, p.Resolved_under_condition_0, D), Ny(t, p.Exiting_conditional_exports), O; + Ny(t, p.Failed_to_resolve_under_condition_0, D); + } else + Ny(t, p.Saw_non_matching_condition_0, D); + Ny(t, p.Exiting_conditional_exports); + return; + } + else if (u === null) + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_explicitly_maps_specifier_1_to_null, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + return t.traceEnabled && Wi(t.host, p.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, o.packageDirectory, s), Of( + /*value*/ + void 0 + ); + function S(D) { + var P, O; + return D === void 0 ? D : Xi(D, (O = (P = t.host).getCurrentDirectory) == null ? void 0 : O.call(P)); + } + function T(D, P) { + return bl(Mn(D, P)); + } + function C(D, P, O, j) { + var F, V, L, $; + if (!t.isConfigLookup && (t.compilerOptions.declarationDir || t.compilerOptions.outDir) && !D.includes("/node_modules/") && (!t.compilerOptions.configFile || Gp(o.packageDirectory, S(t.compilerOptions.configFile.fileName), !Vz(t)))) { + const G = _0({ useCaseSensitiveFileNames: () => Vz(t) }), ce = []; + if (t.compilerOptions.rootDir || t.compilerOptions.composite && t.compilerOptions.configFilePath) { + const K = S(FD(t.compilerOptions, () => [], ((V = (F = t.host).getCurrentDirectory) == null ? void 0 : V.call(F)) || "", G)); + ce.push(K); + } else if (t.requestContainingDirectory) { + const K = S(Mn(t.requestContainingDirectory, "index.ts")), X = S(FD(t.compilerOptions, () => [K, S(O)], (($ = (L = t.host).getCurrentDirectory) == null ? void 0 : $.call(L)) || "", G)); + ce.push(X); + let Z = bl(X); + for (; Z && Z.length > 1; ) { + const oe = vl(Z); + oe.pop(); + const ne = ah(oe); + ce.unshift(ne), Z = bl(ne); + } + } + ce.length > 1 && t.reportDiagnostic(zo( + j ? p.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate : p.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, + P === "" ? "." : P, + // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird + O + )); + for (const K of ce) { + const X = U(K); + for (const Z of X) + if (Gp(Z, D, !Vz(t))) { + const oe = D.slice(Z.length + 1), ne = Mn(K, oe), pe = [ + ".mjs", + ".cjs", + ".js", + ".json", + ".d.mts", + ".d.cts", + ".d.ts" + /* Dts */ + ]; + for (const fe of pe) + if (Go(ne, fe)) { + const H = fK(ne); + for (const ae of H) { + if (!g1e(e, ae)) continue; + const le = dw(ne, ae, fe, !Vz(t)); + if (t.host.fileExists(le)) + return Of(wx(o, Rz( + e, + le, + /*onlyRecordFailures*/ + !1, + t + ), t)); + } + } + } + } + } + return; + function U(G) { + var ce, K; + const X = t.compilerOptions.configFile ? ((K = (ce = t.host).getCurrentDirectory) == null ? void 0 : K.call(ce)) || "" : G, Z = []; + return t.compilerOptions.declarationDir && Z.push(S(T(X, t.compilerOptions.declarationDir))), t.compilerOptions.outDir && t.compilerOptions.outDir !== t.compilerOptions.declarationDir && Z.push(S(T(X, t.compilerOptions.outDir))), Z; + } + } + } + } + function DA(e, t) { + if (!e.includes("types") || !zi(t, "types@")) return !1; + const n = hI.tryParse(t.substring(6)); + return n ? n.test(dd) : !1; + } + function v1e(e, t, n, i, s, o) { + return b1e( + e, + t, + n, + i, + /*typesScopeOnly*/ + !1, + s, + o + ); + } + function VLe(e, t, n) { + return b1e( + 4, + e, + t, + n, + /*typesScopeOnly*/ + !0, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + } + function b1e(e, t, n, i, s, o, c) { + const _ = i.features === 0 ? void 0 : i.features & 32 ? 99 : 1, u = e & 5, d = e & -6; + if (u) { + Ny(i, p.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, DO(u)); + const h = g(u); + if (h) return h; + } + if (d && !s) + return Ny(i, p.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, DO(d)), g(d); + function g(h) { + return $p(Rl(n), (S) => { + if (Wc(S) !== "node_modules") { + const T = k1e(o, t, _, S, c, i); + return T || Of(S1e(h, t, S, i, s, o, c)); + } + }); + } + } + function S1e(e, t, n, i, s, o, c) { + const _ = Mn(n, "node_modules"), u = Td(_, i.host); + if (!u && i.traceEnabled && Wi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, _), !s) { + const d = T1e(e, t, _, u, i, o, c); + if (d) + return d; + } + if (e & 4) { + const d = Mn(_, "@types"); + let g = u; + return u && !Td(d, i.host) && (i.traceEnabled && Wi(i.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, d), g = !1), T1e(4, x1e(t, i), d, g, i, o, c); + } + } + function T1e(e, t, n, i, s, o, c) { + var _, u; + const d = Cs(Mn(n, t)), { packageName: g, rest: h } = FO(t), S = Mn(n, g); + let T, C = _v(d, !i, s); + if (h !== "" && C && (!(s.features & 8) || !io(((_ = T = _v(S, !i, s)) == null ? void 0 : _.contents.packageJsonContent) ?? He, "exports"))) { + const O = HC(e, d, !i, s); + if (O) + return Az(O); + const j = Jz( + e, + d, + !i, + s, + C.contents.packageJsonContent, + OO(C, s) + ); + return wx(C, j, s); + } + const D = (O, j, F, V) => { + let L = (h || !(V.features & 32)) && HC(O, j, F, V) || Jz( + O, + j, + F, + V, + C && C.contents.packageJsonContent, + C && OO(C, V) + ); + return !L && C && (C.contents.packageJsonContent.exports === void 0 || C.contents.packageJsonContent.exports === null) && V.features & 32 && (L = HC(O, Mn(j, "index.js"), F, V)), wx(C, L, V); + }; + if (h !== "" && (C = T ?? _v(S, !i, s)), C && (s.resolvedPackageDirectory = !0), C && C.contents.packageJsonContent.exports && s.features & 8) + return (u = zz(C, e, Mn(".", h), s, o, c)) == null ? void 0 : u.value; + const P = h !== "" && C ? OO(C, s) : void 0; + if (P) { + s.traceEnabled && Wi(s.host, p.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, P.version, dd, h); + const O = i && Td(S, s.host), j = nne( + e, + h, + S, + P.paths, + /*pathPatterns*/ + void 0, + D, + !O, + s + ); + if (j) + return j.value; + } + return D(e, d, !i, s); + } + function nne(e, t, n, i, s, o, c, _) { + s || (s = b5(i)); + const u = sJ(s, t); + if (u) { + const d = Gi(u) ? void 0 : MX(u, t), g = Gi(u) ? u : LX(u); + return _.traceEnabled && Wi(_.host, p.Module_name_0_matched_pattern_1, t, g), { value: rr(i[g], (S) => { + const T = d ? ix(S, d) : S, C = Cs(Mn(n, T)); + _.traceEnabled && Wi(_.host, p.Trying_substitution_0_candidate_module_location_Colon_1, S, T); + const D = hh(S); + if (D !== void 0) { + const P = jz(C, c, _); + if (P !== void 0) + return Az({ path: P, ext: D, resolvedUsingTsExtension: void 0 }); + } + return o(e, C, c || !Td(Xn(C), _.host), _); + }) }; + } + } + var ine = "__"; + function x1e(e, t) { + const n = GC(e); + return t.traceEnabled && n !== e && Wi(t.host, p.Scoped_package_detected_looking_in_0, n), n; + } + function MO(e) { + return `@types/${GC(e)}`; + } + function GC(e) { + if (zi(e, "@")) { + const t = e.replace(Oo, ine); + if (t !== e) + return t.slice(1); + } + return e; + } + function xD(e) { + const t = kE(e, "@types/"); + return t !== e ? PA(t) : e; + } + function PA(e) { + return e.includes(ine) ? "@" + e.replace(ine, Oo) : e; + } + function k1e(e, t, n, i, s, o) { + const c = e && e.getFromNonRelativeNameCache(t, n, i, s); + if (c) + return o.traceEnabled && Wi(o.host, p.Resolution_for_module_0_was_found_in_cache_from_location_1, t, i), o.resultFromCache = c, { + value: c.resolvedModule && { + path: c.resolvedModule.resolvedFileName, + originalPath: c.resolvedModule.originalPath || !0, + extension: c.resolvedModule.extension, + packageId: c.resolvedModule.packageId, + resolvedUsingTsExtension: c.resolvedModule.resolvedUsingTsExtension + } + }; + } + function sne(e, t, n, i, s, o) { + const c = kh(n, i), _ = [], u = [], d = Xn(t), g = [], h = { + compilerOptions: n, + host: i, + traceEnabled: c, + failedLookupLocations: _, + affectingLocations: u, + packageJsonInfoCache: s, + features: 0, + conditions: [], + requestContainingDirectory: d, + reportDiagnostic: (C) => void g.push(C), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }, S = T( + 5 + /* Declaration */ + ) || T(2 | (n.resolveJsonModule ? 8 : 0)); + return t1e( + e, + S && S.value, + S?.value && uv(S.value.path), + _, + u, + g, + h, + s + ); + function T(C) { + const D = c1e(C, e, d, tne, h); + if (D) + return { value: D }; + if (Sl(e)) { + const P = Cs(Mn(d, e)); + return Of(tne( + C, + P, + /*onlyRecordFailures*/ + !1, + h + )); + } else { + const P = $p(d, (O) => { + const j = k1e( + s, + e, + /*mode*/ + void 0, + O, + o, + h + ); + if (j) + return j; + const F = Cs(Mn(O, e)); + return Of(tne( + C, + F, + /*onlyRecordFailures*/ + !1, + h + )); + }); + if (P) return P; + if (C & 5) { + let O = VLe(e, d, h); + return C & 4 && (O ?? (O = C1e(e, h))), O; + } + } + } + } + function C1e(e, t) { + if (t.compilerOptions.typeRoots) + for (const n of t.compilerOptions.typeRoots) { + const i = i1e(n, e, t), s = Td(n, t.host); + !s && t.traceEnabled && Wi(t.host, p.Directory_0_does_not_exist_skipping_all_lookups_in_it, n); + const o = HC(4, i, !s, t); + if (o) { + const _ = EA(o.path), u = _ ? _v( + _, + /*onlyRecordFailures*/ + !1, + t + ) : void 0; + return Of(wx(u, o, t)); + } + const c = rne(4, i, !s, t); + if (c) return Of(c); + } + } + function $C(e, t) { + return !!e.allowImportingTsExtensions || t && Ol(t); + } + function ane(e, t, n, i, s, o) { + const c = kh(n, i); + c && Wi(i, p.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, t, e, s); + const _ = [], u = [], d = [], g = { + compilerOptions: n, + host: i, + traceEnabled: c, + failedLookupLocations: _, + affectingLocations: u, + packageJsonInfoCache: o, + features: 0, + conditions: [], + requestContainingDirectory: void 0, + reportDiagnostic: (S) => void d.push(S), + isConfigLookup: !1, + candidateIsFromPackageJsonField: !1, + resolvedPackageDirectory: !1 + }, h = S1e( + 4, + e, + s, + g, + /*typesScopeOnly*/ + !1, + /*cache*/ + void 0, + /*redirectedReference*/ + void 0 + ); + return r1e( + h, + /*isExternalLibraryImport*/ + !0, + _, + u, + d, + g.resultFromCache, + /*cache*/ + void 0 + ); + } + function Of(e) { + return e !== void 0 ? { value: e } : void 0; + } + function Ny(e, t, ...n) { + e.traceEnabled && Wi(e.host, t, ...n); + } + function Vz(e) { + return e.host.useCaseSensitiveFileNames ? typeof e.host.useCaseSensitiveFileNames == "boolean" ? e.host.useCaseSensitiveFileNames : e.host.useCaseSensitiveFileNames() : !0; + } + var one = /* @__PURE__ */ ((e) => (e[e.NonInstantiated = 0] = "NonInstantiated", e[e.Instantiated = 1] = "Instantiated", e[e.ConstEnumOnly = 2] = "ConstEnumOnly", e))(one || {}); + function Ch(e, t) { + return e.body && !e.body.parent && (Da(e.body, e), yh( + e.body, + /*incremental*/ + !1 + )), e.body ? cne(e.body, t) : 1; + } + function cne(e, t = /* @__PURE__ */ new Map()) { + const n = ja(e); + if (t.has(n)) + return t.get(n) || 0; + t.set(n, void 0); + const i = ULe(e, t); + return t.set(n, i), i; + } + function ULe(e, t) { + switch (e.kind) { + case 264: + case 265: + return 0; + case 266: + if (fb(e)) + return 2; + break; + case 272: + case 271: + if (!Vn( + e, + 32 + /* Export */ + )) + return 0; + break; + case 278: + const n = e; + if (!n.moduleSpecifier && n.exportClause && n.exportClause.kind === 279) { + let i = 0; + for (const s of n.exportClause.elements) { + const o = qLe(s, t); + if (o > i && (i = o), i === 1) + return i; + } + return i; + } + break; + case 268: { + let i = 0; + return gs(e, (s) => { + const o = cne(s, t); + switch (o) { + case 0: + return; + case 2: + i = 2; + return; + case 1: + return i = 1, !0; + default: + E.assertNever(o); + } + }), i; + } + case 267: + return Ch(e, t); + case 80: + if (e.flags & 4096) + return 0; + } + return 1; + } + function qLe(e, t) { + const n = e.propertyName || e.name; + let i = e.parent; + for (; i; ) { + if (ms(i) || _m(i) || yi(i)) { + const s = i.statements; + let o; + for (const c of s) + if (kw(c, n)) { + c.parent || (Da(c, i), yh( + c, + /*incremental*/ + !1 + )); + const _ = cne(c, t); + if ((o === void 0 || _ > o) && (o = _), o === 1) + return o; + c.kind === 271 && (o = 1); + } + if (o !== void 0) + return o; + } + i = i.parent; + } + return 1; + } + var lne = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.IsContainer = 1] = "IsContainer", e[e.IsBlockScopedContainer = 2] = "IsBlockScopedContainer", e[e.IsControlFlowContainer = 4] = "IsControlFlowContainer", e[e.IsFunctionLike = 8] = "IsFunctionLike", e[e.IsFunctionExpression = 16] = "IsFunctionExpression", e[e.HasLocals = 32] = "HasLocals", e[e.IsInterface = 64] = "IsInterface", e[e.IsObjectLiteralOrClassExpressionMethodOrAccessor = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor", e))(lne || {}); + function Zm(e, t, n) { + return E.attachFlowNodeDebugInfo({ flags: e, id: 0, node: t, antecedent: n }); + } + var HLe = /* @__PURE__ */ GLe(); + function une(e, t) { + var n, i; + Yo("beforeBind"), (n = Vu) == null || n.logStartBindFile("" + e.fileName), HLe(e, t), (i = Vu) == null || i.logStopBindFile(), Yo("afterBind"), ep("Bind", "beforeBind", "afterBind"); + } + function GLe() { + var e, t, n, i, s, o, c, _, u, d, g, h, S, T, C, D, P, O, j, F, V, L, $, U, G = !1, ce = 0, K, X, Z = Zm( + 1, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), oe = Zm( + 1, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), ne = st(); + return fe; + function pe(M, ke, ...vt) { + return rp(xr(M) || e, M, ke, ...vt); + } + function fe(M, ke) { + var vt, Nr; + e = M, t = ke, n = pa(t), U = H(e, ke), X = /* @__PURE__ */ new Set(), ce = 0, K = zl.getSymbolConstructor(), E.attachFlowNodeDebugInfo(Z), E.attachFlowNodeDebugInfo(oe), e.locals || ((vt = rn) == null || vt.push( + rn.Phase.Bind, + "bindSourceFile", + { path: e.path }, + /*separateBeginAndEnd*/ + !0 + ), Ht(e), (Nr = rn) == null || Nr.pop(), e.symbolCount = ce, e.classifiableNames = X, wl(), jo()), e = void 0, t = void 0, n = void 0, i = void 0, s = void 0, o = void 0, c = void 0, _ = void 0, u = void 0, g = void 0, d = !1, h = void 0, S = void 0, T = void 0, C = void 0, D = void 0, P = void 0, O = void 0, F = void 0, V = !1, L = !1, G = !1, $ = 0; + } + function H(M, ke) { + return Iu(ke, "alwaysStrict") && !M.isDeclarationFile ? !0 : !!M.externalModuleIndicator; + } + function ae(M, ke) { + return ce++, new K(M, ke); + } + function le(M, ke, vt) { + M.flags |= vt, ke.symbol = M, M.declarations = sh(M.declarations, ke), vt & 1955 && !M.exports && (M.exports = Ms()), vt & 6240 && !M.members && (M.members = Ms()), M.constEnumOnlyModule && M.flags & 304 && (M.constEnumOnlyModule = !1), vt & 111551 && p3(M, ke); + } + function Ae(M) { + if (M.kind === 277) + return M.isExportEquals ? "export=" : "default"; + const ke = es(M); + if (ke) { + if (wu(M)) { + const vt = Ip(ke); + return Zd(M) ? "__global" : `"${vt}"`; + } + if (ke.kind === 167) { + const vt = ke.expression; + if (Pf(vt)) + return Ko(vt.text); + if (O7(vt)) + return Ws(vt.operator) + vt.operand.text; + E.fail("Only computed properties with literal names have declaration names"); + } + if (wi(ke)) { + const vt = Nl(M); + if (!vt) + return; + const Nr = vt.symbol; + return x3(Nr, ke.escapedText); + } + return Cd(ke) ? rx(ke) : rm(ke) ? h4(ke) : void 0; + } + switch (M.kind) { + case 176: + return "__constructor"; + case 184: + case 179: + case 323: + return "__call"; + case 185: + case 180: + return "__new"; + case 181: + return "__index"; + case 278: + return "__export"; + case 307: + return "export="; + case 226: + if (mc(M) === 2) + return "export="; + E.fail("Unknown binary declaration kind"); + break; + case 317: + return _C(M) ? "__new" : "__call"; + case 169: + return E.assert(M.parent.kind === 317, "Impossible parameter parent kind", () => `parent is: ${E.formatSyntaxKind(M.parent.kind)}, expected JSDocFunctionType`), "arg" + M.parent.parameters.indexOf(M); + } + } + function ge(M) { + return Bl(M) ? ao(M.name) : Pi(E.checkDefined(Ae(M))); + } + function de(M, ke, vt, Nr, ui, ds, Qi) { + E.assert(Qi || !ph(vt)); + const ys = Vn( + vt, + 2048 + /* Default */ + ) || pu(vt) && vt.name.escapedText === "default", wa = Qi ? "__computed" : ys && ke ? "default" : Ae(vt); + let ya; + if (wa === void 0) + ya = ae( + 0, + "__missing" + /* Missing */ + ); + else if (ya = M.get(wa), Nr & 2885600 && X.add(wa), !ya) + M.set(wa, ya = ae(0, wa)), ds && (ya.isReplaceableByMethod = !0); + else { + if (ds && !ya.isReplaceableByMethod) + return ya; + if (ya.flags & ui) { + if (ya.isReplaceableByMethod) + M.set(wa, ya = ae(0, wa)); + else if (!(Nr & 3 && ya.flags & 67108864)) { + Bl(vt) && Da(vt.name, vt); + let tc = ya.flags & 2 ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0, dp = !0; + (ya.flags & 384 || Nr & 384) && (tc = p.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations, dp = !1); + let rd = !1; + Dr(ya.declarations) && (ys || ya.declarations && ya.declarations.length && vt.kind === 277 && !vt.isExportEquals) && (tc = p.A_module_cannot_have_multiple_default_exports, dp = !1, rd = !0); + const ig = []; + Rp(vt) && ic(vt.type) && Vn( + vt, + 32 + /* Export */ + ) && ya.flags & 2887656 && ig.push(pe(vt, p.Did_you_mean_0, `export type { ${Pi(vt.name.escapedText)} }`)); + const Ug = es(vt) || vt; + rr(ya.declarations, (qg, Uf) => { + const cf = es(qg) || qg, za = dp ? pe(cf, tc, ge(qg)) : pe(cf, tc); + e.bindDiagnostics.push( + rd ? Fs(za, pe(Ug, Uf === 0 ? p.Another_export_default_is_here : p.and_here)) : za + ), rd && ig.push(pe(cf, p.The_first_export_default_is_here)); + }); + const w0 = dp ? pe(Ug, tc, ge(vt)) : pe(Ug, tc); + e.bindDiagnostics.push(Fs(w0, ...ig)), ya = ae(0, wa); + } + } + } + return le(ya, vt, Nr), ya.parent ? E.assert(ya.parent === ke, "Existing symbol parent should match new one") : ya.parent = ke, ya; + } + function ve(M, ke, vt) { + const Nr = !!(L1(M) & 32) || De(M); + if (ke & 2097152) + return M.kind === 281 || M.kind === 271 && Nr ? de(s.symbol.exports, s.symbol, M, ke, vt) : (E.assertNode(s, Vm), de( + s.locals, + /*parent*/ + void 0, + M, + ke, + vt + )); + if (Np(M) && E.assert(Qr(M)), !wu(M) && (Nr || s.flags & 128)) { + if (!Vm(s) || !s.locals || Vn( + M, + 2048 + /* Default */ + ) && !Ae(M)) + return de(s.symbol.exports, s.symbol, M, ke, vt); + const ui = ke & 111551 ? 1048576 : 0, ds = de( + s.locals, + /*parent*/ + void 0, + M, + ui, + vt + ); + return ds.exportSymbol = de(s.symbol.exports, s.symbol, M, ke, vt), M.localSymbol = ds, ds; + } else + return E.assertNode(s, Vm), de( + s.locals, + /*parent*/ + void 0, + M, + ke, + vt + ); + } + function De(M) { + if (M.parent && Nc(M) && (M = M.parent), !Np(M)) return !1; + if (!oA(M) && M.fullName) return !0; + const ke = es(M); + return ke ? !!(O3(ke.parent) && pp(ke.parent) || tu(ke.parent) && L1(ke.parent) & 32) : !1; + } + function Xe(M, ke) { + const vt = s, Nr = o, ui = c; + if (ke & 1 ? (M.kind !== 219 && (o = s), s = c = M, ke & 32 && (s.locals = Ms(), ur(s))) : ke & 2 && (c = M, ke & 32 && (c.locals = void 0)), ke & 4) { + const ds = h, Qi = S, ys = T, wa = C, ya = O, tc = F, dp = V, rd = ke & 16 && !Vn( + M, + 1024 + /* Async */ + ) && !M.asteriskToken && !!db(M) || M.kind === 175; + rd || (h = Zm( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), ke & 144 && (h.node = M)), C = rd || M.kind === 176 || Qr(M) && (M.kind === 262 || M.kind === 218) ? Vt() : void 0, O = void 0, S = void 0, T = void 0, F = void 0, V = !1, Qe(M), M.flags &= -5633, !(h.flags & 1) && ke & 8 && wp(M.body) && (M.flags |= 512, V && (M.flags |= 1024), M.endFlowNode = h), M.kind === 307 && (M.flags |= $, M.endFlowNode = h), C && (Xt(C, h), h = wr(C), (M.kind === 176 || M.kind === 175 || Qr(M) && (M.kind === 262 || M.kind === 218)) && (M.returnFlowNode = h)), rd || (h = ds), S = Qi, T = ys, C = wa, O = ya, F = tc, V = dp; + } else ke & 64 ? (d = !1, Qe(M), E.assertNotNode(M, Re), M.flags = d ? M.flags | 256 : M.flags & -257) : Qe(M); + s = vt, o = Nr, c = ui; + } + function Ie(M) { + ye(M, (ke) => ke.kind === 262 ? Ht(ke) : void 0), ye(M, (ke) => ke.kind !== 262 ? Ht(ke) : void 0); + } + function ye(M, ke = Ht) { + M !== void 0 && rr(M, ke); + } + function Fe(M) { + gs(M, Ht, ye); + } + function Qe(M) { + const ke = G; + if (G = !1, ei(M)) { + Fe(M), yn(M), G = ke; + return; + } + switch (M.kind >= 243 && M.kind <= 259 && (!t.allowUnreachableCode || M.kind === 253) && (M.flowNode = h), M.kind) { + case 247: + Ps(M); + break; + case 246: + ws(M); + break; + case 248: + Yt(M); + break; + case 249: + case 250: + Ca(M); + break; + case 245: + $e(M); + break; + case 253: + case 257: + nt(M); + break; + case 252: + case 251: + re(M); + break; + case 258: + Ee(M); + break; + case 255: + Ne(M); + break; + case 269: + et(M); + break; + case 296: + lt(M); + break; + case 244: + jt(M); + break; + case 256: + ft(M); + break; + case 224: + Ut(M); + break; + case 225: + W(M); + break; + case 226: + if (p0(M)) { + G = ke, je(M); + return; + } + ne(M); + break; + case 220: + z(M); + break; + case 227: + he(M); + break; + case 260: + we(M); + break; + case 211: + case 212: + Di(M); + break; + case 213: + Fi(M); + break; + case 235: + mn(M); + break; + case 346: + case 338: + case 340: + xt(M); + break; + case 351: + ir(M); + break; + case 307: { + Ie(M.statements), Ht(M.endOfFileToken); + break; + } + case 241: + case 268: + Ie(M.statements); + break; + case 208: + _e(M); + break; + case 169: + Te(M); + break; + case 210: + case 209: + case 303: + case 230: + G = ke; + default: + Fe(M); + break; + } + yn(M), G = ke; + } + function Ke(M) { + switch (M.kind) { + case 80: + case 110: + return !0; + case 211: + case 212: + return at(M); + case 213: + return Wt(M); + case 217: + if (fS(M)) + return !1; + case 235: + return Ke(M.expression); + case 226: + return Kt(M); + case 224: + return M.operator === 54 && Ke(M.operand); + case 221: + return Ke(M.expression); + } + return !1; + } + function Be(M) { + switch (M.kind) { + case 80: + case 110: + case 108: + case 236: + return !0; + case 211: + case 217: + case 235: + return Be(M.expression); + case 212: + return (Pf(M.argumentExpression) || fo(M.argumentExpression)) && Be(M.expression); + case 226: + return M.operatorToken.kind === 28 && Be(M.right) || dh(M.operatorToken.kind) && __(M.left); + } + return !1; + } + function at(M) { + return Be(M) || fu(M) && at(M.expression); + } + function Wt(M) { + if (M.arguments) { + for (const ke of M.arguments) + if (at(ke)) + return !0; + } + return !!(M.expression.kind === 211 && at(M.expression.expression)); + } + function nr(M, ke) { + return IC(M) && Pr(M.expression) && Ga(ke); + } + function Kt(M) { + switch (M.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return at(M.left); + case 35: + case 36: + case 37: + case 38: + return Pr(M.left) || Pr(M.right) || nr(M.right, M.left) || nr(M.left, M.right) || QE(M.right) && Ke(M.left) || QE(M.left) && Ke(M.right); + case 104: + return Pr(M.left); + case 103: + return Ke(M.right); + case 28: + return Ke(M.right); + } + return !1; + } + function Pr(M) { + switch (M.kind) { + case 217: + return Pr(M.expression); + case 226: + switch (M.operatorToken.kind) { + case 64: + return Pr(M.left); + case 28: + return Pr(M.right); + } + } + return at(M); + } + function Vt() { + return Zm( + 4, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ); + } + function zt() { + return Zm( + 8, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ); + } + function jr(M, ke, vt) { + return Zm(1024, { target: M, antecedents: ke }, vt); + } + function ci(M) { + M.flags |= M.flags & 2048 ? 4096 : 2048; + } + function Xt(M, ke) { + !(ke.flags & 1) && !ls(M.antecedent, ke) && ((M.antecedent || (M.antecedent = [])).push(ke), ci(ke)); + } + function Ai(M, ke, vt) { + return ke.flags & 1 ? ke : vt ? (vt.kind === 112 && M & 64 || vt.kind === 97 && M & 32) && !BI(vt) && !pj(vt.parent) ? Z : Ke(vt) ? (ci(ke), Zm(M, vt, ke)) : ke : M & 32 ? ke : Z; + } + function _s(M, ke, vt, Nr) { + return ci(M), Zm(128, { switchStatement: ke, clauseStart: vt, clauseEnd: Nr }, M); + } + function $n(M, ke, vt) { + ci(ke), L = !0; + const Nr = Zm(M, vt, ke); + return O && Xt(O, Nr), Nr; + } + function os(M, ke) { + return ci(M), L = !0, Zm(512, ke, M); + } + function wr(M) { + const ke = M.antecedent; + return ke ? ke.length === 1 ? ke[0] : M : Z; + } + function Ss(M) { + const ke = M.parent; + switch (ke.kind) { + case 245: + case 247: + case 246: + return ke.expression === M; + case 248: + case 227: + return ke.condition === M; + } + return !1; + } + function Le(M) { + for (; ; ) + if (M.kind === 217) + M = M.expression; + else if (M.kind === 224 && M.operator === 54) + M = M.operand; + else + return N3(M); + } + function At(M) { + return NB(Ja(M)); + } + function vr(M) { + for (; Qu(M.parent) || Ey(M.parent) && M.parent.operator === 54; ) + M = M.parent; + return !Ss(M) && !Le(M.parent) && !(fu(M.parent) && M.parent.expression === M); + } + function ln(M, ke, vt, Nr) { + const ui = D, ds = P; + D = vt, P = Nr, M(ke), D = ui, P = ds; + } + function Zn(M, ke, vt) { + ln(Ht, M, ke, vt), (!M || !At(M) && !Le(M) && !(fu(M) && UE(M))) && (Xt(ke, Ai(32, h, M)), Xt(vt, Ai(64, h, M))); + } + function ri(M, ke, vt) { + const Nr = S, ui = T; + S = ke, T = vt, Ht(M), S = Nr, T = ui; + } + function mi(M, ke) { + let vt = F; + for (; vt && M.parent.kind === 256; ) + vt.continueTarget = ke, vt = vt.next, M = M.parent; + return ke; + } + function Ps(M) { + const ke = mi(M, zt()), vt = Vt(), Nr = Vt(); + Xt(ke, h), h = ke, Zn(M.expression, vt, Nr), h = wr(vt), ri(M.statement, Nr, ke), Xt(ke, h), h = wr(Nr); + } + function ws(M) { + const ke = zt(), vt = mi(M, Vt()), Nr = Vt(); + Xt(ke, h), h = ke, ri(M.statement, Nr, vt), Xt(vt, h), h = wr(vt), Zn(M.expression, ke, Nr), h = wr(Nr); + } + function Yt(M) { + const ke = mi(M, zt()), vt = Vt(), Nr = Vt(); + Ht(M.initializer), Xt(ke, h), h = ke, Zn(M.condition, vt, Nr), h = wr(vt), ri(M.statement, Nr, ke), Ht(M.incrementor), Xt(ke, h), h = wr(Nr); + } + function Ca(M) { + const ke = mi(M, zt()), vt = Vt(); + Ht(M.expression), Xt(ke, h), h = ke, M.kind === 250 && Ht(M.awaitModifier), Xt(vt, h), Ht(M.initializer), M.initializer.kind !== 261 && kt(M.initializer), ri(M.statement, vt, ke), Xt(ke, h), h = wr(vt); + } + function $e(M) { + const ke = Vt(), vt = Vt(), Nr = Vt(); + Zn(M.expression, ke, vt), h = wr(ke), Ht(M.thenStatement), Xt(Nr, h), h = wr(vt), Ht(M.elseStatement), Xt(Nr, h), h = wr(Nr); + } + function nt(M) { + Ht(M.expression), M.kind === 253 && (V = !0, C && Xt(C, h)), h = Z, L = !0; + } + function te(M) { + for (let ke = F; ke; ke = ke.next) + if (ke.name === M) + return ke; + } + function rt(M, ke, vt) { + const Nr = M.kind === 252 ? ke : vt; + Nr && (Xt(Nr, h), h = Z, L = !0); + } + function re(M) { + if (Ht(M.label), M.label) { + const ke = te(M.label.escapedText); + ke && (ke.referenced = !0, rt(M, ke.breakTarget, ke.continueTarget)); + } else + rt(M, S, T); + } + function Ee(M) { + const ke = C, vt = O, Nr = Vt(), ui = Vt(); + let ds = Vt(); + if (M.finallyBlock && (C = ui), Xt(ds, h), O = ds, Ht(M.tryBlock), Xt(Nr, h), M.catchClause && (h = wr(ds), ds = Vt(), Xt(ds, h), O = ds, Ht(M.catchClause), Xt(Nr, h)), C = ke, O = vt, M.finallyBlock) { + const Qi = Vt(); + Qi.antecedent = Hi(Hi(Nr.antecedent, ds.antecedent), ui.antecedent), h = Qi, Ht(M.finallyBlock), h.flags & 1 ? h = Z : (C && ui.antecedent && Xt(C, jr(Qi, ui.antecedent, h)), O && ds.antecedent && Xt(O, jr(Qi, ds.antecedent, h)), h = Nr.antecedent ? jr(Qi, Nr.antecedent, h) : Z); + } else + h = wr(Nr); + } + function Ne(M) { + const ke = Vt(); + Ht(M.expression); + const vt = S, Nr = j; + S = ke, j = h, Ht(M.caseBlock), Xt(ke, h); + const ui = rr( + M.caseBlock.clauses, + (ds) => ds.kind === 297 + /* DefaultClause */ + ); + M.possiblyExhaustive = !ui && !ke.antecedent, ui || Xt(ke, _s(j, M, 0, 0)), S = vt, j = Nr, h = wr(ke); + } + function et(M) { + const ke = M.clauses, vt = M.parent.expression.kind === 112 || Ke(M.parent.expression); + let Nr = Z; + for (let ui = 0; ui < ke.length; ui++) { + const ds = ui; + for (; !ke[ui].statements.length && ui + 1 < ke.length; ) + Nr === Z && (h = j), Ht(ke[ui]), ui++; + const Qi = Vt(); + Xt(Qi, vt ? _s(j, M.parent, ds, ui + 1) : j), Xt(Qi, Nr), h = wr(Qi); + const ys = ke[ui]; + Ht(ys), Nr = h, !(h.flags & 1) && ui !== ke.length - 1 && t.noFallthroughCasesInSwitch && (ys.fallthroughFlowNode = h); + } + } + function lt(M) { + const ke = h; + h = j, Ht(M.expression), h = ke, ye(M.statements); + } + function jt(M) { + Ht(M.expression), be(M.expression); + } + function be(M) { + if (M.kind === 213) { + const ke = M; + ke.expression.kind !== 108 && I3(ke.expression) && (h = os(h, ke)); + } + } + function ft(M) { + const ke = Vt(); + F = { + next: F, + name: M.label.escapedText, + breakTarget: ke, + continueTarget: void 0, + referenced: !1 + }, Ht(M.label), Ht(M.statement), !F.referenced && !t.allowUnusedLabels && Ot($K(t), M.label, p.Unused_label), F = F.next, Xt(ke, h), h = wr(ke); + } + function bt(M) { + M.kind === 226 && M.operatorToken.kind === 64 ? kt(M.left) : kt(M); + } + function kt(M) { + if (Be(M)) + h = $n(16, h, M); + else if (M.kind === 209) + for (const ke of M.elements) + ke.kind === 230 ? kt(ke.expression) : bt(ke); + else if (M.kind === 210) + for (const ke of M.properties) + ke.kind === 303 ? bt(ke.initializer) : ke.kind === 304 ? kt(ke.name) : ke.kind === 305 && kt(ke.expression); + } + function yt(M, ke, vt) { + const Nr = Vt(); + M.operatorToken.kind === 56 || M.operatorToken.kind === 77 ? Zn(M.left, Nr, vt) : Zn(M.left, ke, Nr), h = wr(Nr), Ht(M.operatorToken), x4(M.operatorToken.kind) ? (ln(Ht, M.right, ke, vt), kt(M.left), Xt(ke, Ai(32, h, M)), Xt(vt, Ai(64, h, M))) : Zn(M.right, ke, vt); + } + function Ut(M) { + if (M.operator === 54) { + const ke = D; + D = P, P = ke, Fe(M), P = D, D = ke; + } else + Fe(M), (M.operator === 46 || M.operator === 47) && kt(M.operand); + } + function W(M) { + Fe(M), (M.operator === 46 || M.operator === 47) && kt(M.operand); + } + function je(M) { + G ? (G = !1, Ht(M.operatorToken), Ht(M.right), G = !0, Ht(M.left)) : (G = !0, Ht(M.left), G = !1, Ht(M.operatorToken), Ht(M.right)), kt(M.left); + } + function st() { + return lO( + M, + ke, + vt, + Nr, + ui, + /*foldState*/ + void 0 + ); + function M(Qi, ys) { + if (ys) { + ys.stackIndex++, Da(Qi, i); + const ya = U; + eo(Qi); + const tc = i; + i = Qi, ys.skip = !1, ys.inStrictModeStack[ys.stackIndex] = ya, ys.parentStack[ys.stackIndex] = tc; + } else + ys = { + stackIndex: 0, + skip: !1, + inStrictModeStack: [void 0], + parentStack: [void 0] + }; + const wa = Qi.operatorToken.kind; + if (A3(wa) || x4(wa)) { + if (vr(Qi)) { + const ya = Vt(), tc = h, dp = L; + L = !1, yt(Qi, ya, ya), h = L ? wr(ya) : tc, L || (L = dp); + } else + yt(Qi, D, P); + ys.skip = !0; + } + return ys; + } + function ke(Qi, ys, wa) { + if (!ys.skip) { + const ya = ds(Qi); + return wa.operatorToken.kind === 28 && be(Qi), ya; + } + } + function vt(Qi, ys, wa) { + ys.skip || Ht(Qi); + } + function Nr(Qi, ys, wa) { + if (!ys.skip) { + const ya = ds(Qi); + return wa.operatorToken.kind === 28 && be(Qi), ya; + } + } + function ui(Qi, ys) { + if (!ys.skip) { + const tc = Qi.operatorToken.kind; + if (dh(tc) && !u0(Qi) && (kt(Qi.left), tc === 64 && Qi.left.kind === 212)) { + const dp = Qi.left; + Pr(dp.expression) && (h = $n(256, h, Qi)); + } + } + const wa = ys.inStrictModeStack[ys.stackIndex], ya = ys.parentStack[ys.stackIndex]; + wa !== void 0 && (U = wa), ya !== void 0 && (i = ya), ys.skip = !1, ys.stackIndex--; + } + function ds(Qi) { + if (Qi && cn(Qi) && !p0(Qi)) + return Qi; + Ht(Qi); + } + } + function z(M) { + Fe(M), M.expression.kind === 211 && kt(M.expression); + } + function he(M) { + const ke = Vt(), vt = Vt(), Nr = Vt(), ui = h, ds = L; + L = !1, Zn(M.condition, ke, vt), h = wr(ke), Ht(M.questionToken), Ht(M.whenTrue), Xt(Nr, h), h = wr(vt), Ht(M.colonToken), Ht(M.whenFalse), Xt(Nr, h), h = L ? wr(Nr) : ui, L || (L = ds); + } + function q(M) { + const ke = ml(M) ? void 0 : M.name; + if (Ts(ke)) + for (const vt of ke.elements) + q(vt); + else + h = $n(16, h, M); + } + function we(M) { + Fe(M), (M.initializer || V2(M.parent.parent)) && q(M); + } + function _e(M) { + Ht(M.dotDotDotToken), Ht(M.propertyName), dt(M.initializer), Ht(M.name); + } + function Te(M) { + ye(M.modifiers), Ht(M.dotDotDotToken), Ht(M.questionToken), Ht(M.type), dt(M.initializer), Ht(M.name); + } + function dt(M) { + if (!M) + return; + const ke = h; + if (Ht(M), ke === Z || ke === h) + return; + const vt = Vt(); + Xt(vt, ke), Xt(vt, h), h = wr(vt); + } + function xt(M) { + Ht(M.tagName), M.kind !== 340 && M.fullName && (Da(M.fullName, M), yh( + M.fullName, + /*incremental*/ + !1 + )), typeof M.comment != "string" && ye(M.comment); + } + function wt(M) { + Fe(M); + const ke = q1(M); + ke && ke.kind !== 174 && le( + ke.symbol, + ke, + 32 + /* Class */ + ); + } + function ir(M) { + Ht(M.tagName), typeof M.comment != "string" && ye(M.comment); + } + function br(M, ke, vt) { + ln(Ht, M, ke, vt), (!fu(M) || UE(M)) && (Xt(ke, Ai(32, h, M)), Xt(vt, Ai(64, h, M))); + } + function Lr(M) { + switch (M.kind) { + case 211: + Ht(M.questionDotToken), Ht(M.name); + break; + case 212: + Ht(M.questionDotToken), Ht(M.argumentExpression); + break; + case 213: + Ht(M.questionDotToken), ye(M.typeArguments), ye(M.arguments); + break; + } + } + function en(M, ke, vt) { + const Nr = VE(M) ? Vt() : void 0; + br(M.expression, Nr || ke, vt), Nr && (h = wr(Nr)), ln(Lr, M, ke, vt), UE(M) && (Xt(ke, Ai(32, h, M)), Xt(vt, Ai(64, h, M))); + } + function fr(M) { + if (vr(M)) { + const ke = Vt(), vt = h, Nr = L; + en(M, ke, ke), h = L ? wr(ke) : vt, L || (L = Nr); + } else + en(M, D, P); + } + function mn(M) { + fu(M) ? fr(M) : Fe(M); + } + function Di(M) { + fu(M) ? fr(M) : Fe(M); + } + function Fi(M) { + if (fu(M)) + fr(M); + else { + const ke = Ja(M.expression); + ke.kind === 218 || ke.kind === 219 ? (ye(M.typeArguments), ye(M.arguments), Ht(M.expression)) : (Fe(M), M.expression.kind === 108 && (h = os(h, M))); + } + if (M.expression.kind === 211) { + const ke = M.expression; + Re(ke.name) && Pr(ke.expression) && mB(ke.name) && (h = $n(256, h, M)); + } + } + function ur(M) { + _ && (_.nextContainer = M), _ = M; + } + function Mr(M, ke, vt) { + switch (s.kind) { + case 267: + return ve(M, ke, vt); + case 307: + return tn(M, ke, vt); + case 231: + case 263: + return Or(M, ke, vt); + case 266: + return de(s.symbol.exports, s.symbol, M, ke, vt); + case 187: + case 322: + case 210: + case 264: + case 292: + return de(s.symbol.members, s.symbol, M, ke, vt); + case 184: + case 185: + case 179: + case 180: + case 323: + case 181: + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + case 219: + case 317: + case 175: + case 265: + case 200: + return s.locals && E.assertNode(s, Vm), de( + s.locals, + /*parent*/ + void 0, + M, + ke, + vt + ); + } + } + function Or(M, ke, vt) { + return Os(M) ? de(s.symbol.exports, s.symbol, M, ke, vt) : de(s.symbol.members, s.symbol, M, ke, vt); + } + function tn(M, ke, vt) { + return il(e) ? ve(M, ke, vt) : de( + e.locals, + /*parent*/ + void 0, + M, + ke, + vt + ); + } + function qt(M) { + const ke = yi(M) ? M : Jn(M.body, _m); + return !!ke && ke.statements.some((vt) => Ic(vt) || ko(vt)); + } + function ma(M) { + M.flags & 33554432 && !qt(M) ? M.flags |= 128 : M.flags &= -129; + } + function $a(M) { + if (ma(M), wu(M)) + if (Vn( + M, + 32 + /* Export */ + ) && it(M, p.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible), Bj(M)) + Ro(M); + else { + let ke; + if (M.name.kind === 11) { + const { text: Nr } = M.name; + ke = EC(Nr), ke === void 0 && it(M.name, p.Pattern_0_can_have_at_most_one_Asterisk_character, Nr); + } + const vt = Mr( + M, + 512, + 110735 + /* ValueModuleExcludes */ + ); + e.patternAmbientModules = Tr(e.patternAmbientModules, ke && !Gi(ke) ? { pattern: ke, symbol: vt } : void 0); + } + else { + const ke = Ro(M); + if (ke !== 0) { + const { symbol: vt } = M; + vt.constEnumOnlyModule = !(vt.flags & 304) && ke === 2 && vt.constEnumOnlyModule !== !1; + } + } + } + function Ro(M) { + const ke = Ch(M), vt = ke !== 0; + return Mr( + M, + vt ? 512 : 1024, + vt ? 110735 : 0 + /* NamespaceModuleExcludes */ + ), ke; + } + function Vo(M) { + const ke = ae(131072, Ae(M)); + le( + ke, + M, + 131072 + /* Signature */ + ); + const vt = ae( + 2048, + "__type" + /* Type */ + ); + le( + vt, + M, + 2048 + /* TypeLiteral */ + ), vt.members = Ms(), vt.members.set(ke.escapedName, ke); + } + function hs(M) { + return Li( + M, + 4096, + "__object" + /* Object */ + ); + } + function ga(M) { + return Li( + M, + 4096, + "__jsxAttributes" + /* JSXAttributes */ + ); + } + function Co(M, ke, vt) { + return Mr(M, ke, vt); + } + function Li(M, ke, vt) { + const Nr = ae(ke, vt); + return ke & 106508 && (Nr.parent = s.symbol), le(Nr, M, ke), Nr; + } + function bi(M, ke, vt) { + switch (c.kind) { + case 267: + ve(M, ke, vt); + break; + case 307: + if (A_(s)) { + ve(M, ke, vt); + break; + } + default: + E.assertNode(c, Vm), c.locals || (c.locals = Ms(), ur(c)), de( + c.locals, + /*parent*/ + void 0, + M, + ke, + vt + ); + } + } + function wl() { + if (!u) + return; + const M = s, ke = _, vt = c, Nr = i, ui = h; + for (const ds of u) { + const Qi = ds.parent.parent; + s = c7(Qi) || e, c = bd(Qi) || e, h = Zm( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), i = ds, Ht(ds.typeExpression); + const ys = es(ds); + if ((oA(ds) || !ds.fullName) && ys && O3(ys.parent)) { + const wa = pp(ys.parent); + if (wa) { + zf( + e.symbol, + ys.parent, + wa, + !!sr(ys, (tc) => Dn(tc) && tc.name.escapedText === "prototype"), + /*containerIsClass*/ + !1 + ); + const ya = s; + switch (_3(ys.parent)) { + case 1: + case 2: + A_(e) ? s = e : s = void 0; + break; + case 4: + s = ys.parent.expression; + break; + case 3: + s = ys.parent.expression.name; + break; + case 5: + s = Bb(e, ys.parent.expression) ? e : Dn(ys.parent.expression) ? ys.parent.expression.name : ys.parent.expression; + break; + case 0: + return E.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); + } + s && ve( + ds, + 524288, + 788968 + /* TypeAliasExcludes */ + ), s = ya; + } + } else oA(ds) || !ds.fullName || ds.fullName.kind === 80 ? (i = ds.parent, bi( + ds, + 524288, + 788968 + /* TypeAliasExcludes */ + )) : Ht(ds.fullName); + } + s = M, _ = ke, c = vt, i = Nr, h = ui; + } + function jo() { + if (g === void 0) + return; + const M = s, ke = _, vt = c, Nr = i, ui = h; + for (const ds of g) { + const Qi = hb(ds), ys = Qi ? c7(Qi) : void 0, wa = Qi ? bd(Qi) : void 0; + s = ys || e, c = wa || e, h = Zm( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), i = ds, Ht(ds.importClause); + } + s = M, _ = ke, c = vt, i = Nr, h = ui; + } + function Su(M) { + if (!e.parseDiagnostics.length && !(M.flags & 33554432) && !(M.flags & 16777216) && !tK(M)) { + const ke = B2(M); + if (ke === void 0) + return; + U && ke >= 119 && ke <= 127 ? e.bindDiagnostics.push(pe(M, fc(M), ao(M))) : ke === 135 ? il(e) && y7(M) ? e.bindDiagnostics.push(pe(M, p.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, ao(M))) : M.flags & 65536 && e.bindDiagnostics.push(pe(M, p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, ao(M))) : ke === 127 && M.flags & 16384 && e.bindDiagnostics.push(pe(M, p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, ao(M))); + } + } + function fc(M) { + return Nl(M) ? p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode : e.externalModuleIndicator ? p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode : p.Identifier_expected_0_is_a_reserved_word_in_strict_mode; + } + function ql(M) { + M.escapedText === "#constructor" && (e.parseDiagnostics.length || e.bindDiagnostics.push(pe(M, p.constructor_is_a_reserved_word, ao(M)))); + } + function ea(M) { + U && __(M.left) && dh(M.operatorToken.kind) && Bt(M, M.left); + } + function wo(M) { + U && M.variableDeclaration && Bt(M, M.variableDeclaration.name); + } + function Ka(M) { + if (U && M.expression.kind === 80) { + const ke = H2(e, M.expression); + e.bindDiagnostics.push(xl(e, ke.start, ke.length, p.delete_cannot_be_called_on_an_identifier_in_strict_mode)); + } + } + function Fa(M) { + return Re(M) && (M.escapedText === "eval" || M.escapedText === "arguments"); + } + function Bt(M, ke) { + if (ke && ke.kind === 80) { + const vt = ke; + if (Fa(vt)) { + const Nr = H2(e, ke); + e.bindDiagnostics.push(xl(e, Nr.start, Nr.length, lc(M), dn(vt))); + } + } + } + function lc(M) { + return Nl(M) ? p.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode : e.externalModuleIndicator ? p.Invalid_use_of_0_Modules_are_automatically_in_strict_mode : p.Invalid_use_of_0_in_strict_mode; + } + function Fu(M) { + U && !(M.flags & 33554432) && Bt(M, M.name); + } + function Lu(M) { + return Nl(M) ? p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Class_definitions_are_automatically_in_strict_mode : e.externalModuleIndicator ? p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5_Modules_are_automatically_in_strict_mode : p.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES5; + } + function y_(M) { + if (n < 2 && c.kind !== 307 && c.kind !== 267 && !Qk(c)) { + const ke = H2(e, M); + e.bindDiagnostics.push(xl(e, ke.start, ke.length, Lu(M))); + } + } + function Ao(M) { + U && Bt(M, M.operand); + } + function Uo(M) { + U && (M.operator === 46 || M.operator === 47) && Bt(M, M.operand); + } + function A(M) { + U && it(M, p.with_statements_are_not_allowed_in_strict_mode); + } + function Me(M) { + U && pa(t) >= 2 && (QY(M.statement) || yc(M.statement)) && it(M.label, p.A_label_is_not_allowed_here); + } + function it(M, ke, ...vt) { + const Nr = Hm(e, M.pos); + e.bindDiagnostics.push(xl(e, Nr.start, Nr.length, ke, ...vt)); + } + function Ot(M, ke, vt) { + kr(M, ke, ke, vt); + } + function kr(M, ke, vt, Nr) { + qn(M, { pos: W1(ke, e), end: vt.end }, Nr); + } + function qn(M, ke, vt) { + const Nr = xl(e, ke.pos, ke.end - ke.pos, vt); + M ? e.bindDiagnostics.push(Nr) : e.bindSuggestionDiagnostics = Tr(e.bindSuggestionDiagnostics, { + ...Nr, + category: 2 + /* Suggestion */ + }); + } + function Ht(M) { + if (!M) + return; + Da(M, i), rn && (M.tracingPath = e.path); + const ke = U; + if (eo(M), M.kind > 165) { + const vt = i; + i = M; + const Nr = Uz(M); + Nr === 0 ? Qe(M) : Xe(M, Nr), i = vt; + } else { + const vt = i; + M.kind === 1 && (i = M), yn(M), i = vt; + } + U = ke; + } + function yn(M) { + if (gf(M)) + if (Qr(M)) + for (const ke of M.jsDoc) + Ht(ke); + else + for (const ke of M.jsDoc) + Da(ke, M), yh( + ke, + /*incremental*/ + !1 + ); + } + function li(M) { + if (!U) + for (const ke of M) { + if (!Kd(ke)) + return; + if (_i(ke)) { + U = !0; + return; + } + } + } + function _i(M) { + const ke = ub(e, M.expression); + return ke === '"use strict"' || ke === "'use strict'"; + } + function eo(M) { + switch (M.kind) { + case 80: + if (M.flags & 4096) { + let Qi = M.parent; + for (; Qi && !Np(Qi); ) + Qi = Qi.parent; + bi( + Qi, + 524288, + 788968 + /* TypeAliasExcludes */ + ); + break; + } + case 110: + return h && (ct(M) || i.kind === 304) && (M.flowNode = h), Su(M); + case 166: + h && T7(M) && (M.flowNode = h); + break; + case 236: + case 108: + M.flowNode = h; + break; + case 81: + return ql(M); + case 211: + case 212: + const ke = M; + h && Be(ke) && (ke.flowNode = h), GZ(ke) && vc(ke), Qr(ke) && e.commonJsModuleIndicator && Ag(ke) && !RO(c, "module") && de( + e.locals, + /*parent*/ + void 0, + ke.expression, + 134217729, + 111550 + /* FunctionScopedVariableExcludes */ + ); + break; + case 226: + switch (mc(M)) { + case 1: + Pe(M); + break; + case 2: + Ct(M); + break; + case 3: + pc(M.left, M); + break; + case 6: + Do(M); + break; + case 4: + Vi(M); + break; + case 5: + const Qi = M.left.expression; + if (Qr(M) && Re(Qi)) { + const ys = RO(c, Qi.escapedText); + if (v7(ys?.valueDeclaration)) { + Vi(M); + break; + } + } + bf(M); + break; + case 0: + break; + default: + E.fail("Unknown binary expression special property assignment kind"); + } + return ea(M); + case 299: + return wo(M); + case 220: + return Ka(M); + case 225: + return Ao(M); + case 224: + return Uo(M); + case 254: + return A(M); + case 256: + return Me(M); + case 197: + d = !0; + return; + case 182: + break; + case 168: + return zr(M); + case 169: + return Y(M); + case 260: + return Vf(M); + case 208: + return M.flowNode = h, Vf(M); + case 172: + case 171: + return qo(M); + case 303: + case 304: + return It( + M, + 4, + 0 + /* PropertyExcludes */ + ); + case 306: + return It( + M, + 8, + 900095 + /* EnumMemberExcludes */ + ); + case 179: + case 180: + case 181: + return Mr( + M, + 131072, + 0 + /* None */ + ); + case 174: + case 173: + return It( + M, + 8192 | (M.questionToken ? 16777216 : 0), + Yp(M) ? 0 : 103359 + /* MethodExcludes */ + ); + case 262: + return tt(M); + case 176: + return Mr( + M, + 16384, + /*symbolExcludes:*/ + 0 + /* None */ + ); + case 177: + return It( + M, + 32768, + 46015 + /* GetAccessorExcludes */ + ); + case 178: + return It( + M, + 65536, + 78783 + /* SetAccessorExcludes */ + ); + case 184: + case 317: + case 323: + case 185: + return Vo(M); + case 187: + case 322: + case 200: + return ol(M); + case 332: + return wt(M); + case 210: + return hs(M); + case 218: + case 219: + return Pt(M); + case 213: + switch (mc(M)) { + case 7: + return Cc(M); + case 8: + return Jf(M); + case 9: + return to(M); + case 0: + break; + default: + return E.fail("Unknown call expression assignment declaration kind"); + } + Qr(M) && ng(M); + break; + case 231: + case 263: + return U = !0, L_(M); + case 264: + return bi( + M, + 64, + 788872 + /* InterfaceExcludes */ + ); + case 265: + return bi( + M, + 524288, + 788968 + /* TypeAliasExcludes */ + ); + case 266: + return bm(M); + case 267: + return $a(M); + case 292: + return ga(M); + case 291: + return Co( + M, + 4, + 0 + /* PropertyExcludes */ + ); + case 271: + case 274: + case 276: + case 281: + return Mr( + M, + 2097152, + 2097152 + /* AliasExcludes */ + ); + case 270: + return gl(M); + case 273: + return kc(M); + case 278: + return Cl(M); + case 277: + return Eo(M); + case 307: + return li(M.statements), vo(); + case 241: + if (!Qk(M.parent)) + return; + case 268: + return li(M.statements); + case 341: + if (M.parent.kind === 323) + return Y(M); + if (M.parent.kind !== 322) + break; + case 348: + const ui = M, ds = ui.isBracketed || ui.typeExpression && ui.typeExpression.type.kind === 316 ? 16777220 : 4; + return Mr( + ui, + ds, + 0 + /* PropertyExcludes */ + ); + case 346: + case 338: + case 340: + return (u || (u = [])).push(M); + case 339: + return Ht(M.typeExpression); + case 351: + return (g || (g = [])).push(M); + } + } + function qo(M) { + const ke = u_(M), vt = ke ? 98304 : 4, Nr = ke ? 13247 : 0; + return It(M, vt | (M.questionToken ? 16777216 : 0), Nr); + } + function ol(M) { + return Li( + M, + 2048, + "__type" + /* Type */ + ); + } + function vo() { + if (ma(e), il(e)) + cl(); + else if (Ap(e)) { + cl(); + const M = e.symbol; + de( + e.symbol.exports, + e.symbol, + e, + 4, + -1 + /* All */ + ), e.symbol = M; + } + } + function cl() { + Li(e, 512, `"${Gu(e.fileName)}"`); + } + function Eo(M) { + if (!s.symbol || !s.symbol.exports) + Li(M, 111551, Ae(M)); + else { + const ke = pC(M) ? 2097152 : 4, vt = de( + s.symbol.exports, + s.symbol, + M, + ke, + -1 + /* All */ + ); + M.isExportEquals && p3(vt, M); + } + } + function gl(M) { + ut(M.modifiers) && e.bindDiagnostics.push(pe(M, p.Modifiers_cannot_appear_here)); + const ke = yi(M.parent) ? il(M.parent) ? M.parent.isDeclarationFile ? void 0 : p.Global_module_exports_may_only_appear_in_declaration_files : p.Global_module_exports_may_only_appear_in_module_files : p.Global_module_exports_may_only_appear_at_top_level; + ke ? e.bindDiagnostics.push(pe(M, ke)) : (e.symbol.globalExports = e.symbol.globalExports || Ms(), de( + e.symbol.globalExports, + e.symbol, + M, + 2097152, + 2097152 + /* AliasExcludes */ + )); + } + function Cl(M) { + !s.symbol || !s.symbol.exports ? Li(M, 8388608, Ae(M)) : M.exportClause ? Ym(M.exportClause) && (Da(M.exportClause, M), de( + s.symbol.exports, + s.symbol, + M.exportClause, + 2097152, + 2097152 + /* AliasExcludes */ + )) : de( + s.symbol.exports, + s.symbol, + M, + 8388608, + 0 + /* None */ + ); + } + function kc(M) { + M.name && Mr( + M, + 2097152, + 2097152 + /* AliasExcludes */ + ); + } + function F_(M) { + return e.externalModuleIndicator && e.externalModuleIndicator !== !0 ? !1 : (e.commonJsModuleIndicator || (e.commonJsModuleIndicator = M, e.externalModuleIndicator || cl()), !0); + } + function Jf(M) { + if (!F_(M)) + return; + const ke = Gc( + M.arguments[0], + /*parent*/ + void 0, + (vt, Nr) => (Nr && le( + Nr, + vt, + 67110400 + /* Assignment */ + ), Nr) + ); + ke && de( + ke.exports, + ke, + M, + 1048580, + 0 + /* None */ + ); + } + function Pe(M) { + if (!F_(M)) + return; + const ke = Gc( + M.left.expression, + /*parent*/ + void 0, + (vt, Nr) => (Nr && le( + Nr, + vt, + 67110400 + /* Assignment */ + ), Nr) + ); + if (ke) { + const Nr = S3(M.right) && ($2(M.left.expression) || Ag(M.left.expression)) ? 2097152 : 1048580; + Da(M.left, M), de( + ke.exports, + ke, + M.left, + Nr, + 0 + /* None */ + ); + } + } + function Ct(M) { + if (!F_(M)) + return; + const ke = c3(M.right); + if (LB(ke) || s === e && Bb(e, ke)) + return; + if (Gs(ke) && Ri(ke.properties, du)) { + rr(ke.properties, Jr); + return; + } + const vt = pC(M) ? 2097152 : 1049092, Nr = de( + e.symbol.exports, + e.symbol, + M, + vt | 67108864, + 0 + /* None */ + ); + p3(Nr, M); + } + function Jr(M) { + de( + e.symbol.exports, + e.symbol, + M, + 69206016, + 0 + /* None */ + ); + } + function Vi(M) { + if (E.assert(Qr(M)), cn(M) && Dn(M.left) && wi(M.left.name) || Dn(M) && wi(M.name)) + return; + const vt = Uu( + M, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + switch (vt.kind) { + case 262: + case 218: + let Nr = vt.symbol; + if (cn(vt.parent) && vt.parent.operatorToken.kind === 64) { + const Qi = vt.parent.left; + gb(Qi) && hy(Qi.expression) && (Nr = b_(Qi.expression.expression, o)); + } + Nr && Nr.valueDeclaration && (Nr.members = Nr.members || Ms(), ph(M) ? ha(M, Nr, Nr.members) : de( + Nr.members, + Nr, + M, + 67108868, + 0 + /* Property */ + ), le( + Nr, + Nr.valueDeclaration, + 32 + /* Class */ + )); + break; + case 176: + case 172: + case 174: + case 177: + case 178: + case 175: + const ui = vt.parent, ds = Os(vt) ? ui.symbol.exports : ui.symbol.members; + ph(M) ? ha(M, ui.symbol, ds) : de( + ds, + ui.symbol, + M, + 67108868, + 0, + /*isReplaceableByMethod*/ + !0 + ); + break; + case 307: + if (ph(M)) + break; + vt.commonJsModuleIndicator ? de( + vt.symbol.exports, + vt.symbol, + M, + 1048580, + 0 + /* None */ + ) : Mr( + M, + 1, + 111550 + /* FunctionScopedVariableExcludes */ + ); + break; + case 267: + break; + default: + E.failBadSyntaxKind(vt); + } + } + function ha(M, ke, vt) { + de( + vt, + ke, + M, + 4, + 0, + /*isReplaceableByMethod*/ + !0, + /*isComputedName*/ + !0 + ), Pa(M, ke); + } + function Pa(M, ke) { + ke && (ke.assignmentDeclarationMembers || (ke.assignmentDeclarationMembers = /* @__PURE__ */ new Map())).set(ja(M), M); + } + function vc(M) { + M.expression.kind === 110 ? Vi(M) : gb(M) && M.parent.parent.kind === 307 && (hy(M.expression) ? pc(M, M.parent) : Id(M)); + } + function Do(M) { + Da(M.left, M), Da(M.right, M), Wf( + M.left.expression, + M.left, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !0 + ); + } + function to(M) { + const ke = b_(M.arguments[0].expression); + ke && ke.valueDeclaration && le( + ke, + ke.valueDeclaration, + 32 + /* Class */ + ), v_( + M, + ke, + /*isPrototypeProperty*/ + !0 + ); + } + function pc(M, ke) { + const vt = M.expression, Nr = vt.expression; + Da(Nr, vt), Da(vt, M), Da(M, ke), Wf( + Nr, + M, + /*isPrototypeProperty*/ + !0, + /*containerIsClass*/ + !0 + ); + } + function Cc(M) { + let ke = b_(M.arguments[0]); + const vt = M.parent.parent.kind === 307; + ke = zf( + ke, + M.arguments[0], + vt, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ), v_( + M, + ke, + /*isPrototypeProperty*/ + !1 + ); + } + function bf(M) { + var ke; + const vt = b_(M.left.expression, c) || b_(M.left.expression, s); + if (!Qr(M) && !$Z(vt)) + return; + const Nr = xC(M.left); + if (!(Re(Nr) && ((ke = RO(s, Nr.escapedText)) == null ? void 0 : ke.flags) & 2097152)) + if (Da(M.left, M), Da(M.right, M), Re(M.left.expression) && s === e && Bb(e, M.left.expression)) + Pe(M); + else if (ph(M)) { + Li( + M, + 67108868, + "__computed" + /* Computed */ + ); + const ui = zf( + vt, + M.left.expression, + pp(M.left), + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ); + Pa(M, ui); + } else + Id(Is(M.left, Q2)); + } + function Id(M) { + E.assert(!Re(M)), Da(M.expression, M), Wf( + M.expression, + M, + /*isPrototypeProperty*/ + !1, + /*containerIsClass*/ + !1 + ); + } + function zf(M, ke, vt, Nr, ui) { + return M?.flags & 2097152 || (vt && !Nr && (M = Gc(ke, M, (ys, wa, ya) => { + if (wa) + return le(wa, ys, 67110400), wa; + { + const tc = ya ? ya.exports : e.jsGlobalAugmentations || (e.jsGlobalAugmentations = Ms()); + return de(tc, ya, ys, 67110400, 110735); + } + })), ui && M && M.valueDeclaration && le( + M, + M.valueDeclaration, + 32 + /* Class */ + )), M; + } + function v_(M, ke, vt) { + if (!ke || !tg(ke)) + return; + const Nr = vt ? ke.members || (ke.members = Ms()) : ke.exports || (ke.exports = Ms()); + let ui = 0, ds = 0; + so(MT(M)) ? (ui = 8192, ds = 103359) : Es(M) && X2(M) && (ut(M.arguments[2].properties, (Qi) => { + const ys = es(Qi); + return !!ys && Re(ys) && dn(ys) === "set"; + }) && (ui |= 65540, ds |= 78783), ut(M.arguments[2].properties, (Qi) => { + const ys = es(Qi); + return !!ys && Re(ys) && dn(ys) === "get"; + }) && (ui |= 32772, ds |= 46015)), ui === 0 && (ui = 4, ds = 0), de( + Nr, + ke, + M, + ui | 67108864, + ds & -67108865 + /* Assignment */ + ); + } + function pp(M) { + return cn(M.parent) ? rg(M.parent).parent.kind === 307 : M.parent.parent.kind === 307; + } + function Wf(M, ke, vt, Nr) { + let ui = b_(M, c) || b_(M, s); + const ds = pp(ke); + ui = zf(ui, ke.expression, ds, vt, Nr), v_(ke, ui, vt); + } + function tg(M) { + if (M.flags & 1072) + return !0; + const ke = M.valueDeclaration; + if (ke && Es(ke)) + return !!MT(ke); + let vt = ke ? ti(ke) ? ke.initializer : cn(ke) ? ke.right : Dn(ke) && cn(ke.parent) ? ke.parent.right : void 0 : void 0; + if (vt = vt && c3(vt), vt) { + const Nr = hy(ti(ke) ? ke.name : cn(ke) ? ke.left : ke); + return !!U1(cn(vt) && (vt.operatorToken.kind === 57 || vt.operatorToken.kind === 61) ? vt.right : vt, Nr); + } + return !1; + } + function rg(M) { + for (; cn(M.parent); ) + M = M.parent; + return M.parent; + } + function b_(M, ke = s) { + if (Re(M)) + return RO(ke, M.escapedText); + { + const vt = b_(M.expression); + return vt && vt.exports && vt.exports.get(_h(M)); + } + } + function Gc(M, ke, vt) { + if (Bb(e, M)) + return e.symbol; + if (Re(M)) + return vt(M, b_(M), ke); + { + const Nr = Gc(M.expression, ke, vt), ui = u3(M); + return wi(ui) && E.fail("unexpected PrivateIdentifier"), vt(ui, Nr && Nr.exports && Nr.exports.get(_h(M)), Nr); + } + } + function ng(M) { + !e.commonJsModuleIndicator && d_( + M, + /*requireStringLiteralLikeArgument*/ + !1 + ) && F_(M); + } + function L_(M) { + if (M.kind === 263) + bi( + M, + 32, + 899503 + /* ClassExcludes */ + ); + else { + const ui = M.name ? M.name.escapedText : "__class"; + Li(M, 32, ui), M.name && X.add(M.name.escapedText); + } + const { symbol: ke } = M, vt = ae(4194308, "prototype"), Nr = ke.exports.get(vt.escapedName); + Nr && (M.name && Da(M.name, M), e.bindDiagnostics.push(pe(Nr.declarations[0], p.Duplicate_identifier_0, uc(vt)))), ke.exports.set(vt.escapedName, vt), vt.parent = ke; + } + function bm(M) { + return fb(M) ? bi( + M, + 128, + 899967 + /* ConstEnumExcludes */ + ) : bi( + M, + 256, + 899327 + /* RegularEnumExcludes */ + ); + } + function Vf(M) { + if (U && Bt(M, M.name), !Ts(M.name)) { + const ke = M.kind === 260 ? M : M.parent.parent; + Qr(M) && mb(ke) && !M1(M) && !(L1(M) & 32) ? Mr( + M, + 2097152, + 2097152 + /* AliasExcludes */ + ) : Mj(M) ? bi( + M, + 2, + 111551 + /* BlockScopedVariableExcludes */ + ) : X1(M) ? Mr( + M, + 1, + 111551 + /* ParameterExcludes */ + ) : Mr( + M, + 1, + 111550 + /* FunctionScopedVariableExcludes */ + ); + } + } + function Y(M) { + if (!(M.kind === 341 && s.kind !== 323) && (U && !(M.flags & 33554432) && Bt(M, M.name), Ts(M.name) ? Li(M, 1, "__" + M.parent.parameters.indexOf(M)) : Mr( + M, + 1, + 111551 + /* ParameterExcludes */ + ), Q_(M, M.parent))) { + const ke = M.parent.parent; + de( + ke.symbol.members, + ke.symbol, + M, + 4 | (M.questionToken ? 16777216 : 0), + 0 + /* PropertyExcludes */ + ); + } + } + function tt(M) { + !e.isDeclarationFile && !(M.flags & 33554432) && g4(M) && ($ |= 4096), Fu(M), U ? (y_(M), bi( + M, + 16, + 110991 + /* FunctionExcludes */ + )) : Mr( + M, + 16, + 110991 + /* FunctionExcludes */ + ); + } + function Pt(M) { + !e.isDeclarationFile && !(M.flags & 33554432) && g4(M) && ($ |= 4096), h && (M.flowNode = h), Fu(M); + const ke = M.name ? M.name.escapedText : "__function"; + return Li(M, 16, ke); + } + function It(M, ke, vt) { + return !e.isDeclarationFile && !(M.flags & 33554432) && g4(M) && ($ |= 4096), h && d7(M) && (M.flowNode = h), ph(M) ? Li( + M, + ke, + "__computed" + /* Computed */ + ) : Mr(M, ke, vt); + } + function hr(M) { + const ke = sr(M, (vt) => vt.parent && Ab(vt.parent) && vt.parent.extendsType === vt); + return ke && ke.parent; + } + function zr(M) { + if (jp(M.parent)) { + const ke = A7(M.parent); + ke ? (E.assertNode(ke, Vm), ke.locals ?? (ke.locals = Ms()), de( + ke.locals, + /*parent*/ + void 0, + M, + 262144, + 526824 + /* TypeParameterExcludes */ + )) : Mr( + M, + 262144, + 526824 + /* TypeParameterExcludes */ + ); + } else if (M.parent.kind === 195) { + const ke = hr(M.parent); + ke ? (E.assertNode(ke, Vm), ke.locals ?? (ke.locals = Ms()), de( + ke.locals, + /*parent*/ + void 0, + M, + 262144, + 526824 + /* TypeParameterExcludes */ + )) : Li(M, 262144, Ae(M)); + } else + Mr( + M, + 262144, + 526824 + /* TypeParameterExcludes */ + ); + } + function Cn(M) { + const ke = Ch(M); + return ke === 1 || ke === 2 && Cb(t); + } + function ei(M) { + if (!(h.flags & 1)) + return !1; + if (h === Z && // report error on all statements except empty ones + (jw(M) && M.kind !== 242 || // report error on class declarations + M.kind === 263 || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set + M.kind === 267 && Cn(M)) && (h = oe, !t.allowUnreachableCode)) { + const vt = GK(t) && !(M.flags & 33554432) && (!yc(M) || !!(ch(M.declarationList) & 7) || M.declarationList.declarations.some((Nr) => !!Nr.initializer)); + $Le(M, (Nr, ui) => kr(vt, Nr, ui, p.Unreachable_code_detected)); + } + return !0; + } + } + function $Le(e, t) { + if (hi(e) && E1e(e) && ms(e.parent)) { + const { statements: n } = e.parent, i = aJ(n, e); + iR(i, E1e, (s, o) => t(i[s], i[o - 1])); + } else + t(e, e); + } + function E1e(e) { + return !Ac(e) && !XLe(e) && !rv(e) && // `var x;` may declare a variable used above + !(yc(e) && !(ch(e) & 7) && e.declarationList.declarations.some((t) => !t.initializer)); + } + function XLe(e) { + switch (e.kind) { + case 264: + case 265: + return !0; + case 267: + return Ch(e) !== 1; + case 266: + return Vn( + e, + 4096 + /* Const */ + ); + default: + return !1; + } + } + function Bb(e, t) { + let n = 0; + const i = aw(); + for (i.enqueue(t); !i.isEmpty() && n < 100; ) { + if (n++, t = i.dequeue(), $2(t) || Ag(t)) + return !0; + if (Re(t)) { + const s = RO(e, t.escapedText); + if (s && s.valueDeclaration && ti(s.valueDeclaration) && s.valueDeclaration.initializer) { + const o = s.valueDeclaration.initializer; + i.enqueue(o), Tl( + o, + /*excludeCompoundAssignment*/ + !0 + ) && (i.enqueue(o.left), i.enqueue(o.right)); + } + } + } + return !1; + } + function Uz(e) { + switch (e.kind) { + case 231: + case 263: + case 266: + case 210: + case 187: + case 322: + case 292: + return 1; + case 264: + return 65; + case 267: + case 265: + case 200: + case 181: + return 33; + case 307: + return 37; + case 177: + case 178: + case 174: + if (d7(e)) + return 173; + case 176: + case 262: + case 173: + case 179: + case 323: + case 317: + case 184: + case 180: + case 185: + case 175: + return 45; + case 218: + case 219: + return 61; + case 268: + return 4; + case 172: + return e.initializer ? 4 : 0; + case 299: + case 248: + case 249: + case 250: + case 269: + return 34; + case 241: + return ps(e.parent) || ac(e.parent) ? 0 : 34; + } + return 0; + } + function RO(e, t) { + var n, i, s, o; + const c = (i = (n = Jn(e, Vm)) == null ? void 0 : n.locals) == null ? void 0 : i.get(t); + if (c) + return c.exportSymbol ?? c; + if (yi(e) && e.jsGlobalAugmentations && e.jsGlobalAugmentations.has(t)) + return e.jsGlobalAugmentations.get(t); + if (vd(e)) + return (o = (s = e.symbol) == null ? void 0 : s.exports) == null ? void 0 : o.get(t); + } + function _ne(e, t, n, i, s, o, c, _, u, d) { + return g; + function g(h = () => !0) { + const S = [], T = []; + return { + walkType: (ce) => { + try { + return C(ce), { visitedTypes: yT(S), visitedSymbols: yT(T) }; + } finally { + bg(S), bg(T); + } + }, + walkSymbol: (ce) => { + try { + return G(ce), { visitedTypes: yT(S), visitedSymbols: yT(T) }; + } finally { + bg(S), bg(T); + } + } + }; + function C(ce) { + if (!(!ce || S[ce.id] || (S[ce.id] = ce, G(ce.symbol)))) { + if (ce.flags & 524288) { + const X = ce, Z = X.objectFlags; + Z & 4 && D(ce), Z & 32 && V(ce), Z & 3 && $(ce), Z & 24 && U(X); + } + ce.flags & 262144 && P(ce), ce.flags & 3145728 && O(ce), ce.flags & 4194304 && j(ce), ce.flags & 8388608 && F(ce); + } + } + function D(ce) { + C(ce.target), rr(d(ce), C); + } + function P(ce) { + C(_(ce)); + } + function O(ce) { + rr(ce.types, C); + } + function j(ce) { + C(ce.type); + } + function F(ce) { + C(ce.objectType), C(ce.indexType), C(ce.constraint); + } + function V(ce) { + C(ce.typeParameter), C(ce.constraintType), C(ce.templateType), C(ce.modifiersType); + } + function L(ce) { + const K = t(ce); + K && C(K.type), rr(ce.typeParameters, C); + for (const X of ce.parameters) + G(X); + C(e(ce)), C(n(ce)); + } + function $(ce) { + U(ce), rr(ce.typeParameters, C), rr(i(ce), C), C(ce.thisType); + } + function U(ce) { + const K = s(ce); + for (const X of K.indexInfos) + C(X.keyType), C(X.type); + for (const X of K.callSignatures) + L(X); + for (const X of K.constructSignatures) + L(X); + for (const X of K.properties) + G(X); + } + function G(ce) { + if (!ce) + return !1; + const K = $s(ce); + if (T[K]) + return !1; + if (T[K] = ce, !h(ce)) + return !0; + const X = o(ce); + return C(X), ce.exports && ce.exports.forEach(G), rr(ce.declarations, (Z) => { + if (Z.type && Z.type.kind === 186) { + const oe = Z.type, ne = c(u(oe.exprName)); + G(ne); + } + }), !1; + } + } + } + var fv = {}; + Qa(fv, { + RelativePreference: () => D1e, + countPathComponents: () => BO, + forEachFileNameOfModule: () => F1e, + getLocalModuleSpecifierBetweenFileNames: () => KLe, + getModuleSpecifier: () => P1e, + getModuleSpecifierPreferences: () => kD, + getModuleSpecifiers: () => N1e, + getModuleSpecifiersWithCacheInfo: () => I1e, + getNodeModulesPackageName: () => YLe, + tryGetJSExtensionForFile: () => gne, + tryGetModuleSpecifiersFromCache: () => ZLe, + tryGetRealFileNameForNonJsDeclarationFileName: () => B1e, + updateModuleSpecifier: () => QLe + }); + var D1e = /* @__PURE__ */ ((e) => (e[e.Relative = 0] = "Relative", e[e.NonRelative = 1] = "NonRelative", e[e.Shortest = 2] = "Shortest", e[e.ExternalNonRelative = 3] = "ExternalNonRelative", e))(D1e || {}); + function kD({ importModuleSpecifierPreference: e, importModuleSpecifierEnding: t }, n, i, s) { + const o = c(); + return { + relativePreference: s !== void 0 ? Sl(s) ? 0 : 1 : e === "relative" ? 0 : e === "non-relative" ? 1 : e === "project-relative" ? 3 : 2, + getAllowedEndingsInPreferredOrder: (_) => { + const u = _ !== i.impliedNodeFormat ? c(_) : o; + if ((_ ?? i.impliedNodeFormat) === 99) + return $C(n, i.fileName) ? [ + 3, + 2 + /* JsExtension */ + ] : [ + 2 + /* JsExtension */ + ]; + if (Hu(n) === 1) + return u === 2 ? [ + 2, + 1 + /* Index */ + ] : [ + 1, + 2 + /* JsExtension */ + ]; + const d = $C(n, i.fileName); + switch (u) { + case 2: + return d ? [ + 2, + 3, + 0, + 1 + /* Index */ + ] : [ + 2, + 0, + 1 + /* Index */ + ]; + case 3: + return [ + 3, + 0, + 2, + 1 + /* Index */ + ]; + case 1: + return d ? [ + 1, + 0, + 3, + 2 + /* JsExtension */ + ] : [ + 1, + 0, + 2 + /* JsExtension */ + ]; + case 0: + return d ? [ + 0, + 1, + 3, + 2 + /* JsExtension */ + ] : [ + 0, + 1, + 2 + /* JsExtension */ + ]; + default: + E.assertNever(u); + } + } + }; + function c(_) { + if (s !== void 0) { + if (Lg(s)) return 2; + if (nc(s, "/index")) return 1; + } + return oee( + t, + _ ?? i.impliedNodeFormat, + n, + l0(i) ? i : void 0 + ); + } + } + function QLe(e, t, n, i, s, o, c = {}) { + const _ = w1e(e, t, n, i, s, kD({}, e, t, o), {}, c); + if (_ !== o) + return _; + } + function P1e(e, t, n, i, s, o = {}) { + return w1e(e, t, n, i, s, kD({}, e, t), {}, o); + } + function YLe(e, t, n, i, s, o = {}) { + const c = jO(t.fileName, i), _ = L1e(c, n, i, s, e, o); + return xc(_, (u) => dne( + u, + c, + t, + i, + e, + s, + /*packageNameOnly*/ + !0, + o.overrideImportMode + )); + } + function w1e(e, t, n, i, s, o, c, _ = {}) { + const u = jO(n, s), d = L1e(u, i, s, c, e, _); + return xc(d, (g) => dne( + g, + u, + t, + s, + e, + c, + /*packageNameOnly*/ + void 0, + _.overrideImportMode + )) || fne(i, u, e, s, _.overrideImportMode || t.impliedNodeFormat, o); + } + function ZLe(e, t, n, i, s = {}) { + const o = A1e( + e, + t, + n, + i, + s + ); + return o[1] && { kind: o[0], moduleSpecifiers: o[1], computedWithoutCache: !1 }; + } + function A1e(e, t, n, i, s = {}) { + var o; + const c = r7(e); + if (!c) + return He; + const _ = (o = n.getModuleSpecifierCache) == null ? void 0 : o.call(n), u = _?.get(t.path, c.path, i, s); + return [u?.kind, u?.moduleSpecifiers, c, u?.modulePaths, _]; + } + function N1e(e, t, n, i, s, o, c = {}) { + return I1e( + e, + t, + n, + i, + s, + o, + c, + /*forAutoImport*/ + !1 + ).moduleSpecifiers; + } + function I1e(e, t, n, i, s, o, c = {}, _) { + let u = !1; + const d = iMe(e, t); + if (d) return { kind: "ambient", moduleSpecifiers: [d], computedWithoutCache: u }; + let [g, h, S, T, C] = A1e( + e, + i, + s, + o, + c + ); + if (h) return { kind: g, moduleSpecifiers: h, computedWithoutCache: u }; + if (!S) return { kind: void 0, moduleSpecifiers: He, computedWithoutCache: u }; + u = !0, T || (T = M1e(jO(i.fileName, s), S.originalFileName, s, n, c)); + const D = eMe( + T, + n, + i, + s, + o, + c, + _ + ); + return C?.set(i.path, S.path, o, c, D.kind, T, D.moduleSpecifiers), D; + } + function KLe(e, t, n, i, s = {}) { + const o = jO(e.fileName, i), c = s.overrideImportMode ?? e.impliedNodeFormat; + return fne( + t, + o, + n, + i, + c, + kD({}, n, e) + ); + } + function eMe(e, t, n, i, s, o = {}, c) { + const _ = jO(n.fileName, i), u = kD(s, t, n), d = l0(n) && rr(e, (D) => rr( + i.getFileIncludeReasons().get(_o(D.path, i.getCurrentDirectory(), _.getCanonicalFileName)), + (P) => { + if (P.kind !== 3 || P.file !== n.path || n.impliedNodeFormat && n.impliedNodeFormat !== Aie(n, P.index, t)) return; + const O = qA(n, P.index).text; + return u.relativePreference !== 1 || !Df(O) ? O : void 0; + } + )); + if (d) + return { kind: void 0, moduleSpecifiers: [d], computedWithoutCache: !0 }; + const g = ut(e, (D) => D.isInNodeModules); + let h, S, T, C; + for (const D of e) { + const P = D.isInNodeModules ? dne( + D, + _, + n, + i, + t, + s, + /*packageNameOnly*/ + void 0, + o.overrideImportMode + ) : void 0; + if (h = Tr(h, P), P && D.isRedirect) + return { kind: "node_modules", moduleSpecifiers: h, computedWithoutCache: !0 }; + if (!P) { + const O = fne( + D.path, + _, + t, + i, + o.overrideImportMode || n.impliedNodeFormat, + u, + /*pathsOnly*/ + D.isRedirect + ); + if (!O) + continue; + D.isRedirect ? T = Tr(T, O) : GR(O) ? uv(O) ? C = Tr(C, O) : S = Tr(S, O) : (c || !g || D.isInNodeModules) && (C = Tr(C, O)); + } + } + return S?.length ? { kind: "paths", moduleSpecifiers: S, computedWithoutCache: !0 } : T?.length ? { kind: "redirect", moduleSpecifiers: T, computedWithoutCache: !0 } : h?.length ? { kind: "node_modules", moduleSpecifiers: h, computedWithoutCache: !0 } : { kind: "relative", moduleSpecifiers: E.checkDefined(C), computedWithoutCache: !0 }; + } + function jO(e, t) { + e = Xi(e, t.getCurrentDirectory()); + const n = eu(t.useCaseSensitiveFileNames ? t.useCaseSensitiveFileNames() : !0), i = Xn(e); + return { + getCanonicalFileName: n, + importingSourceFileName: e, + sourceDirectory: i, + canonicalSourceDirectory: n(i) + }; + } + function fne(e, t, n, i, s, { getAllowedEndingsInPreferredOrder: o, relativePreference: c }, _) { + const { baseUrl: u, paths: d, rootDirs: g } = n; + if (_ && !d) + return; + const { sourceDirectory: h, canonicalSourceDirectory: S, getCanonicalFileName: T } = t, C = o(s), D = g && oMe(g, e, h, T, C, n) || wA(j2(hd(h, e, T)), C, n); + if (!u && !d && !XB(n) || c === 0) + return _ ? void 0 : D; + const P = Xi(B7(n, i) || u, i.getCurrentDirectory()), O = J1e(e, P, T); + if (!O) + return _ ? void 0 : D; + const j = _ ? void 0 : aMe(e, h, n, i, s), F = _ || j === void 0 ? d && R1e(O, d, C, i, n) : void 0; + if (_) + return F; + const V = j ?? (F === void 0 && u !== void 0 ? wA(O, C, n) : F); + if (!V) + return D; + if (c === 1 && !Df(V)) + return V; + if (c === 3 && !Df(V)) { + const L = n.configFilePath ? _o(Xn(n.configFilePath), i.getCurrentDirectory(), t.getCanonicalFileName) : t.getCanonicalFileName(i.getCurrentDirectory()), $ = _o(e, L, T), U = zi(S, L), G = zi($, L); + if (U && !G || !U && G) + return V; + const ce = pne(i, Xn($)), K = pne(i, h), X = !vC(i); + return tMe(ce, K, X) ? D : V; + } + return z1e(V) || BO(D) < BO(V) ? D : V; + } + function tMe(e, t, n) { + return e === t ? !0 : e === void 0 || t === void 0 ? !1 : oh(e, t, n) === 0; + } + function BO(e) { + let t = 0; + for (let n = zi(e, "./") ? 2 : 0; n < e.length; n++) + e.charCodeAt(n) === 47 && t++; + return t; + } + function O1e(e, t) { + return I1(t.isRedirect, e.isRedirect) || z3(e.path, t.path); + } + function pne(e, t) { + return e.getNearestAncestorDirectoryWithPackageJson ? e.getNearestAncestorDirectoryWithPackageJson(t) : $p(t, (n) => e.fileExists(Mn(n, "package.json")) ? n : void 0); + } + function F1e(e, t, n, i, s) { + var o; + const c = _0(n), _ = n.getCurrentDirectory(), u = n.isSourceOfProjectReferenceRedirect(t) ? n.getProjectReferenceRedirect(t) : void 0, d = _o(t, _, c), g = n.redirectTargetsMap.get(d) || He, S = [...u ? [u] : He, t, ...g].map((O) => Xi(O, _)); + let T = !Ri(S, W4); + if (!i) { + const O = rr(S, (j) => !(T && W4(j)) && s(j, u === j)); + if (O) return O; + } + const C = (o = n.getSymlinkCache) == null ? void 0 : o.call(n).getSymlinkedDirectoriesByRealpath(), D = Xi(t, _); + return C && $p(Xn(D), (O) => { + const j = C.get(bl(_o(O, _, c))); + if (j) + return QR(e, O, c) ? !1 : rr(S, (F) => { + if (!QR(F, O, c)) + return; + const V = hd(O, F, c); + for (const L of j) { + const $ = O1(L, V), U = s($, F === u); + if (T = !0, U) return U; + } + }); + }) || (i ? rr(S, (O) => T && W4(O) ? void 0 : s(O, O === u)) : void 0); + } + function L1e(e, t, n, i, s, o = {}) { + var c; + const _ = _o(e.importingSourceFileName, n.getCurrentDirectory(), _0(n)), u = _o(t, n.getCurrentDirectory(), _0(n)), d = (c = n.getModuleSpecifierCache) == null ? void 0 : c.call(n); + if (d) { + const h = d.get(_, u, i, o); + if (h?.modulePaths) return h.modulePaths; + } + const g = M1e(e, t, n, s, o); + return d && d.setModulePaths(_, u, i, o, g), g; + } + var rMe = ["dependencies", "peerDependencies", "optionalDependencies"]; + function nMe(e) { + let t; + for (const n of rMe) { + const i = e[n]; + i && typeof i == "object" && (t = Hi(t, Gd(i))); + } + return t; + } + function M1e(e, t, n, i, s) { + var o, c; + const _ = (o = n.getModuleResolutionCache) == null ? void 0 : o.call(n), u = (c = n.getSymlinkCache) == null ? void 0 : c.call(n); + if (_ && u && n.readFile && !uv(e.importingSourceFileName)) { + E.type(n); + const h = SD(_.getPackageJsonInfoCache(), n, {}), S = TD(e.importingSourceFileName, h); + if (S) { + const T = nMe(S.contents.packageJsonContent); + for (const C of T || He) { + const D = Ax( + C, + Mn(S.packageDirectory, "package.json"), + i, + n, + _, + /*redirectedReference*/ + void 0, + s.overrideImportMode + ); + u.setSymlinksFromResolution(D.resolvedModule); + } + } + } + const d = /* @__PURE__ */ new Map(); + F1e( + e.importingSourceFileName, + t, + n, + /*preferSymlinks*/ + !0, + (h, S) => { + const T = uv(h); + d.set(h, { path: e.getCanonicalFileName(h), isRedirect: S, isInNodeModules: T }); + } + ); + const g = []; + for (let h = e.canonicalSourceDirectory; d.size !== 0; ) { + const S = bl(h); + let T; + d.forEach(({ path: D, isRedirect: P, isInNodeModules: O }, j) => { + zi(D, S) && ((T || (T = [])).push({ path: j, isRedirect: P, isInNodeModules: O }), d.delete(j)); + }), T && (T.length > 1 && T.sort(O1e), g.push(...T)); + const C = Xn(h); + if (C === h) break; + h = C; + } + if (d.size) { + const h = ts( + d.entries(), + ([S, { isRedirect: T, isInNodeModules: C }]) => ({ path: S, isRedirect: T, isInNodeModules: C }) + ); + h.length > 1 && h.sort(O1e), g.push(...h); + } + return g; + } + function iMe(e, t) { + var n; + const i = (n = e.declarations) == null ? void 0 : n.find( + (c) => jj(c) && (!_b(c) || !Sl(Ip(c.name))) + ); + if (i) + return i.name.text; + const o = Ii(e.declarations, (c) => { + var _, u, d, g; + if (!Nc(c)) return; + const h = D(c); + if (!((_ = h?.parent) != null && _.parent && _m(h.parent) && wu(h.parent.parent) && yi(h.parent.parent.parent))) return; + const S = (g = (d = (u = h.parent.parent.symbol.exports) == null ? void 0 : u.get("export=")) == null ? void 0 : d.valueDeclaration) == null ? void 0 : g.expression; + if (!S) return; + const T = t.getSymbolAtLocation(S); + if (!T) return; + if ((T?.flags & 2097152 ? t.getAliasedSymbol(T) : T) === c.symbol) return h.parent.parent; + function D(P) { + for (; P.flags & 8; ) + P = P.parent; + return P; + } + })[0]; + if (o) + return o.name.text; + } + function R1e(e, t, n, i, s) { + for (const c in t) + for (const _ of t[c]) { + const u = Cs(_), d = u.indexOf("*"), g = n.map((h) => ({ + ending: h, + value: wA(e, [h], s) + })); + if (hh(u) && g.push({ ending: void 0, value: e }), d !== -1) { + const h = u.substring(0, d), S = u.substring(d + 1); + for (const { ending: T, value: C } of g) + if (C.length >= h.length + S.length && zi(C, h) && nc(C, S) && o({ ending: T, value: C })) { + const D = C.substring(h.length, C.length - S.length); + if (!Df(D)) + return ix(c, D); + } + } else if (ut(g, (h) => h.ending !== 0 && u === h.value) || ut(g, (h) => h.ending === 0 && u === h.value && o(h))) + return c; + } + function o({ ending: c, value: _ }) { + return c !== 0 || _ === wA(e, [c], s, i); + } + } + function JO(e, t, n, i, s, o, c, _, u) { + if (typeof o == "string") { + const d = !vC(t), g = () => t.getCommonSourceDirectory(), h = u && yW(n, e, d, g), S = u && hW(n, e, d, g), T = Xi( + Mn(i, o), + /*currentDirectory*/ + void 0 + ), C = ex(n) ? Gu(n) + gne(n, e) : void 0; + switch (_) { + case 0: + if (C && oh(C, T, d) === 0 || oh(n, T, d) === 0 || h && oh(h, T, d) === 0 || S && oh(S, T, d) === 0) + return { moduleFileToTry: s }; + break; + case 1: + if (C && Gp(T, C, d)) { + const j = hd( + T, + C, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Xi( + Mn(Mn(s, o), j), + /*currentDirectory*/ + void 0 + ) }; + } + if (Gp(T, n, d)) { + const j = hd( + T, + n, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Xi( + Mn(Mn(s, o), j), + /*currentDirectory*/ + void 0 + ) }; + } + if (h && Gp(T, h, d)) { + const j = hd( + T, + h, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Mn(s, j) }; + } + if (S && Gp(T, S, d)) { + const j = hd( + T, + S, + /*ignoreCase*/ + !1 + ); + return { moduleFileToTry: Mn(s, j) }; + } + break; + case 2: + const D = T.indexOf("*"), P = T.slice(0, D), O = T.slice(D + 1); + if (C && zi(C, P, d) && nc(C, O, d)) { + const j = C.slice(P.length, C.length - O.length); + return { moduleFileToTry: ix(s, j) }; + } + if (zi(n, P, d) && nc(n, O, d)) { + const j = n.slice(P.length, n.length - O.length); + return { moduleFileToTry: ix(s, j) }; + } + if (h && zi(h, P, d) && nc(h, O, d)) { + const j = h.slice(P.length, h.length - O.length); + return { moduleFileToTry: ix(s, j) }; + } + if (S && zi(S, P, d) && nc(S, O, d)) { + const j = S.slice(P.length, S.length - O.length); + return { moduleFileToTry: ix(s, j) }; + } + break; + } + } else { + if (Array.isArray(o)) + return rr(o, (d) => JO(e, t, n, i, s, d, c, _, u)); + if (typeof o == "object" && o !== null) { + for (const d of Gd(o)) + if (d === "default" || c.indexOf(d) >= 0 || DA(c, d)) { + const g = o[d], h = JO(e, t, n, i, s, g, c, _, u); + if (h) + return h; + } + } + } + } + function sMe(e, t, n, i, s, o, c) { + return typeof o == "object" && o !== null && !Array.isArray(o) && LO(o) ? rr(Gd(o), (_) => { + const u = Xi( + Mn(s, _), + /*currentDirectory*/ + void 0 + ), d = nc(_, "/") ? 1 : _.includes("*") ? 2 : 0; + return JO( + e, + t, + n, + i, + u, + o[_], + c, + d, + /*isImports*/ + !1 + ); + }) : JO( + e, + t, + n, + i, + s, + o, + c, + 0, + /*isImports*/ + !1 + ); + } + function aMe(e, t, n, i, s) { + var o, c, _; + if (!i.readFile || !XB(n)) + return; + const u = pne(i, t); + if (!u) + return; + const d = Mn(u, "package.json"), g = (c = (o = i.getPackageJsonInfoCache) == null ? void 0 : o.call(i)) == null ? void 0 : c.getPackageJsonInfo(d); + if ($re(g) || !i.fileExists(d)) + return; + const h = g?.contents.packageJsonContent || $7(i.readFile(d)), S = h?.imports; + if (!S) + return; + const T = Ay(n, s); + return (_ = rr(Gd(S), (C) => { + if (!zi(C, "#") || C === "#" || zi(C, "#/")) return; + const D = nc(C, "/") ? 1 : C.includes("*") ? 2 : 0; + return JO( + n, + i, + e, + u, + C, + S[C], + T, + D, + /*isImports*/ + !0 + ); + })) == null ? void 0 : _.moduleFileToTry; + } + function oMe(e, t, n, i, s, o) { + const c = j1e(t, e, i); + if (c === void 0) + return; + const _ = j1e(n, e, i), u = Xs(_, (g) => or(c, (h) => j2(hd(g, h, i)))), d = dR(u, z3); + if (d) + return wA(d, s, o); + } + function dne({ path: e, isRedirect: t }, { getCanonicalFileName: n, canonicalSourceDirectory: i }, s, o, c, _, u, d) { + if (!o.fileExists || !o.readFile) + return; + const g = E5(e); + if (!g) + return; + const S = kD(_, c, s).getAllowedEndingsInPreferredOrder(); + let T = e, C = !1; + if (!u) { + let V = g.packageRootIndex, L; + for (; ; ) { + const { moduleFileToTry: $, packageRootPath: U, blockedByExports: G, verbatimFromExports: ce } = F(V); + if (Hu(c) !== 1) { + if (G) + return; + if (ce) + return $; + } + if (U) { + T = U, C = !0; + break; + } + if (L || (L = $), V = e.indexOf(Oo, V + 1), V === -1) { + T = wA(L, S, c, o); + break; + } + } + } + if (t && !C) + return; + const D = o.getGlobalTypingsCacheLocation && o.getGlobalTypingsCacheLocation(), P = n(T.substring(0, g.topLevelNodeModulesIndex)); + if (!(zi(i, P) || D && zi(n(D), P))) + return; + const O = T.substring(g.topLevelPackageNameIndex + 1), j = xD(O); + return Hu(c) === 1 && j === O ? void 0 : j; + function F(V) { + var L, $; + const U = e.substring(0, V), G = Mn(U, "package.json"); + let ce = e, K = !1; + const X = ($ = (L = o.getPackageJsonInfoCache) == null ? void 0 : L.call(o)) == null ? void 0 : $.getPackageJsonInfo(G); + if (AO(X) || X === void 0 && o.fileExists(G)) { + const Z = X?.contents.packageJsonContent || $7(o.readFile(G)), oe = d || s.impliedNodeFormat; + if ($B(c)) { + const fe = U.substring(g.topLevelPackageNameIndex + 1), H = xD(fe), ae = Ay(c, oe), le = Z?.exports ? sMe(c, o, e, U, H, Z.exports, ae) : void 0; + if (le) + return { ...le, verbatimFromExports: !0 }; + if (Z?.exports) + return { moduleFileToTry: e, blockedByExports: !0 }; + } + const ne = Z?.typesVersions ? PO(Z.typesVersions) : void 0; + if (ne) { + const fe = e.slice(U.length + 1), H = R1e( + fe, + ne.paths, + S, + o, + c + ); + H === void 0 ? K = !0 : ce = Mn(U, H); + } + const pe = Z?.typings || Z?.types || Z?.main || "index.js"; + if (Gi(pe) && !(K && sJ(b5(ne.paths), pe))) { + const fe = _o(pe, U, n), H = n(ce); + if (Gu(fe) === Gu(H)) + return { packageRootPath: U, moduleFileToTry: ce }; + if (Z?.type !== "module" && !Lc(H, v5) && zi(H, fe) && Xn(H) === F1(fe) && Gu(Wc(H)) === "index") + return { packageRootPath: U, moduleFileToTry: ce }; + } + } else { + const Z = n(ce.substring(g.packageRootIndex + 1)); + if (Z === "index.d.ts" || Z === "index.js" || Z === "index.ts" || Z === "index.tsx") + return { moduleFileToTry: ce, packageRootPath: U }; + } + return { moduleFileToTry: ce }; + } + } + function cMe(e, t) { + if (!e.fileExists) return; + const n = Ep(L4({ allowJs: !0 }, [{ extension: "node", isMixedContent: !1 }, { + extension: "json", + isMixedContent: !1, + scriptKind: 6 + /* JSON */ + }])); + for (const i of n) { + const s = t + i; + if (e.fileExists(s)) + return s; + } + } + function j1e(e, t, n) { + return Ii(t, (i) => { + const s = J1e(e, i, n); + return s !== void 0 && z1e(s) ? void 0 : s; + }); + } + function wA(e, t, n, i) { + if (Lc(e, [ + ".json", + ".mjs", + ".cjs" + /* Cjs */ + ])) + return e; + const s = Gu(e); + if (e === s) + return e; + const o = t.indexOf( + 2 + /* JsExtension */ + ), c = t.indexOf( + 3 + /* TsExtension */ + ); + if (Lc(e, [ + ".mts", + ".cts" + /* Cts */ + ]) && c !== -1 && c < o) + return e; + if (Lc(e, [ + ".d.mts", + ".mts", + ".d.cts", + ".cts" + /* Cts */ + ])) + return s + mne(e, n); + if (!Lc(e, [ + ".d.ts" + /* Dts */ + ]) && Lc(e, [ + ".ts" + /* Ts */ + ]) && e.includes(".d.")) + return B1e(e); + switch (t[0]) { + case 0: + const _ = Jk(s, "/index"); + return i && _ !== s && cMe(i, _) ? s : _; + case 1: + return s; + case 2: + return s + mne(e, n); + case 3: + if (Ol(e)) { + const u = t.findIndex( + (d) => d === 0 || d === 1 + /* Index */ + ); + return u !== -1 && u < o ? s : s + mne(e, n); + } + return e; + default: + return E.assertNever(t[0]); + } + } + function B1e(e) { + const t = Wc(e); + if (!nc( + e, + ".ts" + /* Ts */ + ) || !t.includes(".d.") || Lc(t, [ + ".d.ts" + /* Dts */ + ])) return; + const n = W3( + e, + ".ts" + /* Ts */ + ), i = n.substring(n.lastIndexOf(".")); + return n.substring(0, n.indexOf(".d.")) + i; + } + function mne(e, t) { + return gne(e, t) ?? E.fail(`Extension ${R4(e)} is unsupported:: FileName:: ${e}`); + } + function gne(e, t) { + const n = hh(e); + switch (n) { + case ".ts": + case ".d.ts": + return ".js"; + case ".tsx": + return t.jsx === 1 ? ".jsx" : ".js"; + case ".js": + case ".jsx": + case ".json": + return n; + case ".d.mts": + case ".mts": + case ".mjs": + return ".mjs"; + case ".d.cts": + case ".cts": + case ".cjs": + return ".cjs"; + default: + return; + } + } + function J1e(e, t, n) { + const i = xT( + t, + e, + t, + n, + /*isAbsolutePathAnUrl*/ + !1 + ); + return $_(i) ? void 0 : i; + } + function z1e(e) { + return zi(e, ".."); + } + var hne = /^".+"$/, qz = "(anonymous)", W1e = 1, V1e = 1, U1e = 1, q1e = 1, Hz = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TypeofEQString = 1] = "TypeofEQString", e[e.TypeofEQNumber = 2] = "TypeofEQNumber", e[e.TypeofEQBigInt = 4] = "TypeofEQBigInt", e[e.TypeofEQBoolean = 8] = "TypeofEQBoolean", e[e.TypeofEQSymbol = 16] = "TypeofEQSymbol", e[e.TypeofEQObject = 32] = "TypeofEQObject", e[e.TypeofEQFunction = 64] = "TypeofEQFunction", e[e.TypeofEQHostObject = 128] = "TypeofEQHostObject", e[e.TypeofNEString = 256] = "TypeofNEString", e[e.TypeofNENumber = 512] = "TypeofNENumber", e[e.TypeofNEBigInt = 1024] = "TypeofNEBigInt", e[e.TypeofNEBoolean = 2048] = "TypeofNEBoolean", e[e.TypeofNESymbol = 4096] = "TypeofNESymbol", e[e.TypeofNEObject = 8192] = "TypeofNEObject", e[e.TypeofNEFunction = 16384] = "TypeofNEFunction", e[e.TypeofNEHostObject = 32768] = "TypeofNEHostObject", e[e.EQUndefined = 65536] = "EQUndefined", e[e.EQNull = 131072] = "EQNull", e[e.EQUndefinedOrNull = 262144] = "EQUndefinedOrNull", e[e.NEUndefined = 524288] = "NEUndefined", e[e.NENull = 1048576] = "NENull", e[e.NEUndefinedOrNull = 2097152] = "NEUndefinedOrNull", e[e.Truthy = 4194304] = "Truthy", e[e.Falsy = 8388608] = "Falsy", e[e.IsUndefined = 16777216] = "IsUndefined", e[e.IsNull = 33554432] = "IsNull", e[e.IsUndefinedOrNull = 50331648] = "IsUndefinedOrNull", e[e.All = 134217727] = "All", e[e.BaseStringStrictFacts = 3735041] = "BaseStringStrictFacts", e[e.BaseStringFacts = 12582401] = "BaseStringFacts", e[e.StringStrictFacts = 16317953] = "StringStrictFacts", e[e.StringFacts = 16776705] = "StringFacts", e[e.EmptyStringStrictFacts = 12123649] = "EmptyStringStrictFacts", e[ + e.EmptyStringFacts = 12582401 + /* BaseStringFacts */ + ] = "EmptyStringFacts", e[e.NonEmptyStringStrictFacts = 7929345] = "NonEmptyStringStrictFacts", e[e.NonEmptyStringFacts = 16776705] = "NonEmptyStringFacts", e[e.BaseNumberStrictFacts = 3734786] = "BaseNumberStrictFacts", e[e.BaseNumberFacts = 12582146] = "BaseNumberFacts", e[e.NumberStrictFacts = 16317698] = "NumberStrictFacts", e[e.NumberFacts = 16776450] = "NumberFacts", e[e.ZeroNumberStrictFacts = 12123394] = "ZeroNumberStrictFacts", e[ + e.ZeroNumberFacts = 12582146 + /* BaseNumberFacts */ + ] = "ZeroNumberFacts", e[e.NonZeroNumberStrictFacts = 7929090] = "NonZeroNumberStrictFacts", e[e.NonZeroNumberFacts = 16776450] = "NonZeroNumberFacts", e[e.BaseBigIntStrictFacts = 3734276] = "BaseBigIntStrictFacts", e[e.BaseBigIntFacts = 12581636] = "BaseBigIntFacts", e[e.BigIntStrictFacts = 16317188] = "BigIntStrictFacts", e[e.BigIntFacts = 16775940] = "BigIntFacts", e[e.ZeroBigIntStrictFacts = 12122884] = "ZeroBigIntStrictFacts", e[ + e.ZeroBigIntFacts = 12581636 + /* BaseBigIntFacts */ + ] = "ZeroBigIntFacts", e[e.NonZeroBigIntStrictFacts = 7928580] = "NonZeroBigIntStrictFacts", e[e.NonZeroBigIntFacts = 16775940] = "NonZeroBigIntFacts", e[e.BaseBooleanStrictFacts = 3733256] = "BaseBooleanStrictFacts", e[e.BaseBooleanFacts = 12580616] = "BaseBooleanFacts", e[e.BooleanStrictFacts = 16316168] = "BooleanStrictFacts", e[e.BooleanFacts = 16774920] = "BooleanFacts", e[e.FalseStrictFacts = 12121864] = "FalseStrictFacts", e[ + e.FalseFacts = 12580616 + /* BaseBooleanFacts */ + ] = "FalseFacts", e[e.TrueStrictFacts = 7927560] = "TrueStrictFacts", e[e.TrueFacts = 16774920] = "TrueFacts", e[e.SymbolStrictFacts = 7925520] = "SymbolStrictFacts", e[e.SymbolFacts = 16772880] = "SymbolFacts", e[e.ObjectStrictFacts = 7888800] = "ObjectStrictFacts", e[e.ObjectFacts = 16736160] = "ObjectFacts", e[e.FunctionStrictFacts = 7880640] = "FunctionStrictFacts", e[e.FunctionFacts = 16728e3] = "FunctionFacts", e[e.VoidFacts = 9830144] = "VoidFacts", e[e.UndefinedFacts = 26607360] = "UndefinedFacts", e[e.NullFacts = 42917664] = "NullFacts", e[e.EmptyObjectStrictFacts = 83427327] = "EmptyObjectStrictFacts", e[e.EmptyObjectFacts = 83886079] = "EmptyObjectFacts", e[e.UnknownFacts = 83886079] = "UnknownFacts", e[e.AllTypeofNE = 556800] = "AllTypeofNE", e[e.OrFactsMask = 8256] = "OrFactsMask", e[e.AndFactsMask = 134209471] = "AndFactsMask", e))(Hz || {}), yne = new Map(Object.entries({ + string: 256, + number: 512, + bigint: 1024, + boolean: 2048, + symbol: 4096, + undefined: 524288, + object: 8192, + function: 16384 + /* TypeofNEFunction */ + })), Gz = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Contextual = 1] = "Contextual", e[e.Inferential = 2] = "Inferential", e[e.SkipContextSensitive = 4] = "SkipContextSensitive", e[e.SkipGenericFunctions = 8] = "SkipGenericFunctions", e[e.IsForSignatureHelp = 16] = "IsForSignatureHelp", e[e.RestBindingElement = 32] = "RestBindingElement", e[e.TypeOnly = 64] = "TypeOnly", e))(Gz || {}), $z = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.BivariantCallback = 1] = "BivariantCallback", e[e.StrictCallback = 2] = "StrictCallback", e[e.IgnoreReturnTypes = 4] = "IgnoreReturnTypes", e[e.StrictArity = 8] = "StrictArity", e[e.StrictTopSignature = 16] = "StrictTopSignature", e[e.Callback = 3] = "Callback", e))($z || {}), lMe = dI(G1e, _Me), Xz = new Map(Object.entries({ + Uppercase: 0, + Lowercase: 1, + Capitalize: 2, + Uncapitalize: 3, + NoInfer: 4 + /* NoInfer */ + })), H1e = class { + }; + function uMe() { + this.flags = 0; + } + function ja(e) { + return e.id || (e.id = V1e, V1e++), e.id; + } + function $s(e) { + return e.id || (e.id = W1e, W1e++), e.id; + } + function Qz(e, t) { + const n = Ch(e); + return n === 1 || t && n === 2; + } + function vne(e) { + var t = [], n = (r) => { + t.push(r); + }, i, s, o = zl.getSymbolConstructor(), c = zl.getTypeConstructor(), _ = zl.getSignatureConstructor(), u = 0, d = 0, g = 0, h = 0, S = 0, T = 0, C, D, P = !1, O = Ms(), j = [ + 1 + /* Covariant */ + ], F = e.getCompilerOptions(), V = pa(F), L = Nu(F), $ = !!F.experimentalDecorators, U = B3(F), G = QB(F), ce = ZT(F), K = Iu(F, "strictNullChecks"), X = Iu(F, "strictFunctionTypes"), Z = Iu(F, "strictBindCallApply"), oe = Iu(F, "strictPropertyInitialization"), ne = Iu(F, "noImplicitAny"), pe = Iu(F, "noImplicitThis"), fe = Iu(F, "useUnknownInCatchVariables"), H = F.exactOptionalPropertyTypes, ae = fat(), le = qlt(), Ae = SP(), ge = Ase(F, { + isEntityNameVisible: Lv, + isExpandoFunctionDeclaration: B7e, + getAllAccessorDeclarations: GM, + requiresAddingImplicitUndefined: aX, + isUndefinedIdentifierExpression(r) { + return E.assert(Sd(r)), kp(r) === De; + } + }), de = xee({ + evaluateElementAccessExpression: Fct, + evaluateEntityNameExpression: b7e + }), ve = Ms(), De = va(4, "undefined"); + De.declarations = []; + var Xe = va( + 1536, + "globalThis", + 8 + /* Readonly */ + ); + Xe.exports = ve, Xe.declarations = [], ve.set(Xe.escapedName, Xe); + var Ie = va(4, "arguments"), ye = va(4, "require"), Fe = F.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", Qe = !F.verbatimModuleSyntax, Ke, Be, at = 0, Wt, nr = 0, Kt = hJ({ + compilerOptions: F, + requireSymbol: ye, + argumentsSymbol: Ie, + globals: ve, + getSymbolOfDeclaration: xn, + error: We, + getRequiresScopeChangeCache: Kx, + setRequiresScopeChangeCache: Ih, + lookup: x_, + onPropertyWithInvalidInitializer: N6, + onFailedToResolveSymbol: $g, + onSuccessfullyResolvedSymbol: M0 + }), Pr = hJ({ + compilerOptions: F, + requireSymbol: ye, + argumentsSymbol: Ie, + globals: ve, + getSymbolOfDeclaration: xn, + error: We, + getRequiresScopeChangeCache: Kx, + setRequiresScopeChangeCache: Ih, + lookup: Oit + }); + const Vt = { + getNodeCount: () => Eu(e.getSourceFiles(), (r, a) => r + a.nodeCount, 0), + getIdentifierCount: () => Eu(e.getSourceFiles(), (r, a) => r + a.identifierCount, 0), + getSymbolCount: () => Eu(e.getSourceFiles(), (r, a) => r + a.symbolCount, d), + getTypeCount: () => u, + getInstantiationCount: () => g, + getRelationCacheSizes: () => ({ + assignable: lf.size, + identity: Tf.size, + subtype: og.size, + strictSubtype: qf.size + }), + isUndefinedSymbol: (r) => r === De, + isArgumentsSymbol: (r) => r === Ie, + isUnknownSymbol: (r) => r === nt, + getMergedSymbol: Ma, + symbolIsValue: t1, + getDiagnostics: D7e, + getGlobalDiagnostics: ilt, + getRecursionIdentity: GG, + getUnmatchedProperties: Hpe, + getTypeOfSymbolAtLocation: (r, a) => { + const l = Ki(a); + return l ? Xrt(r, l) : be; + }, + getTypeOfSymbol: Zr, + getSymbolsOfParameterPropertyDeclaration: (r, a) => { + const l = Ki(r, ji); + return l === void 0 ? E.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node.") : (E.assert(Q_(l, l.parent)), Gy(l, Ko(a))); + }, + getDeclaredTypeOfSymbol: mo, + getPropertiesOfType: Wa, + getPropertyOfType: (r, a) => js(r, Ko(a)), + getPrivateIdentifierPropertyOfType: (r, a, l) => { + const f = Ki(l); + if (!f) + return; + const m = Ko(a), y = SM(m, f); + return y ? D$(r, y) : void 0; + }, + getTypeOfPropertyOfType: (r, a) => Xc(r, Ko(a)), + getIndexInfoOfType: (r, a) => eh(r, a === 0 ? we : _e), + getIndexInfosOfType: Bu, + getIndexInfosOfIndexSymbol: zfe, + getSignaturesOfType: xs, + getIndexTypeOfType: (r, a) => Wv(r, a === 0 ? we : _e), + getIndexType: (r) => Dm(r), + getBaseTypes: un, + getBaseTypeOfLiteralType: Uh, + getWidenedType: W_, + getWidenedLiteralType: $v, + getTypeFromTypeNode: (r) => { + const a = Ki(r, ai); + return a ? xi(a) : be; + }, + getParameterType: qd, + getParameterIdentifierInfoAtPosition: Dst, + getPromisedTypeOfPromise: $8, + getAwaitedType: (r) => fT(r), + getReturnTypeOfSignature: Ha, + isNullableType: bM, + getNullableType: rM, + getNonNullableType: qh, + getNonOptionalType: YG, + getTypeArguments: Po, + typeToTypeNode: Ae.typeToTypeNode, + indexInfoToIndexSignatureDeclaration: Ae.indexInfoToIndexSignatureDeclaration, + signatureToSignatureDeclaration: Ae.signatureToSignatureDeclaration, + symbolToEntityName: Ae.symbolToEntityName, + symbolToExpression: Ae.symbolToExpression, + symbolToNode: Ae.symbolToNode, + symbolToTypeParameterDeclarations: Ae.symbolToTypeParameterDeclarations, + symbolToParameterDeclaration: Ae.symbolToParameterDeclaration, + typeParameterToDeclaration: Ae.typeParameterToDeclaration, + getSymbolsInScope: (r, a) => { + const l = Ki(r); + return l ? slt(l, a) : []; + }, + getSymbolAtLocation: (r) => { + const a = Ki(r); + return a ? kp( + a, + /*ignoreErrors*/ + !0 + ) : void 0; + }, + getIndexInfosAtLocation: (r) => { + const a = Ki(r); + return a ? plt(a) : void 0; + }, + getShorthandAssignmentValueSymbol: (r) => { + const a = Ki(r); + return a ? dlt(a) : void 0; + }, + getExportSpecifierLocalTargetSymbol: (r) => { + const a = Ki(r, pu); + return a ? mlt(a) : void 0; + }, + getExportSymbolOfSymbol(r) { + return Ma(r.exportSymbol || r); + }, + getTypeAtLocation: (r) => { + const a = Ki(r); + return a ? Lk(a) : be; + }, + getTypeOfAssignmentPattern: (r) => { + const a = Ki(r, YE); + return a && nX(a) || be; + }, + getPropertySymbolOfDestructuringAssignment: (r) => { + const a = Ki(r, Re); + return a ? glt(a) : void 0; + }, + signatureToString: (r, a, l, f) => km(r, Ki(a), l, f), + typeToString: (r, a, l) => Ur(r, Ki(a), l), + symbolToString: (r, a, l, f) => Si(r, Ki(a), l, f), + typePredicateToString: (r, a, l) => Mv(r, Ki(a), l), + writeSignature: (r, a, l, f, m) => km(r, Ki(a), l, f, m), + writeType: (r, a, l, f) => Ur(r, Ki(a), l, f), + writeSymbol: (r, a, l, f, m) => Si(r, Ki(a), l, f, m), + writeTypePredicate: (r, a, l, f) => Mv(r, Ki(a), l, f), + getAugmentedPropertiesOfType: Ome, + getRootSymbols: F7e, + getSymbolOfExpando: O$, + getContextualType: (r, a) => { + const l = Ki(r, ct); + if (l) + return a & 4 ? ci(l, () => o_(l, a)) : o_(l, a); + }, + getContextualTypeForObjectLiteralElement: (r) => { + const a = Ki(r, lh); + return a ? hde( + a, + /*contextFlags*/ + void 0 + ) : void 0; + }, + getContextualTypeForArgumentAtIndex: (r, a) => { + const l = Ki(r, lb); + return l && gde(l, a); + }, + getContextualTypeForJsxAttribute: (r) => { + const a = Ki(r, HI); + return a && e8e( + a, + /*contextFlags*/ + void 0 + ); + }, + isContextSensitive: Sp, + getTypeOfPropertyOfContextualType: Yv, + getFullyQualifiedName: Ky, + getResolvedSignature: (r, a, l) => Xt( + r, + a, + l, + 0 + /* Normal */ + ), + getCandidateSignaturesForStringLiteralCompletions: zt, + getResolvedSignatureForSignatureHelp: (r, a, l) => jr(r, () => Xt( + r, + a, + l, + 16 + /* IsForSignatureHelp */ + )), + getExpandedParameters: Hwe, + hasEffectiveRestParameter: yg, + containsArgumentsReference: jfe, + getConstantValue: (r) => { + const a = Ki(r, J7e); + return a ? Lme(a) : void 0; + }, + isValidPropertyAccess: (r, a) => { + const l = Ki(r, WY); + return !!l && Mit(l, Ko(a)); + }, + isValidPropertyAccessForCompletions: (r, a, l) => { + const f = Ki(r, Dn); + return !!f && A8e(f, a, l); + }, + getSignatureFromDeclaration: (r) => { + const a = Ki(r, ps); + return a ? Qf(a) : void 0; + }, + isImplementationOfOverload: (r) => { + const a = Ki(r, ps); + return a ? j7e(a) : void 0; + }, + getImmediateAliasedSymbol: S$, + getAliasedSymbol: Ec, + getEmitResolver: A6, + requiresAddingImplicitUndefined: aX, + getExportsOfModule: ok, + getExportsAndPropertiesOfModule: JS, + forEachExportAndPropertyOfModule: ck, + getSymbolWalker: _ne( + _Ke, + bp, + Ha, + un, + zd, + Zr, + df, + a_, + tf, + Po + ), + getAmbientModules: Fut, + getJsxIntrinsicTagNamesAt: git, + isOptionalParameter: (r) => { + const a = Ki(r, ji); + return a ? LL(a) : !1; + }, + tryGetMemberInModuleExports: (r, a) => zS(Ko(r), a), + tryGetMemberInModuleExportsAndProperties: (r, a) => WS(Ko(r), a), + tryFindAmbientModule: (r) => Mfe( + r, + /*withAugmentations*/ + !0 + ), + tryFindAmbientModuleWithoutAugmentations: (r) => Mfe( + r, + /*withAugmentations*/ + !1 + ), + getApparentType: ju, + getUnionType: Gn, + isTypeAssignableTo: Bs, + createAnonymousType: ie, + createSignature: Kg, + createSymbol: va, + createIndexInfo: mg, + getAnyType: () => Ne, + getStringType: () => we, + getStringLiteralType: D_, + getNumberType: () => _e, + getNumberLiteralType: pd, + getBigIntType: () => Te, + createPromiseType: IM, + createArrayType: cu, + getElementTypeOfArrayType: tM, + getBooleanType: () => br, + getFalseType: (r) => r ? dt : xt, + getTrueType: (r) => r ? wt : ir, + getVoidType: () => en, + getUndefinedType: () => Ut, + getNullType: () => he, + getESSymbolType: () => Lr, + getNeverType: () => fr, + getOptionalType: () => z, + getPromiseType: () => BL( + /*reportErrors*/ + !1 + ), + getPromiseLikeType: () => O3e( + /*reportErrors*/ + !1 + ), + getAsyncIterableType: () => { + const r = PG( + /*reportErrors*/ + !1 + ); + if (r !== ea) + return r; + }, + isSymbolAccessible: xm, + isArrayType: xp, + isTupleType: la, + isArrayLikeType: Y0, + isEmptyAnonymousObjectType: hg, + isTypeInvalidDueToUnionDiscriminant: HZe, + getExactOptionalProperties: ktt, + getAllPossiblePropertiesOfTypes: GZe, + getSuggestedSymbolForNonexistentProperty: Ode, + getSuggestedSymbolForNonexistentJSXAttribute: E8e, + getSuggestedSymbolForNonexistentSymbol: (r, a, l) => P8e(r, Ko(a), l), + getSuggestedSymbolForNonexistentModule: Fde, + getSuggestedSymbolForNonexistentClassMember: C8e, + getBaseConstraintOfType: Hl, + getDefaultFromTypeParameter: (r) => r && r.flags & 262144 ? GS(r) : void 0, + resolveName(r, a, l, f) { + return Kt( + a, + Ko(r), + l, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1, + f + ); + }, + getJsxNamespace: (r) => Pi(DS(r)), + getJsxFragmentFactory: (r) => { + const a = Rme(r); + return a && Pi(tf(a).escapedText); + }, + getAccessibleSymbolChain: Ui, + getTypePredicateOfSignature: bp, + resolveExternalModuleName: (r) => { + const a = Ki(r, ct); + return a && Ru( + a, + a, + /*ignoreErrors*/ + !0 + ); + }, + resolveExternalModuleSymbol: M_, + tryGetThisTypeAt: (r, a, l) => { + const f = Ki(r); + return f && pde(f, a, l); + }, + getTypeArgumentConstraint: (r) => { + const a = Ki(r, ai); + return a && Uat(a); + }, + getSuggestionDiagnostics: (r, a) => { + const l = Ki(r, yi) || E.fail("Could not determine parsed source file."); + if (B4(l, F, e)) + return He; + let f; + try { + return i = a, Ame(l), E.assert(!!(bn(l).flags & 1)), f = Bn(f, ES.getDiagnostics(l.fileName)), qIe(E7e(l), (m, y, x) => { + !tC(m) && !C7e(y, !!(m.flags & 33554432)) && (f || (f = [])).push({ + ...x, + category: 2 + /* Suggestion */ + }); + }), f || He; + } finally { + i = void 0; + } + }, + runWithCancellationToken: (r, a) => { + try { + return i = r, a(Vt); + } finally { + i = void 0; + } + }, + getLocalTypeParametersOfClassOrInterfaceOrTypeAlias: U0, + isDeclarationVisible: jh, + isPropertyAccessible: Mde, + getTypeOnlyAliasDeclaration: ud, + getMemberOverrideModifierStatus: xct, + isTypeParameterPossiblyReferenced: HL, + typeHasCallOrConstructSignatures: iX, + getSymbolFlags: n_ + }; + function zt(r, a) { + const l = /* @__PURE__ */ new Set(), f = []; + ci(a, () => Xt( + r, + f, + /*argumentCount*/ + void 0, + 0 + /* Normal */ + )); + for (const m of f) + l.add(m); + f.length = 0, jr(a, () => Xt( + r, + f, + /*argumentCount*/ + void 0, + 0 + /* Normal */ + )); + for (const m of f) + l.add(m); + return ts(l); + } + function jr(r, a) { + if (r = sr(r, Tj), r) { + const l = [], f = []; + for (; r; ) { + const y = bn(r); + if (l.push([y, y.resolvedSignature]), y.resolvedSignature = void 0, Sy(r)) { + const x = Ni(xn(r)), I = x.type; + f.push([x, I]), x.type = void 0; + } + r = sr(r.parent, Tj); + } + const m = a(); + for (const [y, x] of l) + y.resolvedSignature = x; + for (const [y, x] of f) + y.type = x; + return m; + } + return a(); + } + function ci(r, a) { + const l = sr(r, lb); + if (l) { + let m = r; + do + bn(m).skipDirectInference = !0, m = m.parent; + while (m && m !== l); + } + P = !0; + const f = jr(r, a); + if (P = !1, l) { + let m = r; + do + bn(m).skipDirectInference = void 0, m = m.parent; + while (m && m !== l); + } + return f; + } + function Xt(r, a, l, f) { + const m = Ki(r, lb); + Ke = l; + const y = m ? lE(m, a, f) : void 0; + return Ke = void 0, y; + } + var Ai = /* @__PURE__ */ new Map(), _s = /* @__PURE__ */ new Map(), $n = /* @__PURE__ */ new Map(), os = /* @__PURE__ */ new Map(), wr = /* @__PURE__ */ new Map(), Ss = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Map(), vr = /* @__PURE__ */ new Map(), ln = /* @__PURE__ */ new Map(), Zn = /* @__PURE__ */ new Map(), ri = /* @__PURE__ */ new Map(), mi = /* @__PURE__ */ new Map(), Ps = /* @__PURE__ */ new Map(), ws = /* @__PURE__ */ new Map(), Yt = [], Ca = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Set(), nt = va(4, "unknown"), te = va( + 0, + "__resolving__" + /* Resolving */ + ), rt = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Set(), Ne = $c(1, "any"), et = $c(1, "any", 262144, "auto"), lt = $c( + 1, + "any", + /*objectFlags*/ + void 0, + "wildcard" + ), jt = $c( + 1, + "any", + /*objectFlags*/ + void 0, + "blocked string" + ), be = $c(1, "error"), ft = $c(1, "unresolved"), bt = $c(1, "any", 65536, "non-inferrable"), kt = $c(1, "intrinsic"), yt = $c(2, "unknown"), Ut = $c(32768, "undefined"), W = K ? Ut : $c(32768, "undefined", 65536, "widening"), je = $c( + 32768, + "undefined", + /*objectFlags*/ + void 0, + "missing" + ), st = H ? je : Ut, z = $c( + 32768, + "undefined", + /*objectFlags*/ + void 0, + "optional" + ), he = $c(65536, "null"), q = K ? he : $c(65536, "null", 65536, "widening"), we = $c(4, "string"), _e = $c(8, "number"), Te = $c(64, "bigint"), dt = $c( + 512, + "false", + /*objectFlags*/ + void 0, + "fresh" + ), xt = $c(512, "false"), wt = $c( + 512, + "true", + /*objectFlags*/ + void 0, + "fresh" + ), ir = $c(512, "true"); + wt.regularType = ir, wt.freshType = wt, ir.regularType = ir, ir.freshType = wt, dt.regularType = xt, dt.freshType = dt, xt.regularType = xt, xt.freshType = dt; + var br = Gn([xt, ir]), Lr = $c(4096, "symbol"), en = $c(16384, "void"), fr = $c(131072, "never"), mn = $c(131072, "never", 262144, "silent"), Di = $c( + 131072, + "never", + /*objectFlags*/ + void 0, + "implicit" + ), Fi = $c( + 131072, + "never", + /*objectFlags*/ + void 0, + "unreachable" + ), ur = $c(67108864, "object"), Mr = Gn([we, _e]), Or = Gn([we, _e, Lr]), tn = Gn([_e, Te]), qt = Gn([we, _e, br, Te, he, Ut]), ma = XS(["", ""], [_e]), $a = qL((r) => r.flags & 262144 ? Qet(r) : r, () => "(restrictive mapper)"), Ro = qL((r) => r.flags & 262144 ? lt : r, () => "(permissive mapper)"), Vo = $c( + 131072, + "never", + /*objectFlags*/ + void 0, + "unique literal" + ), hs = qL((r) => r.flags & 262144 ? Vo : r, () => "(unique literal mapper)"), ga, Co = qL((r) => (ga && (r === lc || r === Fu || r === Lu) && ga( + /*onlyUnreliable*/ + !0 + ), r), () => "(unmeasurable reporter)"), Li = qL((r) => (ga && (r === lc || r === Fu || r === Lu) && ga( + /*onlyUnreliable*/ + !1 + ), r), () => "(unreliable reporter)"), bi = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ), wl = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ); + wl.objectFlags |= 2048; + var jo = va( + 2048, + "__type" + /* Type */ + ); + jo.members = Ms(); + var Su = ie(jo, O, He, He, He), fc = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ), ql = K ? Gn([Ut, he, fc]) : yt, ea = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ); + ea.instantiations = /* @__PURE__ */ new Map(); + var wo = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ); + wo.objectFlags |= 262144; + var Ka = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ), Fa = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ), Bt = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + ), lc = ff(), Fu = ff(); + Fu.constraint = lc; + var Lu = ff(), y_ = ff(), Ao = ff(); + Ao.constraint = y_; + var Uo = g8(1, "<>", 0, Ne), A = Kg( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + Ne, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), Me = Kg( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + be, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), it = Kg( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + Ne, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), Ot = Kg( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + mn, + /*resolvedTypePredicate*/ + void 0, + 0, + 0 + /* None */ + ), kr = mg( + _e, + we, + /*isReadonly*/ + !0 + ), qn = /* @__PURE__ */ new Map(), Ht = { + get yieldType() { + return E.fail("Not supported"); + }, + get returnType() { + return E.fail("Not supported"); + }, + get nextType() { + return E.fail("Not supported"); + } + }, yn = ey(Ne, Ne, Ne), li = ey(Ne, Ne, yt), _i = ey(fr, Ne, Ut), eo = { + iterableCacheKey: "iterationTypesOfAsyncIterable", + iteratorCacheKey: "iterationTypesOfAsyncIterator", + iteratorSymbolName: "asyncIterator", + getGlobalIteratorType: PKe, + getGlobalIterableType: PG, + getGlobalIterableIteratorType: wKe, + getGlobalGeneratorType: AKe, + resolveIterationType: (r, a) => fT(r, a, p.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member), + mustHaveANextMethodDiagnostic: p.An_async_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: p.The_0_property_of_an_async_iterator_must_be_a_method, + mustHaveAValueDiagnostic: p.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property + }, qo = { + iterableCacheKey: "iterationTypesOfIterable", + iteratorCacheKey: "iterationTypesOfIterator", + iteratorSymbolName: "iterator", + getGlobalIteratorType: NKe, + getGlobalIterableType: Yfe, + getGlobalIterableIteratorType: IKe, + getGlobalGeneratorType: OKe, + resolveIterationType: (r, a) => r, + mustHaveANextMethodDiagnostic: p.An_iterator_must_have_a_next_method, + mustBeAMethodDiagnostic: p.The_0_property_of_an_iterator_must_be_a_method, + mustHaveAValueDiagnostic: p.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property + }, ol, vo = /* @__PURE__ */ new Map(), cl, Eo, gl, Cl, kc, F_, Jf, Pe, Ct, Jr, Vi, ha, Pa, vc, Do, to, pc, Cc, bf, Id, zf, v_, pp, Wf, tg, rg, b_, Gc, ng, L_, bm, Vf, Y, tt, Pt, It, hr, zr, Cn, ei, M, ke, vt, Nr, ui, ds, Qi, ys, wa, ya, tc, dp, rd, ig, Ug, w0, qg, Uf = /* @__PURE__ */ new Map(), cf = 0, za = 0, t_ = 0, S_ = !1, Od = 0, A0, N0, zp, jy = [], I0 = [], nd = [], Hg = 0, wh = [], Sf = [], sg = 0, Oe = D_(""), Ue = pd(0), Tt = OG({ negative: !1, base10Value: "0" }), Lt = [], lr = [], Gr = [], _r = 0, _n = !1, gi = 0, nn = 10, ii = [], Vr = [], Yi = [], ca = [], El = [], Tu = [], mp = [], By = [], Wp = [], Zx = [], P6 = [], Kb = [], e2 = [], Jy = [], Tv = [], CS = [], zy = [], xv = [], t2 = [], ag = 0, La = b4(), ES = b4(), w6 = _d(), Ah, O0, og = /* @__PURE__ */ new Map(), qf = /* @__PURE__ */ new Map(), lf = /* @__PURE__ */ new Map(), r_ = /* @__PURE__ */ new Map(), Tf = /* @__PURE__ */ new Map(), Gg = /* @__PURE__ */ new Map(), gP = [ + [".mts", ".mjs"], + [".ts", ".js"], + [".cts", ".cjs"], + [".mjs", ".mjs"], + [".js", ".js"], + [".cjs", ".cjs"], + [".tsx", F.jsx === 1 ? ".jsx" : ".js"], + [".jsx", ".jsx"], + [".json", ".json"] + ]; + return Hlt(), Vt; + function F0(r) { + return r ? ws.get(r) : void 0; + } + function Wy(r, a) { + return r && ws.set(r, a), a; + } + function DS(r) { + if (r) { + const a = xr(r); + if (a) + if (cS(r)) { + if (a.localJsxFragmentNamespace) + return a.localJsxFragmentNamespace; + const l = a.pragmas.get("jsxfrag"); + if (l) { + const m = ss(l) ? l[0] : l; + if (a.localJsxFragmentFactory = Ex(m.arguments.factory, V), Ge(a.localJsxFragmentFactory, kv, l_), a.localJsxFragmentFactory) + return a.localJsxFragmentNamespace = tf(a.localJsxFragmentFactory).escapedText; + } + const f = Rme(r); + if (f) + return a.localJsxFragmentFactory = f, a.localJsxFragmentNamespace = tf(f).escapedText; + } else { + const l = PS(a); + if (l) + return a.localJsxNamespace = l; + } + } + return Ah || (Ah = "React", F.jsxFactory ? (O0 = Ex(F.jsxFactory, V), Ge(O0, kv), O0 && (Ah = tf(O0).escapedText)) : F.reactNamespace && (Ah = Ko(F.reactNamespace))), O0 || (O0 = N.createQualifiedName(N.createIdentifier(Pi(Ah)), "createElement")), Ah; + } + function PS(r) { + if (r.localJsxNamespace) + return r.localJsxNamespace; + const a = r.pragmas.get("jsx"); + if (a) { + const l = ss(a) ? a[0] : a; + if (r.localJsxFactory = Ex(l.arguments.factory, V), Ge(r.localJsxFactory, kv, l_), r.localJsxFactory) + return r.localJsxNamespace = tf(r.localJsxFactory).escapedText; + } + } + function kv(r) { + return om(r, -1, -1), gr( + r, + kv, + /*context*/ + void 0 + ); + } + function A6(r, a, l) { + return l || D7e(r, a), le; + } + function Al(r, a, ...l) { + const f = r ? Xr(r, a, ...l) : zo(a, ...l), m = La.lookup(f); + return m || (La.add(f), f); + } + function Fd(r, a, l, ...f) { + const m = We(a, l, ...f); + return m.skippedOn = r, m; + } + function r2(r, a, ...l) { + return r ? Xr(r, a, ...l) : zo(a, ...l); + } + function We(r, a, ...l) { + const f = r2(r, a, ...l); + return La.add(f), f; + } + function Vy(r, a) { + r ? La.add(a) : ES.add({ + ...a, + category: 2 + /* Suggestion */ + }); + } + function ll(r, a, l, ...f) { + if (a.pos < 0 || a.end < 0) { + if (!r) + return; + const m = xr(a); + Vy(r, "message" in l ? xl(m, 0, 0, l, ...f) : Hj(m, l)); + return; + } + Vy(r, "message" in l ? Xr(a, l, ...f) : wg(xr(a), a, l)); + } + function id(r, a, l, ...f) { + const m = We(r, l, ...f); + if (a) { + const y = Xr(r, p.Did_you_forget_to_use_await); + Fs(m, y); + } + return m; + } + function T_(r, a) { + const l = Array.isArray(r) ? rr(r, lj) : lj(r); + return l && Fs( + a, + Xr(l, p.The_declaration_was_marked_as_deprecated_here) + ), ES.add(a), a; + } + function Uy(r) { + const a = s_(r); + return a && Dr(r.declarations) > 1 ? a.flags & 64 ? ut(r.declarations, Vp) : Ri(r.declarations, Vp) : !!r.valueDeclaration && Vp(r.valueDeclaration) || Dr(r.declarations) && Ri(r.declarations, Vp); + } + function Vp(r) { + return !!(P2(r) & 536870912); + } + function Hf(r, a, l) { + const f = Xr(r, p._0_is_deprecated, l); + return T_(a, f); + } + function qy(r, a, l, f) { + const m = l ? Xr(r, p.The_signature_0_of_1_is_deprecated, f, l) : Xr(r, p._0_is_deprecated, f); + return T_(a, m); + } + function va(r, a, l) { + d++; + const f = new o(r | 33554432, a); + return f.links = new H1e(), f.links.checkFlags = l || 0, f; + } + function Sm(r, a) { + const l = va(1, r); + return l.links.type = a, l; + } + function wS(r, a) { + const l = va(4, r); + return l.links.type = a, l; + } + function n2(r) { + let a = 0; + return r & 2 && (a |= 111551), r & 1 && (a |= 111550), r & 4 && (a |= 0), r & 8 && (a |= 900095), r & 16 && (a |= 110991), r & 32 && (a |= 899503), r & 64 && (a |= 788872), r & 256 && (a |= 899327), r & 128 && (a |= 899967), r & 512 && (a |= 110735), r & 8192 && (a |= 103359), r & 32768 && (a |= 46015), r & 65536 && (a |= 78783), r & 262144 && (a |= 526824), r & 524288 && (a |= 788968), r & 2097152 && (a |= 2097152), a; + } + function AS(r, a) { + a.mergeId || (a.mergeId = U1e, U1e++), ii[a.mergeId] = r; + } + function NS(r) { + const a = va(r.flags, r.escapedName); + return a.declarations = r.declarations ? r.declarations.slice() : [], a.parent = r.parent, r.valueDeclaration && (a.valueDeclaration = r.valueDeclaration), r.constEnumOnlyModule && (a.constEnumOnlyModule = !0), r.members && (a.members = new Map(r.members)), r.exports && (a.exports = new Map(r.exports)), AS(a, r), a; + } + function Nh(r, a, l = !1) { + if (!(r.flags & n2(a.flags)) || (a.flags | r.flags) & 67108864) { + if (a === r) + return r; + if (!(r.flags & 33554432)) { + const y = bc(r); + if (y === nt) + return a; + if (!(y.flags & n2(a.flags)) || (a.flags | y.flags) & 67108864) + r = NS(y); + else + return f(r, a), a; + } + a.flags & 512 && r.flags & 512 && r.constEnumOnlyModule && !a.constEnumOnlyModule && (r.constEnumOnlyModule = !1), r.flags |= a.flags, a.valueDeclaration && p3(r, a.valueDeclaration), Bn(r.declarations, a.declarations), a.members && (r.members || (r.members = Ms()), sd(r.members, a.members, l)), a.exports && (r.exports || (r.exports = Ms()), sd(r.exports, a.exports, l)), l || AS(r, a); + } else r.flags & 1024 ? r !== Xe && We( + a.declarations && es(a.declarations[0]), + p.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, + Si(r) + ) : f(r, a); + return r; + function f(y, x) { + const I = !!(y.flags & 384 || x.flags & 384), R = !!(y.flags & 2 || x.flags & 2), J = I ? p.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : R ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0, ee = x.declarations && xr(x.declarations[0]), Se = y.declarations && xr(y.declarations[0]), me = t4(ee, F.checkJs), Ve = t4(Se, F.checkJs), mt = Si(x); + if (ee && Se && ol && !I && ee !== Se) { + const ht = oh(ee.path, Se.path) === -1 ? ee : Se, er = ht === ee ? Se : ee, tr = bE(ol, `${ht.path}|${er.path}`, () => ({ firstFile: ht, secondFile: er, conflictingSymbols: /* @__PURE__ */ new Map() })), Rr = bE(tr.conflictingSymbols, mt, () => ({ isBlockScoped: R, firstFileLocations: [], secondFileLocations: [] })); + me || m(Rr.firstFileLocations, x), Ve || m(Rr.secondFileLocations, y); + } else + me || Hy(x, J, mt, y), Ve || Hy(y, J, mt, x); + } + function m(y, x) { + if (x.declarations) + for (const I of x.declarations) + Zf(y, I); + } + } + function Hy(r, a, l, f) { + rr(r.declarations, (m) => { + i2(m, a, l, f.declarations); + }); + } + function i2(r, a, l, f) { + const m = (U1( + r, + /*isPrototypeAssignment*/ + !1 + ) ? eB(r) : es(r)) || r, y = Al(m, a, l); + for (const x of f || He) { + const I = (U1( + x, + /*isPrototypeAssignment*/ + !1 + ) ? eB(x) : es(x)) || x; + if (I === m) continue; + y.relatedInformation = y.relatedInformation || []; + const R = Xr(I, p._0_was_also_declared_here, l), J = Xr(I, p.and_here); + Dr(y.relatedInformation) >= 5 || ut( + y.relatedInformation, + (ee) => N4(ee, J) === 0 || N4(ee, R) === 0 + /* EqualTo */ + ) || Fs(y, Dr(y.relatedInformation) ? J : R); + } + } + function Cv(r, a) { + if (!r?.size) return a; + if (!a?.size) return r; + const l = Ms(); + return sd(l, r), sd(l, a), l; + } + function sd(r, a, l = !1) { + a.forEach((f, m) => { + const y = r.get(m); + r.set(m, y ? Nh(y, f, l) : Ma(f)); + }); + } + function xf(r) { + var a, l, f; + const m = r.parent; + if (((a = m.symbol.declarations) == null ? void 0 : a[0]) !== m) { + E.assert(m.symbol.declarations.length > 1); + return; + } + if (Zd(m)) + sd(ve, m.symbol.exports); + else { + const y = r.parent.parent.flags & 33554432 ? void 0 : p.Invalid_module_name_in_augmentation_module_0_cannot_be_found; + let x = sk( + r, + r, + y, + /*isForAugmentation*/ + !0 + ); + if (!x) + return; + if (x = M_(x), x.flags & 1920) + if (ut(Eo, (I) => x === I.symbol)) { + const I = Nh( + m.symbol, + x, + /*unidirectional*/ + !0 + ); + gl || (gl = /* @__PURE__ */ new Map()), gl.set(r.text, I); + } else { + if ((l = x.exports) != null && l.get( + "__export" + /* ExportStar */ + ) && ((f = m.symbol.exports) != null && f.size)) { + const I = bfe( + x, + "resolvedExports" + /* resolvedExports */ + ); + for (const [R, J] of ts(m.symbol.exports.entries())) + I.has(R) && !x.exports.has(R) && Nh(I.get(R), J); + } + Nh(x, m.symbol); + } + else + We(r, p.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, r.text); + } + } + function L0() { + const r = De.escapedName, a = ve.get(r); + a ? rr(a.declarations, (l) => { + tx(l) || La.add(Xr(l, p.Declaration_name_conflicts_with_built_in_global_identifier_0, Pi(r))); + }) : ve.set(r, De); + } + function Ni(r) { + if (r.flags & 33554432) return r.links; + const a = $s(r); + return Vr[a] ?? (Vr[a] = new H1e()); + } + function bn(r) { + const a = ja(r); + return Yi[a] || (Yi[a] = new uMe()); + } + function x_(r, a, l) { + if (l) { + const f = Ma(r.get(a)); + if (f && (f.flags & l || f.flags & 2097152 && n_(f) & l)) + return f; + } + } + function Gy(r, a) { + const l = r.parent, f = r.parent.parent, m = x_( + l.locals, + a, + 111551 + /* Value */ + ), y = x_( + _1(f.symbol), + a, + 111551 + /* Value */ + ); + return m && y ? [m, y] : E.fail("There should exist two symbols, one as property declaration and one as parameter declaration"); + } + function cg(r, a) { + const l = xr(r), f = xr(a), m = bd(r); + if (l !== f) { + if (L && (l.externalModuleIndicator || f.externalModuleIndicator) || !F.outFile || VT(a) || r.flags & 33554432 || x(a, r)) + return !0; + const R = e.getSourceFiles(); + return R.indexOf(l) <= R.indexOf(f); + } + if (a.flags & 16777216 || VT(a) || Kpe(a)) + return !0; + if (r.pos <= a.pos && !(rs(r) && Kw(a.parent) && !r.initializer && !r.exclamationToken)) { + if (r.kind === 208) { + const R = $1( + a, + 208 + /* BindingElement */ + ); + return R ? sr(R, da) !== sr(r, da) || r.pos < R.pos : cg($1( + r, + 260 + /* VariableDeclaration */ + ), a); + } else { + if (r.kind === 260) + return !y(r, a); + if (Qn(r)) { + const R = sr(a, (J) => J === r ? "quit" : oa(J) ? J.parent.parent === r : !$ && dl(J) && (J.parent === r || hc(J.parent) && J.parent.parent === r || Pw(J.parent) && J.parent.parent === r || rs(J.parent) && J.parent.parent === r || ji(J.parent) && J.parent.parent.parent === r)); + return R ? !$ && dl(R) ? !!sr(a, (J) => J === R ? "quit" : ps(J) && !db(J)) : !1 : !0; + } else { + if (rs(r)) + return !I( + r, + a, + /*stopAtAnyPropertyDeclaration*/ + !1 + ); + if (Q_(r, r.parent)) + return !(G && Nl(r) === Nl(a) && x(a, r)); + } + } + return !0; + } + if (a.parent.kind === 281 || a.parent.kind === 277 && a.parent.isExportEquals || a.kind === 277 && a.isExportEquals) + return !0; + if (x(a, r)) + return G && Nl(r) && (rs(r) || Q_(r, r.parent)) ? !I( + r, + a, + /*stopAtAnyPropertyDeclaration*/ + !0 + ) : !0; + return !1; + function y(R, J) { + switch (R.parent.parent.kind) { + case 243: + case 248: + case 250: + if (iu(J, R, m)) + return !0; + break; + } + const ee = R.parent.parent; + return V2(ee) && iu(J, ee.expression, m); + } + function x(R, J) { + return !!sr(R, (ee) => { + if (ee === m) + return "quit"; + if (ps(ee)) + return !0; + if (ac(ee)) + return J.pos < R.pos; + const Se = Jn(ee.parent, rs); + if (Se && Se.initializer === ee) { + if (Os(ee.parent)) { + if (J.kind === 174) + return !0; + if (rs(J) && Nl(R) === Nl(J)) { + const Ve = J.name; + if (Re(Ve) || wi(Ve)) { + const mt = Zr(xn(J)), ht = Ln(J.parent.members, ac); + if (wct(Ve, mt, ht, J.parent.pos, ee.pos)) + return !0; + } + } + } else if (!(J.kind === 172 && !Os(J)) || Nl(R) !== Nl(J)) + return !0; + } + return !1; + }); + } + function I(R, J, ee) { + return J.end > R.end ? !1 : sr(J, (me) => { + if (me === R) + return "quit"; + switch (me.kind) { + case 219: + return !0; + case 172: + return ee && (rs(R) && me.parent === R.parent || Q_(R, R.parent) && me.parent === R.parent.parent) ? "quit" : !0; + case 241: + switch (me.parent.kind) { + case 177: + case 174: + case 178: + return !0; + default: + return !1; + } + default: + return !1; + } + }) === void 0; + } + } + function Kx(r) { + return bn(r).declarationRequiresScopeChange; + } + function Ih(r, a) { + bn(r).declarationRequiresScopeChange = a; + } + function N6(r, a, l, f) { + return G ? !1 : (r && !f && IS(r, a, a) || We( + r, + r && l.type && Sw(l.type, r.pos) ? p.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : p.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, + ao(l.name), + ad(a) + ), !0); + } + function $g(r, a, l, f) { + const m = Gi(a) ? a : a.escapedText; + n(() => { + if (!r || r.parent.kind !== 324 && !IS(r, m, a) && !$y(r) && !bo(r, m, l) && !OS(r, m) && !I6(r, m, l) && !FS(r, m, l) && !Oh(r, m, l)) { + let y, x; + if (a && (x = Nit(a), x && We(r, f, ad(a), x)), !x && gi < nn && (y = P8e(r, m, l), y?.valueDeclaration && wu(y.valueDeclaration) && Zd(y.valueDeclaration) && (y = void 0), y)) { + const R = Si(y), J = Nde( + r, + y, + /*excludeClasses*/ + !1 + ), ee = l === 1920 || a && typeof a != "string" && oo(a) ? p.Cannot_find_namespace_0_Did_you_mean_1 : J ? p.Could_not_find_name_0_Did_you_mean_1 : p.Cannot_find_name_0_Did_you_mean_1, Se = r2(r, ee, ad(a), R); + Se.canonicalHead = CZ(f, ad(a)), Vy(!J, Se), y.valueDeclaration && Fs( + Se, + Xr(y.valueDeclaration, p._0_is_declared_here, R) + ); + } + !y && !x && a && We(r, f, ad(a)), gi++; + } + }); + } + function M0(r, a, l, f, m, y) { + n(() => { + var x; + const I = a.escapedName, R = f && yi(f) && A_(f); + if (r && (l & 2 || (l & 32 || l & 384) && (l & 111551) === 111551)) { + const J = R_(a); + (J.flags & 2 || J.flags & 32 || J.flags & 384) && hn(J, r); + } + if (R && (l & 111551) === 111551 && !(r.flags & 16777216)) { + const J = Ma(a); + Dr(J.declarations) && Ri(J.declarations, (ee) => aA(ee) || yi(ee) && !!ee.symbol.globalExports) && ll(!F.allowUmdGlobalAccess, r, p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, Pi(I)); + } + if (m && !y && (l & 111551) === 111551) { + const J = Ma(gG(a)), ee = nm(m); + J === xn(m) ? We(r, p.Parameter_0_cannot_reference_itself, ao(m.name)) : J.valueDeclaration && J.valueDeclaration.pos > m.pos && ee.parent.locals && x_(ee.parent.locals, J.escapedName, l) === J && We(r, p.Parameter_0_cannot_reference_identifier_1_declared_after_it, ao(m.name), ao(r)); + } + if (r && l & 111551 && a.flags & 2097152 && !(a.flags & 111551) && !Y1(r)) { + const J = ud( + a, + 111551 + /* Value */ + ); + if (J) { + const ee = J.kind === 281 || J.kind === 278 || J.kind === 280 ? p._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type, Se = Pi(I); + Tm( + We(r, ee, Se), + J, + Se + ); + } + } + if (F.isolatedModules && a && R && (l & 111551) === 111551) { + const ee = x_(ve, I, l) === a && yi(f) && f.locals && x_( + f.locals, + I, + -111552 + /* Value */ + ); + if (ee) { + const Se = (x = ee.declarations) == null ? void 0 : x.find( + (me) => me.kind === 276 || me.kind === 273 || me.kind === 274 || me.kind === 271 + /* ImportEqualsDeclaration */ + ); + Se && !$E(Se) && We(Se, p.Import_0_conflicts_with_global_value_used_in_this_file_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, Pi(I)); + } + } + }); + } + function Tm(r, a, l) { + return a ? Fs( + r, + Xr( + a, + a.kind === 281 || a.kind === 278 || a.kind === 280 ? p._0_was_exported_here : p._0_was_imported_here, + l + ) + ) : r; + } + function ad(r) { + return Gi(r) ? Pi(r) : ao(r); + } + function IS(r, a, l) { + if (!Re(r) || r.escapedText !== a || P7e(r) || VT(r)) + return !1; + const f = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + let m = f; + for (; m; ) { + if (Qn(m.parent)) { + const y = xn(m.parent); + if (!y) + break; + const x = Zr(y); + if (js(x, a)) + return We(r, p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, ad(l), Si(y)), !0; + if (m === f && !Os(m)) { + const I = mo(y).thisType; + if (js(I, a)) + return We(r, p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, ad(l)), !0; + } + } + m = m.parent; + } + return !1; + } + function $y(r) { + const a = s2(r); + return a && No( + a, + 64, + /*ignoreErrors*/ + !0 + ) ? (We(r, p.Cannot_extend_an_interface_0_Did_you_mean_implements, sc(a)), !0) : !1; + } + function s2(r) { + switch (r.kind) { + case 80: + case 211: + return r.parent ? s2(r.parent) : void 0; + case 233: + if (fo(r.expression)) + return r.expression; + default: + return; + } + } + function bo(r, a, l) { + const f = 1920 | (Qr(r) ? 111551 : 0); + if (l === f) { + const m = bc(Kt( + r, + a, + 788968 & ~f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), y = r.parent; + if (m) { + if ($u(y)) { + E.assert(y.left === r, "Should only be resolving left side of qualified name as a namespace"); + const x = y.right.escapedText; + if (js(mo(m), x)) + return We( + y, + p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, + Pi(a), + Pi(x) + ), !0; + } + return We(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, Pi(a)), !0; + } + } + return !1; + } + function Oh(r, a, l) { + if (l & 788584) { + const f = bc(Kt( + r, + a, + 111127, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )); + if (f && !(f.flags & 1920)) + return We(r, p._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, Pi(a)), !0; + } + return !1; + } + function ek(r) { + return r === "any" || r === "string" || r === "number" || r === "boolean" || r === "never" || r === "unknown"; + } + function OS(r, a) { + return ek(a) && r.parent.kind === 281 ? (We(r, p.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, a), !0) : !1; + } + function FS(r, a, l) { + if (l & 111551) { + if (ek(a)) { + const y = r.parent.parent; + if (y && y.parent && nf(y)) { + const x = y.token, I = y.parent.kind; + I === 264 && x === 96 ? We(r, p.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, Pi(a)) : I === 263 && x === 96 ? We(r, p.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, Pi(a)) : I === 263 && x === 119 && We(r, p.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, Pi(a)); + } else + We(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, Pi(a)); + return !0; + } + const f = bc(Kt( + r, + a, + 788544, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), m = f && n_(f); + if (f && m !== void 0 && !(m & 111551)) { + const y = Pi(a); + return hP(a) ? We(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later, y) : tk(r, f) ? We(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, y, y === "K" ? "P" : "K") : We(r, p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, y), !0; + } + } + return !1; + } + function tk(r, a) { + const l = sr(r.parent, (f) => oa(f) || I_(f) ? !1 : Xu(f) || "quit"); + if (l && l.members.length === 1) { + const f = mo(a); + return !!(f.flags & 1048576) && q8( + f, + 384, + /*strict*/ + !0 + ); + } + return !1; + } + function hP(r) { + switch (r) { + case "Promise": + case "Symbol": + case "Map": + case "WeakMap": + case "Set": + case "WeakSet": + return !0; + } + return !1; + } + function I6(r, a, l) { + if (l & 111127) { + if (bc(Kt( + r, + a, + 1024, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ))) + return We( + r, + p.Cannot_use_namespace_0_as_a_value, + Pi(a) + ), !0; + } else if (l & 788544 && bc(Kt( + r, + a, + 1536, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ))) + return We(r, p.Cannot_use_namespace_0_as_a_type, Pi(a)), !0; + return !1; + } + function hn(r, a) { + var l; + if (E.assert(!!(r.flags & 2 || r.flags & 32 || r.flags & 384)), r.flags & 67108881 && r.flags & 32) + return; + const f = (l = r.declarations) == null ? void 0 : l.find( + (m) => Mj(m) || Qn(m) || m.kind === 266 + /* EnumDeclaration */ + ); + if (f === void 0) return E.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); + if (!(f.flags & 33554432) && !cg(f, a)) { + let m; + const y = ao(es(f)); + r.flags & 2 ? m = We(a, p.Block_scoped_variable_0_used_before_its_declaration, y) : r.flags & 32 ? m = We(a, p.Class_0_used_before_its_declaration, y) : r.flags & 256 ? m = We(a, p.Enum_0_used_before_its_declaration, y) : (E.assert(!!(r.flags & 128)), ap(F) && (m = We(a, p.Enum_0_used_before_its_declaration, y))), m && Fs(m, Xr(f, p._0_is_declared_here, y)); + } + } + function iu(r, a, l) { + return !!a && !!sr(r, (f) => f === a || (f === l || ps(f) && (!db(f) || jc(f) & 3) ? "quit" : !1)); + } + function ns(r) { + switch (r.kind) { + case 271: + return r; + case 273: + return r.parent; + case 274: + return r.parent.parent; + case 276: + return r.parent.parent.parent; + default: + return; + } + } + function k_(r) { + return r.declarations && eb(r.declarations, Ev); + } + function Ev(r) { + return r.kind === 271 || r.kind === 270 || r.kind === 273 && !!r.name || r.kind === 274 || r.kind === 280 || r.kind === 276 || r.kind === 281 || r.kind === 277 && pC(r) || cn(r) && mc(r) === 2 && pC(r) || go(r) && cn(r.parent) && r.parent.left === r && r.parent.operatorToken.kind === 64 && Xy(r.parent.right) || r.kind === 304 || r.kind === 303 && Xy(r.initializer) || r.kind === 260 && mb(r) || r.kind === 208 && mb(r.parent.parent); + } + function Xy(r) { + return S3(r) || po(r) && Im(r); + } + function sn(r, a) { + const l = Yy(r); + if (l) { + const m = xC(l.expression).arguments[0]; + return Re(l.name) ? bc(js(f3e(m), l.name.escapedText)) : void 0; + } + if (ti(r) || r.moduleReference.kind === 283) { + const m = Ru( + r, + Kj(r) || o4(r) + ), y = M_(m); + return i_( + r, + m, + y, + /*overwriteEmpty*/ + !1 + ), y; + } + const f = ik(r.moduleReference, a); + return O6(r, f), f; + } + function O6(r, a) { + if (i_( + r, + /*immediateTarget*/ + void 0, + a, + /*overwriteEmpty*/ + !1 + ) && !r.isTypeOnly) { + const l = ud(xn(r)), f = l.kind === 281 || l.kind === 278, m = f ? p.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : p.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type, y = f ? p._0_was_exported_here : p._0_was_imported_here, x = l.kind === 278 ? "*" : Pi(l.name.escapedText); + Fs(We(r.moduleReference, m), Xr(l, y, x)); + } + } + function Dv(r, a, l, f) { + const m = r.exports.get( + "export=" + /* ExportEquals */ + ), y = m ? js( + Zr(m), + a, + /*skipObjectFunctionPropertyAugment*/ + !0 + ) : r.exports.get(a), x = bc(y, f); + return i_( + l, + y, + x, + /*overwriteEmpty*/ + !1 + ), x; + } + function Mu(r) { + return ko(r) && !r.isExportEquals || Vn( + r, + 2048 + /* Default */ + ) || pu(r) || Ym(r); + } + function od(r) { + return Ga(r) ? e.getModeForUsageLocation(xr(r), r) : void 0; + } + function gp(r, a) { + return r === 99 && a === 1; + } + function Qy(r) { + return od(r) === 99 && nc( + r.text, + ".json" + /* Json */ + ); + } + function Pv(r, a, l, f) { + const m = r && od(f); + if (r && m !== void 0 && 100 <= L && L <= 199) { + const y = gp(m, r.impliedNodeFormat); + if (m === 99 || y) + return y; + } + if (!ce) + return !1; + if (!r || r.isDeclarationFile) { + const y = Dv( + a, + "default", + /*sourceNode*/ + void 0, + /*dontResolveAlias*/ + !0 + ); + return !(y && ut(y.declarations, Mu) || Dv( + a, + Ko("__esModule"), + /*sourceNode*/ + void 0, + l + )); + } + return p_(r) ? typeof r.externalModuleIndicator != "object" && !Dv( + a, + Ko("__esModule"), + /*sourceNode*/ + void 0, + l + ) : l2(a); + } + function Xg(r, a) { + const l = Ru(r, r.parent.moduleSpecifier); + if (l) + return uf(l, r, a); + } + function uf(r, a, l) { + var f; + let m; + Vw(r) ? m = r : m = Dv(r, "default", a, l); + const y = (f = r.declarations) == null ? void 0 : f.find(yi), x = cd(a); + if (!x) + return m; + const I = Qy(x), R = Pv(y, r, l, x); + if (!m && !R && !I) + if (l2(r) && !ce) { + const J = L >= 5 ? "allowSyntheticDefaultImports" : "esModuleInterop", Se = r.exports.get( + "export=" + /* ExportEquals */ + ).valueDeclaration, me = We(a.name, p.Module_0_can_only_be_default_imported_using_the_1_flag, Si(r), J); + Se && Fs( + me, + Xr( + Se, + p.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, + J + ) + ); + } else kd(a) ? ld(r, a) : o2(r, r, a, ET(a) && a.propertyName || a.name); + else if (R || I) { + const J = M_(r, l) || bc(r, l); + return i_( + a, + r, + J, + /*overwriteEmpty*/ + !1 + ), J; + } + return i_( + a, + m, + /*finalTarget*/ + void 0, + /*overwriteEmpty*/ + !1 + ), m; + } + function cd(r) { + switch (r.kind) { + case 273: + return r.parent.moduleSpecifier; + case 271: + return Sh(r.moduleReference) ? r.moduleReference.expression : void 0; + case 274: + return r.parent.parent.moduleSpecifier; + case 276: + return r.parent.parent.parent.moduleSpecifier; + case 281: + return r.parent.parent.moduleSpecifier; + default: + return E.assertNever(r); + } + } + function ld(r, a) { + var l, f, m; + if ((l = r.exports) != null && l.has(a.symbol.escapedName)) + We( + a.name, + p.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, + Si(r), + Si(a.symbol) + ); + else { + const y = We(a.name, p.Module_0_has_no_default_export, Si(r)), x = (f = r.exports) == null ? void 0 : f.get( + "__export" + /* ExportStar */ + ); + if (x) { + const I = (m = x.declarations) == null ? void 0 : m.find( + (R) => { + var J, ee; + return !!(Ic(R) && R.moduleSpecifier && ((ee = (J = Ru(R, R.moduleSpecifier)) == null ? void 0 : J.exports) != null && ee.has( + "default" + /* Default */ + ))); + } + ); + I && Fs(y, Xr(I, p.export_Asterisk_does_not_re_export_a_default)); + } + } + } + function R0(r, a) { + const l = r.parent.parent.moduleSpecifier, f = Ru(r, l), m = e1( + f, + l, + a, + /*suppressInteropError*/ + !1 + ); + return i_( + r, + f, + m, + /*overwriteEmpty*/ + !1 + ), m; + } + function wv(r, a) { + const l = r.parent.moduleSpecifier, f = l && Ru(r, l), m = l && e1( + f, + l, + a, + /*suppressInteropError*/ + !1 + ); + return i_( + r, + f, + m, + /*overwriteEmpty*/ + !1 + ), m; + } + function rk(r, a) { + if (r === nt && a === nt) + return nt; + if (r.flags & 790504) + return r; + const l = va(r.flags | a.flags, r.escapedName); + return E.assert(r.declarations || a.declarations), l.declarations = tb(Hi(r.declarations, a.declarations), Kh), l.parent = r.parent || a.parent, r.valueDeclaration && (l.valueDeclaration = r.valueDeclaration), a.members && (l.members = new Map(a.members)), r.exports && (l.exports = new Map(r.exports)), l; + } + function LS(r, a, l, f) { + var m; + if (r.flags & 1536) { + const y = _f(r).get(a.escapedText), x = bc(y, f), I = (m = Ni(r).typeOnlyExportStarMap) == null ? void 0 : m.get(a.escapedText); + return i_( + l, + y, + x, + /*overwriteEmpty*/ + !1, + I, + a.escapedText + ), x; + } + } + function a2(r, a) { + if (r.flags & 3) { + const l = r.valueDeclaration.type; + if (l) + return bc(js(xi(l), a)); + } + } + function MS(r, a, l = !1) { + var f; + const m = Kj(r) || r.moduleSpecifier, y = Ru(r, m), x = !Dn(a) && a.propertyName || a.name; + if (!Re(x)) + return; + const I = x.escapedText === "default" && ce, R = e1( + y, + m, + /*dontResolveAlias*/ + !1, + I + ); + if (R && x.escapedText) { + if (Vw(y)) + return y; + let J; + y && y.exports && y.exports.get( + "export=" + /* ExportEquals */ + ) ? J = js( + Zr(R), + x.escapedText, + /*skipObjectFunctionPropertyAugment*/ + !0 + ) : J = a2(R, x.escapedText), J = bc(J, l); + let ee = LS(R, x, a, l); + if (ee === void 0 && x.escapedText === "default") { + const me = (f = y.declarations) == null ? void 0 : f.find(yi); + (Qy(m) || Pv(me, y, l, m)) && (ee = M_(y, l) || bc(y, l)); + } + const Se = ee && J && ee !== J ? rk(J, ee) : ee || J; + return Se || o2(y, R, r, x), Se; + } + } + function o2(r, a, l, f) { + var m; + const y = Ky(r, l), x = ao(f), I = Fde(f, a); + if (I !== void 0) { + const R = Si(I), J = We(f, p._0_has_no_exported_member_named_1_Did_you_mean_2, y, x, R); + I.valueDeclaration && Fs(J, Xr(I.valueDeclaration, p._0_is_declared_here, R)); + } else + (m = r.exports) != null && m.has( + "default" + /* Default */ + ) ? We( + f, + p.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, + y, + x + ) : RS(l, f, x, r, y); + } + function RS(r, a, l, f, m) { + var y, x; + const I = (x = (y = Jn(f.valueDeclaration, Vm)) == null ? void 0 : y.locals) == null ? void 0 : x.get(a.escapedText), R = f.exports; + if (I) { + const J = R?.get( + "export=" + /* ExportEquals */ + ); + if (J) + Rd(J, I) ? Ld(r, a, l, m) : We(a, p.Module_0_has_no_exported_member_1, m, l); + else { + const ee = R ? Nn(Lfe(R), (me) => !!Rd(me, I)) : void 0, Se = ee ? We(a, p.Module_0_declares_1_locally_but_it_is_exported_as_2, m, l, Si(ee)) : We(a, p.Module_0_declares_1_locally_but_it_is_not_exported, m, l); + I.declarations && Fs(Se, ...or(I.declarations, (me, Ve) => Xr(me, Ve === 0 ? p._0_is_declared_here : p.and_here, l))); + } + } else + We(a, p.Module_0_has_no_exported_member_1, m, l); + } + function Ld(r, a, l, f) { + if (L >= 5) { + const m = Fg(F) ? p._0_can_only_be_imported_by_using_a_default_import : p._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + We(a, m, l); + } else if (Qr(r)) { + const m = Fg(F) ? p._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : p._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + We(a, m, l); + } else { + const m = Fg(F) ? p._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : p._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; + We(a, m, l, l, f); + } + } + function F6(r, a) { + if (Yu(r) && dn(r.propertyName || r.name) === "default") { + const x = cd(r), I = x && Ru(r, x); + if (I) + return uf(I, r, a); + } + const l = da(r) ? nm(r) : r.parent.parent.parent, f = Yy(l), m = MS(l, f || r, a), y = r.propertyName || r.name; + return f && m && Re(y) ? bc(js(Zr(m), y.escapedText), a) : (i_( + r, + /*immediateTarget*/ + void 0, + m, + /*overwriteEmpty*/ + !1 + ), m); + } + function Yy(r) { + if (ti(r) && r.initializer && Dn(r.initializer)) + return r.initializer; + } + function Zy(r, a) { + if (vd(r.parent)) { + const l = M_(r.parent.symbol, a); + return i_( + r, + /*immediateTarget*/ + void 0, + l, + /*overwriteEmpty*/ + !1 + ), l; + } + } + function Fh(r, a, l) { + if (dn(r.propertyName || r.name) === "default") { + const m = cd(r), y = m && Ru(r, m); + if (y) + return uf(y, r, !!l); + } + const f = r.parent.parent.moduleSpecifier ? MS(r.parent.parent, r, l) : No( + r.propertyName || r.name, + a, + /*ignoreErrors*/ + !1, + l + ); + return i_( + r, + /*immediateTarget*/ + void 0, + f, + /*overwriteEmpty*/ + !1 + ), f; + } + function j0(r, a) { + const l = ko(r) ? r.expression : r.right, f = hp(l, a); + return i_( + r, + /*immediateTarget*/ + void 0, + f, + /*overwriteEmpty*/ + !1 + ), f; + } + function hp(r, a) { + if (tl(r)) + return Dc(r).symbol; + if (!l_(r) && !fo(r)) + return; + const l = No( + r, + 901119, + /*ignoreErrors*/ + !0, + a + ); + return l || (Dc(r), bn(r).resolvedSymbol); + } + function B0(r, a) { + if (cn(r.parent) && r.parent.left === r && r.parent.operatorToken.kind === 64) + return hp(r.parent.right, a); + } + function Lh(r, a = !1) { + switch (r.kind) { + case 271: + case 260: + return sn(r, a); + case 273: + return Xg(r, a); + case 274: + return R0(r, a); + case 280: + return wv(r, a); + case 276: + case 208: + return F6(r, a); + case 281: + return Fh(r, 901119, a); + case 277: + case 226: + return j0(r, a); + case 270: + return Zy(r, a); + case 304: + return No( + r.name, + 901119, + /*ignoreErrors*/ + !0, + a + ); + case 303: + return hp(r.initializer, a); + case 212: + case 211: + return B0(r, a); + default: + return E.fail(); + } + } + function hl(r, a = 901119) { + return r ? (r.flags & (2097152 | a)) === 2097152 || !!(r.flags & 2097152 && r.flags & 67108864) : !1; + } + function bc(r, a) { + return !a && hl(r) ? Ec(r) : r; + } + function Ec(r) { + E.assert((r.flags & 2097152) !== 0, "Should only get Alias here."); + const a = Ni(r); + if (a.aliasTarget) + a.aliasTarget === te && (a.aliasTarget = nt); + else { + a.aliasTarget = te; + const l = k_(r); + if (!l) return E.fail(); + const f = Lh(l); + a.aliasTarget === te ? a.aliasTarget = f || nt : We(l, p.Circular_definition_of_import_alias_0, Si(r)); + } + return a.aliasTarget; + } + function jS(r) { + if (Ni(r).aliasTarget !== te) + return Ec(r); + } + function n_(r, a, l) { + const f = a && ud(r), m = f && Ic(f), y = f && (m ? Ru( + f.moduleSpecifier, + f.moduleSpecifier, + /*ignoreErrors*/ + !0 + ) : Ec(f.symbol)), x = m && y ? Md(y) : void 0; + let I = l ? 0 : r.flags, R; + for (; r.flags & 2097152; ) { + const J = R_(Ec(r)); + if (!m && J === y || x?.get(J.escapedName) === J) + break; + if (J === nt) + return -1; + if (J === r || R?.has(J)) + break; + J.flags & 2097152 && (R ? R.add(J) : R = /* @__PURE__ */ new Set([r, J])), I |= J.flags, r = J; + } + return I; + } + function i_(r, a, l, f, m, y) { + if (!r || Dn(r)) return !1; + const x = xn(r); + if (B1(r)) { + const R = Ni(x); + return R.typeOnlyDeclaration = r, !0; + } + if (m) { + const R = Ni(x); + return R.typeOnlyDeclaration = m, x.escapedName !== y && (R.typeOnlyExportStarName = y), !0; + } + const I = Ni(x); + return nk(I, a, f) || nk(I, l, f); + } + function nk(r, a, l) { + var f; + if (a && (r.typeOnlyDeclaration === void 0 || l && r.typeOnlyDeclaration === !1)) { + const m = ((f = a.exports) == null ? void 0 : f.get( + "export=" + /* ExportEquals */ + )) ?? a, y = m.declarations && Nn(m.declarations, B1); + r.typeOnlyDeclaration = y ?? Ni(m).typeOnlyDeclaration ?? !1; + } + return !!r.typeOnlyDeclaration; + } + function ud(r, a) { + var l; + if (!(r.flags & 2097152)) + return; + const f = Ni(r); + if (f.typeOnlyDeclaration === void 0) { + f.typeOnlyDeclaration = !1; + const m = bc(r); + i_( + (l = r.declarations) == null ? void 0 : l[0], + k_(r) && S$(r), + m, + /*overwriteEmpty*/ + !0 + ); + } + if (a === void 0) + return f.typeOnlyDeclaration || void 0; + if (f.typeOnlyDeclaration) { + const m = f.typeOnlyDeclaration.kind === 278 ? bc(Md(f.typeOnlyDeclaration.symbol.parent).get(f.typeOnlyExportStarName || r.escapedName)) : Ec(f.typeOnlyDeclaration.symbol); + return n_(m) & a ? f.typeOnlyDeclaration : void 0; + } + } + function ik(r, a) { + return r.kind === 80 && k4(r) && (r = r.parent), r.kind === 80 || r.parent.kind === 166 ? No( + r, + 1920, + /*ignoreErrors*/ + !1, + a + ) : (E.assert( + r.parent.kind === 271 + /* ImportEqualsDeclaration */ + ), No( + r, + 901119, + /*ignoreErrors*/ + !1, + a + )); + } + function Ky(r, a) { + return r.parent ? Ky(r.parent, a) + "." + Si(r) : Si( + r, + a, + /*meaning*/ + void 0, + 36 + /* AllowAnyNodeKind */ + ); + } + function L6(r) { + for (; $u(r.parent); ) + r = r.parent; + return r; + } + function Av(r) { + let a = tf(r), l = Kt( + a, + a, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (l) { + for (; $u(a.parent); ) { + const f = Zr(l); + if (l = js(f, a.parent.right.escapedText), !l) + return; + a = a.parent; + } + return l; + } + } + function No(r, a, l, f, m) { + if (ic(r)) + return; + const y = 1920 | (Qr(r) ? a & 111551 : 0); + let x; + if (r.kind === 80) { + const I = a === y || oo(r) ? p.Cannot_find_namespace_0 : sNe(tf(r)), R = Qr(r) && !oo(r) ? M6(r, a) : void 0; + if (x = Ma(Kt( + m || r, + r, + a, + l || R ? void 0 : I, + /*isUse*/ + !0, + /*excludeGlobals*/ + !1 + )), !x) + return Ma(R); + } else if (r.kind === 166 || r.kind === 211) { + const I = r.kind === 166 ? r.left : r.expression, R = r.kind === 166 ? r.right : r.name; + let J = No( + I, + y, + l, + /*dontResolveAlias*/ + !1, + m + ); + if (!J || ic(R)) + return; + if (J === nt) + return J; + if (J.valueDeclaration && Qr(J.valueDeclaration) && Hu(F) !== 100 && ti(J.valueDeclaration) && J.valueDeclaration.initializer && Z8e(J.valueDeclaration.initializer)) { + const ee = J.valueDeclaration.initializer.arguments[0], Se = Ru(ee, ee); + if (Se) { + const me = M_(Se); + me && (J = me); + } + } + if (x = Ma(x_(_f(J), R.escapedText, a)), !x && J.flags & 2097152 && (x = Ma(x_(_f(Ec(J)), R.escapedText, a))), !x) { + if (!l) { + const ee = Ky(J), Se = ao(R), me = Fde(R, J); + if (me) { + We(R, p._0_has_no_exported_member_named_1_Did_you_mean_2, ee, Se, Si(me)); + return; + } + const Ve = $u(r) && L6(r); + if (Cl && a & 788968 && Ve && !IC(Ve.parent) && Av(Ve)) { + We( + Ve, + p._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, + Y_(Ve) + ); + return; + } + if (a & 1920 && $u(r.parent)) { + const ht = Ma(x_( + _f(J), + R.escapedText, + 788968 + /* Type */ + )); + if (ht) { + We( + r.parent.right, + p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, + Si(ht), + Pi(r.parent.right.escapedText) + ); + return; + } + } + We(R, p.Namespace_0_has_no_exported_member_1, ee, Se); + } + return; + } + } else + E.assertNever(r, "Unknown entity name kind."); + return !oo(r) && l_(r) && (x.flags & 2097152 || r.parent.kind === 277) && i_( + lB(r), + x, + /*finalTarget*/ + void 0, + /*overwriteEmpty*/ + !0 + ), x.flags & a || f ? x : Ec(x); + } + function M6(r, a) { + if (EG(r.parent)) { + const l = yP(r.parent); + if (l) + return Kt( + l, + r, + a, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + } + } + function yP(r) { + if (sr(r, (m) => Yk(m) || m.flags & 16777216 ? Np(m) : "quit")) + return; + const l = hb(r); + if (l && Pl(l) && f3(l.expression)) { + const m = xn(l.expression.left); + if (m) + return BS(m); + } + if (l && po(l) && f3(l.parent) && Pl(l.parent.parent)) { + const m = xn(l.parent.left); + if (m) + return BS(m); + } + if (l && (Yp(l) || qc(l)) && cn(l.parent.parent) && mc(l.parent.parent) === 6) { + const m = xn(l.parent.parent.left); + if (m) + return BS(m); + } + const f = H1(r); + if (f && ps(f)) { + const m = xn(f); + return m && m.valueDeclaration; + } + } + function BS(r) { + const a = r.parent.valueDeclaration; + return a ? (c4(a) ? MT(a) : U2(a) ? l4(a) : void 0) || a : void 0; + } + function R6(r) { + const a = r.valueDeclaration; + if (!a || !Qr(a) || r.flags & 524288 || U1( + a, + /*isPrototypeAssignment*/ + !1 + )) + return; + const l = ti(a) ? l4(a) : MT(a); + if (l) { + const f = C_(l); + if (f) + return Ude(f, r); + } + } + function Ru(r, a, l) { + const m = Hu(F) === 1 ? p.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : p.Cannot_find_module_0_or_its_corresponding_type_declarations; + return sk(r, a, l ? void 0 : m); + } + function sk(r, a, l, f = !1) { + return Ga(a) ? Nv(r, a.text, l, a, f) : void 0; + } + function Nv(r, a, l, f, m = !1) { + var y, x, I, R, J, ee, Se, me, Ve, mt, ht; + if (zi(a, "@types/")) { + const jn = p.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1, qs = kE(a, "@types/"); + We(f, jn, qs, a); + } + const er = Mfe( + a, + /*withAugmentations*/ + !0 + ); + if (er) + return er; + const tr = xr(r), Rr = Ga(r) ? r : ((y = Nc(r) ? r : r.parent && Nc(r.parent) && r.parent.name === r ? r.parent : void 0) == null ? void 0 : y.name) || ((x = a0(r) ? r : void 0) == null ? void 0 : x.argument.literal) || (Qr(r) && Jg(r) ? r.moduleSpecifier : void 0) || (ti(r) && r.initializer && d_( + r.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? r.initializer.arguments[0] : void 0) || ((I = sr(r, hf)) == null ? void 0 : I.arguments[0]) || ((R = sr(r, oc)) == null ? void 0 : R.moduleSpecifier) || ((J = sr(r, V1)) == null ? void 0 : J.moduleReference.expression) || ((ee = sr(r, Ic)) == null ? void 0 : ee.moduleSpecifier), vn = Rr && Ga(Rr) ? e.getModeForUsageLocation(tr, Rr) : tr.impliedNodeFormat, cr = Hu(F), Cr = (Se = e.getResolvedModule(tr, a, vn)) == null ? void 0 : Se.resolvedModule, Fr = Cr && UW(F, Cr, tr), En = Cr && (!Fr || Fr === p.Module_0_was_resolved_to_1_but_jsx_is_not_set) && e.getSourceFile(Cr.resolvedFileName); + if (En) { + if (Fr && We(f, Fr, a, Cr.resolvedFileName), Cr.resolvedUsingTsExtension && Ol(a)) { + const jn = ((me = sr(r, oc)) == null ? void 0 : me.importClause) || sr(r, Ef(nl, Ic)); + (jn && !jn.isTypeOnly || sr(r, hf)) && We( + f, + p.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, + Rn(E.checkDefined(G7(a))) + ); + } else if (Cr.resolvedUsingTsExtension && !$C(F, tr.fileName)) { + const jn = ((Ve = sr(r, oc)) == null ? void 0 : Ve.importClause) || sr(r, Ef(nl, Ic)); + if (!(jn?.isTypeOnly || sr(r, Qm))) { + const qs = E.checkDefined(G7(a)); + We(f, p.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, qs); + } + } + if (En.symbol) { + if (Cr.isExternalLibraryImport && !M4(Cr.extension) && ak( + /*isError*/ + !1, + f, + tr, + vn, + Cr, + a + ), cr === 3 || cr === 99) { + const jn = tr.impliedNodeFormat === 1 && !sr(r, hf) || !!sr(r, nl), qs = sr(r, (ks) => Qm(ks) || Ic(ks) || oc(ks)); + if (jn && En.impliedNodeFormat === 99 && !Tee(qs)) + if (sr(r, nl)) + We(f, p.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, a); + else { + let ks; + const xa = hh(tr.fileName); + if (xa === ".ts" || xa === ".js" || xa === ".tsx" || xa === ".jsx") { + const is = tr.packageJsonScope, $o = xa === ".ts" ? ".mts" : xa === ".js" ? ".mjs" : void 0; + is && !is.contents.packageJsonContent.type ? $o ? ks = us( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1, + $o, + Mn(is.packageDirectory, "package.json") + ) : ks = us( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0, + Mn(is.packageDirectory, "package.json") + ) : $o ? ks = us( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module, + $o + ) : ks = us( + /*details*/ + void 0, + p.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module + ); + } + La.add(wg( + xr(f), + f, + us( + ks, + p.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, + a + ) + )); + } + } + return Ma(En.symbol); + } + l && We(f, p.File_0_is_not_a_module, En.fileName); + return; + } + if (Eo) { + const jn = yR(Eo, (qs) => qs.pattern, a); + if (jn) { + const qs = gl && gl.get(a); + return Ma(qs || jn.symbol); + } + } + if (Cr && !M4(Cr.extension) && Fr === void 0 || Fr === p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { + if (m) { + const jn = p.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; + We(f, jn, a, Cr.resolvedFileName); + } else + ak( + /*isError*/ + ne && !!l, + f, + tr, + vn, + Cr, + a + ); + return; + } + if (l) { + if (Cr) { + const jn = e.getProjectReferenceRedirect(Cr.resolvedFileName); + if (jn) { + We(f, p.Output_file_0_has_not_been_built_from_source_file_1, jn, Cr.resolvedFileName); + return; + } + } + if (Fr) + We(f, Fr, a, Cr.resolvedFileName); + else { + const jn = Df(a) && !zk(a), qs = cr === 3 || cr === 99; + if (!kb(F) && Go( + a, + ".json" + /* Json */ + ) && cr !== 1 && a5(F)) + We(f, p.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, a); + else if (vn === 99 && qs && jn) { + const ks = Xi(a, Xn(tr.path)), xa = (mt = gP.find(([is, $o]) => e.fileExists(ks + is))) == null ? void 0 : mt[1]; + xa ? We(f, p.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, a + xa) : We(f, p.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + } else if ((ht = e.getResolvedModule(tr, a, vn)) != null && ht.alternateResult) { + const ks = e7(tr, e, a, vn, a); + ll( + /*isError*/ + !0, + f, + us(ks, l, a) + ); + } else + We(f, l, a); + } + } + return; + function Rn(jn) { + const qs = W3(a, jn); + if (s5(L) || vn === 99) { + const ks = Ol(a) && $C(F); + return qs + (jn === ".mts" || jn === ".d.mts" ? ks ? ".mts" : ".mjs" : jn === ".cts" || jn === ".d.mts" ? ks ? ".cts" : ".cjs" : ks ? ".ts" : ".js"); + } + return qs; + } + } + function ak(r, a, l, f, { packageId: m, resolvedFileName: y }, x) { + let I; + !Sl(x) && m && (I = e7(l, e, x, f, m.name)), ll( + r, + a, + us( + I, + p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + x, + y + ) + ); + } + function M_(r, a) { + if (r?.exports) { + const l = bc(r.exports.get( + "export=" + /* ExportEquals */ + ), a), f = c2(Ma(l), Ma(r)); + return Ma(f) || r; + } + } + function c2(r, a) { + if (!r || r === nt || r === a || a.exports.size === 1 || r.flags & 2097152) + return r; + const l = Ni(r); + if (l.cjsExportMerged) + return l.cjsExportMerged; + const f = r.flags & 33554432 ? r : NS(r); + return f.flags = f.flags | 512, f.exports === void 0 && (f.exports = Ms()), a.exports.forEach((m, y) => { + y !== "export=" && f.exports.set(y, f.exports.has(y) ? Nh(f.exports.get(y), m) : m); + }), f === r && (Ni(f).resolvedExports = void 0, Ni(f).resolvedMembers = void 0), Ni(f).cjsExportMerged = f, l.cjsExportMerged = f; + } + function e1(r, a, l, f) { + var m; + const y = M_(r, l); + if (!l && y) { + if (!f && !(y.flags & 1539) && !Jo( + y, + 307 + /* SourceFile */ + )) { + const I = L >= 5 ? "allowSyntheticDefaultImports" : "esModuleInterop"; + return We(a, p.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, I), y; + } + const x = a.parent; + if (oc(x) && uC(x) || hf(x)) { + const I = hf(x) ? x.arguments[0] : x.moduleSpecifier, R = Zr(y), J = Q8e(R, y, r, I); + if (J) + return j6(y, J, x); + const ee = (m = r?.declarations) == null ? void 0 : m.find(yi), Se = ee && gp(od(I), ee.impliedNodeFormat); + if (Fg(F) || Se) { + let me = FL( + R, + 0 + /* Call */ + ); + if ((!me || !me.length) && (me = FL( + R, + 1 + /* Construct */ + )), me && me.length || js( + R, + "default", + /*skipObjectFunctionPropertyAugment*/ + !0 + ) || Se) { + const Ve = R.flags & 3670016 ? Y8e(R, y, r, I) : qde(y, y.parent); + return j6(y, Ve, x); + } + } + } + } + return y; + } + function j6(r, a, l) { + const f = va(r.flags, r.escapedName); + f.declarations = r.declarations ? r.declarations.slice() : [], f.parent = r.parent, f.links.target = r, f.links.originatingImport = l, r.valueDeclaration && (f.valueDeclaration = r.valueDeclaration), r.constEnumOnlyModule && (f.constEnumOnlyModule = !0), r.members && (f.members = new Map(r.members)), r.exports && (f.exports = new Map(r.exports)); + const m = zd(a); + return f.links.type = ie(f, m.members, He, He, m.indexInfos), f; + } + function l2(r) { + return r.exports.get( + "export=" + /* ExportEquals */ + ) !== void 0; + } + function ok(r) { + return Lfe(Md(r)); + } + function JS(r) { + const a = ok(r), l = M_(r); + if (l !== r) { + const f = Zr(l); + kf(f) && Bn(a, Wa(f)); + } + return a; + } + function ck(r, a) { + Md(r).forEach((m, y) => { + lg(y) || a(m, y); + }); + const f = M_(r); + if (f !== r) { + const m = Zr(f); + kf(m) && qZe(m, (y, x) => { + a(y, x); + }); + } + } + function zS(r, a) { + const l = Md(a); + if (l) + return l.get(r); + } + function WS(r, a) { + const l = zS(r, a); + if (l) + return l; + const f = M_(a); + if (f === a) + return; + const m = Zr(f); + return kf(m) ? js(m, r) : void 0; + } + function kf(r) { + return !(r.flags & 402784252 || wn(r) & 1 || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path + xp(r) || la(r)); + } + function _f(r) { + return r.flags & 6256 ? bfe( + r, + "resolvedExports" + /* resolvedExports */ + ) : r.flags & 1536 ? Md(r) : r.exports || O; + } + function Md(r) { + const a = Ni(r); + if (!a.resolvedExports) { + const { exports: l, typeOnlyExportStarMap: f } = Iv(r); + a.resolvedExports = l, a.typeOnlyExportStarMap = f; + } + return a.resolvedExports; + } + function B6(r, a, l, f) { + a && a.forEach((m, y) => { + if (y === "default") return; + const x = r.get(y); + if (!x) + r.set(y, m), l && f && l.set(y, { + specifierText: sc(f.moduleSpecifier) + }); + else if (l && f && x && bc(x) !== bc(m)) { + const I = l.get(y); + I.exportsWithDuplicate ? I.exportsWithDuplicate.push(f) : I.exportsWithDuplicate = [f]; + } + }); + } + function Iv(r) { + const a = []; + let l; + const f = /* @__PURE__ */ new Set(); + r = M_(r); + const m = y(r) || O; + return l && f.forEach((x) => l.delete(x)), { + exports: m, + typeOnlyExportStarMap: l + }; + function y(x, I, R) { + if (!R && x?.exports && x.exports.forEach((Se, me) => f.add(me)), !(x && x.exports && Zf(a, x))) + return; + const J = new Map(x.exports), ee = x.exports.get( + "__export" + /* ExportStar */ + ); + if (ee) { + const Se = Ms(), me = /* @__PURE__ */ new Map(); + if (ee.declarations) + for (const Ve of ee.declarations) { + const mt = Ru(Ve, Ve.moduleSpecifier), ht = y(mt, Ve, R || Ve.isTypeOnly); + B6( + Se, + ht, + me, + Ve + ); + } + me.forEach(({ exportsWithDuplicate: Ve }, mt) => { + if (!(mt === "export=" || !(Ve && Ve.length) || J.has(mt))) + for (const ht of Ve) + La.add(Xr( + ht, + p.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, + me.get(mt).specifierText, + Pi(mt) + )); + }), B6(J, Se); + } + return I?.isTypeOnly && (l ?? (l = /* @__PURE__ */ new Map()), J.forEach( + (Se, me) => l.set( + me, + I + ) + )), J; + } + } + function Ma(r) { + let a; + return r && r.mergeId && (a = ii[r.mergeId]) ? a : r; + } + function xn(r) { + return Ma(r.symbol && gG(r.symbol)); + } + function C_(r) { + return vd(r) ? xn(r) : void 0; + } + function s_(r) { + return Ma(r.parent && gG(r.parent)); + } + function lk(r) { + var a, l; + return (((a = r.valueDeclaration) == null ? void 0 : a.kind) === 219 || ((l = r.valueDeclaration) == null ? void 0 : l.kind) === 218) && C_(r.valueDeclaration.parent) || r; + } + function Mh(r, a) { + const l = xr(a), f = ja(l), m = Ni(r); + let y; + if (m.extendedContainersByFile && (y = m.extendedContainersByFile.get(f))) + return y; + if (l && l.imports) { + for (const I of l.imports) { + if (oo(I)) continue; + const R = Ru( + a, + I, + /*ignoreErrors*/ + !0 + ); + !R || !Qg(R, r) || (y = Tr(y, R)); + } + if (Dr(y)) + return (m.extendedContainersByFile || (m.extendedContainersByFile = /* @__PURE__ */ new Map())).set(f, y), y; + } + if (m.extendedContainers) + return m.extendedContainers; + const x = e.getSourceFiles(); + for (const I of x) { + if (!il(I)) continue; + const R = xn(I); + Qg(R, r) && (y = Tr(y, R)); + } + return m.extendedContainers = y || He; + } + function J6(r, a, l) { + const f = s_(r); + if (f && !(r.flags & 262144)) + return R(f); + const m = Ii(r.declarations, (ee) => { + if (!wu(ee) && ee.parent) { + if (Rh(ee.parent)) + return xn(ee.parent); + if (_m(ee.parent) && ee.parent.parent && M_(xn(ee.parent.parent)) === r) + return xn(ee.parent.parent); + } + if (tl(ee) && cn(ee.parent) && ee.parent.operatorToken.kind === 64 && go(ee.parent.left) && fo(ee.parent.left.expression)) + return Ag(ee.parent.left) || $2(ee.parent.left.expression) ? xn(xr(ee)) : (Dc(ee.parent.left.expression), bn(ee.parent.left.expression).resolvedSymbol); + }); + if (!Dr(m)) + return; + const y = Ii(m, (ee) => Qg(ee, r) ? ee : void 0); + let x = [], I = []; + for (const ee of y) { + const [Se, ...me] = R(ee); + x = Tr(x, Se), I = Bn(I, me); + } + return Hi(x, I); + function R(ee) { + const Se = Ii(ee.declarations, J), me = a && Mh(r, a), Ve = z6(ee, l); + if (a && ee.flags & Hn(l) && Ui( + ee, + a, + 1920, + /*useOnlyExternalAliasing*/ + !1 + )) + return Tr(Hi(Hi([ee], Se), me), Ve); + const mt = !(ee.flags & Hn(l)) && ee.flags & 788968 && mo(ee).flags & 524288 && l === 111551 ? Qt(a, (er) => Dl(er, (tr) => { + if (tr.flags & Hn(l) && Zr(tr) === mo(ee)) + return tr; + })) : void 0; + let ht = mt ? [mt, ...Se, ee] : [...Se, ee]; + return ht = Tr(ht, Ve), ht = Bn(ht, me), ht; + } + function J(ee) { + return f && Ov(ee, f); + } + } + function z6(r, a) { + const l = !!Dr(r.declarations) && fa(r.declarations); + if (a & 111551 && l && l.parent && ti(l.parent) && (Gs(l) && l === l.parent.initializer || Xu(l) && l === l.parent.type)) + return xn(l.parent); + } + function Ov(r, a) { + const l = i1(r), f = l && l.exports && l.exports.get( + "export=" + /* ExportEquals */ + ); + return f && Rd(f, a) ? l : void 0; + } + function Qg(r, a) { + if (r === s_(a)) + return a; + const l = r.exports && r.exports.get( + "export=" + /* ExportEquals */ + ); + if (l && Rd(l, a)) + return r; + const f = _f(r), m = f.get(a.escapedName); + return m && Rd(m, a) ? m : Dl(f, (y) => { + if (Rd(y, a)) + return y; + }); + } + function Rd(r, a) { + if (Ma(bc(Ma(r))) === Ma(bc(Ma(a)))) + return r; + } + function R_(r) { + return Ma(r && (r.flags & 1048576) !== 0 && r.exportSymbol || r); + } + function t1(r, a) { + return !!(r.flags & 111551 || r.flags & 2097152 && n_(r, !a) & 111551); + } + function Yg(r) { + var a; + const l = new c(Vt, r); + return u++, l.id = u, (a = rn) == null || a.recordType(l), l; + } + function jd(r, a) { + const l = Yg(r); + return l.symbol = a, l; + } + function u2(r) { + return new c(Vt, r); + } + function $c(r, a, l = 0, f) { + uk(a, f); + const m = Yg(r); + return m.intrinsicName = a, m.debugIntrinsicName = f, m.objectFlags = l | 524288 | 2097152 | 33554432 | 16777216, m; + } + function uk(r, a) { + const l = `${r},${a ?? ""}`; + Ee.has(l) && E.fail(`Duplicate intrinsic type name ${r}${a ? ` (${a})` : ""}; you may need to pass a name to createIntrinsicType.`), Ee.add(l); + } + function yp(r, a) { + const l = jd(524288, a); + return l.objectFlags = r, l.members = void 0, l.properties = void 0, l.callSignatures = void 0, l.constructSignatures = void 0, l.indexInfos = void 0, l; + } + function _d() { + return Gn(ts(yne.keys(), D_)); + } + function ff(r) { + return jd(262144, r); + } + function lg(r) { + return r.charCodeAt(0) === 95 && r.charCodeAt(1) === 95 && r.charCodeAt(2) !== 95 && r.charCodeAt(2) !== 64 && r.charCodeAt(2) !== 35; + } + function r1(r) { + let a; + return r.forEach((l, f) => { + W6(l, f) && (a || (a = [])).push(l); + }), a || He; + } + function W6(r, a) { + return !lg(a) && t1(r); + } + function _k(r) { + const a = r1(r), l = SG(r); + return l ? Hi(a, [l]) : a; + } + function k(r, a, l, f, m) { + const y = r; + return y.members = a, y.properties = He, y.callSignatures = l, y.constructSignatures = f, y.indexInfos = m, a !== O && (y.properties = r1(a)), y; + } + function ie(r, a, l, f, m) { + return k(yp(16, r), a, l, f, m); + } + function _t(r) { + if (r.constructSignatures.length === 0) return r; + if (r.objectTypeWithoutAbstractConstructSignatures) return r.objectTypeWithoutAbstractConstructSignatures; + const a = Ln(r.constructSignatures, (f) => !(f.flags & 4)); + if (r.constructSignatures === a) return r; + const l = ie( + r.symbol, + r.members, + r.callSignatures, + ut(a) ? a : He, + r.indexInfos + ); + return r.objectTypeWithoutAbstractConstructSignatures = l, l.objectTypeWithoutAbstractConstructSignatures = l, l; + } + function Qt(r, a) { + let l; + for (let f = r; f; f = f.parent) { + if (Vm(f) && f.locals && !s0(f) && (l = a( + f.locals, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0, + f + ))) + return l; + switch (f.kind) { + case 307: + if (!A_(f)) + break; + case 267: + const m = xn(f); + if (l = a( + m?.exports || O, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0, + f + )) + return l; + break; + case 263: + case 231: + case 264: + let y; + if ((xn(f).members || O).forEach((x, I) => { + x.flags & 788968 && (y || (y = Ms())).set(I, x); + }), y && (l = a( + y, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !1, + f + ))) + return l; + break; + } + } + return a( + ve, + /*ignoreQualification*/ + void 0, + /*isLocalNameLookup*/ + !0 + ); + } + function Hn(r) { + return r === 111551 ? 111551 : 1920; + } + function Ui(r, a, l, f, m = /* @__PURE__ */ new Map()) { + if (!(r && !fs(r))) + return; + const y = Ni(r), x = y.accessibleChainCache || (y.accessibleChainCache = /* @__PURE__ */ new Map()), I = Qt(a, (tr, Rr, vn, cr) => cr), R = `${f ? 0 : 1}|${I && ja(I)}|${l}`; + if (x.has(R)) + return x.get(R); + const J = $s(r); + let ee = m.get(J); + ee || m.set(J, ee = []); + const Se = Qt(a, me); + return x.set(R, Se), Se; + function me(tr, Rr, vn) { + if (!Zf(ee, tr)) + return; + const cr = ht(tr, Rr, vn); + return ee.pop(), cr; + } + function Ve(tr, Rr) { + return !Zi(tr, a, Rr) || // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too + !!Ui(tr.parent, a, Hn(Rr), f, m); + } + function mt(tr, Rr, vn) { + return (r === (Rr || tr) || Ma(r) === Ma(Rr || tr)) && // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) + // and if symbolFromSymbolTable or alias resolution matches the symbol, + // check the symbol can be qualified, it is only then this symbol is accessible + !ut(tr.declarations, Rh) && (vn || Ve(Ma(tr), l)); + } + function ht(tr, Rr, vn) { + return mt( + tr.get(r.escapedName), + /*resolvedAliasSymbol*/ + void 0, + Rr + ) ? [r] : Dl(tr, (Cr) => { + if (Cr.flags & 2097152 && Cr.escapedName !== "export=" && Cr.escapedName !== "default" && !(Z7(Cr) && a && il(xr(a))) && (!f || ut(Cr.declarations, V1)) && (!vn || !ut(Cr.declarations, UZ)) && (Rr || !Jo( + Cr, + 281 + /* ExportSpecifier */ + ))) { + const Fr = Ec(Cr), En = er(Cr, Fr, Rr); + if (En) + return En; + } + if (Cr.escapedName === r.escapedName && Cr.exportSymbol && mt( + Ma(Cr.exportSymbol), + /*resolvedAliasSymbol*/ + void 0, + Rr + )) + return [r]; + }) || (tr === ve ? er(Xe, Xe, Rr) : void 0); + } + function er(tr, Rr, vn) { + if (mt(tr, Rr, vn)) + return [tr]; + const cr = _f(Rr), Cr = cr && me( + cr, + /*ignoreQualification*/ + !0 + ); + if (Cr && Ve(tr, Hn(l))) + return [tr].concat(Cr); + } + } + function Zi(r, a, l) { + let f = !1; + return Qt(a, (m) => { + let y = Ma(m.get(r.escapedName)); + if (!y) + return !1; + if (y === r) + return !0; + const x = y.flags & 2097152 && !Jo( + y, + 281 + /* ExportSpecifier */ + ); + return y = x ? Ec(y) : y, (x ? n_(y) : y.flags) & l ? (f = !0, !0) : !1; + }), f; + } + function fs(r) { + if (r.declarations && r.declarations.length) { + for (const a of r.declarations) + switch (a.kind) { + case 172: + case 174: + case 177: + case 178: + continue; + default: + return !1; + } + return !0; + } + return !1; + } + function ta(r, a) { + return E_( + r, + a, + 788968, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !0 + ).accessibility === 0; + } + function su(r, a) { + return E_( + r, + a, + 111551, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !0 + ).accessibility === 0; + } + function au(r, a, l) { + return E_( + r, + a, + l, + /*shouldComputeAliasesToMakeVisible*/ + !1, + /*allowModules*/ + !1 + ).accessibility === 0; + } + function n1(r, a, l, f, m, y) { + if (!Dr(r)) return; + let x, I = !1; + for (const R of r) { + const J = Ui( + R, + a, + f, + /*useOnlyExternalAliasing*/ + !1 + ); + if (J) { + x = R; + const me = fk(J[0], m); + if (me) + return me; + } + if (y && ut(R.declarations, Rh)) { + if (m) { + I = !0; + continue; + } + return { + accessibility: 0 + /* Accessible */ + }; + } + const ee = J6(R, a, f), Se = n1(ee, a, l, l === R ? Hn(f) : f, m, y); + if (Se) + return Se; + } + if (I) + return { + accessibility: 0 + /* Accessible */ + }; + if (x) + return { + accessibility: 1, + errorSymbolName: Si(l, a, f), + errorModuleName: x !== l ? Si( + x, + a, + 1920 + /* Namespace */ + ) : void 0 + }; + } + function xm(r, a, l, f) { + return E_( + r, + a, + l, + f, + /*allowModules*/ + !0 + ); + } + function E_(r, a, l, f, m) { + if (r && a) { + const y = n1([r], a, r, l, f, m); + if (y) + return y; + const x = rr(r.declarations, i1); + if (x) { + const I = i1(a); + if (x !== I) + return { + accessibility: 2, + errorSymbolName: Si(r, a, l), + errorModuleName: Si(x), + errorNode: Qr(a) ? a : void 0 + }; + } + return { + accessibility: 1, + errorSymbolName: Si(r, a, l) + }; + } + return { + accessibility: 0 + /* Accessible */ + }; + } + function i1(r) { + const a = sr(r, Fv); + return a && xn(a); + } + function Fv(r) { + return wu(r) || r.kind === 307 && A_(r); + } + function Rh(r) { + return a7(r) || r.kind === 307 && A_(r); + } + function fk(r, a) { + let l; + if (!Ri(Ln( + r.declarations, + (y) => y.kind !== 80 + /* Identifier */ + ), f)) + return; + return { accessibility: 0, aliasesToMakeVisible: l }; + function f(y) { + var x, I; + if (!jh(y)) { + const R = ns(y); + if (R && !Vn( + R, + 32 + /* Export */ + ) && // import clause without export + jh(R.parent)) + return m(y, R); + if (ti(y) && yc(y.parent.parent) && !Vn( + y.parent.parent, + 32 + /* Export */ + ) && // unexported variable statement + jh(y.parent.parent.parent)) + return m(y, y.parent.parent); + if (o7(y) && !Vn( + y, + 32 + /* Export */ + ) && jh(y.parent)) + return m(y, y); + if (da(y)) { + if (r.flags & 2097152 && Qr(y) && ((x = y.parent) != null && x.parent) && ti(y.parent.parent) && ((I = y.parent.parent.parent) != null && I.parent) && yc(y.parent.parent.parent.parent) && !Vn( + y.parent.parent.parent.parent, + 32 + /* Export */ + ) && y.parent.parent.parent.parent.parent && jh(y.parent.parent.parent.parent.parent)) + return m(y, y.parent.parent.parent.parent); + if (r.flags & 2) { + const J = sr(y, yc); + return Vn( + J, + 32 + /* Export */ + ) ? !0 : jh(J.parent) ? m(y, J) : !1; + } + } + return !1; + } + return !0; + } + function m(y, x) { + return a && (bn(y).isVisible = !0, l = sh(l, x)), !0; + } + } + function VS(r) { + let a; + return r.parent.kind === 186 || r.parent.kind === 233 && !em(r.parent) || r.parent.kind === 167 || r.parent.kind === 182 && r.parent.parameterName === r ? a = 1160127 : r.kind === 166 || r.kind === 211 || r.parent.kind === 271 || r.parent.kind === 166 && r.parent.left === r || r.parent.kind === 211 && r.parent.expression === r || r.parent.kind === 212 && r.parent.expression === r ? a = 1920 : a = 788968, a; + } + function Lv(r, a, l = !0) { + const f = VS(r), m = tf(r), y = Kt( + a, + m.escapedText, + f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + return y && y.flags & 262144 && f & 788968 ? { + accessibility: 0 + /* Accessible */ + } : !y && my(m) && xm( + xn(Uu( + m, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )), + m, + f, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0 ? { + accessibility: 0 + /* Accessible */ + } : y ? fk(y, l) || { + accessibility: 1, + errorSymbolName: sc(m), + errorNode: m + } : { + accessibility: 3, + errorSymbolName: sc(m), + errorNode: m + }; + } + function Si(r, a, l, f = 4, m) { + let y = 70221824; + f & 2 && (y |= 128), f & 1 && (y |= 512), f & 8 && (y |= 16384), f & 32 && (y |= 134217728), f & 16 && (y |= 1073741824); + const x = f & 4 ? Ae.symbolToNode : Ae.symbolToEntityName; + return m ? I(m).getText() : e4(I); + function I(R) { + const J = x(r, l, a, y), ee = a?.kind === 307 ? bie() : gS(), Se = a && xr(a); + return ee.writeNode( + 4, + J, + /*sourceFile*/ + Se, + R + ), R; + } + } + function km(r, a, l = 0, f, m) { + return m ? y(m).getText() : e4(y); + function y(x) { + let I; + l & 262144 ? I = f === 1 ? 185 : 184 : I = f === 1 ? 180 : 179; + const R = Ae.signatureToSignatureDeclaration( + r, + I, + a, + vP(l) | 70221824 | 512 + /* WriteTypeParametersInQualifiedName */ + ), J = eF(), ee = a && xr(a); + return J.writeNode( + 4, + R, + /*sourceFile*/ + ee, + xB(x) + ), x; + } + } + function Ur(r, a, l = 1064960, f = P3("")) { + const m = F.noErrorTruncation || l & 1, y = Ae.typeToTypeNode(r, a, vP(l) | 70221824 | (m ? 1 : 0)); + if (y === void 0) return E.fail("should always get typenode"); + const x = r !== ft ? gS() : vie(), I = a && xr(a); + x.writeNode( + 4, + y, + /*sourceFile*/ + I, + f + ); + const R = f.getText(), J = m ? wj * 2 : KE * 2; + return J && R && R.length >= J ? R.substr(0, J - 3) + "..." : R; + } + function pk(r, a) { + let l = V6(r.symbol) ? Ur(r, r.symbol.valueDeclaration) : Ur(r), f = V6(a.symbol) ? Ur(a, a.symbol.valueDeclaration) : Ur(a); + return l === f && (l = dk(r), f = dk(a)), [l, f]; + } + function dk(r) { + return Ur( + r, + /*enclosingDeclaration*/ + void 0, + 64 + /* UseFullyQualifiedType */ + ); + } + function V6(r) { + return r && !!r.valueDeclaration && ct(r.valueDeclaration) && !Sp(r.valueDeclaration); + } + function vP(r = 0) { + return r & 848330095; + } + function bP(r) { + return !!r.symbol && !!(r.symbol.flags & 32) && (r === Yc(r.symbol) || !!(r.flags & 524288) && !!(wn(r) & 16777216)); + } + function a8(r) { + return xi(r); + } + function SP() { + return { + typeToTypeNode: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => J(Ce, on)), + typePredicateToTypePredicateNode: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => ks(Ce, on)), + expressionOrTypeToTypeNode: (Ce, ue, Rt, mr, on, an) => I(mr, on, an, (Tn) => l(Tn, Ce, ue, Rt)), + serializeTypeForDeclaration: (Ce, ue, Rt, mr, on, an) => I(mr, on, an, (Tn) => uu(Tn, Ce, ue, Rt)), + serializeReturnTypeForSignature: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => Dt(on, Ce)), + indexInfoToIndexSignatureDeclaration: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => tr( + Ce, + on, + /*typeNode*/ + void 0 + )), + signatureToSignatureDeclaration: (Ce, ue, Rt, mr, on) => I(Rt, mr, on, (an) => Rr(Ce, ue, an)), + symbolToEntityName: (Ce, ue, Rt, mr, on) => I(Rt, mr, on, (an) => ku( + Ce, + an, + ue, + /*expectsIdentifier*/ + !1 + )), + symbolToExpression: (Ce, ue, Rt, mr, on) => I(Rt, mr, on, (an) => Xo(Ce, an, ue)), + symbolToTypeParameterDeclarations: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => Br(Ce, on)), + symbolToParameterDeclaration: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => is(Ce, on)), + typeParameterToDeclaration: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => qs(Ce, on)), + symbolTableToDeclarationStatements: (Ce, ue, Rt, mr) => I(ue, Rt, mr, (on) => Zs(Ce, on)), + symbolToNode: (Ce, ue, Rt, mr, on) => I(Rt, mr, on, (an) => x(Ce, an, ue)) + }; + function r(Ce, ue, Rt) { + const mr = a8(ue); + if (!Ce.mapper) return mr; + const on = Ji(mr, Ce.mapper); + return Rt && on !== mr ? void 0 : on; + } + function a(Ce, ue, Rt) { + return (!oo(ue) || !(ue.flags & 16) || !Ce.enclosingFile || Ce.enclosingFile !== xr(Zo(ue))) && (ue = N.cloneNode(ue)), ue === Rt || !Rt ? ue : !Ce.enclosingFile || Ce.enclosingFile !== xr(Zo(Rt)) ? kn(ue, Rt) : ot(kn(ue, Rt), Rt); + } + function l(Ce, ue, Rt, mr) { + const on = Ce.flags; + ue && !(Ce.flags & -2147483648) && ge.serializeTypeOfExpression(ue, Ce, mr), Ce.flags |= -2147483648; + const an = f(Ce, ue, Rt, mr); + return Ce.flags = on, an; + } + function f(Ce, ue, Rt, mr) { + if (ue) { + const on = J1(ue) ? ue.type : fS(ue) ? fD(ue) : void 0; + if (on && !yd(on)) { + const an = m(Ce, on, Rt, ue.parent, mr); + if (an) + return an; + } + } + return mr && (Rt = b1(Rt)), J(Rt, Ce); + } + function m(Ce, ue, Rt, mr, on) { + const an = Rt; + on && (Rt = b1(Rt)); + const Tn = y(Ce, ue, Rt, mr); + if (Tn) + return on && !Hp(r(Ce, ue), (Ci) => !!(Ci.flags & 32768)) ? N.createUnionTypeNode([Tn, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]) : Tn; + if (on && an !== Rt) { + const Ci = y(Ce, ue, an, mr); + if (Ci) + return N.createUnionTypeNode([Ci, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + } + function y(Ce, ue, Rt, mr = Ce.enclosingDeclaration, on = r( + Ce, + ue, + /*noMappedTypes*/ + !0 + )) { + if (on && XM(mr, Rt, on) && YP(ue, Rt)) { + const an = Hs(Ce, ue); + if (an) + return an; + } + } + function x(Ce, ue, Rt) { + if (ue.flags & 1073741824) { + if (Ce.valueDeclaration) { + const on = es(Ce.valueDeclaration); + if (on && oa(on)) return on; + } + const mr = Ni(Ce).nameType; + if (mr && mr.flags & 9216) + return ue.enclosingDeclaration = mr.symbol.valueDeclaration, N.createComputedPropertyName(Xo(mr.symbol, ue, Rt)); + } + return Xo(Ce, ue, Rt); + } + function I(Ce, ue, Rt, mr) { + const on = Rt?.trackSymbol ? Rt.moduleResolverHost : ue & 134217728 ? fMe(e) : void 0, an = { + enclosingDeclaration: Ce, + enclosingFile: Ce && xr(Ce), + flags: ue || 0, + tracker: void 0, + encounteredError: !1, + reportedDiagnostic: !1, + visitedTypes: void 0, + symbolDepth: void 0, + inferTypeParameters: void 0, + approximateLength: 0, + trackedSymbols: void 0, + bundled: !!F.outFile && !!Ce && A_(xr(Ce)), + truncating: !1, + usedSymbolNames: void 0, + remappedSymbolNames: void 0, + remappedSymbolReferences: void 0, + reverseMappedStack: void 0, + mustCreateTypeParameterSymbolList: !0, + typeParameterSymbolList: void 0, + mustCreateTypeParametersNamesLookups: !0, + typeParameterNames: void 0, + typeParameterNamesByText: void 0, + typeParameterNamesByTextNextNameCount: void 0, + mapper: void 0 + }; + an.tracker = new bne(an, Rt, on); + const Tn = mr(an); + return an.truncating && an.flags & 1 && an.tracker.reportTruncationError(), an.encounteredError ? void 0 : Tn; + } + function R(Ce) { + return Ce.truncating ? Ce.truncating : Ce.truncating = Ce.approximateLength > (Ce.flags & 1 ? wj : KE); + } + function J(Ce, ue) { + const Rt = ue.flags, mr = ee(Ce, ue); + return ue.flags = Rt, mr; + } + function ee(Ce, ue) { + var Rt, mr; + i && i.throwIfCancellationRequested && i.throwIfCancellationRequested(); + const on = ue.flags & 8388608; + if (ue.flags &= -8388609, !Ce) { + if (!(ue.flags & 262144)) { + ue.encounteredError = !0; + return; + } + return ue.approximateLength += 3, N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + if (ue.flags & 536870912 || (Ce = Wd(Ce)), Ce.flags & 1) + return Ce.aliasSymbol ? N.createTypeReferenceNode(Va(Ce.aliasSymbol), ht(Ce.aliasTypeArguments, ue)) : Ce === ft ? X4(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), 3, "unresolved") : (ue.approximateLength += 3, N.createKeywordTypeNode( + Ce === kt ? 141 : 133 + /* AnyKeyword */ + )); + if (Ce.flags & 2) + return N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + if (Ce.flags & 4) + return ue.approximateLength += 6, N.createKeywordTypeNode( + 154 + /* StringKeyword */ + ); + if (Ce.flags & 8) + return ue.approximateLength += 6, N.createKeywordTypeNode( + 150 + /* NumberKeyword */ + ); + if (Ce.flags & 64) + return ue.approximateLength += 6, N.createKeywordTypeNode( + 163 + /* BigIntKeyword */ + ); + if (Ce.flags & 16 && !Ce.aliasSymbol) + return ue.approximateLength += 7, N.createKeywordTypeNode( + 136 + /* BooleanKeyword */ + ); + if (Ce.flags & 1056) { + if (Ce.symbol.flags & 8) { + const pt = s_(Ce.symbol), $t = Ra( + pt, + ue, + 788968 + /* Type */ + ); + if (mo(pt) === Ce) + return $t; + const Ir = uc(Ce.symbol); + return X_( + Ir, + 1 + /* ES5 */ + ) ? Ye( + $t, + N.createTypeReferenceNode( + Ir, + /*typeArguments*/ + void 0 + ) + ) : Qm($t) ? ($t.isTypeOf = !0, N.createIndexedAccessTypeNode($t, N.createLiteralTypeNode(N.createStringLiteral(Ir)))) : Nf($t) ? N.createIndexedAccessTypeNode(N.createTypeQueryNode($t.typeName), N.createLiteralTypeNode(N.createStringLiteral(Ir))) : E.fail("Unhandled type node kind returned from `symbolToTypeNode`."); + } + return Ra( + Ce.symbol, + ue, + 788968 + /* Type */ + ); + } + if (Ce.flags & 128) + return ue.approximateLength += Ce.value.length + 2, N.createLiteralTypeNode(Kr( + N.createStringLiteral(Ce.value, !!(ue.flags & 268435456)), + 16777216 + /* NoAsciiEscaping */ + )); + if (Ce.flags & 256) { + const pt = Ce.value; + return ue.approximateLength += ("" + pt).length, N.createLiteralTypeNode(pt < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-pt)) : N.createNumericLiteral(pt)); + } + if (Ce.flags & 2048) + return ue.approximateLength += Eb(Ce.value).length + 1, N.createLiteralTypeNode(N.createBigIntLiteral(Ce.value)); + if (Ce.flags & 512) + return ue.approximateLength += Ce.intrinsicName.length, N.createLiteralTypeNode(Ce.intrinsicName === "true" ? N.createTrue() : N.createFalse()); + if (Ce.flags & 8192) { + if (!(ue.flags & 1048576)) { + if (su(Ce.symbol, ue.enclosingDeclaration)) + return ue.approximateLength += 6, Ra( + Ce.symbol, + ue, + 111551 + /* Value */ + ); + ue.tracker.reportInaccessibleUniqueSymbolError && ue.tracker.reportInaccessibleUniqueSymbolError(); + } + return ue.approximateLength += 13, N.createTypeOperatorNode(158, N.createKeywordTypeNode( + 155 + /* SymbolKeyword */ + )); + } + if (Ce.flags & 16384) + return ue.approximateLength += 4, N.createKeywordTypeNode( + 116 + /* VoidKeyword */ + ); + if (Ce.flags & 32768) + return ue.approximateLength += 9, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + ); + if (Ce.flags & 65536) + return ue.approximateLength += 4, N.createLiteralTypeNode(N.createNull()); + if (Ce.flags & 131072) + return ue.approximateLength += 5, N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ); + if (Ce.flags & 4096) + return ue.approximateLength += 6, N.createKeywordTypeNode( + 155 + /* SymbolKeyword */ + ); + if (Ce.flags & 67108864) + return ue.approximateLength += 6, N.createKeywordTypeNode( + 151 + /* ObjectKeyword */ + ); + if (U4(Ce)) + return ue.flags & 4194304 && (!ue.encounteredError && !(ue.flags & 32768) && (ue.encounteredError = !0), (mr = (Rt = ue.tracker).reportInaccessibleThisError) == null || mr.call(Rt)), ue.approximateLength += 4, N.createThisTypeNode(); + if (!on && Ce.aliasSymbol && (ue.flags & 16384 || ta(Ce.aliasSymbol, ue.enclosingDeclaration))) { + const pt = ht(Ce.aliasTypeArguments, ue); + return lg(Ce.aliasSymbol.escapedName) && !(Ce.aliasSymbol.flags & 32) ? N.createTypeReferenceNode(N.createIdentifier(""), pt) : Dr(pt) === 1 && Ce.aliasSymbol === Pe.symbol ? N.createArrayTypeNode(pt[0]) : Ra(Ce.aliasSymbol, ue, 788968, pt); + } + const an = wn(Ce); + if (an & 4) + return E.assert(!!(Ce.flags & 524288)), Ce.node ? Je(Ce, Et) : Et(Ce); + if (Ce.flags & 262144 || an & 3) { + if (Ce.flags & 262144 && ls(ue.inferTypeParameters, Ce)) { + ue.approximateLength += uc(Ce.symbol).length + 6; + let $t; + const Ir = a_(Ce); + if (Ir) { + const Gt = g3e( + Ce, + /*omitTypeReferences*/ + !0 + ); + Gt && Wh(Ir, Gt) || (ue.approximateLength += 9, $t = Ir && J(Ir, ue)); + } + return N.createInferTypeNode(Rn(Ce, ue, $t)); + } + if (ue.flags & 4 && Ce.flags & 262144) { + const $t = Js(Ce, ue); + return ue.approximateLength += dn($t).length, N.createTypeReferenceNode( + N.createIdentifier(dn($t)), + /*typeArguments*/ + void 0 + ); + } + if (Ce.symbol) + return Ra( + Ce.symbol, + ue, + 788968 + /* Type */ + ); + const pt = (Ce === y_ || Ce === Ao) && D && D.symbol ? (Ce === Ao ? "sub-" : "super-") + uc(D.symbol) : "?"; + return N.createTypeReferenceNode( + N.createIdentifier(pt), + /*typeArguments*/ + void 0 + ); + } + if (Ce.flags & 1048576 && Ce.origin && (Ce = Ce.origin), Ce.flags & 3145728) { + const pt = Ce.flags & 1048576 ? vL(Ce.types) : Ce.types; + if (Dr(pt) === 1) + return J(pt[0], ue); + const $t = ht( + pt, + ue, + /*isBareList*/ + !0 + ); + if ($t && $t.length > 0) + return Ce.flags & 1048576 ? N.createUnionTypeNode($t) : N.createIntersectionTypeNode($t); + !ue.encounteredError && !(ue.flags & 262144) && (ue.encounteredError = !0); + return; + } + if (an & 48) + return E.assert(!!(Ce.flags & 524288)), Ia(Ce); + if (Ce.flags & 4194304) { + const pt = Ce.type; + ue.approximateLength += 6; + const $t = J(pt, ue); + return N.createTypeOperatorNode(143, $t); + } + if (Ce.flags & 134217728) { + const pt = Ce.texts, $t = Ce.types, Ir = N.createTemplateHead(pt[0]), Gt = N.createNodeArray( + or($t, (Hr, Pn) => N.createTemplateLiteralTypeSpan( + J(Hr, ue), + (Pn < $t.length - 1 ? N.createTemplateMiddle : N.createTemplateTail)(pt[Pn + 1]) + )) + ); + return ue.approximateLength += 2, N.createTemplateLiteralType(Ir, Gt); + } + if (Ce.flags & 268435456) { + const pt = J(Ce.type, ue); + return Ra(Ce.symbol, ue, 788968, [pt]); + } + if (Ce.flags & 8388608) { + const pt = J(Ce.objectType, ue), $t = J(Ce.indexType, ue); + return ue.approximateLength += 2, N.createIndexedAccessTypeNode(pt, $t); + } + if (Ce.flags & 16777216) + return Je(Ce, (pt) => Tn(pt)); + if (Ce.flags & 33554432) { + const pt = J(Ce.baseType, ue), $t = eE(Ce) && $fe( + "NoInfer", + /*reportErrors*/ + !1 + ); + return $t ? Ra($t, ue, 788968, [pt]) : pt; + } + return E.fail("Should be unreachable."); + function Tn(pt) { + const $t = J(pt.checkType, ue); + if (ue.approximateLength += 15, ue.flags & 4 && pt.root.isDistributive && !(pt.checkType.flags & 262144)) { + const Wr = ff(va(262144, "T")), Un = Js(Wr, ue), Fn = N.createTypeReferenceNode(Un); + ue.approximateLength += 37; + const As = KS(pt.root.checkType, Wr, pt.mapper), zs = ue.inferTypeParameters; + ue.inferTypeParameters = pt.root.inferTypeParameters; + const So = J(Ji(pt.root.extendsType, As), ue); + ue.inferTypeParameters = zs; + const c_ = Ci(Ji(r(ue, pt.root.node.trueType), As)), mf = Ci(Ji(r(ue, pt.root.node.falseType), As)); + return N.createConditionalTypeNode( + $t, + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Fn.typeName) + )), + N.createConditionalTypeNode( + N.createTypeReferenceNode(N.cloneNode(Un)), + J(pt.checkType, ue), + N.createConditionalTypeNode(Fn, So, c_, mf), + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ), + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + } + const Ir = ue.inferTypeParameters; + ue.inferTypeParameters = pt.root.inferTypeParameters; + const Gt = J(pt.extendsType, ue); + ue.inferTypeParameters = Ir; + const Hr = Ci(Uv(pt)), Pn = Ci(qv(pt)); + return N.createConditionalTypeNode($t, Gt, Hr, Pn); + } + function Ci(pt) { + var $t, Ir, Gt; + return pt.flags & 1048576 ? ($t = ue.visitedTypes) != null && $t.has(Fl(pt)) ? (ue.flags & 131072 || (ue.encounteredError = !0, (Gt = (Ir = ue.tracker) == null ? void 0 : Ir.reportCyclicStructureError) == null || Gt.call(Ir)), Se(ue)) : Je(pt, (Hr) => J(Hr, ue)) : J(pt, ue); + } + function Bi(pt) { + return !!k8(pt); + } + function cs(pt) { + return !!pt.target && Bi(pt.target) && !Bi(pt); + } + function vs(pt) { + var $t; + E.assert(!!(pt.flags & 524288)); + const Ir = pt.declaration.readonlyToken ? N.createToken(pt.declaration.readonlyToken.kind) : void 0, Gt = pt.declaration.questionToken ? N.createToken(pt.declaration.questionToken.kind) : void 0; + let Hr, Pn; + const Wr = !Q6(pt) && !(p2(pt).flags & 2) && ue.flags & 4 && !(Xf(pt).flags & 262144 && (($t = a_(Xf(pt))) == null ? void 0 : $t.flags) & 4194304); + if (Q6(pt)) { + if (cs(pt) && ue.flags & 4) { + const c_ = ff(va(262144, "T")), mf = Js(c_, ue); + Pn = N.createTypeReferenceNode(mf); + } + Hr = N.createTypeOperatorNode(143, Pn || J(p2(pt), ue)); + } else if (Wr) { + const c_ = ff(va(262144, "T")), mf = Js(c_, ue); + Pn = N.createTypeReferenceNode(mf), Hr = Pn; + } else + Hr = J(Xf(pt), ue); + const Un = Rn(Jd(pt), ue, Hr), Fn = pt.declaration.nameType ? J(q0(pt), ue) : void 0, As = J(Hh(Jh(pt), !!(pg(pt) & 4)), ue), zs = N.createMappedTypeNode( + Ir, + Un, + Fn, + Gt, + As, + /*members*/ + void 0 + ); + ue.approximateLength += 10; + const So = Kr( + zs, + 1 + /* SingleLine */ + ); + if (cs(pt) && ue.flags & 4) { + const c_ = Ji(a_(r(ue, pt.declaration.typeParameter.constraint.type)) || yt, pt.mapper); + return N.createConditionalTypeNode( + J(p2(pt), ue), + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Pn.typeName), + c_.flags & 2 ? void 0 : J(c_, ue) + )), + So, + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + } else if (Wr) + return N.createConditionalTypeNode( + J(Xf(pt), ue), + N.createInferTypeNode(N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + N.cloneNode(Pn.typeName), + N.createTypeOperatorNode(143, J(p2(pt), ue)) + )), + So, + N.createKeywordTypeNode( + 146 + /* NeverKeyword */ + ) + ); + return So; + } + function Ia(pt) { + var $t, Ir; + const Gt = pt.id, Hr = pt.symbol; + if (Hr) { + if (!!(wn(pt) & 8388608)) { + const As = pt.node; + if (wb(As)) { + const zs = y(ue, As, pt); + if (zs) + return zs; + } + return ($t = ue.visitedTypes) != null && $t.has(Gt) ? Se(ue) : Je(pt, Ze); + } + const Un = bP(pt) ? 788968 : 111551; + if (Im(Hr.valueDeclaration)) + return Ra(Hr, ue, Un); + if (Hr.flags & 32 && !_G(Hr) && !(Hr.valueDeclaration && Qn(Hr.valueDeclaration) && ue.flags & 2048 && (!rl(Hr.valueDeclaration) || xm( + Hr, + ue.enclosingDeclaration, + Un, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0)) || Hr.flags & 896 || Pn()) + return Ra(Hr, ue, Un); + if ((Ir = ue.visitedTypes) != null && Ir.has(Gt)) { + const Fn = o8(pt); + return Fn ? Ra( + Fn, + ue, + 788968 + /* Type */ + ) : Se(ue); + } else + return Je(pt, Ze); + } else + return Ze(pt); + function Pn() { + var Wr; + const Un = !!(Hr.flags & 8192) && // typeof static method + ut(Hr.declarations, (As) => Os(As)), Fn = !!(Hr.flags & 16) && (Hr.parent || // is exported function symbol + rr( + Hr.declarations, + (As) => As.parent.kind === 307 || As.parent.kind === 268 + /* ModuleBlock */ + )); + if (Un || Fn) + return (!!(ue.flags & 4096) || ((Wr = ue.visitedTypes) == null ? void 0 : Wr.has(Gt))) && // it is type of the symbol uses itself recursively + (!(ue.flags & 8) || su(Hr, ue.enclosingDeclaration)); + } + } + function Je(pt, $t) { + var Ir, Gt, Hr; + const Pn = pt.id, Wr = wn(pt) & 16 && pt.symbol && pt.symbol.flags & 32, Un = wn(pt) & 4 && pt.node ? "N" + ja(pt.node) : pt.flags & 16777216 ? "N" + ja(pt.root.node) : pt.symbol ? (Wr ? "+" : "") + $s(pt.symbol) : void 0; + ue.visitedTypes || (ue.visitedTypes = /* @__PURE__ */ new Set()), Un && !ue.symbolDepth && (ue.symbolDepth = /* @__PURE__ */ new Map()); + const Fn = ue.enclosingDeclaration && bn(ue.enclosingDeclaration), As = `${Fl(pt)}|${ue.flags}`; + Fn && (Fn.serializedTypes || (Fn.serializedTypes = /* @__PURE__ */ new Map())); + const zs = (Ir = Fn?.serializedTypes) == null ? void 0 : Ir.get(As); + if (zs) + return (Gt = zs.trackedSymbols) == null || Gt.forEach( + ([q_, mE, C1]) => ue.tracker.trackSymbol( + q_, + mE, + C1 + ) + ), zs.truncating && (ue.truncating = !0), ue.approximateLength += zs.addedLength, w2(zs.node); + let So; + if (Un) { + if (So = ue.symbolDepth.get(Un) || 0, So > 10) + return Se(ue); + ue.symbolDepth.set(Un, So + 1); + } + ue.visitedTypes.add(Pn); + const c_ = ue.trackedSymbols; + ue.trackedSymbols = void 0; + const mf = ue.approximateLength, k1 = $t(pt), Kv = ue.approximateLength - mf; + return !ue.reportedDiagnostic && !ue.encounteredError && ((Hr = Fn?.serializedTypes) == null || Hr.set(As, { + node: k1, + truncating: ue.truncating, + addedLength: Kv, + trackedSymbols: ue.trackedSymbols + })), ue.visitedTypes.delete(Pn), Un && ue.symbolDepth.set(Un, So), ue.trackedSymbols = c_, k1; + function w2(q_) { + return !oo(q_) && Ki(q_) === q_ ? q_ : a(ue, N.cloneNode(gr( + q_, + w2, + /*context*/ + void 0, + Fm, + w2 + )), q_); + } + function Fm(q_, mE, C1, A2, iI) { + return q_ && q_.length === 0 ? ot(N.createNodeArray( + /*elements*/ + void 0, + q_.hasTrailingComma + ), q_) : Ar(q_, mE, C1, A2, iI); + } + } + function Ze(pt) { + if (B_(pt) || pt.containsError) + return vs(pt); + const $t = zd(pt); + if (!$t.properties.length && !$t.indexInfos.length) { + if (!$t.callSignatures.length && !$t.constructSignatures.length) + return ue.approximateLength += 2, Kr( + N.createTypeLiteralNode( + /*members*/ + void 0 + ), + 1 + /* SingleLine */ + ); + if ($t.callSignatures.length === 1 && !$t.constructSignatures.length) { + const Wr = $t.callSignatures[0]; + return Rr(Wr, 184, ue); + } + if ($t.constructSignatures.length === 1 && !$t.callSignatures.length) { + const Wr = $t.constructSignatures[0]; + return Rr(Wr, 185, ue); + } + } + const Ir = Ln($t.constructSignatures, (Wr) => !!(Wr.flags & 4)); + if (ut(Ir)) { + const Wr = or(Ir, (Fn) => $S(Fn)); + return $t.callSignatures.length + ($t.constructSignatures.length - Ir.length) + $t.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per + // the logic in `createTypeNodesFromResolvedType`. + (ue.flags & 2048 ? ty($t.properties, (Fn) => !(Fn.flags & 4194304)) : Dr($t.properties)) && Wr.push(_t($t)), J(Ys(Wr), ue); + } + const Gt = ue.flags; + ue.flags |= 4194304; + const Hr = Jt($t); + ue.flags = Gt; + const Pn = N.createTypeLiteralNode(Hr); + return ue.approximateLength += 2, Kr( + Pn, + ue.flags & 1024 ? 0 : 1 + /* SingleLine */ + ), Pn; + } + function Et(pt) { + let $t = Po(pt); + if (pt.target === Pe || pt.target === Ct) { + if (ue.flags & 2) { + const Hr = J($t[0], ue); + return N.createTypeReferenceNode(pt.target === Pe ? "Array" : "ReadonlyArray", [Hr]); + } + const Ir = J($t[0], ue), Gt = N.createArrayTypeNode(Ir); + return pt.target === Pe ? Gt : N.createTypeOperatorNode(148, Gt); + } else if (pt.target.objectFlags & 8) { + if ($t = Zc($t, (Ir, Gt) => Hh(Ir, !!(pt.target.elementFlags[Gt] & 2))), $t.length > 0) { + const Ir = G0(pt), Gt = ht($t.slice(0, Ir), ue); + if (Gt) { + const { labeledElementDeclarations: Hr } = pt.target; + for (let Wr = 0; Wr < Gt.length; Wr++) { + const Un = pt.target.elementFlags[Wr], Fn = Hr?.[Wr]; + Fn ? Gt[Wr] = N.createNamedTupleMember( + Un & 12 ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0, + N.createIdentifier(Pi(Xde(Fn))), + Un & 2 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + Un & 4 ? N.createArrayTypeNode(Gt[Wr]) : Gt[Wr] + ) : Gt[Wr] = Un & 12 ? N.createRestTypeNode(Un & 4 ? N.createArrayTypeNode(Gt[Wr]) : Gt[Wr]) : Un & 2 ? N.createOptionalTypeNode(Gt[Wr]) : Gt[Wr]; + } + const Pn = Kr( + N.createTupleTypeNode(Gt), + 1 + /* SingleLine */ + ); + return pt.target.readonly ? N.createTypeOperatorNode(148, Pn) : Pn; + } + } + if (ue.encounteredError || ue.flags & 524288) { + const Ir = Kr( + N.createTupleTypeNode([]), + 1 + /* SingleLine */ + ); + return pt.target.readonly ? N.createTypeOperatorNode(148, Ir) : Ir; + } + ue.encounteredError = !0; + return; + } else { + if (ue.flags & 2048 && pt.symbol.valueDeclaration && Qn(pt.symbol.valueDeclaration) && !su(pt.symbol, ue.enclosingDeclaration)) + return Ia(pt); + { + const Ir = pt.target.outerTypeParameters; + let Gt = 0, Hr; + if (Ir) { + const Fn = Ir.length; + for (; Gt < Fn; ) { + const As = Gt, zs = h3e(Ir[Gt]); + do + Gt++; + while (Gt < Fn && h3e(Ir[Gt]) === zs); + if (!oR(Ir, $t, As, Gt)) { + const So = ht($t.slice(As, Gt), ue), c_ = ue.flags; + ue.flags |= 16; + const mf = Ra(zs, ue, 788968, So); + ue.flags = c_, Hr = Hr ? Ye(Hr, mf) : mf; + } + } + } + let Pn; + if ($t.length > 0) { + const Fn = (pt.target.typeParameters || He).length; + Pn = ht($t.slice(Gt, Fn), ue); + } + const Wr = ue.flags; + ue.flags |= 16; + const Un = Ra(pt.symbol, ue, 788968, Pn); + return ue.flags = Wr, Hr ? Ye(Hr, Un) : Un; + } + } + } + function Ye(pt, $t) { + if (Qm(pt)) { + let Ir = pt.typeArguments, Gt = pt.qualifier; + Gt && (Re(Gt) ? Ir !== tS(Gt) && (Gt = h0(N.cloneNode(Gt), Ir)) : Ir !== tS(Gt.right) && (Gt = N.updateQualifiedName(Gt, Gt.left, h0(N.cloneNode(Gt.right), Ir)))), Ir = $t.typeArguments; + const Hr = Zt($t); + for (const Pn of Hr) + Gt = Gt ? N.createQualifiedName(Gt, Pn) : Pn; + return N.updateImportTypeNode( + pt, + pt.argument, + pt.attributes, + Gt, + Ir, + pt.isTypeOf + ); + } else { + let Ir = pt.typeArguments, Gt = pt.typeName; + Re(Gt) ? Ir !== tS(Gt) && (Gt = h0(N.cloneNode(Gt), Ir)) : Ir !== tS(Gt.right) && (Gt = N.updateQualifiedName(Gt, Gt.left, h0(N.cloneNode(Gt.right), Ir))), Ir = $t.typeArguments; + const Hr = Zt($t); + for (const Pn of Hr) + Gt = N.createQualifiedName(Gt, Pn); + return N.updateTypeReferenceNode( + pt, + Gt, + Ir + ); + } + } + function Zt(pt) { + let $t = pt.typeName; + const Ir = []; + for (; !Re($t); ) + Ir.unshift($t.right), $t = $t.left; + return Ir.unshift($t), Ir; + } + function Jt(pt) { + if (R(ue)) + return [N.createPropertySignature( + /*modifiers*/ + void 0, + "...", + /*questionToken*/ + void 0, + /*type*/ + void 0 + )]; + const $t = []; + for (const Hr of pt.callSignatures) + $t.push(Rr(Hr, 179, ue)); + for (const Hr of pt.constructSignatures) + Hr.flags & 4 || $t.push(Rr(Hr, 180, ue)); + for (const Hr of pt.indexInfos) + $t.push(tr(Hr, ue, pt.objectFlags & 1024 ? Se(ue) : void 0)); + const Ir = pt.properties; + if (!Ir) + return $t; + let Gt = 0; + for (const Hr of Ir) { + if (Gt++, ue.flags & 2048) { + if (Hr.flags & 4194304) + continue; + sp(Hr) & 6 && ue.tracker.reportPrivateInBaseOfClassExpression && ue.tracker.reportPrivateInBaseOfClassExpression(Pi(Hr.escapedName)); + } + if (R(ue) && Gt + 2 < Ir.length - 1) { + $t.push(N.createPropertySignature( + /*modifiers*/ + void 0, + `... ${Ir.length - Gt} more ...`, + /*questionToken*/ + void 0, + /*type*/ + void 0 + )), Ve(Ir[Ir.length - 1], ue, $t); + break; + } + Ve(Hr, ue, $t); + } + return $t.length ? $t : void 0; + } + } + function Se(Ce) { + return Ce.approximateLength += 3, Ce.flags & 1 ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : N.createTypeReferenceNode( + N.createIdentifier("..."), + /*typeArguments*/ + void 0 + ); + } + function me(Ce, ue) { + var Rt; + return !!(gc(Ce) & 8192) && (ls(ue.reverseMappedStack, Ce) || ((Rt = ue.reverseMappedStack) == null ? void 0 : Rt[0]) && !(wn(ia(ue.reverseMappedStack).links.propertyType) & 16)); + } + function Ve(Ce, ue, Rt) { + var mr; + const on = !!(gc(Ce) & 8192), an = me(Ce, ue) ? Ne : u1(Ce), Tn = ue.enclosingDeclaration; + if (ue.enclosingDeclaration = void 0, ue.tracker.canTrackSymbol && p8(Ce.escapedName)) + if (Ce.declarations) { + const Ze = fa(Ce.declarations); + if (PL(Ze)) + if (cn(Ze)) { + const Et = es(Ze); + Et && ho(Et) && O3(Et.argumentExpression) && Xl(Et.argumentExpression, Tn, ue); + } else + Xl(Ze.name.expression, Tn, ue); + } else + ue.tracker.reportNonSerializableProperty(Si(Ce)); + ue.enclosingDeclaration = Ce.valueDeclaration || ((mr = Ce.declarations) == null ? void 0 : mr[0]) || Tn; + const Ci = Tc(Ce, ue); + if (ue.enclosingDeclaration = Tn, ue.approximateLength += uc(Ce).length + 1, Ce.flags & 98304) { + const Ze = l1(Ce); + if (an !== Ze && !Aa(an) && !Aa(Ze)) { + const Et = Jo( + Ce, + 177 + /* GetAccessor */ + ), Ye = Qf(Et); + Rt.push( + mt( + ue, + Rr(Ye, 177, ue, { name: Ci }), + Et + ) + ); + const Zt = Jo( + Ce, + 178 + /* SetAccessor */ + ), Jt = Qf(Zt); + Rt.push( + mt( + ue, + Rr(Jt, 178, ue, { name: Ci }), + Zt + ) + ); + return; + } + } + const Bi = Ce.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0; + if (Ce.flags & 8208 && !f1(an).length && !Hd(Ce)) { + const Ze = xs( + Jc(an, (Et) => !(Et.flags & 32768)), + 0 + /* Call */ + ); + for (const Et of Ze) { + const Ye = Rr(Et, 173, ue, { name: Ci, questionToken: Bi }); + Rt.push(Je(Ye)); + } + if (Ze.length || !Bi) + return; + } + let cs; + me(Ce, ue) ? cs = Se(ue) : (on && (ue.reverseMappedStack || (ue.reverseMappedStack = []), ue.reverseMappedStack.push(Ce)), cs = an ? uu( + ue, + /*declaration*/ + void 0, + an, + Ce + ) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), on && ue.reverseMappedStack.pop()); + const vs = Hd(Ce) ? [N.createToken( + 148 + /* ReadonlyKeyword */ + )] : void 0; + vs && (ue.approximateLength += 9); + const Ia = N.createPropertySignature( + vs, + Ci, + Bi, + cs + ); + Rt.push(Je(Ia)); + function Je(Ze) { + var Et; + const Ye = (Et = Ce.declarations) == null ? void 0 : Et.find( + (Zt) => Zt.kind === 348 + /* JSDocPropertyTag */ + ); + if (Ye) { + const Zt = Dw(Ye.comment); + Zt && Z1(Ze, [{ kind: 3, text: `* + * ` + Zt.replace(/\n/g, ` + * `) + ` + `, pos: -1, end: -1, hasTrailingNewLine: !0 }]); + } else Ce.valueDeclaration && mt(ue, Ze, Ce.valueDeclaration); + return Ze; + } + } + function mt(Ce, ue, Rt) { + return Ce.enclosingFile && Ce.enclosingFile === xr(Rt) ? el(ue, Rt) : ue; + } + function ht(Ce, ue, Rt) { + if (ut(Ce)) { + if (R(ue)) + if (Rt) { + if (Ce.length > 2) + return [ + J(Ce[0], ue), + N.createTypeReferenceNode( + `... ${Ce.length - 2} more ...`, + /*typeArguments*/ + void 0 + ), + J(Ce[Ce.length - 1], ue) + ]; + } else return [N.createTypeReferenceNode( + "...", + /*typeArguments*/ + void 0 + )]; + const on = !(ue.flags & 64) ? Kf() : void 0, an = []; + let Tn = 0; + for (const Ci of Ce) { + if (Tn++, R(ue) && Tn + 2 < Ce.length - 1) { + an.push(N.createTypeReferenceNode( + `... ${Ce.length - Tn} more ...`, + /*typeArguments*/ + void 0 + )); + const cs = J(Ce[Ce.length - 1], ue); + cs && an.push(cs); + break; + } + ue.approximateLength += 2; + const Bi = J(Ci, ue); + Bi && (an.push(Bi), on && pee(Bi) && on.add(Bi.typeName.escapedText, [Ci, an.length - 1])); + } + if (on) { + const Ci = ue.flags; + ue.flags |= 64, on.forEach((Bi) => { + if (!dee(Bi, ([cs], [vs]) => er(cs, vs))) + for (const [cs, vs] of Bi) + an[vs] = J(cs, ue); + }), ue.flags = Ci; + } + return an; + } + } + function er(Ce, ue) { + return Ce === ue || !!Ce.symbol && Ce.symbol === ue.symbol || !!Ce.aliasSymbol && Ce.aliasSymbol === ue.aliasSymbol; + } + function tr(Ce, ue, Rt) { + const mr = SZ(Ce) || "x", on = J(Ce.keyType, ue), an = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + mr, + /*questionToken*/ + void 0, + on, + /*initializer*/ + void 0 + ); + return Rt || (Rt = J(Ce.type || Ne, ue)), !Ce.type && !(ue.flags & 2097152) && (ue.encounteredError = !0), ue.approximateLength += mr.length + 4, N.createIndexSignature( + Ce.isReadonly ? [N.createToken( + 148 + /* ReadonlyKeyword */ + )] : void 0, + [an], + Rt + ); + } + function Rr(Ce, ue, Rt, mr) { + var on; + let an, Tn; + const Ci = Hwe( + Ce, + /*skipUnionExpanding*/ + !0 + )[0], Bi = Fr(Rt, Ce.declaration, Ci, Ce.typeParameters, Ce.parameters, Ce.mapper); + Rt.approximateLength += 3, Rt.flags & 32 && Ce.target && Ce.mapper && Ce.target.typeParameters ? Tn = Ce.target.typeParameters.map((Ye) => J(Ji(Ye, Ce.mapper), Rt)) : an = Ce.typeParameters && Ce.typeParameters.map((Ye) => qs(Ye, Rt)); + const cs = Rt.flags; + Rt.flags &= -257; + const vs = (ut(Ci, (Ye) => Ye !== Ci[Ci.length - 1] && !!(gc(Ye) & 32768)) ? Ce.parameters : Ci).map((Ye) => is( + Ye, + Rt, + ue === 176 + /* Constructor */ + )), Ia = Rt.flags & 33554432 ? void 0 : En(Ce, Rt); + Ia && vs.unshift(Ia), Rt.flags = cs; + const Je = Dt(Rt, Ce); + let Ze = mr?.modifiers; + if (ue === 185 && Ce.flags & 4) { + const Ye = sm(Ze); + Ze = N.createModifiersFromModifierFlags( + Ye | 64 + /* Abstract */ + ); + } + const Et = ue === 179 ? N.createCallSignature(an, vs, Je) : ue === 180 ? N.createConstructSignature(an, vs, Je) : ue === 173 ? N.createMethodSignature(Ze, mr?.name ?? N.createIdentifier(""), mr?.questionToken, an, vs, Je) : ue === 174 ? N.createMethodDeclaration( + Ze, + /*asteriskToken*/ + void 0, + mr?.name ?? N.createIdentifier(""), + /*questionToken*/ + void 0, + an, + vs, + Je, + /*body*/ + void 0 + ) : ue === 176 ? N.createConstructorDeclaration( + Ze, + vs, + /*body*/ + void 0 + ) : ue === 177 ? N.createGetAccessorDeclaration( + Ze, + mr?.name ?? N.createIdentifier(""), + vs, + Je, + /*body*/ + void 0 + ) : ue === 178 ? N.createSetAccessorDeclaration( + Ze, + mr?.name ?? N.createIdentifier(""), + vs, + /*body*/ + void 0 + ) : ue === 181 ? N.createIndexSignature(Ze, vs, Je) : ue === 317 ? N.createJSDocFunctionType(vs, Je) : ue === 184 ? N.createFunctionTypeNode(an, vs, Je ?? N.createTypeReferenceNode(N.createIdentifier(""))) : ue === 185 ? N.createConstructorTypeNode(Ze, an, vs, Je ?? N.createTypeReferenceNode(N.createIdentifier(""))) : ue === 262 ? N.createFunctionDeclaration( + Ze, + /*asteriskToken*/ + void 0, + mr?.name ? Is(mr.name, Re) : N.createIdentifier(""), + an, + vs, + Je, + /*body*/ + void 0 + ) : ue === 218 ? N.createFunctionExpression( + Ze, + /*asteriskToken*/ + void 0, + mr?.name ? Is(mr.name, Re) : N.createIdentifier(""), + an, + vs, + Je, + N.createBlock([]) + ) : ue === 219 ? N.createArrowFunction( + Ze, + an, + vs, + Je, + /*equalsGreaterThanToken*/ + void 0, + N.createBlock([]) + ) : E.assertNever(ue); + if (Tn && (Et.typeArguments = N.createNodeArray(Tn)), ((on = Ce.declaration) == null ? void 0 : on.kind) === 323 && Ce.declaration.parent.kind === 339) { + const Ye = sc( + Ce.declaration.parent.parent, + /*includeTrivia*/ + !0 + ).slice(2, -2).split(/\r\n|\n|\r/).map((Zt) => Zt.replace(/^\s+/, " ")).join(` +`); + X4( + Et, + 3, + Ye, + /*hasTrailingNewLine*/ + !0 + ); + } + return Bi?.(), Et; + } + function vn(Ce) { + return ps(Ce) || Th(Ce) || iS(Ce); + } + function cr(Ce) { + return ps(Ce) || Th(Ce) ? Qf(Ce).typeParameters : Ab(Ce) ? ppe(Ce) : [Zg(xn(Ce.typeParameter))]; + } + function Cr(Ce) { + return ps(Ce) || Th(Ce) ? Qf(Ce).parameters : void 0; + } + function Fr(Ce, ue, Rt, mr, on, an) { + const Tn = Qh(Ce); + let Ci, Bi; + const cs = Ce.enclosingDeclaration, vs = Ce.mapper; + if (an && (Ce.mapper = an), Ce.enclosingDeclaration && ue) { + let Ia = function(Je, Ze) { + E.assert(Ce.enclosingDeclaration); + let Et; + bn(Ce.enclosingDeclaration).fakeScopeForSignatureDeclaration === Je ? Et = Ce.enclosingDeclaration : Ce.enclosingDeclaration.parent && bn(Ce.enclosingDeclaration.parent).fakeScopeForSignatureDeclaration === Je && (Et = Ce.enclosingDeclaration.parent), E.assertOptionalNode(Et, ms); + const Ye = Et?.locals ?? Ms(); + let Zt, Jt; + if (Ze((pt, $t) => { + if (Et) { + const Ir = Ye.get(pt); + Ir ? Jt = Tr(Jt, { name: pt, oldSymbol: Ir }) : Zt = Tr(Zt, pt); + } + Ye.set(pt, $t); + }), Et) + return function() { + rr(Zt, ($t) => Ye.delete($t)), rr(Jt, ($t) => Ye.set($t.name, $t.oldSymbol)); + }; + { + const pt = N.createBlock(He); + bn(pt).fakeScopeForSignatureDeclaration = Je, pt.locals = Ye, Da(pt, Ce.enclosingDeclaration), Ce.enclosingDeclaration = pt; + } + }; + Ci = ut(Rt) ? Ia( + "params", + (Je) => { + if (Rt) + for (let Ze = 0; Ze < Rt.length; Ze++) { + const Et = Rt[Ze], Ye = on?.[Ze]; + on && Ye !== Et ? (Je(Et.escapedName, nt), Ye && Je(Ye.escapedName, nt)) : rr(Et.declarations, (Zt) => { + if (ji(Zt) && Ts(Zt.name)) + return Jt(Zt.name), !0; + return; + function Jt($t) { + rr($t.elements, (Ir) => { + switch (Ir.kind) { + case 232: + return; + case 208: + return pt(Ir); + default: + return E.assertNever(Ir); + } + }); + } + function pt($t) { + if (Ts($t.name)) + return Jt($t.name); + const Ir = xn($t); + Je(Ir.escapedName, Ir); + } + }) || Je(Et.escapedName, Et); + } + } + ) : void 0, Ce.flags & 4 && ut(mr) && (Bi = Ia( + "typeParams", + (Je) => { + for (const Ze of mr ?? He) { + const Et = Js(Ze, Ce).escapedText; + Je(Et, Ze.symbol); + } + } + )); + } + return () => { + Ci?.(), Bi?.(), Tn(), Ce.enclosingDeclaration = cs, Ce.mapper = vs; + }; + } + function En(Ce, ue) { + if (Ce.thisParameter) + return is(Ce.thisParameter, ue); + if (Ce.declaration && Qr(Ce.declaration)) { + const Rt = MI(Ce.declaration); + if (Rt && Rt.typeExpression) + return N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + J(r(ue, Rt.typeExpression), ue) + ); + } + } + function Rn(Ce, ue, Rt) { + const mr = ue.flags; + ue.flags &= -513; + const on = N.createModifiersFromModifierFlags(Npe(Ce)), an = Js(Ce, ue), Tn = GS(Ce), Ci = Tn && J(Tn, ue); + return ue.flags = mr, N.createTypeParameterDeclaration(on, an, Rt, Ci); + } + function jn(Ce, ue, Rt) { + return ue && y(Rt, ue, Ce) || J(Ce, Rt); + } + function qs(Ce, ue, Rt = a_(Ce)) { + const mr = Rt && jn(Rt, xG(Ce), ue); + return Rn(Ce, ue, mr); + } + function ks(Ce, ue) { + const Rt = Ce.kind === 2 || Ce.kind === 3 ? N.createToken( + 131 + /* AssertsKeyword */ + ) : void 0, mr = Ce.kind === 1 || Ce.kind === 3 ? Kr( + N.createIdentifier(Ce.parameterName), + 16777216 + /* NoAsciiEscaping */ + ) : N.createThisTypeNode(), on = Ce.type && J(Ce.type, ue); + return N.createTypePredicateNode(Rt, mr, on); + } + function xa(Ce) { + const ue = Jo( + Ce, + 169 + /* Parameter */ + ); + if (ue) + return ue; + if (!qm(Ce)) + return Jo( + Ce, + 341 + /* JSDocParameterTag */ + ); + } + function is(Ce, ue, Rt) { + const mr = xa(Ce), on = Zr(Ce), an = uu(ue, mr, on, Ce), Tn = !(ue.flags & 8192) && Rt && mr && ed(mr) ? or(sb(mr), N.cloneNode) : void 0, Bi = mr && Um(mr) || gc(Ce) & 32768 ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0, cs = $o(Ce, mr, ue), Ia = mr && LL(mr) || gc(Ce) & 16384 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, Je = N.createParameterDeclaration( + Tn, + Bi, + cs, + Ia, + an, + /*initializer*/ + void 0 + ); + return ue.approximateLength += uc(Ce).length + 3, Je; + } + function $o(Ce, ue, Rt) { + return ue && ue.name ? ue.name.kind === 80 ? Kr( + N.cloneNode(ue.name), + 16777216 + /* NoAsciiEscaping */ + ) : ue.name.kind === 166 ? Kr( + N.cloneNode(ue.name.right), + 16777216 + /* NoAsciiEscaping */ + ) : mr(ue.name) : uc(Ce); + function mr(on) { + return an(on); + function an(Tn) { + Rt.tracker.canTrackSymbol && oa(Tn) && mG(Tn) && Xl(Tn.expression, Rt.enclosingDeclaration, Rt); + let Ci = gr( + Tn, + an, + /*context*/ + void 0, + /*nodesVisitor*/ + void 0, + an + ); + return da(Ci) && (Ci = N.updateBindingElement( + Ci, + Ci.dotDotDotToken, + Ci.propertyName, + Ci.name, + /*initializer*/ + void 0 + )), oo(Ci) || (Ci = N.cloneNode(Ci)), Kr( + Ci, + 16777217 + /* NoAsciiEscaping */ + ); + } + } + } + function Xl(Ce, ue, Rt) { + if (!Rt.tracker.canTrackSymbol) return; + const mr = tf(Ce), on = Kt( + mr, + mr.escapedText, + 1160127, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + on && Rt.tracker.trackSymbol( + on, + ue, + 111551 + /* Value */ + ); + } + function dc(Ce, ue, Rt, mr) { + return ue.tracker.trackSymbol(Ce, ue.enclosingDeclaration, Rt), Sr(Ce, ue, Rt, mr); + } + function Sr(Ce, ue, Rt, mr) { + let on; + return !(Ce.flags & 262144) && (ue.enclosingDeclaration || ue.flags & 64) && !(ue.flags & 134217728) ? (on = E.checkDefined(Tn( + Ce, + Rt, + /*endOfChain*/ + !0 + )), E.assert(on && on.length > 0)) : on = [Ce], on; + function Tn(Ci, Bi, cs) { + let vs = Ui(Ci, ue.enclosingDeclaration, Bi, !!(ue.flags & 128)), Ia; + if (!vs || Zi(vs[0], ue.enclosingDeclaration, vs.length === 1 ? Bi : Hn(Bi))) { + const Ze = J6(vs ? vs[0] : Ci, ue.enclosingDeclaration, Bi); + if (Dr(Ze)) { + Ia = Ze.map( + (Zt) => ut(Zt.declarations, Rh) ? Mi(Zt, ue) : void 0 + ); + const Et = Ze.map((Zt, Jt) => Jt); + Et.sort(Je); + const Ye = Et.map((Zt) => Ze[Zt]); + for (const Zt of Ye) { + const Jt = Tn( + Zt, + Hn(Bi), + /*endOfChain*/ + !1 + ); + if (Jt) { + if (Zt.exports && Zt.exports.get( + "export=" + /* ExportEquals */ + ) && Rd(Zt.exports.get( + "export=" + /* ExportEquals */ + ), Ci)) { + vs = Jt; + break; + } + vs = Jt.concat(vs || [Qg(Zt, Ci) || Ci]); + break; + } + } + } + } + if (vs) + return vs; + if ( + // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols. + cs || // If a parent symbol is an anonymous type, don't write it. + !(Ci.flags & 6144) + ) + return !cs && !mr && rr(Ci.declarations, Rh) ? void 0 : [Ci]; + function Je(Ze, Et) { + const Ye = Ia[Ze], Zt = Ia[Et]; + if (Ye && Zt) { + const Jt = Df(Zt); + return Df(Ye) === Jt ? BO(Ye) - BO(Zt) : Jt ? -1 : 1; + } + return 0; + } + } + } + function Br(Ce, ue) { + let Rt; + return fE(Ce).flags & 524384 && (Rt = N.createNodeArray(or(U0(Ce), (on) => qs(on, ue)))), Rt; + } + function ki(Ce, ue, Rt) { + var mr; + E.assert(Ce && 0 <= ue && ue < Ce.length); + const on = Ce[ue], an = $s(on); + if ((mr = Rt.typeParameterSymbolList) != null && mr.has(an)) + return; + Rt.mustCreateTypeParameterSymbolList && (Rt.mustCreateTypeParameterSymbolList = !1, Rt.typeParameterSymbolList = new Set(Rt.typeParameterSymbolList)), Rt.typeParameterSymbolList.add(an); + let Tn; + if (Rt.flags & 512 && ue < Ce.length - 1) { + const Ci = on, Bi = Ce[ue + 1]; + if (gc(Bi) & 1) { + const cs = xL( + Ci.flags & 2097152 ? Ec(Ci) : Ci + ); + Tn = ht(or(cs, (vs) => Q0(vs, Bi.links.mapper)), Rt); + } else + Tn = Br(on, Rt); + } + return Tn; + } + function pn(Ce) { + return Nb(Ce.objectType) ? pn(Ce.objectType) : Ce; + } + function Mi(Ce, ue, Rt) { + let mr = Jo( + Ce, + 307 + /* SourceFile */ + ); + if (!mr) { + const cs = xc(Ce.declarations, (vs) => Ov(vs, Ce)); + cs && (mr = Jo( + cs, + 307 + /* SourceFile */ + )); + } + if (mr && mr.moduleName !== void 0) + return mr.moduleName; + if (!mr && hne.test(Ce.escapedName)) + return Ce.escapedName.substring(1, Ce.escapedName.length - 1); + if (!ue.enclosingFile || !ue.tracker.moduleResolverHost) + return hne.test(Ce.escapedName) ? Ce.escapedName.substring(1, Ce.escapedName.length - 1) : xr(Jj(Ce)).fileName; + const on = ue.enclosingFile, an = Rt || on?.impliedNodeFormat, Tn = bD(on.path, an), Ci = Ni(Ce); + let Bi = Ci.specifierCache && Ci.specifierCache.get(Tn); + if (!Bi) { + const cs = !!F.outFile, { moduleResolverHost: vs } = ue.tracker, Ia = cs ? { ...F, baseUrl: vs.getCommonSourceDirectory() } : F; + Bi = fa(N1e( + Ce, + Vt, + Ia, + on, + vs, + { + importModuleSpecifierPreference: cs ? "non-relative" : "project-relative", + importModuleSpecifierEnding: cs ? "minimal" : an === 99 ? "js" : void 0 + }, + { overrideImportMode: Rt } + )), Ci.specifierCache ?? (Ci.specifierCache = /* @__PURE__ */ new Map()), Ci.specifierCache.set(Tn, Bi); + } + return Bi; + } + function Va(Ce) { + const ue = N.createIdentifier(Pi(Ce.escapedName)); + return Ce.parent ? N.createQualifiedName(Va(Ce.parent), ue) : ue; + } + function Ra(Ce, ue, Rt, mr) { + const on = dc(Ce, ue, Rt, !(ue.flags & 16384)), an = Rt === 111551; + if (ut(on[0].declarations, Rh)) { + const Bi = on.length > 1 ? Ci(on, on.length - 1, 1) : void 0, cs = mr || ki(on, 0, ue), vs = xr(Zo(ue.enclosingDeclaration)), Ia = r7(on[0]); + let Je, Ze; + if ((Hu(F) === 3 || Hu(F) === 99) && Ia?.impliedNodeFormat === 99 && Ia.impliedNodeFormat !== vs?.impliedNodeFormat && (Je = Mi( + on[0], + ue, + 99 + /* ESNext */ + ), Ze = N.createImportAttributes( + N.createNodeArray([ + N.createImportAttribute( + N.createStringLiteral("resolution-mode"), + N.createStringLiteral("import") + ) + ]) + )), Je || (Je = Mi(on[0], ue)), !(ue.flags & 67108864) && Hu(F) !== 1 && Je.includes("/node_modules/")) { + const Ye = Je; + if (Hu(F) === 3 || Hu(F) === 99) { + const Zt = vs?.impliedNodeFormat === 99 ? 1 : 99; + Je = Mi(on[0], ue, Zt), Je.includes("/node_modules/") ? Je = Ye : Ze = N.createImportAttributes( + N.createNodeArray([ + N.createImportAttribute( + N.createStringLiteral("resolution-mode"), + N.createStringLiteral(Zt === 99 ? "import" : "require") + ) + ]) + ); + } + Ze || (ue.encounteredError = !0, ue.tracker.reportLikelyUnsafeImportRequiredError && ue.tracker.reportLikelyUnsafeImportRequiredError(Ye)); + } + const Et = N.createLiteralTypeNode(N.createStringLiteral(Je)); + if (ue.approximateLength += Je.length + 10, !Bi || l_(Bi)) { + if (Bi) { + const Ye = Re(Bi) ? Bi : Bi.right; + h0( + Ye, + /*typeArguments*/ + void 0 + ); + } + return N.createImportTypeNode(Et, Ze, Bi, cs, an); + } else { + const Ye = pn(Bi), Zt = Ye.objectType.typeName; + return N.createIndexedAccessTypeNode(N.createImportTypeNode(Et, Ze, Zt, cs, an), Ye.indexType); + } + } + const Tn = Ci(on, on.length - 1, 0); + if (Nb(Tn)) + return Tn; + if (an) + return N.createTypeQueryNode(Tn); + { + const Bi = Re(Tn) ? Tn : Tn.right, cs = tS(Bi); + return h0( + Bi, + /*typeArguments*/ + void 0 + ), N.createTypeReferenceNode(Tn, cs); + } + function Ci(Bi, cs, vs) { + const Ia = cs === Bi.length - 1 ? mr : ki(Bi, cs, ue), Je = Bi[cs], Ze = Bi[cs - 1]; + let Et; + if (cs === 0) + ue.flags |= 16777216, Et = ug(Je, ue), ue.approximateLength += (Et ? Et.length : 0) + 1, ue.flags ^= 16777216; + else if (Ze && _f(Ze)) { + const Zt = _f(Ze); + Dl(Zt, (Jt, pt) => { + if (Rd(Jt, Je) && !p8(pt) && pt !== "export=") + return Et = Pi(pt), !0; + }); + } + if (Et === void 0) { + const Zt = xc(Je.declarations, es); + if (Zt && oa(Zt) && l_(Zt.expression)) { + const Jt = Ci(Bi, cs - 1, vs); + return l_(Jt) ? N.createIndexedAccessTypeNode(N.createParenthesizedType(N.createTypeQueryNode(Jt)), N.createTypeQueryNode(Zt.expression)) : Jt; + } + Et = ug(Je, ue); + } + if (ue.approximateLength += Et.length + 1, !(ue.flags & 16) && Ze && _1(Ze) && _1(Ze).get(Je.escapedName) && Rd(_1(Ze).get(Je.escapedName), Je)) { + const Zt = Ci(Bi, cs - 1, vs); + return Nb(Zt) ? N.createIndexedAccessTypeNode(Zt, N.createLiteralTypeNode(N.createStringLiteral(Et))) : N.createIndexedAccessTypeNode(N.createTypeReferenceNode(Zt, Ia), N.createLiteralTypeNode(N.createStringLiteral(Et))); + } + const Ye = Kr( + N.createIdentifier(Et), + 16777216 + /* NoAsciiEscaping */ + ); + if (Ia && h0(Ye, N.createNodeArray(Ia)), Ye.symbol = Je, cs > vs) { + const Zt = Ci(Bi, cs - 1, vs); + return l_(Zt) ? N.createQualifiedName(Zt, Ye) : E.fail("Impossible construct - an export of an indexed access cannot be reachable"); + } + return Ye; + } + } + function lu(Ce, ue, Rt) { + const mr = Kt( + ue.enclosingDeclaration, + Ce, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + return mr && mr.flags & 262144 ? mr !== Rt.symbol : !1; + } + function Js(Ce, ue) { + var Rt, mr, on, an; + if (ue.flags & 4 && ue.typeParameterNames) { + const Bi = ue.typeParameterNames.get(Fl(Ce)); + if (Bi) + return Bi; + } + let Tn = ku( + Ce.symbol, + ue, + 788968, + /*expectsIdentifier*/ + !0 + ); + if (!(Tn.kind & 80)) + return N.createIdentifier("(Missing type parameter)"); + const Ci = (mr = (Rt = Ce.symbol) == null ? void 0 : Rt.declarations) == null ? void 0 : mr[0]; + if (Ci && Mo(Ci) && (Tn = a(ue, Tn, Ci.name)), ue.flags & 4) { + const Bi = Tn.escapedText; + let cs = ((on = ue.typeParameterNamesByTextNextNameCount) == null ? void 0 : on.get(Bi)) || 0, vs = Bi; + for (; (an = ue.typeParameterNamesByText) != null && an.has(vs) || lu(vs, ue, Ce); ) + cs++, vs = `${Bi}_${cs}`; + if (vs !== Bi) { + const Ia = tS(Tn); + Tn = N.createIdentifier(vs), h0(Tn, Ia); + } + ue.mustCreateTypeParametersNamesLookups && (ue.mustCreateTypeParametersNamesLookups = !1, ue.typeParameterNames = new Map(ue.typeParameterNames), ue.typeParameterNamesByTextNextNameCount = new Map(ue.typeParameterNamesByTextNextNameCount), ue.typeParameterNamesByText = new Set(ue.typeParameterNamesByText)), ue.typeParameterNamesByTextNextNameCount.set(Bi, cs), ue.typeParameterNames.set(Fl(Ce), Tn), ue.typeParameterNamesByText.add(vs); + } + return Tn; + } + function ku(Ce, ue, Rt, mr) { + const on = dc(Ce, ue, Rt); + return mr && on.length !== 1 && !ue.encounteredError && !(ue.flags & 65536) && (ue.encounteredError = !0), an(on, on.length - 1); + function an(Tn, Ci) { + const Bi = ki(Tn, Ci, ue), cs = Tn[Ci]; + Ci === 0 && (ue.flags |= 16777216); + const vs = ug(cs, ue); + Ci === 0 && (ue.flags ^= 16777216); + const Ia = Kr( + N.createIdentifier(vs), + 16777216 + /* NoAsciiEscaping */ + ); + return Bi && h0(Ia, N.createNodeArray(Bi)), Ia.symbol = cs, Ci > 0 ? N.createQualifiedName(an(Tn, Ci - 1), Ia) : Ia; + } + } + function Xo(Ce, ue, Rt) { + const mr = dc(Ce, ue, Rt); + return on(mr, mr.length - 1); + function on(an, Tn) { + const Ci = ki(an, Tn, ue), Bi = an[Tn]; + Tn === 0 && (ue.flags |= 16777216); + let cs = ug(Bi, ue); + Tn === 0 && (ue.flags ^= 16777216); + let vs = cs.charCodeAt(0); + if (a3(vs) && ut(Bi.declarations, Rh)) + return N.createStringLiteral(Mi(Bi, ue)); + if (Tn === 0 || fJ(cs, V)) { + const Ia = Kr( + N.createIdentifier(cs), + 16777216 + /* NoAsciiEscaping */ + ); + return Ci && h0(Ia, N.createNodeArray(Ci)), Ia.symbol = Bi, Tn > 0 ? N.createPropertyAccessExpression(on(an, Tn - 1), Ia) : Ia; + } else { + vs === 91 && (cs = cs.substring(1, cs.length - 1), vs = cs.charCodeAt(0)); + let Ia; + if (a3(vs) && !(Bi.flags & 8) ? Ia = N.createStringLiteral( + Op(cs).replace(/\\./g, (Je) => Je.substring(1)), + vs === 39 + /* singleQuote */ + ) : "" + +cs === cs && (Ia = N.createNumericLiteral(+cs)), !Ia) { + const Je = Kr( + N.createIdentifier(cs), + 16777216 + /* NoAsciiEscaping */ + ); + Ci && h0(Je, N.createNodeArray(Ci)), Je.symbol = Bi, Ia = Je; + } + return N.createElementAccessExpression(on(an, Tn - 1), Ia); + } + } + } + function Qo(Ce) { + const ue = es(Ce); + return ue ? oa(ue) ? !!(qi(ue.expression).flags & 402653316) : ho(ue) ? !!(qi(ue.argumentExpression).flags & 402653316) : Ks(ue) : !1; + } + function Yf(Ce) { + const ue = es(Ce); + return !!(ue && Ks(ue) && (ue.singleQuote || !oo(ue) && zi(sc( + ue, + /*includeTrivia*/ + !1 + ), "'"))); + } + function Tc(Ce, ue) { + const Rt = !!Dr(Ce.declarations) && Ri(Ce.declarations, Qo), mr = !!Dr(Ce.declarations) && Ri(Ce.declarations, Yf), on = !!(Ce.flags & 8192), an = zc(Ce, ue, mr, Rt, on); + if (an) + return an; + const Tn = Pi(Ce.escapedName); + return C5(Tn, pa(F), mr, Rt, on); + } + function zc(Ce, ue, Rt, mr, on) { + const an = Ni(Ce).nameType; + if (an) { + if (an.flags & 384) { + const Tn = "" + an.value; + return !X_(Tn, pa(F)) && (mr || !Mg(Tn)) ? N.createStringLiteral(Tn, !!Rt) : Mg(Tn) && zi(Tn, "-") ? N.createComputedPropertyName(N.createPrefixUnaryExpression(41, N.createNumericLiteral(-Tn))) : C5(Tn, pa(F), Rt, mr, on); + } + if (an.flags & 8192) + return N.createComputedPropertyName(Xo( + an.symbol, + ue, + 111551 + /* Value */ + )); + } + } + function Qh(Ce) { + const ue = Ce.mustCreateTypeParameterSymbolList, Rt = Ce.mustCreateTypeParametersNamesLookups; + Ce.mustCreateTypeParameterSymbolList = !0, Ce.mustCreateTypeParametersNamesLookups = !0; + const mr = Ce.typeParameterNames, on = Ce.typeParameterNamesByText, an = Ce.typeParameterNamesByTextNextNameCount, Tn = Ce.typeParameterSymbolList; + return () => { + Ce.typeParameterNames = mr, Ce.typeParameterNamesByText = on, Ce.typeParameterNamesByTextNextNameCount = an, Ce.typeParameterSymbolList = Tn, Ce.mustCreateTypeParameterSymbolList = ue, Ce.mustCreateTypeParametersNamesLookups = Rt; + }; + } + function dE(Ce, ue) { + return Ce.declarations && Nn(Ce.declarations, (Rt) => !!oX(Rt) && (!ue || !!sr(Rt, (mr) => mr === ue))); + } + function YP(Ce, ue) { + if (!(wn(ue) & 4) || !Nf(Ce)) return !0; + RL(Ce); + const Rt = bn(Ce).resolvedSymbol, mr = Rt && mo(Rt); + return !mr || mr !== ue.target ? !0 : Dr(Ce.typeArguments) >= Em(ue.target.typeParameters); + } + function nI(Ce) { + for (; bn(Ce).fakeScopeForSignatureDeclaration; ) + Ce = Ce.parent; + return Ce; + } + function uu(Ce, ue, Rt, mr) { + var on; + const an = ue && (ji(ue) || up(ue)) && aX(ue), Tn = Ce.enclosingDeclaration, Ci = Ce.flags; + if (ue && Cee(ue) && !(Ce.flags & -2147483648) && ge.serializeTypeOfDeclaration(ue, Ce), Ce.flags |= -2147483648, Tn && (!Aa(Rt) || Ce.flags & 1)) { + const Ia = ue && oX(ue) ? ue : dE(mr); + if (Ia && !so(Ia) && !Af(Ia)) { + const Je = oX(Ia), Ze = !dx(Je) && m(Ce, Je, Rt, Ia, an); + if (Ze) + return Ce.flags = Ci, Ze; + } + } + Rt.flags & 8192 && Rt.symbol === mr && (!Ce.enclosingDeclaration || ut(mr.declarations, (Ia) => xr(Ia) === xr(Ce.enclosingDeclaration))) && (Ce.flags |= 1048576); + const Bi = ue ?? mr.valueDeclaration ?? ((on = mr.declarations) == null ? void 0 : on[0]), cs = Bi && Flt(Bi) ? z7e(Bi) : void 0, vs = l(Ce, cs, Rt, an); + return Ce.flags = Ci, vs; + } + function XM(Ce, ue, Rt) { + return Rt === ue ? !0 : Ce && (ji(Ce) || I_(Ce) || rs(Ce)) && Ce.questionToken ? qp( + ue, + 524288 + /* NEUndefined */ + ) === Rt : !1; + } + function Dt(Ce, ue) { + const Rt = Ce.flags & 256, mr = Ce.flags; + Rt && (Ce.flags &= -257); + let on; + const an = Ha(ue); + return an && !(Rt && Ea(an)) ? (ue.declaration && !(Ce.flags & -2147483648) && ge.serializeReturnTypeForSignature(ue.declaration, Ce), Ce.flags |= -2147483648, on = ar(Ce, ue)) : Rt || (on = N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )), Ce.flags = mr, on; + } + function ar(Ce, ue) { + const Rt = bp(ue), mr = Ha(ue); + if (Ce.enclosingDeclaration && (!Aa(mr) || Ce.flags & 1) && ue.declaration && !oo(ue.declaration)) { + const an = ue.declaration && Ult(ue.declaration); + if (an && r(Ce, an) === mr) { + const Tn = Hs(Ce, an); + if (Tn) + return Tn; + } + } + if (Rt) + return ks(Rt, Ce); + const on = ue.declaration && z7e(ue.declaration); + return l(Ce, on, mr); + } + function Er(Ce, ue) { + let Rt = !1; + const mr = tf(Ce); + if (Qr(Ce) && ($2(mr) || Ag(mr.parent) || $u(mr.parent) && tB(mr.parent.left) && $2(mr.parent.right))) + return Rt = !0, { introducesError: Rt, node: Ce }; + const on = VS(Ce); + let an; + if (my(mr)) + return an = xn(Uu( + mr, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )), xm( + an, + mr, + on, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0 && (Rt = !0, ue.tracker.reportInaccessibleThisError()), { introducesError: Rt, node: Tn(Ce) }; + if (an = No( + mr, + on, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0 + ), ue.enclosingDeclaration && !(an && an.flags & 262144)) { + an = R_(an); + const Ci = No( + mr, + on, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + ue.enclosingDeclaration + ); + if ( + // Check for unusable parameters symbols + Ci === nt || // If the symbol is not found, but was not found in the original scope either we probably have an error, don't reuse the node + Ci === void 0 && an !== void 0 || // If the symbol is found both in declaration scope and in current scope then it shoudl point to the same reference + Ci && an && !Rd(R_(Ci), an) + ) + return Ci !== nt && ue.tracker.reportInferenceFallback(Ce), Rt = !0, { introducesError: Rt, node: Ce, sym: an }; + } + if (an) + return an.flags & 1 && an.valueDeclaration && (X1(an.valueDeclaration) || up(an.valueDeclaration)) ? { introducesError: Rt, node: Tn(Ce) } : (!(an.flags & 262144) && // Type parameters are visible in the current context if they are are resolvable + !Gm(Ce) && xm( + an, + ue.enclosingDeclaration, + on, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility !== 0 ? (ue.tracker.reportInferenceFallback(Ce), Rt = !0) : ue.tracker.trackSymbol(an, ue.enclosingDeclaration, on), { introducesError: Rt, node: Tn(Ce) }); + return { introducesError: Rt, node: Ce }; + function Tn(Ci) { + if (Ci === mr) { + const cs = mo(an), vs = an.flags & 262144 ? Js(cs, ue) : N.cloneNode(Ci); + return vs.symbol = an, a(ue, Kr( + vs, + 16777216 + /* NoAsciiEscaping */ + ), Ci); + } + const Bi = gr( + Ci, + (cs) => Tn(cs), + /*context*/ + void 0 + ); + return Bi !== Ci && a(ue, Bi, Ci), Bi; + } + } + function qr(Ce, ue, Rt, mr) { + const on = Rt ? 111551 : 788968, an = No( + ue, + on, + /*ignoreErrors*/ + !0 + ); + if (!an) return; + const Tn = an.flags & 2097152 ? Ec(an) : an; + if (xm( + an, + Ce.enclosingDeclaration, + on, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0) + return Ra(Tn, Ce, on, mr); + } + function Sn(Ce, ue) { + if (Qr(ue) && a0(ue)) { + _Ae(ue); + const Rt = bn(ue).resolvedSymbol; + return !Rt || !// The import type resolved using jsdoc fallback logic + (!ue.isTypeOf && !(Rt.flags & 788968) || // The import type had type arguments autofilled by js fallback logic + !(Dr(ue.typeArguments) >= Em(U0(Rt)))); + } + if (NC(ue)) + return Ce.mapper === void 0 ? !0 : !!r( + Ce, + ue, + /*noMappedTypes*/ + !0 + ); + if (Nf(ue)) { + if (yd(ue)) return !1; + const Rt = RL(ue), mr = bn(ue).resolvedSymbol; + if (!mr) return !1; + if (mr.flags & 262144) { + const on = mo(mr); + if (Ce.mapper && Q0(on, Ce.mapper) !== on) + return !1; + } + if (n3(ue)) + return YP(ue, Rt) && !C3e(ue) && mr.flags & 788968; + } + if (K1(ue) && ue.operator === 158 && ue.type.kind === 155) { + const Rt = Ce.enclosingDeclaration && nI(Ce.enclosingDeclaration); + return !!sr(ue, (mr) => mr === Rt); + } + return !0; + } + function Yn(Ce, ue) { + const Rt = r(Ce, ue); + return J(Rt, Ce); + } + function Hs(Ce, ue) { + i && i.throwIfCancellationRequested && i.throwIfCancellationRequested(); + let Rt = !1; + const { finalizeBoundary: mr, startRecoveryScope: on } = Ci(), an = Ge(ue, Tn, ai); + if (!mr()) + return; + return Ce.approximateLength += ue.end - ue.pos, an; + function Tn(Ye) { + if (Rt) return Ye; + const Zt = on(), Jt = vn(Ye) ? Bi(Ye) : void 0, pt = Et(Ye); + return Jt?.(), Rt ? ai(Ye) && !dx(Ye) ? (Zt(), Yn(Ce, Ye)) : Ye : pt ? a(Ce, pt, Ye) : void 0; + } + function Ci() { + let Ye, Zt; + const Jt = Ce.tracker, pt = Ce.trackedSymbols; + Ce.trackedSymbols = void 0; + const $t = Ce.encounteredError; + return Ce.tracker = new bne(Ce, { + ...Jt.inner, + reportCyclicStructureError() { + Ir(() => Jt.reportCyclicStructureError()); + }, + reportInaccessibleThisError() { + Ir(() => Jt.reportInaccessibleThisError()); + }, + reportInaccessibleUniqueSymbolError() { + Ir(() => Jt.reportInaccessibleUniqueSymbolError()); + }, + reportLikelyUnsafeImportRequiredError(Pn) { + Ir(() => Jt.reportLikelyUnsafeImportRequiredError(Pn)); + }, + reportNonSerializableProperty(Pn) { + Ir(() => Jt.reportNonSerializableProperty(Pn)); + }, + trackSymbol(Pn, Wr, Un) { + return (Ye ?? (Ye = [])).push([Pn, Wr, Un]), !1; + }, + moduleResolverHost: Ce.tracker.moduleResolverHost + }, Ce.tracker.moduleResolverHost), { + startRecoveryScope: Gt, + finalizeBoundary: Hr + }; + function Ir(Pn) { + Rt = !0, (Zt ?? (Zt = [])).push(Pn); + } + function Gt() { + const Pn = Ye?.length ?? 0, Wr = Zt?.length ?? 0; + return () => { + Rt = !1, Ye && (Ye.length = Pn), Zt && (Zt.length = Wr); + }; + } + function Hr() { + return Ce.tracker = Jt, Ce.trackedSymbols = pt, Ce.encounteredError = $t, Zt?.forEach((Pn) => Pn()), Rt ? !1 : (Ye?.forEach( + ([Pn, Wr, Un]) => Ce.tracker.trackSymbol( + Pn, + Wr, + Un + ) + ), !0); + } + } + function Bi(Ye) { + return Fr(Ce, Ye, Cr(Ye), cr(Ye)); + } + function cs(Ye) { + const Zt = f4(Ye); + switch (Zt.kind) { + case 183: + return Ze(Zt); + case 186: + return Je(Zt); + case 199: + return vs(Zt); + case 198: + const Jt = Zt; + if (Jt.operator === 143) + return Ia(Jt); + } + return Ge(Ye, Tn, ai); + } + function vs(Ye) { + const Zt = cs(Ye.objectType); + if (Zt !== void 0) + return N.updateIndexedAccessTypeNode(Ye, Zt, Ge(Ye.indexType, Tn, ai)); + } + function Ia(Ye) { + E.assertEqual( + Ye.operator, + 143 + /* KeyOfKeyword */ + ); + const Zt = cs(Ye.type); + if (Zt !== void 0) + return N.updateTypeOperatorNode(Ye, Zt); + } + function Je(Ye) { + const { introducesError: Zt, node: Jt } = Er(Ye.exprName, Ce); + if (!Zt) + return N.updateTypeQueryNode( + Ye, + Jt, + Ar(Ye.typeArguments, Tn, ai) + ); + const pt = qr( + Ce, + Ye.exprName, + /*isTypeOf*/ + !0 + ); + if (pt) + return a(Ce, pt, Ye.exprName); + } + function Ze(Ye) { + if (Sn(Ce, Ye)) { + const { introducesError: Zt, node: Jt } = Er(Ye.typeName, Ce), pt = Ar(Ye.typeArguments, Tn, ai); + if (Zt) { + const $t = qr( + Ce, + Ye.typeName, + /*isTypeOf*/ + !1, + pt + ); + if ($t) + return a(Ce, $t, Ye.typeName); + } else { + const $t = N.updateTypeReferenceNode( + Ye, + Jt, + pt + ); + return a(Ce, $t, Ye); + } + } + } + function Et(Ye) { + if (nv(Ye)) + return Ge(Ye.type, Tn, ai); + if (Rte(Ye) || Ye.kind === 319) + return N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + if (jte(Ye)) + return N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + if (FC(Ye)) + return N.createUnionTypeNode([Ge(Ye.type, Tn, ai), N.createLiteralTypeNode(N.createNull())]); + if (jJ(Ye)) + return N.createUnionTypeNode([Ge(Ye.type, Tn, ai), N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + if (Q5(Ye)) + return Ge(Ye.type, Tn); + if (Y5(Ye)) + return N.createArrayTypeNode(Ge(Ye.type, Tn, ai)); + if (lS(Ye)) + return N.createTypeLiteralNode(or(Ye.jsDocPropertyTags, (Gt) => { + const Hr = Ge(Re(Gt.name) ? Gt.name : Gt.name.right, Tn, Re), Pn = Xc(r(Ce, Ye), Hr.escapedText), Wr = Pn && Gt.typeExpression && r(Ce, Gt.typeExpression.type) !== Pn ? J(Pn, Ce) : void 0; + return N.createPropertySignature( + /*modifiers*/ + void 0, + Hr, + Gt.isBracketed || Gt.typeExpression && jJ(Gt.typeExpression.type) ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + Wr || Gt.typeExpression && Ge(Gt.typeExpression.type, Tn, ai) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + })); + if (Nf(Ye) && Re(Ye.typeName) && Ye.typeName.escapedText === "") + return kn(N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), Ye); + if ((bh(Ye) || Nf(Ye)) && C7(Ye)) + return N.createTypeLiteralNode([N.createIndexSignature( + /*modifiers*/ + void 0, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "x", + /*questionToken*/ + void 0, + Ge(Ye.typeArguments[0], Tn, ai) + )], + Ge(Ye.typeArguments[1], Tn, ai) + )]); + if (LC(Ye)) + if (_C(Ye)) { + let Gt; + return N.createConstructorTypeNode( + /*modifiers*/ + void 0, + Ar(Ye.typeParameters, Tn, Mo), + Ii(Ye.parameters, (Hr, Pn) => Hr.name && Re(Hr.name) && Hr.name.escapedText === "new" ? (Gt = Hr.type, void 0) : N.createParameterDeclaration( + /*modifiers*/ + void 0, + pt(Hr), + a(Ce, N.createIdentifier($t(Hr, Pn)), Hr), + N.cloneNode(Hr.questionToken), + Ge(Hr.type, Tn, ai), + /*initializer*/ + void 0 + )), + Ge(Gt || Ye.type, Tn, ai) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + } else + return N.createFunctionTypeNode( + Ar(Ye.typeParameters, Tn, Mo), + or(Ye.parameters, (Gt, Hr) => N.createParameterDeclaration( + /*modifiers*/ + void 0, + pt(Gt), + a(Ce, N.createIdentifier($t(Gt, Hr)), Gt), + N.cloneNode(Gt.questionToken), + Ge(Gt.type, Tn, ai), + /*initializer*/ + void 0 + )), + Ge(Ye.type, Tn, ai) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + if (NC(Ye)) + return Sn(Ce, Ye) || (Rt = !0), Ye; + if (Mo(Ye)) + return N.updateTypeParameterDeclaration( + Ye, + Ar(Ye.modifiers, Tn, Qs), + a(Ce, Js(mo(xn(Ye)), Ce), Ye), + Ge(Ye.constraint, Tn, ai), + Ge(Ye.default, Tn, ai) + ); + if (Nb(Ye)) { + const Gt = vs(Ye); + return Gt || (Rt = !0, Ye); + } + if (Nf(Ye)) { + const Gt = Ze(Ye); + return Gt || (Rt = !0, Ye); + } + if (a0(Ye)) { + const Gt = bn(Ye).resolvedSymbol; + return n3(Ye) && Gt && // The import type resolved using jsdoc fallback logic + (!Ye.isTypeOf && !(Gt.flags & 788968) || // The import type had type arguments autofilled by js fallback logic + !(Dr(Ye.typeArguments) >= Em(U0(Gt)))) ? a(Ce, J(r(Ce, Ye), Ce), Ye) : N.updateImportTypeNode( + Ye, + N.updateLiteralTypeNode(Ye.argument, Ir(Ye, Ye.argument.literal)), + Ge(Ye.attributes, Tn, aS), + Ge(Ye.qualifier, Tn, l_), + Ar(Ye.typeArguments, Tn, ai), + Ye.isTypeOf + ); + } + if (Bl(Ye) && Ye.name.kind === 167 && !mG(Ye.name) && !(Ce.flags & 1 && ph(Ye) && fo(Ye.name.expression) && wm(Ye.name).flags & 1)) + return; + if (ps(Ye) && !Ye.type || rs(Ye) && !Ye.type && !Ye.initializer || I_(Ye) && !Ye.type && !Ye.initializer || ji(Ye) && !Ye.type && !Ye.initializer) { + let Gt = Zt(Ye, Tn); + return Gt === Ye && (Gt = a(Ce, N.cloneNode(Ye), Ye)), Gt.type = N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ), ji(Ye) && (Gt.modifiers = void 0), Gt; + } + if (wb(Ye)) { + const Gt = Je(Ye); + return Gt || (Rt = !0, Ye); + } + if (oa(Ye) && fo(Ye.expression)) { + const { node: Gt, introducesError: Hr } = Er(Ye.expression, Ce); + if (Hr) { + const Pn = W_(Ime(Ye.expression)), Wr = J(Pn, Ce); + let Un; + if (y0(Wr)) + Un = Wr.literal; + else { + const Fn = b7e(Ye.expression), As = typeof Fn.value == "string" ? N.createStringLiteral( + Fn.value, + /*isSingleQuote*/ + void 0 + ) : typeof Fn.value == "number" ? N.createNumericLiteral( + Fn.value, + /*numericLiteralFlags*/ + 0 + ) : void 0; + if (!As) + return Qm(Wr) && Xl(Ye.expression, Ce.enclosingDeclaration, Ce), Ye; + Un = As; + } + return Un.kind === 11 && X_(Un.text, pa(F)) ? N.createIdentifier(Un.text) : Un.kind === 9 && !Un.text.startsWith("-") ? Un : N.updateComputedPropertyName(Ye, Un); + } else + return N.updateComputedPropertyName(Ye, Gt); + } + if (dx(Ye)) { + let Gt; + if (Re(Ye.parameterName)) { + const { node: Hr, introducesError: Pn } = Er(Ye.parameterName, Ce); + Rt = Rt || Pn, Gt = Hr; + } else + Gt = N.cloneNode(Ye.parameterName); + return N.updateTypePredicateNode(Ye, N.cloneNode(Ye.assertsModifier), Gt, Ge(Ye.type, Tn, ai)); + } + if (mx(Ye) || Xu(Ye) || iS(Ye)) { + const Gt = Zt(Ye, Tn), Hr = a(Ce, Gt === Ye ? N.cloneNode(Ye) : Gt, Ye), Pn = ua(Hr); + return Kr(Hr, Pn | (Ce.flags & 1024 && Xu(Ye) ? 0 : 1)), Hr; + } + if (Ks(Ye) && Ce.flags & 268435456 && !Ye.singleQuote) { + const Gt = N.cloneNode(Ye); + return Gt.singleQuote = !0, Gt; + } + if (Ab(Ye)) { + const Gt = Ge(Ye.checkType, Tn, ai), Hr = Bi(Ye), Pn = Ge(Ye.extendsType, Tn, ai), Wr = Ge(Ye.trueType, Tn, ai); + Hr(); + const Un = Ge(Ye.falseType, Tn, ai); + return N.updateConditionalTypeNode( + Ye, + Gt, + Pn, + Wr, + Un + ); + } + if (K1(Ye)) { + if (Ye.operator === 158 && Ye.type.kind === 155) { + if (!Sn(Ce, Ye)) + return Rt = !0, Ye; + } else if (Ye.operator === 143) { + const Gt = Ia(Ye); + return Gt || (Rt = !0, Ye); + } + } + return Zt(Ye, Tn); + function Zt(Gt, Hr) { + const Pn = !Ce.enclosingFile || Ce.enclosingFile !== xr(Gt); + return gr( + Gt, + Hr, + /*context*/ + void 0, + Pn ? Jt : void 0 + ); + } + function Jt(Gt, Hr, Pn, Wr, Un) { + let Fn = Ar(Gt, Hr, Pn, Wr, Un); + return Fn && (Fn.pos !== -1 || Fn.end !== -1) && (Fn === Gt && (Fn = N.createNodeArray(Gt, Gt.hasTrailingComma)), om(Fn, -1, -1)), Fn; + } + function pt(Gt) { + return Gt.dotDotDotToken || (Gt.type && Y5(Gt.type) ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0); + } + function $t(Gt, Hr) { + return Gt.name && Re(Gt.name) && Gt.name.escapedText === "this" ? "this" : pt(Gt) ? "args" : `arg${Hr}`; + } + function Ir(Gt, Hr) { + if (Ce.bundled || Ce.enclosingFile !== xr(Hr)) { + let Pn = Hr.text; + const Wr = bn(Ye).resolvedSymbol, Un = Gt.isTypeOf ? 111551 : 788968, Fn = Wr && xm( + Wr, + Ce.enclosingDeclaration, + Un, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0 && dc( + Wr, + Ce, + Un, + /*yieldModuleSymbol*/ + !0 + )[0]; + if (Fn && Kk(Fn)) + Pn = Mi(Fn, Ce); + else { + const As = jme(Gt); + As && (Pn = Mi(As.symbol, Ce)); + } + if (Pn.includes("/node_modules/") && (Ce.encounteredError = !0, Ce.tracker.reportLikelyUnsafeImportRequiredError && Ce.tracker.reportLikelyUnsafeImportRequiredError(Pn)), Pn !== Hr.text) + return kn(N.createStringLiteral(Pn), Hr); + } + return Ge(Hr, Tn, Ks); + } + } + } + function Zs(Ce, ue) { + var Rt; + const mr = i5e( + N.createPropertyDeclaration, + 174, + /*useAccessors*/ + !0 + ), on = i5e( + (St, An, si, Kn) => N.createPropertySignature(St, An, si, Kn), + 173, + /*useAccessors*/ + !1 + ), an = ue.enclosingDeclaration; + let Tn = []; + const Ci = /* @__PURE__ */ new Set(), Bi = [], cs = ue; + ue = { + ...cs, + usedSymbolNames: new Set(cs.usedSymbolNames), + remappedSymbolNames: /* @__PURE__ */ new Map(), + remappedSymbolReferences: new Map((Rt = cs.remappedSymbolReferences) == null ? void 0 : Rt.entries()), + tracker: void 0 + }; + const vs = { + ...cs.tracker.inner, + trackSymbol: (St, An, si) => { + var Kn, Wn; + if ((Kn = ue.remappedSymbolNames) != null && Kn.has($s(St))) return !1; + if (xm( + St, + An, + si, + /*shouldComputeAliasesToMakeVisible*/ + !1 + ).accessibility === 0) { + const Ls = Sr(St, ue, si); + if (!(St.flags & 4)) { + const bs = Ls[0], To = xr(cs.enclosingDeclaration); + ut(bs.declarations, (Oa) => xr(Oa) === To) && Wr(bs); + } + } else if ((Wn = cs.tracker.inner) != null && Wn.trackSymbol) + return cs.tracker.inner.trackSymbol(St, An, si); + return !1; + } + }; + ue.tracker = new bne(ue, vs, cs.tracker.moduleResolverHost), Dl(Ce, (St, An) => { + const si = Pi(An); + vg(St, si); + }); + let Ia = !ue.bundled; + const Je = Ce.get( + "export=" + /* ExportEquals */ + ); + return Je && Ce.size > 1 && Je.flags & 2098688 && (Ce = Ms(), Ce.set("export=", Je)), Gt(Ce), pt(Tn); + function Ze(St) { + return !!St && St.kind === 80; + } + function Et(St) { + return yc(St) ? Ln(or(St.declarationList.declarations, es), Ze) : Ln([es(St)], Ze); + } + function Ye(St) { + const An = Nn(St, ko), si = rc(St, Nc); + let Kn = si !== -1 ? St[si] : void 0; + if (Kn && An && An.isExportEquals && Re(An.expression) && Re(Kn.name) && dn(Kn.name) === dn(An.expression) && Kn.body && _m(Kn.body)) { + const Wn = Ln(St, (bs) => !!(Au(bs) & 32)), Xa = Kn.name; + let Ls = Kn.body; + if (Dr(Wn) && (Kn = N.updateModuleDeclaration( + Kn, + Kn.modifiers, + Kn.name, + Ls = N.updateModuleBlock( + Ls, + N.createNodeArray([ + ...Kn.body.statements, + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(or(Xs(Wn, (bs) => Et(bs)), (bs) => N.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + bs + ))), + /*moduleSpecifier*/ + void 0 + ) + ]) + ) + ), St = [...St.slice(0, si), Kn, ...St.slice(si + 1)]), !Nn(St, (bs) => bs !== Kn && kw(bs, Xa))) { + Tn = []; + const bs = !ut(Ls.statements, (To) => Vn( + To, + 32 + /* Export */ + ) || ko(To) || Ic(To)); + rr(Ls.statements, (To) => { + Fn( + To, + bs ? 32 : 0 + /* None */ + ); + }), St = [...Ln(St, (To) => To !== Kn && To !== An), ...Tn]; + } + } + return St; + } + function Zt(St) { + const An = Ln(St, (Kn) => Ic(Kn) && !Kn.moduleSpecifier && !!Kn.exportClause && lp(Kn.exportClause)); + Dr(An) > 1 && (St = [ + ...Ln(St, (Wn) => !Ic(Wn) || !!Wn.moduleSpecifier || !Wn.exportClause), + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(Xs(An, (Wn) => Is(Wn.exportClause, lp).elements)), + /*moduleSpecifier*/ + void 0 + ) + ]); + const si = Ln(St, (Kn) => Ic(Kn) && !!Kn.moduleSpecifier && !!Kn.exportClause && lp(Kn.exportClause)); + if (Dr(si) > 1) { + const Kn = TE(si, (Wn) => Ks(Wn.moduleSpecifier) ? ">" + Wn.moduleSpecifier.text : ">"); + if (Kn.length !== si.length) + for (const Wn of Kn) + Wn.length > 1 && (St = [ + ...Ln(St, (Xa) => !Wn.includes(Xa)), + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(Xs(Wn, (Xa) => Is(Xa.exportClause, lp).elements)), + Wn[0].moduleSpecifier + ) + ]); + } + return St; + } + function Jt(St) { + const An = rc(St, (si) => Ic(si) && !si.moduleSpecifier && !si.attributes && !!si.exportClause && lp(si.exportClause)); + if (An >= 0) { + const si = St[An], Kn = Ii(si.exportClause.elements, (Wn) => { + if (!Wn.propertyName) { + const Xa = nw(St), Ls = Ln(Xa, (bs) => kw(St[bs], Wn.name)); + if (Dr(Ls) && Ri(Ls, (bs) => U3(St[bs]))) { + for (const bs of Ls) + St[bs] = $t(St[bs]); + return; + } + } + return Wn; + }); + Dr(Kn) ? St[An] = N.updateExportDeclaration( + si, + si.modifiers, + si.isTypeOnly, + N.updateNamedExports( + si.exportClause, + Kn + ), + si.moduleSpecifier, + si.attributes + ) : ay(St, An); + } + return St; + } + function pt(St) { + return St = Ye(St), St = Zt(St), St = Jt(St), an && (yi(an) && A_(an) || Nc(an)) && (!ut(St, Mw) || !HY(St) && ut(St, UI)) && St.push(cA(N)), St; + } + function $t(St) { + const An = (Au(St) | 32) & -129; + return N.replaceModifiers(St, An); + } + function Ir(St) { + const An = Au(St) & -33; + return N.replaceModifiers(St, An); + } + function Gt(St, An, si) { + An || Bi.push(/* @__PURE__ */ new Map()), St.forEach((Kn) => { + Hr( + Kn, + /*isPrivate*/ + !1, + !!si + ); + }), An || (Bi[Bi.length - 1].forEach((Kn) => { + Hr( + Kn, + /*isPrivate*/ + !0, + !!si + ); + }), Bi.pop()); + } + function Hr(St, An, si) { + Wa(Zr(St)); + const Kn = Ma(St); + if (Ci.has($s(Kn))) + return; + if (Ci.add($s(Kn)), !An || Dr(St.declarations) && ut(St.declarations, (Xa) => !!sr(Xa, (Ls) => Ls === an))) { + const Xa = Qh(ue); + Pn(St, An, si), Xa(); + } + } + function Pn(St, An, si, Kn = St.escapedName) { + var Wn, Xa, Ls, bs, To, Oa; + const _a = Pi(Kn), Ql = Kn === "default"; + if (An && !(ue.flags & 131072) && WT(_a) && !Ql) { + ue.encounteredError = !0; + return; + } + let Yl = Ql && !!(St.flags & -113 || St.flags & 16 && Dr(Wa(Zr(St)))) && !(St.flags & 2097152), zu = !Yl && !An && WT(_a) && !Ql; + (Yl || zu) && (An = !0); + const Pc = (An ? 0 : 32) | (Ql && !Yl ? 2048 : 0), Zl = St.flags & 1536 && St.flags & 7 && Kn !== "export=", P_ = Zl && sI(Zr(St), St); + if ((St.flags & 8208 || P_) && Kv(Zr(St), St, vg(St, _a), Pc), St.flags & 524288 && As(St, _a, Pc), St.flags & 98311 && Kn !== "export=" && !(St.flags & 4194304) && !(St.flags & 32) && !(St.flags & 8192) && !P_) + if (si) + ZP(St) && (zu = !1, Yl = !1); + else { + const Fc = Zr(St), w_ = vg(St, _a); + if (Fc.symbol && Fc.symbol !== St && Fc.symbol.flags & 16 && ut(Fc.symbol.declarations, Sy) && ((Wn = Fc.symbol.members) != null && Wn.size || (Xa = Fc.symbol.exports) != null && Xa.size)) + ue.remappedSymbolReferences || (ue.remappedSymbolReferences = /* @__PURE__ */ new Map()), ue.remappedSymbolReferences.set($s(Fc.symbol), St), Pn(Fc.symbol, An, si, Kn), ue.remappedSymbolReferences.delete($s(Fc.symbol)); + else if (!(St.flags & 16) && sI(Fc, St)) + Kv(Fc, St, w_, Pc); + else { + const Rk = St.flags & 2 ? Ik(St) ? 2 : 1 : (Ls = St.parent) != null && Ls.valueDeclaration && yi((bs = St.parent) == null ? void 0 : bs.valueDeclaration) ? 2 : void 0, Lm = Yl || !(St.flags & 4) ? w_ : QM(w_, St); + let E1 = St.declarations && Nn(St.declarations, (aI) => ti(aI)); + E1 && Il(E1.parent) && E1.parent.declarations.length === 1 && (E1 = E1.parent.parent); + const D1 = (To = St.declarations) == null ? void 0 : To.find(Dn); + if (D1 && cn(D1.parent) && Re(D1.parent.right) && ((Oa = Fc.symbol) != null && Oa.valueDeclaration) && yi(Fc.symbol.valueDeclaration)) { + const aI = w_ === D1.parent.right.escapedText ? void 0 : D1.parent.right; + Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + aI, + w_ + )]) + ), + 0 + /* None */ + ), ue.tracker.trackSymbol( + Fc.symbol, + ue.enclosingDeclaration, + 111551 + /* Value */ + ); + } else { + const aI = a( + ue, + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([ + N.createVariableDeclaration( + Lm, + /*exclamationToken*/ + void 0, + uu( + ue, + /*declaration*/ + void 0, + Fc, + St + ) + ) + ], Rk) + ), + E1 + ); + Fn(aI, Lm !== w_ ? Pc & -33 : Pc), Lm !== w_ && !An && (Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + Lm, + w_ + )]) + ), + 0 + /* None */ + ), zu = !1, Yl = !1); + } + } + } + if (St.flags & 384 && k1(St, _a, Pc), St.flags & 32 && (St.flags & 4 && St.valueDeclaration && cn(St.valueDeclaration.parent) && tl(St.valueDeclaration.parent.right) ? iI(St, vg(St, _a), Pc) : C1(St, vg(St, _a), Pc)), (St.flags & 1536 && (!Zl || c_(St)) || P_) && mf(St, _a, Pc), St.flags & 64 && !(St.flags & 32) && zs(St, _a, Pc), St.flags & 2097152 && iI(St, vg(St, _a), Pc), St.flags & 4 && St.escapedName === "export=" && ZP(St), St.flags & 8388608 && St.declarations) + for (const Fc of St.declarations) { + const w_ = Ru(Fc, Fc.moduleSpecifier); + w_ && Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + Fc.isTypeOnly, + /*exportClause*/ + void 0, + N.createStringLiteral(Mi(w_, ue)) + ), + 0 + /* None */ + ); + } + Yl ? Fn( + N.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + N.createIdentifier(vg(St, _a)) + ), + 0 + /* None */ + ) : zu && Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + vg(St, _a), + _a + )]) + ), + 0 + /* None */ + ); + } + function Wr(St) { + if (ut(St.declarations, X1)) return; + E.assertIsDefined(Bi[Bi.length - 1]), QM(Pi(St.escapedName), St); + const An = !!(St.flags & 2097152) && !ut(St.declarations, (si) => !!sr(si, Ic) || Ym(si) || nl(si) && !Sh(si.moduleReference)); + Bi[An ? 0 : Bi.length - 1].set($s(St), St); + } + function Un(St) { + return yi(St) && (A_(St) || Ap(St)) || wu(St) && !Zd(St); + } + function Fn(St, An) { + if (ed(St)) { + let si = 0; + const Kn = ue.enclosingDeclaration && (Np(ue.enclosingDeclaration) ? xr(ue.enclosingDeclaration) : ue.enclosingDeclaration); + An & 32 && Kn && (Un(Kn) || Nc(Kn)) && U3(St) && (si |= 32), Ia && !(si & 32) && (!Kn || !(Kn.flags & 33554432)) && (rv(St) || yc(St) || Ac(St) || rl(St) || Nc(St)) && (si |= 128), An & 2048 && (rl(St) || Vl(St) || Ac(St)) && (si |= 2048), si && (St = N.replaceModifiers(St, si | Au(St))); + } + Tn.push(St); + } + function As(St, An, si) { + var Kn; + const Wn = Bd(St), Xa = Ni(St).typeParameters, Ls = or(Xa, (Yl) => qs(Yl, ue)), bs = (Kn = St.declarations) == null ? void 0 : Kn.find(Np), To = Dw(bs ? bs.comment || bs.parent.comment : void 0), Oa = ue.flags; + ue.flags |= 8388608; + const _a = ue.enclosingDeclaration; + ue.enclosingDeclaration = bs; + const Ql = bs && bs.typeExpression && nv(bs.typeExpression) && y( + ue, + bs.typeExpression.type, + Wn, + /*host*/ + void 0 + ) || J(Wn, ue); + Fn( + Z1( + N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + vg(St, An), + Ls, + Ql + ), + To ? [{ kind: 3, text: `* + * ` + To.replace(/\n/g, ` + * `) + ` + `, pos: -1, end: -1, hasTrailingNewLine: !0 }] : [] + ), + si + ), ue.flags = Oa, ue.enclosingDeclaration = _a; + } + function zs(St, An, si) { + const Kn = Yc(St), Wn = U0(St), Xa = or(Wn, (zu) => qs(zu, ue)), Ls = un(Kn), bs = Dr(Ls) ? Ys(Ls) : void 0, To = Xs(Wa(Kn), (zu) => Uut(zu, bs)), Oa = Ume( + 0, + Kn, + bs, + 179 + /* CallSignature */ + ), _a = Ume( + 1, + Kn, + bs, + 180 + /* ConstructSignature */ + ), Ql = s5e(Kn, bs), Yl = Dr(Ls) ? [N.createHeritageClause(96, Ii(Ls, (zu) => qme( + zu, + 111551 + /* Value */ + )))] : void 0; + Fn( + N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + vg(St, An), + Xa, + Yl, + [...Ql, ..._a, ...Oa, ...To] + ), + si + ); + } + function So(St) { + let An = ts(_f(St).values()); + const si = Ma(St); + if (si !== St) { + const Kn = new Set(An); + for (const Wn of _f(si).values()) + n_(bc(Wn)) & 111551 || Kn.add(Wn); + An = ts(Kn); + } + return Ln(An, (Kn) => q_(Kn) && X_( + Kn.escapedName, + 99 + /* ESNext */ + )); + } + function c_(St) { + return Ri(So(St), (An) => !(n_(bc(An)) & 111551)); + } + function mf(St, An, si) { + const Kn = So(St), Wn = sw(Kn, (bs) => bs.parent && bs.parent === St ? "real" : "merged"), Xa = Wn.get("real") || He, Ls = Wn.get("merged") || He; + if (Dr(Xa)) { + const bs = vg(St, An); + Fm(Xa, bs, si, !!(St.flags & 67108880)); + } + if (Dr(Ls)) { + const bs = xr(ue.enclosingDeclaration), To = vg(St, An), Oa = N.createModuleBlock([N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(Ii(Ln( + Ls, + (_a) => _a.escapedName !== "export=" + /* ExportEquals */ + ), (_a) => { + var Ql, Yl; + const zu = Pi(_a.escapedName), Pc = vg(_a, zu), Zl = _a.declarations && k_(_a); + if (bs && (Zl ? bs !== xr(Zl) : !ut(_a.declarations, (w_) => xr(w_) === bs))) { + (Yl = (Ql = ue.tracker) == null ? void 0 : Ql.reportNonlocalAugmentation) == null || Yl.call(Ql, bs, St, _a); + return; + } + const P_ = Zl && Lh( + Zl, + /*dontRecursivelyResolve*/ + !0 + ); + Wr(P_ || _a); + const Fc = P_ ? vg(P_, Pi(P_.escapedName)) : Pc; + return N.createExportSpecifier( + /*isTypeOnly*/ + !1, + zu === Fc ? void 0 : Fc, + zu + ); + })) + )]); + Fn( + N.createModuleDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(To), + Oa, + 32 + /* Namespace */ + ), + 0 + /* None */ + ); + } + } + function k1(St, An, si) { + Fn( + N.createEnumDeclaration( + N.createModifiersFromModifierFlags(nme(St) ? 4096 : 0), + vg(St, An), + or(Ln(Wa(Zr(St)), (Kn) => !!(Kn.flags & 8)), (Kn) => { + const Wn = Kn.declarations && Kn.declarations[0] && Py(Kn.declarations[0]) ? Lme(Kn.declarations[0]) : void 0; + return N.createEnumMember( + Pi(Kn.escapedName), + Wn === void 0 ? void 0 : typeof Wn == "string" ? N.createStringLiteral(Wn) : N.createNumericLiteral(Wn) + ); + }) + ), + si + ); + } + function Kv(St, An, si, Kn) { + const Wn = xs( + St, + 0 + /* Call */ + ); + for (const Xa of Wn) { + const Ls = Rr(Xa, 262, ue, { name: N.createIdentifier(si) }); + Fn(a(ue, Ls, w2(Xa)), Kn); + } + if (!(An.flags & 1536 && An.exports && An.exports.size)) { + const Xa = Ln(Wa(St), q_); + Fm( + Xa, + si, + Kn, + /*suppressNewPrivateContext*/ + !0 + ); + } + } + function w2(St) { + if (St.declaration && St.declaration.parent) { + if (cn(St.declaration.parent) && mc(St.declaration.parent) === 5) + return St.declaration.parent; + if (ti(St.declaration.parent) && St.declaration.parent.parent) + return St.declaration.parent.parent; + } + return St.declaration; + } + function Fm(St, An, si, Kn) { + if (Dr(St)) { + const Xa = sw(St, (Pc) => !Dr(Pc.declarations) || ut(Pc.declarations, (Zl) => xr(Zl) === xr(ue.enclosingDeclaration)) ? "local" : "remote").get("local") || He; + let Ls = av.createModuleDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(An), + N.createModuleBlock([]), + 32 + /* Namespace */ + ); + Da(Ls, an), Ls.locals = Ms(St), Ls.symbol = St[0].parent; + const bs = Tn; + Tn = []; + const To = Ia; + Ia = !1; + const Oa = { ...ue, enclosingDeclaration: Ls }, _a = ue; + ue = Oa, Gt( + Ms(Xa), + Kn, + /*propertyAsAlias*/ + !0 + ), ue = _a, Ia = To; + const Ql = Tn; + Tn = bs; + const Yl = or(Ql, (Pc) => ko(Pc) && !Pc.isExportEquals && Re(Pc.expression) ? N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + Pc.expression, + N.createIdentifier( + "default" + /* Default */ + ) + )]) + ) : Pc), zu = Ri(Yl, (Pc) => Vn( + Pc, + 32 + /* Export */ + )) ? or(Yl, Ir) : Yl; + Ls = N.updateModuleDeclaration( + Ls, + Ls.modifiers, + Ls.name, + N.createModuleBlock(zu) + ), Fn(Ls, si); + } + } + function q_(St) { + return !!(St.flags & 2887656) || !(St.flags & 4194304 || St.escapedName === "prototype" || St.valueDeclaration && Os(St.valueDeclaration) && Qn(St.valueDeclaration.parent)); + } + function mE(St) { + const An = Ii(St, (si) => { + const Kn = ue.enclosingDeclaration; + ue.enclosingDeclaration = si; + let Wn = si.expression; + if (fo(Wn)) { + if (Re(Wn) && dn(Wn) === "") + return Xa( + /*result*/ + void 0 + ); + let Ls; + if ({ introducesError: Ls, node: Wn } = Er(Wn, ue), Ls) + return Xa( + /*result*/ + void 0 + ); + } + return Xa(N.createExpressionWithTypeArguments( + Wn, + or(si.typeArguments, (Ls) => y(ue, Ls, r(ue, Ls)) || J(r(ue, Ls), ue)) + )); + function Xa(Ls) { + return ue.enclosingDeclaration = Kn, Ls; + } + }); + if (An.length === St.length) + return An; + } + function C1(St, An, si) { + var Kn, Wn; + const Xa = (Kn = St.declarations) == null ? void 0 : Kn.find(Qn), Ls = ue.enclosingDeclaration; + ue.enclosingDeclaration = Xa || Ls; + const bs = U0(St), To = or(bs, (Mm) => qs(Mm, ue)), Oa = pf(Yc(St)), _a = un(Oa), Ql = Xa && dC(Xa), Yl = Ql && mE(Ql) || Ii(US(Oa), Hut), zu = Zr(St), Pc = !!((Wn = zu.symbol) != null && Wn.valueDeclaration) && Qn(zu.symbol.valueDeclaration), Zl = Pc ? zv(zu) : Ne, P_ = [ + ...Dr(_a) ? [N.createHeritageClause(96, or(_a, (Mm) => qut(Mm, Zl, An)))] : [], + ...Dr(Yl) ? [N.createHeritageClause(119, Yl)] : [] + ], Fc = Ect(Oa, _a, Wa(Oa)), w_ = Ln(Fc, (Mm) => { + const KP = Mm.valueDeclaration; + return !!KP && !(Bl(KP) && wi(KP.name)); + }), Lm = ut(Fc, (Mm) => { + const KP = Mm.valueDeclaration; + return !!KP && Bl(KP) && wi(KP.name); + }) ? [N.createPropertyDeclaration( + /*modifiers*/ + void 0, + N.createPrivateIdentifier("#private"), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )] : He, E1 = Xs(w_, (Mm) => mr( + Mm, + /*isStatic*/ + !1, + _a[0] + )), D1 = Xs( + Ln(Wa(zu), (Mm) => !(Mm.flags & 4194304) && Mm.escapedName !== "prototype" && !q_(Mm)), + (Mm) => mr( + Mm, + /*isStatic*/ + !0, + Zl + ) + ), Gut = !Pc && !!St.valueDeclaration && Qr(St.valueDeclaration) && !ut(xs( + zu, + 1 + /* Construct */ + )) ? [N.createConstructorDeclaration( + N.createModifiersFromModifierFlags( + 2 + /* Private */ + ), + [], + /*body*/ + void 0 + )] : Ume( + 1, + zu, + Zl, + 176 + /* Constructor */ + ), $ut = s5e(Oa, _a[0]); + ue.enclosingDeclaration = Ls, Fn( + a( + ue, + N.createClassDeclaration( + /*modifiers*/ + void 0, + An, + To, + P_, + [...$ut, ...D1, ...Gut, ...E1, ...Lm] + ), + St.declarations && Ln(St.declarations, (Mm) => rl(Mm) || tl(Mm))[0] + ), + si + ); + } + function A2(St) { + return xc(St, (An) => { + if (Yu(An) || pu(An)) + return dn(An.propertyName || An.name); + if (cn(An) || ko(An)) { + const si = ko(An) ? An.expression : An.right; + if (Dn(si)) + return dn(si.name); + } + if (Ev(An)) { + const si = es(An); + if (si && Re(si)) + return dn(si); + } + }); + } + function iI(St, An, si) { + var Kn, Wn, Xa, Ls, bs, To; + const Oa = k_(St); + if (!Oa) return E.fail(); + const _a = Ma(Lh( + Oa, + /*dontRecursivelyResolve*/ + !0 + )); + if (!_a) + return; + let Ql = Vw(_a) && A2(St.declarations) || Pi(_a.escapedName); + Ql === "export=" && ce && (Ql = "default"); + const Yl = vg(_a, Ql); + switch (Wr(_a), Oa.kind) { + case 208: + if (((Wn = (Kn = Oa.parent) == null ? void 0 : Kn.parent) == null ? void 0 : Wn.kind) === 260) { + const Zl = Mi(_a.parent || _a, ue), { propertyName: P_ } = Oa; + Fn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + N.createNamedImports([N.createImportSpecifier( + /*isTypeOnly*/ + !1, + P_ && Re(P_) ? N.createIdentifier(dn(P_)) : void 0, + N.createIdentifier(An) + )]) + ), + N.createStringLiteral(Zl), + /*attributes*/ + void 0 + ), + 0 + /* None */ + ); + break; + } + E.failBadSyntaxKind(((Xa = Oa.parent) == null ? void 0 : Xa.parent) || Oa, "Unhandled binding element grandparent kind in declaration serialization"); + break; + case 304: + ((bs = (Ls = Oa.parent) == null ? void 0 : Ls.parent) == null ? void 0 : bs.kind) === 226 && dT( + Pi(St.escapedName), + Yl + ); + break; + case 260: + if (Dn(Oa.initializer)) { + const Zl = Oa.initializer, P_ = N.createUniqueName(An), Fc = Mi(_a.parent || _a, ue); + Fn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + P_, + N.createExternalModuleReference(N.createStringLiteral(Fc)) + ), + 0 + /* None */ + ), Fn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(An), + N.createQualifiedName(P_, Zl.name) + ), + si + ); + break; + } + case 271: + if (_a.escapedName === "export=" && ut(_a.declarations, (Zl) => yi(Zl) && Ap(Zl))) { + ZP(St); + break; + } + const zu = !(_a.flags & 512) && !ti(Oa); + Fn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(An), + zu ? ku( + _a, + ue, + -1, + /*expectsIdentifier*/ + !1 + ) : N.createExternalModuleReference(N.createStringLiteral(Mi(_a, ue))) + ), + zu ? si : 0 + /* None */ + ); + break; + case 270: + Fn( + N.createNamespaceExportDeclaration(dn(Oa.name)), + 0 + /* None */ + ); + break; + case 273: { + const Zl = Mi(_a.parent || _a, ue), P_ = ue.bundled ? N.createStringLiteral(Zl) : Oa.parent.moduleSpecifier, Fc = oc(Oa.parent) ? Oa.parent.attributes : void 0, w_ = Jg(Oa.parent); + Fn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + w_, + N.createIdentifier(An), + /*namedBindings*/ + void 0 + ), + P_, + Fc + ), + 0 + /* None */ + ); + break; + } + case 274: { + const Zl = Mi(_a.parent || _a, ue), P_ = ue.bundled ? N.createStringLiteral(Zl) : Oa.parent.parent.moduleSpecifier, Fc = Jg(Oa.parent.parent); + Fn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + Fc, + /*name*/ + void 0, + N.createNamespaceImport(N.createIdentifier(An)) + ), + P_, + Oa.parent.attributes + ), + 0 + /* None */ + ); + break; + } + case 280: + Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamespaceExport(N.createIdentifier(An)), + N.createStringLiteral(Mi(_a, ue)) + ), + 0 + /* None */ + ); + break; + case 276: { + const Zl = Mi(_a.parent || _a, ue), P_ = ue.bundled ? N.createStringLiteral(Zl) : Oa.parent.parent.parent.moduleSpecifier, Fc = Jg(Oa.parent.parent.parent); + Fn( + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + Fc, + /*name*/ + void 0, + N.createNamedImports([ + N.createImportSpecifier( + /*isTypeOnly*/ + !1, + An !== Ql ? N.createIdentifier(Ql) : void 0, + N.createIdentifier(An) + ) + ]) + ), + P_, + Oa.parent.parent.parent.attributes + ), + 0 + /* None */ + ); + break; + } + case 281: + const Pc = Oa.parent.parent.moduleSpecifier; + Pc && ((To = Oa.propertyName) == null ? void 0 : To.escapedText) === "default" && (Ql = "default"), dT( + Pi(St.escapedName), + Pc ? Ql : Yl, + Pc && Ga(Pc) ? N.createStringLiteral(Pc.text) : void 0 + ); + break; + case 277: + ZP(St); + break; + case 226: + case 211: + case 212: + St.escapedName === "default" || St.escapedName === "export=" ? ZP(St) : dT(An, Yl); + break; + default: + return E.failBadSyntaxKind(Oa, "Unhandled alias declaration kind in symbol serializer!"); + } + } + function dT(St, An, si) { + Fn( + N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + St !== An ? An : void 0, + St + )]), + si + ), + 0 + /* None */ + ); + } + function ZP(St) { + var An; + if (St.flags & 4194304) + return !1; + const si = Pi(St.escapedName), Kn = si === "export=", Xa = Kn || si === "default", Ls = St.declarations && k_(St), bs = Ls && Lh( + Ls, + /*dontRecursivelyResolve*/ + !0 + ); + if (bs && Dr(bs.declarations) && ut(bs.declarations, (To) => xr(To) === xr(an))) { + const To = Ls && (ko(Ls) || cn(Ls) ? uB(Ls) : rK(Ls)), Oa = To && fo(To) ? zct(To) : void 0, _a = Oa && No( + Oa, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + an + ); + (_a || bs) && Wr(_a || bs); + const Ql = ue.tracker.disableTrackSymbol; + if (ue.tracker.disableTrackSymbol = !0, Xa) + Tn.push(N.createExportAssignment( + /*modifiers*/ + void 0, + Kn, + Xo( + bs, + ue, + -1 + /* All */ + ) + )); + else if (Oa === To && Oa) + dT(si, dn(Oa)); + else if (To && tl(To)) + dT(si, vg(bs, uc(bs))); + else { + const Yl = QM(si, St); + Fn( + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createIdentifier(Yl), + ku( + bs, + ue, + -1, + /*expectsIdentifier*/ + !1 + ) + ), + 0 + /* None */ + ), dT(si, Yl); + } + return ue.tracker.disableTrackSymbol = Ql, !0; + } else { + const To = QM(si, St), Oa = W_(Zr(Ma(St))); + if (sI(Oa, St)) + Kv( + Oa, + St, + To, + Xa ? 0 : 32 + /* Export */ + ); + else { + const _a = ((An = ue.enclosingDeclaration) == null ? void 0 : An.kind) === 267 && (!(St.flags & 98304) || St.flags & 65536) ? 1 : 2, Ql = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([ + N.createVariableDeclaration( + To, + /*exclamationToken*/ + void 0, + uu( + ue, + /*declaration*/ + void 0, + Oa, + St + ) + ) + ], _a) + ); + Fn( + Ql, + bs && bs.flags & 4 && bs.escapedName === "export=" ? 128 : si === To ? 32 : 0 + /* None */ + ); + } + return Xa ? (Tn.push(N.createExportAssignment( + /*modifiers*/ + void 0, + Kn, + N.createIdentifier(To) + )), !0) : si !== To ? (dT(si, To), !0) : !1; + } + } + function sI(St, An) { + var si; + const Kn = xr(ue.enclosingDeclaration); + return wn(St) & 48 && !ut((si = St.symbol) == null ? void 0 : si.declarations, ai) && // If the type comes straight from a type node, we shouldn't try to break it up + !Dr(Bu(St)) && !bP(St) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class + !!(Dr(Ln(Wa(St), q_)) || Dr(xs( + St, + 0 + /* Call */ + ))) && !Dr(xs( + St, + 1 + /* Construct */ + )) && // TODO: could probably serialize as function + ns + class, now that that's OK + !dE(An, an) && !(St.symbol && ut(St.symbol.declarations, (Wn) => xr(Wn) !== Kn)) && !ut(Wa(St), (Wn) => p8(Wn.escapedName)) && !ut(Wa(St), (Wn) => ut(Wn.declarations, (Xa) => xr(Xa) !== Kn)) && Ri(Wa(St), (Wn) => X_(uc(Wn), V) ? Wn.flags & 98304 ? u1(Wn) === l1(Wn) : !0 : !1); + } + function i5e(St, An, si) { + return function(Wn, Xa, Ls) { + var bs, To, Oa, _a, Ql; + const Yl = sp(Wn), zu = !!(Yl & 2); + if (Xa && Wn.flags & 2887656) + return []; + if (Wn.flags & 4194304 || Wn.escapedName === "constructor" || Ls && js(Ls, Wn.escapedName) && Hd(js(Ls, Wn.escapedName)) === Hd(Wn) && (Wn.flags & 16777216) === (js(Ls, Wn.escapedName).flags & 16777216) && Wh(Zr(Wn), Xc(Ls, Wn.escapedName))) + return []; + const Pc = Yl & -1025 | (Xa ? 256 : 0), Zl = Tc(Wn, ue), P_ = (bs = Wn.declarations) == null ? void 0 : bs.find(Ef(rs, _y, ti, I_, cn, Dn)); + if (Wn.flags & 98304 && si) { + const Fc = []; + if (Wn.flags & 65536) { + const w_ = Wn.declarations && rr(Wn.declarations, (Lm) => { + if (Lm.kind === 178) + return Lm; + if (Es(Lm) && X2(Lm)) + return rr(Lm.arguments[2].properties, (E1) => { + const D1 = es(E1); + if (D1 && Re(D1) && dn(D1) === "set") + return E1; + }); + }); + E.assert(!!w_); + const Rk = so(w_) ? Qf(w_).parameters[0] : void 0; + Fc.push(a( + ue, + N.createSetAccessorDeclaration( + N.createModifiersFromModifierFlags(Pc), + Zl, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Rk ? $o(Rk, xa(Rk), ue) : "value", + /*questionToken*/ + void 0, + zu ? void 0 : uu( + ue, + /*declaration*/ + void 0, + l1(Wn), + Wn + ) + )], + /*body*/ + void 0 + ), + ((To = Wn.declarations) == null ? void 0 : To.find(Yd)) || P_ + )); + } + if (Wn.flags & 32768) { + const w_ = Yl & 2; + Fc.push(a( + ue, + N.createGetAccessorDeclaration( + N.createModifiersFromModifierFlags(Pc), + Zl, + [], + w_ ? void 0 : uu( + ue, + /*declaration*/ + void 0, + Zr(Wn), + Wn + ), + /*body*/ + void 0 + ), + ((Oa = Wn.declarations) == null ? void 0 : Oa.find(n0)) || P_ + )); + } + return Fc; + } else if (Wn.flags & 98311) + return a( + ue, + St( + N.createModifiersFromModifierFlags((Hd(Wn) ? 8 : 0) | Pc), + Zl, + Wn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + zu ? void 0 : uu( + ue, + /*declaration*/ + void 0, + l1(Wn), + Wn + ), + // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 + // interface members can't have initializers, however class members _can_ + /*initializer*/ + void 0 + ), + ((_a = Wn.declarations) == null ? void 0 : _a.find(Ef(rs, ti))) || P_ + ); + if (Wn.flags & 8208) { + const Fc = Zr(Wn), w_ = xs( + Fc, + 0 + /* Call */ + ); + if (Pc & 2) + return a( + ue, + St( + N.createModifiersFromModifierFlags((Hd(Wn) ? 8 : 0) | Pc), + Zl, + Wn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + ((Ql = Wn.declarations) == null ? void 0 : Ql.find(so)) || w_[0] && w_[0].declaration || Wn.declarations && Wn.declarations[0] + ); + const Rk = []; + for (const Lm of w_) { + const E1 = Rr( + Lm, + An, + ue, + { + name: Zl, + questionToken: Wn.flags & 16777216 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + modifiers: Pc ? N.createModifiersFromModifierFlags(Pc) : void 0 + } + ), D1 = Lm.declaration && f3(Lm.declaration.parent) ? Lm.declaration.parent : Lm.declaration; + Rk.push(a(ue, E1, D1)); + } + return Rk; + } + return E.fail(`Unhandled class member kind! ${Wn.__debugFlags || Wn.flags}`); + }; + } + function Uut(St, An) { + return on( + St, + /*isStatic*/ + !1, + An + ); + } + function Ume(St, An, si, Kn) { + const Wn = xs(An, St); + if (St === 1) { + if (!si && Ri(Wn, (bs) => Dr(bs.parameters) === 0)) + return []; + if (si) { + const bs = xs( + si, + 1 + /* Construct */ + ); + if (!Dr(bs) && Ri(Wn, (To) => Dr(To.parameters) === 0)) + return []; + if (bs.length === Wn.length) { + let To = !1; + for (let Oa = 0; Oa < bs.length; Oa++) + if (!KL( + Wn[Oa], + bs[Oa], + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0, + E8 + )) { + To = !0; + break; + } + if (!To) + return []; + } + } + let Ls = 0; + for (const bs of Wn) + bs.declaration && (Ls |= UT( + bs.declaration, + 6 + /* Protected */ + )); + if (Ls) + return [a( + ue, + N.createConstructorDeclaration( + N.createModifiersFromModifierFlags(Ls), + /*parameters*/ + [], + /*body*/ + void 0 + ), + Wn[0].declaration + )]; + } + const Xa = []; + for (const Ls of Wn) { + const bs = Rr(Ls, Kn, ue); + Xa.push(a(ue, bs, Ls.declaration)); + } + return Xa; + } + function s5e(St, An) { + const si = []; + for (const Kn of Bu(St)) { + if (An) { + const Wn = eh(An, Kn.keyType); + if (Wn && Wh(Kn.type, Wn.type)) + continue; + } + si.push(tr( + Kn, + ue, + /*typeNode*/ + void 0 + )); + } + return si; + } + function qut(St, An, si) { + const Kn = qme( + St, + 111551 + /* Value */ + ); + if (Kn) + return Kn; + const Wn = QM(`${si}_base`), Xa = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Wn, + /*exclamationToken*/ + void 0, + J(An, ue) + ) + ], + 2 + /* Const */ + ) + ); + return Fn( + Xa, + 0 + /* None */ + ), N.createExpressionWithTypeArguments( + N.createIdentifier(Wn), + /*typeArguments*/ + void 0 + ); + } + function qme(St, An) { + let si, Kn; + if (St.target && au(St.target.symbol, an, An) ? (si = or(Po(St), (Wn) => J(Wn, ue)), Kn = Xo( + St.target.symbol, + ue, + 788968 + /* Type */ + )) : St.symbol && au(St.symbol, an, An) && (Kn = Xo( + St.symbol, + ue, + 788968 + /* Type */ + )), Kn) + return N.createExpressionWithTypeArguments(Kn, si); + } + function Hut(St) { + const An = qme( + St, + 788968 + /* Type */ + ); + if (An) + return An; + if (St.symbol) + return N.createExpressionWithTypeArguments( + Xo( + St.symbol, + ue, + 788968 + /* Type */ + ), + /*typeArguments*/ + void 0 + ); + } + function QM(St, An) { + var si, Kn; + const Wn = An ? $s(An) : void 0; + if (Wn && ue.remappedSymbolNames.has(Wn)) + return ue.remappedSymbolNames.get(Wn); + An && (St = a5e(An, St)); + let Xa = 0; + const Ls = St; + for (; (si = ue.usedSymbolNames) != null && si.has(St); ) + Xa++, St = `${Ls}_${Xa}`; + return (Kn = ue.usedSymbolNames) == null || Kn.add(St), Wn && ue.remappedSymbolNames.set(Wn, St), St; + } + function a5e(St, An) { + if (An === "default" || An === "__class" || An === "__function") { + const si = ue.flags; + ue.flags |= 16777216; + const Kn = ug(St, ue); + ue.flags = si, An = Kn.length > 0 && a3(Kn.charCodeAt(0)) ? Op(Kn) : Kn; + } + return An === "default" ? An = "_default" : An === "export=" && (An = "_exports"), An = X_(An, V) && !WT(An) ? An : "_" + An.replace(/[^a-zA-Z0-9]/g, "_"), An; + } + function vg(St, An) { + const si = $s(St); + return ue.remappedSymbolNames.has(si) ? ue.remappedSymbolNames.get(si) : (An = a5e(St, An), ue.remappedSymbolNames.set(si, An), An); + } + } + } + function Mv(r, a, l = 16384, f) { + return f ? m(f).getText() : e4(m); + function m(y) { + const x = vP(l) | 70221824 | 512, I = Ae.typePredicateToTypePredicateNode(r, a, x), R = gS(), J = a && xr(a); + return R.writeNode( + 4, + I, + /*sourceFile*/ + J, + y + ), y; + } + } + function vL(r) { + const a = []; + let l = 0; + for (let f = 0; f < r.length; f++) { + const m = r[f]; + if (l |= m.flags, !(m.flags & 98304)) { + if (m.flags & 1568) { + const y = m.flags & 512 ? br : vp(m); + if (y.flags & 1048576) { + const x = y.types.length; + if (f + x <= r.length && Ju(r[f + x - 1]) === Ju(y.types[x - 1])) { + a.push(y), f += x - 1; + continue; + } + } + } + a.push(m); + } + } + return l & 65536 && a.push(he), l & 32768 && a.push(Ut), a || r; + } + function Rv(r) { + return r === 2 ? "private" : r === 4 ? "protected" : "public"; + } + function o8(r) { + if (r.symbol && r.symbol.flags & 2048 && r.symbol.declarations) { + const a = v3(r.symbol.declarations[0].parent); + if (Rp(a)) + return xn(a); + } + } + function c8(r) { + return r && r.parent && r.parent.kind === 268 && _b(r.parent.parent); + } + function U6(r) { + return r.kind === 307 || wu(r); + } + function l8(r, a) { + const l = Ni(r).nameType; + if (l) { + if (l.flags & 384) { + const f = "" + l.value; + return !X_(f, pa(F)) && !Mg(f) ? `"${$m( + f, + 34 + /* doubleQuote */ + )}"` : Mg(f) && zi(f, "-") ? `[${f}]` : f; + } + if (l.flags & 8192) + return `[${ug(l.symbol, a)}]`; + } + } + function ug(r, a) { + var l; + if ((l = a?.remappedSymbolReferences) != null && l.has($s(r)) && (r = a.remappedSymbolReferences.get($s(r))), a && r.escapedName === "default" && !(a.flags & 16384) && // If it's not the first part of an entity name, it must print as `default` + (!(a.flags & 16777216) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` + !r.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` + a.enclosingDeclaration && sr(r.declarations[0], U6) !== sr(a.enclosingDeclaration, U6))) + return "default"; + if (r.declarations && r.declarations.length) { + let m = xc(r.declarations, (x) => es(x) ? x : void 0); + const y = m && es(m); + if (m && y) { + if (Es(m) && X2(m)) + return uc(r); + if (oa(y) && !(gc(r) & 4096)) { + const x = Ni(r).nameType; + if (x && x.flags & 384) { + const I = l8(r, a); + if (I !== void 0) + return I; + } + } + return ao(y); + } + if (m || (m = r.declarations[0]), m.parent && m.parent.kind === 260) + return ao(m.parent.name); + switch (m.kind) { + case 231: + case 218: + case 219: + return a && !a.encounteredError && !(a.flags & 131072) && (a.encounteredError = !0), m.kind === 231 ? "(Anonymous class)" : "(Anonymous function)"; + } + } + const f = l8(r, a); + return f !== void 0 ? f : uc(r); + } + function jh(r) { + if (r) { + const l = bn(r); + return l.isVisible === void 0 && (l.isVisible = !!a()), l.isVisible; + } + return !1; + function a() { + switch (r.kind) { + case 338: + case 346: + case 340: + return !!(r.parent && r.parent.parent && r.parent.parent.parent && yi(r.parent.parent.parent)); + case 208: + return jh(r.parent.parent); + case 260: + if (Ts(r.name) && !r.name.elements.length) + return !1; + case 267: + case 263: + case 264: + case 265: + case 262: + case 266: + case 271: + if (_b(r)) + return !0; + const l = _2(r); + return !(_X(r) & 32) && !(r.kind !== 271 && l.kind !== 307 && l.flags & 33554432) ? s0(l) : jh(l); + case 172: + case 171: + case 177: + case 178: + case 174: + case 173: + if (ef( + r, + 6 + /* Protected */ + )) + return !1; + case 176: + case 180: + case 179: + case 181: + case 169: + case 268: + case 184: + case 185: + case 187: + case 183: + case 188: + case 189: + case 192: + case 193: + case 196: + case 202: + return jh(r.parent); + case 273: + case 274: + case 276: + return !1; + case 168: + case 307: + case 270: + return !0; + case 277: + return !1; + default: + return !1; + } + } + } + function TP(r, a) { + let l; + r.parent && r.parent.kind === 277 ? l = Kt( + r, + r, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ) : r.parent.kind === 281 && (l = Fh( + r.parent, + 2998271 + /* Alias */ + )); + let f, m; + return l && (m = /* @__PURE__ */ new Set(), m.add($s(l)), y(l.declarations)), f; + function y(x) { + rr(x, (I) => { + const R = ns(I) || I; + if (a ? bn(I).isVisible = !0 : (f = f || [], Zf(f, R)), LT(I)) { + const J = I.moduleReference, ee = tf(J), Se = Kt( + I, + ee.escapedText, + 901119, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + Se && m && ih(m, $s(Se)) && y(Se.declarations); + } + }); + } + } + function _g(r, a) { + const l = jv(r, a); + if (l >= 0) { + const { length: f } = Lt; + for (let m = l; m < f; m++) + lr[m] = !1; + return !1; + } + return Lt.push(r), lr.push( + /*items*/ + !0 + ), Gr.push(a), !0; + } + function jv(r, a) { + for (let l = Lt.length - 1; l >= _r; l--) { + if (mk(Lt[l], Gr[l])) + return -1; + if (Lt[l] === r && Gr[l] === a) + return l; + } + return -1; + } + function mk(r, a) { + switch (a) { + case 0: + return !!Ni(r).type; + case 2: + return !!Ni(r).declaredType; + case 1: + return !!r.resolvedBaseConstructorType; + case 3: + return !!r.resolvedReturnType; + case 4: + return !!r.immediateBaseConstraint; + case 5: + return !!r.resolvedTypeArguments; + case 6: + return !!r.baseTypesResolved; + case 7: + return !!Ni(r).writeType; + case 8: + return bn(r).parameterInitializerContainsUndefined !== void 0; + } + return E.assertNever(a); + } + function fg() { + return Lt.pop(), Gr.pop(), lr.pop(); + } + function _2(r) { + return sr(nm(r), (a) => { + switch (a.kind) { + case 260: + case 261: + case 276: + case 275: + case 274: + case 273: + return !1; + default: + return !0; + } + }).parent; + } + function bL(r) { + const a = mo(s_(r)); + return a.typeParameters ? H0(a, or(a.typeParameters, (l) => Ne)) : a; + } + function Xc(r, a) { + const l = js(r, a); + return l ? Zr(l) : void 0; + } + function q6(r, a) { + var l; + let f; + return Xc(r, a) || (f = (l = Tk(r, a)) == null ? void 0 : l.type) && oi( + f, + /*isProperty*/ + !0, + /*isOptional*/ + !0 + ); + } + function Ea(r) { + return r && (r.flags & 1) !== 0; + } + function Aa(r) { + return r === be || !!(r.flags & 1 && r.aliasSymbol); + } + function xP(r, a) { + if (a !== 0) + return ro( + r, + /*includeOptionality*/ + !1, + a + ); + const l = xn(r); + return l && Ni(l).type || ro( + r, + /*includeOptionality*/ + !1, + a + ); + } + function H6(r, a, l) { + if (r = Jc(r, (R) => !(R.flags & 98304)), r.flags & 131072) + return bi; + if (r.flags & 1048576) + return Ho(r, (R) => H6(R, a, l)); + let f = Gn(or(a, X0)); + const m = [], y = []; + for (const R of Wa(r)) { + const J = kk( + R, + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + !Bs(J, f) && !(sp(R) & 6) && IG(R) ? m.push(R) : y.push(J); + } + if (YS(r) || ZS(f)) { + if (y.length && (f = Gn([f, ...y])), f.flags & 131072) + return r; + const R = jKe(); + return R ? K6(R, [r, f]) : be; + } + const x = Ms(); + for (const R of m) + x.set(R.escapedName, gpe( + R, + /*readonly*/ + !1 + )); + const I = ie(l, x, He, He, Bu(r)); + return I.objectFlags |= 4194304, I; + } + function kP(r) { + return !!(r.flags & 465829888) && Sc( + Hl(r) || yt, + 32768 + /* Undefined */ + ); + } + function gk(r) { + const a = Hp(r, kP) ? Ho(r, (l) => l.flags & 465829888 ? dg(l) : l) : r; + return qp( + a, + 524288 + /* NEUndefined */ + ); + } + function Q(r, a) { + const l = xe(r); + return l ? $h(l, a) : a; + } + function xe(r) { + const a = qe(r); + if (a && g3(a) && a.flowNode) { + const l = gt(r); + if (l) { + const f = ot(av.createStringLiteral(l), r), m = __(a) ? a : av.createParenthesizedExpression(a), y = ot(av.createElementAccessExpression(m, f), r); + return Da(f, y), Da(y, r), m !== a && Da(m, y), y.flowNode = a.flowNode, y; + } + } + } + function qe(r) { + const a = r.parent.parent; + switch (a.kind) { + case 208: + case 303: + return xe(a); + case 209: + return xe(r.parent); + case 260: + return a.initializer; + case 226: + return a.right; + } + } + function gt(r) { + const a = r.parent; + return r.kind === 208 && a.kind === 206 ? Nt(r.propertyName || r.name) : r.kind === 303 || r.kind === 304 ? Nt(r.name) : "" + a.elements.indexOf(r); + } + function Nt(r) { + const a = X0(r); + return a.flags & 384 ? "" + a.value : void 0; + } + function dr(r) { + const a = r.dotDotDotToken ? 32 : 0, l = xP(r.parent.parent, a); + return l && In( + r, + l, + /*noTupleBoundsCheck*/ + !1 + ); + } + function In(r, a, l) { + if (Ea(a)) + return a; + const f = r.parent; + K && r.flags & 33554432 && X1(r) ? a = qh(a) : K && f.parent.initializer && !Ud( + hNe(f.parent.initializer), + 65536 + /* EQUndefined */ + ) && (a = qp( + a, + 524288 + /* NEUndefined */ + )); + let m; + if (f.kind === 206) + if (r.dotDotDotToken) { + if (a = Wd(a), a.flags & 2 || !hM(a)) + return We(r, p.Rest_types_may_only_be_created_from_object_types), be; + const y = []; + for (const x of f.elements) + x.dotDotDotToken || y.push(x.propertyName || x.name); + m = H6(a, y, r.symbol); + } else { + const y = r.propertyName || r.name, x = X0(y), I = J_(a, x, 32, y); + m = Q(r, I); + } + else { + const y = K0(65 | (r.dotDotDotToken ? 0 : 128), a, Ut, f), x = f.elements.indexOf(r); + if (r.dotDotDotToken) { + const I = Ho(a, (R) => R.flags & 58982400 ? dg(R) : R); + m = V_(I, la) ? Ho(I, (R) => OP(R, x)) : cu(y); + } else if (Y0(a)) { + const I = pd(x), R = 32 | (l || JP(r) ? 16 : 0), J = m1(a, I, R, r.name) || be; + m = Q(r, J); + } else + m = y; + } + return r.initializer ? Vc(Hk(r)) ? K && !Ud( + WP( + r, + 0 + /* Normal */ + ), + 16777216 + /* IsUndefined */ + ) ? gk(m) : m : B$(r, Gn( + [gk(m), WP( + r, + 0 + /* Normal */ + )], + 2 + /* Subtype */ + )) : m; + } + function Ti(r) { + const a = R1(r); + if (a) + return xi(a); + } + function fi(r) { + const a = Ja( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 106 || a.kind === 80 && df(a) === De; + } + function ni(r) { + const a = Ja( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 209 && a.elements.length === 0; + } + function oi(r, a = !1, l = !0) { + return K && l ? b1(r, a) : r; + } + function ro(r, a, l) { + if (ti(r) && r.parent.parent.kind === 249) { + const x = Dm(Pde(qi( + r.parent.parent.expression, + /*checkMode*/ + l + ))); + return x.flags & 4456448 ? K3e(x) : we; + } + if (ti(r) && r.parent.parent.kind === 250) { + const x = r.parent.parent; + return WM(x) || Ne; + } + if (Ts(r.parent)) + return dr(r); + const f = rs(r) && !im(r) || I_(r) || Jte(r), m = a && q4(r), y = ze(r); + if (Rj(r)) + return y ? Ea(y) || y === yt ? y : be : fe ? yt : Ne; + if (y) + return oi(y, f, m); + if ((ne || Qr(r)) && ti(r) && !Ts(r.name) && !(_X(r) & 32) && !(r.flags & 33554432)) { + if (!(P2(r) & 6) && (!r.initializer || fi(r.initializer))) + return et; + if (r.initializer && ni(r.initializer)) + return to; + } + if (ji(r)) { + if (!r.symbol) + return; + const x = r.parent; + if (x.kind === 178 && X6(x)) { + const J = Jo( + xn(r.parent), + 177 + /* GetAccessor */ + ); + if (J) { + const ee = Qf(J), Se = zme(x); + return Se && r === Se ? (E.assert(!Se.type), Zr(ee.thisParameter)) : Ha(ee); + } + } + const I = cKe(x, r); + if (I) return I; + const R = r.symbol.escapedName === "this" ? $Ne(x) : XNe(r); + if (R) + return oi( + R, + /*isProperty*/ + !1, + m + ); + } + if (U2(r) && r.initializer) { + if (Qr(r) && !ji(r)) { + const I = u8(r, xn(r), l4(r)); + if (I) + return I; + } + const x = B$(r, WP(r, l)); + return oi(x, f, m); + } + if (rs(r) && (ne || Qr(r))) + if (Uc(r)) { + const x = Ln(r.parent.members, ac), I = x.length ? s1(r.symbol, x) : Au(r) & 128 ? HG(r.symbol) : void 0; + return I && oi( + I, + /*isProperty*/ + !0, + m + ); + } else { + const x = G3(r.parent), I = x ? J0(r.symbol, x) : Au(r) & 128 ? HG(r.symbol) : void 0; + return I && oi( + I, + /*isProperty*/ + !0, + m + ); + } + if (dm(r)) + return wt; + if (Ts(r.name)) + return j_( + r.name, + /*includePatternInType*/ + !1, + /*reportErrors*/ + !0 + ); + } + function no(r) { + if (r.valueDeclaration && cn(r.valueDeclaration)) { + const a = Ni(r); + return a.isConstructorDeclaredProperty === void 0 && (a.isConstructorDeclaredProperty = !1, a.isConstructorDeclaredProperty = !!Gf(r) && Ri(r.declarations, (l) => cn(l) && h$(l) && (l.left.kind !== 212 || Pf(l.left.argumentExpression)) && !_8( + /*declaredType*/ + void 0, + l, + r, + l + ))), a.isConstructorDeclaredProperty; + } + return !1; + } + function Ta(r) { + const a = r.valueDeclaration; + return a && rs(a) && !Vc(a) && !a.initializer && (ne || Qr(a)); + } + function Gf(r) { + if (r.declarations) + for (const a of r.declarations) { + const l = Uu( + a, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (l && (l.kind === 176 || Im(l))) + return l; + } + } + function Cm(r) { + const a = xr(r.declarations[0]), l = Pi(r.escapedName), f = r.declarations.every((y) => Qr(y) && go(y) && Ag(y.expression)), m = f ? N.createPropertyAccessExpression(N.createPropertyAccessExpression(N.createIdentifier("module"), N.createIdentifier("exports")), l) : N.createPropertyAccessExpression(N.createIdentifier("exports"), l); + return f && Da(m.expression.expression, m.expression), Da(m.expression, m), Da(m, a), m.flowNode = a.endFlowNode, $h(m, et, Ut); + } + function s1(r, a) { + const l = zi(r.escapedName, "__#") ? N.createPrivateIdentifier(r.escapedName.split("@")[1]) : Pi(r.escapedName); + for (const f of a) { + const m = N.createPropertyAccessExpression(N.createThis(), l); + Da(m.expression, m), Da(m, f), m.flowNode = f.returnFlowNode; + const y = $f(m, r); + if (ne && (y === et || y === to) && We(r.valueDeclaration, p.Member_0_implicitly_has_an_1_type, Si(r), Ur(y)), !V_(y, bM)) + return K8(y); + } + } + function J0(r, a) { + const l = zi(r.escapedName, "__#") ? N.createPrivateIdentifier(r.escapedName.split("@")[1]) : Pi(r.escapedName), f = N.createPropertyAccessExpression(N.createThis(), l); + Da(f.expression, f), Da(f, a), f.flowNode = a.returnFlowNode; + const m = $f(f, r); + return ne && (m === et || m === to) && We(r.valueDeclaration, p.Member_0_implicitly_has_an_1_type, Si(r), Ur(m)), V_(m, bM) ? void 0 : K8(m); + } + function $f(r, a) { + const l = a?.valueDeclaration && (!Ta(a) || Au(a.valueDeclaration) & 128) && HG(a) || Ut; + return $h(r, et, l); + } + function z0(r, a) { + const l = MT(r.valueDeclaration); + if (l) { + const I = Qr(l) ? M1(l) : void 0; + return I && I.typeExpression ? xi(I.typeExpression) : r.valueDeclaration && u8(r.valueDeclaration, r, l) || $v(Dc(l)); + } + let f, m = !1, y = !1; + if (no(r) && (f = J0(r, Gf(r))), !f) { + let I; + if (r.declarations) { + let R; + for (const J of r.declarations) { + const ee = cn(J) || Es(J) ? J : go(J) ? cn(J.parent) ? J.parent : J : void 0; + if (!ee) + continue; + const Se = go(ee) ? _3(ee) : mc(ee); + (Se === 4 || cn(ee) && h$(ee, Se)) && (Qc(ee) ? m = !0 : y = !0), Es(ee) || (R = _8(R, ee, r, J)), R || (I || (I = [])).push(cn(ee) || Es(ee) ? SL(r, a, ee, Se) : fr); + } + f = R; + } + if (!f) { + if (!Dr(I)) + return be; + let R = m && r.declarations ? a1(I, r.declarations) : void 0; + if (y) { + const ee = HG(r); + ee && ((R || (R = [])).push(ee), m = !0); + } + const J = ut(R, (ee) => !!(ee.flags & -98305)) ? R : I; + f = Gn(J); + } + } + const x = W_(oi( + f, + /*isProperty*/ + !1, + y && !m + )); + return r.valueDeclaration && Qr(r.valueDeclaration) && Jc(x, (I) => !!(I.flags & -98305)) === fr ? (Xv(r.valueDeclaration, Ne), Ne) : x; + } + function u8(r, a, l) { + var f, m; + if (!Qr(r) || !l || !Gs(l) || l.properties.length) + return; + const y = Ms(); + for (; cn(r) || Dn(r); ) { + const R = C_(r); + (f = R?.exports) != null && f.size && sd(y, R.exports), r = cn(r) ? r.parent : r.parent.parent; + } + const x = C_(r); + (m = x?.exports) != null && m.size && sd(y, x.exports); + const I = ie(a, y, He, He, He); + return I.objectFlags |= 4096, I; + } + function _8(r, a, l, f) { + var m; + const y = Vc(a.parent); + if (y) { + const x = W_(xi(y)); + if (r) + !Aa(r) && !Aa(x) && !Wh(r, x) && QIe( + /*firstDeclaration*/ + void 0, + r, + f, + x + ); + else return x; + } + if ((m = l.parent) != null && m.valueDeclaration) { + const x = lk(l.parent); + if (x.valueDeclaration) { + const I = Vc(x.valueDeclaration); + if (I) { + const R = js(xi(I), l.escapedName); + if (R) + return u1(R); + } + } + } + return r; + } + function SL(r, a, l, f) { + if (Es(l)) { + if (a) + return Zr(a); + const x = Dc(l.arguments[2]), I = Xc(x, "value"); + if (I) + return I; + const R = Xc(x, "get"); + if (R) { + const ee = uT(R); + if (ee) + return Ha(ee); + } + const J = Xc(x, "set"); + if (J) { + const ee = uT(J); + if (ee) + return Qde(ee); + } + return Ne; + } + if (Na(l.left, l.right)) + return Ne; + const m = f === 1 && (Dn(l.left) || ho(l.left)) && (Ag(l.left.expression) || Re(l.left.expression) && $2(l.left.expression)), y = a ? Zr(a) : m ? Ju(Dc(l.right)) : $v(Dc(l.right)); + if (y.flags & 524288 && f === 2 && r.escapedName === "export=") { + const x = zd(y), I = Ms(); + KI(x.members, I); + const R = I.size; + a && !a.exports && (a.exports = Ms()), (a || r).exports.forEach((ee, Se) => { + var me; + const Ve = I.get(Se); + if (Ve && Ve !== ee && !(ee.flags & 2097152)) + if (ee.flags & 111551 && Ve.flags & 111551) { + if (ee.valueDeclaration && Ve.valueDeclaration && xr(ee.valueDeclaration) !== xr(Ve.valueDeclaration)) { + const ht = Pi(ee.escapedName), er = ((me = Jn(Ve.valueDeclaration, Bl)) == null ? void 0 : me.name) || Ve.valueDeclaration; + Fs( + We(ee.valueDeclaration, p.Duplicate_identifier_0, ht), + Xr(er, p._0_was_also_declared_here, ht) + ), Fs( + We(er, p.Duplicate_identifier_0, ht), + Xr(ee.valueDeclaration, p._0_was_also_declared_here, ht) + ); + } + const mt = va(ee.flags | Ve.flags, Se); + mt.links.type = Gn([Zr(ee), Zr(Ve)]), mt.valueDeclaration = Ve.valueDeclaration, mt.declarations = Hi(Ve.declarations, ee.declarations), I.set(Se, mt); + } else + I.set(Se, Nh(ee, Ve)); + else + I.set(Se, ee); + }); + const J = ie( + R !== I.size ? void 0 : x.symbol, + // Only set the type's symbol if it looks to be the same as the original type + I, + x.callSignatures, + x.constructSignatures, + x.indexInfos + ); + if (R === I.size && (y.aliasSymbol && (J.aliasSymbol = y.aliasSymbol, J.aliasTypeArguments = y.aliasTypeArguments), wn(y) & 4)) { + J.aliasSymbol = y.symbol; + const ee = Po(y); + J.aliasTypeArguments = Dr(ee) ? ee : void 0; + } + return J.objectFlags |= ML([y]) | wn(y) & 20608, J.symbol && J.symbol.flags & 32 && y === Yc(J.symbol) && (J.objectFlags |= 16777216), J; + } + return $G(y) ? (Xv(l, Do), Do) : y; + } + function Na(r, a) { + return Dn(r) && r.expression.kind === 110 && kx(a, (l) => Ll(r, l)); + } + function Qc(r) { + const a = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + return a.kind === 176 || a.kind === 262 || a.kind === 218 && !f3(a.parent); + } + function a1(r, a) { + return E.assert(r.length === a.length), r.filter((l, f) => { + const m = a[f], y = cn(m) ? m : cn(m.parent) ? m.parent : void 0; + return y && Qc(y); + }); + } + function fd(r, a, l) { + if (r.initializer) { + const f = Ts(r.name) ? j_( + r.name, + /*includePatternInType*/ + !0, + /*reportErrors*/ + !1 + ) : yt; + return oi(B$(r, WP(r, l ? 0 : 1, f))); + } + return Ts(r.name) ? j_(r.name, a, l) : (l && !se(r) && Xv(r, Ne), a ? bt : Ne); + } + function Bv(r, a, l) { + const f = Ms(); + let m, y = 131200; + rr(r.elements, (I) => { + const R = I.propertyName || I.name; + if (I.dotDotDotToken) { + m = mg( + we, + Ne, + /*isReadonly*/ + !1 + ); + return; + } + const J = X0(R); + if (!Fp(J)) { + y |= 512; + return; + } + const ee = Lp(J), Se = 4 | (I.initializer ? 16777216 : 0), me = va(Se, ee); + me.links.type = fd(I, a, l), me.links.bindingElement = I, f.set(me.escapedName, me); + }); + const x = ie( + /*symbol*/ + void 0, + f, + He, + He, + m ? [m] : He + ); + return x.objectFlags |= y, a && (x.pattern = r, x.objectFlags |= 131072), x; + } + function W0(r, a, l) { + const f = r.elements, m = Bo(f), y = m && m.kind === 208 && m.dotDotDotToken ? m : void 0; + if (f.length === 0 || f.length === 1 && y) + return V >= 2 ? R3e(Ne) : Do; + const x = or(f, (ee) => ml(ee) ? Ne : fd(ee, a, l)), I = cI(f, (ee) => !(ee === y || ml(ee) || JP(ee)), f.length - 1) + 1, R = or( + f, + (ee, Se) => ee === y ? 4 : Se >= I ? 2 : 1 + /* Required */ + ); + let J = gg(x, R); + return a && (J = y3e(J), J.pattern = r, J.objectFlags |= 131072), J; + } + function j_(r, a = !1, l = !1) { + return r.kind === 206 ? Bv(r, a, l) : W0(r, a, l); + } + function $r(r, a) { + return B(ro( + r, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ), r, a); + } + function v(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = va( + 4096, + "__importAttributes" + /* ImportAttributes */ + ), f = Ms(); + rr(r.elements, (y) => { + const x = va(4, w5(y)); + x.parent = l, x.links.type = Wct(y), x.links.target = x, f.set(x.escapedName, x); + }); + const m = ie(l, f, He, He, He); + m.objectFlags |= 262272, a.resolvedType = m; + } + return a.resolvedType; + } + function w(r) { + const a = C_(r), l = EKe( + /*reportErrors*/ + !1 + ); + return l && a && a === l; + } + function B(r, a, l) { + return r ? (r.flags & 4096 && w(a.parent) && (r = hpe(a)), l && r$(a, r), r.flags & 8192 && (da(a) || !a.type) && r.symbol !== xn(a) && (r = Lr), W_(r)) : (r = ji(a) && a.dotDotDotToken ? Do : Ne, l && (se(a) || Xv(a, r)), r); + } + function se(r) { + const a = nm(r), l = a.kind === 169 ? a.parent : a; + return RM(l); + } + function ze(r) { + const a = Vc(r); + if (a) + return xi(a); + } + function Ft(r) { + let a = r.valueDeclaration; + return a ? (da(a) && (a = Hk(a)), ji(a) ? BG(a.parent) : !1) : !1; + } + function fn(r, a) { + const l = Ni(r); + if (!l.type) { + const f = $i(r, a); + return !l.type && !Ft(r) && !a && (l.type = f), f; + } + return l.type; + } + function $i(r, a) { + if (r.flags & 4194304) + return bL(r); + if (r === ye) + return Ne; + if (r.flags & 134217728 && r.valueDeclaration) { + const m = xn(xr(r.valueDeclaration)), y = va(m.flags, "exports"); + y.declarations = m.declarations ? m.declarations.slice() : [], y.parent = r, y.links.target = m, m.valueDeclaration && (y.valueDeclaration = m.valueDeclaration), m.members && (y.members = new Map(m.members)), m.exports && (y.exports = new Map(m.exports)); + const x = Ms(); + return x.set("exports", y), ie(r, x, He, He, He); + } + E.assertIsDefined(r.valueDeclaration); + const l = r.valueDeclaration; + if (yi(l) && Ap(l)) + return l.statements.length ? W_($v(qi(l.statements[0].expression))) : bi; + if (_y(l)) + return Jv(r); + if (!_g( + r, + 0 + /* Type */ + )) + return r.flags & 512 && !(r.flags & 67108864) ? CP(r) : da(l) && a === 1 ? be : hk(r); + let f; + if (l.kind === 277) + f = B(ze(l) || Dc(l.expression), l); + else if (cn(l) || Qr(l) && (Es(l) || (Dn(l) || P7(l)) && cn(l.parent))) + f = z0(r); + else if (Dn(l) || ho(l) || Re(l) || Ga(l) || m_(l) || rl(l) || Ac(l) || hc(l) && !Yp(l) || um(l) || yi(l)) { + if (r.flags & 9136) + return CP(r); + f = cn(l.parent) ? z0(r) : ze(l) || Ne; + } else if (qc(l)) + f = ze(l) || xIe(l); + else if (dm(l)) + f = ze(l) || o8e(l); + else if (du(l)) + f = ze(l) || UP( + l.name, + 0 + /* Normal */ + ); + else if (Yp(l)) + f = ze(l) || kIe( + l, + 0 + /* Normal */ + ); + else if (ji(l) || rs(l) || I_(l) || ti(l) || da(l) || HE(l)) + f = $r( + l, + /*reportErrors*/ + !0 + ); + else if (rv(l)) + f = CP(r); + else if (Py(l)) + f = fG(r); + else + return E.fail("Unhandled declaration kind! " + E.formatSyntaxKind(l.kind) + " for " + E.formatSymbol(r)); + return fg() ? f : r.flags & 512 && !(r.flags & 67108864) ? CP(r) : da(l) && a === 1 ? f : hk(r); + } + function Ba(r) { + if (r) + switch (r.kind) { + case 177: + return K_(r); + case 178: + return mK(r); + case 172: + return E.assert(im(r)), Vc(r); + } + } + function Cf(r) { + const a = Ba(r); + return a && xi(a); + } + function o1(r) { + const a = zme(r); + return a && a.symbol; + } + function c1(r) { + return Vv(Qf(r)); + } + function Jv(r) { + const a = Ni(r); + if (!a.type) { + if (!_g( + r, + 0 + /* Type */ + )) + return be; + const l = Jo( + r, + 177 + /* GetAccessor */ + ), f = Jo( + r, + 178 + /* SetAccessor */ + ), m = Jn(Jo( + r, + 172 + /* PropertyDeclaration */ + ), u_); + let y = l && Qr(l) && Ti(l) || Cf(l) || Cf(f) || Cf(m) || l && l.body && L$(l) || m && m.initializer && $r( + m, + /*reportErrors*/ + !0 + ); + y || (f && !RM(f) ? ll(ne, f, p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, Si(r)) : l && !RM(l) ? ll(ne, l, p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, Si(r)) : m && !RM(m) && ll(ne, m, p.Member_0_implicitly_has_an_1_type, Si(r), "any"), y = Ne), fg() || (Ba(l) ? We(l, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Si(r)) : Ba(f) || Ba(m) ? We(f, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Si(r)) : l && ne && We(l, p._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, Si(r)), y = Ne), a.type ?? (a.type = y); + } + return a.type; + } + function uG(r) { + const a = Ni(r); + if (!a.writeType) { + if (!_g( + r, + 7 + /* WriteType */ + )) + return be; + const l = Jo( + r, + 178 + /* SetAccessor */ + ) ?? Jn(Jo( + r, + 172 + /* PropertyDeclaration */ + ), u_); + let f = Cf(l); + fg() || (Ba(l) && We(l, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Si(r)), f = Ne), a.writeType ?? (a.writeType = f || Jv(r)); + } + return a.writeType; + } + function _G(r) { + const a = zv(Yc(r)); + return a.flags & 8650752 ? a : a.flags & 2097152 ? Nn(a.types, (l) => !!(l.flags & 8650752)) : void 0; + } + function CP(r) { + let a = Ni(r); + const l = a; + if (!a.type) { + const f = r.valueDeclaration && O$( + r.valueDeclaration, + /*allowDeclaration*/ + !1 + ); + if (f) { + const m = Ude(r, f); + m && (r = m, a = m.links); + } + l.type = a.type = mfe(r); + } + return a.type; + } + function mfe(r) { + const a = r.valueDeclaration; + if (r.flags & 1536 && Vw(r)) + return Ne; + if (a && (a.kind === 226 || go(a) && a.parent.kind === 226)) + return z0(r); + if (r.flags & 512 && a && yi(a) && a.commonJsModuleIndicator) { + const f = M_(r); + if (f !== r) { + if (!_g( + r, + 0 + /* Type */ + )) + return be; + const m = Ma(r.exports.get( + "export=" + /* ExportEquals */ + )), y = z0(m, m === f ? void 0 : f); + return fg() ? y : hk(r); + } + } + const l = yp(16, r); + if (r.flags & 32) { + const f = _G(r); + return f ? Ys([l, f]) : l; + } else + return K && r.flags & 16777216 ? b1( + l, + /*isProperty*/ + !0 + ) : l; + } + function fG(r) { + const a = Ni(r); + return a.type || (a.type = bk(r)); + } + function gfe(r) { + const a = Ni(r); + if (!a.type) { + if (!_g( + r, + 0 + /* Type */ + )) + return be; + const l = Ec(r), f = r.declarations && Lh( + k_(r), + /*dontRecursivelyResolve*/ + !0 + ), m = xc(f?.declarations, (y) => ko(y) ? ze(y) : void 0); + if (a.type ?? (a.type = f?.declarations && tX(f.declarations) && r.declarations.length ? Cm(f) : tX(r.declarations) ? et : m || (n_(l) & 111551 ? Zr(l) : be)), !fg()) + return hk(f ?? r), a.type ?? (a.type = be); + } + return a.type; + } + function hfe(r) { + const a = Ni(r); + return a.type || (a.type = Ji(Zr(a.target), a.mapper)); + } + function yfe(r) { + const a = Ni(r); + return a.writeType || (a.writeType = Ji(l1(a.target), a.mapper)); + } + function hk(r) { + const a = r.valueDeclaration; + if (a) { + if (Vc(a)) + return We(r.valueDeclaration, p._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, Si(r)), be; + ne && (a.kind !== 169 || a.initializer) && We(r.valueDeclaration, p._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, Si(r)); + } else if (r.flags & 2097152) { + const l = k_(r); + l && We(l, p.Circular_definition_of_import_alias_0, Si(r)); + } + return Ne; + } + function pG(r) { + const a = Ni(r); + return a.type || (E.assertIsDefined(a.deferralParent), E.assertIsDefined(a.deferralConstituents), a.type = a.deferralParent.flags & 1048576 ? Gn(a.deferralConstituents) : Ys(a.deferralConstituents)), a.type; + } + function yk(r) { + const a = Ni(r); + return !a.writeType && a.deferralWriteConstituents && (E.assertIsDefined(a.deferralParent), E.assertIsDefined(a.deferralConstituents), a.writeType = a.deferralParent.flags & 1048576 ? Gn(a.deferralWriteConstituents) : Ys(a.deferralWriteConstituents)), a.writeType; + } + function l1(r) { + const a = gc(r); + return r.flags & 4 ? a & 2 ? a & 65536 ? yk(r) || pG(r) : ( + // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty + r.links.writeType || r.links.type + ) : Hh(Zr(r), !!(r.flags & 16777216)) : r.flags & 98304 ? a & 1 ? yfe(r) : uG(r) : Zr(r); + } + function Zr(r, a) { + const l = gc(r); + return l & 65536 ? pG(r) : l & 1 ? hfe(r) : l & 262144 ? VZe(r) : l & 8192 ? ort(r) : r.flags & 7 ? fn(r, a) : r.flags & 9136 ? CP(r) : r.flags & 8 ? fG(r) : r.flags & 98304 ? Jv(r) : r.flags & 2097152 ? gfe(r) : be; + } + function u1(r) { + return Hh(Zr(r), !!(r.flags & 16777216)); + } + function V0(r, a) { + return r !== void 0 && a !== void 0 && (wn(r) & 4) !== 0 && r.target === a; + } + function G6(r) { + return wn(r) & 4 ? r.target : r; + } + function vk(r, a) { + return l(r); + function l(f) { + if (wn(f) & 7) { + const m = G6(f); + return m === a || ut(un(m), l); + } else if (f.flags & 2097152) + return ut(f.types, l); + return !1; + } + } + function TL(r, a) { + for (const l of a) + r = sh(r, Zg(xn(l))); + return r; + } + function $6(r, a) { + for (; ; ) { + if (r = r.parent, r && cn(r)) { + const l = mc(r); + if (l === 6 || l === 3) { + const f = xn(r.left); + f && f.parent && !sr(f.parent.valueDeclaration, (m) => r === m) && (r = f.parent.valueDeclaration); + } + } + if (!r) + return; + switch (r.kind) { + case 263: + case 231: + case 264: + case 179: + case 180: + case 173: + case 184: + case 185: + case 317: + case 262: + case 174: + case 218: + case 219: + case 265: + case 345: + case 346: + case 340: + case 338: + case 200: + case 194: { + const f = $6(r, a); + if (r.kind === 200) + return Tr(f, Zg(xn(r.typeParameter))); + if (r.kind === 194) + return Hi(f, ppe(r)); + const m = TL(f, ly(r)), y = a && (r.kind === 263 || r.kind === 231 || r.kind === 264 || Im(r)) && Yc(xn(r)).thisType; + return y ? Tr(m, y) : m; + } + case 341: + const l = y3(r); + l && (r = l.valueDeclaration); + break; + case 320: { + const f = $6(r, a); + return r.tags ? TL(f, Xs(r.tags, (m) => jp(m) ? m.typeParameters : void 0)) : f; + } + } + } + } + function dG(r) { + var a; + const l = r.flags & 32 || r.flags & 16 ? r.valueDeclaration : (a = r.declarations) == null ? void 0 : a.find((f) => { + if (f.kind === 264) + return !0; + if (f.kind !== 260) + return !1; + const m = f.initializer; + return !!m && (m.kind === 218 || m.kind === 219); + }); + return E.assert(!!l, "Class was missing valueDeclaration -OR- non-class had no interface declarations"), $6(l); + } + function U0(r) { + if (!r.declarations) + return; + let a; + for (const l of r.declarations) + (l.kind === 264 || l.kind === 263 || l.kind === 231 || Im(l) || m3(l)) && (a = TL(a, ly(l))); + return a; + } + function xL(r) { + return Hi(dG(r), U0(r)); + } + function kL(r) { + const a = xs( + r, + 1 + /* Construct */ + ); + if (a.length === 1) { + const l = a[0]; + if (!l.typeParameters && l.parameters.length === 1 && gu(l)) { + const f = wM(l.parameters[0]); + return Ea(f) || tM(f) === Ne; + } + } + return !1; + } + function CL(r) { + if (xs( + r, + 1 + /* Construct */ + ).length > 0) + return !0; + if (r.flags & 8650752) { + const a = Hl(r); + return !!a && kL(a); + } + return !1; + } + function f8(r) { + const a = gh(r.symbol); + return a && tm(a); + } + function EL(r, a, l) { + const f = Dr(a), m = Qr(l); + return Ln(xs( + r, + 1 + /* Construct */ + ), (y) => (m || f >= Em(y.typeParameters)) && f <= Dr(y.typeParameters)); + } + function f2(r, a, l) { + const f = EL(r, a, l), m = or(a, xi); + return Zc(f, (y) => ut(y.typeParameters) ? h8(y, m, Qr(l)) : y); + } + function zv(r) { + if (!r.resolvedBaseConstructorType) { + const a = gh(r.symbol), l = a && tm(a), f = f8(r); + if (!f) + return r.resolvedBaseConstructorType = Ut; + if (!_g( + r, + 1 + /* ResolvedBaseConstructorType */ + )) + return be; + const m = qi(f.expression); + if (l && f !== l && (E.assert(!l.typeArguments), qi(l.expression)), m.flags & 2621440 && zd(m), !fg()) + return We(r.symbol.valueDeclaration, p._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, Si(r.symbol)), r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = be); + if (!(m.flags & 1) && m !== q && !CL(m)) { + const y = We(f.expression, p.Type_0_is_not_a_constructor_function_type, Ur(m)); + if (m.flags & 262144) { + const x = AP(m); + let I = yt; + if (x) { + const R = xs( + x, + 1 + /* Construct */ + ); + R[0] && (I = Ha(R[0])); + } + m.symbol.declarations && Fs(y, Xr(m.symbol.declarations[0], p.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, Si(m.symbol), Ur(I))); + } + return r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = be); + } + r.resolvedBaseConstructorType ?? (r.resolvedBaseConstructorType = m); + } + return r.resolvedBaseConstructorType; + } + function US(r) { + let a = He; + if (r.symbol.declarations) + for (const l of r.symbol.declarations) { + const f = dC(l); + if (f) + for (const m of f) { + const y = xi(m); + Aa(y) || (a === He ? a = [y] : a.push(y)); + } + } + return a; + } + function yr(r, a) { + We(r, p.Type_0_recursively_references_itself_as_a_base_type, Ur( + a, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + )); + } + function un(r) { + if (!r.baseTypesResolved) { + if (_g( + r, + 6 + /* ResolvedBaseTypes */ + ) && (r.objectFlags & 8 ? r.resolvedBaseTypes = [On(r)] : r.symbol.flags & 96 ? (r.symbol.flags & 32 && pi(r), r.symbol.flags & 64 && co(r)) : E.fail("type must be class or interface"), !fg() && r.symbol.declarations)) + for (const a of r.symbol.declarations) + (a.kind === 263 || a.kind === 264) && yr(a, r); + r.baseTypesResolved = !0; + } + return r.resolvedBaseTypes; + } + function On(r) { + const a = Zc(r.typeParameters, (l, f) => r.elementFlags[f] & 8 ? J_(l, _e) : l); + return cu(Gn(a || He), r.readonly); + } + function pi(r) { + r.resolvedBaseTypes = Pj; + const a = ju(zv(r)); + if (!(a.flags & 2621441)) + return r.resolvedBaseTypes = He; + const l = f8(r); + let f; + const m = a.symbol ? mo(a.symbol) : void 0; + if (a.symbol && a.symbol.flags & 32 && di(m)) + f = v3e(l, a.symbol); + else if (a.flags & 1) + f = a; + else { + const x = f2(a, l.typeArguments, l); + if (!x.length) + return We(l.expression, p.No_base_constructor_has_the_specified_number_of_type_arguments), r.resolvedBaseTypes = He; + f = Ha(x[0]); + } + if (Aa(f)) + return r.resolvedBaseTypes = He; + const y = Wd(f); + if (!ba(y)) { + const x = Afe( + /*errorInfo*/ + void 0, + f + ), I = us(x, p.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members, Ur(y)); + return La.add(wg(xr(l.expression), l.expression, I)), r.resolvedBaseTypes = He; + } + return r === y || vk(y, r) ? (We(r.symbol.valueDeclaration, p.Type_0_recursively_references_itself_as_a_base_type, Ur( + r, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + )), r.resolvedBaseTypes = He) : (r.resolvedBaseTypes === Pj && (r.members = void 0), r.resolvedBaseTypes = [y]); + } + function di(r) { + const a = r.outerTypeParameters; + if (a) { + const l = a.length - 1, f = Po(r); + return a[l].symbol !== f[l].symbol; + } + return !0; + } + function ba(r) { + if (r.flags & 262144) { + const a = Hl(r); + if (a) + return ba(a); + } + return !!(r.flags & 67633153 && !B_(r) || r.flags & 2097152 && Ri(r.types, ba)); + } + function co(r) { + if (r.resolvedBaseTypes = r.resolvedBaseTypes || He, r.symbol.declarations) { + for (const a of r.symbol.declarations) + if (a.kind === 264 && m4(a)) + for (const l of m4(a)) { + const f = Wd(xi(l)); + Aa(f) || (ba(f) ? r !== f && !vk(f, r) ? r.resolvedBaseTypes === He ? r.resolvedBaseTypes = [f] : r.resolvedBaseTypes.push(f) : yr(a, r) : We(l, p.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members)); + } + } + } + function ou(r) { + if (!r.declarations) + return !0; + for (const a of r.declarations) + if (a.kind === 264) { + if (a.flags & 256) + return !1; + const l = m4(a); + if (l) { + for (const f of l) + if (fo(f.expression)) { + const m = No( + f.expression, + 788968, + /*ignoreErrors*/ + !0 + ); + if (!m || !(m.flags & 64) || Yc(m).thisType) + return !1; + } + } + } + return !0; + } + function Yc(r) { + let a = Ni(r); + const l = a; + if (!a.declaredType) { + const f = r.flags & 32 ? 1 : 2, m = Ude(r, r.valueDeclaration && mst(r.valueDeclaration)); + m && (r = m, a = m.links); + const y = l.declaredType = a.declaredType = yp(f, r), x = dG(r), I = U0(r); + (x || I || f === 1 || !ou(r)) && (y.objectFlags |= 4, y.typeParameters = Hi(x, I), y.outerTypeParameters = x, y.localTypeParameters = I, y.instantiations = /* @__PURE__ */ new Map(), y.instantiations.set(Up(y.typeParameters), y), y.target = y, y.resolvedTypeArguments = y.typeParameters, y.thisType = ff(r), y.thisType.isThisType = !0, y.thisType.constraint = y); + } + return a.declaredType; + } + function Bd(r) { + var a; + const l = Ni(r); + if (!l.declaredType) { + if (!_g( + r, + 2 + /* DeclaredType */ + )) + return be; + const f = E.checkDefined((a = r.declarations) == null ? void 0 : a.find(m3), "Type alias symbol with no valid declaration found"), m = Np(f) ? f.typeExpression : f.type; + let y = m ? xi(m) : be; + if (fg()) { + const x = U0(r); + x && (l.typeParameters = x, l.instantiations = /* @__PURE__ */ new Map(), l.instantiations.set(Up(x), y)); + } else + y = be, f.kind === 340 ? We(f.typeExpression.type, p.Type_alias_0_circularly_references_itself, Si(r)) : We(Bl(f) && f.name || f, p.Type_alias_0_circularly_references_itself, Si(r)); + l.declaredType ?? (l.declaredType = y); + } + return l.declaredType; + } + function vp(r) { + return r.flags & 1056 && r.symbol.flags & 8 ? mo(s_(r.symbol)) : r; + } + function Bh(r) { + const a = Ni(r); + if (!a.declaredType) { + const l = []; + if (r.declarations) { + for (const m of r.declarations) + if (m.kind === 266) { + for (const y of m.members) + if (X6(y)) { + const x = xn(y), I = pT(y).value, R = Pk( + I !== void 0 ? Wet(I, $s(r), x) : EP(x) + ); + Ni(x).declaredType = R, l.push(Ju(R)); + } + } + } + const f = l.length ? Gn( + l, + 1, + r, + /*aliasTypeArguments*/ + void 0 + ) : EP(r); + f.flags & 1048576 && (f.flags |= 1024, f.symbol = r), a.declaredType = f; + } + return a.declaredType; + } + function EP(r) { + const a = jd(32, r), l = jd(32, r); + return a.regularType = a, a.freshType = l, l.regularType = a, l.freshType = l, a; + } + function bk(r) { + const a = Ni(r); + if (!a.declaredType) { + const l = Bh(s_(r)); + a.declaredType || (a.declaredType = l); + } + return a.declaredType; + } + function Zg(r) { + const a = Ni(r); + return a.declaredType || (a.declaredType = ff(r)); + } + function bZe(r) { + const a = Ni(r); + return a.declaredType || (a.declaredType = mo(Ec(r))); + } + function mo(r) { + return jwe(r) || be; + } + function jwe(r) { + if (r.flags & 96) + return Yc(r); + if (r.flags & 524288) + return Bd(r); + if (r.flags & 262144) + return Zg(r); + if (r.flags & 384) + return Bh(r); + if (r.flags & 8) + return bk(r); + if (r.flags & 2097152) + return bZe(r); + } + function DL(r) { + switch (r.kind) { + case 133: + case 159: + case 154: + case 150: + case 163: + case 136: + case 155: + case 151: + case 116: + case 157: + case 146: + case 201: + return !0; + case 188: + return DL(r.elementType); + case 183: + return !r.typeArguments || r.typeArguments.every(DL); + } + return !1; + } + function SZe(r) { + const a = $k(r); + return !a || DL(a); + } + function Bwe(r) { + const a = Vc(r); + return a ? DL(a) : !i0(r); + } + function TZe(r) { + const a = K_(r), l = ly(r); + return (r.kind === 176 || !!a && DL(a)) && r.parameters.every(Bwe) && l.every(SZe); + } + function xZe(r) { + if (r.declarations && r.declarations.length === 1) { + const a = r.declarations[0]; + if (a) + switch (a.kind) { + case 172: + case 171: + return Bwe(a); + case 174: + case 173: + case 176: + case 177: + case 178: + return TZe(a); + } + } + return !1; + } + function Jwe(r, a, l) { + const f = Ms(); + for (const m of r) + f.set(m.escapedName, l && xZe(m) ? m : bpe(m, a)); + return f; + } + function zwe(r, a) { + for (const l of a) { + if (Wwe(l)) + continue; + const f = r.get(l.escapedName); + (!f || f.valueDeclaration && cn(f.valueDeclaration) && !no(f) && !JZ(f.valueDeclaration)) && (r.set(l.escapedName, l), r.set(l.escapedName, l)); + } + } + function Wwe(r) { + return !!r.valueDeclaration && Pu(r.valueDeclaration) && Os(r.valueDeclaration); + } + function vfe(r) { + if (!r.declaredProperties) { + const a = r.symbol, l = _1(a); + r.declaredProperties = r1(l), r.declaredCallSignatures = He, r.declaredConstructSignatures = He, r.declaredIndexInfos = He, r.declaredCallSignatures = m2(l.get( + "__call" + /* Call */ + )), r.declaredConstructSignatures = m2(l.get( + "__new" + /* New */ + )), r.declaredIndexInfos = m3e(a); + } + return r; + } + function mG(r) { + if (!oa(r) && !ho(r)) + return !1; + const a = oa(r) ? r.expression : r.argumentExpression; + return fo(a) && Fp(oa(r) ? wm(r) : Dc(a)); + } + function p8(r) { + return r.charCodeAt(0) === 95 && r.charCodeAt(1) === 95 && r.charCodeAt(2) === 64; + } + function PL(r) { + const a = es(r); + return !!a && mG(a); + } + function X6(r) { + return !ph(r) || PL(r); + } + function kZe(r) { + return F7(r) && !mG(r); + } + function CZe(r, a, l) { + E.assert(!!(gc(r) & 4096), "Expected a late-bound symbol."), r.flags |= l, Ni(a.symbol).lateSymbol = r, r.declarations ? a.symbol.isReplaceableByMethod || r.declarations.push(a) : r.declarations = [a], l & 111551 && (!r.valueDeclaration || r.valueDeclaration.kind !== a.kind) && (r.valueDeclaration = a); + } + function Vwe(r, a, l, f) { + E.assert(!!f.symbol, "The member is expected to have a symbol."); + const m = bn(f); + if (!m.resolvedSymbol) { + m.resolvedSymbol = f.symbol; + const y = cn(f) ? f.left : f.name, x = ho(y) ? Dc(y.argumentExpression) : wm(y); + if (Fp(x)) { + const I = Lp(x), R = f.symbol.flags; + let J = l.get(I); + J || l.set(I, J = va( + 0, + I, + 4096 + /* Late */ + )); + const ee = a && a.get(I); + if (!(r.flags & 32) && J.flags & n2(R)) { + const Se = ee ? Hi(ee.declarations, J.declarations) : J.declarations, me = !(x.flags & 8192) && Pi(I) || ao(y); + rr(Se, (Ve) => We(es(Ve) || Ve, p.Property_0_was_also_declared_here, me)), We(y || f, p.Duplicate_property_0, me), J = va( + 0, + I, + 4096 + /* Late */ + ); + } + return J.links.nameType = x, CZe(J, f, R), J.parent ? E.assert(J.parent === r, "Existing symbol parent should match new one") : J.parent = r, m.resolvedSymbol = J; + } + } + return m.resolvedSymbol; + } + function bfe(r, a) { + const l = Ni(r); + if (!l[a]) { + const f = a === "resolvedExports", m = f ? r.flags & 1536 ? Iv(r).exports : r.exports : r.members; + l[a] = m || O; + const y = Ms(); + for (const R of r.declarations || He) { + const J = NZ(R); + if (J) + for (const ee of J) + f === Uc(ee) && PL(ee) && Vwe(r, m, y, ee); + } + const x = lk(r).assignmentDeclarationMembers; + if (x) { + const R = ts(x.values()); + for (const J of R) { + const ee = mc(J), Se = ee === 3 || cn(J) && h$(J, ee) || ee === 9 || ee === 6; + f === !Se && PL(J) && Vwe(r, m, y, J); + } + } + let I = Cv(m, y); + if (r.flags & 33554432 && l.cjsExportMerged && r.declarations) + for (const R of r.declarations) { + const J = Ni(R.symbol)[a]; + if (!I) { + I = J; + continue; + } + J && J.forEach((ee, Se) => { + const me = I.get(Se); + if (!me) I.set(Se, ee); + else { + if (me === ee) return; + I.set(Se, Nh(me, ee)); + } + }); + } + l[a] = I || O; + } + return l[a]; + } + function _1(r) { + return r.flags & 6256 ? bfe( + r, + "resolvedMembers" + /* resolvedMembers */ + ) : r.members || O; + } + function gG(r) { + if (r.flags & 106500 && r.escapedName === "__computed") { + const a = Ni(r); + if (!a.lateSymbol && ut(r.declarations, PL)) { + const l = Ma(r.parent); + ut(r.declarations, Uc) ? _f(l) : _1(l); + } + return a.lateSymbol || (a.lateSymbol = r); + } + return r; + } + function pf(r, a, l) { + if (wn(r) & 4) { + const f = r.target, m = Po(r); + return Dr(f.typeParameters) === Dr(m) ? H0(f, Hi(m, [a || f.thisType])) : r; + } else if (r.flags & 2097152) { + const f = Zc(r.types, (m) => pf(m, a, l)); + return f !== r.types ? Ys(f) : r; + } + return l ? ju(r) : r; + } + function Uwe(r, a, l, f) { + let m, y, x, I, R; + oR(l, f, 0, l.length) ? (y = a.symbol ? _1(a.symbol) : Ms(a.declaredProperties), x = a.declaredCallSignatures, I = a.declaredConstructSignatures, R = a.declaredIndexInfos) : (m = z_(l, f), y = Jwe( + a.declaredProperties, + m, + /*mappingThisOnly*/ + l.length === 1 + ), x = MG(a.declaredCallSignatures, m), I = MG(a.declaredConstructSignatures, m), R = gAe(a.declaredIndexInfos, m)); + const J = un(a); + if (J.length) { + if (a.symbol && y === _1(a.symbol)) { + const Se = Ms(a.declaredProperties), me = Jfe(a.symbol); + me && Se.set("__index", me), y = Se; + } + k(r, y, x, I, R); + const ee = Bo(f); + for (const Se of J) { + const me = ee ? pf(Ji(Se, m), ee) : Se; + zwe(y, Wa(me)), x = Hi(x, xs( + me, + 0 + /* Call */ + )), I = Hi(I, xs( + me, + 1 + /* Construct */ + )); + const Ve = me !== Ne ? Bu(me) : [mg( + we, + Ne, + /*isReadonly*/ + !1 + )]; + R = Hi(R, Ln(Ve, (mt) => !Nfe(R, mt.keyType))); + } + } + k(r, y, x, I, R); + } + function EZe(r) { + Uwe(r, vfe(r), He, He); + } + function DZe(r) { + const a = vfe(r.target), l = Hi(a.typeParameters, [a.thisType]), f = Po(r), m = f.length === l.length ? f : Hi(f, [r]); + Uwe(r, a, l, m); + } + function Kg(r, a, l, f, m, y, x, I) { + const R = new _(Vt, I); + return R.declaration = r, R.typeParameters = a, R.parameters = f, R.thisParameter = l, R.resolvedReturnType = m, R.resolvedTypePredicate = y, R.minArgumentCount = x, R.resolvedMinArgumentCount = void 0, R.target = void 0, R.mapper = void 0, R.compositeSignatures = void 0, R.compositeKind = void 0, R; + } + function d8(r) { + const a = Kg( + r.declaration, + r.typeParameters, + r.thisParameter, + r.parameters, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + r.minArgumentCount, + r.flags & 167 + /* PropagatingFlags */ + ); + return a.target = r.target, a.mapper = r.mapper, a.compositeSignatures = r.compositeSignatures, a.compositeKind = r.compositeKind, a; + } + function qwe(r, a) { + const l = d8(r); + return l.compositeSignatures = a, l.compositeKind = 1048576, l.target = void 0, l.mapper = void 0, l; + } + function PZe(r, a) { + if ((r.flags & 24) === a) + return r; + r.optionalCallSignatureCache || (r.optionalCallSignatureCache = {}); + const l = a === 8 ? "inner" : "outer"; + return r.optionalCallSignatureCache[l] || (r.optionalCallSignatureCache[l] = wZe(r, a)); + } + function wZe(r, a) { + E.assert(a === 8 || a === 16, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); + const l = d8(r); + return l.flags |= a, l; + } + function Hwe(r, a) { + if (gu(r)) { + const m = r.parameters.length - 1, y = r.parameters[m].escapedName, x = Zr(r.parameters[m]); + if (la(x)) + return [l(x, m, y)]; + if (!a && x.flags & 1048576 && Ri(x.types, la)) + return or(x.types, (I) => l(I, m, y)); + } + return [r.parameters]; + function l(m, y, x) { + const I = Po(m), R = f(m, x), J = or(I, (ee, Se) => { + const me = R && R[Se] ? R[Se] : zP(r, y + Se, m), Ve = m.target.elementFlags[Se], mt = Ve & 12 ? 32768 : Ve & 2 ? 16384 : 0, ht = va(1, me, mt); + return ht.links.type = Ve & 4 ? cu(ee) : ee, ht; + }); + return Hi(r.parameters.slice(0, y), J); + } + function f(m, y) { + const x = /* @__PURE__ */ new Map(); + return or(m.target.labeledElementDeclarations, (I, R) => { + const J = Xde(I, R, y), ee = x.get(J); + return ee === void 0 ? (x.set(J, 1), J) : (x.set(J, ee + 1), `${J}_${ee}`); + }); + } + } + function AZe(r) { + const a = zv(r), l = xs( + a, + 1 + /* Construct */ + ), f = gh(r.symbol), m = !!f && Vn( + f, + 64 + /* Abstract */ + ); + if (l.length === 0) + return [Kg( + /*declaration*/ + void 0, + r.localTypeParameters, + /*thisParameter*/ + void 0, + He, + r, + /*resolvedTypePredicate*/ + void 0, + 0, + m ? 4 : 0 + /* None */ + )]; + const y = f8(r), x = Qr(y), I = jL(y), R = Dr(I), J = []; + for (const ee of l) { + const Se = Em(ee.typeParameters), me = Dr(ee.typeParameters); + if (x || R >= Se && R <= me) { + const Ve = me ? bG(ee, p1(I, ee.typeParameters, Se, x)) : d8(ee); + Ve.typeParameters = r.localTypeParameters, Ve.resolvedReturnType = r, Ve.flags = m ? Ve.flags | 4 : Ve.flags & -5, J.push(Ve); + } + } + return J; + } + function hG(r, a, l, f, m) { + for (const y of r) + if (KL(y, a, l, f, m, l ? ott : E8)) + return y; + } + function NZe(r, a, l) { + if (a.typeParameters) { + if (l > 0) + return; + for (let m = 1; m < r.length; m++) + if (!hG( + r[m], + a, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1 + )) + return; + return [a]; + } + let f; + for (let m = 0; m < r.length; m++) { + const y = m === l ? a : hG( + r[m], + a, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + ) || hG( + r[m], + a, + /*partialMatch*/ + !0, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + ); + if (!y) + return; + f = sh(f, y); + } + return f; + } + function Sfe(r) { + let a, l; + for (let f = 0; f < r.length; f++) { + if (r[f].length === 0) return He; + r[f].length > 1 && (l = l === void 0 ? f : -1); + for (const m of r[f]) + if (!a || !hG( + a, + m, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !0 + )) { + const y = NZe(r, m, f); + if (y) { + let x = m; + if (y.length > 1) { + let I = m.thisParameter; + const R = rr(y, (J) => J.thisParameter); + if (R) { + const J = Ys(Ii(y, (ee) => ee.thisParameter && Zr(ee.thisParameter))); + I = tT(R, J); + } + x = qwe(m, y), x.thisParameter = I; + } + (a || (a = [])).push(x); + } + } + } + if (!Dr(a) && l !== -1) { + const f = r[l !== void 0 ? l : 0]; + let m = f.slice(); + for (const y of r) + if (y !== f) { + const x = y[0]; + if (E.assert(!!x, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"), m = x.typeParameters && ut(m, (I) => !!I.typeParameters && !Gwe(x.typeParameters, I.typeParameters)) ? void 0 : or(m, (I) => FZe(I, x)), !m) + break; + } + a = m; + } + return a || He; + } + function Gwe(r, a) { + if (Dr(r) !== Dr(a)) + return !1; + if (!r || !a) + return !0; + const l = z_(a, r); + for (let f = 0; f < r.length; f++) { + const m = r[f], y = a[f]; + if (m !== y && !Wh(AP(m) || yt, Ji(AP(y) || yt, l))) + return !1; + } + return !0; + } + function IZe(r, a, l) { + if (!r || !a) + return r || a; + const f = Ys([Zr(r), Ji(Zr(a), l)]); + return tT(r, f); + } + function OZe(r, a, l) { + const f = U_(r), m = U_(a), y = f >= m ? r : a, x = y === r ? a : r, I = y === r ? f : m, R = yg(r) || yg(a), J = R && !yg(y), ee = new Array(I + (J ? 1 : 0)); + for (let Se = 0; Se < I; Se++) { + let me = C2(y, Se); + y === a && (me = Ji(me, l)); + let Ve = C2(x, Se) || yt; + x === a && (Ve = Ji(Ve, l)); + const mt = Ys([me, Ve]), ht = R && !J && Se === I - 1, er = Se >= Om(y) && Se >= Om(x), tr = Se >= f ? void 0 : zP(r, Se), Rr = Se >= m ? void 0 : zP(a, Se), vn = tr === Rr ? tr : tr ? Rr ? void 0 : tr : Rr, cr = va( + 1 | (er && !ht ? 16777216 : 0), + vn || `arg${Se}`, + ht ? 32768 : er ? 16384 : 0 + ); + cr.links.type = ht ? cu(mt) : mt, ee[Se] = cr; + } + if (J) { + const Se = va( + 1, + "args", + 32768 + /* RestParameter */ + ); + Se.links.type = cu(qd(x, I)), x === a && (Se.links.type = Ji(Se.links.type, l)), ee[I] = Se; + } + return ee; + } + function FZe(r, a) { + const l = r.typeParameters || a.typeParameters; + let f; + r.typeParameters && a.typeParameters && (f = z_(a.typeParameters, r.typeParameters)); + const m = r.declaration, y = OZe(r, a, f), x = IZe(r.thisParameter, a.thisParameter, f), I = Math.max(r.minArgumentCount, a.minArgumentCount), R = Kg( + m, + l, + x, + y, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + I, + (r.flags | a.flags) & 167 + /* PropagatingFlags */ + ); + return R.compositeKind = 1048576, R.compositeSignatures = Hi(r.compositeKind !== 2097152 && r.compositeSignatures || [r], [a]), f ? R.mapper = r.compositeKind !== 2097152 && r.mapper && r.compositeSignatures ? S2(r.mapper, f) : f : r.compositeKind !== 2097152 && r.mapper && r.compositeSignatures && (R.mapper = r.mapper), R; + } + function $we(r) { + const a = Bu(r[0]); + if (a) { + const l = []; + for (const f of a) { + const m = f.keyType; + Ri(r, (y) => !!eh(y, m)) && l.push(mg(m, Gn(or(r, (y) => Wv(y, m))), ut(r, (y) => eh(y, m).isReadonly))); + } + return l; + } + return He; + } + function LZe(r) { + const a = Sfe(or(r.types, (m) => m === kc ? [Me] : xs( + m, + 0 + /* Call */ + ))), l = Sfe(or(r.types, (m) => xs( + m, + 1 + /* Construct */ + ))), f = $we(r.types); + k(r, O, a, l, f); + } + function wL(r, a) { + return r ? a ? Ys([r, a]) : r : a; + } + function Xwe(r) { + const a = ty(r, (f) => xs( + f, + 1 + /* Construct */ + ).length > 0), l = or(r, kL); + if (a > 0 && a === ty(l, (f) => f)) { + const f = l.indexOf( + /*searchElement*/ + !0 + ); + l[f] = !1; + } + return l; + } + function MZe(r, a, l, f) { + const m = []; + for (let y = 0; y < a.length; y++) + y === f ? m.push(r) : l[y] && m.push(Ha(xs( + a[y], + 1 + /* Construct */ + )[0])); + return Ys(m); + } + function RZe(r) { + let a, l, f; + const m = r.types, y = Xwe(m), x = ty(y, (I) => I); + for (let I = 0; I < m.length; I++) { + const R = r.types[I]; + if (!y[I]) { + let J = xs( + R, + 1 + /* Construct */ + ); + J.length && x > 0 && (J = or(J, (ee) => { + const Se = d8(ee); + return Se.resolvedReturnType = MZe(Ha(ee), m, y, I), Se; + })), l = Qwe(l, J); + } + a = Qwe(a, xs( + R, + 0 + /* Call */ + )), f = Eu(Bu(R), (J, ee) => Ywe( + J, + ee, + /*union*/ + !1 + ), f); + } + k(r, O, a || He, l || He, f || He); + } + function Qwe(r, a) { + for (const l of a) + (!r || Ri(r, (f) => !KL( + f, + l, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1, + E8 + ))) && (r = Tr(r, l)); + return r; + } + function Ywe(r, a, l) { + if (r) + for (let f = 0; f < r.length; f++) { + const m = r[f]; + if (m.keyType === a.keyType) + return r[f] = mg(m.keyType, l ? Gn([m.type, a.type]) : Ys([m.type, a.type]), l ? m.isReadonly || a.isReadonly : m.isReadonly && a.isReadonly), r; + } + return Tr(r, a); + } + function jZe(r) { + if (r.target) { + k(r, O, He, He, He); + const x = Jwe( + f1(r.target), + r.mapper, + /*mappingThisOnly*/ + !1 + ), I = MG(xs( + r.target, + 0 + /* Call */ + ), r.mapper), R = MG(xs( + r.target, + 1 + /* Construct */ + ), r.mapper), J = gAe(Bu(r.target), r.mapper); + k(r, x, I, R, J); + return; + } + const a = Ma(r.symbol); + if (a.flags & 2048) { + k(r, O, He, He, He); + const x = _1(a), I = m2(x.get( + "__call" + /* Call */ + )), R = m2(x.get( + "__new" + /* New */ + )), J = m3e(a); + k(r, x, I, R, J); + return; + } + let l = _f(a), f; + if (a === Xe) { + const x = /* @__PURE__ */ new Map(); + l.forEach((I) => { + var R; + !(I.flags & 418) && !(I.flags & 512 && ((R = I.declarations) != null && R.length) && Ri(I.declarations, wu)) && x.set(I.escapedName, I); + }), l = x; + } + let m; + if (k(r, l, He, He, He), a.flags & 32) { + const x = Yc(a), I = zv(x); + I.flags & 11272192 ? (l = Ms(_k(l)), zwe(l, Wa(I))) : I === Ne && (m = mg( + we, + Ne, + /*isReadonly*/ + !1 + )); + } + const y = SG(l); + if (y ? f = zfe(y) : (m && (f = Tr(f, m)), a.flags & 384 && (mo(a).flags & 32 || ut(r.properties, (x) => !!(Zr(x).flags & 296))) && (f = Tr(f, kr))), k(r, l, He, He, f || He), a.flags & 8208 && (r.callSignatures = m2(a)), a.flags & 32) { + const x = Yc(a); + let I = a.members ? m2(a.members.get( + "__constructor" + /* Constructor */ + )) : He; + a.flags & 16 && (I = Bn( + I.slice(), + Ii( + r.callSignatures, + (R) => Im(R.declaration) ? Kg( + R.declaration, + R.typeParameters, + R.thisParameter, + R.parameters, + x, + /*resolvedTypePredicate*/ + void 0, + R.minArgumentCount, + R.flags & 167 + /* PropagatingFlags */ + ) : void 0 + ) + )), I.length || (I = AZe(x)), r.constructSignatures = I; + } + } + function BZe(r, a, l) { + return Ji(r, z_([a.indexType, a.objectType], [pd(0), gg([l])])); + } + function JZe(r) { + const a = Xf(r.mappedType); + if (!(a.flags & 1048576 || a.flags & 2097152)) + return; + const l = a.flags & 1048576 ? a.origin : a; + if (!l || !(l.flags & 2097152)) + return; + const f = Ys(l.types.filter((m) => m !== r.constraintType)); + return f !== fr ? f : void 0; + } + function zZe(r) { + const a = eh(r.source, we), l = pg(r.mappedType), f = !(l & 1), m = l & 4 ? 0 : 16777216, y = a ? [mg(we, i$(a.type, r.mappedType, r.constraintType) || yt, f && a.isReadonly)] : He, x = Ms(), I = JZe(r); + for (const R of Wa(r.source)) { + if (I) { + const Se = kk( + R, + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + if (!Bs(Se, I)) + continue; + } + const J = 8192 | (f && Hd(R) ? 8 : 0), ee = va(4 | R.flags & m, R.escapedName, J); + if (ee.declarations = R.declarations, ee.links.nameType = Ni(R).nameType, ee.links.propertyType = Zr(R), r.constraintType.type.flags & 8388608 && r.constraintType.type.objectType.flags & 262144 && r.constraintType.type.indexType.flags & 262144) { + const Se = r.constraintType.type.objectType, me = BZe(r.mappedType, r.constraintType.type, Se); + ee.links.mappedType = me, ee.links.constraintType = Dm(Se); + } else + ee.links.mappedType = r.mappedType, ee.links.constraintType = r.constraintType; + x.set(R.escapedName, ee); + } + k(r, x, He, He, y); + } + function AL(r) { + if (r.flags & 4194304) { + const a = ju(r.type); + return v1(a) ? z3e(a) : Dm(a); + } + if (r.flags & 16777216) { + if (r.root.isDistributive) { + const a = r.checkType, l = AL(a); + if (l !== a) + return Spe( + r, + KS(r.root.checkType, l, r.mapper), + /*forConstraint*/ + !1 + ); + } + return r; + } + if (r.flags & 1048576) + return Ho( + r, + AL, + /*noReductions*/ + !0 + ); + if (r.flags & 2097152) { + const a = r.types; + return a.length === 2 && a[0].flags & 76 && a[1] === Su ? r : Ys(Zc(r.types, AL)); + } + return r; + } + function Tfe(r) { + return gc(r) & 4096; + } + function xfe(r, a, l, f) { + for (const m of Wa(r)) + f(kk(m, a)); + if (r.flags & 1) + f(we); + else + for (const m of Bu(r)) + (!l || m.keyType.flags & 134217732) && f(m.keyType); + } + function WZe(r) { + const a = Ms(); + let l; + k(r, O, He, He, He); + const f = Jd(r), m = Xf(r), y = r.target || r, x = q0(y), I = yG(y) !== 2, R = Jh(y), J = ju(p2(r)), ee = pg(r); + Q6(r) ? xfe( + J, + 8576, + /*stringsOnly*/ + !1, + me + ) : sT(AL(m), me), k(r, a, He, He, l || He); + function me(mt) { + const ht = x ? Ji(x, x8(r.mapper, f, mt)) : mt; + sT(ht, (er) => Ve(mt, er)); + } + function Ve(mt, ht) { + if (Fp(ht)) { + const er = Lp(ht), tr = a.get(er); + if (tr) + tr.links.nameType = Gn([tr.links.nameType, ht]), tr.links.keyType = Gn([tr.links.keyType, mt]); + else { + const Rr = Fp(mt) ? js(J, Lp(mt)) : void 0, vn = !!(ee & 4 || !(ee & 8) && Rr && Rr.flags & 16777216), cr = !!(ee & 1 || !(ee & 2) && Rr && Hd(Rr)), Cr = K && !vn && Rr && Rr.flags & 16777216, Fr = Rr ? Tfe(Rr) : 0, En = va(4 | (vn ? 16777216 : 0), er, Fr | 262144 | (cr ? 8 : 0) | (Cr ? 524288 : 0)); + En.links.mappedType = r, En.links.nameType = ht, En.links.keyType = mt, Rr && (En.links.syntheticOrigin = Rr, En.declarations = I ? Rr.declarations : void 0), a.set(er, En); + } + } else if (TG(ht) || ht.flags & 33) { + const er = ht.flags & 5 ? we : ht.flags & 40 ? _e : ht, tr = Ji(R, x8(r.mapper, f, mt)), Rr = m8(J, ht), vn = !!(ee & 1 || !(ee & 2) && Rr?.isReadonly), cr = mg(er, tr, vn); + l = Ywe( + l, + cr, + /*union*/ + !0 + ); + } + } + } + function VZe(r) { + var a; + if (!r.links.type) { + const l = r.links.mappedType; + if (!_g( + r, + 0 + /* Type */ + )) + return l.containsError = !0, be; + const f = Jh(l.target || l), m = x8(l.mapper, Jd(l), r.links.keyType), y = Ji(f, m); + let x = K && r.flags & 16777216 && !Sc( + y, + 49152 + /* Void */ + ) ? b1( + y, + /*isProperty*/ + !0 + ) : r.links.checkFlags & 524288 ? KG(y) : y; + fg() || (We(C, p.Type_of_property_0_circularly_references_itself_in_mapped_type_1, Si(r), Ur(l)), x = be), (a = r.links).type ?? (a.type = x); + } + return r.links.type; + } + function Jd(r) { + return r.typeParameter || (r.typeParameter = Zg(xn(r.declaration.typeParameter))); + } + function Xf(r) { + return r.constraintType || (r.constraintType = a_(Jd(r)) || be); + } + function q0(r) { + return r.declaration.nameType ? r.nameType || (r.nameType = Ji(xi(r.declaration.nameType), r.mapper)) : void 0; + } + function Jh(r) { + return r.templateType || (r.templateType = r.declaration.type ? Ji(oi( + xi(r.declaration.type), + /*isProperty*/ + !0, + !!(pg(r) & 4) + ), r.mapper) : be); + } + function Zwe(r) { + return $k(r.declaration.typeParameter); + } + function Q6(r) { + const a = Zwe(r); + return a.kind === 198 && a.operator === 143; + } + function p2(r) { + if (!r.modifiersType) + if (Q6(r)) + r.modifiersType = Ji(xi(Zwe(r).type), r.mapper); + else { + const a = _pe(r.declaration), l = Xf(a), f = l && l.flags & 262144 ? a_(l) : l; + r.modifiersType = f && f.flags & 4194304 ? Ji(f.type, r.mapper) : yt; + } + return r.modifiersType; + } + function pg(r) { + const a = r.declaration; + return (a.readonlyToken ? a.readonlyToken.kind === 41 ? 2 : 1 : 0) | (a.questionToken ? a.questionToken.kind === 41 ? 8 : 4 : 0); + } + function Kwe(r) { + const a = pg(r); + return a & 8 ? -1 : a & 4 ? 1 : 0; + } + function DP(r) { + if (wn(r) & 32) + return Kwe(r) || DP(p2(r)); + if (r.flags & 2097152) { + const a = DP(r.types[0]); + return Ri(r.types, (l, f) => f === 0 || DP(l) === a) ? a : 0; + } + return 0; + } + function UZe(r) { + return !!(wn(r) & 32 && pg(r) & 4); + } + function B_(r) { + if (wn(r) & 32) { + const a = Xf(r); + if (ZS(a)) + return !0; + const l = q0(r); + if (l && ZS(Ji(l, b2(Jd(r), a)))) + return !0; + } + return !1; + } + function yG(r) { + const a = q0(r); + return a ? Bs(a, Jd(r)) ? 1 : 2 : 0; + } + function zd(r) { + return r.members || (r.flags & 524288 ? r.objectFlags & 4 ? DZe(r) : r.objectFlags & 3 ? EZe(r) : r.objectFlags & 1024 ? zZe(r) : r.objectFlags & 16 ? jZe(r) : r.objectFlags & 32 ? WZe(r) : E.fail("Unhandled object type " + E.formatObjectFlags(r.objectFlags)) : r.flags & 1048576 ? LZe(r) : r.flags & 2097152 ? RZe(r) : E.fail("Unhandled type " + E.formatTypeFlags(r.flags))), r; + } + function f1(r) { + return r.flags & 524288 ? zd(r).properties : He; + } + function d2(r, a) { + if (r.flags & 524288) { + const f = zd(r).members.get(a); + if (f && t1(f)) + return f; + } + } + function NL(r) { + if (!r.resolvedProperties) { + const a = Ms(); + for (const l of r.types) { + for (const f of Wa(l)) + if (!a.has(f.escapedName)) { + const m = OL( + r, + f.escapedName, + /*skipObjectFunctionPropertyAugment*/ + !!(r.flags & 2097152) + ); + m && a.set(f.escapedName, m); + } + if (r.flags & 1048576 && Bu(l).length === 0) + break; + } + r.resolvedProperties = r1(a); + } + return r.resolvedProperties; + } + function Wa(r) { + return r = PP(r), r.flags & 3145728 ? NL(r) : f1(r); + } + function qZe(r, a) { + r = PP(r), r.flags & 3670016 && zd(r).members.forEach((l, f) => { + W6(l, f) && a(l, f); + }); + } + function HZe(r, a) { + return a.properties.some((f) => { + const m = f.name && (Cd(f.name) ? D_(H3(f.name)) : X0(f.name)), y = m && Fp(m) ? Lp(m) : void 0, x = y === void 0 ? void 0 : Xc(r, y); + return !!x && w8(x) && !Bs(Lk(f), x); + }); + } + function GZe(r) { + const a = Gn(r); + if (!(a.flags & 1048576)) + return Ome(a); + const l = Ms(); + for (const f of r) + for (const { escapedName: m } of Ome(f)) + if (!l.has(m)) { + const y = a3e(a, m); + y && l.set(m, y); + } + return ts(l.values()); + } + function qS(r) { + return r.flags & 262144 ? a_(r) : r.flags & 8388608 ? XZe(r) : r.flags & 16777216 ? r3e(r) : Hl(r); + } + function a_(r) { + return IL(r) ? AP(r) : void 0; + } + function $Ze(r, a) { + const l = k8(r); + return !!l && HS(l, a); + } + function HS(r, a = 0) { + var l; + return a < 5 && !!(r && (r.flags & 262144 && ut((l = r.symbol) == null ? void 0 : l.declarations, (f) => Vn( + f, + 4096 + /* Const */ + )) || r.flags & 3145728 && ut(r.types, (f) => HS(f, a)) || r.flags & 8388608 && HS(r.objectType, a + 1) || r.flags & 16777216 && HS(r3e(r), a + 1) || r.flags & 33554432 && HS(r.baseType, a) || wn(r) & 32 && $Ze(r, a) || v1(r) && rc(h2(r), (f, m) => !!(r.target.elementFlags[m] & 8) && HS(f, a)) >= 0)); + } + function XZe(r) { + return IL(r) ? QZe(r) : void 0; + } + function kfe(r) { + const a = zh( + r, + /*writing*/ + !1 + ); + return a !== r ? a : qS(r); + } + function QZe(r) { + if (Pfe(r)) + return AG(r.objectType, r.indexType); + const a = kfe(r.indexType); + if (a && a !== r.indexType) { + const f = m1(r.objectType, a, r.accessFlags); + if (f) + return f; + } + const l = kfe(r.objectType); + if (l && l !== r.objectType) + return m1(l, r.indexType, r.accessFlags); + } + function Cfe(r) { + if (!r.resolvedDefaultConstraint) { + const a = Ret(r), l = qv(r); + r.resolvedDefaultConstraint = Ea(a) ? l : Ea(l) ? a : Gn([a, l]); + } + return r.resolvedDefaultConstraint; + } + function e3e(r) { + if (r.resolvedConstraintOfDistributive !== void 0) + return r.resolvedConstraintOfDistributive || void 0; + if (r.root.isDistributive && r.restrictiveInstantiation !== r) { + const a = zh( + r.checkType, + /*writing*/ + !1 + ), l = a === r.checkType ? qS(a) : a; + if (l && l !== r.checkType) { + const f = Spe( + r, + KS(r.root.checkType, l, r.mapper), + /*forConstraint*/ + !0 + ); + if (!(f.flags & 131072)) + return r.resolvedConstraintOfDistributive = f, f; + } + } + r.resolvedConstraintOfDistributive = !1; + } + function t3e(r) { + return e3e(r) || Cfe(r); + } + function r3e(r) { + return IL(r) ? t3e(r) : void 0; + } + function YZe(r, a) { + let l, f = !1; + for (const m of r) + if (m.flags & 465829888) { + let y = qS(m); + for (; y && y.flags & 21233664; ) + y = qS(y); + y && (l = Tr(l, y), a && (l = Tr(l, m))); + } else (m.flags & 469892092 || hg(m)) && (f = !0); + if (l && (a || f)) { + if (f) + for (const m of r) + (m.flags & 469892092 || hg(m)) && (l = Tr(l, m)); + return QL( + Ys( + l, + 2 + /* NoConstraintReduction */ + ), + /*writing*/ + !1 + ); + } + } + function Hl(r) { + if (r.flags & 464781312 || v1(r)) { + const a = Efe(r); + return a !== Ka && a !== Fa ? a : void 0; + } + return r.flags & 4194304 ? Or : void 0; + } + function dg(r) { + return Hl(r) || r; + } + function IL(r) { + return Efe(r) !== Fa; + } + function Efe(r) { + if (r.resolvedBaseConstraint) + return r.resolvedBaseConstraint; + const a = []; + return r.resolvedBaseConstraint = l(r); + function l(y) { + if (!y.immediateBaseConstraint) { + if (!_g( + y, + 4 + /* ImmediateBaseConstraint */ + )) + return Fa; + let x; + const I = GG(y); + if ((a.length < 10 || a.length < 50 && !ls(a, I)) && (a.push(I), x = m(zh( + y, + /*writing*/ + !1 + )), a.pop()), !fg()) { + if (y.flags & 262144) { + const R = xG(y); + if (R) { + const J = We(R, p.Type_parameter_0_has_a_circular_constraint, Ur(y)); + C && !yb(R, C) && !yb(C, R) && Fs(J, Xr(C, p.Circularity_originates_in_type_at_this_location)); + } + } + x = Fa; + } + y.immediateBaseConstraint ?? (y.immediateBaseConstraint = x || Ka); + } + return y.immediateBaseConstraint; + } + function f(y) { + const x = l(y); + return x !== Ka && x !== Fa ? x : void 0; + } + function m(y) { + if (y.flags & 262144) { + const x = AP(y); + return y.isThisType || !x ? x : f(x); + } + if (y.flags & 3145728) { + const x = y.types, I = []; + let R = !1; + for (const J of x) { + const ee = f(J); + ee ? (ee !== J && (R = !0), I.push(ee)) : R = !0; + } + return R ? y.flags & 1048576 && I.length === x.length ? Gn(I) : y.flags & 2097152 && I.length ? Ys(I) : void 0 : y; + } + if (y.flags & 4194304) + return Or; + if (y.flags & 134217728) { + const x = y.types, I = Ii(x, f); + return I.length === x.length ? XS(y.texts, I) : we; + } + if (y.flags & 268435456) { + const x = f(y.type); + return x && x !== y.type ? Ck(y.symbol, x) : we; + } + if (y.flags & 8388608) { + if (Pfe(y)) + return f(AG(y.objectType, y.indexType)); + const x = f(y.objectType), I = f(y.indexType), R = x && I && m1(x, I, y.accessFlags); + return R && f(R); + } + if (y.flags & 16777216) { + const x = t3e(y); + return x && f(x); + } + if (y.flags & 33554432) + return f(Hfe(y)); + if (v1(y)) { + const x = or(h2(y), (I, R) => { + const J = I.flags & 262144 && y.target.elementFlags[R] & 8 && f(I) || I; + return J !== I && V_(J, (ee) => Gv(ee) && !v1(ee)) ? J : I; + }); + return gg(x, y.target.elementFlags, y.target.readonly, y.target.labeledElementDeclarations); + } + return y; + } + } + function ZZe(r, a) { + if (r === a) + return r.resolvedApparentType || (r.resolvedApparentType = pf( + r, + a, + /*needApparentType*/ + !0 + )); + const l = `I${Fl(r)},${Fl(a)}`; + return F0(l) ?? Wy(l, pf( + r, + a, + /*needApparentType*/ + !0 + )); + } + function Dfe(r) { + if (r.default) + r.default === Bt && (r.default = Fa); + else if (r.target) { + const a = Dfe(r.target); + r.default = a ? Ji(a, r.mapper) : Ka; + } else { + r.default = Bt; + const a = r.symbol && rr(r.symbol.declarations, (f) => Mo(f) && f.default), l = a ? xi(a) : Ka; + r.default === Bt && (r.default = l); + } + return r.default; + } + function GS(r) { + const a = Dfe(r); + return a !== Ka && a !== Fa ? a : void 0; + } + function KZe(r) { + return Dfe(r) !== Fa; + } + function n3e(r) { + return !!(r.symbol && rr(r.symbol.declarations, (a) => Mo(a) && a.default)); + } + function i3e(r) { + return r.resolvedApparentType || (r.resolvedApparentType = eKe(r)); + } + function eKe(r) { + const a = r.target ?? r, l = k8(a); + if (l && !a.declaration.nameType) { + const f = p2(r), m = B_(f) ? i3e(f) : Hl(f); + if (m && V_(m, (y) => Gv(y) || s3e(y))) + return Ji(a, KS(l, m, r.mapper)); + } + return r; + } + function s3e(r) { + return !!(r.flags & 2097152) && Ri(r.types, Gv); + } + function Pfe(r) { + let a; + return !!(r.flags & 8388608 && wn(a = r.objectType) & 32 && !B_(a) && ZS(r.indexType) && !(pg(a) & 8) && !a.declaration.nameType); + } + function ju(r) { + const a = r.flags & 465829888 ? Hl(r) || yt : r, l = wn(a); + return l & 32 ? i3e(a) : l & 4 && a !== r ? pf(a, r) : a.flags & 2097152 ? ZZe(a, r) : a.flags & 402653316 ? Jr : a.flags & 296 ? Vi : a.flags & 2112 ? BKe() : a.flags & 528 ? ha : a.flags & 12288 ? I3e() : a.flags & 67108864 ? bi : a.flags & 4194304 ? Or : a.flags & 2 && !K ? bi : a; + } + function PP(r) { + return Wd(ju(Wd(r))); + } + function a3e(r, a, l) { + var f, m, y; + let x, I, R; + const J = r.flags & 1048576; + let ee, Se = 4, me = J ? 0 : 8, Ve = !1; + for (const En of r.types) { + const Rn = ju(En); + if (!(Aa(Rn) || Rn.flags & 131072)) { + const jn = js(Rn, a, l), qs = jn ? sp(jn) : 0; + if (jn) { + if (jn.flags & 106500 && (ee ?? (ee = J ? 0 : 16777216), J ? ee |= jn.flags & 16777216 : ee &= jn.flags), !x) + x = jn; + else if (jn !== x) + if ((fE(jn) || jn) === (fE(x) || x) && Ipe( + x, + jn, + (xa, is) => xa === is ? -1 : 0 + /* False */ + ) === -1) + Ve = !!x.parent && !!Dr(U0(x.parent)); + else { + I || (I = /* @__PURE__ */ new Map(), I.set($s(x), x)); + const xa = $s(jn); + I.has(xa) || I.set(xa, jn); + } + J && Hd(jn) ? me |= 8 : !J && !Hd(jn) && (me &= -9), me |= (qs & 6 ? 0 : 256) | (qs & 4 ? 512 : 0) | (qs & 2 ? 1024 : 0) | (qs & 256 ? 2048 : 0), Ede(jn) || (Se = 2); + } else if (J) { + const ks = !p8(a) && Tk(Rn, a); + ks ? (me |= 32 | (ks.isReadonly ? 8 : 0), R = Tr(R, la(Rn) ? QG(Rn) || Ut : ks.type)) : Qv(Rn) && !(wn(Rn) & 2097152) ? (me |= 32, R = Tr(R, Ut)) : me |= 16; + } + } + } + if (!x || J && (I || me & 48) && me & 1536 && !(I && tKe(I.values()))) + return; + if (!I && !(me & 16) && !R) + if (Ve) { + const En = (f = Jn(x, qm)) == null ? void 0 : f.links, Rn = tT(x, En?.type); + return Rn.parent = (y = (m = x.valueDeclaration) == null ? void 0 : m.symbol) == null ? void 0 : y.parent, Rn.links.containingType = r, Rn.links.mapper = En?.mapper, Rn.links.writeType = l1(x), Rn; + } else + return x; + const mt = I ? ts(I.values()) : [x]; + let ht, er, tr; + const Rr = []; + let vn, cr, Cr = !1; + for (const En of mt) { + cr ? En.valueDeclaration && En.valueDeclaration !== cr && (Cr = !0) : cr = En.valueDeclaration, ht = Bn(ht, En.declarations); + const Rn = Zr(En); + er || (er = Rn, tr = Ni(En).nameType); + const jn = l1(En); + (vn || jn !== Rn) && (vn = Tr(vn || Rr.slice(), jn)), Rn !== er && (me |= 64), (w8(Rn) || QS(Rn)) && (me |= 128), Rn.flags & 131072 && Rn !== Vo && (me |= 131072), Rr.push(Rn); + } + Bn(Rr, R); + const Fr = va(4 | (ee ?? 0), a, Se | me); + return Fr.links.containingType = r, !Cr && cr && (Fr.valueDeclaration = cr, cr.symbol.parent && (Fr.parent = cr.symbol.parent)), Fr.declarations = ht, Fr.links.nameType = tr, Rr.length > 2 ? (Fr.links.checkFlags |= 65536, Fr.links.deferralParent = r, Fr.links.deferralConstituents = Rr, Fr.links.deferralWriteConstituents = vn) : (Fr.links.type = J ? Gn(Rr) : Ys(Rr), vn && (Fr.links.writeType = J ? Gn(vn) : Ys(vn))), Fr; + } + function o3e(r, a, l) { + var f, m, y; + let x = l ? (f = r.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : f.get(a) : (m = r.propertyCache) == null ? void 0 : m.get(a); + return x || (x = a3e(r, a, l), x && ((l ? r.propertyCacheWithoutObjectFunctionPropertyAugment || (r.propertyCacheWithoutObjectFunctionPropertyAugment = Ms()) : r.propertyCache || (r.propertyCache = Ms())).set(a, x), l && !(gc(x) & 48) && !((y = r.propertyCache) != null && y.get(a)) && (r.propertyCache || (r.propertyCache = Ms())).set(a, x))), x; + } + function tKe(r) { + let a; + for (const l of r) { + if (!l.declarations) + return; + if (!a) { + a = new Set(l.declarations); + continue; + } + if (a.forEach((f) => { + ls(l.declarations, f) || a.delete(f); + }), a.size === 0) + return; + } + return a; + } + function OL(r, a, l) { + const f = o3e(r, a, l); + return f && !(gc(f) & 16) ? f : void 0; + } + function Wd(r) { + return r.flags & 1048576 && r.objectFlags & 16777216 ? r.resolvedReducedType || (r.resolvedReducedType = rKe(r)) : r.flags & 2097152 ? (r.objectFlags & 16777216 || (r.objectFlags |= 16777216 | (ut(NL(r), nKe) ? 33554432 : 0)), r.objectFlags & 33554432 ? fr : r) : r; + } + function rKe(r) { + const a = Zc(r.types, Wd); + if (a === r.types) + return r; + const l = Gn(a); + return l.flags & 1048576 && (l.resolvedReducedType = l), l; + } + function nKe(r) { + return c3e(r) || l3e(r); + } + function c3e(r) { + return !(r.flags & 16777216) && (gc(r) & 131264) === 192 && !!(Zr(r).flags & 131072); + } + function l3e(r) { + return !r.valueDeclaration && !!(gc(r) & 1024); + } + function wfe(r) { + return !!(r.flags & 1048576 && r.objectFlags & 16777216 && ut(r.types, wfe) || r.flags & 2097152 && iKe(r)); + } + function iKe(r) { + const a = r.uniqueLiteralFilledInstantiation || (r.uniqueLiteralFilledInstantiation = Ji(r, hs)); + return Wd(a) !== a; + } + function Afe(r, a) { + if (a.flags & 2097152 && wn(a) & 33554432) { + const l = Nn(NL(a), c3e); + if (l) + return us(r, p.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, Ur( + a, + /*enclosingDeclaration*/ + void 0, + 536870912 + /* NoTypeReduction */ + ), Si(l)); + const f = Nn(NL(a), l3e); + if (f) + return us(r, p.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, Ur( + a, + /*enclosingDeclaration*/ + void 0, + 536870912 + /* NoTypeReduction */ + ), Si(f)); + } + return r; + } + function js(r, a, l, f) { + var m, y; + if (r = PP(r), r.flags & 524288) { + const x = zd(r), I = x.members.get(a); + if (I && !f && ((m = r.symbol) == null ? void 0 : m.flags) & 512 && ((y = Ni(r.symbol).typeOnlyExportStarMap) != null && y.has(a))) + return; + if (I && t1(I, f)) + return I; + if (l) return; + const R = x === wo ? kc : x.callSignatures.length ? F_ : x.constructSignatures.length ? Jf : void 0; + if (R) { + const J = d2(R, a); + if (J) + return J; + } + return d2(Cl, a); + } + if (r.flags & 2097152) { + const x = OL( + r, + a, + /*skipObjectFunctionPropertyAugment*/ + !0 + ); + return x || (l ? void 0 : OL(r, a, l)); + } + if (r.flags & 1048576) + return OL(r, a, l); + } + function FL(r, a) { + if (r.flags & 3670016) { + const l = zd(r); + return a === 0 ? l.callSignatures : l.constructSignatures; + } + return He; + } + function xs(r, a) { + const l = FL(PP(r), a); + if (a === 0 && !Dr(l) && r.flags & 1048576) { + if (r.arrayFallbackSignatures) + return r.arrayFallbackSignatures; + let f; + if (V_(r, (m) => { + var y; + return !!((y = m.symbol) != null && y.parent) && sKe(m.symbol.parent) && (f ? f === m.symbol.escapedName : (f = m.symbol.escapedName, !0)); + })) { + const m = Ho(r, (x) => Q0((u3e(x.symbol.parent) ? Ct : Pe).typeParameters[0], x.mapper)), y = cu(m, Hp(r, (x) => u3e(x.symbol.parent))); + return r.arrayFallbackSignatures = xs(Xc(y, f), a); + } + r.arrayFallbackSignatures = l; + } + return l; + } + function sKe(r) { + return !r || !Pe.symbol || !Ct.symbol ? !1 : !!Rd(r, Pe.symbol) || !!Rd(r, Ct.symbol); + } + function u3e(r) { + return !r || !Ct.symbol ? !1 : !!Rd(r, Ct.symbol); + } + function Nfe(r, a) { + return Nn(r, (l) => l.keyType === a); + } + function Ife(r, a) { + let l, f, m; + for (const y of r) + y.keyType === we ? l = y : Sk(a, y.keyType) && (f ? (m || (m = [f])).push(y) : f = y); + return m ? mg(yt, Ys(or(m, (y) => y.type)), Eu( + m, + (y, x) => y && x.isReadonly, + /*initial*/ + !0 + )) : f || (l && Sk(a, we) ? l : void 0); + } + function Sk(r, a) { + return Bs(r, a) || a === we && Bs(r, _e) || a === _e && (r === ma || !!(r.flags & 128) && Mg(r.value)); + } + function Ofe(r) { + return r.flags & 3670016 ? zd(r).indexInfos : He; + } + function Bu(r) { + return Ofe(PP(r)); + } + function eh(r, a) { + return Nfe(Bu(r), a); + } + function Wv(r, a) { + var l; + return (l = eh(r, a)) == null ? void 0 : l.type; + } + function Ffe(r, a) { + return Bu(r).filter((l) => Sk(a, l.keyType)); + } + function m8(r, a) { + return Ife(Bu(r), a); + } + function Tk(r, a) { + return m8(r, p8(a) ? Lr : D_(Pi(a))); + } + function _3e(r) { + var a; + let l; + for (const f of ly(r)) + l = sh(l, Zg(f.symbol)); + return l?.length ? l : Ac(r) ? (a = wP(r)) == null ? void 0 : a.typeParameters : void 0; + } + function Lfe(r) { + const a = []; + return r.forEach((l, f) => { + lg(f) || a.push(l); + }), a; + } + function Mfe(r, a) { + if (Sl(r)) + return; + const l = x_( + ve, + '"' + r + '"', + 512 + /* ValueModule */ + ); + return l && a ? Ma(l) : l; + } + function Rfe(r) { + return BT(r) || q3(r) || ji(r) && D5(r); + } + function LL(r) { + if (Rfe(r)) + return !0; + if (!ji(r)) + return !1; + if (r.initializer) { + const l = Qf(r.parent), f = r.parent.parameters.indexOf(r); + return E.assert(f >= 0), f >= Om( + l, + 3 + /* VoidIsNonOptional */ + ); + } + const a = db(r.parent); + return a ? !r.type && !r.dotDotDotToken && r.parent.parameters.indexOf(r) >= N$(a).length : !1; + } + function aKe(r) { + return rs(r) && !im(r) && r.questionToken; + } + function g8(r, a, l, f) { + return { kind: r, parameterName: a, parameterIndex: l, type: f }; + } + function Em(r) { + let a = 0; + if (r) + for (let l = 0; l < r.length; l++) + n3e(r[l]) || (a = l + 1); + return a; + } + function p1(r, a, l, f) { + const m = Dr(a); + if (!m) + return []; + const y = Dr(r); + if (f || y >= l && y <= m) { + const x = r ? r.slice() : []; + for (let R = y; R < m; R++) + x[R] = be; + const I = Ype(f); + for (let R = y; R < m; R++) { + let J = GS(a[R]); + f && J && (Wh(J, yt) || Wh(J, bi)) && (J = Ne), x[R] = J ? Ji(J, z_(a, x)) : I; + } + return x.length = a.length, x; + } + return r && r.slice(); + } + function Qf(r) { + const a = bn(r); + if (!a.resolvedSignature) { + const l = []; + let f = 0, m = 0, y, x = Qr(r) ? MI(r) : void 0, I = !1; + const R = db(r), J = _C(r); + !R && Qr(r) && zT(r) && !EY(r) && !R1(r) && (f |= 32); + for (let mt = J ? 1 : 0; mt < r.parameters.length; mt++) { + const ht = r.parameters[mt]; + if (Qr(ht) && qJ(ht)) { + x = ht; + continue; + } + let er = ht.symbol; + const tr = up(ht) ? ht.typeExpression && ht.typeExpression.type : ht.type; + er && er.flags & 4 && !Ts(ht.name) && (er = Kt( + ht, + er.escapedName, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )), mt === 0 && er.escapedName === "this" ? (I = !0, y = ht.symbol) : l.push(er), tr && tr.kind === 201 && (f |= 2), Rfe(ht) || ji(ht) && ht.initializer || Um(ht) || R && l.length > R.arguments.length && !tr || (m = l.length); + } + if ((r.kind === 177 || r.kind === 178) && X6(r) && (!I || !y)) { + const mt = r.kind === 177 ? 178 : 177, ht = Jo(xn(r), mt); + ht && (y = o1(ht)); + } + x && x.typeExpression && (y = tT(va( + 1, + "this" + /* This */ + ), xi(x.typeExpression))); + const Se = Th(r) ? H1(r) : r, me = Se && ec(Se) ? Yc(Ma(Se.parent.symbol)) : void 0, Ve = me ? me.localTypeParameters : _3e(r); + (Dj(r) || Qr(r) && oKe(r, l)) && (f |= 1), (wC(r) && Vn( + r, + 64 + /* Abstract */ + ) || ec(r) && Vn( + r.parent, + 64 + /* Abstract */ + )) && (f |= 4), a.resolvedSignature = Kg( + r, + Ve, + y, + l, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + m, + f + ); + } + return a.resolvedSignature; + } + function oKe(r, a) { + if (Th(r) || !jfe(r)) + return !1; + const l = Bo(r.parameters), f = l ? Gk(l) : j1(r).filter(up), m = xc(f, (x) => x.typeExpression && Y5(x.typeExpression.type) ? x.typeExpression.type : void 0), y = va( + 3, + "args", + 32768 + /* RestParameter */ + ); + return m ? y.links.type = cu(xi(m.type)) : (y.links.checkFlags |= 65536, y.links.deferralParent = fr, y.links.deferralConstituents = [Do], y.links.deferralWriteConstituents = [Do]), m && a.pop(), a.push(y), !0; + } + function wP(r) { + if (!(Qr(r) && so(r))) return; + const a = M1(r); + return a?.typeExpression && uT(xi(a.typeExpression)); + } + function cKe(r, a) { + const l = wP(r); + if (!l) return; + const f = r.parameters.indexOf(a); + return a.dotDotDotToken ? AM(l, f) : qd(l, f); + } + function lKe(r) { + const a = wP(r); + return a && Ha(a); + } + function jfe(r) { + const a = bn(r); + return a.containsArgumentsReference === void 0 && (a.flags & 512 ? a.containsArgumentsReference = !0 : a.containsArgumentsReference = l(r.body)), a.containsArgumentsReference; + function l(f) { + if (!f) return !1; + switch (f.kind) { + case 80: + return f.escapedText === Ie.escapedName && tI(f) === Ie; + case 172: + case 174: + case 177: + case 178: + return f.name.kind === 167 && l(f.name); + case 211: + case 212: + return l(f.expression); + case 303: + return l(f.initializer); + default: + return !gB(f) && !em(f) && !!gs(f, l); + } + } + } + function m2(r) { + if (!r || !r.declarations) return He; + const a = []; + for (let l = 0; l < r.declarations.length; l++) { + const f = r.declarations[l]; + if (ps(f)) { + if (l > 0 && f.body) { + const m = r.declarations[l - 1]; + if (f.parent === m.parent && f.kind === m.kind && f.pos === m.end) + continue; + } + if (Qr(f) && f.jsDoc) { + const m = aB(f); + if (Dr(m)) { + for (const y of m) { + const x = y.typeExpression; + x.type === void 0 && !ec(f) && Xv(x, Ne), a.push(Qf(x)); + } + continue; + } + } + a.push( + !Sy(f) && !Yp(f) && wP(f) || Qf(f) + ); + } + } + return a; + } + function f3e(r) { + const a = Ru(r, r); + if (a) { + const l = M_(a); + if (l) + return Zr(l); + } + return Ne; + } + function Vv(r) { + if (r.thisParameter) + return Zr(r.thisParameter); + } + function bp(r) { + if (!r.resolvedTypePredicate) { + if (r.target) { + const a = bp(r.target); + r.resolvedTypePredicate = a ? Yet(a, r.mapper) : Uo; + } else if (r.compositeSignatures) + r.resolvedTypePredicate = _et(r.compositeSignatures, r.compositeKind) || Uo; + else { + const a = r.declaration && K_(r.declaration); + let l; + if (!a) { + const f = wP(r.declaration); + f && r !== f && (l = bp(f)); + } + if (a || l) + r.resolvedTypePredicate = a && dx(a) ? uKe(a, r) : l || Uo; + else if (r.declaration && so(r.declaration) && (!r.resolvedReturnType || r.resolvedReturnType.flags & 16) && U_(r) > 0) { + const { declaration: f } = r; + r.resolvedTypePredicate = Uo, r.resolvedTypePredicate = Gst(f) || Uo; + } else + r.resolvedTypePredicate = Uo; + } + E.assert(!!r.resolvedTypePredicate); + } + return r.resolvedTypePredicate === Uo ? void 0 : r.resolvedTypePredicate; + } + function uKe(r, a) { + const l = r.parameterName, f = r.type && xi(r.type); + return l.kind === 197 ? g8( + r.assertsModifier ? 2 : 0, + /*parameterName*/ + void 0, + /*parameterIndex*/ + void 0, + f + ) : g8(r.assertsModifier ? 3 : 1, l.escapedText, rc(a.parameters, (m) => m.escapedName === l.escapedText), f); + } + function p3e(r, a, l) { + return a !== 2097152 ? Gn(r, l) : Ys(r); + } + function Ha(r) { + if (!r.resolvedReturnType) { + if (!_g( + r, + 3 + /* ResolvedReturnType */ + )) + return be; + let a = r.target ? Ji(Ha(r.target), r.mapper) : r.compositeSignatures ? Ji(p3e( + or(r.compositeSignatures, Ha), + r.compositeKind, + 2 + /* Subtype */ + ), r.mapper) : Y6(r.declaration) || (ic(r.declaration.body) ? Ne : L$(r.declaration)); + if (r.flags & 8 ? a = GAe(a) : r.flags & 16 && (a = b1(a)), !fg()) { + if (r.declaration) { + const l = K_(r.declaration); + if (l) + We(l, p.Return_type_annotation_circularly_references_itself); + else if (ne) { + const f = r.declaration, m = es(f); + m ? We(m, p._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ao(m)) : We(f, p.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); + } + } + a = Ne; + } + r.resolvedReturnType ?? (r.resolvedReturnType = a); + } + return r.resolvedReturnType; + } + function Y6(r) { + if (r.kind === 176) + return Yc(Ma(r.parent.symbol)); + const a = K_(r); + if (Th(r)) { + const l = fC(r); + if (l && ec(l.parent) && !a) + return Yc(Ma(l.parent.parent.symbol)); + } + if (_C(r)) + return xi(r.parameters[0].type); + if (a) + return xi(a); + if (r.kind === 177 && X6(r)) { + const l = Qr(r) && Ti(r); + if (l) + return l; + const f = Jo( + xn(r), + 178 + /* SetAccessor */ + ), m = Cf(f); + if (m) + return m; + } + return lKe(r); + } + function vG(r) { + return r.compositeSignatures && ut(r.compositeSignatures, vG) || !r.resolvedReturnType && jv( + r, + 3 + /* ResolvedReturnType */ + ) >= 0; + } + function _Ke(r) { + return d3e(r) || Ne; + } + function d3e(r) { + if (gu(r)) { + const a = Zr(r.parameters[r.parameters.length - 1]), l = la(a) ? QG(a) : a; + return l && Wv(l, _e); + } + } + function h8(r, a, l, f) { + const m = Bfe(r, p1(a, r.typeParameters, Em(r.typeParameters), l)); + if (f) { + const y = L8e(Ha(m)); + if (y) { + const x = d8(y); + x.typeParameters = f; + const I = d8(m); + return I.resolvedReturnType = $S(x), I; + } + } + return m; + } + function Bfe(r, a) { + const l = r.instantiations || (r.instantiations = /* @__PURE__ */ new Map()), f = Up(a); + let m = l.get(f); + return m || l.set(f, m = bG(r, a)), m; + } + function bG(r, a) { + return wk( + r, + fKe(r, a), + /*eraseTypeParameters*/ + !0 + ); + } + function fKe(r, a) { + return z_(r.typeParameters, a); + } + function y8(r) { + return r.typeParameters ? r.erasedSignatureCache || (r.erasedSignatureCache = pKe(r)) : r; + } + function pKe(r) { + return wk( + r, + hAe(r.typeParameters), + /*eraseTypeParameters*/ + !0 + ); + } + function dKe(r) { + return r.typeParameters ? r.canonicalSignatureCache || (r.canonicalSignatureCache = mKe(r)) : r; + } + function mKe(r) { + return h8( + r, + or(r.typeParameters, (a) => a.target && !a_(a.target) ? a.target : a), + Qr(r.declaration) + ); + } + function gKe(r) { + return r.typeParameters ? r.implementationSignatureCache || (r.implementationSignatureCache = hKe(r)) : r; + } + function hKe(r) { + return r.typeParameters ? wk(r, z_([], [])) : r; + } + function yKe(r) { + const a = r.typeParameters; + if (a) { + if (r.baseSignatureCache) + return r.baseSignatureCache; + const l = hAe(a), f = z_(a, or(a, (y) => a_(y) || yt)); + let m = or(a, (y) => Ji(y, f) || yt); + for (let y = 0; y < a.length - 1; y++) + m = th(m, f); + return m = th(m, l), r.baseSignatureCache = wk( + r, + z_(a, m), + /*eraseTypeParameters*/ + !0 + ); + } + return r; + } + function $S(r, a) { + var l; + if (!r.isolatedSignatureType) { + const f = (l = r.declaration) == null ? void 0 : l.kind, m = f === void 0 || f === 176 || f === 180 || f === 185, y = yp(134217744, va( + 16, + "__function" + /* Function */ + )); + r.declaration && !oo(r.declaration) && (y.symbol.declarations = [r.declaration], y.symbol.valueDeclaration = r.declaration), a || (a = r.declaration && $6( + r.declaration, + /*includeThisTypes*/ + !0 + )), y.outerTypeParameters = a, y.members = O, y.properties = He, y.callSignatures = m ? He : [r], y.constructSignatures = m ? [r] : He, y.indexInfos = He, r.isolatedSignatureType = y; + } + return r.isolatedSignatureType; + } + function Jfe(r) { + return r.members ? SG(r.members) : void 0; + } + function SG(r) { + return r.get( + "__index" + /* Index */ + ); + } + function mg(r, a, l, f) { + return { keyType: r, type: a, isReadonly: l, declaration: f }; + } + function m3e(r) { + const a = Jfe(r); + return a ? zfe(a) : He; + } + function zfe(r) { + if (r.declarations) { + const a = []; + for (const l of r.declarations) + if (l.parameters.length === 1) { + const f = l.parameters[0]; + f.type && sT(xi(f.type), (m) => { + TG(m) && !Nfe(a, m) && a.push(mg(m, l.type ? xi(l.type) : Ne, ef( + l, + 8 + /* Readonly */ + ), l)); + }); + } + return a; + } + return He; + } + function TG(r) { + return !!(r.flags & 4108) || QS(r) || !!(r.flags & 2097152) && !Ek(r) && ut(r.types, TG); + } + function xG(r) { + return Ii(Ln(r.symbol && r.symbol.declarations, Mo), $k)[0]; + } + function g3e(r, a) { + var l; + let f; + if ((l = r.symbol) != null && l.declarations) { + for (const m of r.symbol.declarations) + if (m.parent.kind === 195) { + const [y = m.parent, x] = eK(m.parent.parent); + if (x.kind === 183 && !a) { + const I = x, R = ume(I); + if (R) { + const J = I.typeArguments.indexOf(y); + if (J < R.length) { + const ee = a_(R[J]); + if (ee) { + const Se = ype( + R, + R.map((Ve, mt) => () => Wat(I, R, mt)) + ), me = Ji(ee, Se); + me !== r && (f = Tr(f, me)); + } + } + } + } else if (x.kind === 169 && x.dotDotDotToken || x.kind === 191 || x.kind === 202 && x.dotDotDotToken) + f = Tr(f, cu(yt)); + else if (x.kind === 204) + f = Tr(f, we); + else if (x.kind === 168 && x.parent.kind === 200) + f = Tr(f, Or); + else if (x.kind === 200 && x.type && Ja(x.type) === m.parent && x.parent.kind === 194 && x.parent.extendsType === x && x.parent.checkType.kind === 200 && x.parent.checkType.type) { + const I = x.parent.checkType, R = xi(I.type); + f = Tr(f, Ji(R, b2(Zg(xn(I.typeParameter)), I.typeParameter.constraint ? xi(I.typeParameter.constraint) : Or))); + } + } + } + return f && Ys(f); + } + function AP(r) { + if (!r.constraint) + if (r.target) { + const a = a_(r.target); + r.constraint = a ? Ji(a, r.mapper) : Ka; + } else { + const a = xG(r); + if (!a) + r.constraint = g3e(r) || Ka; + else { + let l = xi(a); + l.flags & 1 && !Aa(l) && (l = a.parent.parent.kind === 200 ? Or : yt), r.constraint = l; + } + } + return r.constraint === Ka ? void 0 : r.constraint; + } + function h3e(r) { + const a = Jo( + r.symbol, + 168 + /* TypeParameter */ + ), l = jp(a.parent) ? A7(a.parent) : a.parent; + return l && C_(l); + } + function Up(r) { + let a = ""; + if (r) { + const l = r.length; + let f = 0; + for (; f < l; ) { + const m = r[f].id; + let y = 1; + for (; f + y < l && r[f + y].id === m + y; ) + y++; + a.length && (a += ","), a += m, y > 1 && (a += ":" + y), f += y; + } + } + return a; + } + function xk(r, a) { + return r ? `@${$s(r)}` + (a ? `:${Up(a)}` : "") : ""; + } + function ML(r, a) { + let l = 0; + for (const f of r) + (a === void 0 || !(f.flags & a)) && (l |= wn(f)); + return l & 458752; + } + function Z6(r, a) { + return ut(a) && r === ea ? yt : H0(r, a); + } + function H0(r, a) { + const l = Up(a); + let f = r.instantiations.get(l); + return f || (f = yp(4, r.symbol), r.instantiations.set(l, f), f.objectFlags |= a ? ML(a) : 0, f.target = r, f.resolvedTypeArguments = a), f; + } + function y3e(r) { + const a = jd(r.flags, r.symbol); + return a.objectFlags = r.objectFlags, a.target = r.target, a.resolvedTypeArguments = r.resolvedTypeArguments, a; + } + function Wfe(r, a, l, f, m) { + if (!f) { + f = Dk(a); + const x = tE(f); + m = l ? th(x, l) : x; + } + const y = yp(4, r.symbol); + return y.target = r, y.node = a, y.mapper = l, y.aliasSymbol = f, y.aliasTypeArguments = m, y; + } + function Po(r) { + var a, l; + if (!r.resolvedTypeArguments) { + if (!_g( + r, + 5 + /* ResolvedTypeArguments */ + )) + return ((a = r.target.localTypeParameters) == null ? void 0 : a.map(() => be)) || He; + const f = r.node, m = f ? f.kind === 183 ? Hi(r.target.outerTypeParameters, W$(f, r.target.localTypeParameters)) : f.kind === 188 ? [xi(f.elementType)] : or(f.elements, xi) : He; + fg() ? r.resolvedTypeArguments ?? (r.resolvedTypeArguments = r.mapper ? th(m, r.mapper) : m) : (r.resolvedTypeArguments ?? (r.resolvedTypeArguments = ((l = r.target.localTypeParameters) == null ? void 0 : l.map(() => be)) || He), We( + r.node || C, + r.target.symbol ? p.Type_arguments_for_0_circularly_reference_themselves : p.Tuple_type_arguments_circularly_reference_themselves, + r.target.symbol && Si(r.target.symbol) + )); + } + return r.resolvedTypeArguments; + } + function G0(r) { + return Dr(r.target.typeParameters); + } + function v3e(r, a) { + const l = mo(Ma(a)), f = l.localTypeParameters; + if (f) { + const m = Dr(r.typeArguments), y = Em(f), x = Qr(r); + if (!(!ne && x) && (m < y || m > f.length)) { + const J = x && bh(r) && !Tx(r.parent), ee = y === f.length ? J ? p.Expected_0_type_arguments_provide_these_with_an_extends_tag : p.Generic_type_0_requires_1_type_argument_s : J ? p.Expected_0_1_type_arguments_provide_these_with_an_extends_tag : p.Generic_type_0_requires_between_1_and_2_type_arguments, Se = Ur( + l, + /*enclosingDeclaration*/ + void 0, + 2 + /* WriteArrayAsGenericType */ + ); + if (We(r, ee, Se, y, f.length), !x) + return be; + } + if (r.kind === 183 && B3e(r, Dr(r.typeArguments) !== f.length)) + return Wfe( + l, + r, + /*mapper*/ + void 0 + ); + const R = Hi(l.outerTypeParameters, p1(jL(r), f, y, x)); + return H0(l, R); + } + return g2(r, a) ? l : be; + } + function K6(r, a, l, f) { + const m = mo(r); + if (m === kt) { + const J = Xz.get(r.escapedName); + if (J !== void 0 && a && a.length === 1) + return J === 4 ? Vfe(a[0]) : Ck(r, a[0]); + } + const y = Ni(r), x = y.typeParameters, I = Up(a) + xk(l, f); + let R = y.instantiations.get(I); + return R || y.instantiations.set(I, R = bAe(m, z_(x, p1(a, x, Em(x), Qr(r.valueDeclaration))), l, f)), R; + } + function vKe(r, a) { + if (gc(a) & 1048576) { + const m = jL(r), y = xk(a, m); + let x = re.get(y); + return x || (x = $c( + 1, + "error", + /*objectFlags*/ + void 0, + `alias ${y}` + ), x.aliasSymbol = a, x.aliasTypeArguments = m, re.set(y, x)), x; + } + const l = mo(a), f = Ni(a).typeParameters; + if (f) { + const m = Dr(r.typeArguments), y = Em(f); + if (m < y || m > f.length) + return We( + r, + y === f.length ? p.Generic_type_0_requires_1_type_argument_s : p.Generic_type_0_requires_between_1_and_2_type_arguments, + Si(a), + y, + f.length + ), be; + const x = Dk(r); + let I = x && (b3e(a) || !b3e(x)) ? x : void 0, R; + if (I) + R = tE(I); + else if (QI(r)) { + const J = NP( + r, + 2097152, + /*ignoreErrors*/ + !0 + ); + if (J && J !== nt) { + const ee = Ec(J); + ee && ee.flags & 524288 && (I = ee, R = jL(r) || (f ? [] : void 0)); + } + } + return K6(a, jL(r), I, R); + } + return g2(r, a) ? l : be; + } + function b3e(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a.find(m3); + return !!(l && yf(l)); + } + function bKe(r) { + switch (r.kind) { + case 183: + return r.typeName; + case 233: + const a = r.expression; + if (fo(a)) + return a; + } + } + function S3e(r) { + return r.parent ? `${S3e(r.parent)}.${r.escapedName}` : r.escapedName; + } + function kG(r) { + const l = (r.kind === 166 ? r.right : r.kind === 211 ? r.name : r).escapedText; + if (l) { + const f = r.kind === 166 ? kG(r.left) : r.kind === 211 ? kG(r.expression) : void 0, m = f ? `${S3e(f)}.${l}` : l; + let y = rt.get(m); + return y || (rt.set(m, y = va( + 524288, + l, + 1048576 + /* Unresolved */ + )), y.parent = f, y.links.declaredType = ft), y; + } + return nt; + } + function NP(r, a, l) { + const f = bKe(r); + if (!f) + return nt; + const m = No(f, a, l); + return m && m !== nt ? m : l ? nt : kG(f); + } + function CG(r, a) { + if (a === nt) + return be; + if (a = R6(a) || a, a.flags & 96) + return v3e(r, a); + if (a.flags & 524288) + return vKe(r, a); + const l = jwe(a); + if (l) + return g2(r, a) ? Ju(l) : be; + if (a.flags & 111551 && EG(r)) { + const f = SKe(r, a); + return f || (NP( + r, + 788968 + /* Type */ + ), Zr(a)); + } + return be; + } + function SKe(r, a) { + const l = bn(r); + if (!l.resolvedJSDocType) { + const f = Zr(a); + let m = f; + if (a.valueDeclaration) { + const y = r.kind === 205 && r.qualifier; + f.symbol && f.symbol !== a && y && (m = CG(r, f.symbol)); + } + l.resolvedJSDocType = m; + } + return l.resolvedJSDocType; + } + function Vfe(r) { + return Ufe(r) ? T3e(r, yt) : r; + } + function Ufe(r) { + return !!(r.flags & 3145728 && ut(r.types, Ufe) || r.flags & 33554432 && !eE(r) && Ufe(r.baseType) || r.flags & 524288 && !hg(r) || r.flags & 432275456 && !QS(r)); + } + function eE(r) { + return !!(r.flags & 33554432 && r.constraint.flags & 2); + } + function qfe(r, a) { + return a.flags & 3 || a === r || r.flags & 1 ? r : T3e(r, a); + } + function T3e(r, a) { + const l = `${Fl(r)}>${Fl(a)}`, f = ri.get(l); + if (f) + return f; + const m = Yg( + 33554432 + /* Substitution */ + ); + return m.baseType = r, m.constraint = a, ri.set(l, m), m; + } + function Hfe(r) { + return eE(r) ? r.baseType : Ys([r.constraint, r.baseType]); + } + function x3e(r) { + return r.kind === 189 && r.elements.length === 1; + } + function k3e(r, a, l) { + return x3e(a) && x3e(l) ? k3e(r, a.elements[0], l.elements[0]) : g1(xi(a)) === g1(r) ? xi(l) : void 0; + } + function TKe(r, a) { + let l, f = !0; + for (; a && !hi(a) && a.kind !== 320; ) { + const m = a.parent; + if (m.kind === 169 && (f = !f), (f || r.flags & 8650752) && m.kind === 194 && a === m.trueType) { + const y = k3e(r, m.checkType, m.extendsType); + y && (l = Tr(l, y)); + } else if (r.flags & 262144 && m.kind === 200 && !m.nameType && a === m.type) { + const y = xi(m); + if (Jd(y) === g1(r)) { + const x = k8(y); + if (x) { + const I = a_(x); + I && V_(I, Gv) && (l = Tr(l, Gn([_e, ma]))); + } + } + } + a = m; + } + return l ? qfe(r, Ys(l)) : r; + } + function EG(r) { + return !!(r.flags & 16777216) && (r.kind === 183 || r.kind === 205); + } + function g2(r, a) { + return r.typeArguments ? (We(r, p.Type_0_is_not_generic, a ? Si(a) : r.typeName ? ao(r.typeName) : qz), !1) : !0; + } + function C3e(r) { + if (Re(r.typeName)) { + const a = r.typeArguments; + switch (r.typeName.escapedText) { + case "String": + return g2(r), we; + case "Number": + return g2(r), _e; + case "Boolean": + return g2(r), br; + case "Void": + return g2(r), en; + case "Undefined": + return g2(r), Ut; + case "Null": + return g2(r), he; + case "Function": + case "function": + return g2(r), kc; + case "array": + return (!a || !a.length) && !ne ? Do : void 0; + case "promise": + return (!a || !a.length) && !ne ? IM(Ne) : void 0; + case "Object": + if (a && a.length === 2) { + if (C7(r)) { + const l = xi(a[0]), f = xi(a[1]), m = l === we || l === _e ? [mg( + l, + f, + /*isReadonly*/ + !1 + )] : He; + return ie( + /*symbol*/ + void 0, + O, + He, + He, + m + ); + } + return Ne; + } + return g2(r), ne ? void 0 : Ne; + } + } + } + function xKe(r) { + const a = xi(r.type); + return K ? rM( + a, + 65536 + /* Null */ + ) : a; + } + function RL(r) { + const a = bn(r); + if (!a.resolvedType) { + if (yd(r) && J1(r.parent)) + return a.resolvedSymbol = nt, a.resolvedType = Dc(r.parent.expression); + let l, f; + const m = 788968; + EG(r) && (f = C3e(r), f || (l = NP( + r, + m, + /*ignoreErrors*/ + !0 + ), l === nt ? l = NP( + r, + m | 111551 + /* Value */ + ) : NP(r, m), f = CG(r, l))), f || (l = NP(r, m), f = CG(r, l)), a.resolvedSymbol = l, a.resolvedType = f; + } + return a.resolvedType; + } + function jL(r) { + return or(r.typeArguments, xi); + } + function E3e(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = tIe(r); + a.resolvedType = Ju(W_(l)); + } + return a.resolvedType; + } + function D3e(r, a) { + function l(m) { + const y = m.declarations; + if (y) + for (const x of y) + switch (x.kind) { + case 263: + case 264: + case 266: + return x; + } + } + if (!r) + return a ? ea : bi; + const f = mo(r); + return f.flags & 524288 ? Dr(f.typeParameters) !== a ? (We(l(r), p.Global_type_0_must_have_1_type_parameter_s, uc(r), a), a ? ea : bi) : f : (We(l(r), p.Global_type_0_must_be_a_class_or_interface_type, uc(r)), a ? ea : bi); + } + function Gfe(r, a) { + return IP(r, 111551, a ? p.Cannot_find_global_value_0 : void 0); + } + function $fe(r, a) { + return IP(r, 788968, a ? p.Cannot_find_global_type_0 : void 0); + } + function DG(r, a, l) { + const f = IP(r, 788968, l ? p.Cannot_find_global_type_0 : void 0); + if (f && (mo(f), Dr(Ni(f).typeParameters) !== a)) { + const m = f.declarations && Nn(f.declarations, Rp); + We(m, p.Global_type_0_must_have_1_type_parameter_s, uc(f), a); + return; + } + return f; + } + function IP(r, a, l) { + return Kt( + /*location*/ + void 0, + r, + a, + l, + /*isUse*/ + !1, + /*excludeGlobals*/ + !1 + ); + } + function Oc(r, a, l) { + const f = $fe(r, l); + return f || l ? D3e(f, a) : void 0; + } + function kKe() { + return v_ || (v_ = Oc( + "TypedPropertyDescriptor", + /*arity*/ + 1, + /*reportErrors*/ + !0 + ) || ea); + } + function CKe() { + return hr || (hr = Oc( + "TemplateStringsArray", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || bi); + } + function P3e() { + return zr || (zr = Oc( + "ImportMeta", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || bi); + } + function w3e() { + if (!Cn) { + const r = va(0, "ImportMetaExpression"), a = P3e(), l = va( + 4, + "meta", + 8 + /* Readonly */ + ); + l.parent = r, l.links.type = a; + const f = Ms([l]); + r.members = f, Cn = ie(r, f, He, He, He); + } + return Cn; + } + function A3e(r) { + return ei || (ei = Oc( + "ImportCallOptions", + /*arity*/ + 0, + r + )) || bi; + } + function Xfe(r) { + return M || (M = Oc( + "ImportAttributes", + /*arity*/ + 0, + r + )) || bi; + } + function N3e(r) { + return bf || (bf = Gfe("Symbol", r)); + } + function EKe(r) { + return Id || (Id = $fe("SymbolConstructor", r)); + } + function I3e() { + return zf || (zf = Oc( + "Symbol", + /*arity*/ + 0, + /*reportErrors*/ + !1 + )) || bi; + } + function BL(r) { + return pp || (pp = Oc( + "Promise", + /*arity*/ + 1, + r + )) || ea; + } + function O3e(r) { + return Wf || (Wf = Oc( + "PromiseLike", + /*arity*/ + 1, + r + )) || ea; + } + function Qfe(r) { + return tg || (tg = Gfe("Promise", r)); + } + function DKe(r) { + return rg || (rg = Oc( + "PromiseConstructorLike", + /*arity*/ + 0, + r + )) || bi; + } + function PG(r) { + return Y || (Y = Oc( + "AsyncIterable", + /*arity*/ + 1, + r + )) || ea; + } + function PKe(r) { + return tt || (tt = Oc( + "AsyncIterator", + /*arity*/ + 3, + r + )) || ea; + } + function wKe(r) { + return Pt || (Pt = Oc( + "AsyncIterableIterator", + /*arity*/ + 1, + r + )) || ea; + } + function AKe(r) { + return It || (It = Oc( + "AsyncGenerator", + /*arity*/ + 3, + r + )) || ea; + } + function Yfe(r) { + return b_ || (b_ = Oc( + "Iterable", + /*arity*/ + 1, + r + )) || ea; + } + function NKe(r) { + return Gc || (Gc = Oc( + "Iterator", + /*arity*/ + 3, + r + )) || ea; + } + function IKe(r) { + return ng || (ng = Oc( + "IterableIterator", + /*arity*/ + 1, + r + )) || ea; + } + function OKe(r) { + return L_ || (L_ = Oc( + "Generator", + /*arity*/ + 3, + r + )) || ea; + } + function FKe(r) { + return bm || (bm = Oc( + "IteratorYieldResult", + /*arity*/ + 1, + r + )) || ea; + } + function LKe(r) { + return Vf || (Vf = Oc( + "IteratorReturnResult", + /*arity*/ + 1, + r + )) || ea; + } + function F3e(r) { + return ke || (ke = Oc( + "Disposable", + /*arity*/ + 0, + r + )) || bi; + } + function MKe(r) { + return vt || (vt = Oc( + "AsyncDisposable", + /*arity*/ + 0, + r + )) || bi; + } + function L3e(r, a = 0) { + const l = IP( + r, + 788968, + /*diagnostic*/ + void 0 + ); + return l && D3e(l, a); + } + function RKe() { + return Nr || (Nr = DG( + "Extract", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || nt), Nr === nt ? void 0 : Nr; + } + function jKe() { + return ui || (ui = DG( + "Omit", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || nt), ui === nt ? void 0 : ui; + } + function Zfe(r) { + return ds || (ds = DG( + "Awaited", + /*arity*/ + 1, + r + ) || (r ? nt : void 0)), ds === nt ? void 0 : ds; + } + function BKe() { + return Qi || (Qi = Oc( + "BigInt", + /*arity*/ + 0, + /*reportErrors*/ + !1 + )) || bi; + } + function JKe(r) { + return ya ?? (ya = Oc( + "ClassDecoratorContext", + /*arity*/ + 1, + r + )) ?? ea; + } + function zKe(r) { + return tc ?? (tc = Oc( + "ClassMethodDecoratorContext", + /*arity*/ + 2, + r + )) ?? ea; + } + function WKe(r) { + return dp ?? (dp = Oc( + "ClassGetterDecoratorContext", + /*arity*/ + 2, + r + )) ?? ea; + } + function VKe(r) { + return rd ?? (rd = Oc( + "ClassSetterDecoratorContext", + /*arity*/ + 2, + r + )) ?? ea; + } + function UKe(r) { + return ig ?? (ig = Oc( + "ClassAccessorDecoratorContext", + /*arity*/ + 2, + r + )) ?? ea; + } + function qKe(r) { + return Ug ?? (Ug = Oc( + "ClassAccessorDecoratorTarget", + /*arity*/ + 2, + r + )) ?? ea; + } + function HKe(r) { + return w0 ?? (w0 = Oc( + "ClassAccessorDecoratorResult", + /*arity*/ + 2, + r + )) ?? ea; + } + function GKe(r) { + return qg ?? (qg = Oc( + "ClassFieldDecoratorContext", + /*arity*/ + 2, + r + )) ?? ea; + } + function $Ke() { + return ys || (ys = Gfe( + "NaN", + /*reportErrors*/ + !1 + )); + } + function XKe() { + return wa || (wa = DG( + "Record", + /*arity*/ + 2, + /*reportErrors*/ + !0 + ) || nt), wa === nt ? void 0 : wa; + } + function v8(r, a) { + return r !== ea ? H0(r, a) : bi; + } + function M3e(r) { + return v8(kKe(), [r]); + } + function R3e(r) { + return v8(Yfe( + /*reportErrors*/ + !0 + ), [r]); + } + function cu(r, a) { + return v8(a ? Ct : Pe, [r]); + } + function Kfe(r) { + switch (r.kind) { + case 190: + return 2; + case 191: + return j3e(r); + case 202: + return r.questionToken ? 2 : r.dotDotDotToken ? j3e(r) : 1; + default: + return 1; + } + } + function j3e(r) { + return UL(r.type) ? 4 : 8; + } + function QKe(r) { + const a = KKe(r.parent); + if (UL(r)) + return a ? Ct : Pe; + const f = or(r.elements, Kfe); + return epe(f, a, or(r.elements, YKe)); + } + function YKe(r) { + return AC(r) || ji(r) ? r : void 0; + } + function B3e(r, a) { + return !!Dk(r) || J3e(r) && (r.kind === 188 ? d1(r.elementType) : r.kind === 189 ? ut(r.elements, d1) : a || ut(r.typeArguments, d1)); + } + function J3e(r) { + const a = r.parent; + switch (a.kind) { + case 196: + case 202: + case 183: + case 192: + case 193: + case 199: + case 194: + case 198: + case 188: + case 189: + return J3e(a); + case 265: + return !0; + } + return !1; + } + function d1(r) { + switch (r.kind) { + case 183: + return EG(r) || !!(NP( + r, + 788968 + /* Type */ + ).flags & 524288); + case 186: + return !0; + case 198: + return r.operator !== 158 && d1(r.type); + case 196: + case 190: + case 202: + case 316: + case 314: + case 315: + case 309: + return d1(r.type); + case 191: + return r.type.kind !== 188 || d1(r.type.elementType); + case 192: + case 193: + return ut(r.types, d1); + case 199: + return d1(r.objectType) || d1(r.indexType); + case 194: + return d1(r.checkType) || d1(r.extendsType) || d1(r.trueType) || d1(r.falseType); + } + return !1; + } + function ZKe(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = QKe(r); + if (l === ea) + a.resolvedType = bi; + else if (!(r.kind === 189 && ut(r.elements, (f) => !!(Kfe(f) & 8))) && B3e(r)) + a.resolvedType = r.kind === 189 && r.elements.length === 0 ? l : Wfe( + l, + r, + /*mapper*/ + void 0 + ); + else { + const f = r.kind === 188 ? [xi(r.elementType)] : or(r.elements, xi); + a.resolvedType = tpe(l, f); + } + } + return a.resolvedType; + } + function KKe(r) { + return K1(r) && r.operator === 148; + } + function gg(r, a, l = !1, f = []) { + const m = epe(a || or( + r, + (y) => 1 + /* Required */ + ), l, f); + return m === ea ? bi : r.length ? tpe(m, r) : m; + } + function epe(r, a, l) { + if (r.length === 1 && r[0] & 4) + return a ? Ct : Pe; + const f = or(r, (y) => y & 1 ? "#" : y & 2 ? "?" : y & 4 ? "." : "*").join() + (a ? "R" : "") + (ut(l, (y) => !!y) ? "," + or(l, (y) => y ? ja(y) : "_").join(",") : ""); + let m = Ai.get(f); + return m || Ai.set(f, m = eet(r, a, l)), m; + } + function eet(r, a, l) { + const f = r.length, m = ty(r, (Se) => !!(Se & 9)); + let y; + const x = []; + let I = 0; + if (f) { + y = new Array(f); + for (let Se = 0; Se < f; Se++) { + const me = y[Se] = ff(), Ve = r[Se]; + if (I |= Ve, !(I & 12)) { + const mt = va(4 | (Ve & 2 ? 16777216 : 0), "" + Se, a ? 8 : 0); + mt.links.tupleLabelDeclaration = l?.[Se], mt.links.type = me, x.push(mt); + } + } + } + const R = x.length, J = va(4, "length", a ? 8 : 0); + if (I & 12) + J.links.type = _e; + else { + const Se = []; + for (let me = m; me <= f; me++) Se.push(pd(me)); + J.links.type = Gn(Se); + } + x.push(J); + const ee = yp( + 12 + /* Reference */ + ); + return ee.typeParameters = y, ee.outerTypeParameters = void 0, ee.localTypeParameters = y, ee.instantiations = /* @__PURE__ */ new Map(), ee.instantiations.set(Up(ee.typeParameters), ee), ee.target = ee, ee.resolvedTypeArguments = ee.typeParameters, ee.thisType = ff(), ee.thisType.isThisType = !0, ee.thisType.constraint = ee, ee.declaredProperties = x, ee.declaredCallSignatures = He, ee.declaredConstructSignatures = He, ee.declaredIndexInfos = He, ee.elementFlags = r, ee.minLength = m, ee.fixedLength = R, ee.hasRestElement = !!(I & 12), ee.combinedFlags = I, ee.readonly = a, ee.labeledElementDeclarations = l, ee; + } + function tpe(r, a) { + return r.objectFlags & 8 ? rpe(r, a) : H0(r, a); + } + function rpe(r, a) { + var l, f, m, y; + if (!(r.combinedFlags & 14)) + return H0(r, a); + if (r.combinedFlags & 8) { + const mt = rc(a, (ht, er) => !!(r.elementFlags[er] & 8 && ht.flags & 1179648)); + if (mt >= 0) + return zL(or(a, (ht, er) => r.elementFlags[er] & 8 ? ht : yt)) ? Ho(a[mt], (ht) => rpe(r, uR(a, mt, ht))) : be; + } + const x = [], I = [], R = []; + let J = -1, ee = -1, Se = -1; + for (let mt = 0; mt < a.length; mt++) { + const ht = a[mt], er = r.elementFlags[mt]; + if (er & 8) + if (ht.flags & 1) + Ve(ht, 4, (l = r.labeledElementDeclarations) == null ? void 0 : l[mt]); + else if (ht.flags & 58982400 || B_(ht)) + Ve(ht, 8, (f = r.labeledElementDeclarations) == null ? void 0 : f[mt]); + else if (la(ht)) { + const tr = h2(ht); + if (tr.length + x.length >= 1e4) + return We( + C, + em(C) ? p.Type_produces_a_tuple_type_that_is_too_large_to_represent : p.Expression_produces_a_tuple_type_that_is_too_large_to_represent + ), be; + rr(tr, (Rr, vn) => { + var cr; + return Ve(Rr, ht.target.elementFlags[vn], (cr = ht.target.labeledElementDeclarations) == null ? void 0 : cr[vn]); + }); + } else + Ve(Y0(ht) && Wv(ht, _e) || be, 4, (m = r.labeledElementDeclarations) == null ? void 0 : m[mt]); + else + Ve(ht, er, (y = r.labeledElementDeclarations) == null ? void 0 : y[mt]); + } + for (let mt = 0; mt < J; mt++) + I[mt] & 2 && (I[mt] = 1); + ee >= 0 && ee < Se && (x[ee] = Gn(Zc(x.slice(ee, Se + 1), (mt, ht) => I[ee + ht] & 8 ? J_(mt, _e) : mt)), x.splice(ee + 1, Se - ee), I.splice(ee + 1, Se - ee), R.splice(ee + 1, Se - ee)); + const me = epe(I, r.readonly, R); + return me === ea ? bi : I.length ? H0(me, x) : me; + function Ve(mt, ht, er) { + ht & 1 && (J = I.length), ht & 4 && ee < 0 && (ee = I.length), ht & 6 && (Se = I.length), x.push(ht & 2 ? oi( + mt, + /*isProperty*/ + !0 + ) : mt), I.push(ht), R.push(er); + } + } + function OP(r, a, l = 0) { + const f = r.target, m = G0(r) - l; + return a > f.fixedLength ? Wtt(r) || gg(He) : gg( + Po(r).slice(a, m), + f.elementFlags.slice(a, m), + /*readonly*/ + !1, + f.labeledElementDeclarations && f.labeledElementDeclarations.slice(a, m) + ); + } + function z3e(r) { + return Gn(Tr(xX(r.target.fixedLength, (a) => D_("" + a)), Dm(r.target.readonly ? Ct : Pe))); + } + function tet(r, a) { + const l = rc(r.elementFlags, (f) => !(f & a)); + return l >= 0 ? l : r.elementFlags.length; + } + function b8(r, a) { + return r.elementFlags.length - cI(r.elementFlags, (l) => !(l & a)) - 1; + } + function npe(r) { + return r.fixedLength + b8( + r, + 3 + /* Fixed */ + ); + } + function h2(r) { + const a = Po(r), l = G0(r); + return a.length === l ? a : a.slice(0, l); + } + function ret(r) { + return oi( + xi(r.type), + /*isProperty*/ + !0 + ); + } + function Fl(r) { + return r.id; + } + function $0(r, a) { + return Zh(r, a, Fl, uo) >= 0; + } + function JL(r, a) { + const l = Zh(r, a, Fl, uo); + return l < 0 ? (r.splice(~l, 0, a), !0) : !1; + } + function net(r, a, l) { + const f = l.flags; + if (!(f & 131072)) + if (a |= f & 473694207, f & 465829888 && (a |= 33554432), f & 2097152 && wn(l) & 67108864 && (a |= 536870912), l === lt && (a |= 8388608), Aa(l) && (a |= 1073741824), !K && f & 98304) + wn(l) & 65536 || (a |= 4194304); + else { + const m = r.length, y = m && l.id > r[m - 1].id ? ~m : Zh(r, l, Fl, uo); + y < 0 && r.splice(~y, 0, l); + } + return a; + } + function W3e(r, a, l) { + let f; + for (const m of l) + m !== f && (a = m.flags & 1048576 ? W3e(r, a | (uet(m) ? 1048576 : 0), m.types) : net(r, a, m), f = m); + return a; + } + function iet(r, a) { + var l; + if (r.length < 2) + return r; + const f = Up(r), m = mi.get(f); + if (m) + return m; + const y = a && ut(r, (J) => !!(J.flags & 524288) && !B_(J) && Cpe(zd(J))), x = r.length; + let I = x, R = 0; + for (; I > 0; ) { + I--; + const J = r[I]; + if (y || J.flags & 469499904) { + if (J.flags & 262144 && dg(J).flags & 1048576) { + Pm(J, Gn(or(r, (me) => me === J ? fr : me)), qf) && ay(r, I); + continue; + } + const ee = J.flags & 61603840 ? Nn(Wa(J), (me) => Vd(Zr(me))) : void 0, Se = ee && Ju(Zr(ee)); + for (const me of r) + if (J !== me) { + if (R === 1e5 && R / (x - I) * x > 1e6) { + (l = rn) == null || l.instant(rn.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: r.map((mt) => mt.id) }), We(C, p.Expression_produces_a_union_type_that_is_too_complex_to_represent); + return; + } + if (R++, ee && me.flags & 61603840) { + const Ve = Xc(me, ee.escapedName); + if (Ve && Vd(Ve) && Ju(Ve) !== Se) + continue; + } + if (Pm(J, me, qf) && (!(wn(G6(J)) & 1) || !(wn(G6(me)) & 1) || Hv(J, me))) { + ay(r, I); + break; + } + } + } + } + return mi.set(f, r), r; + } + function set(r, a, l) { + let f = r.length; + for (; f > 0; ) { + f--; + const m = r[f], y = m.flags; + (y & 402653312 && a & 4 || y & 256 && a & 8 || y & 2048 && a & 64 || y & 8192 && a & 4096 || l && y & 32768 && a & 16384 || v2(m) && $0(r, m.regularType)) && ay(r, f); + } + } + function aet(r) { + const a = Ln(r, QS); + if (a.length) { + let l = r.length; + for (; l > 0; ) { + l--; + const f = r[l]; + f.flags & 128 && ut(a, (m) => oet(f, m)) && ay(r, l); + } + } + } + function oet(r, a) { + return a.flags & 134217728 ? a$(r, a) : s$(r, a); + } + function cet(r) { + const a = []; + for (const l of r) + if (l.flags & 2097152 && wn(l) & 67108864) { + const f = l.types[0].flags & 8650752 ? 0 : 1; + Zf(a, l.types[f]); + } + for (const l of a) { + const f = []; + for (const y of r) + if (y.flags & 2097152 && wn(y) & 67108864) { + const x = y.types[0].flags & 8650752 ? 0 : 1; + y.types[x] === l && JL(f, y.types[1 - x]); + } + const m = Hl(l); + if (V_(m, (y) => $0(f, y))) { + let y = r.length; + for (; y > 0; ) { + y--; + const x = r[y]; + if (x.flags & 2097152 && wn(x) & 67108864) { + const I = x.types[0].flags & 8650752 ? 0 : 1; + x.types[I] === l && $0(f, x.types[1 - I]) && ay(r, y); + } + } + JL(r, l); + } + } + } + function uet(r) { + return !!(r.flags & 1048576 && (r.aliasSymbol || r.origin)); + } + function V3e(r, a) { + for (const l of a) + if (l.flags & 1048576) { + const f = l.origin; + l.aliasSymbol || f && !(f.flags & 1048576) ? Zf(r, l) : f && f.flags & 1048576 && V3e(r, f.types); + } + } + function ipe(r, a) { + const l = u2(r); + return l.types = a, l; + } + function Gn(r, a = 1, l, f, m) { + if (r.length === 0) + return fr; + if (r.length === 1) + return r[0]; + if (r.length === 2 && !m && (r[0].flags & 1048576 || r[1].flags & 1048576)) { + const y = a === 0 ? "N" : a === 2 ? "S" : "L", x = r[0].id < r[1].id ? 0 : 1, I = r[x].id + y + r[1 - x].id + xk(l, f); + let R = $n.get(I); + return R || (R = U3e( + r, + a, + l, + f, + /*origin*/ + void 0 + ), $n.set(I, R)), R; + } + return U3e(r, a, l, f, m); + } + function U3e(r, a, l, f, m) { + let y = []; + const x = W3e(y, 0, r); + if (a !== 0) { + if (x & 3) + return x & 1 ? x & 8388608 ? lt : x & 1073741824 ? be : Ne : yt; + if (x & 32768 && y.length >= 2 && y[0] === Ut && y[1] === je && ay(y, 1), (x & 402664352 || x & 16384 && x & 32768) && set(y, x, !!(a & 2)), x & 128 && x & 402653184 && aet(y), x & 536870912 && cet(y), a === 2 && (y = iet(y, !!(x & 524288)), !y)) + return be; + if (y.length === 0) + return x & 65536 ? x & 4194304 ? he : q : x & 32768 ? x & 4194304 ? Ut : W : fr; + } + if (!m && x & 1048576) { + const R = []; + V3e(R, r); + const J = []; + for (const Se of y) + ut(R, (me) => $0(me.types, Se)) || J.push(Se); + if (!l && R.length === 1 && J.length === 0) + return R[0]; + if (Eu(R, (Se, me) => Se + me.types.length, 0) + J.length === y.length) { + for (const Se of R) + JL(J, Se); + m = ipe(1048576, J); + } + } + const I = (x & 36323331 ? 0 : 32768) | (x & 2097152 ? 16777216 : 0); + return ape(y, I, l, f, m); + } + function _et(r, a) { + let l; + const f = []; + for (const y of r) { + const x = bp(y); + if (x) { + if (x.kind !== 0 && x.kind !== 1 || l && !spe(l, x)) + return; + l = x, f.push(x.type); + } else { + const I = a !== 2097152 ? Ha(y) : void 0; + if (I !== dt && I !== xt) + return; + } + } + if (!l) + return; + const m = p3e(f, a); + return g8(l.kind, l.parameterName, l.parameterIndex, m); + } + function spe(r, a) { + return r.kind === a.kind && r.parameterIndex === a.parameterIndex; + } + function ape(r, a, l, f, m) { + if (r.length === 0) + return fr; + if (r.length === 1) + return r[0]; + const x = (m ? m.flags & 1048576 ? `|${Up(m.types)}` : m.flags & 2097152 ? `&${Up(m.types)}` : `#${m.type.id}|${Up(r)}` : Up(r)) + xk(l, f); + let I = _s.get(x); + return I || (I = Yg( + 1048576 + /* Union */ + ), I.objectFlags = a | ML( + r, + /*excludeKinds*/ + 98304 + /* Nullable */ + ), I.types = r, I.origin = m, I.aliasSymbol = l, I.aliasTypeArguments = f, r.length === 2 && r[0].flags & 512 && r[1].flags & 512 && (I.flags |= 16, I.intrinsicName = "boolean"), _s.set(x, I)), I; + } + function fet(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = Dk(r); + a.resolvedType = Gn(or(r.types, xi), 1, l, tE(l)); + } + return a.resolvedType; + } + function pet(r, a, l) { + const f = l.flags; + return f & 2097152 ? q3e(r, a, l.types) : (hg(l) ? a & 16777216 || (a |= 16777216, r.set(l.id.toString(), l)) : (f & 3 ? (l === lt && (a |= 8388608), Aa(l) && (a |= 1073741824)) : (K || !(f & 98304)) && (l === je && (a |= 262144, l = Ut), r.has(l.id.toString()) || (l.flags & 109472 && a & 109472 && (a |= 67108864), r.set(l.id.toString(), l))), a |= f & 473694207), a); + } + function q3e(r, a, l) { + for (const f of l) + a = pet(r, a, Ju(f)); + return a; + } + function det(r, a) { + let l = r.length; + for (; l > 0; ) { + l--; + const f = r[l]; + (f.flags & 4 && a & 402653312 || f.flags & 8 && a & 256 || f.flags & 64 && a & 2048 || f.flags & 4096 && a & 8192 || f.flags & 16384 && a & 32768 || hg(f) && a & 470302716) && ay(r, l); + } + } + function met(r, a) { + for (const l of r) + if (!$0(l.types, a)) { + const f = a.flags & 128 ? we : a.flags & 288 ? _e : a.flags & 2048 ? Te : a.flags & 8192 ? Lr : void 0; + if (!f || !$0(l.types, f)) + return !1; + } + return !0; + } + function get(r) { + let a = r.length; + const l = Ln(r, (f) => !!(f.flags & 128)); + for (; a > 0; ) { + a--; + const f = r[a]; + if (f.flags & 402653184) { + for (const m of l) + if (h1(m, f)) { + ay(r, a); + break; + } else if (QS(f)) + return !0; + } + } + return !1; + } + function H3e(r, a) { + for (let l = 0; l < r.length; l++) + r[l] = Jc(r[l], (f) => !(f.flags & a)); + } + function het(r) { + let a; + const l = rc(r, (x) => !!(wn(x) & 32768)); + if (l < 0) + return !1; + let f = l + 1; + for (; f < r.length; ) { + const x = r[f]; + wn(x) & 32768 ? ((a || (a = [r[l]])).push(x), ay(r, f)) : f++; + } + if (!a) + return !1; + const m = [], y = []; + for (const x of a) + for (const I of x.types) + JL(m, I) && met(a, I) && JL(y, I); + return r[l] = ape( + y, + 32768 + /* PrimitiveUnion */ + ), !0; + } + function yet(r, a, l, f) { + const m = Yg( + 2097152 + /* Intersection */ + ); + return m.objectFlags = a | ML( + r, + /*excludeKinds*/ + 98304 + /* Nullable */ + ), m.types = r, m.aliasSymbol = l, m.aliasTypeArguments = f, m; + } + function Ys(r, a = 0, l, f) { + const m = /* @__PURE__ */ new Map(), y = q3e(m, 0, r), x = ts(m.values()); + let I = 0; + if (y & 131072) + return ls(x, mn) ? mn : fr; + if (K && y & 98304 && y & 84410368 || y & 67108864 && y & 402783228 || y & 402653316 && y & 67238776 || y & 296 && y & 469891796 || y & 2112 && y & 469889980 || y & 12288 && y & 469879804 || y & 49152 && y & 469842940 || y & 402653184 && y & 128 && get(x)) + return fr; + if (y & 1) + return y & 8388608 ? lt : y & 1073741824 ? be : Ne; + if (!K && y & 98304) + return y & 16777216 ? fr : y & 32768 ? Ut : he; + if ((y & 4 && y & 402653312 || y & 8 && y & 256 || y & 64 && y & 2048 || y & 4096 && y & 8192 || y & 16384 && y & 32768 || y & 16777216 && y & 470302716) && (a & 1 || det(x, y)), y & 262144 && (x[x.indexOf(Ut)] = je), x.length === 0) + return yt; + if (x.length === 1) + return x[0]; + if (x.length === 2 && !(a & 2)) { + const ee = x[0].flags & 8650752 ? 0 : 1, Se = x[ee], me = x[1 - ee]; + if (Se.flags & 8650752 && (me.flags & 469893116 && !nAe(me) || y & 16777216)) { + const Ve = Hl(Se); + if (Ve && V_(Ve, (mt) => !!(mt.flags & 469893116) || hg(mt))) { + if (GL(Ve, me)) + return Se; + if (!(Ve.flags & 1048576 && Hp(Ve, (mt) => GL(mt, me))) && !GL(me, Ve)) + return fr; + I = 67108864; + } + } + } + const R = Up(x) + (a & 2 ? "*" : xk(l, f)); + let J = os.get(R); + if (!J) { + if (y & 1048576) + if (het(x)) + J = Ys(x, a, l, f); + else if (Ri(x, (ee) => !!(ee.flags & 1048576 && ee.types[0].flags & 32768))) { + const ee = ut(x, N8) ? je : Ut; + H3e( + x, + 32768 + /* Undefined */ + ), J = Gn([Ys(x, a), ee], 1, l, f); + } else if (Ri(x, (ee) => !!(ee.flags & 1048576 && (ee.types[0].flags & 65536 || ee.types[1].flags & 65536)))) + H3e( + x, + 65536 + /* Null */ + ), J = Gn([Ys(x, a), he], 1, l, f); + else if (x.length >= 4) { + const ee = Math.floor(x.length / 2); + J = Ys([Ys(x.slice(0, ee), a), Ys(x.slice(ee), a)], a, l, f); + } else { + if (!zL(x)) + return be; + const ee = vet(x, a), Se = ut(ee, (me) => !!(me.flags & 2097152)) && ope(ee) > ope(x) ? ipe(2097152, x) : void 0; + J = Gn(ee, 1, l, f, Se); + } + else + J = yet(x, I, l, f); + os.set(R, J); + } + return J; + } + function G3e(r) { + return Eu(r, (a, l) => l.flags & 1048576 ? a * l.types.length : l.flags & 131072 ? 0 : a, 1); + } + function zL(r) { + var a; + const l = G3e(r); + return l >= 1e5 ? ((a = rn) == null || a.instant(rn.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: r.map((f) => f.id), size: l }), We(C, p.Expression_produces_a_union_type_that_is_too_complex_to_represent), !1) : !0; + } + function vet(r, a) { + const l = G3e(r), f = []; + for (let m = 0; m < l; m++) { + const y = r.slice(); + let x = m; + for (let R = r.length - 1; R >= 0; R--) + if (r[R].flags & 1048576) { + const J = r[R].types, ee = J.length; + y[R] = J[x % ee], x = Math.floor(x / ee); + } + const I = Ys(y, a); + I.flags & 131072 || f.push(I); + } + return f; + } + function $3e(r) { + return !(r.flags & 3145728) || r.aliasSymbol ? 1 : r.flags & 1048576 && r.origin ? $3e(r.origin) : ope(r.types); + } + function ope(r) { + return Eu(r, (a, l) => a + $3e(l), 0); + } + function bet(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = Dk(r), f = or(r.types, xi), m = f.length === 2 ? f.indexOf(Su) : -1, y = m >= 0 ? f[1 - m] : yt, x = !!(y.flags & 76 || y.flags & 134217728 && QS(y)); + a.resolvedType = Ys(f, x ? 1 : 0, l, tE(l)); + } + return a.resolvedType; + } + function X3e(r, a) { + const l = Yg( + 4194304 + /* Index */ + ); + return l.type = r, l.indexFlags = a, l; + } + function Tet(r) { + const a = u2( + 4194304 + /* Index */ + ); + return a.type = r, a; + } + function Q3e(r, a) { + return a & 1 ? r.resolvedStringIndexType || (r.resolvedStringIndexType = X3e( + r, + 1 + /* StringsOnly */ + )) : r.resolvedIndexType || (r.resolvedIndexType = X3e( + r, + 0 + /* None */ + )); + } + function Y3e(r, a) { + const l = Jd(r), f = Xf(r), m = q0(r.target || r); + if (!m && !(a & 2)) + return f; + const y = []; + if (ZS(f)) { + if (Q6(r)) + return Q3e(r, a); + sT(f, I); + } else if (Q6(r)) { + const R = ju(p2(r)); + xfe(R, 8576, !!(a & 1), I); + } else + sT(AL(f), I); + const x = a & 2 ? Jc(Gn(y), (R) => !(R.flags & 5)) : Gn(y); + if (x.flags & 1048576 && f.flags & 1048576 && Up(x.types) === Up(f.types)) + return f; + return x; + function I(R) { + const J = m ? Ji(m, x8(r.mapper, l, R)) : R; + y.push(J === we ? Mr : J); + } + } + function xet(r) { + const a = Jd(r); + return l(q0(r) || a); + function l(f) { + return f.flags & 470810623 ? !0 : f.flags & 16777216 ? f.root.isDistributive && f.checkType === a : f.flags & 137363456 ? Ri(f.types, l) : f.flags & 8388608 ? l(f.objectType) && l(f.indexType) : f.flags & 33554432 ? l(f.baseType) && l(f.constraint) : f.flags & 268435456 ? l(f.type) : !1; + } + } + function X0(r) { + if (wi(r)) + return fr; + if (m_(r)) + return Ju(qi(r)); + if (oa(r)) + return Ju(wm(r)); + const a = Y2(r); + return a !== void 0 ? D_(Pi(a)) : ct(r) ? Ju(qi(r)) : fr; + } + function kk(r, a, l) { + if (l || !(sp(r) & 6)) { + let f = Ni(gG(r)).nameType; + if (!f) { + const m = es(r.valueDeclaration); + f = r.escapedName === "default" ? D_("default") : m && X0(m) || (k3(r) ? void 0 : D_(uc(r))); + } + if (f && f.flags & a) + return f; + } + return fr; + } + function Z3e(r, a) { + return !!(r.flags & a || r.flags & 2097152 && ut(r.types, (l) => Z3e(l, a))); + } + function ket(r, a, l) { + const f = l && (wn(r) & 7 || r.aliasSymbol) ? Tet(r) : void 0, m = or(Wa(r), (x) => kk(x, a)), y = or(Bu(r), (x) => x !== kr && Z3e(x.keyType, a) ? x.keyType === we && a & 8 ? Mr : x.keyType : fr); + return Gn( + Hi(m, y), + 1, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0, + f + ); + } + function cpe(r, a = 0) { + return !!(r.flags & 58982400 || v1(r) || B_(r) && (!xet(r) || yG(r) === 2) || r.flags & 1048576 && !(a & 4) && wfe(r) || r.flags & 2097152 && Sc( + r, + 465829888 + /* Instantiable */ + ) && ut(r.types, hg)); + } + function Dm(r, a = 0) { + return r = Wd(r), eE(r) ? Vfe(Dm(r.baseType, a)) : cpe(r, a) ? Q3e(r, a) : r.flags & 1048576 ? Ys(or(r.types, (l) => Dm(l, a))) : r.flags & 2097152 ? Gn(or(r.types, (l) => Dm(l, a))) : wn(r) & 32 ? Y3e(r, a) : r === lt ? lt : r.flags & 2 ? fr : r.flags & 131073 ? Or : ket( + r, + (a & 2 ? 128 : 402653316) | (a & 1 ? 0 : 12584), + a === 0 + /* None */ + ); + } + function K3e(r) { + const a = RKe(); + return a ? K6(a, [r, we]) : we; + } + function Cet(r) { + const a = K3e(Dm(r)); + return a.flags & 131072 ? we : a; + } + function Eet(r) { + const a = bn(r); + if (!a.resolvedType) + switch (r.operator) { + case 143: + a.resolvedType = Dm(xi(r.type)); + break; + case 158: + a.resolvedType = r.type.kind === 155 ? hpe(v3(r.parent)) : be; + break; + case 148: + a.resolvedType = xi(r.type); + break; + default: + E.assertNever(r.operator); + } + return a.resolvedType; + } + function Det(r) { + const a = bn(r); + return a.resolvedType || (a.resolvedType = XS( + [r.head.text, ...or(r.templateSpans, (l) => l.literal.text)], + or(r.templateSpans, (l) => xi(l.type)) + )), a.resolvedType; + } + function XS(r, a) { + const l = rc(a, (J) => !!(J.flags & 1179648)); + if (l >= 0) + return zL(a) ? Ho(a[l], (J) => XS(r, uR(a, l, J))) : be; + if (ls(a, lt)) + return lt; + const f = [], m = []; + let y = r[0]; + if (!R(r, a)) + return we; + if (f.length === 0) + return D_(y); + if (m.push(y), Ri(m, (J) => J === "")) { + if (Ri(f, (J) => !!(J.flags & 4))) + return we; + if (f.length === 1 && QS(f[0])) + return f[0]; + } + const x = `${Up(f)}|${or(m, (J) => J.length).join(",")}|${m.join("")}`; + let I = ln.get(x); + return I || ln.set(x, I = wet(m, f)), I; + function R(J, ee) { + for (let Se = 0; Se < ee.length; Se++) { + const me = ee[Se]; + if (me.flags & 101248) + y += Pet(me) || "", y += J[Se + 1]; + else if (me.flags & 134217728) { + if (y += me.texts[0], !R(me.texts, me.types)) return !1; + y += J[Se + 1]; + } else if (ZS(me) || WL(me)) + f.push(me), m.push(y), y = J[Se + 1]; + else + return !1; + } + return !0; + } + } + function Pet(r) { + return r.flags & 128 ? r.value : r.flags & 256 ? "" + r.value : r.flags & 2048 ? Eb(r.value) : r.flags & 98816 ? r.intrinsicName : void 0; + } + function wet(r, a) { + const l = Yg( + 134217728 + /* TemplateLiteral */ + ); + return l.texts = r, l.types = a, l; + } + function Ck(r, a) { + return a.flags & 1179648 ? Ho(a, (l) => Ck(r, l)) : a.flags & 128 ? D_(eAe(r, a.value)) : a.flags & 134217728 ? XS(...Aet(r, a.texts, a.types)) : ( + // Mapping> === Mapping + a.flags & 268435456 && r === a.symbol ? a : a.flags & 268435461 || ZS(a) ? tAe(r, a) : ( + // This handles Mapping<`${number}`> and Mapping<`${bigint}`> + WL(a) ? tAe(r, XS(["", ""], [a])) : a + ) + ); + } + function eAe(r, a) { + switch (Xz.get(r.escapedName)) { + case 0: + return a.toUpperCase(); + case 1: + return a.toLowerCase(); + case 2: + return a.charAt(0).toUpperCase() + a.slice(1); + case 3: + return a.charAt(0).toLowerCase() + a.slice(1); + } + return a; + } + function Aet(r, a, l) { + switch (Xz.get(r.escapedName)) { + case 0: + return [a.map((f) => f.toUpperCase()), l.map((f) => Ck(r, f))]; + case 1: + return [a.map((f) => f.toLowerCase()), l.map((f) => Ck(r, f))]; + case 2: + return [a[0] === "" ? a : [a[0].charAt(0).toUpperCase() + a[0].slice(1), ...a.slice(1)], a[0] === "" ? [Ck(r, l[0]), ...l.slice(1)] : l]; + case 3: + return [a[0] === "" ? a : [a[0].charAt(0).toLowerCase() + a[0].slice(1), ...a.slice(1)], a[0] === "" ? [Ck(r, l[0]), ...l.slice(1)] : l]; + } + return [a, l]; + } + function tAe(r, a) { + const l = `${$s(r)},${Fl(a)}`; + let f = Zn.get(l); + return f || Zn.set(l, f = Net(r, a)), f; + } + function Net(r, a) { + const l = jd(268435456, r); + return l.type = a, l; + } + function Iet(r, a, l, f, m) { + const y = Yg( + 8388608 + /* IndexedAccess */ + ); + return y.objectType = r, y.indexType = a, y.accessFlags = l, y.aliasSymbol = f, y.aliasTypeArguments = m, y; + } + function S8(r) { + if (ne) + return !1; + if (wn(r) & 4096) + return !0; + if (r.flags & 1048576) + return Ri(r.types, S8); + if (r.flags & 2097152) + return ut(r.types, S8); + if (r.flags & 465829888) { + const a = Efe(r); + return a !== r && S8(a); + } + return !1; + } + function wG(r, a) { + return Fp(r) ? Lp(r) : a && Rc(a) ? ( + // late bound names are handled in the first branch, so here we only need to handle normal names + Y2(a) + ) : void 0; + } + function lpe(r, a) { + if (a.flags & 8208) { + const l = sr(r.parent, (f) => !go(f)) || r.parent; + return lb(l) ? Qd(l) && Re(r) && uNe(l, r) : Ri(a.declarations, (f) => !ps(f) || Vp(f)); + } + return !0; + } + function rAe(r, a, l, f, m, y) { + const x = m && m.kind === 212 ? m : void 0, I = m && wi(m) ? void 0 : wG(l, m); + if (I !== void 0) { + if (y & 256) + return Yv(a, I) || Ne; + const J = js(a, I); + if (J) { + if (y & 64 && m && J.declarations && Uy(J) && lpe(m, J)) { + const Se = x?.argumentExpression ?? (Nb(m) ? m.indexType : m); + Hf(Se, J.declarations, I); + } + if (x) { + if (xM(J, x, w8e(x.expression, a.symbol)), gIe(x, J, G1(x))) { + We(x.argumentExpression, p.Cannot_assign_to_0_because_it_is_a_read_only_property, Si(J)); + return; + } + if (y & 8 && (bn(m).resolvedSymbol = J), S8e(x, J)) + return et; + } + const ee = y & 4 ? l1(J) : Zr(J); + return x && G1(x) !== 1 ? $h(x, ee) : m && Nb(m) && N8(ee) ? Gn([ee, Ut]) : ee; + } + if (V_(a, la) && Mg(I)) { + const ee = +I; + if (m && V_(a, (Se) => !Se.target.hasRestElement) && !(y & 16)) { + const Se = upe(m); + if (la(a)) { + if (ee < 0) + return We(Se, p.A_tuple_type_cannot_be_indexed_with_a_negative_value), Ut; + We(Se, p.Tuple_type_0_of_length_1_has_no_element_at_index_2, Ur(a), G0(a), Pi(I)); + } else + We(Se, p.Property_0_does_not_exist_on_type_1, Pi(I), Ur(a)); + } + if (ee >= 0) + return R(eh(a, _e)), UAe(a, ee, y & 1 ? je : void 0); + } + } + if (!(l.flags & 98304) && Gl( + l, + 402665900 + /* ESSymbolLike */ + )) { + if (a.flags & 131073) + return a; + const J = m8(a, l) || eh(a, we); + if (J) { + if (y & 2 && J.keyType !== _e) { + x && (y & 4 ? We(x, p.Type_0_is_generic_and_can_only_be_indexed_for_reading, Ur(r)) : We(x, p.Type_0_cannot_be_used_to_index_type_1, Ur(l), Ur(r))); + return; + } + if (m && J.keyType === we && !Gl( + l, + 12 + /* Number */ + )) { + const ee = upe(m); + return We(ee, p.Type_0_cannot_be_used_as_an_index_type, Ur(l)), y & 1 ? Gn([J.type, je]) : J.type; + } + return R(J), y & 1 && !(a.symbol && a.symbol.flags & 384 && l.symbol && l.flags & 1024 && s_(l.symbol) === a.symbol) ? Gn([J.type, je]) : J.type; + } + if (l.flags & 131072) + return fr; + if (S8(a)) + return Ne; + if (x && !j$(a)) { + if (Qv(a)) { + if (ne && l.flags & 384) + return La.add(Xr(x, p.Property_0_does_not_exist_on_type_1, l.value, Ur(a))), Ut; + if (l.flags & 12) { + const ee = or(a.properties, (Se) => Zr(Se)); + return Gn(Tr(ee, Ut)); + } + } + if (a.symbol === Xe && I !== void 0 && Xe.exports.has(I) && Xe.exports.get(I).flags & 418) + We(x, p.Property_0_does_not_exist_on_type_1, Pi(I), Ur(a)); + else if (ne && !(y & 128)) + if (I !== void 0 && k8e(I, a)) { + const ee = Ur(a); + We(x, p.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, I, ee, ee + "[" + sc(x.argumentExpression) + "]"); + } else if (Wv(a, _e)) + We(x.argumentExpression, p.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); + else { + let ee; + if (I !== void 0 && (ee = D8e(I, a))) + ee !== void 0 && We(x.argumentExpression, p.Property_0_does_not_exist_on_type_1_Did_you_mean_2, I, Ur(a), ee); + else { + const Se = Fit(a, x, l); + if (Se !== void 0) + We(x, p.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, Ur(a), Se); + else { + let me; + if (l.flags & 1024) + me = us( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + "[" + Ur(l) + "]", + Ur(a) + ); + else if (l.flags & 8192) { + const Ve = Ky(l.symbol, x); + me = us( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + "[" + Ve + "]", + Ur(a) + ); + } else l.flags & 128 || l.flags & 256 ? me = us( + /*details*/ + void 0, + p.Property_0_does_not_exist_on_type_1, + l.value, + Ur(a) + ) : l.flags & 12 && (me = us( + /*details*/ + void 0, + p.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1, + Ur(l), + Ur(a) + )); + me = us( + me, + p.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1, + Ur(f), + Ur(a) + ), La.add(wg(xr(x), x, me)); + } + } + } + return; + } + } + if (S8(a)) + return Ne; + if (m) { + const J = upe(m); + l.flags & 384 ? We(J, p.Property_0_does_not_exist_on_type_1, "" + l.value, Ur(a)) : l.flags & 12 ? We(J, p.Type_0_has_no_matching_index_signature_for_type_1, Ur(a), Ur(l)) : We(J, p.Type_0_cannot_be_used_as_an_index_type, Ur(l)); + } + if (Ea(l)) + return l; + return; + function R(J) { + J && J.isReadonly && x && (u0(x) || cB(x)) && We(x, p.Index_signature_in_type_0_only_permits_reading, Ur(a)); + } + } + function upe(r) { + return r.kind === 212 ? r.argumentExpression : r.kind === 199 ? r.indexType : r.kind === 167 ? r.expression : r; + } + function WL(r) { + if (r.flags & 2097152) { + let a = !1; + for (const l of r.types) + if (l.flags & 101248 || WL(l)) + a = !0; + else if (!(l.flags & 524288)) + return !1; + return a; + } + return !!(r.flags & 77) || QS(r); + } + function QS(r) { + return !!(r.flags & 134217728) && Ri(r.types, WL) || !!(r.flags & 268435456) && WL(r.type); + } + function nAe(r) { + return !!(r.flags & 402653184) && !QS(r); + } + function Ek(r) { + return !!T8(r); + } + function YS(r) { + return !!(T8(r) & 4194304); + } + function ZS(r) { + return !!(T8(r) & 8388608); + } + function T8(r) { + return r.flags & 3145728 ? (r.objectFlags & 2097152 || (r.objectFlags |= 2097152 | Eu(r.types, (a, l) => a | T8(l), 0)), r.objectFlags & 12582912) : r.flags & 33554432 ? (r.objectFlags & 2097152 || (r.objectFlags |= 2097152 | T8(r.baseType) | T8(r.constraint)), r.objectFlags & 12582912) : (r.flags & 58982400 || B_(r) || v1(r) ? 4194304 : 0) | (r.flags & 63176704 || nAe(r) ? 8388608 : 0); + } + function zh(r, a) { + return r.flags & 8388608 ? Fet(r, a) : r.flags & 16777216 ? Let(r, a) : r; + } + function iAe(r, a, l) { + if (r.flags & 1048576 || r.flags & 2097152 && !cpe(r)) { + const f = or(r.types, (m) => zh(J_(m, a), l)); + return r.flags & 2097152 || l ? Ys(f) : Gn(f); + } + } + function Oet(r, a, l) { + if (a.flags & 1048576) { + const f = or(a.types, (m) => zh(J_(r, m), l)); + return l ? Ys(f) : Gn(f); + } + } + function Fet(r, a) { + const l = a ? "simplifiedForWriting" : "simplifiedForReading"; + if (r[l]) + return r[l] === Fa ? r : r[l]; + r[l] = Fa; + const f = zh(r.objectType, a), m = zh(r.indexType, a), y = Oet(f, m, a); + if (y) + return r[l] = y; + if (!(m.flags & 465829888)) { + const x = iAe(f, m, a); + if (x) + return r[l] = x; + } + if (v1(f) && m.flags & 296) { + const x = MP( + f, + m.flags & 8 ? 0 : f.target.fixedLength, + /*endSkipCount*/ + 0, + a + ); + if (x) + return r[l] = x; + } + return B_(f) && yG(f) !== 2 ? r[l] = Ho(AG(f, r.indexType), (x) => zh(x, a)) : r[l] = r; + } + function Let(r, a) { + const l = r.checkType, f = r.extendsType, m = Uv(r), y = qv(r); + if (y.flags & 131072 && g1(m) === g1(l)) { + if (l.flags & 1 || Bs(eT(l), eT(f))) + return zh(m, a); + if (sAe(l, f)) + return fr; + } else if (m.flags & 131072 && g1(y) === g1(l)) { + if (!(l.flags & 1) && Bs(eT(l), eT(f))) + return fr; + if (l.flags & 1 || sAe(l, f)) + return zh(y, a); + } + return r; + } + function sAe(r, a) { + return !!(Gn([wL(r, a), fr]).flags & 131072); + } + function AG(r, a) { + const l = z_([Jd(r)], [a]), f = S2(r.mapper, l), m = Ji(Jh(r.target || r), f), y = Kwe(r) > 0 || (Ek(r) ? DP(p2(r)) > 0 : Met(r, a)); + return oi( + m, + /*isProperty*/ + !0, + y + ); + } + function Met(r, a) { + const l = Hl(a); + return !!l && ut(Wa(r), (f) => !!(f.flags & 16777216) && Bs(kk( + f, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), l)); + } + function J_(r, a, l = 0, f, m, y) { + return m1(r, a, l, f, m, y) || (f ? be : yt); + } + function aAe(r, a) { + return V_(r, (l) => { + if (l.flags & 384) { + const f = Lp(l); + if (Mg(f)) { + const m = +f; + return m >= 0 && m < a; + } + } + return !1; + }); + } + function m1(r, a, l = 0, f, m, y) { + if (r === lt || a === lt) + return lt; + if (r = Wd(r), wAe(r) && !(a.flags & 98304) && Gl( + a, + 12 + /* Number */ + ) && (a = we), F.noUncheckedIndexedAccess && l & 32 && (l |= 1), ZS(a) || (f && f.kind !== 199 ? v1(r) && !aAe(a, npe(r.target)) : YS(r) && !(la(r) && aAe(a, npe(r.target))) || wfe(r))) { + if (r.flags & 3) + return r; + const I = l & 1, R = r.id + "," + a.id + "," + I + xk(m, y); + let J = vr.get(R); + return J || vr.set(R, J = Iet(r, a, I, m, y)), J; + } + const x = PP(r); + if (a.flags & 1048576 && !(a.flags & 16)) { + const I = []; + let R = !1; + for (const J of a.types) { + const ee = rAe(r, x, J, a, f, l | (R ? 128 : 0)); + if (ee) + I.push(ee); + else if (f) + R = !0; + else + return; + } + return R ? void 0 : l & 4 ? Ys(I, 0, m, y) : Gn(I, 1, m, y); + } + return rAe( + r, + x, + a, + a, + f, + l | 8 | 64 + /* ReportDeprecated */ + ); + } + function oAe(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = xi(r.objectType), f = xi(r.indexType), m = Dk(r); + a.resolvedType = J_(l, f, 0, r, m, tE(m)); + } + return a.resolvedType; + } + function _pe(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = yp(32, r.symbol); + l.declaration = r, l.aliasSymbol = Dk(r), l.aliasTypeArguments = tE(l.aliasSymbol), a.resolvedType = l, Xf(l); + } + return a.resolvedType; + } + function g1(r) { + return r.flags & 33554432 ? g1(r.baseType) : r.flags & 8388608 && (r.objectType.flags & 33554432 || r.indexType.flags & 33554432) ? J_(g1(r.objectType), g1(r.indexType)) : r; + } + function cAe(r) { + return mx(r) && Dr(r.elements) > 0 && !ut(r.elements, (a) => V5(a) || U5(a) || AC(a) && !!(a.questionToken || a.dotDotDotToken)); + } + function lAe(r, a) { + return Ek(r) || a && la(r) && ut(h2(r), Ek); + } + function fpe(r, a, l, f, m) { + let y, x, I = 0; + for (; ; ) { + if (I === 1e3) + return We(C, p.Type_instantiation_is_excessively_deep_and_possibly_infinite), be; + const J = Ji(g1(r.checkType), a), ee = Ji(r.extendsType, a); + if (J === be || ee === be) + return be; + if (J === lt || ee === lt) + return lt; + const Se = f4(r.node.checkType), me = f4(r.node.extendsType), Ve = cAe(Se) && cAe(me) && Dr(Se.elements) === Dr(me.elements), mt = lAe(J, Ve); + let ht; + if (r.inferTypeParameters) { + const tr = O8( + r.inferTypeParameters, + /*signature*/ + void 0, + 0 + /* None */ + ); + a && (tr.nonFixingMapper = S2(tr.nonFixingMapper, a)), mt || Gh( + tr.inferences, + J, + ee, + 1536 + /* AlwaysStrict */ + ), ht = a ? S2(tr.mapper, a) : tr.mapper; + } + const er = ht ? Ji(r.extendsType, ht) : ee; + if (!mt && !lAe(er, Ve)) { + if (!(er.flags & 3) && (J.flags & 1 || !Bs(C8(J), C8(er)))) { + (J.flags & 1 || l && !(er.flags & 131072) && Hp(C8(er), (Rr) => Bs(Rr, C8(J)))) && (x || (x = [])).push(Ji(xi(r.node.trueType), ht || a)); + const tr = xi(r.node.falseType); + if (tr.flags & 16777216) { + const Rr = tr.root; + if (Rr.node.parent === r.node && (!Rr.isDistributive || Rr.checkType === r.checkType)) { + r = Rr; + continue; + } + if (R(tr, a)) + continue; + } + y = Ji(tr, a); + break; + } + if (er.flags & 3 || Bs(eT(J), eT(er))) { + const tr = xi(r.node.trueType), Rr = ht || a; + if (R(tr, Rr)) + continue; + y = Ji(tr, Rr); + break; + } + } + y = Yg( + 16777216 + /* Conditional */ + ), y.root = r, y.checkType = Ji(r.checkType, a), y.extendsType = Ji(r.extendsType, a), y.mapper = a, y.combinedMapper = ht, y.aliasSymbol = f || r.aliasSymbol, y.aliasTypeArguments = f ? m : th(r.aliasTypeArguments, a); + break; + } + return x ? Gn(Tr(x, y)) : y; + function R(J, ee) { + if (J.flags & 16777216 && ee) { + const Se = J.root; + if (Se.outerTypeParameters) { + const me = S2(J.mapper, ee), Ve = or(Se.outerTypeParameters, (er) => Q0(er, me)), mt = z_(Se.outerTypeParameters, Ve), ht = Se.isDistributive ? Q0(Se.checkType, mt) : void 0; + if (!ht || ht === Se.checkType || !(ht.flags & 1179648)) + return r = Se, a = mt, f = void 0, m = void 0, Se.aliasSymbol && I++, !0; + } + } + return !1; + } + } + function Uv(r) { + return r.resolvedTrueType || (r.resolvedTrueType = Ji(xi(r.root.node.trueType), r.mapper)); + } + function qv(r) { + return r.resolvedFalseType || (r.resolvedFalseType = Ji(xi(r.root.node.falseType), r.mapper)); + } + function Ret(r) { + return r.resolvedInferredTrueType || (r.resolvedInferredTrueType = r.combinedMapper ? Ji(xi(r.root.node.trueType), r.combinedMapper) : Uv(r)); + } + function ppe(r) { + let a; + return r.locals && r.locals.forEach((l) => { + l.flags & 262144 && (a = Tr(a, mo(l))); + }), a; + } + function jet(r) { + return r.isDistributive && (HL(r.checkType, r.node.trueType) || HL(r.checkType, r.node.falseType)); + } + function Bet(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = xi(r.checkType), f = Dk(r), m = tE(f), y = $6( + r, + /*includeThisTypes*/ + !0 + ), x = m ? y : Ln(y, (R) => HL(R, r)), I = { + node: r, + checkType: l, + extendsType: xi(r.extendsType), + isDistributive: !!(l.flags & 262144), + inferTypeParameters: ppe(r), + outerTypeParameters: x, + instantiations: void 0, + aliasSymbol: f, + aliasTypeArguments: m + }; + a.resolvedType = fpe( + I, + /*mapper*/ + void 0, + /*forConstraint*/ + !1 + ), x && (I.instantiations = /* @__PURE__ */ new Map(), I.instantiations.set(Up(x), a.resolvedType)); + } + return a.resolvedType; + } + function Jet(r) { + const a = bn(r); + return a.resolvedType || (a.resolvedType = Zg(xn(r.typeParameter))), a.resolvedType; + } + function uAe(r) { + return Re(r) ? [r] : Tr(uAe(r.left), r.right); + } + function _Ae(r) { + var a; + const l = bn(r); + if (!l.resolvedType) { + if (!a0(r)) + return We(r.argument, p.String_literal_expected), l.resolvedSymbol = nt, l.resolvedType = be; + const f = r.isTypeOf ? 111551 : r.flags & 16777216 ? 900095 : 788968, m = Ru(r, r.argument.literal); + if (!m) + return l.resolvedSymbol = nt, l.resolvedType = be; + const y = !!((a = m.exports) != null && a.get( + "export=" + /* ExportEquals */ + )), x = M_( + m, + /*dontResolveAlias*/ + !1 + ); + if (ic(r.qualifier)) + if (x.flags & f) + l.resolvedType = fAe(r, l, x, f); + else { + const I = f === 111551 ? p.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : p.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; + We(r, I, r.argument.literal.text), l.resolvedSymbol = nt, l.resolvedType = be; + } + else { + const I = uAe(r.qualifier); + let R = x, J; + for (; J = I.shift(); ) { + const ee = I.length ? 1920 : f, Se = Ma(bc(R)), me = r.isTypeOf || Qr(r) && y ? js( + Zr(Se), + J.escapedText, + /*skipObjectFunctionPropertyAugment*/ + !1, + /*includeTypeOnlyMembers*/ + !0 + ) : void 0, mt = (r.isTypeOf ? void 0 : x_(_f(Se), J.escapedText, ee)) ?? me; + if (!mt) + return We(J, p.Namespace_0_has_no_exported_member_1, Ky(R), ao(J)), l.resolvedType = be; + bn(J).resolvedSymbol = mt, bn(J.parent).resolvedSymbol = mt, R = mt; + } + l.resolvedType = fAe(r, l, R, f); + } + } + return l.resolvedType; + } + function fAe(r, a, l, f) { + const m = bc(l); + return a.resolvedSymbol = m, f === 111551 ? rIe(Zr(l), r) : CG(r, m); + } + function pAe(r) { + const a = bn(r); + if (!a.resolvedType) { + const l = Dk(r); + if (_1(r.symbol).size === 0 && !l) + a.resolvedType = Su; + else { + let f = yp(16, r.symbol); + f.aliasSymbol = l, f.aliasTypeArguments = tE(l), lS(r) && r.isArrayType && (f = cu(f)), a.resolvedType = f; + } + } + return a.resolvedType; + } + function Dk(r) { + let a = r.parent; + for (; nS(a) || nv(a) || K1(a) && a.operator === 148; ) + a = a.parent; + return m3(a) ? xn(a) : void 0; + } + function tE(r) { + return r ? U0(r) : void 0; + } + function NG(r) { + return !!(r.flags & 524288) && !B_(r); + } + function dpe(r) { + return Vh(r) || !!(r.flags & 474058748); + } + function mpe(r, a) { + if (!(r.flags & 1048576)) + return r; + if (Ri(r.types, dpe)) + return Nn(r.types, Vh) || bi; + const l = Nn(r.types, (y) => !dpe(y)); + if (!l || Nn(r.types, (y) => y !== l && !dpe(y))) + return r; + return m(l); + function m(y) { + const x = Ms(); + for (const R of Wa(y)) + if (!(sp(R) & 6)) { + if (IG(R)) { + const J = R.flags & 65536 && !(R.flags & 32768), Se = va(16777220, R.escapedName, Tfe(R) | (a ? 8 : 0)); + Se.links.type = J ? Ut : oi( + Zr(R), + /*isProperty*/ + !0 + ), Se.declarations = R.declarations, Se.links.nameType = Ni(R).nameType, Se.links.syntheticOrigin = R, x.set(R.escapedName, Se); + } + } + const I = ie(y.symbol, x, He, He, Bu(y)); + return I.objectFlags |= 131200, I; + } + } + function y2(r, a, l, f, m) { + if (r.flags & 1 || a.flags & 1) + return Ne; + if (r.flags & 2 || a.flags & 2) + return yt; + if (r.flags & 131072) + return a; + if (a.flags & 131072) + return r; + if (r = mpe(r, m), r.flags & 1048576) + return zL([r, a]) ? Ho(r, (J) => y2(J, a, l, f, m)) : be; + if (a = mpe(a, m), a.flags & 1048576) + return zL([r, a]) ? Ho(a, (J) => y2(r, J, l, f, m)) : be; + if (a.flags & 473960444) + return r; + if (YS(r) || YS(a)) { + if (Vh(r)) + return a; + if (r.flags & 2097152) { + const J = r.types, ee = J[J.length - 1]; + if (NG(ee) && NG(a)) + return Ys(Hi(J.slice(0, J.length - 1), [y2(ee, a, l, f, m)])); + } + return Ys([r, a]); + } + const y = Ms(), x = /* @__PURE__ */ new Set(), I = r === bi ? Bu(a) : $we([r, a]); + for (const J of Wa(a)) + sp(J) & 6 ? x.add(J.escapedName) : IG(J) && y.set(J.escapedName, gpe(J, m)); + for (const J of Wa(r)) + if (!(x.has(J.escapedName) || !IG(J))) + if (y.has(J.escapedName)) { + const ee = y.get(J.escapedName), Se = Zr(ee); + if (ee.flags & 16777216) { + const me = Hi(J.declarations, ee.declarations), Ve = 4 | J.flags & 16777216, mt = va(Ve, J.escapedName), ht = Zr(J), er = KG(ht), tr = KG(Se); + mt.links.type = er === tr ? ht : Gn( + [ht, tr], + 2 + /* Subtype */ + ), mt.links.leftSpread = J, mt.links.rightSpread = ee, mt.declarations = me, mt.links.nameType = Ni(J).nameType, y.set(J.escapedName, mt); + } + } else + y.set(J.escapedName, gpe(J, m)); + const R = ie(l, y, He, He, Zc(I, (J) => zet(J, m))); + return R.objectFlags |= 2228352 | f, R; + } + function IG(r) { + var a; + return !ut(r.declarations, Pu) && (!(r.flags & 106496) || !((a = r.declarations) != null && a.some((l) => Qn(l.parent)))); + } + function gpe(r, a) { + const l = r.flags & 65536 && !(r.flags & 32768); + if (!l && a === Hd(r)) + return r; + const f = 4 | r.flags & 16777216, m = va(f, r.escapedName, Tfe(r) | (a ? 8 : 0)); + return m.links.type = l ? Ut : Zr(r), m.declarations = r.declarations, m.links.nameType = Ni(r).nameType, m.links.syntheticOrigin = r, m; + } + function zet(r, a) { + return r.isReadonly !== a ? mg(r.keyType, r.type, a, r.declaration) : r; + } + function VL(r, a, l, f) { + const m = jd(r, l); + return m.value = a, m.regularType = f || m, m; + } + function Pk(r) { + if (r.flags & 2976) { + if (!r.freshType) { + const a = VL(r.flags, r.value, r.symbol, r); + a.freshType = a, r.freshType = a; + } + return r.freshType; + } + return r; + } + function Ju(r) { + return r.flags & 2976 ? r.regularType : r.flags & 1048576 ? r.regularType || (r.regularType = Ho(r, Ju)) : r; + } + function v2(r) { + return !!(r.flags & 2976) && r.freshType === r; + } + function D_(r) { + let a; + return wr.get(r) || (wr.set(r, a = VL(128, r)), a); + } + function pd(r) { + let a; + return Ss.get(r) || (Ss.set(r, a = VL(256, r)), a); + } + function OG(r) { + let a; + const l = Eb(r); + return Le.get(l) || (Le.set(l, a = VL(2048, r)), a); + } + function Wet(r, a, l) { + let f; + const m = `${a}${typeof r == "string" ? "@" : "#"}${r}`, y = 1024 | (typeof r == "string" ? 128 : 256); + return At.get(m) || (At.set(m, f = VL(y, r, l)), f); + } + function Vet(r) { + if (r.literal.kind === 106) + return he; + const a = bn(r); + return a.resolvedType || (a.resolvedType = Ju(qi(r.literal))), a.resolvedType; + } + function Uet(r) { + const a = jd(8192, r); + return a.escapedName = `__@${a.symbol.escapedName}@${$s(a.symbol)}`, a; + } + function hpe(r) { + if (Qr(r) && nv(r)) { + const a = hb(r); + a && (r = JT(a) || a); + } + if (FZ(r)) { + const a = p7(r) ? C_(r.left) : C_(r); + if (a) { + const l = Ni(a); + return l.uniqueESSymbolType || (l.uniqueESSymbolType = Uet(a)); + } + } + return Lr; + } + function qet(r) { + const a = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ), l = a && a.parent; + if (l && (Qn(l) || l.kind === 264) && !Os(a) && (!ec(a) || yb(r, a.body))) + return Yc(xn(l)).thisType; + if (l && Gs(l) && cn(l.parent) && mc(l.parent) === 6) + return Yc(C_(l.parent.left).parent).thisType; + const f = r.flags & 16777216 ? q1(r) : void 0; + return f && po(f) && cn(f.parent) && mc(f.parent) === 3 ? Yc(C_(f.parent.left).parent).thisType : Im(a) && yb(r, a.body) ? Yc(xn(a)).thisType : (We(r, p.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface), be); + } + function FG(r) { + const a = bn(r); + return a.resolvedType || (a.resolvedType = qet(r)), a.resolvedType; + } + function dAe(r) { + return xi(UL(r.type) || r.type); + } + function UL(r) { + switch (r.kind) { + case 196: + return UL(r.type); + case 189: + if (r.elements.length === 1 && (r = r.elements[0], r.kind === 191 || r.kind === 202 && r.dotDotDotToken)) + return UL(r.type); + break; + case 188: + return r.elementType; + } + } + function Het(r) { + const a = bn(r); + return a.resolvedType || (a.resolvedType = r.dotDotDotToken ? dAe(r) : oi( + xi(r.type), + /*isProperty*/ + !0, + !!r.questionToken + )); + } + function xi(r) { + return TKe(mAe(r), r); + } + function mAe(r) { + switch (r.kind) { + case 133: + case 312: + case 313: + return Ne; + case 159: + return yt; + case 154: + return we; + case 150: + return _e; + case 163: + return Te; + case 136: + return br; + case 155: + return Lr; + case 116: + return en; + case 157: + return Ut; + case 106: + return he; + case 146: + return fr; + case 151: + return r.flags & 524288 && !ne ? Ne : ur; + case 141: + return kt; + case 197: + case 110: + return FG(r); + case 201: + return Vet(r); + case 183: + return RL(r); + case 182: + return r.assertsModifier ? en : br; + case 233: + return RL(r); + case 186: + return E3e(r); + case 188: + case 189: + return ZKe(r); + case 190: + return ret(r); + case 192: + return fet(r); + case 193: + return bet(r); + case 314: + return xKe(r); + case 316: + return oi(xi(r.type)); + case 202: + return Het(r); + case 196: + case 315: + case 309: + return xi(r.type); + case 191: + return dAe(r); + case 318: + return Zct(r); + case 184: + case 185: + case 187: + case 322: + case 317: + case 323: + return pAe(r); + case 198: + return Eet(r); + case 199: + return oAe(r); + case 200: + return _pe(r); + case 194: + return Bet(r); + case 195: + return Jet(r); + case 203: + return Det(r); + case 205: + return _Ae(r); + case 80: + case 166: + case 211: + const a = kp(r); + return a ? mo(a) : be; + default: + return be; + } + } + function LG(r, a, l) { + if (r && r.length) + for (let f = 0; f < r.length; f++) { + const m = r[f], y = l(m, a); + if (m !== y) { + const x = f === 0 ? [] : r.slice(0, f); + for (x.push(y), f++; f < r.length; f++) + x.push(l(r[f], a)); + return x; + } + } + return r; + } + function th(r, a) { + return LG(r, a, Ji); + } + function MG(r, a) { + return LG(r, a, wk); + } + function gAe(r, a) { + return LG(r, a, stt); + } + function z_(r, a) { + return r.length === 1 ? b2(r[0], a ? a[0] : Ne) : Get(r, a); + } + function Q0(r, a) { + switch (a.kind) { + case 0: + return r === a.source ? a.target : r; + case 1: { + const f = a.sources, m = a.targets; + for (let y = 0; y < f.length; y++) + if (r === f[y]) + return m ? m[y] : Ne; + return r; + } + case 2: { + const f = a.sources, m = a.targets; + for (let y = 0; y < f.length; y++) + if (r === f[y]) + return m[y](); + return r; + } + case 3: + return a.func(r); + case 4: + case 5: + const l = Q0(r, a.mapper1); + return l !== r && a.kind === 4 ? Ji(l, a.mapper2) : Q0(l, a.mapper2); + } + } + function b2(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 0, source: r, target: a }); + } + function Get(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 1, sources: r, targets: a }); + } + function qL(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 3, func: r, debugInfo: E.isDebugging ? a : void 0 }); + } + function ype(r, a) { + return E.attachDebugPrototypeIfDebug({ kind: 2, sources: r, targets: a }); + } + function RG(r, a, l) { + return E.attachDebugPrototypeIfDebug({ kind: r, mapper1: a, mapper2: l }); + } + function hAe(r) { + return z_( + r, + /*targets*/ + void 0 + ); + } + function $et(r, a) { + const l = r.inferences.slice(a); + return z_(or(l, (f) => f.typeParameter), or(l, () => yt)); + } + function S2(r, a) { + return r ? RG(4, r, a) : a; + } + function Xet(r, a) { + return r ? RG(5, r, a) : a; + } + function KS(r, a, l) { + return l ? RG(5, b2(r, a), l) : b2(r, a); + } + function x8(r, a, l) { + return r ? RG(5, r, b2(a, l)) : b2(a, l); + } + function Qet(r) { + return !r.constraint && !xG(r) || r.constraint === Ka ? r : r.restrictiveInstantiation || (r.restrictiveInstantiation = ff(r.symbol), r.restrictiveInstantiation.constraint = Ka, r.restrictiveInstantiation); + } + function vpe(r) { + const a = ff(r.symbol); + return a.target = r, a; + } + function Yet(r, a) { + return g8(r.kind, r.parameterName, r.parameterIndex, Ji(r.type, a)); + } + function wk(r, a, l) { + let f; + if (r.typeParameters && !l) { + f = or(r.typeParameters, vpe), a = S2(z_(r.typeParameters, f), a); + for (const y of f) + y.mapper = a; + } + const m = Kg( + r.declaration, + f, + r.thisParameter && bpe(r.thisParameter, a), + LG(r.parameters, a, bpe), + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + r.minArgumentCount, + r.flags & 167 + /* PropagatingFlags */ + ); + return m.target = r, m.mapper = a, m; + } + function bpe(r, a) { + const l = Ni(r); + if (l.type && !S1(l.type) && (!(r.flags & 65536) || l.writeType && !S1(l.writeType))) + return r; + gc(r) & 1 && (r = l.target, a = S2(l.mapper, a)); + const f = va(r.flags, r.escapedName, 1 | gc(r) & 53256); + return f.declarations = r.declarations, f.parent = r.parent, f.links.target = r, f.links.mapper = a, r.valueDeclaration && (f.valueDeclaration = r.valueDeclaration), l.nameType && (f.links.nameType = l.nameType), f; + } + function Zet(r, a, l, f) { + const m = r.objectFlags & 4 || r.objectFlags & 8388608 ? r.node : r.symbol.declarations[0], y = bn(m), x = r.objectFlags & 4 ? y.resolvedType : r.objectFlags & 64 ? r.target : r; + let I = r.objectFlags & 134217728 ? r.outerTypeParameters : y.outerTypeParameters; + if (!I) { + let R = $6( + m, + /*includeThisTypes*/ + !0 + ); + if (Im(m)) { + const ee = _3e(m); + R = Bn(R, ee); + } + I = R || He; + const J = r.objectFlags & 8388612 ? [m] : r.symbol.declarations; + I = (x.objectFlags & 8388612 || x.symbol.flags & 8192 || x.symbol.flags & 2048) && !x.aliasTypeArguments ? Ln(I, (ee) => ut(J, (Se) => HL(ee, Se))) : I, y.outerTypeParameters = I; + } + if (I.length) { + const R = S2(r.mapper, a), J = or(I, (mt) => Q0(mt, R)), ee = l || r.aliasSymbol, Se = l ? f : th(r.aliasTypeArguments, a), me = (r.objectFlags & 134217728 ? "S" : "") + Up(J) + xk(ee, Se); + x.instantiations || (x.instantiations = /* @__PURE__ */ new Map(), x.instantiations.set(Up(I) + xk(x.aliasSymbol, x.aliasTypeArguments), x)); + let Ve = x.instantiations.get(me); + if (!Ve) { + if (r.objectFlags & 134217728) + return Ve = jG(r, a), x.instantiations.set(me, Ve), Ve; + const mt = z_(I, J); + Ve = x.objectFlags & 4 ? Wfe(r.target, r.node, mt, ee, Se) : x.objectFlags & 32 ? ett(x, mt, ee, Se) : jG(x, mt, ee, Se), x.instantiations.set(me, Ve); + const ht = wn(Ve); + if (Ve.flags & 3899393 && !(ht & 524288)) { + const er = ut(J, S1); + wn(Ve) & 524288 || (ht & 52 ? Ve.objectFlags |= 524288 | (er ? 1048576 : 0) : Ve.objectFlags |= er ? 0 : 524288); + } + } + return Ve; + } + return r; + } + function Ket(r) { + return !(r.parent.kind === 183 && r.parent.typeArguments && r === r.parent.typeName || r.parent.kind === 205 && r.parent.typeArguments && r === r.parent.qualifier); + } + function HL(r, a) { + if (r.symbol && r.symbol.declarations && r.symbol.declarations.length === 1) { + const f = r.symbol.declarations[0].parent; + for (let m = a; m !== f; m = m.parent) + if (!m || m.kind === 241 || m.kind === 194 && gs(m.extendsType, l)) + return !0; + return l(a); + } + return !0; + function l(f) { + switch (f.kind) { + case 197: + return !!r.isThisType; + case 80: + return !r.isThisType && em(f) && Ket(f) && mAe(f) === r; + case 186: + const m = f.exprName, y = tf(m); + if (!my(y)) { + const x = df(y), I = r.symbol.declarations[0], R = I.kind === 168 ? I.parent : ( + // Type parameter is a regular type parameter, e.g. foo + r.isThisType ? I : ( + // Type parameter is the this type, and its declaration is the class declaration. + void 0 + ) + ); + if (x.declarations && R) + return ut(x.declarations, (J) => yb(J, R)) || ut(f.typeArguments, l); + } + return !0; + case 174: + case 173: + return !f.type && !!f.body || ut(f.typeParameters, l) || ut(f.parameters, l) || !!f.type && l(f.type); + } + return !!gs(f, l); + } + } + function k8(r) { + const a = Xf(r); + if (a.flags & 4194304) { + const l = g1(a.type); + if (l.flags & 262144) + return l; + } + } + function ett(r, a, l, f) { + const m = k8(r); + if (m) { + const x = Ji(m, a); + if (m !== x) + return SNe(Wd(x), y, l, f); + } + return Ji(Xf(r), a) === lt ? lt : jG(r, a, l, f); + function y(x) { + if (x.flags & 61603843 && x !== lt && !Aa(x)) { + if (!r.declaration.nameType) { + let I; + if (xp(x) || x.flags & 1 && jv( + m, + 4 + /* ImmediateBaseConstraint */ + ) < 0 && (I = a_(m)) && V_(I, Gv)) + return rtt(x, r, KS(m, x, a)); + if (la(x)) + return ttt(x, r, m, a); + if (s3e(x)) + return Ys(or(x.types, y)); + } + return jG(r, KS(m, x, a)); + } + return x; + } + } + function yAe(r, a) { + return a & 1 ? !0 : a & 2 ? !1 : r; + } + function ttt(r, a, l, f) { + const m = r.target.elementFlags, y = r.target.fixedLength, x = y ? KS(l, r, f) : f, I = or(h2(r), (Se, me) => { + const Ve = m[me]; + return me < y ? vAe(a, D_("" + me), !!(Ve & 2), x) : Ve & 8 ? Ji(a, KS(l, Se, f)) : tM(Ji(a, KS(l, cu(Se), f))) ?? yt; + }), R = pg(a), J = R & 4 ? or(m, (Se) => Se & 1 ? 2 : Se) : R & 8 ? or(m, (Se) => Se & 2 ? 1 : Se) : m, ee = yAe(r.target.readonly, pg(a)); + return ls(I, be) ? be : gg(I, J, ee, r.target.labeledElementDeclarations); + } + function rtt(r, a, l) { + const f = vAe( + a, + _e, + /*isOptional*/ + !0, + l + ); + return Aa(f) ? be : cu(f, yAe(FP(r), pg(a))); + } + function vAe(r, a, l, f) { + const m = x8(f, Jd(r), a), y = Ji(Jh(r.target || r), m), x = pg(r); + return K && x & 4 && !Sc( + y, + 49152 + /* Void */ + ) ? b1( + y, + /*isProperty*/ + !0 + ) : K && x & 8 && l ? qp( + y, + 524288 + /* NEUndefined */ + ) : y; + } + function jG(r, a, l, f) { + E.assert(r.symbol, "anonymous type must have symbol to be instantiated"); + const m = yp(r.objectFlags & -1572865 | 64, r.symbol); + if (r.objectFlags & 32) { + m.declaration = r.declaration; + const y = Jd(r), x = vpe(y); + m.typeParameter = x, a = S2(b2(y, x), a), x.mapper = a; + } + return r.objectFlags & 8388608 && (m.node = r.node), r.objectFlags & 134217728 && (m.outerTypeParameters = r.outerTypeParameters), m.target = r, m.mapper = a, m.aliasSymbol = l || r.aliasSymbol, m.aliasTypeArguments = l ? f : th(r.aliasTypeArguments, a), m.objectFlags |= m.aliasTypeArguments ? ML(m.aliasTypeArguments) : 0, m; + } + function Spe(r, a, l, f, m) { + const y = r.root; + if (y.outerTypeParameters) { + const x = or(y.outerTypeParameters, (J) => Q0(J, a)), I = (l ? "C" : "") + Up(x) + xk(f, m); + let R = y.instantiations.get(I); + if (!R) { + const J = z_(y.outerTypeParameters, x), ee = y.checkType, Se = y.isDistributive ? Wd(Q0(ee, J)) : void 0; + R = Se && ee !== Se && Se.flags & 1179648 ? SNe(Se, (me) => fpe(y, KS(ee, me, J), l), f, m) : fpe(y, J, l, f, m), y.instantiations.set(I, R); + } + return R; + } + return r; + } + function Ji(r, a) { + return r && a ? bAe( + r, + a, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0 + ) : r; + } + function bAe(r, a, l, f) { + var m; + if (!S1(r)) + return r; + if (S === 100 || h >= 5e6) + return (m = rn) == null || m.instant(rn.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: r.id, instantiationDepth: S, instantiationCount: h }), We(C, p.Type_instantiation_is_excessively_deep_and_possibly_infinite), be; + g++, h++, S++; + const y = ntt(r, a, l, f); + return S--, y; + } + function ntt(r, a, l, f) { + const m = r.flags; + if (m & 262144) + return Q0(r, a); + if (m & 524288) { + const y = r.objectFlags; + if (y & 52) { + if (y & 4 && !r.node) { + const x = r.resolvedTypeArguments, I = th(x, a); + return I !== x ? tpe(r.target, I) : r; + } + return y & 1024 ? itt(r, a) : Zet(r, a, l, f); + } + return r; + } + if (m & 3145728) { + const y = r.flags & 1048576 ? r.origin : void 0, x = y && y.flags & 3145728 ? y.types : r.types, I = th(x, a); + if (I === x && l === r.aliasSymbol) + return r; + const R = l || r.aliasSymbol, J = l ? f : th(r.aliasTypeArguments, a); + return m & 2097152 || y && y.flags & 2097152 ? Ys(I, 0, R, J) : Gn(I, 1, R, J); + } + if (m & 4194304) + return Dm(Ji(r.type, a)); + if (m & 134217728) + return XS(r.texts, th(r.types, a)); + if (m & 268435456) + return Ck(r.symbol, Ji(r.type, a)); + if (m & 8388608) { + const y = l || r.aliasSymbol, x = l ? f : th(r.aliasTypeArguments, a); + return J_( + Ji(r.objectType, a), + Ji(r.indexType, a), + r.accessFlags, + /*accessNode*/ + void 0, + y, + x + ); + } + if (m & 16777216) + return Spe( + r, + S2(r.mapper, a), + /*forConstraint*/ + !1, + l, + f + ); + if (m & 33554432) { + const y = Ji(r.baseType, a); + if (eE(r)) + return Vfe(y); + const x = Ji(r.constraint, a); + return y.flags & 8650752 && Ek(x) ? qfe(y, x) : x.flags & 3 || Bs(eT(y), eT(x)) ? y : y.flags & 8650752 ? qfe(y, x) : Ys([x, y]); + } + return r; + } + function itt(r, a) { + const l = Ji(r.mappedType, a); + if (!(wn(l) & 32)) + return r; + const f = Ji(r.constraintType, a); + if (!(f.flags & 4194304)) + return r; + const m = ZAe( + Ji(r.source, a), + l, + f + ); + return m || r; + } + function C8(r) { + return r.flags & 402915327 ? r : r.permissiveInstantiation || (r.permissiveInstantiation = Ji(r, Ro)); + } + function eT(r) { + return r.flags & 402915327 ? r : (r.restrictiveInstantiation || (r.restrictiveInstantiation = Ji(r, $a), r.restrictiveInstantiation.restrictiveInstantiation = r.restrictiveInstantiation), r.restrictiveInstantiation); + } + function stt(r, a) { + return mg(r.keyType, Ji(r.type, a), r.isReadonly, r.declaration); + } + function Sp(r) { + switch (E.assert(r.kind !== 174 || Yp(r)), r.kind) { + case 218: + case 219: + case 174: + case 262: + return SAe(r); + case 210: + return ut(r.properties, Sp); + case 209: + return ut(r.elements, Sp); + case 227: + return Sp(r.whenTrue) || Sp(r.whenFalse); + case 226: + return (r.operatorToken.kind === 57 || r.operatorToken.kind === 61) && (Sp(r.left) || Sp(r.right)); + case 303: + return Sp(r.initializer); + case 217: + return Sp(r.expression); + case 292: + return ut(r.properties, Sp) || pm(r.parent) && ut(r.parent.parent.children, Sp); + case 291: { + const { initializer: a } = r; + return !!a && Sp(a); + } + case 294: { + const { expression: a } = r; + return !!a && Sp(a); + } + } + return !1; + } + function SAe(r) { + return k5(r) || att(r); + } + function att(r) { + return r.typeParameters || K_(r) || !r.body ? !1 : r.body.kind !== 241 ? Sp(r.body) : !!o0(r.body, (a) => !!a.expression && Sp(a.expression)); + } + function BG(r) { + return (Sy(r) || Yp(r)) && SAe(r); + } + function TAe(r) { + if (r.flags & 524288) { + const a = zd(r); + if (a.constructSignatures.length || a.callSignatures.length) { + const l = yp(16, r.symbol); + return l.members = a.members, l.properties = a.properties, l.callSignatures = He, l.constructSignatures = He, l.indexInfos = He, l; + } + } else if (r.flags & 2097152) + return Ys(or(r.types, TAe)); + return r; + } + function Wh(r, a) { + return Pm(r, a, Tf); + } + function E8(r, a) { + return Pm(r, a, Tf) ? -1 : 0; + } + function Tpe(r, a) { + return Pm(r, a, lf) ? -1 : 0; + } + function ott(r, a) { + return Pm(r, a, og) ? -1 : 0; + } + function h1(r, a) { + return Pm(r, a, og); + } + function GL(r, a) { + return Pm(r, a, qf); + } + function Bs(r, a) { + return Pm(r, a, lf); + } + function Hv(r, a) { + return r.flags & 1048576 ? Ri(r.types, (l) => Hv(l, a)) : a.flags & 1048576 ? ut(a.types, (l) => Hv(r, l)) : r.flags & 2097152 ? ut(r.types, (l) => Hv(l, a)) : r.flags & 58982400 ? Hv(Hl(r) || yt, a) : hg(a) ? !!(r.flags & 67633152) : a === Cl ? !!(r.flags & 67633152) && !hg(r) : a === kc ? !!(r.flags & 524288) && rde(r) : vk(r, G6(a)) || xp(a) && !FP(a) && Hv(r, Ct); + } + function JG(r, a) { + return Pm(r, a, r_); + } + function $L(r, a) { + return JG(r, a) || JG(a, r); + } + function xu(r, a, l, f, m, y) { + return Tp(r, a, lf, l, f, m, y); + } + function y1(r, a, l, f, m, y) { + return xpe( + r, + a, + lf, + l, + f, + m, + y, + /*errorOutputContainer*/ + void 0 + ); + } + function xpe(r, a, l, f, m, y, x, I) { + return Pm(r, a, l) ? !0 : !f || !D8(m, r, a, l, y, x, I) ? Tp(r, a, l, f, y, x, I) : !1; + } + function xAe(r) { + return !!(r.flags & 16777216 || r.flags & 2097152 && ut(r.types, xAe)); + } + function D8(r, a, l, f, m, y, x) { + if (!r || xAe(l)) return !1; + if (!Tp( + a, + l, + f, + /*errorNode*/ + void 0 + ) && ctt(r, a, l, f, m, y, x)) + return !0; + switch (r.kind) { + case 234: + if (!gJ(r)) + break; + case 294: + case 217: + return D8(r.expression, a, l, f, m, y, x); + case 226: + switch (r.operatorToken.kind) { + case 64: + case 28: + return D8(r.right, a, l, f, m, y, x); + } + break; + case 210: + return gtt(r, a, l, f, y, x); + case 209: + return dtt(r, a, l, f, y, x); + case 292: + return ptt(r, a, l, f, y, x); + case 219: + return ltt(r, a, l, f, y, x); + } + return !1; + } + function ctt(r, a, l, f, m, y, x) { + const I = xs( + a, + 0 + /* Call */ + ), R = xs( + a, + 1 + /* Construct */ + ); + for (const J of [R, I]) + if (ut(J, (ee) => { + const Se = Ha(ee); + return !(Se.flags & 131073) && Tp( + Se, + l, + f, + /*errorNode*/ + void 0 + ); + })) { + const ee = x || {}; + xu(a, l, r, m, y, ee); + const Se = ee.errors[ee.errors.length - 1]; + return Fs( + Se, + Xr( + r, + J === R ? p.Did_you_mean_to_use_new_with_this_expression : p.Did_you_mean_to_call_this_expression + ) + ), !0; + } + return !1; + } + function ltt(r, a, l, f, m, y) { + if (ms(r.body) || ut(r.parameters, XI)) + return !1; + const x = uT(a); + if (!x) + return !1; + const I = xs( + l, + 0 + /* Call */ + ); + if (!Dr(I)) + return !1; + const R = r.body, J = Ha(x), ee = Gn(or(I, Ha)); + if (!Tp( + J, + ee, + f, + /*errorNode*/ + void 0 + )) { + const Se = R && D8( + R, + J, + ee, + f, + /*headMessage*/ + void 0, + m, + y + ); + if (Se) + return Se; + const me = y || {}; + if (Tp( + J, + ee, + f, + R, + /*headMessage*/ + void 0, + m, + me + ), me.errors) + return l.symbol && Dr(l.symbol.declarations) && Fs( + me.errors[me.errors.length - 1], + Xr( + l.symbol.declarations[0], + p.The_expected_type_comes_from_the_return_type_of_this_signature + ) + ), !(jc(r) & 2) && !Xc(J, "then") && Tp( + IM(J), + ee, + f, + /*errorNode*/ + void 0 + ) && Fs( + me.errors[me.errors.length - 1], + Xr( + r, + p.Did_you_mean_to_mark_this_function_as_async + ) + ), !0; + } + return !1; + } + function kAe(r, a, l) { + const f = m1(a, l); + if (f) + return f; + if (a.flags & 1048576) { + const m = IAe(r, a); + if (m) + return m1(m, l); + } + } + function CAe(r, a) { + gM( + r, + a, + /*isCache*/ + !1 + ); + const l = UP( + r, + 1 + /* Contextual */ + ); + return j8(), l; + } + function XL(r, a, l, f, m, y) { + let x = !1; + for (const I of r) { + const { errorNode: R, innerExpression: J, nameType: ee, errorMessage: Se } = I; + let me = kAe(a, l, ee); + if (!me || me.flags & 8388608) continue; + let Ve = m1(a, ee); + if (!Ve) continue; + const mt = wG( + ee, + /*accessNode*/ + void 0 + ); + if (!Tp( + Ve, + me, + f, + /*errorNode*/ + void 0 + )) { + const ht = J && D8( + J, + Ve, + me, + f, + /*headMessage*/ + void 0, + m, + y + ); + if (x = !0, !ht) { + const er = y || {}, tr = J ? CAe(J, Ve) : Ve; + if (H && WG(tr, me)) { + const Rr = Xr(R, p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, Ur(tr), Ur(me)); + La.add(Rr), er.errors = [Rr]; + } else { + const Rr = !!(mt && (js(l, mt) || nt).flags & 16777216), vn = !!(mt && (js(a, mt) || nt).flags & 16777216); + me = Hh(me, Rr), Ve = Hh(Ve, Rr && vn), Tp(tr, me, f, R, Se, m, er) && tr !== Ve && Tp(Ve, me, f, R, Se, m, er); + } + if (er.errors) { + const Rr = er.errors[er.errors.length - 1], vn = Fp(ee) ? Lp(ee) : void 0, cr = vn !== void 0 ? js(l, vn) : void 0; + let Cr = !1; + if (!cr) { + const Fr = m8(l, ee); + Fr && Fr.declaration && !xr(Fr.declaration).hasNoDefaultLib && (Cr = !0, Fs(Rr, Xr(Fr.declaration, p.The_expected_type_comes_from_this_index_signature))); + } + if (!Cr && (cr && Dr(cr.declarations) || l.symbol && Dr(l.symbol.declarations))) { + const Fr = cr && Dr(cr.declarations) ? cr.declarations[0] : l.symbol.declarations[0]; + xr(Fr).hasNoDefaultLib || Fs( + Rr, + Xr( + Fr, + p.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, + vn && !(ee.flags & 8192) ? Pi(vn) : Ur(ee), + Ur(l) + ) + ); + } + } + } + } + } + return x; + } + function utt(r, a, l, f, m, y) { + const x = Jc(l, XG), I = Jc(l, (ee) => !XG(ee)), R = I !== fr ? vme( + 13, + 0, + I, + /*errorNode*/ + void 0 + ) : void 0; + let J = !1; + for (let ee = r.next(); !ee.done; ee = r.next()) { + const { errorNode: Se, innerExpression: me, nameType: Ve, errorMessage: mt } = ee.value; + let ht = R; + const er = x !== fr ? kAe(a, x, Ve) : void 0; + if (er && !(er.flags & 8388608) && (ht = R ? Gn([R, er]) : er), !ht) continue; + let tr = m1(a, Ve); + if (!tr) continue; + const Rr = wG( + Ve, + /*accessNode*/ + void 0 + ); + if (!Tp( + tr, + ht, + f, + /*errorNode*/ + void 0 + )) { + const vn = me && D8( + me, + tr, + ht, + f, + /*headMessage*/ + void 0, + m, + y + ); + if (J = !0, !vn) { + const cr = y || {}, Cr = me ? CAe(me, tr) : tr; + if (H && WG(Cr, ht)) { + const Fr = Xr(Se, p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, Ur(Cr), Ur(ht)); + La.add(Fr), cr.errors = [Fr]; + } else { + const Fr = !!(Rr && (js(x, Rr) || nt).flags & 16777216), En = !!(Rr && (js(a, Rr) || nt).flags & 16777216); + ht = Hh(ht, Fr), tr = Hh(tr, Fr && En), Tp(Cr, ht, f, Se, mt, m, cr) && Cr !== tr && Tp(tr, ht, f, Se, mt, m, cr); + } + } + } + } + return J; + } + function* _tt(r) { + if (Dr(r.properties)) + for (const a of r.properties) + Sx(a) || Tde(H3(a.name)) || (yield { errorNode: a.name, innerExpression: a.initializer, nameType: D_(H3(a.name)) }); + } + function* ftt(r, a) { + if (!Dr(r.children)) return; + let l = 0; + for (let f = 0; f < r.children.length; f++) { + const m = r.children[f], y = pd(f - l), x = EAe(m, y, a); + x ? yield x : l++; + } + } + function EAe(r, a, l) { + switch (r.kind) { + case 294: + return { errorNode: r, innerExpression: r.expression, nameType: a }; + case 12: + if (r.containsOnlyTriviaWhiteSpaces) + break; + return { errorNode: r, innerExpression: void 0, nameType: a, errorMessage: l() }; + case 284: + case 285: + case 288: + return { errorNode: r, innerExpression: r, nameType: a }; + default: + return E.assertNever(r, "Found invalid jsx child"); + } + } + function ptt(r, a, l, f, m, y) { + let x = XL(_tt(r), a, l, f, m, y), I; + if (pm(r.parent) && jg(r.parent.parent)) { + const J = r.parent.parent, ee = yM(cT(r)), Se = ee === void 0 ? "children" : Pi(ee), me = D_(Se), Ve = J_(l, me), mt = gC(J.children); + if (!Dr(mt)) + return x; + const ht = Dr(mt) > 1; + let er, tr; + if (Yfe( + /*reportErrors*/ + !1 + ) !== ea) { + const vn = R3e(Ne); + er = Jc(Ve, (cr) => Bs(cr, vn)), tr = Jc(Ve, (cr) => !Bs(cr, vn)); + } else + er = Jc(Ve, XG), tr = Jc(Ve, (vn) => !XG(vn)); + if (ht) { + if (er !== fr) { + const vn = gg(T$( + J, + 0 + /* Normal */ + )), cr = ftt(J, R); + x = utt(cr, vn, er, f, m, y) || x; + } else if (!Pm(J_(a, me), Ve, f)) { + x = !0; + const vn = We( + J.openingElement.tagName, + p.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, + Se, + Ur(Ve) + ); + y && y.skipLogging && (y.errors || (y.errors = [])).push(vn); + } + } else if (tr !== fr) { + const vn = mt[0], cr = EAe(vn, me, R); + cr && (x = XL( + function* () { + yield cr; + }(), + a, + l, + f, + m, + y + ) || x); + } else if (!Pm(J_(a, me), Ve, f)) { + x = !0; + const vn = We( + J.openingElement.tagName, + p.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, + Se, + Ur(Ve) + ); + y && y.skipLogging && (y.errors || (y.errors = [])).push(vn); + } + } + return x; + function R() { + if (!I) { + const J = sc(r.parent.tagName), ee = yM(cT(r)), Se = ee === void 0 ? "children" : Pi(ee), me = J_(l, D_(Se)), Ve = p._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; + I = { ...Ve, key: "!!ALREADY FORMATTED!!", message: YT(Ve, J, Se, Ur(me)) }; + } + return I; + } + } + function* DAe(r, a) { + const l = Dr(r.elements); + if (l) + for (let f = 0; f < l; f++) { + if (LP(a) && !js(a, "" + f)) continue; + const m = r.elements[f]; + if (ml(m)) continue; + const y = pd(f), x = A$(m); + yield { errorNode: x, innerExpression: x, nameType: y }; + } + } + function dtt(r, a, l, f, m, y) { + if (l.flags & 402915324) return !1; + if (LP(a)) + return XL(DAe(r, l), a, l, f, m, y); + gM( + r, + l, + /*isCache*/ + !1 + ); + const x = i8e( + r, + 1, + /*forceTuple*/ + !0 + ); + return j8(), LP(x) ? XL(DAe(r, l), x, l, f, m, y) : !1; + } + function* mtt(r) { + if (Dr(r.properties)) + for (const a of r.properties) { + if (Bg(a)) continue; + const l = kk( + xn(a), + 8576 + /* StringOrNumberLiteralOrUnique */ + ); + if (!(!l || l.flags & 131072)) + switch (a.kind) { + case 178: + case 177: + case 174: + case 304: + yield { errorNode: a.name, innerExpression: void 0, nameType: l }; + break; + case 303: + yield { errorNode: a.name, innerExpression: a.initializer, nameType: l, errorMessage: qw(a.name) ? p.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; + break; + default: + E.assertNever(a); + } + } + } + function gtt(r, a, l, f, m, y) { + return l.flags & 402915324 ? !1 : XL(mtt(r), a, l, f, m, y); + } + function PAe(r, a, l, f, m) { + return Tp(r, a, r_, l, f, m); + } + function htt(r, a, l) { + return kpe( + r, + a, + l ? 4 : 0, + /*reportErrors*/ + !1, + /*errorReporter*/ + void 0, + /*incompatibleErrorReporter*/ + void 0, + Tpe, + /*reportUnreliableMarkers*/ + void 0 + ) !== 0; + } + function zG(r) { + if (!r.typeParameters && (!r.thisParameter || Ea(wM(r.thisParameter))) && r.parameters.length === 1 && gu(r)) { + const a = wM(r.parameters[0]); + return !!((xp(a) ? Po(a)[0] : a).flags & 131073 && Ha(r).flags & 3); + } + return !1; + } + function kpe(r, a, l, f, m, y, x, I) { + if (r === a || !(l & 16 && zG(r)) && zG(a)) + return -1; + if (l & 16 && zG(r) && !zG(a)) + return 0; + const R = U_(a); + if (!yg(a) && (l & 8 ? yg(r) || U_(r) > R : Om(r) > R)) + return f && !(l & 8) && m(p.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1, Om(r), R), 0; + r.typeParameters && r.typeParameters !== a.typeParameters && (a = dKe(a), r = M8e( + r, + a, + /*inferenceContext*/ + void 0, + x + )); + const ee = U_(r), Se = V8(r), me = V8(a); + (Se || me) && Ji(Se || me, I); + const Ve = a.declaration ? a.declaration.kind : 0, mt = !(l & 3) && X && Ve !== 174 && Ve !== 173 && Ve !== 176; + let ht = -1; + const er = Vv(r); + if (er && er !== en) { + const vn = Vv(a); + if (vn) { + const cr = !mt && x( + er, + vn, + /*reportErrors*/ + !1 + ) || x(vn, er, f); + if (!cr) + return f && m(p.The_this_types_of_each_signature_are_incompatible), 0; + ht &= cr; + } + } + const tr = Se || me ? Math.min(ee, R) : Math.max(ee, R), Rr = Se || me ? tr - 1 : -1; + for (let vn = 0; vn < tr; vn++) { + const cr = vn === Rr ? aIe(r, vn) : C2(r, vn), Cr = vn === Rr ? aIe(a, vn) : C2(a, vn); + if (cr && Cr && (cr !== Cr || l & 8)) { + const Fr = l & 3 || F8e(r, vn) ? void 0 : uT(qh(cr)), En = l & 3 || F8e(a, vn) ? void 0 : uT(qh(Cr)); + let jn = Fr && En && !bp(Fr) && !bp(En) && nE( + cr, + 50331648 + /* IsUndefinedOrNull */ + ) === nE( + Cr, + 50331648 + /* IsUndefinedOrNull */ + ) ? kpe(En, Fr, l & 8 | (mt ? 2 : 1), f, m, y, x, I) : !(l & 3) && !mt && x( + cr, + Cr, + /*reportErrors*/ + !1 + ) || x(Cr, cr, f); + if (jn && l & 8 && vn >= Om(r) && vn < Om(a) && x( + cr, + Cr, + /*reportErrors*/ + !1 + ) && (jn = 0), !jn) + return f && m(p.Types_of_parameters_0_and_1_are_incompatible, Pi(zP(r, vn)), Pi(zP(a, vn))), 0; + ht &= jn; + } + } + if (!(l & 4)) { + const vn = vG(a) ? Ne : a.declaration && Im(a.declaration) ? Yc(Ma(a.declaration.symbol)) : Ha(a); + if (vn === en || vn === Ne) + return ht; + const cr = vG(r) ? Ne : r.declaration && Im(r.declaration) ? Yc(Ma(r.declaration.symbol)) : Ha(r), Cr = bp(a); + if (Cr) { + const Fr = bp(r); + if (Fr) + ht &= ytt(Fr, Cr, f, m, x); + else if (MZ(Cr) || RZ(Cr)) + return f && m(p.Signature_0_must_be_a_type_predicate, km(r)), 0; + } else + ht &= l & 1 && x( + vn, + cr, + /*reportErrors*/ + !1 + ) || x(cr, vn, f), !ht && f && y && y(cr, vn); + } + return ht; + } + function ytt(r, a, l, f, m) { + if (r.kind !== a.kind) + return l && (f(p.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard), f(p.Type_predicate_0_is_not_assignable_to_1, Mv(r), Mv(a))), 0; + if ((r.kind === 1 || r.kind === 3) && r.parameterIndex !== a.parameterIndex) + return l && (f(p.Parameter_0_is_not_in_the_same_position_as_parameter_1, r.parameterName, a.parameterName), f(p.Type_predicate_0_is_not_assignable_to_1, Mv(r), Mv(a))), 0; + const y = r.type === a.type ? -1 : r.type && a.type ? m(r.type, a.type, l) : 0; + return y === 0 && l && f(p.Type_predicate_0_is_not_assignable_to_1, Mv(r), Mv(a)), y; + } + function vtt(r, a) { + const l = y8(r), f = y8(a), m = Ha(l), y = Ha(f); + return y === en || Pm(y, m, lf) || Pm(m, y, lf) ? htt( + l, + f, + /*ignoreReturnTypes*/ + !0 + ) : !1; + } + function Cpe(r) { + return r !== wo && r.properties.length === 0 && r.callSignatures.length === 0 && r.constructSignatures.length === 0 && r.indexInfos.length === 0; + } + function Vh(r) { + return r.flags & 524288 ? !B_(r) && Cpe(zd(r)) : r.flags & 67108864 ? !0 : r.flags & 1048576 ? ut(r.types, Vh) : r.flags & 2097152 ? Ri(r.types, Vh) : !1; + } + function hg(r) { + return !!(wn(r) & 16 && (r.members && Cpe(r) || r.symbol && r.symbol.flags & 2048 && _1(r.symbol).size === 0)); + } + function btt(r) { + if (K && r.flags & 1048576) { + if (!(r.objectFlags & 33554432)) { + const a = r.types; + r.objectFlags |= 33554432 | (a.length >= 3 && a[0].flags & 32768 && a[1].flags & 65536 && ut(a, hg) ? 67108864 : 0); + } + return !!(r.objectFlags & 67108864); + } + return !1; + } + function rE(r) { + return !!((r.flags & 1048576 ? r.types[0] : r).flags & 32768); + } + function wAe(r) { + return r.flags & 524288 && !B_(r) && Wa(r).length === 0 && Bu(r).length === 1 && !!eh(r, we) || r.flags & 3145728 && Ri(r.types, wAe) || !1; + } + function Epe(r, a, l) { + const f = r.flags & 8 ? s_(r) : r, m = a.flags & 8 ? s_(a) : a; + if (f === m) + return !0; + if (f.escapedName !== m.escapedName || !(f.flags & 256) || !(m.flags & 256)) + return !1; + const y = $s(f) + "," + $s(m), x = Gg.get(y); + if (x !== void 0 && !(!(x & 4) && x & 2 && l)) + return !!(x & 1); + const I = Zr(m); + for (const R of Wa(Zr(f))) + if (R.flags & 8) { + const J = js(I, R.escapedName); + if (!J || !(J.flags & 8)) + return l ? (l(p.Property_0_is_missing_in_type_1, uc(R), Ur( + mo(m), + /*enclosingDeclaration*/ + void 0, + 64 + /* UseFullyQualifiedType */ + )), Gg.set( + y, + 6 + /* Reported */ + )) : Gg.set( + y, + 2 + /* Failed */ + ), !1; + const ee = pT(Jo( + R, + 306 + /* EnumMember */ + )).value, Se = pT(Jo( + J, + 306 + /* EnumMember */ + )).value; + if (ee !== Se) { + const me = typeof ee == "string", Ve = typeof Se == "string"; + if (ee !== void 0 && Se !== void 0) { + if (!l) + Gg.set( + y, + 2 + /* Failed */ + ); + else { + const mt = me ? `"${$m(ee)}"` : ee, ht = Ve ? `"${$m(Se)}"` : Se; + l(p.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, uc(m), uc(J), ht, mt), Gg.set( + y, + 6 + /* Reported */ + ); + } + return !1; + } + if (me || Ve) { + if (!l) + Gg.set( + y, + 2 + /* Failed */ + ); + else { + const mt = ee ?? Se; + E.assert(typeof mt == "string"); + const ht = `"${$m(mt)}"`; + l(p.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, uc(m), uc(J), ht), Gg.set( + y, + 6 + /* Reported */ + ); + } + return !1; + } + } + } + return Gg.set( + y, + 1 + /* Succeeded */ + ), !0; + } + function P8(r, a, l, f) { + const m = r.flags, y = a.flags; + return y & 1 || m & 131072 || r === lt || y & 2 && !(l === qf && m & 1) ? !0 : y & 131072 ? !1 : !!(m & 402653316 && y & 4 || m & 128 && m & 1024 && y & 128 && !(y & 1024) && r.value === a.value || m & 296 && y & 8 || m & 256 && m & 1024 && y & 256 && !(y & 1024) && r.value === a.value || m & 2112 && y & 64 || m & 528 && y & 16 || m & 12288 && y & 4096 || m & 32 && y & 32 && r.symbol.escapedName === a.symbol.escapedName && Epe(r.symbol, a.symbol, f) || m & 1024 && y & 1024 && (m & 1048576 && y & 1048576 && Epe(r.symbol, a.symbol, f) || m & 2944 && y & 2944 && r.value === a.value && Epe(r.symbol, a.symbol, f)) || m & 32768 && (!K && !(y & 3145728) || y & 49152) || m & 65536 && (!K && !(y & 3145728) || y & 65536) || m & 524288 && y & 67108864 && !(l === qf && hg(r) && !(wn(r) & 8192)) || (l === lf || l === r_) && (m & 1 || m & 8 && (y & 32 || y & 256 && y & 1024) || m & 256 && !(m & 1024) && (y & 32 || y & 256 && y & 1024 && r.value === a.value) || btt(a))); + } + function Pm(r, a, l) { + if (v2(r) && (r = r.regularType), v2(a) && (a = a.regularType), r === a) + return !0; + if (l !== Tf) { + if (l === r_ && !(a.flags & 131072) && P8(a, r, l) || P8(r, a, l)) + return !0; + } else if (!((r.flags | a.flags) & 61865984)) { + if (r.flags !== a.flags) return !1; + if (r.flags & 67358815) return !0; + } + if (r.flags & 524288 && a.flags & 524288) { + const f = l.get(qG( + r, + a, + 0, + l, + /*ignoreConstraints*/ + !1 + )); + if (f !== void 0) + return !!(f & 1); + } + return r.flags & 469499904 || a.flags & 469499904 ? Tp( + r, + a, + l, + /*errorNode*/ + void 0 + ) : !1; + } + function AAe(r, a) { + return wn(r) & 2048 && Tde(a.escapedName); + } + function QL(r, a) { + for (; ; ) { + const l = v2(r) ? r.regularType : v1(r) ? xtt(r, a) : wn(r) & 4 ? r.node ? H0(r.target, Po(r)) : Fpe(r) || r : r.flags & 3145728 ? Stt(r, a) : r.flags & 33554432 ? a ? r.baseType : Hfe(r) : r.flags & 25165824 ? zh(r, a) : r; + if (l === r) return l; + r = l; + } + } + function Stt(r, a) { + const l = Wd(r); + if (l !== r) + return l; + if (r.flags & 2097152 && Ttt(r)) { + const f = Zc(r.types, (m) => QL(m, a)); + if (f !== r.types) + return Ys(f); + } + return r; + } + function Ttt(r) { + let a = !1, l = !1; + for (const f of r.types) + if (a || (a = !!(f.flags & 465829888)), l || (l = !!(f.flags & 98304) || hg(f)), a && l) return !0; + return !1; + } + function xtt(r, a) { + const l = h2(r), f = Zc(l, (m) => m.flags & 25165824 ? zh(m, a) : m); + return l !== f ? rpe(r.target, f) : r; + } + function Tp(r, a, l, f, m, y, x) { + var I; + let R, J, ee, Se, me, Ve, mt = 0, ht = 0, er = 0, tr = 0, Rr = !1, vn = 0, cr = 0, Cr, Fr, En = 16e6 - l.size >> 3; + E.assert(l !== Tf || !f, "no error reporting in identity checking"); + const Rn = pn( + r, + a, + 3, + /*reportErrors*/ + !!f, + m + ); + if (Fr && xa(), Rr) { + const Je = qG( + r, + a, + /*intersectionState*/ + 0, + l, + /*ignoreConstraints*/ + !1 + ); + l.set( + Je, + 6 + /* Failed */ + ), (I = rn) == null || I.instant(rn.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: r.id, targetId: a.id, depth: ht, targetDepth: er }); + const Ze = En <= 0 ? p.Excessive_complexity_comparing_types_0_and_1 : p.Excessive_stack_depth_comparing_types_0_and_1, Et = We(f || C, Ze, Ur(r), Ur(a)); + x && (x.errors || (x.errors = [])).push(Et); + } else if (R) { + if (y) { + const Et = y(); + Et && (qK(Et, R), R = Et); + } + let Je; + if (m && f && !Rn && r.symbol) { + const Et = Ni(r.symbol); + if (Et.originatingImport && !hf(Et.originatingImport) && Tp( + Zr(Et.target), + a, + l, + /*errorNode*/ + void 0 + )) { + const Zt = Xr(Et.originatingImport, p.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead); + Je = Tr(Je, Zt); + } + } + const Ze = wg(xr(f), f, R, Je); + J && Fs(Ze, ...J), x && (x.errors || (x.errors = [])).push(Ze), (!x || !x.skipLogging) && La.add(Ze); + } + return f && x && x.skipLogging && Rn === 0 && E.assert(!!x.errors, "missed opportunity to interact with error."), Rn !== 0; + function jn(Je) { + R = Je.errorInfo, Cr = Je.lastSkippedInfo, Fr = Je.incompatibleStack, vn = Je.overrideNextErrorInfo, cr = Je.skipParentCounter, J = Je.relatedInfo; + } + function qs() { + return { + errorInfo: R, + lastSkippedInfo: Cr, + incompatibleStack: Fr?.slice(), + overrideNextErrorInfo: vn, + skipParentCounter: cr, + relatedInfo: J?.slice() + }; + } + function ks(Je, ...Ze) { + vn++, Cr = void 0, (Fr || (Fr = [])).push([Je, ...Ze]); + } + function xa() { + const Je = Fr || []; + Fr = void 0; + const Ze = Cr; + if (Cr = void 0, Je.length === 1) { + is(...Je[0]), Ze && dc( + /*message*/ + void 0, + ...Ze + ); + return; + } + let Et = ""; + const Ye = []; + for (; Je.length; ) { + const [Zt, ...Jt] = Je.pop(); + switch (Zt.code) { + case p.Types_of_property_0_are_incompatible.code: { + Et.indexOf("new ") === 0 && (Et = `(${Et})`); + const pt = "" + Jt[0]; + Et.length === 0 ? Et = `${pt}` : X_(pt, pa(F)) ? Et = `${Et}.${pt}` : pt[0] === "[" && pt[pt.length - 1] === "]" ? Et = `${Et}${pt}` : Et = `${Et}[${pt}]`; + break; + } + case p.Call_signature_return_types_0_and_1_are_incompatible.code: + case p.Construct_signature_return_types_0_and_1_are_incompatible.code: + case p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: + case p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: { + if (Et.length === 0) { + let pt = Zt; + Zt.code === p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? pt = p.Call_signature_return_types_0_and_1_are_incompatible : Zt.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code && (pt = p.Construct_signature_return_types_0_and_1_are_incompatible), Ye.unshift([pt, Jt[0], Jt[1]]); + } else { + const pt = Zt.code === p.Construct_signature_return_types_0_and_1_are_incompatible.code || Zt.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : "", $t = Zt.code === p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || Zt.code === p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "..."; + Et = `${pt}${Et}(${$t})`; + } + break; + } + case p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code: { + Ye.unshift([p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, Jt[0], Jt[1]]); + break; + } + case p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code: { + Ye.unshift([p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, Jt[0], Jt[1], Jt[2]]); + break; + } + default: + return E.fail(`Unhandled Diagnostic: ${Zt.code}`); + } + } + Et ? is( + Et[Et.length - 1] === ")" ? p.The_types_returned_by_0_are_incompatible_between_these_types : p.The_types_of_0_are_incompatible_between_these_types, + Et + ) : Ye.shift(); + for (const [Zt, ...Jt] of Ye) { + const pt = Zt.elidedInCompatabilityPyramid; + Zt.elidedInCompatabilityPyramid = !1, is(Zt, ...Jt), Zt.elidedInCompatabilityPyramid = pt; + } + Ze && dc( + /*message*/ + void 0, + ...Ze + ); + } + function is(Je, ...Ze) { + E.assert(!!f), Fr && xa(), !Je.elidedInCompatabilityPyramid && (cr === 0 ? R = us(R, Je, ...Ze) : cr--); + } + function $o(Je, ...Ze) { + is(Je, ...Ze), cr++; + } + function Xl(Je) { + E.assert(!!R), J ? J.push(Je) : J = [Je]; + } + function dc(Je, Ze, Et) { + Fr && xa(); + const [Ye, Zt] = pk(Ze, Et); + let Jt = Ze, pt = Ye; + if (w8(Ze) && !Dpe(Et) && (Jt = Uh(Ze), E.assert(!Bs(Jt, Et), "generalized source shouldn't be assignable"), pt = dk(Jt)), (Et.flags & 8388608 && !(Ze.flags & 8388608) ? Et.objectType.flags : Et.flags) & 262144 && Et !== y_ && Et !== Ao) { + const Ir = Hl(Et); + let Gt; + Ir && (Bs(Jt, Ir) || (Gt = Bs(Ze, Ir))) ? is( + p._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, + Gt ? Ye : pt, + Zt, + Ur(Ir) + ) : (R = void 0, is( + p._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1, + Zt, + pt + )); + } + if (Je) + Je === p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1 && H && NAe(Ze, Et).length && (Je = p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties); + else if (l === r_) + Je = p.Type_0_is_not_comparable_to_type_1; + else if (Ye === Zt) + Je = p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated; + else if (H && NAe(Ze, Et).length) + Je = p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties; + else { + if (Ze.flags & 128 && Et.flags & 1048576) { + const Ir = Lit(Ze, Et); + if (Ir) { + is(p.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, pt, Zt, Ur(Ir)); + return; + } + } + Je = p.Type_0_is_not_assignable_to_type_1; + } + is(Je, pt, Zt); + } + function Sr(Je, Ze) { + const Et = V6(Je.symbol) ? Ur(Je, Je.symbol.valueDeclaration) : Ur(Je), Ye = V6(Ze.symbol) ? Ur(Ze, Ze.symbol.valueDeclaration) : Ur(Ze); + (Jr === Je && we === Ze || Vi === Je && _e === Ze || ha === Je && br === Ze || I3e() === Je && Lr === Ze) && is(p._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, Ye, Et); + } + function Br(Je, Ze, Et) { + return la(Je) ? Je.target.readonly && eM(Ze) ? (Et && is(p.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, Ur(Je), Ur(Ze)), !1) : Gv(Ze) : FP(Je) && eM(Ze) ? (Et && is(p.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, Ur(Je), Ur(Ze)), !1) : la(Ze) ? xp(Je) : !0; + } + function ki(Je, Ze, Et) { + return pn(Je, Ze, 3, Et); + } + function pn(Je, Ze, Et = 3, Ye = !1, Zt, Jt = 0) { + if (Je === Ze) return -1; + if (Je.flags & 524288 && Ze.flags & 402784252) + return l === r_ && !(Ze.flags & 131072) && P8(Ze, Je, l) || P8(Je, Ze, l, Ye ? is : void 0) ? -1 : (Ye && Mi(Je, Ze, Je, Ze, Zt), 0); + const pt = QL( + Je, + /*writing*/ + !1 + ); + let $t = QL( + Ze, + /*writing*/ + !0 + ); + if (pt === $t) return -1; + if (l === Tf) + return pt.flags !== $t.flags ? 0 : pt.flags & 67358815 ? -1 : (Va(pt, $t), YP( + pt, + $t, + /*reportErrors*/ + !1, + 0, + Et + )); + if (pt.flags & 262144 && qS(pt) === $t) + return -1; + if (pt.flags & 470302716 && $t.flags & 1048576) { + const Ir = $t.types, Gt = Ir.length === 2 && Ir[0].flags & 98304 ? Ir[1] : Ir.length === 3 && Ir[0].flags & 98304 && Ir[1].flags & 98304 ? Ir[2] : void 0; + if (Gt && !(Gt.flags & 98304) && ($t = QL( + Gt, + /*writing*/ + !0 + ), pt === $t)) + return -1; + } + if (l === r_ && !($t.flags & 131072) && P8($t, pt, l) || P8(pt, $t, l, Ye ? is : void 0)) return -1; + if (pt.flags & 469499904 || $t.flags & 469499904) { + if (!(Jt & 2) && Qv(pt) && wn(pt) & 8192 && lu(pt, $t, Ye)) + return Ye && dc(Zt, pt, Ze.aliasSymbol ? Ze : $t), 0; + const Gt = (l !== r_ || Vd(pt)) && !(Jt & 2) && pt.flags & 405405692 && pt !== Cl && $t.flags & 2621440 && wpe($t) && (Wa(pt).length > 0 || iX(pt)), Hr = !!(wn(pt) & 2048); + if (Gt && !Ctt(pt, $t, Hr)) { + if (Ye) { + const Un = Ur(Je.aliasSymbol ? Je : pt), Fn = Ur(Ze.aliasSymbol ? Ze : $t), As = xs( + pt, + 0 + /* Call */ + ), zs = xs( + pt, + 1 + /* Construct */ + ); + As.length > 0 && pn( + Ha(As[0]), + $t, + 1, + /*reportErrors*/ + !1 + ) || zs.length > 0 && pn( + Ha(zs[0]), + $t, + 1, + /*reportErrors*/ + !1 + ) ? is(p.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it, Un, Fn) : is(p.Type_0_has_no_properties_in_common_with_type_1, Un, Fn); + } + return 0; + } + Va(pt, $t); + const Wr = pt.flags & 1048576 && pt.types.length < 4 && !($t.flags & 1048576) || $t.flags & 1048576 && $t.types.length < 4 && !(pt.flags & 469499904) ? ku(pt, $t, Ye, Jt) : YP(pt, $t, Ye, Jt, Et); + if (Wr) + return Wr; + } + return Ye && Mi(Je, Ze, pt, $t, Zt), 0; + } + function Mi(Je, Ze, Et, Ye, Zt) { + var Jt, pt; + const $t = !!Fpe(Je), Ir = !!Fpe(Ze); + Et = Je.aliasSymbol || $t ? Je : Et, Ye = Ze.aliasSymbol || Ir ? Ze : Ye; + let Gt = vn > 0; + if (Gt && vn--, Et.flags & 524288 && Ye.flags & 524288) { + const Hr = R; + Br( + Et, + Ye, + /*reportErrors*/ + !0 + ), R !== Hr && (Gt = !!R); + } + if (Et.flags & 524288 && Ye.flags & 402784252) + Sr(Et, Ye); + else if (Et.symbol && Et.flags & 524288 && Cl === Et) + is(p.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); + else if (wn(Et) & 2048 && Ye.flags & 2097152) { + const Hr = Ye.types, Pn = k2(Ff.IntrinsicAttributes, f), Wr = k2(Ff.IntrinsicClassAttributes, f); + if (!Aa(Pn) && !Aa(Wr) && (ls(Hr, Pn) || ls(Hr, Wr))) + return; + } else + R = Afe(R, Ze); + if (!Zt && Gt) { + const Hr = qs(); + dc(Zt, Et, Ye); + let Pn; + R && R !== Hr.errorInfo && (Pn = { code: R.code, messageText: R.messageText }), jn(Hr), Pn && R && (R.canonicalHead = Pn), Cr = [Et, Ye]; + return; + } + if (dc(Zt, Et, Ye), Et.flags & 262144 && ((pt = (Jt = Et.symbol) == null ? void 0 : Jt.declarations) != null && pt[0]) && !qS(Et)) { + const Hr = vpe(Et); + if (Hr.constraint = Ji(Ye, b2(Et, Hr)), IL(Hr)) { + const Pn = Ur(Ye, Et.symbol.declarations[0]); + Xl(Xr(Et.symbol.declarations[0], p.This_type_parameter_might_need_an_extends_0_constraint, Pn)); + } + } + } + function Va(Je, Ze) { + if (rn && Je.flags & 3145728 && Ze.flags & 3145728) { + const Et = Je, Ye = Ze; + if (Et.objectFlags & Ye.objectFlags & 32768) + return; + const Zt = Et.types.length, Jt = Ye.types.length; + Zt * Jt > 1e6 && rn.instant(rn.Phase.CheckTypes, "traceUnionsOrIntersectionsTooLarge_DepthLimit", { + sourceId: Je.id, + sourceSize: Zt, + targetId: Ze.id, + targetSize: Jt, + pos: f?.pos, + end: f?.end + }); + } + } + function Ra(Je, Ze) { + return Gn(Eu( + Je, + (Ye, Zt) => { + var Jt; + Zt = ju(Zt); + const pt = Zt.flags & 3145728 ? OL(Zt, Ze) : d2(Zt, Ze), $t = pt && Zr(pt) || ((Jt = Tk(Zt, Ze)) == null ? void 0 : Jt.type) || Ut; + return Tr(Ye, $t); + }, + /*initial*/ + void 0 + ) || He); + } + function lu(Je, Ze, Et) { + var Ye; + if (!J8(Ze) || !ne && wn(Ze) & 4096) + return !1; + const Zt = !!(wn(Je) & 2048); + if ((l === lf || l === r_) && (jP(Cl, Ze) || !Zt && Vh(Ze))) + return !1; + let Jt = Ze, pt; + Ze.flags & 1048576 && (Jt = n5e(Je, Ze, pn) || zut(Ze), pt = Jt.flags & 1048576 ? Jt.types : [Jt]); + for (const $t of Wa(Je)) + if (Js($t, Je.symbol) && !AAe(Je, $t)) { + if (!k$(Jt, $t.escapedName, Zt)) { + if (Et) { + const Ir = Jc(Jt, J8); + if (!f) return E.fail(); + if (Mb(f) || ru(f) || ru(f.parent)) { + $t.valueDeclaration && dm($t.valueDeclaration) && xr(f) === xr($t.valueDeclaration.name) && (f = $t.valueDeclaration.name); + const Gt = Si($t), Hr = E8e(Gt, Ir), Pn = Hr ? Si(Hr) : void 0; + Pn ? is(p.Property_0_does_not_exist_on_type_1_Did_you_mean_2, Gt, Ur(Ir), Pn) : is(p.Property_0_does_not_exist_on_type_1, Gt, Ur(Ir)); + } else { + const Gt = ((Ye = Je.symbol) == null ? void 0 : Ye.declarations) && ul(Je.symbol.declarations); + let Hr; + if ($t.valueDeclaration && sr($t.valueDeclaration, (Pn) => Pn === Gt) && xr(Gt) === xr(f)) { + const Pn = $t.valueDeclaration; + E.assertNode(Pn, lh); + const Wr = Pn.name; + f = Wr, Re(Wr) && (Hr = D8e(Wr, Ir)); + } + Hr !== void 0 ? $o(p.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, Si($t), Ur(Ir), Hr) : $o(p.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, Si($t), Ur(Ir)); + } + } + return !0; + } + if (pt && !pn(Zr($t), Ra(pt, $t.escapedName), 3, Et)) + return Et && ks(p.Types_of_property_0_are_incompatible, Si($t)), !0; + } + return !1; + } + function Js(Je, Ze) { + return Je.valueDeclaration && Ze.valueDeclaration && Je.valueDeclaration.parent === Ze.valueDeclaration; + } + function ku(Je, Ze, Et, Ye) { + if (Je.flags & 1048576) { + if (Ze.flags & 1048576) { + const Zt = Je.origin; + if (Zt && Zt.flags & 2097152 && Ze.aliasSymbol && ls(Zt.types, Ze)) + return -1; + const Jt = Ze.origin; + if (Jt && Jt.flags & 1048576 && Je.aliasSymbol && ls(Jt.types, Je)) + return -1; + } + return l === r_ ? Tc(Je, Ze, Et && !(Je.flags & 402784252), Ye) : Qh(Je, Ze, Et && !(Je.flags & 402784252), Ye); + } + if (Ze.flags & 1048576) + return Qo(I8(Je), Ze, Et && !(Je.flags & 402784252) && !(Ze.flags & 402784252), Ye); + if (Ze.flags & 2097152) + return Yf( + Je, + Ze, + Et, + 2 + /* Target */ + ); + if (l === r_ && Ze.flags & 402784252) { + const Zt = Zc(Je.types, (Jt) => Jt.flags & 465829888 ? Hl(Jt) || yt : Jt); + if (Zt !== Je.types) { + if (Je = Ys(Zt), Je.flags & 131072) + return 0; + if (!(Je.flags & 2097152)) + return pn( + Je, + Ze, + 1, + /*reportErrors*/ + !1 + ) || pn( + Ze, + Je, + 1, + /*reportErrors*/ + !1 + ); + } + } + return Tc( + Je, + Ze, + /*reportErrors*/ + !1, + 1 + /* Source */ + ); + } + function Xo(Je, Ze) { + let Et = -1; + const Ye = Je.types; + for (const Zt of Ye) { + const Jt = Qo( + Zt, + Ze, + /*reportErrors*/ + !1, + 0 + /* None */ + ); + if (!Jt) + return 0; + Et &= Jt; + } + return Et; + } + function Qo(Je, Ze, Et, Ye) { + const Zt = Ze.types; + if (Ze.flags & 1048576) { + if ($0(Zt, Je)) + return -1; + if (l !== r_ && wn(Ze) & 32768 && !(Je.flags & 1024) && (Je.flags & 2688 || (l === og || l === qf) && Je.flags & 256)) { + const pt = Je === Je.regularType ? Je.freshType : Je.regularType, $t = Je.flags & 128 ? we : Je.flags & 256 ? _e : Je.flags & 2048 ? Te : void 0; + return $t && $0(Zt, $t) || pt && $0(Zt, pt) ? -1 : 0; + } + const Jt = cNe(Ze, Je); + if (Jt) { + const pt = pn( + Je, + Jt, + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + ); + if (pt) + return pt; + } + } + for (const Jt of Zt) { + const pt = pn( + Je, + Jt, + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + ); + if (pt) + return pt; + } + if (Et) { + const Jt = IAe(Je, Ze, pn); + Jt && pn( + Je, + Jt, + 2, + /*reportErrors*/ + !0, + /*headMessage*/ + void 0, + Ye + ); + } + return 0; + } + function Yf(Je, Ze, Et, Ye) { + let Zt = -1; + const Jt = Ze.types; + for (const pt of Jt) { + const $t = pn( + Je, + pt, + 2, + Et, + /*headMessage*/ + void 0, + Ye + ); + if (!$t) + return 0; + Zt &= $t; + } + return Zt; + } + function Tc(Je, Ze, Et, Ye) { + const Zt = Je.types; + if (Je.flags & 1048576 && $0(Zt, Ze)) + return -1; + const Jt = Zt.length; + for (let pt = 0; pt < Jt; pt++) { + const $t = pn( + Zt[pt], + Ze, + 1, + Et && pt === Jt - 1, + /*headMessage*/ + void 0, + Ye + ); + if ($t) + return $t; + } + return 0; + } + function zc(Je, Ze) { + return Je.flags & 1048576 && Ze.flags & 1048576 && !(Je.types[0].flags & 32768) && Ze.types[0].flags & 32768 ? BP( + Ze, + -32769 + /* Undefined */ + ) : Ze; + } + function Qh(Je, Ze, Et, Ye) { + let Zt = -1; + const Jt = Je.types, pt = zc(Je, Ze); + for (let $t = 0; $t < Jt.length; $t++) { + const Ir = Jt[$t]; + if (pt.flags & 1048576 && Jt.length >= pt.types.length && Jt.length % pt.types.length === 0) { + const Hr = pn( + Ir, + pt.types[$t % pt.types.length], + 3, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + ); + if (Hr) { + Zt &= Hr; + continue; + } + } + const Gt = pn( + Ir, + Ze, + 1, + Et, + /*headMessage*/ + void 0, + Ye + ); + if (!Gt) + return 0; + Zt &= Gt; + } + return Zt; + } + function dE(Je = He, Ze = He, Et = He, Ye, Zt) { + if (Je.length !== Ze.length && l === Tf) + return 0; + const Jt = Je.length <= Ze.length ? Je.length : Ze.length; + let pt = -1; + for (let $t = 0; $t < Jt; $t++) { + const Ir = $t < Et.length ? Et[$t] : 1, Gt = Ir & 7; + if (Gt !== 4) { + const Hr = Je[$t], Pn = Ze[$t]; + let Wr = -1; + if (Ir & 8 ? Wr = l === Tf ? pn( + Hr, + Pn, + 3, + /*reportErrors*/ + !1 + ) : E8(Hr, Pn) : Gt === 1 ? Wr = pn( + Hr, + Pn, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ) : Gt === 2 ? Wr = pn( + Pn, + Hr, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ) : Gt === 3 ? (Wr = pn( + Pn, + Hr, + 3, + /*reportErrors*/ + !1 + ), Wr || (Wr = pn( + Hr, + Pn, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ))) : (Wr = pn( + Hr, + Pn, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ), Wr && (Wr &= pn( + Pn, + Hr, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ))), !Wr) + return 0; + pt &= Wr; + } + } + return pt; + } + function YP(Je, Ze, Et, Ye, Zt) { + var Jt, pt, $t; + if (Rr) + return 0; + const Ir = qG( + Je, + Ze, + Ye, + l, + /*ignoreConstraints*/ + !1 + ), Gt = l.get(Ir); + if (Gt !== void 0 && !(Et && Gt & 2 && !(Gt & 4))) { + if (ga) { + const zs = Gt & 24; + zs & 8 && Ji(Je, Li), zs & 16 && Ji(Je, Co); + } + return Gt & 1 ? -1 : 0; + } + if (En <= 0) + return Rr = !0, 0; + if (!ee) + ee = [], Se = /* @__PURE__ */ new Set(), me = [], Ve = []; + else { + if (Se.has(Ir)) + return 3; + const zs = Ir.startsWith("*") ? qG( + Je, + Ze, + Ye, + l, + /*ignoreConstraints*/ + !0 + ) : void 0; + if (zs && Se.has(zs)) + return 3; + if (ht === 100 || er === 100) + return Rr = !0, 0; + } + const Hr = mt; + ee[mt] = Ir, Se.add(Ir), mt++; + const Pn = tr; + Zt & 1 && (me[ht] = Je, ht++, !(tr & 1) && Nk(Je, me, ht) && (tr |= 1)), Zt & 2 && (Ve[er] = Ze, er++, !(tr & 2) && Nk(Ze, Ve, er) && (tr |= 2)); + let Wr, Un = 0; + ga && (Wr = ga, ga = (zs) => (Un |= zs ? 16 : 8, Wr(zs))); + let Fn; + return tr === 3 ? ((Jt = rn) == null || Jt.instant(rn.Phase.CheckTypes, "recursiveTypeRelatedTo_DepthLimit", { + sourceId: Je.id, + sourceIdStack: me.map((zs) => zs.id), + targetId: Ze.id, + targetIdStack: Ve.map((zs) => zs.id), + depth: ht, + targetDepth: er + }), Fn = 3) : ((pt = rn) == null || pt.push(rn.Phase.CheckTypes, "structuredTypeRelatedTo", { sourceId: Je.id, targetId: Ze.id }), Fn = nI(Je, Ze, Et, Ye), ($t = rn) == null || $t.pop()), ga && (ga = Wr), Zt & 1 && ht--, Zt & 2 && er--, tr = Pn, Fn ? (Fn === -1 || ht === 0 && er === 0) && As( + Fn === -1 || Fn === 3 + ) : (l.set(Ir, (Et ? 4 : 0) | 2 | Un), En--, As( + /*markAllAsSucceeded*/ + !1 + )), Fn; + function As(zs) { + for (let So = Hr; So < mt; So++) + Se.delete(ee[So]), zs && (l.set(ee[So], 1 | Un), En--); + mt = Hr; + } + } + function nI(Je, Ze, Et, Ye) { + const Zt = qs(); + let Jt = XM(Je, Ze, Et, Ye, Zt); + if (l !== Tf) { + if (!Jt && (Je.flags & 2097152 || Je.flags & 262144 && Ze.flags & 1048576)) { + const pt = YZe(Je.flags & 2097152 ? Je.types : [Je], !!(Ze.flags & 1048576)); + pt && V_(pt, ($t) => $t !== Je) && (Jt = pn( + pt, + Ze, + 1, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + )); + } + Jt && !(Ye & 2) && Ze.flags & 2097152 && !YS(Ze) && Je.flags & 2621440 ? (Jt &= Hs( + Je, + Ze, + Et, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !1, + 0 + /* None */ + ), Jt && Qv(Je) && wn(Je) & 8192 && (Jt &= Bi( + Je, + Ze, + /*sourceIsPrimitive*/ + !1, + Et, + 0 + /* None */ + ))) : Jt && NG(Ze) && !Gv(Ze) && Je.flags & 2097152 && ju(Je).flags & 3670016 && !ut(Je.types, (pt) => pt === Ze || !!(wn(pt) & 262144)) && (Jt &= Hs( + Je, + Ze, + Et, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !0, + Ye + )); + } + return Jt && jn(Zt), Jt; + } + function uu(Je, Ze) { + const Et = ju(p2(Ze)), Ye = []; + return xfe( + Et, + 8576, + /*stringsOnly*/ + !1, + (Zt) => void Ye.push(Ji(Je, x8(Ze.mapper, Jd(Ze), Zt))) + ), Gn(Ye); + } + function XM(Je, Ze, Et, Ye, Zt) { + let Jt, pt, $t = !1, Ir = Je.flags; + const Gt = Ze.flags; + if (l === Tf) { + if (Ir & 3145728) { + let Wr = Xo(Je, Ze); + return Wr && (Wr &= Xo(Ze, Je)), Wr; + } + if (Ir & 4194304) + return pn( + Je.type, + Ze.type, + 3, + /*reportErrors*/ + !1 + ); + if (Ir & 8388608 && (Jt = pn( + Je.objectType, + Ze.objectType, + 3, + /*reportErrors*/ + !1 + )) && (Jt &= pn( + Je.indexType, + Ze.indexType, + 3, + /*reportErrors*/ + !1 + )) || Ir & 16777216 && Je.root.isDistributive === Ze.root.isDistributive && (Jt = pn( + Je.checkType, + Ze.checkType, + 3, + /*reportErrors*/ + !1 + )) && (Jt &= pn( + Je.extendsType, + Ze.extendsType, + 3, + /*reportErrors*/ + !1 + )) && (Jt &= pn( + Uv(Je), + Uv(Ze), + 3, + /*reportErrors*/ + !1 + )) && (Jt &= pn( + qv(Je), + qv(Ze), + 3, + /*reportErrors*/ + !1 + )) || Ir & 33554432 && (Jt = pn( + Je.baseType, + Ze.baseType, + 3, + /*reportErrors*/ + !1 + )) && (Jt &= pn( + Je.constraint, + Ze.constraint, + 3, + /*reportErrors*/ + !1 + ))) + return Jt; + if (!(Ir & 524288)) + return 0; + } else if (Ir & 3145728 || Gt & 3145728) { + if (Jt = ku(Je, Ze, Et, Ye)) + return Jt; + if (!(Ir & 465829888 || Ir & 524288 && Gt & 1048576 || Ir & 2097152 && Gt & 467402752)) + return 0; + } + if (Ir & 17301504 && Je.aliasSymbol && Je.aliasTypeArguments && Je.aliasSymbol === Ze.aliasSymbol && !(VG(Je) || VG(Ze))) { + const Wr = OAe(Je.aliasSymbol); + if (Wr === He) + return 1; + const Un = Ni(Je.aliasSymbol).typeParameters, Fn = Em(Un), As = p1(Je.aliasTypeArguments, Un, Fn, Qr(Je.aliasSymbol.valueDeclaration)), zs = p1(Ze.aliasTypeArguments, Un, Fn, Qr(Je.aliasSymbol.valueDeclaration)), So = Pn(As, zs, Wr, Ye); + if (So !== void 0) + return So; + } + if (VAe(Je) && !Je.target.readonly && (Jt = pn( + Po(Je)[0], + Ze, + 1 + /* Source */ + )) || VAe(Ze) && (Ze.target.readonly || eM(Hl(Je) || Je)) && (Jt = pn( + Je, + Po(Ze)[0], + 2 + /* Target */ + ))) + return Jt; + if (Gt & 262144) { + if (wn(Je) & 32 && !Je.declaration.nameType && pn( + Dm(Ze), + Xf(Je), + 3 + /* Both */ + ) && !(pg(Je) & 4)) { + const Wr = Jh(Je), Un = J_(Ze, Jd(Je)); + if (Jt = pn(Wr, Un, 3, Et)) + return Jt; + } + if (l === r_ && Ir & 262144) { + let Wr = a_(Je); + if (Wr) + for (; Wr && Hp(Wr, (Un) => !!(Un.flags & 262144)); ) { + if (Jt = pn( + Wr, + Ze, + 1, + /*reportErrors*/ + !1 + )) + return Jt; + Wr = a_(Wr); + } + return 0; + } + } else if (Gt & 4194304) { + const Wr = Ze.type; + if (Ir & 4194304 && (Jt = pn( + Wr, + Je.type, + 3, + /*reportErrors*/ + !1 + ))) + return Jt; + if (la(Wr)) { + if (Jt = pn(Je, z3e(Wr), 2, Et)) + return Jt; + } else { + const Un = kfe(Wr); + if (Un) { + if (pn(Je, Dm( + Un, + Ze.indexFlags | 4 + /* NoReducibleCheck */ + ), 2, Et) === -1) + return -1; + } else if (B_(Wr)) { + const Fn = q0(Wr), As = Xf(Wr); + let zs; + if (Fn && Q6(Wr)) { + const So = uu(Fn, Wr); + zs = Gn([So, Fn]); + } else + zs = Fn || As; + if (pn(Je, zs, 2, Et) === -1) + return -1; + } + } + } else if (Gt & 8388608) { + if (Ir & 8388608) { + if ((Jt = pn(Je.objectType, Ze.objectType, 3, Et)) && (Jt &= pn(Je.indexType, Ze.indexType, 3, Et)), Jt) + return Jt; + Et && (pt = R); + } + if (l === lf || l === r_) { + const Wr = Ze.objectType, Un = Ze.indexType, Fn = Hl(Wr) || Wr, As = Hl(Un) || Un; + if (!YS(Fn) && !ZS(As)) { + const zs = 4 | (Fn !== Wr ? 2 : 0), So = m1(Fn, As, zs); + if (So) { + if (Et && pt && jn(Zt), Jt = pn( + Je, + So, + 2, + Et, + /*headMessage*/ + void 0, + Ye + )) + return Jt; + Et && pt && R && (R = Hr([pt]) <= Hr([R]) ? pt : R); + } + } + } + Et && (pt = void 0); + } else if (B_(Ze) && l !== Tf) { + const Wr = !!Ze.declaration.nameType, Un = Jh(Ze), Fn = pg(Ze); + if (!(Fn & 8)) { + if (!Wr && Un.flags & 8388608 && Un.objectType === Je && Un.indexType === Jd(Ze)) + return -1; + if (!B_(Je)) { + const As = Wr ? q0(Ze) : Xf(Ze), zs = Dm( + Je, + 2 + /* NoIndexSignatures */ + ), So = Fn & 4, c_ = So ? wL(As, zs) : void 0; + if (So ? !(c_.flags & 131072) : pn( + As, + zs, + 3 + /* Both */ + )) { + const mf = Jh(Ze), k1 = Jd(Ze), Kv = BP( + mf, + -98305 + /* Nullable */ + ); + if (!Wr && Kv.flags & 8388608 && Kv.indexType === k1) { + if (Jt = pn(Je, Kv.objectType, 2, Et)) + return Jt; + } else { + const w2 = Wr ? c_ || As : c_ ? Ys([c_, k1]) : k1, Fm = J_(Je, w2); + if (Jt = pn(Fm, mf, 3, Et)) + return Jt; + } + } + pt = R, jn(Zt); + } + } + } else if (Gt & 16777216) { + if (Nk(Ze, Ve, er, 10)) + return 3; + const Wr = Ze; + if (!Wr.root.inferTypeParameters && !jet(Wr.root) && !(Je.flags & 16777216 && Je.root === Wr.root)) { + const Un = !Bs(C8(Wr.checkType), C8(Wr.extendsType)), Fn = !Un && Bs(eT(Wr.checkType), eT(Wr.extendsType)); + if ((Jt = Un ? -1 : pn( + Je, + Uv(Wr), + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + )) && (Jt &= Fn ? -1 : pn( + Je, + qv(Wr), + 2, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + ), Jt)) + return Jt; + } + } else if (Gt & 134217728) { + if (Ir & 134217728) { + if (l === r_) + return _rt(Je, Ze) ? 0 : -1; + Ji(Je, Co); + } + if (a$(Je, Ze)) + return -1; + } else if (Ze.flags & 268435456 && !(Je.flags & 268435456) && s$(Je, Ze)) + return -1; + if (Ir & 8650752) { + if (!(Ir & 8388608 && Gt & 8388608)) { + const Wr = qS(Je) || yt; + if (Jt = pn( + Wr, + Ze, + 1, + /*reportErrors*/ + !1, + /*headMessage*/ + void 0, + Ye + )) + return Jt; + if (Jt = pn( + pf(Wr, Je), + Ze, + 1, + Et && Wr !== yt && !(Gt & Ir & 262144), + /*headMessage*/ + void 0, + Ye + )) + return Jt; + if (Pfe(Je)) { + const Un = qS(Je.indexType); + if (Un && (Jt = pn(J_(Je.objectType, Un), Ze, 1, Et))) + return Jt; + } + } + } else if (Ir & 4194304) { + const Wr = cpe(Je.type, Je.indexFlags) && wn(Je.type) & 32; + if (Jt = pn(Or, Ze, 1, Et && !Wr)) + return Jt; + if (Wr) { + const Un = Je.type, Fn = q0(Un), As = Fn && Q6(Un) ? uu(Fn, Un) : Fn || Xf(Un); + if (Jt = pn(As, Ze, 1, Et)) + return Jt; + } + } else if (Ir & 134217728 && !(Gt & 524288)) { + if (!(Gt & 134217728)) { + const Wr = Hl(Je); + if (Wr && Wr !== Je && (Jt = pn(Wr, Ze, 1, Et))) + return Jt; + } + } else if (Ir & 268435456) + if (Gt & 268435456) { + if (Je.symbol !== Ze.symbol) + return 0; + if (Jt = pn(Je.type, Ze.type, 3, Et)) + return Jt; + } else { + const Wr = Hl(Je); + if (Wr && (Jt = pn(Wr, Ze, 1, Et))) + return Jt; + } + else if (Ir & 16777216) { + if (Nk(Je, me, ht, 10)) + return 3; + if (Gt & 16777216) { + const Fn = Je.root.inferTypeParameters; + let As = Je.extendsType, zs; + if (Fn) { + const So = O8( + Fn, + /*signature*/ + void 0, + 0, + ki + ); + Gh( + So.inferences, + Ze.extendsType, + As, + 1536 + /* AlwaysStrict */ + ), As = Ji(As, So.mapper), zs = So.mapper; + } + if (Wh(As, Ze.extendsType) && (pn( + Je.checkType, + Ze.checkType, + 3 + /* Both */ + ) || pn( + Ze.checkType, + Je.checkType, + 3 + /* Both */ + )) && ((Jt = pn(Ji(Uv(Je), zs), Uv(Ze), 3, Et)) && (Jt &= pn(qv(Je), qv(Ze), 3, Et)), Jt)) + return Jt; + } + const Wr = Cfe(Je); + if (Wr && (Jt = pn(Wr, Ze, 1, Et))) + return Jt; + const Un = !(Gt & 16777216) && IL(Je) ? e3e(Je) : void 0; + if (Un && (jn(Zt), Jt = pn(Un, Ze, 1, Et))) + return Jt; + } else { + if (l !== og && l !== qf && UZe(Ze) && Vh(Je)) + return -1; + if (B_(Ze)) + return B_(Je) && (Jt = Dt(Je, Ze, Et)) ? Jt : 0; + const Wr = !!(Ir & 402784252); + if (l !== Tf) + Je = ju(Je), Ir = Je.flags; + else if (B_(Je)) + return 0; + if (wn(Je) & 4 && wn(Ze) & 4 && Je.target === Ze.target && !la(Je) && !(VG(Je) || VG(Ze))) { + if ($G(Je)) + return -1; + const Un = Ape(Je.target); + if (Un === He) + return 1; + const Fn = Pn(Po(Je), Po(Ze), Un, Ye); + if (Fn !== void 0) + return Fn; + } else { + if (FP(Ze) ? V_(Je, Gv) : xp(Ze) && V_(Je, (Un) => la(Un) && !Un.target.readonly)) + return l !== Tf ? pn(Wv(Je, _e) || Ne, Wv(Ze, _e) || Ne, 3, Et) : 0; + if (v1(Je) && la(Ze) && !v1(Ze)) { + const Un = dg(Je); + if (Un !== Je) + return pn(Un, Ze, 1, Et); + } else if ((l === og || l === qf) && Vh(Ze) && wn(Ze) & 8192 && !Vh(Je)) + return 0; + } + if (Ir & 2621440 && Gt & 524288) { + const Un = Et && R === Zt.errorInfo && !Wr; + if (Jt = Hs( + Je, + Ze, + Un, + /*excludedProperties*/ + void 0, + /*optionalsOnly*/ + !1, + Ye + ), Jt && (Jt &= Ce(Je, Ze, 0, Un, Ye), Jt && (Jt &= Ce(Je, Ze, 1, Un, Ye), Jt && (Jt &= Bi(Je, Ze, Wr, Un, Ye)))), $t && Jt) + R = pt || R || Zt.errorInfo; + else if (Jt) + return Jt; + } + if (Ir & 2621440 && Gt & 1048576) { + const Un = BP( + Ze, + 36175872 + /* Substitution */ + ); + if (Un.flags & 1048576) { + const Fn = ar(Je, Un); + if (Fn) + return Fn; + } + } + } + return 0; + function Hr(Wr) { + return Wr ? Eu(Wr, (Un, Fn) => Un + 1 + Hr(Fn.next), 0) : 0; + } + function Pn(Wr, Un, Fn, As) { + if (Jt = dE(Wr, Un, Fn, Et, As)) + return Jt; + if (ut(Fn, (So) => !!(So & 24))) { + pt = void 0, jn(Zt); + return; + } + const zs = Un && Ett(Un, Fn); + if ($t = !zs, Fn !== He && !zs) { + if ($t && !(Et && ut( + Fn, + (So) => (So & 7) === 0 + /* Invariant */ + ))) + return 0; + pt = R, jn(Zt); + } + } + } + function Dt(Je, Ze, Et) { + if (l === r_ || (l === Tf ? pg(Je) === pg(Ze) : DP(Je) <= DP(Ze))) { + let Zt; + const Jt = Xf(Ze), pt = Ji(Xf(Je), DP(Je) < 0 ? Li : Co); + if (Zt = pn(Jt, pt, 3, Et)) { + const $t = z_([Jd(Je)], [Jd(Ze)]); + if (Ji(q0(Je), $t) === Ji(q0(Ze), $t)) + return Zt & pn(Ji(Jh(Je), $t), Jh(Ze), 3, Et); + } + } + return 0; + } + function ar(Je, Ze) { + var Et; + const Ye = Wa(Je), Zt = oNe(Ye, Ze); + if (!Zt) return 0; + let Jt = 1; + for (const Pn of Zt) + if (Jt *= Jrt(u1(Pn)), Jt > 25) + return (Et = rn) == null || Et.instant(rn.Phase.CheckTypes, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: Je.id, targetId: Ze.id, numCombinations: Jt }), 0; + const pt = new Array(Zt.length), $t = /* @__PURE__ */ new Set(); + for (let Pn = 0; Pn < Zt.length; Pn++) { + const Wr = Zt[Pn], Un = u1(Wr); + pt[Pn] = Un.flags & 1048576 ? Un.types : [Un], $t.add(Wr.escapedName); + } + const Ir = RX(pt), Gt = []; + for (const Pn of Ir) { + let Wr = !1; + e: + for (const Un of Ze.types) { + for (let Fn = 0; Fn < Zt.length; Fn++) { + const As = Zt[Fn], zs = js(Un, As.escapedName); + if (!zs) continue e; + if (As === zs) continue; + if (!Sn( + Je, + Ze, + As, + zs, + (c_) => Pn[Fn], + /*reportErrors*/ + !1, + 0, + /*skipOptional*/ + K || l === r_ + )) + continue e; + } + Zf(Gt, Un, Kh), Wr = !0; + } + if (!Wr) + return 0; + } + let Hr = -1; + for (const Pn of Gt) + if (Hr &= Hs( + Je, + Pn, + /*reportErrors*/ + !1, + $t, + /*optionalsOnly*/ + !1, + 0 + /* None */ + ), Hr && (Hr &= Ce( + Je, + Pn, + 0, + /*reportErrors*/ + !1, + 0 + /* None */ + ), Hr && (Hr &= Ce( + Je, + Pn, + 1, + /*reportErrors*/ + !1, + 0 + /* None */ + ), Hr && !(la(Je) && la(Pn)) && (Hr &= Bi( + Je, + Pn, + /*sourceIsPrimitive*/ + !1, + /*reportErrors*/ + !1, + 0 + /* None */ + )))), !Hr) + return Hr; + return Hr; + } + function Er(Je, Ze) { + if (!Ze || Je.length === 0) return Je; + let Et; + for (let Ye = 0; Ye < Je.length; Ye++) + Ze.has(Je[Ye].escapedName) ? Et || (Et = Je.slice(0, Ye)) : Et && Et.push(Je[Ye]); + return Et || Je; + } + function qr(Je, Ze, Et, Ye, Zt) { + const Jt = K && !!(gc(Ze) & 48), pt = oi( + u1(Ze), + /*isProperty*/ + !1, + Jt + ), $t = Et(Je); + return pn( + $t, + pt, + 3, + Ye, + /*headMessage*/ + void 0, + Zt + ); + } + function Sn(Je, Ze, Et, Ye, Zt, Jt, pt, $t) { + const Ir = sp(Et), Gt = sp(Ye); + if (Ir & 2 || Gt & 2) { + if (Et.valueDeclaration !== Ye.valueDeclaration) + return Jt && (Ir & 2 && Gt & 2 ? is(p.Types_have_separate_declarations_of_a_private_property_0, Si(Ye)) : is(p.Property_0_is_private_in_type_1_but_not_in_type_2, Si(Ye), Ur(Ir & 2 ? Je : Ze), Ur(Ir & 2 ? Ze : Je))), 0; + } else if (Gt & 4) { + if (!Ntt(Et, Ye)) + return Jt && is(p.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, Si(Ye), Ur(Ak(Et) || Je), Ur(Ak(Ye) || Ze)), 0; + } else if (Ir & 4) + return Jt && is(p.Property_0_is_protected_in_type_1_but_public_in_type_2, Si(Ye), Ur(Je), Ur(Ze)), 0; + if (l === qf && Hd(Et) && !Hd(Ye)) + return 0; + const Hr = qr(Et, Ye, Zt, Jt, pt); + return Hr ? !$t && Et.flags & 16777216 && Ye.flags & 106500 && !(Ye.flags & 16777216) ? (Jt && is(p.Property_0_is_optional_in_type_1_but_required_in_type_2, Si(Ye), Ur(Je), Ur(Ze)), 0) : Hr : (Jt && ks(p.Types_of_property_0_are_incompatible, Si(Ye)), 0); + } + function Yn(Je, Ze, Et, Ye) { + let Zt = !1; + if (Et.valueDeclaration && Bl(Et.valueDeclaration) && wi(Et.valueDeclaration.name) && Je.symbol && Je.symbol.flags & 32) { + const pt = Et.valueDeclaration.name.escapedText, $t = x3(Je.symbol, pt); + if ($t && js(Je, $t)) { + const Ir = N.getDeclarationName(Je.symbol.valueDeclaration), Gt = N.getDeclarationName(Ze.symbol.valueDeclaration); + is( + p.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, + ad(pt), + ad(Ir.escapedText === "" ? qz : Ir), + ad(Gt.escapedText === "" ? qz : Gt) + ); + return; + } + } + const Jt = ts(Hpe( + Je, + Ze, + Ye, + /*matchDiscriminantProperties*/ + !1 + )); + if ((!m || m.code !== p.Class_0_incorrectly_implements_interface_1.code && m.code !== p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code) && (Zt = !0), Jt.length === 1) { + const pt = Si( + Et, + /*enclosingDeclaration*/ + void 0, + 0, + 20 + /* WriteComputedProps */ + ); + is(p.Property_0_is_missing_in_type_1_but_required_in_type_2, pt, ...pk(Je, Ze)), Dr(Et.declarations) && Xl(Xr(Et.declarations[0], p._0_is_declared_here, pt)), Zt && R && vn++; + } else Br( + Je, + Ze, + /*reportErrors*/ + !1 + ) && (Jt.length > 5 ? is(p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, Ur(Je), Ur(Ze), or(Jt.slice(0, 4), (pt) => Si(pt)).join(", "), Jt.length - 4) : is(p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, Ur(Je), Ur(Ze), or(Jt, (pt) => Si(pt)).join(", ")), Zt && R && vn++); + } + function Hs(Je, Ze, Et, Ye, Zt, Jt) { + if (l === Tf) + return Zs(Je, Ze, Ye); + let pt = -1; + if (la(Ze)) { + if (Gv(Je)) { + if (!Ze.target.readonly && (FP(Je) || la(Je) && Je.target.readonly)) + return 0; + const Pn = G0(Je), Wr = G0(Ze), Un = la(Je) ? Je.target.combinedFlags & 4 : 4, Fn = Ze.target.combinedFlags & 4, As = la(Je) ? Je.target.minLength : 0, zs = Ze.target.minLength; + if (!Un && Pn < zs) + return Et && is(p.Source_has_0_element_s_but_target_requires_1, Pn, zs), 0; + if (!Fn && Wr < As) + return Et && is(p.Source_has_0_element_s_but_target_allows_only_1, As, Wr), 0; + if (!Fn && (Un || Wr < Pn)) + return Et && (As < zs ? is(p.Target_requires_0_element_s_but_source_may_have_fewer, zs) : is(p.Target_allows_only_0_element_s_but_source_may_have_more, Wr)), 0; + const So = Po(Je), c_ = Po(Ze), mf = tet( + Ze.target, + 11 + /* NonRest */ + ), k1 = b8( + Ze.target, + 11 + /* NonRest */ + ), Kv = Ze.target.hasRestElement; + let w2 = !!Ye; + for (let Fm = 0; Fm < Pn; Fm++) { + const q_ = la(Je) ? Je.target.elementFlags[Fm] : 4, mE = Pn - 1 - Fm, C1 = Kv && Fm >= mf ? Wr - 1 - Math.min(mE, k1) : Fm, A2 = Ze.target.elementFlags[C1]; + if (A2 & 8 && !(q_ & 8)) + return Et && is(p.Source_provides_no_match_for_variadic_element_at_position_0_in_target, C1), 0; + if (q_ & 8 && !(A2 & 12)) + return Et && is(p.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target, Fm, C1), 0; + if (A2 & 1 && !(q_ & 1)) + return Et && is(p.Source_provides_no_match_for_required_element_at_position_0_in_target, C1), 0; + if (w2 && ((q_ & 12 || A2 & 12) && (w2 = !1), w2 && Ye?.has("" + Fm))) + continue; + const iI = Hh(So[Fm], !!(q_ & A2 & 2)), dT = c_[C1], ZP = q_ & 8 && A2 & 4 ? cu(dT) : Hh(dT, !!(A2 & 2)), sI = pn( + iI, + ZP, + 3, + Et, + /*headMessage*/ + void 0, + Jt + ); + if (!sI) + return Et && (Wr > 1 || Pn > 1) && (Kv && Fm >= mf && mE >= k1 && mf !== Pn - k1 - 1 ? ks(p.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, mf, Pn - k1 - 1, C1) : ks(p.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, Fm, C1)), 0; + pt &= sI; + } + return pt; + } + if (Ze.target.combinedFlags & 12) + return 0; + } + const $t = (l === og || l === qf) && !Qv(Je) && !$G(Je) && !la(Je), Ir = Gpe( + Je, + Ze, + $t, + /*matchDiscriminantProperties*/ + !1 + ); + if (Ir) + return Et && ue(Je, Ze) && Yn(Je, Ze, Ir, $t), 0; + if (Qv(Ze)) { + for (const Pn of Er(Wa(Je), Ye)) + if (!d2(Ze, Pn.escapedName) && !(Zr(Pn).flags & 32768)) + return Et && is(p.Property_0_does_not_exist_on_type_1, Si(Pn), Ur(Ze)), 0; + } + const Gt = Wa(Ze), Hr = la(Je) && la(Ze); + for (const Pn of Er(Gt, Ye)) { + const Wr = Pn.escapedName; + if (!(Pn.flags & 4194304) && (!Hr || Mg(Wr) || Wr === "length") && (!Zt || Pn.flags & 16777216)) { + const Un = js(Je, Wr); + if (Un && Un !== Pn) { + const Fn = Sn(Je, Ze, Un, Pn, u1, Et, Jt, l === r_); + if (!Fn) + return 0; + pt &= Fn; + } + } + } + return pt; + } + function Zs(Je, Ze, Et) { + if (!(Je.flags & 524288 && Ze.flags & 524288)) + return 0; + const Ye = Er(f1(Je), Et), Zt = Er(f1(Ze), Et); + if (Ye.length !== Zt.length) + return 0; + let Jt = -1; + for (const pt of Ye) { + const $t = d2(Ze, pt.escapedName); + if (!$t) + return 0; + const Ir = Ipe(pt, $t, pn); + if (!Ir) + return 0; + Jt &= Ir; + } + return Jt; + } + function Ce(Je, Ze, Et, Ye, Zt) { + var Jt, pt; + if (l === Tf) + return an(Je, Ze, Et); + if (Ze === wo || Je === wo) + return -1; + const $t = Je.symbol && Im(Je.symbol.valueDeclaration), Ir = Ze.symbol && Im(Ze.symbol.valueDeclaration), Gt = xs( + Je, + $t && Et === 1 ? 0 : Et + ), Hr = xs( + Ze, + Ir && Et === 1 ? 0 : Et + ); + if (Et === 1 && Gt.length && Hr.length) { + const As = !!(Gt[0].flags & 4), zs = !!(Hr[0].flags & 4); + if (As && !zs) + return Ye && is(p.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type), 0; + if (!Ia(Gt[0], Hr[0], Ye)) + return 0; + } + let Pn = -1; + const Wr = Et === 1 ? mr : Rt, Un = wn(Je), Fn = wn(Ze); + if (Un & 64 && Fn & 64 && Je.symbol === Ze.symbol || Un & 4 && Fn & 4 && Je.target === Ze.target) { + E.assertEqual(Gt.length, Hr.length); + for (let As = 0; As < Hr.length; As++) { + const zs = on( + Gt[As], + Hr[As], + /*erase*/ + !0, + Ye, + Zt, + Wr(Gt[As], Hr[As]) + ); + if (!zs) + return 0; + Pn &= zs; + } + } else if (Gt.length === 1 && Hr.length === 1) { + const As = l === r_, zs = fa(Gt), So = fa(Hr); + if (Pn = on(zs, So, As, Ye, Zt, Wr(zs, So)), !Pn && Ye && Et === 1 && Un & Fn && (((Jt = So.declaration) == null ? void 0 : Jt.kind) === 176 || ((pt = zs.declaration) == null ? void 0 : pt.kind) === 176)) { + const c_ = (mf) => km( + mf, + /*enclosingDeclaration*/ + void 0, + 262144, + Et + ); + return is(p.Type_0_is_not_assignable_to_type_1, c_(zs), c_(So)), is(p.Types_of_construct_signatures_are_incompatible), Pn; + } + } else + e: + for (const As of Hr) { + const zs = qs(); + let So = Ye; + for (const c_ of Gt) { + const mf = on( + c_, + As, + /*erase*/ + !0, + So, + Zt, + Wr(c_, As) + ); + if (mf) { + Pn &= mf, jn(zs); + continue e; + } + So = !1; + } + return So && is(p.Type_0_provides_no_match_for_the_signature_1, Ur(Je), km( + As, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + Et + )), 0; + } + return Pn; + } + function ue(Je, Ze) { + const Et = FL( + Je, + 0 + /* Call */ + ), Ye = FL( + Je, + 1 + /* Construct */ + ), Zt = f1(Je); + return (Et.length || Ye.length) && !Zt.length ? !!(xs( + Ze, + 0 + /* Call */ + ).length && Et.length || xs( + Ze, + 1 + /* Construct */ + ).length && Ye.length) : !0; + } + function Rt(Je, Ze) { + return Je.parameters.length === 0 && Ze.parameters.length === 0 ? (Et, Ye) => ks(p.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, Ur(Et), Ur(Ye)) : (Et, Ye) => ks(p.Call_signature_return_types_0_and_1_are_incompatible, Ur(Et), Ur(Ye)); + } + function mr(Je, Ze) { + return Je.parameters.length === 0 && Ze.parameters.length === 0 ? (Et, Ye) => ks(p.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, Ur(Et), Ur(Ye)) : (Et, Ye) => ks(p.Construct_signature_return_types_0_and_1_are_incompatible, Ur(Et), Ur(Ye)); + } + function on(Je, Ze, Et, Ye, Zt, Jt) { + const pt = l === og ? 16 : l === qf ? 24 : 0; + return kpe(Et ? y8(Je) : Je, Et ? y8(Ze) : Ze, pt, Ye, is, Jt, $t, Co); + function $t(Ir, Gt, Hr) { + return pn( + Ir, + Gt, + 3, + Hr, + /*headMessage*/ + void 0, + Zt + ); + } + } + function an(Je, Ze, Et) { + const Ye = xs(Je, Et), Zt = xs(Ze, Et); + if (Ye.length !== Zt.length) + return 0; + let Jt = -1; + for (let pt = 0; pt < Ye.length; pt++) { + const $t = KL( + Ye[pt], + Zt[pt], + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !1, + /*ignoreReturnTypes*/ + !1, + pn + ); + if (!$t) + return 0; + Jt &= $t; + } + return Jt; + } + function Tn(Je, Ze, Et, Ye) { + let Zt = -1; + const Jt = Ze.keyType, pt = Je.flags & 2097152 ? NL(Je) : f1(Je); + for (const $t of pt) + if (!AAe(Je, $t) && Sk(kk( + $t, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), Jt)) { + const Ir = u1($t), Gt = H || Ir.flags & 32768 || Jt === _e || !($t.flags & 16777216) ? Ir : qp( + Ir, + 524288 + /* NEUndefined */ + ), Hr = pn( + Gt, + Ze.type, + 3, + Et, + /*headMessage*/ + void 0, + Ye + ); + if (!Hr) + return Et && is(p.Property_0_is_incompatible_with_index_signature, Si($t)), 0; + Zt &= Hr; + } + for (const $t of Bu(Je)) + if (Sk($t.keyType, Jt)) { + const Ir = Ci($t, Ze, Et, Ye); + if (!Ir) + return 0; + Zt &= Ir; + } + return Zt; + } + function Ci(Je, Ze, Et, Ye) { + const Zt = pn( + Je.type, + Ze.type, + 3, + Et, + /*headMessage*/ + void 0, + Ye + ); + return !Zt && Et && (Je.keyType === Ze.keyType ? is(p._0_index_signatures_are_incompatible, Ur(Je.keyType)) : is(p._0_and_1_index_signatures_are_incompatible, Ur(Je.keyType), Ur(Ze.keyType))), Zt; + } + function Bi(Je, Ze, Et, Ye, Zt) { + if (l === Tf) + return vs(Je, Ze); + const Jt = Bu(Ze), pt = ut(Jt, (Ir) => Ir.keyType === we); + let $t = -1; + for (const Ir of Jt) { + const Gt = l !== qf && !Et && pt && Ir.type.flags & 1 ? -1 : B_(Je) && pt ? pn(Jh(Je), Ir.type, 3, Ye) : cs(Je, Ir, Ye, Zt); + if (!Gt) + return 0; + $t &= Gt; + } + return $t; + } + function cs(Je, Ze, Et, Ye) { + const Zt = m8(Je, Ze.keyType); + return Zt ? Ci(Zt, Ze, Et, Ye) : !(Ye & 1) && (l !== qf || wn(Je) & 8192) && e$(Je) ? Tn(Je, Ze, Et, Ye) : (Et && is(p.Index_signature_for_type_0_is_missing_in_type_1, Ur(Ze.keyType), Ur(Je)), 0); + } + function vs(Je, Ze) { + const Et = Bu(Je), Ye = Bu(Ze); + if (Et.length !== Ye.length) + return 0; + for (const Zt of Ye) { + const Jt = eh(Je, Zt.keyType); + if (!(Jt && pn( + Jt.type, + Zt.type, + 3 + /* Both */ + ) && Jt.isReadonly === Zt.isReadonly)) + return 0; + } + return -1; + } + function Ia(Je, Ze, Et) { + if (!Je.declaration || !Ze.declaration) + return !0; + const Ye = UT( + Je.declaration, + 6 + /* NonPublicAccessibilityModifier */ + ), Zt = UT( + Ze.declaration, + 6 + /* NonPublicAccessibilityModifier */ + ); + return Zt === 2 || Zt === 4 && Ye !== 2 || Zt !== 4 && !Ye ? !0 : (Et && is(p.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, Rv(Ye), Rv(Zt)), !1); + } + } + function Dpe(r) { + if (r.flags & 16) + return !1; + if (r.flags & 3145728) + return !!rr(r.types, Dpe); + if (r.flags & 465829888) { + const a = qS(r); + if (a && a !== r) + return Dpe(a); + } + return Vd(r) || !!(r.flags & 134217728) || !!(r.flags & 268435456); + } + function NAe(r, a) { + return la(r) && la(a) ? He : Wa(a).filter((l) => WG(Xc(r, l.escapedName), Zr(l))); + } + function WG(r, a) { + return !!r && !!a && Sc( + r, + 32768 + /* Undefined */ + ) && !!N8(a); + } + function ktt(r) { + return Wa(r).filter((a) => N8(Zr(a))); + } + function IAe(r, a, l = Tpe) { + return n5e(r, a, l) || Rut(r, a) || jut(r, a) || But(r, a) || Jut(r, a); + } + function Ppe(r, a, l) { + const f = r.types, m = f.map( + (x) => x.flags & 402784252 ? 0 : -1 + /* True */ + ); + for (const [x, I] of a) { + let R = !1; + for (let J = 0; J < f.length; J++) + if (m[J]) { + const ee = q6(f[J], I); + ee && l(x(), ee) ? R = !0 : m[J] = 3; + } + for (let J = 0; J < f.length; J++) + m[J] === 3 && (m[J] = R ? 0 : -1); + } + const y = ls( + m, + 0 + /* False */ + ) ? Gn( + f.filter((x, I) => m[I]), + 0 + /* None */ + ) : r; + return y.flags & 131072 ? r : y; + } + function wpe(r) { + if (r.flags & 524288) { + const a = zd(r); + return a.callSignatures.length === 0 && a.constructSignatures.length === 0 && a.indexInfos.length === 0 && a.properties.length > 0 && Ri(a.properties, (l) => !!(l.flags & 16777216)); + } + return r.flags & 33554432 ? wpe(r.baseType) : r.flags & 2097152 ? Ri(r.types, wpe) : !1; + } + function Ctt(r, a, l) { + for (const f of Wa(r)) + if (k$(a, f.escapedName, l)) + return !0; + return !1; + } + function Ape(r) { + return r === Pe || r === Ct || r.objectFlags & 8 ? j : FAe(r.symbol, r.typeParameters); + } + function OAe(r) { + return FAe(r, Ni(r).typeParameters); + } + function FAe(r, a = He) { + var l, f; + const m = Ni(r); + if (!m.variances) { + (l = rn) == null || l.push(rn.Phase.CheckTypes, "getVariancesWorker", { arity: a.length, id: Fl(mo(r)) }); + const y = _n, x = _r; + _n || (_n = !0, _r = Lt.length), m.variances = He; + const I = []; + for (const R of a) { + const J = Npe(R); + let ee = J & 16384 ? J & 8192 ? 0 : 1 : J & 8192 ? 2 : void 0; + if (ee === void 0) { + let Se = !1, me = !1; + const Ve = ga; + ga = (er) => er ? me = !0 : Se = !0; + const mt = YL(r, R, lc), ht = YL(r, R, Fu); + ee = (Bs(ht, mt) ? 1 : 0) | (Bs(mt, ht) ? 2 : 0), ee === 3 && Bs(YL(r, R, Lu), mt) && (ee = 4), ga = Ve, (Se || me) && (Se && (ee |= 8), me && (ee |= 16)); + } + I.push(ee); + } + y || (_n = !1, _r = x), m.variances = I, (f = rn) == null || f.pop({ variances: I.map(E.formatVariance) }); + } + return m.variances; + } + function YL(r, a, l) { + const f = b2(a, l), m = mo(r); + if (Aa(m)) + return m; + const y = r.flags & 524288 ? K6(r, th(Ni(r).typeParameters, f)) : H0(m, th(m.typeParameters, f)); + return $e.add(Fl(y)), y; + } + function VG(r) { + return $e.has(Fl(r)); + } + function Npe(r) { + var a; + return Eu( + (a = r.symbol) == null ? void 0 : a.declarations, + (l, f) => l | Au(f), + 0 + /* None */ + ) & 28672; + } + function Ett(r, a) { + for (let l = 0; l < a.length; l++) + if ((a[l] & 7) === 1 && r[l].flags & 16384) + return !0; + return !1; + } + function Dtt(r) { + return r.flags & 262144 && !a_(r); + } + function Ptt(r) { + return !!(wn(r) & 4) && !r.node; + } + function UG(r) { + return Ptt(r) && ut(Po(r), (a) => !!(a.flags & 262144) || UG(a)); + } + function wtt(r, a, l, f) { + const m = []; + let y = ""; + const x = R(r, 0), I = R(a, 0); + return `${y}${x},${I}${l}`; + function R(J, ee = 0) { + let Se = "" + J.target.id; + for (const me of Po(J)) { + if (me.flags & 262144) { + if (f || Dtt(me)) { + let Ve = m.indexOf(me); + Ve < 0 && (Ve = m.length, m.push(me)), Se += "=" + Ve; + continue; + } + y = "*"; + } else if (ee < 4 && UG(me)) { + Se += "<" + R(me, ee + 1) + ">"; + continue; + } + Se += "-" + me.id; + } + return Se; + } + } + function qG(r, a, l, f, m) { + if (f === Tf && r.id > a.id) { + const x = r; + r = a, a = x; + } + const y = l ? ":" + l : ""; + return UG(r) && UG(a) ? wtt(r, a, y, m) : `${r.id},${a.id}${y}`; + } + function ZL(r, a) { + if (gc(r) & 6) { + for (const l of r.links.containingType.types) { + const f = js(l, r.escapedName), m = f && ZL(f, a); + if (m) + return m; + } + return; + } + return a(r); + } + function Ak(r) { + return r.parent && r.parent.flags & 32 ? mo(s_(r)) : void 0; + } + function HG(r) { + const a = Ak(r), l = a && un(a)[0]; + return l && Xc(l, r.escapedName); + } + function Att(r, a) { + return ZL(r, (l) => { + const f = Ak(l); + return f ? vk(f, a) : !1; + }); + } + function Ntt(r, a) { + return !ZL(a, (l) => sp(l) & 4 ? !Att(r, Ak(l)) : !1); + } + function LAe(r, a, l) { + return ZL(a, (f) => sp(f, l) & 4 ? !vk(r, Ak(f)) : !1) ? void 0 : r; + } + function Nk(r, a, l, f = 3) { + if (l >= f) { + if ((wn(r) & 96) === 96 && (r = MAe(r)), r.flags & 2097152) + return ut(r.types, (I) => Nk(I, a, l, f)); + const m = GG(r); + let y = 0, x = 0; + for (let I = 0; I < l; I++) { + const R = a[I]; + if (RAe(R, m)) { + if (R.id >= x && (y++, y >= f)) + return !0; + x = R.id; + } + } + } + return !1; + } + function MAe(r) { + let a; + for (; (wn(r) & 96) === 96 && (a = p2(r)) && (a.symbol || a.flags & 2097152 && ut(a.types, (l) => !!l.symbol)); ) + r = a; + return r; + } + function RAe(r, a) { + return (wn(r) & 96) === 96 && (r = MAe(r)), r.flags & 2097152 ? ut(r.types, (l) => RAe(l, a)) : GG(r) === a; + } + function GG(r) { + if (r.flags & 524288 && !Xpe(r)) { + if (wn(r) & 4 && r.node) + return r.node; + if (r.symbol && !(wn(r) & 16 && r.symbol.flags & 32)) + return r.symbol; + if (la(r)) + return r.target; + } + if (r.flags & 262144) + return r.symbol; + if (r.flags & 8388608) { + do + r = r.objectType; + while (r.flags & 8388608); + return r; + } + return r.flags & 16777216 ? r.root : r; + } + function Itt(r, a) { + return Ipe(r, a, E8) !== 0; + } + function Ipe(r, a, l) { + if (r === a) + return -1; + const f = sp(r) & 6, m = sp(a) & 6; + if (f !== m) + return 0; + if (f) { + if (fE(r) !== fE(a)) + return 0; + } else if ((r.flags & 16777216) !== (a.flags & 16777216)) + return 0; + return Hd(r) !== Hd(a) ? 0 : l(Zr(r), Zr(a)); + } + function Ott(r, a, l) { + const f = U_(r), m = U_(a), y = Om(r), x = Om(a), I = yg(r), R = yg(a); + return !!(f === m && y === x && I === R || l && y <= x); + } + function KL(r, a, l, f, m, y) { + if (r === a) + return -1; + if (!Ott(r, a, l) || Dr(r.typeParameters) !== Dr(a.typeParameters)) + return 0; + if (a.typeParameters) { + const R = z_(r.typeParameters, a.typeParameters); + for (let J = 0; J < a.typeParameters.length; J++) { + const ee = r.typeParameters[J], Se = a.typeParameters[J]; + if (!(ee === Se || y(Ji(AP(ee), R) || yt, AP(Se) || yt) && y(Ji(GS(ee), R) || yt, GS(Se) || yt))) + return 0; + } + r = wk( + r, + R, + /*eraseTypeParameters*/ + !0 + ); + } + let x = -1; + if (!f) { + const R = Vv(r); + if (R) { + const J = Vv(a); + if (J) { + const ee = y(R, J); + if (!ee) + return 0; + x &= ee; + } + } + } + const I = U_(a); + for (let R = 0; R < I; R++) { + const J = qd(r, R), ee = qd(a, R), Se = y(ee, J); + if (!Se) + return 0; + x &= Se; + } + if (!m) { + const R = bp(r), J = bp(a); + x &= R || J ? Ftt(R, J, y) : y(Ha(r), Ha(a)); + } + return x; + } + function Ftt(r, a, l) { + return r && a && spe(r, a) ? r.type === a.type ? -1 : r.type && a.type ? l(r.type, a.type) : 0 : 0; + } + function Ltt(r) { + let a; + for (const l of r) + if (!(l.flags & 131072)) { + const f = Uh(l); + if (a ?? (a = f), f === l || f !== a) + return !1; + } + return !0; + } + function jAe(r) { + return Eu(r, (a, l) => a | (l.flags & 1048576 ? jAe(l.types) : l.flags), 0); + } + function Mtt(r) { + if (r.length === 1) + return r[0]; + const a = K ? Zc(r, (f) => Jc(f, (m) => !(m.flags & 98304))) : r, l = Ltt(a) ? Gn(a) : Eu(a, (f, m) => h1(f, m) ? m : f); + return a === r ? l : rM( + l, + jAe(r) & 98304 + /* Nullable */ + ); + } + function Rtt(r) { + return Eu(r, (a, l) => h1(l, a) ? l : a); + } + function xp(r) { + return !!(wn(r) & 4) && (r.target === Pe || r.target === Ct); + } + function FP(r) { + return !!(wn(r) & 4) && r.target === Ct; + } + function Gv(r) { + return xp(r) || la(r); + } + function eM(r) { + return xp(r) && !FP(r) || la(r) && !r.target.readonly; + } + function tM(r) { + return xp(r) ? Po(r)[0] : void 0; + } + function Y0(r) { + return xp(r) || !(r.flags & 98304) && Bs(r, pc); + } + function Ope(r) { + return eM(r) || !(r.flags & 98305) && Bs(r, Do); + } + function Fpe(r) { + if (!(wn(r) & 4) || !(wn(r.target) & 3)) + return; + if (wn(r) & 33554432) + return wn(r) & 67108864 ? r.cachedEquivalentBaseType : void 0; + r.objectFlags |= 33554432; + const a = r.target; + if (wn(a) & 1) { + const m = f8(a); + if (m && m.expression.kind !== 80 && m.expression.kind !== 211) + return; + } + const l = un(a); + if (l.length !== 1 || _1(r.symbol).size) + return; + let f = Dr(a.typeParameters) ? Ji(l[0], z_(a.typeParameters, Po(r).slice(0, a.typeParameters.length))) : l[0]; + return Dr(Po(r)) > Dr(a.typeParameters) && (f = pf(f, ia(Po(r)))), r.objectFlags |= 67108864, r.cachedEquivalentBaseType = f; + } + function BAe(r) { + return K ? r === Di : r === W; + } + function $G(r) { + const a = tM(r); + return !!a && BAe(a); + } + function LP(r) { + let a; + return la(r) || !!js(r, "0") || Y0(r) && !!(a = Xc(r, "length")) && V_(a, (l) => !!(l.flags & 256)); + } + function XG(r) { + return Y0(r) || LP(r); + } + function JAe(r, a) { + const l = Xc(r, "" + a); + if (l) + return l; + if (V_(r, la)) + return UAe(r, a, F.noUncheckedIndexedAccess ? Ut : void 0); + } + function jtt(r) { + return !(r.flags & 240544); + } + function Vd(r) { + return !!(r.flags & 109472); + } + function zAe(r) { + const a = dg(r); + return a.flags & 2097152 ? ut(a.types, Vd) : Vd(a); + } + function Btt(r) { + return r.flags & 2097152 && Nn(r.types, Vd) || r; + } + function w8(r) { + return r.flags & 16 ? !0 : r.flags & 1048576 ? r.flags & 1024 ? !0 : Ri(r.types, Vd) : Vd(r); + } + function Uh(r) { + return r.flags & 1056 ? vp(r) : r.flags & 402653312 ? we : r.flags & 256 ? _e : r.flags & 2048 ? Te : r.flags & 512 ? br : r.flags & 1048576 ? Jtt(r) : r; + } + function Jtt(r) { + const a = `B${Fl(r)}`; + return F0(a) ?? Wy(a, Ho(r, Uh)); + } + function Lpe(r) { + return r.flags & 402653312 ? we : r.flags & 288 ? _e : r.flags & 2048 ? Te : r.flags & 512 ? br : r.flags & 1048576 ? Ho(r, Lpe) : r; + } + function $v(r) { + return r.flags & 1056 && v2(r) ? vp(r) : r.flags & 128 && v2(r) ? we : r.flags & 256 && v2(r) ? _e : r.flags & 2048 && v2(r) ? Te : r.flags & 512 && v2(r) ? br : r.flags & 1048576 ? Ho(r, $v) : r; + } + function WAe(r) { + return r.flags & 8192 ? Lr : r.flags & 1048576 ? Ho(r, WAe) : r; + } + function Mpe(r, a) { + return J$(r, a) || (r = WAe($v(r))), Ju(r); + } + function ztt(r, a, l) { + if (r && Vd(r)) { + const f = a ? l ? $8(a) : a : void 0; + r = Mpe(r, f); + } + return r; + } + function Rpe(r, a, l, f) { + if (r && Vd(r)) { + const m = a ? E2(l, a, f) : void 0; + r = Mpe(r, m); + } + return r; + } + function la(r) { + return !!(wn(r) & 4 && r.target.objectFlags & 8); + } + function v1(r) { + return la(r) && !!(r.target.combinedFlags & 8); + } + function VAe(r) { + return v1(r) && r.target.elementFlags.length === 1; + } + function QG(r) { + return MP(r, r.target.fixedLength); + } + function UAe(r, a, l) { + return Ho(r, (f) => { + const m = f, y = QG(m); + return y ? l && a >= npe(m.target) ? Gn([y, l]) : y : Ut; + }); + } + function Wtt(r) { + const a = QG(r); + return a && cu(a); + } + function MP(r, a, l = 0, f = !1, m = !1) { + const y = G0(r) - l; + if (a < y) { + const x = Po(r), I = []; + for (let R = a; R < y; R++) { + const J = x[R]; + I.push(r.target.elementFlags[R] & 8 ? J_(J, _e) : J); + } + return f ? Ys(I) : Gn( + I, + m ? 0 : 1 + /* Literal */ + ); + } + } + function Vtt(r, a) { + return G0(r) === G0(a) && Ri(r.target.elementFlags, (l, f) => (l & 12) === (a.target.elementFlags[f] & 12)); + } + function qAe({ value: r }) { + return r.base10Value === "0"; + } + function HAe(r) { + return Jc(r, (a) => Ud( + a, + 4194304 + /* Truthy */ + )); + } + function Utt(r) { + return Ho(r, qtt); + } + function qtt(r) { + return r.flags & 4 ? Oe : r.flags & 8 ? Ue : r.flags & 64 ? Tt : r === xt || r === dt || r.flags & 114691 || r.flags & 128 && r.value === "" || r.flags & 256 && r.value === 0 || r.flags & 2048 && qAe(r) ? r : fr; + } + function rM(r, a) { + const l = a & ~r.flags & 98304; + return l === 0 ? r : Gn(l === 32768 ? [r, Ut] : l === 65536 ? [r, he] : [r, Ut, he]); + } + function b1(r, a = !1) { + E.assert(K); + const l = a ? st : Ut; + return r === l || r.flags & 1048576 && r.types[0] === l ? r : Gn([r, l]); + } + function Htt(r) { + return Cc || (Cc = IP( + "NonNullable", + 524288, + /*diagnostic*/ + void 0 + ) || nt), Cc !== nt ? K6(Cc, [r]) : Ys([r, bi]); + } + function qh(r) { + return K ? iT( + r, + 2097152 + /* NEUndefinedOrNull */ + ) : r; + } + function GAe(r) { + return K ? Gn([r, z]) : r; + } + function YG(r) { + return K ? c$(r, z) : r; + } + function ZG(r, a, l) { + return l ? UE(a) ? b1(r) : GAe(r) : r; + } + function A8(r, a) { + return BI(a) ? qh(r) : fu(a) ? YG(r) : r; + } + function Hh(r, a) { + return H && a ? c$(r, je) : r; + } + function N8(r) { + return r === je || !!(r.flags & 1048576) && r.types[0] === je; + } + function KG(r) { + return H ? c$(r, je) : qp( + r, + 524288 + /* NEUndefined */ + ); + } + function Gtt(r, a) { + return (r.flags & 524) !== 0 && (a.flags & 28) !== 0; + } + function e$(r) { + const a = wn(r); + return r.flags & 2097152 ? Ri(r.types, e$) : !!(r.symbol && r.symbol.flags & 7040 && !(r.symbol.flags & 32) && !iX(r)) || !!(a & 4194304) || !!(a & 1024 && e$(r.source)); + } + function tT(r, a) { + const l = va( + r.flags, + r.escapedName, + gc(r) & 8 + /* Readonly */ + ); + l.declarations = r.declarations, l.parent = r.parent, l.links.type = a, l.links.target = r, r.valueDeclaration && (l.valueDeclaration = r.valueDeclaration); + const f = Ni(r).nameType; + return f && (l.links.nameType = f), l; + } + function $tt(r, a) { + const l = Ms(); + for (const f of f1(r)) { + const m = Zr(f), y = a(m); + l.set(f.escapedName, y === m ? f : tT(f, y)); + } + return l; + } + function I8(r) { + if (!(Qv(r) && wn(r) & 8192)) + return r; + const a = r.regularType; + if (a) + return a; + const l = r, f = $tt(r, I8), m = ie(l.symbol, f, l.callSignatures, l.constructSignatures, l.indexInfos); + return m.flags = l.flags, m.objectFlags |= l.objectFlags & -8193, r.regularType = m, m; + } + function $Ae(r, a, l) { + return { parent: r, propertyName: a, siblings: l, resolvedProperties: void 0 }; + } + function XAe(r) { + if (!r.siblings) { + const a = []; + for (const l of XAe(r.parent)) + if (Qv(l)) { + const f = d2(l, r.propertyName); + f && sT(Zr(f), (m) => { + a.push(m); + }); + } + r.siblings = a; + } + return r.siblings; + } + function Xtt(r) { + if (!r.resolvedProperties) { + const a = /* @__PURE__ */ new Map(); + for (const l of XAe(r)) + if (Qv(l) && !(wn(l) & 2097152)) + for (const f of Wa(l)) + a.set(f.escapedName, f); + r.resolvedProperties = ts(a.values()); + } + return r.resolvedProperties; + } + function Qtt(r, a) { + if (!(r.flags & 4)) + return r; + const l = Zr(r), f = a && $Ae( + a, + r.escapedName, + /*siblings*/ + void 0 + ), m = jpe(l, f); + return m === l ? r : tT(r, m); + } + function Ytt(r) { + const a = Ca.get(r.escapedName); + if (a) + return a; + const l = tT(r, st); + return l.flags |= 16777216, Ca.set(r.escapedName, l), l; + } + function Ztt(r, a) { + const l = Ms(); + for (const m of f1(r)) + l.set(m.escapedName, Qtt(m, a)); + if (a) + for (const m of Xtt(a)) + l.has(m.escapedName) || l.set(m.escapedName, Ytt(m)); + const f = ie(r.symbol, l, He, He, Zc(Bu(r), (m) => mg(m.keyType, W_(m.type), m.isReadonly))); + return f.objectFlags |= wn(r) & 266240, f; + } + function W_(r) { + return jpe( + r, + /*context*/ + void 0 + ); + } + function jpe(r, a) { + if (wn(r) & 196608) { + if (a === void 0 && r.widened) + return r.widened; + let l; + if (r.flags & 98305) + l = Ne; + else if (Qv(r)) + l = Ztt(r, a); + else if (r.flags & 1048576) { + const f = a || $Ae( + /*parent*/ + void 0, + /*propertyName*/ + void 0, + r.types + ), m = Zc(r.types, (y) => y.flags & 98304 ? y : jpe(y, f)); + l = Gn( + m, + ut(m, Vh) ? 2 : 1 + /* Literal */ + ); + } else r.flags & 2097152 ? l = Ys(Zc(r.types, W_)) : Gv(r) && (l = H0(r.target, Zc(Po(r), W_))); + return l && a === void 0 && (r.widened = l), l || r; + } + return r; + } + function t$(r) { + let a = !1; + if (wn(r) & 65536) { + if (r.flags & 1048576) + if (ut(r.types, Vh)) + a = !0; + else + for (const l of r.types) + t$(l) && (a = !0); + if (Gv(r)) + for (const l of Po(r)) + t$(l) && (a = !0); + if (Qv(r)) + for (const l of f1(r)) { + const f = Zr(l); + wn(f) & 65536 && (t$(f) || We(l.valueDeclaration, p.Object_literal_s_property_0_implicitly_has_an_1_type, Si(l), Ur(W_(f))), a = !0); + } + } + return a; + } + function Xv(r, a, l) { + const f = Ur(W_(a)); + if (Qr(r) && !j4(xr(r), F)) + return; + let m; + switch (r.kind) { + case 226: + case 172: + case 171: + m = ne ? p.Member_0_implicitly_has_an_1_type : p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 169: + const y = r; + if (Re(y.name)) { + const x = B2(y.name); + if ((px(y.parent) || um(y.parent) || Xm(y.parent)) && y.parent.parameters.includes(y) && (Kt( + y, + y.name.escapedText, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ) || x && VB(x))) { + const I = "arg" + y.parent.parameters.indexOf(y), R = ao(y.name) + (y.dotDotDotToken ? "[]" : ""); + ll(ne, r, p.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, I, R); + return; + } + } + m = r.dotDotDotToken ? ne ? p.Rest_parameter_0_implicitly_has_an_any_type : p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : ne ? p.Parameter_0_implicitly_has_an_1_type : p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 208: + if (m = p.Binding_element_0_implicitly_has_an_1_type, !ne) + return; + break; + case 317: + We(r, p.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, f); + return; + case 323: + ne && MC(r.parent) && We(r.parent.tagName, p.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, f); + return; + case 262: + case 174: + case 173: + case 177: + case 178: + case 218: + case 219: + if (ne && !r.name) { + l === 3 ? We(r, p.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, f) : We(r, p.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, f); + return; + } + m = ne ? l === 3 ? p._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type : p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage; + break; + case 200: + ne && We(r, p.Mapped_object_type_implicitly_has_an_any_template_type); + return; + default: + m = ne ? p.Variable_0_implicitly_has_an_1_type : p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; + } + ll(ne, r, m, ao(es(r)), f); + } + function r$(r, a, l) { + n(() => { + ne && wn(a) & 65536 && (!l || !bde(r)) && (t$(a) || Xv(r, a, l)); + }); + } + function Bpe(r, a, l) { + const f = U_(r), m = U_(a), y = W8(r), x = W8(a), I = x ? m - 1 : m, R = y ? I : Math.min(f, I), J = Vv(r); + if (J) { + const ee = Vv(a); + ee && l(J, ee); + } + for (let ee = 0; ee < R; ee++) + l(qd(r, ee), qd(a, ee)); + x && l(AM( + r, + R, + /*readonly*/ + HS(x) && !Hp(x, Ope) + ), x); + } + function Jpe(r, a, l) { + const f = bp(a); + if (f) { + const y = bp(r); + if (y && spe(y, f) && y.type && f.type) { + l(y.type, f.type); + return; + } + } + const m = Ha(a); + S1(m) && l(Ha(r), m); + } + function O8(r, a, l, f) { + return zpe(r.map(Vpe), a, l, f || Tpe); + } + function Ktt(r, a = 0) { + return r && zpe(or(r.inferences, QAe), r.signature, r.flags | a, r.compareTypes); + } + function zpe(r, a, l, f) { + const m = { + inferences: r, + signature: a, + flags: l, + compareTypes: f, + mapper: Li, + // initialize to a noop mapper so the context object is available, but the underlying object shape is right upon construction + nonFixingMapper: Li + }; + return m.mapper = ert(m), m.nonFixingMapper = trt(m), m; + } + function ert(r) { + return ype( + or(r.inferences, (a) => a.typeParameter), + or(r.inferences, (a, l) => () => (a.isFixed || (rrt(r), n$(r.inferences), a.isFixed = !0), Qpe(r, l))) + ); + } + function trt(r) { + return ype( + or(r.inferences, (a) => a.typeParameter), + or(r.inferences, (a, l) => () => Qpe(r, l)) + ); + } + function n$(r) { + for (const a of r) + a.isFixed || (a.inferredType = void 0); + } + function Wpe(r, a, l) { + (r.intraExpressionInferenceSites ?? (r.intraExpressionInferenceSites = [])).push({ node: a, type: l }); + } + function rrt(r) { + if (r.intraExpressionInferenceSites) { + for (const { node: a, type: l } of r.intraExpressionInferenceSites) { + const f = a.kind === 174 ? KNe( + a, + 2 + /* NoConstraints */ + ) : o_( + a, + 2 + /* NoConstraints */ + ); + f && Gh(r.inferences, l, f); + } + r.intraExpressionInferenceSites = void 0; + } + } + function Vpe(r) { + return { + typeParameter: r, + candidates: void 0, + contraCandidates: void 0, + inferredType: void 0, + priority: void 0, + topLevel: !0, + isFixed: !1, + impliedArity: void 0 + }; + } + function QAe(r) { + return { + typeParameter: r.typeParameter, + candidates: r.candidates && r.candidates.slice(), + contraCandidates: r.contraCandidates && r.contraCandidates.slice(), + inferredType: r.inferredType, + priority: r.priority, + topLevel: r.topLevel, + isFixed: r.isFixed, + impliedArity: r.impliedArity + }; + } + function nrt(r) { + const a = Ln(r.inferences, _E); + return a.length ? zpe(or(a, QAe), r.signature, r.flags, r.compareTypes) : void 0; + } + function Upe(r) { + return r && r.mapper; + } + function S1(r) { + const a = wn(r); + if (a & 524288) + return !!(a & 1048576); + const l = !!(r.flags & 465829888 || r.flags & 524288 && !YAe(r) && (a & 4 && (r.node || ut(Po(r), S1)) || a & 134217728 && Dr(r.outerTypeParameters) || a & 16 && r.symbol && r.symbol.flags & 14384 && r.symbol.declarations || a & 12583968) || r.flags & 3145728 && !(r.flags & 1024) && !YAe(r) && ut(r.types, S1)); + return r.flags & 3899393 && (r.objectFlags |= 524288 | (l ? 1048576 : 0)), l; + } + function YAe(r) { + if (r.aliasSymbol && !r.aliasTypeArguments) { + const a = Jo( + r.aliasSymbol, + 265 + /* TypeAliasDeclaration */ + ); + return !!(a && sr(a.parent, (l) => l.kind === 307 ? !0 : l.kind === 267 ? !1 : "quit")); + } + return !1; + } + function F8(r, a, l = 0) { + return !!(r === a || r.flags & 3145728 && ut(r.types, (f) => F8(f, a, l)) || l < 3 && r.flags & 16777216 && (F8(Uv(r), a, l + 1) || F8(qv(r), a, l + 1))); + } + function irt(r, a) { + const l = bp(r); + return l ? !!l.type && F8(l.type, a) : F8(Ha(r), a); + } + function srt(r) { + const a = Ms(); + sT(r, (f) => { + if (!(f.flags & 128)) + return; + const m = Ko(f.value), y = va(4, m); + y.links.type = Ne, f.symbol && (y.declarations = f.symbol.declarations, y.valueDeclaration = f.symbol.valueDeclaration), a.set(m, y); + }); + const l = r.flags & 4 ? [mg( + we, + bi, + /*isReadonly*/ + !1 + )] : He; + return ie( + /*symbol*/ + void 0, + a, + He, + He, + l + ); + } + function ZAe(r, a, l) { + const f = r.id + "," + a.id + "," + l.id; + if (vo.has(f)) + return vo.get(f); + const m = art(r, a, l); + return vo.set(f, m), m; + } + function qpe(r) { + return !(wn(r) & 262144) || Qv(r) && ut(Wa(r), (a) => qpe(Zr(a))) || la(r) && ut(h2(r), qpe); + } + function art(r, a, l) { + if (!(eh(r, we) || Wa(r).length !== 0 && qpe(r))) + return; + if (xp(r)) { + const m = i$(Po(r)[0], a, l); + return m ? cu(m, FP(r)) : void 0; + } + if (la(r)) { + const m = or(h2(r), (x) => i$(x, a, l)); + if (!Ri(m, (x) => !!x)) + return; + const y = pg(a) & 4 ? Zc(r.target.elementFlags, (x) => x & 2 ? 1 : x) : r.target.elementFlags; + return gg(m, y, r.target.readonly, r.target.labeledElementDeclarations); + } + const f = yp( + 1040, + /*symbol*/ + void 0 + ); + return f.source = r, f.mappedType = a, f.constraintType = l, f; + } + function ort(r) { + const a = Ni(r); + return a.type || (a.type = i$(r.links.propertyType, r.links.mappedType, r.links.constraintType) || yt), a.type; + } + function crt(r, a, l) { + const f = J_(l.type, Jd(a)), m = Jh(a), y = Vpe(f); + return Gh([y], r, m), KAe(y) || yt; + } + function i$(r, a, l) { + const f = r.id + "," + a.id + "," + l.id; + if (vo.has(f)) + return vo.get(f) || yt; + xv.push(r), t2.push(a); + const m = ag; + Nk(r, xv, xv.length, 2) && (ag |= 1), Nk(a, t2, t2.length, 2) && (ag |= 2); + let y; + return ag !== 3 && (y = crt(r, a, l)), xv.pop(), t2.pop(), ag = m, vo.set(f, y), y; + } + function* Hpe(r, a, l, f) { + const m = Wa(a); + for (const y of m) + if (!Wwe(y) && (l || !(y.flags & 16777216 || gc(y) & 48))) { + const x = js(r, y.escapedName); + if (!x) + yield y; + else if (f) { + const I = Zr(y); + if (I.flags & 109472) { + const R = Zr(x); + R.flags & 1 || Ju(R) === Ju(I) || (yield y); + } + } + } + } + function Gpe(r, a, l, f) { + return lI(Hpe(r, a, l, f)); + } + function lrt(r, a) { + return !(a.target.combinedFlags & 8) && a.target.minLength > r.target.minLength || !a.target.hasRestElement && (r.target.hasRestElement || a.target.fixedLength < r.target.fixedLength); + } + function urt(r, a) { + return la(r) && la(a) ? lrt(r, a) : !!Gpe( + r, + a, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !0 + ) && !!Gpe( + a, + r, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + ); + } + function KAe(r) { + return r.candidates ? Gn( + r.candidates, + 2 + /* Subtype */ + ) : r.contraCandidates ? Ys(r.contraCandidates) : void 0; + } + function $pe(r) { + return !!bn(r).skipDirectInference; + } + function eNe(r) { + return !!(r.symbol && ut(r.symbol.declarations, $pe)); + } + function _rt(r, a) { + const l = r.texts[0], f = a.texts[0], m = r.texts[r.texts.length - 1], y = a.texts[a.texts.length - 1], x = Math.min(l.length, f.length), I = Math.min(m.length, y.length); + return l.slice(0, x) !== f.slice(0, x) || m.slice(m.length - I) !== y.slice(y.length - I); + } + function tNe(r, a) { + if (r === "") return !1; + const l = +r; + return isFinite(l) && (!a || "" + l === r); + } + function frt(r) { + return OG(lJ(r)); + } + function s$(r, a) { + if (a.flags & 1) + return !0; + if (a.flags & 134217732) + return Bs(r, a); + if (a.flags & 268435456) { + const l = []; + for (; a.flags & 268435456; ) + l.unshift(a.symbol), a = a.type; + return Eu(l, (m, y) => Ck(y, m), r) === r && s$(r, a); + } + return !1; + } + function rNe(r, a) { + if (a.flags & 2097152) + return Ri(a.types, (l) => l === Su || rNe(r, l)); + if (a.flags & 4 || Bs(r, a)) + return !0; + if (r.flags & 128) { + const l = r.value; + return !!(a.flags & 8 && tNe( + l, + /*roundTripOnly*/ + !1 + ) || a.flags & 64 && x5( + l, + /*roundTripOnly*/ + !1 + ) || a.flags & 98816 && l === a.intrinsicName || a.flags & 268435456 && s$(D_(l), a) || a.flags & 134217728 && a$(r, a)); + } + if (r.flags & 134217728) { + const l = r.texts; + return l.length === 2 && l[0] === "" && l[1] === "" && Bs(r.types[0], a); + } + return !1; + } + function nNe(r, a) { + return r.flags & 128 ? iNe([r.value], He, a) : r.flags & 134217728 ? rw(r.texts, a.texts) ? or(r.types, (l, f) => Bs(dg(l), dg(a.types[f])) ? l : prt(l)) : iNe(r.texts, r.types, a) : void 0; + } + function a$(r, a) { + const l = nNe(r, a); + return !!l && Ri(l, (f, m) => rNe(f, a.types[m])); + } + function prt(r) { + return r.flags & 402653317 ? r : XS(["", ""], [r]); + } + function iNe(r, a, l) { + const f = r.length - 1, m = r[0], y = r[f], x = l.texts, I = x.length - 1, R = x[0], J = x[I]; + if (f === 0 && m.length < R.length + J.length || !m.startsWith(R) || !y.endsWith(J)) return; + const ee = y.slice(0, y.length - J.length), Se = []; + let me = 0, Ve = R.length; + for (let er = 1; er < I; er++) { + const tr = x[er]; + if (tr.length > 0) { + let Rr = me, vn = Ve; + for (; vn = mt(Rr).indexOf(tr, vn), !(vn >= 0); ) { + if (Rr++, Rr === r.length) return; + vn = 0; + } + ht(Rr, vn), Ve += tr.length; + } else if (Ve < mt(me).length) + ht(me, Ve + 1); + else if (me < f) + ht(me + 1, 0); + else + return; + } + return ht(f, mt(f).length), Se; + function mt(er) { + return er < f ? r[er] : ee; + } + function ht(er, tr) { + const Rr = er === me ? D_(mt(er).slice(Ve, tr)) : XS( + [r[me].slice(Ve), ...r.slice(me + 1, er), mt(er).slice(0, tr)], + a.slice(me, er) + ); + Se.push(Rr), me = er, Ve = tr; + } + } + function drt(r, a) { + return la(a) && JAe(a, 0) === J_(r, pd(0)) && !Xc(a, "1"); + } + function Gh(r, a, l, f = 0, m = !1) { + let y = !1, x, I = 2048, R, J, ee, Se = 0; + me(a, l); + function me(Sr, Br) { + if (!(!S1(Br) || eE(Br))) { + if (Sr === lt || Sr === jt) { + const ki = x; + x = Sr, me(Br, Br), x = ki; + return; + } + if (Sr.aliasSymbol && Sr.aliasSymbol === Br.aliasSymbol) { + if (Sr.aliasTypeArguments) { + const ki = Ni(Sr.aliasSymbol).typeParameters, pn = Em(ki), Mi = p1(Sr.aliasTypeArguments, ki, pn, Qr(Sr.aliasSymbol.valueDeclaration)), Va = p1(Br.aliasTypeArguments, ki, pn, Qr(Sr.aliasSymbol.valueDeclaration)); + Rr(Mi, Va, OAe(Sr.aliasSymbol)); + } + return; + } + if (Sr === Br && Sr.flags & 3145728) { + for (const ki of Sr.types) + me(ki, ki); + return; + } + if (Br.flags & 1048576) { + const [ki, pn] = tr(Sr.flags & 1048576 ? Sr.types : [Sr], Br.types, mrt), [Mi, Va] = tr(ki, pn, grt); + if (Va.length === 0) + return; + if (Br = Gn(Va), Mi.length === 0) { + Ve( + Sr, + Br, + 1 + /* NakedTypeVariable */ + ); + return; + } + Sr = Gn(Mi); + } else if (Br.flags & 2097152 && !Ri(Br.types, NG) && !(Sr.flags & 1048576)) { + const [ki, pn] = tr(Sr.flags & 2097152 ? Sr.types : [Sr], Br.types, Wh); + if (ki.length === 0 || pn.length === 0) + return; + Sr = Ys(ki), Br = Ys(pn); + } + if (Br.flags & 41943040) { + if (eE(Br)) + return; + Br = g1(Br); + } + if (Br.flags & 8650752) { + if (eNe(Sr)) + return; + const ki = Cr(Br); + if (ki) { + if (wn(Sr) & 262144 || Sr === bt) + return; + if (!ki.isFixed) { + const Mi = x || Sr; + if (Mi === jt) + return; + if ((ki.priority === void 0 || f < ki.priority) && (ki.candidates = void 0, ki.contraCandidates = void 0, ki.topLevel = !0, ki.priority = f), f === ki.priority) { + if (drt(ki.typeParameter, Mi)) + return; + m && !y ? ls(ki.contraCandidates, Mi) || (ki.contraCandidates = Tr(ki.contraCandidates, Mi), n$(r)) : ls(ki.candidates, Mi) || (ki.candidates = Tr(ki.candidates, Mi), n$(r)); + } + !(f & 128) && Br.flags & 262144 && ki.topLevel && !F8(l, Br) && (ki.topLevel = !1, n$(r)); + } + I = Math.min(I, f); + return; + } + const pn = zh( + Br, + /*writing*/ + !1 + ); + if (pn !== Br) + me(Sr, pn); + else if (Br.flags & 8388608) { + const Mi = zh( + Br.indexType, + /*writing*/ + !1 + ); + if (Mi.flags & 465829888) { + const Va = iAe( + zh( + Br.objectType, + /*writing*/ + !1 + ), + Mi, + /*writing*/ + !1 + ); + Va && Va !== Br && me(Sr, Va); + } + } + } + if (wn(Sr) & 4 && wn(Br) & 4 && (Sr.target === Br.target || xp(Sr) && xp(Br)) && !(Sr.node && Br.node)) + Rr(Po(Sr), Po(Br), Ape(Sr.target)); + else if (Sr.flags & 4194304 && Br.flags & 4194304) + vn(Sr.type, Br.type); + else if ((w8(Sr) || Sr.flags & 4) && Br.flags & 4194304) { + const ki = srt(Sr); + mt( + ki, + Br.type, + 256 + /* LiteralKeyof */ + ); + } else if (Sr.flags & 8388608 && Br.flags & 8388608) + me(Sr.objectType, Br.objectType), me(Sr.indexType, Br.indexType); + else if (Sr.flags & 268435456 && Br.flags & 268435456) + Sr.symbol === Br.symbol && me(Sr.type, Br.type); + else if (Sr.flags & 33554432) + me(Sr.baseType, Br), Ve( + Hfe(Sr), + Br, + 4 + /* SubstituteSource */ + ); + else if (Br.flags & 16777216) + er(Sr, Br, jn); + else if (Br.flags & 3145728) + En(Sr, Br.types, Br.flags); + else if (Sr.flags & 1048576) { + const ki = Sr.types; + for (const pn of ki) + me(pn, Br); + } else if (Br.flags & 134217728) + qs(Sr, Br); + else { + if (Sr = Wd(Sr), B_(Sr) && B_(Br) && er(Sr, Br, ks), !(f & 512 && Sr.flags & 467927040)) { + const ki = ju(Sr); + if (ki !== Sr && !(ki.flags & 2621440)) + return me(ki, Br); + Sr = ki; + } + Sr.flags & 2621440 && er(Sr, Br, xa); + } + } + } + function Ve(Sr, Br, ki) { + const pn = f; + f |= ki, me(Sr, Br), f = pn; + } + function mt(Sr, Br, ki) { + const pn = f; + f |= ki, vn(Sr, Br), f = pn; + } + function ht(Sr, Br, ki, pn) { + const Mi = f; + f |= pn, En(Sr, Br, ki), f = Mi; + } + function er(Sr, Br, ki) { + const pn = Sr.id + "," + Br.id, Mi = R && R.get(pn); + if (Mi !== void 0) { + I = Math.min(I, Mi); + return; + } + (R || (R = /* @__PURE__ */ new Map())).set( + pn, + -1 + /* Circularity */ + ); + const Va = I; + I = 2048; + const Ra = Se; + (J ?? (J = [])).push(Sr), (ee ?? (ee = [])).push(Br), Nk(Sr, J, J.length, 2) && (Se |= 1), Nk(Br, ee, ee.length, 2) && (Se |= 2), Se !== 3 ? ki(Sr, Br) : I = -1, ee.pop(), J.pop(), Se = Ra, R.set(pn, I), I = Math.min(I, Va); + } + function tr(Sr, Br, ki) { + let pn, Mi; + for (const Va of Br) + for (const Ra of Sr) + ki(Ra, Va) && (me(Ra, Va), pn = sh(pn, Ra), Mi = sh(Mi, Va)); + return [ + pn ? Ln(Sr, (Va) => !ls(pn, Va)) : Sr, + Mi ? Ln(Br, (Va) => !ls(Mi, Va)) : Br + ]; + } + function Rr(Sr, Br, ki) { + const pn = Sr.length < Br.length ? Sr.length : Br.length; + for (let Mi = 0; Mi < pn; Mi++) + Mi < ki.length && (ki[Mi] & 7) === 2 ? vn(Sr[Mi], Br[Mi]) : me(Sr[Mi], Br[Mi]); + } + function vn(Sr, Br) { + m = !m, me(Sr, Br), m = !m; + } + function cr(Sr, Br) { + X || f & 1024 ? vn(Sr, Br) : me(Sr, Br); + } + function Cr(Sr) { + if (Sr.flags & 8650752) { + for (const Br of r) + if (Sr === Br.typeParameter) + return Br; + } + } + function Fr(Sr) { + let Br; + for (const ki of Sr) { + const pn = ki.flags & 2097152 && Nn(ki.types, (Mi) => !!Cr(Mi)); + if (!pn || Br && pn !== Br) + return; + Br = pn; + } + return Br; + } + function En(Sr, Br, ki) { + let pn = 0; + if (ki & 1048576) { + let Mi; + const Va = Sr.flags & 1048576 ? Sr.types : [Sr], Ra = new Array(Va.length); + let lu = !1; + for (const Js of Br) + if (Cr(Js)) + Mi = Js, pn++; + else + for (let ku = 0; ku < Va.length; ku++) { + const Xo = I; + I = 2048, me(Va[ku], Js), I === f && (Ra[ku] = !0), lu = lu || I === -1, I = Math.min(I, Xo); + } + if (pn === 0) { + const Js = Fr(Br); + Js && Ve( + Sr, + Js, + 1 + /* NakedTypeVariable */ + ); + return; + } + if (pn === 1 && !lu) { + const Js = Xs(Va, (ku, Xo) => Ra[Xo] ? void 0 : ku); + if (Js.length) { + me(Gn(Js), Mi); + return; + } + } + } else + for (const Mi of Br) + Cr(Mi) ? pn++ : me(Sr, Mi); + if (ki & 2097152 ? pn === 1 : pn > 0) + for (const Mi of Br) + Cr(Mi) && Ve( + Sr, + Mi, + 1 + /* NakedTypeVariable */ + ); + } + function Rn(Sr, Br, ki) { + if (ki.flags & 1048576 || ki.flags & 2097152) { + let pn = !1; + for (const Mi of ki.types) + pn = Rn(Sr, Br, Mi) || pn; + return pn; + } + if (ki.flags & 4194304) { + const pn = Cr(ki.type); + if (pn && !pn.isFixed && !eNe(Sr)) { + const Mi = ZAe(Sr, Br, ki); + Mi && Ve( + Mi, + pn.typeParameter, + wn(Sr) & 262144 ? 16 : 8 + /* HomomorphicMappedType */ + ); + } + return !0; + } + if (ki.flags & 262144) { + Ve( + Dm( + Sr, + /*indexFlags*/ + Sr.pattern ? 2 : 0 + /* None */ + ), + ki, + 32 + /* MappedTypeConstraint */ + ); + const pn = qS(ki); + if (pn && Rn(Sr, Br, pn)) + return !0; + const Mi = or(Wa(Sr), Zr), Va = or(Bu(Sr), (Ra) => Ra !== kr ? Ra.type : fr); + return me(Gn(Hi(Mi, Va)), Jh(Br)), !0; + } + return !1; + } + function jn(Sr, Br) { + if (Sr.flags & 16777216) + me(Sr.checkType, Br.checkType), me(Sr.extendsType, Br.extendsType), me(Uv(Sr), Uv(Br)), me(qv(Sr), qv(Br)); + else { + const ki = [Uv(Br), qv(Br)]; + ht(Sr, ki, Br.flags, m ? 64 : 0); + } + } + function qs(Sr, Br) { + const ki = nNe(Sr, Br), pn = Br.types; + if (ki || Ri(Br.texts, (Mi) => Mi.length === 0)) + for (let Mi = 0; Mi < pn.length; Mi++) { + const Va = ki ? ki[Mi] : fr, Ra = pn[Mi]; + if (Va.flags & 128 && Ra.flags & 8650752) { + const lu = Cr(Ra), Js = lu ? Hl(lu.typeParameter) : void 0; + if (Js && !Ea(Js)) { + const ku = Js.flags & 1048576 ? Js.types : [Js]; + let Xo = Eu(ku, (Qo, Yf) => Qo | Yf.flags, 0); + if (!(Xo & 4)) { + const Qo = Va.value; + Xo & 296 && !tNe( + Qo, + /*roundTripOnly*/ + !0 + ) && (Xo &= -297), Xo & 2112 && !x5( + Qo, + /*roundTripOnly*/ + !0 + ) && (Xo &= -2113); + const Yf = Eu(ku, (Tc, zc) => zc.flags & Xo ? Tc.flags & 4 ? Tc : zc.flags & 4 ? Va : Tc.flags & 134217728 ? Tc : zc.flags & 134217728 && a$(Va, zc) ? Va : Tc.flags & 268435456 ? Tc : zc.flags & 268435456 && Qo === eAe(zc.symbol, Qo) ? Va : Tc.flags & 128 ? Tc : zc.flags & 128 && zc.value === Qo ? zc : Tc.flags & 8 ? Tc : zc.flags & 8 ? pd(+Qo) : Tc.flags & 32 ? Tc : zc.flags & 32 ? pd(+Qo) : Tc.flags & 256 ? Tc : zc.flags & 256 && zc.value === +Qo ? zc : Tc.flags & 64 ? Tc : zc.flags & 64 ? frt(Qo) : Tc.flags & 2048 ? Tc : zc.flags & 2048 && Eb(zc.value) === Qo ? zc : Tc.flags & 16 ? Tc : zc.flags & 16 ? Qo === "true" ? wt : Qo === "false" ? dt : br : Tc.flags & 512 ? Tc : zc.flags & 512 && zc.intrinsicName === Qo ? zc : Tc.flags & 32768 ? Tc : zc.flags & 32768 && zc.intrinsicName === Qo ? zc : Tc.flags & 65536 ? Tc : zc.flags & 65536 && zc.intrinsicName === Qo ? zc : Tc : Tc, fr); + if (!(Yf.flags & 131072)) { + me(Yf, Ra); + continue; + } + } + } + } + me(Va, Ra); + } + } + function ks(Sr, Br) { + me(Xf(Sr), Xf(Br)), me(Jh(Sr), Jh(Br)); + const ki = q0(Sr), pn = q0(Br); + ki && pn && me(ki, pn); + } + function xa(Sr, Br) { + var ki, pn; + if (wn(Sr) & 4 && wn(Br) & 4 && (Sr.target === Br.target || xp(Sr) && xp(Br))) { + Rr(Po(Sr), Po(Br), Ape(Sr.target)); + return; + } + if (B_(Sr) && B_(Br) && ks(Sr, Br), wn(Br) & 32 && !Br.declaration.nameType) { + const Mi = Xf(Br); + if (Rn(Sr, Br, Mi)) + return; + } + if (!urt(Sr, Br)) { + if (Gv(Sr)) { + if (la(Br)) { + const Mi = G0(Sr), Va = G0(Br), Ra = Po(Br), lu = Br.target.elementFlags; + if (la(Sr) && Vtt(Sr, Br)) { + for (let Xo = 0; Xo < Va; Xo++) + me(Po(Sr)[Xo], Ra[Xo]); + return; + } + const Js = la(Sr) ? Math.min(Sr.target.fixedLength, Br.target.fixedLength) : 0, ku = Math.min(la(Sr) ? b8( + Sr.target, + 3 + /* Fixed */ + ) : 0, Br.target.hasRestElement ? b8( + Br.target, + 3 + /* Fixed */ + ) : 0); + for (let Xo = 0; Xo < Js; Xo++) + me(Po(Sr)[Xo], Ra[Xo]); + if (!la(Sr) || Mi - Js - ku === 1 && Sr.target.elementFlags[Js] & 4) { + const Xo = Po(Sr)[Js]; + for (let Qo = Js; Qo < Va - ku; Qo++) + me(lu[Qo] & 8 ? cu(Xo) : Xo, Ra[Qo]); + } else { + const Xo = Va - Js - ku; + if (Xo === 2) { + if (lu[Js] & lu[Js + 1] & 8) { + const Qo = Cr(Ra[Js]); + Qo && Qo.impliedArity !== void 0 && (me(OP(Sr, Js, ku + Mi - Qo.impliedArity), Ra[Js]), me(OP(Sr, Js + Qo.impliedArity, ku), Ra[Js + 1])); + } else if (lu[Js] & 8 && lu[Js + 1] & 4) { + const Qo = (ki = Cr(Ra[Js])) == null ? void 0 : ki.typeParameter, Yf = Qo && Hl(Qo); + if (Yf && la(Yf) && !Yf.target.hasRestElement) { + const Tc = Yf.target.fixedLength; + me(OP(Sr, Js, Mi - (Js + Tc)), Ra[Js]), me(MP(Sr, Js + Tc, ku), Ra[Js + 1]); + } + } else if (lu[Js] & 4 && lu[Js + 1] & 8) { + const Qo = (pn = Cr(Ra[Js + 1])) == null ? void 0 : pn.typeParameter, Yf = Qo && Hl(Qo); + if (Yf && la(Yf) && !Yf.target.hasRestElement) { + const Tc = Yf.target.fixedLength, zc = Mi - b8( + Br.target, + 3 + /* Fixed */ + ), Qh = zc - Tc, dE = gg( + Po(Sr).slice(Qh, zc), + Sr.target.elementFlags.slice(Qh, zc), + /*readonly*/ + !1, + Sr.target.labeledElementDeclarations && Sr.target.labeledElementDeclarations.slice(Qh, zc) + ); + me(MP(Sr, Js, ku + Tc), Ra[Js]), me(dE, Ra[Js + 1]); + } + } + } else if (Xo === 1 && lu[Js] & 8) { + const Qo = Br.target.elementFlags[Va - 1] & 2, Yf = OP(Sr, Js, ku); + Ve(Yf, Ra[Js], Qo ? 2 : 0); + } else if (Xo === 1 && lu[Js] & 4) { + const Qo = MP(Sr, Js, ku); + Qo && me(Qo, Ra[Js]); + } + } + for (let Xo = 0; Xo < ku; Xo++) + me(Po(Sr)[Mi - Xo - 1], Ra[Va - Xo - 1]); + return; + } + if (xp(Br)) { + dc(Sr, Br); + return; + } + } + is(Sr, Br), $o( + Sr, + Br, + 0 + /* Call */ + ), $o( + Sr, + Br, + 1 + /* Construct */ + ), dc(Sr, Br); + } + } + function is(Sr, Br) { + const ki = f1(Br); + for (const pn of ki) { + const Mi = js(Sr, pn.escapedName); + Mi && !ut(Mi.declarations, $pe) && me( + Hh(Zr(Mi), !!(Mi.flags & 16777216)), + Hh(Zr(pn), !!(pn.flags & 16777216)) + ); + } + } + function $o(Sr, Br, ki) { + const pn = xs(Sr, ki), Mi = pn.length; + if (Mi > 0) { + const Va = xs(Br, ki), Ra = Va.length; + for (let lu = 0; lu < Ra; lu++) { + const Js = Math.max(Mi - Ra + lu, 0); + Xl(yKe(pn[Js]), y8(Va[lu])); + } + } + } + function Xl(Sr, Br) { + if (!(Sr.flags & 64)) { + const ki = y, pn = Br.declaration ? Br.declaration.kind : 0; + y = y || pn === 174 || pn === 173 || pn === 176, Bpe(Sr, Br, cr), y = ki; + } + Jpe(Sr, Br, me); + } + function dc(Sr, Br) { + const ki = wn(Sr) & wn(Br) & 32 ? 8 : 0, pn = Bu(Br); + if (e$(Sr)) + for (const Mi of pn) { + const Va = []; + for (const Ra of Wa(Sr)) + if (Sk(kk( + Ra, + 8576 + /* StringOrNumberLiteralOrUnique */ + ), Mi.keyType)) { + const lu = Zr(Ra); + Va.push(Ra.flags & 16777216 ? KG(lu) : lu); + } + for (const Ra of Bu(Sr)) + Sk(Ra.keyType, Mi.keyType) && Va.push(Ra.type); + Va.length && Ve(Gn(Va), Mi.type, ki); + } + for (const Mi of pn) { + const Va = m8(Sr, Mi.keyType); + Va && Ve(Va.type, Mi.type, ki); + } + } + } + function mrt(r, a) { + return a === je ? r === a : Wh(r, a) || !!(a.flags & 4 && r.flags & 128 || a.flags & 8 && r.flags & 256); + } + function grt(r, a) { + return !!(r.flags & 524288 && a.flags & 524288 && r.symbol && r.symbol === a.symbol || r.aliasSymbol && r.aliasTypeArguments && r.aliasSymbol === a.aliasSymbol); + } + function hrt(r) { + const a = a_(r); + return !!a && Sc( + a.flags & 16777216 ? Cfe(a) : a, + 406978556 + /* StringMapping */ + ); + } + function Qv(r) { + return !!(wn(r) & 128); + } + function Xpe(r) { + return !!(wn(r) & 16512); + } + function yrt(r) { + if (r.length > 1) { + const a = Ln(r, Xpe); + if (a.length) { + const l = Gn( + a, + 2 + /* Subtype */ + ); + return Hi(Ln(r, (f) => !Xpe(f)), [l]); + } + } + return r; + } + function vrt(r) { + return r.priority & 416 ? Ys(r.contraCandidates) : Rtt(r.contraCandidates); + } + function brt(r, a) { + const l = yrt(r.candidates), f = hrt(r.typeParameter) || HS(r.typeParameter), m = !f && r.topLevel && (r.isFixed || !irt(a, r.typeParameter)), y = f ? Zc(l, Ju) : m ? Zc(l, $v) : l, x = r.priority & 416 ? Gn( + y, + 2 + /* Subtype */ + ) : Mtt(y); + return W_(x); + } + function Qpe(r, a) { + const l = r.inferences[a]; + if (!l.inferredType) { + let f, m; + if (r.signature) { + const x = l.candidates ? brt(l, r.signature) : void 0, I = l.contraCandidates ? vrt(l) : void 0; + if (x || I) { + const R = x && (!I || !(x.flags & 131072) && ut(l.contraCandidates, (J) => h1(x, J)) && Ri(r.inferences, (J) => J !== l && a_(J.typeParameter) !== l.typeParameter || Ri(J.candidates, (ee) => h1(ee, x)))); + f = R ? x : I, m = R ? I : x; + } else if (r.flags & 1) + f = mn; + else { + const R = GS(l.typeParameter); + R && (f = Ji(R, Xet($et(r, a), r.nonFixingMapper))); + } + } else + f = KAe(l); + l.inferredType = f || Ype(!!(r.flags & 2)); + const y = a_(l.typeParameter); + if (y) { + const x = Ji(y, r.nonFixingMapper); + (!f || !r.compareTypes(f, pf(x, f))) && (l.inferredType = m && r.compareTypes(m, pf(x, m)) ? m : x); + } + } + return l.inferredType; + } + function Ype(r) { + return r ? Ne : yt; + } + function Zpe(r) { + const a = []; + for (let l = 0; l < r.inferences.length; l++) + a.push(Qpe(r, l)); + return a; + } + function sNe(r) { + switch (r.escapedText) { + case "document": + case "console": + return p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom; + case "$": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery; + case "describe": + case "suite": + case "it": + case "test": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha; + case "process": + case "require": + case "Buffer": + case "module": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode; + case "Bun": + return F.types ? p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun_and_then_add_bun_to_the_types_field_in_your_tsconfig : p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_Bun_Try_npm_i_save_dev_types_Slashbun; + case "Map": + case "Set": + case "Promise": + case "Symbol": + case "WeakMap": + case "WeakSet": + case "Iterator": + case "AsyncIterator": + case "SharedArrayBuffer": + case "Atomics": + case "AsyncIterable": + case "AsyncIterableIterator": + case "AsyncGenerator": + case "AsyncGeneratorFunction": + case "BigInt": + case "Reflect": + case "BigInt64Array": + case "BigUint64Array": + return p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later; + case "await": + if (Es(r.parent)) + return p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; + default: + return r.parent.kind === 304 ? p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer : p.Cannot_find_name_0; + } + } + function df(r) { + const a = bn(r); + return a.resolvedSymbol || (a.resolvedSymbol = !ic(r) && Kt( + r, + r, + 1160127, + sNe(r), + !Y7(r), + /*excludeGlobals*/ + !1 + ) || nt), a.resolvedSymbol; + } + function Kpe(r) { + return !!(r.flags & 33554432 || sr(r, (a) => Vl(a) || Rp(a) || Xu(a))); + } + function nM(r, a, l, f) { + switch (r.kind) { + case 80: + if (!Tb(r)) { + const x = df(r); + return x !== nt ? `${f ? ja(f) : "-1"}|${Fl(a)}|${Fl(l)}|${$s(x)}` : void 0; + } + case 110: + return `0|${f ? ja(f) : "-1"}|${Fl(a)}|${Fl(l)}`; + case 235: + case 217: + return nM(r.expression, a, l, f); + case 166: + const m = nM(r.left, a, l, f); + return m && `${m}.${r.right.escapedText}`; + case 211: + case 212: + const y = rT(r); + if (y !== void 0) { + const x = nM(r.expression, a, l, f); + return x && `${x}.${y}`; + } + if (ho(r) && Re(r.argumentExpression)) { + const x = df(r.argumentExpression); + if (Ik(x) || R8(x) && !fM(x)) { + const I = nM(r.expression, a, l, f); + return I && `${I}.@${$s(x)}`; + } + } + break; + case 206: + case 207: + case 262: + case 218: + case 219: + case 174: + return `${ja(r)}#${Fl(a)}`; + } + } + function Ll(r, a) { + switch (a.kind) { + case 217: + case 235: + return Ll(r, a.expression); + case 226: + return Tl(a) && Ll(r, a.left) || cn(a) && a.operatorToken.kind === 28 && Ll(r, a.right); + } + switch (r.kind) { + case 236: + return a.kind === 236 && r.keywordToken === a.keywordToken && r.name.escapedText === a.name.escapedText; + case 80: + case 81: + return Tb(r) ? a.kind === 110 : a.kind === 80 && df(r) === df(a) || (ti(a) || da(a)) && R_(df(r)) === xn(a); + case 110: + return a.kind === 110; + case 108: + return a.kind === 108; + case 235: + case 217: + return Ll(r.expression, a); + case 211: + case 212: + const l = rT(r); + if (l !== void 0) { + const f = go(a) ? rT(a) : void 0; + if (f !== void 0) + return f === l && Ll(r.expression, a.expression); + } + if (ho(r) && ho(a) && Re(r.argumentExpression) && Re(a.argumentExpression)) { + const f = df(r.argumentExpression); + if (f === df(a.argumentExpression) && (Ik(f) || R8(f) && !fM(f))) + return Ll(r.expression, a.expression); + } + break; + case 166: + return go(a) && r.right.escapedText === rT(a) && Ll(r.left, a.expression); + case 226: + return cn(r) && r.operatorToken.kind === 28 && Ll(r.right, a); + } + return !1; + } + function rT(r) { + if (Dn(r)) + return r.name.escapedText; + if (ho(r)) + return Srt(r); + if (da(r)) { + const a = gt(r); + return a ? Ko(a) : void 0; + } + if (ji(r)) + return "" + r.parent.parameters.indexOf(r); + } + function ede(r) { + return r.flags & 8192 ? r.escapedName : r.flags & 384 ? Ko("" + r.value) : void 0; + } + function Srt(r) { + return Pf(r.argumentExpression) ? Ko(r.argumentExpression.text) : fo(r.argumentExpression) ? Trt(r.argumentExpression) : void 0; + } + function Trt(r) { + const a = No( + r, + 111551, + /*ignoreErrors*/ + !0 + ); + if (!a || !(Ik(a) || a.flags & 8)) return; + const l = a.valueDeclaration; + if (l === void 0) return; + const f = ze(l); + if (f) { + const m = ede(f); + if (m !== void 0) + return m; + } + if (U2(l) && cg(l, r)) { + const m = o3(l); + if (m) { + const y = Ts(l.parent) ? dr(l) : $l(m); + return y && ede(y); + } + if (Py(l)) + return OT(l.name); + } + } + function aNe(r, a) { + for (; go(r); ) + if (r = r.expression, Ll(r, a)) + return !0; + return !1; + } + function nT(r, a) { + for (; fu(r); ) + if (r = r.expression, Ll(r, a)) + return !0; + return !1; + } + function RP(r, a) { + if (r && r.flags & 1048576) { + const l = o3e(r, a); + if (l && gc(l) & 2) + return l.links.isDiscriminantProperty === void 0 && (l.links.isDiscriminantProperty = (l.links.checkFlags & 192) === 192 && !Ek(Zr(l))), !!l.links.isDiscriminantProperty; + } + return !1; + } + function oNe(r, a) { + let l; + for (const f of r) + if (RP(a, f.escapedName)) { + if (l) { + l.push(f); + continue; + } + l = [f]; + } + return l; + } + function xrt(r, a) { + const l = /* @__PURE__ */ new Map(); + let f = 0; + for (const m of r) + if (m.flags & 61603840) { + const y = Xc(m, a); + if (y) { + if (!w8(y)) + return; + let x = !1; + sT(y, (I) => { + const R = Fl(Ju(I)), J = l.get(R); + J ? J !== yt && (l.set(R, yt), x = !0) : l.set(R, m); + }), x || f++; + } + } + return f >= 10 && f * 2 >= r.length ? l : void 0; + } + function iM(r) { + const a = r.types; + if (!(a.length < 10 || wn(r) & 32768 || ty(a, (l) => !!(l.flags & 59506688)) < 10)) { + if (r.keyPropertyName === void 0) { + const l = rr(a, (m) => m.flags & 59506688 ? rr(Wa(m), (y) => Vd(Zr(y)) ? y.escapedName : void 0) : void 0), f = l && xrt(a, l); + r.keyPropertyName = f ? l : "", r.constituentMap = f; + } + return r.keyPropertyName.length ? r.keyPropertyName : void 0; + } + } + function sM(r, a) { + var l; + const f = (l = r.constituentMap) == null ? void 0 : l.get(Fl(Ju(a))); + return f !== yt ? f : void 0; + } + function cNe(r, a) { + const l = iM(r), f = l && Xc(a, l); + return f && sM(r, f); + } + function krt(r, a) { + const l = iM(r), f = l && Nn(a.properties, (y) => y.symbol && y.kind === 303 && y.symbol.escapedName === l && mM(y.initializer)), m = f && MM(f.initializer); + return m && sM(r, m); + } + function lNe(r, a) { + return Ll(r, a) || aNe(r, a); + } + function uNe(r, a) { + if (r.arguments) { + for (const l of r.arguments) + if (lNe(a, l) || nT(l, a)) + return !0; + } + return !!(r.expression.kind === 211 && lNe(a, r.expression.expression)); + } + function tde(r) { + return r.id <= 0 && (r.id = q1e, q1e++), r.id; + } + function Crt(r, a) { + if (!(r.flags & 1048576)) + return Bs(r, a); + for (const l of r.types) + if (Bs(l, a)) + return !0; + return !1; + } + function Ert(r, a) { + if (r === a) + return r; + if (a.flags & 131072) + return a; + const l = `A${Fl(r)},${Fl(a)}`; + return F0(l) ?? Wy(l, Drt(r, a)); + } + function Drt(r, a) { + const l = Jc(r, (m) => Crt(a, m)), f = a.flags & 512 && v2(a) ? Ho(l, Pk) : l; + return Bs(a, f) ? f : r; + } + function rde(r) { + const a = zd(r); + return !!(a.callSignatures.length || a.constructSignatures.length || a.members.get("bind") && h1(r, kc)); + } + function nE(r, a) { + return nde(r, a) & a; + } + function Ud(r, a) { + return nE(r, a) !== 0; + } + function nde(r, a) { + r.flags & 467927040 && (r = Hl(r) || yt); + const l = r.flags; + if (l & 268435460) + return K ? 16317953 : 16776705; + if (l & 134217856) { + const f = l & 128 && r.value === ""; + return K ? f ? 12123649 : 7929345 : f ? 12582401 : 16776705; + } + if (l & 40) + return K ? 16317698 : 16776450; + if (l & 256) { + const f = r.value === 0; + return K ? f ? 12123394 : 7929090 : f ? 12582146 : 16776450; + } + if (l & 64) + return K ? 16317188 : 16775940; + if (l & 2048) { + const f = qAe(r); + return K ? f ? 12122884 : 7928580 : f ? 12581636 : 16775940; + } + return l & 16 ? K ? 16316168 : 16774920 : l & 528 ? K ? r === dt || r === xt ? 12121864 : 7927560 : r === dt || r === xt ? 12580616 : 16774920 : l & 524288 ? a & (K ? 83427327 : 83886079) ? wn(r) & 16 && Vh(r) ? K ? 83427327 : 83886079 : rde(r) ? K ? 7880640 : 16728e3 : K ? 7888800 : 16736160 : 0 : l & 16384 ? 9830144 : l & 32768 ? 26607360 : l & 65536 ? 42917664 : l & 12288 ? K ? 7925520 : 16772880 : l & 67108864 ? K ? 7888800 : 16736160 : l & 131072 ? 0 : l & 1048576 ? Eu( + r.types, + (f, m) => f | nde(m, a), + 0 + /* None */ + ) : l & 2097152 ? Prt(r, a) : 83886079; + } + function Prt(r, a) { + const l = Sc( + r, + 402784252 + /* Primitive */ + ); + let f = 0, m = 134217727; + for (const y of r.types) + if (!(l && y.flags & 524288)) { + const x = nde(y, a); + f |= x, m &= x; + } + return f & 8256 | m & 134209471; + } + function qp(r, a) { + return Jc(r, (l) => Ud(l, a)); + } + function iT(r, a) { + const l = fNe(qp(K && r.flags & 2 ? ql : r, a)); + if (K) + switch (a) { + case 524288: + return _Ne(l, 65536, 131072, 33554432, he); + case 1048576: + return _Ne(l, 131072, 65536, 16777216, Ut); + case 2097152: + case 4194304: + return Ho(l, (f) => Ud( + f, + 262144 + /* EQUndefinedOrNull */ + ) ? Htt(f) : f); + } + return l; + } + function _Ne(r, a, l, f, m) { + const y = nE( + r, + 50528256 + /* IsNull */ + ); + if (!(y & a)) + return r; + const x = Gn([bi, m]); + return Ho(r, (I) => Ud(I, a) ? Ys([I, !(y & f) && Ud(I, l) ? x : bi]) : I); + } + function fNe(r) { + return r === ql ? yt : r; + } + function ide(r, a) { + return a ? Gn([gk(r), $l(a)]) : r; + } + function pNe(r, a) { + var l; + const f = X0(a); + if (!Fp(f)) return be; + const m = Lp(f); + return Xc(r, m) || L8((l = Tk(r, m)) == null ? void 0 : l.type) || be; + } + function dNe(r, a) { + return V_(r, LP) && JAe(r, a) || L8(K0( + 65, + r, + Ut, + /*errorNode*/ + void 0 + )) || be; + } + function L8(r) { + return r && (F.noUncheckedIndexedAccess ? Gn([r, je]) : r); + } + function mNe(r) { + return cu(K0( + 65, + r, + Ut, + /*errorNode*/ + void 0 + ) || be); + } + function wrt(r) { + return r.parent.kind === 209 && sde(r.parent) || r.parent.kind === 303 && sde(r.parent.parent) ? ide(aM(r), r.right) : $l(r.right); + } + function sde(r) { + return r.parent.kind === 226 && r.parent.left === r || r.parent.kind === 250 && r.parent.initializer === r; + } + function Art(r, a) { + return dNe(aM(r), r.elements.indexOf(a)); + } + function Nrt(r) { + return mNe(aM(r.parent)); + } + function gNe(r) { + return pNe(aM(r.parent), r.name); + } + function Irt(r) { + return ide(gNe(r), r.objectAssignmentInitializer); + } + function aM(r) { + const { parent: a } = r; + switch (a.kind) { + case 249: + return we; + case 250: + return WM(a) || be; + case 226: + return wrt(a); + case 220: + return Ut; + case 209: + return Art(a, r); + case 230: + return Nrt(a); + case 303: + return gNe(a); + case 304: + return Irt(a); + } + return be; + } + function Ort(r) { + const a = r.parent, l = yNe(a.parent), f = a.kind === 206 ? pNe(l, r.propertyName || r.name) : r.dotDotDotToken ? mNe(l) : dNe(l, a.elements.indexOf(r)); + return ide(f, r.initializer); + } + function hNe(r) { + return bn(r).resolvedType || $l(r); + } + function Frt(r) { + return r.initializer ? hNe(r.initializer) : r.parent.parent.kind === 249 ? we : r.parent.parent.kind === 250 && WM(r.parent.parent) || be; + } + function yNe(r) { + return r.kind === 260 ? Frt(r) : Ort(r); + } + function Lrt(r) { + return r.kind === 260 && r.initializer && ni(r.initializer) || r.kind !== 208 && r.parent.kind === 226 && ni(r.parent.right); + } + function T2(r) { + switch (r.kind) { + case 217: + return T2(r.expression); + case 226: + switch (r.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return T2(r.left); + case 28: + return T2(r.right); + } + } + return r; + } + function vNe(r) { + const { parent: a } = r; + return a.kind === 217 || a.kind === 226 && a.operatorToken.kind === 64 && a.left === r || a.kind === 226 && a.operatorToken.kind === 28 && a.right === r ? vNe(a) : r; + } + function Mrt(r) { + return r.kind === 296 ? Ju($l(r.expression)) : fr; + } + function o$(r) { + const a = bn(r); + if (!a.switchTypes) { + a.switchTypes = []; + for (const l of r.caseBlock.clauses) + a.switchTypes.push(Mrt(l)); + } + return a.switchTypes; + } + function bNe(r) { + if (ut(r.caseBlock.clauses, (l) => l.kind === 296 && !Ga(l.expression))) + return; + const a = []; + for (const l of r.caseBlock.clauses) { + const f = l.kind === 296 ? l.expression.text : void 0; + a.push(f && !ls(a, f) ? f : void 0); + } + return a; + } + function Rrt(r, a) { + return r.flags & 1048576 ? !rr(r.types, (l) => !ls(a, l)) : ls(a, r); + } + function jP(r, a) { + return !!(r === a || r.flags & 131072 || a.flags & 1048576 && jrt(r, a)); + } + function jrt(r, a) { + if (r.flags & 1048576) { + for (const l of r.types) + if (!$0(a.types, l)) + return !1; + return !0; + } + return r.flags & 1056 && vp(r) === a ? !0 : $0(a.types, r); + } + function sT(r, a) { + return r.flags & 1048576 ? rr(r.types, a) : a(r); + } + function Hp(r, a) { + return r.flags & 1048576 ? ut(r.types, a) : a(r); + } + function V_(r, a) { + return r.flags & 1048576 ? Ri(r.types, a) : a(r); + } + function Brt(r, a) { + return r.flags & 3145728 ? Ri(r.types, a) : a(r); + } + function Jc(r, a) { + if (r.flags & 1048576) { + const l = r.types, f = Ln(l, a); + if (f === l) + return r; + const m = r.origin; + let y; + if (m && m.flags & 1048576) { + const x = m.types, I = Ln(x, (R) => !!(R.flags & 1048576) || a(R)); + if (x.length - I.length === l.length - f.length) { + if (I.length === 1) + return I[0]; + y = ipe(1048576, I); + } + } + return ape( + f, + r.objectFlags & 16809984, + /*aliasSymbol*/ + void 0, + /*aliasTypeArguments*/ + void 0, + y + ); + } + return r.flags & 131072 || a(r) ? r : fr; + } + function c$(r, a) { + return Jc(r, (l) => l !== a); + } + function Jrt(r) { + return r.flags & 1048576 ? r.types.length : 1; + } + function Ho(r, a, l) { + if (r.flags & 131072) + return r; + if (!(r.flags & 1048576)) + return a(r); + const f = r.origin, m = f && f.flags & 1048576 ? f.types : r.types; + let y, x = !1; + for (const I of m) { + const R = I.flags & 1048576 ? Ho(I, a, l) : a(I); + x || (x = I !== R), R && (y ? y.push(R) : y = [R]); + } + return x ? y && Gn( + y, + l ? 0 : 1 + /* Literal */ + ) : r; + } + function SNe(r, a, l, f) { + return r.flags & 1048576 && l ? Gn(or(r.types, a), 1, l, f) : Ho(r, a); + } + function BP(r, a) { + return Jc(r, (l) => (l.flags & a) !== 0); + } + function TNe(r, a) { + return Sc( + r, + 134217804 + /* BigInt */ + ) && Sc( + a, + 402655616 + /* BigIntLiteral */ + ) ? Ho(r, (l) => l.flags & 4 ? BP( + a, + 402653316 + /* StringMapping */ + ) : QS(l) && !Sc( + a, + 402653188 + /* StringMapping */ + ) ? BP( + a, + 128 + /* StringLiteral */ + ) : l.flags & 8 ? BP( + a, + 264 + /* NumberLiteral */ + ) : l.flags & 64 ? BP( + a, + 2112 + /* BigIntLiteral */ + ) : l) : r; + } + function iE(r) { + return r.flags === 0; + } + function aT(r) { + return r.flags === 0 ? r.type : r; + } + function sE(r, a) { + return a ? { flags: 0, type: r.flags & 131072 ? mn : r } : r; + } + function zrt(r) { + const a = yp( + 256 + /* EvolvingArray */ + ); + return a.elementType = r, a; + } + function ade(r) { + return Yt[r.id] || (Yt[r.id] = zrt(r)); + } + function xNe(r, a) { + const l = I8(Uh(MM(a))); + return jP(l, r.elementType) ? r : ade(Gn([r.elementType, l])); + } + function Wrt(r) { + return r.flags & 131072 ? to : cu( + r.flags & 1048576 ? Gn( + r.types, + 2 + /* Subtype */ + ) : r + ); + } + function Vrt(r) { + return r.finalArrayType || (r.finalArrayType = Wrt(r.elementType)); + } + function oM(r) { + return wn(r) & 256 ? Vrt(r) : r; + } + function Urt(r) { + return wn(r) & 256 ? r.elementType : fr; + } + function qrt(r) { + let a = !1; + for (const l of r) + if (!(l.flags & 131072)) { + if (!(wn(l) & 256)) + return !1; + a = !0; + } + return a; + } + function kNe(r) { + const a = vNe(r), l = a.parent, f = Dn(l) && (l.name.escapedText === "length" || l.parent.kind === 213 && Re(l.name) && mB(l.name)), m = l.kind === 212 && l.expression === a && l.parent.kind === 226 && l.parent.operatorToken.kind === 64 && l.parent.left === l && !u0(l.parent) && Gl( + $l(l.argumentExpression), + 296 + /* NumberLike */ + ); + return f || m; + } + function Hrt(r) { + return (ti(r) || rs(r) || I_(r) || ji(r)) && !!(Vc(r) || Qr(r) && i0(r) && r.initializer && Sy(r.initializer) && K_(r.initializer)); + } + function l$(r, a) { + if (r = bc(r), r.flags & 8752) + return Zr(r); + if (r.flags & 7) { + if (gc(r) & 262144) { + const f = r.links.syntheticOrigin; + if (f && l$(f)) + return Zr(r); + } + const l = r.valueDeclaration; + if (l) { + if (Hrt(l)) + return Zr(r); + if (ti(l) && l.parent.parent.kind === 250) { + const f = l.parent.parent, m = cM( + f.expression, + /*diagnostic*/ + void 0 + ); + if (m) { + const y = f.awaitModifier ? 15 : 13; + return K0( + y, + m, + Ut, + /*errorNode*/ + void 0 + ); + } + } + a && Fs(a, Xr(l, p._0_needs_an_explicit_type_annotation, Si(r))); + } + } + } + function cM(r, a) { + if (!(r.flags & 67108864)) + switch (r.kind) { + case 80: + const l = R_(df(r)); + return l$(l, a); + case 110: + return pnt(r); + case 108: + return m$(r); + case 211: { + const f = cM(r.expression, a); + if (f) { + const m = r.name; + let y; + if (wi(m)) { + if (!f.symbol) + return; + y = js(f, x3(f.symbol, m.escapedText)); + } else + y = js(f, m.escapedText); + return y && l$(y, a); + } + return; + } + case 217: + return cM(r.expression, a); + } + } + function lM(r) { + const a = bn(r); + let l = a.effectsSignature; + if (l === void 0) { + let f; + if (cn(r)) { + const x = oE(r.right); + f = ime(x); + } else r.parent.kind === 244 ? f = cM( + r.expression, + /*diagnostic*/ + void 0 + ) : r.expression.kind !== 108 && (fu(r) ? f = Am( + A8(qi(r.expression), r.expression), + r.expression + ) : f = oE(r.expression)); + const m = xs( + f && ju(f) || yt, + 0 + /* Call */ + ), y = m.length === 1 && !m[0].typeParameters ? m[0] : ut(m, CNe) ? lE(r) : void 0; + l = a.effectsSignature = y && CNe(y) ? y : Me; + } + return l === Me ? void 0 : l; + } + function CNe(r) { + return !!(bp(r) || r.declaration && (Y6(r.declaration) || yt).flags & 131072); + } + function Grt(r, a) { + if (r.kind === 1 || r.kind === 3) + return a.arguments[r.parameterIndex]; + const l = Ja(a.expression); + return go(l) ? Ja(l.expression) : void 0; + } + function $rt(r) { + const a = sr(r, vj), l = xr(r), f = Hm(l, a.statements.pos); + La.add(xl(l, f.start, f.length, p.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); + } + function uM(r) { + const a = u$( + r, + /*noCacheCheck*/ + !1 + ); + return A0 = r, N0 = a, a; + } + function _M(r) { + const a = Ja( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + return a.kind === 97 || a.kind === 226 && (a.operatorToken.kind === 56 && (_M(a.left) || _M(a.right)) || a.operatorToken.kind === 57 && _M(a.left) && _M(a.right)); + } + function u$(r, a) { + for (; ; ) { + if (r === A0) + return N0; + const l = r.flags; + if (l & 4096) { + if (!a) { + const f = tde(r), m = Zx[f]; + return m !== void 0 ? m : Zx[f] = u$( + r, + /*noCacheCheck*/ + !0 + ); + } + a = !1; + } + if (l & 368) + r = r.antecedent; + else if (l & 512) { + const f = lM(r.node); + if (f) { + const m = bp(f); + if (m && m.kind === 3 && !m.type) { + const y = r.node.arguments[m.parameterIndex]; + if (y && _M(y)) + return !1; + } + if (Ha(f).flags & 131072) + return !1; + } + r = r.antecedent; + } else { + if (l & 4) + return ut(r.antecedent, (f) => u$( + f, + /*noCacheCheck*/ + !1 + )); + if (l & 8) { + const f = r.antecedent; + if (f === void 0 || f.length === 0) + return !1; + r = f[0]; + } else if (l & 128) { + const f = r.node; + if (f.clauseStart === f.clauseEnd && pIe(f.switchStatement)) + return !1; + r = r.antecedent; + } else if (l & 1024) { + A0 = void 0; + const f = r.node.target, m = f.antecedent; + f.antecedent = r.node.antecedents; + const y = u$( + r.antecedent, + /*noCacheCheck*/ + !1 + ); + return f.antecedent = m, y; + } else + return !(l & 1); + } + } + } + function _$(r, a) { + for (; ; ) { + const l = r.flags; + if (l & 4096) { + if (!a) { + const f = tde(r), m = P6[f]; + return m !== void 0 ? m : P6[f] = _$( + r, + /*noCacheCheck*/ + !0 + ); + } + a = !1; + } + if (l & 496) + r = r.antecedent; + else if (l & 512) { + if (r.node.expression.kind === 108) + return !0; + r = r.antecedent; + } else { + if (l & 4) + return Ri(r.antecedent, (f) => _$( + f, + /*noCacheCheck*/ + !1 + )); + if (l & 8) + r = r.antecedent[0]; + else if (l & 1024) { + const f = r.node.target, m = f.antecedent; + f.antecedent = r.node.antecedents; + const y = _$( + r.antecedent, + /*noCacheCheck*/ + !1 + ); + return f.antecedent = m, y; + } else + return !!(l & 1); + } + } + } + function ode(r) { + switch (r.kind) { + case 110: + return !0; + case 80: + if (!Tb(r)) { + const l = df(r); + return Ik(l) || R8(l) && !fM(l) || !!l.valueDeclaration && po(l.valueDeclaration); + } + break; + case 211: + case 212: + return ode(r.expression) && Hd(bn(r).resolvedSymbol || nt); + case 206: + case 207: + const a = nm(r.parent); + return ji(a) || yee(a) ? !cde(a) : ti(a) && rI(a); + } + return !1; + } + function $h(r, a, l = a, f, m = ((y) => (y = Jn(r, g3)) == null ? void 0 : y.flowNode)()) { + let y, x = !1, I = 0; + if (S_) + return be; + if (!m) + return a; + Od++; + const R = t_, J = aT(me(m)); + t_ = R; + const ee = wn(J) & 256 && kNe(r) ? to : oM(J); + if (ee === Fi || r.parent && r.parent.kind === 235 && !(ee.flags & 131072) && qp( + ee, + 2097152 + /* NEUndefinedOrNull */ + ).flags & 131072) + return a; + return ee; + function Se() { + return x ? y : (x = !0, y = nM(r, a, l, f)); + } + function me(Dt) { + var ar; + if (I === 2e3) + return (ar = rn) == null || ar.instant(rn.Phase.CheckTypes, "getTypeAtFlowNode_DepthLimit", { flowId: Dt.id }), S_ = !0, $rt(r), be; + I++; + let Er; + for (; ; ) { + const qr = Dt.flags; + if (qr & 4096) { + for (let Yn = R; Yn < t_; Yn++) + if (By[Yn] === Dt) + return I--, Wp[Yn]; + Er = Dt; + } + let Sn; + if (qr & 16) { + if (Sn = mt(Dt), !Sn) { + Dt = Dt.antecedent; + continue; + } + } else if (qr & 512) { + if (Sn = er(Dt), !Sn) { + Dt = Dt.antecedent; + continue; + } + } else if (qr & 96) + Sn = Rr(Dt); + else if (qr & 128) + Sn = vn(Dt); + else if (qr & 12) { + if (Dt.antecedent.length === 1) { + Dt = Dt.antecedent[0]; + continue; + } + Sn = qr & 4 ? cr(Dt) : Cr(Dt); + } else if (qr & 256) { + if (Sn = tr(Dt), !Sn) { + Dt = Dt.antecedent; + continue; + } + } else if (qr & 1024) { + const Yn = Dt.node.target, Hs = Yn.antecedent; + Yn.antecedent = Dt.node.antecedents, Sn = me(Dt.antecedent), Yn.antecedent = Hs; + } else if (qr & 2) { + const Yn = Dt.node; + if (Yn && Yn !== f && r.kind !== 211 && r.kind !== 212 && !(r.kind === 110 && Yn.kind !== 219)) { + Dt = Yn.flowNode; + continue; + } + Sn = l; + } else + Sn = K8(a); + return Er && (By[t_] = Er, Wp[t_] = Sn, t_++), I--, Sn; + } + } + function Ve(Dt) { + const ar = Dt.node; + return lde( + ar.kind === 260 || ar.kind === 208 ? yNe(ar) : aM(ar), + r + ); + } + function mt(Dt) { + const ar = Dt.node; + if (Ll(r, ar)) { + if (!uM(Dt)) + return Fi; + if (G1(ar) === 2) { + const qr = me(Dt.antecedent); + return sE(Uh(aT(qr)), iE(qr)); + } + if (a === et || a === to) { + if (Lrt(ar)) + return ade(fr); + const qr = $v(Ve(Dt)); + return Bs(qr, a) ? qr : Do; + } + const Er = oB(ar) ? Uh(a) : a; + return Er.flags & 1048576 ? Ert(Er, Ve(Dt)) : Er; + } + if (aNe(r, ar)) { + if (!uM(Dt)) + return Fi; + if (ti(ar) && (Qr(ar) || rI(ar))) { + const Er = l4(ar); + if (Er && (Er.kind === 218 || Er.kind === 219)) + return me(Dt.antecedent); + } + return a; + } + if (ti(ar) && ar.parent.parent.kind === 249 && (Ll(r, ar.parent.parent.expression) || nT(ar.parent.parent.expression, r))) + return Pde(oM(aT(me(Dt.antecedent)))); + } + function ht(Dt, ar) { + const Er = Ja( + ar, + /*excludeJSDocTypeAssertions*/ + !0 + ); + if (Er.kind === 97) + return Fi; + if (Er.kind === 226) { + if (Er.operatorToken.kind === 56) + return ht(ht(Dt, Er.left), Er.right); + if (Er.operatorToken.kind === 57) + return Gn([ht(Dt, Er.left), ht(Dt, Er.right)]); + } + return uu( + Dt, + Er, + /*assumeTrue*/ + !0 + ); + } + function er(Dt) { + const ar = lM(Dt.node); + if (ar) { + const Er = bp(ar); + if (Er && (Er.kind === 2 || Er.kind === 3)) { + const qr = me(Dt.antecedent), Sn = oM(aT(qr)), Yn = Er.type ? nI( + Sn, + Er, + Dt.node, + /*assumeTrue*/ + !0 + ) : Er.kind === 3 && Er.parameterIndex >= 0 && Er.parameterIndex < Dt.node.arguments.length ? ht(Sn, Dt.node.arguments[Er.parameterIndex]) : Sn; + return Yn === Sn ? qr : sE(Yn, iE(qr)); + } + if (Ha(ar).flags & 131072) + return Fi; + } + } + function tr(Dt) { + if (a === et || a === to) { + const ar = Dt.node, Er = ar.kind === 213 ? ar.expression.expression : ar.left.expression; + if (Ll(r, T2(Er))) { + const qr = me(Dt.antecedent), Sn = aT(qr); + if (wn(Sn) & 256) { + let Yn = Sn; + if (ar.kind === 213) + for (const Hs of ar.arguments) + Yn = xNe(Yn, Hs); + else { + const Hs = MM(ar.left.argumentExpression); + Gl( + Hs, + 296 + /* NumberLike */ + ) && (Yn = xNe(Yn, ar.right)); + } + return Yn === Sn ? qr : sE(Yn, iE(qr)); + } + return qr; + } + } + } + function Rr(Dt) { + const ar = me(Dt.antecedent), Er = aT(ar); + if (Er.flags & 131072) + return ar; + const qr = (Dt.flags & 32) !== 0, Sn = oM(Er), Yn = uu(Sn, Dt.node, qr); + return Yn === Sn ? ar : sE(Yn, iE(ar)); + } + function vn(Dt) { + const ar = Ja(Dt.node.switchStatement.expression), Er = me(Dt.antecedent); + let qr = aT(Er); + if (Ll(r, ar)) + qr = Ra(qr, Dt.node); + else if (ar.kind === 221 && Ll(r, ar.expression)) + qr = ku(qr, Dt.node); + else if (ar.kind === 112) + qr = Xo(qr, Dt.node); + else { + K && (nT(ar, r) ? qr = Va(qr, Dt.node, (Yn) => !(Yn.flags & 163840)) : ar.kind === 221 && nT(ar.expression, r) && (qr = Va(qr, Dt.node, (Yn) => !(Yn.flags & 131072 || Yn.flags & 128 && Yn.value === "undefined")))); + const Sn = Rn(ar, qr); + Sn && (qr = ks(qr, Sn, Dt.node)); + } + return sE(qr, iE(Er)); + } + function cr(Dt) { + const ar = []; + let Er = !1, qr = !1, Sn; + for (const Yn of Dt.antecedent) { + if (!Sn && Yn.flags & 128 && Yn.node.clauseStart === Yn.node.clauseEnd) { + Sn = Yn; + continue; + } + const Hs = me(Yn), Zs = aT(Hs); + if (Zs === a && a === l) + return Zs; + Zf(ar, Zs), jP(Zs, l) || (Er = !0), iE(Hs) && (qr = !0); + } + if (Sn) { + const Yn = me(Sn), Hs = aT(Yn); + if (!(Hs.flags & 131072) && !ls(ar, Hs) && !pIe(Sn.node.switchStatement)) { + if (Hs === a && a === l) + return Hs; + ar.push(Hs), jP(Hs, l) || (Er = !0), iE(Yn) && (qr = !0); + } + } + return sE(Fr( + ar, + Er ? 2 : 1 + /* Literal */ + ), qr); + } + function Cr(Dt) { + const ar = tde(Dt), Er = ca[ar] || (ca[ar] = /* @__PURE__ */ new Map()), qr = Se(); + if (!qr) + return a; + const Sn = Er.get(qr); + if (Sn) + return Sn; + for (let ue = cf; ue < za; ue++) + if (El[ue] === Dt && Tu[ue] === qr && mp[ue].length) + return sE( + Fr( + mp[ue], + 1 + /* Literal */ + ), + /*incomplete*/ + !0 + ); + const Yn = []; + let Hs = !1, Zs; + for (const ue of Dt.antecedent) { + let Rt; + if (!Zs) + Rt = Zs = me(ue); + else { + El[za] = Dt, Tu[za] = qr, mp[za] = Yn, za++; + const on = zp; + zp = void 0, Rt = me(ue), zp = on, za--; + const an = Er.get(qr); + if (an) + return an; + } + const mr = aT(Rt); + if (Zf(Yn, mr), jP(mr, l) || (Hs = !0), mr === a) + break; + } + const Ce = Fr( + Yn, + Hs ? 2 : 1 + /* Literal */ + ); + return iE(Zs) ? sE( + Ce, + /*incomplete*/ + !0 + ) : (Er.set(qr, Ce), Ce); + } + function Fr(Dt, ar) { + if (qrt(Dt)) + return ade(Gn(or(Dt, Urt))); + const Er = fNe(Gn(Zc(Dt, oM), ar)); + return Er !== a && Er.flags & a.flags & 1048576 && rw(Er.types, a.types) ? a : Er; + } + function En(Dt) { + if (Ts(r) || Sy(r) || Yp(r)) { + if (Re(Dt)) { + const Er = df(Dt).valueDeclaration; + if (Er && (da(Er) || ji(Er)) && r === Er.parent && !Er.initializer && !Er.dotDotDotToken) + return Er; + } + } else if (go(Dt)) { + if (Ll(r, Dt.expression)) + return Dt; + } else if (Re(Dt)) { + const ar = df(Dt); + if (Ik(ar)) { + const Er = ar.valueDeclaration; + if (ti(Er) && !Er.type && Er.initializer && go(Er.initializer) && Ll(r, Er.initializer.expression)) + return Er.initializer; + if (da(Er) && !Er.initializer) { + const qr = Er.parent.parent; + if (ti(qr) && !qr.type && qr.initializer && (Re(qr.initializer) || go(qr.initializer)) && Ll(r, qr.initializer)) + return Er; + } + } + } + } + function Rn(Dt, ar) { + if (a.flags & 1048576 || ar.flags & 1048576) { + const Er = En(Dt); + if (Er) { + const qr = rT(Er); + if (qr) { + const Sn = a.flags & 1048576 && jP(ar, a) ? a : ar; + if (RP(Sn, qr)) + return Er; + } + } + } + } + function jn(Dt, ar, Er) { + const qr = rT(ar); + if (qr === void 0) + return Dt; + const Sn = fu(ar), Yn = K && (Sn || bee(ar)) && Sc( + Dt, + 98304 + /* Nullable */ + ); + let Hs = Xc(Yn ? qp( + Dt, + 2097152 + /* NEUndefinedOrNull */ + ) : Dt, qr); + if (!Hs) + return Dt; + Hs = Yn && Sn ? b1(Hs) : Hs; + const Zs = Er(Hs); + return Jc(Dt, (Ce) => { + const ue = q6(Ce, qr) || yt; + return !(ue.flags & 131072) && !(Zs.flags & 131072) && $L(Zs, ue); + }); + } + function qs(Dt, ar, Er, qr, Sn) { + if ((Er === 37 || Er === 38) && Dt.flags & 1048576) { + const Yn = iM(Dt); + if (Yn && Yn === rT(ar)) { + const Hs = sM(Dt, $l(qr)); + if (Hs) + return Er === (Sn ? 37 : 38) ? Hs : Vd(Xc(Hs, Yn) || yt) ? c$(Dt, Hs) : Dt; + } + } + return jn(Dt, ar, (Yn) => ki(Yn, Er, qr, Sn)); + } + function ks(Dt, ar, Er) { + if (Er.clauseStart < Er.clauseEnd && Dt.flags & 1048576 && iM(Dt) === rT(ar)) { + const qr = o$(Er.switchStatement).slice(Er.clauseStart, Er.clauseEnd), Sn = Gn(or(qr, (Yn) => sM(Dt, Yn) || yt)); + if (Sn !== yt) + return Sn; + } + return jn(Dt, ar, (qr) => Ra(qr, Er)); + } + function xa(Dt, ar, Er) { + if (Ll(r, ar)) + return iT( + Dt, + Er ? 4194304 : 8388608 + /* Falsy */ + ); + K && Er && nT(ar, r) && (Dt = iT( + Dt, + 2097152 + /* NEUndefinedOrNull */ + )); + const qr = Rn(ar, Dt); + return qr ? jn(Dt, qr, (Sn) => qp( + Sn, + Er ? 4194304 : 8388608 + /* Falsy */ + )) : Dt; + } + function is(Dt, ar, Er) { + const qr = js(Dt, ar); + return qr ? !!(qr.flags & 16777216 || gc(qr) & 48) || Er : !!Tk(Dt, ar) || !Er; + } + function $o(Dt, ar, Er) { + const qr = Lp(ar); + if (Hp(Dt, (Yn) => is( + Yn, + qr, + /*assumeTrue*/ + !0 + ))) + return Jc(Dt, (Yn) => is(Yn, qr, Er)); + if (Er) { + const Yn = XKe(); + if (Yn) + return Ys([Dt, K6(Yn, [ar, yt])]); + } + return Dt; + } + function Xl(Dt, ar, Er, qr, Sn) { + return Sn = Sn !== (Er.kind === 112) != (qr !== 38 && qr !== 36), uu(Dt, ar, Sn); + } + function dc(Dt, ar, Er) { + switch (ar.operatorToken.kind) { + case 64: + case 76: + case 77: + case 78: + return xa(uu(Dt, ar.right, Er), ar.left, Er); + case 35: + case 36: + case 37: + case 38: + const qr = ar.operatorToken.kind, Sn = T2(ar.left), Yn = T2(ar.right); + if (Sn.kind === 221 && Ga(Yn)) + return pn(Dt, Sn, qr, Yn, Er); + if (Yn.kind === 221 && Ga(Sn)) + return pn(Dt, Yn, qr, Sn, Er); + if (Ll(r, Sn)) + return ki(Dt, qr, Yn, Er); + if (Ll(r, Yn)) + return ki(Dt, qr, Sn, Er); + K && (nT(Sn, r) ? Dt = Br(Dt, qr, Yn, Er) : nT(Yn, r) && (Dt = Br(Dt, qr, Sn, Er))); + const Hs = Rn(Sn, Dt); + if (Hs) + return qs(Dt, Hs, qr, Yn, Er); + const Zs = Rn(Yn, Dt); + if (Zs) + return qs(Dt, Zs, qr, Sn, Er); + if (Qo(Sn)) + return Yf(Dt, qr, Yn, Er); + if (Qo(Yn)) + return Yf(Dt, qr, Sn, Er); + if (QE(Yn) && !go(Sn)) + return Xl(Dt, Sn, Yn, qr, Er); + if (QE(Sn) && !go(Yn)) + return Xl(Dt, Yn, Sn, qr, Er); + break; + case 104: + return Tc(Dt, ar, Er); + case 103: + if (wi(ar.left)) + return Sr(Dt, ar, Er); + const Ce = T2(ar.right); + if (N8(Dt) && go(r) && Ll(r.expression, Ce)) { + const ue = $l(ar.left); + if (Fp(ue) && rT(r) === Lp(ue)) + return qp( + Dt, + Er ? 524288 : 65536 + /* EQUndefined */ + ); + } + if (Ll(r, Ce)) { + const ue = $l(ar.left); + if (Fp(ue)) + return $o(Dt, ue, Er); + } + break; + case 28: + return uu(Dt, ar.right, Er); + case 56: + return Er ? uu( + uu( + Dt, + ar.left, + /*assumeTrue*/ + !0 + ), + ar.right, + /*assumeTrue*/ + !0 + ) : Gn([uu( + Dt, + ar.left, + /*assumeTrue*/ + !1 + ), uu( + Dt, + ar.right, + /*assumeTrue*/ + !1 + )]); + case 57: + return Er ? Gn([uu( + Dt, + ar.left, + /*assumeTrue*/ + !0 + ), uu( + Dt, + ar.right, + /*assumeTrue*/ + !0 + )]) : uu( + uu( + Dt, + ar.left, + /*assumeTrue*/ + !1 + ), + ar.right, + /*assumeTrue*/ + !1 + ); + } + return Dt; + } + function Sr(Dt, ar, Er) { + const qr = T2(ar.right); + if (!Ll(r, qr)) + return Dt; + E.assertNode(ar.left, wi); + const Sn = E$(ar.left); + if (Sn === void 0) + return Dt; + const Yn = Sn.parent, Hs = Uc(E.checkDefined(Sn.valueDeclaration, "should always have a declaration")) ? Zr(Yn) : mo(Yn); + return Qh( + Dt, + Hs, + Er, + /*checkDerived*/ + !0 + ); + } + function Br(Dt, ar, Er, qr) { + const Sn = ar === 35 || ar === 37, Yn = ar === 35 || ar === 36 ? 98304 : 32768, Hs = $l(Er); + return Sn !== qr && V_(Hs, (Ce) => !!(Ce.flags & Yn)) || Sn === qr && V_(Hs, (Ce) => !(Ce.flags & (3 | Yn))) ? iT( + Dt, + 2097152 + /* NEUndefinedOrNull */ + ) : Dt; + } + function ki(Dt, ar, Er, qr) { + if (Dt.flags & 1) + return Dt; + (ar === 36 || ar === 38) && (qr = !qr); + const Sn = $l(Er), Yn = ar === 35 || ar === 36; + if (Sn.flags & 98304) { + if (!K) + return Dt; + const Hs = Yn ? qr ? 262144 : 2097152 : Sn.flags & 65536 ? qr ? 131072 : 1048576 : qr ? 65536 : 524288; + return iT(Dt, Hs); + } + if (qr) { + if (!Yn && (Dt.flags & 2 || Hp(Dt, hg))) { + if (Sn.flags & 469893116 || hg(Sn)) + return Sn; + if (Sn.flags & 524288) + return ur; + } + const Hs = Jc(Dt, (Zs) => $L(Zs, Sn) || Yn && Gtt(Zs, Sn)); + return TNe(Hs, Sn); + } + return Vd(Sn) ? Jc(Dt, (Hs) => !(zAe(Hs) && $L(Hs, Sn))) : Dt; + } + function pn(Dt, ar, Er, qr, Sn) { + (Er === 36 || Er === 38) && (Sn = !Sn); + const Yn = T2(ar.expression); + if (!Ll(r, Yn)) { + K && nT(Yn, r) && Sn === (qr.text !== "undefined") && (Dt = iT( + Dt, + 2097152 + /* NEUndefinedOrNull */ + )); + const Hs = Rn(Yn, Dt); + return Hs ? jn(Dt, Hs, (Zs) => Mi(Zs, qr, Sn)) : Dt; + } + return Mi(Dt, qr, Sn); + } + function Mi(Dt, ar, Er) { + return Er ? lu(Dt, ar.text) : iT( + Dt, + yne.get(ar.text) || 32768 + /* TypeofNEHostObject */ + ); + } + function Va(Dt, { switchStatement: ar, clauseStart: Er, clauseEnd: qr }, Sn) { + return Er !== qr && Ri(o$(ar).slice(Er, qr), Sn) ? qp( + Dt, + 2097152 + /* NEUndefinedOrNull */ + ) : Dt; + } + function Ra(Dt, { switchStatement: ar, clauseStart: Er, clauseEnd: qr }) { + const Sn = o$(ar); + if (!Sn.length) + return Dt; + const Yn = Sn.slice(Er, qr), Hs = Er === qr || ls(Yn, fr); + if (Dt.flags & 2 && !Hs) { + let Rt; + for (let mr = 0; mr < Yn.length; mr += 1) { + const on = Yn[mr]; + if (on.flags & 469893116) + Rt !== void 0 && Rt.push(on); + else if (on.flags & 524288) + Rt === void 0 && (Rt = Yn.slice(0, mr)), Rt.push(ur); + else + return Dt; + } + return Gn(Rt === void 0 ? Yn : Rt); + } + const Zs = Gn(Yn), Ce = Zs.flags & 131072 ? fr : TNe(Jc(Dt, (Rt) => $L(Zs, Rt)), Zs); + if (!Hs) + return Ce; + const ue = Jc(Dt, (Rt) => !(zAe(Rt) && ls(Sn, Rt.flags & 32768 ? Ut : Ju(Btt(Rt))))); + return Ce.flags & 131072 ? ue : Gn([Ce, ue]); + } + function lu(Dt, ar) { + switch (ar) { + case "string": + return Js( + Dt, + we, + 1 + /* TypeofEQString */ + ); + case "number": + return Js( + Dt, + _e, + 2 + /* TypeofEQNumber */ + ); + case "bigint": + return Js( + Dt, + Te, + 4 + /* TypeofEQBigInt */ + ); + case "boolean": + return Js( + Dt, + br, + 8 + /* TypeofEQBoolean */ + ); + case "symbol": + return Js( + Dt, + Lr, + 16 + /* TypeofEQSymbol */ + ); + case "object": + return Dt.flags & 1 ? Dt : Gn([Js( + Dt, + ur, + 32 + /* TypeofEQObject */ + ), Js( + Dt, + he, + 131072 + /* EQNull */ + )]); + case "function": + return Dt.flags & 1 ? Dt : Js( + Dt, + kc, + 64 + /* TypeofEQFunction */ + ); + case "undefined": + return Js( + Dt, + Ut, + 65536 + /* EQUndefined */ + ); + } + return Js( + Dt, + ur, + 128 + /* TypeofEQHostObject */ + ); + } + function Js(Dt, ar, Er) { + return Ho(Dt, (qr) => ( + // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate + // the constituent based on its type facts. We use the strict subtype relation because it treats `object` + // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, + // but are classified as "function" according to `typeof`. + Pm(qr, ar, qf) ? Ud(qr, Er) ? qr : fr : ( + // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied + // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. + h1(ar, qr) ? ar : ( + // Neither the constituent nor the implied type is a subtype of the other, however their domains may still + // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate + // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. + Ud(qr, Er) ? Ys([qr, ar]) : fr + ) + ) + )); + } + function ku(Dt, { switchStatement: ar, clauseStart: Er, clauseEnd: qr }) { + const Sn = bNe(ar); + if (!Sn) + return Dt; + const Yn = rc( + ar.caseBlock.clauses, + (Ce) => Ce.kind === 297 + /* DefaultClause */ + ); + if (Er === qr || Yn >= Er && Yn < qr) { + const Ce = fIe(Er, qr, Sn); + return Jc(Dt, (ue) => nE(ue, Ce) === Ce); + } + const Zs = Sn.slice(Er, qr); + return Gn(or(Zs, (Ce) => Ce ? lu(Dt, Ce) : fr)); + } + function Xo(Dt, { switchStatement: ar, clauseStart: Er, clauseEnd: qr }) { + const Sn = rc( + ar.caseBlock.clauses, + (Zs) => Zs.kind === 297 + /* DefaultClause */ + ), Yn = Er === qr || Sn >= Er && Sn < qr; + for (let Zs = 0; Zs < Er; Zs++) { + const Ce = ar.caseBlock.clauses[Zs]; + Ce.kind === 296 && (Dt = uu( + Dt, + Ce.expression, + /*assumeTrue*/ + !1 + )); + } + if (Yn) { + for (let Zs = qr; Zs < ar.caseBlock.clauses.length; Zs++) { + const Ce = ar.caseBlock.clauses[Zs]; + Ce.kind === 296 && (Dt = uu( + Dt, + Ce.expression, + /*assumeTrue*/ + !1 + )); + } + return Dt; + } + const Hs = ar.caseBlock.clauses.slice(Er, qr); + return Gn(or(Hs, (Zs) => Zs.kind === 296 ? uu( + Dt, + Zs.expression, + /*assumeTrue*/ + !0 + ) : fr)); + } + function Qo(Dt) { + return (Dn(Dt) && dn(Dt.name) === "constructor" || ho(Dt) && Ga(Dt.argumentExpression) && Dt.argumentExpression.text === "constructor") && Ll(r, Dt.expression); + } + function Yf(Dt, ar, Er, qr) { + if (qr ? ar !== 35 && ar !== 37 : ar !== 36 && ar !== 38) + return Dt; + const Sn = $l(Er); + if (!Mme(Sn) && !CL(Sn)) + return Dt; + const Yn = js(Sn, "prototype"); + if (!Yn) + return Dt; + const Hs = Zr(Yn), Zs = Ea(Hs) ? void 0 : Hs; + if (!Zs || Zs === Cl || Zs === kc) + return Dt; + if (Ea(Dt)) + return Zs; + return Jc(Dt, (ue) => Ce(ue, Zs)); + function Ce(ue, Rt) { + return ue.flags & 524288 && wn(ue) & 1 || Rt.flags & 524288 && wn(Rt) & 1 ? ue.symbol === Rt.symbol : h1(ue, Rt); + } + } + function Tc(Dt, ar, Er) { + const qr = T2(ar.left); + if (!Ll(r, qr)) + return Er && K && nT(qr, r) ? iT( + Dt, + 2097152 + /* NEUndefinedOrNull */ + ) : Dt; + const Sn = ar.right, Yn = $l(Sn); + if (!Hv(Yn, Cl)) + return Dt; + const Hs = lM(ar), Zs = Hs && bp(Hs); + if (Zs && Zs.kind === 1 && Zs.parameterIndex === 0) + return Qh( + Dt, + Zs.type, + Er, + /*checkDerived*/ + !0 + ); + if (!Hv(Yn, kc)) + return Dt; + const Ce = Ho(Yn, zc); + return Ea(Dt) && (Ce === Cl || Ce === kc) || !Er && !(Ce.flags & 524288 && !hg(Ce)) ? Dt : Qh( + Dt, + Ce, + Er, + /*checkDerived*/ + !0 + ); + } + function zc(Dt) { + const ar = Xc(Dt, "prototype"); + if (ar && !Ea(ar)) + return ar; + const Er = xs( + Dt, + 1 + /* Construct */ + ); + return Er.length ? Gn(or(Er, (qr) => Ha(y8(qr)))) : bi; + } + function Qh(Dt, ar, Er, qr) { + const Sn = Dt.flags & 1048576 ? `N${Fl(Dt)},${Fl(ar)},${(Er ? 1 : 0) | (qr ? 2 : 0)}` : void 0; + return F0(Sn) ?? Wy(Sn, dE(Dt, ar, Er, qr)); + } + function dE(Dt, ar, Er, qr) { + if (!Er) { + if (Dt === ar) + return fr; + if (qr) + return Jc(Dt, (Ce) => !Hv(Ce, ar)); + const Zs = Qh( + Dt, + ar, + /*assumeTrue*/ + !0, + /*checkDerived*/ + !1 + ); + return Jc(Dt, (Ce) => !jP(Ce, Zs)); + } + if (Dt.flags & 3 || Dt === ar) + return ar; + const Sn = qr ? Hv : h1, Yn = Dt.flags & 1048576 ? iM(Dt) : void 0, Hs = Ho(ar, (Zs) => { + const Ce = Yn && Xc(Zs, Yn), ue = Ce && sM(Dt, Ce), Rt = Ho( + ue || Dt, + qr ? (mr) => Hv(mr, Zs) ? mr : Hv(Zs, mr) ? Zs : fr : (mr) => GL(mr, Zs) ? mr : GL(Zs, mr) ? Zs : h1(mr, Zs) ? mr : h1(Zs, mr) ? Zs : fr + ); + return Rt.flags & 131072 ? Ho(Dt, (mr) => Sc( + mr, + 465829888 + /* Instantiable */ + ) && Sn(Zs, Hl(mr) || yt) ? Ys([mr, Zs]) : fr) : Rt; + }); + return Hs.flags & 131072 ? h1(ar, Dt) ? ar : Bs(Dt, ar) ? Dt : Bs(ar, Dt) ? ar : Ys([Dt, ar]) : Hs; + } + function YP(Dt, ar, Er) { + if (uNe(ar, r)) { + const qr = Er || !J2(ar) ? lM(ar) : void 0, Sn = qr && bp(qr); + if (Sn && (Sn.kind === 0 || Sn.kind === 1)) + return nI(Dt, Sn, ar, Er); + } + if (N8(Dt) && go(r) && Dn(ar.expression)) { + const qr = ar.expression; + if (Ll(r.expression, T2(qr.expression)) && Re(qr.name) && qr.name.escapedText === "hasOwnProperty" && ar.arguments.length === 1) { + const Sn = ar.arguments[0]; + if (Ga(Sn) && rT(r) === Ko(Sn.text)) + return qp( + Dt, + Er ? 524288 : 65536 + /* EQUndefined */ + ); + } + } + return Dt; + } + function nI(Dt, ar, Er, qr) { + if (ar.type && !(Ea(Dt) && (ar.type === Cl || ar.type === kc))) { + const Sn = Grt(ar, Er); + if (Sn) { + if (Ll(r, Sn)) + return Qh( + Dt, + ar.type, + qr, + /*checkDerived*/ + !1 + ); + K && nT(Sn, r) && (qr && !Ud( + ar.type, + 65536 + /* EQUndefined */ + ) || !qr && V_(ar.type, bM)) && (Dt = iT( + Dt, + 2097152 + /* NEUndefinedOrNull */ + )); + const Yn = Rn(Sn, Dt); + if (Yn) + return jn(Dt, Yn, (Hs) => Qh( + Hs, + ar.type, + qr, + /*checkDerived*/ + !1 + )); + } + } + return Dt; + } + function uu(Dt, ar, Er) { + if (BI(ar) || cn(ar.parent) && (ar.parent.operatorToken.kind === 61 || ar.parent.operatorToken.kind === 78) && ar.parent.left === ar) + return XM(Dt, ar, Er); + switch (ar.kind) { + case 80: + if (!Ll(r, ar) && T < 5) { + const qr = df(ar); + if (Ik(qr)) { + const Sn = qr.valueDeclaration; + if (Sn && ti(Sn) && !Sn.type && Sn.initializer && ode(r)) { + T++; + const Yn = uu(Dt, Sn.initializer, Er); + return T--, Yn; + } + } + } + case 110: + case 108: + case 211: + case 212: + return xa(Dt, ar, Er); + case 213: + return YP(Dt, ar, Er); + case 217: + case 235: + return uu(Dt, ar.expression, Er); + case 226: + return dc(Dt, ar, Er); + case 224: + if (ar.operator === 54) + return uu(Dt, ar.operand, !Er); + break; + } + return Dt; + } + function XM(Dt, ar, Er) { + if (Ll(r, ar)) + return iT( + Dt, + Er ? 2097152 : 262144 + /* EQUndefinedOrNull */ + ); + const qr = Rn(ar, Dt); + return qr ? jn(Dt, qr, (Sn) => qp( + Sn, + Er ? 2097152 : 262144 + /* EQUndefinedOrNull */ + )) : Dt; + } + } + function Xrt(r, a) { + if (r = R_(r), (a.kind === 80 || a.kind === 81) && (k4(a) && (a = a.parent), Sd(a) && (!u0(a) || GT(a)))) { + const l = YG( + GT(a) && a.kind === 211 ? C$( + a, + /*checkMode*/ + void 0, + /*writeOnly*/ + !0 + ) : $l(a) + ); + if (R_(bn(a).resolvedSymbol) === r) + return l; + } + return Gm(a) && Yd(a.parent) && Ba(a.parent) ? uG(a.parent.symbol) : FB(a) && GT(a.parent) ? l1(r) : u1(r); + } + function M8(r) { + return sr( + r.parent, + (a) => ps(a) && !db(a) || a.kind === 268 || a.kind === 307 || a.kind === 172 + /* PropertyDeclaration */ + ); + } + function fM(r) { + return !ENe( + r, + /*location*/ + void 0 + ); + } + function ENe(r, a) { + const l = sr(r.valueDeclaration, f$); + if (!l) + return !1; + const f = bn(l); + return f.flags & 131072 || (f.flags |= 131072, Qrt(l) || PNe(l)), !r.lastAssignmentPos || a && r.lastAssignmentPos < a.pos; + } + function cde(r) { + return E.assert(ti(r) || ji(r)), DNe(r.name); + } + function DNe(r) { + return r.kind === 80 ? fM(xn(r.parent)) : ut(r.elements, (a) => a.kind !== 232 && DNe(a.name)); + } + function Qrt(r) { + return !!sr(r.parent, (a) => f$(a) && !!(bn(a).flags & 131072)); + } + function f$(r) { + return so(r) || yi(r); + } + function PNe(r) { + switch (r.kind) { + case 80: + if (u0(r)) { + const l = df(r); + if (R8(l) && l.lastAssignmentPos !== Number.MAX_VALUE) { + const f = sr(r, f$), m = sr(l.valueDeclaration, f$); + l.lastAssignmentPos = f === m ? Yrt(r, l.valueDeclaration) : Number.MAX_VALUE; + } + } + return; + case 281: + const a = r.parent.parent; + if (!r.isTypeOnly && !a.isTypeOnly && !a.moduleSpecifier) { + const l = No( + r.propertyName || r.name, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0 + ); + l && R8(l) && (l.lastAssignmentPos = Number.MAX_VALUE); + } + return; + case 264: + case 265: + case 266: + return; + } + ai(r) || gs(r, PNe); + } + function Yrt(r, a) { + let l = r.pos; + for (; r && r.pos > a.pos; ) { + switch (r.kind) { + case 243: + case 244: + case 245: + case 246: + case 247: + case 248: + case 249: + case 250: + case 254: + case 255: + case 258: + case 263: + l = r.end; + } + r = r.parent; + } + return l; + } + function Ik(r) { + return r.flags & 3 && (Cde(r) & 6) !== 0; + } + function R8(r) { + const a = r.valueDeclaration && nm(r.valueDeclaration); + return !!a && (ji(a) || ti(a) && (Rb(a.parent) || Zrt(a))); + } + function Zrt(r) { + return !!(r.parent.flags & 1) && !(L1(r) & 32 || r.parent.parent.kind === 243 && s0(r.parent.parent.parent)); + } + function Krt(r) { + const a = bn(r); + if (a.parameterInitializerContainsUndefined === void 0) { + if (!_g( + r, + 8 + /* ParameterInitializerContainsUndefined */ + )) + return hk(r.symbol), !0; + const l = !!Ud( + WP( + r, + 0 + /* Normal */ + ), + 16777216 + /* IsUndefined */ + ); + if (!fg()) + return hk(r.symbol), !0; + a.parameterInitializerContainsUndefined ?? (a.parameterInitializerContainsUndefined = l); + } + return a.parameterInitializerContainsUndefined; + } + function ent(r, a) { + return K && a.kind === 169 && a.initializer && Ud( + r, + 16777216 + /* IsUndefined */ + ) && !Krt(a) ? qp( + r, + 524288 + /* NEUndefined */ + ) : r; + } + function tnt(r, a) { + const l = a.parent; + return l.kind === 211 || l.kind === 166 || l.kind === 213 && l.expression === a || l.kind === 214 && l.expression === a || l.kind === 212 && l.expression === a && !(Hp(r, ANe) && ZS($l(l.argumentExpression))); + } + function wNe(r) { + return r.flags & 2097152 ? ut(r.types, wNe) : !!(r.flags & 465829888 && dg(r).flags & 1146880); + } + function ANe(r) { + return r.flags & 2097152 ? ut(r.types, ANe) : !!(r.flags & 465829888 && !Sc( + dg(r), + 98304 + /* Nullable */ + )); + } + function rnt(r, a) { + const l = (Re(r) || Dn(r) || ho(r)) && !((pm(r.parent) || oS(r.parent)) && r.parent.tagName === r) && (a && a & 32 ? o_( + r, + 8 + /* SkipBindingPatterns */ + ) : o_( + r, + /*contextFlags*/ + void 0 + )); + return l && !Ek(l); + } + function lde(r, a, l) { + return eE(r) && (r = r.baseType), !(l && l & 2) && Hp(r, wNe) && (tnt(r, a) || rnt(a, l)) ? Ho(r, dg) : r; + } + function NNe(r) { + return !!sr(r, (a) => { + const l = a.parent; + return l === void 0 ? "quit" : ko(l) ? l.expression === a && fo(a) : pu(l) ? l.name === a || l.propertyName === a : !1; + }); + } + function oT(r, a, l, f) { + if (Qe && !(r.flags & 33554432)) + switch (a) { + case 1: + return p$(r); + case 2: + return INe(r, l, f); + case 3: + return ONe(r); + case 4: + return FNe(r); + case 5: + return LNe(r); + case 6: + return MNe(r); + case 7: + return RNe(r); + case 8: + return jNe(r); + case 0: { + if (Re(r) && (Sd(r) || du(r.parent) || nl(r.parent) && r.parent.moduleReference === r) && WNe(r)) { + if (Lw(r.parent) && (Dn(r.parent) ? r.parent.expression : r.parent.left) !== r) + return; + p$(r); + return; + } + if (Lw(r)) { + let m = r; + for (; Lw(m); ) { + if (em(m)) return; + m = m.parent; + } + return INe(r); + } + return ko(r) ? ONe(r) : ru(r) || cS(r) ? FNe(r) : nl(r) ? LT(r) || Z$(r) ? MNe(r) : void 0 : pu(r) ? RNe(r) : ((so(r) || um(r)) && LNe(r), !F.emitDecoratorMetadata || !jb(r) || !wf(r) || !r.modifiers || !t3($, r, r.parent, r.parent.parent) ? void 0 : jNe(r)); + } + default: + E.assertNever(a, `Unhandled reference hint: ${a}`); + } + } + function p$(r) { + const a = df(r); + a && a !== Ie && a !== nt && !Tb(r) && pM(a, r); + } + function INe(r, a, l) { + const f = Dn(r) ? r.expression : r.left; + if (my(f) || !Re(f)) + return; + const m = df(f); + if (!m || m === nt) + return; + if (ap(F) || Cb(F) && NNe(r)) { + pM(m, r); + return; + } + const y = l || Dc(f); + if (Ea(y) || y === mn) { + pM(m, r); + return; + } + let x = a; + if (!x && !l) { + const I = Dn(r) ? r.name : r.right, R = wi(I) && SM(I.escapedText, I), J = G1(r), ee = ju(J !== 0 || wde(r) ? W_(y) : y); + x = wi(I) ? R && D$(ee, R) || void 0 : js(ee, I.escapedText); + } + x && (eI(x) || x.flags & 8 && r.parent.kind === 306) || pM(m, r); + } + function ONe(r) { + if (Re(r.expression)) { + const a = r.expression, l = R_(No( + a, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + r + )); + l && pM(l, a); + } + } + function FNe(r) { + if (!xde(r)) { + const a = La && F.jsx === 2 ? p.Cannot_find_name_0 : void 0, l = DS(r), f = ru(r) ? r.tagName : r; + let m; + if (cS(r) && l === "null" || (m = Kt( + f, + l, + 111551, + a, + /*isUse*/ + !0 + )), m && (m.isReferenced = -1, Qe && m.flags & 2097152 && !ud(m) && d$(m)), cS(r)) { + const y = xr(r), x = PS(y); + x && Kt( + f, + x, + 111551, + a, + /*isUse*/ + !0 + ); + } + } + } + function LNe(r) { + if (V < 2 && jc(r) & 2) { + const a = K_(r); + nnt(a); + } + } + function MNe(r) { + Vn( + r, + 32 + /* Export */ + ) && BNe(r); + } + function RNe(r) { + if (!r.parent.parent.moduleSpecifier && !r.isTypeOnly && !r.parent.parent.isTypeOnly) { + const a = r.propertyName || r.name, l = Kt( + a, + a.escapedText, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (!(l && (l === De || l === Xe || l.declarations && s0(_2(l.declarations[0]))))) { + const f = l && (l.flags & 2097152 ? Ec(l) : l); + (!f || n_(f) & 111551) && (BNe(r), p$(r.propertyName || r.name)); + } + return; + } + } + function jNe(r) { + if (F.emitDecoratorMetadata) { + const a = Nn(r.modifiers, dl); + if (!a) + return; + switch (yl( + a, + 16 + /* Metadata */ + ), r.kind) { + case 263: + const l = Ng(r); + if (l) + for (const x of l.parameters) + aE(H$(x)); + break; + case 177: + case 178: + const f = r.kind === 177 ? 178 : 177, m = Jo(xn(r), f); + aE(Ba(r) || m && Ba(m)); + break; + case 174: + for (const x of r.parameters) + aE(H$(x)); + aE(K_(r)); + break; + case 172: + aE(Vc(r)); + break; + case 169: + aE(H$(r)); + const y = r.parent; + for (const x of y.parameters) + aE(H$(x)); + aE(K_(y)); + break; + } + } + } + function pM(r, a) { + if (Qe && hl( + r, + /*excludes*/ + 111551 + /* Value */ + ) && !VT(a)) { + const l = Ec(r); + n_( + r, + /*excludeTypeOnlyMeanings*/ + !0 + ) & 1160127 && (ap(F) || Cb(F) && NNe(a) || !eI(R_(l))) && d$(r); + } + } + function d$(r) { + E.assert(Qe); + const a = Ni(r); + if (!a.referenced) { + a.referenced = !0; + const l = k_(r); + if (!l) return E.fail(); + if (LT(l) && n_(bc(r)) & 111551) { + const f = tf(l.moduleReference); + p$(f); + } + } + } + function BNe(r) { + const a = xn(r), l = Ec(a); + l && (l === nt || n_( + a, + /*excludeTypeOnlyMeanings*/ + !0 + ) & 111551 && !eI(l)) && d$(a); + } + function JNe(r, a) { + if (!r) return; + const l = tf(r), f = (r.kind === 80 ? 788968 : 1920) | 2097152, m = Kt( + l, + l.escapedText, + f, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (m && m.flags & 2097152) { + if (Qe && t1(m) && !eI(Ec(m)) && !ud(m)) + d$(m); + else if (a && ap(F) && Nu(F) >= 5 && !t1(m) && !ut(m.declarations, B1)) { + const y = We(r, p.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled), x = Nn(m.declarations || He, Ev); + x && Fs(y, Xr(x, p._0_was_imported_here, dn(l))); + } + } + } + function nnt(r) { + JNe( + r && e3(r), + /*forDecoratorMetadata*/ + !1 + ); + } + function aE(r) { + const a = pme(r); + a && l_(a) && JNe( + a, + /*forDecoratorMetadata*/ + !0 + ); + } + function int(r, a, l) { + var f; + const m = Zr(r, l), y = r.valueDeclaration; + if (y) { + if (da(y) && !y.initializer && !y.dotDotDotToken && y.parent.elements.length >= 2) { + const x = y.parent.parent, I = nm(x); + if (I.kind === 260 && P2(I) & 6 || I.kind === 169) { + const R = bn(x); + if (!(R.flags & 4194304)) { + R.flags |= 4194304; + const J = xP( + x, + 0 + /* Normal */ + ), ee = J && Ho(J, dg); + if (R.flags &= -4194305, ee && ee.flags & 1048576 && !(I.kind === 169 && cde(I))) { + const Se = y.parent, me = $h( + Se, + ee, + ee, + /*flowContainer*/ + void 0, + a.flowNode + ); + return me.flags & 131072 ? fr : In( + y, + me, + /*noTupleBoundsCheck*/ + !0 + ); + } + } + } + } + if (ji(y) && !y.type && !y.initializer && !y.dotDotDotToken) { + const x = y.parent; + if (x.parameters.length >= 2 && BG(x)) { + const I = B8(x); + if (I && I.parameters.length === 1 && gu(I)) { + const R = PP(Ji(Zr(I.parameters[0]), (f = x2(x)) == null ? void 0 : f.nonFixingMapper)); + if (R.flags & 1048576 && V_(R, la) && !ut(x.parameters, cde)) { + const J = $h( + x, + R, + R, + /*flowContainer*/ + void 0, + a.flowNode + ), ee = x.parameters.indexOf(y) - (bb(x) ? 1 : 0); + return J_(J, pd(ee)); + } + } + } + } + } + return m; + } + function zNe(r, a) { + if (Tb(r)) return; + if (a === Ie) { + if (Ide(r)) { + We(r, p.arguments_cannot_be_referenced_in_property_initializers); + return; + } + let y = yf(r); + if (y) + for (V < 2 && (y.kind === 219 ? We(r, p.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES5_Consider_using_a_standard_function_expression) : Vn( + y, + 1024 + /* Async */ + ) && We(r, p.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES5_Consider_using_a_standard_function_or_method)), bn(y).flags |= 512; y && xo(y); ) + y = yf(y), y && (bn(y).flags |= 512); + return; + } + const l = R_(a), f = Dme(l, r); + Uy(f) && lpe(r, f) && f.declarations && Hf(r, f.declarations, r.escapedText); + const m = l.valueDeclaration; + if (m && l.flags & 32 && Qn(m) && m.name !== r) { + let y = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + for (; y.kind !== 307 && y.parent !== m; ) + y = Uu( + y, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + y.kind !== 307 && (bn(m).flags |= 262144, bn(y).flags |= 262144, bn(r).flags |= 536870912); + } + lnt(r, a); + } + function snt(r, a) { + if (Tb(r)) + return dM(r); + const l = df(r); + if (l === nt) + return be; + if (zNe(r, l), l === Ie) + return Ide(r) ? be : Zr(l); + WNe(r) && oT( + r, + 1 + /* Identifier */ + ); + const f = R_(l); + let m = f.valueDeclaration, y = int(f, r, a); + const x = G1(r); + if (x) { + if (!(f.flags & 3) && !(Qr(r) && f.flags & 512)) { + const vn = f.flags & 384 ? p.Cannot_assign_to_0_because_it_is_an_enum : f.flags & 32 ? p.Cannot_assign_to_0_because_it_is_a_class : f.flags & 1536 ? p.Cannot_assign_to_0_because_it_is_a_namespace : f.flags & 16 ? p.Cannot_assign_to_0_because_it_is_a_function : f.flags & 2097152 ? p.Cannot_assign_to_0_because_it_is_an_import : p.Cannot_assign_to_0_because_it_is_not_a_variable; + return We(r, vn, Si(l)), be; + } + if (Hd(f)) + return f.flags & 3 ? We(r, p.Cannot_assign_to_0_because_it_is_a_constant, Si(l)) : We(r, p.Cannot_assign_to_0_because_it_is_a_read_only_property, Si(l)), be; + } + const I = f.flags & 2097152; + if (f.flags & 3) { + if (x === 1) + return oB(r) ? Uh(y) : y; + } else if (I) + m = k_(l); + else + return y; + if (!m) + return y; + y = lde(y, r, a); + const R = nm(m).kind === 169, J = M8(m); + let ee = M8(r); + const Se = ee !== J, me = r.parent && r.parent.parent && Bg(r.parent) && sde(r.parent.parent), Ve = l.flags & 134217728, mt = y === et || y === to, ht = mt && r.parent.kind === 235; + for (; ee !== J && (ee.kind === 218 || ee.kind === 219 || d7(ee)) && (Ik(f) && y !== to || R8(f) && ENe(f, r)); ) + ee = M8(ee); + const er = R || I || Se || me || Ve || ant(r, m) || y !== et && y !== to && (!K || (y.flags & 16387) !== 0 || VT(r) || Kpe(r) || r.parent.kind === 281) || r.parent.kind === 235 || m.kind === 260 && m.exclamationToken || m.flags & 33554432, tr = ht ? Ut : er ? R ? ent(y, m) : y : mt ? Ut : b1(y), Rr = ht ? qh($h(r, y, tr, ee)) : $h(r, y, tr, ee); + if (!kNe(r) && (y === et || y === to)) { + if (Rr === et || Rr === to) + return ne && (We(es(m), p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, Si(l), Ur(Rr)), We(r, p.Variable_0_implicitly_has_an_1_type, Si(l), Ur(Rr))), K8(Rr); + } else if (!er && !rE(y) && rE(Rr)) + return We(r, p.Variable_0_is_used_before_being_assigned, Si(l)), y; + return x ? Uh(Rr) : Rr; + } + function ant(r, a) { + if (da(a)) { + const l = sr(r, da); + return l && nm(l) === nm(a); + } + } + function WNe(r) { + var a; + const l = r.parent; + if (l) { + if (Dn(l) && l.expression === r || pu(l) && l.isTypeOnly) + return !1; + const f = (a = l.parent) == null ? void 0 : a.parent; + if (f && Ic(f) && f.isTypeOnly) + return !1; + } + return !0; + } + function ont(r, a) { + return !!sr(r, (l) => l === a ? "quit" : ps(l) || l.parent && rs(l.parent) && !Uc(l.parent) && l.parent.initializer === l); + } + function cnt(r, a) { + return sr(r, (l) => l === a ? "quit" : l === a.initializer || l === a.condition || l === a.incrementor || l === a.statement); + } + function ude(r) { + return sr(r, (a) => !a || gB(a) ? "quit" : fy( + a, + /*lookInLabeledStatements*/ + !1 + )); + } + function lnt(r, a) { + if (V >= 2 || !(a.flags & 34) || !a.valueDeclaration || yi(a.valueDeclaration) || a.valueDeclaration.parent.kind === 299) + return; + const l = bd(a.valueDeclaration), f = ont(r, l), m = ude(l); + if (m) { + if (f) { + let y = !0; + if (tv(l)) { + const x = $1( + a.valueDeclaration, + 261 + /* VariableDeclarationList */ + ); + if (x && x.parent === l) { + const I = cnt(r.parent, l); + if (I) { + const R = bn(I); + R.flags |= 8192; + const J = R.capturedBlockScopeBindings || (R.capturedBlockScopeBindings = []); + Zf(J, a), I === l.initializer && (y = !1); + } + } + } + y && (bn(m).flags |= 4096); + } + if (tv(l)) { + const y = $1( + a.valueDeclaration, + 261 + /* VariableDeclarationList */ + ); + y && y.parent === l && _nt(r, l) && (bn(a.valueDeclaration).flags |= 65536); + } + bn(a.valueDeclaration).flags |= 32768; + } + f && (bn(a.valueDeclaration).flags |= 16384); + } + function unt(r, a) { + const l = bn(r); + return !!l && ls(l.capturedBlockScopeBindings, xn(a)); + } + function _nt(r, a) { + let l = r; + for (; l.parent.kind === 217; ) + l = l.parent; + let f = !1; + if (u0(l)) + f = !0; + else if (l.parent.kind === 224 || l.parent.kind === 225) { + const m = l.parent; + f = m.operator === 46 || m.operator === 47; + } + return f ? !!sr(l, (m) => m === a ? "quit" : m === a.statement) : !1; + } + function _de(r, a) { + if (bn(r).flags |= 2, a.kind === 172 || a.kind === 176) { + const l = a.parent; + bn(l).flags |= 4; + } else + bn(a).flags |= 4; + } + function VNe(r) { + return G2(r) ? r : ps(r) ? void 0 : gs(r, VNe); + } + function fde(r) { + const a = xn(r), l = mo(a); + return zv(l) === q; + } + function UNe(r, a, l) { + const f = a.parent; + vb(f) && !fde(f) && g3(r) && r.flowNode && !_$( + r.flowNode, + /*noCacheCheck*/ + !1 + ) && We(r, l); + } + function fnt(r, a) { + rs(a) && Uc(a) && $ && a.initializer && Sw(a.initializer, r.pos) && wf(a.parent) && We(r, p.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); + } + function dM(r) { + const a = VT(r); + let l = Uu( + r, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !0 + ), f = !1, m = !1; + for (l.kind === 176 && UNe(r, l, p.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); ; ) { + if (l.kind === 219 && (l = Uu( + l, + /*includeArrowFunctions*/ + !1, + !m + ), f = !0), l.kind === 167) { + l = Uu( + l, + !f, + /*includeClassComputedPropertyName*/ + !1 + ), m = !0; + continue; + } + break; + } + if (fnt(r, l), m) + We(r, p.this_cannot_be_referenced_in_a_computed_property_name); + else + switch (l.kind) { + case 267: + We(r, p.this_cannot_be_referenced_in_a_module_or_namespace_body); + break; + case 266: + We(r, p.this_cannot_be_referenced_in_current_location); + break; + } + !a && f && V < 2 && _de(r, l); + const y = pde( + r, + /*includeGlobalThis*/ + !0, + l + ); + if (pe) { + const x = Zr(Xe); + if (y === x && f) + We(r, p.The_containing_arrow_function_captures_the_global_value_of_this); + else if (!y) { + const I = We(r, p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); + if (!yi(l)) { + const R = pde(l); + R && R !== x && Fs(I, Xr(l, p.An_outer_value_of_this_is_shadowed_by_this_container)); + } + } + } + return y || Ne; + } + function pde(r, a = !0, l = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + )) { + const f = Qr(r); + if (ps(l) && (!mde(r) || bb(l))) { + let m = c1(l) || f && mnt(l); + if (!m) { + const y = dnt(l); + if (f && y) { + const x = qi(y).symbol; + x && x.members && x.flags & 16 && (m = mo(x).thisType); + } else Im(l) && (m = mo(Ma(l.symbol)).thisType); + m || (m = $Ne(l)); + } + if (m) + return $h(r, m); + } + if (Qn(l.parent)) { + const m = xn(l.parent), y = Os(l) ? Zr(m) : mo(m).thisType; + return $h(r, y); + } + if (yi(l)) + if (l.commonJsModuleIndicator) { + const m = xn(l); + return m && Zr(m); + } else { + if (l.externalModuleIndicator) + return Ut; + if (a) + return Zr(Xe); + } + } + function pnt(r) { + const a = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (ps(a)) { + const l = Qf(a); + if (l.thisParameter) + return l$(l.thisParameter); + } + if (Qn(a.parent)) { + const l = xn(a.parent); + return Os(a) ? Zr(l) : mo(l).thisType; + } + } + function dnt(r) { + if (r.kind === 218 && cn(r.parent) && mc(r.parent) === 3) + return r.parent.left.expression.expression; + if (r.kind === 174 && r.parent.kind === 210 && cn(r.parent.parent) && mc(r.parent.parent) === 6) + return r.parent.parent.left.expression; + if (r.kind === 218 && r.parent.kind === 303 && r.parent.parent.kind === 210 && cn(r.parent.parent.parent) && mc(r.parent.parent.parent) === 6) + return r.parent.parent.parent.left.expression; + if (r.kind === 218 && qc(r.parent) && Re(r.parent.name) && (r.parent.name.escapedText === "value" || r.parent.name.escapedText === "get" || r.parent.name.escapedText === "set") && Gs(r.parent.parent) && Es(r.parent.parent.parent) && r.parent.parent.parent.arguments[2] === r.parent.parent && mc(r.parent.parent.parent) === 9) + return r.parent.parent.parent.arguments[0].expression; + if (hc(r) && Re(r.name) && (r.name.escapedText === "value" || r.name.escapedText === "get" || r.name.escapedText === "set") && Gs(r.parent) && Es(r.parent.parent) && r.parent.parent.arguments[2] === r.parent && mc(r.parent.parent) === 9) + return r.parent.parent.arguments[0].expression; + } + function mnt(r) { + const a = MI(r); + if (a && a.typeExpression) + return xi(a.typeExpression); + const l = wP(r); + if (l) + return Vv(l); + } + function gnt(r, a) { + return !!sr(r, (l) => so(l) ? "quit" : l.kind === 169 && l.parent === a); + } + function m$(r) { + const a = r.parent.kind === 213 && r.parent.expression === r, l = Zw( + r, + /*stopOnFunctions*/ + !0 + ); + let f = l, m = !1, y = !1; + if (!a) { + for (; f && f.kind === 219; ) + Vn( + f, + 1024 + /* Async */ + ) && (y = !0), f = Zw( + f, + /*stopOnFunctions*/ + !0 + ), m = V < 2; + f && Vn( + f, + 1024 + /* Async */ + ) && (y = !0); + } + let x = 0; + if (!f || !ee(f)) { + const Se = sr( + r, + (me) => me === f ? "quit" : me.kind === 167 + /* ComputedPropertyName */ + ); + return Se && Se.kind === 167 ? We(r, p.super_cannot_be_referenced_in_a_computed_property_name) : a ? We(r, p.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors) : !f || !f.parent || !(Qn(f.parent) || f.parent.kind === 210) ? We(r, p.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions) : We(r, p.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class), be; + } + if (!a && l.kind === 176 && UNe(r, f, p.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class), Os(f) || a ? (x = 32, !a && V >= 2 && V <= 8 && (rs(f) || ac(f)) && bZ(r.parent, (Se) => { + (!yi(Se) || A_(Se)) && (bn(Se).flags |= 2097152); + })) : x = 16, bn(r).flags |= x, f.kind === 174 && y && (f_(r.parent) && u0(r.parent) ? bn(f).flags |= 256 : bn(f).flags |= 128), m && _de(r.parent, f), f.parent.kind === 210) + return V < 2 ? (We(r, p.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher), be) : Ne; + const I = f.parent; + if (!vb(I)) + return We(r, p.super_can_only_be_referenced_in_a_derived_class), be; + if (fde(I)) + return a ? be : q; + const R = mo(xn(I)), J = R && un(R)[0]; + if (!J) + return be; + if (f.kind === 176 && gnt(r, f)) + return We(r, p.super_cannot_be_referenced_in_constructor_arguments), be; + return x === 32 ? zv(R) : pf(J, R.thisType); + function ee(Se) { + return a ? Se.kind === 176 : Qn(Se.parent) || Se.parent.kind === 210 ? Os(Se) ? Se.kind === 174 || Se.kind === 173 || Se.kind === 177 || Se.kind === 178 || Se.kind === 172 || Se.kind === 175 : Se.kind === 174 || Se.kind === 173 || Se.kind === 177 || Se.kind === 178 || Se.kind === 172 || Se.kind === 171 || Se.kind === 176 : !1; + } + } + function qNe(r) { + return (r.kind === 174 || r.kind === 177 || r.kind === 178) && r.parent.kind === 210 ? r.parent : r.kind === 218 && r.parent.kind === 303 ? r.parent.parent : void 0; + } + function HNe(r) { + return wn(r) & 4 && r.target === vc ? Po(r)[0] : void 0; + } + function hnt(r) { + return Ho(r, (a) => a.flags & 2097152 ? rr(a.types, HNe) : HNe(a)); + } + function GNe(r, a) { + let l = r, f = a; + for (; f; ) { + const m = hnt(f); + if (m) + return m; + if (l.parent.kind !== 303) + break; + l = l.parent.parent, f = Zv( + l, + /*contextFlags*/ + void 0 + ); + } + } + function $Ne(r) { + if (r.kind === 219) + return; + if (BG(r)) { + const l = B8(r); + if (l) { + const f = l.thisParameter; + if (f) + return Zr(f); + } + } + const a = Qr(r); + if (pe || a) { + const l = qNe(r); + if (l) { + const m = Zv( + l, + /*contextFlags*/ + void 0 + ), y = GNe(l, m); + return y ? Ji(y, Upe(x2(l))) : W_(m ? qh(m) : Dc(l)); + } + const f = fh(r.parent); + if (Tl(f)) { + const m = f.left; + if (go(m)) { + const { expression: y } = m; + if (a && Re(y)) { + const x = xr(f); + if (x.commonJsModuleIndicator && df(y) === x.symbol) + return; + } + return W_(Dc(y)); + } + } + } + } + function XNe(r) { + const a = r.parent; + if (!BG(a)) + return; + const l = db(a); + if (l && l.arguments) { + const m = N$(l), y = a.parameters.indexOf(r); + if (r.dotDotDotToken) + return Jde( + m, + y, + m.length, + Ne, + /*context*/ + void 0, + 0 + /* Normal */ + ); + const x = bn(l), I = x.resolvedSignature; + x.resolvedSignature = A; + const R = y < m.length ? $v(qi(m[y])) : r.initializer ? void 0 : W; + return x.resolvedSignature = I, R; + } + const f = B8(a); + if (f) { + const m = a.parameters.indexOf(r) - (bb(a) ? 1 : 0); + return r.dotDotDotToken && Bo(a.parameters) === r ? AM(f, m) : C2(f, m); + } + } + function dde(r, a) { + const l = Vc(r) || (Qr(r) ? P5(r) : void 0); + if (l) + return xi(l); + switch (r.kind) { + case 169: + return XNe(r); + case 208: + return ynt(r, a); + case 172: + if (Os(r)) + return vnt(r, a); + } + } + function ynt(r, a) { + const l = r.parent.parent, f = r.propertyName || r.name, m = dde(l, a) || l.kind !== 208 && l.initializer && WP( + l, + r.dotDotDotToken ? 32 : 0 + /* Normal */ + ); + if (!m || Ts(f) || qw(f)) return; + if (l.name.kind === 207) { + const x = rC(r.parent.elements, r); + return x < 0 ? void 0 : yde(m, x); + } + const y = X0(f); + if (Fp(y)) { + const x = Lp(y); + return Xc(m, x); + } + } + function vnt(r, a) { + const l = ct(r.parent) && o_(r.parent, a); + if (l) + return Yv(l, xn(r).escapedName); + } + function bnt(r, a) { + const l = r.parent; + if (i0(l) && r === l.initializer) { + const f = dde(l, a); + if (f) + return f; + if (!(a & 8) && Ts(l.name) && l.name.elements.length > 0) + return j_( + l.name, + /*includePatternInType*/ + !0, + /*reportErrors*/ + !1 + ); + } + } + function Snt(r, a) { + const l = yf(r); + if (l) { + let f = g$(l, a); + if (f) { + const m = jc(l); + if (m & 1) { + const y = (m & 2) !== 0; + f.flags & 1048576 && (f = Jc(f, (I) => !!E2(1, I, y))); + const x = E2(1, f, (m & 2) !== 0); + if (!x) + return; + f = x; + } + if (m & 2) { + const y = Ho(f, Z0); + return y && Gn([y, uIe(y)]); + } + return f; + } + } + } + function Tnt(r, a) { + const l = o_(r, a); + if (l) { + const f = Z0(l); + return f && Gn([f, uIe(f)]); + } + } + function xnt(r, a) { + const l = yf(r); + if (l) { + const f = jc(l); + let m = g$(l, a); + if (m) { + const y = (f & 2) !== 0; + if (!r.asteriskToken && m.flags & 1048576 && (m = Jc(m, (x) => !!E2(1, x, y))), r.asteriskToken) { + const x = Cme(m, y), I = x?.yieldType ?? mn, R = o_(r, a) ?? mn, J = x?.nextType ?? yt, ee = M$( + I, + R, + J, + /*isAsyncGenerator*/ + !1 + ); + if (y) { + const Se = M$( + I, + R, + J, + /*isAsyncGenerator*/ + !0 + ); + return Gn([ee, Se]); + } + return ee; + } + return E2(0, m, y); + } + } + } + function mde(r) { + let a = !1; + for (; r.parent && !ps(r.parent); ) { + if (ji(r.parent) && (a || r.parent.initializer === r)) + return !0; + da(r.parent) && r.parent.initializer === r && (a = !0), r = r.parent; + } + return !1; + } + function QNe(r, a) { + const l = !!(jc(a) & 2), f = g$( + a, + /*contextFlags*/ + void 0 + ); + if (f) + return E2(r, f, l) || void 0; + } + function g$(r, a) { + const l = Y6(r); + if (l) + return l; + const f = bde(r); + if (f && !vG(f)) { + const y = Ha(f), x = jc(r); + return x & 1 ? Jc(y, (I) => !!(I.flags & 58998787) || cme( + I, + x, + /*errorNode*/ + void 0 + )) : x & 2 ? Jc(y, (I) => !!(I.flags & 58998787) || !!qP(I)) : y; + } + const m = db(r); + if (m) + return o_(m, a); + } + function YNe(r, a) { + const f = N$(r).indexOf(a); + return f === -1 ? void 0 : gde(r, f); + } + function gde(r, a) { + if (hf(r)) + return a === 0 ? we : a === 1 ? A3e( + /*reportErrors*/ + !1 + ) : Ne; + const l = bn(r).resolvedSignature === it ? it : lE(r); + if (ru(r) && a === 0) + return b$(l, r); + const f = l.parameters.length - 1; + return gu(l) && a >= f ? J_( + Zr(l.parameters[f]), + pd(a - f), + 256 + /* Contextual */ + ) : qd(l, a); + } + function knt(r) { + const a = Kde(r); + return a ? $S(a) : void 0; + } + function Cnt(r, a) { + if (r.parent.kind === 215) + return YNe(r.parent, a); + } + function Ent(r, a) { + const l = r.parent, { left: f, operatorToken: m, right: y } = l; + switch (m.kind) { + case 64: + case 77: + case 76: + case 78: + return r === y ? Pnt(l) : void 0; + case 57: + case 61: + const x = o_(l, a); + return r === y && (x && x.pattern || !x && !HZ(l)) ? $l(f) : x; + case 56: + case 28: + return r === y ? o_(l, a) : void 0; + default: + return; + } + } + function Dnt(r) { + if (vd(r) && r.symbol) + return r.symbol; + if (Re(r)) + return df(r); + if (Dn(r)) { + const l = $l(r.expression); + return wi(r.name) ? a(l, r.name) : js(l, r.name.escapedText); + } + if (ho(r)) { + const l = Dc(r.argumentExpression); + if (!Fp(l)) + return; + const f = $l(r.expression); + return js(f, Lp(l)); + } + return; + function a(l, f) { + const m = SM(f.escapedText, f); + return m && D$(l, m); + } + } + function Pnt(r) { + var a, l; + const f = mc(r); + switch (f) { + case 0: + case 4: + const m = Dnt(r.left), y = m && m.valueDeclaration; + if (y && (rs(y) || I_(y))) { + const R = Vc(y); + return R && Ji(xi(R), Ni(m).mapper) || (rs(y) ? y.initializer && $l(r.left) : void 0); + } + return f === 0 ? $l(r.left) : ZNe(r); + case 5: + if (h$(r, f)) + return ZNe(r); + if (!vd(r.left) || !r.left.symbol) + return $l(r.left); + { + const R = r.left.symbol.valueDeclaration; + if (!R) + return; + const J = Is(r.left, go), ee = Vc(R); + if (ee) + return xi(ee); + if (Re(J.expression)) { + const Se = J.expression, me = Kt( + Se, + Se.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (me) { + const Ve = me.valueDeclaration && Vc(me.valueDeclaration); + if (Ve) { + const mt = _h(J); + if (mt !== void 0) + return Yv(xi(Ve), mt); + } + return; + } + } + return Qr(R) || R === r.left ? void 0 : $l(r.left); + } + case 1: + case 6: + case 3: + case 2: + let x; + f !== 2 && (x = vd(r.left) ? (a = r.left.symbol) == null ? void 0 : a.valueDeclaration : void 0), x || (x = (l = r.symbol) == null ? void 0 : l.valueDeclaration); + const I = x && Vc(x); + return I ? xi(I) : void 0; + case 7: + case 8: + case 9: + return E.fail("Does not apply"); + default: + return E.assertNever(f); + } + } + function h$(r, a = mc(r)) { + if (a === 4) + return !0; + if (!Qr(r) || a !== 5 || !Re(r.left.expression)) + return !1; + const l = r.left.expression.escapedText, f = Kt( + r.left, + l, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0, + /*excludeGlobals*/ + !0 + ); + return v7(f?.valueDeclaration); + } + function ZNe(r) { + if (!r.symbol) return $l(r.left); + if (r.symbol.valueDeclaration) { + const m = Vc(r.symbol.valueDeclaration); + if (m) { + const y = xi(m); + if (y) + return y; + } + } + const a = Is(r.left, go); + if (!Yp(Uu( + a.expression, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ))) + return; + const l = dM(a.expression), f = _h(a); + return f !== void 0 && Yv(l, f) || void 0; + } + function wnt(r) { + return !!(gc(r) & 262144 && !r.links.type && jv( + r, + 0 + /* Type */ + ) >= 0); + } + function Yv(r, a, l) { + return Ho( + r, + (f) => { + var m; + if (B_(f) && !f.declaration.nameType) { + const y = Xf(f), x = Hl(y) || y, I = l || D_(Pi(a)); + if (Bs(I, x)) + return AG(f, I); + } else if (f.flags & 3670016) { + const y = js(f, a); + if (y) + return wnt(y) ? void 0 : Hh(Zr(y), !!(y.flags & 16777216)); + if (la(f) && Mg(a) && +a >= 0) { + const x = MP( + f, + f.target.fixedLength, + /*endSkipCount*/ + 0, + /*writing*/ + !1, + /*noReductions*/ + !0 + ); + if (x) + return x; + } + return (m = Ife(Ofe(f), l || D_(Pi(a)))) == null ? void 0 : m.type; + } + }, + /*noReductions*/ + !0 + ); + } + function KNe(r, a) { + if (E.assert(Yp(r)), !(r.flags & 67108864)) + return hde(r, a); + } + function hde(r, a) { + const l = r.parent, f = qc(r) && dde(r, a); + if (f) + return f; + const m = Zv(l, a); + if (m) { + if (X6(r)) { + const y = xn(r); + return Yv(m, y.escapedName, Ni(y).nameType); + } + if (ph(r)) { + const y = es(r); + if (y && oa(y)) { + const x = qi(y.expression), I = Fp(x) && Yv(m, Lp(x)); + if (I) + return I; + } + } + if (r.name) { + const y = X0(r.name); + return Ho( + m, + (x) => { + var I; + return (I = Ife(Ofe(x), y)) == null ? void 0 : I.type; + }, + /*noReductions*/ + !0 + ); + } + } + } + function Ant(r) { + let a, l; + for (let f = 0; f < r.length; f++) + cp(r[f]) && (a ?? (a = f), l = f); + return { first: a, last: l }; + } + function yde(r, a, l, f, m) { + return r && Ho( + r, + (y) => { + if (la(y)) { + if ((f === void 0 || a < f) && a < y.target.fixedLength) + return Hh(Po(y)[a], !!y.target.elementFlags[a]); + const x = l !== void 0 && (m === void 0 || a > m) ? l - a : 0, I = x > 0 && y.target.hasRestElement ? b8( + y.target, + 3 + /* Fixed */ + ) : 0; + return x > 0 && x <= I ? Po(y)[G0(y) - x] : MP( + y, + f === void 0 ? y.target.fixedLength : Math.min(y.target.fixedLength, f), + l === void 0 || m === void 0 ? I : Math.min(I, l - m), + /*writing*/ + !1, + /*noReductions*/ + !0 + ); + } + return (!f || a < f) && Yv(y, "" + a) || yme( + 1, + y, + Ut, + /*errorNode*/ + void 0, + /*checkAssignability*/ + !1 + ); + }, + /*noReductions*/ + !0 + ); + } + function Nnt(r, a) { + const l = r.parent; + return r === l.whenTrue || r === l.whenFalse ? o_(l, a) : void 0; + } + function Int(r, a, l) { + const f = Zv(r.openingElement.attributes, l), m = yM(cT(r)); + if (!(f && !Ea(f) && m && m !== "")) + return; + const y = gC(r.children), x = y.indexOf(a), I = Yv(f, m); + return I && (y.length === 1 ? I : Ho( + I, + (R) => Y0(R) ? J_(R, pd(x)) : R, + /*noReductions*/ + !0 + )); + } + function Ont(r, a) { + const l = r.parent; + return HI(l) ? o_(r, a) : jg(l) ? Int(l, r, a) : void 0; + } + function e8e(r, a) { + if (dm(r)) { + const l = Zv(r.parent, a); + return !l || Ea(l) ? void 0 : Yv(l, H4(r.name)); + } else + return o_(r.parent, a); + } + function mM(r) { + switch (r.kind) { + case 11: + case 9: + case 10: + case 15: + case 228: + case 112: + case 97: + case 106: + case 80: + case 157: + return !0; + case 211: + case 217: + return mM(r.expression); + case 294: + return !r.expression || mM(r.expression); + } + return !1; + } + function Fnt(r, a) { + const l = `D${ja(r)},${Fl(a)}`; + return F0(l) ?? Wy( + l, + krt(a, r) ?? Ppe( + a, + Hi( + or( + Ln(r.properties, (f) => f.symbol ? f.kind === 303 ? mM(f.initializer) && RP(a, f.symbol.escapedName) : f.kind === 304 ? RP(a, f.symbol.escapedName) : !1 : !1), + (f) => [() => MM(f.kind === 303 ? f.initializer : f.name), f.symbol.escapedName] + ), + or( + Ln(Wa(a), (f) => { + var m; + return !!(f.flags & 16777216) && !!((m = r?.symbol) != null && m.members) && !r.symbol.members.has(f.escapedName) && RP(a, f.escapedName); + }), + (f) => [() => Ut, f.escapedName] + ) + ), + Bs + ) + ); + } + function Lnt(r, a) { + const l = `D${ja(r)},${Fl(a)}`, f = F0(l); + if (f) return f; + const m = yM(cT(r)); + return Wy( + l, + Ppe( + a, + Hi( + or( + Ln(r.properties, (y) => !!y.symbol && y.kind === 291 && RP(a, y.symbol.escapedName) && (!y.initializer || mM(y.initializer))), + (y) => [y.initializer ? () => MM(y.initializer) : () => wt, y.symbol.escapedName] + ), + or( + Ln(Wa(a), (y) => { + var x; + if (!(y.flags & 16777216) || !((x = r?.symbol) != null && x.members)) + return !1; + const I = r.parent.parent; + return y.escapedName === m && jg(I) && gC(I.children).length ? !1 : !r.symbol.members.has(y.escapedName) && RP(a, y.escapedName); + }), + (y) => [() => Ut, y.escapedName] + ) + ), + Bs + ) + ); + } + function Zv(r, a) { + const l = Yp(r) ? KNe(r, a) : o_(r, a), f = y$(l, r, a); + if (f && !(a && a & 2 && f.flags & 8650752)) { + const m = Ho( + f, + // When obtaining apparent type of *contextual* type we don't want to get apparent type of mapped types. + // That would evaluate mapped types with array or tuple type constraints too eagerly + // and thus it would prevent `getTypeOfPropertyOfContextualType` from obtaining per-position contextual type for elements of array literal expressions. + // Apparent type of other mapped types is already the mapped type itself so we can just avoid calling `getApparentType` here for all mapped types. + (y) => wn(y) & 32 ? y : ju(y), + /*noReductions*/ + !0 + ); + return m.flags & 1048576 && Gs(r) ? Fnt(r, m) : m.flags & 1048576 && Mb(r) ? Lnt(r, m) : m; + } + } + function y$(r, a, l) { + if (r && Sc( + r, + 465829888 + /* Instantiable */ + )) { + const f = x2(a); + if (f && l & 1 && ut(f.inferences, Tat)) + return v$(r, f.nonFixingMapper); + if (f?.returnMapper) { + const m = v$(r, f.returnMapper); + return m.flags & 1048576 && $0(m.types, xt) && $0(m.types, ir) ? Jc(m, (y) => y !== xt && y !== ir) : m; + } + } + return r; + } + function v$(r, a) { + return r.flags & 465829888 ? Ji(r, a) : r.flags & 1048576 ? Gn( + or(r.types, (l) => v$(l, a)), + 0 + /* None */ + ) : r.flags & 2097152 ? Ys(or(r.types, (l) => v$(l, a))) : r; + } + function o_(r, a) { + var l; + if (r.flags & 67108864) + return; + const f = r8e( + r, + /*includeCaches*/ + !a + ); + if (f >= 0) + return I0[f]; + const { parent: m } = r; + switch (m.kind) { + case 260: + case 169: + case 172: + case 171: + case 208: + return bnt(r, a); + case 219: + case 253: + return Snt(r, a); + case 229: + return xnt(m, a); + case 223: + return Tnt(m, a); + case 213: + case 214: + return YNe(m, r); + case 170: + return knt(m); + case 216: + case 234: + return yd(m.type) ? o_(m, a) : xi(m.type); + case 226: + return Ent(r, a); + case 303: + case 304: + return hde(m, a); + case 305: + return o_(m.parent, a); + case 209: { + const y = m, x = Zv(y, a), I = rC(y.elements, r), R = (l = bn(y)).spreadIndices ?? (l.spreadIndices = Ant(y.elements)); + return yde(x, I, y.elements.length, R.first, R.last); + } + case 227: + return Nnt(r, a); + case 239: + return E.assert( + m.parent.kind === 228 + /* TemplateExpression */ + ), Cnt(m.parent, r); + case 217: { + if (Qr(m)) { + if (pJ(m)) + return xi(dJ(m)); + const y = M1(m); + if (y && !yd(y.typeExpression.type)) + return xi(y.typeExpression.type); + } + return o_(m, a); + } + case 235: + return o_(m, a); + case 238: + return xi(m.type); + case 277: + return ze(m); + case 294: + return Ont(m, a); + case 291: + case 293: + return e8e(m, a); + case 286: + case 285: + return Bnt(m, a); + case 301: + return jnt(m); + } + } + function t8e(r) { + gM( + r, + o_( + r, + /*contextFlags*/ + void 0 + ), + /*isCache*/ + !0 + ); + } + function gM(r, a, l) { + jy[Hg] = r, I0[Hg] = a, nd[Hg] = l, Hg++; + } + function j8() { + Hg--; + } + function r8e(r, a) { + for (let l = Hg - 1; l >= 0; l--) + if (r === jy[l] && (a || !nd[l])) + return l; + return -1; + } + function Mnt(r, a) { + wh[sg] = r, Sf[sg] = a, sg++; + } + function Rnt() { + sg--; + } + function x2(r) { + for (let a = sg - 1; a >= 0; a--) + if (yb(r, wh[a])) + return Sf[a]; + } + function jnt(r) { + return Yv(Xfe( + /*reportErrors*/ + !1 + ), w5(r)); + } + function Bnt(r, a) { + if (pm(r) && a !== 4) { + const l = r8e( + r.parent, + /*includeCaches*/ + !a + ); + if (l >= 0) + return I0[l]; + } + return gde(r, 0); + } + function b$(r, a) { + return B8e(a) !== 0 ? Jnt(r, a) : Vnt(r, a); + } + function Jnt(r, a) { + let l = Yde(r, yt); + l = n8e(a, cT(a), l); + const f = k2(Ff.IntrinsicAttributes, a); + return Aa(f) || (l = wL(f, l)), l; + } + function znt(r, a) { + if (r.compositeSignatures) { + const f = []; + for (const m of r.compositeSignatures) { + const y = Ha(m); + if (Ea(y)) + return y; + const x = Xc(y, a); + if (!x) + return; + f.push(x); + } + return Ys(f); + } + const l = Ha(r); + return Ea(l) ? l : Xc(l, a); + } + function Wnt(r) { + if (Ok(r.tagName)) { + const l = f8e(r), f = I$(r, l); + return $S(f); + } + const a = Dc(r.tagName); + if (a.flags & 128) { + const l = _8e(a, r); + if (!l) + return be; + const f = I$(r, l); + return $S(f); + } + return a; + } + function n8e(r, a, l) { + const f = _it(a); + if (f) { + const m = Wnt(r), y = m8e(f, Qr(r), m, l); + if (y) + return y; + } + return l; + } + function Vnt(r, a) { + const l = cT(a), f = pit(l); + let m = f === void 0 ? Yde(r, yt) : f === "" ? Ha(r) : znt(r, f); + if (!m) + return f && Dr(a.attributes.properties) && We(a, p.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, Pi(f)), yt; + if (m = n8e(a, l, m), Ea(m)) + return m; + { + let y = m; + const x = k2(Ff.IntrinsicClassAttributes, a); + if (!Aa(x)) { + const R = U0(x.symbol), J = Ha(r); + let ee; + if (R) { + const Se = p1([J], R, Em(R), Qr(a)); + ee = Ji(x, z_(R, Se)); + } else ee = x; + y = wL(ee, y); + } + const I = k2(Ff.IntrinsicAttributes, a); + return Aa(I) || (y = wL(I, y)), y; + } + } + function Unt(r) { + return Iu(F, "noImplicitAny") ? Eu( + r, + (a, l) => a === l || !a ? a : Gwe(a.typeParameters, l.typeParameters) ? Gnt(a, l) : void 0 + ) : void 0; + } + function qnt(r, a, l) { + if (!r || !a) + return r || a; + const f = Gn([Zr(r), Ji(Zr(a), l)]); + return tT(r, f); + } + function Hnt(r, a, l) { + const f = U_(r), m = U_(a), y = f >= m ? r : a, x = y === r ? a : r, I = y === r ? f : m, R = yg(r) || yg(a), J = R && !yg(y), ee = new Array(I + (J ? 1 : 0)); + for (let Se = 0; Se < I; Se++) { + let me = C2(y, Se); + y === a && (me = Ji(me, l)); + let Ve = C2(x, Se) || yt; + x === a && (Ve = Ji(Ve, l)); + const mt = Gn([me, Ve]), ht = R && !J && Se === I - 1, er = Se >= Om(y) && Se >= Om(x), tr = Se >= f ? void 0 : zP(r, Se), Rr = Se >= m ? void 0 : zP(a, Se), vn = tr === Rr ? tr : tr ? Rr ? void 0 : tr : Rr, cr = va( + 1 | (er && !ht ? 16777216 : 0), + vn || `arg${Se}` + ); + cr.links.type = ht ? cu(mt) : mt, ee[Se] = cr; + } + if (J) { + const Se = va(1, "args"); + Se.links.type = cu(qd(x, I)), x === a && (Se.links.type = Ji(Se.links.type, l)), ee[I] = Se; + } + return ee; + } + function Gnt(r, a) { + const l = r.typeParameters || a.typeParameters; + let f; + r.typeParameters && a.typeParameters && (f = z_(a.typeParameters, r.typeParameters)); + const m = r.declaration, y = Hnt(r, a, f), x = qnt(r.thisParameter, a.thisParameter, f), I = Math.max(r.minArgumentCount, a.minArgumentCount), R = Kg( + m, + l, + x, + y, + /*resolvedReturnType*/ + void 0, + /*resolvedTypePredicate*/ + void 0, + I, + (r.flags | a.flags) & 167 + /* PropagatingFlags */ + ); + return R.compositeKind = 2097152, R.compositeSignatures = Hi(r.compositeKind === 2097152 && r.compositeSignatures || [r], [a]), f && (R.mapper = r.compositeKind === 2097152 && r.mapper && r.compositeSignatures ? S2(r.mapper, f) : f), R; + } + function vde(r, a) { + const l = xs( + r, + 0 + /* Call */ + ), f = Ln(l, (m) => !$nt(m, a)); + return f.length === 1 ? f[0] : Unt(f); + } + function $nt(r, a) { + let l = 0; + for (; l < a.parameters.length; l++) { + const f = a.parameters[l]; + if (f.initializer || f.questionToken || f.dotDotDotToken || D5(f)) + break; + } + return a.parameters.length && Sb(a.parameters[0]) && l--, !yg(r) && U_(r) < l; + } + function bde(r) { + return Sy(r) || Yp(r) ? B8(r) : void 0; + } + function B8(r) { + E.assert(r.kind !== 174 || Yp(r)); + const a = wP(r); + if (a) + return a; + const l = Zv( + r, + 1 + /* Signature */ + ); + if (!l) + return; + if (!(l.flags & 1048576)) + return vde(l, r); + let f; + const m = l.types; + for (const y of m) { + const x = vde(y, r); + if (x) + if (!f) + f = [x]; + else if (KL( + f[0], + x, + /*partialMatch*/ + !1, + /*ignoreThisTypes*/ + !0, + /*ignoreReturnTypes*/ + !0, + E8 + )) + f.push(x); + else + return; + } + if (f) + return f.length === 1 ? f[0] : qwe(f[0], f); + } + function Xnt(r) { + const a = xr(r); + if (!x1(a) && !r.isUnterminated) { + let l; + s ?? (s = Eg( + 99, + /*skipTrivia*/ + !0 + )), s.setScriptTarget(a.languageVersion), s.setLanguageVariant(a.languageVariant), s.setOnError((f, m, y) => { + const x = s.getTokenEnd(); + if (f.category === 3 && l && x === l.start && m === l.length) { + const I = XT(a.fileName, a.text, x, m, f, y); + Fs(l, I); + } else (!l || x !== l.start) && (l = xl(a, x, m, f, y), La.add(l)); + }), s.setText(a.text, r.pos, r.end - r.pos); + try { + return s.scan(), E.assert(s.reScanSlashToken( + /*reportErrors*/ + !0 + ) === 14, "Expected scanner to rescan RegularExpressionLiteral"), !!l; + } finally { + s.setText(""), s.setOnError( + /*onError*/ + void 0 + ); + } + } + return !1; + } + function Qnt(r) { + const a = bn(r); + return a.flags & 1 || (a.flags |= 1, n(() => Xnt(r))), Pa; + } + function Ynt(r, a) { + V < 2 && yl( + r, + F.downlevelIteration ? 1536 : 1024 + /* SpreadArray */ + ); + const l = qi(r.expression, a); + return K0(33, l, Ut, r.expression); + } + function Znt(r) { + return r.isSpread ? J_(r.type, _e) : r.type; + } + function JP(r) { + return r.kind === 208 && !!r.initializer || r.kind === 226 && r.operatorToken.kind === 64; + } + function Knt(r) { + const a = fh(r.parent); + return cp(a) && Qd(a.parent); + } + function i8e(r, a, l) { + const f = r.elements, m = f.length, y = [], x = []; + t8e(r); + const I = u0(r), R = VP(r), J = Zv( + r, + /*contextFlags*/ + void 0 + ), ee = Knt(r) || !!J && Hp(J, (me) => LP(me) || B_(me) && !me.nameType && !!k8(me.target || me)); + let Se = !1; + for (let me = 0; me < m; me++) { + const Ve = f[me]; + if (Ve.kind === 230) { + V < 2 && yl( + Ve, + F.downlevelIteration ? 1536 : 1024 + /* SpreadArray */ + ); + const mt = qi(Ve.expression, a, l); + if (Y0(mt)) + y.push(mt), x.push( + 8 + /* Variadic */ + ); + else if (I) { + const ht = Wv(mt, _e) || yme( + 65, + mt, + Ut, + /*errorNode*/ + void 0, + /*checkAssignability*/ + !1 + ) || yt; + y.push(ht), x.push( + 4 + /* Rest */ + ); + } else + y.push(K0(33, mt, Ut, Ve.expression)), x.push( + 4 + /* Rest */ + ); + } else if (H && Ve.kind === 232) + Se = !0, y.push(st), x.push( + 2 + /* Optional */ + ); + else { + const mt = UP(Ve, a, l); + if (y.push(oi( + mt, + /*isProperty*/ + !0, + Se + )), x.push( + Se ? 2 : 1 + /* Required */ + ), ee && a && a & 2 && !(a & 4) && Sp(Ve)) { + const ht = x2(r); + E.assert(ht), Wpe(ht, Ve, mt); + } + } + } + return j8(), I ? gg(y, x) : s8e(l || R || ee ? gg( + y, + x, + /*readonly*/ + R && !(J && Hp(J, Ope)) + ) : cu( + y.length ? Gn( + Zc(y, (me, Ve) => x[Ve] & 8 ? m1(me, _e) || Ne : me), + 2 + /* Subtype */ + ) : K ? Di : W, + R + )); + } + function s8e(r) { + if (!(wn(r) & 4)) + return r; + let a = r.literalType; + return a || (a = r.literalType = y3e(r), a.objectFlags |= 147456), a; + } + function eit(r) { + switch (r.kind) { + case 167: + return tit(r); + case 80: + return Mg(r.escapedText); + case 9: + case 11: + return Mg(r.text); + default: + return !1; + } + } + function tit(r) { + return Gl( + wm(r), + 296 + /* NumberLike */ + ); + } + function wm(r) { + const a = bn(r.expression); + if (!a.resolvedType) { + if ((Xu(r.parent.parent) || Qn(r.parent.parent) || Vl(r.parent.parent)) && cn(r.expression) && r.expression.operatorToken.kind === 103 && r.parent.kind !== 177 && r.parent.kind !== 178) + return a.resolvedType = be; + if (a.resolvedType = qi(r.expression), rs(r.parent) && !Uc(r.parent) && tl(r.parent.parent)) { + const l = bd(r.parent.parent), f = ude(l); + f && (bn(f).flags |= 4096, bn(r).flags |= 32768, bn(r.parent.parent).flags |= 32768); + } + (a.resolvedType.flags & 98304 || !Gl( + a.resolvedType, + 402665900 + /* ESSymbolLike */ + ) && !Bs(a.resolvedType, Or)) && We(r, p.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); + } + return a.resolvedType; + } + function rit(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a[0]; + return Mg(r.escapedName) || l && Bl(l) && eit(l.name); + } + function a8e(r) { + var a; + const l = (a = r.declarations) == null ? void 0 : a[0]; + return k3(r) || l && Bl(l) && oa(l.name) && Gl( + wm(l.name), + 4096 + /* ESSymbol */ + ); + } + function Sde(r, a, l, f) { + const m = []; + for (let x = a; x < l.length; x++) { + const I = l[x]; + (f === we && !a8e(I) || f === _e && rit(I) || f === Lr && a8e(I)) && m.push(Zr(l[x])); + } + const y = m.length ? Gn( + m, + 2 + /* Subtype */ + ) : Ut; + return mg(f, y, VP(r)); + } + function S$(r) { + E.assert((r.flags & 2097152) !== 0, "Should only get Alias here."); + const a = Ni(r); + if (!a.immediateTarget) { + const l = k_(r); + if (!l) return E.fail(); + a.immediateTarget = Lh( + l, + /*dontRecursivelyResolve*/ + !0 + ); + } + return a.immediateTarget; + } + function nit(r, a = 0) { + var l; + const f = u0(r); + _ut(r, f); + const m = K ? Ms() : void 0; + let y = Ms(), x = [], I = bi; + t8e(r); + const R = Zv( + r, + /*contextFlags*/ + void 0 + ), J = R && R.pattern && (R.pattern.kind === 206 || R.pattern.kind === 210), ee = VP(r), Se = ee ? 8 : 0, me = Qr(r) && !x7(r), Ve = me ? uj(r) : void 0, mt = !R && me && !Ve; + let ht = 8192, er = !1, tr = !1, Rr = !1, vn = !1; + for (const Fr of r.properties) + Fr.name && oa(Fr.name) && wm(Fr.name); + let cr = 0; + for (const Fr of r.properties) { + let En = xn(Fr); + const Rn = Fr.name && Fr.name.kind === 167 ? wm(Fr.name) : void 0; + if (Fr.kind === 303 || Fr.kind === 304 || Yp(Fr)) { + let jn = Fr.kind === 303 ? xIe(Fr, a) : ( + // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring + // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. + // we don't want to say "could not find 'a'". + Fr.kind === 304 ? UP(!f && Fr.objectAssignmentInitializer ? Fr.objectAssignmentInitializer : Fr.name, a) : kIe(Fr, a) + ); + if (me) { + const xa = Ti(Fr); + xa ? (xu(jn, xa, Fr), jn = xa) : Ve && Ve.typeExpression && xu(jn, xi(Ve.typeExpression), Fr); + } + ht |= wn(jn) & 458752; + const qs = Rn && Fp(Rn) ? Rn : void 0, ks = qs ? va( + 4 | En.flags, + Lp(qs), + Se | 4096 + /* Late */ + ) : va(4 | En.flags, En.escapedName, Se); + if (qs && (ks.links.nameType = qs), f) + (Fr.kind === 303 && JP(Fr.initializer) || Fr.kind === 304 && Fr.objectAssignmentInitializer) && (ks.flags |= 16777216); + else if (J && !(wn(R) & 512)) { + const xa = js(R, En.escapedName); + xa ? ks.flags |= xa.flags & 16777216 : eh(R, we) || We(Fr.name, p.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, Si(En), Ur(R)); + } + if (ks.declarations = En.declarations, ks.parent = En.parent, En.valueDeclaration && (ks.valueDeclaration = En.valueDeclaration), ks.links.type = jn, ks.links.target = En, En = ks, m?.set(ks.escapedName, ks), R && a & 2 && !(a & 4) && (Fr.kind === 303 || Fr.kind === 174) && Sp(Fr)) { + const xa = x2(r); + E.assert(xa); + const is = Fr.kind === 303 ? Fr.initializer : Fr; + Wpe(xa, is, jn); + } + } else if (Fr.kind === 305) { + V < 2 && yl( + Fr, + 2 + /* Assign */ + ), x.length > 0 && (I = y2(I, Cr(), r.symbol, ht, ee), x = [], y = Ms(), tr = !1, Rr = !1, vn = !1); + const jn = Wd(qi( + Fr.expression, + a & 2 + /* Inferential */ + )); + if (hM(jn)) { + const qs = mpe(jn, ee); + if (m && c8e(qs, m, Fr), cr = x.length, Aa(I)) + continue; + I = y2(I, qs, r.symbol, ht, ee); + } else + We(Fr, p.Spread_types_may_only_be_created_from_object_types), I = be; + continue; + } else + E.assert( + Fr.kind === 177 || Fr.kind === 178 + /* SetAccessor */ + ), Fk(Fr); + Rn && !(Rn.flags & 8576) ? Bs(Rn, Or) && (Bs(Rn, _e) ? Rr = !0 : Bs(Rn, Lr) ? vn = !0 : tr = !0, f && (er = !0)) : y.set(En.escapedName, En), x.push(En); + } + if (j8(), J) { + const Fr = sr( + R.pattern.parent, + (Rn) => Rn.kind === 260 || Rn.kind === 226 || Rn.kind === 169 + /* Parameter */ + ); + if (sr( + r, + (Rn) => Rn === Fr || Rn.kind === 305 + /* SpreadAssignment */ + ).kind !== 305) + for (const Rn of Wa(R)) + !y.get(Rn.escapedName) && !js(I, Rn.escapedName) && (Rn.flags & 16777216 || We(Rn.valueDeclaration || ((l = Jn(Rn, qm)) == null ? void 0 : l.links.bindingElement), p.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value), y.set(Rn.escapedName, Rn), x.push(Rn)); + } + if (Aa(I)) + return be; + if (I !== bi) + return x.length > 0 && (I = y2(I, Cr(), r.symbol, ht, ee), x = [], y = Ms(), tr = !1, Rr = !1), Ho(I, (Fr) => Fr === bi ? Cr() : Fr); + return Cr(); + function Cr() { + const Fr = []; + tr && Fr.push(Sde(r, cr, x, we)), Rr && Fr.push(Sde(r, cr, x, _e)), vn && Fr.push(Sde(r, cr, x, Lr)); + const En = ie(r.symbol, y, He, He, Fr); + return En.objectFlags |= ht | 128 | 131072, mt && (En.objectFlags |= 4096), er && (En.objectFlags |= 512), f && (En.pattern = r), En; + } + } + function hM(r) { + const a = HAe(Ho(r, dg)); + return !!(a.flags & 126615553 || a.flags & 3145728 && Ri(a.types, hM)); + } + function iit(r) { + kde(r); + } + function sit(r, a) { + return Fk(r), vM(r) || Ne; + } + function ait(r) { + kde(r.openingElement), Ok(r.closingElement.tagName) ? x$(r.closingElement) : qi(r.closingElement.tagName), T$(r); + } + function oit(r, a) { + return Fk(r), vM(r) || Ne; + } + function cit(r) { + kde(r.openingFragment); + const a = xr(r); + return l5(F) && (F.jsxFactory || a.pragmas.has("jsx")) && !F.jsxFragmentFactory && !a.pragmas.has("jsxfrag") && We( + r, + F.jsxFactory ? p.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : p.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments + ), T$(r), vM(r) || Ne; + } + function Tde(r) { + return r.includes("-"); + } + function Ok(r) { + return Re(r) && hC(r.escapedText) || Cd(r); + } + function o8e(r, a) { + return r.initializer ? UP(r.initializer, a) : wt; + } + function lit(r, a = 0) { + const l = r.attributes, f = o_( + l, + 0 + /* None */ + ), m = K ? Ms() : void 0; + let y = Ms(), x = wl, I = !1, R, J = !1, ee = 2048; + const Se = yM(cT(r)); + for (const mt of l.properties) { + const ht = mt.symbol; + if (dm(mt)) { + const er = o8e(mt, a); + ee |= wn(er) & 458752; + const tr = va(4 | ht.flags, ht.escapedName); + if (tr.declarations = ht.declarations, tr.parent = ht.parent, ht.valueDeclaration && (tr.valueDeclaration = ht.valueDeclaration), tr.links.type = er, tr.links.target = ht, y.set(tr.escapedName, tr), m?.set(tr.escapedName, tr), H4(mt.name) === Se && (J = !0), f) { + const Rr = js(f, ht.escapedName); + Rr && Rr.declarations && Uy(Rr) && Re(mt.name) && Hf(mt.name, Rr.declarations, mt.name.escapedText); + } + if (f && a & 2 && !(a & 4) && Sp(mt)) { + const Rr = x2(l); + E.assert(Rr); + const vn = mt.initializer.expression; + Wpe(Rr, vn, er); + } + } else { + E.assert( + mt.kind === 293 + /* JsxSpreadAttribute */ + ), y.size > 0 && (x = y2( + x, + Ve(), + l.symbol, + ee, + /*readonly*/ + !1 + ), y = Ms()); + const er = Wd(qi( + mt.expression, + a & 2 + /* Inferential */ + )); + Ea(er) && (I = !0), hM(er) ? (x = y2( + x, + er, + l.symbol, + ee, + /*readonly*/ + !1 + ), m && c8e(er, m, mt)) : (We(mt.expression, p.Spread_types_may_only_be_created_from_object_types), R = R ? Ys([R, er]) : er); + } + } + I || y.size > 0 && (x = y2( + x, + Ve(), + l.symbol, + ee, + /*readonly*/ + !1 + )); + const me = r.parent.kind === 284 ? r.parent : void 0; + if (me && me.openingElement === r && gC(me.children).length > 0) { + const mt = T$(me, a); + if (!I && Se && Se !== "") { + J && We(l, p._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, Pi(Se)); + const ht = Zv( + r.attributes, + /*contextFlags*/ + void 0 + ), er = ht && Yv(ht, Se), tr = va(4, Se); + tr.links.type = mt.length === 1 ? mt[0] : er && Hp(er, LP) ? gg(mt) : cu(Gn(mt)), tr.valueDeclaration = N.createPropertySignature( + /*modifiers*/ + void 0, + Pi(Se), + /*questionToken*/ + void 0, + /*type*/ + void 0 + ), Da(tr.valueDeclaration, l), tr.valueDeclaration.symbol = tr; + const Rr = Ms(); + Rr.set(Se, tr), x = y2( + x, + ie(l.symbol, Rr, He, He, He), + l.symbol, + ee, + /*readonly*/ + !1 + ); + } + } + if (I) + return Ne; + if (R && x !== wl) + return Ys([R, x]); + return R || (x === wl ? Ve() : x); + function Ve() { + ee |= 8192; + const mt = ie(l.symbol, y, He, He, He); + return mt.objectFlags |= ee | 128 | 131072, mt; + } + } + function T$(r, a) { + const l = []; + for (const f of r.children) + if (f.kind === 12) + f.containsOnlyTriviaWhiteSpaces || l.push(we); + else { + if (f.kind === 294 && !f.expression) + continue; + l.push(UP(f, a)); + } + return l; + } + function c8e(r, a, l) { + for (const f of Wa(r)) + if (!(f.flags & 16777216)) { + const m = a.get(f.escapedName); + if (m) { + const y = We(m.valueDeclaration, p._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, Pi(m.escapedName)); + Fs(y, Xr(l, p.This_spread_always_overwrites_this_property)); + } + } + } + function uit(r, a) { + return lit(r.parent, a); + } + function k2(r, a) { + const l = cT(a), f = l && _f(l), m = f && x_( + f, + r, + 788968 + /* Type */ + ); + return m ? mo(m) : be; + } + function x$(r) { + const a = bn(r); + if (!a.resolvedSymbol) { + const l = k2(Ff.IntrinsicElements, r); + if (Aa(l)) + return ne && We(r, p.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, Pi(Ff.IntrinsicElements)), a.resolvedSymbol = nt; + { + if (!Re(r.tagName) && !Cd(r.tagName)) return E.fail(); + const f = Cd(r.tagName) ? rx(r.tagName) : r.tagName.escapedText, m = js(l, f); + if (m) + return a.jsxFlags |= 1, a.resolvedSymbol = m; + const y = N7e(l, D_(Pi(f))); + return y ? (a.jsxFlags |= 2, a.resolvedSymbol = y) : q6(l, f) ? (a.jsxFlags |= 2, a.resolvedSymbol = l.symbol) : (We(r, p.Property_0_does_not_exist_on_type_1, mJ(r.tagName), "JSX." + Ff.IntrinsicElements), a.resolvedSymbol = nt); + } + } + return a.resolvedSymbol; + } + function xde(r) { + const a = r && xr(r), l = a && bn(a); + if (l && l.jsxImplicitImportContainer === !1) + return; + if (l && l.jsxImplicitImportContainer) + return l.jsxImplicitImportContainer; + const f = _5(u5(F, a), F); + if (!f) + return; + const y = Hu(F) === 1 ? p.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : p.Cannot_find_module_0_or_its_corresponding_type_declarations, x = Wut(a, f), I = Nv(x || r, f, y, r), R = I && I !== nt ? Ma(bc(I)) : void 0; + return l && (l.jsxImplicitImportContainer = R || !1), R; + } + function cT(r) { + const a = r && bn(r); + if (a && a.jsxNamespace) + return a.jsxNamespace; + if (!a || a.jsxNamespace !== !1) { + let f = xde(r); + if (!f || f === nt) { + const m = DS(r); + f = Kt( + r, + m, + 1920, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + } + if (f) { + const m = bc(x_( + _f(bc(f)), + Ff.JSX, + 1920 + /* Namespace */ + )); + if (m && m !== nt) + return a && (a.jsxNamespace = m), m; + } + a && (a.jsxNamespace = !1); + } + const l = bc(IP( + Ff.JSX, + 1920, + /*diagnostic*/ + void 0 + )); + if (l !== nt) + return l; + } + function l8e(r, a) { + const l = a && x_( + a.exports, + r, + 788968 + /* Type */ + ), f = l && mo(l), m = f && Wa(f); + if (m) { + if (m.length === 0) + return ""; + if (m.length === 1) + return m[0].escapedName; + m.length > 1 && l.declarations && We(l.declarations[0], p.The_global_type_JSX_0_may_not_have_more_than_one_property, Pi(r)); + } + } + function _it(r) { + return r && x_( + r.exports, + Ff.LibraryManagedAttributes, + 788968 + /* Type */ + ); + } + function fit(r) { + return r && x_( + r.exports, + Ff.ElementType, + 788968 + /* Type */ + ); + } + function pit(r) { + return l8e(Ff.ElementAttributesPropertyNameContainer, r); + } + function yM(r) { + return l8e(Ff.ElementChildrenAttributeNameContainer, r); + } + function u8e(r, a) { + if (r.flags & 4) + return [A]; + if (r.flags & 128) { + const m = _8e(r, a); + return m ? [I$(a, m)] : (We(a, p.Property_0_does_not_exist_on_type_1, r.value, "JSX." + Ff.IntrinsicElements), He); + } + const l = ju(r); + let f = xs( + l, + 1 + /* Construct */ + ); + return f.length === 0 && (f = xs( + l, + 0 + /* Call */ + )), f.length === 0 && l.flags & 1048576 && (f = Sfe(or(l.types, (m) => u8e(m, a)))), f; + } + function _8e(r, a) { + const l = k2(Ff.IntrinsicElements, a); + if (!Aa(l)) { + const f = r.value, m = js(l, Ko(f)); + if (m) + return Zr(m); + const y = Wv(l, we); + return y || void 0; + } + return Ne; + } + function dit(r, a, l) { + if (r === 1) { + const m = d8e(l); + m && Tp(a, m, lf, l.tagName, p.Its_return_type_0_is_not_a_valid_JSX_element, f); + } else if (r === 0) { + const m = p8e(l); + m && Tp(a, m, lf, l.tagName, p.Its_instance_type_0_is_not_a_valid_JSX_element, f); + } else { + const m = d8e(l), y = p8e(l); + if (!m || !y) + return; + const x = Gn([m, y]); + Tp(a, x, lf, l.tagName, p.Its_element_type_0_is_not_a_valid_JSX_element, f); + } + function f() { + const m = sc(l.tagName); + return us( + /*details*/ + void 0, + p._0_cannot_be_used_as_a_JSX_component, + m + ); + } + } + function f8e(r) { + var a; + E.assert(Ok(r.tagName)); + const l = bn(r); + if (!l.resolvedJsxElementAttributesType) { + const f = x$(r); + if (l.jsxFlags & 1) + return l.resolvedJsxElementAttributesType = Zr(f) || be; + if (l.jsxFlags & 2) { + const m = Cd(r.tagName) ? rx(r.tagName) : r.tagName.escapedText; + return l.resolvedJsxElementAttributesType = ((a = Tk(k2(Ff.IntrinsicElements, r), m)) == null ? void 0 : a.type) || be; + } else + return l.resolvedJsxElementAttributesType = be; + } + return l.resolvedJsxElementAttributesType; + } + function p8e(r) { + const a = k2(Ff.ElementClass, r); + if (!Aa(a)) + return a; + } + function vM(r) { + return k2(Ff.Element, r); + } + function d8e(r) { + const a = vM(r); + if (a) + return Gn([a, he]); + } + function mit(r) { + const a = cT(r); + if (!a) return; + const l = fit(a); + if (!l) return; + const f = m8e(l, Qr(r)); + if (!(!f || Aa(f))) + return f; + } + function m8e(r, a, ...l) { + const f = mo(r); + if (r.flags & 524288) { + const m = Ni(r).typeParameters; + if (Dr(m) >= l.length) { + const y = p1(l, m, l.length, a); + return Dr(y) === 0 ? f : K6(r, y); + } + } + if (Dr(f.typeParameters) >= l.length) { + const m = p1(l, f.typeParameters, l.length, a); + return H0(f, m); + } + } + function git(r) { + const a = k2(Ff.IntrinsicElements, r); + return a ? Wa(a) : He; + } + function hit(r) { + (F.jsx || 0) === 0 && We(r, p.Cannot_use_JSX_unless_the_jsx_flag_is_provided), vM(r) === void 0 && ne && We(r, p.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); + } + function kde(r) { + const a = ru(r); + if (a && fut(r), hit(r), oT( + r, + 4 + /* Jsx */ + ), a) { + const l = r, f = lE(l); + F$(f, r); + const m = mit(l); + if (m !== void 0) { + const y = l.tagName, x = Ok(y) ? D_(mJ(y)) : qi(y); + Tp(x, m, lf, y, p.Its_type_0_is_not_a_valid_JSX_element_type, () => { + const I = sc(y); + return us( + /*details*/ + void 0, + p._0_cannot_be_used_as_a_JSX_component, + I + ); + }); + } else + dit(B8e(l), Ha(f), l); + } + } + function k$(r, a, l) { + if (r.flags & 524288 && (d2(r, a) || Tk(r, a) || p8(a) && eh(r, we) || l && Tde(a))) + return !0; + if (r.flags & 33554432) + return k$(r.baseType, a, l); + if (r.flags & 3145728 && J8(r)) { + for (const f of r.types) + if (k$(f, a, l)) + return !0; + } + return !1; + } + function J8(r) { + return !!(r.flags & 524288 && !(wn(r) & 512) || r.flags & 67108864 || r.flags & 33554432 && J8(r.baseType) || r.flags & 1048576 && ut(r.types, J8) || r.flags & 2097152 && Ri(r.types, J8)); + } + function yit(r, a) { + if (dut(r), r.expression) { + const l = qi(r.expression, a); + return r.dotDotDotToken && l !== Ne && !xp(l) && We(r, p.JSX_spread_child_must_be_an_array_type), l; + } else + return be; + } + function Cde(r) { + return r.valueDeclaration ? P2(r.valueDeclaration) : 0; + } + function Ede(r) { + if (r.flags & 8192 || gc(r) & 4) + return !0; + if (Qr(r.valueDeclaration)) { + const a = r.valueDeclaration.parent; + return a && cn(a) && mc(a) === 3; + } + } + function Dde(r, a, l, f, m, y = !0) { + const x = y ? r.kind === 166 ? r.right : r.kind === 205 ? r : r.kind === 208 && r.propertyName ? r.propertyName : r.name : void 0; + return g8e(r, a, l, f, m, x); + } + function g8e(r, a, l, f, m, y) { + var x; + const I = sp(m, l); + if (a) { + if (V < 2 && h8e(m)) + return y && We(y, p.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword), !1; + if (I & 64) + return y && We(y, p.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, Si(m), Ur(Ak(m))), !1; + if (!(I & 256) && ((x = m.declarations) != null && x.some(BY))) + return y && We(y, p.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, Si(m)), !1; + } + if (I & 64 && h8e(m) && (Kw(r) || VZ(r) || If(r.parent) && v7(r.parent.parent))) { + const J = gh(s_(m)); + if (J && clt(r)) + return y && We(y, p.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, Si(m), Ip(J.name)), !1; + } + if (!(I & 6)) + return !0; + if (I & 2) { + const J = gh(s_(m)); + return Nme(r, J) ? !0 : (y && We(y, p.Property_0_is_private_and_only_accessible_within_class_1, Si(m), Ur(Ak(m))), !1); + } + if (a) + return !0; + let R = w7e(r, (J) => { + const ee = mo(xn(J)); + return LAe(ee, m, l); + }); + return !R && (R = vit(r), R = R && LAe(R, m, l), I & 256 || !R) ? (y && We(y, p.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, Si(m), Ur(Ak(m) || f)), !1) : I & 256 ? !0 : (f.flags & 262144 && (f = f.isThisType ? a_(f) : Hl(f)), !f || !vk(f, R) ? (y && We(y, p.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, Si(m), Ur(R), Ur(f)), !1) : !0); + } + function vit(r) { + const a = bit(r); + let l = a?.type && xi(a.type); + if (l && l.flags & 262144 && (l = a_(l)), l && wn(l) & 7) + return G6(l); + } + function bit(r) { + const a = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + return a && ps(a) ? bb(a) : void 0; + } + function h8e(r) { + return !!ZL(r, (a) => !(a.flags & 8192)); + } + function oE(r) { + return Am(qi(r), r); + } + function bM(r) { + return Ud( + r, + 50331648 + /* IsUndefinedOrNull */ + ); + } + function Pde(r) { + return bM(r) ? qh(r) : r; + } + function Sit(r, a) { + const l = fo(r) ? Y_(r) : void 0; + if (r.kind === 106) { + We(r, p.The_value_0_cannot_be_used_here, "null"); + return; + } + if (l !== void 0 && l.length < 100) { + if (Re(r) && l === "undefined") { + We(r, p.The_value_0_cannot_be_used_here, "undefined"); + return; + } + We( + r, + a & 16777216 ? a & 33554432 ? p._0_is_possibly_null_or_undefined : p._0_is_possibly_undefined : p._0_is_possibly_null, + l + ); + } else + We( + r, + a & 16777216 ? a & 33554432 ? p.Object_is_possibly_null_or_undefined : p.Object_is_possibly_undefined : p.Object_is_possibly_null + ); + } + function Tit(r, a) { + We( + r, + a & 16777216 ? a & 33554432 ? p.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : p.Cannot_invoke_an_object_which_is_possibly_undefined : p.Cannot_invoke_an_object_which_is_possibly_null + ); + } + function y8e(r, a, l) { + if (K && r.flags & 2) { + if (fo(a)) { + const m = Y_(a); + if (m.length < 100) + return We(a, p._0_is_of_type_unknown, m), be; + } + return We(a, p.Object_is_of_type_unknown), be; + } + const f = nE( + r, + 50331648 + /* IsUndefinedOrNull */ + ); + if (f & 50331648) { + l(a, f); + const m = qh(r); + return m.flags & 229376 ? be : m; + } + return r; + } + function Am(r, a) { + return y8e(r, a, Sit); + } + function v8e(r, a) { + const l = Am(r, a); + if (l.flags & 16384) { + if (fo(a)) { + const f = Y_(a); + if (Re(a) && f === "undefined") + return We(a, p.The_value_0_cannot_be_used_here, f), l; + if (f.length < 100) + return We(a, p._0_is_possibly_undefined, f), l; + } + We(a, p.Object_is_possibly_undefined); + } + return l; + } + function C$(r, a, l) { + return r.flags & 64 ? xit(r, a) : Ade(r, r.expression, oE(r.expression), r.name, a, l); + } + function xit(r, a) { + const l = qi(r.expression), f = A8(l, r.expression); + return ZG(Ade(r, r.expression, Am(f, r.expression), r.name, a), r, f !== l); + } + function b8e(r, a) { + const l = T7(r) && my(r.left) ? Am(dM(r.left), r.left) : oE(r.left); + return Ade(r, r.left, l, r.right, a); + } + function wde(r) { + for (; r.parent.kind === 217; ) + r = r.parent; + return Qd(r.parent) && r.parent.expression === r; + } + function SM(r, a) { + for (let l = h7(a); l; l = Nl(l)) { + const { symbol: f } = l, m = x3(f, r), y = f.members && f.members.get(m) || f.exports && f.exports.get(m); + if (y) + return y; + } + } + function kit(r) { + if (!Nl(r)) + return pr(r, p.Private_identifiers_are_not_allowed_outside_class_bodies); + if (!X5(r.parent)) { + if (!Sd(r)) + return pr(r, p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); + const a = cn(r.parent) && r.parent.operatorToken.kind === 103; + if (!E$(r) && !a) + return pr(r, p.Cannot_find_name_0, dn(r)); + } + return !1; + } + function Cit(r) { + kit(r); + const a = E$(r); + return a && xM( + a, + /*nodeForCheckWriteOnly*/ + void 0, + /*isSelfTypeAccess*/ + !1 + ), Ne; + } + function E$(r) { + if (!Sd(r)) + return; + const a = bn(r); + return a.resolvedSymbol === void 0 && (a.resolvedSymbol = SM(r.escapedText, r)), a.resolvedSymbol; + } + function D$(r, a) { + return js(r, a.escapedName); + } + function Eit(r, a, l) { + let f; + const m = Wa(r); + m && rr(m, (x) => { + const I = x.valueDeclaration; + if (I && Bl(I) && wi(I.name) && I.name.escapedText === a.escapedText) + return f = x, !0; + }); + const y = ad(a); + if (f) { + const x = E.checkDefined(f.valueDeclaration), I = E.checkDefined(Nl(x)); + if (l?.valueDeclaration) { + const R = l.valueDeclaration, J = Nl(R); + if (E.assert(!!J), sr(J, (ee) => I === ee)) { + const ee = We( + a, + p.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, + y, + Ur(r) + ); + return Fs( + ee, + Xr( + R, + p.The_shadowing_declaration_of_0_is_defined_here, + y + ), + Xr( + x, + p.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here, + y + ) + ), !0; + } + } + return We( + a, + p.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, + y, + ad(I.name || qz) + ), !0; + } + return !1; + } + function S8e(r, a) { + return (no(a) || Kw(r) && Ta(a)) && Uu( + r, + /*includeArrowFunctions*/ + !0, + /*includeClassComputedPropertyName*/ + !1 + ) === Gf(a); + } + function Ade(r, a, l, f, m, y) { + const x = bn(a).resolvedSymbol, I = G1(r), R = ju(I !== 0 || wde(r) ? W_(l) : l), J = Ea(R) || R === mn; + let ee; + if (wi(f)) { + (V < 9 || V < 99 || !U) && (I !== 0 && yl( + r, + 1048576 + /* ClassPrivateFieldSet */ + ), I !== 1 && yl( + r, + 524288 + /* ClassPrivateFieldGet */ + )); + const me = SM(f.escapedText, f); + if (I && me && me.valueDeclaration && hc(me.valueDeclaration) && pr(f, p.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, dn(f)), J) { + if (me) + return Aa(R) ? be : R; + if (h7(f) === void 0) + return pr(f, p.Private_identifiers_are_not_allowed_outside_class_bodies), Ne; + } + if (ee = me && D$(l, me), ee === void 0) { + if (Eit(l, f, me)) + return be; + const Ve = h7(f); + Ve && t4(xr(Ve), F.checkJs) && pr(f, p.Private_field_0_must_be_declared_in_an_enclosing_class, dn(f)); + } else + ee.flags & 65536 && !(ee.flags & 32768) && I !== 1 && We(r, p.Private_accessor_was_defined_without_a_getter); + } else { + if (J) + return Re(a) && x && oT( + r, + 2, + /*propSymbol*/ + void 0, + l + ), Aa(R) ? be : R; + ee = js( + R, + f.escapedText, + /*skipObjectFunctionPropertyAugment*/ + j$(R), + /*includeTypeOnlyMembers*/ + r.kind === 166 + /* QualifiedName */ + ); + } + oT(r, 2, ee, l); + let Se; + if (ee) { + const me = Dme(ee, f); + if (Uy(me) && lpe(r, me) && me.declarations && Hf(f, me.declarations, f.escapedText), Dit(ee, r, f), xM(ee, r, w8e(a, x)), bn(r).resolvedSymbol = ee, Dde(r, a.kind === 108, GT(r), R, ee), gIe(r, ee, I)) + return We(f, p.Cannot_assign_to_0_because_it_is_a_read_only_property, dn(f)), be; + Se = S8e(r, ee) ? et : y || Y7(r) ? l1(ee) : Zr(ee); + } else { + const me = !wi(f) && (I === 0 || !YS(l) || U4(l)) ? Tk(R, f.escapedText) : void 0; + if (!(me && me.type)) { + const Ve = Nde( + r, + l.symbol, + /*excludeClasses*/ + !0 + ); + return !Ve && S8(l) ? Ne : l.symbol === Xe ? (Xe.exports.has(f.escapedText) && Xe.exports.get(f.escapedText).flags & 418 ? We(f, p.Property_0_does_not_exist_on_type_1, Pi(f.escapedText), Ur(l)) : ne && We(f, p.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, Ur(l)), Ne) : (f.escapedText && !$y(r) && x8e(f, U4(l) ? R : l, Ve), be); + } + me.isReadonly && (u0(r) || cB(r)) && We(r, p.Index_signature_in_type_0_only_permits_reading, Ur(R)), Se = me.type, F.noUncheckedIndexedAccess && G1(r) !== 1 && (Se = Gn([Se, je])), F.noPropertyAccessFromIndexSignature && Dn(r) && We(f, p.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, Pi(f.escapedText)), me.declaration && Vp(me.declaration) && Hf(f, [me.declaration], f.escapedText); + } + return T8e(r, ee, Se, f, m); + } + function Nde(r, a, l) { + var f; + const m = xr(r); + if (m && F.checkJs === void 0 && m.checkJsDirective === void 0 && (m.scriptKind === 1 || m.scriptKind === 2)) { + const y = rr(a?.declarations, xr), x = !a?.valueDeclaration || !Qn(a.valueDeclaration) || ((f = a.valueDeclaration.heritageClauses) == null ? void 0 : f.length) || c0( + /*useLegacyDecorators*/ + !1, + a.valueDeclaration + ); + return !(m !== y && y && s0(y)) && !(l && a && a.flags & 32 && x) && !(r && l && Dn(r) && r.expression.kind === 110 && x); + } + return !1; + } + function T8e(r, a, l, f, m) { + const y = G1(r); + if (y === 1) + return Hh(l, !!(a && a.flags & 16777216)); + if (a && !(a.flags & 98311) && !(a.flags & 8192 && l.flags & 1048576) && !tX(a.declarations)) + return l; + if (l === et) + return $f(r, a); + l = lde(l, r, m); + let x = !1; + if (K && oe && go(r) && r.expression.kind === 110) { + const R = a && a.valueDeclaration; + if (R && h7e(R) && !Os(R)) { + const J = M8(r); + J.kind === 176 && J.parent === R.parent && !(R.flags & 33554432) && (x = !0); + } + } else K && a && a.valueDeclaration && Dn(a.valueDeclaration) && _3(a.valueDeclaration) && M8(r) === M8(a.valueDeclaration) && (x = !0); + const I = $h(r, l, x ? b1(l) : l); + return x && !rE(l) && rE(I) ? (We(f, p.Property_0_is_used_before_being_assigned, Si(a)), l) : y ? Uh(I) : I; + } + function Dit(r, a, l) { + const { valueDeclaration: f } = r; + if (!f || xr(a).isDeclarationFile) + return; + let m; + const y = dn(l); + Ide(a) && !aKe(f) && !(go(a) && go(a.expression)) && !cg(f, l) && !(hc(f) && _X(f) & 256) && (U || !Pit(r)) ? m = We(l, p.Property_0_is_used_before_its_initialization, y) : f.kind === 263 && a.parent.kind !== 183 && !(f.flags & 33554432) && !cg(f, l) && (m = We(l, p.Class_0_used_before_its_declaration, y)), m && Fs(m, Xr(f, p._0_is_declared_here, y)); + } + function Ide(r) { + return !!sr(r, (a) => { + switch (a.kind) { + case 172: + return !0; + case 303: + case 174: + case 177: + case 178: + case 305: + case 167: + case 239: + case 294: + case 291: + case 292: + case 293: + case 286: + case 233: + case 298: + return !1; + case 219: + case 244: + return ms(a.parent) && ac(a.parent.parent) ? !0 : "quit"; + default: + return Sd(a) ? !1 : "quit"; + } + }); + } + function Pit(r) { + if (!(r.parent.flags & 32)) + return !1; + let a = Zr(r.parent); + for (; ; ) { + if (a = a.symbol && wit(a), !a) + return !1; + const l = js(a, r.escapedName); + if (l && l.valueDeclaration) + return !0; + } + } + function wit(r) { + const a = un(r); + if (a.length !== 0) + return Ys(a); + } + function x8e(r, a, l) { + let f, m; + if (!wi(r) && a.flags & 1048576 && !(a.flags & 402784252)) { + for (const x of a.types) + if (!js(x, r.escapedText) && !Tk(x, r.escapedText)) { + f = us(f, p.Property_0_does_not_exist_on_type_1, ao(r), Ur(x)); + break; + } + } + if (k8e(r.escapedText, a)) { + const x = ao(r), I = Ur(a); + f = us(f, p.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, x, I, I + "." + x); + } else { + const x = $8(a); + if (x && js(x, r.escapedText)) + f = us(f, p.Property_0_does_not_exist_on_type_1, ao(r), Ur(a)), m = Xr(r, p.Did_you_forget_to_use_await); + else { + const I = ao(r), R = Ur(a), J = Iit(I, a); + if (J !== void 0) + f = us(f, p.Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later, I, R, J); + else { + const ee = Ode(r, a); + if (ee !== void 0) { + const Se = uc(ee), me = l ? p.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : p.Property_0_does_not_exist_on_type_1_Did_you_mean_2; + f = us(f, me, I, R, Se), m = ee.valueDeclaration && Xr(ee.valueDeclaration, p._0_is_declared_here, Se); + } else { + const Se = Ait(a) ? p.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : p.Property_0_does_not_exist_on_type_1; + f = us(Afe(f, a), Se, I, R); + } + } + } + } + const y = wg(xr(r), r, f); + m && Fs(y, m), Vy(!l || f.code !== p.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, y); + } + function Ait(r) { + return F.lib && !F.lib.includes("dom") && Brt(r, (a) => a.symbol && /^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(Pi(a.symbol.escapedName))) && Vh(r); + } + function k8e(r, a) { + const l = a.symbol && js(Zr(a.symbol), r); + return l !== void 0 && !!l.valueDeclaration && Os(l.valueDeclaration); + } + function Nit(r) { + const a = ad(r), f = Lj().get(a); + return f && cR(f.keys()); + } + function Iit(r, a) { + const l = ju(a).symbol; + if (!l) + return; + const f = uc(l), y = Lj().get(f); + if (y) { + for (const [x, I] of y) + if (ls(I, r)) + return x; + } + } + function C8e(r, a) { + return TM( + r, + Wa(a), + 106500 + /* ClassMember */ + ); + } + function Ode(r, a) { + let l = Wa(a); + if (typeof r != "string") { + const f = r.parent; + Dn(f) && (l = Ln(l, (m) => A8e(f, a, m))), r = dn(r); + } + return TM( + r, + l, + 111551 + /* Value */ + ); + } + function E8e(r, a) { + const l = Gi(r) ? r : dn(r), f = Wa(a); + return (l === "for" ? Nn(f, (y) => uc(y) === "htmlFor") : l === "class" ? Nn(f, (y) => uc(y) === "className") : void 0) ?? TM( + l, + f, + 111551 + /* Value */ + ); + } + function D8e(r, a) { + const l = Ode(r, a); + return l && uc(l); + } + function Oit(r, a, l) { + const f = x_(r, a, l); + if (f) return f; + let m; + return r === ve ? m = Ii( + ["string", "number", "boolean", "object", "bigint", "symbol"], + (x) => r.has(x.charAt(0).toUpperCase() + x.slice(1)) ? va(524288, x) : void 0 + ).concat(ts(r.values())) : m = ts(r.values()), TM(Pi(a), m, l); + } + function P8e(r, a, l) { + return E.assert(a !== void 0, "outername should always be defined"), Pr( + r, + a, + l, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1, + /*excludeGlobals*/ + !1 + ); + } + function Fde(r, a) { + return a.exports && TM( + dn(r), + ok(a), + 2623475 + /* ModuleMember */ + ); + } + function Fit(r, a, l) { + function f(x) { + const I = d2(r, x); + if (I) { + const R = uT(Zr(I)); + return !!R && Om(R) >= 1 && Bs(l, qd(R, 0)); + } + return !1; + } + const m = u0(a) ? "set" : "get"; + if (!f(m)) + return; + let y = F3(a.expression); + return y === void 0 ? y = m : y += "." + m, y; + } + function Lit(r, a) { + const l = a.types.filter((f) => !!(f.flags & 128)); + return F2(r.value, l, (f) => f.value); + } + function TM(r, a, l) { + return F2(r, a, f); + function f(m) { + const y = uc(m); + if (!zi(y, '"')) { + if (m.flags & l) + return y; + if (m.flags & 2097152) { + const x = jS(m); + if (x && x.flags & l) + return y; + } + } + } + } + function xM(r, a, l) { + const f = r && r.flags & 106500 && r.valueDeclaration; + if (!f) + return; + const m = ef( + f, + 2 + /* Private */ + ), y = r.valueDeclaration && Bl(r.valueDeclaration) && wi(r.valueDeclaration.name); + if (!(!m && !y) && !(a && Y7(a) && !(r.flags & 65536))) { + if (l) { + const x = sr(a, so); + if (x && x.symbol === r) + return; + } + (gc(r) & 1 ? Ni(r).target : r).isReferenced = -1; + } + } + function w8e(r, a) { + return r.kind === 110 || !!a && fo(r) && a === df(tf(r)); + } + function Mit(r, a) { + switch (r.kind) { + case 211: + return Lde(r, r.expression.kind === 108, a, W_(qi(r.expression))); + case 166: + return Lde( + r, + /*isSuper*/ + !1, + a, + W_(qi(r.left)) + ); + case 205: + return Lde( + r, + /*isSuper*/ + !1, + a, + xi(r) + ); + } + } + function A8e(r, a, l) { + return Mde( + r, + r.kind === 211 && r.expression.kind === 108, + /*isWrite*/ + !1, + a, + l + ); + } + function Lde(r, a, l, f) { + if (Ea(f)) + return !0; + const m = js(f, l); + return !!m && Mde( + r, + a, + /*isWrite*/ + !1, + f, + m + ); + } + function Mde(r, a, l, f, m) { + if (Ea(f)) + return !0; + if (m.valueDeclaration && Pu(m.valueDeclaration)) { + const y = Nl(m.valueDeclaration); + return !fu(r) && !!sr(r, (x) => x === y); + } + return g8e(r, a, l, f, m); + } + function Rit(r) { + const a = r.initializer; + if (a.kind === 261) { + const l = a.declarations[0]; + if (l && !Ts(l.name)) + return xn(l); + } else if (a.kind === 80) + return df(a); + } + function jit(r) { + return Bu(r).length === 1 && !!eh(r, _e); + } + function Bit(r) { + const a = Ja(r); + if (a.kind === 80) { + const l = df(a); + if (l.flags & 3) { + let f = r, m = r.parent; + for (; m; ) { + if (m.kind === 249 && f === m.statement && Rit(m) === l && jit($l(m.expression))) + return !0; + f = m, m = m.parent; + } + } + } + return !1; + } + function Jit(r, a) { + return r.flags & 64 ? zit(r, a) : N8e(r, oE(r.expression), a); + } + function zit(r, a) { + const l = qi(r.expression), f = A8(l, r.expression); + return ZG(N8e(r, Am(f, r.expression), a), r, f !== l); + } + function N8e(r, a, l) { + const f = G1(r) !== 0 || wde(r) ? W_(a) : a, m = r.argumentExpression, y = qi(m); + if (Aa(f) || f === mn) + return f; + if (j$(f) && !Ga(m)) + return We(m, p.A_const_enum_member_can_only_be_accessed_using_a_string_literal), be; + const x = Bit(m) ? _e : y, I = G1(r); + let R; + I === 0 ? R = 32 : (R = 4 | (YS(f) && !U4(f) ? 2 : 0), I === 2 && (R |= 32)); + const J = m1(f, x, R, r) || be; + return RIe(T8e(r, bn(r).resolvedSymbol, J, m, l), r); + } + function I8e(r) { + return Qd(r) || Ob(r) || ru(r); + } + function lT(r) { + return I8e(r) && rr(r.typeArguments, ra), r.kind === 215 ? qi(r.template) : ru(r) ? qi(r.attributes) : cn(r) ? qi(r.left) : Qd(r) && rr(r.arguments, (a) => { + qi(a); + }), A; + } + function Nm(r) { + return lT(r), Me; + } + function Wit(r, a, l) { + let f, m, y = 0, x, I = -1, R; + E.assert(!a.length); + for (const J of r) { + const ee = J.declaration && xn(J.declaration), Se = J.declaration && J.declaration.parent; + !m || ee === m ? f && Se === f ? x = x + 1 : (f = Se, x = y) : (x = y = a.length, f = Se), m = ee, Yz(J) ? (I++, R = I, y++) : R = x, a.splice(R, 0, l ? PZe(J, l) : J); + } + } + function P$(r) { + return !!r && (r.kind === 230 || r.kind === 237 && r.isSpread); + } + function Rde(r) { + return rc(r, P$); + } + function O8e(r) { + return !!(r.flags & 16384); + } + function Vit(r) { + return !!(r.flags & 49155); + } + function w$(r, a, l, f = !1) { + let m, y = !1, x = U_(l), I = Om(l); + if (r.kind === 215) + if (m = a.length, r.template.kind === 228) { + const R = ia(r.template.templateSpans); + y = ic(R.literal) || !!R.literal.isUnterminated; + } else { + const R = r.template; + E.assert( + R.kind === 15 + /* NoSubstitutionTemplateLiteral */ + ), y = !!R.isUnterminated; + } + else if (r.kind === 170) + m = z8e(r, l); + else if (r.kind === 226) + m = 1; + else if (ru(r)) { + if (y = r.attributes.end === r.end, y) + return !0; + m = I === 0 ? a.length : 1, x = a.length === 0 ? x : 1, I = Math.min(I, 1); + } else if (r.arguments) { + m = f ? a.length + 1 : a.length, y = r.arguments.end === r.end; + const R = Rde(a); + if (R >= 0) + return R >= Om(l) && (yg(l) || R < U_(l)); + } else + return E.assert( + r.kind === 214 + /* NewExpression */ + ), Om(l) === 0; + if (!yg(l) && m > x) + return !1; + if (y || m >= I) + return !0; + for (let R = m; R < I; R++) { + const J = qd(l, R); + if (Jc(J, Qr(r) && !K ? Vit : O8e).flags & 131072) + return !1; + } + return !0; + } + function jde(r, a) { + const l = Dr(r.typeParameters), f = Em(r.typeParameters); + return !ut(a) || a.length >= f && a.length <= l; + } + function F8e(r, a) { + let l; + return !!(r.target && (l = C2(r.target, a)) && Ek(l)); + } + function uT(r) { + return z8( + r, + 0, + /*allowMembers*/ + !1 + ); + } + function L8e(r) { + return z8( + r, + 0, + /*allowMembers*/ + !1 + ) || z8( + r, + 1, + /*allowMembers*/ + !1 + ); + } + function z8(r, a, l) { + if (r.flags & 524288) { + const f = zd(r); + if (l || f.properties.length === 0 && f.indexInfos.length === 0) { + if (a === 0 && f.callSignatures.length === 1 && f.constructSignatures.length === 0) + return f.callSignatures[0]; + if (a === 1 && f.constructSignatures.length === 1 && f.callSignatures.length === 0) + return f.constructSignatures[0]; + } + } + } + function M8e(r, a, l, f) { + const m = O8(r.typeParameters, r, 0, f), y = W8(a), x = l && (y && y.flags & 262144 ? l.nonFixingMapper : l.mapper), I = x ? wk(a, x) : a; + return Bpe(I, r, (R, J) => { + Gh(m.inferences, R, J); + }), l || Jpe(a, r, (R, J) => { + Gh( + m.inferences, + R, + J, + 128 + /* ReturnType */ + ); + }), h8(r, Zpe(m), Qr(a.declaration)); + } + function Uit(r, a, l, f) { + const m = b$(a, r), y = uE(r.attributes, m, f, l); + return Gh(f.inferences, y, m), Zpe(f); + } + function R8e(r) { + if (!r) + return en; + const a = qi(r); + return PK(r) ? a : VE(r.parent) ? qh(a) : fu(r.parent) ? YG(a) : a; + } + function Bde(r, a, l, f, m) { + if (ru(r)) + return Uit(r, a, f, m); + if (r.kind !== 170 && r.kind !== 226) { + const R = Ri(a.typeParameters, (ee) => !!GS(ee)), J = o_( + r, + R ? 8 : 0 + /* None */ + ); + if (J) { + const ee = Ha(a); + if (S1(ee)) { + const Se = x2(r); + if (!(!R && o_( + r, + 8 + /* SkipBindingPatterns */ + ) !== J)) { + const ht = Upe(Ktt( + Se, + 1 + /* NoDefault */ + )), er = Ji(J, ht), tr = uT(er), Rr = tr && tr.typeParameters ? $S(Bfe(tr, tr.typeParameters)) : er; + Gh( + m.inferences, + Rr, + ee, + 128 + /* ReturnType */ + ); + } + const Ve = O8(a.typeParameters, a, m.flags), mt = Ji(J, Se && Se.returnMapper); + Gh(Ve.inferences, mt, ee), m.returnMapper = ut(Ve.inferences, _E) ? Upe(nrt(Ve)) : void 0; + } + } + } + const y = V8(a), x = y ? Math.min(U_(a) - 1, l.length) : l.length; + if (y && y.flags & 262144) { + const R = Nn(m.inferences, (J) => J.typeParameter === y); + R && (R.impliedArity = rc(l, P$, x) < 0 ? l.length - x : void 0); + } + const I = Vv(a); + if (I && S1(I)) { + const R = J8e(r); + Gh(m.inferences, R8e(R), I); + } + for (let R = 0; R < x; R++) { + const J = l[R]; + if (J.kind !== 232) { + const ee = qd(a, R); + if (S1(ee)) { + const Se = uE(J, ee, m, f); + Gh(m.inferences, Se, ee); + } + } + } + if (y && S1(y)) { + const R = Jde(l, x, l.length, y, m, f); + Gh(m.inferences, R, y); + } + return Zpe(m); + } + function j8e(r) { + return r.flags & 1048576 ? Ho(r, j8e) : r.flags & 1 || eM(Hl(r) || r) ? r : la(r) ? gg( + h2(r), + r.target.elementFlags, + /*readonly*/ + !1, + r.target.labeledElementDeclarations + ) : gg([r], [ + 8 + /* Variadic */ + ]); + } + function Jde(r, a, l, f, m, y) { + const x = HS(f); + if (a >= l - 1) { + const ee = r[l - 1]; + if (P$(ee)) { + const Se = ee.kind === 237 ? ee.type : uE(ee.expression, f, m, y); + return Y0(Se) ? j8e(Se) : cu(K0(33, Se, Ut, ee.kind === 230 ? ee.expression : ee), x); + } + } + const I = [], R = [], J = []; + for (let ee = a; ee < l; ee++) { + const Se = r[ee]; + if (P$(Se)) { + const me = Se.kind === 237 ? Se.type : qi(Se.expression); + Y0(me) ? (I.push(me), R.push( + 8 + /* Variadic */ + )) : (I.push(K0(33, me, Ut, Se.kind === 230 ? Se.expression : Se)), R.push( + 4 + /* Rest */ + )); + } else { + const me = la(f) ? yde(f, ee - a, l - a) || yt : J_( + f, + pd(ee - a), + 256 + /* Contextual */ + ), Ve = uE(Se, me, m, y), mt = x || Sc( + me, + 406978556 + /* StringMapping */ + ); + I.push(mt ? Ju(Ve) : $v(Ve)), R.push( + 1 + /* Required */ + ); + } + Se.kind === 237 && Se.tupleNameSource ? J.push(Se.tupleNameSource) : J.push(void 0); + } + return gg(I, R, x && !Hp(f, Ope), J); + } + function zde(r, a, l, f) { + const m = Qr(r.declaration), y = r.typeParameters, x = p1(or(a, xi), y, Em(y), m); + let I; + for (let R = 0; R < a.length; R++) { + E.assert(y[R] !== void 0, "Should not call checkTypeArguments with too many type arguments"); + const J = a_(y[R]); + if (J) { + const ee = l && f ? () => us( + /*details*/ + void 0, + p.Type_0_does_not_satisfy_the_constraint_1 + ) : void 0, Se = f || p.Type_0_does_not_satisfy_the_constraint_1; + I || (I = z_(y, x)); + const me = x[R]; + if (!xu( + me, + pf(Ji(J, I), me), + l ? a[R] : void 0, + Se, + ee + )) + return; + } + } + return x; + } + function B8e(r) { + if (Ok(r.tagName)) + return 2; + const a = ju(qi(r.tagName)); + return Dr(xs( + a, + 1 + /* Construct */ + )) ? 0 : Dr(xs( + a, + 0 + /* Call */ + )) ? 1 : 2; + } + function qit(r, a, l, f, m, y, x) { + const I = b$(a, r), R = uE( + r.attributes, + I, + /*inferenceContext*/ + void 0, + f + ), J = f & 4 ? I8(R) : R; + return ee() && xpe( + J, + I, + l, + m ? r.tagName : void 0, + r.attributes, + /*headMessage*/ + void 0, + y, + x + ); + function ee() { + var Se; + if (xde(r)) + return !0; + const me = (pm(r) || oS(r)) && !(Ok(r.tagName) || Cd(r.tagName)) ? qi(r.tagName) : void 0; + if (!me) + return !0; + const Ve = xs( + me, + 0 + /* Call */ + ); + if (!Dr(Ve)) + return !0; + const mt = V7e(r); + if (!mt) + return !0; + const ht = No( + mt, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !1, + r + ); + if (!ht) + return !0; + const er = Zr(ht), tr = xs( + er, + 0 + /* Call */ + ); + if (!Dr(tr)) + return !0; + let Rr = !1, vn = 0; + for (const Cr of tr) { + const Fr = qd(Cr, 0), En = xs( + Fr, + 0 + /* Call */ + ); + if (Dr(En)) + for (const Rn of En) { + if (Rr = !0, yg(Rn)) + return !0; + const jn = U_(Rn); + jn > vn && (vn = jn); + } + } + if (!Rr) + return !0; + let cr = 1 / 0; + for (const Cr of Ve) { + const Fr = Om(Cr); + Fr < cr && (cr = Fr); + } + if (cr <= vn) + return !0; + if (m) { + const Cr = Xr(r.tagName, p.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, Y_(r.tagName), cr, Y_(mt), vn), Fr = (Se = kp(r.tagName)) == null ? void 0 : Se.valueDeclaration; + Fr && Fs(Cr, Xr(Fr, p._0_is_declared_here, Y_(r.tagName))), x && x.skipLogging && (x.errors || (x.errors = [])).push(Cr), x.skipLogging || La.add(Cr); + } + return !1; + } + } + function A$(r) { + return r = Ja(r), G5(r) ? Ja(r.expression) : r; + } + function kM(r, a, l, f, m, y, x, I) { + const R = { errors: void 0, skipLogging: !0 }; + if (ru(r)) + return qit(r, l, f, m, y, x, R) ? void 0 : (E.assert(!y || !!R.errors, "jsx should have errors when reporting errors"), R.errors || He); + const J = Vv(l); + if (J && J !== en && !(Ib(r) || Es(r) && f_(r.expression))) { + const mt = J8e(r), ht = R8e(mt), er = y ? mt || r : void 0, tr = p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; + if (!Tp(ht, J, f, er, tr, x, R)) + return E.assert(!y || !!R.errors, "this parameter should have errors when reporting errors"), R.errors || He; + } + const ee = p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1, Se = V8(l), me = Se ? Math.min(U_(l) - 1, a.length) : a.length; + for (let mt = 0; mt < me; mt++) { + const ht = a[mt]; + if (ht.kind !== 232) { + const er = qd(l, mt), tr = uE( + ht, + er, + /*inferenceContext*/ + void 0, + m + ), Rr = m & 4 ? I8(tr) : tr, vn = I ? Ji(Rr, I.nonFixingMapper) : Rr, cr = A$(ht); + if (!xpe(vn, er, f, y ? cr : void 0, cr, ee, x, R)) + return E.assert(!y || !!R.errors, "parameter should have errors when reporting errors"), Ve(ht, vn, er), R.errors || He; + } + } + if (Se) { + const mt = Jde( + a, + me, + a.length, + Se, + /*context*/ + void 0, + m + ), ht = a.length - me, er = y ? ht === 0 ? r : ht === 1 ? A$(a[me]) : om(CM(r, mt), a[me].pos, a[a.length - 1].end) : void 0; + if (!Tp( + mt, + Se, + f, + er, + ee, + /*containingMessageChain*/ + void 0, + R + )) + return E.assert(!y || !!R.errors, "rest parameter should have errors when reporting errors"), Ve(er, mt, Se), R.errors || He; + } + return; + function Ve(mt, ht, er) { + if (mt && y && R.errors && R.errors.length) { + if (qP(er)) + return; + const tr = qP(ht); + tr && Pm(tr, er, f) && Fs(R.errors[0], Xr(mt, p.Did_you_forget_to_use_await)); + } + } + } + function J8e(r) { + if (r.kind === 226) + return r.right; + const a = r.kind === 213 ? r.expression : r.kind === 215 ? r.tag : r.kind === 170 && !$ ? r.expression : void 0; + if (a) { + const l = Bc(a); + if (go(l)) + return l.expression; + } + } + function CM(r, a, l, f) { + const m = av.createSyntheticExpression(a, l, f); + return ot(m, r), Da(m, r), m; + } + function N$(r) { + if (r.kind === 215) { + const f = r.template, m = [CM(f, CKe())]; + return f.kind === 228 && rr(f.templateSpans, (y) => { + m.push(y.expression); + }), m; + } + if (r.kind === 170) + return Hit(r); + if (r.kind === 226) + return [r.left]; + if (ru(r)) + return r.attributes.properties.length > 0 || pm(r) && r.parent.children.length > 0 ? [r.attributes] : He; + const a = r.arguments || He, l = Rde(a); + if (l >= 0) { + const f = a.slice(0, l); + for (let m = l; m < a.length; m++) { + const y = a[m], x = y.kind === 230 && (za ? qi(y.expression) : Dc(y.expression)); + x && la(x) ? rr(h2(x), (I, R) => { + var J; + const ee = x.target.elementFlags[R], Se = CM(y, ee & 4 ? cu(I) : I, !!(ee & 12), (J = x.target.labeledElementDeclarations) == null ? void 0 : J[R]); + f.push(Se); + }) : f.push(y); + } + return f; + } + return a; + } + function Hit(r) { + const a = r.expression, l = Kde(r); + if (l) { + const f = []; + for (const m of l.parameters) { + const y = Zr(m); + f.push(CM(a, y)); + } + return f; + } + return E.fail(); + } + function z8e(r, a) { + return F.experimentalDecorators ? Git(r, a) : ( + // Allow the runtime to oversupply arguments to an ES decorator as long as there's at least one parameter. + Math.min(Math.max(U_(a), 1), 2) + ); + } + function Git(r, a) { + switch (r.parent.kind) { + case 263: + case 231: + return 1; + case 172: + return im(r.parent) ? 3 : 2; + case 174: + case 177: + case 178: + return a.parameters.length <= 2 ? 2 : 3; + case 169: + return 3; + default: + return E.fail(); + } + } + function W8e(r) { + const a = xr(r), { start: l, length: f } = H2(a, Dn(r.expression) ? r.expression.name : r.expression); + return { start: l, length: f, sourceFile: a }; + } + function EM(r, a, ...l) { + if (Es(r)) { + const { sourceFile: f, start: m, length: y } = W8e(r); + return "message" in a ? xl(f, m, y, a, ...l) : Hj(f, a); + } else + return "message" in a ? Xr(r, a, ...l) : wg(xr(r), r, a); + } + function $it(r) { + return Qd(r) ? Dn(r.expression) ? r.expression.name : r.expression : Ob(r) ? Dn(r.tag) ? r.tag.name : r.tag : ru(r) ? r.tagName : r; + } + function Xit(r) { + if (!Es(r) || !Re(r.expression)) return !1; + const a = Kt( + r.expression, + r.expression.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ), l = a?.valueDeclaration; + if (!l || !ji(l) || !Sy(l.parent) || !Ib(l.parent.parent) || !Re(l.parent.parent.expression)) + return !1; + const f = Qfe( + /*reportErrors*/ + !1 + ); + return f ? kp( + l.parent.parent.expression, + /*ignoreErrors*/ + !0 + ) === f : !1; + } + function V8e(r, a, l, f) { + var m; + const y = Rde(l); + if (y > -1) + return Xr(l[y], p.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter); + let x = Number.POSITIVE_INFINITY, I = Number.NEGATIVE_INFINITY, R = Number.NEGATIVE_INFINITY, J = Number.POSITIVE_INFINITY, ee; + for (const ht of a) { + const er = Om(ht), tr = U_(ht); + er < x && (x = er, ee = ht), I = Math.max(I, tr), er < l.length && er > R && (R = er), l.length < tr && tr < J && (J = tr); + } + const Se = ut(a, yg), me = Se ? x : x < I ? x + "-" + I : x, Ve = !Se && me === 1 && l.length === 0 && Xit(r); + if (Ve && Qr(r)) + return EM(r, p.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); + const mt = dl(r) ? Se ? p.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : p.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : Se ? p.Expected_at_least_0_arguments_but_got_1 : Ve ? p.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : p.Expected_0_arguments_but_got_1; + if (x < l.length && l.length < I) { + if (f) { + let ht = us( + /*details*/ + void 0, + p.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, + l.length, + R, + J + ); + return ht = us(ht, f), EM(r, ht); + } + return EM(r, p.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, l.length, R, J); + } else if (l.length < x) { + let ht; + if (f) { + let tr = us( + /*details*/ + void 0, + mt, + me, + l.length + ); + tr = us(tr, f), ht = EM(r, tr); + } else + ht = EM(r, mt, me, l.length); + const er = (m = ee?.declaration) == null ? void 0 : m.parameters[ee.thisParameter ? l.length + 1 : l.length]; + if (er) { + const tr = Ts(er.name) ? [p.An_argument_matching_this_binding_pattern_was_not_provided] : Um(er) ? [p.Arguments_for_the_rest_parameter_0_were_not_provided, dn(tf(er.name))] : [p.An_argument_for_0_was_not_provided, er.name ? dn(tf(er.name)) : l.length], Rr = Xr(er, ...tr); + return Fs(ht, Rr); + } + return ht; + } else { + const ht = N.createNodeArray(l.slice(I)), er = fa(ht).pos; + let tr = ia(ht).end; + if (tr === er && tr++, om(ht, er, tr), f) { + let Rr = us( + /*details*/ + void 0, + mt, + me, + l.length + ); + return Rr = us(Rr, f), Hw(xr(r), ht, Rr); + } + return nC(xr(r), ht, mt, me, l.length); + } + } + function Qit(r, a, l, f) { + const m = l.length; + if (a.length === 1) { + const I = a[0], R = Em(I.typeParameters), J = Dr(I.typeParameters); + if (f) { + let ee = us( + /*details*/ + void 0, + p.Expected_0_type_arguments_but_got_1, + R < J ? R + "-" + J : R, + m + ); + return ee = us(ee, f), Hw(xr(r), l, ee); + } + return nC(xr(r), l, p.Expected_0_type_arguments_but_got_1, R < J ? R + "-" + J : R, m); + } + let y = -1 / 0, x = 1 / 0; + for (const I of a) { + const R = Em(I.typeParameters), J = Dr(I.typeParameters); + R > m ? x = Math.min(x, R) : J < m && (y = Math.max(y, J)); + } + if (y !== -1 / 0 && x !== 1 / 0) { + if (f) { + let I = us( + /*details*/ + void 0, + p.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, + m, + y, + x + ); + return I = us(I, f), Hw(xr(r), l, I); + } + return nC(xr(r), l, p.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, m, y, x); + } + if (f) { + let I = us( + /*details*/ + void 0, + p.Expected_0_type_arguments_but_got_1, + y === -1 / 0 ? x : y, + m + ); + return I = us(I, f), Hw(xr(r), l, I); + } + return nC(xr(r), l, p.Expected_0_type_arguments_but_got_1, y === -1 / 0 ? x : y, m); + } + function cE(r, a, l, f, m, y) { + const x = r.kind === 215, I = r.kind === 170, R = ru(r), J = r.kind === 226, ee = !P && !l; + let Se; + !I && !J && !G2(r) && (Se = r.typeArguments, (x || R || r.expression.kind !== 108) && rr(Se, ra)); + const me = l || []; + Wit(a, me, m), E.assert(me.length, "Revert #54442 and add a testcase with whatever triggered this"); + const Ve = N$(r), mt = me.length === 1 && !me[0].typeParameters; + let ht = !I && !mt && ut(Ve, Sp) ? 4 : 0, er, tr, Rr, vn; + const cr = !!(f & 16) && r.kind === 213 && r.arguments.hasTrailingComma; + if (me.length > 1 && (vn = Fr(me, og, mt, cr)), vn || (vn = Fr(me, lf, mt, cr)), vn) + return vn; + if (vn = Yit(r, me, Ve, !!l, f), bn(r).resolvedSignature = vn, ee) + if (!y && J && (y = p.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method), er) + if (er.length === 1 || er.length > 3) { + const En = er[er.length - 1]; + let Rn; + er.length > 3 && (Rn = us(Rn, p.The_last_overload_gave_the_following_error), Rn = us(Rn, p.No_overload_matches_this_call)), y && (Rn = us(Rn, y)); + const jn = kM( + r, + Ve, + En, + lf, + 0, + /*reportErrors*/ + !0, + () => Rn, + /*inferenceContext*/ + void 0 + ); + if (jn) + for (const qs of jn) + En.declaration && er.length > 3 && Fs(qs, Xr(En.declaration, p.The_last_overload_is_declared_here)), Cr(En, qs), La.add(qs); + else + E.fail("No error for last overload signature"); + } else { + const En = []; + let Rn = 0, jn = Number.MAX_VALUE, qs = 0, ks = 0; + for (const dc of er) { + const Br = kM( + r, + Ve, + dc, + lf, + 0, + /*reportErrors*/ + !0, + () => us( + /*details*/ + void 0, + p.Overload_0_of_1_2_gave_the_following_error, + ks + 1, + me.length, + km(dc) + ), + /*inferenceContext*/ + void 0 + ); + Br ? (Br.length <= jn && (jn = Br.length, qs = ks), Rn = Math.max(Rn, Br.length), En.push(Br)) : E.fail("No error for 3 or fewer overload signatures"), ks++; + } + const xa = Rn > 1 ? En[qs] : Ep(En); + E.assert(xa.length > 0, "No errors reported for 3 or fewer overload signatures"); + let is = us( + or(xa, xZ), + p.No_overload_matches_this_call + ); + y && (is = us(is, y)); + const $o = [...Xs(xa, (dc) => dc.relatedInformation)]; + let Xl; + if (Ri(xa, (dc) => dc.start === xa[0].start && dc.length === xa[0].length && dc.file === xa[0].file)) { + const { file: dc, start: Sr, length: Br } = xa[0]; + Xl = { file: dc, start: Sr, length: Br, code: is.code, category: is.category, messageText: is, relatedInformation: $o }; + } else + Xl = wg(xr(r), $it(r), is, $o); + Cr(er[0], Xl), La.add(Xl); + } + else if (tr) + La.add(V8e(r, [tr], Ve, y)); + else if (Rr) + zde( + Rr, + r.typeArguments, + /*reportErrors*/ + !0, + y + ); + else { + const En = Ln(a, (Rn) => jde(Rn, Se)); + En.length === 0 ? La.add(Qit(r, a, Se, y)) : La.add(V8e(r, En, Ve, y)); + } + return vn; + function Cr(En, Rn) { + var jn, qs; + const ks = er, xa = tr, is = Rr, $o = ((qs = (jn = En.declaration) == null ? void 0 : jn.symbol) == null ? void 0 : qs.declarations) || He, dc = $o.length > 1 ? Nn($o, (Sr) => so(Sr) && wp(Sr.body)) : void 0; + if (dc) { + const Sr = Qf(dc), Br = !Sr.typeParameters; + Fr([Sr], lf, Br) && Fs(Rn, Xr(dc, p.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible)); + } + er = ks, tr = xa, Rr = is; + } + function Fr(En, Rn, jn, qs = !1) { + var ks, xa; + if (er = void 0, tr = void 0, Rr = void 0, jn) { + const is = En[0]; + if (ut(Se) || !w$(r, Ve, is, qs)) + return; + if (kM( + r, + Ve, + is, + Rn, + 0, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + /*inferenceContext*/ + void 0 + )) { + er = [is]; + return; + } + return is; + } + for (let is = 0; is < En.length; is++) { + let $o = En[is]; + if (!jde($o, Se) || !w$(r, Ve, $o, qs)) + continue; + let Xl, dc; + if ($o.typeParameters) { + const Br = ((xa = (ks = $o.typeParameters[0].symbol.declarations) == null ? void 0 : ks[0]) == null ? void 0 : xa.parent) || ($o.declaration && ec($o.declaration) ? $o.declaration.parent : $o.declaration); + Br && sr(r, (pn) => pn === Br) && ($o = gKe($o)); + let ki; + if (ut(Se)) { + if (ki = zde( + $o, + Se, + /*reportErrors*/ + !1 + ), !ki) { + Rr = $o; + continue; + } + } else + dc = O8( + $o.typeParameters, + $o, + /*flags*/ + Qr(r) ? 2 : 0 + /* None */ + ), ki = th(Bde(r, $o, Ve, ht | 8, dc), dc.nonFixingMapper), ht |= dc.flags & 4 ? 8 : 0; + if (Xl = h8($o, ki, Qr($o.declaration), dc && dc.inferredTypeParameters), V8($o) && !w$(r, Ve, Xl, qs)) { + tr = Xl; + continue; + } + } else + Xl = $o; + if (kM( + r, + Ve, + Xl, + Rn, + ht, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + dc + )) { + (er || (er = [])).push(Xl); + continue; + } + if (ht) { + if (ht = 0, dc) { + const Sr = th(Bde(r, $o, Ve, ht, dc), dc.mapper); + if (Xl = h8($o, Sr, Qr($o.declaration), dc.inferredTypeParameters), V8($o) && !w$(r, Ve, Xl, qs)) { + tr = Xl; + continue; + } + } + if (kM( + r, + Ve, + Xl, + Rn, + ht, + /*reportErrors*/ + !1, + /*containingMessageChain*/ + void 0, + dc + )) { + (er || (er = [])).push(Xl); + continue; + } + } + return En[is] = Xl, Xl; + } + } + } + function Yit(r, a, l, f, m) { + return E.assert(a.length > 0), Fk(r), f || a.length === 1 || a.some((y) => !!y.typeParameters) ? est(r, a, l, m) : Zit(a); + } + function Zit(r) { + const a = Ii(r, (R) => R.thisParameter); + let l; + a.length && (l = U8e(a, a.map(wM))); + const { min: f, max: m } = _ee(r, Kit), y = []; + for (let R = 0; R < m; R++) { + const J = Ii(r, (ee) => gu(ee) ? R < ee.parameters.length - 1 ? ee.parameters[R] : ia(ee.parameters) : R < ee.parameters.length ? ee.parameters[R] : void 0); + E.assert(J.length !== 0), y.push(U8e(J, Ii(r, (ee) => C2(ee, R)))); + } + const x = Ii(r, (R) => gu(R) ? ia(R.parameters) : void 0); + let I = 128; + if (x.length !== 0) { + const R = cu(Gn( + Ii(r, d3e), + 2 + /* Subtype */ + )); + y.push(q8e(x, R)), I |= 1; + } + return r.some(Yz) && (I |= 2), Kg( + r[0].declaration, + /*typeParameters*/ + void 0, + // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. + l, + y, + /*resolvedReturnType*/ + Ys(r.map(Ha)), + /*resolvedTypePredicate*/ + void 0, + f, + I + ); + } + function Kit(r) { + const a = r.parameters.length; + return gu(r) ? a - 1 : a; + } + function U8e(r, a) { + return q8e(r, Gn( + a, + 2 + /* Subtype */ + )); + } + function q8e(r, a) { + return tT(fa(r), a); + } + function est(r, a, l, f) { + const m = nst(a, Ke === void 0 ? l.length : Ke), y = a[m], { typeParameters: x } = y; + if (!x) + return y; + const I = I8e(r) ? r.typeArguments : void 0, R = I ? bG(y, tst(I, x, Qr(r))) : rst(r, x, y, l, f); + return a[m] = R, R; + } + function tst(r, a, l) { + const f = r.map(Lk); + for (; f.length > a.length; ) + f.pop(); + for (; f.length < a.length; ) + f.push(GS(a[f.length]) || a_(a[f.length]) || Ype(l)); + return f; + } + function rst(r, a, l, f, m) { + const y = O8( + a, + l, + /*flags*/ + Qr(r) ? 2 : 0 + /* None */ + ), x = Bde(r, l, f, m | 4 | 8, y); + return bG(l, x); + } + function nst(r, a) { + let l = -1, f = -1; + for (let m = 0; m < r.length; m++) { + const y = r[m], x = U_(y); + if (yg(y) || x >= a) + return m; + x > f && (f = x, l = m); + } + return l; + } + function ist(r, a, l) { + if (r.expression.kind === 108) { + const R = m$(r.expression); + if (Ea(R)) { + for (const J of r.arguments) + qi(J); + return A; + } + if (!Aa(R)) { + const J = tm(Nl(r)); + if (J) { + const ee = f2(R, J.typeArguments, J); + return cE( + r, + ee, + a, + l, + 0 + /* None */ + ); + } + } + return lT(r); + } + let f, m = qi(r.expression); + if (J2(r)) { + const R = A8(m, r.expression); + f = R === m ? 0 : UE(r) ? 16 : 8, m = R; + } else + f = 0; + if (m = y8e( + m, + r.expression, + Tit + ), m === mn) + return Ot; + const y = ju(m); + if (Aa(y)) + return Nm(r); + const x = xs( + y, + 0 + /* Call */ + ), I = xs( + y, + 1 + /* Construct */ + ).length; + if (DM(m, y, x.length, I)) + return !Aa(m) && r.typeArguments && We(r, p.Untyped_function_calls_may_not_accept_type_arguments), lT(r); + if (!x.length) { + if (I) + We(r, p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, Ur(m)); + else { + let R; + if (r.arguments.length === 1) { + const J = xr(r).text; + _u(J.charCodeAt(sa( + J, + r.expression.end, + /*stopAfterLineBreak*/ + !0 + ) - 1)) && (R = Xr(r.expression, p.Are_you_missing_a_semicolon)); + } + Vde(r.expression, y, 0, R); + } + return Nm(r); + } + return l & 8 && !r.typeArguments && x.some(sst) ? (EIe(r, l), it) : x.some((R) => Qr(R.declaration) && !!cj(R.declaration)) ? (We(r, p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, Ur(m)), Nm(r)) : cE(r, x, a, l, f); + } + function sst(r) { + return !!(r.typeParameters && Mme(Ha(r))); + } + function DM(r, a, l, f) { + return Ea(r) || Ea(a) && !!(r.flags & 262144) || !l && !f && !(a.flags & 1048576) && !(Wd(a).flags & 131072) && Bs(r, kc); + } + function ast(r, a, l) { + let f = oE(r.expression); + if (f === mn) + return Ot; + if (f = ju(f), Aa(f)) + return Nm(r); + if (Ea(f)) + return r.typeArguments && We(r, p.Untyped_function_calls_may_not_accept_type_arguments), lT(r); + const m = xs( + f, + 1 + /* Construct */ + ); + if (m.length) { + if (!ost(r, m[0])) + return Nm(r); + if (H8e(m, (I) => !!(I.flags & 4))) + return We(r, p.Cannot_create_an_instance_of_an_abstract_class), Nm(r); + const x = f.symbol && gh(f.symbol); + return x && Vn( + x, + 64 + /* Abstract */ + ) ? (We(r, p.Cannot_create_an_instance_of_an_abstract_class), Nm(r)) : cE( + r, + m, + a, + l, + 0 + /* None */ + ); + } + const y = xs( + f, + 0 + /* Call */ + ); + if (y.length) { + const x = cE( + r, + y, + a, + l, + 0 + /* None */ + ); + return ne || (x.declaration && !Im(x.declaration) && Ha(x) !== en && We(r, p.Only_a_void_function_can_be_called_with_the_new_keyword), Vv(x) === en && We(r, p.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void)), x; + } + return Vde( + r.expression, + f, + 1 + /* Construct */ + ), Nm(r); + } + function H8e(r, a) { + return ss(r) ? ut(r, (l) => H8e(l, a)) : r.compositeKind === 1048576 ? ut(r.compositeSignatures, a) : a(r); + } + function Wde(r, a) { + const l = un(a); + if (!Dr(l)) + return !1; + const f = l[0]; + if (f.flags & 2097152) { + const m = f.types, y = Xwe(m); + let x = 0; + for (const I of f.types) { + if (!y[x] && wn(I) & 3 && (I.symbol === r || Wde(r, I))) + return !0; + x++; + } + return !1; + } + return f.symbol === r ? !0 : Wde(r, f); + } + function ost(r, a) { + if (!a || !a.declaration) + return !0; + const l = a.declaration, f = UT( + l, + 6 + /* NonPublicAccessibilityModifier */ + ); + if (!f || l.kind !== 176) + return !0; + const m = gh(l.parent.symbol), y = mo(l.parent.symbol); + if (!Nme(r, m)) { + const x = Nl(r); + if (x && f & 4) { + const I = Lk(x); + if (Wde(l.parent.symbol, I)) + return !0; + } + return f & 2 && We(r, p.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, Ur(y)), f & 4 && We(r, p.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, Ur(y)), !1; + } + return !0; + } + function G8e(r, a, l) { + let f; + const m = l === 0, y = fT(a), x = y && xs(y, l).length > 0; + if (a.flags & 1048576) { + const R = a.types; + let J = !1; + for (const ee of R) + if (xs(ee, l).length !== 0) { + if (J = !0, f) + break; + } else if (f || (f = us( + f, + m ? p.Type_0_has_no_call_signatures : p.Type_0_has_no_construct_signatures, + Ur(ee) + ), f = us( + f, + m ? p.Not_all_constituents_of_type_0_are_callable : p.Not_all_constituents_of_type_0_are_constructable, + Ur(a) + )), J) + break; + J || (f = us( + /*details*/ + void 0, + m ? p.No_constituent_of_type_0_is_callable : p.No_constituent_of_type_0_is_constructable, + Ur(a) + )), f || (f = us( + f, + m ? p.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other : p.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other, + Ur(a) + )); + } else + f = us( + f, + m ? p.Type_0_has_no_call_signatures : p.Type_0_has_no_construct_signatures, + Ur(a) + ); + let I = m ? p.This_expression_is_not_callable : p.This_expression_is_not_constructable; + if (Es(r.parent) && r.parent.arguments.length === 0) { + const { resolvedSymbol: R } = bn(r); + R && R.flags & 32768 && (I = p.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without); + } + return { + messageChain: us(f, I), + relatedMessage: x ? p.Did_you_forget_to_use_await : void 0 + }; + } + function Vde(r, a, l, f) { + const { messageChain: m, relatedMessage: y } = G8e(r, a, l), x = wg(xr(r), r, m); + if (y && Fs(x, Xr(r, y)), Es(r.parent)) { + const { start: I, length: R } = W8e(r.parent); + x.start = I, x.length = R; + } + La.add(x), $8e(a, l, f ? Fs(x, f) : x); + } + function $8e(r, a, l) { + if (!r.symbol) + return; + const f = Ni(r.symbol).originatingImport; + if (f && !hf(f)) { + const m = xs(Zr(Ni(r.symbol).target), a); + if (!m || !m.length) return; + Fs(l, Xr(f, p.Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead)); + } + } + function cst(r, a, l) { + const f = qi(r.tag), m = ju(f); + if (Aa(m)) + return Nm(r); + const y = xs( + m, + 0 + /* Call */ + ), x = xs( + m, + 1 + /* Construct */ + ).length; + if (DM(f, m, y.length, x)) + return lT(r); + if (!y.length) { + if (Wl(r.parent)) { + const I = Xr(r.tag, p.It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked); + return La.add(I), Nm(r); + } + return Vde( + r.tag, + m, + 0 + /* Call */ + ), Nm(r); + } + return cE( + r, + y, + a, + l, + 0 + /* None */ + ); + } + function lst(r) { + switch (r.parent.kind) { + case 263: + case 231: + return p.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; + case 169: + return p.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; + case 172: + return p.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; + case 174: + case 177: + case 178: + return p.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; + default: + return E.fail(); + } + } + function ust(r, a, l) { + const f = qi(r.expression), m = ju(f); + if (Aa(m)) + return Nm(r); + const y = xs( + m, + 0 + /* Call */ + ), x = xs( + m, + 1 + /* Construct */ + ).length; + if (DM(f, m, y.length, x)) + return lT(r); + if (pst(r, y) && !Qu(r.expression)) { + const R = sc( + r.expression, + /*includeTrivia*/ + !1 + ); + return We(r, p._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, R), Nm(r); + } + const I = lst(r); + if (!y.length) { + const R = G8e( + r.expression, + m, + 0 + /* Call */ + ), J = us(R.messageChain, I), ee = wg(xr(r.expression), r.expression, J); + return R.relatedMessage && Fs(ee, Xr(r.expression, R.relatedMessage)), La.add(ee), $8e(m, 0, ee), Nm(r); + } + return cE(r, y, a, l, 0, I); + } + function I$(r, a) { + const l = cT(r), f = l && _f(l), m = f && x_( + f, + Ff.Element, + 788968 + /* Type */ + ), y = m && Ae.symbolToEntityName(m, 788968, r), x = N.createFunctionTypeNode( + /*typeParameters*/ + void 0, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "props", + /*questionToken*/ + void 0, + Ae.typeToTypeNode(a, r) + )], + y ? N.createTypeReferenceNode( + y, + /*typeArguments*/ + void 0 + ) : N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ), I = va(1, "props"); + return I.links.type = a, Kg( + x, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [I], + m ? mo(m) : be, + /*resolvedTypePredicate*/ + void 0, + 1, + 0 + /* None */ + ); + } + function _st(r, a, l) { + if (Ok(r.tagName)) { + const x = f8e(r), I = I$(r, x); + return y1(uE( + r.attributes, + b$(I, r), + /*inferenceContext*/ + void 0, + 0 + /* Normal */ + ), x, r.tagName, r.attributes), Dr(r.typeArguments) && (rr(r.typeArguments, ra), La.add(nC(xr(r), r.typeArguments, p.Expected_0_type_arguments_but_got_1, 0, Dr(r.typeArguments)))), I; + } + const f = qi(r.tagName), m = ju(f); + if (Aa(m)) + return Nm(r); + const y = u8e(f, r); + return DM( + f, + m, + y.length, + /*constructSignatures*/ + 0 + ) ? lT(r) : y.length === 0 ? (We(r.tagName, p.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, sc(r.tagName)), Nm(r)) : cE( + r, + y, + a, + l, + 0 + /* None */ + ); + } + function fst(r, a, l) { + const f = qi(r.right); + if (!Ea(f)) { + const m = ime(f); + if (m) { + const y = ju(m); + if (Aa(y)) + return Nm(r); + const x = xs( + y, + 0 + /* Call */ + ), I = xs( + y, + 1 + /* Construct */ + ); + if (DM(m, y, x.length, I.length)) + return lT(r); + if (x.length) + return cE( + r, + x, + a, + l, + 0 + /* None */ + ); + } else if (!(iX(f) || h1(f, kc))) + return We(r.right, p.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method), Nm(r); + } + return A; + } + function pst(r, a) { + return a.length && Ri(a, (l) => l.minArgumentCount === 0 && !gu(l) && l.parameters.length < z8e(r, l)); + } + function dst(r, a, l) { + switch (r.kind) { + case 213: + return ist(r, a, l); + case 214: + return ast(r, a, l); + case 215: + return cst(r, a, l); + case 170: + return ust(r, a, l); + case 286: + case 285: + return _st(r, a, l); + case 226: + return fst(r, a, l); + } + E.assertNever(r, "Branch in 'resolveSignature' should be unreachable."); + } + function lE(r, a, l) { + const f = bn(r), m = f.resolvedSignature; + if (m && m !== it && !a) + return m; + const y = _r; + m || (_r = Lt.length), f.resolvedSignature = it; + let x = dst( + r, + a, + l || 0 + /* Normal */ + ); + return _r = y, x !== it && (f.resolvedSignature !== it && (x = f.resolvedSignature), f.resolvedSignature = cf === za ? x : m), x; + } + function Im(r) { + var a; + if (!r || !Qr(r)) + return !1; + const l = Ac(r) || po(r) ? r : (ti(r) || qc(r)) && r.initializer && po(r.initializer) ? r.initializer : void 0; + if (l) { + if (cj(r)) return !0; + if (qc(fh(l.parent))) return !1; + const f = xn(l); + return !!((a = f?.members) != null && a.size); + } + return !1; + } + function Ude(r, a) { + var l, f; + if (a) { + const m = Ni(a); + if (!m.inferredClassSymbol || !m.inferredClassSymbol.has($s(r))) { + const y = qm(r) ? r : NS(r); + return y.exports = y.exports || Ms(), y.members = y.members || Ms(), y.flags |= a.flags & 32, (l = a.exports) != null && l.size && sd(y.exports, a.exports), (f = a.members) != null && f.size && sd(y.members, a.members), (m.inferredClassSymbol || (m.inferredClassSymbol = /* @__PURE__ */ new Map())).set($s(y), y), y; + } + return m.inferredClassSymbol.get($s(r)); + } + } + function mst(r) { + var a; + const l = r && O$( + r, + /*allowDeclaration*/ + !0 + ), f = (a = l?.exports) == null ? void 0 : a.get("prototype"), m = f?.valueDeclaration && gst(f.valueDeclaration); + return m ? xn(m) : void 0; + } + function O$(r, a) { + if (!r.parent) + return; + let l, f; + if (ti(r.parent) && r.parent.initializer === r) { + if (!Qr(r) && !(rI(r.parent) && so(r))) + return; + l = r.parent.name, f = r.parent; + } else if (cn(r.parent)) { + const m = r.parent, y = r.parent.operatorToken.kind; + if (y === 64 && (a || m.right === r)) + l = m.left, f = l; + else if ((y === 57 || y === 61) && (ti(m.parent) && m.parent.initializer === m ? (l = m.parent.name, f = m.parent) : cn(m.parent) && m.parent.operatorToken.kind === 64 && (a || m.parent.right === m) && (l = m.parent.left, f = l), !l || !Q2(l) || !lC(l, m.left))) + return; + } else a && Ac(r) && (l = r.name, f = r); + if (!(!f || !l || !a && !U1(r, hy(l)))) + return C_(f); + } + function gst(r) { + if (!r.parent) + return !1; + let a = r.parent; + for (; a && a.kind === 211; ) + a = a.parent; + if (a && cn(a) && hy(a.left) && a.operatorToken.kind === 64) { + const l = rB(a); + return Gs(l) && l; + } + } + function hst(r, a) { + var l, f, m; + $M(r, r.typeArguments); + const y = lE( + r, + /*candidatesOutArray*/ + void 0, + a + ); + if (y === it) + return mn; + if (F$(y, r), r.expression.kind === 108) + return en; + if (r.kind === 214) { + const I = y.declaration; + if (I && I.kind !== 176 && I.kind !== 180 && I.kind !== 185 && !(Th(I) && ((f = (l = fC(I)) == null ? void 0 : l.parent) == null ? void 0 : f.kind) === 176) && !_C(I) && !Im(I)) + return ne && We(r, p.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type), Ne; + } + if (Qr(r) && Z8e(r)) + return f3e(r.arguments[0]); + const x = Ha(y); + if (x.flags & 12288 && X8e(r)) + return hpe(fh(r.parent)); + if (r.kind === 213 && !r.questionDotToken && r.parent.kind === 244 && x.flags & 16384 && bp(y)) { + if (!I3(r.expression)) + We(r.expression, p.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); + else if (!lM(r)) { + const I = We(r.expression, p.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); + cM(r.expression, I); + } + } + if (Qr(r)) { + const I = O$( + r, + /*allowDeclaration*/ + !1 + ); + if ((m = I?.exports) != null && m.size) { + const R = ie(I, I.exports, He, He, He); + return R.objectFlags |= 4096, Ys([x, R]); + } + } + return x; + } + function F$(r, a) { + if (!(r.flags & 128) && r.declaration && r.declaration.flags & 536870912) { + const l = PM(a), f = F3(b7(a)); + qy(l, r.declaration, f, km(r)); + } + } + function PM(r) { + switch (r = Ja(r), r.kind) { + case 213: + case 170: + case 214: + return PM(r.expression); + case 215: + return PM(r.tag); + case 286: + case 285: + return PM(r.tagName); + case 212: + return r.argumentExpression; + case 211: + return r.name; + case 183: + const a = r; + return $u(a.typeName) ? a.typeName.right : a; + default: + return r; + } + } + function X8e(r) { + if (!Es(r)) return !1; + let a = r.expression; + if (Dn(a) && a.name.escapedText === "for" && (a = a.expression), !Re(a) || a.escapedText !== "Symbol") + return !1; + const l = N3e( + /*reportErrors*/ + !1 + ); + return l ? l === Kt( + a, + "Symbol", + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ) : !1; + } + function yst(r) { + if (Mut(r), r.arguments.length === 0) + return OM(r, Ne); + const a = r.arguments[0], l = Dc(a), f = r.arguments.length > 1 ? Dc(r.arguments[1]) : void 0; + for (let y = 2; y < r.arguments.length; ++y) + Dc(r.arguments[y]); + if ((l.flags & 32768 || l.flags & 65536 || !Bs(l, we)) && We(a, p.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, Ur(l)), f) { + const y = A3e( + /*reportErrors*/ + !0 + ); + y !== bi && xu(f, rM( + y, + 32768 + /* Undefined */ + ), r.arguments[1]); + } + const m = Ru(r, a); + if (m) { + const y = e1( + m, + a, + /*dontResolveAlias*/ + !0, + /*suppressInteropError*/ + !1 + ); + if (y) + return OM( + r, + Q8e(Zr(y), y, m, a) || Y8e(Zr(y), y, m, a) + ); + } + return OM(r, Ne); + } + function qde(r, a, l) { + const f = Ms(), m = va( + 2097152, + "default" + /* Default */ + ); + return m.parent = a, m.links.nameType = D_("default"), m.links.aliasTarget = bc(r), f.set("default", m), ie(l, f, He, He, He); + } + function Q8e(r, a, l, f) { + if (Qy(f) && r && !Aa(r)) { + const y = r; + if (!y.defaultOnlyType) { + const x = qde(a, l); + y.defaultOnlyType = x; + } + return y.defaultOnlyType; + } + } + function Y8e(r, a, l, f) { + var m; + if (ce && r && !Aa(r)) { + const y = r; + if (!y.syntheticType) { + const x = (m = l.declarations) == null ? void 0 : m.find(yi); + if (Pv( + x, + l, + /*dontResolveAlias*/ + !1, + f + )) { + const R = va( + 2048, + "__type" + /* Type */ + ), J = qde(a, l, R); + R.links.type = J, y.syntheticType = hM(r) ? y2( + r, + J, + R, + /*objectFlags*/ + 0, + /*readonly*/ + !1 + ) : J; + } else + y.syntheticType = r; + } + return y.syntheticType; + } + return r; + } + function Z8e(r) { + if (!d_( + r, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return !1; + if (!Re(r.expression)) return E.fail(); + const a = Kt( + r.expression, + r.expression.escapedText, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + if (a === ye) + return !0; + if (a.flags & 2097152) + return !1; + const l = a.flags & 16 ? 262 : a.flags & 3 ? 260 : 0; + if (l !== 0) { + const f = Jo(a, l); + return !!f && !!(f.flags & 33554432); + } + return !1; + } + function vst(r) { + cut(r) || $M(r, r.typeArguments), V < 2 && yl( + r, + 262144 + /* MakeTemplateObject */ + ); + const a = lE(r); + return F$(a, r), Ha(a); + } + function bst(r, a) { + if (r.kind === 216) { + const l = xr(r); + l && Lc(l.fileName, [ + ".cts", + ".mts" + /* Mts */ + ]) && pr(r, p.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); + } + return K8e(r, a); + } + function Hde(r) { + switch (r.kind) { + case 11: + case 15: + case 9: + case 10: + case 112: + case 97: + case 209: + case 210: + case 228: + return !0; + case 217: + return Hde(r.expression); + case 224: + const a = r.operator, l = r.operand; + return a === 41 && (l.kind === 9 || l.kind === 10) || a === 40 && l.kind === 9; + case 211: + case 212: + const f = Ja(r.expression), m = fo(f) ? No( + f, + 111551, + /*ignoreErrors*/ + !0 + ) : void 0; + return !!(m && m.flags & 384); + } + return !1; + } + function K8e(r, a) { + const { type: l, expression: f } = eIe(r), m = qi(f, a); + if (yd(l)) + return Hde(f) || We(f, p.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals), Ju(m); + const y = bn(r); + return y.assertionExpressionType = m, ra(l), Fk(r), xi(l); + } + function eIe(r) { + let a, l; + switch (r.kind) { + case 234: + case 216: + a = r.type, l = r.expression; + break; + case 217: + a = fD(r), l = r.expression; + break; + } + return { type: a, expression: l }; + } + function Sst(r) { + const { type: a } = eIe(r), l = Qu(r) ? a : r, f = bn(r); + E.assertIsDefined(f.assertionExpressionType); + const m = I8(Uh(f.assertionExpressionType)), y = xi(a); + Aa(y) || n(() => { + const x = W_(m); + JG(y, x) || PAe(m, y, l, p.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first); + }); + } + function Tst(r) { + const a = qi(r.expression), l = A8(a, r.expression); + return ZG(qh(l), r, l !== a); + } + function xst(r) { + return r.flags & 64 ? Tst(r) : qh(qi(r.expression)); + } + function tIe(r) { + if (H7e(r), rr(r.typeArguments, ra), r.kind === 233) { + const l = fh(r.parent); + l.kind === 226 && l.operatorToken.kind === 104 && yb(r, l.right) && We(r, p.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); + } + const a = r.kind === 233 ? qi(r.expression) : my(r.exprName) ? dM(r.exprName) : qi(r.exprName); + return rIe(a, r); + } + function rIe(r, a) { + const l = a.typeArguments; + if (r === mn || Aa(r) || !ut(l)) + return r; + let f = !1, m; + const y = I(r), x = f ? m : r; + return x && La.add(nC(xr(a), l, p.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, Ur(x))), y; + function I(J) { + let ee = !1, Se = !1; + const me = Ve(J); + return f || (f = Se), ee && !Se && (m ?? (m = J)), me; + function Ve(mt) { + if (mt.flags & 524288) { + const ht = zd(mt), er = R(ht.callSignatures), tr = R(ht.constructSignatures); + if (ee || (ee = ht.callSignatures.length !== 0 || ht.constructSignatures.length !== 0), Se || (Se = er.length !== 0 || tr.length !== 0), er !== ht.callSignatures || tr !== ht.constructSignatures) { + const Rr = ie(va( + 0, + "__instantiationExpression" + /* InstantiationExpression */ + ), ht.members, er, tr, ht.indexInfos); + return Rr.objectFlags |= 8388608, Rr.node = a, Rr; + } + } else if (mt.flags & 58982400) { + const ht = Hl(mt); + if (ht) { + const er = Ve(ht); + if (er !== ht) + return er; + } + } else { + if (mt.flags & 1048576) + return Ho(mt, I); + if (mt.flags & 2097152) + return Ys(Zc(mt.types, Ve)); + } + return mt; + } + } + function R(J) { + const ee = Ln(J, (Se) => !!Se.typeParameters && jde(Se, l)); + return Zc(ee, (Se) => { + const me = zde( + Se, + l, + /*reportErrors*/ + !0 + ); + return me ? h8(Se, me, Qr(Se.declaration)) : Se; + }); + } + } + function kst(r) { + return ra(r.type), Gde(r.expression, r.type); + } + function Gde(r, a, l) { + const f = qi(r, l), m = xi(a); + if (Aa(m)) + return m; + const y = sr( + a.parent, + (x) => x.kind === 238 || x.kind === 350 + /* JSDocSatisfiesTag */ + ); + return y1(f, m, y, r, p.Type_0_does_not_satisfy_the_expected_type_1), f; + } + function Cst(r) { + return kut(r), r.keywordToken === 105 ? $de(r) : r.keywordToken === 102 ? Est(r) : E.assertNever(r.keywordToken); + } + function nIe(r) { + switch (r.keywordToken) { + case 102: + return w3e(); + case 105: + const a = $de(r); + return Aa(a) ? be : Vst(a); + default: + E.assertNever(r.keywordToken); + } + } + function $de(r) { + const a = WZ(r); + if (a) + if (a.kind === 176) { + const l = xn(a.parent); + return Zr(l); + } else { + const l = xn(a); + return Zr(l); + } + else return We(r, p.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"), be; + } + function Est(r) { + L === 100 || L === 199 ? xr(r).impliedNodeFormat !== 99 && We(r, p.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output) : L < 6 && L !== 4 && We(r, p.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); + const a = xr(r); + return E.assert(!!(a.flags & 8388608), "Containing file is missing import meta node flag."), r.name.escapedText === "meta" ? P3e() : be; + } + function wM(r) { + const a = r.valueDeclaration; + return oi( + Zr(r), + /*isProperty*/ + !1, + /*isOptional*/ + !!a && (i0(a) || q4(a)) + ); + } + function Xde(r, a, l = "arg") { + return r ? (E.assert(Re(r.name)), r.name.escapedText) : `${l}_${a}`; + } + function zP(r, a, l) { + const f = r.parameters.length - (gu(r) ? 1 : 0); + if (a < f) + return r.parameters[a].escapedName; + const m = r.parameters[f] || nt, y = l || Zr(m); + if (la(y)) { + const x = y.target.labeledElementDeclarations, I = a - f; + return Xde(x?.[I], I, m.escapedName); + } + return m.escapedName; + } + function Dst(r, a) { + var l; + if (((l = r.declaration) == null ? void 0 : l.kind) === 317) + return; + const f = r.parameters.length - (gu(r) ? 1 : 0); + if (a < f) { + const I = r.parameters[a], R = iIe(I); + return R ? { + parameter: R, + parameterName: I.escapedName, + isRestParameter: !1 + } : void 0; + } + const m = r.parameters[f] || nt, y = iIe(m); + if (!y) + return; + const x = Zr(m); + if (la(x)) { + const I = x.target.labeledElementDeclarations, R = a - f, J = I?.[R], ee = !!J?.dotDotDotToken; + return J ? (E.assert(Re(J.name)), { parameter: J.name, parameterName: J.name.escapedText, isRestParameter: ee }) : void 0; + } + if (a === f) + return { parameter: y, parameterName: m.escapedName, isRestParameter: !0 }; + } + function iIe(r) { + return r.valueDeclaration && ji(r.valueDeclaration) && Re(r.valueDeclaration.name) && r.valueDeclaration.name; + } + function sIe(r) { + return r.kind === 202 || ji(r) && r.name && Re(r.name); + } + function Pst(r, a) { + const l = r.parameters.length - (gu(r) ? 1 : 0); + if (a < l) { + const y = r.parameters[a].valueDeclaration; + return y && sIe(y) ? y : void 0; + } + const f = r.parameters[l] || nt, m = Zr(f); + if (la(m)) { + const y = m.target.labeledElementDeclarations, x = a - l; + return y && y[x]; + } + return f.valueDeclaration && sIe(f.valueDeclaration) ? f.valueDeclaration : void 0; + } + function qd(r, a) { + return C2(r, a) || Ne; + } + function C2(r, a) { + const l = r.parameters.length - (gu(r) ? 1 : 0); + if (a < l) + return wM(r.parameters[a]); + if (gu(r)) { + const f = Zr(r.parameters[l]), m = a - l; + if (!la(f) || f.target.hasRestElement || m < f.target.fixedLength) + return J_(f, pd(m)); + } + } + function AM(r, a, l) { + const f = U_(r), m = Om(r), y = W8(r); + if (y && a >= f - 1) + return a === f - 1 ? y : cu(J_(y, _e)); + const x = [], I = [], R = []; + for (let J = a; J < f; J++) + !y || J < f - 1 ? (x.push(qd(r, J)), I.push( + J < m ? 1 : 2 + /* Optional */ + )) : (x.push(y), I.push( + 8 + /* Variadic */ + )), R.push(Pst(r, J)); + return gg(x, I, l, R); + } + function aIe(r, a) { + const l = AM(r, a), f = l && tM(l); + return f && Ea(f) ? Ne : l; + } + function U_(r) { + const a = r.parameters.length; + if (gu(r)) { + const l = Zr(r.parameters[a - 1]); + if (la(l)) + return a + l.target.fixedLength - (l.target.hasRestElement ? 0 : 1); + } + return a; + } + function Om(r, a) { + const l = a & 1, f = a & 2; + if (f || r.resolvedMinArgumentCount === void 0) { + let m; + if (gu(r)) { + const y = Zr(r.parameters[r.parameters.length - 1]); + if (la(y)) { + const x = rc(y.target.elementFlags, (R) => !(R & 1)), I = x < 0 ? y.target.fixedLength : x; + I > 0 && (m = r.parameters.length - 1 + I); + } + } + if (m === void 0) { + if (!l && r.flags & 32) + return 0; + m = r.minArgumentCount; + } + if (f) + return m; + for (let y = m - 1; y >= 0; y--) { + const x = qd(r, y); + if (Jc(x, O8e).flags & 131072) + break; + m = y; + } + r.resolvedMinArgumentCount = m; + } + return r.resolvedMinArgumentCount; + } + function yg(r) { + if (gu(r)) { + const a = Zr(r.parameters[r.parameters.length - 1]); + return !la(a) || a.target.hasRestElement; + } + return !1; + } + function W8(r) { + if (gu(r)) { + const a = Zr(r.parameters[r.parameters.length - 1]); + if (!la(a)) + return Ea(a) ? Do : a; + if (a.target.hasRestElement) + return OP(a, a.target.fixedLength); + } + } + function V8(r) { + const a = W8(r); + return a && !xp(a) && !Ea(a) ? a : void 0; + } + function Qde(r) { + return Yde(r, fr); + } + function Yde(r, a) { + return r.parameters.length > 0 ? qd(r, 0) : a; + } + function oIe(r, a, l) { + const f = r.parameters.length - (gu(r) ? 1 : 0); + for (let m = 0; m < f; m++) { + const y = r.parameters[m].valueDeclaration, x = Vc(y); + if (x) { + const I = oi( + xi(x), + /*isProperty*/ + !1, + q4(y) + ), R = qd(a, m); + Gh(l.inferences, I, R); + } + } + } + function wst(r, a) { + if (a.typeParameters) + if (!r.typeParameters) + r.typeParameters = a.typeParameters; + else + return; + if (a.thisParameter) { + const f = r.thisParameter; + (!f || f.valueDeclaration && !f.valueDeclaration.type) && (f || (r.thisParameter = tT( + a.thisParameter, + /*type*/ + void 0 + )), NM(r.thisParameter, Zr(a.thisParameter))); + } + const l = r.parameters.length - (gu(r) ? 1 : 0); + for (let f = 0; f < l; f++) { + const m = r.parameters[f], y = m.valueDeclaration; + if (!Vc(y)) { + let x = C2(a, f); + if (x && y.initializer) { + let I = WP( + y, + 0 + /* Normal */ + ); + !Bs(I, x) && Bs(x, I = B$(y, I)) && (x = I); + } + NM(m, x); + } + } + if (gu(r)) { + const f = ia(r.parameters); + if (f.valueDeclaration ? !Vc(f.valueDeclaration) : gc(f) & 65536) { + const m = AM(a, l); + NM(f, m); + } + } + } + function Ast(r) { + r.thisParameter && NM(r.thisParameter); + for (const a of r.parameters) + NM(a); + } + function NM(r, a) { + const l = Ni(r); + if (l.type) + a && E.assertEqual(l.type, a, "Parameter symbol already has a cached type which differs from newly assigned type"); + else { + const f = r.valueDeclaration; + l.type = oi( + a || (f ? $r( + f, + /*reportErrors*/ + !0 + ) : Zr(r)), + /*isProperty*/ + !1, + /*isOptional*/ + !!f && !f.initializer && q4(f) + ), f && f.name.kind !== 80 && (l.type === yt && (l.type = j_(f.name)), cIe(f.name, l.type)); + } + } + function cIe(r, a) { + for (const l of r.elements) + if (!ml(l)) { + const f = In( + l, + a, + /*noTupleBoundsCheck*/ + !1 + ); + l.name.kind === 80 ? Ni(xn(l)).type = f : cIe(l.name, f); + } + } + function Nst(r) { + return Z6(JKe( + /*reportErrors*/ + !0 + ), [r]); + } + function Ist(r, a) { + return Z6(zKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Ost(r, a) { + return Z6(WKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Fst(r, a) { + return Z6(VKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Lst(r, a) { + return Z6(UKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Mst(r, a) { + return Z6(GKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Rst(r, a, l) { + const f = `${a ? "p" : "P"}${l ? "s" : "S"}${r.id}`; + let m = Ps.get(f); + if (!m) { + const y = Ms(); + y.set("name", wS("name", r)), y.set("private", wS("private", a ? wt : dt)), y.set("static", wS("static", l ? wt : dt)), m = ie( + /*symbol*/ + void 0, + y, + He, + He, + He + ), Ps.set(f, m); + } + return m; + } + function lIe(r, a, l) { + const f = Uc(r), m = wi(r.name), y = m ? D_(dn(r.name)) : X0(r.name), x = hc(r) ? Ist(a, l) : Af(r) ? Ost(a, l) : rf(r) ? Fst(a, l) : u_(r) ? Lst(a, l) : rs(r) ? Mst(a, l) : E.failBadSyntaxKind(r), I = Rst(y, m, f); + return Ys([x, I]); + } + function jst(r, a) { + return Z6(qKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Bst(r, a) { + return Z6(HKe( + /*reportErrors*/ + !0 + ), [r, a]); + } + function Jst(r, a) { + const l = Sm("this", r), f = Sm("value", a); + return fme( + /*typeParameters*/ + void 0, + l, + [f], + a, + /*typePredicate*/ + void 0, + 1 + ); + } + function Zde(r, a, l) { + const f = Sm("target", r), m = Sm("context", a), y = Gn([l, en]); + return Q8( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [f, m], + y + ); + } + function zst(r) { + const { parent: a } = r, l = bn(a); + if (!l.decoratorSignature) + switch (l.decoratorSignature = A, a.kind) { + case 263: + case 231: { + const m = Zr(xn(a)), y = Nst(m); + l.decoratorSignature = Zde(m, y, m); + break; + } + case 174: + case 177: + case 178: { + const f = a; + if (!Qn(f.parent)) break; + const m = hc(f) ? $S(Qf(f)) : Lk(f), y = Uc(f) ? Zr(xn(f.parent)) : Yc(xn(f.parent)), x = Af(f) ? JIe(m) : rf(f) ? zIe(m) : m, I = lIe(f, y, m), R = Af(f) ? JIe(m) : rf(f) ? zIe(m) : m; + l.decoratorSignature = Zde(x, I, R); + break; + } + case 172: { + const f = a; + if (!Qn(f.parent)) break; + const m = Lk(f), y = Uc(f) ? Zr(xn(f.parent)) : Yc(xn(f.parent)), x = im(f) ? jst(y, m) : Ut, I = lIe(f, y, m), R = im(f) ? Bst(y, m) : Jst(y, m); + l.decoratorSignature = Zde(x, I, R); + break; + } + } + return l.decoratorSignature === A ? void 0 : l.decoratorSignature; + } + function Wst(r) { + const { parent: a } = r, l = bn(a); + if (!l.decoratorSignature) + switch (l.decoratorSignature = A, a.kind) { + case 263: + case 231: { + const m = Zr(xn(a)), y = Sm("target", m); + l.decoratorSignature = Q8( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y], + Gn([m, en]) + ); + break; + } + case 169: { + const f = a; + if (!ec(f.parent) && !(hc(f.parent) || rf(f.parent) && Qn(f.parent.parent)) || bb(f.parent) === f) + break; + const m = bb(f.parent) ? f.parent.parameters.indexOf(f) - 1 : f.parent.parameters.indexOf(f); + E.assert(m >= 0); + const y = ec(f.parent) ? Zr(xn(f.parent.parent)) : I7e(f.parent), x = ec(f.parent) ? Ut : O7e(f.parent), I = pd(m), R = Sm("target", y), J = Sm("propertyKey", x), ee = Sm("parameterIndex", I); + l.decoratorSignature = Q8( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [R, J, ee], + en + ); + break; + } + case 174: + case 177: + case 178: + case 172: { + const f = a; + if (!Qn(f.parent)) break; + const m = I7e(f), y = Sm("target", m), x = O7e(f), I = Sm("propertyKey", x), R = rs(f) ? en : M3e(Lk(f)); + if (!rs(a) || im(a)) { + const ee = M3e(Lk(f)), Se = Sm("descriptor", ee); + l.decoratorSignature = Q8( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y, I, Se], + Gn([R, en]) + ); + } else + l.decoratorSignature = Q8( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [y, I], + Gn([R, en]) + ); + break; + } + } + return l.decoratorSignature === A ? void 0 : l.decoratorSignature; + } + function Kde(r) { + return $ ? Wst(r) : zst(r); + } + function IM(r) { + const a = BL( + /*reportErrors*/ + !0 + ); + return a !== ea ? (r = Z0(HP(r)) || yt, H0(a, [r])) : yt; + } + function uIe(r) { + const a = O3e( + /*reportErrors*/ + !0 + ); + return a !== ea ? (r = Z0(HP(r)) || yt, H0(a, [r])) : yt; + } + function OM(r, a) { + const l = IM(a); + return l === yt ? (We( + r, + hf(r) ? p.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : p.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option + ), be) : (Qfe( + /*reportErrors*/ + !0 + ) || We( + r, + hf(r) ? p.A_dynamic_import_call_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option : p.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option + ), l); + } + function Vst(r) { + const a = va(0, "NewTargetExpression"), l = va( + 4, + "target", + 8 + /* Readonly */ + ); + l.parent = a, l.links.type = r; + const f = Ms([l]); + return a.members = f, ie(a, f, He, He, He); + } + function L$(r, a) { + if (!r.body) + return be; + const l = jc(r), f = (l & 2) !== 0, m = (l & 1) !== 0; + let y, x, I, R = en; + if (r.body.kind !== 241) + y = Dc( + r.body, + a && a & -9 + /* SkipGenericFunctions */ + ), f && (y = HP(X8( + y, + /*withAlias*/ + !1, + /*errorNode*/ + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ))); + else if (m) { + const J = dIe(r, a); + J ? J.length > 0 && (y = Gn( + J, + 2 + /* Subtype */ + )) : R = fr; + const { yieldTypes: ee, nextTypes: Se } = Ust(r, a); + x = ut(ee) ? Gn( + ee, + 2 + /* Subtype */ + ) : void 0, I = ut(Se) ? Ys(Se) : void 0; + } else { + const J = dIe(r, a); + if (!J) + return l & 2 ? OM(r, fr) : fr; + if (J.length === 0) { + const ee = g$( + r, + /*contextFlags*/ + void 0 + ), Se = ee && (VM(ee, l) || en).flags & 32768 ? Ut : en; + return l & 2 ? OM(r, Se) : ( + // Async function + Se + ); + } + y = Gn( + J, + 2 + /* Subtype */ + ); + } + if (y || x || I) { + if (x && r$( + r, + x, + 3 + /* GeneratorYield */ + ), y && r$( + r, + y, + 1 + /* FunctionReturn */ + ), I && r$( + r, + I, + 2 + /* GeneratorNext */ + ), y && Vd(y) || x && Vd(x) || I && Vd(I)) { + const J = bde(r), ee = J ? J === Qf(r) ? m ? void 0 : y : y$( + Ha(J), + r, + /*contextFlags*/ + void 0 + ) : void 0; + m ? (x = Rpe(x, ee, 0, f), y = Rpe(y, ee, 1, f), I = Rpe(I, ee, 2, f)) : y = ztt(y, ee, f); + } + x && (x = W_(x)), y && (y = W_(y)), I && (I = W_(I)); + } + return m ? M$( + x || fr, + y || R, + I || QNe(2, r) || yt, + f + ) : f ? IM(y || R) : y || R; + } + function M$(r, a, l, f) { + const m = f ? eo : qo, y = m.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ); + if (r = m.resolveIterationType( + r, + /*errorNode*/ + void 0 + ) || yt, a = m.resolveIterationType( + a, + /*errorNode*/ + void 0 + ) || yt, l = m.resolveIterationType( + l, + /*errorNode*/ + void 0 + ) || yt, y === ea) { + const x = m.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + ), I = x !== ea ? e7e(x, m) : void 0, R = I ? I.returnType : Ne, J = I ? I.nextType : Ut; + return Bs(a, R) && Bs(J, l) ? x !== ea ? v8(x, [r]) : (m.getGlobalIterableIteratorType( + /*reportErrors*/ + !0 + ), bi) : (m.getGlobalGeneratorType( + /*reportErrors*/ + !0 + ), bi); + } + return v8(y, [r, a, l]); + } + function Ust(r, a) { + const l = [], f = [], m = (jc(r) & 2) !== 0; + return AZ(r.body, (y) => { + const x = y.expression ? qi(y.expression, a) : W; + Zf(l, _Ie(y, x, Ne, m)); + let I; + if (y.asteriskToken) { + const R = Q$( + x, + m ? 19 : 17, + y.expression + ); + I = R && R.nextType; + } else + I = o_( + y, + /*contextFlags*/ + void 0 + ); + I && Zf(f, I); + }), { yieldTypes: l, nextTypes: f }; + } + function _Ie(r, a, l, f) { + const m = r.expression || r, y = r.asteriskToken ? K0(f ? 19 : 17, a, l, m) : a; + return f ? fT( + y, + m, + r.asteriskToken ? p.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : p.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ) : y; + } + function fIe(r, a, l) { + let f = 0; + for (let m = 0; m < l.length; m++) { + const y = m < r || m >= a ? l[m] : void 0; + f |= y !== void 0 ? yne.get(y) || 32768 : 0; + } + return f; + } + function pIe(r) { + const a = bn(r); + if (a.isExhaustive === void 0) { + a.isExhaustive = 0; + const l = qst(r); + a.isExhaustive === 0 && (a.isExhaustive = l); + } else a.isExhaustive === 0 && (a.isExhaustive = !1); + return a.isExhaustive; + } + function qst(r) { + if (r.expression.kind === 221) { + const f = bNe(r); + if (!f) + return !1; + const m = dg(Dc(r.expression.expression)), y = fIe(0, 0, f); + return m.flags & 3 ? (556800 & y) === 556800 : !Hp(m, (x) => nE(x, y) === y); + } + const a = Dc(r.expression); + if (!w8(a)) + return !1; + const l = o$(r); + return !l.length || ut(l, jtt) ? !1 : Rrt(Ho(a, Ju), l); + } + function eme(r) { + return r.endFlowNode && uM(r.endFlowNode); + } + function dIe(r, a) { + const l = jc(r), f = []; + let m = eme(r), y = !1; + if (o0(r.body, (x) => { + let I = x.expression; + if (I) { + if (I = Ja( + I, + /*excludeJSDocTypeAssertions*/ + !0 + ), l & 2 && I.kind === 223 && (I = Ja( + I.expression, + /*excludeJSDocTypeAssertions*/ + !0 + )), I.kind === 213 && I.expression.kind === 80 && Dc(I.expression).symbol === Ma(r.symbol) && (!Sy(r.symbol.valueDeclaration) || ode(I.expression))) { + y = !0; + return; + } + let R = Dc( + I, + a && a & -9 + /* SkipGenericFunctions */ + ); + l & 2 && (R = HP(X8( + R, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ))), R.flags & 131072 && (y = !0), Zf(f, R); + } else + m = !0; + }), !(f.length === 0 && !m && (y || Hst(r)))) + return K && f.length && m && !(Im(r) && f.some((x) => x.symbol === r.symbol)) && Zf(f, Ut), f; + } + function Hst(r) { + switch (r.kind) { + case 218: + case 219: + return !0; + case 174: + return r.parent.kind === 210; + default: + return !1; + } + } + function Gst(r) { + switch (r.kind) { + case 176: + case 177: + case 178: + return; + } + if (jc(r) !== 0) return; + let l; + if (r.body && r.body.kind !== 241) + l = r.body; + else if (o0(r.body, (m) => { + if (l || !m.expression) return !0; + l = m.expression; + }) || !l || eme(r)) return; + return $st(r, l); + } + function $st(r, a) { + if (a = Ja( + a, + /*excludeJSDocTypeAssertions*/ + !0 + ), !!(Dc(a).flags & 16)) + return rr(r.parameters, (f, m) => { + const y = Zr(f.symbol); + if (!y || y.flags & 16 || !Re(f.name) || fM(f.symbol) || Um(f)) + return; + const x = Xst(r, a, f, y); + if (x) + return g8(1, Pi(f.name.escapedText), m, x); + }); + } + function Xst(r, a, l, f) { + const m = a.flowNode || a.parent.kind === 253 && a.parent.flowNode || Zm( + 2, + /*node*/ + void 0, + /*antecedent*/ + void 0 + ), y = Zm(32, a, m), x = $h(l.name, f, f, r, y); + if (x === f) return; + const I = Zm(64, a, m); + return $h(l.name, f, x, r, I).flags & 131072 ? x : void 0; + } + function tme(r, a) { + n(l); + return; + function l() { + const f = jc(r), m = a && VM(a, f); + if (m && (Sc( + m, + 16384 + /* Void */ + ) || m.flags & 32769) || r.kind === 173 || ic(r.body) || r.body.kind !== 241 || !eme(r)) + return; + const y = r.flags & 1024, x = K_(r) || r; + if (m && m.flags & 131072) + We(x, p.A_function_returning_never_cannot_have_a_reachable_end_point); + else if (m && !y) + We(x, p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); + else if (m && K && !Bs(Ut, m)) + We(x, p.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); + else if (F.noImplicitReturns) { + if (!m) { + if (!y) + return; + const I = Ha(Qf(r)); + if (o7e(r, I)) + return; + } + We(x, p.Not_all_code_paths_return_a_value); + } + } + } + function mIe(r, a) { + if (E.assert(r.kind !== 174 || Yp(r)), Fk(r), po(r) && GP(r, r.name), a && a & 4 && Sp(r)) { + if (!K_(r) && !k5(r)) { + const f = B8(r); + if (f && S1(Ha(f))) { + const m = bn(r); + if (m.contextFreeType) + return m.contextFreeType; + const y = L$(r, a), x = Kg( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + y, + /*resolvedTypePredicate*/ + void 0, + 0, + 64 + /* IsNonInferrable */ + ), I = ie(r.symbol, O, [x], He, He); + return I.objectFlags |= 262144, m.contextFreeType = I; + } + } + return wo; + } + return !lX(r) && r.kind === 218 && Bme(r), Qst(r, a), Zr(xn(r)); + } + function Qst(r, a) { + const l = bn(r); + if (!(l.flags & 64)) { + const f = B8(r); + if (!(l.flags & 64)) { + l.flags |= 64; + const m = ul(xs( + Zr(xn(r)), + 0 + /* Call */ + )); + if (!m) + return; + if (Sp(r)) + if (f) { + const y = x2(r); + let x; + if (a && a & 2) { + oIe(m, f, y); + const I = W8(f); + I && I.flags & 262144 && (x = wk(f, y.nonFixingMapper)); + } + x || (x = y ? wk(f, y.mapper) : f), wst(m, x); + } else + Ast(m); + else if (f && !r.typeParameters && f.parameters.length > r.parameters.length) { + const y = x2(r); + a && a & 2 && oIe(m, f, y); + } + if (f && !Y6(r) && !m.resolvedReturnType) { + const y = L$(r, a); + m.resolvedReturnType || (m.resolvedReturnType = y); + } + H8(r); + } + } + } + function Yst(r) { + E.assert(r.kind !== 174 || Yp(r)); + const a = jc(r), l = Y6(r); + if (tme(r, l), r.body) + if (K_(r) || Ha(Qf(r)), r.body.kind === 241) + ra(r.body); + else { + const f = qi(r.body), m = l && VM(l, a); + if (m) { + const y = A$(r.body); + if ((a & 3) === 2) { + const x = X8( + f, + /*withAlias*/ + !1, + y, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + y1(x, m, y, y); + } else + y1(f, m, y, y); + } + } + } + function R$(r, a, l, f = !1) { + if (!Bs(a, tn)) { + const m = f && qP(a); + return id( + r, + !!m && Bs(m, tn), + l + ), !1; + } + return !0; + } + function Zst(r) { + if (!Es(r) || !X2(r)) + return !1; + const a = Dc(r.arguments[2]); + if (Xc(a, "value")) { + const m = js(a, "writable"), y = m && Zr(m); + if (!y || y === dt || y === xt) + return !0; + if (m && m.valueDeclaration && qc(m.valueDeclaration)) { + const x = m.valueDeclaration.initializer, I = qi(x); + if (I === dt || I === xt) + return !0; + } + return !1; + } + return !js(a, "set"); + } + function Hd(r) { + return !!(gc(r) & 8 || r.flags & 4 && sp(r) & 8 || r.flags & 3 && Cde(r) & 6 || r.flags & 98304 && !(r.flags & 65536) || r.flags & 8 || ut(r.declarations, Zst)); + } + function gIe(r, a, l) { + var f, m; + if (l === 0) + return !1; + if (Hd(a)) { + if (a.flags & 4 && go(r) && r.expression.kind === 110) { + const y = yf(r); + if (!(y && (y.kind === 176 || Im(y)))) + return !0; + if (a.valueDeclaration) { + const x = cn(a.valueDeclaration), I = y.parent === a.valueDeclaration.parent, R = y === a.valueDeclaration.parent, J = x && ((f = a.parent) == null ? void 0 : f.valueDeclaration) === y.parent, ee = x && ((m = a.parent) == null ? void 0 : m.valueDeclaration) === y; + return !(I || R || J || ee); + } + } + return !0; + } + if (go(r)) { + const y = Ja(r.expression); + if (y.kind === 80) { + const x = bn(y).resolvedSymbol; + if (x.flags & 2097152) { + const I = k_(x); + return !!I && I.kind === 274; + } + } + } + return !1; + } + function U8(r, a, l) { + const f = Bc( + r, + 7 + /* Parentheses */ + ); + return f.kind !== 80 && !go(f) ? (We(r, a), !1) : f.flags & 64 ? (We(r, l), !1) : !0; + } + function Kst(r) { + qi(r.expression); + const a = Ja(r.expression); + if (!go(a)) + return We(a, p.The_operand_of_a_delete_operator_must_be_a_property_reference), br; + Dn(a) && wi(a.name) && We(a, p.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); + const l = bn(a), f = R_(l.resolvedSymbol); + return f && (Hd(f) ? We(a, p.The_operand_of_a_delete_operator_cannot_be_a_read_only_property) : eat(a, f)), br; + } + function eat(r, a) { + const l = Zr(a); + K && !(l.flags & 131075) && !(H ? a.flags & 16777216 : Ud( + l, + 16777216 + /* IsUndefined */ + )) && We(r, p.The_operand_of_a_delete_operator_must_be_optional); + } + function tat(r) { + return qi(r.expression), w6; + } + function rat(r) { + return Fk(r), W; + } + function hIe(r) { + let a = !1; + const l = g7(r); + if (l && ac(l)) { + const f = Cy(r) ? p.await_expression_cannot_be_used_inside_a_class_static_block : p.await_using_statements_cannot_be_used_inside_a_class_static_block; + We(r, f), a = !0; + } else if (!(r.flags & 65536)) + if (y7(r)) { + const f = xr(r); + if (!x1(f)) { + let m; + if (!NT(f, F)) { + m ?? (m = Hm(f, r.pos)); + const y = Cy(r) ? p.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module : p.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module, x = xl(f, m.start, m.length, y); + La.add(x), a = !0; + } + switch (L) { + case 100: + case 199: + if (f.impliedNodeFormat === 1) { + m ?? (m = Hm(f, r.pos)), La.add( + xl(f, m.start, m.length, p.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ), a = !0; + break; + } + case 7: + case 99: + case 200: + case 4: + if (V >= 4) + break; + default: + m ?? (m = Hm(f, r.pos)); + const y = Cy(r) ? p.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher : p.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher; + La.add(xl(f, m.start, m.length, y)), a = !0; + break; + } + } + } else { + const f = xr(r); + if (!x1(f)) { + const m = Hm(f, r.pos), y = Cy(r) ? p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules, x = xl(f, m.start, m.length, y); + if (l && l.kind !== 176 && !(jc(l) & 2)) { + const I = Xr(l, p.Did_you_mean_to_mark_this_function_as_async); + Fs(x, I); + } + La.add(x), a = !0; + } + } + return Cy(r) && mde(r) && (We(r, p.await_expressions_cannot_be_used_in_a_parameter_initializer), a = !0), a; + } + function nat(r) { + n(() => hIe(r)); + const a = qi(r.expression), l = X8( + a, + /*withAlias*/ + !0, + r, + p.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + return l === a && !Aa(l) && !(a.flags & 3) && Vy( + /*isError*/ + !1, + Xr(r, p.await_has_no_effect_on_the_type_of_this_expression) + ), l; + } + function iat(r) { + const a = qi(r.operand); + if (a === mn) + return mn; + switch (r.operand.kind) { + case 9: + switch (r.operator) { + case 41: + return Pk(pd(-r.operand.text)); + case 40: + return Pk(pd(+r.operand.text)); + } + break; + case 10: + if (r.operator === 41) + return Pk(OG({ + negative: !0, + base10Value: J4(r.operand.text) + })); + } + switch (r.operator) { + case 40: + case 41: + case 55: + return Am(a, r.operand), FM( + a, + 12288 + /* ESSymbolLike */ + ) && We(r.operand, p.The_0_operator_cannot_be_applied_to_type_symbol, Ws(r.operator)), r.operator === 40 ? (FM( + a, + 2112 + /* BigIntLike */ + ) && We(r.operand, p.Operator_0_cannot_be_applied_to_type_1, Ws(r.operator), Ur(Uh(a))), _e) : rme(a); + case 54: + hme(a, r.operand); + const l = nE( + a, + 12582912 + /* Falsy */ + ); + return l === 4194304 ? dt : l === 8388608 ? wt : br; + case 46: + case 47: + return R$(r.operand, Am(a, r.operand), p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type) && U8( + r.operand, + p.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, + p.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access + ), rme(a); + } + return be; + } + function sat(r) { + const a = qi(r.operand); + return a === mn ? mn : (R$( + r.operand, + Am(a, r.operand), + p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type + ) && U8( + r.operand, + p.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, + p.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access + ), rme(a)); + } + function rme(r) { + return Sc( + r, + 2112 + /* BigIntLike */ + ) ? Gl( + r, + 3 + /* AnyOrUnknown */ + ) || Sc( + r, + 296 + /* NumberLike */ + ) ? tn : Te : _e; + } + function FM(r, a) { + if (Sc(r, a)) + return !0; + const l = dg(r); + return !!l && Sc(l, a); + } + function Sc(r, a) { + if (r.flags & a) + return !0; + if (r.flags & 3145728) { + const l = r.types; + for (const f of l) + if (Sc(f, a)) + return !0; + } + return !1; + } + function Gl(r, a, l) { + return r.flags & a ? !0 : l && r.flags & 114691 ? !1 : !!(a & 296) && Bs(r, _e) || !!(a & 2112) && Bs(r, Te) || !!(a & 402653316) && Bs(r, we) || !!(a & 528) && Bs(r, br) || !!(a & 16384) && Bs(r, en) || !!(a & 131072) && Bs(r, fr) || !!(a & 65536) && Bs(r, he) || !!(a & 32768) && Bs(r, Ut) || !!(a & 4096) && Bs(r, Lr) || !!(a & 67108864) && Bs(r, ur); + } + function q8(r, a, l) { + return r.flags & 1048576 ? Ri(r.types, (f) => q8(f, a, l)) : Gl(r, a, l); + } + function j$(r) { + return !!(wn(r) & 16) && !!r.symbol && nme(r.symbol); + } + function nme(r) { + return (r.flags & 128) !== 0; + } + function ime(r) { + const a = r7e("hasInstance"); + if (q8( + r, + 67108864 + /* NonPrimitive */ + )) { + const l = js(r, a); + if (l) { + const f = Zr(l); + if (f && xs( + f, + 0 + /* Call */ + ).length !== 0) + return f; + } + } + } + function aat(r, a, l, f, m) { + if (l === mn || f === mn) + return mn; + !Ea(l) && q8( + l, + 402784252 + /* Primitive */ + ) && We(r, p.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter), E.assert(H7(r.parent)); + const y = lE( + r.parent, + /*candidatesOutArray*/ + void 0, + m + ); + if (y === it) + return mn; + const x = Ha(y); + return xu(x, br, a, p.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression), br; + } + function oat(r) { + return Hp(r, (a) => a === fc || !!(a.flags & 2097152) && hg(dg(a))); + } + function cat(r, a, l, f) { + if (l === mn || f === mn) + return mn; + if (wi(r)) { + if ((V < 9 || V < 99 || !U) && yl( + r, + 2097152 + /* ClassPrivateFieldIn */ + ), !bn(r).resolvedSymbol && Nl(r)) { + const m = Nde( + r, + f.symbol, + /*excludeClasses*/ + !0 + ); + x8e(r, f, m); + } + } else + xu(Am(l, r), Or, r); + return xu(Am(f, a), ur, a) && oat(f) && We(a, p.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, Ur(f)), br; + } + function lat(r, a, l) { + const f = r.properties; + if (K && f.length === 0) + return Am(a, r); + for (let m = 0; m < f.length; m++) + yIe(r, a, m, f, l); + return a; + } + function yIe(r, a, l, f, m = !1) { + const y = r.properties, x = y[l]; + if (x.kind === 303 || x.kind === 304) { + const I = x.name, R = X0(I); + if (Fp(R)) { + const Se = Lp(R), me = js(a, Se); + me && (xM(me, x, m), Dde( + x, + /*isSuper*/ + !1, + /*writing*/ + !0, + a, + me + )); + } + const J = J_(a, R, 32, I), ee = Q(x, J); + return _T(x.kind === 304 ? x : x.initializer, ee); + } else if (x.kind === 305) + if (l < y.length - 1) + We(x, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + else { + V < 5 && yl( + x, + 4 + /* Rest */ + ); + const I = []; + if (f) + for (const J of f) + Bg(J) || I.push(J.name); + const R = H6(a, I, a.symbol); + return Mk(f, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), _T(x.expression, R); + } + else + We(x, p.Property_assignment_expected); + } + function uat(r, a, l) { + const f = r.elements; + V < 2 && F.downlevelIteration && yl( + r, + 512 + /* Read */ + ); + const m = K0(193, a, Ut, r) || be; + let y = F.noUncheckedIndexedAccess ? void 0 : m; + for (let x = 0; x < f.length; x++) { + let I = m; + r.elements[x].kind === 230 && (I = y = y ?? (K0(65, a, Ut, r) || be)), vIe(r, a, x, I, l); + } + return a; + } + function vIe(r, a, l, f, m) { + const y = r.elements, x = y[l]; + if (x.kind !== 232) { + if (x.kind !== 230) { + const I = pd(l); + if (Y0(a)) { + const R = 32 | (JP(x) ? 16 : 0), J = m1(a, I, R, CM(x, I)) || be, ee = JP(x) ? qp( + J, + 524288 + /* NEUndefined */ + ) : J, Se = Q(x, ee); + return _T(x, Se, m); + } + return _T(x, f, m); + } + if (l < y.length - 1) + We(x, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + else { + const I = x.expression; + if (I.kind === 226 && I.operatorToken.kind === 64) + We(I.operatorToken, p.A_rest_element_cannot_have_an_initializer); + else { + Mk(r.elements, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); + const R = V_(a, la) ? Ho(a, (J) => OP(J, l)) : cu(f); + return _T(I, R, m); + } + } + } + } + function _T(r, a, l, f) { + let m; + if (r.kind === 304) { + const y = r; + y.objectAssignmentInitializer && (K && !Ud( + qi(y.objectAssignmentInitializer), + 16777216 + /* IsUndefined */ + ) && (a = qp( + a, + 524288 + /* NEUndefined */ + )), dat(y.name, y.equalsToken, y.objectAssignmentInitializer, l)), m = r.name; + } else + m = r; + return m.kind === 226 && m.operatorToken.kind === 64 && (ae(m, l), m = m.left, K && (a = qp( + a, + 524288 + /* NEUndefined */ + ))), m.kind === 210 ? lat(m, a, f) : m.kind === 209 ? uat(m, a, l) : _at(m, a, l); + } + function _at(r, a, l) { + const f = qi(r, l), m = r.parent.kind === 305 ? p.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : p.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, y = r.parent.kind === 305 ? p.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : p.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; + return U8(r, m, y) && y1(a, f, r, r), Xk(r) && yl( + r.parent, + 1048576 + /* ClassPrivateFieldSet */ + ), a; + } + function LM(r) { + switch (r = Ja(r), r.kind) { + case 80: + case 11: + case 14: + case 215: + case 228: + case 15: + case 9: + case 10: + case 112: + case 97: + case 106: + case 157: + case 218: + case 231: + case 219: + case 209: + case 210: + case 221: + case 235: + case 285: + case 284: + return !0; + case 227: + return LM(r.whenTrue) && LM(r.whenFalse); + case 226: + return dh(r.operatorToken.kind) ? !1 : LM(r.left) && LM(r.right); + case 224: + case 225: + switch (r.operator) { + case 54: + case 40: + case 41: + case 55: + return !0; + } + return !1; + case 222: + case 216: + case 234: + default: + return !1; + } + } + function sme(r, a) { + return (a.flags & 98304) !== 0 || JG(r, a); + } + function fat() { + const r = lO(a, l, f, m, y, x); + return (me, Ve) => { + const mt = r(me, Ve); + return E.assertIsDefined(mt), mt; + }; + function a(me, Ve, mt) { + return Ve ? (Ve.stackIndex++, Ve.skip = !1, J( + Ve, + /*type*/ + void 0 + ), Se( + Ve, + /*type*/ + void 0 + )) : Ve = { + checkMode: mt, + skip: !1, + stackIndex: 0, + typeStack: [void 0, void 0] + }, Qr(me) && MT(me) ? (Ve.skip = !0, Se(Ve, qi(me.right, mt)), Ve) : (pat(me), me.operatorToken.kind === 64 && (me.left.kind === 210 || me.left.kind === 209) && (Ve.skip = !0, Se(Ve, _T( + me.left, + qi(me.right, mt), + mt, + me.right.kind === 110 + /* ThisKeyword */ + ))), Ve); + } + function l(me, Ve, mt) { + if (!Ve.skip) + return I(Ve, me); + } + function f(me, Ve, mt) { + if (!Ve.skip) { + const ht = ee(Ve); + E.assertIsDefined(ht), J(Ve, ht), Se( + Ve, + /*type*/ + void 0 + ); + const er = me.kind; + if (A3(er)) { + let tr = mt.parent; + for (; tr.kind === 217 || N3(tr); ) + tr = tr.parent; + (er === 56 || ev(tr)) && gme(mt.left, ht, ev(tr) ? tr.thenStatement : void 0), hme(ht, mt.left); + } + } + } + function m(me, Ve, mt) { + if (!Ve.skip) + return I(Ve, me); + } + function y(me, Ve) { + let mt; + if (Ve.skip) + mt = ee(Ve); + else { + const ht = R(Ve); + E.assertIsDefined(ht); + const er = ee(Ve); + E.assertIsDefined(er), mt = bIe(me.left, me.operatorToken, me.right, ht, er, Ve.checkMode, me); + } + return Ve.skip = !1, J( + Ve, + /*type*/ + void 0 + ), Se( + Ve, + /*type*/ + void 0 + ), Ve.stackIndex--, mt; + } + function x(me, Ve, mt) { + return Se(me, Ve), me; + } + function I(me, Ve) { + if (cn(Ve)) + return Ve; + Se(me, qi(Ve, me.checkMode)); + } + function R(me) { + return me.typeStack[me.stackIndex]; + } + function J(me, Ve) { + me.typeStack[me.stackIndex] = Ve; + } + function ee(me) { + return me.typeStack[me.stackIndex + 1]; + } + function Se(me, Ve) { + me.typeStack[me.stackIndex + 1] = Ve; + } + } + function pat(r) { + const { left: a, operatorToken: l, right: f } = r; + l.kind === 61 && (cn(a) && (a.operatorToken.kind === 57 || a.operatorToken.kind === 56) && pr(a, p._0_and_1_operations_cannot_be_mixed_without_parentheses, Ws(a.operatorToken.kind), Ws(l.kind)), cn(f) && (f.operatorToken.kind === 57 || f.operatorToken.kind === 56) && pr(f, p._0_and_1_operations_cannot_be_mixed_without_parentheses, Ws(f.operatorToken.kind), Ws(l.kind))); + } + function dat(r, a, l, f, m) { + const y = a.kind; + if (y === 64 && (r.kind === 210 || r.kind === 209)) + return _T( + r, + qi(l, f), + f, + l.kind === 110 + /* ThisKeyword */ + ); + let x; + A3(y) ? x = $P(r, f) : x = qi(r, f); + const I = qi(l, f); + return bIe(r, a, l, x, I, f, m); + } + function bIe(r, a, l, f, m, y, x) { + const I = a.kind; + switch (I) { + case 42: + case 43: + case 67: + case 68: + case 44: + case 69: + case 45: + case 70: + case 41: + case 66: + case 48: + case 71: + case 49: + case 72: + case 50: + case 73: + case 52: + case 75: + case 53: + case 79: + case 51: + case 74: + if (f === mn || m === mn) + return mn; + f = Am(f, r), m = Am(m, l); + let cr; + if (f.flags & 528 && m.flags & 528 && (cr = me(a.kind)) !== void 0) + return We(x || a, p.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, Ws(a.kind), Ws(cr)), _e; + { + const En = R$( + r, + f, + p.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, + /*isAwaitValid*/ + !0 + ), Rn = R$( + l, + m, + p.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, + /*isAwaitValid*/ + !0 + ); + let jn; + if (Gl( + f, + 3 + /* AnyOrUnknown */ + ) && Gl( + m, + 3 + /* AnyOrUnknown */ + ) || // Or, if neither could be bigint, implicit coercion results in a number result + !(Sc( + f, + 2112 + /* BigIntLike */ + ) || Sc( + m, + 2112 + /* BigIntLike */ + ))) + jn = _e; + else if (R(f, m)) { + switch (I) { + case 50: + case 73: + er(); + break; + case 43: + case 68: + V < 3 && We(x, p.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); + } + jn = Te; + } else + er(R), jn = be; + return En && Rn && Ve(jn), jn; + } + case 40: + case 65: + if (f === mn || m === mn) + return mn; + !Gl( + f, + 402653316 + /* StringLike */ + ) && !Gl( + m, + 402653316 + /* StringLike */ + ) && (f = Am(f, r), m = Am(m, l)); + let Cr; + return Gl( + f, + 296, + /*strict*/ + !0 + ) && Gl( + m, + 296, + /*strict*/ + !0 + ) ? Cr = _e : Gl( + f, + 2112, + /*strict*/ + !0 + ) && Gl( + m, + 2112, + /*strict*/ + !0 + ) ? Cr = Te : Gl( + f, + 402653316, + /*strict*/ + !0 + ) || Gl( + m, + 402653316, + /*strict*/ + !0 + ) ? Cr = we : (Ea(f) || Ea(m)) && (Cr = Aa(f) || Aa(m) ? be : Ne), Cr && !Se(I) ? Cr : Cr ? (I === 65 && Ve(Cr), Cr) : (er( + (Rn, jn) => Gl(Rn, 402655727) && Gl(jn, 402655727) + ), Ne); + case 30: + case 32: + case 33: + case 34: + return Se(I) && (f = Lpe(Am(f, r)), m = Lpe(Am(m, l)), ht((En, Rn) => { + if (Ea(En) || Ea(Rn)) + return !0; + const jn = Bs(En, tn), qs = Bs(Rn, tn); + return jn && qs || !jn && !qs && $L(En, Rn); + })), br; + case 35: + case 36: + case 37: + case 38: + if (!(y && y & 64)) { + if ((gj(r) || gj(l)) && // only report for === and !== in JS, not == or != + (!Qr(r) || I === 37 || I === 38)) { + const En = I === 35 || I === 37; + We(x, p.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, En ? "false" : "true"); + } + Rr(x, I, r, l), ht((En, Rn) => sme(En, Rn) || sme(Rn, En)); + } + return br; + case 104: + return aat(r, l, f, m, y); + case 103: + return cat(r, l, f, m); + case 56: + case 77: { + const En = Ud( + f, + 4194304 + /* Truthy */ + ) ? Gn([Utt(K ? f : Uh(m)), m]) : f; + return I === 77 && Ve(m), En; + } + case 57: + case 76: { + const En = Ud( + f, + 8388608 + /* Falsy */ + ) ? Gn( + [qh(HAe(f)), m], + 2 + /* Subtype */ + ) : f; + return I === 76 && Ve(m), En; + } + case 61: + case 78: { + const En = Ud( + f, + 262144 + /* EQUndefinedOrNull */ + ) ? Gn( + [qh(f), m], + 2 + /* Subtype */ + ) : f; + return I === 78 && Ve(m), En; + } + case 64: + const Fr = cn(r.parent) ? mc(r.parent) : 0; + return J(Fr, m), mt(Fr) ? ((!(m.flags & 524288) || Fr !== 2 && Fr !== 6 && !Vh(m) && !rde(m) && !(wn(m) & 1)) && Ve(m), f) : (Ve(m), m); + case 28: + if (!F.allowUnreachableCode && LM(r) && !ee(r.parent)) { + const En = xr(r), Rn = En.text, jn = sa(Rn, r.pos); + En.parseDiagnostics.some((ks) => ks.code !== p.JSX_expressions_must_have_one_parent_element.code ? !1 : ij(ks, jn)) || We(r, p.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); + } + return m; + default: + return E.fail(); + } + function R(cr, Cr) { + return Gl( + cr, + 2112 + /* BigIntLike */ + ) && Gl( + Cr, + 2112 + /* BigIntLike */ + ); + } + function J(cr, Cr) { + if (cr === 2) + for (const Fr of f1(Cr)) { + const En = Zr(Fr); + if (En.symbol && En.symbol.flags & 32) { + const Rn = Fr.escapedName, jn = Kt( + Fr.valueDeclaration, + Rn, + 788968, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + jn?.declarations && jn.declarations.some(uS) && (Hy(jn, p.Duplicate_identifier_0, Pi(Rn), Fr), Hy(Fr, p.Duplicate_identifier_0, Pi(Rn), jn)); + } + } + } + function ee(cr) { + return cr.parent.kind === 217 && m_(cr.left) && cr.left.text === "0" && (Es(cr.parent.parent) && cr.parent.parent.expression === cr.parent || cr.parent.parent.kind === 215) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. + (go(cr.right) || Re(cr.right) && cr.right.escapedText === "eval"); + } + function Se(cr) { + const Cr = FM( + f, + 12288 + /* ESSymbolLike */ + ) ? r : FM( + m, + 12288 + /* ESSymbolLike */ + ) ? l : void 0; + return Cr ? (We(Cr, p.The_0_operator_cannot_be_applied_to_type_symbol, Ws(cr)), !1) : !0; + } + function me(cr) { + switch (cr) { + case 52: + case 75: + return 57; + case 53: + case 79: + return 38; + case 51: + case 74: + return 56; + default: + return; + } + } + function Ve(cr) { + dh(I) && n(Cr); + function Cr() { + let Fr = f; + if (ED(a.kind) && r.kind === 211 && (Fr = C$( + r, + /*checkMode*/ + void 0, + /*writeOnly*/ + !0 + )), U8(r, p.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, p.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { + let En; + if (H && Dn(r) && Sc( + cr, + 32768 + /* Undefined */ + )) { + const Rn = Xc($l(r.expression), r.name.escapedText); + WG(cr, Rn) && (En = p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target); + } + y1(cr, Fr, r, l, En); + } + } + } + function mt(cr) { + var Cr; + switch (cr) { + case 2: + return !0; + case 1: + case 5: + case 6: + case 3: + case 4: + const Fr = C_(r), En = MT(l); + return !!En && Gs(En) && !!((Cr = Fr?.exports) != null && Cr.size); + default: + return !1; + } + } + function ht(cr) { + return cr(f, m) ? !1 : (er(cr), !0); + } + function er(cr) { + let Cr = !1; + const Fr = x || a; + if (cr) { + const ks = Z0(f), xa = Z0(m); + Cr = !(ks === f && xa === m) && !!(ks && xa) && cr(ks, xa); + } + let En = f, Rn = m; + !Cr && cr && ([En, Rn] = mat(f, m, cr)); + const [jn, qs] = pk(En, Rn); + tr(Fr, Cr, jn, qs) || id( + Fr, + Cr, + p.Operator_0_cannot_be_applied_to_types_1_and_2, + Ws(a.kind), + jn, + qs + ); + } + function tr(cr, Cr, Fr, En) { + switch (a.kind) { + case 37: + case 35: + case 38: + case 36: + return id( + cr, + Cr, + p.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap, + Fr, + En + ); + default: + return; + } + } + function Rr(cr, Cr, Fr, En) { + const Rn = vn(Ja(Fr)), jn = vn(Ja(En)); + if (Rn || jn) { + const qs = We(cr, p.This_condition_will_always_return_0, Ws( + Cr === 37 || Cr === 35 ? 97 : 112 + /* TrueKeyword */ + )); + if (Rn && jn) return; + const ks = Cr === 38 || Cr === 36 ? Ws( + 54 + /* ExclamationToken */ + ) : "", xa = Rn ? En : Fr, is = Ja(xa); + Fs(qs, Xr(xa, p.Did_you_mean_0, `${ks}Number.isNaN(${fo(is) ? Y_(is) : "..."})`)); + } + } + function vn(cr) { + if (Re(cr) && cr.escapedText === "NaN") { + const Cr = $Ke(); + return !!Cr && Cr === df(cr); + } + return !1; + } + } + function mat(r, a, l) { + let f = r, m = a; + const y = Uh(r), x = Uh(a); + return l(y, x) || (f = y, m = x), [f, m]; + } + function gat(r) { + n(me); + const a = yf(r); + if (!a) return Ne; + const l = jc(a); + if (!(l & 1)) + return Ne; + const f = (l & 2) !== 0; + r.asteriskToken && (f && V < 5 && yl( + r, + 26624 + /* AsyncDelegatorIncludes */ + ), !f && V < 2 && F.downlevelIteration && yl( + r, + 256 + /* Values */ + )); + let m = Y6(a); + m && m.flags & 1048576 && (m = Jc(m, (Ve) => cme( + Ve, + l, + /*errorNode*/ + void 0 + ))); + const y = m && Cme(m, f), x = y && y.yieldType || Ne, I = y && y.nextType || Ne, R = f ? fT(I) || Ne : I, J = r.expression ? qi(r.expression) : W, ee = _Ie(r, J, R, f); + if (m && ee && y1(ee, x, r.expression || r, r.expression), r.asteriskToken) + return vme(f ? 19 : 17, 1, J, r.expression) || Ne; + if (m) + return E2(2, m, f) || Ne; + let Se = QNe(2, a); + return Se || (Se = Ne, n(() => { + if (ne && !gee(r)) { + const Ve = o_( + r, + /*contextFlags*/ + void 0 + ); + (!Ve || Ea(Ve)) && We(r, p.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); + } + })), Se; + function me() { + r.flags & 16384 || Ml(r, p.A_yield_expression_is_only_allowed_in_a_generator_body), mde(r) && We(r, p.yield_expressions_cannot_be_used_in_a_parameter_initializer); + } + } + function hat(r, a) { + const l = $P(r.condition, a); + gme(r.condition, l, r.whenTrue); + const f = qi(r.whenTrue, a), m = qi(r.whenFalse, a); + return Gn( + [f, m], + 2 + /* Subtype */ + ); + } + function SIe(r) { + const a = r.parent; + return Qu(a) && SIe(a) || ho(a) && a.argumentExpression === r; + } + function yat(r) { + const a = [r.head.text], l = []; + for (const m of r.templateSpans) { + const y = qi(m.expression); + FM( + y, + 12288 + /* ESSymbolLike */ + ) && We(m.expression, p.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String), a.push(m.literal.text), l.push(Bs(y, qt) ? y : we); + } + const f = r.parent.kind !== 215 && de(r).value; + return f ? Pk(D_(f)) : VP(r) || SIe(r) || Hp(o_( + r, + /*contextFlags*/ + void 0 + ) || yt, vat) ? XS(a, l) : we; + } + function vat(r) { + return !!(r.flags & 134217856 || r.flags & 58982400 && Sc( + Hl(r) || yt, + 402653316 + /* StringLike */ + )); + } + function bat(r) { + return Mb(r) && !oS(r.parent) ? r.parent.parent : r; + } + function uE(r, a, l, f) { + const m = bat(r); + gM( + m, + a, + /*isCache*/ + !1 + ), Mnt(m, l); + const y = qi(r, f | 1 | (l ? 2 : 0)); + l && l.intraExpressionInferenceSites && (l.intraExpressionInferenceSites = void 0); + const x = Sc( + y, + 2944 + /* Literal */ + ) && J$(y, y$( + a, + r, + /*contextFlags*/ + void 0 + )) ? Ju(y) : y; + return Rnt(), j8(), x; + } + function Dc(r, a) { + if (a) + return qi(r, a); + const l = bn(r); + if (!l.resolvedType) { + const f = cf, m = zp; + cf = za, zp = void 0, l.resolvedType = qi(r, a), zp = m, cf = f; + } + return l.resolvedType; + } + function TIe(r) { + return r = Ja( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ), r.kind === 216 || r.kind === 234 || fS(r); + } + function WP(r, a, l) { + const f = o3(r); + if (Qr(r)) { + const y = P5(r); + if (y) + return Gde(f, y, a); + } + const m = ome(f) || (l ? uE( + f, + l, + /*inferenceContext*/ + void 0, + a || 0 + /* Normal */ + ) : Dc(f, a)); + return ji(r) && r.name.kind === 207 && la(m) && !m.target.hasRestElement && G0(m) < r.name.elements.length ? Sat(m, r.name) : m; + } + function Sat(r, a) { + const l = a.elements, f = h2(r).slice(), m = r.target.elementFlags.slice(); + for (let y = G0(r); y < l.length; y++) { + const x = l[y]; + (y < l.length - 1 || !(x.kind === 208 && x.dotDotDotToken)) && (f.push(!ml(x) && JP(x) ? fd( + x, + /*includePatternInType*/ + !1, + /*reportErrors*/ + !1 + ) : Ne), m.push( + 2 + /* Optional */ + ), !ml(x) && !JP(x) && Xv(x, Ne)); + } + return gg(f, m, r.target.readonly); + } + function B$(r, a) { + const l = P2(r) & 6 || Gw(r) ? a : $v(a); + if (Qr(r)) { + if (BAe(l)) + return Xv(r, Ne), Ne; + if ($G(l)) + return Xv(r, Do), Do; + } + return l; + } + function J$(r, a) { + if (a) { + if (a.flags & 3145728) { + const l = a.types; + return ut(l, (f) => J$(r, f)); + } + if (a.flags & 58982400) { + const l = Hl(a) || yt; + return Sc( + l, + 4 + /* String */ + ) && Sc( + r, + 128 + /* StringLiteral */ + ) || Sc( + l, + 8 + /* Number */ + ) && Sc( + r, + 256 + /* NumberLiteral */ + ) || Sc( + l, + 64 + /* BigInt */ + ) && Sc( + r, + 2048 + /* BigIntLiteral */ + ) || Sc( + l, + 4096 + /* ESSymbol */ + ) && Sc( + r, + 8192 + /* UniqueESSymbol */ + ) || J$(r, l); + } + return !!(a.flags & 406847616 && Sc( + r, + 128 + /* StringLiteral */ + ) || a.flags & 256 && Sc( + r, + 256 + /* NumberLiteral */ + ) || a.flags & 2048 && Sc( + r, + 2048 + /* BigIntLiteral */ + ) || a.flags & 512 && Sc( + r, + 512 + /* BooleanLiteral */ + ) || a.flags & 8192 && Sc( + r, + 8192 + /* UniqueESSymbol */ + )); + } + return !1; + } + function VP(r) { + const a = r.parent; + return J1(a) && yd(a.type) || fS(a) && yd(fD(a)) || Hde(r) && HS(o_( + r, + 0 + /* None */ + )) || (Qu(a) || Wl(a) || cp(a)) && VP(a) || (qc(a) || du(a) || iD(a)) && VP(a.parent); + } + function UP(r, a, l) { + const f = qi(r, a, l); + return VP(r) || OZ(r) ? Ju(f) : TIe(r) ? f : Mpe(f, y$( + o_( + r, + /*contextFlags*/ + void 0 + ), + r, + /*contextFlags*/ + void 0 + )); + } + function xIe(r, a) { + return r.name.kind === 167 && wm(r.name), UP(r.initializer, a); + } + function kIe(r, a) { + X7e(r), r.name.kind === 167 && wm(r.name); + const l = mIe(r, a); + return CIe(r, l, a); + } + function CIe(r, a, l) { + if (l && l & 10) { + const f = z8( + a, + 0, + /*allowMembers*/ + !0 + ), m = z8( + a, + 1, + /*allowMembers*/ + !0 + ), y = f || m; + if (y && y.typeParameters) { + const x = Zv( + r, + 2 + /* NoConstraints */ + ); + if (x) { + const I = z8( + qh(x), + f ? 0 : 1, + /*allowMembers*/ + !1 + ); + if (I && !I.typeParameters) { + if (l & 8) + return EIe(r, l), wo; + const R = x2(r), J = R.signature && Ha(R.signature), ee = J && L8e(J); + if (ee && !ee.typeParameters && !Ri(R.inferences, _E)) { + const Se = Cat(R, y.typeParameters), me = Bfe(y, Se), Ve = or(R.inferences, (mt) => Vpe(mt.typeParameter)); + if (Bpe(me, I, (mt, ht) => { + Gh( + Ve, + mt, + ht, + /*priority*/ + 0, + /*contravariant*/ + !0 + ); + }), ut(Ve, _E) && (Jpe(me, I, (mt, ht) => { + Gh(Ve, mt, ht); + }), !xat(R.inferences, Ve))) + return kat(R.inferences, Ve), R.inferredTypeParameters = Hi(R.inferredTypeParameters, Se), $S(me); + } + return $S(M8e(y, I, R), Xs(Sf, (Se) => Se && or(Se.inferences, (me) => me.typeParameter)).slice()); + } + } + } + } + return a; + } + function EIe(r, a) { + if (a & 2) { + const l = x2(r); + l.flags |= 4; + } + } + function _E(r) { + return !!(r.candidates || r.contraCandidates); + } + function Tat(r) { + return !!(r.candidates || r.contraCandidates || n3e(r.typeParameter)); + } + function xat(r, a) { + for (let l = 0; l < r.length; l++) + if (_E(r[l]) && _E(a[l])) + return !0; + return !1; + } + function kat(r, a) { + for (let l = 0; l < r.length; l++) + !_E(r[l]) && _E(a[l]) && (r[l] = a[l]); + } + function Cat(r, a) { + const l = []; + let f, m; + for (const y of a) { + const x = y.symbol.escapedName; + if (ame(r.inferredTypeParameters, x) || ame(l, x)) { + const I = Eat(Hi(r.inferredTypeParameters, l), x), R = va(262144, I), J = ff(R); + J.target = y, f = Tr(f, y), m = Tr(m, J), l.push(J); + } else + l.push(y); + } + if (m) { + const y = z_(f, m); + for (const x of m) + x.mapper = y; + } + return l; + } + function ame(r, a) { + return ut(r, (l) => l.symbol.escapedName === a); + } + function Eat(r, a) { + let l = a.length; + for (; l > 1 && a.charCodeAt(l - 1) >= 48 && a.charCodeAt(l - 1) <= 57; ) l--; + const f = a.slice(0, l); + for (let m = 1; ; m++) { + const y = f + m; + if (!ame(r, y)) + return y; + } + } + function DIe(r) { + const a = uT(r); + if (a && !a.typeParameters) + return Ha(a); + } + function Dat(r) { + const a = qi(r.expression), l = A8(a, r.expression), f = DIe(a); + return f && ZG(f, r, l !== a); + } + function $l(r) { + const a = ome(r); + if (a) + return a; + if (r.flags & 268435456 && zp) { + const m = zp[ja(r)]; + if (m) + return m; + } + const l = Od, f = qi( + r, + 64 + /* TypeOnly */ + ); + if (Od !== l) { + const m = zp || (zp = []); + m[ja(r)] = f, mee( + r, + r.flags | 268435456 + /* TypeCached */ + ); + } + return f; + } + function ome(r) { + let a = Ja( + r, + /*excludeJSDocTypeAssertions*/ + !0 + ); + if (fS(a)) { + const l = fD(a); + if (!yd(l)) + return xi(l); + } + if (a = Ja(r), Cy(a)) { + const l = ome(a.expression); + return l ? fT(l) : void 0; + } + if (Es(a) && a.expression.kind !== 108 && !d_( + a, + /*requireStringLiteralLikeArgument*/ + !0 + ) && !X8e(a)) + return J2(a) ? Dat(a) : DIe(oE(a.expression)); + if (J1(a) && !yd(a.type)) + return xi(a.type); + if (ob(r) || QE(r)) + return qi(r); + } + function MM(r) { + const a = bn(r); + if (a.contextFreeType) + return a.contextFreeType; + gM( + r, + Ne, + /*isCache*/ + !1 + ); + const l = a.contextFreeType = qi( + r, + 4 + /* SkipContextSensitive */ + ); + return j8(), l; + } + function qi(r, a, l) { + var f, m; + (f = rn) == null || f.push(rn.Phase.Check, "checkExpression", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }); + const y = C; + C = r, h = 0; + const x = Aat(r, a, l), I = CIe(r, x, a); + return j$(I) && Pat(r, I), C = y, (m = rn) == null || m.pop(), I; + } + function Pat(r, a) { + if (r.parent.kind === 211 && r.parent.expression === r || r.parent.kind === 212 && r.parent.expression === r || (r.kind === 80 || r.kind === 166) && rX(r) || r.parent.kind === 186 && r.parent.exprName === r || r.parent.kind === 281 || We(r, p.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query), ap(F)) { + E.assert(!!(a.symbol.flags & 128)); + const f = a.symbol.valueDeclaration, m = e.getRedirectReferenceForResolutionFromSourceOfProject(xr(f).resolvedPath); + f.flags & 33554432 && !Y1(r) && (!m || !Cb(m.commandLine.options)) && We(r, p.Cannot_access_ambient_const_enums_when_0_is_enabled, Fe); + } + } + function wat(r, a) { + if (gf(r)) { + if (pJ(r)) + return Gde(r.expression, dJ(r), a); + if (fS(r)) + return K8e(r, a); + } + return qi(r.expression, a); + } + function Aat(r, a, l) { + const f = r.kind; + if (i) + switch (f) { + case 231: + case 218: + case 219: + i.throwIfCancellationRequested(); + } + switch (f) { + case 80: + return snt(r, a); + case 81: + return Cit(r); + case 110: + return dM(r); + case 108: + return m$(r); + case 106: + return q; + case 15: + case 11: + return $pe(r) ? jt : Pk(D_(r.text)); + case 9: + return t5e(r), Pk(pd(+r.text)); + case 10: + return Iut(r), Pk(OG({ + negative: !1, + base10Value: J4(r.text) + })); + case 112: + return wt; + case 97: + return dt; + case 228: + return yat(r); + case 14: + return Qnt(r); + case 209: + return i8e(r, a, l); + case 210: + return nit(r, a); + case 211: + return C$(r, a); + case 166: + return b8e(r, a); + case 212: + return Jit(r, a); + case 213: + if (r.expression.kind === 102) + return yst(r); + case 214: + return hst(r, a); + case 215: + return vst(r); + case 217: + return wat(r, a); + case 231: + return yct(r); + case 218: + case 219: + return mIe(r, a); + case 221: + return tat(r); + case 216: + case 234: + return bst(r, a); + case 235: + return xst(r); + case 233: + return tIe(r); + case 238: + return kst(r); + case 236: + return Cst(r); + case 220: + return Kst(r); + case 222: + return rat(r); + case 223: + return nat(r); + case 224: + return iat(r); + case 225: + return sat(r); + case 226: + return ae(r, a); + case 227: + return hat(r, a); + case 230: + return Ynt(r, a); + case 232: + return W; + case 229: + return gat(r); + case 237: + return Znt(r); + case 294: + return yit(r, a); + case 284: + return oit(r); + case 285: + return sit(r); + case 288: + return cit(r); + case 292: + return uit(r, a); + case 286: + E.fail("Shouldn't ever directly check a JsxOpeningElement"); + } + return be; + } + function PIe(r) { + nh(r), r.expression && Ml(r.expression, p.Type_expected), ra(r.constraint), ra(r.default); + const a = Zg(xn(r)); + Hl(a), KZe(a) || We(r.default, p.Type_parameter_0_has_a_circular_default, Ur(a)); + const l = a_(a), f = GS(a); + l && f && xu(f, pf(Ji(l, b2(a, f)), f), r.default, p.Type_0_does_not_satisfy_the_constraint_1), Fk(r), n(() => XP(r.name, p.Type_parameter_name_cannot_be_0)); + } + function Nat(r) { + var a, l; + if (Vl(r.parent) || Qn(r.parent) || Rp(r.parent)) { + const f = Zg(xn(r)), m = Npe(f) & 24576; + if (m) { + const y = xn(r.parent); + if (Rp(r.parent) && !(wn(mo(y)) & 52)) + We(r, p.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); + else if (m === 8192 || m === 16384) { + (a = rn) == null || a.push(rn.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: Fl(mo(y)), id: Fl(f) }); + const x = YL(y, f, m === 16384 ? Ao : y_), I = YL(y, f, m === 16384 ? y_ : Ao), R = f; + D = f, xu(x, I, r, p.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation), D = R, (l = rn) == null || l.pop(); + } + } + } + } + function wIe(r) { + nh(r), zM(r); + const a = yf(r); + Vn( + r, + 31 + /* ParameterPropertyModifier */ + ) && (a.kind === 176 && wp(a.body) || We(r, p.A_parameter_property_is_only_allowed_in_a_constructor_implementation), a.kind === 176 && Re(r.name) && r.name.escapedText === "constructor" && We(r.name, p.constructor_cannot_be_used_as_a_parameter_property_name)), !r.initializer && q4(r) && Ts(r.name) && a.body && We(r, p.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature), r.name && Re(r.name) && (r.name.escapedText === "this" || r.name.escapedText === "new") && (a.parameters.indexOf(r) !== 0 && We(r, p.A_0_parameter_must_be_the_first_parameter, r.name.escapedText), (a.kind === 176 || a.kind === 180 || a.kind === 185) && We(r, p.A_constructor_cannot_have_a_this_parameter), a.kind === 219 && We(r, p.An_arrow_function_cannot_have_a_this_parameter), (a.kind === 177 || a.kind === 178) && We(r, p.get_and_set_accessors_cannot_declare_this_parameters)), r.dotDotDotToken && !Ts(r.name) && !Bs(Wd(Zr(r.symbol)), pc) && We(r, p.A_rest_parameter_must_be_of_an_array_type); + } + function Iat(r) { + const a = Oat(r); + if (!a) { + We(r, p.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); + return; + } + const l = Qf(a), f = bp(l); + if (!f) + return; + ra(r.type); + const { parameterName: m } = r; + if (f.kind === 0 || f.kind === 2) + FG(m); + else if (f.parameterIndex >= 0) { + if (gu(l) && f.parameterIndex === l.parameters.length - 1) + We(m, p.A_type_predicate_cannot_reference_a_rest_parameter); + else if (f.type) { + const y = () => us( + /*details*/ + void 0, + p.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type + ); + xu( + f.type, + Zr(l.parameters[f.parameterIndex]), + r.type, + /*headMessage*/ + void 0, + y + ); + } + } else if (m) { + let y = !1; + for (const { name: x } of a.parameters) + if (Ts(x) && AIe(x, m, f.parameterName)) { + y = !0; + break; + } + y || We(r.parameterName, p.Cannot_find_parameter_0, f.parameterName); + } + } + function Oat(r) { + switch (r.parent.kind) { + case 219: + case 179: + case 262: + case 218: + case 184: + case 174: + case 173: + const a = r.parent; + if (r === a.type) + return a; + } + } + function AIe(r, a, l) { + for (const f of r.elements) { + if (ml(f)) + continue; + const m = f.name; + if (m.kind === 80 && m.escapedText === l) + return We(a, p.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, l), !0; + if ((m.kind === 207 || m.kind === 206) && AIe( + m, + a, + l + )) + return !0; + } + } + function H8(r) { + r.kind === 181 ? aut(r) : (r.kind === 184 || r.kind === 262 || r.kind === 185 || r.kind === 179 || r.kind === 176 || r.kind === 180) && lX(r); + const a = jc(r); + a & 4 || ((a & 3) === 3 && V < 5 && yl( + r, + 6144 + /* AsyncGeneratorIncludes */ + ), (a & 3) === 2 && V < 4 && yl( + r, + 64 + /* Awaiter */ + ), a & 3 && V < 2 && yl( + r, + 128 + /* Generator */ + )), UM(ly(r)), mct(r), rr(r.parameters, wIe), r.type && ra(r.type), n(l); + function l() { + Iot(r); + let f = K_(r), m = f; + if (Qr(r)) { + const y = M1(r); + if (y && y.typeExpression && Nf(y.typeExpression.type)) { + const x = uT(xi(y.typeExpression)); + x && x.declaration && (f = K_(x.declaration), m = y.typeExpression.type); + } + } + if (ne && !f) + switch (r.kind) { + case 180: + We(r, p.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + break; + case 179: + We(r, p.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); + break; + } + if (f && m) { + const y = jc(r); + if ((y & 5) === 1) { + const x = xi(f); + x === en ? We(m, p.A_generator_cannot_have_a_void_type_annotation) : cme(x, y, m); + } else (y & 3) === 2 && uot(r, f, m); + } + r.kind !== 181 && r.kind !== 317 && T1(r); + } + } + function cme(r, a, l) { + const f = E2(0, r, (a & 2) !== 0) || Ne, m = E2(1, r, (a & 2) !== 0) || f, y = E2(2, r, (a & 2) !== 0) || yt, x = M$(f, m, y, !!(a & 2)); + return xu(x, r, l); + } + function Fat(r) { + const a = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(); + for (const y of r.members) + if (y.kind === 176) + for (const x of y.parameters) + Q_(x, y) && !Ts(x.name) && m( + a, + x.name, + x.name.escapedText, + 3 + /* GetOrSetAccessor */ + ); + else { + const x = Os(y), I = y.name; + if (!I) + continue; + const R = wi(I), J = R && x ? 16 : 0, ee = R ? f : x ? l : a, Se = I && Vme(I); + if (Se) + switch (y.kind) { + case 177: + m(ee, I, Se, 1 | J); + break; + case 178: + m(ee, I, Se, 2 | J); + break; + case 172: + m(ee, I, Se, 3 | J); + break; + case 174: + m(ee, I, Se, 8 | J); + break; + } + } + function m(y, x, I, R) { + const J = y.get(I); + if (J) + if ((J & 16) !== (R & 16)) + We(x, p.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, sc(x)); + else { + const ee = !!(J & 8), Se = !!(R & 8); + ee || Se ? ee !== Se && We(x, p.Duplicate_identifier_0, sc(x)) : J & R & -17 ? We(x, p.Duplicate_identifier_0, sc(x)) : y.set(I, J | R); + } + else + y.set(I, R); + } + } + function Lat(r) { + for (const a of r.members) { + const l = a.name; + if (Os(a) && l) { + const m = Vme(l); + switch (m) { + case "name": + case "length": + case "caller": + case "arguments": + if (U) + break; + case "prototype": + const y = p.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1, x = ug(xn(r)); + We(l, y, m, x); + break; + } + } + } + } + function NIe(r) { + const a = /* @__PURE__ */ new Map(); + for (const l of r.members) + if (l.kind === 171) { + let f; + const m = l.name; + switch (m.kind) { + case 11: + case 9: + f = m.text; + break; + case 80: + f = dn(m); + break; + default: + continue; + } + a.get(f) ? (We(es(l.symbol.valueDeclaration), p.Duplicate_identifier_0, f), We(l.name, p.Duplicate_identifier_0, f)) : a.set(f, !0); + } + } + function lme(r) { + if (r.kind === 264) { + const l = xn(r); + if (l.declarations && l.declarations.length > 0 && l.declarations[0] !== r) + return; + } + const a = Jfe(xn(r)); + if (a?.declarations) { + const l = /* @__PURE__ */ new Map(); + for (const f of a.declarations) + f.parameters.length === 1 && f.parameters[0].type && sT(xi(f.parameters[0].type), (m) => { + const y = l.get(Fl(m)); + y ? y.declarations.push(f) : l.set(Fl(m), { type: m, declarations: [f] }); + }); + l.forEach((f) => { + if (f.declarations.length > 1) + for (const m of f.declarations) + We(m, p.Duplicate_index_signature_for_type_0, Ur(f.type)); + }); + } + } + function IIe(r) { + !nh(r) && !Put(r) && uX(r.name), zM(r), z$(r), Vn( + r, + 64 + /* Abstract */ + ) && r.kind === 172 && r.initializer && We(r, p.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, ao(r.name)); + } + function Mat(r) { + return wi(r.name) && We(r, p.Private_identifiers_are_not_allowed_outside_class_bodies), IIe(r); + } + function Rat(r) { + X7e(r) || uX(r.name), hc(r) && r.asteriskToken && Re(r.name) && dn(r.name) === "constructor" && We(r.name, p.Class_constructor_may_not_be_a_generator), UIe(r), Vn( + r, + 64 + /* Abstract */ + ) && r.kind === 174 && r.body && We(r, p.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, ao(r.name)), wi(r.name) && !Nl(r) && We(r, p.Private_identifiers_are_not_allowed_outside_class_bodies), z$(r); + } + function z$(r) { + if (wi(r.name) && (V < 9 || V < 99 || !U)) { + for (let a = bd(r); a; a = bd(a)) + bn(a).flags |= 1048576; + if (tl(r.parent)) { + const a = ude(r.parent); + a && (bn(r.name).flags |= 32768, bn(a).flags |= 4096); + } + } + } + function jat(r) { + nh(r), gs(r, ra); + } + function Bat(r) { + H8(r), Eut(r) || Dut(r), ra(r.body); + const a = xn(r), l = Jo(a, r.kind); + if (r === l && U$(a), ic(r.body)) + return; + n(m); + return; + function f(y) { + return Pu(y) ? !0 : y.kind === 172 && !Os(y) && !!y.initializer; + } + function m() { + const y = r.parent; + if (vb(y)) { + _de(r.parent, y); + const x = fde(y), I = VNe(r.body); + if (I) { + if (x && We(I, p.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null), !G && (ut(r.parent.members, f) || ut(r.parameters, (J) => Vn( + J, + 31 + /* ParameterPropertyModifier */ + )))) + if (!Jat(I, r.body)) + We(I, p.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); + else { + let J; + for (const ee of r.body.statements) { + if (Pl(ee) && G2(Bc(ee.expression))) { + J = ee; + break; + } + if (OIe(ee)) + break; + } + J === void 0 && We(r, p.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); + } + } else x || We(r, p.Constructors_for_derived_classes_must_contain_a_super_call); + } + } + } + function Jat(r, a) { + const l = fh(r.parent); + return Pl(l) && l.parent === a; + } + function OIe(r) { + return r.kind === 108 || r.kind === 110 ? !0 : zZ(r) ? !1 : !!gs(r, OIe); + } + function FIe(r) { + Re(r.name) && dn(r.name) === "constructor" && Qn(r.parent) && We(r.name, p.Class_constructor_may_not_be_an_accessor), n(a), ra(r.body), z$(r); + function a() { + if (!lX(r) && !mut(r) && uX(r.name), jM(r), H8(r), r.kind === 177 && !(r.flags & 33554432) && wp(r.body) && r.flags & 512 && (r.flags & 1024 || We(r.name, p.A_get_accessor_must_return_a_value)), r.name.kind === 167 && wm(r.name), X6(r)) { + const f = xn(r), m = Jo( + f, + 177 + /* GetAccessor */ + ), y = Jo( + f, + 178 + /* SetAccessor */ + ); + if (m && y && !(pE(m) & 1)) { + bn(m).flags |= 1; + const x = Au(m), I = Au(y); + (x & 64) !== (I & 64) && (We(m.name, p.Accessors_must_both_be_abstract_or_non_abstract), We(y.name, p.Accessors_must_both_be_abstract_or_non_abstract)), (x & 4 && !(I & 6) || x & 2 && !(I & 2)) && (We(m.name, p.A_get_accessor_must_be_at_least_as_accessible_as_the_setter), We(y.name, p.A_get_accessor_must_be_at_least_as_accessible_as_the_setter)); + } + } + const l = Jv(xn(r)); + r.kind === 177 && tme(r, l); + } + } + function zat(r) { + jM(r); + } + function Wat(r, a, l) { + return r.typeArguments && l < r.typeArguments.length ? xi(r.typeArguments[l]) : W$(r, a)[l]; + } + function W$(r, a) { + return p1(or(r.typeArguments, xi), a, Em(a), Qr(r)); + } + function LIe(r, a) { + let l, f, m = !0; + for (let y = 0; y < a.length; y++) { + const x = a_(a[y]); + x && (l || (l = W$(r, a), f = z_(a, l)), m = m && xu( + l[y], + Ji(x, f), + r.typeArguments[y], + p.Type_0_does_not_satisfy_the_constraint_1 + )); + } + return m; + } + function Vat(r, a) { + if (!Aa(r)) + return a.flags & 524288 && Ni(a).typeParameters || (wn(r) & 4 ? r.target.localTypeParameters : void 0); + } + function ume(r) { + const a = xi(r); + if (!Aa(a)) { + const l = bn(r).resolvedSymbol; + if (l) + return Vat(a, l); + } + } + function _me(r) { + if ($M(r, r.typeArguments), r.kind === 183 && !Qr(r) && !n3(r) && r.typeArguments && r.typeName.end !== r.typeArguments.pos) { + const a = xr(r); + EZ(a, r.typeName.end) === 25 && D2(r, sa(a.text, r.typeName.end), 1, p.JSDoc_types_can_only_be_used_inside_documentation_comments); + } + rr(r.typeArguments, ra), MIe(r); + } + function MIe(r) { + const a = xi(r); + if (!Aa(a)) { + r.typeArguments && n(() => { + const f = ume(r); + f && LIe(r, f); + }); + const l = bn(r).resolvedSymbol; + l && ut(l.declarations, (f) => tx(f) && !!(f.flags & 536870912)) && Hf( + PM(r), + l.declarations, + l.escapedName + ); + } + } + function Uat(r) { + const a = Jn(r.parent, QI); + if (!a) return; + const l = ume(a); + if (!l) return; + const f = a_(l[a.typeArguments.indexOf(r)]); + return f && Ji(f, z_(l, W$(a, l))); + } + function qat(r) { + E3e(r); + } + function Hat(r) { + rr(r.members, ra), n(a); + function a() { + const l = pAe(r); + Y$(l, l.symbol), lme(r), NIe(r); + } + } + function Gat(r) { + ra(r.elementType); + } + function $at(r) { + let a = !1, l = !1; + for (const f of r.elements) { + let m = Kfe(f); + if (m & 8) { + const y = xi(f.type); + if (!Y0(y)) { + We(f, p.A_rest_element_type_must_be_an_array_type); + break; + } + (xp(y) || la(y) && y.target.combinedFlags & 4) && (m |= 4); + } + if (m & 4) { + if (l) { + pr(f, p.A_rest_element_cannot_follow_another_rest_element); + break; + } + l = !0; + } else if (m & 2) { + if (l) { + pr(f, p.An_optional_element_cannot_follow_a_rest_element); + break; + } + a = !0; + } else if (m & 1 && a) { + pr(f, p.A_required_element_cannot_follow_an_optional_element); + break; + } + } + rr(r.elements, ra), xi(r); + } + function Xat(r) { + rr(r.types, ra), xi(r); + } + function RIe(r, a) { + if (!(r.flags & 8388608)) + return r; + const l = r.objectType, f = r.indexType, m = B_(l) && yG(l) === 2 ? Y3e( + l, + 0 + /* None */ + ) : Dm( + l, + 0 + /* None */ + ), y = !!eh(l, _e); + if (V_(f, (x) => Bs(x, m) || y && Sk(x, _e))) + return a.kind === 212 && u0(a) && wn(l) & 32 && pg(l) & 1 && We(a, p.Index_signature_in_type_0_only_permits_reading, Ur(l)), r; + if (YS(l)) { + const x = wG(f, a); + if (x) { + const I = sT(ju(l), (R) => js(R, x)); + if (I && sp(I) & 6) + return We(a, p.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, Pi(x)), be; + } + } + return We(a, p.Type_0_cannot_be_used_to_index_type_1, Ur(f), Ur(l)), be; + } + function Qat(r) { + ra(r.objectType), ra(r.indexType), RIe(oAe(r), r); + } + function Yat(r) { + Zat(r), ra(r.typeParameter), ra(r.nameType), ra(r.type), r.type || Xv(r, Ne); + const a = _pe(r), l = q0(a); + if (l) + xu(l, Or, r.nameType); + else { + const f = Xf(a); + xu(f, Or, $k(r.typeParameter)); + } + } + function Zat(r) { + var a; + if ((a = r.members) != null && a.length) + return pr(r.members[0], p.A_mapped_type_may_not_declare_properties_or_methods); + } + function Kat(r) { + FG(r); + } + function eot(r) { + hut(r), ra(r.type); + } + function tot(r) { + gs(r, ra); + } + function rot(r) { + sr(r, (l) => l.parent && l.parent.kind === 194 && l.parent.extendsType === l) || pr(r, p.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type), ra(r.typeParameter); + const a = xn(r.typeParameter); + if (a.declarations && a.declarations.length > 1) { + const l = Ni(a); + if (!l.typeParametersChecked) { + l.typeParametersChecked = !0; + const f = Zg(a), m = rZ( + a, + 168 + /* TypeParameter */ + ); + if (!u7e(m, [f], (y) => [y])) { + const y = Si(a); + for (const x of m) + We(x.name, p.All_declarations_of_0_must_have_identical_constraints, y); + } + } + } + T1(r); + } + function not(r) { + for (const a of r.templateSpans) { + ra(a.type); + const l = xi(a.type); + xu(l, qt, a.type); + } + xi(r); + } + function iot(r) { + ra(r.argument), r.attributes && ZC(r.attributes, pr), MIe(r); + } + function sot(r) { + r.dotDotDotToken && r.questionToken && pr(r, p.A_tuple_member_cannot_be_both_optional_and_rest), r.type.kind === 190 && pr(r.type, p.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type), r.type.kind === 191 && pr(r.type, p.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type), ra(r.type), xi(r); + } + function RM(r) { + return (ef( + r, + 2 + /* Private */ + ) || Pu(r)) && !!(r.flags & 33554432); + } + function V$(r, a) { + let l = _X(r); + if (r.parent.kind !== 264 && r.parent.kind !== 263 && r.parent.kind !== 231 && r.flags & 33554432) { + const f = c7(r); + f && f.flags & 128 && !(l & 128) && !(_m(r.parent) && Nc(r.parent.parent) && Zd(r.parent.parent)) && (l |= 32), l |= 128; + } + return l & a; + } + function U$(r) { + n(() => aot(r)); + } + function aot(r) { + function a(cr, Cr) { + return Cr !== void 0 && Cr.parent === cr[0].parent ? Cr : cr[0]; + } + function l(cr, Cr, Fr, En, Rn) { + if ((En ^ Rn) !== 0) { + const qs = V$(a(cr, Cr), Fr); + rr(cr, (ks) => { + const xa = V$(ks, Fr) ^ qs; + xa & 32 ? We(es(ks), p.Overload_signatures_must_all_be_exported_or_non_exported) : xa & 128 ? We(es(ks), p.Overload_signatures_must_all_be_ambient_or_non_ambient) : xa & 6 ? We(es(ks) || ks, p.Overload_signatures_must_all_be_public_private_or_protected) : xa & 64 && We(es(ks), p.Overload_signatures_must_all_be_abstract_or_non_abstract); + }); + } + } + function f(cr, Cr, Fr, En) { + if (Fr !== En) { + const Rn = BT(a(cr, Cr)); + rr(cr, (jn) => { + BT(jn) !== Rn && We(es(jn), p.Overload_signatures_must_all_be_optional_or_required); + }); + } + } + const m = 230; + let y = 0, x = m, I = !1, R = !0, J = !1, ee, Se, me; + const Ve = r.declarations, mt = (r.flags & 16384) !== 0; + function ht(cr) { + if (cr.name && ic(cr.name)) + return; + let Cr = !1; + const Fr = gs(cr.parent, (Rn) => { + if (Cr) + return Rn; + Cr = Rn === cr; + }); + if (Fr && Fr.pos === cr.end && Fr.kind === cr.kind) { + const Rn = Fr.name || Fr, jn = Fr.name; + if (cr.name && jn && // both are private identifiers + (wi(cr.name) && wi(jn) && cr.name.escapedText === jn.escapedText || // Both are computed property names + oa(cr.name) && oa(jn) && Wh(wm(cr.name), wm(jn)) || // Both are literal property names that are the same. + rm(cr.name) && rm(jn) && h4(cr.name) === h4(jn))) { + if ((cr.kind === 174 || cr.kind === 173) && Os(cr) !== Os(Fr)) { + const ks = Os(cr) ? p.Function_overload_must_be_static : p.Function_overload_must_not_be_static; + We(Rn, ks); + } + return; + } + if (wp(Fr.body)) { + We(Rn, p.Function_implementation_name_must_be_0, ao(cr.name)); + return; + } + } + const En = cr.name || cr; + mt ? We(En, p.Constructor_implementation_is_missing) : Vn( + cr, + 64 + /* Abstract */ + ) ? We(En, p.All_declarations_of_an_abstract_method_must_be_consecutive) : We(En, p.Function_implementation_is_missing_or_not_immediately_following_the_declaration); + } + let er = !1, tr = !1, Rr = !1; + const vn = []; + if (Ve) + for (const cr of Ve) { + const Cr = cr, Fr = Cr.flags & 33554432, En = Cr.parent && (Cr.parent.kind === 264 || Cr.parent.kind === 187) || Fr; + if (En && (me = void 0), (Cr.kind === 263 || Cr.kind === 231) && !Fr && (Rr = !0), Cr.kind === 262 || Cr.kind === 174 || Cr.kind === 173 || Cr.kind === 176) { + vn.push(Cr); + const Rn = V$(Cr, m); + y |= Rn, x &= Rn, I = I || BT(Cr), R = R && BT(Cr); + const jn = wp(Cr.body); + jn && ee ? mt ? tr = !0 : er = !0 : me?.parent === Cr.parent && me.end !== Cr.pos && ht(me), jn ? ee || (ee = Cr) : J = !0, me = Cr, En || (Se = Cr); + } + Qr(cr) && ps(cr) && cr.jsDoc && (J = Dr(aB(cr)) > 0); + } + if (tr && rr(vn, (cr) => { + We(cr, p.Multiple_constructor_implementations_are_not_allowed); + }), er && rr(vn, (cr) => { + We(es(cr) || cr, p.Duplicate_function_implementation); + }), Rr && !mt && r.flags & 16 && Ve) { + const cr = Ln( + Ve, + (Cr) => Cr.kind === 263 + /* ClassDeclaration */ + ).map((Cr) => Xr(Cr, p.Consider_adding_a_declare_modifier_to_this_class)); + rr(Ve, (Cr) => { + const Fr = Cr.kind === 263 ? p.Class_declaration_cannot_implement_overload_list_for_0 : Cr.kind === 262 ? p.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; + Fr && Fs( + We(es(Cr) || Cr, Fr, uc(r)), + ...cr + ); + }); + } + if (Se && !Se.body && !Vn( + Se, + 64 + /* Abstract */ + ) && !Se.questionToken && ht(Se), J && (Ve && (l(Ve, ee, m, y, x), f(Ve, ee, I, R)), ee)) { + const cr = m2(r), Cr = Qf(ee); + for (const Fr of cr) + if (!vtt(Cr, Fr)) { + const En = Fr.declaration && Th(Fr.declaration) ? Fr.declaration.parent.tagName : Fr.declaration; + Fs( + We(En, p.This_overload_signature_is_not_compatible_with_its_implementation_signature), + Xr(ee, p.The_implementation_signature_is_declared_here) + ); + break; + } + } + } + function G8(r) { + n(() => oot(r)); + } + function oot(r) { + let a = r.localSymbol; + if (!a && (a = xn(r), !a.exportSymbol) || Jo(a, r.kind) !== r) + return; + let l = 0, f = 0, m = 0; + for (const J of a.declarations) { + const ee = R(J), Se = V$( + J, + 2080 + /* Default */ + ); + Se & 32 ? Se & 2048 ? m |= ee : l |= ee : f |= ee; + } + const y = l | f, x = l & f, I = m & y; + if (x || I) + for (const J of a.declarations) { + const ee = R(J), Se = es(J); + ee & I ? We(Se, p.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, ao(Se)) : ee & x && We(Se, p.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ao(Se)); + } + function R(J) { + let ee = J; + switch (ee.kind) { + case 264: + case 265: + case 346: + case 338: + case 340: + return 2; + case 267: + return wu(ee) || Ch(ee) !== 0 ? 5 : 4; + case 263: + case 266: + case 306: + return 3; + case 307: + return 7; + case 277: + case 226: + const Se = ee, me = ko(Se) ? Se.expression : Se.right; + if (!fo(me)) + return 1; + ee = me; + case 271: + case 274: + case 273: + let Ve = 0; + const mt = Ec(xn(ee)); + return rr(mt.declarations, (ht) => { + Ve |= R(ht); + }), Ve; + case 260: + case 208: + case 262: + case 276: + case 80: + return 1; + case 173: + case 171: + return 2; + default: + return E.failBadSyntaxKind(ee); + } + } + } + function qP(r, a, l, ...f) { + const m = $8(r, a); + return m && fT(m, a, l, ...f); + } + function $8(r, a, l) { + if (Ea(r)) + return; + const f = r; + if (f.promisedTypeOfPromise) + return f.promisedTypeOfPromise; + if (V0(r, BL( + /*reportErrors*/ + !1 + ))) + return f.promisedTypeOfPromise = Po(r)[0]; + if (q8( + dg(r), + 402915324 + /* Never */ + )) + return; + const m = Xc(r, "then"); + if (Ea(m)) + return; + const y = m ? xs( + m, + 0 + /* Call */ + ) : He; + if (y.length === 0) { + a && We(a, p.A_promise_must_have_a_then_method); + return; + } + let x, I; + for (const ee of y) { + const Se = Vv(ee); + Se && Se !== en && !Pm(r, Se, og) ? x = Se : I = Tr(I, ee); + } + if (!I) { + E.assertIsDefined(x), l && (l.value = x), a && We(a, p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, Ur(r), Ur(x)); + return; + } + const R = qp( + Gn(or(I, Qde)), + 2097152 + /* NEUndefinedOrNull */ + ); + if (Ea(R)) + return; + const J = xs( + R, + 0 + /* Call */ + ); + if (J.length === 0) { + a && We(a, p.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); + return; + } + return f.promisedTypeOfPromise = Gn( + or(J, Qde), + 2 + /* Subtype */ + ); + } + function X8(r, a, l, f, ...m) { + return (a ? fT(r, l, f, ...m) : Z0(r, l, f, ...m)) || be; + } + function jIe(r) { + if (q8( + dg(r), + 402915324 + /* Never */ + )) + return !1; + const a = Xc(r, "then"); + return !!a && xs( + qp( + a, + 2097152 + /* NEUndefinedOrNull */ + ), + 0 + /* Call */ + ).length > 0; + } + function q$(r) { + var a; + if (r.flags & 16777216) { + const l = Zfe( + /*reportErrors*/ + !1 + ); + return !!l && r.aliasSymbol === l && ((a = r.aliasTypeArguments) == null ? void 0 : a.length) === 1; + } + return !1; + } + function HP(r) { + return r.flags & 1048576 ? Ho(r, HP) : q$(r) ? r.aliasTypeArguments[0] : r; + } + function BIe(r) { + if (Ea(r) || q$(r)) + return !1; + if (YS(r)) { + const a = Hl(r); + if (a ? a.flags & 3 || Vh(a) || Hp(a, jIe) : Sc( + r, + 8650752 + /* TypeVariable */ + )) + return !0; + } + return !1; + } + function cot(r) { + const a = Zfe( + /*reportErrors*/ + !0 + ); + if (a) + return K6(a, [HP(r)]); + } + function lot(r) { + return BIe(r) ? cot(r) ?? r : (E.assert(q$(r) || $8(r) === void 0, "type provided should not be a non-generic 'promise'-like."), r); + } + function fT(r, a, l, ...f) { + const m = Z0(r, a, l, ...f); + return m && lot(m); + } + function Z0(r, a, l, ...f) { + if (Ea(r) || q$(r)) + return r; + const m = r; + if (m.awaitedTypeOfType) + return m.awaitedTypeOfType; + if (r.flags & 1048576) { + if (zy.lastIndexOf(r.id) >= 0) { + a && We(a, p.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + return; + } + const I = a ? (J) => Z0(J, a, l, ...f) : Z0; + zy.push(r.id); + const R = Ho(r, I); + return zy.pop(), m.awaitedTypeOfType = R; + } + if (BIe(r)) + return m.awaitedTypeOfType = r; + const y = { value: void 0 }, x = $8( + r, + /*errorNode*/ + void 0, + y + ); + if (x) { + if (r.id === x.id || zy.lastIndexOf(x.id) >= 0) { + a && We(a, p.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); + return; + } + zy.push(r.id); + const I = Z0(x, a, l, ...f); + return zy.pop(), I ? m.awaitedTypeOfType = I : void 0; + } + if (jIe(r)) { + if (a) { + E.assertIsDefined(l); + let I; + y.value && (I = us(I, p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, Ur(r), Ur(y.value))), I = us(I, l, ...f), La.add(wg(xr(a), a, I)); + } + return; + } + return m.awaitedTypeOfType = r; + } + function uot(r, a, l) { + const f = xi(a); + if (V >= 2) { + if (Aa(f)) + return; + const y = BL( + /*reportErrors*/ + !0 + ); + if (y !== ea && !V0(f, y)) { + m(p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, a, l, Ur(Z0(f) || en)); + return; + } + } else { + if (oT( + r, + 5 + /* AsyncFunction */ + ), Aa(f)) + return; + const y = e3(a); + if (y === void 0) { + m(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, Ur(f)); + return; + } + const x = No( + y, + 111551, + /*ignoreErrors*/ + !0 + ), I = x ? Zr(x) : be; + if (Aa(I)) { + y.kind === 80 && y.escapedText === "Promise" && G6(f) === BL( + /*reportErrors*/ + !1 + ) ? We(l, p.An_async_function_or_method_in_ES5_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option) : m(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, Y_(y)); + return; + } + const R = DKe( + /*reportErrors*/ + !0 + ); + if (R === bi) { + m(p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value, a, l, Y_(y)); + return; + } + const J = p.Type_0_is_not_a_valid_async_function_return_type_in_ES5_because_it_does_not_refer_to_a_Promise_compatible_constructor_value; + if (!xu(I, R, l, J, () => a === l ? void 0 : us( + /*details*/ + void 0, + p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type + ))) + return; + const Se = y && tf(y), me = x_( + r.locals, + Se.escapedText, + 111551 + /* Value */ + ); + if (me) { + We(me.valueDeclaration, p.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, dn(Se), Y_(y)); + return; + } + } + X8( + f, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); + function m(y, x, I, R) { + if (x === I) + We(I, y, R); + else { + const J = We(I, p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); + Fs(J, Xr(x, y, R)); + } + } + } + function _ot(r) { + const a = xr(r); + if (!x1(a)) { + let l = r.expression; + if (Qu(l)) + return !1; + let f = !0, m; + for (; ; ) { + if (bh(l) || vx(l)) { + l = l.expression; + continue; + } + if (Es(l)) { + f || (m = l), l.questionDotToken && (m = l.questionDotToken), l = l.expression, f = !1; + continue; + } + if (Dn(l)) { + l.questionDotToken && (m = l.questionDotToken), l = l.expression, f = !1; + continue; + } + Re(l) || (m = l); + break; + } + if (m) + return Fs( + We(r.expression, p.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator), + Xr(m, p.Invalid_syntax_in_decorator) + ), !0; + } + return !1; + } + function fot(r) { + _ot(r); + const a = lE(r); + F$(a, r); + const l = Ha(a); + if (l.flags & 1) + return; + const f = Kde(r); + if (!f?.resolvedReturnType) return; + let m; + const y = f.resolvedReturnType; + switch (r.parent.kind) { + case 263: + case 231: + m = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + case 172: + if (!$) { + m = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + } + case 169: + m = p.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; + break; + case 174: + case 177: + case 178: + m = p.Decorator_function_return_type_0_is_not_assignable_to_type_1; + break; + default: + return E.failBadSyntaxKind(r.parent); + } + xu(l, y, r.expression, m); + } + function Q8(r, a, l, f, m, y = l.length, x = 0) { + const I = N.createFunctionTypeNode( + /*typeParameters*/ + void 0, + He, + N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ); + return Kg(I, r, a, l, f, m, y, x); + } + function fme(r, a, l, f, m, y, x) { + const I = Q8(r, a, l, f, m, y, x); + return $S(I); + } + function JIe(r) { + return fme( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + He, + r + ); + } + function zIe(r) { + const a = Sm("value", r); + return fme( + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + [a], + en + ); + } + function pme(r) { + if (r) + switch (r.kind) { + case 193: + case 192: + return WIe(r.types); + case 194: + return WIe([r.trueType, r.falseType]); + case 196: + case 202: + return pme(r.type); + case 183: + return r.typeName; + } + } + function WIe(r) { + let a; + for (let l of r) { + for (; l.kind === 196 || l.kind === 202; ) + l = l.type; + if (l.kind === 146 || !K && (l.kind === 201 && l.literal.kind === 106 || l.kind === 157)) + continue; + const f = pme(l); + if (!f) + return; + if (a) { + if (!Re(a) || !Re(f) || a.escapedText !== f.escapedText) + return; + } else + a = f; + } + return a; + } + function H$(r) { + const a = Vc(r); + return Um(r) ? Xj(a) : a; + } + function jM(r) { + if (!jb(r) || !wf(r) || !r.modifiers || !t3($, r, r.parent, r.parent.parent)) + return; + const a = Nn(r.modifiers, dl); + if (a) { + $ ? (yl( + a, + 8 + /* Decorate */ + ), r.kind === 169 && yl( + a, + 32 + /* Param */ + )) : V < 99 && (yl( + a, + 8 + /* ESDecorateAndRunInitializers */ + ), rl(r) ? r.name ? _7e(r) && yl( + a, + 4194304 + /* SetFunctionName */ + ) : yl( + a, + 4194304 + /* SetFunctionName */ + ) : tl(r) || (wi(r.name) && (hc(r) || _y(r) || u_(r)) && yl( + a, + 4194304 + /* SetFunctionName */ + ), oa(r.name) && yl( + a, + 8388608 + /* PropKey */ + ))), oT( + r, + 8 + /* Decorator */ + ); + for (const l of r.modifiers) + dl(l) && fot(l); + } + } + function pot(r) { + n(a); + function a() { + UIe(r), Bme(r), GP(r, r.name); + } + } + function dot(r) { + r.typeExpression || We(r.name, p.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags), r.name && XP(r.name, p.Type_alias_name_cannot_be_0), ra(r.typeExpression), UM(ly(r)); + } + function mot(r) { + ra(r.constraint); + for (const a of r.typeParameters) + ra(a); + } + function got(r) { + ra(r.typeExpression); + } + function hot(r) { + ra(r.typeExpression); + const a = H1(r); + if (a) { + const l = RI(a, tO); + if (Dr(l) > 1) + for (let f = 1; f < Dr(l); f++) { + const m = l[f].tagName; + We(m, p._0_tag_already_specified, dn(m)); + } + } + } + function yot(r) { + r.name && HM( + r.name, + /*ignoreErrors*/ + !0 + ); + } + function vot(r) { + ra(r.typeExpression); + } + function bot(r) { + ra(r.typeExpression); + } + function Sot(r) { + n(a), H8(r); + function a() { + !r.type && !_C(r) && Xv(r, Ne); + } + } + function Tot(r) { + const a = H1(r); + a && xo(a) && We(r.tagName, p.An_arrow_function_cannot_have_a_this_parameter); + } + function xot(r) { + Pme(r); + } + function kot(r) { + const a = H1(r); + (!a || !rl(a) && !tl(a)) && We(a, p.JSDoc_0_is_not_attached_to_a_class, dn(r.tagName)); + } + function Cot(r) { + const a = H1(r); + if (!a || !rl(a) && !tl(a)) { + We(a, p.JSDoc_0_is_not_attached_to_a_class, dn(r.tagName)); + return; + } + const l = j1(a).filter(Tx); + E.assert(l.length > 0), l.length > 1 && We(l[1], p.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); + const f = VIe(r.class.expression), m = vb(a); + if (m) { + const y = VIe(m.expression); + y && f.escapedText !== y.escapedText && We(f, p.JSDoc_0_1_does_not_match_the_extends_2_clause, dn(r.tagName), dn(f), dn(y)); + } + } + function Eot(r) { + const a = hb(r); + a && Pu(a) && We(r, p.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + } + function VIe(r) { + switch (r.kind) { + case 80: + return r; + case 211: + return r.name; + default: + return; + } + } + function UIe(r) { + var a; + jM(r), H8(r); + const l = jc(r); + if (r.name && r.name.kind === 167 && wm(r.name), X6(r)) { + const y = xn(r), x = r.localSymbol || y, I = (a = x.declarations) == null ? void 0 : a.find( + // Get first non javascript function declaration + (R) => R.kind === r.kind && !(R.flags & 524288) + ); + r === I && U$(x), y.parent && U$(y); + } + const f = r.kind === 173 ? void 0 : r.body; + if (ra(f), tme(r, Y6(r)), n(m), Qr(r)) { + const y = M1(r); + y && y.typeExpression && !vde(xi(y.typeExpression), r) && We(y.typeExpression.type, p.The_type_of_a_function_declaration_must_match_the_function_s_signature); + } + function m() { + K_(r) || (ic(f) && !RM(r) && Xv(r, Ne), l & 1 && wp(f) && Ha(Qf(r))); + } + } + function T1(r) { + n(a); + function a() { + const l = xr(r); + let f = Uf.get(l.path); + f || (f = [], Uf.set(l.path, f)), f.push(r); + } + } + function qIe(r, a) { + for (const l of r) + switch (l.kind) { + case 263: + case 231: + Dot(l, a), dme(l, a); + break; + case 307: + case 267: + case 241: + case 269: + case 248: + case 249: + case 250: + $Ie(l, a); + break; + case 176: + case 218: + case 262: + case 219: + case 174: + case 177: + case 178: + l.body && $Ie(l, a), dme(l, a); + break; + case 173: + case 179: + case 180: + case 184: + case 185: + case 265: + case 264: + dme(l, a); + break; + case 195: + Pot(l, a); + break; + default: + E.assertNever(l, "Node should not have been registered for unused identifiers check"); + } + } + function HIe(r, a, l) { + const f = es(r) || r, m = tx(r) ? p._0_is_declared_but_never_used : p._0_is_declared_but_its_value_is_never_read; + l(r, 0, Xr(f, m, a)); + } + function Y8(r) { + return Re(r) && dn(r).charCodeAt(0) === 95; + } + function Dot(r, a) { + for (const l of r.members) + switch (l.kind) { + case 174: + case 172: + case 177: + case 178: + if (l.kind === 178 && l.symbol.flags & 32768) + break; + const f = xn(l); + !f.isReferenced && (ef( + l, + 2 + /* Private */ + ) || Bl(l) && wi(l.name)) && !(l.flags & 33554432) && a(l, 0, Xr(l.name, p._0_is_declared_but_its_value_is_never_read, Si(f))); + break; + case 176: + for (const m of l.parameters) + !m.symbol.isReferenced && Vn( + m, + 2 + /* Private */ + ) && a(m, 0, Xr(m.name, p.Property_0_is_declared_but_its_value_is_never_read, uc(m.symbol))); + break; + case 181: + case 240: + case 175: + break; + default: + E.fail("Unexpected class member"); + } + } + function Pot(r, a) { + const { typeParameter: l } = r; + mme(l) && a(r, 1, Xr(r, p._0_is_declared_but_its_value_is_never_read, dn(l.name))); + } + function dme(r, a) { + const l = xn(r).declarations; + if (!l || ia(l) !== r) return; + const f = ly(r), m = /* @__PURE__ */ new Set(); + for (const y of f) { + if (!mme(y)) continue; + const x = dn(y.name), { parent: I } = y; + if (I.kind !== 195 && I.typeParameters.every(mme)) { + if (ih(m, I)) { + const R = xr(I), J = jp(I) ? oJ(I) : cJ(R, I.typeParameters), Se = I.typeParameters.length === 1 ? [p._0_is_declared_but_its_value_is_never_read, x] : [p.All_type_parameters_are_unused]; + a(y, 1, xl(R, J.pos, J.end - J.pos, ...Se)); + } + } else + a(y, 1, Xr(y, p._0_is_declared_but_its_value_is_never_read, x)); + } + } + function mme(r) { + return !(Ma(r.symbol).isReferenced & 262144) && !Y8(r.name); + } + function BM(r, a, l, f) { + const m = String(f(a)), y = r.get(m); + y ? y[1].push(l) : r.set(m, [a, [l]]); + } + function GIe(r) { + return Jn(nm(r), ji); + } + function wot(r) { + return da(r) ? If(r.parent) ? !!(r.propertyName && Y8(r.name)) : Y8(r.name) : wu(r) || (ti(r) && V2(r.parent.parent) || XIe(r)) && Y8(r.name); + } + function $Ie(r, a) { + const l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(); + r.locals.forEach((y) => { + if (!(y.flags & 262144 ? !(y.flags & 3 && !(y.isReferenced & 3)) : y.isReferenced || y.exportSymbol) && y.declarations) { + for (const x of y.declarations) + if (!wot(x)) + if (XIe(x)) + BM(l, Not(x), x, ja); + else if (da(x) && If(x.parent)) { + const I = ia(x.parent.elements); + (x === I || !ia(x.parent.elements).dotDotDotToken) && BM(f, x.parent, x, ja); + } else if (ti(x)) { + const I = P2(x) & 7, R = es(x); + (I !== 4 && I !== 6 || !R || !Y8(R)) && BM(m, x.parent, x, ja); + } else { + const I = y.valueDeclaration && GIe(y.valueDeclaration), R = y.valueDeclaration && es(y.valueDeclaration); + I && R ? !Q_(I, I.parent) && !Sb(I) && !Y8(R) && (da(x) && v0(x.parent) ? BM(f, x.parent, x, ja) : a(I, 1, Xr(R, p._0_is_declared_but_its_value_is_never_read, uc(y)))) : HIe(x, uc(y), a); + } + } + }), l.forEach(([y, x]) => { + const I = y.parent; + if ((y.name ? 1 : 0) + (y.namedBindings ? y.namedBindings.kind === 274 ? 1 : y.namedBindings.elements.length : 0) === x.length) + a( + I, + 0, + x.length === 1 ? Xr(I, p._0_is_declared_but_its_value_is_never_read, dn(fa(x).name)) : Xr(I, p.All_imports_in_import_declaration_are_unused) + ); + else + for (const J of x) HIe(J, dn(J.name), a); + }), f.forEach(([y, x]) => { + const I = GIe(y.parent) ? 1 : 0; + if (y.elements.length === x.length) + x.length === 1 && y.parent.kind === 260 && y.parent.parent.kind === 261 ? BM(m, y.parent.parent, y.parent, ja) : a( + y, + I, + x.length === 1 ? Xr(y, p._0_is_declared_but_its_value_is_never_read, JM(fa(x).name)) : Xr(y, p.All_destructured_elements_are_unused) + ); + else + for (const R of x) + a(R, I, Xr(R, p._0_is_declared_but_its_value_is_never_read, JM(R.name))); + }), m.forEach(([y, x]) => { + if (y.declarations.length === x.length) + a( + y, + 0, + x.length === 1 ? Xr(fa(x).name, p._0_is_declared_but_its_value_is_never_read, JM(fa(x).name)) : Xr(y.parent.kind === 243 ? y.parent : y, p.All_variables_are_unused) + ); + else + for (const I of x) + a(I, 0, Xr(I, p._0_is_declared_but_its_value_is_never_read, JM(I.name))); + }); + } + function Aot() { + var r; + for (const a of CS) + if (!((r = xn(a)) != null && r.isReferenced)) { + const l = Hk(a); + E.assert(X1(l), "Only parameter declaration should be checked here"); + const f = Xr(a.name, p._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, ao(a.name), ao(a.propertyName)); + l.type || Fs( + f, + xl(xr(l), l.end, 1, p.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, ao(a.propertyName)) + ), La.add(f); + } + } + function JM(r) { + switch (r.kind) { + case 80: + return dn(r); + case 207: + case 206: + return JM(Is(fa(r.elements), da).name); + default: + return E.assertNever(r); + } + } + function XIe(r) { + return r.kind === 273 || r.kind === 276 || r.kind === 274; + } + function Not(r) { + return r.kind === 273 ? r : r.kind === 274 ? r.parent : r.parent.parent; + } + function G$(r) { + if (r.kind === 241 && Xh(r), vj(r)) { + const a = S_; + rr(r.statements, ra), S_ = a; + } else + rr(r.statements, ra); + r.locals && T1(r); + } + function Iot(r) { + V >= 2 || !Dj(r) || r.flags & 33554432 || ic(r.body) || rr(r.parameters, (a) => { + a.name && !Ts(a.name) && a.name.escapedText === Ie.escapedName && Fd("noEmit", a, p.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters); + }); + } + function Z8(r, a, l) { + if (a?.escapedText !== l || r.kind === 172 || r.kind === 171 || r.kind === 174 || r.kind === 173 || r.kind === 177 || r.kind === 178 || r.kind === 303 || r.flags & 33554432 || (kd(r) || nl(r) || Yu(r)) && B1(r)) + return !1; + const f = nm(r); + return !(ji(f) && ic(f.parent.body)); + } + function Oot(r) { + sr(r, (a) => pE(a) & 4 ? (r.kind !== 80 ? We(es(r), p.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference) : We(r, p.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference), !0) : !1); + } + function Fot(r) { + sr(r, (a) => pE(a) & 8 ? (r.kind !== 80 ? We(es(r), p.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference) : We(r, p.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference), !0) : !1); + } + function Lot(r, a) { + if (L >= 5 && !(L >= 100 && xr(r).impliedNodeFormat === 1) || !a || !Z8(r, a, "require") && !Z8(r, a, "exports") || Nc(r) && Ch(r) !== 1) + return; + const l = _2(r); + l.kind === 307 && A_(l) && Fd("noEmit", a, p.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ao(a), ao(a)); + } + function Mot(r, a) { + if (!a || V >= 4 || !Z8(r, a, "Promise") || Nc(r) && Ch(r) !== 1) + return; + const l = _2(r); + l.kind === 307 && A_(l) && l.flags & 4096 && Fd("noEmit", a, p.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ao(a), ao(a)); + } + function Rot(r, a) { + V <= 8 && (Z8(r, a, "WeakMap") || Z8(r, a, "WeakSet")) && Jy.push(r); + } + function jot(r) { + const a = bd(r); + pE(a) & 1048576 && (E.assert(Bl(r) && Re(r.name) && typeof r.name.escapedText == "string", "The target of a WeakMap/WeakSet collision check should be an identifier"), Fd("noEmit", r, p.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, r.name.escapedText)); + } + function Bot(r, a) { + a && V >= 2 && V <= 8 && Z8(r, a, "Reflect") && Tv.push(r); + } + function Jot(r) { + let a = !1; + if (tl(r)) { + for (const l of r.members) + if (pE(l) & 2097152) { + a = !0; + break; + } + } else if (po(r)) + pE(r) & 2097152 && (a = !0); + else { + const l = bd(r); + l && pE(l) & 2097152 && (a = !0); + } + a && (E.assert(Bl(r) && Re(r.name), "The target of a Reflect collision check should be an identifier"), Fd("noEmit", r, p.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, ao(r.name), "Reflect")); + } + function GP(r, a) { + a && (Lot(r, a), Mot(r, a), Rot(r, a), Bot(r, a), Qn(r) ? (XP(a, p.Class_name_cannot_be_0), r.flags & 33554432 || dct(a)) : rv(r) && XP(a, p.Enum_name_cannot_be_0)); + } + function zot(r) { + if (P2(r) & 7 || X1(r)) + return; + const a = xn(r); + if (a.flags & 1) { + if (!Re(r.name)) return E.fail(); + const l = Kt( + r, + r.name.escapedText, + 3, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + ); + if (l && l !== a && l.flags & 2 && Cde(l) & 7) { + const f = $1( + l.valueDeclaration, + 261 + /* VariableDeclarationList */ + ), m = f.parent.kind === 243 && f.parent.parent ? f.parent.parent : void 0; + if (!(m && (m.kind === 241 && ps(m.parent) || m.kind === 268 || m.kind === 267 || m.kind === 307))) { + const x = Si(l); + We(r, p.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, x, x); + } + } + } + } + function K8(r) { + return r === et ? Ne : r === to ? Do : r; + } + function zM(r) { + var a; + if (jM(r), da(r) || ra(r.type), !r.name) + return; + if (r.name.kind === 167 && (wm(r.name), U2(r) && r.initializer && Dc(r.initializer)), da(r)) { + if (r.propertyName && Re(r.name) && X1(r) && ic(yf(r).body)) { + CS.push(r); + return; + } + If(r.parent) && r.dotDotDotToken && V < 5 && yl( + r, + 4 + /* Rest */ + ), r.propertyName && r.propertyName.kind === 167 && wm(r.propertyName); + const m = r.parent.parent, y = r.dotDotDotToken ? 32 : 0, x = xP(m, y), I = r.propertyName || r.name; + if (x && !Ts(I)) { + const R = X0(I); + if (Fp(R)) { + const J = Lp(R), ee = js(x, J); + ee && (xM( + ee, + /*nodeForCheckWriteOnly*/ + void 0, + /*isSelfTypeAccess*/ + !1 + ), Dde( + r, + !!m.initializer && m.initializer.kind === 108, + /*writing*/ + !1, + x, + ee + )); + } + } + } + if (Ts(r.name) && (r.name.kind === 207 && V < 2 && F.downlevelIteration && yl( + r, + 512 + /* Read */ + ), rr(r.name.elements, ra)), r.initializer && X1(r) && ic(yf(r).body)) { + We(r, p.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); + return; + } + if (Ts(r.name)) { + if (Kpe(r)) + return; + const m = U2(r) && r.initializer && r.parent.parent.kind !== 249, y = !ut(r.name.elements, mI(ml)); + if (m || y) { + const x = $r(r); + if (m) { + const I = Dc(r.initializer); + K && y ? v8e(I, r) : y1(I, $r(r), r, r.initializer); + } + y && (v0(r.name) ? K0(65, x, Ut, r) : K && v8e(x, r)); + } + return; + } + const l = xn(r); + if (l.flags & 2097152 && (mb(r) || qZ(r))) { + K$(r); + return; + } + const f = K8(Zr(l)); + if (r === l.valueDeclaration) { + const m = U2(r) && o3(r); + if (m && !(Qr(r) && Gs(m) && (m.properties.length === 0 || hy(r.name)) && !!((a = l.exports) != null && a.size)) && r.parent.parent.kind !== 249) { + const x = Dc(m); + y1( + x, + f, + r, + m, + /*headMessage*/ + void 0 + ); + const I = P2(r) & 7; + if (I === 6) { + const R = MKe( + /*reportErrors*/ + !0 + ), J = F3e( + /*reportErrors*/ + !0 + ); + if (R !== bi && J !== bi) { + const ee = Gn([R, J, he, Ut]); + xu(x, ee, m, p.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); + } + } else if (I === 4) { + const R = F3e( + /*reportErrors*/ + !0 + ); + if (R !== bi) { + const J = Gn([R, he, Ut]); + xu(x, J, m, p.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); + } + } + } + l.declarations && l.declarations.length > 1 && ut(l.declarations, (y) => y !== r && FT(y) && !YIe(y, r)) && We(r.name, p.All_declarations_of_0_must_have_identical_modifiers, ao(r.name)); + } else { + const m = K8($r(r)); + !Aa(f) && !Aa(m) && !Wh(f, m) && !(l.flags & 67108864) && QIe(l.valueDeclaration, f, r, m), U2(r) && r.initializer && y1( + Dc(r.initializer), + m, + r, + r.initializer, + /*headMessage*/ + void 0 + ), l.valueDeclaration && !YIe(r, l.valueDeclaration) && We(r.name, p.All_declarations_of_0_must_have_identical_modifiers, ao(r.name)); + } + r.kind !== 172 && r.kind !== 171 && (G8(r), (r.kind === 260 || r.kind === 208) && zot(r), GP(r, r.name)); + } + function QIe(r, a, l, f) { + const m = es(l), y = l.kind === 172 || l.kind === 171 ? p.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : p.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, x = ao(m), I = We( + m, + y, + x, + Ur(a), + Ur(f) + ); + r && Fs(I, Xr(r, p._0_was_also_declared_here, x)); + } + function YIe(r, a) { + if (r.kind === 169 && a.kind === 260 || r.kind === 260 && a.kind === 169) + return !0; + if (BT(r) !== BT(a)) + return !1; + const l = 1358; + return UT(r, l) === UT(a, l); + } + function Wot(r) { + var a, l; + (a = rn) == null || a.push(rn.Phase.Check, "checkVariableDeclaration", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }), Tut(r), zM(r), (l = rn) == null || l.pop(); + } + function Vot(r) { + return vut(r), zM(r); + } + function $$(r) { + const a = ch(r) & 7; + (a === 4 || a === 6) && V < 99 && yl( + r, + 16777216 + /* AddDisposableResourceAndDisposeResources */ + ), rr(r.declarations, ra); + } + function Uot(r) { + !nh(r) && !Wme(r.declarationList) && xut(r), $$(r.declarationList); + } + function qot(r) { + Xh(r), qi(r.expression); + } + function Hot(r) { + Xh(r); + const a = $P(r.expression); + gme(r.expression, a, r.thenStatement), ra(r.thenStatement), r.thenStatement.kind === 242 && We(r.thenStatement, p.The_body_of_an_if_statement_cannot_be_the_empty_statement), ra(r.elseStatement); + } + function gme(r, a, l) { + if (!K) return; + f(r, l); + function f(y, x) { + for (y = Ja(y), m(y, x); cn(y) && (y.operatorToken.kind === 57 || y.operatorToken.kind === 61); ) + y = Ja(y.left), m(y, x); + } + function m(y, x) { + const I = N3(y) ? Ja(y.right) : y; + if (Ag(I)) + return; + if (N3(I)) { + f(I, x); + return; + } + const R = I === y ? a : $P(I); + if (R.flags & 1024 && Dn(I) && (bn(I.expression).resolvedSymbol ?? nt).flags & 384) { + We(I, p.This_condition_will_always_return_0, R.value ? "true" : "false"); + return; + } + const J = Dn(I) && TIe(I.expression); + if (!Ud( + R, + 4194304 + /* Truthy */ + ) || J) return; + const ee = xs( + R, + 0 + /* Call */ + ), Se = !!qP(R); + if (ee.length === 0 && !Se) + return; + const me = Re(I) ? I : Dn(I) ? I.name : void 0, Ve = me && kp(me); + if (!Ve && !Se) + return; + Ve && cn(y.parent) && $ot(y.parent, Ve) || Ve && x && Got(y, x, me, Ve) || (Se ? id( + I, + /*maybeMissingAwait*/ + !0, + p.This_condition_will_always_return_true_since_this_0_is_always_defined, + dk(R) + ) : We(I, p.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead)); + } + } + function Got(r, a, l, f) { + return !!gs(a, function m(y) { + if (Re(y)) { + const x = kp(y); + if (x && x === f) { + if (Re(r) || Re(l) && cn(l.parent)) + return !0; + let I = l.parent, R = y.parent; + for (; I && R; ) { + if (Re(I) && Re(R) || I.kind === 110 && R.kind === 110) + return kp(I) === kp(R); + if (Dn(I) && Dn(R)) { + if (kp(I.name) !== kp(R.name)) + return !1; + R = R.expression, I = I.expression; + } else if (Es(I) && Es(R)) + R = R.expression, I = I.expression; + else + return !1; + } + } + } + return gs(y, m); + }); + } + function $ot(r, a) { + for (; cn(r) && r.operatorToken.kind === 56; ) { + if (gs(r.right, function f(m) { + if (Re(m)) { + const y = kp(m); + if (y && y === a) + return !0; + } + return gs(m, f); + })) + return !0; + r = r.parent; + } + return !1; + } + function Xot(r) { + Xh(r), ra(r.statement), $P(r.expression); + } + function Qot(r) { + Xh(r), $P(r.expression), ra(r.statement); + } + function hme(r, a) { + return r.flags & 16384 && We(a, p.An_expression_of_type_void_cannot_be_tested_for_truthiness), r; + } + function $P(r, a) { + return hme(qi(r, a), r); + } + function Yot(r) { + Xh(r) || r.initializer && r.initializer.kind === 261 && Wme(r.initializer), r.initializer && (r.initializer.kind === 261 ? $$(r.initializer) : qi(r.initializer)), r.condition && $P(r.condition), r.incrementor && qi(r.incrementor), ra(r.statement), r.locals && T1(r); + } + function Zot(r) { + $7e(r); + const a = g7(r); + if (r.awaitModifier ? a && ac(a) ? pr(r.awaitModifier, p.for_await_loops_cannot_be_used_inside_a_class_static_block) : (jc(a) & 6) === 2 && V < 5 && yl( + r, + 16384 + /* ForAwaitOfIncludes */ + ) : F.downlevelIteration && V < 2 && yl( + r, + 256 + /* ForOfIncludes */ + ), r.initializer.kind === 261) + $$(r.initializer); + else { + const l = r.initializer, f = WM(r); + if (l.kind === 209 || l.kind === 210) + _T(l, f || be); + else { + const m = qi(l); + U8( + l, + p.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access, + p.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access + ), f && y1(f, m, l, r.expression); + } + } + ra(r.statement), r.locals && T1(r); + } + function Kot(r) { + $7e(r); + const a = Pde(qi(r.expression)); + if (r.initializer.kind === 261) { + const l = r.initializer.declarations[0]; + l && Ts(l.name) && We(l.name, p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern), $$(r.initializer); + } else { + const l = r.initializer, f = qi(l); + l.kind === 209 || l.kind === 210 ? We(l, p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern) : Bs(Cet(a), f) ? U8( + l, + p.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access, + p.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access + ) : We(l, p.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); + } + (a === fr || !Gl( + a, + 126091264 + /* InstantiableNonPrimitive */ + )) && We(r.expression, p.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0, Ur(a)), ra(r.statement), r.locals && T1(r); + } + function WM(r) { + const a = r.awaitModifier ? 15 : 13; + return K0(a, oE(r.expression), Ut, r.expression); + } + function K0(r, a, l, f) { + return Ea(a) ? a : yme( + r, + a, + l, + f, + /*checkAssignability*/ + !0 + ) || Ne; + } + function yme(r, a, l, f, m) { + const y = (r & 2) !== 0; + if (a === fr) { + f && xme(f, a, y); + return; + } + const x = V >= 2, I = !x && F.downlevelIteration, R = F.noUncheckedIndexedAccess && !!(r & 128); + if (x || I || y) { + const Ve = Q$(a, r, x ? f : void 0); + if (m && Ve) { + const mt = r & 8 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 : r & 32 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 : r & 64 ? p.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 : r & 16 ? p.Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0 : void 0; + mt && xu(l, Ve.nextType, f, mt); + } + if (Ve || x) + return R ? L8(Ve && Ve.yieldType) : Ve && Ve.yieldType; + } + let J = a, ee = !1; + if (r & 4) { + if (J.flags & 1048576) { + const Ve = a.types, mt = Ln(Ve, (ht) => !(ht.flags & 402653316)); + mt !== Ve && (J = Gn( + mt, + 2 + /* Subtype */ + )); + } else J.flags & 402653316 && (J = fr); + if (ee = J !== a, ee && J.flags & 131072) + return R ? L8(we) : we; + } + if (!Y0(J)) { + if (f) { + const Ve = !!(r & 4) && !ee, [mt, ht] = me(Ve, I); + id( + f, + ht && !!qP(J), + mt, + Ur(J) + ); + } + return ee ? R ? L8(we) : we : void 0; + } + const Se = Wv(J, _e); + if (ee && Se) + return Se.flags & 402653316 && !F.noUncheckedIndexedAccess ? we : Gn( + R ? [Se, we, Ut] : [Se, we], + 2 + /* Subtype */ + ); + return r & 128 ? L8(Se) : Se; + function me(Ve, mt) { + var ht; + return mt ? Ve ? [p.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, !0] : [p.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, !0] : vme( + r, + 0, + a, + /*errorNode*/ + void 0 + ) ? [p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, !1] : ect((ht = a.symbol) == null ? void 0 : ht.escapedName) ? [p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, !0] : Ve ? [p.Type_0_is_not_an_array_type_or_a_string_type, !0] : [p.Type_0_is_not_an_array_type, !0]; + } + } + function ect(r) { + switch (r) { + case "Float32Array": + case "Float64Array": + case "Int16Array": + case "Int32Array": + case "Int8Array": + case "NodeList": + case "Uint16Array": + case "Uint32Array": + case "Uint8Array": + case "Uint8ClampedArray": + return !0; + } + return !1; + } + function vme(r, a, l, f) { + if (Ea(l)) + return; + const m = Q$(l, r, f); + return m && m[X1e(a)]; + } + function ey(r = fr, a = fr, l = yt) { + if (r.flags & 67359327 && a.flags & 180227 && l.flags & 180227) { + const f = Up([r, a, l]); + let m = qn.get(f); + return m || (m = { yieldType: r, returnType: a, nextType: l }, qn.set(f, m)), m; + } + return { yieldType: r, returnType: a, nextType: l }; + } + function ZIe(r) { + let a, l, f; + for (const m of r) + if (!(m === void 0 || m === Ht)) { + if (m === yn) + return yn; + a = Tr(a, m.yieldType), l = Tr(l, m.returnType), f = Tr(f, m.nextType); + } + return a || l || f ? ey( + a && Gn(a), + l && Gn(l), + f && Ys(f) + ) : Ht; + } + function X$(r, a) { + return r[a]; + } + function rh(r, a, l) { + return r[a] = l; + } + function Q$(r, a, l) { + var f, m; + if (Ea(r)) + return yn; + if (!(r.flags & 1048576)) { + const J = l ? { errors: void 0 } : void 0, ee = KIe(r, a, l, J); + if (ee === Ht) { + if (l) { + const Se = xme(l, r, !!(a & 2)); + J?.errors && Fs(Se, ...J.errors); + } + return; + } else if ((f = J?.errors) != null && f.length) + for (const Se of J.errors) + La.add(Se); + return ee; + } + const y = a & 2 ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable", x = X$(r, y); + if (x) return x === Ht ? void 0 : x; + let I; + for (const J of r.types) { + const ee = l ? { errors: void 0 } : void 0, Se = KIe(J, a, l, ee); + if (Se === Ht) { + if (l) { + const me = xme(l, r, !!(a & 2)); + ee?.errors && Fs(me, ...ee.errors); + } + rh(r, y, Ht); + return; + } else if ((m = ee?.errors) != null && m.length) + for (const me of ee.errors) + La.add(me); + I = Tr(I, Se); + } + const R = I ? ZIe(I) : Ht; + return rh(r, y, R), R === Ht ? void 0 : R; + } + function bme(r, a) { + if (r === Ht) return Ht; + if (r === yn) return yn; + const { yieldType: l, returnType: f, nextType: m } = r; + return a && Zfe( + /*reportErrors*/ + !0 + ), ey( + fT(l, a) || Ne, + fT(f, a) || Ne, + m + ); + } + function KIe(r, a, l, f) { + if (Ea(r)) + return yn; + let m = !1; + if (a & 2) { + const y = Sme(r, eo) || t7e(r, eo); + if (y) + if (y === Ht && l) + m = !0; + else + return a & 8 ? bme(y, l) : y; + } + if (a & 1) { + let y = Sme(r, qo) || t7e(r, qo); + if (y) + if (y === Ht && l) + m = !0; + else if (a & 2) { + if (y !== Ht) + return y = bme(y, l), m ? y : rh(r, "iterationTypesOfAsyncIterable", y); + } else + return y; + } + if (a & 2) { + const y = Tme(r, eo, l, f, m); + if (y !== Ht) + return y; + } + if (a & 1) { + let y = Tme(r, qo, l, f, m); + if (y !== Ht) + return a & 2 ? (y = bme(y, l), m ? y : rh(r, "iterationTypesOfAsyncIterable", y)) : y; + } + return Ht; + } + function Sme(r, a) { + return X$(r, a.iterableCacheKey); + } + function e7e(r, a) { + const l = Sme(r, a) || Tme( + r, + a, + /*errorNode*/ + void 0, + /*errorOutputContainer*/ + void 0, + /*noCache*/ + !1 + ); + return l === Ht ? _i : l; + } + function t7e(r, a) { + let l; + if (V0(r, l = a.getGlobalIterableType( + /*reportErrors*/ + !1 + )) || V0(r, l = a.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + ))) { + const [f] = Po(r), { returnType: m, nextType: y } = e7e(l, a); + return rh(r, a.iterableCacheKey, ey(a.resolveIterationType( + f, + /*errorNode*/ + void 0 + ) || f, a.resolveIterationType( + m, + /*errorNode*/ + void 0 + ) || m, y)); + } + if (V0(r, a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ))) { + const [f, m, y] = Po(r); + return rh(r, a.iterableCacheKey, ey(a.resolveIterationType( + f, + /*errorNode*/ + void 0 + ) || f, a.resolveIterationType( + m, + /*errorNode*/ + void 0 + ) || m, y)); + } + } + function r7e(r) { + const a = N3e( + /*reportErrors*/ + !1 + ), l = a && Xc(Zr(a), Ko(r)); + return l && Fp(l) ? Lp(l) : `__@${r}`; + } + function Tme(r, a, l, f, m) { + const y = js(r, r7e(a.iteratorSymbolName)), x = y && !(y.flags & 16777216) ? Zr(y) : void 0; + if (Ea(x)) + return m ? yn : rh(r, a.iterableCacheKey, yn); + const I = x ? xs( + x, + 0 + /* Call */ + ) : void 0; + if (!ut(I)) + return m ? Ht : rh(r, a.iterableCacheKey, Ht); + const R = Ys(or(I, Ha)), J = n7e(R, a, l, f, m) ?? Ht; + return m ? J : rh(r, a.iterableCacheKey, J); + } + function xme(r, a, l) { + const f = l ? p.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator : p.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator, m = ( + // for (const x of Promise<...>) or [...Promise<...>] + !!qP(a) || !l && sA(r.parent) && r.parent.expression === r && PG( + /*reportErrors*/ + !1 + ) !== ea && Bs(a, PG( + /*reportErrors*/ + !1 + )) + ); + return id(r, m, f, Ur(a)); + } + function tct(r, a, l, f) { + return n7e( + r, + a, + l, + f, + /*noCache*/ + !1 + ); + } + function n7e(r, a, l, f, m) { + if (Ea(r)) + return yn; + let y = i7e(r, a) || rct(r, a); + return y === Ht && l && (y = void 0, m = !0), y ?? (y = a7e(r, a, l, f, m)), y === Ht ? void 0 : y; + } + function i7e(r, a) { + return X$(r, a.iteratorCacheKey); + } + function rct(r, a) { + const l = a.getGlobalIterableIteratorType( + /*reportErrors*/ + !1 + ); + if (V0(r, l)) { + const [f] = Po(r), m = i7e(l, a) || a7e( + l, + a, + /*errorNode*/ + void 0, + /*errorOutputContainer*/ + void 0, + /*noCache*/ + !1 + ), { returnType: y, nextType: x } = m === Ht ? _i : m; + return rh(r, a.iteratorCacheKey, ey(f, y, x)); + } + if (V0(r, a.getGlobalIteratorType( + /*reportErrors*/ + !1 + )) || V0(r, a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ))) { + const [f, m, y] = Po(r); + return rh(r, a.iteratorCacheKey, ey(f, m, y)); + } + } + function s7e(r, a) { + const l = Xc(r, "done") || dt; + return Bs(a === 0 ? dt : wt, l); + } + function nct(r) { + return s7e( + r, + 0 + /* Yield */ + ); + } + function ict(r) { + return s7e( + r, + 1 + /* Return */ + ); + } + function sct(r) { + if (Ea(r)) + return yn; + const a = X$(r, "iterationTypesOfIteratorResult"); + if (a) + return a; + if (V0(r, FKe( + /*reportErrors*/ + !1 + ))) { + const x = Po(r)[0]; + return rh(r, "iterationTypesOfIteratorResult", ey( + x, + /*returnType*/ + void 0, + /*nextType*/ + void 0 + )); + } + if (V0(r, LKe( + /*reportErrors*/ + !1 + ))) { + const x = Po(r)[0]; + return rh(r, "iterationTypesOfIteratorResult", ey( + /*yieldType*/ + void 0, + x, + /*nextType*/ + void 0 + )); + } + const l = Jc(r, nct), f = l !== fr ? Xc(l, "value") : void 0, m = Jc(r, ict), y = m !== fr ? Xc(m, "value") : void 0; + return !f && !y ? rh(r, "iterationTypesOfIteratorResult", Ht) : rh(r, "iterationTypesOfIteratorResult", ey( + f, + y || en, + /*nextType*/ + void 0 + )); + } + function kme(r, a, l, f, m) { + var y, x, I, R; + const J = js(r, l); + if (!J && l !== "next") + return; + const ee = J && !(l === "next" && J.flags & 16777216) ? l === "next" ? Zr(J) : qp( + Zr(J), + 2097152 + /* NEUndefinedOrNull */ + ) : void 0; + if (Ea(ee)) + return l === "next" ? yn : li; + const Se = ee ? xs( + ee, + 0 + /* Call */ + ) : He; + if (Se.length === 0) { + if (f) { + const cr = l === "next" ? a.mustHaveANextMethodDiagnostic : a.mustBeAMethodDiagnostic; + m ? (m.errors ?? (m.errors = []), m.errors.push(Xr(f, cr, l))) : We(f, cr, l); + } + return l === "next" ? Ht : void 0; + } + if (ee?.symbol && Se.length === 1) { + const cr = a.getGlobalGeneratorType( + /*reportErrors*/ + !1 + ), Cr = a.getGlobalIteratorType( + /*reportErrors*/ + !1 + ), Fr = ((x = (y = cr.symbol) == null ? void 0 : y.members) == null ? void 0 : x.get(l)) === ee.symbol, En = !Fr && ((R = (I = Cr.symbol) == null ? void 0 : I.members) == null ? void 0 : R.get(l)) === ee.symbol; + if (Fr || En) { + const Rn = Fr ? cr : Cr, { mapper: jn } = ee; + return ey( + Q0(Rn.typeParameters[0], jn), + Q0(Rn.typeParameters[1], jn), + l === "next" ? Q0(Rn.typeParameters[2], jn) : void 0 + ); + } + } + let me, Ve; + for (const cr of Se) + l !== "throw" && ut(cr.parameters) && (me = Tr(me, qd(cr, 0))), Ve = Tr(Ve, Ha(cr)); + let mt, ht; + if (l !== "throw") { + const cr = me ? Gn(me) : yt; + if (l === "next") + ht = cr; + else if (l === "return") { + const Cr = a.resolveIterationType(cr, f) || Ne; + mt = Tr(mt, Cr); + } + } + let er; + const tr = Ve ? Ys(Ve) : fr, Rr = a.resolveIterationType(tr, f) || Ne, vn = sct(Rr); + return vn === Ht ? (f && (m ? (m.errors ?? (m.errors = []), m.errors.push(Xr(f, a.mustHaveAValueDiagnostic, l))) : We(f, a.mustHaveAValueDiagnostic, l)), er = Ne, mt = Tr(mt, Ne)) : (er = vn.yieldType, mt = Tr(mt, vn.returnType)), ey(er, Gn(mt), ht); + } + function a7e(r, a, l, f, m) { + const y = ZIe([ + kme(r, a, "next", l, f), + kme(r, a, "return", l, f), + kme(r, a, "throw", l, f) + ]); + return m ? y : rh(r, a.iteratorCacheKey, y); + } + function E2(r, a, l) { + if (Ea(a)) + return; + const f = Cme(a, l); + return f && f[X1e(r)]; + } + function Cme(r, a) { + if (Ea(r)) + return yn; + const l = a ? 2 : 1, f = a ? eo : qo; + return Q$( + r, + l, + /*errorNode*/ + void 0 + ) || tct( + r, + f, + /*errorNode*/ + void 0, + /*errorOutputContainer*/ + void 0 + ); + } + function act(r) { + Xh(r) || yut(r); + } + function VM(r, a) { + const l = !!(a & 1), f = !!(a & 2); + if (l) { + const m = E2(1, r, f); + return m ? f ? Z0(HP(m)) : m : be; + } + return f ? Z0(r) || be : r; + } + function o7e(r, a) { + const l = VM(a, jc(r)); + return !!(l && (Sc( + l, + 16384 + /* Void */ + ) || l.flags & 32769)); + } + function oct(r) { + if (Xh(r)) + return; + const a = g7(r); + if (a && ac(a)) { + Ml(r, p.A_return_statement_cannot_be_used_inside_a_class_static_block); + return; + } + if (!a) { + Ml(r, p.A_return_statement_can_only_be_used_within_a_function_body); + return; + } + const l = Qf(a), f = Ha(l), m = jc(a); + if (K || r.expression || f.flags & 131072) { + const y = r.expression ? Dc(r.expression) : Ut; + if (a.kind === 178) + r.expression && We(r, p.Setters_cannot_return_a_value); + else if (a.kind === 176) + r.expression && !y1(y, f, r, r.expression) && We(r, p.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); + else if (Y6(a)) { + const x = VM(f, m) ?? f, I = m & 2 ? X8( + y, + /*withAlias*/ + !1, + r, + p.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ) : y; + x && y1(I, x, r, r.expression); + } + } else a.kind !== 176 && F.noImplicitReturns && !o7e(a, f) && We(r, p.Not_all_code_paths_return_a_value); + } + function cct(r) { + Xh(r) || r.flags & 65536 && Ml(r, p.with_statements_are_not_allowed_in_an_async_function_block), qi(r.expression); + const a = xr(r); + if (!x1(a)) { + const l = Hm(a, r.pos).start, f = r.statement.pos; + D2(a, l, f - l, p.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any); + } + } + function lct(r) { + Xh(r); + let a, l = !1; + const f = qi(r.expression); + rr(r.caseBlock.clauses, (m) => { + m.kind === 297 && !l && (a === void 0 ? a = m : (pr(m, p.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement), l = !0)), m.kind === 296 && n(y(m)), rr(m.statements, ra), F.noFallthroughCasesInSwitch && m.fallthroughFlowNode && uM(m.fallthroughFlowNode) && We(m, p.Fallthrough_case_in_switch); + function y(x) { + return () => { + const I = qi(x.expression); + sme(f, I) || PAe( + I, + f, + x.expression, + /*headMessage*/ + void 0 + ); + }; + } + }), r.caseBlock.locals && T1(r.caseBlock); + } + function uct(r) { + Xh(r) || sr(r.parent, (a) => ps(a) ? "quit" : a.kind === 256 && a.label.escapedText === r.label.escapedText ? (pr(r.label, p.Duplicate_label_0, sc(r.label)), !0) : !1), ra(r.statement); + } + function _ct(r) { + Xh(r) || Re(r.expression) && !r.expression.escapedText && Out(r, p.Line_break_not_permitted_here), r.expression && qi(r.expression); + } + function fct(r) { + Xh(r), G$(r.tryBlock); + const a = r.catchClause; + if (a) { + if (a.variableDeclaration) { + const l = a.variableDeclaration; + zM(l); + const f = Vc(l); + if (f) { + const m = xi(f); + m && !(m.flags & 3) && Ml(f, p.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified); + } else if (l.initializer) + Ml(l.initializer, p.Catch_clause_variable_cannot_have_an_initializer); + else { + const m = a.block.locals; + m && uh(a.locals, (y) => { + const x = m.get(y); + x?.valueDeclaration && x.flags & 2 && pr(x.valueDeclaration, p.Cannot_redeclare_identifier_0_in_catch_clause, Pi(y)); + }); + } + } + G$(a.block); + } + r.finallyBlock && G$(r.finallyBlock); + } + function Y$(r, a, l) { + const f = Bu(r); + if (f.length === 0) + return; + for (const y of f1(r)) + l && y.flags & 4194304 || c7e(r, y, kk( + y, + 8576, + /*includeNonPublic*/ + !0 + ), u1(y)); + const m = a.valueDeclaration; + if (m && Qn(m)) { + for (const y of m.members) + if (!Os(y) && !X6(y)) { + const x = xn(y); + c7e(r, x, $l(y.name.expression), u1(x)); + } + } + if (f.length > 1) + for (const y of f) + pct(r, y); + } + function c7e(r, a, l, f) { + const m = a.valueDeclaration, y = es(m); + if (y && wi(y)) + return; + const x = Ffe(r, l), I = wn(r) & 2 ? Jo( + r.symbol, + 264 + /* InterfaceDeclaration */ + ) : void 0, R = m && m.kind === 226 || y && y.kind === 167 ? m : void 0, J = s_(a) === r.symbol ? m : void 0; + for (const ee of x) { + const Se = ee.declaration && s_(xn(ee.declaration)) === r.symbol ? ee.declaration : void 0, me = J || Se || (I && !ut(un(r), (Ve) => !!d2(Ve, a.escapedName) && !!Wv(Ve, ee.keyType)) ? I : void 0); + if (me && !Bs(f, ee.type)) { + const Ve = r2(me, p.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, Si(a), Ur(f), Ur(ee.keyType), Ur(ee.type)); + R && me !== R && Fs(Ve, Xr(R, p._0_is_declared_here, Si(a))), La.add(Ve); + } + } + } + function pct(r, a) { + const l = a.declaration, f = Ffe(r, a.keyType), m = wn(r) & 2 ? Jo( + r.symbol, + 264 + /* InterfaceDeclaration */ + ) : void 0, y = l && s_(xn(l)) === r.symbol ? l : void 0; + for (const x of f) { + if (x === a) continue; + const I = x.declaration && s_(xn(x.declaration)) === r.symbol ? x.declaration : void 0, R = y || I || (m && !ut(un(r), (J) => !!eh(J, a.keyType) && !!Wv(J, x.keyType)) ? m : void 0); + R && !Bs(a.type, x.type) && We(R, p._0_index_type_1_is_not_assignable_to_2_index_type_3, Ur(a.keyType), Ur(a.type), Ur(x.keyType), Ur(x.type)); + } + } + function XP(r, a) { + switch (r.escapedText) { + case "any": + case "unknown": + case "never": + case "number": + case "bigint": + case "boolean": + case "string": + case "symbol": + case "void": + case "object": + case "undefined": + We(r, a, r.escapedText); + } + } + function dct(r) { + V >= 1 && r.escapedText === "Object" && (L < 5 || xr(r).impliedNodeFormat === 1) && We(r, p.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, _w[L]); + } + function mct(r) { + const a = Ln(j1(r), up); + if (!Dr(a)) return; + const l = Qr(r), f = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(); + if (rr(r.parameters, ({ name: x }, I) => { + Re(x) && f.add(x.escapedText), Ts(x) && m.add(I); + }), jfe(r)) { + const x = a.length - 1, I = a[x]; + l && I && Re(I.name) && I.typeExpression && I.typeExpression.type && !f.has(I.name.escapedText) && !m.has(x) && !xp(xi(I.typeExpression.type)) && We(I.name, p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, dn(I.name)); + } else + rr(a, ({ name: x, isNameFirst: I }, R) => { + m.has(R) || Re(x) && f.has(x.escapedText) || ($u(x) ? l && We(x, p.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, Y_(x), Y_(x.left)) : I || ll(l, x, p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, dn(x))); + }); + } + function UM(r) { + let a = !1; + if (r) + for (let f = 0; f < r.length; f++) { + const m = r[f]; + PIe(m), n(l(m, f)); + } + function l(f, m) { + return () => { + f.default ? (a = !0, gct(f.default, r, m)) : a && We(f, p.Required_type_parameters_may_not_follow_optional_type_parameters); + for (let y = 0; y < m; y++) + r[y].symbol === f.symbol && We(f.name, p.Duplicate_identifier_0, ao(f.name)); + }; + } + } + function gct(r, a, l) { + f(r); + function f(m) { + if (m.kind === 183) { + const y = RL(m); + if (y.flags & 262144) + for (let x = l; x < a.length; x++) + y.symbol === xn(a[x]) && We(m, p.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); + } + gs(m, f); + } + } + function l7e(r) { + if (r.declarations && r.declarations.length === 1) + return; + const a = Ni(r); + if (!a.typeParametersChecked) { + a.typeParametersChecked = !0; + const l = kct(r); + if (!l || l.length <= 1) + return; + const f = mo(r); + if (!u7e(l, f.localTypeParameters, ly)) { + const m = Si(r); + for (const y of l) + We(y.name, p.All_declarations_of_0_must_have_identical_type_parameters, m); + } + } + } + function u7e(r, a, l) { + const f = Dr(a), m = Em(a); + for (const y of r) { + const x = l(y), I = x.length; + if (I < m || I > f) + return !1; + for (let R = 0; R < I; R++) { + const J = x[R], ee = a[R]; + if (J.name.escapedText !== ee.symbol.escapedName) + return !1; + const Se = $k(J), me = Se && xi(Se), Ve = a_(ee); + if (me && Ve && !Wh(me, Ve)) + return !1; + const mt = J.default && xi(J.default), ht = GS(ee); + if (mt && ht && !Wh(mt, ht)) + return !1; + } + } + return !0; + } + function _7e(r) { + const a = !$ && V < 99 && c0( + /*useLegacyDecorators*/ + !1, + r + ), l = V < 9 || V < 99, f = !G; + if (a || l) + for (const m of r.members) { + if (a && Yj( + /*useLegacyDecorators*/ + !1, + m, + r + )) + return ul(cy(r)) ?? r; + if (l) { + if (ac(m)) + return m; + if (Os(m) && (Pu(m) || f && IA(m))) + return m; + } + } + } + function hct(r) { + if (r.name) return; + const a = $te(r); + if (!dB(a)) return; + const l = !$ && V < 99; + let f; + l && c0( + /*useLegacyDecorators*/ + !1, + r + ) ? f = ul(cy(r)) ?? r : f = _7e(r), f && (yl( + f, + 4194304 + /* SetFunctionName */ + ), (qc(a) || rs(a) || da(a)) && oa(a.name) && yl( + f, + 8388608 + /* PropKey */ + )); + } + function yct(r) { + return f7e(r), Fk(r), hct(r), Zr(xn(r)); + } + function vct(r) { + rr(r.members, ra), T1(r); + } + function bct(r) { + const a = Nn(r.modifiers, dl); + $ && a && ut(r.members, (l) => Uc(l) && Pu(l)) && pr(a, p.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator), !r.name && !Vn( + r, + 2048 + /* Default */ + ) && Ml(r, p.A_class_declaration_without_the_default_modifier_must_have_a_name), f7e(r), rr(r.members, ra), T1(r); + } + function f7e(r) { + nut(r), jM(r), GP(r, r.name), UM(ly(r)), G8(r); + const a = xn(r), l = mo(a), f = pf(l), m = Zr(a); + l7e(a), U$(a), Fat(r), !!(r.flags & 33554432) || Lat(r); + const x = tm(r); + if (x) { + rr(x.typeArguments, ra), V < 2 && yl( + x.parent, + 1 + /* Extends */ + ); + const J = vb(r); + J && J !== x && qi(J.expression); + const ee = un(l); + ee.length && n(() => { + const Se = ee[0], me = zv(l), Ve = ju(me); + if (Tct(Ve, x), ra(x.expression), ut(x.typeArguments)) { + rr(x.typeArguments, ra); + for (const ht of EL(Ve, x.typeArguments, x)) + if (!LIe(x, ht.typeParameters)) + break; + } + const mt = pf(Se, l.thisType); + if (xu( + f, + mt, + /*errorNode*/ + void 0 + ) ? xu(m, TAe(Ve), r.name || r, p.Class_static_side_0_incorrectly_extends_base_class_static_side_1) : m7e(r, f, mt, p.Class_0_incorrectly_extends_base_class_1), me.flags & 8650752 && (kL(m) ? xs( + me, + 1 + /* Construct */ + ).some( + (er) => er.flags & 4 + /* Abstract */ + ) && !Vn( + r, + 64 + /* Abstract */ + ) && We(r.name || r, p.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract) : We(r.name || r, p.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any)), !(Ve.symbol && Ve.symbol.flags & 32) && !(me.flags & 8650752)) { + const ht = f2(Ve, x.typeArguments, x); + rr(ht, (er) => !Im(er.declaration) && !Wh(Ha(er), Se)) && We(x.expression, p.Base_constructors_must_all_have_the_same_return_type); + } + Cct(l, Se); + }); + } + Sct(r, l, f, m); + const I = dC(r); + if (I) + for (const J of I) + (!fo(J.expression) || fu(J.expression)) && We(J.expression, p.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments), _me(J), n(R(J)); + n(() => { + Y$(l, a), Y$( + m, + a, + /*isStaticIndex*/ + !0 + ), lme(r), Pct(r); + }); + function R(J) { + return () => { + const ee = Wd(xi(J)); + if (!Aa(ee)) + if (ba(ee)) { + const Se = ee.symbol && ee.symbol.flags & 32 ? p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass : p.Class_0_incorrectly_implements_interface_1, me = pf(ee, l.thisType); + xu( + f, + me, + /*errorNode*/ + void 0 + ) || m7e(r, f, me, Se); + } else + We(J, p.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); + }; + } + } + function Sct(r, a, l, f) { + const y = tm(r) && un(a), x = y?.length ? pf(fa(y), a.thisType) : void 0, I = zv(a); + for (const R of r.members) + wB(R) || (ec(R) && rr(R.parameters, (J) => { + Q_(J, R) && p7e( + r, + f, + I, + x, + a, + l, + J, + /*memberIsParameterProperty*/ + !0 + ); + }), p7e( + r, + f, + I, + x, + a, + l, + R, + /*memberIsParameterProperty*/ + !1 + )); + } + function p7e(r, a, l, f, m, y, x, I, R = !0) { + const J = x.name && kp(x.name) || kp(x); + return J ? d7e( + r, + a, + l, + f, + m, + y, + U7(x), + xb(x), + Os(x), + I, + uc(J), + R ? x : void 0 + ) : 0; + } + function d7e(r, a, l, f, m, y, x, I, R, J, ee, Se) { + const me = Qr(r), Ve = !!(r.flags & 33554432); + if (f && (x || F.noImplicitOverride)) { + const mt = Ko(ee), ht = R ? a : y, er = R ? l : f, tr = js(ht, mt), Rr = js(er, mt), vn = Ur(f); + if (tr && !Rr && x) { + if (Se) { + const cr = C8e(ee, er); + cr ? We( + Se, + me ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, + vn, + Si(cr) + ) : We( + Se, + me ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, + vn + ); + } + return 2; + } else if (tr && Rr?.declarations && F.noImplicitOverride && !Ve) { + const cr = ut(Rr.declarations, xb); + if (x) + return 0; + if (cr) { + if (I && cr) + return Se && We(Se, p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, vn), 1; + } else { + if (Se) { + const Cr = J ? me ? p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : me ? p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; + We(Se, Cr, vn); + } + return 1; + } + } + } else if (x) { + if (Se) { + const mt = Ur(m); + We( + Se, + me ? p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, + mt + ); + } + return 2; + } + return 0; + } + function m7e(r, a, l, f) { + let m = !1; + for (const y of r.members) { + if (Os(y)) + continue; + const x = y.name && kp(y.name) || kp(y); + if (x) { + const I = js(a, x.escapedName), R = js(l, x.escapedName); + if (I && R) { + const J = () => us( + /*details*/ + void 0, + p.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2, + Si(x), + Ur(a), + Ur(l) + ); + xu( + Zr(I), + Zr(R), + y.name || y, + /*headMessage*/ + void 0, + J + ) || (m = !0); + } + } + } + m || xu(a, l, r.name || r, f); + } + function Tct(r, a) { + const l = xs( + r, + 1 + /* Construct */ + ); + if (l.length) { + const f = l[0].declaration; + if (f && ef( + f, + 2 + /* Private */ + )) { + const m = gh(r.symbol); + Nme(a, m) || We(a, p.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, Ky(r.symbol)); + } + } + } + function xct(r, a, l) { + if (!a.name) + return 0; + const f = xn(r), m = mo(f), y = pf(m), x = Zr(f), R = tm(r) && un(m), J = R?.length ? pf(fa(R), m.thisType) : void 0, ee = zv(m), Se = a.parent ? U7(a) : Vn( + a, + 16 + /* Override */ + ); + return d7e( + r, + x, + ee, + J, + m, + y, + Se, + xb(a), + Os(a), + /*memberIsParameterProperty*/ + !1, + uc(l) + ); + } + function fE(r) { + return gc(r) & 1 ? r.links.target : r; + } + function kct(r) { + return Ln( + r.declarations, + (a) => a.kind === 263 || a.kind === 264 + /* InterfaceDeclaration */ + ); + } + function Cct(r, a) { + var l, f, m, y, x; + const I = Wa(a), R = /* @__PURE__ */ new Map(); + e: for (const J of I) { + const ee = fE(J); + if (ee.flags & 4194304) + continue; + const Se = d2(r, ee.escapedName); + if (!Se) + continue; + const me = fE(Se), Ve = sp(ee); + if (E.assert(!!me, "derived should point to something, even if it is the base class' declaration."), me === ee) { + const mt = gh(r.symbol); + if (Ve & 64 && (!mt || !Vn( + mt, + 64 + /* Abstract */ + ))) { + for (const vn of un(r)) { + if (vn === a) continue; + const cr = d2(vn, ee.escapedName), Cr = cr && fE(cr); + if (Cr && Cr !== ee) + continue e; + } + const ht = Ur(a), er = Ur(r), tr = Si(J), Rr = Tr((l = R.get(mt)) == null ? void 0 : l.missedProperties, tr); + R.set(mt, { baseTypeName: ht, typeName: er, missedProperties: Rr }); + } + } else { + const mt = sp(me); + if (Ve & 2 || mt & 2) + continue; + let ht; + const er = ee.flags & 98308, tr = me.flags & 98308; + if (er && tr) { + if ((gc(ee) & 6 ? (f = ee.declarations) != null && f.some((cr) => g7e(cr, Ve)) : (m = ee.declarations) != null && m.every((cr) => g7e(cr, Ve))) || gc(ee) & 262144 || me.valueDeclaration && cn(me.valueDeclaration)) + continue; + const Rr = er !== 4 && tr === 4; + if (Rr || er === 4 && tr !== 4) { + const cr = Rr ? p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; + We(es(me.valueDeclaration) || me.valueDeclaration, cr, Si(ee), Ur(a), Ur(r)); + } else if (U) { + const cr = (y = me.declarations) == null ? void 0 : y.find((Cr) => Cr.kind === 172 && !Cr.initializer); + if (cr && !(me.flags & 33554432) && !(Ve & 64) && !(mt & 64) && !((x = me.declarations) != null && x.some((Cr) => !!(Cr.flags & 33554432)))) { + const Cr = G3(gh(r.symbol)), Fr = cr.name; + if (cr.exclamationToken || !Cr || !Re(Fr) || !K || !y7e(Fr, r, Cr)) { + const En = p.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + We(es(me.valueDeclaration) || me.valueDeclaration, En, Si(ee), Ur(a)); + } + } + } + continue; + } else if (Ede(ee)) { + if (Ede(me) || me.flags & 4) + continue; + E.assert(!!(me.flags & 98304)), ht = p.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; + } else ee.flags & 98304 ? ht = p.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function : ht = p.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; + We(es(me.valueDeclaration) || me.valueDeclaration, ht, Ur(a), Si(ee), Ur(r)); + } + } + for (const [J, ee] of R) + if (Dr(ee.missedProperties) === 1) + tl(J) ? We(J, p.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, fa(ee.missedProperties), ee.baseTypeName) : We(J, p.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, ee.typeName, fa(ee.missedProperties), ee.baseTypeName); + else if (Dr(ee.missedProperties) > 5) { + const Se = or(ee.missedProperties.slice(0, 4), (Ve) => `'${Ve}'`).join(", "), me = Dr(ee.missedProperties) - 4; + tl(J) ? We(J, p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, ee.baseTypeName, Se, me) : We(J, p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, ee.typeName, ee.baseTypeName, Se, me); + } else { + const Se = or(ee.missedProperties, (me) => `'${me}'`).join(", "); + tl(J) ? We(J, p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, ee.baseTypeName, Se) : We(J, p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, ee.typeName, ee.baseTypeName, Se); + } + } + function g7e(r, a) { + return a & 64 && (!rs(r) || !r.initializer) || Vl(r.parent); + } + function Ect(r, a, l) { + if (!Dr(a)) + return l; + const f = /* @__PURE__ */ new Map(); + rr(l, (m) => { + f.set(m.escapedName, m); + }); + for (const m of a) { + const y = Wa(pf(m, r.thisType)); + for (const x of y) { + const I = f.get(x.escapedName); + I && x.parent === I.parent && f.delete(x.escapedName); + } + } + return ts(f.values()); + } + function Dct(r, a) { + const l = un(r); + if (l.length < 2) + return !0; + const f = /* @__PURE__ */ new Map(); + rr(vfe(r).declaredProperties, (y) => { + f.set(y.escapedName, { prop: y, containingType: r }); + }); + let m = !0; + for (const y of l) { + const x = Wa(pf(y, r.thisType)); + for (const I of x) { + const R = f.get(I.escapedName); + if (!R) + f.set(I.escapedName, { prop: I, containingType: y }); + else if (R.containingType !== r && !Itt(R.prop, I)) { + m = !1; + const ee = Ur(R.containingType), Se = Ur(y); + let me = us( + /*details*/ + void 0, + p.Named_property_0_of_types_1_and_2_are_not_identical, + Si(I), + ee, + Se + ); + me = us(me, p.Interface_0_cannot_simultaneously_extend_types_1_and_2, Ur(r), ee, Se), La.add(wg(xr(a), a, me)); + } + } + } + return m; + } + function Pct(r) { + if (!K || !oe || r.flags & 33554432) + return; + const a = G3(r); + for (const l of r.members) + if (!(Au(l) & 128) && !Os(l) && h7e(l)) { + const f = l.name; + if (Re(f) || wi(f) || oa(f)) { + const m = Zr(xn(l)); + m.flags & 3 || rE(m) || (!a || !y7e(f, m, a)) && We(l.name, p.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, ao(f)); + } + } + } + function h7e(r) { + return r.kind === 172 && !xb(r) && !r.exclamationToken && !r.initializer; + } + function wct(r, a, l, f, m) { + for (const y of l) + if (y.pos >= f && y.pos <= m) { + const x = N.createPropertyAccessExpression(N.createThis(), r); + Da(x.expression, x), Da(x, y), x.flowNode = y.returnFlowNode; + const I = $h(x, a, b1(a)); + if (!rE(I)) + return !0; + } + return !1; + } + function y7e(r, a, l) { + const f = oa(r) ? N.createElementAccessExpression(N.createThis(), r.expression) : N.createPropertyAccessExpression(N.createThis(), r); + Da(f.expression, f), Da(f, l), f.flowNode = l.returnFlowNode; + const m = $h(f, a, b1(a)); + return !rE(m); + } + function Act(r) { + nh(r) || uut(r), UM(r.typeParameters), n(() => { + XP(r.name, p.Interface_name_cannot_be_0), G8(r); + const a = xn(r); + l7e(a); + const l = Jo( + a, + 264 + /* InterfaceDeclaration */ + ); + if (r === l) { + const f = mo(a), m = pf(f); + if (Dct(f, r.name)) { + for (const y of un(f)) + xu(m, pf(y, f.thisType), r.name, p.Interface_0_incorrectly_extends_interface_1); + Y$(f, a); + } + } + NIe(r); + }), rr(m4(r), (a) => { + (!fo(a.expression) || fu(a.expression)) && We(a.expression, p.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments), _me(a); + }), rr(r.members, ra), n(() => { + lme(r), T1(r); + }); + } + function Nct(r) { + nh(r), XP(r.name, p.Type_alias_name_cannot_be_0), G8(r), UM(r.typeParameters), r.type.kind === 141 ? (!Xz.has(r.name.escapedText) || Dr(r.typeParameters) !== 1) && We(r.type, p.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types) : (ra(r.type), T1(r)); + } + function v7e(r) { + const a = bn(r); + if (!(a.flags & 1024)) { + a.flags |= 1024; + let l = 0, f; + for (const m of r.members) { + const y = Ict(m, l, f); + bn(m).enumMemberValue = y, l = typeof y.value == "number" ? y.value + 1 : void 0, f = m; + } + } + } + function Ict(r, a, l) { + if (qw(r.name)) + We(r.name, p.Computed_property_names_are_not_allowed_in_enums); + else { + const f = OT(r.name); + Mg(f) && !V4(f) && We(r.name, p.An_enum_member_cannot_have_a_numeric_name); + } + if (r.initializer) + return Oct(r); + if (r.parent.flags & 33554432 && !fb(r.parent)) + return pl( + /*value*/ + void 0 + ); + if (a === void 0) + return We(r.name, p.Enum_member_must_have_initializer), pl( + /*value*/ + void 0 + ); + if (ap(F) && l?.initializer) { + const f = pT(l); + typeof f.value == "number" && !f.resolvedOtherFiles || We( + r.name, + p.Enum_member_following_a_non_literal_numeric_member_must_have_an_initializer_when_isolatedModules_is_enabled + ); + } + return pl(a); + } + function Oct(r) { + const a = fb(r.parent), l = r.initializer, f = de(l, r); + return f.value !== void 0 ? a && typeof f.value == "number" && !isFinite(f.value) ? We( + l, + isNaN(f.value) ? p.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : p.const_enum_member_initializer_was_evaluated_to_a_non_finite_value + ) : ap(F) && typeof f.value == "string" && !f.isSyntacticallyString && We( + l, + p._0_has_a_string_type_but_must_have_syntactically_recognizable_string_syntax_when_isolatedModules_is_enabled, + `${dn(r.parent.name)}.${OT(r.name)}` + ) : a ? We(l, p.const_enum_member_initializers_must_be_constant_expressions) : r.parent.flags & 33554432 ? We(l, p.In_ambient_enum_declarations_member_initializer_must_be_constant_expression) : xu(qi(l), _e, l, p.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values), f; + } + function b7e(r, a) { + const l = No( + r, + 111551, + /*ignoreErrors*/ + !0 + ); + if (!l) return pl( + /*value*/ + void 0 + ); + if (r.kind === 80) { + const f = r; + if (V4(f.escapedText) && l === IP( + f.escapedText, + 111551, + /*diagnostic*/ + void 0 + )) + return pl( + +f.escapedText, + /*isSyntacticallyString*/ + !1 + ); + } + if (l.flags & 8) + return a ? S7e(r, l, a) : pT(l.valueDeclaration); + if (Ik(l)) { + const f = l.valueDeclaration; + if (f && ti(f) && !f.type && f.initializer && (!a || f !== a && cg(f, a))) { + const m = de(f.initializer, f); + return a && xr(a) !== xr(f) ? pl( + m.value, + /*isSyntacticallyString*/ + !1, + /*resolvedOtherFiles*/ + !0, + /*hasExternalReferences*/ + !0 + ) : pl( + m.value, + m.isSyntacticallyString, + m.resolvedOtherFiles, + /*hasExternalReferences*/ + !0 + ); + } + } + return pl( + /*value*/ + void 0 + ); + } + function Fct(r, a) { + const l = r.expression; + if (fo(l) && Ga(r.argumentExpression)) { + const f = No( + l, + 111551, + /*ignoreErrors*/ + !0 + ); + if (f && f.flags & 384) { + const m = Ko(r.argumentExpression.text), y = f.exports.get(m); + if (y) + return E.assert(xr(y.valueDeclaration) === xr(f.valueDeclaration)), a ? S7e(r, y, a) : pT(y.valueDeclaration); + } + } + return pl( + /*value*/ + void 0 + ); + } + function S7e(r, a, l) { + const f = a.valueDeclaration; + if (!f || f === l) + return We(r, p.Property_0_is_used_before_being_assigned, Si(a)), pl( + /*value*/ + void 0 + ); + if (!cg(f, l)) + return We(r, p.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums), pl( + /*value*/ + 0 + ); + const m = pT(f); + return l.parent !== f.parent ? pl( + m.value, + m.isSyntacticallyString, + m.resolvedOtherFiles, + /*hasExternalReferences*/ + !0 + ) : m; + } + function Lct(r) { + n(() => Mct(r)); + } + function Mct(r) { + nh(r), GP(r, r.name), G8(r), r.members.forEach(Rct), v7e(r); + const a = xn(r), l = Jo(a, r.kind); + if (r === l) { + if (a.declarations && a.declarations.length > 1) { + const m = fb(r); + rr(a.declarations, (y) => { + rv(y) && fb(y) !== m && We(es(y), p.Enum_declarations_must_all_be_const_or_non_const); + }); + } + let f = !1; + rr(a.declarations, (m) => { + if (m.kind !== 266) + return !1; + const y = m; + if (!y.members.length) + return !1; + const x = y.members[0]; + x.initializer || (f ? We(x.name, p.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element) : f = !0); + }); + } + } + function Rct(r) { + wi(r.name) && We(r, p.An_enum_member_cannot_be_named_with_a_private_identifier), r.initializer && qi(r.initializer); + } + function jct(r) { + const a = r.declarations; + if (a) { + for (const l of a) + if ((l.kind === 263 || l.kind === 262 && wp(l.body)) && !(l.flags & 33554432)) + return l; + } + } + function Bct(r, a) { + const l = bd(r), f = bd(a); + return s0(l) ? s0(f) : s0(f) ? !1 : l === f; + } + function Jct(r) { + r.body && (ra(r.body), Zd(r) || T1(r)), n(a); + function a() { + var l, f; + const m = Zd(r), y = r.flags & 33554432; + m && !y && We(r.name, p.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); + const x = wu(r), I = x ? p.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : p.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; + if (qM(r, I)) + return; + nh(r) || !y && r.name.kind === 11 && pr(r.name, p.Only_ambient_modules_can_use_quoted_names), Re(r.name) && GP(r, r.name), G8(r); + const R = xn(r); + if (R.flags & 512 && !y && Qz(r, Cb(F))) { + if (ap(F) && !xr(r).externalModuleIndicator && We(r.name, p.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, Fe), ((l = R.declarations) == null ? void 0 : l.length) > 1) { + const J = jct(R); + J && (xr(r) !== xr(J) ? We(r.name, p.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged) : r.pos < J.pos && We(r.name, p.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged)); + const ee = Jo( + R, + 263 + /* ClassDeclaration */ + ); + ee && Bct(r, ee) && (bn(r).flags |= 2048); + } + if (F.verbatimModuleSyntax && r.parent.kind === 307 && (L === 1 || r.parent.impliedNodeFormat === 1)) { + const J = (f = r.modifiers) == null ? void 0 : f.find( + (ee) => ee.kind === 95 + /* ExportKeyword */ + ); + J && We(J, p.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + } + } + if (x) + if (_b(r)) { + if ((m || xn(r).flags & 33554432) && r.body) + for (const ee of r.body.statements) + Eme(ee, m); + } else s0(r.parent) ? m ? We(r.name, p.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations) : Sl(Ip(r.name)) && We(r.name, p.Ambient_module_declaration_cannot_specify_relative_module_name) : m ? We(r.name, p.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations) : We(r.name, p.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); + } + } + function Eme(r, a) { + switch (r.kind) { + case 243: + for (const f of r.declarationList.declarations) + Eme(f, a); + break; + case 277: + case 278: + Ml(r, p.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); + break; + case 271: + case 272: + Ml(r, p.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); + break; + case 208: + case 260: + const l = r.name; + if (Ts(l)) { + for (const f of l.elements) + Eme(f, a); + break; + } + case 263: + case 266: + case 262: + case 264: + case 267: + case 265: + if (a) + return; + break; + } + } + function zct(r) { + switch (r.kind) { + case 80: + return r; + case 166: + do + r = r.left; + while (r.kind !== 80); + return r; + case 211: + do { + if (Ag(r.expression) && !wi(r.name)) + return r.name; + r = r.expression; + } while (r.kind !== 80); + return r; + } + } + function Z$(r) { + const a = RT(r); + if (!a || ic(a)) + return !1; + if (!Ks(a)) + return We(a, p.String_literal_expected), !1; + const l = r.parent.kind === 268 && wu(r.parent.parent); + if (r.parent.kind !== 307 && !l) + return We( + a, + r.kind === 278 ? p.Export_declarations_are_not_permitted_in_a_namespace : p.Import_declarations_in_a_namespace_cannot_reference_a_module + ), !1; + if (l && Sl(a.text) && !c8(r)) + return We(r, p.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name), !1; + if (!nl(r) && r.attributes) { + const f = r.attributes.token === 118 ? p.Import_attribute_values_must_be_string_literal_expressions : p.Import_assertion_values_must_be_string_literal_expressions; + let m = !1; + for (const y of r.attributes.elements) + Ks(y.value) || (m = !0, We(y.value, f)); + return !m; + } + return !0; + } + function K$(r) { + var a, l, f, m; + let y = xn(r); + const x = Ec(y); + if (x !== nt) { + if (y = Ma(y.exportSymbol || y), Qr(r) && !(x.flags & 111551) && !B1(r)) { + const J = ET(r) ? r.propertyName || r.name : Bl(r) ? r.name : r; + if (E.assert( + r.kind !== 280 + /* NamespaceExport */ + ), r.kind === 281) { + const ee = We(J, p.Types_cannot_appear_in_export_declarations_in_JavaScript_files), Se = (l = (a = xr(r).symbol) == null ? void 0 : a.exports) == null ? void 0 : l.get((r.propertyName || r.name).escapedText); + if (Se === x) { + const me = (f = Se.declarations) == null ? void 0 : f.find(Yk); + me && Fs( + ee, + Xr( + me, + p._0_is_automatically_exported_here, + Pi(Se.escapedName) + ) + ); + } + } else { + E.assert( + r.kind !== 260 + /* VariableDeclaration */ + ); + const ee = sr(r, Ef(oc, nl)), Se = (ee && ((m = u4(ee)) == null ? void 0 : m.text)) ?? "...", me = Pi(Re(J) ? J.escapedText : y.escapedName); + We( + J, + p._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, + me, + `import("${Se}").${me}` + ); + } + return; + } + const I = n_(x), R = (y.flags & 1160127 ? 111551 : 0) | (y.flags & 788968 ? 788968 : 0) | (y.flags & 1920 ? 1920 : 0); + if (I & R) { + const J = r.kind === 281 ? p.Export_declaration_conflicts_with_exported_declaration_of_0 : p.Import_declaration_conflicts_with_local_declaration_of_0; + We(r, J, Si(y)); + } else r.kind !== 281 && F.isolatedModules && !sr(r, B1) && y.flags & 1160127 && We( + r, + p.Import_0_conflicts_with_local_value_so_must_be_declared_with_a_type_only_import_when_isolatedModules_is_enabled, + Si(y), + Fe + ); + if (ap(F) && !B1(r) && !(r.flags & 33554432)) { + const J = ud(y), ee = !(I & 111551); + if (ee || J) + switch (r.kind) { + case 273: + case 276: + case 271: { + if (F.verbatimModuleSyntax) { + E.assertIsDefined(r.name, "An ImportClause with a symbol should have a name"); + const Se = F.verbatimModuleSyntax && LT(r) ? p.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : ee ? p._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : p._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled, me = dn(r.kind === 276 && r.propertyName || r.name); + Tm( + We(r, Se, me), + ee ? void 0 : J, + me + ); + } + ee && r.kind === 271 && ef( + r, + 32 + /* Export */ + ) && We(r, p.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, Fe); + break; + } + case 281: + if (F.verbatimModuleSyntax || xr(J) !== xr(r)) { + const Se = dn(r.propertyName || r.name), me = ee ? We(r, p.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, Fe) : We(r, p._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, Se, Fe); + Tm(me, ee ? void 0 : J, Se); + break; + } + } + F.verbatimModuleSyntax && r.kind !== 271 && !Qr(r) && (L === 1 || xr(r).impliedNodeFormat === 1) && We(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + } + if (Yu(r)) { + const J = Dme(y, r); + Uy(J) && J.declarations && Hf(r, J.declarations, J.escapedName); + } + } + } + function Dme(r, a) { + if (!(r.flags & 2097152) || Uy(r) || !k_(r)) + return r; + const l = Ec(r); + if (l === nt) return l; + for (; r.flags & 2097152; ) { + const f = S$(r); + if (f) { + if (f === l) break; + if (f.declarations && Dr(f.declarations)) + if (Uy(f)) { + Hf(a, f.declarations, f.escapedName); + break; + } else { + if (r === l) break; + r = f; + } + } else + break; + } + return l; + } + function eX(r) { + GP(r, r.name), K$(r), r.kind === 276 && dn(r.propertyName || r.name) === "default" && Fg(F) && L !== 4 && (L < 5 || xr(r).impliedNodeFormat === 1) && yl( + r, + 131072 + /* ImportDefault */ + ); + } + function Pme(r) { + var a; + const l = r.attributes; + if (l) { + const f = Xfe( + /*reportErrors*/ + !0 + ); + f !== bi && xu(v(l), rM( + f, + 32768 + /* Undefined */ + ), l); + const m = IW(r), y = ZC(l, m ? pr : void 0), x = r.attributes.token === 118; + if (m && y) + return; + if ((L === 199 && r.moduleSpecifier && od(r.moduleSpecifier)) !== 99 && L !== 99 && L !== 200) { + const J = x ? L === 199 ? p.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : p.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve : L === 199 ? p.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : p.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_nodenext_or_preserve; + return pr(l, J); + } + if (Jg(r) || (oc(r) ? (a = r.importClause) == null ? void 0 : a.isTypeOnly : r.isTypeOnly)) + return pr(l, x ? p.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : p.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); + if (y) + return pr(l, p.resolution_mode_can_only_be_set_for_type_only_imports); + } + } + function Wct(r) { + return Ju(Dc(r.value)); + } + function Vct(r) { + if (!qM(r, Qr(r) ? p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { + if (!nh(r) && r.modifiers && Ml(r, p.An_import_declaration_cannot_have_modifiers), Z$(r)) { + const a = r.importClause; + a && !Lut(a) && (a.name && eX(a), a.namedBindings && (a.namedBindings.kind === 274 ? (eX(a.namedBindings), L !== 4 && (L < 5 || xr(r).impliedNodeFormat === 1) && Fg(F) && yl( + r, + 65536 + /* ImportStar */ + )) : Ru(r, r.moduleSpecifier) && rr(a.namedBindings.elements, eX))); + } + Pme(r); + } + } + function Uct(r) { + if (!qM(r, Qr(r) ? p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module) && (nh(r), LT(r) || Z$(r))) + if (eX(r), oT( + r, + 6 + /* ExportImportEquals */ + ), r.moduleReference.kind !== 283) { + const a = Ec(xn(r)); + if (a !== nt) { + const l = n_(a); + if (l & 111551) { + const f = tf(r.moduleReference); + No( + f, + 112575 + /* Namespace */ + ).flags & 1920 || We(f, p.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ao(f)); + } + l & 788968 && XP(r.name, p.Import_name_cannot_be_0); + } + r.isTypeOnly && pr(r, p.An_import_alias_cannot_use_import_type); + } else + L >= 5 && L !== 200 && xr(r).impliedNodeFormat === void 0 && !r.isTypeOnly && !(r.flags & 33554432) && pr(r, p.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead); + } + function qct(r) { + if (!qM(r, Qr(r) ? p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { + if (!nh(r) && SK(r) && Ml(r, p.An_export_declaration_cannot_have_modifiers), Hct(r), !r.moduleSpecifier || Z$(r)) + if (r.exportClause && !Ym(r.exportClause)) { + rr(r.exportClause.elements, Gct); + const a = r.parent.kind === 268 && wu(r.parent.parent), l = !a && r.parent.kind === 268 && !r.moduleSpecifier && r.flags & 33554432; + r.parent.kind !== 307 && !a && !l && We(r, p.Export_declarations_are_not_permitted_in_a_namespace); + } else { + const a = Ru(r, r.moduleSpecifier); + a && l2(a) ? We(r.moduleSpecifier, p.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, Si(a)) : r.exportClause && K$(r.exportClause), L !== 4 && (L < 5 || xr(r).impliedNodeFormat === 1) && (r.exportClause ? Fg(F) && yl( + r, + 65536 + /* ImportStar */ + ) : yl( + r, + 32768 + /* ExportStar */ + )); + } + Pme(r); + } + } + function Hct(r) { + var a; + return r.isTypeOnly && ((a = r.exportClause) == null ? void 0 : a.kind) === 279 ? r5e(r.exportClause) : !1; + } + function qM(r, a) { + const l = r.parent.kind === 307 || r.parent.kind === 268 || r.parent.kind === 267; + return l || Ml(r, a), !l; + } + function Gct(r) { + if (K$(r), op(F) && TP( + r.propertyName || r.name, + /*setVisibility*/ + !0 + ), r.parent.parent.moduleSpecifier) + Fg(F) && L !== 4 && (L < 5 || xr(r).impliedNodeFormat === 1) && dn(r.propertyName || r.name) === "default" && yl( + r, + 131072 + /* ImportDefault */ + ); + else { + const a = r.propertyName || r.name, l = Kt( + a, + a.escapedText, + 2998271, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + l && (l === De || l === Xe || l.declarations && s0(_2(l.declarations[0]))) ? We(a, p.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, dn(a)) : oT( + r, + 7 + /* ExportSpecifier */ + ); + } + } + function $ct(r) { + const a = r.isExportEquals ? p.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration : p.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration; + if (qM(r, a)) + return; + const l = r.parent.kind === 307 ? r.parent : r.parent.parent; + if (l.kind === 267 && !wu(l)) { + r.isExportEquals ? We(r, p.An_export_assignment_cannot_be_used_in_a_namespace) : We(r, p.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + return; + } + !nh(r) && PB(r) && Ml(r, p.An_export_assignment_cannot_have_modifiers); + const f = Vc(r); + f && xu(Dc(r.expression), xi(f), r.expression); + const m = !r.isExportEquals && !(r.flags & 33554432) && F.verbatimModuleSyntax && (L === 1 || xr(r).impliedNodeFormat === 1); + if (r.expression.kind === 80) { + const y = r.expression, x = R_(No( + y, + -1, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + r + )); + if (x) { + oT( + r, + 3 + /* ExportAssignment */ + ); + const I = ud( + x, + 111551 + /* Value */ + ); + if (n_(x) & 111551 ? (Dc(y), !m && !(r.flags & 33554432) && F.verbatimModuleSyntax && I && We( + y, + r.isExportEquals ? p.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : p.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, + dn(y) + )) : !m && !(r.flags & 33554432) && F.verbatimModuleSyntax && We( + y, + r.isExportEquals ? p.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : p.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, + dn(y) + ), !m && !(r.flags & 33554432) && ap(F) && !(x.flags & 111551)) { + const R = n_( + x, + /*excludeTypeOnlyMeanings*/ + !1, + /*excludeLocalMeanings*/ + !0 + ); + x.flags & 2097152 && R & 788968 && !(R & 111551) && (!I || xr(I) !== xr(r)) ? We( + y, + r.isExportEquals ? p._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : p._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default, + dn(y), + Fe + ) : I && xr(I) !== xr(r) && Tm( + We( + y, + r.isExportEquals ? p._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : p._0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default, + dn(y), + Fe + ), + I, + dn(y) + ); + } + } else + Dc(y); + op(F) && TP( + y, + /*setVisibility*/ + !0 + ); + } else + Dc(r.expression); + m && We(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled), T7e(l), r.flags & 33554432 && !fo(r.expression) && pr(r.expression, p.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context), r.isExportEquals && (L >= 5 && L !== 200 && (r.flags & 33554432 && xr(r).impliedNodeFormat === 99 || !(r.flags & 33554432) && xr(r).impliedNodeFormat !== 1) ? pr(r, p.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead) : L === 4 && !(r.flags & 33554432) && pr(r, p.Export_assignment_is_not_supported_when_module_flag_is_system)); + } + function Xct(r) { + return Dl(r.exports, (a, l) => l !== "export="); + } + function T7e(r) { + const a = xn(r), l = Ni(a); + if (!l.exportsChecked) { + const f = a.exports.get("export="); + if (f && Xct(a)) { + const y = k_(f) || f.valueDeclaration; + y && !c8(y) && !Qr(y) && We(y, p.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); + } + const m = Md(a); + m && m.forEach(({ declarations: y, flags: x }, I) => { + if (I === "__export" || x & 1920) + return; + const R = ty(y, dI(lMe, mI(Vl))); + if (!(x & 524288 && R <= 2) && R > 1 && !tX(y)) + for (const J of y) + G1e(J) && La.add(Xr(J, p.Cannot_redeclare_exported_variable_0, Pi(I))); + }), l.exportsChecked = !0; + } + } + function tX(r) { + return r && r.length > 1 && r.every((a) => Qr(a) && go(a) && ($2(a.expression) || Ag(a.expression))); + } + function ra(r) { + if (r) { + const a = C; + C = r, h = 0, Qct(r), C = a; + } + } + function Qct(r) { + h3(r) && rr(r.jsDoc, ({ comment: l, tags: f }) => { + x7e(l), rr(f, (m) => { + x7e(m.comment), Qr(r) && ra(m); + }); + }); + const a = r.kind; + if (i) + switch (a) { + case 267: + case 263: + case 264: + case 262: + i.throwIfCancellationRequested(); + } + switch (a >= 243 && a <= 259 && g3(r) && r.flowNode && !uM(r.flowNode) && ll(F.allowUnreachableCode === !1, r, p.Unreachable_code_detected), a) { + case 168: + return PIe(r); + case 169: + return wIe(r); + case 172: + return IIe(r); + case 171: + return Mat(r); + case 185: + case 184: + case 179: + case 180: + case 181: + return H8(r); + case 174: + case 173: + return Rat(r); + case 175: + return jat(r); + case 176: + return Bat(r); + case 177: + case 178: + return FIe(r); + case 183: + return _me(r); + case 182: + return Iat(r); + case 186: + return qat(r); + case 187: + return Hat(r); + case 188: + return Gat(r); + case 189: + return $at(r); + case 192: + case 193: + return Xat(r); + case 196: + case 190: + case 191: + return ra(r.type); + case 197: + return Kat(r); + case 198: + return eot(r); + case 194: + return tot(r); + case 195: + return rot(r); + case 203: + return not(r); + case 205: + return iot(r); + case 202: + return sot(r); + case 328: + return Cot(r); + case 329: + return kot(r); + case 346: + case 338: + case 340: + return dot(r); + case 345: + return mot(r); + case 344: + return got(r); + case 324: + case 325: + case 326: + return yot(r); + case 341: + return vot(r); + case 348: + return bot(r); + case 317: + Sot(r); + case 315: + case 314: + case 312: + case 313: + case 322: + k7e(r), gs(r, ra); + return; + case 318: + Yct(r); + return; + case 309: + return ra(r.type); + case 333: + case 335: + case 334: + return Eot(r); + case 350: + return hot(r); + case 343: + return Tot(r); + case 351: + return xot(r); + case 199: + return Qat(r); + case 200: + return Yat(r); + case 262: + return pot(r); + case 241: + case 268: + return G$(r); + case 243: + return Uot(r); + case 244: + return qot(r); + case 245: + return Hot(r); + case 246: + return Xot(r); + case 247: + return Qot(r); + case 248: + return Yot(r); + case 249: + return Kot(r); + case 250: + return Zot(r); + case 251: + case 252: + return act(r); + case 253: + return oct(r); + case 254: + return cct(r); + case 255: + return lct(r); + case 256: + return uct(r); + case 257: + return _ct(r); + case 258: + return fct(r); + case 260: + return Wot(r); + case 208: + return Vot(r); + case 263: + return bct(r); + case 264: + return Act(r); + case 265: + return Nct(r); + case 266: + return Lct(r); + case 267: + return Jct(r); + case 272: + return Vct(r); + case 271: + return Uct(r); + case 278: + return qct(r); + case 277: + return $ct(r); + case 242: + case 259: + Xh(r); + return; + case 282: + return zat(r); + } + } + function x7e(r) { + ss(r) && rr(r, (a) => { + AT(a) && ra(a); + }); + } + function k7e(r) { + if (!Qr(r)) + if (Q5(r) || FC(r)) { + const a = Ws( + Q5(r) ? 54 : 58 + /* QuestionToken */ + ), l = r.postfix ? p._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : p._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1, f = r.type, m = xi(f); + pr( + r, + l, + a, + Ur( + FC(r) && !(m === fr || m === en) ? Gn(Tr([m, Ut], r.postfix ? void 0 : he)) : m + ) + ); + } else + pr(r, p.JSDoc_types_can_only_be_used_inside_documentation_comments); + } + function Yct(r) { + k7e(r), ra(r.type); + const { parent: a } = r; + if (ji(a) && LC(a.parent)) { + ia(a.parent.parameters) !== a && We(r, p.A_rest_parameter_must_be_last_in_a_parameter_list); + return; + } + nv(a) || We(r, p.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + const l = r.parent.parent; + if (!up(l)) { + We(r, p.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); + return; + } + const f = y3(l); + if (!f) + return; + const m = q1(l); + (!m || ia(m.parameters).symbol !== f) && We(r, p.A_rest_parameter_must_be_last_in_a_parameter_list); + } + function Zct(r) { + const a = xi(r.type), { parent: l } = r, f = r.parent.parent; + if (nv(r.parent) && up(f)) { + const m = q1(f), y = BJ(f.parent.parent); + if (m || y) { + const x = Bo(y ? f.parent.parent.typeExpression.parameters : m.parameters), I = y3(f); + if (!x || I && x.symbol === I && Um(x)) + return cu(a); + } + } + return ji(l) && LC(l.parent) ? cu(a) : oi(a); + } + function Fk(r) { + const a = xr(r), l = bn(a); + l.flags & 1 ? E.assert(!l.deferredNodes, "A type-checked file should have no deferred nodes.") : (l.deferredNodes || (l.deferredNodes = /* @__PURE__ */ new Set()), l.deferredNodes.add(r)); + } + function Kct(r) { + const a = bn(r); + a.deferredNodes && a.deferredNodes.forEach(elt), a.deferredNodes = void 0; + } + function elt(r) { + var a, l; + (a = rn) == null || a.push(rn.Phase.Check, "checkDeferredNode", { kind: r.kind, pos: r.pos, end: r.end, path: r.tracingPath }); + const f = C; + switch (C = r, h = 0, r.kind) { + case 213: + case 214: + case 215: + case 170: + case 286: + lT(r); + break; + case 218: + case 219: + case 174: + case 173: + Yst(r); + break; + case 177: + case 178: + FIe(r); + break; + case 231: + vct(r); + break; + case 168: + Nat(r); + break; + case 285: + iit(r); + break; + case 284: + ait(r); + break; + case 216: + case 234: + case 217: + Sst(r); + break; + case 222: + qi(r.expression); + break; + case 226: + H7(r) && lT(r); + break; + } + C = f, (l = rn) == null || l.pop(); + } + function tlt(r) { + var a, l; + (a = rn) == null || a.push( + rn.Phase.Check, + "checkSourceFile", + { path: r.path }, + /*separateBeginAndEnd*/ + !0 + ), Yo("beforeCheck"), rlt(r), Yo("afterCheck"), ep("Check", "beforeCheck", "afterCheck"), (l = rn) == null || l.pop(); + } + function C7e(r, a) { + if (a) + return !1; + switch (r) { + case 0: + return !!F.noUnusedLocals; + case 1: + return !!F.noUnusedParameters; + default: + return E.assertNever(r); + } + } + function E7e(r) { + return Uf.get(r.path) || He; + } + function rlt(r) { + const a = bn(r); + if (!(a.flags & 1)) { + if (B4(r, F, e)) + return; + Nut(r), bg(Kb), bg(e2), bg(Jy), bg(Tv), bg(CS), rr(r.statements, ra), ra(r.endOfFileToken), Kct(r), A_(r) && T1(r), n(() => { + !r.isDeclarationFile && (F.noUnusedLocals || F.noUnusedParameters) && qIe(E7e(r), (l, f, m) => { + !tC(l) && C7e(f, !!(l.flags & 33554432)) && La.add(m); + }), r.isDeclarationFile || Aot(); + }), A_(r) && T7e(r), Kb.length && (rr(Kb, Oot), bg(Kb)), e2.length && (rr(e2, Fot), bg(e2)), Jy.length && (rr(Jy, jot), bg(Jy)), Tv.length && (rr(Tv, Jot), bg(Tv)), a.flags |= 1; + } + } + function D7e(r, a) { + try { + return i = a, nlt(r); + } finally { + i = void 0; + } + } + function wme() { + for (const r of t) + r(); + t = []; + } + function Ame(r) { + wme(); + const a = n; + n = (l) => l(), tlt(r), n = a; + } + function nlt(r) { + if (r) { + wme(); + const a = La.getGlobalDiagnostics(), l = a.length; + Ame(r); + const f = La.getDiagnostics(r.fileName), m = La.getGlobalDiagnostics(); + if (m !== a) { + const y = SX(a, m, N4); + return Hi(y, f); + } else if (l === 0 && m.length > 0) + return Hi(m, f); + return f; + } + return rr(e.getSourceFiles(), Ame), La.getDiagnostics(); + } + function ilt() { + return wme(), La.getGlobalDiagnostics(); + } + function slt(r, a) { + if (r.flags & 67108864) + return []; + const l = Ms(); + let f = !1; + return m(), l.delete( + "this" + /* This */ + ), Lfe(l); + function m() { + for (; r; ) { + switch (Vm(r) && r.locals && !s0(r) && x(r.locals, a), r.kind) { + case 307: + if (!il(r)) break; + case 267: + I( + xn(r).exports, + a & 2623475 + /* ModuleMember */ + ); + break; + case 266: + x( + xn(r).exports, + a & 8 + /* EnumMember */ + ); + break; + case 231: + r.name && y(r.symbol, a); + case 263: + case 264: + f || x( + _1(xn(r)), + a & 788968 + /* Type */ + ); + break; + case 218: + r.name && y(r.symbol, a); + break; + } + LZ(r) && y(Ie, a), f = Os(r), r = r.parent; + } + x(ve, a); + } + function y(R, J) { + if (TC(R) & J) { + const ee = R.escapedName; + l.has(ee) || l.set(ee, R); + } + } + function x(R, J) { + J && R.forEach((ee) => { + y(ee, J); + }); + } + function I(R, J) { + J && R.forEach((ee) => { + !Jo( + ee, + 281 + /* ExportSpecifier */ + ) && !Jo( + ee, + 280 + /* NamespaceExport */ + ) && ee.escapedName !== "default" && y(ee, J); + }); + } + } + function alt(r) { + return r.kind === 80 && tx(r.parent) && es(r.parent) === r; + } + function P7e(r) { + for (; r.parent.kind === 166; ) + r = r.parent; + return r.parent.kind === 183; + } + function olt(r) { + for (; r.parent.kind === 211; ) + r = r.parent; + return r.parent.kind === 233; + } + function w7e(r, a) { + let l, f = Nl(r); + for (; f && !(l = a(f)); ) + f = Nl(f); + return l; + } + function clt(r) { + return !!sr(r, (a) => ec(a) && wp(a.body) || rs(a) ? !0 : Qn(a) || so(a) ? "quit" : !1); + } + function Nme(r, a) { + return !!w7e(r, (l) => l === a); + } + function llt(r) { + for (; r.parent.kind === 166; ) + r = r.parent; + if (r.parent.kind === 271) + return r.parent.moduleReference === r ? r.parent : void 0; + if (r.parent.kind === 277) + return r.parent.expression === r ? r.parent : void 0; + } + function rX(r) { + return llt(r) !== void 0; + } + function ult(r) { + switch (mc(r.parent.parent)) { + case 1: + case 3: + return C_(r.parent); + case 5: + if (Dn(r.parent) && xC(r.parent) === r) + return; + case 4: + case 2: + return xn(r.parent.parent); + } + } + function _lt(r) { + let a = r.parent; + for (; $u(a); ) + r = a, a = a.parent; + if (a && a.kind === 205 && a.qualifier === r) + return a; + } + function flt(r) { + if (r.expression.kind === 110) { + const a = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (ps(a)) { + const l = qNe(a); + if (l) { + const f = Zv( + l, + /*contextFlags*/ + void 0 + ), m = GNe(l, f); + return m && !Ea(m); + } + } + } + } + function A7e(r) { + if (Gm(r)) + return C_(r.parent); + if (Qr(r) && r.parent.kind === 211 && r.parent === r.parent.parent.left && !wi(r) && !iv(r) && !flt(r.parent)) { + const a = ult(r); + if (a) + return a; + } + if (r.parent.kind === 277 && fo(r)) { + const a = No( + r, + /*all meanings*/ + 2998271, + /*ignoreErrors*/ + !0 + ); + if (a && a !== nt) + return a; + } else if (l_(r) && rX(r)) { + const a = $1( + r, + 271 + /* ImportEqualsDeclaration */ + ); + return E.assert(a !== void 0), ik( + r, + /*dontResolveAlias*/ + !0 + ); + } + if (l_(r)) { + const a = _lt(r); + if (a) { + xi(a); + const l = bn(r).resolvedSymbol; + return l === nt ? void 0 : l; + } + } + for (; DK(r); ) + r = r.parent; + if (olt(r)) { + let a = 0; + r.parent.kind === 233 ? (a = em(r) ? 788968 : 111551, q7(r.parent) && (a |= 111551)) : a = 1920, a |= 2097152; + const l = fo(r) ? No( + r, + a, + /*ignoreErrors*/ + !0 + ) : void 0; + if (l) + return l; + } + if (r.parent.kind === 341) + return y3(r.parent); + if (r.parent.kind === 168 && r.parent.parent.kind === 345) { + E.assert(!Qr(r)); + const a = QZ(r.parent); + return a && a.symbol; + } + if (Sd(r)) { + if (ic(r)) + return; + const a = sr(r, Ef(AT, lD, iv)), l = a ? 901119 : 111551; + if (r.kind === 80) { + if (cC(r) && Ok(r)) { + const m = x$(r.parent); + return m === nt ? void 0 : m; + } + const f = No( + r, + l, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + q1(r) + ); + if (!f && a) { + const m = sr(r, Ef(Qn, Vl)); + if (m) + return HM( + r, + /*ignoreErrors*/ + !0, + xn(m) + ); + } + if (f && a) { + const m = hb(r); + if (m && Py(m) && m === f.valueDeclaration) + return No( + r, + l, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + xr(m) + ) || f; + } + return f; + } else { + if (wi(r)) + return E$(r); + if (r.kind === 211 || r.kind === 166) { + const f = bn(r); + return f.resolvedSymbol ? f.resolvedSymbol : (r.kind === 211 ? (C$( + r, + 0 + /* Normal */ + ), f.resolvedSymbol || (f.resolvedSymbol = N7e(Dc(r.expression), X0(r.name)))) : b8e( + r, + 0 + /* Normal */ + ), !f.resolvedSymbol && a && $u(r) ? HM(r) : f.resolvedSymbol); + } else if (iv(r)) + return HM(r); + } + } else if (P7e(r)) { + const a = r.parent.kind === 183 ? 788968 : 1920, l = No( + r, + a, + /*ignoreErrors*/ + !1, + /*dontResolveAlias*/ + !0 + ); + return l && l !== nt ? l : kG(r); + } + if (r.parent.kind === 182) + return No( + r, + /*meaning*/ + 1 + /* FunctionScopedVariable */ + ); + } + function N7e(r, a) { + const l = Ffe(r, a); + if (l.length && r.members) { + const f = SG(zd(r).members); + if (l === Bu(r)) + return f; + if (f) { + const m = Ni(f), y = Ii(l, (I) => I.declaration), x = or(y, ja).join(","); + if (m.filteredIndexSymbolCache || (m.filteredIndexSymbolCache = /* @__PURE__ */ new Map()), m.filteredIndexSymbolCache.has(x)) + return m.filteredIndexSymbolCache.get(x); + { + const I = va( + 131072, + "__index" + /* Index */ + ); + return I.declarations = Ii(l, (R) => R.declaration), I.parent = r.aliasSymbol ? r.aliasSymbol : r.symbol ? r.symbol : kp(I.declarations[0].parent), m.filteredIndexSymbolCache.set(x, I), I; + } + } + } + } + function HM(r, a, l) { + if (l_(r)) { + let x = No( + r, + 901119, + a, + /*dontResolveAlias*/ + !0, + q1(r) + ); + if (!x && Re(r) && l && (x = Ma(x_(_f(l), r.escapedText, 901119))), x) + return x; + } + const f = Re(r) ? l : HM(r.left, a, l), m = Re(r) ? r.escapedText : r.right.escapedText; + if (f) { + const y = f.flags & 111551 && js(Zr(f), "prototype"), x = y ? Zr(y) : mo(f); + return js(x, m); + } + } + function kp(r, a) { + if (yi(r)) + return il(r) ? Ma(r.symbol) : void 0; + const { parent: l } = r, f = l.parent; + if (!(r.flags & 67108864)) { + if ($1e(r)) { + const m = xn(l); + return ET(r.parent) && r.parent.propertyName === r ? S$(m) : m; + } else if (b3(r)) + return xn(l.parent); + if (r.kind === 80) { + if (rX(r)) + return A7e(r); + if (l.kind === 208 && f.kind === 206 && r === l.propertyName) { + const m = Lk(f), y = js(m, r.escapedText); + if (y) + return y; + } else if (rD(l) && l.name === r) + return l.keywordToken === 105 && dn(r) === "target" ? $de(l).symbol : l.keywordToken === 102 && dn(r) === "meta" ? w3e().members.get("meta") : void 0; + } + switch (r.kind) { + case 80: + case 81: + case 211: + case 166: + if (!Tb(r)) + return A7e(r); + case 110: + const m = Uu( + r, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (ps(m)) { + const I = Qf(m); + if (I.thisParameter) + return I.thisParameter; + } + if (S7(r)) + return qi(r).symbol; + case 197: + return FG(r).symbol; + case 108: + return qi(r).symbol; + case 137: + const y = r.parent; + return y && y.kind === 176 ? y.parent.symbol : void 0; + case 11: + case 15: + if (V1(r.parent.parent) && o4(r.parent.parent) === r || (r.parent.kind === 272 || r.parent.kind === 278) && r.parent.moduleSpecifier === r || Qr(r) && Jg(r.parent) && r.parent.moduleSpecifier === r || Qr(r) && d_( + r.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) || hf(r.parent) || y0(r.parent) && a0(r.parent.parent) && r.parent.parent.argument === r.parent) + return Ru(r, r, a); + if (Es(l) && X2(l) && l.arguments[1] === r) + return xn(l); + case 9: + const x = ho(l) ? l.argumentExpression === r ? $l(l.expression) : void 0 : y0(l) && Nb(f) ? xi(f.objectType) : void 0; + return x && js(x, Ko(r.text)); + case 90: + case 100: + case 39: + case 86: + return C_(r.parent); + case 205: + return a0(r) ? kp(r.argument.literal, a) : void 0; + case 95: + return ko(r.parent) ? E.checkDefined(r.parent.symbol) : void 0; + case 102: + case 105: + return rD(r.parent) ? nIe(r.parent).symbol : void 0; + case 104: + if (cn(r.parent)) { + const I = $l(r.parent.right), R = ime(I); + return R?.symbol ?? I.symbol; + } + return; + case 236: + return qi(r).symbol; + case 295: + if (cC(r) && Ok(r)) { + const I = x$(r.parent); + return I === nt ? void 0 : I; + } + default: + return; + } + } + } + function plt(r) { + if (Re(r) && Dn(r.parent) && r.parent.name === r) { + const a = X0(r), l = $l(r.parent.expression), f = l.flags & 1048576 ? l.types : [l]; + return Xs(f, (m) => Ln(Bu(m), (y) => Sk(a, y.keyType))); + } + } + function dlt(r) { + if (r && r.kind === 304) + return No( + r.name, + 2208703 + /* Alias */ + ); + } + function mlt(r) { + return pu(r) ? r.parent.parent.moduleSpecifier ? MS(r.parent.parent, r) : No( + r.propertyName || r.name, + 2998271 + /* Alias */ + ) : No( + r, + 2998271 + /* Alias */ + ); + } + function Lk(r) { + if (yi(r) && !il(r) || r.flags & 67108864) + return be; + const a = OB(r), l = a && Yc(xn(a.class)); + if (em(r)) { + const f = xi(r); + return l ? pf(f, l.thisType) : f; + } + if (Sd(r)) + return Ime(r); + if (l && !a.isImplements) { + const f = ul(un(l)); + return f ? pf(f, l.thisType) : be; + } + if (tx(r)) { + const f = xn(r); + return mo(f); + } + if (alt(r)) { + const f = kp(r); + return f ? mo(f) : be; + } + if (da(r)) + return ro( + r, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ) || be; + if (tu(r)) { + const f = xn(r); + return f ? Zr(f) : be; + } + if ($1e(r)) { + const f = kp(r); + return f ? Zr(f) : be; + } + if (Ts(r)) + return ro( + r.parent, + /*includeOptionality*/ + !0, + 0 + /* Normal */ + ) || be; + if (rX(r)) { + const f = kp(r); + if (f) { + const m = mo(f); + return Aa(m) ? Zr(f) : m; + } + } + return rD(r.parent) && r.parent.keywordToken === r.kind ? nIe(r.parent) : aS(r) ? Xfe( + /*reportErrors*/ + !1 + ) : be; + } + function nX(r) { + if (E.assert( + r.kind === 210 || r.kind === 209 + /* ArrayLiteralExpression */ + ), r.parent.kind === 250) { + const m = WM(r.parent); + return _T(r, m || be); + } + if (r.parent.kind === 226) { + const m = $l(r.parent.right); + return _T(r, m || be); + } + if (r.parent.kind === 303) { + const m = Is(r.parent.parent, Gs), y = nX(m) || be, x = rC(m.properties, r.parent); + return yIe(m, y, x); + } + const a = Is(r.parent, Wl), l = nX(a) || be, f = K0(65, l, Ut, r.parent) || be; + return vIe(a, l, a.elements.indexOf(r), f); + } + function glt(r) { + const a = nX(Is(r.parent.parent, YE)); + return a && js(a, r.escapedText); + } + function Ime(r) { + return k4(r) && (r = r.parent), Ju($l(r)); + } + function I7e(r) { + const a = C_(r.parent); + return Os(r) ? Zr(a) : mo(a); + } + function O7e(r) { + const a = r.name; + switch (a.kind) { + case 80: + return D_(dn(a)); + case 9: + case 11: + return D_(a.text); + case 167: + const l = wm(a); + return Gl( + l, + 12288 + /* ESSymbolLike */ + ) ? l : we; + default: + return E.fail("Unsupported property name."); + } + } + function Ome(r) { + r = ju(r); + const a = Ms(Wa(r)), l = xs( + r, + 0 + /* Call */ + ).length ? F_ : xs( + r, + 1 + /* Construct */ + ).length ? Jf : void 0; + return l && rr(Wa(l), (f) => { + a.has(f.escapedName) || a.set(f.escapedName, f); + }), r1(a); + } + function iX(r) { + return xs( + r, + 0 + /* Call */ + ).length !== 0 || xs( + r, + 1 + /* Construct */ + ).length !== 0; + } + function F7e(r) { + const a = hlt(r); + return a ? Xs(a, F7e) : [r]; + } + function hlt(r) { + if (gc(r) & 6) + return Ii(Ni(r).containingType.types, (a) => js(a, r.escapedName)); + if (r.flags & 33554432) { + const { links: { leftSpread: a, rightSpread: l, syntheticOrigin: f } } = r; + return a ? [a, l] : f ? [f] : ST(ylt(r)); + } + } + function ylt(r) { + let a, l = r; + for (; l = Ni(l).target; ) + a = l; + return a; + } + function vlt(r) { + if (Fo(r)) return !1; + const a = Ki(r, Re); + if (!a) return !1; + const l = a.parent; + return l ? !((Dn(l) || qc(l)) && l.name === a) && tI(a) === Ie : !1; + } + function blt(r) { + return Rw(r.parent) && r === r.parent.name; + } + function Slt(r, a) { + var l; + const f = Ki(r, Re); + if (f) { + let m = tI( + f, + /*startInDeclarationContainer*/ + blt(f) + ); + if (m) { + if (m.flags & 1048576) { + const x = Ma(m.exportSymbol); + if (!a && x.flags & 944 && !(x.flags & 3)) + return; + m = x; + } + const y = s_(m); + if (y) { + if (y.flags & 512 && ((l = y.valueDeclaration) == null ? void 0 : l.kind) === 307) { + const x = y.valueDeclaration, I = xr(f); + return x !== I ? void 0 : x; + } + return sr(f.parent, (x) => Rw(x) && xn(x) === y); + } + } + } + } + function Tlt(r) { + const a = zee(r); + if (a) + return a; + const l = Ki(r, Re); + if (l) { + const f = jlt(l); + if (hl( + f, + /*excludes*/ + 111551 + /* Value */ + ) && !ud( + f, + 111551 + /* Value */ + )) + return k_(f); + } + } + function xlt(r) { + return r.valueDeclaration && da(r.valueDeclaration) && Hk(r.valueDeclaration).parent.kind === 299; + } + function L7e(r) { + if (r.flags & 418 && r.valueDeclaration && !yi(r.valueDeclaration)) { + const a = Ni(r); + if (a.isDeclarationWithCollidingName === void 0) { + const l = bd(r.valueDeclaration); + if (cZ(l) || xlt(r)) + if (Kt( + l.parent, + r.escapedName, + 111551, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !1 + )) + a.isDeclarationWithCollidingName = !0; + else if (Fme( + r.valueDeclaration, + 16384 + /* CapturedBlockScopedBinding */ + )) { + const f = Fme( + r.valueDeclaration, + 32768 + /* BlockScopedBindingInLoop */ + ), m = fy( + l, + /*lookInLabeledStatements*/ + !1 + ), y = l.kind === 241 && fy( + l.parent, + /*lookInLabeledStatements*/ + !1 + ); + a.isDeclarationWithCollidingName = !gZ(l) && (!f || !m && !y); + } else + a.isDeclarationWithCollidingName = !1; + } + return a.isDeclarationWithCollidingName; + } + return !1; + } + function klt(r) { + if (!Fo(r)) { + const a = Ki(r, Re); + if (a) { + const l = tI(a); + if (l && L7e(l)) + return l.valueDeclaration; + } + } + } + function Clt(r) { + const a = Ki(r, tu); + if (a) { + const l = xn(a); + if (l) + return L7e(l); + } + return !1; + } + function M7e(r) { + switch (E.assert(Qe), r.kind) { + case 271: + return sX(xn(r)); + case 273: + case 274: + case 276: + case 281: + const a = xn(r); + return !!a && sX( + a, + /*excludeTypeOnlyValues*/ + !0 + ); + case 278: + const l = r.exportClause; + return !!l && (Ym(l) || ut(l.elements, M7e)); + case 277: + return r.expression && r.expression.kind === 80 ? sX( + xn(r), + /*excludeTypeOnlyValues*/ + !0 + ) : !0; + } + return !1; + } + function Elt(r) { + const a = Ki(r, nl); + return a === void 0 || a.parent.kind !== 307 || !LT(a) ? !1 : sX(xn(a)) && a.moduleReference && !ic(a.moduleReference); + } + function sX(r, a) { + if (!r) + return !1; + const l = xr(r.valueDeclaration), f = l && xn(l); + M_(f); + const m = R_(Ec(r)); + return m === nt ? !a || !ud(r) : !!(n_( + r, + a, + /*excludeLocalMeanings*/ + !0 + ) & 111551) && (Cb(F) || !eI(m)); + } + function eI(r) { + return nme(r) || !!r.constEnumOnlyModule; + } + function R7e(r, a) { + if (E.assert(Qe), Ev(r)) { + const l = xn(r), f = l && Ni(l); + if (f?.referenced) + return !0; + const m = Ni(l).aliasTarget; + if (m && Au(r) & 32 && n_(m) & 111551 && (Cb(F) || !eI(m))) + return !0; + } + return a ? !!gs(r, (l) => R7e(l, a)) : !1; + } + function j7e(r) { + if (wp(r.body)) { + if (n0(r) || Yd(r)) return !1; + const a = xn(r), l = m2(a); + return l.length > 1 || // If there is single signature for the symbol, it is overload if that signature isn't coming from the node + // e.g.: function foo(a: string): string; + // function foo(a: any) { // This is implementation of the overloads + // return a; + // } + l.length === 1 && l[0].declaration !== r; + } + return !1; + } + function Dlt(r) { + const a = oX(r); + if (!a) return !1; + const l = xi(a); + return rE(l); + } + function aX(r) { + return (Plt(r) || wlt(r)) && !Dlt(r); + } + function Plt(r) { + return !!K && !LL(r) && !up(r) && !!r.initializer && !Vn( + r, + 31 + /* ParameterPropertyModifier */ + ); + } + function wlt(r) { + return K && LL(r) && (up(r) || !r.initializer) && Vn( + r, + 31 + /* ParameterPropertyModifier */ + ); + } + function B7e(r) { + const a = Ki(r, (f) => Ac(f) || ti(f)); + if (!a) + return !1; + let l; + if (ti(a)) { + if (a.type || !Qr(a) && !rI(a)) + return !1; + const f = l4(a); + if (!f || !vd(f)) + return !1; + l = xn(f); + } else + l = xn(a); + return !l || !(l.flags & 16 | 3) ? !1 : !!Dl(_f(l), (f) => f.flags & 111551 && nx(f.valueDeclaration)); + } + function Alt(r) { + const a = Ki(r, Ac); + if (!a) + return He; + const l = xn(a); + return l && Wa(Zr(l)) || He; + } + function pE(r) { + var a; + const l = r.id || 0; + return l < 0 || l >= Yi.length ? 0 : ((a = Yi[l]) == null ? void 0 : a.flags) || 0; + } + function Fme(r, a) { + return Nlt(r, a), !!(pE(r) & a); + } + function Nlt(r, a) { + if (!F.noCheck && V3(xr(r), F) || bn(r).calculatedFlags & a) + return; + switch (a) { + case 16: + case 32: + return x(r); + case 128: + case 256: + case 2097152: + return y(r); + case 512: + case 8192: + case 65536: + case 262144: + return R(r); + case 536870912: + return J(r); + case 4096: + case 32768: + case 16384: + return Se(r); + default: + return E.assertNever(a, `Unhandled node check flag calculation: ${E.formatNodeCheckFlags(a)}`); + } + function f(Ve, mt) { + const ht = mt(Ve, Ve.parent); + if (ht !== "skip") + return ht || kx(Ve, mt); + } + function m(Ve) { + const mt = bn(Ve); + if (mt.calculatedFlags & a) return "skip"; + mt.calculatedFlags |= 2097536, x(Ve); + } + function y(Ve) { + f(Ve, m); + } + function x(Ve) { + const mt = bn(Ve); + mt.calculatedFlags |= 48, Ve.kind === 108 && m$(Ve); + } + function I(Ve) { + const mt = bn(Ve); + if (mt.calculatedFlags & a) return "skip"; + mt.calculatedFlags |= 336384, J(Ve); + } + function R(Ve) { + f(Ve, I); + } + function J(Ve) { + const mt = bn(Ve); + if (mt.calculatedFlags |= 536920064, Re(Ve) && Sd(Ve) && !(Dn(Ve.parent) && Ve.parent.name === Ve)) { + const ht = kp( + Ve, + /*ignoreErrors*/ + !0 + ); + ht && ht !== nt && zNe(Ve, ht); + } + } + function ee(Ve) { + const mt = bn(Ve); + if (mt.calculatedFlags & a) return "skip"; + mt.calculatedFlags |= 53248, me(Ve); + } + function Se(Ve) { + const mt = bd(Gm(Ve) ? Ve.parent : Ve); + f(mt, ee); + } + function me(Ve) { + J(Ve), oa(Ve) && wm(Ve), wi(Ve) && fl(Ve.parent) && z$(Ve.parent); + } + } + function pT(r) { + return v7e(r.parent), bn(r).enumMemberValue ?? pl( + /*value*/ + void 0 + ); + } + function J7e(r) { + switch (r.kind) { + case 306: + case 211: + case 212: + return !0; + } + return !1; + } + function Lme(r) { + if (r.kind === 306) + return pT(r).value; + bn(r).resolvedSymbol || Dc(r); + const a = bn(r).resolvedSymbol || (fo(r) ? No( + r, + 111551, + /*ignoreErrors*/ + !0 + ) : void 0); + if (a && a.flags & 8) { + const l = a.valueDeclaration; + if (fb(l.parent)) + return pT(l).value; + } + } + function Mme(r) { + return !!(r.flags & 524288) && xs( + r, + 0 + /* Call */ + ).length > 0; + } + function Ilt(r, a) { + var l; + const f = Ki(r, l_); + if (!f || a && (a = Ki(a), !a)) + return 0; + let m = !1; + if ($u(f)) { + const ee = No( + tf(f), + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ); + m = !!((l = ee?.declarations) != null && l.every(B1)); + } + const y = No( + f, + 111551, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ), x = y && y.flags & 2097152 ? Ec(y) : y; + m || (m = !!(y && ud( + y, + 111551 + /* Value */ + ))); + const I = No( + f, + 788968, + /*ignoreErrors*/ + !0, + /*dontResolveAlias*/ + !0, + a + ), R = I && I.flags & 2097152 ? Ec(I) : I; + if (y || m || (m = !!(I && ud( + I, + 788968 + /* Type */ + ))), x && x === R) { + const ee = Qfe( + /*reportErrors*/ + !1 + ); + if (ee && x === ee) + return 9; + const Se = Zr(x); + if (Se && CL(Se)) + return m ? 10 : 1; + } + if (!R) + return m ? 11 : 0; + const J = mo(R); + return Aa(J) ? m ? 11 : 0 : J.flags & 3 ? 11 : Gl( + J, + 245760 + /* Never */ + ) ? 2 : Gl( + J, + 528 + /* BooleanLike */ + ) ? 6 : Gl( + J, + 296 + /* NumberLike */ + ) ? 3 : Gl( + J, + 2112 + /* BigIntLike */ + ) ? 4 : Gl( + J, + 402653316 + /* StringLike */ + ) ? 5 : la(J) ? 7 : Gl( + J, + 12288 + /* ESSymbolLike */ + ) ? 8 : Mme(J) ? 10 : xp(J) ? 7 : 11; + } + function Olt(r, a, l, f) { + const m = Ki(r, IZ); + if (!m) + return N.createToken( + 133 + /* AnyKeyword */ + ); + const y = xn(m), x = y && !(y.flags & 133120) ? $v(Zr(y)) : be; + return Ae.serializeTypeForDeclaration(m, x, y, a, l | 1024, f); + } + function Flt(r) { + return ps(r) || ko(r) || FT(r); + } + function GM(r) { + r = Ki(r, Pw); + const a = r.kind === 178 ? 177 : 178, l = Jo(xn(r), a), f = l && l.pos < r.pos ? l : r, m = l && l.pos < r.pos ? r : l, y = r.kind === 178 ? r : l, x = r.kind === 177 ? r : l; + return { + firstAccessor: f, + secondAccessor: m, + setAccessor: y, + getAccessor: x + }; + } + function z7e(r) { + return ps(r) && !Yd(r) ? W7e(r) : ko(r) ? r.expression : r.initializer ? r.initializer : ji(r) && Yd(r.parent) ? W7e(GM(r.parent).getAccessor) : void 0; + } + function W7e(r) { + let a; + if (r && !ic(r.body)) { + if (jc(r) & 3) return; + const l = r.body; + l && ms(l) ? o0(l, (f) => { + if (!a) + a = f.expression; + else + return a = void 0, !0; + }) : a = l; + } + return a; + } + function Llt(r, a, l, f) { + const m = Ki(r, ps); + return m ? Ae.serializeReturnTypeForSignature(Qf(m), a, l | 1024, f) : N.createToken( + 133 + /* AnyKeyword */ + ); + } + function Mlt(r, a, l, f) { + const m = Ki(r, ct); + if (!m) + return N.createToken( + 133 + /* AnyKeyword */ + ); + const y = W_(Ime(m)); + return Ae.expressionOrTypeToTypeNode( + m, + y, + /*addUndefined*/ + void 0, + a, + l | 1024, + f + ); + } + function Rlt(r) { + return ve.has(Ko(r)); + } + function tI(r, a) { + const l = bn(r).resolvedSymbol; + if (l) + return l; + let f = r; + if (a) { + const m = r.parent; + tu(m) && r === m.name && (f = _2(m)); + } + return Kt( + f, + r.escapedText, + 3257279, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0 + ); + } + function jlt(r) { + const a = bn(r).resolvedSymbol; + return a && a !== nt ? a : Kt( + r, + r.escapedText, + 3257279, + /*nameNotFoundMessage*/ + void 0, + /*isUse*/ + !0, + /*excludeGlobals*/ + void 0 + ); + } + function Blt(r) { + if (!Fo(r)) { + const a = Ki(r, Re); + if (a) { + const l = tI(a); + if (l) + return R_(l).valueDeclaration; + } + } + } + function Jlt(r) { + if (!Fo(r)) { + const a = Ki(r, Re); + if (a) { + const l = tI(a); + if (l) + return Ln(R_(l).declarations, (f) => { + switch (f.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + case 304: + case 306: + case 210: + case 262: + case 218: + case 219: + case 263: + case 231: + case 266: + case 174: + case 177: + case 178: + case 267: + return !0; + } + return !1; + }); + } + } + } + function zlt(r) { + return Gw(r) || ti(r) && rI(r) ? v2(Zr(xn(r))) : !1; + } + function Wlt(r, a, l) { + const f = r.flags & 1056 ? Ae.symbolToExpression( + r.symbol, + 111551, + a, + /*flags*/ + void 0, + l + ) : r === wt ? N.createTrue() : r === dt && N.createFalse(); + if (f) return f; + const m = r.value; + return typeof m == "object" ? N.createBigIntLiteral(m) : typeof m == "string" ? N.createStringLiteral(m) : m < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-m)) : N.createNumericLiteral(m); + } + function Vlt(r, a) { + const l = Zr(xn(r)); + return Wlt(l, r, a); + } + function V7e(r) { + return r ? (DS(r), xr(r).localJsxFactory || O0) : O0; + } + function Rme(r) { + if (r) { + const a = xr(r); + if (a) { + if (a.localJsxFragmentFactory) + return a.localJsxFragmentFactory; + const l = a.pragmas.get("jsxfrag"), f = ss(l) ? l[0] : l; + if (f) + return a.localJsxFragmentFactory = Ex(f.arguments.factory, V), a.localJsxFragmentFactory; + } + } + if (F.jsxFragmentFactory) + return Ex(F.jsxFragmentFactory, V); + } + function oX(r) { + const a = Vc(r); + if (a) + return a; + if (r.kind === 169 && r.parent.kind === 178) { + const l = GM(r.parent).getAccessor; + if (l) + return K_(l); + } + } + function Ult(r) { + const a = K_(r); + if (a) + return a; + if (r.kind === 177) { + const l = GM(r).setAccessor; + if (l) { + const f = bC(l); + if (f) + return Vc(f); + } + } + } + function qlt() { + return { + getReferencedExportContainer: Slt, + getReferencedImportDeclaration: Tlt, + getReferencedDeclarationWithCollidingName: klt, + isDeclarationWithCollidingName: Clt, + isValueAliasDeclaration: (a) => { + const l = Ki(a); + return l && Qe ? M7e(l) : !0; + }, + hasGlobalName: Rlt, + isReferencedAliasDeclaration: (a, l) => { + const f = Ki(a); + return f && Qe ? R7e(f, l) : !0; + }, + hasNodeCheckFlag: (a, l) => { + const f = Ki(a); + return f ? Fme(f, l) : !1; + }, + isTopLevelValueImportEqualsWithEntityName: Elt, + isDeclarationVisible: jh, + isImplementationOfOverload: j7e, + requiresAddingImplicitUndefined: aX, + isExpandoFunctionDeclaration: B7e, + getPropertiesOfContainerFunction: Alt, + createTypeOfDeclaration: Olt, + createReturnTypeOfSignatureDeclaration: Llt, + createTypeOfExpression: Mlt, + createLiteralConstValue: Vlt, + isSymbolAccessible: xm, + isEntityNameVisible: Lv, + getConstantValue: (a) => { + const l = Ki(a, J7e); + return l ? Lme(l) : void 0; + }, + getEnumMemberValue: (a) => { + const l = Ki(a, Py); + return l ? pT(l) : void 0; + }, + collectLinkedAliases: TP, + markLinkedReferences: (a) => { + const l = Ki(a); + return l && oT( + l, + 0 + /* Unspecified */ + ); + }, + getReferencedValueDeclaration: Blt, + getReferencedValueDeclarations: Jlt, + getTypeReferenceSerializationKind: Ilt, + isOptionalParameter: LL, + isArgumentsLocalBinding: vlt, + getExternalModuleFileFromDeclaration: (a) => { + const l = Ki(a, vZ); + return l && jme(l); + }, + isLiteralConstDeclaration: zlt, + isLateBound: (a) => { + const l = Ki(a, tu), f = l && xn(l); + return !!(f && gc(f) & 4096); + }, + getJsxFactoryEntity: V7e, + getJsxFragmentFactoryEntity: Rme, + isBindingCapturedByNode: (a, l) => { + const f = Ki(a), m = Ki(l); + return !!f && !!m && (ti(m) || da(m)) && unt(f, m); + }, + getDeclarationStatementsForSourceFile: (a, l, f) => { + const m = Ki(a); + E.assert(m && m.kind === 307, "Non-sourcefile node passed into getDeclarationsForSourceFile"); + const y = xn(a); + return y ? (M_(y), y.exports ? Ae.symbolTableToDeclarationStatements(y.exports, a, l, f) : []) : a.locals ? Ae.symbolTableToDeclarationStatements(a.locals, a, l, f) : []; + }, + isImportRequiredByAugmentation: r + }; + function r(a) { + const l = xr(a); + if (!l.symbol) return !1; + const f = jme(a); + if (!f || f === l) return !1; + const m = Md(l.symbol); + for (const y of ts(m.values())) + if (y.mergeId) { + const x = Ma(y); + if (x.declarations) { + for (const I of x.declarations) + if (xr(I) === f) + return !0; + } + } + return !1; + } + } + function jme(r) { + const a = r.kind === 267 ? Jn(r.name, Ks) : RT(r), l = sk( + a, + a, + /*moduleNotFoundError*/ + void 0 + ); + if (l) + return Jo( + l, + 307 + /* SourceFile */ + ); + } + function Hlt() { + for (const a of e.getSourceFiles()) + une(a, F); + ol = /* @__PURE__ */ new Map(); + let r; + for (const a of e.getSourceFiles()) + if (!a.redirectInfo) { + if (!A_(a)) { + const l = a.locals.get("globalThis"); + if (l?.declarations) + for (const f of l.declarations) + La.add(Xr(f, p.Declaration_name_conflicts_with_built_in_global_identifier_0, "globalThis")); + sd(ve, a.locals); + } + a.jsGlobalAugmentations && sd(ve, a.jsGlobalAugmentations), a.patternAmbientModules && a.patternAmbientModules.length && (Eo = Hi(Eo, a.patternAmbientModules)), a.moduleAugmentations.length && (r || (r = [])).push(a.moduleAugmentations), a.symbol && a.symbol.globalExports && a.symbol.globalExports.forEach((f, m) => { + ve.has(m) || ve.set(m, f); + }); + } + if (r) + for (const a of r) + for (const l of a) + Zd(l.parent) && xf(l); + if (L0(), Ni(De).type = W, Ni(Ie).type = Oc( + "IArguments", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Ni(nt).type = be, Ni(Xe).type = yp(16, Xe), Pe = Oc( + "Array", + /*arity*/ + 1, + /*reportErrors*/ + !0 + ), Cl = Oc( + "Object", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), kc = Oc( + "Function", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), F_ = Z && Oc( + "CallableFunction", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || kc, Jf = Z && Oc( + "NewableFunction", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ) || kc, Jr = Oc( + "String", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Vi = Oc( + "Number", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), ha = Oc( + "Boolean", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Pa = Oc( + "RegExp", + /*arity*/ + 0, + /*reportErrors*/ + !0 + ), Do = cu(Ne), to = cu(et), to === bi && (to = ie( + /*symbol*/ + void 0, + O, + He, + He, + He + )), Ct = L3e( + "ReadonlyArray", + /*arity*/ + 1 + ) || Pe, pc = Ct ? v8(Ct, [Ne]) : Do, vc = L3e( + "ThisType", + /*arity*/ + 1 + ), r) + for (const a of r) + for (const l of a) + Zd(l.parent) || xf(l); + ol.forEach(({ firstFile: a, secondFile: l, conflictingSymbols: f }) => { + if (f.size < 8) + f.forEach(({ isBlockScoped: m, firstFileLocations: y, secondFileLocations: x }, I) => { + const R = m ? p.Cannot_redeclare_block_scoped_variable_0 : p.Duplicate_identifier_0; + for (const J of y) + i2(J, R, I, x); + for (const J of x) + i2(J, R, I, y); + }); + else { + const m = ts(f.keys()).join(", "); + La.add(Fs( + Xr(a, p.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, m), + Xr(l, p.Conflicts_are_in_this_file) + )), La.add(Fs( + Xr(l, p.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, m), + Xr(a, p.Conflicts_are_in_this_file) + )); + } + }), ol = void 0; + } + function yl(r, a) { + if (F.importHelpers) { + const l = xr(r); + if (NT(l, F) && !(r.flags & 33554432)) { + const f = $lt(l, r); + if (f !== nt) { + const m = Ni(f); + if (m.requestedExternalEmitHelpers ?? (m.requestedExternalEmitHelpers = 0), (m.requestedExternalEmitHelpers & a) !== a) { + const y = a & ~m.requestedExternalEmitHelpers; + for (let x = 1; x <= 16777216; x <<= 1) + if (y & x) + for (const I of Glt(x)) { + const R = bc(x_( + Md(f), + Ko(I), + 111551 + /* Value */ + )); + R ? x & 524288 ? ut(m2(R), (J) => U_(J) > 3) || We(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, z1, I, 4) : x & 1048576 ? ut(m2(R), (J) => U_(J) > 4) || We(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, z1, I, 5) : x & 1024 && (ut(m2(R), (J) => U_(J) > 2) || We(r, p.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, z1, I, 3)) : We(r, p.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, z1, I); + } + } + m.requestedExternalEmitHelpers |= a; + } + } + } + } + function Glt(r) { + switch (r) { + case 1: + return ["__extends"]; + case 2: + return ["__assign"]; + case 4: + return ["__rest"]; + case 8: + return $ ? ["__decorate"] : ["__esDecorate", "__runInitializers"]; + case 16: + return ["__metadata"]; + case 32: + return ["__param"]; + case 64: + return ["__awaiter"]; + case 128: + return ["__generator"]; + case 256: + return ["__values"]; + case 512: + return ["__read"]; + case 1024: + return ["__spreadArray"]; + case 2048: + return ["__await"]; + case 4096: + return ["__asyncGenerator"]; + case 8192: + return ["__asyncDelegator"]; + case 16384: + return ["__asyncValues"]; + case 32768: + return ["__exportStar"]; + case 65536: + return ["__importStar"]; + case 131072: + return ["__importDefault"]; + case 262144: + return ["__makeTemplateObject"]; + case 524288: + return ["__classPrivateFieldGet"]; + case 1048576: + return ["__classPrivateFieldSet"]; + case 2097152: + return ["__classPrivateFieldIn"]; + case 4194304: + return ["__setFunctionName"]; + case 8388608: + return ["__propKey"]; + case 16777216: + return ["__addDisposableResource", "__disposeResources"]; + default: + return E.fail("Unrecognized helper"); + } + } + function $lt(r, a) { + const l = bn(r); + return l.externalHelpersModule || (l.externalHelpersModule = Nv(Vut(r), z1, p.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, a) || nt), l.externalHelpersModule; + } + function nh(r) { + var a; + const l = Ylt(r) || Xlt(r); + if (l !== void 0) + return l; + if (ji(r) && Sb(r)) + return Ml(r, p.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); + const f = yc(r) ? r.declarationList.flags & 7 : 0; + let m, y, x, I, R, J = 0, ee = !1, Se = !1; + for (const me of r.modifiers) + if (dl(me)) { + if (t3($, r, r.parent, r.parent.parent)) { + if ($ && (r.kind === 177 || r.kind === 178)) { + const Ve = GM(r); + if (wf(Ve.firstAccessor) && r === Ve.secondAccessor) + return Ml(r, p.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); + } + } else return r.kind === 174 && !wp(r.body) ? Ml(r, p.A_decorator_can_only_decorate_a_method_implementation_not_an_overload) : Ml(r, p.Decorators_are_not_valid_here); + if (J & -34849) + return pr(me, p.Decorators_are_not_valid_here); + if (Se && J & 98303) { + E.assertIsDefined(R); + const Ve = xr(me); + return x1(Ve) ? !1 : (Fs( + We(me, p.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + Xr(R, p.Decorator_used_before_export_here) + ), !0); + } + J |= 32768, J & 98303 ? J & 32 && (ee = !0) : Se = !0, R ?? (R = me); + } else { + if (me.kind !== 148) { + if (r.kind === 171 || r.kind === 173) + return pr(me, p._0_modifier_cannot_appear_on_a_type_member, Ws(me.kind)); + if (r.kind === 181 && (me.kind !== 126 || !Qn(r.parent))) + return pr(me, p._0_modifier_cannot_appear_on_an_index_signature, Ws(me.kind)); + } + if (me.kind !== 103 && me.kind !== 147 && me.kind !== 87 && r.kind === 168) + return pr(me, p._0_modifier_cannot_appear_on_a_type_parameter, Ws(me.kind)); + switch (me.kind) { + case 87: { + if (r.kind !== 266 && r.kind !== 168) + return pr(r, p.A_class_member_cannot_have_the_0_keyword, Ws( + 87 + /* ConstKeyword */ + )); + const ht = jp(r.parent) && H1(r.parent) || r.parent; + if (r.kind === 168 && !(so(ht) || Qn(ht) || Xm(ht) || wC(ht) || px(ht) || nA(ht) || um(ht))) + return pr(me, p._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, Ws(me.kind)); + break; + } + case 164: + if (J & 16) + return pr(me, p._0_modifier_already_seen, "override"); + if (J & 128) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); + if (J & 8) + return pr(me, p._0_modifier_must_precede_1_modifier, "override", "readonly"); + if (J & 512) + return pr(me, p._0_modifier_must_precede_1_modifier, "override", "accessor"); + if (J & 1024) + return pr(me, p._0_modifier_must_precede_1_modifier, "override", "async"); + J |= 16, I = me; + break; + case 125: + case 124: + case 123: + const Ve = Rv(qT(me.kind)); + if (J & 7) + return pr(me, p.Accessibility_modifier_already_seen); + if (J & 16) + return pr(me, p._0_modifier_must_precede_1_modifier, Ve, "override"); + if (J & 256) + return pr(me, p._0_modifier_must_precede_1_modifier, Ve, "static"); + if (J & 512) + return pr(me, p._0_modifier_must_precede_1_modifier, Ve, "accessor"); + if (J & 8) + return pr(me, p._0_modifier_must_precede_1_modifier, Ve, "readonly"); + if (J & 1024) + return pr(me, p._0_modifier_must_precede_1_modifier, Ve, "async"); + if (r.parent.kind === 268 || r.parent.kind === 307) + return pr(me, p._0_modifier_cannot_appear_on_a_module_or_namespace_element, Ve); + if (J & 64) + return me.kind === 123 ? pr(me, p._0_modifier_cannot_be_used_with_1_modifier, Ve, "abstract") : pr(me, p._0_modifier_must_precede_1_modifier, Ve, "abstract"); + if (Pu(r)) + return pr(me, p.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); + J |= qT(me.kind); + break; + case 126: + if (J & 256) + return pr(me, p._0_modifier_already_seen, "static"); + if (J & 8) + return pr(me, p._0_modifier_must_precede_1_modifier, "static", "readonly"); + if (J & 1024) + return pr(me, p._0_modifier_must_precede_1_modifier, "static", "async"); + if (J & 512) + return pr(me, p._0_modifier_must_precede_1_modifier, "static", "accessor"); + if (r.parent.kind === 268 || r.parent.kind === 307) + return pr(me, p._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); + if (r.kind === 169) + return pr(me, p._0_modifier_cannot_appear_on_a_parameter, "static"); + if (J & 64) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); + if (J & 16) + return pr(me, p._0_modifier_must_precede_1_modifier, "static", "override"); + J |= 256, m = me; + break; + case 129: + if (J & 512) + return pr(me, p._0_modifier_already_seen, "accessor"); + if (J & 8) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); + if (J & 128) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); + if (r.kind !== 172) + return pr(me, p.accessor_modifier_can_only_appear_on_a_property_declaration); + J |= 512; + break; + case 148: + if (J & 8) + return pr(me, p._0_modifier_already_seen, "readonly"); + if (r.kind !== 172 && r.kind !== 171 && r.kind !== 181 && r.kind !== 169) + return pr(me, p.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); + if (J & 512) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); + J |= 8; + break; + case 95: + if (F.verbatimModuleSyntax && !(r.flags & 33554432) && r.kind !== 265 && r.kind !== 264 && // ModuleDeclaration needs to be checked that it is uninstantiated later + r.kind !== 267 && r.parent.kind === 307 && (L === 1 || xr(r).impliedNodeFormat === 1)) + return pr(me, p.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (J & 32) + return pr(me, p._0_modifier_already_seen, "export"); + if (J & 128) + return pr(me, p._0_modifier_must_precede_1_modifier, "export", "declare"); + if (J & 64) + return pr(me, p._0_modifier_must_precede_1_modifier, "export", "abstract"); + if (J & 1024) + return pr(me, p._0_modifier_must_precede_1_modifier, "export", "async"); + if (Qn(r.parent)) + return pr(me, p._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); + if (r.kind === 169) + return pr(me, p._0_modifier_cannot_appear_on_a_parameter, "export"); + if (f === 4) + return pr(me, p._0_modifier_cannot_appear_on_a_using_declaration, "export"); + if (f === 6) + return pr(me, p._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); + J |= 32; + break; + case 90: + const mt = r.parent.kind === 307 ? r.parent : r.parent.parent; + if (mt.kind === 267 && !wu(mt)) + return pr(me, p.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); + if (f === 4) + return pr(me, p._0_modifier_cannot_appear_on_a_using_declaration, "default"); + if (f === 6) + return pr(me, p._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); + if (J & 32) { + if (ee) + return pr(R, p.Decorators_are_not_valid_here); + } else return pr(me, p._0_modifier_must_precede_1_modifier, "export", "default"); + J |= 2048; + break; + case 138: + if (J & 128) + return pr(me, p._0_modifier_already_seen, "declare"); + if (J & 1024) + return pr(me, p._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + if (J & 16) + return pr(me, p._0_modifier_cannot_be_used_in_an_ambient_context, "override"); + if (Qn(r.parent) && !rs(r)) + return pr(me, p._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); + if (r.kind === 169) + return pr(me, p._0_modifier_cannot_appear_on_a_parameter, "declare"); + if (f === 4) + return pr(me, p._0_modifier_cannot_appear_on_a_using_declaration, "declare"); + if (f === 6) + return pr(me, p._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); + if (r.parent.flags & 33554432 && r.parent.kind === 268) + return pr(me, p.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); + if (Pu(r)) + return pr(me, p._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); + if (J & 512) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); + J |= 128, y = me; + break; + case 128: + if (J & 64) + return pr(me, p._0_modifier_already_seen, "abstract"); + if (r.kind !== 263 && r.kind !== 185) { + if (r.kind !== 174 && r.kind !== 172 && r.kind !== 177 && r.kind !== 178) + return pr(me, p.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); + if (!(r.parent.kind === 263 && Vn( + r.parent, + 64 + /* Abstract */ + ))) { + const ht = r.kind === 172 ? p.Abstract_properties_can_only_appear_within_an_abstract_class : p.Abstract_methods_can_only_appear_within_an_abstract_class; + return pr(me, ht); + } + if (J & 256) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); + if (J & 2) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); + if (J & 1024 && x) + return pr(x, p._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + if (J & 16) + return pr(me, p._0_modifier_must_precede_1_modifier, "abstract", "override"); + if (J & 512) + return pr(me, p._0_modifier_must_precede_1_modifier, "abstract", "accessor"); + } + if (Bl(r) && r.name.kind === 81) + return pr(me, p._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); + J |= 64; + break; + case 134: + if (J & 1024) + return pr(me, p._0_modifier_already_seen, "async"); + if (J & 128 || r.parent.flags & 33554432) + return pr(me, p._0_modifier_cannot_be_used_in_an_ambient_context, "async"); + if (r.kind === 169) + return pr(me, p._0_modifier_cannot_appear_on_a_parameter, "async"); + if (J & 64) + return pr(me, p._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + J |= 1024, x = me; + break; + case 103: + case 147: { + const ht = me.kind === 103 ? 8192 : 16384, er = me.kind === 103 ? "in" : "out", tr = jp(r.parent) && (H1(r.parent) || Nn((a = fC(r.parent)) == null ? void 0 : a.tags, uS)) || r.parent; + if (r.kind !== 168 || tr && !(Vl(tr) || Qn(tr) || Rp(tr) || uS(tr))) + return pr(me, p._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, er); + if (J & ht) + return pr(me, p._0_modifier_already_seen, er); + if (ht & 8192 && J & 16384) + return pr(me, p._0_modifier_must_precede_1_modifier, "in", "out"); + J |= ht; + break; + } + } + } + return r.kind === 176 ? J & 256 ? pr(m, p._0_modifier_cannot_appear_on_a_constructor_declaration, "static") : J & 16 ? pr(I, p._0_modifier_cannot_appear_on_a_constructor_declaration, "override") : J & 1024 ? pr(x, p._0_modifier_cannot_appear_on_a_constructor_declaration, "async") : !1 : (r.kind === 272 || r.kind === 271) && J & 128 ? pr(y, p.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare") : r.kind === 169 && J & 31 && Ts(r.name) ? pr(r, p.A_parameter_property_may_not_be_declared_using_a_binding_pattern) : r.kind === 169 && J & 31 && r.dotDotDotToken ? pr(r, p.A_parameter_property_cannot_be_declared_using_a_rest_parameter) : J & 1024 ? Klt(r, x) : !1; + } + function Xlt(r) { + if (!r.modifiers) return !1; + const a = Qlt(r); + return a && Ml(a, p.Modifiers_cannot_appear_here); + } + function cX(r, a) { + const l = Nn(r.modifiers, Qs); + return l && l.kind !== a ? l : void 0; + } + function Qlt(r) { + switch (r.kind) { + case 177: + case 178: + case 176: + case 172: + case 171: + case 174: + case 173: + case 181: + case 267: + case 272: + case 271: + case 278: + case 277: + case 218: + case 219: + case 169: + case 168: + return; + case 175: + case 303: + case 304: + case 270: + case 282: + return Nn(r.modifiers, Qs); + default: + if (r.parent.kind === 268 || r.parent.kind === 307) + return; + switch (r.kind) { + case 262: + return cX( + r, + 134 + /* AsyncKeyword */ + ); + case 263: + case 185: + return cX( + r, + 128 + /* AbstractKeyword */ + ); + case 231: + case 264: + case 265: + return Nn(r.modifiers, Qs); + case 243: + return r.declarationList.flags & 4 ? cX( + r, + 135 + /* AwaitKeyword */ + ) : Nn(r.modifiers, Qs); + case 266: + return cX( + r, + 87 + /* ConstKeyword */ + ); + default: + E.assertNever(r); + } + } + } + function Ylt(r) { + const a = Zlt(r); + return a && Ml(a, p.Decorators_are_not_valid_here); + } + function Zlt(r) { + return rz(r) ? Nn(r.modifiers, dl) : void 0; + } + function Klt(r, a) { + switch (r.kind) { + case 174: + case 262: + case 218: + case 219: + return !1; + } + return pr(a, p._0_modifier_cannot_be_used_here, "async"); + } + function Mk(r, a = p.Trailing_comma_not_allowed) { + return r && r.hasTrailingComma ? D2(r[0], r.end - 1, 1, a) : !1; + } + function U7e(r, a) { + if (r && r.length === 0) { + const l = r.pos - 1, f = sa(a.text, r.end) + 1; + return D2(a, l, f - l, p.Type_parameter_list_cannot_be_empty); + } + return !1; + } + function eut(r) { + let a = !1; + const l = r.length; + for (let f = 0; f < l; f++) { + const m = r[f]; + if (m.dotDotDotToken) { + if (f !== l - 1) + return pr(m.dotDotDotToken, p.A_rest_parameter_must_be_last_in_a_parameter_list); + if (m.flags & 33554432 || Mk(r, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), m.questionToken) + return pr(m.questionToken, p.A_rest_parameter_cannot_be_optional); + if (m.initializer) + return pr(m.name, p.A_rest_parameter_cannot_have_an_initializer); + } else if (Rfe(m)) { + if (a = !0, m.questionToken && m.initializer) + return pr(m.name, p.Parameter_cannot_have_question_mark_and_initializer); + } else if (a && !m.initializer) + return pr(m.name, p.A_required_parameter_cannot_follow_an_optional_parameter); + } + } + function tut(r) { + return Ln(r, (a) => !!a.initializer || Ts(a.name) || Um(a)); + } + function rut(r) { + if (V >= 3) { + const a = r.body && ms(r.body) && ZJ(r.body.statements); + if (a) { + const l = tut(r.parameters); + if (Dr(l)) { + rr(l, (m) => { + Fs( + We(m, p.This_parameter_is_not_allowed_with_use_strict_directive), + Xr(a, p.use_strict_directive_used_here) + ); + }); + const f = l.map((m, y) => y === 0 ? Xr(m, p.Non_simple_parameter_declared_here) : Xr(m, p.and_here)); + return Fs(We(a, p.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...f), !0; + } + } + } + return !1; + } + function lX(r) { + const a = xr(r); + return nh(r) || U7e(r.typeParameters, a) || eut(r.parameters) || iut(r, a) || so(r) && rut(r); + } + function nut(r) { + const a = xr(r); + return lut(r) || U7e(r.typeParameters, a); + } + function iut(r, a) { + if (!xo(r)) + return !1; + r.typeParameters && !(Dr(r.typeParameters) > 1 || r.typeParameters.hasTrailingComma || r.typeParameters[0].constraint) && a && Lc(a.fileName, [ + ".mts", + ".cts" + /* Cts */ + ]) && pr(r.typeParameters[0], p.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint); + const { equalsGreaterThanToken: l } = r, f = Vs(a, l.pos).line, m = Vs(a, l.end).line; + return f !== m && pr(l, p.Line_terminator_not_permitted_before_arrow); + } + function sut(r) { + const a = r.parameters[0]; + if (r.parameters.length !== 1) + return pr(a ? a.name : r, p.An_index_signature_must_have_exactly_one_parameter); + if (Mk(r.parameters, p.An_index_signature_cannot_have_a_trailing_comma), a.dotDotDotToken) + return pr(a.dotDotDotToken, p.An_index_signature_cannot_have_a_rest_parameter); + if (PB(a)) + return pr(a.name, p.An_index_signature_parameter_cannot_have_an_accessibility_modifier); + if (a.questionToken) + return pr(a.questionToken, p.An_index_signature_parameter_cannot_have_a_question_mark); + if (a.initializer) + return pr(a.name, p.An_index_signature_parameter_cannot_have_an_initializer); + if (!a.type) + return pr(a.name, p.An_index_signature_parameter_must_have_a_type_annotation); + const l = xi(a.type); + return Hp(l, (f) => !!(f.flags & 8576)) || Ek(l) ? pr(a.name, p.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead) : V_(l, TG) ? r.type ? !1 : pr(r, p.An_index_signature_must_have_a_type_annotation) : pr(a.name, p.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type); + } + function aut(r) { + return nh(r) || sut(r); + } + function out(r, a) { + if (a && a.length === 0) { + const l = xr(r), f = a.pos - 1, m = sa(l.text, a.end) + 1; + return D2(l, f, m - f, p.Type_argument_list_cannot_be_empty); + } + return !1; + } + function $M(r, a) { + return Mk(a) || out(r, a); + } + function cut(r) { + return r.questionDotToken || r.flags & 64 ? pr(r.template, p.Tagged_template_expressions_are_not_permitted_in_an_optional_chain) : !1; + } + function q7e(r) { + const a = r.types; + if (Mk(a)) + return !0; + if (a && a.length === 0) { + const l = Ws(r.token); + return D2(r, a.pos, 0, p._0_list_cannot_be_empty, l); + } + return ut(a, H7e); + } + function H7e(r) { + return bh(r) && eD(r.expression) && r.typeArguments ? pr(r, p.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments) : $M(r, r.typeArguments); + } + function lut(r) { + let a = !1, l = !1; + if (!nh(r) && r.heritageClauses) + for (const f of r.heritageClauses) { + if (f.token === 96) { + if (a) + return Ml(f, p.extends_clause_already_seen); + if (l) + return Ml(f, p.extends_clause_must_precede_implements_clause); + if (f.types.length > 1) + return Ml(f.types[1], p.Classes_can_only_extend_a_single_class); + a = !0; + } else { + if (E.assert( + f.token === 119 + /* ImplementsKeyword */ + ), l) + return Ml(f, p.implements_clause_already_seen); + l = !0; + } + q7e(f); + } + } + function uut(r) { + let a = !1; + if (r.heritageClauses) + for (const l of r.heritageClauses) { + if (l.token === 96) { + if (a) + return Ml(l, p.extends_clause_already_seen); + a = !0; + } else + return E.assert( + l.token === 119 + /* ImplementsKeyword */ + ), Ml(l, p.Interface_declaration_cannot_have_implements_clause); + q7e(l); + } + return !1; + } + function uX(r) { + if (r.kind !== 167) + return !1; + const a = r; + return a.expression.kind === 226 && a.expression.operatorToken.kind === 28 ? pr(a.expression, p.A_comma_expression_is_not_allowed_in_a_computed_property_name) : !1; + } + function Bme(r) { + if (r.asteriskToken) { + if (E.assert( + r.kind === 262 || r.kind === 218 || r.kind === 174 + /* MethodDeclaration */ + ), r.flags & 33554432) + return pr(r.asteriskToken, p.Generators_are_not_allowed_in_an_ambient_context); + if (!r.body) + return pr(r.asteriskToken, p.An_overload_signature_cannot_be_declared_as_a_generator); + } + } + function Jme(r, a) { + return !!r && pr(r, a); + } + function G7e(r, a) { + return !!r && pr(r, a); + } + function _ut(r, a) { + const l = /* @__PURE__ */ new Map(); + for (const f of r.properties) { + if (f.kind === 305) { + if (a) { + const x = Ja(f.expression); + if (Wl(x) || Gs(x)) + return pr(f.expression, p.A_rest_element_cannot_contain_a_binding_pattern); + } + continue; + } + const m = f.name; + if (m.kind === 167 && uX(m), f.kind === 304 && !a && f.objectAssignmentInitializer && pr(f.equalsToken, p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern), m.kind === 81 && pr(m, p.Private_identifiers_are_not_allowed_outside_class_bodies), ed(f) && f.modifiers) + for (const x of f.modifiers) + Qs(x) && (x.kind !== 134 || f.kind !== 174) && pr(x, p._0_modifier_cannot_be_used_here, sc(x)); + else if (Zte(f) && f.modifiers) + for (const x of f.modifiers) + Qs(x) && pr(x, p._0_modifier_cannot_be_used_here, sc(x)); + let y; + switch (f.kind) { + case 304: + case 303: + G7e(f.exclamationToken, p.A_definite_assignment_assertion_is_not_permitted_in_this_context), Jme(f.questionToken, p.An_object_member_cannot_be_declared_optional), m.kind === 9 && t5e(m), y = 4; + break; + case 174: + y = 8; + break; + case 177: + y = 1; + break; + case 178: + y = 2; + break; + default: + E.assertNever(f, "Unexpected syntax kind:" + f.kind); + } + if (!a) { + const x = Vme(m); + if (x === void 0) + continue; + const I = l.get(x); + if (!I) + l.set(x, y); + else if (y & 8 && I & 8) + pr(m, p.Duplicate_identifier_0, sc(m)); + else if (y & 4 && I & 4) + pr(m, p.An_object_literal_cannot_have_multiple_properties_with_the_same_name, sc(m)); + else if (y & 3 && I & 3) + if (I !== 3 && y !== I) + l.set(x, y | I); + else + return pr(m, p.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); + else + return pr(m, p.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); + } + } + } + function fut(r) { + put(r.tagName), $M(r, r.typeArguments); + const a = /* @__PURE__ */ new Map(); + for (const l of r.attributes.properties) { + if (l.kind === 293) + continue; + const { name: f, initializer: m } = l, y = H4(f); + if (!a.get(y)) + a.set(y, !0); + else + return pr(f, p.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); + if (m && m.kind === 294 && !m.expression) + return pr(m, p.JSX_attributes_must_only_be_assigned_a_non_empty_expression); + } + } + function put(r) { + if (Dn(r) && Cd(r.expression)) + return pr(r.expression, p.JSX_property_access_expressions_cannot_include_JSX_namespace_names); + if (Cd(r) && l5(F) && !hC(r.namespace.escapedText)) + return pr(r, p.React_components_cannot_include_JSX_namespace_names); + } + function dut(r) { + if (r.expression && _D(r.expression)) + return pr(r.expression, p.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array); + } + function $7e(r) { + if (Xh(r)) + return !0; + if (r.kind === 250 && r.awaitModifier && !(r.flags & 65536)) { + const a = xr(r); + if (y7(r)) { + if (!x1(a)) + switch (NT(a, F) || La.add(Xr(r.awaitModifier, p.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module)), L) { + case 100: + case 199: + if (a.impliedNodeFormat === 1) { + La.add( + Xr(r.awaitModifier, p.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) + ); + break; + } + case 7: + case 99: + case 4: + if (V >= 4) + break; + default: + La.add( + Xr(r.awaitModifier, p.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher) + ); + break; + } + } else if (!x1(a)) { + const l = Xr(r.awaitModifier, p.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules), f = yf(r); + if (f && f.kind !== 176) { + E.assert((jc(f) & 2) === 0, "Enclosing function should never be an async function."); + const m = Xr(f, p.Did_you_mean_to_mark_this_function_as_async); + Fs(l, m); + } + return La.add(l), !0; + } + } + if (sA(r) && !(r.flags & 65536) && Re(r.initializer) && r.initializer.escapedText === "async") + return pr(r.initializer, p.The_left_hand_side_of_a_for_of_statement_may_not_be_async), !1; + if (r.initializer.kind === 261) { + const a = r.initializer; + if (!Wme(a)) { + const l = a.declarations; + if (!l.length) + return !1; + if (l.length > 1) { + const m = r.kind === 249 ? p.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : p.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; + return Ml(a.declarations[1], m); + } + const f = l[0]; + if (f.initializer) { + const m = r.kind === 249 ? p.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : p.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; + return pr(f.name, m); + } + if (f.type) { + const m = r.kind === 249 ? p.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : p.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; + return pr(f, m); + } + } + } + return !1; + } + function mut(r) { + if (!(r.flags & 33554432) && r.parent.kind !== 187 && r.parent.kind !== 264) { + if (V < 2 && wi(r.name)) + return pr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (r.body === void 0 && !Vn( + r, + 64 + /* Abstract */ + )) + return D2(r, r.end - 1, 1, p._0_expected, "{"); + } + if (r.body) { + if (Vn( + r, + 64 + /* Abstract */ + )) + return pr(r, p.An_abstract_accessor_cannot_have_an_implementation); + if (r.parent.kind === 187 || r.parent.kind === 264) + return pr(r.body, p.An_implementation_cannot_be_declared_in_ambient_contexts); + } + if (r.typeParameters) + return pr(r.name, p.An_accessor_cannot_have_type_parameters); + if (!gut(r)) + return pr( + r.name, + r.kind === 177 ? p.A_get_accessor_cannot_have_parameters : p.A_set_accessor_must_have_exactly_one_parameter + ); + if (r.kind === 178) { + if (r.type) + return pr(r.name, p.A_set_accessor_cannot_have_a_return_type_annotation); + const a = E.checkDefined(bC(r), "Return value does not match parameter count assertion."); + if (a.dotDotDotToken) + return pr(a.dotDotDotToken, p.A_set_accessor_cannot_have_rest_parameter); + if (a.questionToken) + return pr(a.questionToken, p.A_set_accessor_cannot_have_an_optional_parameter); + if (a.initializer) + return pr(r.name, p.A_set_accessor_parameter_cannot_have_an_initializer); + } + return !1; + } + function gut(r) { + return zme(r) || r.parameters.length === (r.kind === 177 ? 0 : 1); + } + function zme(r) { + if (r.parameters.length === (r.kind === 177 ? 1 : 2)) + return bb(r); + } + function hut(r) { + if (r.operator === 158) { + if (r.type.kind !== 155) + return pr(r.type, p._0_expected, Ws( + 155 + /* SymbolKeyword */ + )); + let a = v3(r.parent); + if (Qr(a) && nv(a)) { + const l = hb(a); + l && (a = JT(l) || l); + } + switch (a.kind) { + case 260: + const l = a; + if (l.name.kind !== 80) + return pr(r, p.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); + if (!i4(l)) + return pr(r, p.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement); + if (!(l.parent.flags & 2)) + return pr(a.name, p.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); + break; + case 172: + if (!Os(a) || !T4(a)) + return pr(a.name, p.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); + break; + case 171: + if (!Vn( + a, + 8 + /* Readonly */ + )) + return pr(a.name, p.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); + break; + default: + return pr(r, p.unique_symbol_types_are_not_allowed_here); + } + } else if (r.operator === 148 && r.type.kind !== 188 && r.type.kind !== 189) + return Ml(r, p.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, Ws( + 155 + /* SymbolKeyword */ + )); + } + function QP(r, a) { + if (kZe(r)) + return pr(r, a); + } + function X7e(r) { + if (lX(r)) + return !0; + if (r.kind === 174) { + if (r.parent.kind === 210) { + if (r.modifiers && !(r.modifiers.length === 1 && fa(r.modifiers).kind === 134)) + return Ml(r, p.Modifiers_cannot_appear_here); + if (Jme(r.questionToken, p.An_object_member_cannot_be_declared_optional)) + return !0; + if (G7e(r.exclamationToken, p.A_definite_assignment_assertion_is_not_permitted_in_this_context)) + return !0; + if (r.body === void 0) + return D2(r, r.end - 1, 1, p._0_expected, "{"); + } + if (Bme(r)) + return !0; + } + if (Qn(r.parent)) { + if (V < 2 && wi(r.name)) + return pr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (r.flags & 33554432) + return QP(r.name, p.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + if (r.kind === 174 && !r.body) + return QP(r.name, p.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + } else { + if (r.parent.kind === 264) + return QP(r.name, p.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + if (r.parent.kind === 187) + return QP(r.name, p.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); + } + } + function yut(r) { + let a = r; + for (; a; ) { + if (Qk(a)) + return pr(r, p.Jump_target_cannot_cross_function_boundary); + switch (a.kind) { + case 256: + if (r.label && a.label.escapedText === r.label.escapedText) + return r.kind === 251 && !fy( + a.statement, + /*lookInLabeledStatements*/ + !0 + ) ? pr(r, p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement) : !1; + break; + case 255: + if (r.kind === 252 && !r.label) + return !1; + break; + default: + if (fy( + a, + /*lookInLabeledStatements*/ + !1 + ) && !r.label) + return !1; + break; + } + a = a.parent; + } + if (r.label) { + const l = r.kind === 252 ? p.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; + return pr(r, l); + } else { + const l = r.kind === 252 ? p.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : p.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; + return pr(r, l); + } + } + function vut(r) { + if (r.dotDotDotToken) { + const a = r.parent.elements; + if (r !== ia(a)) + return pr(r, p.A_rest_element_must_be_last_in_a_destructuring_pattern); + if (Mk(a, p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma), r.propertyName) + return pr(r.name, p.A_rest_element_cannot_have_a_property_name); + } + if (r.dotDotDotToken && r.initializer) + return D2(r, r.initializer.pos - 1, 1, p.A_rest_element_cannot_have_an_initializer); + } + function Q7e(r) { + return Pf(r) || r.kind === 224 && r.operator === 41 && r.operand.kind === 9; + } + function but(r) { + return r.kind === 10 || r.kind === 224 && r.operator === 41 && r.operand.kind === 10; + } + function Sut(r) { + if ((Dn(r) || ho(r) && Q7e(r.argumentExpression)) && fo(r.expression)) + return !!(Dc(r).flags & 1056); + } + function Y7e(r) { + const a = r.initializer; + if (a) { + const l = !(Q7e(a) || Sut(a) || a.kind === 112 || a.kind === 97 || but(a)); + if ((Gw(r) || ti(r) && rI(r)) && !r.type) { + if (l) + return pr(a, p.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); + } else + return pr(a, p.Initializers_are_not_allowed_in_ambient_contexts); + } + } + function Tut(r) { + const a = P2(r), l = a & 7; + if (Ts(r.name)) + switch (l) { + case 6: + return pr(r, p._0_declarations_may_not_have_binding_patterns, "await using"); + case 4: + return pr(r, p._0_declarations_may_not_have_binding_patterns, "using"); + } + if (r.parent.parent.kind !== 249 && r.parent.parent.kind !== 250) { + if (a & 33554432) + Y7e(r); + else if (!r.initializer) { + if (Ts(r.name) && !Ts(r.parent)) + return pr(r, p.A_destructuring_declaration_must_have_an_initializer); + switch (l) { + case 6: + return pr(r, p._0_declarations_must_be_initialized, "await using"); + case 4: + return pr(r, p._0_declarations_must_be_initialized, "using"); + case 2: + return pr(r, p._0_declarations_must_be_initialized, "const"); + } + } + } + if (r.exclamationToken && (r.parent.parent.kind !== 243 || !r.type || r.initializer || a & 33554432)) { + const f = r.initializer ? p.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : r.type ? p.A_definite_assignment_assertion_is_not_permitted_in_this_context : p.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations; + return pr(r.exclamationToken, f); + } + return (L < 5 || xr(r).impliedNodeFormat === 1) && L !== 4 && !(r.parent.parent.flags & 33554432) && Vn( + r.parent.parent, + 32 + /* Export */ + ) && Z7e(r.name), !!l && K7e(r.name); + } + function Z7e(r) { + if (r.kind === 80) { + if (dn(r) === "__esModule") + return Cut("noEmit", r, p.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); + } else { + const a = r.elements; + for (const l of a) + if (!ml(l)) + return Z7e(l.name); + } + return !1; + } + function K7e(r) { + if (r.kind === 80) { + if (r.escapedText === "let") + return pr(r, p.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); + } else { + const a = r.elements; + for (const l of a) + ml(l) || K7e(l.name); + } + return !1; + } + function Wme(r) { + const a = r.declarations; + if (Mk(r.declarations)) + return !0; + if (!r.declarations.length) + return D2(r, a.pos, a.end - a.pos, p.Variable_declaration_list_cannot_be_empty); + const l = r.flags & 7; + return (l === 4 || l === 6) && X5(r.parent) ? pr( + r, + l === 4 ? p.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : p.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration + ) : l === 6 ? hIe(r) : !1; + } + function e5e(r) { + switch (r.kind) { + case 245: + case 246: + case 247: + case 254: + case 248: + case 249: + case 250: + return !1; + case 256: + return e5e(r.parent); + } + return !0; + } + function xut(r) { + if (!e5e(r.parent)) { + const a = P2(r.declarationList) & 7; + if (a) { + const l = a === 1 ? "let" : a === 2 ? "const" : a === 4 ? "using" : a === 6 ? "await using" : E.fail("Unknown BlockScope flag"); + return pr(r, p._0_declarations_can_only_be_declared_inside_a_block, l); + } + } + } + function kut(r) { + const a = r.name.escapedText; + switch (r.keywordToken) { + case 105: + if (a !== "target") + return pr(r.name, p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, Pi(r.name.escapedText), Ws(r.keywordToken), "target"); + break; + case 102: + if (a !== "meta") + return pr(r.name, p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, Pi(r.name.escapedText), Ws(r.keywordToken), "meta"); + break; + } + } + function x1(r) { + return r.parseDiagnostics.length > 0; + } + function Ml(r, a, ...l) { + const f = xr(r); + if (!x1(f)) { + const m = Hm(f, r.pos); + return La.add(xl(f, m.start, m.length, a, ...l)), !0; + } + return !1; + } + function D2(r, a, l, f, ...m) { + const y = xr(r); + return x1(y) ? !1 : (La.add(xl(y, a, l, f, ...m)), !0); + } + function Cut(r, a, l, ...f) { + const m = xr(a); + return x1(m) ? !1 : (Fd(r, a, l, ...f), !0); + } + function pr(r, a, ...l) { + const f = xr(r); + return x1(f) ? !1 : (La.add(Xr(r, a, ...l)), !0); + } + function Eut(r) { + const a = Qr(r) ? V7(r) : void 0, l = r.typeParameters || a && ul(a); + if (l) { + const f = l.pos === l.end ? l.pos : sa(xr(r).text, l.pos); + return D2(r, f, l.end - f, p.Type_parameters_cannot_appear_on_a_constructor_declaration); + } + } + function Dut(r) { + const a = r.type || K_(r); + if (a) + return pr(a, p.Type_annotation_cannot_appear_on_a_constructor_declaration); + } + function Put(r) { + if (oa(r.name) && cn(r.name.expression) && r.name.expression.operatorToken.kind === 103) + return pr(r.parent.members[0], p.A_mapped_type_may_not_declare_properties_or_methods); + if (Qn(r.parent)) { + if (Ks(r.name) && r.name.text === "constructor") + return pr(r.name, p.Classes_may_not_have_a_field_named_constructor); + if (QP(r.name, p.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) + return !0; + if (V < 2 && wi(r.name)) + return pr(r.name, p.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (V < 2 && u_(r)) + return pr(r.name, p.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher); + if (u_(r) && Jme(r.questionToken, p.An_accessor_property_cannot_be_declared_optional)) + return !0; + } else if (r.parent.kind === 264) { + if (QP(r.name, p.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) + return !0; + if (E.assertNode(r, I_), r.initializer) + return pr(r.initializer, p.An_interface_property_cannot_have_an_initializer); + } else if (Xu(r.parent)) { + if (QP(r.name, p.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) + return !0; + if (E.assertNode(r, I_), r.initializer) + return pr(r.initializer, p.A_type_literal_property_cannot_have_an_initializer); + } + if (r.flags & 33554432 && Y7e(r), rs(r) && r.exclamationToken && (!Qn(r.parent) || !r.type || r.initializer || r.flags & 33554432 || Os(r) || xb(r))) { + const a = r.initializer ? p.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : r.type ? p.A_definite_assignment_assertion_is_not_permitted_in_this_context : p.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations; + return pr(r.exclamationToken, a); + } + } + function wut(r) { + return r.kind === 264 || r.kind === 265 || r.kind === 272 || r.kind === 271 || r.kind === 278 || r.kind === 277 || r.kind === 270 || Vn( + r, + 2208 + /* Default */ + ) ? !1 : Ml(r, p.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); + } + function Aut(r) { + for (const a of r.statements) + if ((tu(a) || a.kind === 243) && wut(a)) + return !0; + return !1; + } + function Nut(r) { + return !!(r.flags & 33554432) && Aut(r); + } + function Xh(r) { + if (r.flags & 33554432) { + if (!bn(r).hasReportedStatementInAmbientContext && (ps(r.parent) || _y(r.parent))) + return bn(r).hasReportedStatementInAmbientContext = Ml(r, p.An_implementation_cannot_be_declared_in_ambient_contexts); + if (r.parent.kind === 241 || r.parent.kind === 268 || r.parent.kind === 307) { + const l = bn(r.parent); + if (!l.hasReportedStatementInAmbientContext) + return l.hasReportedStatementInAmbientContext = Ml(r, p.Statements_are_not_allowed_in_ambient_contexts); + } + } + return !1; + } + function t5e(r) { + const a = sc(r).includes("."), l = r.numericLiteralFlags & 16; + a || l || +r.text <= 2 ** 53 - 1 || Vy( + /*isError*/ + !1, + Xr(r, p.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers) + ); + } + function Iut(r) { + return !!(!(y0(r.parent) || Ey(r.parent) && y0(r.parent.parent)) && V < 7 && pr(r, p.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)); + } + function Out(r, a, ...l) { + const f = xr(r); + if (!x1(f)) { + const m = Hm(f, r.pos); + return La.add(xl( + f, + wc(m), + /*length*/ + 0, + a, + ...l + )), !0; + } + return !1; + } + function Fut() { + return cl || (cl = [], ve.forEach((r, a) => { + hne.test(a) && cl.push(r); + })), cl; + } + function Lut(r) { + var a; + return r.isTypeOnly && r.name && r.namedBindings ? pr(r, p.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both) : r.isTypeOnly && ((a = r.namedBindings) == null ? void 0 : a.kind) === 275 ? r5e(r.namedBindings) : !1; + } + function r5e(r) { + return !!rr(r.elements, (a) => { + if (a.isTypeOnly) + return Ml( + a, + a.kind === 276 ? p.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : p.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement + ); + }); + } + function Mut(r) { + if (F.verbatimModuleSyntax && L === 1) + return pr(r, p.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); + if (L === 5) + return pr(r, p.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext); + if (r.typeArguments) + return pr(r, p.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); + const a = r.arguments; + if (L !== 99 && L !== 199 && L !== 100 && (Mk(a), a.length > 1)) { + const f = a[1]; + return pr(f, p.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); + } + if (a.length === 0 || a.length > 2) + return pr(r, p.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); + const l = Nn(a, cp); + return l ? pr(l, p.Argument_of_dynamic_import_cannot_be_spread_element) : !1; + } + function Rut(r, a) { + const l = wn(r); + if (l & 20 && a.flags & 1048576) + return Nn(a.types, (f) => { + if (f.flags & 524288) { + const m = l & wn(f); + if (m & 4) + return r.target === f.target; + if (m & 16) + return !!r.aliasSymbol && r.aliasSymbol === f.aliasSymbol; + } + return !1; + }); + } + function jut(r, a) { + if (wn(r) & 128 && Hp(a, Y0)) + return Nn(a.types, (l) => !Y0(l)); + } + function But(r, a) { + let l = 0; + if (xs(r, l).length > 0 || (l = 1, xs(r, l).length > 0)) + return Nn(a.types, (m) => xs(m, l).length > 0); + } + function Jut(r, a) { + let l; + if (!(r.flags & 406978556)) { + let f = 0; + for (const m of a.types) + if (!(m.flags & 406978556)) { + const y = Ys([Dm(r), Dm(m)]); + if (y.flags & 4194304) + return m; + if (Vd(y) || y.flags & 1048576) { + const x = y.flags & 1048576 ? ty(y.types, Vd) : 1; + x >= f && (l = m, f = x); + } + } + } + return l; + } + function zut(r) { + if (Sc( + r, + 67108864 + /* NonPrimitive */ + )) { + const a = Jc(r, (l) => !(l.flags & 402784252)); + if (!(a.flags & 131072)) + return a; + } + return r; + } + function n5e(r, a, l) { + if (a.flags & 1048576 && r.flags & 2621440) { + const f = cNe(a, r); + if (f) + return f; + const m = Wa(r); + if (m) { + const y = oNe(m, a); + if (y) { + const x = Ppe(a, or(y, (I) => [() => Zr(I), I.escapedName]), l); + if (x !== a) + return x; + } + } + } + } + function Vme(r) { + const a = Y2(r); + return a || (oa(r) ? ede($l(r.expression)) : void 0); + } + function _X(r) { + return Wt === r || (Wt = r, nr = L1(r)), nr; + } + function P2(r) { + return Be === r || (Be = r, at = ch(r)), at; + } + function rI(r) { + const a = P2(r) & 7; + return a === 2 || a === 4 || a === 6; + } + function Wut(r, a) { + const l = F.importHelpers ? 1 : 0, f = r?.imports[l]; + return f && E.assert(oo(f) && f.text === a, `Expected sourceFile.imports[${l}] to be the synthesized JSX runtime import`), f; + } + function Vut(r) { + E.assert(F.importHelpers, "Expected importHelpers to be enabled"); + const a = r.imports[0]; + return E.assert(a && oo(a) && a.text === "tslib", "Expected sourceFile.imports[0] to be the synthesized tslib import"), a; + } + } + function _Me(e) { + return !_y(e); + } + function G1e(e) { + return e.kind !== 262 && e.kind !== 174 || !!e.body; + } + function $1e(e) { + switch (e.parent.kind) { + case 276: + case 281: + return Re(e); + default: + return Gm(e); + } + } + var Ff; + ((e) => { + e.JSX = "JSX", e.IntrinsicElements = "IntrinsicElements", e.ElementClass = "ElementClass", e.ElementAttributesPropertyNameContainer = "ElementAttributesProperty", e.ElementChildrenAttributeNameContainer = "ElementChildrenAttribute", e.Element = "Element", e.ElementType = "ElementType", e.IntrinsicAttributes = "IntrinsicAttributes", e.IntrinsicClassAttributes = "IntrinsicClassAttributes", e.LibraryManagedAttributes = "LibraryManagedAttributes"; + })(Ff || (Ff = {})); + function X1e(e) { + switch (e) { + case 0: + return "yieldType"; + case 1: + return "returnType"; + case 2: + return "nextType"; + } + } + function gu(e) { + return !!(e.flags & 1); + } + function Yz(e) { + return !!(e.flags & 2); + } + function fMe(e) { + return { + getCommonSourceDirectory: e.getCommonSourceDirectory ? () => e.getCommonSourceDirectory() : () => "", + getCurrentDirectory: () => e.getCurrentDirectory(), + getSymlinkCache: Ns(e, e.getSymlinkCache), + getPackageJsonInfoCache: () => { + var t; + return (t = e.getPackageJsonInfoCache) == null ? void 0 : t.call(e); + }, + useCaseSensitiveFileNames: Ns(e, e.useCaseSensitiveFileNames), + redirectTargetsMap: e.redirectTargetsMap, + getProjectReferenceRedirect: (t) => e.getProjectReferenceRedirect(t), + isSourceOfProjectReferenceRedirect: (t) => e.isSourceOfProjectReferenceRedirect(t), + fileExists: (t) => e.fileExists(t), + getFileIncludeReasons: () => e.getFileIncludeReasons(), + readFile: e.readFile ? (t) => e.readFile(t) : void 0 + }; + } + var bne = class v5e { + constructor(t, n, i) { + this.moduleResolverHost = void 0, this.inner = void 0, this.disableTrackSymbol = !1; + for (var s; n instanceof v5e; ) + n = n.inner; + this.inner = n, this.moduleResolverHost = i, this.context = t, this.canTrackSymbol = !!((s = this.inner) != null && s.trackSymbol); + } + trackSymbol(t, n, i) { + var s, o; + if ((s = this.inner) != null && s.trackSymbol && !this.disableTrackSymbol) { + if (this.inner.trackSymbol(t, n, i)) + return this.onDiagnosticReported(), !0; + t.flags & 262144 || ((o = this.context).trackedSymbols ?? (o.trackedSymbols = [])).push([t, n, i]); + } + return !1; + } + reportInaccessibleThisError() { + var t; + (t = this.inner) != null && t.reportInaccessibleThisError && (this.onDiagnosticReported(), this.inner.reportInaccessibleThisError()); + } + reportPrivateInBaseOfClassExpression(t) { + var n; + (n = this.inner) != null && n.reportPrivateInBaseOfClassExpression && (this.onDiagnosticReported(), this.inner.reportPrivateInBaseOfClassExpression(t)); + } + reportInaccessibleUniqueSymbolError() { + var t; + (t = this.inner) != null && t.reportInaccessibleUniqueSymbolError && (this.onDiagnosticReported(), this.inner.reportInaccessibleUniqueSymbolError()); + } + reportCyclicStructureError() { + var t; + (t = this.inner) != null && t.reportCyclicStructureError && (this.onDiagnosticReported(), this.inner.reportCyclicStructureError()); + } + reportLikelyUnsafeImportRequiredError(t) { + var n; + (n = this.inner) != null && n.reportLikelyUnsafeImportRequiredError && (this.onDiagnosticReported(), this.inner.reportLikelyUnsafeImportRequiredError(t)); + } + reportTruncationError() { + var t; + (t = this.inner) != null && t.reportTruncationError && (this.onDiagnosticReported(), this.inner.reportTruncationError()); + } + reportNonlocalAugmentation(t, n, i) { + var s; + (s = this.inner) != null && s.reportNonlocalAugmentation && (this.onDiagnosticReported(), this.inner.reportNonlocalAugmentation(t, n, i)); + } + reportNonSerializableProperty(t) { + var n; + (n = this.inner) != null && n.reportNonSerializableProperty && (this.onDiagnosticReported(), this.inner.reportNonSerializableProperty(t)); + } + onDiagnosticReported() { + this.context.reportedDiagnostic = !0; + } + reportInferenceFallback(t) { + var n; + (n = this.inner) != null && n.reportInferenceFallback && this.inner.reportInferenceFallback(t); + } + }; + function Ge(e, t, n, i) { + if (e === void 0) + return e; + const s = t(e); + let o; + if (s !== void 0) + return ss(s) ? o = (i || yMe)(s) : o = s, E.assertNode(o, n), o; + } + function Ar(e, t, n, i, s) { + if (e === void 0) + return e; + const o = e.length; + (i === void 0 || i < 0) && (i = 0), (s === void 0 || s > o - i) && (s = o - i); + let c, _ = -1, u = -1; + i > 0 || s < o ? c = e.hasTrailingComma && i + s === o : (_ = e.pos, u = e.end, c = e.hasTrailingComma); + const d = Q1e(e, t, n, i, s); + if (d !== e) { + const g = N.createNodeArray(d, c); + return om(g, _, u), g; + } + return e; + } + function AA(e, t, n, i, s) { + if (e === void 0) + return e; + const o = e.length; + return (i === void 0 || i < 0) && (i = 0), (s === void 0 || s > o - i) && (s = o - i), Q1e(e, t, n, i, s); + } + function Q1e(e, t, n, i, s) { + let o; + const c = e.length; + (i > 0 || s < c) && (o = []); + for (let _ = 0; _ < s; _++) { + const u = e[_ + i], d = u !== void 0 ? t ? t(u) : u : void 0; + if ((o !== void 0 || d === void 0 || d !== u) && (o === void 0 && (o = e.slice(0, _), E.assertEachNode(o, n)), d)) + if (ss(d)) + for (const g of d) + E.assertNode(g, n), o.push(g); + else + E.assertNode(d, n), o.push(d); + } + return o || (E.assertEachNode(e, n), e); + } + function Zz(e, t, n, i, s, o = Ar) { + return n.startLexicalEnvironment(), e = o(e, t, hi, i), s && (e = n.factory.ensureUseStrict(e)), N.mergeLexicalEnvironment(e, n.endLexicalEnvironment()); + } + function cc(e, t, n, i = Ar) { + let s; + return n.startLexicalEnvironment(), e && (n.setLexicalEnvironmentFlags(1, !0), s = i(e, t, ji), n.getLexicalEnvironmentFlags() & 2 && pa(n.getCompilerOptions()) >= 2 && (s = pMe(s, n)), n.setLexicalEnvironmentFlags(1, !1)), n.suspendLexicalEnvironment(), s; + } + function pMe(e, t) { + let n; + for (let i = 0; i < e.length; i++) { + const s = e[i], o = dMe(s, t); + (n || o !== s) && (n || (n = e.slice(0, i)), n[i] = o); + } + return n ? ot(t.factory.createNodeArray(n, e.hasTrailingComma), e) : e; + } + function dMe(e, t) { + return e.dotDotDotToken ? e : Ts(e.name) ? mMe(e, t) : e.initializer ? gMe(e, e.name, e.initializer, t) : e; + } + function mMe(e, t) { + const { factory: n } = t; + return t.addInitializationStatement( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList([ + n.createVariableDeclaration( + e.name, + /*exclamationToken*/ + void 0, + e.type, + e.initializer ? n.createConditionalExpression( + n.createStrictEquality( + n.getGeneratedNameForNode(e), + n.createVoidZero() + ), + /*questionToken*/ + void 0, + e.initializer, + /*colonToken*/ + void 0, + n.getGeneratedNameForNode(e) + ) : n.getGeneratedNameForNode(e) + ) + ]) + ) + ), n.updateParameterDeclaration( + e, + e.modifiers, + e.dotDotDotToken, + n.getGeneratedNameForNode(e), + e.questionToken, + e.type, + /*initializer*/ + void 0 + ); + } + function gMe(e, t, n, i) { + const s = i.factory; + return i.addInitializationStatement( + s.createIfStatement( + s.createTypeCheck(s.cloneNode(t), "undefined"), + Kr( + ot( + s.createBlock([ + s.createExpressionStatement( + Kr( + ot( + s.createAssignment( + Kr( + s.cloneNode(t), + 96 + /* NoSourceMap */ + ), + Kr( + n, + 96 | ua(n) | 3072 + /* NoComments */ + ) + ), + e + ), + 3072 + /* NoComments */ + ) + ) + ]), + e + ), + 3905 + /* NoComments */ + ) + ) + ), s.updateParameterDeclaration( + e, + e.modifiers, + e.dotDotDotToken, + e.name, + e.questionToken, + e.type, + /*initializer*/ + void 0 + ); + } + function Lf(e, t, n, i = Ge) { + n.resumeLexicalEnvironment(); + const s = i(e, t, qI), o = n.endLexicalEnvironment(); + if (ut(o)) { + if (!s) + return n.factory.createBlock(o); + const c = n.factory.converters.convertToFunctionBlock(s), _ = N.mergeLexicalEnvironment(c.statements, o); + return n.factory.updateBlock(c, _); + } + return s; + } + function Zu(e, t, n, i = Ge) { + n.startBlockScope(); + const s = i(e, t, hi, n.factory.liftToBlock); + E.assert(s); + const o = n.endBlockScope(); + return ut(o) ? ms(s) ? (o.push(...s.statements), n.factory.updateBlock(s, o)) : (o.push(s), n.factory.createBlock(o)) : s; + } + function NA(e, t, n = t) { + if (n === t || e.length <= 1) + return Ar(e, t, ct); + let i = 0; + const s = e.length; + return Ar(e, (o) => { + const c = i < s - 1; + return i++, c ? n(o) : t(o); + }, ct); + } + function gr(e, t, n = RA, i = Ar, s, o = Ge) { + if (e === void 0) + return; + const c = hMe[e.kind]; + return c === void 0 ? e : c(e, t, n, i, o, s); + } + var hMe = { + 166: function(t, n, i, s, o, c) { + return i.factory.updateQualifiedName( + t, + E.checkDefined(o(t.left, n, l_)), + E.checkDefined(o(t.right, n, Re)) + ); + }, + 167: function(t, n, i, s, o, c) { + return i.factory.updateComputedPropertyName( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Signature elements + 168: function(t, n, i, s, o, c) { + return i.factory.updateTypeParameterDeclaration( + t, + s(t.modifiers, n, Qs), + E.checkDefined(o(t.name, n, Re)), + o(t.constraint, n, ai), + o(t.default, n, ai) + ); + }, + 169: function(t, n, i, s, o, c) { + return i.factory.updateParameterDeclaration( + t, + s(t.modifiers, n, Lo), + c ? o(t.dotDotDotToken, c, J5) : t.dotDotDotToken, + E.checkDefined(o(t.name, n, W2)), + c ? o(t.questionToken, c, xy) : t.questionToken, + o(t.type, n, ai), + o(t.initializer, n, ct) + ); + }, + 170: function(t, n, i, s, o, c) { + return i.factory.updateDecorator( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Type elements + 171: function(t, n, i, s, o, c) { + return i.factory.updatePropertySignature( + t, + s(t.modifiers, n, Qs), + E.checkDefined(o(t.name, n, Rc)), + c ? o(t.questionToken, c, xy) : t.questionToken, + o(t.type, n, ai) + ); + }, + 172: function(t, n, i, s, o, c) { + return i.factory.updatePropertyDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Rc)), + // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration + c ? o(t.questionToken ?? t.exclamationToken, c, Kte) : t.questionToken ?? t.exclamationToken, + o(t.type, n, ai), + o(t.initializer, n, ct) + ); + }, + 173: function(t, n, i, s, o, c) { + return i.factory.updateMethodSignature( + t, + s(t.modifiers, n, Qs), + E.checkDefined(o(t.name, n, Rc)), + c ? o(t.questionToken, c, xy) : t.questionToken, + s(t.typeParameters, n, Mo), + s(t.parameters, n, ji), + o(t.type, n, ai) + ); + }, + 174: function(t, n, i, s, o, c) { + return i.factory.updateMethodDeclaration( + t, + s(t.modifiers, n, Lo), + c ? o(t.asteriskToken, c, tA) : t.asteriskToken, + E.checkDefined(o(t.name, n, Rc)), + c ? o(t.questionToken, c, xy) : t.questionToken, + s(t.typeParameters, n, Mo), + cc(t.parameters, n, i, s), + o(t.type, n, ai), + Lf(t.body, n, i, o) + ); + }, + 176: function(t, n, i, s, o, c) { + return i.factory.updateConstructorDeclaration( + t, + s(t.modifiers, n, Lo), + cc(t.parameters, n, i, s), + Lf(t.body, n, i, o) + ); + }, + 177: function(t, n, i, s, o, c) { + return i.factory.updateGetAccessorDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Rc)), + cc(t.parameters, n, i, s), + o(t.type, n, ai), + Lf(t.body, n, i, o) + ); + }, + 178: function(t, n, i, s, o, c) { + return i.factory.updateSetAccessorDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Rc)), + cc(t.parameters, n, i, s), + Lf(t.body, n, i, o) + ); + }, + 175: function(t, n, i, s, o, c) { + return i.startLexicalEnvironment(), i.suspendLexicalEnvironment(), i.factory.updateClassStaticBlockDeclaration( + t, + Lf(t.body, n, i, o) + ); + }, + 179: function(t, n, i, s, o, c) { + return i.factory.updateCallSignature( + t, + s(t.typeParameters, n, Mo), + s(t.parameters, n, ji), + o(t.type, n, ai) + ); + }, + 180: function(t, n, i, s, o, c) { + return i.factory.updateConstructSignature( + t, + s(t.typeParameters, n, Mo), + s(t.parameters, n, ji), + o(t.type, n, ai) + ); + }, + 181: function(t, n, i, s, o, c) { + return i.factory.updateIndexSignature( + t, + s(t.modifiers, n, Lo), + s(t.parameters, n, ji), + E.checkDefined(o(t.type, n, ai)) + ); + }, + // Types + 182: function(t, n, i, s, o, c) { + return i.factory.updateTypePredicateNode( + t, + o(t.assertsModifier, n, Ste), + E.checkDefined(o(t.parameterName, n, ere)), + o(t.type, n, ai) + ); + }, + 183: function(t, n, i, s, o, c) { + return i.factory.updateTypeReferenceNode( + t, + E.checkDefined(o(t.typeName, n, l_)), + s(t.typeArguments, n, ai) + ); + }, + 184: function(t, n, i, s, o, c) { + return i.factory.updateFunctionTypeNode( + t, + s(t.typeParameters, n, Mo), + s(t.parameters, n, ji), + E.checkDefined(o(t.type, n, ai)) + ); + }, + 185: function(t, n, i, s, o, c) { + return i.factory.updateConstructorTypeNode( + t, + s(t.modifiers, n, Qs), + s(t.typeParameters, n, Mo), + s(t.parameters, n, ji), + E.checkDefined(o(t.type, n, ai)) + ); + }, + 186: function(t, n, i, s, o, c) { + return i.factory.updateTypeQueryNode( + t, + E.checkDefined(o(t.exprName, n, l_)), + s(t.typeArguments, n, ai) + ); + }, + 187: function(t, n, i, s, o, c) { + return i.factory.updateTypeLiteralNode( + t, + s(t.members, n, cb) + ); + }, + 188: function(t, n, i, s, o, c) { + return i.factory.updateArrayTypeNode( + t, + E.checkDefined(o(t.elementType, n, ai)) + ); + }, + 189: function(t, n, i, s, o, c) { + return i.factory.updateTupleTypeNode( + t, + s(t.elements, n, ai) + ); + }, + 190: function(t, n, i, s, o, c) { + return i.factory.updateOptionalTypeNode( + t, + E.checkDefined(o(t.type, n, ai)) + ); + }, + 191: function(t, n, i, s, o, c) { + return i.factory.updateRestTypeNode( + t, + E.checkDefined(o(t.type, n, ai)) + ); + }, + 192: function(t, n, i, s, o, c) { + return i.factory.updateUnionTypeNode( + t, + s(t.types, n, ai) + ); + }, + 193: function(t, n, i, s, o, c) { + return i.factory.updateIntersectionTypeNode( + t, + s(t.types, n, ai) + ); + }, + 194: function(t, n, i, s, o, c) { + return i.factory.updateConditionalTypeNode( + t, + E.checkDefined(o(t.checkType, n, ai)), + E.checkDefined(o(t.extendsType, n, ai)), + E.checkDefined(o(t.trueType, n, ai)), + E.checkDefined(o(t.falseType, n, ai)) + ); + }, + 195: function(t, n, i, s, o, c) { + return i.factory.updateInferTypeNode( + t, + E.checkDefined(o(t.typeParameter, n, Mo)) + ); + }, + 205: function(t, n, i, s, o, c) { + return i.factory.updateImportTypeNode( + t, + E.checkDefined(o(t.argument, n, ai)), + o(t.attributes, n, aS), + o(t.qualifier, n, l_), + s(t.typeArguments, n, ai), + t.isTypeOf + ); + }, + 302: function(t, n, i, s, o, c) { + return i.factory.updateImportTypeAssertionContainer( + t, + E.checkDefined(o(t.assertClause, n, Nte)), + t.multiLine + ); + }, + 202: function(t, n, i, s, o, c) { + return i.factory.updateNamedTupleMember( + t, + c ? o(t.dotDotDotToken, c, J5) : t.dotDotDotToken, + E.checkDefined(o(t.name, n, Re)), + c ? o(t.questionToken, c, xy) : t.questionToken, + E.checkDefined(o(t.type, n, ai)) + ); + }, + 196: function(t, n, i, s, o, c) { + return i.factory.updateParenthesizedType( + t, + E.checkDefined(o(t.type, n, ai)) + ); + }, + 198: function(t, n, i, s, o, c) { + return i.factory.updateTypeOperatorNode( + t, + E.checkDefined(o(t.type, n, ai)) + ); + }, + 199: function(t, n, i, s, o, c) { + return i.factory.updateIndexedAccessTypeNode( + t, + E.checkDefined(o(t.objectType, n, ai)), + E.checkDefined(o(t.indexType, n, ai)) + ); + }, + 200: function(t, n, i, s, o, c) { + return i.factory.updateMappedTypeNode( + t, + c ? o(t.readonlyToken, c, tre) : t.readonlyToken, + E.checkDefined(o(t.typeParameter, n, Mo)), + o(t.nameType, n, ai), + c ? o(t.questionToken, c, rre) : t.questionToken, + o(t.type, n, ai), + s(t.members, n, cb) + ); + }, + 201: function(t, n, i, s, o, c) { + return i.factory.updateLiteralTypeNode( + t, + E.checkDefined(o(t.literal, n, UY)) + ); + }, + 203: function(t, n, i, s, o, c) { + return i.factory.updateTemplateLiteralType( + t, + E.checkDefined(o(t.head, n, ux)), + s(t.templateSpans, n, NJ) + ); + }, + 204: function(t, n, i, s, o, c) { + return i.factory.updateTemplateLiteralTypeSpan( + t, + E.checkDefined(o(t.type, n, ai)), + E.checkDefined(o(t.literal, n, zI)) + ); + }, + // Binding patterns + 206: function(t, n, i, s, o, c) { + return i.factory.updateObjectBindingPattern( + t, + s(t.elements, n, da) + ); + }, + 207: function(t, n, i, s, o, c) { + return i.factory.updateArrayBindingPattern( + t, + s(t.elements, n, VI) + ); + }, + 208: function(t, n, i, s, o, c) { + return i.factory.updateBindingElement( + t, + c ? o(t.dotDotDotToken, c, J5) : t.dotDotDotToken, + o(t.propertyName, n, Rc), + E.checkDefined(o(t.name, n, W2)), + o(t.initializer, n, ct) + ); + }, + // Expression + 209: function(t, n, i, s, o, c) { + return i.factory.updateArrayLiteralExpression( + t, + s(t.elements, n, ct) + ); + }, + 210: function(t, n, i, s, o, c) { + return i.factory.updateObjectLiteralExpression( + t, + s(t.properties, n, lh) + ); + }, + 211: function(t, n, i, s, o, c) { + return jI(t) ? i.factory.updatePropertyAccessChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, z5) : t.questionDotToken, + E.checkDefined(o(t.name, n, Dg)) + ) : i.factory.updatePropertyAccessExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.name, n, Dg)) + ); + }, + 212: function(t, n, i, s, o, c) { + return fj(t) ? i.factory.updateElementAccessChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, z5) : t.questionDotToken, + E.checkDefined(o(t.argumentExpression, n, ct)) + ) : i.factory.updateElementAccessExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.argumentExpression, n, ct)) + ); + }, + 213: function(t, n, i, s, o, c) { + return J2(t) ? i.factory.updateCallChain( + t, + E.checkDefined(o(t.expression, n, ct)), + c ? o(t.questionDotToken, c, z5) : t.questionDotToken, + s(t.typeArguments, n, ai), + s(t.arguments, n, ct) + ) : i.factory.updateCallExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, ai), + s(t.arguments, n, ct) + ); + }, + 214: function(t, n, i, s, o, c) { + return i.factory.updateNewExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, ai), + s(t.arguments, n, ct) + ); + }, + 215: function(t, n, i, s, o, c) { + return i.factory.updateTaggedTemplateExpression( + t, + E.checkDefined(o(t.tag, n, ct)), + s(t.typeArguments, n, ai), + E.checkDefined(o(t.template, n, wT)) + ); + }, + 216: function(t, n, i, s, o, c) { + return i.factory.updateTypeAssertion( + t, + E.checkDefined(o(t.type, n, ai)), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 217: function(t, n, i, s, o, c) { + return i.factory.updateParenthesizedExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 218: function(t, n, i, s, o, c) { + return i.factory.updateFunctionExpression( + t, + s(t.modifiers, n, Qs), + c ? o(t.asteriskToken, c, tA) : t.asteriskToken, + o(t.name, n, Re), + s(t.typeParameters, n, Mo), + cc(t.parameters, n, i, s), + o(t.type, n, ai), + Lf(t.body, n, i, o) + ); + }, + 219: function(t, n, i, s, o, c) { + return i.factory.updateArrowFunction( + t, + s(t.modifiers, n, Qs), + s(t.typeParameters, n, Mo), + cc(t.parameters, n, i, s), + o(t.type, n, ai), + c ? E.checkDefined(o(t.equalsGreaterThanToken, c, bte)) : t.equalsGreaterThanToken, + Lf(t.body, n, i, o) + ); + }, + 220: function(t, n, i, s, o, c) { + return i.factory.updateDeleteExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 221: function(t, n, i, s, o, c) { + return i.factory.updateTypeOfExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 222: function(t, n, i, s, o, c) { + return i.factory.updateVoidExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 223: function(t, n, i, s, o, c) { + return i.factory.updateAwaitExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 224: function(t, n, i, s, o, c) { + return i.factory.updatePrefixUnaryExpression( + t, + E.checkDefined(o(t.operand, n, ct)) + ); + }, + 225: function(t, n, i, s, o, c) { + return i.factory.updatePostfixUnaryExpression( + t, + E.checkDefined(o(t.operand, n, ct)) + ); + }, + 226: function(t, n, i, s, o, c) { + return i.factory.updateBinaryExpression( + t, + E.checkDefined(o(t.left, n, ct)), + c ? E.checkDefined(o(t.operatorToken, c, ire)) : t.operatorToken, + E.checkDefined(o(t.right, n, ct)) + ); + }, + 227: function(t, n, i, s, o, c) { + return i.factory.updateConditionalExpression( + t, + E.checkDefined(o(t.condition, n, ct)), + c ? E.checkDefined(o(t.questionToken, c, xy)) : t.questionToken, + E.checkDefined(o(t.whenTrue, n, ct)), + c ? E.checkDefined(o(t.colonToken, c, vte)) : t.colonToken, + E.checkDefined(o(t.whenFalse, n, ct)) + ); + }, + 228: function(t, n, i, s, o, c) { + return i.factory.updateTemplateExpression( + t, + E.checkDefined(o(t.head, n, ux)), + s(t.templateSpans, n, iD) + ); + }, + 229: function(t, n, i, s, o, c) { + return i.factory.updateYieldExpression( + t, + c ? o(t.asteriskToken, c, tA) : t.asteriskToken, + o(t.expression, n, ct) + ); + }, + 230: function(t, n, i, s, o, c) { + return i.factory.updateSpreadElement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 231: function(t, n, i, s, o, c) { + return i.factory.updateClassExpression( + t, + s(t.modifiers, n, Lo), + o(t.name, n, Re), + s(t.typeParameters, n, Mo), + s(t.heritageClauses, n, nf), + s(t.members, n, fl) + ); + }, + 233: function(t, n, i, s, o, c) { + return i.factory.updateExpressionWithTypeArguments( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.typeArguments, n, ai) + ); + }, + 234: function(t, n, i, s, o, c) { + return i.factory.updateAsExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.type, n, ai)) + ); + }, + 238: function(t, n, i, s, o, c) { + return i.factory.updateSatisfiesExpression( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.type, n, ai)) + ); + }, + 235: function(t, n, i, s, o, c) { + return fu(t) ? i.factory.updateNonNullChain( + t, + E.checkDefined(o(t.expression, n, ct)) + ) : i.factory.updateNonNullExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 236: function(t, n, i, s, o, c) { + return i.factory.updateMetaProperty( + t, + E.checkDefined(o(t.name, n, Re)) + ); + }, + // Misc + 239: function(t, n, i, s, o, c) { + return i.factory.updateTemplateSpan( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.literal, n, zI)) + ); + }, + // Element + 241: function(t, n, i, s, o, c) { + return i.factory.updateBlock( + t, + s(t.statements, n, hi) + ); + }, + 243: function(t, n, i, s, o, c) { + return i.factory.updateVariableStatement( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.declarationList, n, Il)) + ); + }, + 244: function(t, n, i, s, o, c) { + return i.factory.updateExpressionStatement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 245: function(t, n, i, s, o, c) { + return i.factory.updateIfStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.thenStatement, n, hi, i.factory.liftToBlock)), + o(t.elseStatement, n, hi, i.factory.liftToBlock) + ); + }, + 246: function(t, n, i, s, o, c) { + return i.factory.updateDoStatement( + t, + Zu(t.statement, n, i, o), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 247: function(t, n, i, s, o, c) { + return i.factory.updateWhileStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 248: function(t, n, i, s, o, c) { + return i.factory.updateForStatement( + t, + o(t.initializer, n, tp), + o(t.condition, n, ct), + o(t.incrementor, n, ct), + Zu(t.statement, n, i, o) + ); + }, + 249: function(t, n, i, s, o, c) { + return i.factory.updateForInStatement( + t, + E.checkDefined(o(t.initializer, n, tp)), + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 250: function(t, n, i, s, o, c) { + return i.factory.updateForOfStatement( + t, + c ? o(t.awaitModifier, c, AJ) : t.awaitModifier, + E.checkDefined(o(t.initializer, n, tp)), + E.checkDefined(o(t.expression, n, ct)), + Zu(t.statement, n, i, o) + ); + }, + 251: function(t, n, i, s, o, c) { + return i.factory.updateContinueStatement( + t, + o(t.label, n, Re) + ); + }, + 252: function(t, n, i, s, o, c) { + return i.factory.updateBreakStatement( + t, + o(t.label, n, Re) + ); + }, + 253: function(t, n, i, s, o, c) { + return i.factory.updateReturnStatement( + t, + o(t.expression, n, ct) + ); + }, + 254: function(t, n, i, s, o, c) { + return i.factory.updateWithStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.statement, n, hi, i.factory.liftToBlock)) + ); + }, + 255: function(t, n, i, s, o, c) { + return i.factory.updateSwitchStatement( + t, + E.checkDefined(o(t.expression, n, ct)), + E.checkDefined(o(t.caseBlock, n, aD)) + ); + }, + 256: function(t, n, i, s, o, c) { + return i.factory.updateLabeledStatement( + t, + E.checkDefined(o(t.label, n, Re)), + E.checkDefined(o(t.statement, n, hi, i.factory.liftToBlock)) + ); + }, + 257: function(t, n, i, s, o, c) { + return i.factory.updateThrowStatement( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 258: function(t, n, i, s, o, c) { + return i.factory.updateTryStatement( + t, + E.checkDefined(o(t.tryBlock, n, ms)), + o(t.catchClause, n, Rb), + o(t.finallyBlock, n, ms) + ); + }, + 260: function(t, n, i, s, o, c) { + return i.factory.updateVariableDeclaration( + t, + E.checkDefined(o(t.name, n, W2)), + c ? o(t.exclamationToken, c, rA) : t.exclamationToken, + o(t.type, n, ai), + o(t.initializer, n, ct) + ); + }, + 261: function(t, n, i, s, o, c) { + return i.factory.updateVariableDeclarationList( + t, + s(t.declarations, n, ti) + ); + }, + 262: function(t, n, i, s, o, c) { + return i.factory.updateFunctionDeclaration( + t, + s(t.modifiers, n, Qs), + c ? o(t.asteriskToken, c, tA) : t.asteriskToken, + o(t.name, n, Re), + s(t.typeParameters, n, Mo), + cc(t.parameters, n, i, s), + o(t.type, n, ai), + Lf(t.body, n, i, o) + ); + }, + 263: function(t, n, i, s, o, c) { + return i.factory.updateClassDeclaration( + t, + s(t.modifiers, n, Lo), + o(t.name, n, Re), + s(t.typeParameters, n, Mo), + s(t.heritageClauses, n, nf), + s(t.members, n, fl) + ); + }, + 264: function(t, n, i, s, o, c) { + return i.factory.updateInterfaceDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Re)), + s(t.typeParameters, n, Mo), + s(t.heritageClauses, n, nf), + s(t.members, n, cb) + ); + }, + 265: function(t, n, i, s, o, c) { + return i.factory.updateTypeAliasDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Re)), + s(t.typeParameters, n, Mo), + E.checkDefined(o(t.type, n, ai)) + ); + }, + 266: function(t, n, i, s, o, c) { + return i.factory.updateEnumDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, Re)), + s(t.members, n, Py) + ); + }, + 267: function(t, n, i, s, o, c) { + return i.factory.updateModuleDeclaration( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.name, n, nre)), + o(t.body, n, GY) + ); + }, + 268: function(t, n, i, s, o, c) { + return i.factory.updateModuleBlock( + t, + s(t.statements, n, hi) + ); + }, + 269: function(t, n, i, s, o, c) { + return i.factory.updateCaseBlock( + t, + s(t.clauses, n, GI) + ); + }, + 270: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceExportDeclaration( + t, + E.checkDefined(o(t.name, n, Re)) + ); + }, + 271: function(t, n, i, s, o, c) { + return i.factory.updateImportEqualsDeclaration( + t, + s(t.modifiers, n, Lo), + t.isTypeOnly, + E.checkDefined(o(t.name, n, Re)), + E.checkDefined(o(t.moduleReference, n, ZY)) + ); + }, + 272: function(t, n, i, s, o, c) { + return i.factory.updateImportDeclaration( + t, + s(t.modifiers, n, Lo), + o(t.importClause, n, kd), + E.checkDefined(o(t.moduleSpecifier, n, ct)), + o(t.attributes, n, aS) + ); + }, + 300: function(t, n, i, s, o, c) { + return i.factory.updateImportAttributes( + t, + s(t.elements, n, Ite), + t.multiLine + ); + }, + 301: function(t, n, i, s, o, c) { + return i.factory.updateImportAttribute( + t, + E.checkDefined(o(t.name, n, jY)), + E.checkDefined(o(t.value, n, ct)) + ); + }, + 273: function(t, n, i, s, o, c) { + return i.factory.updateImportClause( + t, + t.isTypeOnly, + o(t.name, n, Re), + o(t.namedBindings, n, Cj) + ); + }, + 274: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceImport( + t, + E.checkDefined(o(t.name, n, Re)) + ); + }, + 280: function(t, n, i, s, o, c) { + return i.factory.updateNamespaceExport( + t, + E.checkDefined(o(t.name, n, Re)) + ); + }, + 275: function(t, n, i, s, o, c) { + return i.factory.updateNamedImports( + t, + s(t.elements, n, Yu) + ); + }, + 276: function(t, n, i, s, o, c) { + return i.factory.updateImportSpecifier( + t, + t.isTypeOnly, + o(t.propertyName, n, Re), + E.checkDefined(o(t.name, n, Re)) + ); + }, + 277: function(t, n, i, s, o, c) { + return i.factory.updateExportAssignment( + t, + s(t.modifiers, n, Lo), + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 278: function(t, n, i, s, o, c) { + return i.factory.updateExportDeclaration( + t, + s(t.modifiers, n, Lo), + t.isTypeOnly, + o(t.exportClause, n, dj), + o(t.moduleSpecifier, n, ct), + o(t.attributes, n, aS) + ); + }, + 279: function(t, n, i, s, o, c) { + return i.factory.updateNamedExports( + t, + s(t.elements, n, pu) + ); + }, + 281: function(t, n, i, s, o, c) { + return i.factory.updateExportSpecifier( + t, + t.isTypeOnly, + o(t.propertyName, n, Re), + E.checkDefined(o(t.name, n, Re)) + ); + }, + // Module references + 283: function(t, n, i, s, o, c) { + return i.factory.updateExternalModuleReference( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // JSX + 284: function(t, n, i, s, o, c) { + return i.factory.updateJsxElement( + t, + E.checkDefined(o(t.openingElement, n, pm)), + s(t.children, n, Bw), + E.checkDefined(o(t.closingElement, n, Fb)) + ); + }, + 285: function(t, n, i, s, o, c) { + return i.factory.updateJsxSelfClosingElement( + t, + E.checkDefined(o(t.tagName, n, ZE)), + s(t.typeArguments, n, ai), + E.checkDefined(o(t.attributes, n, Mb)) + ); + }, + 286: function(t, n, i, s, o, c) { + return i.factory.updateJsxOpeningElement( + t, + E.checkDefined(o(t.tagName, n, ZE)), + s(t.typeArguments, n, ai), + E.checkDefined(o(t.attributes, n, Mb)) + ); + }, + 287: function(t, n, i, s, o, c) { + return i.factory.updateJsxClosingElement( + t, + E.checkDefined(o(t.tagName, n, ZE)) + ); + }, + 295: function(t, n, i, s, o, c) { + return i.factory.updateJsxNamespacedName( + t, + E.checkDefined(o(t.namespace, n, Re)), + E.checkDefined(o(t.name, n, Re)) + ); + }, + 288: function(t, n, i, s, o, c) { + return i.factory.updateJsxFragment( + t, + E.checkDefined(o(t.openingFragment, n, cS)), + s(t.children, n, Bw), + E.checkDefined(o(t.closingFragment, n, Ote)) + ); + }, + 291: function(t, n, i, s, o, c) { + return i.factory.updateJsxAttribute( + t, + E.checkDefined(o(t.name, n, See)), + o(t.initializer, n, KY) + ); + }, + 292: function(t, n, i, s, o, c) { + return i.factory.updateJsxAttributes( + t, + s(t.properties, n, HI) + ); + }, + 293: function(t, n, i, s, o, c) { + return i.factory.updateJsxSpreadAttribute( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 294: function(t, n, i, s, o, c) { + return i.factory.updateJsxExpression( + t, + o(t.expression, n, ct) + ); + }, + // Clauses + 296: function(t, n, i, s, o, c) { + return i.factory.updateCaseClause( + t, + E.checkDefined(o(t.expression, n, ct)), + s(t.statements, n, hi) + ); + }, + 297: function(t, n, i, s, o, c) { + return i.factory.updateDefaultClause( + t, + s(t.statements, n, hi) + ); + }, + 298: function(t, n, i, s, o, c) { + return i.factory.updateHeritageClause( + t, + s(t.types, n, bh) + ); + }, + 299: function(t, n, i, s, o, c) { + return i.factory.updateCatchClause( + t, + o(t.variableDeclaration, n, ti), + E.checkDefined(o(t.block, n, ms)) + ); + }, + // Property assignments + 303: function(t, n, i, s, o, c) { + return i.factory.updatePropertyAssignment( + t, + E.checkDefined(o(t.name, n, Rc)), + E.checkDefined(o(t.initializer, n, ct)) + ); + }, + 304: function(t, n, i, s, o, c) { + return i.factory.updateShorthandPropertyAssignment( + t, + E.checkDefined(o(t.name, n, Re)), + o(t.objectAssignmentInitializer, n, ct) + ); + }, + 305: function(t, n, i, s, o, c) { + return i.factory.updateSpreadAssignment( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + // Enum + 306: function(t, n, i, s, o, c) { + return i.factory.updateEnumMember( + t, + E.checkDefined(o(t.name, n, Rc)), + o(t.initializer, n, ct) + ); + }, + // Top-level nodes + 307: function(t, n, i, s, o, c) { + return i.factory.updateSourceFile( + t, + Zz(t.statements, n, i) + ); + }, + // Transformation nodes + 354: function(t, n, i, s, o, c) { + return i.factory.updatePartiallyEmittedExpression( + t, + E.checkDefined(o(t.expression, n, ct)) + ); + }, + 355: function(t, n, i, s, o, c) { + return i.factory.updateCommaListExpression( + t, + s(t.elements, n, ct) + ); + } + }; + function yMe(e) { + return E.assert(e.length <= 1, "Too many nodes written to output."), Rm(e); + } + function Sne(e, t, n, i, s) { + var { enter: o, exit: c } = s.extendedDiagnostics ? TR("Source Map", "beforeSourcemap", "afterSourcemap") : qX, _ = [], u = [], d = /* @__PURE__ */ new Map(), g, h = [], S, T = [], C = "", D = 0, P = 0, O = 0, j = 0, F = 0, V = 0, L = !1, $ = 0, U = 0, G = 0, ce = 0, K = 0, X = 0, Z = !1, oe = !1, ne = !1; + return { + getSources: () => _, + addSource: pe, + setSourceContent: fe, + addName: H, + addMapping: Ae, + appendSourceMap: ge, + toJSON: Ie, + toString: () => JSON.stringify(Ie()) + }; + function pe(Fe) { + o(); + const Qe = xT( + i, + Fe, + e.getCurrentDirectory(), + e.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !0 + ); + let Ke = d.get(Qe); + return Ke === void 0 && (Ke = u.length, u.push(Qe), _.push(Fe), d.set(Qe, Ke)), c(), Ke; + } + function fe(Fe, Qe) { + if (o(), Qe !== null) { + for (g || (g = []); g.length < Fe; ) + g.push(null); + g[Fe] = Qe; + } + c(); + } + function H(Fe) { + o(), S || (S = /* @__PURE__ */ new Map()); + let Qe = S.get(Fe); + return Qe === void 0 && (Qe = h.length, h.push(Fe), S.set(Fe, Qe)), c(), Qe; + } + function ae(Fe, Qe) { + return !Z || $ !== Fe || U !== Qe; + } + function le(Fe, Qe, Ke) { + return Fe !== void 0 && Qe !== void 0 && Ke !== void 0 && G === Fe && (ce > Qe || ce === Qe && K > Ke); + } + function Ae(Fe, Qe, Ke, Be, at, Wt) { + E.assert(Fe >= $, "generatedLine cannot backtrack"), E.assert(Qe >= 0, "generatedCharacter cannot be negative"), E.assert(Ke === void 0 || Ke >= 0, "sourceIndex cannot be negative"), E.assert(Be === void 0 || Be >= 0, "sourceLine cannot be negative"), E.assert(at === void 0 || at >= 0, "sourceCharacter cannot be negative"), o(), (ae(Fe, Qe) || le(Ke, Be, at)) && (De(), $ = Fe, U = Qe, oe = !1, ne = !1, Z = !0), Ke !== void 0 && Be !== void 0 && at !== void 0 && (G = Ke, ce = Be, K = at, oe = !0, Wt !== void 0 && (X = Wt, ne = !0)), c(); + } + function ge(Fe, Qe, Ke, Be, at, Wt) { + E.assert(Fe >= $, "generatedLine cannot backtrack"), E.assert(Qe >= 0, "generatedCharacter cannot be negative"), o(); + const nr = []; + let Kt; + const Pr = rW(Ke.mappings); + for (const Vt of Pr) { + if (Wt && (Vt.generatedLine > Wt.line || Vt.generatedLine === Wt.line && Vt.generatedCharacter > Wt.character)) + break; + if (at && (Vt.generatedLine < at.line || at.line === Vt.generatedLine && Vt.generatedCharacter < at.character)) + continue; + let zt, jr, ci, Xt; + if (Vt.sourceIndex !== void 0) { + if (zt = nr[Vt.sourceIndex], zt === void 0) { + const wr = Ke.sources[Vt.sourceIndex], Ss = Ke.sourceRoot ? Mn(Ke.sourceRoot, wr) : wr, Le = Mn(Xn(Be), Ss); + nr[Vt.sourceIndex] = zt = pe(Le), Ke.sourcesContent && typeof Ke.sourcesContent[Vt.sourceIndex] == "string" && fe(zt, Ke.sourcesContent[Vt.sourceIndex]); + } + jr = Vt.sourceLine, ci = Vt.sourceCharacter, Ke.names && Vt.nameIndex !== void 0 && (Kt || (Kt = []), Xt = Kt[Vt.nameIndex], Xt === void 0 && (Kt[Vt.nameIndex] = Xt = H(Ke.names[Vt.nameIndex]))); + } + const Ai = Vt.generatedLine - (at ? at.line : 0), _s = Ai + Fe, $n = at && at.line === Vt.generatedLine ? Vt.generatedCharacter - at.character : Vt.generatedCharacter, os = Ai === 0 ? $n + Qe : $n; + Ae(_s, os, zt, jr, ci, Xt); + } + c(); + } + function de() { + return !L || D !== $ || P !== U || O !== G || j !== ce || F !== K || V !== X; + } + function ve(Fe) { + T.push(Fe), T.length >= 1024 && Xe(); + } + function De() { + if (!(!Z || !de())) { + if (o(), D < $) { + do + ve( + 59 + /* semicolon */ + ), D++; + while (D < $); + P = 0; + } else + E.assertEqual(D, $, "generatedLine cannot backtrack"), L && ve( + 44 + /* comma */ + ); + ye(U - P), P = U, oe && (ye(G - O), O = G, ye(ce - j), j = ce, ye(K - F), F = K, ne && (ye(X - V), V = X)), L = !0, c(); + } + } + function Xe() { + T.length > 0 && (C += String.fromCharCode.apply(void 0, T), T.length = 0); + } + function Ie() { + return De(), Xe(), { + version: 3, + file: t, + sourceRoot: n, + sources: u, + names: h, + mappings: C, + sourcesContent: g + }; + } + function ye(Fe) { + Fe < 0 ? Fe = (-Fe << 1) + 1 : Fe = Fe << 1; + do { + let Qe = Fe & 31; + Fe = Fe >> 5, Fe > 0 && (Qe = Qe | 32), ve(bMe(Qe)); + } while (Fe > 0); + } + } + var Tne = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/, Kz = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/, eW = /^\s*(\/\/[@#] .*)?$/; + function tW(e, t) { + return { + getLineCount: () => t.length, + getLineText: (n) => e.substring(t[n], t[n + 1]) + }; + } + function xne(e) { + for (let t = e.getLineCount() - 1; t >= 0; t--) { + const n = e.getLineText(t), i = Kz.exec(n); + if (i) + return i[1].trimEnd(); + if (!n.match(eW)) + break; + } + } + function vMe(e) { + return typeof e == "string" || e === null; + } + function kne(e) { + return e !== null && typeof e == "object" && e.version === 3 && typeof e.file == "string" && typeof e.mappings == "string" && ss(e.sources) && Ri(e.sources, Gi) && (e.sourceRoot === void 0 || e.sourceRoot === null || typeof e.sourceRoot == "string") && (e.sourcesContent === void 0 || e.sourcesContent === null || ss(e.sourcesContent) && Ri(e.sourcesContent, vMe)) && (e.names === void 0 || e.names === null || ss(e.names) && Ri(e.names, Gi)); + } + function Cne(e) { + try { + const t = JSON.parse(e); + if (kne(t)) + return t; + } catch { + } + } + function rW(e) { + let t = !1, n = 0, i = 0, s = 0, o = 0, c = 0, _ = 0, u = 0, d; + return { + get pos() { + return n; + }, + get error() { + return d; + }, + get state() { + return g( + /*hasSource*/ + !0, + /*hasName*/ + !0 + ); + }, + next() { + for (; !t && n < e.length; ) { + const O = e.charCodeAt(n); + if (O === 59) { + i++, s = 0, n++; + continue; + } + if (O === 44) { + n++; + continue; + } + let j = !1, F = !1; + if (s += P(), C()) return h(); + if (s < 0) return T("Invalid generatedCharacter found"); + if (!D()) { + if (j = !0, o += P(), C()) return h(); + if (o < 0) return T("Invalid sourceIndex found"); + if (D()) return T("Unsupported Format: No entries after sourceIndex"); + if (c += P(), C()) return h(); + if (c < 0) return T("Invalid sourceLine found"); + if (D()) return T("Unsupported Format: No entries after sourceLine"); + if (_ += P(), C()) return h(); + if (_ < 0) return T("Invalid sourceCharacter found"); + if (!D()) { + if (F = !0, u += P(), C()) return h(); + if (u < 0) return T("Invalid nameIndex found"); + if (!D()) return T("Unsupported Error Format: Entries after nameIndex"); + } + } + return { value: g(j, F), done: t }; + } + return h(); + }, + [Symbol.iterator]() { + return this; + } + }; + function g(O, j) { + return { + generatedLine: i, + generatedCharacter: s, + sourceIndex: O ? o : void 0, + sourceLine: O ? c : void 0, + sourceCharacter: O ? _ : void 0, + nameIndex: j ? u : void 0 + }; + } + function h() { + return t = !0, { value: void 0, done: !0 }; + } + function S(O) { + d === void 0 && (d = O); + } + function T(O) { + return S(O), h(); + } + function C() { + return d !== void 0; + } + function D() { + return n === e.length || e.charCodeAt(n) === 44 || e.charCodeAt(n) === 59; + } + function P() { + let O = !0, j = 0, F = 0; + for (; O; n++) { + if (n >= e.length) return S("Error in decoding base64VLQFormatDecode, past the mapping string"), -1; + const V = SMe(e.charCodeAt(n)); + if (V === -1) return S("Invalid character in VLQ"), -1; + O = (V & 32) !== 0, F = F | (V & 31) << j, j += 5; + } + return F & 1 ? (F = F >> 1, F = -F) : F = F >> 1, F; + } + } + function Y1e(e, t) { + return e === t || e.generatedLine === t.generatedLine && e.generatedCharacter === t.generatedCharacter && e.sourceIndex === t.sourceIndex && e.sourceLine === t.sourceLine && e.sourceCharacter === t.sourceCharacter && e.nameIndex === t.nameIndex; + } + function Ene(e) { + return e.sourceIndex !== void 0 && e.sourceLine !== void 0 && e.sourceCharacter !== void 0; + } + function bMe(e) { + return e >= 0 && e < 26 ? 65 + e : e >= 26 && e < 52 ? 97 + e - 26 : e >= 52 && e < 62 ? 48 + e - 52 : e === 62 ? 43 : e === 63 ? 47 : E.fail(`${e}: not a base64 value`); + } + function SMe(e) { + return e >= 65 && e <= 90 ? e - 65 : e >= 97 && e <= 122 ? e - 97 + 26 : e >= 48 && e <= 57 ? e - 48 + 52 : e === 43 ? 62 : e === 47 ? 63 : -1; + } + function Z1e(e) { + return e.sourceIndex !== void 0 && e.sourcePosition !== void 0; + } + function K1e(e, t) { + return e.generatedPosition === t.generatedPosition && e.sourceIndex === t.sourceIndex && e.sourcePosition === t.sourcePosition; + } + function TMe(e, t) { + return E.assert(e.sourceIndex === t.sourceIndex), uo(e.sourcePosition, t.sourcePosition); + } + function xMe(e, t) { + return uo(e.generatedPosition, t.generatedPosition); + } + function kMe(e) { + return e.sourcePosition; + } + function CMe(e) { + return e.generatedPosition; + } + function Dne(e, t, n) { + const i = Xn(n), s = t.sourceRoot ? Xi(t.sourceRoot, i) : i, o = Xi(t.file, i), c = e.getSourceFileLike(o), _ = t.sources.map((j) => Xi(j, s)), u = new Map(_.map((j, F) => [e.getCanonicalFileName(j), F])); + let d, g, h; + return { + getSourcePosition: O, + getGeneratedPosition: P + }; + function S(j) { + const F = c !== void 0 ? mw( + c, + j.generatedLine, + j.generatedCharacter, + /*allowEdits*/ + !0 + ) : -1; + let V, L; + if (Ene(j)) { + const $ = e.getSourceFileLike(_[j.sourceIndex]); + V = t.sources[j.sourceIndex], L = $ !== void 0 ? mw( + $, + j.sourceLine, + j.sourceCharacter, + /*allowEdits*/ + !0 + ) : -1; + } + return { + generatedPosition: F, + source: V, + sourceIndex: j.sourceIndex, + sourcePosition: L, + nameIndex: j.nameIndex + }; + } + function T() { + if (d === void 0) { + const j = rW(t.mappings), F = ts(j, S); + j.error !== void 0 ? (e.log && e.log(`Encountered error while decoding sourcemap: ${j.error}`), d = He) : d = F; + } + return d; + } + function C(j) { + if (h === void 0) { + const F = []; + for (const V of T()) { + if (!Z1e(V)) continue; + let L = F[V.sourceIndex]; + L || (F[V.sourceIndex] = L = []), L.push(V); + } + h = F.map((V) => SE(V, TMe, K1e)); + } + return h[j]; + } + function D() { + if (g === void 0) { + const j = []; + for (const F of T()) + j.push(F); + g = SE(j, xMe, K1e); + } + return g; + } + function P(j) { + const F = u.get(e.getCanonicalFileName(j.fileName)); + if (F === void 0) return j; + const V = C(F); + if (!ut(V)) return j; + let L = hT(V, j.pos, kMe, uo); + L < 0 && (L = ~L); + const $ = V[L]; + return $ === void 0 || $.sourceIndex !== F ? j : { fileName: o, pos: $.generatedPosition }; + } + function O(j) { + const F = D(); + if (!ut(F)) return j; + let V = hT(F, j.pos, CMe, uo); + V < 0 && (V = ~V); + const L = F[V]; + return L === void 0 || !Z1e(L) ? j : { fileName: _[L.sourceIndex], pos: L.sourcePosition }; + } + } + var nW = { + getSourcePosition: lo, + getGeneratedPosition: lo + }; + function Ku(e) { + return e = Zo(e), e ? ja(e) : 0; + } + function eve(e) { + return !e || !fm(e) && !lp(e) ? !1 : ut(e.elements, tve); + } + function tve(e) { + return e.propertyName !== void 0 ? e.propertyName.escapedText === "default" : e.name.escapedText === "default"; + } + function Pd(e, t) { + return n; + function n(s) { + return s.kind === 307 ? t(s) : i(s); + } + function i(s) { + return e.factory.createBundle(or(s.sourceFiles, t)); + } + } + function Pne(e) { + return !!uC(e); + } + function zO(e) { + if (uC(e)) + return !0; + const t = e.importClause && e.importClause.namedBindings; + if (!t || !fm(t)) return !1; + let n = 0; + for (const i of t.elements) + tve(i) && n++; + return n > 0 && n !== t.elements.length || !!(t.elements.length - n) && jT(e); + } + function iW(e) { + return !zO(e) && (jT(e) || !!e.importClause && fm(e.importClause.namedBindings) && eve(e.importClause.namedBindings)); + } + function sW(e, t) { + const n = e.getEmitResolver(), i = e.getCompilerOptions(), s = [], o = new wne(), c = [], _ = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Set(); + let d, g = !1, h, S = !1, T = !1, C = !1; + for (const j of t.statements) + switch (j.kind) { + case 272: + s.push(j), !T && zO(j) && (T = !0), !C && iW(j) && (C = !0); + break; + case 271: + j.moduleReference.kind === 283 && s.push(j); + break; + case 278: + if (j.moduleSpecifier) + if (!j.exportClause) + s.push(j), S = !0; + else if (s.push(j), lp(j.exportClause)) + P(j), C || (C = eve(j.exportClause)); + else { + const F = j.exportClause.name; + _.get(dn(F)) || (CD(c, Ku(j), F), _.set(dn(F), !0), d = Tr(d, F)), T = !0; + } + else + P(j); + break; + case 277: + j.isExportEquals && !h && (h = j); + break; + case 243: + if (Vn( + j, + 32 + /* Export */ + )) + for (const F of j.declarationList.declarations) + d = rve(F, _, d, c); + break; + case 262: + Vn( + j, + 32 + /* Export */ + ) && O( + j, + /*name*/ + void 0, + Vn( + j, + 2048 + /* Default */ + ) + ); + break; + case 263: + if (Vn( + j, + 32 + /* Export */ + )) + if (Vn( + j, + 2048 + /* Default */ + )) + g || (CD(c, Ku(j), e.factory.getDeclarationName(j)), g = !0); + else { + const F = j.name; + F && !_.get(dn(F)) && (CD(c, Ku(j), F), _.set(dn(F), !0), d = Tr(d, F)); + } + break; + } + const D = KJ(e.factory, e.getEmitHelperFactory(), t, i, S, T, C); + return D && s.unshift(D), { externalImports: s, exportSpecifiers: o, exportEquals: h, hasExportStarsToExportValues: S, exportedBindings: c, exportedNames: d, exportedFunctions: u, externalHelpersImportDeclaration: D }; + function P(j) { + for (const F of Is(j.exportClause, lp).elements) + if (!_.get(dn(F.name))) { + const V = F.propertyName || F.name; + j.moduleSpecifier || o.add(V, F); + const L = n.getReferencedImportDeclaration(V) || n.getReferencedValueDeclaration(V); + if (L) { + if (L.kind === 262) { + O( + L, + F.name, + F.name.escapedText === "default" + /* Default */ + ); + continue; + } + CD(c, Ku(L), F.name); + } + _.set(dn(F.name), !0), d = Tr(d, F.name); + } + } + function O(j, F, V) { + u.add(j), V ? g || (CD(c, Ku(j), F ?? e.factory.getDeclarationName(j)), g = !0) : (F ?? (F = j.name), _.get(dn(F)) || (CD(c, Ku(j), F), _.set(dn(F), !0))); + } + } + function rve(e, t, n, i) { + if (Ts(e.name)) + for (const s of e.name.elements) + ml(s) || (n = rve(s, t, n, i)); + else if (!Fo(e.name)) { + const s = dn(e.name); + t.get(s) || (t.set(s, !0), n = Tr(n, e.name), xh(e.name) && CD(i, Ku(e), e.name)); + } + return n; + } + function CD(e, t, n) { + let i = e[t]; + return i ? i.push(n) : e[t] = i = [n], i; + } + var XC = class hE { + constructor() { + this._map = /* @__PURE__ */ new Map(); + } + get size() { + return this._map.size; + } + has(t) { + return this._map.has(hE.toKey(t)); + } + get(t) { + return this._map.get(hE.toKey(t)); + } + set(t, n) { + return this._map.set(hE.toKey(t), n), this; + } + delete(t) { + var n; + return ((n = this._map) == null ? void 0 : n.delete(hE.toKey(t))) ?? !1; + } + clear() { + this._map.clear(); + } + values() { + return this._map.values(); + } + static toKey(t) { + if (z2(t) || Fo(t)) { + const n = t.emitNode.autoGenerate; + if ((n.flags & 7) === 4) { + const i = dA(t), s = Dg(i) && i !== t ? hE.toKey(i) : `(generated@${ja(i)})`; + return sv( + /*privateName*/ + !1, + n.prefix, + s, + n.suffix, + hE.toKey + ); + } else { + const i = `(auto@${n.id})`; + return sv( + /*privateName*/ + !1, + n.prefix, + i, + n.suffix, + hE.toKey + ); + } + } + return wi(t) ? dn(t).slice(1) : dn(t); + } + }, wne = class extends XC { + add(e, t) { + let n = this.get(e); + return n ? n.push(t) : this.set(e, n = [t]), n; + } + remove(e, t) { + const n = this.get(e); + n && (bT(n, t), n.length || this.delete(e)); + } + }; + function Jb(e) { + return Ga(e) || e.kind === 9 || qu(e.kind) || Re(e); + } + function mm(e) { + return !Re(e) && Jb(e); + } + function ED(e) { + return e >= 65 && e <= 79; + } + function DD(e) { + switch (e) { + case 65: + return 40; + case 66: + return 41; + case 67: + return 42; + case 68: + return 43; + case 69: + return 44; + case 70: + return 45; + case 71: + return 48; + case 72: + return 49; + case 73: + return 50; + case 74: + return 51; + case 75: + return 52; + case 79: + return 53; + case 76: + return 57; + case 77: + return 56; + case 78: + return 61; + } + } + function WO(e) { + if (!Pl(e)) + return; + const t = Ja(e.expression); + return G2(t) ? t : void 0; + } + function nve(e, t, n) { + for (let i = t; i < e.length; i += 1) { + const s = e[i]; + if (WO(s)) + return n.unshift(i), !0; + if (sS(s) && nve(s.tryBlock.statements, 0, n)) + return n.unshift(i), !0; + } + return !1; + } + function VO(e, t) { + const n = []; + return nve(e, t, n), n; + } + function aW(e, t, n) { + return Ln(e.members, (i) => DMe(i, t, n)); + } + function EMe(e) { + return PMe(e) || ac(e); + } + function UO(e) { + return Ln(e.members, EMe); + } + function DMe(e, t, n) { + return rs(e) && (!!e.initializer || !t) && Uc(e) === n; + } + function PMe(e) { + return rs(e) && Uc(e); + } + function IA(e) { + return e.kind === 172 && e.initializer !== void 0; + } + function Ane(e) { + return !Os(e) && (PT(e) || u_(e)) && wi(e.name); + } + function Nne(e) { + let t; + if (e) { + const n = e.parameters, i = n.length > 0 && Sb(n[0]), s = i ? 1 : 0, o = i ? n.length - 1 : n.length; + for (let c = 0; c < o; c++) { + const _ = n[c + s]; + (t || wf(_)) && (t || (t = new Array(o)), t[c] = cy(_)); + } + } + return t; + } + function oW(e) { + const t = cy(e), n = Nne(Ng(e)); + if (!(!ut(t) && !ut(n))) + return { + decorators: t, + parameters: n + }; + } + function qO(e, t, n) { + switch (e.kind) { + case 177: + case 178: + return n ? wMe(e, t) : ive(e); + case 174: + return ive(e); + case 172: + return AMe(e); + default: + return; + } + } + function wMe(e, t) { + if (!e.body) + return; + const { firstAccessor: n, secondAccessor: i, getAccessor: s, setAccessor: o } = gy(t.members, e), c = wf(n) ? n : i && wf(i) ? i : void 0; + if (!c || e !== c) + return; + const _ = cy(c), u = Nne(o); + if (!(!ut(_) && !ut(u))) + return { + decorators: _, + parameters: u, + getDecorators: s && cy(s), + setDecorators: o && cy(o) + }; + } + function ive(e) { + if (!e.body) + return; + const t = cy(e), n = Nne(e); + if (!(!ut(t) && !ut(n))) + return { decorators: t, parameters: n }; + } + function AMe(e) { + const t = cy(e); + if (ut(t)) + return { decorators: t }; + } + function Ine(e, t) { + for (; e; ) { + const n = t(e); + if (n !== void 0) return n; + e = e.previous; + } + } + function One(e) { + return { data: e }; + } + function cW(e, t) { + var n, i; + return z2(t) ? (n = e?.generatedIdentifiers) == null ? void 0 : n.get(dA(t)) : (i = e?.identifiers) == null ? void 0 : i.get(t.escapedText); + } + function dS(e, t, n) { + z2(t) ? (e.generatedIdentifiers ?? (e.generatedIdentifiers = /* @__PURE__ */ new Map()), e.generatedIdentifiers.set(dA(t), n)) : (e.identifiers ?? (e.identifiers = /* @__PURE__ */ new Map()), e.identifiers.set(t.escapedText, n)); + } + function Fne(e, t) { + return Ine(e, (n) => cW(n.privateEnv, t)); + } + function Lne(e) { + return !e.initializer && Re(e.name); + } + function OA(e) { + return Ri(e, Lne); + } + var Mne = /* @__PURE__ */ ((e) => (e[e.All = 0] = "All", e[e.ObjectRest = 1] = "ObjectRest", e))(Mne || {}); + function mS(e, t, n, i, s, o) { + let c = e, _; + if (p0(e)) + for (_ = e.right; wK(e.left) || LB(e.left); ) + if (p0(_)) + c = e = _, _ = e.right; + else + return E.checkDefined(Ge(_, t, ct)); + let u; + const d = { + context: n, + level: i, + downlevelIteration: !!n.getCompilerOptions().downlevelIteration, + hoistTempVariables: !0, + emitExpression: g, + emitBindingOrAssignment: h, + createArrayBindingOrAssignmentPattern: (S) => jMe(n.factory, S), + createObjectBindingOrAssignmentPattern: (S) => JMe(n.factory, S), + createArrayBindingOrAssignmentElement: WMe, + visitor: t + }; + if (_ && (_ = Ge(_, t, ct), E.assert(_), Re(_) && Rne(e, _.escapedText) || jne(e) ? _ = Nx( + d, + _, + /*reuseIdentifierExpressions*/ + !1, + c + ) : s ? _ = Nx( + d, + _, + /*reuseIdentifierExpressions*/ + !0, + c + ) : oo(e) && (c = _)), PD( + d, + e, + _, + c, + /*skipInitializer*/ + p0(e) + ), _ && s) { + if (!ut(u)) + return _; + u.push(_); + } + return n.factory.inlineExpressions(u) || n.factory.createOmittedExpression(); + function g(S) { + u = Tr(u, S); + } + function h(S, T, C, D) { + E.assertNode(S, o ? Re : ct); + const P = o ? o(S, T, C) : ot( + n.factory.createAssignment(E.checkDefined(Ge(S, t, ct)), T), + C + ); + P.original = D, g(P); + } + } + function Rne(e, t) { + const n = wy(e); + return Iw(n) ? NMe(n, t) : Re(n) ? n.escapedText === t : !1; + } + function NMe(e, t) { + const n = BC(e); + for (const i of n) + if (Rne(i, t)) + return !0; + return !1; + } + function jne(e) { + const t = cO(e); + if (t && oa(t) && !ob(t.expression)) + return !0; + const n = wy(e); + return !!n && Iw(n) && IMe(n); + } + function IMe(e) { + return !!rr(BC(e), jne); + } + function zb(e, t, n, i, s, o = !1, c) { + let _; + const u = [], d = [], g = { + context: n, + level: i, + downlevelIteration: !!n.getCompilerOptions().downlevelIteration, + hoistTempVariables: o, + emitExpression: h, + emitBindingOrAssignment: S, + createArrayBindingOrAssignmentPattern: (T) => RMe(n.factory, T), + createObjectBindingOrAssignmentPattern: (T) => BMe(n.factory, T), + createArrayBindingOrAssignmentElement: (T) => zMe(n.factory, T), + visitor: t + }; + if (ti(e)) { + let T = fA(e); + T && (Re(T) && Rne(e, T.escapedText) || jne(e)) && (T = Nx( + g, + E.checkDefined(Ge(T, g.visitor, ct)), + /*reuseIdentifierExpressions*/ + !1, + T + ), e = n.factory.updateVariableDeclaration( + e, + e.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + T + )); + } + if (PD(g, e, s, e, c), _) { + const T = n.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + if (o) { + const C = n.factory.inlineExpressions(_); + _ = void 0, S( + T, + C, + /*location*/ + void 0, + /*original*/ + void 0 + ); + } else { + n.hoistVariableDeclaration(T); + const C = ia(u); + C.pendingExpressions = Tr( + C.pendingExpressions, + n.factory.createAssignment(T, C.value) + ), Bn(C.pendingExpressions, _), C.value = T; + } + } + for (const { pendingExpressions: T, name: C, value: D, location: P, original: O } of u) { + const j = n.factory.createVariableDeclaration( + C, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + T ? n.factory.inlineExpressions(Tr(T, D)) : D + ); + j.original = O, ot(j, P), d.push(j); + } + return d; + function h(T) { + _ = Tr(_, T); + } + function S(T, C, D, P) { + E.assertNode(T, W2), _ && (C = n.factory.inlineExpressions(Tr(_, C)), _ = void 0), u.push({ pendingExpressions: _, name: T, value: C, location: D, original: P }); + } + } + function PD(e, t, n, i, s) { + const o = wy(t); + if (!s) { + const c = Ge(fA(t), e.visitor, ct); + c ? n ? (n = LMe(e, n, c, i), !mm(c) && Iw(o) && (n = Nx( + e, + n, + /*reuseIdentifierExpressions*/ + !0, + i + ))) : n = c : n || (n = e.context.factory.createVoidZero()); + } + bj(o) ? OMe(e, t, o, n, i) : Sj(o) ? FMe(e, t, o, n, i) : e.emitBindingOrAssignment( + o, + n, + i, + /*original*/ + t + ); + } + function OMe(e, t, n, i, s) { + const o = BC(n), c = o.length; + if (c !== 1) { + const d = !Nw(t) || c !== 0; + i = Nx(e, i, d, s); + } + let _, u; + for (let d = 0; d < c; d++) { + const g = o[d]; + if (oO(g)) { + if (d === c - 1) { + _ && (e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n), _ = void 0); + const h = e.context.getEmitHelperFactory().createRestHelper(i, o, u, n); + PD(e, g, h, g); + } + } else { + const h = ez(g); + if (e.level >= 1 && !(g.transformFlags & 98304) && !(wy(g).transformFlags & 98304) && !oa(h)) + _ = Tr(_, Ge(g, e.visitor, zY)); + else { + _ && (e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n), _ = void 0); + const S = MMe(e, i, h); + oa(h) && (u = Tr(u, S.argumentExpression)), PD( + e, + g, + S, + /*location*/ + g + ); + } + } + } + _ && e.emitBindingOrAssignment(e.createObjectBindingOrAssignmentPattern(_), i, s, n); + } + function FMe(e, t, n, i, s) { + const o = BC(n), c = o.length; + if (e.level < 1 && e.downlevelIteration) + i = Nx( + e, + ot( + e.context.getEmitHelperFactory().createReadHelper( + i, + c > 0 && oO(o[c - 1]) ? void 0 : c + ), + s + ), + /*reuseIdentifierExpressions*/ + !1, + s + ); + else if (c !== 1 && (e.level < 1 || c === 0) || Ri(o, ml)) { + const d = !Nw(t) || c !== 0; + i = Nx(e, i, d, s); + } + let _, u; + for (let d = 0; d < c; d++) { + const g = o[d]; + if (e.level >= 1) + if (g.transformFlags & 65536 || e.hasTransformedPriorElement && !sve(g)) { + e.hasTransformedPriorElement = !0; + const h = e.context.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + e.hoistTempVariables && e.context.hoistVariableDeclaration(h), u = Tr(u, [h, g]), _ = Tr(_, e.createArrayBindingOrAssignmentElement(h)); + } else + _ = Tr(_, g); + else { + if (ml(g)) + continue; + if (oO(g)) { + if (d === c - 1) { + const h = e.context.factory.createArraySliceCall(i, d); + PD( + e, + g, + h, + /*location*/ + g + ); + } + } else { + const h = e.context.factory.createElementAccessExpression(i, d); + PD( + e, + g, + h, + /*location*/ + g + ); + } + } + } + if (_ && e.emitBindingOrAssignment(e.createArrayBindingOrAssignmentPattern(_), i, s, n), u) + for (const [d, g] of u) + PD(e, g, d, g); + } + function sve(e) { + const t = wy(e); + if (!t || ml(t)) return !0; + const n = cO(e); + if (n && !rm(n)) return !1; + const i = fA(e); + return i && !mm(i) ? !1 : Iw(t) ? Ri(BC(t), sve) : Re(t); + } + function LMe(e, t, n, i) { + return t = Nx( + e, + t, + /*reuseIdentifierExpressions*/ + !0, + i + ), e.context.factory.createConditionalExpression( + e.context.factory.createTypeCheck(t, "undefined"), + /*questionToken*/ + void 0, + n, + /*colonToken*/ + void 0, + t + ); + } + function MMe(e, t, n) { + const { factory: i } = e.context; + if (oa(n)) { + const s = Nx( + e, + E.checkDefined(Ge(n.expression, e.visitor, ct)), + /*reuseIdentifierExpressions*/ + !1, + /*location*/ + n + ); + return e.context.factory.createElementAccessExpression(t, s); + } else if (Pf(n)) { + const s = i.cloneNode(n); + return e.context.factory.createElementAccessExpression(t, s); + } else { + const s = e.context.factory.createIdentifier(dn(n)); + return e.context.factory.createPropertyAccessExpression(t, s); + } + } + function Nx(e, t, n, i) { + if (Re(t) && n) + return t; + { + const s = e.context.factory.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return e.hoistTempVariables ? (e.context.hoistVariableDeclaration(s), e.emitExpression(ot(e.context.factory.createAssignment(s, t), i))) : e.emitBindingOrAssignment( + s, + t, + i, + /*original*/ + void 0 + ), s; + } + } + function RMe(e, t) { + return E.assertEachNode(t, VI), e.createArrayBindingPattern(t); + } + function jMe(e, t) { + return E.assertEachNode(t, Fw), e.createArrayLiteralExpression(or(t, e.converters.convertToArrayAssignmentElement)); + } + function BMe(e, t) { + return E.assertEachNode(t, da), e.createObjectBindingPattern(t); + } + function JMe(e, t) { + return E.assertEachNode(t, Ow), e.createObjectLiteralExpression(or(t, e.converters.convertToObjectAssignmentElement)); + } + function zMe(e, t) { + return e.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + t + ); + } + function WMe(e) { + return e; + } + function Bne(e, t, n = e.createThis()) { + const i = e.createAssignment(t, n), s = e.createExpressionStatement(i), o = e.createBlock( + [s], + /*multiLine*/ + !1 + ), c = e.createClassStaticBlockDeclaration(o); + return nu(c).classThis = t, c; + } + function wD(e) { + var t; + if (!ac(e) || e.body.statements.length !== 1) + return !1; + const n = e.body.statements[0]; + return Pl(n) && Tl( + n.expression, + /*excludeCompoundAssignment*/ + !0 + ) && Re(n.expression.left) && ((t = e.emitNode) == null ? void 0 : t.classThis) === n.expression.left && n.expression.right.kind === 110; + } + function lW(e) { + var t; + return !!((t = e.emitNode) != null && t.classThis) && ut(e.members, wD); + } + function Jne(e, t, n, i) { + if (lW(t)) + return t; + const s = Bne(e, n, i); + t.name && aa(s.body.statements[0], t.name); + const o = e.createNodeArray([s, ...t.members]); + ot(o, t.members); + const c = rl(t) ? e.updateClassDeclaration( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + o + ) : e.updateClassExpression( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + o + ); + return nu(c).classThis = n, c; + } + function AD(e, t, n) { + const i = Zo(Bc(n)); + return (rl(i) || Ac(i)) && !i.name && Vn( + i, + 2048 + /* Default */ + ) ? e.createStringLiteral("default") : e.createStringLiteralFromNode(t); + } + function ave(e, t, n) { + const { factory: i } = e; + if (n !== void 0) + return { assignedName: i.createStringLiteral(n), name: t }; + if (rm(t) || wi(t)) + return { assignedName: i.createStringLiteralFromNode(t), name: t }; + if (rm(t.expression) && !Re(t.expression)) + return { assignedName: i.createStringLiteralFromNode(t.expression), name: t }; + const s = i.getGeneratedNameForNode(t); + e.hoistVariableDeclaration(s); + const o = e.getEmitHelperFactory().createPropKeyHelper(t.expression), c = i.createAssignment(s, o), _ = i.updateComputedPropertyName(t, c); + return { assignedName: s, name: _ }; + } + function zne(e, t, n = e.factory.createThis()) { + const { factory: i } = e, s = e.getEmitHelperFactory().createSetFunctionNameHelper(n, t), o = i.createExpressionStatement(s), c = i.createBlock( + [o], + /*multiLine*/ + !1 + ), _ = i.createClassStaticBlockDeclaration(c); + return nu(_).assignedName = t, _; + } + function Ix(e) { + var t; + if (!ac(e) || e.body.statements.length !== 1) + return !1; + const n = e.body.statements[0]; + return Pl(n) && Y4(n.expression, "___setFunctionName") && n.expression.arguments.length >= 2 && n.expression.arguments[1] === ((t = e.emitNode) == null ? void 0 : t.assignedName); + } + function HO(e) { + var t; + return !!((t = e.emitNode) != null && t.assignedName) && ut(e.members, Ix); + } + function uW(e) { + return !!e.name || HO(e); + } + function GO(e, t, n, i) { + if (HO(t)) + return t; + const { factory: s } = e, o = zne(e, n, i); + t.name && aa(o.body.statements[0], t.name); + const c = rc(t.members, wD) + 1, _ = t.members.slice(0, c), u = t.members.slice(c), d = s.createNodeArray([..._, o, ...u]); + return ot(d, t.members), t = rl(t) ? s.updateClassDeclaration( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + d + ) : s.updateClassExpression( + t, + t.modifiers, + t.name, + t.typeParameters, + t.heritageClauses, + d + ), nu(t).assignedName = n, t; + } + function QC(e, t, n, i) { + if (i && Ks(n) && Zj(n)) + return t; + const { factory: s } = e, o = Bc(t), c = tl(o) ? Is(GO(e, o, n), tl) : e.getEmitHelperFactory().createSetFunctionNameHelper(o, n); + return s.restoreOuterExpressions(t, c); + } + function VMe(e, t, n, i) { + const { factory: s } = e, { assignedName: o, name: c } = ave(e, t.name, i), _ = QC(e, t.initializer, o, n); + return s.updatePropertyAssignment( + t, + c, + _ + ); + } + function UMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : AD(s, t.name, t.objectAssignmentInitializer), c = QC(e, t.objectAssignmentInitializer, o, n); + return s.updateShorthandPropertyAssignment( + t, + t.name, + c + ); + } + function qMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : AD(s, t.name, t.initializer), c = QC(e, t.initializer, o, n); + return s.updateVariableDeclaration( + t, + t.name, + t.exclamationToken, + t.type, + c + ); + } + function HMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : AD(s, t.name, t.initializer), c = QC(e, t.initializer, o, n); + return s.updateParameterDeclaration( + t, + t.modifiers, + t.dotDotDotToken, + t.name, + t.questionToken, + t.type, + c + ); + } + function GMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : AD(s, t.name, t.initializer), c = QC(e, t.initializer, o, n); + return s.updateBindingElement( + t, + t.dotDotDotToken, + t.propertyName, + t.name, + c + ); + } + function $Me(e, t, n, i) { + const { factory: s } = e, { assignedName: o, name: c } = ave(e, t.name, i), _ = QC(e, t.initializer, o, n); + return s.updatePropertyDeclaration( + t, + t.modifiers, + c, + t.questionToken ?? t.exclamationToken, + t.type, + _ + ); + } + function XMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : AD(s, t.left, t.right), c = QC(e, t.right, o, n); + return s.updateBinaryExpression( + t, + t.left, + t.operatorToken, + c + ); + } + function QMe(e, t, n, i) { + const { factory: s } = e, o = i !== void 0 ? s.createStringLiteral(i) : s.createStringLiteral(t.isExportEquals ? "" : "default"), c = QC(e, t.expression, o, n); + return s.updateExportAssignment( + t, + t.modifiers, + c + ); + } + function sf(e, t, n, i) { + switch (t.kind) { + case 303: + return VMe(e, t, n, i); + case 304: + return UMe(e, t, n, i); + case 260: + return qMe(e, t, n, i); + case 169: + return HMe(e, t, n, i); + case 208: + return GMe(e, t, n, i); + case 172: + return $Me(e, t, n, i); + case 226: + return XMe(e, t, n, i); + case 277: + return QMe(e, t, n, i); + } + } + var Wne = /* @__PURE__ */ ((e) => (e[e.LiftRestriction = 0] = "LiftRestriction", e[e.All = 1] = "All", e))(Wne || {}); + function _W(e, t, n, i, s, o) { + const c = Ge(t.tag, n, ct); + E.assert(c); + const _ = [void 0], u = [], d = [], g = t.template; + if (o === 0 && !SB(g)) + return gr(t, n, e); + const { factory: h } = e; + if (lx(g)) + u.push(Vne(h, g)), d.push(Une(h, g, i)); + else { + u.push(Vne(h, g.head)), d.push(Une(h, g.head, i)); + for (const T of g.templateSpans) + u.push(Vne(h, T.literal)), d.push(Une(h, T.literal, i)), _.push(E.checkDefined(Ge(T.expression, n, ct))); + } + const S = e.getEmitHelperFactory().createTemplateObjectHelper( + h.createArrayLiteralExpression(u), + h.createArrayLiteralExpression(d) + ); + if (il(i)) { + const T = h.createUniqueName("templateObject"); + s(T), _[0] = h.createLogicalOr( + T, + h.createAssignment( + T, + S + ) + ); + } else + _[0] = S; + return h.createCallExpression( + c, + /*typeArguments*/ + void 0, + _ + ); + } + function Vne(e, t) { + return t.templateFlags & 26656 ? e.createVoidZero() : e.createStringLiteral(t.text); + } + function Une(e, t, n) { + let i = t.rawText; + if (i === void 0) { + E.assertIsDefined(n, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."), i = ub(n, t); + const s = t.kind === 15 || t.kind === 18; + i = i.substring(1, i.length - (s ? 1 : 2)); + } + return i = i.replace(/\r\n?/g, ` +`), ot(e.createStringLiteral(i), t); + } + function qne(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + resumeLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getEmitResolver(), u = e.getCompilerOptions(), d = pa(u), g = Nu(u), h = !!u.experimentalDecorators, S = u.emitDecoratorMetadata ? Gne(e) : void 0, T = e.onEmitNode, C = e.onSubstituteNode; + e.onEmitNode = ql, e.onSubstituteNode = ea, e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ); + let D, P, O, j, F, V, L, $; + return U; + function U(A) { + return A.kind === 308 ? G(A) : ce(A); + } + function G(A) { + return t.createBundle( + A.sourceFiles.map(ce) + ); + } + function ce(A) { + if (A.isDeclarationFile) + return A; + D = A; + const Me = K(A, Fe); + return vh(Me, e.readEmitHelpers()), D = void 0, Me; + } + function K(A, Me) { + const it = j, Ot = F, kr = V; + X(A); + const qn = Me(A); + return j !== it && (F = Ot), j = it, V = kr, qn; + } + function X(A) { + switch (A.kind) { + case 307: + case 269: + case 268: + case 241: + j = A, F = void 0; + break; + case 263: + case 262: + if (Vn( + A, + 128 + /* Ambient */ + )) + break; + A.name ? he(A) : E.assert(A.kind === 263 || Vn( + A, + 2048 + /* Default */ + )); + break; + } + } + function Z(A) { + return K(A, oe); + } + function oe(A) { + return A.transformFlags & 1 ? ye(A) : A; + } + function ne(A) { + return K(A, pe); + } + function pe(A) { + switch (A.kind) { + case 272: + case 271: + case 277: + case 278: + return H(A); + default: + return oe(A); + } + } + function fe(A) { + const Me = Ki(A); + if (Me === A || ko(A)) + return !1; + if (!Me || Me.kind !== A.kind) + return !0; + switch (A.kind) { + case 272: + if (E.assertNode(Me, oc), A.importClause !== Me.importClause || A.attributes !== Me.attributes) + return !0; + break; + case 271: + if (E.assertNode(Me, nl), A.name !== Me.name || A.isTypeOnly !== Me.isTypeOnly || A.moduleReference !== Me.moduleReference && (l_(A.moduleReference) || l_(Me.moduleReference))) + return !0; + break; + case 278: + if (E.assertNode(Me, Ic), A.exportClause !== Me.exportClause || A.attributes !== Me.attributes) + return !0; + break; + } + return !1; + } + function H(A) { + if (fe(A)) + return A.transformFlags & 1 ? gr(A, Z, e) : A; + switch (A.kind) { + case 272: + return wt(A); + case 271: + return Or(A); + case 277: + return en(A); + case 278: + return fr(A); + default: + E.fail("Unhandled ellided statement"); + } + } + function ae(A) { + return K(A, le); + } + function le(A) { + if (!(A.kind === 278 || A.kind === 272 || A.kind === 273 || A.kind === 271 && A.moduleReference.kind === 283)) + return A.transformFlags & 1 || Vn( + A, + 32 + /* Export */ + ) ? ye(A) : A; + } + function Ae(A) { + return (Me) => K(Me, (it) => ge(it, A)); + } + function ge(A, Me) { + switch (A.kind) { + case 176: + return At(A); + case 172: + return Le(A, Me); + case 177: + return Ps(A, Me); + case 178: + return ws(A, Me); + case 174: + return ri(A, Me); + case 175: + return gr(A, Z, e); + case 240: + return A; + case 181: + return; + default: + return E.failBadSyntaxKind(A); + } + } + function de(A) { + return (Me) => K(Me, (it) => ve(it, A)); + } + function ve(A, Me) { + switch (A.kind) { + case 303: + case 304: + case 305: + return Z(A); + case 177: + return Ps(A, Me); + case 178: + return ws(A, Me); + case 174: + return ri(A, Me); + default: + return E.failBadSyntaxKind(A); + } + } + function De(A) { + return dl(A) ? void 0 : Z(A); + } + function Xe(A) { + return Qs(A) ? void 0 : Z(A); + } + function Ie(A) { + if (!dl(A) && !(qT(A.kind) & 28895) && !(P && A.kind === 95)) + return A; + } + function ye(A) { + if (hi(A) && Vn( + A, + 128 + /* Ambient */ + )) + return t.createNotEmittedStatement(A); + switch (A.kind) { + case 95: + case 90: + return P ? void 0 : A; + case 125: + case 123: + case 124: + case 128: + case 164: + case 87: + case 138: + case 148: + case 103: + case 147: + case 188: + case 189: + case 190: + case 191: + case 187: + case 182: + case 168: + case 133: + case 159: + case 136: + case 154: + case 150: + case 146: + case 116: + case 155: + case 185: + case 184: + case 186: + case 183: + case 192: + case 193: + case 194: + case 196: + case 197: + case 198: + case 199: + case 200: + case 201: + case 181: + return; + case 265: + return t.createNotEmittedStatement(A); + case 270: + return; + case 264: + return t.createNotEmittedStatement(A); + case 263: + return Wt(A); + case 231: + return nr(A); + case 298: + return os(A); + case 233: + return wr(A); + case 210: + return Qe(A); + case 176: + case 172: + case 174: + case 177: + case 178: + case 175: + return E.fail("Class and object literal elements must be visited with their respective visitors"); + case 262: + return Yt(A); + case 218: + return Ca(A); + case 219: + return $e(A); + case 169: + return nt(A); + case 217: + return Ee(A); + case 216: + case 234: + return Ne(A); + case 238: + return lt(A); + case 213: + return jt(A); + case 214: + return be(A); + case 215: + return ft(A); + case 235: + return et(A); + case 266: + return Ut(A); + case 243: + return te(A); + case 260: + return re(A); + case 267: + return Te(A); + case 271: + return Or(A); + case 285: + return bt(A); + case 286: + return kt(A); + default: + return gr(A, Z, e); + } + } + function Fe(A) { + const Me = Iu(u, "alwaysStrict") && !(il(A) && g >= 5) && !Ap(A); + return t.updateSourceFile( + A, + Zz( + A.statements, + ne, + e, + /*start*/ + 0, + Me + ) + ); + } + function Qe(A) { + return t.updateObjectLiteralExpression( + A, + Ar(A.properties, de(A), lh) + ); + } + function Ke(A) { + let Me = 0; + ut(aW( + A, + /*requireInitializer*/ + !0, + /*isStatic*/ + !0 + )) && (Me |= 1); + const it = tm(A); + return it && Bc(it.expression).kind !== 106 && (Me |= 64), c0(h, A) && (Me |= 2), a4(h, A) && (Me |= 4), tn(A) ? Me |= 8 : $a(A) ? Me |= 32 : ma(A) && (Me |= 16), Me; + } + function Be(A) { + return !!(A.transformFlags & 8192); + } + function at(A) { + return wf(A) || ut(A.typeParameters) || ut(A.heritageClauses, Be) || ut(A.members, Be); + } + function Wt(A) { + const Me = Ke(A), it = d <= 1 && !!(Me & 7); + if (!at(A) && !c0(h, A) && !tn(A)) + return t.updateClassDeclaration( + A, + Ar(A.modifiers, Ie, Qs), + A.name, + /*typeParameters*/ + void 0, + Ar(A.heritageClauses, Z, nf), + Ar(A.members, Ae(A), fl) + ); + it && e.startLexicalEnvironment(); + const Ot = it || Me & 8; + let kr = Ot ? Ar(A.modifiers, Xe, Lo) : Ar(A.modifiers, Z, Lo); + Me & 2 && (kr = Pr(kr, A)); + const Ht = Ot && !A.name || Me & 4 || Me & 1 ? A.name ?? t.getGeneratedNameForNode(A) : A.name, yn = t.updateClassDeclaration( + A, + kr, + Ht, + /*typeParameters*/ + void 0, + Ar(A.heritageClauses, Z, nf), + Kt(A) + ); + let li = ua(A); + Me & 1 && (li |= 64), Kr(yn, li); + let _i; + if (it) { + const eo = [yn], qo = RB( + sa(D.text, A.members.end), + 20 + /* CloseBraceToken */ + ), ol = t.getInternalName(A), vo = t.createPartiallyEmittedExpression(ol); + DC(vo, qo.end), Kr( + vo, + 3072 + /* NoComments */ + ); + const cl = t.createReturnStatement(vo); + z4(cl, qo.pos), Kr( + cl, + 3840 + /* NoTokenSourceMaps */ + ), eo.push(cl), Pg(eo, e.endLexicalEnvironment()); + const Eo = t.createImmediatelyInvokedArrowFunction(eo); + Y3( + Eo, + 1 + /* TypeScriptClassWrapper */ + ); + const gl = t.createVariableDeclaration( + t.getLocalName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !1 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Eo + ); + kn(gl, A); + const Cl = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [gl], + 1 + /* Let */ + ) + ); + kn(Cl, A), el(Cl, A), aa(Cl, mh(A)), mu(Cl), _i = Cl; + } else + _i = yn; + if (Ot) { + if (Me & 8) + return [ + _i, + Ro(A) + ]; + if (Me & 32) + return [ + _i, + t.createExportDefault(t.getLocalName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )) + ]; + if (Me & 16) + return [ + _i, + t.createExternalModuleExport(t.getDeclarationName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )) + ]; + } + return _i; + } + function nr(A) { + let Me = Ar(A.modifiers, Xe, Lo); + return c0(h, A) && (Me = Pr(Me, A)), t.updateClassExpression( + A, + Me, + A.name, + /*typeParameters*/ + void 0, + Ar(A.heritageClauses, Z, nf), + Kt(A) + ); + } + function Kt(A) { + const Me = Ar(A.members, Ae(A), fl); + let it; + const Ot = Ng(A), kr = Ot && Ln(Ot.parameters, (qn) => Q_(qn, Ot)); + if (kr) + for (const qn of kr) { + const Ht = t.createPropertyDeclaration( + /*modifiers*/ + void 0, + qn.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ); + kn(Ht, qn), it = Tr(it, Ht); + } + return it ? (it = Bn(it, Me), ot( + t.createNodeArray(it), + /*location*/ + A.members + )) : Me; + } + function Pr(A, Me) { + const it = zt(Me, Me); + if (ut(it)) { + const Ot = []; + Bn(Ot, bR(A, pA)), Bn(Ot, Ln(A, dl)), Bn(Ot, it), Bn(Ot, Ln(jX(A, pA), Qs)), A = ot(t.createNodeArray(Ot), A); + } + return A; + } + function Vt(A, Me, it) { + if (Qn(it) && Yj(h, Me, it)) { + const Ot = zt(Me, it); + if (ut(Ot)) { + const kr = []; + Bn(kr, Ln(A, dl)), Bn(kr, Ot), Bn(kr, Ln(A, Qs)), A = ot(t.createNodeArray(kr), A); + } + } + return A; + } + function zt(A, Me) { + if (h) + return jr(A, Me); + } + function jr(A, Me) { + if (S) { + let it; + if (ci(A)) { + const Ot = n().createMetadataHelper("design:type", S.serializeTypeOfNode({ currentLexicalScope: j, currentNameScope: Me }, A, Me)); + it = Tr(it, t.createDecorator(Ot)); + } + if (Ai(A)) { + const Ot = n().createMetadataHelper("design:paramtypes", S.serializeParameterTypesOfNode({ currentLexicalScope: j, currentNameScope: Me }, A, Me)); + it = Tr(it, t.createDecorator(Ot)); + } + if (Xt(A)) { + const Ot = n().createMetadataHelper("design:returntype", S.serializeReturnTypeOfNode({ currentLexicalScope: j, currentNameScope: Me }, A)); + it = Tr(it, t.createDecorator(Ot)); + } + return it; + } + } + function ci(A) { + const Me = A.kind; + return Me === 174 || Me === 177 || Me === 178 || Me === 172; + } + function Xt(A) { + return A.kind === 174; + } + function Ai(A) { + switch (A.kind) { + case 263: + case 231: + return Ng(A) !== void 0; + case 174: + case 177: + case 178: + return !0; + } + return !1; + } + function _s(A, Me) { + const it = A.name; + return wi(it) ? t.createIdentifier("") : oa(it) ? Me && !mm(it.expression) ? t.getGeneratedNameForNode(it) : it.expression : Re(it) ? t.createStringLiteral(dn(it)) : t.cloneNode(it); + } + function $n(A) { + const Me = A.name; + if (oa(Me) && (!Uc(A) && V || wf(A) && h)) { + const it = Ge(Me.expression, Z, ct); + E.assert(it); + const Ot = Xp(it); + if (!mm(Ot)) { + const kr = t.getGeneratedNameForNode(Me); + return c(kr), t.updateComputedPropertyName(Me, t.createAssignment(kr, it)); + } + } + return E.checkDefined(Ge(Me, Z, Rc)); + } + function os(A) { + if (A.token !== 119) + return gr(A, Z, e); + } + function wr(A) { + return t.updateExpressionWithTypeArguments( + A, + E.checkDefined(Ge(A.expression, Z, __)), + /*typeArguments*/ + void 0 + ); + } + function Ss(A) { + return !ic(A.body); + } + function Le(A, Me) { + const it = A.flags & 33554432 || Vn( + A, + 64 + /* Abstract */ + ); + if (it && !(h && wf(A))) + return; + let Ot = Qn(Me) ? it ? Ar(A.modifiers, Xe, Lo) : Ar(A.modifiers, Z, Lo) : Ar(A.modifiers, De, Lo); + return Ot = Vt(Ot, A, Me), it ? t.updatePropertyDeclaration( + A, + Hi(Ot, t.createModifiersFromModifierFlags( + 128 + /* Ambient */ + )), + E.checkDefined(Ge(A.name, Z, Rc)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : t.updatePropertyDeclaration( + A, + Ot, + $n(A), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Ge(A.initializer, Z, ct) + ); + } + function At(A) { + if (Ss(A)) + return t.updateConstructorDeclaration( + A, + /*modifiers*/ + void 0, + cc(A.parameters, Z, e), + ln(A.body, A) + ); + } + function vr(A, Me, it, Ot, kr, qn) { + const Ht = Ot[kr], yn = Me[Ht]; + if (Bn(A, Ar(Me, Z, hi, it, Ht - it)), sS(yn)) { + const li = []; + vr( + li, + yn.tryBlock.statements, + /*statementOffset*/ + 0, + Ot, + kr + 1, + qn + ); + const _i = t.createNodeArray(li); + ot(_i, yn.tryBlock.statements), A.push(t.updateTryStatement( + yn, + t.updateBlock(yn.tryBlock, li), + Ge(yn.catchClause, Z, Rb), + Ge(yn.finallyBlock, Z, ms) + )); + } else + Bn(A, Ar(Me, Z, hi, Ht, 1)), Bn(A, qn); + Bn(A, Ar(Me, Z, hi, Ht + 1)); + } + function ln(A, Me) { + const it = Me && Ln(Me.parameters, (li) => Q_(li, Me)); + if (!ut(it)) + return Lf(A, Z, e); + let Ot = []; + s(); + const kr = t.copyPrologue( + A.statements, + Ot, + /*ensureUseStrict*/ + !1, + Z + ), qn = VO(A.statements, kr), Ht = Ii(it, Zn); + qn.length ? vr( + Ot, + A.statements, + kr, + qn, + /*superPathDepth*/ + 0, + Ht + ) : (Bn(Ot, Ht), Bn(Ot, Ar(A.statements, Z, hi, kr))), Ot = t.mergeLexicalEnvironment(Ot, o()); + const yn = t.createBlock( + ot(t.createNodeArray(Ot), A.statements), + /*multiLine*/ + !0 + ); + return ot( + yn, + /*location*/ + A + ), kn(yn, A), yn; + } + function Zn(A) { + const Me = A.name; + if (!Re(Me)) + return; + const it = Da(ot(t.cloneNode(Me), Me), Me.parent); + Kr( + it, + 3168 + /* NoSourceMap */ + ); + const Ot = Da(ot(t.cloneNode(Me), Me), Me.parent); + return Kr( + Ot, + 3072 + /* NoComments */ + ), mu( + Q3( + ot( + kn( + t.createExpressionStatement( + t.createAssignment( + ot( + t.createPropertyAccessExpression( + t.createThis(), + it + ), + A.name + ), + Ot + ) + ), + A + ), + Q1(A, -1) + ) + ) + ); + } + function ri(A, Me) { + if (!(A.transformFlags & 1)) + return A; + if (!Ss(A)) + return; + let it = Qn(Me) ? Ar(A.modifiers, Z, Lo) : Ar(A.modifiers, De, Lo); + return it = Vt(it, A, Me), t.updateMethodDeclaration( + A, + it, + A.asteriskToken, + $n(A), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + cc(A.parameters, Z, e), + /*type*/ + void 0, + Lf(A.body, Z, e) + ); + } + function mi(A) { + return !(ic(A.body) && Vn( + A, + 64 + /* Abstract */ + )); + } + function Ps(A, Me) { + if (!(A.transformFlags & 1)) + return A; + if (!mi(A)) + return; + let it = Qn(Me) ? Ar(A.modifiers, Z, Lo) : Ar(A.modifiers, De, Lo); + return it = Vt(it, A, Me), t.updateGetAccessorDeclaration( + A, + it, + $n(A), + cc(A.parameters, Z, e), + /*type*/ + void 0, + Lf(A.body, Z, e) || t.createBlock([]) + ); + } + function ws(A, Me) { + if (!(A.transformFlags & 1)) + return A; + if (!mi(A)) + return; + let it = Qn(Me) ? Ar(A.modifiers, Z, Lo) : Ar(A.modifiers, De, Lo); + return it = Vt(it, A, Me), t.updateSetAccessorDeclaration( + A, + it, + $n(A), + cc(A.parameters, Z, e), + Lf(A.body, Z, e) || t.createBlock([]) + ); + } + function Yt(A) { + if (!Ss(A)) + return t.createNotEmittedStatement(A); + const Me = t.updateFunctionDeclaration( + A, + Ar(A.modifiers, Ie, Qs), + A.asteriskToken, + A.name, + /*typeParameters*/ + void 0, + cc(A.parameters, Z, e), + /*type*/ + void 0, + Lf(A.body, Z, e) || t.createBlock([]) + ); + if (tn(A)) { + const it = [Me]; + return Vo(it, A), it; + } + return Me; + } + function Ca(A) { + return Ss(A) ? t.updateFunctionExpression( + A, + Ar(A.modifiers, Ie, Qs), + A.asteriskToken, + A.name, + /*typeParameters*/ + void 0, + cc(A.parameters, Z, e), + /*type*/ + void 0, + Lf(A.body, Z, e) || t.createBlock([]) + ) : t.createOmittedExpression(); + } + function $e(A) { + return t.updateArrowFunction( + A, + Ar(A.modifiers, Ie, Qs), + /*typeParameters*/ + void 0, + cc(A.parameters, Z, e), + /*type*/ + void 0, + A.equalsGreaterThanToken, + Lf(A.body, Z, e) + ); + } + function nt(A) { + if (Sb(A)) + return; + const Me = t.updateParameterDeclaration( + A, + Ar(A.modifiers, (it) => dl(it) ? Z(it) : void 0, Lo), + A.dotDotDotToken, + E.checkDefined(Ge(A.name, Z, W2)), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Ge(A.initializer, Z, ct) + ); + return Me !== A && (el(Me, A), ot(Me, am(A)), aa(Me, am(A)), Kr( + Me.name, + 64 + /* NoTrailingSourceMap */ + )), Me; + } + function te(A) { + if (tn(A)) { + const Me = P4(A.declarationList); + return Me.length === 0 ? void 0 : ot( + t.createExpressionStatement( + t.inlineExpressions( + or(Me, rt) + ) + ), + A + ); + } else + return gr(A, Z, e); + } + function rt(A) { + const Me = A.name; + return Ts(Me) ? mS( + A, + Z, + e, + 0, + /*needsValue*/ + !1, + ga + ) : ot( + t.createAssignment( + Co(Me), + E.checkDefined(Ge(A.initializer, Z, ct)) + ), + /*location*/ + A + ); + } + function re(A) { + const Me = t.updateVariableDeclaration( + A, + E.checkDefined(Ge(A.name, Z, W2)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ge(A.initializer, Z, ct) + ); + return A.type && jee(Me.name, A.type), Me; + } + function Ee(A) { + const Me = Bc( + A.expression, + -7 + /* Assertions */ + ); + if (J1(Me) || G5(Me)) { + const it = Ge(A.expression, Z, ct); + return E.assert(it), t.createPartiallyEmittedExpression(it, A); + } + return gr(A, Z, e); + } + function Ne(A) { + const Me = Ge(A.expression, Z, ct); + return E.assert(Me), t.createPartiallyEmittedExpression(Me, A); + } + function et(A) { + const Me = Ge(A.expression, Z, __); + return E.assert(Me), t.createPartiallyEmittedExpression(Me, A); + } + function lt(A) { + const Me = Ge(A.expression, Z, ct); + return E.assert(Me), t.createPartiallyEmittedExpression(Me, A); + } + function jt(A) { + return t.updateCallExpression( + A, + E.checkDefined(Ge(A.expression, Z, ct)), + /*typeArguments*/ + void 0, + Ar(A.arguments, Z, ct) + ); + } + function be(A) { + return t.updateNewExpression( + A, + E.checkDefined(Ge(A.expression, Z, ct)), + /*typeArguments*/ + void 0, + Ar(A.arguments, Z, ct) + ); + } + function ft(A) { + return t.updateTaggedTemplateExpression( + A, + E.checkDefined(Ge(A.tag, Z, ct)), + /*typeArguments*/ + void 0, + E.checkDefined(Ge(A.template, Z, wT)) + ); + } + function bt(A) { + return t.updateJsxSelfClosingElement( + A, + E.checkDefined(Ge(A.tagName, Z, ZE)), + /*typeArguments*/ + void 0, + E.checkDefined(Ge(A.attributes, Z, Mb)) + ); + } + function kt(A) { + return t.updateJsxOpeningElement( + A, + E.checkDefined(Ge(A.tagName, Z, ZE)), + /*typeArguments*/ + void 0, + E.checkDefined(Ge(A.attributes, Z, Mb)) + ); + } + function yt(A) { + return !fb(A) || Cb(u); + } + function Ut(A) { + if (!yt(A)) + return t.createNotEmittedStatement(A); + const Me = []; + let it = 4; + const Ot = _e(Me, A); + Ot && (g !== 4 || j !== D) && (it |= 1024); + const kr = Li(A), qn = bi(A), Ht = tn(A) ? t.getExternalModuleOrNamespaceExportName( + O, + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + let yn = t.createLogicalOr( + Ht, + t.createAssignment( + Ht, + t.createObjectLiteralExpression() + ) + ); + if (tn(A)) { + const _i = t.getLocalName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + yn = t.createAssignment(_i, yn); + } + const li = t.createExpressionStatement( + t.createCallExpression( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + kr + )], + /*type*/ + void 0, + W(A, qn) + ), + /*typeArguments*/ + void 0, + [yn] + ) + ); + return kn(li, A), Ot && (Z1(li, void 0), ax(li, void 0)), ot(li, A), cm(li, it), Me.push(li), Me; + } + function W(A, Me) { + const it = O; + O = Me; + const Ot = []; + i(); + const kr = or(A.members, je); + return Pg(Ot, o()), Bn(Ot, kr), O = it, t.createBlock( + ot( + t.createNodeArray(Ot), + /*location*/ + A.members + ), + /*multiLine*/ + !0 + ); + } + function je(A) { + const Me = _s( + A, + /*generateNameForComputedPropertyName*/ + !1 + ), it = _.getEnumMemberValue(A), Ot = st(A, it?.value), kr = t.createAssignment( + t.createElementAccessExpression( + O, + Me + ), + Ot + ), qn = typeof it?.value == "string" || it?.isSyntacticallyString ? kr : t.createAssignment( + t.createElementAccessExpression( + O, + kr + ), + Me + ); + return ot( + t.createExpressionStatement( + ot( + qn, + A + ) + ), + A + ); + } + function st(A, Me) { + return Me !== void 0 ? typeof Me == "string" ? t.createStringLiteral(Me) : Me < 0 ? t.createPrefixUnaryExpression(41, t.createNumericLiteral(-Me)) : t.createNumericLiteral(Me) : (wl(), A.initializer ? E.checkDefined(Ge(A.initializer, Z, ct)) : t.createVoidZero()); + } + function z(A) { + const Me = Ki(A, Nc); + return Me ? Qz(Me, Cb(u)) : !0; + } + function he(A) { + F || (F = /* @__PURE__ */ new Map()); + const Me = we(A); + F.has(Me) || F.set(Me, A); + } + function q(A) { + if (F) { + const Me = we(A); + return F.get(Me) === A; + } + return !0; + } + function we(A) { + return E.assertNode(A.name, Re), A.name.escapedText; + } + function _e(A, Me) { + const it = t.createVariableDeclaration(t.getLocalName( + Me, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + )), Ot = j.kind === 307 ? 0 : 1, kr = t.createVariableStatement( + Ar(Me.modifiers, Ie, Qs), + t.createVariableDeclarationList([it], Ot) + ); + return kn(it, Me), Z1(it, void 0), ax(it, void 0), kn(kr, Me), he(Me), q(Me) ? (Me.kind === 266 ? aa(kr.declarationList, Me) : aa(kr, Me), el(kr, Me), cm( + kr, + 2048 + /* NoTrailingComments */ + ), A.push(kr), !0) : !1; + } + function Te(A) { + if (!z(A)) + return t.createNotEmittedStatement(A); + E.assertNode(A.name, Re, "A TypeScript namespace should have an Identifier name."), jo(); + const Me = []; + let it = 4; + const Ot = _e(Me, A); + Ot && (g !== 4 || j !== D) && (it |= 1024); + const kr = Li(A), qn = bi(A), Ht = tn(A) ? t.getExternalModuleOrNamespaceExportName( + O, + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + let yn = t.createLogicalOr( + Ht, + t.createAssignment( + Ht, + t.createObjectLiteralExpression() + ) + ); + if (tn(A)) { + const _i = t.getLocalName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + yn = t.createAssignment(_i, yn); + } + const li = t.createExpressionStatement( + t.createCallExpression( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + kr + )], + /*type*/ + void 0, + dt(A, qn) + ), + /*typeArguments*/ + void 0, + [yn] + ) + ); + return kn(li, A), Ot && (Z1(li, void 0), ax(li, void 0)), ot(li, A), cm(li, it), Me.push(li), Me; + } + function dt(A, Me) { + const it = O, Ot = P, kr = F; + O = Me, P = A, F = void 0; + const qn = []; + i(); + let Ht, yn; + if (A.body) + if (A.body.kind === 268) + K(A.body, (_i) => Bn(qn, Ar(_i.statements, ae, hi))), Ht = A.body.statements, yn = A.body; + else { + const _i = Te(A.body); + _i && (ss(_i) ? Bn(qn, _i) : qn.push(_i)); + const eo = xt(A).body; + Ht = Q1(eo.statements, -1); + } + Pg(qn, o()), O = it, P = Ot, F = kr; + const li = t.createBlock( + ot( + t.createNodeArray(qn), + /*location*/ + Ht + ), + /*multiLine*/ + !0 + ); + return ot(li, yn), (!A.body || A.body.kind !== 268) && Kr( + li, + ua(li) | 3072 + /* NoComments */ + ), li; + } + function xt(A) { + if (A.body.kind === 267) + return xt(A.body) || A.body; + } + function wt(A) { + if (!A.importClause) + return A; + if (A.importClause.isTypeOnly) + return; + const Me = Ge(A.importClause, ir, kd); + return Me ? t.updateImportDeclaration( + A, + /*modifiers*/ + void 0, + Me, + A.moduleSpecifier, + A.attributes + ) : void 0; + } + function ir(A) { + E.assert(!A.isTypeOnly); + const Me = Uo(A) ? A.name : void 0, it = Ge(A.namedBindings, br, Cj); + return Me || it ? t.updateImportClause( + A, + /*isTypeOnly*/ + !1, + Me, + it + ) : void 0; + } + function br(A) { + if (A.kind === 274) + return Uo(A) ? A : void 0; + { + const Me = u.verbatimModuleSyntax, it = Ar(A.elements, Lr, Yu); + return Me || ut(it) ? t.updateNamedImports(A, it) : void 0; + } + } + function Lr(A) { + return !A.isTypeOnly && Uo(A) ? A : void 0; + } + function en(A) { + return u.verbatimModuleSyntax || _.isValueAliasDeclaration(A) ? gr(A, Z, e) : void 0; + } + function fr(A) { + if (A.isTypeOnly) + return; + if (!A.exportClause || Ym(A.exportClause)) + return A; + const Me = !!u.verbatimModuleSyntax, it = Ge( + A.exportClause, + (Ot) => Fi(Ot, Me), + dj + ); + return it ? t.updateExportDeclaration( + A, + /*modifiers*/ + void 0, + A.isTypeOnly, + it, + A.moduleSpecifier, + A.attributes + ) : void 0; + } + function mn(A, Me) { + const it = Ar(A.elements, ur, pu); + return Me || ut(it) ? t.updateNamedExports(A, it) : void 0; + } + function Di(A) { + return t.updateNamespaceExport(A, E.checkDefined(Ge(A.name, Z, Re))); + } + function Fi(A, Me) { + return Ym(A) ? Di(A) : mn(A, Me); + } + function ur(A) { + return !A.isTypeOnly && (u.verbatimModuleSyntax || _.isValueAliasDeclaration(A)) ? A : void 0; + } + function Mr(A) { + return Uo(A) || !il(D) && _.isTopLevelValueImportEqualsWithEntityName(A); + } + function Or(A) { + if (A.isTypeOnly) + return; + if (V1(A)) + return Uo(A) ? gr(A, Z, e) : void 0; + if (!Mr(A)) + return; + const Me = lA(t, A.moduleReference); + return Kr( + Me, + 7168 + /* NoNestedComments */ + ), ma(A) || !tn(A) ? kn( + ot( + t.createVariableStatement( + Ar(A.modifiers, Ie, Qs), + t.createVariableDeclarationList([ + kn( + t.createVariableDeclaration( + A.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Me + ), + A + ) + ]) + ), + A + ), + A + ) : kn( + hs( + A.name, + Me, + A + ), + A + ); + } + function tn(A) { + return P !== void 0 && Vn( + A, + 32 + /* Export */ + ); + } + function qt(A) { + return P === void 0 && Vn( + A, + 32 + /* Export */ + ); + } + function ma(A) { + return qt(A) && !Vn( + A, + 2048 + /* Default */ + ); + } + function $a(A) { + return qt(A) && Vn( + A, + 2048 + /* Default */ + ); + } + function Ro(A) { + const Me = t.createAssignment( + t.getExternalModuleOrNamespaceExportName( + O, + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), + t.getLocalName(A) + ); + aa(Me, np(A.name ? A.name.pos : A.pos, A.end)); + const it = t.createExpressionStatement(Me); + return aa(it, np(-1, A.end)), it; + } + function Vo(A, Me) { + A.push(Ro(Me)); + } + function hs(A, Me, it) { + return ot( + t.createExpressionStatement( + t.createAssignment( + t.getNamespaceMemberName( + O, + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), + Me + ) + ), + it + ); + } + function ga(A, Me, it) { + return ot(t.createAssignment(Co(A), Me), it); + } + function Co(A) { + return t.getNamespaceMemberName( + O, + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ); + } + function Li(A) { + const Me = t.getGeneratedNameForNode(A); + return aa(Me, A.name), Me; + } + function bi(A) { + return t.getGeneratedNameForNode(A); + } + function wl() { + L & 8 || (L |= 8, e.enableSubstitution( + 80 + /* Identifier */ + )); + } + function jo() { + L & 2 || (L |= 2, e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableEmitNotification( + 267 + /* ModuleDeclaration */ + )); + } + function Su(A) { + return Zo(A).kind === 267; + } + function fc(A) { + return Zo(A).kind === 266; + } + function ql(A, Me, it) { + const Ot = $, kr = D; + yi(Me) && (D = Me), L & 2 && Su(Me) && ($ |= 2), L & 8 && fc(Me) && ($ |= 8), T(A, Me, it), $ = Ot, D = kr; + } + function ea(A, Me) { + return Me = C(A, Me), A === 1 ? Ka(Me) : du(Me) ? wo(Me) : Me; + } + function wo(A) { + if (L & 2) { + const Me = A.name, it = Bt(Me); + if (it) { + if (A.objectAssignmentInitializer) { + const Ot = t.createAssignment(it, A.objectAssignmentInitializer); + return ot(t.createPropertyAssignment(Me, Ot), A); + } + return ot(t.createPropertyAssignment(Me, it), A); + } + } + return A; + } + function Ka(A) { + switch (A.kind) { + case 80: + return Fa(A); + case 211: + return lc(A); + case 212: + return Fu(A); + } + return A; + } + function Fa(A) { + return Bt(A) || A; + } + function Bt(A) { + if (L & $ && !Fo(A) && !xh(A)) { + const Me = _.getReferencedExportContainer( + A, + /*prefixLocals*/ + !1 + ); + if (Me && Me.kind !== 307 && ($ & 2 && Me.kind === 267 || $ & 8 && Me.kind === 266)) + return ot( + t.createPropertyAccessExpression(t.getGeneratedNameForNode(Me), A), + /*location*/ + A + ); + } + } + function lc(A) { + return y_(A); + } + function Fu(A) { + return y_(A); + } + function Lu(A) { + return A.replace(/\*\//g, "*_/"); + } + function y_(A) { + const Me = Ao(A); + if (Me !== void 0) { + Mee(A, Me); + const it = typeof Me == "string" ? t.createStringLiteral(Me) : Me < 0 ? t.createPrefixUnaryExpression(41, t.createNumericLiteral(-Me)) : t.createNumericLiteral(Me); + if (!u.removeComments) { + const Ot = Zo(A, go); + F5(it, 3, ` ${Lu(sc(Ot))} `); + } + return it; + } + return A; + } + function Ao(A) { + if (!ap(u)) + return Dn(A) || ho(A) ? _.getConstantValue(A) : void 0; + } + function Uo(A) { + return u.verbatimModuleSyntax || Qr(A) || _.isReferencedAliasDeclaration(A); + } + } + function Hne(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i, + endLexicalEnvironment: s, + startLexicalEnvironment: o, + resumeLexicalEnvironment: c, + addBlockScopedVariable: _ + } = e, u = e.getEmitResolver(), d = e.getCompilerOptions(), g = pa(d), h = B3(d), S = !!d.experimentalDecorators, T = !h, C = h && g < 9, D = T || C, P = g < 9, O = g < 99 ? -1 : h ? 0 : 3, j = g < 9, F = j && g >= 2, V = D || P || O === -1, L = e.onSubstituteNode; + e.onSubstituteNode = Fu; + const $ = e.onEmitNode; + e.onEmitNode = lc; + let U = !1, G, ce, K, X, Z; + const oe = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ new Set(); + let pe, fe, H = !1, ae = !1; + return Pd(e, le); + function le(A) { + if (A.isDeclarationFile || (Z = void 0, U = !!(Qp(A) & 32), !V && !U)) + return A; + const Me = gr(A, ge, e); + return vh(Me, e.readEmitHelpers()), Me; + } + function Ae(A) { + switch (A.kind) { + case 129: + return At() ? void 0 : A; + default: + return Jn(A, Qs); + } + } + function ge(A) { + if (!(A.transformFlags & 16777216) && !(A.transformFlags & 134234112)) + return A; + switch (A.kind) { + case 129: + return E.fail("Use `modifierVisitor` instead."); + case 263: + return yt(A); + case 231: + return W(A); + case 175: + case 172: + return E.fail("Use `classElementVisitor` instead."); + case 303: + return Be(A); + case 243: + return at(A); + case 260: + return Wt(A); + case 169: + return nr(A); + case 208: + return Kt(A); + case 277: + return Pr(A); + case 81: + return Qe(A); + case 211: + return Ps(A); + case 212: + return ws(A); + case 224: + case 225: + return Yt( + A, + /*discarded*/ + !1 + ); + case 226: + return Ne( + A, + /*discarded*/ + !1 + ); + case 217: + return lt( + A, + /*discarded*/ + !1 + ); + case 213: + return te(A); + case 244: + return $e(A); + case 215: + return rt(A); + case 248: + return Ca(A); + case 110: + return z(A); + case 262: + case 218: + return Ai( + /*classElement*/ + void 0, + de, + A + ); + case 176: + case 174: + case 177: + case 178: + return Ai( + A, + de, + A + ); + default: + return de(A); + } + } + function de(A) { + return gr(A, ge, e); + } + function ve(A) { + switch (A.kind) { + case 224: + case 225: + return Yt( + A, + /*discarded*/ + !0 + ); + case 226: + return Ne( + A, + /*discarded*/ + !0 + ); + case 355: + return et( + A, + /*discarded*/ + !0 + ); + case 217: + return lt( + A, + /*discarded*/ + !0 + ); + default: + return ge(A); + } + } + function De(A) { + switch (A.kind) { + case 298: + return gr(A, De, e); + case 233: + return bt(A); + default: + return ge(A); + } + } + function Xe(A) { + switch (A.kind) { + case 210: + case 209: + return Bt(A); + default: + return ge(A); + } + } + function Ie(A) { + switch (A.kind) { + case 176: + return Ai( + A, + jr, + A + ); + case 177: + case 178: + case 174: + return Ai( + A, + Xt, + A + ); + case 172: + return Ai( + A, + vr, + A + ); + case 175: + return Ai( + A, + st, + A + ); + case 167: + return zt(A); + case 240: + return A; + default: + return Lo(A) ? Ae(A) : ge(A); + } + } + function ye(A) { + switch (A.kind) { + case 167: + return zt(A); + default: + return ge(A); + } + } + function Fe(A) { + switch (A.kind) { + case 172: + return Le(A); + case 177: + case 178: + return Ie(A); + default: + E.assertMissingNode(A, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); + break; + } + } + function Qe(A) { + return !P || hi(A.parent) ? A : kn(t.createIdentifier(""), A); + } + function Ke(A) { + const Me = bi(A.left); + if (Me) { + const it = Ge(A.right, ge, ct); + return kn( + n().createClassPrivateFieldInHelper(Me.brandCheckIdentifier, it), + A + ); + } + return gr(A, ge, e); + } + function Be(A) { + return Z_(A, Ee) && (A = sf(e, A)), gr(A, ge, e); + } + function at(A) { + const Me = X; + X = []; + const it = gr(A, ge, e), Ot = ut(X) ? [it, ...X] : it; + return X = Me, Ot; + } + function Wt(A) { + return Z_(A, Ee) && (A = sf(e, A)), gr(A, ge, e); + } + function nr(A) { + return Z_(A, Ee) && (A = sf(e, A)), gr(A, ge, e); + } + function Kt(A) { + return Z_(A, Ee) && (A = sf(e, A)), gr(A, ge, e); + } + function Pr(A) { + return Z_(A, Ee) && (A = sf( + e, + A, + /*ignoreEmptyStringLiteral*/ + !0, + A.isExportEquals ? "" : "default" + )), gr(A, ge, e); + } + function Vt(A) { + return ut(K) && (Qu(A) ? (K.push(A.expression), A = t.updateParenthesizedExpression(A, t.inlineExpressions(K))) : (K.push(A), A = t.inlineExpressions(K)), K = void 0), A; + } + function zt(A) { + const Me = Ge(A.expression, ge, ct); + return t.updateComputedPropertyName(A, Vt(Me)); + } + function jr(A) { + return pe ? we(A, pe) : de(A); + } + function ci(A) { + return !!(P || Uc(A) && Qp(A) & 32); + } + function Xt(A) { + if (E.assert(!wf(A)), !Pu(A) || !ci(A)) + return gr(A, Ie, e); + const Me = bi(A.name); + if (E.assert(Me, "Undeclared private name for property declaration."), !Me.isValid) + return A; + const it = _s(A); + it && tn().push( + t.createAssignment( + it, + t.createFunctionExpression( + Ln(A.modifiers, (Ot) => Qs(Ot) && !fx(Ot) && !Cte(Ot)), + A.asteriskToken, + it, + /*typeParameters*/ + void 0, + cc(A.parameters, ge, e), + /*type*/ + void 0, + Lf(A.body, ge, e) + ) + ) + ); + } + function Ai(A, Me, it) { + if (A !== fe) { + const Ot = fe; + fe = A; + const kr = Me(it); + return fe = Ot, kr; + } + return Me(it); + } + function _s(A) { + E.assert(wi(A.name)); + const Me = bi(A.name); + if (E.assert(Me, "Undeclared private name for property declaration."), Me.kind === "m") + return Me.methodName; + if (Me.kind === "a") { + if (n0(A)) + return Me.getterName; + if (Yd(A)) + return Me.setterName; + } + } + function $n() { + const A = Mr(); + return A.classThis ?? A.classConstructor ?? pe?.name; + } + function os(A) { + const Me = lm(A), it = g0(A), Ot = A.name; + let kr = Ot, qn = Ot; + if (oa(Ot) && !mm(Ot.expression)) { + const ol = uO(Ot); + if (ol) + kr = t.updateComputedPropertyName(Ot, Ge(Ot.expression, ge, ct)), qn = t.updateComputedPropertyName(Ot, ol.left); + else { + const vo = t.createTempVariable(i); + aa(vo, Ot.expression); + const cl = Ge(Ot.expression, ge, ct), Eo = t.createAssignment(vo, cl); + aa(Eo, Ot.expression), kr = t.updateComputedPropertyName(Ot, Eo), qn = t.updateComputedPropertyName(Ot, vo); + } + } + const Ht = Ar(A.modifiers, Ae, Qs), yn = sz(t, A, Ht, A.initializer); + kn(yn, A), Kr( + yn, + 3072 + /* NoComments */ + ), aa(yn, it); + const li = Os(A) ? $n() ?? t.createThis() : t.createThis(), _i = are(t, A, Ht, kr, li); + kn(_i, A), el(_i, Me), aa(_i, it); + const eo = t.createModifiersFromModifierFlags(sm(Ht)), qo = ore(t, A, eo, qn, li); + return kn(qo, A), Kr( + qo, + 3072 + /* NoComments */ + ), aa(qo, it), AA([yn, _i, qo], Fe, fl); + } + function wr(A) { + if (ci(A)) { + const Me = bi(A.name); + if (E.assert(Me, "Undeclared private name for property declaration."), !Me.isValid) + return A; + if (Me.isStatic && !P) { + const it = xt(A, t.createThis()); + if (it) + return t.createClassStaticBlockDeclaration(t.createBlock( + [it], + /*multiLine*/ + !0 + )); + } + return; + } + return T && !Os(A) && Z?.data && Z.data.facts & 16 ? t.updatePropertyDeclaration( + A, + Ar(A.modifiers, ge, Lo), + A.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : (Z_(A, Ee) && (A = sf(e, A)), t.updatePropertyDeclaration( + A, + Ar(A.modifiers, Ae, Qs), + Ge(A.name, ye, Rc), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Ge(A.initializer, ge, ct) + )); + } + function Ss(A) { + if (D && !u_(A)) { + const Me = Di( + A.name, + /*shouldHoist*/ + !!A.initializer || h + ); + if (Me && tn().push(...cre(Me)), Os(A) && !P) { + const it = xt(A, t.createThis()); + if (it) { + const Ot = t.createClassStaticBlockDeclaration( + t.createBlock([it]) + ); + return kn(Ot, A), el(Ot, A), el(it, { pos: -1, end: -1 }), Z1(it, void 0), ax(it, void 0), Ot; + } + } + return; + } + return t.updatePropertyDeclaration( + A, + Ar(A.modifiers, Ae, Qs), + Ge(A.name, ye, Rc), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Ge(A.initializer, ge, ct) + ); + } + function Le(A) { + return E.assert(!wf(A), "Decorators should already have been transformed and elided."), Pu(A) ? wr(A) : Ss(A); + } + function At() { + return O === -1 || O === 3 && !!Z?.data && !!(Z.data.facts & 16); + } + function vr(A) { + return u_(A) && (At() || Uc(A) && Qp(A) & 32) ? os(A) : Le(A); + } + function ln() { + return !!fe && Uc(fe) && _y(fe) && u_(Zo(fe)); + } + function Zn(A) { + if (ln()) { + const Me = Bc(A); + Me.kind === 110 && ne.add(Me); + } + } + function ri(A, Me) { + return Me = Ge(Me, ge, ct), Zn(Me), mi(A, Me); + } + function mi(A, Me) { + switch (el(Me, Q1(Me, -1)), A.kind) { + case "a": + return n().createClassPrivateFieldGetHelper( + Me, + A.brandCheckIdentifier, + A.kind, + A.getterName + ); + case "m": + return n().createClassPrivateFieldGetHelper( + Me, + A.brandCheckIdentifier, + A.kind, + A.methodName + ); + case "f": + return n().createClassPrivateFieldGetHelper( + Me, + A.brandCheckIdentifier, + A.kind, + A.isStatic ? A.variableName : void 0 + ); + case "untransformed": + return E.fail("Access helpers should not be created for untransformed private elements"); + default: + E.assertNever(A, "Unknown private element type"); + } + } + function Ps(A) { + if (wi(A.name)) { + const Me = bi(A.name); + if (Me) + return ot( + kn( + ri(Me, A.expression), + A + ), + A + ); + } + if (F && fe && f_(A) && Re(A.name) && ND(fe) && Z?.data) { + const { classConstructor: Me, superClassReference: it, facts: Ot } = Z.data; + if (Ot & 1) + return mn(A); + if (Me && it) { + const kr = t.createReflectGetCall( + it, + t.createStringLiteralFromNode(A.name), + Me + ); + return kn(kr, A.expression), ot(kr, A.expression), kr; + } + } + return gr(A, ge, e); + } + function ws(A) { + if (F && fe && f_(A) && ND(fe) && Z?.data) { + const { classConstructor: Me, superClassReference: it, facts: Ot } = Z.data; + if (Ot & 1) + return mn(A); + if (Me && it) { + const kr = t.createReflectGetCall( + it, + Ge(A.argumentExpression, ge, ct), + Me + ); + return kn(kr, A.expression), ot(kr, A.expression), kr; + } + } + return gr(A, ge, e); + } + function Yt(A, Me) { + if (A.operator === 46 || A.operator === 47) { + const it = Ja(A.operand); + if (Xk(it)) { + let Ot; + if (Ot = bi(it.name)) { + const kr = Ge(it.expression, ge, ct); + Zn(kr); + const { readExpression: qn, initializeExpression: Ht } = nt(kr); + let yn = ri(Ot, qn); + const li = Ey(A) || Me ? void 0 : t.createTempVariable(i); + return yn = nO(t, A, yn, i, li), yn = jt( + Ot, + Ht || qn, + yn, + 64 + /* EqualsToken */ + ), kn(yn, A), ot(yn, A), li && (yn = t.createComma(yn, li), ot(yn, A)), yn; + } + } else if (F && fe && f_(it) && ND(fe) && Z?.data) { + const { classConstructor: Ot, superClassReference: kr, facts: qn } = Z.data; + if (qn & 1) { + const Ht = mn(it); + return Ey(A) ? t.updatePrefixUnaryExpression(A, Ht) : t.updatePostfixUnaryExpression(A, Ht); + } + if (Ot && kr) { + let Ht, yn; + if (Dn(it) ? Re(it.name) && (yn = Ht = t.createStringLiteralFromNode(it.name)) : mm(it.argumentExpression) ? yn = Ht = it.argumentExpression : (yn = t.createTempVariable(i), Ht = t.createAssignment(yn, Ge(it.argumentExpression, ge, ct))), Ht && yn) { + let li = t.createReflectGetCall(kr, yn, Ot); + ot(li, it); + const _i = Me ? void 0 : t.createTempVariable(i); + return li = nO(t, A, li, i, _i), li = t.createReflectSetCall(kr, Ht, li, Ot), kn(li, A), ot(li, A), _i && (li = t.createComma(li, _i), ot(li, A)), li; + } + } + } + } + return gr(A, ge, e); + } + function Ca(A) { + return t.updateForStatement( + A, + Ge(A.initializer, ve, tp), + Ge(A.condition, ge, ct), + Ge(A.incrementor, ve, ct), + Zu(A.statement, ge, e) + ); + } + function $e(A) { + return t.updateExpressionStatement( + A, + Ge(A.expression, ve, ct) + ); + } + function nt(A) { + const Me = oo(A) ? A : t.cloneNode(A); + if (A.kind === 110 && ne.has(A) && ne.add(Me), mm(A)) + return { readExpression: Me, initializeExpression: void 0 }; + const it = t.createTempVariable(i), Ot = t.createAssignment(it, Me); + return { readExpression: it, initializeExpression: Ot }; + } + function te(A) { + var Me; + if (Xk(A.expression) && bi(A.expression.name)) { + const { thisArg: it, target: Ot } = t.createCallBinding(A.expression, i, g); + return J2(A) ? t.updateCallChain( + A, + t.createPropertyAccessChain(Ge(Ot, ge, ct), A.questionDotToken, "call"), + /*questionDotToken*/ + void 0, + /*typeArguments*/ + void 0, + [Ge(it, ge, ct), ...Ar(A.arguments, ge, ct)] + ) : t.updateCallExpression( + A, + t.createPropertyAccessExpression(Ge(Ot, ge, ct), "call"), + /*typeArguments*/ + void 0, + [Ge(it, ge, ct), ...Ar(A.arguments, ge, ct)] + ); + } + if (F && fe && f_(A.expression) && ND(fe) && ((Me = Z?.data) != null && Me.classConstructor)) { + const it = t.createFunctionCallCall( + Ge(A.expression, ge, ct), + Z.data.classConstructor, + Ar(A.arguments, ge, ct) + ); + return kn(it, A), ot(it, A), it; + } + return gr(A, ge, e); + } + function rt(A) { + var Me; + if (Xk(A.tag) && bi(A.tag.name)) { + const { thisArg: it, target: Ot } = t.createCallBinding(A.tag, i, g); + return t.updateTaggedTemplateExpression( + A, + t.createCallExpression( + t.createPropertyAccessExpression(Ge(Ot, ge, ct), "bind"), + /*typeArguments*/ + void 0, + [Ge(it, ge, ct)] + ), + /*typeArguments*/ + void 0, + Ge(A.template, ge, wT) + ); + } + if (F && fe && f_(A.tag) && ND(fe) && ((Me = Z?.data) != null && Me.classConstructor)) { + const it = t.createFunctionBindCall( + Ge(A.tag, ge, ct), + Z.data.classConstructor, + [] + ); + return kn(it, A), ot(it, A), t.updateTaggedTemplateExpression( + A, + it, + /*typeArguments*/ + void 0, + Ge(A.template, ge, wT) + ); + } + return gr(A, ge, e); + } + function re(A) { + if (Z && oe.set(Zo(A), Z), P) { + if (wD(A)) { + const Ot = Ge(A.body.statements[0].expression, ge, ct); + return Tl( + Ot, + /*excludeCompoundAssignment*/ + !0 + ) && Ot.left === Ot.right ? void 0 : Ot; + } + if (Ix(A)) + return Ge(A.body.statements[0].expression, ge, ct); + o(); + let Me = Ai( + A, + (Ot) => Ar(Ot, ge, hi), + A.body.statements + ); + Me = t.mergeLexicalEnvironment(Me, s()); + const it = t.createImmediatelyInvokedArrowFunction(Me); + return kn(Ja(it.expression), A), cm( + Ja(it.expression), + 4 + /* AdviseOnEmitNode */ + ), kn(it, A), ot(it, A), it; + } + } + function Ee(A) { + if (tl(A) && !A.name) { + const Me = UO(A); + return ut(Me, Ix) ? !1 : (P || !!Qp(A)) && ut(Me, (Ot) => ac(Ot) || Pu(Ot) || D && IA(Ot)); + } + return !1; + } + function Ne(A, Me) { + if (p0(A)) { + const it = K; + K = void 0, A = t.updateBinaryExpression( + A, + Ge(A.left, Xe, ct), + A.operatorToken, + Ge(A.right, ge, ct) + ); + const Ot = ut(K) ? t.inlineExpressions(iw([...K, A])) : A; + return K = it, Ot; + } + if (Tl(A)) { + Z_(A, Ee) && (A = sf(e, A), E.assertNode(A, Tl)); + const it = Bc( + A.left, + 9 + /* Parentheses */ + ); + if (Xk(it)) { + const Ot = bi(it.name); + if (Ot) + return ot( + kn( + jt(Ot, it.expression, A.right, A.operatorToken.kind), + A + ), + A + ); + } else if (F && fe && f_(A.left) && ND(fe) && Z?.data) { + const { classConstructor: Ot, superClassReference: kr, facts: qn } = Z.data; + if (qn & 1) + return t.updateBinaryExpression( + A, + mn(A.left), + A.operatorToken, + Ge(A.right, ge, ct) + ); + if (Ot && kr) { + let Ht = ho(A.left) ? Ge(A.left.argumentExpression, ge, ct) : Re(A.left.name) ? t.createStringLiteralFromNode(A.left.name) : void 0; + if (Ht) { + let yn = Ge(A.right, ge, ct); + if (ED(A.operatorToken.kind)) { + let _i = Ht; + mm(Ht) || (_i = t.createTempVariable(i), Ht = t.createAssignment(_i, Ht)); + const eo = t.createReflectGetCall( + kr, + _i, + Ot + ); + kn(eo, A.left), ot(eo, A.left), yn = t.createBinaryExpression( + eo, + DD(A.operatorToken.kind), + yn + ), ot(yn, A); + } + const li = Me ? void 0 : t.createTempVariable(i); + return li && (yn = t.createAssignment(li, yn), ot(li, A)), yn = t.createReflectSetCall( + kr, + Ht, + yn, + Ot + ), kn(yn, A), ot(yn, A), li && (yn = t.createComma(yn, li), ot(yn, A)), yn; + } + } + } + } + return tRe(A) ? Ke(A) : gr(A, ge, e); + } + function et(A, Me) { + const it = Me ? NA(A.elements, ve) : NA(A.elements, ge, ve); + return t.updateCommaListExpression(A, it); + } + function lt(A, Me) { + const it = Me ? ve : ge, Ot = Ge(A.expression, it, ct); + return t.updateParenthesizedExpression(A, Ot); + } + function jt(A, Me, it, Ot) { + if (Me = Ge(Me, ge, ct), it = Ge(it, ge, ct), Zn(Me), ED(Ot)) { + const { readExpression: kr, initializeExpression: qn } = nt(Me); + Me = qn || kr, it = t.createBinaryExpression( + mi(A, kr), + DD(Ot), + it + ); + } + switch (el(Me, Q1(Me, -1)), A.kind) { + case "a": + return n().createClassPrivateFieldSetHelper( + Me, + A.brandCheckIdentifier, + it, + A.kind, + A.setterName + ); + case "m": + return n().createClassPrivateFieldSetHelper( + Me, + A.brandCheckIdentifier, + it, + A.kind, + /*f*/ + void 0 + ); + case "f": + return n().createClassPrivateFieldSetHelper( + Me, + A.brandCheckIdentifier, + it, + A.kind, + A.isStatic ? A.variableName : void 0 + ); + case "untransformed": + return E.fail("Access helpers should not be created for untransformed private elements"); + default: + E.assertNever(A, "Unknown private element type"); + } + } + function be(A) { + return Ln(A.members, Ane); + } + function ft(A) { + var Me; + let it = 0; + const Ot = Zo(A); + Qn(Ot) && c0(S, Ot) && (it |= 1), P && (lW(A) || HO(A)) && (it |= 2); + let kr = !1, qn = !1, Ht = !1, yn = !1; + for (const _i of A.members) + Os(_i) ? ((_i.name && (wi(_i.name) || u_(_i)) && P || u_(_i) && O === -1 && !A.name && !((Me = A.emitNode) != null && Me.classThis)) && (it |= 2), (rs(_i) || ac(_i)) && (j && _i.transformFlags & 16384 && (it |= 8, it & 1 || (it |= 2)), F && _i.transformFlags & 134217728 && (it & 1 || (it |= 6)))) : xb(Zo(_i)) || (u_(_i) ? (yn = !0, Ht || (Ht = Pu(_i))) : Pu(_i) ? (Ht = !0, u.hasNodeCheckFlag( + _i, + 262144 + /* ContainsConstructorReference */ + ) && (it |= 2)) : rs(_i) && (kr = !0, qn || (qn = !!_i.initializer))); + return (C && kr || T && qn || P && Ht || P && yn && O === -1) && (it |= 16), it; + } + function bt(A) { + var Me; + if ((((Me = Z?.data) == null ? void 0 : Me.facts) || 0) & 4) { + const Ot = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ); + return Mr().superClassReference = Ot, t.updateExpressionWithTypeArguments( + A, + t.createAssignment( + Ot, + Ge(A.expression, ge, ct) + ), + /*typeArguments*/ + void 0 + ); + } + return gr(A, ge, e); + } + function kt(A, Me) { + var it; + const Ot = pe, kr = K, qn = Z; + pe = A, K = void 0, Fi(); + const Ht = Qp(A) & 32; + if (P || Ht) { + const _i = es(A); + if (_i && Re(_i)) + Or().data.className = _i; + else if ((it = A.emitNode) != null && it.assignedName && Ks(A.emitNode.assignedName)) { + if (A.emitNode.assignedName.textSourceNode && Re(A.emitNode.assignedName.textSourceNode)) + Or().data.className = A.emitNode.assignedName.textSourceNode; + else if (X_(A.emitNode.assignedName.text, g)) { + const eo = t.createIdentifier(A.emitNode.assignedName.text); + Or().data.className = eo; + } + } + } + if (P) { + const _i = be(A); + ut(_i) && (Or().data.weakSetName = Co( + "instances", + _i[0].name + )); + } + const yn = ft(A); + yn && (Mr().facts = yn), yn & 8 && en(); + const li = Me(A, yn); + return ur(), E.assert(Z === qn), pe = Ot, K = kr, li; + } + function yt(A) { + return kt(A, Ut); + } + function Ut(A, Me) { + var it, Ot; + let kr; + if (Me & 2) + if (P && ((it = A.emitNode) != null && it.classThis)) + Mr().classConstructor = A.emitNode.classThis, kr = t.createAssignment(A.emitNode.classThis, t.getInternalName(A)); + else { + const Eo = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ); + Mr().classConstructor = t.cloneNode(Eo), kr = t.createAssignment(Eo, t.getInternalName(A)); + } + (Ot = A.emitNode) != null && Ot.classThis && (Mr().classThis = A.emitNode.classThis); + const qn = u.hasNodeCheckFlag( + A, + 262144 + /* ContainsConstructorReference */ + ), Ht = Vn( + A, + 32 + /* Export */ + ), yn = Vn( + A, + 2048 + /* Default */ + ); + let li = Ar(A.modifiers, Ae, Qs); + const _i = Ar(A.heritageClauses, De, nf), { members: eo, prologue: qo } = he(A), ol = []; + if (kr && tn().unshift(kr), ut(K) && ol.push(t.createExpressionStatement(t.inlineExpressions(K))), T || P || Qp(A) & 32) { + const Eo = UO(A); + ut(Eo) && dt(ol, Eo, t.getInternalName(A)); + } + ol.length > 0 && Ht && yn && (li = Ar(li, (Eo) => pA(Eo) ? void 0 : Eo, Qs), ol.push(t.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + t.getLocalName( + A, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) + ))); + const vo = Mr().classConstructor; + qn && vo && (Lr(), ce[Ku(A)] = vo); + const cl = t.updateClassDeclaration( + A, + li, + A.name, + /*typeParameters*/ + void 0, + _i, + eo + ); + return ol.unshift(cl), qo && ol.unshift(t.createExpressionStatement(qo)), ol; + } + function W(A) { + return kt(A, je); + } + function je(A, Me) { + var it, Ot, kr; + const qn = !!(Me & 1), Ht = UO(A), yn = u.hasNodeCheckFlag( + A, + 262144 + /* ContainsConstructorReference */ + ), li = u.hasNodeCheckFlag( + A, + 32768 + /* BlockScopedBindingInLoop */ + ); + let _i; + function eo() { + var kc; + if (P && ((kc = A.emitNode) != null && kc.classThis)) + return Mr().classConstructor = A.emitNode.classThis; + const F_ = t.createTempVariable( + li ? _ : i, + /*reservedInNestedScopes*/ + !0 + ); + return Mr().classConstructor = t.cloneNode(F_), F_; + } + (it = A.emitNode) != null && it.classThis && (Mr().classThis = A.emitNode.classThis), Me & 2 && (_i ?? (_i = eo())); + const qo = Ar(A.modifiers, Ae, Qs), ol = Ar(A.heritageClauses, De, nf), { members: vo, prologue: cl } = he(A), Eo = t.updateClassExpression( + A, + qo, + A.name, + /*typeParameters*/ + void 0, + ol, + vo + ), gl = []; + if (cl && gl.push(cl), (P || Qp(A) & 32) && ut(Ht, (kc) => ac(kc) || Pu(kc) || D && IA(kc)) || ut(K)) + if (qn) + E.assertIsDefined(X, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."), ut(K) && Bn(X, or(K, t.createExpressionStatement)), ut(Ht) && dt(X, Ht, ((Ot = A.emitNode) == null ? void 0 : Ot.classThis) ?? t.getInternalName(A)), _i ? gl.push(t.createAssignment(_i, Eo)) : P && ((kr = A.emitNode) != null && kr.classThis) ? gl.push(t.createAssignment(A.emitNode.classThis, Eo)) : gl.push(Eo); + else { + if (_i ?? (_i = eo()), yn) { + Lr(); + const kc = t.cloneNode(_i); + kc.emitNode.autoGenerate.flags &= -9, ce[Ku(A)] = kc; + } + gl.push(t.createAssignment(_i, Eo)), Bn(gl, K), Bn(gl, wt(Ht, _i)), gl.push(t.cloneNode(_i)); + } + else + gl.push(Eo); + return gl.length > 1 && (cm( + Eo, + 131072 + /* Indented */ + ), gl.forEach(mu)), t.inlineExpressions(gl); + } + function st(A) { + if (!P) + return gr(A, ge, e); + } + function z(A) { + if (j && fe && ac(fe) && Z?.data) { + const { classThis: Me, classConstructor: it } = Z.data; + return Me ?? it ?? A; + } + return A; + } + function he(A) { + const Me = !!(Qp(A) & 32); + if (P || U) { + for (const Ht of A.members) + if (Pu(Ht)) + if (ci(Ht)) + ga(Ht, Ht.name, qt); + else { + const yn = Or(); + dS(yn, Ht.name, { kind: "untransformed" }); + } + if (P && ut(be(A)) && q(), At()) { + for (const Ht of A.members) + if (u_(Ht)) { + const yn = t.getGeneratedPrivateNameForNode( + Ht.name, + /*prefix*/ + void 0, + "_accessor_storage" + ); + if (P || Me && Uc(Ht)) + ga(Ht, yn, ma); + else { + const li = Or(); + dS(li, yn, { kind: "untransformed" }); + } + } + } + } + let it = Ar(A.members, Ie, fl), Ot; + ut(it, ec) || (Ot = we( + /*constructor*/ + void 0, + A + )); + let kr, qn; + if (!P && ut(K)) { + let Ht = t.createExpressionStatement(t.inlineExpressions(K)); + if (Ht.transformFlags & 134234112) { + const li = t.createTempVariable(i), _i = t.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + t.createBlock([Ht]) + ); + kr = t.createAssignment(li, _i), Ht = t.createExpressionStatement(t.createCallExpression( + li, + /*typeArguments*/ + void 0, + [] + )); + } + const yn = t.createBlock([Ht]); + qn = t.createClassStaticBlockDeclaration(yn), K = void 0; + } + if (Ot || qn) { + let Ht; + const yn = Nn(it, wD), li = Nn(it, Ix); + Ht = Tr(Ht, yn), Ht = Tr(Ht, li), Ht = Tr(Ht, Ot), Ht = Tr(Ht, qn); + const _i = yn || li ? Ln(it, (eo) => eo !== yn && eo !== li) : it; + Ht = Bn(Ht, _i), it = ot( + t.createNodeArray(Ht), + /*location*/ + A.members + ); + } + return { members: it, prologue: kr }; + } + function q() { + const { weakSetName: A } = Or().data; + E.assert(A, "weakSetName should be set in private identifier environment"), tn().push( + t.createAssignment( + A, + t.createNewExpression( + t.createIdentifier("WeakSet"), + /*typeArguments*/ + void 0, + [] + ) + ) + ); + } + function we(A, Me) { + if (A = Ge(A, ge, ec), !Z?.data || !(Z.data.facts & 16)) + return A; + const it = tm(Me), Ot = !!(it && Bc(it.expression).kind !== 106), kr = cc(A ? A.parameters : void 0, ge, e), qn = Te(Me, A, Ot); + return qn ? A ? (E.assert(kr), t.updateConstructorDeclaration( + A, + /*modifiers*/ + void 0, + kr, + qn + )) : mu( + kn( + ot( + t.createConstructorDeclaration( + /*modifiers*/ + void 0, + kr ?? [], + qn + ), + A || Me + ), + A + ) + ) : A; + } + function _e(A, Me, it, Ot, kr, qn, Ht) { + const yn = Ot[kr], li = Me[yn]; + if (Bn(A, Ar(Me, ge, hi, it, yn - it)), it = yn + 1, sS(li)) { + const _i = []; + _e( + _i, + li.tryBlock.statements, + /*statementOffset*/ + 0, + Ot, + kr + 1, + qn, + Ht + ); + const eo = t.createNodeArray(_i); + ot(eo, li.tryBlock.statements), A.push(t.updateTryStatement( + li, + t.updateBlock(li.tryBlock, _i), + Ge(li.catchClause, ge, Rb), + Ge(li.finallyBlock, ge, ms) + )); + } else { + for (Bn(A, Ar(Me, ge, hi, yn, 1)); it < Me.length; ) { + const _i = Me[it]; + if (Q_(Zo(_i), Ht)) + it++; + else + break; + } + Bn(A, qn); + } + Bn(A, Ar(Me, ge, hi, it)); + } + function Te(A, Me, it) { + const Ot = aW( + A, + /*requireInitializer*/ + !1, + /*isStatic*/ + !1 + ); + let kr = Ot; + h || (kr = Ln(kr, (vo) => !!vo.initializer || wi(vo.name) || im(vo))); + const qn = be(A), Ht = ut(kr) || ut(qn); + if (!Me && !Ht) + return Lf( + /*node*/ + void 0, + ge, + e + ); + c(); + const yn = !Me && it; + let li = 0, _i = []; + const eo = [], qo = t.createThis(); + if (fr(eo, qn, qo), Me) { + const vo = Ln(Ot, (Eo) => Q_(Zo(Eo), Me)), cl = Ln(kr, (Eo) => !Q_(Zo(Eo), Me)); + dt(eo, vo, qo), dt(eo, cl, qo); + } else + dt(eo, kr, qo); + if (Me?.body) { + li = t.copyPrologue( + Me.body.statements, + _i, + /*ensureUseStrict*/ + !1, + ge + ); + const vo = VO(Me.body.statements, li); + if (vo.length) + _e( + _i, + Me.body.statements, + li, + vo, + /*superPathDepth*/ + 0, + eo, + Me + ); + else { + for (; li < Me.body.statements.length; ) { + const cl = Me.body.statements[li]; + if (Q_(Zo(cl), Me)) + li++; + else + break; + } + Bn(_i, eo), Bn(_i, Ar(Me.body.statements, ge, hi, li)); + } + } else + yn && _i.push( + t.createExpressionStatement( + t.createCallExpression( + t.createSuper(), + /*typeArguments*/ + void 0, + [t.createSpreadElement(t.createIdentifier("arguments"))] + ) + ) + ), Bn(_i, eo); + if (_i = t.mergeLexicalEnvironment(_i, s()), _i.length === 0 && !Me) + return; + const ol = Me?.body && Me.body.statements.length >= _i.length ? Me.body.multiLine ?? _i.length > 0 : _i.length > 0; + return ot( + t.createBlock( + ot( + t.createNodeArray(_i), + /*location*/ + Me ? Me.body.statements : A.members + ), + ol + ), + /*location*/ + Me ? Me.body : void 0 + ); + } + function dt(A, Me, it) { + for (const Ot of Me) { + if (Os(Ot) && !P) + continue; + const kr = xt(Ot, it); + kr && A.push(kr); + } + } + function xt(A, Me) { + const it = ac(A) ? Ai(A, re, A) : ir(A, Me); + if (!it) + return; + const Ot = t.createExpressionStatement(it); + kn(Ot, A), cm( + Ot, + ua(A) & 3072 + /* NoComments */ + ), el(Ot, A); + const kr = Zo(A); + return ji(kr) ? (aa(Ot, kr), Q3(Ot)) : aa(Ot, am(A)), Z1(it, void 0), ax(it, void 0), im(kr) && cm( + Ot, + 3072 + /* NoComments */ + ), Ot; + } + function wt(A, Me) { + const it = []; + for (const Ot of A) { + const kr = ac(Ot) ? Ai(Ot, re, Ot) : Ai( + Ot, + () => ir(Ot, Me), + /*arg*/ + void 0 + ); + kr && (mu(kr), kn(kr, Ot), cm( + kr, + ua(Ot) & 3072 + /* NoComments */ + ), aa(kr, am(Ot)), el(kr, Ot), it.push(kr)); + } + return it; + } + function ir(A, Me) { + var it; + const Ot = fe, kr = br(A, Me); + return kr && Uc(A) && ((it = Z?.data) != null && it.facts) && (kn(kr, A), cm( + kr, + 4 + /* AdviseOnEmitNode */ + ), aa(kr, g0(A.name)), oe.set(Zo(A), Z)), fe = Ot, kr; + } + function br(A, Me) { + const it = !h; + Z_(A, Ee) && (A = sf(e, A)); + const Ot = im(A) ? t.getGeneratedPrivateNameForNode(A.name) : oa(A.name) && !mm(A.name.expression) ? t.updateComputedPropertyName(A.name, t.getGeneratedNameForNode(A.name)) : A.name; + if (Uc(A) && (fe = A), wi(Ot) && ci(A)) { + const Ht = bi(Ot); + if (Ht) + return Ht.kind === "f" ? Ht.isStatic ? YMe( + t, + Ht.variableName, + Ge(A.initializer, ge, ct) + ) : ZMe( + t, + Me, + Ge(A.initializer, ge, ct), + Ht.brandCheckIdentifier + ) : void 0; + E.fail("Undeclared private name for property declaration."); + } + if ((wi(Ot) || Uc(A)) && !A.initializer) + return; + const kr = Zo(A); + if (Vn( + kr, + 64 + /* Abstract */ + )) + return; + let qn = Ge(A.initializer, ge, ct); + if (Q_(kr, kr.parent) && Re(Ot)) { + const Ht = t.cloneNode(Ot); + qn ? (Qu(qn) && uA(qn.expression) && Y4(qn.expression.left, "___runInitializers") && hx(qn.expression.right) && m_(qn.expression.right.expression) && (qn = qn.expression.left), qn = t.inlineExpressions([qn, Ht])) : qn = Ht, Kr( + Ot, + 3168 + /* NoSourceMap */ + ), aa(Ht, kr.name), Kr( + Ht, + 3072 + /* NoComments */ + ); + } else + qn ?? (qn = t.createVoidZero()); + if (it || wi(Ot)) { + const Ht = _S( + t, + Me, + Ot, + /*location*/ + Ot + ); + return cm( + Ht, + 1024 + /* NoLeadingComments */ + ), t.createAssignment(Ht, qn); + } else { + const Ht = oa(Ot) ? Ot.expression : Re(Ot) ? t.createStringLiteral(Pi(Ot.escapedText)) : Ot, yn = t.createPropertyDescriptor({ value: qn, configurable: !0, writable: !0, enumerable: !0 }); + return t.createObjectDefinePropertyCall(Me, Ht, yn); + } + } + function Lr() { + G & 1 || (G |= 1, e.enableSubstitution( + 80 + /* Identifier */ + ), ce = []); + } + function en() { + G & 2 || (G |= 2, e.enableSubstitution( + 110 + /* ThisKeyword */ + ), e.enableEmitNotification( + 262 + /* FunctionDeclaration */ + ), e.enableEmitNotification( + 218 + /* FunctionExpression */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 172 + /* PropertyDeclaration */ + ), e.enableEmitNotification( + 167 + /* ComputedPropertyName */ + )); + } + function fr(A, Me, it) { + if (!P || !ut(Me)) + return; + const { weakSetName: Ot } = Or().data; + E.assert(Ot, "weakSetName should be set in private identifier environment"), A.push( + t.createExpressionStatement( + KMe(t, it, Ot) + ) + ); + } + function mn(A) { + return Dn(A) ? t.updatePropertyAccessExpression( + A, + t.createVoidZero(), + A.name + ) : t.updateElementAccessExpression( + A, + t.createVoidZero(), + Ge(A.argumentExpression, ge, ct) + ); + } + function Di(A, Me) { + if (oa(A)) { + const it = uO(A), Ot = Ge(A.expression, ge, ct), kr = Xp(Ot), qn = mm(kr); + if (!(!!it || Tl(kr) && Fo(kr.left)) && !qn && Me) { + const yn = t.getGeneratedNameForNode(A); + return u.hasNodeCheckFlag( + A, + 32768 + /* BlockScopedBindingInLoop */ + ) ? _(yn) : i(yn), t.createAssignment(yn, Ot); + } + return qn || Re(kr) ? void 0 : Ot; + } + } + function Fi() { + Z = { previous: Z, data: void 0 }; + } + function ur() { + Z = Z?.previous; + } + function Mr() { + return E.assert(Z), Z.data ?? (Z.data = { + facts: 0, + classConstructor: void 0, + classThis: void 0, + superClassReference: void 0 + // privateIdentifierEnvironment: undefined, + }); + } + function Or() { + return E.assert(Z), Z.privateEnv ?? (Z.privateEnv = One({ + className: void 0, + weakSetName: void 0 + })); + } + function tn() { + return K ?? (K = []); + } + function qt(A, Me, it, Ot, kr, qn, Ht) { + u_(A) ? hs(A, Me, it, Ot, kr, qn) : rs(A) ? ma(A, Me, it, Ot, kr, qn) : hc(A) ? $a(A, Me, it, Ot, kr, qn) : Af(A) ? Ro(A, Me, it, Ot, kr, qn, Ht) : rf(A) && Vo(A, Me, it, Ot, kr, qn, Ht); + } + function ma(A, Me, it, Ot, kr, qn, Ht) { + if (kr) { + const yn = E.checkDefined(it.classThis ?? it.classConstructor, "classConstructor should be set in private identifier environment"), li = Li(Me); + dS(Ot, Me, { + kind: "f", + isStatic: !0, + brandCheckIdentifier: yn, + variableName: li, + isValid: qn + }); + } else { + const yn = Li(Me); + dS(Ot, Me, { + kind: "f", + isStatic: !1, + brandCheckIdentifier: yn, + isValid: qn + }), tn().push(t.createAssignment( + yn, + t.createNewExpression( + t.createIdentifier("WeakMap"), + /*typeArguments*/ + void 0, + [] + ) + )); + } + } + function $a(A, Me, it, Ot, kr, qn, Ht) { + const yn = Li(Me), li = kr ? E.checkDefined(it.classThis ?? it.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Ot.data.weakSetName, "weakSetName should be set in private identifier environment"); + dS(Ot, Me, { + kind: "m", + methodName: yn, + brandCheckIdentifier: li, + isStatic: kr, + isValid: qn + }); + } + function Ro(A, Me, it, Ot, kr, qn, Ht) { + const yn = Li(Me, "_get"), li = kr ? E.checkDefined(it.classThis ?? it.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Ot.data.weakSetName, "weakSetName should be set in private identifier environment"); + Ht?.kind === "a" && Ht.isStatic === kr && !Ht.getterName ? Ht.getterName = yn : dS(Ot, Me, { + kind: "a", + getterName: yn, + setterName: void 0, + brandCheckIdentifier: li, + isStatic: kr, + isValid: qn + }); + } + function Vo(A, Me, it, Ot, kr, qn, Ht) { + const yn = Li(Me, "_set"), li = kr ? E.checkDefined(it.classThis ?? it.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Ot.data.weakSetName, "weakSetName should be set in private identifier environment"); + Ht?.kind === "a" && Ht.isStatic === kr && !Ht.setterName ? Ht.setterName = yn : dS(Ot, Me, { + kind: "a", + getterName: void 0, + setterName: yn, + brandCheckIdentifier: li, + isStatic: kr, + isValid: qn + }); + } + function hs(A, Me, it, Ot, kr, qn, Ht) { + const yn = Li(Me, "_get"), li = Li(Me, "_set"), _i = kr ? E.checkDefined(it.classThis ?? it.classConstructor, "classConstructor should be set in private identifier environment") : E.checkDefined(Ot.data.weakSetName, "weakSetName should be set in private identifier environment"); + dS(Ot, Me, { + kind: "a", + getterName: yn, + setterName: li, + brandCheckIdentifier: _i, + isStatic: kr, + isValid: qn + }); + } + function ga(A, Me, it) { + const Ot = Mr(), kr = Or(), qn = cW(kr, Me), Ht = Uc(A), yn = !eRe(Me) && qn === void 0; + it(A, Me, Ot, kr, Ht, yn, qn); + } + function Co(A, Me, it) { + const { className: Ot } = Or().data, kr = Ot ? { prefix: "_", node: Ot, suffix: "_" } : "_", qn = typeof A == "object" ? t.getGeneratedNameForNode(A, 24, kr, it) : typeof A == "string" ? t.createUniqueName(A, 16, kr, it) : t.createTempVariable( + /*recordTempVariable*/ + void 0, + /*reservedInNestedScopes*/ + !0, + kr, + it + ); + return u.hasNodeCheckFlag( + Me, + 32768 + /* BlockScopedBindingInLoop */ + ) ? _(qn) : i(qn), qn; + } + function Li(A, Me) { + const it = n4(A); + return Co(it?.substring(1) ?? A, A, Me); + } + function bi(A) { + const Me = Fne(Z, A); + return Me?.kind === "untransformed" ? void 0 : Me; + } + function wl(A) { + const Me = t.getGeneratedNameForNode(A), it = bi(A.name); + if (!it) + return gr(A, ge, e); + let Ot = A.expression; + return (Kw(A) || f_(A) || !Jb(A.expression)) && (Ot = t.createTempVariable( + i, + /*reservedInNestedScopes*/ + !0 + ), tn().push(t.createBinaryExpression(Ot, 64, Ge(A.expression, ge, ct)))), t.createAssignmentTargetWrapper( + Me, + jt( + it, + Ot, + Me, + 64 + /* EqualsToken */ + ) + ); + } + function jo(A) { + if (Gs(A) || Wl(A)) + return Bt(A); + if (Xk(A)) + return wl(A); + if (F && fe && f_(A) && ND(fe) && Z?.data) { + const { classConstructor: Me, superClassReference: it, facts: Ot } = Z.data; + if (Ot & 1) + return mn(A); + if (Me && it) { + const kr = ho(A) ? Ge(A.argumentExpression, ge, ct) : Re(A.name) ? t.createStringLiteralFromNode(A.name) : void 0; + if (kr) { + const qn = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return t.createAssignmentTargetWrapper( + qn, + t.createReflectSetCall( + it, + kr, + qn, + Me + ) + ); + } + } + } + return gr(A, ge, e); + } + function Su(A) { + if (Z_(A, Ee) && (A = sf(e, A)), Tl( + A, + /*excludeCompoundAssignment*/ + !0 + )) { + const Me = jo(A.left), it = Ge(A.right, ge, ct); + return t.updateBinaryExpression(A, Me, A.operatorToken, it); + } + return jo(A); + } + function fc(A) { + if (__(A.expression)) { + const Me = jo(A.expression); + return t.updateSpreadElement(A, Me); + } + return gr(A, ge, e); + } + function ql(A) { + if (Fw(A)) { + if (cp(A)) return fc(A); + if (!ml(A)) return Su(A); + } + return gr(A, ge, e); + } + function ea(A) { + const Me = Ge(A.name, ge, Rc); + if (Tl( + A.initializer, + /*excludeCompoundAssignment*/ + !0 + )) { + const it = Su(A.initializer); + return t.updatePropertyAssignment(A, Me, it); + } + if (__(A.initializer)) { + const it = jo(A.initializer); + return t.updatePropertyAssignment(A, Me, it); + } + return gr(A, ge, e); + } + function wo(A) { + return Z_(A, Ee) && (A = sf(e, A)), gr(A, ge, e); + } + function Ka(A) { + if (__(A.expression)) { + const Me = jo(A.expression); + return t.updateSpreadAssignment(A, Me); + } + return gr(A, ge, e); + } + function Fa(A) { + return E.assertNode(A, Ow), Bg(A) ? Ka(A) : du(A) ? wo(A) : qc(A) ? ea(A) : gr(A, ge, e); + } + function Bt(A) { + return Wl(A) ? t.updateArrayLiteralExpression( + A, + Ar(A.elements, ql, ct) + ) : t.updateObjectLiteralExpression( + A, + Ar(A.properties, Fa, lh) + ); + } + function lc(A, Me, it) { + const Ot = Zo(Me), kr = oe.get(Ot); + if (kr) { + const qn = Z, Ht = ae; + Z = kr, ae = H, H = !ac(Ot) || !(Qp(Ot) & 32), $(A, Me, it), H = ae, ae = Ht, Z = qn; + return; + } + switch (Me.kind) { + case 218: + if (xo(Ot) || ua(Me) & 524288) + break; + case 262: + case 176: + case 177: + case 178: + case 174: + case 172: { + const qn = Z, Ht = ae; + Z = void 0, ae = H, H = !1, $(A, Me, it), H = ae, ae = Ht, Z = qn; + return; + } + case 167: { + const qn = Z, Ht = H; + Z = Z?.previous, H = ae, $(A, Me, it), H = Ht, Z = qn; + return; + } + } + $(A, Me, it); + } + function Fu(A, Me) { + return Me = L(A, Me), A === 1 ? Lu(Me) : Me; + } + function Lu(A) { + switch (A.kind) { + case 80: + return Ao(A); + case 110: + return y_(A); + } + return A; + } + function y_(A) { + if (G & 2 && Z?.data && !ne.has(A)) { + const { facts: Me, classConstructor: it, classThis: Ot } = Z.data, kr = H ? Ot ?? it : it; + if (kr) + return ot( + kn( + t.cloneNode(kr), + A + ), + A + ); + if (Me & 1 && S) + return t.createParenthesizedExpression(t.createVoidZero()); + } + return A; + } + function Ao(A) { + return Uo(A) || A; + } + function Uo(A) { + if (G & 1 && u.hasNodeCheckFlag( + A, + 536870912 + /* ConstructorReference */ + )) { + const Me = u.getReferencedValueDeclaration(A); + if (Me) { + const it = ce[Me.id]; + if (it) { + const Ot = t.cloneNode(it); + return aa(Ot, A), el(Ot, A), Ot; + } + } + } + } + } + function YMe(e, t, n) { + return e.createAssignment( + t, + e.createObjectLiteralExpression([ + e.createPropertyAssignment("value", n || e.createVoidZero()) + ]) + ); + } + function ZMe(e, t, n, i) { + return e.createCallExpression( + e.createPropertyAccessExpression(i, "set"), + /*typeArguments*/ + void 0, + [t, n || e.createVoidZero()] + ); + } + function KMe(e, t, n) { + return e.createCallExpression( + e.createPropertyAccessExpression(n, "add"), + /*typeArguments*/ + void 0, + [t] + ); + } + function eRe(e) { + return !z2(e) && e.escapedText === "#constructor"; + } + function tRe(e) { + return wi(e.left) && e.operatorToken.kind === 103; + } + function rRe(e) { + return rs(e) && Uc(e); + } + function ND(e) { + return ac(e) || rRe(e); + } + function Gne(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e, i = e.getEmitResolver(), s = e.getCompilerOptions(), o = pa(s), c = Iu(s, "strictNullChecks"); + let _, u; + return { + serializeTypeNode: (K, X) => d(K, D, X), + serializeTypeOfNode: (K, X, Z) => d(K, h, X, Z), + serializeParameterTypesOfNode: (K, X, Z) => d(K, S, X, Z), + serializeReturnTypeOfNode: (K, X) => d(K, C, X) + }; + function d(K, X, Z, oe) { + const ne = _, pe = u; + _ = K.currentLexicalScope, u = K.currentNameScope; + const fe = oe === void 0 ? X(Z) : X(Z, oe); + return _ = ne, u = pe, fe; + } + function g(K, X) { + const Z = gy(X.members, K); + return Z.setAccessor && pK(Z.setAccessor) || Z.getAccessor && K_(Z.getAccessor); + } + function h(K, X) { + switch (K.kind) { + case 172: + case 169: + return D(K.type); + case 178: + case 177: + return D(g(K, X)); + case 263: + case 231: + case 174: + return t.createIdentifier("Function"); + default: + return t.createVoidZero(); + } + } + function S(K, X) { + const Z = Qn(K) ? Ng(K) : ps(K) && wp(K.body) ? K : void 0, oe = []; + if (Z) { + const ne = T(Z, X), pe = ne.length; + for (let fe = 0; fe < pe; fe++) { + const H = ne[fe]; + fe === 0 && Re(H.name) && H.name.escapedText === "this" || (H.dotDotDotToken ? oe.push(D(Xj(H.type))) : oe.push(h(H, X))); + } + } + return t.createArrayLiteralExpression(oe); + } + function T(K, X) { + if (X && K.kind === 177) { + const { setAccessor: Z } = gy(X.members, K); + if (Z) + return Z.parameters; + } + return K.parameters; + } + function C(K) { + return ps(K) && K.type ? D(K.type) : g4(K) ? t.createIdentifier("Promise") : t.createVoidZero(); + } + function D(K) { + if (K === void 0) + return t.createIdentifier("Object"); + switch (K = f4(K), K.kind) { + case 116: + case 157: + case 146: + return t.createVoidZero(); + case 184: + case 185: + return t.createIdentifier("Function"); + case 188: + case 189: + return t.createIdentifier("Array"); + case 182: + return K.assertsModifier ? t.createVoidZero() : t.createIdentifier("Boolean"); + case 136: + return t.createIdentifier("Boolean"); + case 203: + case 154: + return t.createIdentifier("String"); + case 151: + return t.createIdentifier("Object"); + case 201: + return P(K.literal); + case 150: + return t.createIdentifier("Number"); + case 163: + return ce( + "BigInt", + 7 + /* ES2020 */ + ); + case 155: + return ce( + "Symbol", + 2 + /* ES2015 */ + ); + case 183: + return F(K); + case 193: + return O( + K.types, + /*isIntersection*/ + !0 + ); + case 192: + return O( + K.types, + /*isIntersection*/ + !1 + ); + case 194: + return O( + [K.trueType, K.falseType], + /*isIntersection*/ + !1 + ); + case 198: + if (K.operator === 148) + return D(K.type); + break; + case 186: + case 199: + case 200: + case 187: + case 133: + case 159: + case 197: + case 205: + break; + case 312: + case 313: + case 317: + case 318: + case 319: + break; + case 314: + case 315: + case 316: + return D(K.type); + default: + return E.failBadSyntaxKind(K); + } + return t.createIdentifier("Object"); + } + function P(K) { + switch (K.kind) { + case 11: + case 15: + return t.createIdentifier("String"); + case 224: { + const X = K.operand; + switch (X.kind) { + case 9: + case 10: + return P(X); + default: + return E.failBadSyntaxKind(X); + } + } + case 9: + return t.createIdentifier("Number"); + case 10: + return ce( + "BigInt", + 7 + /* ES2020 */ + ); + case 112: + case 97: + return t.createIdentifier("Boolean"); + case 106: + return t.createVoidZero(); + default: + return E.failBadSyntaxKind(K); + } + } + function O(K, X) { + let Z; + for (let oe of K) { + if (oe = f4(oe), oe.kind === 146) { + if (X) return t.createVoidZero(); + continue; + } + if (oe.kind === 159) { + if (!X) return t.createIdentifier("Object"); + continue; + } + if (oe.kind === 133) + return t.createIdentifier("Object"); + if (!c && (y0(oe) && oe.literal.kind === 106 || oe.kind === 157)) + continue; + const ne = D(oe); + if (Re(ne) && ne.escapedText === "Object") + return ne; + if (Z) { + if (!j(Z, ne)) + return t.createIdentifier("Object"); + } else + Z = ne; + } + return Z ?? t.createVoidZero(); + } + function j(K, X) { + return ( + // temp vars used in fallback + Fo(K) ? Fo(X) : ( + // entity names + Re(K) ? Re(X) && K.escapedText === X.escapedText : Dn(K) ? Dn(X) && j(K.expression, X.expression) && j(K.name, X.name) : ( + // `void 0` + hx(K) ? hx(X) && m_(K.expression) && K.expression.text === "0" && m_(X.expression) && X.expression.text === "0" : ( + // `"undefined"` or `"function"` in `typeof` checks + Ks(K) ? Ks(X) && K.text === X.text : ( + // used in `typeof` checks for fallback + IC(K) ? IC(X) && j(K.expression, X.expression) : ( + // parens in `typeof` checks with temps + Qu(K) ? Qu(X) && j(K.expression, X.expression) : ( + // conditionals used in fallback + yx(K) ? yx(X) && j(K.condition, X.condition) && j(K.whenTrue, X.whenTrue) && j(K.whenFalse, X.whenFalse) : ( + // logical binary and assignments used in fallback + cn(K) ? cn(X) && K.operatorToken.kind === X.operatorToken.kind && j(K.left, X.left) && j(K.right, X.right) : !1 + ) + ) + ) + ) + ) + ) + ) + ); + } + function F(K) { + const X = i.getTypeReferenceSerializationKind(K.typeName, u ?? _); + switch (X) { + case 0: + if (sr(K, (ne) => ne.parent && Ab(ne.parent) && (ne.parent.trueType === ne || ne.parent.falseType === ne))) + return t.createIdentifier("Object"); + const Z = L(K.typeName), oe = t.createTempVariable(n); + return t.createConditionalExpression( + t.createTypeCheck(t.createAssignment(oe, Z), "function"), + /*questionToken*/ + void 0, + oe, + /*colonToken*/ + void 0, + t.createIdentifier("Object") + ); + case 1: + return $(K.typeName); + case 2: + return t.createVoidZero(); + case 4: + return ce( + "BigInt", + 7 + /* ES2020 */ + ); + case 6: + return t.createIdentifier("Boolean"); + case 3: + return t.createIdentifier("Number"); + case 5: + return t.createIdentifier("String"); + case 7: + return t.createIdentifier("Array"); + case 8: + return ce( + "Symbol", + 2 + /* ES2015 */ + ); + case 10: + return t.createIdentifier("Function"); + case 9: + return t.createIdentifier("Promise"); + case 11: + return t.createIdentifier("Object"); + default: + return E.assertNever(X); + } + } + function V(K, X) { + return t.createLogicalAnd( + t.createStrictInequality(t.createTypeOfExpression(K), t.createStringLiteral("undefined")), + X + ); + } + function L(K) { + if (K.kind === 80) { + const oe = $(K); + return V(oe, oe); + } + if (K.left.kind === 80) + return V($(K.left), $(K)); + const X = L(K.left), Z = t.createTempVariable(n); + return t.createLogicalAnd( + t.createLogicalAnd( + X.left, + t.createStrictInequality(t.createAssignment(Z, X.right), t.createVoidZero()) + ), + t.createPropertyAccessExpression(Z, K.right) + ); + } + function $(K) { + switch (K.kind) { + case 80: + const X = Da(ot(av.cloneNode(K), K), K.parent); + return X.original = void 0, Da(X, Ki(_)), X; + case 166: + return U(K); + } + } + function U(K) { + return t.createPropertyAccessExpression($(K.left), K.right); + } + function G(K) { + return t.createConditionalExpression( + t.createTypeCheck(t.createIdentifier(K), "function"), + /*questionToken*/ + void 0, + t.createIdentifier(K), + /*colonToken*/ + void 0, + t.createIdentifier("Object") + ); + } + function ce(K, X) { + return o < X ? G(K) : t.createIdentifier(K); + } + } + function $ne(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i + } = e, s = e.getEmitResolver(), o = e.getCompilerOptions(), c = pa(o), _ = e.onSubstituteNode; + e.onSubstituteNode = ye; + let u; + return Pd(e, d); + function d(Be) { + const at = gr(Be, h, e); + return vh(at, e.readEmitHelpers()), at; + } + function g(Be) { + return dl(Be) ? void 0 : Be; + } + function h(Be) { + if (!(Be.transformFlags & 33554432)) + return Be; + switch (Be.kind) { + case 170: + return; + case 263: + return S(Be); + case 231: + return F(Be); + case 176: + return V(Be); + case 174: + return $(Be); + case 178: + return G(Be); + case 177: + return U(Be); + case 172: + return ce(Be); + case 169: + return K(Be); + default: + return gr(Be, h, e); + } + } + function S(Be) { + if (!(c0( + /*useLegacyDecorators*/ + !0, + Be + ) || a4( + /*useLegacyDecorators*/ + !0, + Be + ))) + return gr(Be, h, e); + const at = c0( + /*useLegacyDecorators*/ + !0, + Be + ) ? j(Be, Be.name) : O(Be, Be.name); + return jm(at); + } + function T(Be) { + return !!(Be.transformFlags & 536870912); + } + function C(Be) { + return ut(Be, T); + } + function D(Be) { + for (const at of Be.members) { + if (!jb(at)) continue; + const Wt = qO( + at, + Be, + /*useLegacyDecorators*/ + !0 + ); + if (ut(Wt?.decorators, T) || ut(Wt?.parameters, C)) return !0; + } + return !1; + } + function P(Be, at) { + let Wt = []; + return oe( + Wt, + Be, + /*isStatic*/ + !1 + ), oe( + Wt, + Be, + /*isStatic*/ + !0 + ), D(Be) && (at = ot( + t.createNodeArray([ + ...at, + t.createClassStaticBlockDeclaration( + t.createBlock( + Wt, + /*multiLine*/ + !0 + ) + ) + ]), + at + ), Wt = void 0), { decorationStatements: Wt, members: at }; + } + function O(Be, at) { + const Wt = Ar(Be.modifiers, g, Qs), nr = Ar(Be.heritageClauses, h, nf); + let Kt = Ar(Be.members, h, fl), Pr = []; + ({ members: Kt, decorationStatements: Pr } = P(Be, Kt)); + const Vt = t.updateClassDeclaration( + Be, + Wt, + at, + /*typeParameters*/ + void 0, + nr, + Kt + ); + return Bn([Vt], Pr); + } + function j(Be, at) { + const Wt = Vn( + Be, + 32 + /* Export */ + ), nr = Vn( + Be, + 2048 + /* Default */ + ), Kt = Ar(Be.modifiers, (At) => pA(At) || dl(At) ? void 0 : At, Lo), Pr = am(Be), Vt = De(Be), zt = c < 2 ? t.getInternalName( + Be, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getLocalName( + Be, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), jr = Ar(Be.heritageClauses, h, nf); + let ci = Ar(Be.members, h, fl), Xt = []; + ({ members: ci, decorationStatements: Xt } = P(Be, ci)); + const Ai = c >= 9 && !!Vt && ut(ci, (At) => rs(At) && Vn( + At, + 256 + /* Static */ + ) || ac(At)); + Ai && (ci = ot( + t.createNodeArray([ + t.createClassStaticBlockDeclaration( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment(Vt, t.createThis()) + ) + ]) + ), + ...ci + ]), + ci + )); + const _s = t.createClassExpression( + Kt, + at && Fo(at) ? void 0 : at, + /*typeParameters*/ + void 0, + jr, + ci + ); + kn(_s, Be), ot(_s, Pr); + const $n = Vt && !Ai ? t.createAssignment(Vt, _s) : _s, os = t.createVariableDeclaration( + zt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + $n + ); + kn(os, Be); + const wr = t.createVariableDeclarationList( + [os], + 1 + /* Let */ + ), Ss = t.createVariableStatement( + /*modifiers*/ + void 0, + wr + ); + kn(Ss, Be), ot(Ss, Pr), el(Ss, Be); + const Le = [Ss]; + if (Bn(Le, Xt), ae(Le, Be), Wt) + if (nr) { + const At = t.createExportDefault(zt); + Le.push(At); + } else { + const At = t.createExternalModuleExport(t.getDeclarationName(Be)); + Le.push(At); + } + return Le; + } + function F(Be) { + return t.updateClassExpression( + Be, + Ar(Be.modifiers, g, Qs), + Be.name, + /*typeParameters*/ + void 0, + Ar(Be.heritageClauses, h, nf), + Ar(Be.members, h, fl) + ); + } + function V(Be) { + return t.updateConstructorDeclaration( + Be, + Ar(Be.modifiers, g, Qs), + Ar(Be.parameters, h, ji), + Ge(Be.body, h, ms) + ); + } + function L(Be, at) { + return Be !== at && (el(Be, at), aa(Be, am(at))), Be; + } + function $(Be) { + return L( + t.updateMethodDeclaration( + Be, + Ar(Be.modifiers, g, Qs), + Be.asteriskToken, + E.checkDefined(Ge(Be.name, h, Rc)), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + Ar(Be.parameters, h, ji), + /*type*/ + void 0, + Ge(Be.body, h, ms) + ), + Be + ); + } + function U(Be) { + return L( + t.updateGetAccessorDeclaration( + Be, + Ar(Be.modifiers, g, Qs), + E.checkDefined(Ge(Be.name, h, Rc)), + Ar(Be.parameters, h, ji), + /*type*/ + void 0, + Ge(Be.body, h, ms) + ), + Be + ); + } + function G(Be) { + return L( + t.updateSetAccessorDeclaration( + Be, + Ar(Be.modifiers, g, Qs), + E.checkDefined(Ge(Be.name, h, Rc)), + Ar(Be.parameters, h, ji), + Ge(Be.body, h, ms) + ), + Be + ); + } + function ce(Be) { + if (!(Be.flags & 33554432 || Vn( + Be, + 128 + /* Ambient */ + ))) + return L( + t.updatePropertyDeclaration( + Be, + Ar(Be.modifiers, g, Qs), + E.checkDefined(Ge(Be.name, h, Rc)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + Ge(Be.initializer, h, ct) + ), + Be + ); + } + function K(Be) { + const at = t.updateParameterDeclaration( + Be, + sre(t, Be.modifiers), + Be.dotDotDotToken, + E.checkDefined(Ge(Be.name, h, W2)), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Ge(Be.initializer, h, ct) + ); + return at !== Be && (el(at, Be), ot(at, am(Be)), aa(at, am(Be)), Kr( + at.name, + 64 + /* NoTrailingSourceMap */ + )), at; + } + function X(Be) { + return Y4(Be.expression, "___metadata"); + } + function Z(Be) { + if (!Be) + return; + const { false: at, true: Wt } = _R(Be.decorators, X), nr = []; + return Bn(nr, or(at, Ae)), Bn(nr, Xs(Be.parameters, ge)), Bn(nr, or(Wt, Ae)), nr; + } + function oe(Be, at, Wt) { + Bn(Be, or(fe(at, Wt), (nr) => t.createExpressionStatement(nr))); + } + function ne(Be, at, Wt) { + return r3( + /*useLegacyDecorators*/ + !0, + Be, + Wt + ) && at === Os(Be); + } + function pe(Be, at) { + return Ln(Be.members, (Wt) => ne(Wt, at, Be)); + } + function fe(Be, at) { + const Wt = pe(Be, at); + let nr; + for (const Kt of Wt) + nr = Tr(nr, H(Be, Kt)); + return nr; + } + function H(Be, at) { + const Wt = qO( + at, + Be, + /*useLegacyDecorators*/ + !0 + ), nr = Z(Wt); + if (!nr) + return; + const Kt = Ie(Be, at), Pr = de( + at, + /*generateNameForComputedPropertyName*/ + !Vn( + at, + 128 + /* Ambient */ + ) + ), Vt = rs(at) && !im(at) ? t.createVoidZero() : t.createNull(), zt = n().createDecorateHelper( + nr, + Kt, + Pr, + Vt + ); + return Kr( + zt, + 3072 + /* NoComments */ + ), aa(zt, am(at)), zt; + } + function ae(Be, at) { + const Wt = le(at); + Wt && Be.push(kn(t.createExpressionStatement(Wt), at)); + } + function le(Be) { + const at = oW(Be), Wt = Z(at); + if (!Wt) + return; + const nr = u && u[Ku(Be)], Kt = c < 2 ? t.getInternalName( + Be, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ) : t.getDeclarationName( + Be, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), Pr = n().createDecorateHelper(Wt, Kt), Vt = t.createAssignment(Kt, nr ? t.createAssignment(nr, Pr) : Pr); + return Kr( + Vt, + 3072 + /* NoComments */ + ), aa(Vt, am(Be)), Vt; + } + function Ae(Be) { + return E.checkDefined(Ge(Be.expression, h, ct)); + } + function ge(Be, at) { + let Wt; + if (Be) { + Wt = []; + for (const nr of Be) { + const Kt = n().createParamHelper( + Ae(nr), + at + ); + ot(Kt, nr.expression), Kr( + Kt, + 3072 + /* NoComments */ + ), Wt.push(Kt); + } + } + return Wt; + } + function de(Be, at) { + const Wt = Be.name; + return wi(Wt) ? t.createIdentifier("") : oa(Wt) ? at && !mm(Wt.expression) ? t.getGeneratedNameForNode(Wt) : Wt.expression : Re(Wt) ? t.createStringLiteral(dn(Wt)) : t.cloneNode(Wt); + } + function ve() { + u || (e.enableSubstitution( + 80 + /* Identifier */ + ), u = []); + } + function De(Be) { + if (s.hasNodeCheckFlag( + Be, + 262144 + /* ContainsConstructorReference */ + )) { + ve(); + const at = t.createUniqueName(Be.name && !Fo(Be.name) ? dn(Be.name) : "default"); + return u[Ku(Be)] = at, i(at), at; + } + } + function Xe(Be) { + return t.createPropertyAccessExpression(t.getDeclarationName(Be), "prototype"); + } + function Ie(Be, at) { + return Os(at) ? t.getDeclarationName(Be) : Xe(Be); + } + function ye(Be, at) { + return at = _(Be, at), Be === 1 ? Fe(at) : at; + } + function Fe(Be) { + switch (Be.kind) { + case 80: + return Qe(Be); + } + return Be; + } + function Qe(Be) { + return Ke(Be) ?? Be; + } + function Ke(Be) { + if (u && s.hasNodeCheckFlag( + Be, + 536870912 + /* ConstructorReference */ + )) { + const at = s.getReferencedValueDeclaration(Be); + if (at) { + const Wt = u[at.id]; + if (Wt) { + const nr = t.cloneNode(Wt); + return aa(nr, Be), el(nr, Be), nr; + } + } + } + } + } + function Xne(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = pa(e.getCompilerOptions()); + let _, u, d, g, h, S; + return Pd(e, T); + function T(z) { + _ = void 0, S = !1; + const he = gr(z, G, e); + return vh(he, e.readEmitHelpers()), S && (sx( + he, + 32 + /* TransformPrivateStaticElements */ + ), S = !1), he; + } + function C() { + switch (u = void 0, d = void 0, g = void 0, _?.kind) { + case "class": + u = _.classInfo; + break; + case "class-element": + u = _.next.classInfo, d = _.classThis, g = _.classSuper; + break; + case "name": + const z = _.next.next.next; + z?.kind === "class-element" && (u = z.next.classInfo, d = z.classThis, g = z.classSuper); + break; + } + } + function D(z) { + _ = { kind: "class", next: _, classInfo: z, savedPendingExpressions: h }, h = void 0, C(); + } + function P() { + E.assert(_?.kind === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${_?.kind}' instead.`), h = _.savedPendingExpressions, _ = _.next, C(); + } + function O(z) { + var he, q; + E.assert(_?.kind === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${_?.kind}' instead.`), _ = { kind: "class-element", next: _ }, (ac(z) || rs(z) && Uc(z)) && (_.classThis = (he = _.next.classInfo) == null ? void 0 : he.classThis, _.classSuper = (q = _.next.classInfo) == null ? void 0 : q.classSuper), C(); + } + function j() { + var z; + E.assert(_?.kind === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${_?.kind}' instead.`), E.assert(((z = _.next) == null ? void 0 : z.kind) === "class", "Incorrect value for top.next.kind.", () => { + var he; + return `Expected top.next.kind to be 'class' but got '${(he = _.next) == null ? void 0 : he.kind}' instead.`; + }), _ = _.next, C(); + } + function F() { + E.assert(_?.kind === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${_?.kind}' instead.`), _ = { kind: "name", next: _ }, C(); + } + function V() { + E.assert(_?.kind === "name", "Incorrect value for top.kind.", () => `Expected top.kind to be 'name' but got '${_?.kind}' instead.`), _ = _.next, C(); + } + function L() { + _?.kind === "other" ? (E.assert(!h), _.depth++) : (_ = { kind: "other", next: _, depth: 0, savedPendingExpressions: h }, h = void 0, C()); + } + function $() { + E.assert(_?.kind === "other", "Incorrect value for top.kind.", () => `Expected top.kind to be 'other' but got '${_?.kind}' instead.`), _.depth > 0 ? (E.assert(!h), _.depth--) : (h = _.savedPendingExpressions, _ = _.next, C()); + } + function U(z) { + return !!(z.transformFlags & 33554432) || !!d && !!(z.transformFlags & 16384) || !!d && !!g && !!(z.transformFlags & 134217728); + } + function G(z) { + if (!U(z)) + return z; + switch (z.kind) { + case 170: + return E.fail("Use `modifierVisitor` instead."); + case 263: + return le(z); + case 231: + return Ae(z); + case 176: + case 172: + case 175: + return E.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); + case 169: + return Pr(z); + case 226: + return Xt( + z, + /*discarded*/ + !1 + ); + case 303: + return Ss(z); + case 260: + return Le(z); + case 208: + return At(z); + case 277: + return $e(z); + case 110: + return Be(z); + case 248: + return jr(z); + case 244: + return ci(z); + case 355: + return _s( + z, + /*discarded*/ + !1 + ); + case 217: + return nt( + z, + /*discarded*/ + !1 + ); + case 354: + return te( + z, + /*discarded*/ + !1 + ); + case 213: + return at(z); + case 215: + return Wt(z); + case 224: + case 225: + return Ai( + z, + /*discarded*/ + !1 + ); + case 211: + return nr(z); + case 212: + return Kt(z); + case 167: + return wr(z); + case 174: + case 178: + case 177: + case 218: + case 262: { + L(); + const he = gr(z, ce, e); + return $(), he; + } + default: + return gr(z, ce, e); + } + } + function ce(z) { + switch (z.kind) { + case 170: + return; + default: + return G(z); + } + } + function K(z) { + switch (z.kind) { + case 170: + return; + default: + return z; + } + } + function X(z) { + switch (z.kind) { + case 176: + return ve(z); + case 174: + return Ie(z); + case 177: + return ye(z); + case 178: + return Fe(z); + case 172: + return Ke(z); + case 175: + return Qe(z); + default: + return G(z); + } + } + function Z(z) { + switch (z.kind) { + case 224: + case 225: + return Ai( + z, + /*discarded*/ + !0 + ); + case 226: + return Xt( + z, + /*discarded*/ + !0 + ); + case 355: + return _s( + z, + /*discarded*/ + !0 + ); + case 217: + return nt( + z, + /*discarded*/ + !0 + ); + default: + return G(z); + } + } + function oe(z) { + let he = z.name && Re(z.name) && !Fo(z.name) ? dn(z.name) : z.name && wi(z.name) && !Fo(z.name) ? dn(z.name).slice(1) : z.name && Ks(z.name) && X_( + z.name.text, + 99 + /* ESNext */ + ) ? z.name.text : Qn(z) ? "class" : "member"; + return n0(z) && (he = `get_${he}`), Yd(z) && (he = `set_${he}`), z.name && wi(z.name) && (he = `private_${he}`), Os(z) && (he = `static_${he}`), "_" + he; + } + function ne(z, he) { + return t.createUniqueName( + `${oe(z)}_${he}`, + 24 + /* ReservedInNestedScopes */ + ); + } + function pe(z, he) { + return t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + z, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + he + ) + ], + 1 + /* Let */ + ) + ); + } + function fe(z) { + const he = t.createUniqueName( + "_metadata", + 48 + /* FileLevel */ + ); + let q, we, _e = !1, Te = !1, dt = !1, xt, wt, ir; + if (oC( + /*useLegacyDecorators*/ + !1, + z + )) { + const br = ut(z.members, (Lr) => (Pu(Lr) || u_(Lr)) && Uc(Lr)); + xt = t.createUniqueName( + "_classThis", + br ? 24 : 48 + /* FileLevel */ + ); + } + for (const br of z.members) { + if (PT(br) && r3( + /*useLegacyDecorators*/ + !1, + br, + z + )) + if (Uc(br)) { + if (!we) { + we = t.createUniqueName( + "_staticExtraInitializers", + 48 + /* FileLevel */ + ); + const Lr = n().createRunInitializersHelper(xt ?? t.createThis(), we); + aa(Lr, z.name ?? mh(z)), wt ?? (wt = []), wt.push(Lr); + } + } else { + if (!q) { + q = t.createUniqueName( + "_instanceExtraInitializers", + 48 + /* FileLevel */ + ); + const Lr = n().createRunInitializersHelper(t.createThis(), q); + aa(Lr, z.name ?? mh(z)), ir ?? (ir = []), ir.push(Lr); + } + q ?? (q = t.createUniqueName( + "_instanceExtraInitializers", + 48 + /* FileLevel */ + )); + } + if (ac(br) ? Ix(br) || (_e = !0) : rs(br) && (Uc(br) ? _e || (_e = !!br.initializer || wf(br)) : Te || (Te = !Wj(br))), (Pu(br) || u_(br)) && Uc(br) && (dt = !0), we && q && _e && Te && dt) + break; + } + return { + class: z, + classThis: xt, + metadataReference: he, + instanceMethodExtraInitializersName: q, + staticMethodExtraInitializersName: we, + hasStaticInitializers: _e, + hasNonAmbientInstanceFields: Te, + hasStaticPrivateClassElements: dt, + pendingStaticInitializers: wt, + pendingInstanceInitializers: ir + }; + } + function H(z) { + i(), !uW(z) && c0( + /*useLegacyDecorators*/ + !1, + z + ) && (z = GO(e, z, t.createStringLiteral(""))); + const he = t.getLocalName( + z, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !1, + /*ignoreAssignedName*/ + !0 + ), q = fe(z), we = []; + let _e, Te, dt, xt, wt = !1; + const ir = Ne(oW(z)); + ir && (q.classDecoratorsName = t.createUniqueName( + "_classDecorators", + 48 + /* FileLevel */ + ), q.classDescriptorName = t.createUniqueName( + "_classDescriptor", + 48 + /* FileLevel */ + ), q.classExtraInitializersName = t.createUniqueName( + "_classExtraInitializers", + 48 + /* FileLevel */ + ), E.assertIsDefined(q.classThis), we.push( + pe(q.classDecoratorsName, t.createArrayLiteralExpression(ir)), + pe(q.classDescriptorName), + pe(q.classExtraInitializersName, t.createArrayLiteralExpression()), + pe(q.classThis) + ), q.hasStaticPrivateClassElements && (wt = !0, S = !0)); + const br = T3( + z.heritageClauses, + 96 + /* ExtendsKeyword */ + ), Lr = br && ul(br.types), en = Lr && Ge(Lr.expression, G, ct); + if (en) { + q.classSuper = t.createUniqueName( + "_classSuper", + 48 + /* FileLevel */ + ); + const Or = Bc(en), tn = tl(Or) && !Or.name || po(Or) && !Or.name || xo(Or) ? t.createComma(t.createNumericLiteral(0), en) : en; + we.push(pe(q.classSuper, tn)); + const qt = t.updateExpressionWithTypeArguments( + Lr, + q.classSuper, + /*typeArguments*/ + void 0 + ), ma = t.updateHeritageClause(br, [qt]); + xt = t.createNodeArray([ma]); + } + const fr = q.classThis ?? t.createThis(); + D(q), _e = Tr(_e, W(q.metadataReference, q.classSuper)); + let mn = z.members; + if (mn = Ar(mn, (Or) => ec(Or) ? Or : X(Or), fl), mn = Ar(mn, (Or) => ec(Or) ? X(Or) : Or, fl), h) { + let Or; + for (let tn of h) { + tn = Ge(tn, function ma($a) { + if (!($a.transformFlags & 16384)) + return $a; + switch ($a.kind) { + case 110: + return Or || (Or = t.createUniqueName( + "_outerThis", + 16 + /* Optimistic */ + ), we.unshift(pe(Or, t.createThis()))), Or; + default: + return gr($a, ma, e); + } + }, ct); + const qt = t.createExpressionStatement(tn); + _e = Tr(_e, qt); + } + h = void 0; + } + if (P(), ut(q.pendingInstanceInitializers) && !Ng(z)) { + const Or = ge(z, q); + if (Or) { + const tn = tm(z), qt = !!(tn && Bc(tn.expression).kind !== 106), ma = []; + if (qt) { + const Ro = t.createSpreadElement(t.createIdentifier("arguments")), Vo = t.createCallExpression( + t.createSuper(), + /*typeArguments*/ + void 0, + [Ro] + ); + ma.push(t.createExpressionStatement(Vo)); + } + Bn(ma, Or); + const $a = t.createBlock( + ma, + /*multiLine*/ + !0 + ); + dt = t.createConstructorDeclaration( + /*modifiers*/ + void 0, + [], + $a + ); + } + } + if (q.staticMethodExtraInitializersName && we.push( + pe(q.staticMethodExtraInitializersName, t.createArrayLiteralExpression()) + ), q.instanceMethodExtraInitializersName && we.push( + pe(q.instanceMethodExtraInitializersName, t.createArrayLiteralExpression()) + ), q.memberInfos && Dl(q.memberInfos, (Or, tn) => { + Os(tn) && (we.push(pe(Or.memberDecoratorsName)), Or.memberInitializersName && we.push(pe(Or.memberInitializersName, t.createArrayLiteralExpression())), Or.memberExtraInitializersName && we.push(pe(Or.memberExtraInitializersName, t.createArrayLiteralExpression())), Or.memberDescriptorName && we.push(pe(Or.memberDescriptorName))); + }), q.memberInfos && Dl(q.memberInfos, (Or, tn) => { + Os(tn) || (we.push(pe(Or.memberDecoratorsName)), Or.memberInitializersName && we.push(pe(Or.memberInitializersName, t.createArrayLiteralExpression())), Or.memberExtraInitializersName && we.push(pe(Or.memberExtraInitializersName, t.createArrayLiteralExpression())), Or.memberDescriptorName && we.push(pe(Or.memberDescriptorName))); + }), _e = Bn(_e, q.staticNonFieldDecorationStatements), _e = Bn(_e, q.nonStaticNonFieldDecorationStatements), _e = Bn(_e, q.staticFieldDecorationStatements), _e = Bn(_e, q.nonStaticFieldDecorationStatements), q.classDescriptorName && q.classDecoratorsName && q.classExtraInitializersName && q.classThis) { + _e ?? (_e = []); + const Or = t.createPropertyAssignment("value", fr), tn = t.createObjectLiteralExpression([Or]), qt = t.createAssignment(q.classDescriptorName, tn), ma = t.createPropertyAccessExpression(fr, "name"), $a = n().createESDecorateHelper( + t.createNull(), + qt, + q.classDecoratorsName, + { kind: "class", name: ma, metadata: q.metadataReference }, + t.createNull(), + q.classExtraInitializersName + ), Ro = t.createExpressionStatement($a); + aa(Ro, mh(z)), _e.push(Ro); + const Vo = t.createPropertyAccessExpression(q.classDescriptorName, "value"), hs = t.createAssignment(q.classThis, Vo), ga = t.createAssignment(he, hs); + _e.push(t.createExpressionStatement(ga)); + } + if (_e.push(je(fr, q.metadataReference)), ut(q.pendingStaticInitializers)) { + for (const Or of q.pendingStaticInitializers) { + const tn = t.createExpressionStatement(Or); + aa(tn, g0(Or)), Te = Tr(Te, tn); + } + q.pendingStaticInitializers = void 0; + } + if (q.classExtraInitializersName) { + const Or = n().createRunInitializersHelper(fr, q.classExtraInitializersName), tn = t.createExpressionStatement(Or); + aa(tn, z.name ?? mh(z)), Te = Tr(Te, tn); + } + _e && Te && !q.hasStaticInitializers && (Bn(_e, Te), Te = void 0); + const Di = _e && t.createClassStaticBlockDeclaration(t.createBlock( + _e, + /*multiLine*/ + !0 + )); + Di && wt && Y3( + Di, + 32 + /* TransformPrivateStaticElements */ + ); + const Fi = Te && t.createClassStaticBlockDeclaration(t.createBlock( + Te, + /*multiLine*/ + !0 + )); + if (Di || dt || Fi) { + const Or = [], tn = mn.findIndex(Ix); + Di ? (Bn(Or, mn, 0, tn + 1), Or.push(Di), Bn(Or, mn, tn + 1)) : Bn(Or, mn), dt && Or.push(dt), Fi && Or.push(Fi), mn = ot(t.createNodeArray(Or), mn); + } + const ur = s(); + let Mr; + if (ir) { + Mr = t.createClassExpression( + /*modifiers*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + xt, + mn + ), q.classThis && (Mr = Jne(t, Mr, q.classThis)); + const Or = t.createVariableDeclaration( + he, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Mr + ), tn = t.createVariableDeclarationList([Or]), qt = q.classThis ? t.createAssignment(he, q.classThis) : he; + we.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + tn + ), + t.createReturnStatement(qt) + ); + } else + Mr = t.createClassExpression( + /*modifiers*/ + void 0, + z.name, + /*typeParameters*/ + void 0, + xt, + mn + ), we.push(t.createReturnStatement(Mr)); + if (wt) { + sx( + Mr, + 32 + /* TransformPrivateStaticElements */ + ); + for (const Or of Mr.members) + (Pu(Or) || u_(Or)) && Uc(Or) && sx( + Or, + 32 + /* TransformPrivateStaticElements */ + ); + } + return kn(Mr, z), t.createImmediatelyInvokedArrowFunction(t.mergeLexicalEnvironment(we, ur)); + } + function ae(z) { + return c0( + /*useLegacyDecorators*/ + !1, + z + ) || a4( + /*useLegacyDecorators*/ + !1, + z + ); + } + function le(z) { + if (ae(z)) { + const he = [], q = Zo(z, Qn) ?? z, we = q.name ? t.createStringLiteralFromNode(q.name) : t.createStringLiteral("default"), _e = Vn( + z, + 32 + /* Export */ + ), Te = Vn( + z, + 2048 + /* Default */ + ); + if (z.name || (z = GO(e, z, we)), _e && Te) { + const dt = H(z); + if (z.name) { + const xt = t.createVariableDeclaration( + t.getLocalName(z), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + dt + ); + kn(xt, z); + const wt = t.createVariableDeclarationList( + [xt], + 1 + /* Let */ + ), ir = t.createVariableStatement( + /*modifiers*/ + void 0, + wt + ); + he.push(ir); + const br = t.createExportDefault(t.getDeclarationName(z)); + kn(br, z), el(br, lm(z)), aa(br, mh(z)), he.push(br); + } else { + const xt = t.createExportDefault(dt); + kn(xt, z), el(xt, lm(z)), aa(xt, mh(z)), he.push(xt); + } + } else { + E.assertIsDefined(z.name, "A class declaration that is not a default export must have a name."); + const dt = H(z), xt = _e ? (fr) => _x(fr) ? void 0 : K(fr) : K, wt = Ar(z.modifiers, xt, Qs), ir = t.getLocalName( + z, + /*allowComments*/ + !1, + /*allowSourceMaps*/ + !0 + ), br = t.createVariableDeclaration( + ir, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + dt + ); + kn(br, z); + const Lr = t.createVariableDeclarationList( + [br], + 1 + /* Let */ + ), en = t.createVariableStatement(wt, Lr); + if (kn(en, z), el(en, lm(z)), he.push(en), _e) { + const fr = t.createExternalModuleExport(ir); + kn(fr, z), he.push(fr); + } + } + return jm(he); + } else { + const he = Ar(z.modifiers, K, Qs), q = Ar(z.heritageClauses, G, nf); + D( + /*classInfo*/ + void 0 + ); + const we = Ar(z.members, X, fl); + return P(), t.updateClassDeclaration( + z, + he, + z.name, + /*typeParameters*/ + void 0, + q, + we + ); + } + } + function Ae(z) { + if (ae(z)) { + const he = H(z); + return kn(he, z), he; + } else { + const he = Ar(z.modifiers, K, Qs), q = Ar(z.heritageClauses, G, nf); + D( + /*classInfo*/ + void 0 + ); + const we = Ar(z.members, X, fl); + return P(), t.updateClassExpression( + z, + he, + z.name, + /*typeParameters*/ + void 0, + q, + we + ); + } + } + function ge(z, he) { + if (ut(he.pendingInstanceInitializers)) { + const q = []; + return q.push( + t.createExpressionStatement( + t.inlineExpressions(he.pendingInstanceInitializers) + ) + ), he.pendingInstanceInitializers = void 0, q; + } + } + function de(z, he, q, we, _e, Te) { + const dt = we[_e], xt = he[dt]; + if (Bn(z, Ar(he, G, hi, q, dt - q)), sS(xt)) { + const wt = []; + de( + wt, + xt.tryBlock.statements, + /*statementOffset*/ + 0, + we, + _e + 1, + Te + ); + const ir = t.createNodeArray(wt); + ot(ir, xt.tryBlock.statements), z.push(t.updateTryStatement( + xt, + t.updateBlock(xt.tryBlock, wt), + Ge(xt.catchClause, G, Rb), + Ge(xt.finallyBlock, G, ms) + )); + } else + Bn(z, Ar(he, G, hi, dt, 1)), Bn(z, Te); + Bn(z, Ar(he, G, hi, dt + 1)); + } + function ve(z) { + O(z); + const he = Ar(z.modifiers, K, Qs), q = Ar(z.parameters, G, ji); + let we; + if (z.body && u) { + const _e = ge(u.class, u); + if (_e) { + const Te = [], dt = t.copyPrologue( + z.body.statements, + Te, + /*ensureUseStrict*/ + !1, + G + ), xt = VO(z.body.statements, dt); + xt.length > 0 ? de(Te, z.body.statements, dt, xt, 0, _e) : (Bn(Te, _e), Bn(Te, Ar(z.body.statements, G, hi))), we = t.createBlock( + Te, + /*multiLine*/ + !0 + ), kn(we, z.body), ot(we, z.body); + } + } + return we ?? (we = Ge(z.body, G, ms)), j(), t.updateConstructorDeclaration(z, he, q, we); + } + function De(z, he) { + return z !== he && (el(z, he), aa(z, mh(he))), z; + } + function Xe(z, he, q) { + let we, _e, Te, dt, xt, wt; + if (!he) { + const Lr = Ar(z.modifiers, K, Qs); + return F(), _e = os(z.name), V(), { modifiers: Lr, referencedName: we, name: _e, initializersName: Te, descriptorName: wt, thisArg: xt }; + } + const ir = Ne(qO( + z, + he.class, + /*useLegacyDecorators*/ + !1 + )), br = Ar(z.modifiers, K, Qs); + if (ir) { + const Lr = ne(z, "decorators"), en = t.createArrayLiteralExpression(ir), fr = t.createAssignment(Lr, en), mn = { memberDecoratorsName: Lr }; + he.memberInfos ?? (he.memberInfos = /* @__PURE__ */ new Map()), he.memberInfos.set(z, mn), h ?? (h = []), h.push(fr); + const Di = PT(z) || u_(z) ? Os(z) ? he.staticNonFieldDecorationStatements ?? (he.staticNonFieldDecorationStatements = []) : he.nonStaticNonFieldDecorationStatements ?? (he.nonStaticNonFieldDecorationStatements = []) : rs(z) && !u_(z) ? Os(z) ? he.staticFieldDecorationStatements ?? (he.staticFieldDecorationStatements = []) : he.nonStaticFieldDecorationStatements ?? (he.nonStaticFieldDecorationStatements = []) : E.fail(), Fi = Af(z) ? "getter" : rf(z) ? "setter" : hc(z) ? "method" : u_(z) ? "accessor" : rs(z) ? "field" : E.fail(); + let ur; + if (Re(z.name) || wi(z.name)) + ur = { computed: !1, name: z.name }; + else if (rm(z.name)) + ur = { computed: !0, name: t.createStringLiteralFromNode(z.name) }; + else { + const Or = z.name.expression; + rm(Or) && !Re(Or) ? ur = { computed: !0, name: t.createStringLiteralFromNode(Or) } : (F(), { referencedName: we, name: _e } = $n(z.name), ur = { computed: !0, name: we }, V()); + } + const Mr = { + kind: Fi, + name: ur, + static: Os(z), + private: wi(z.name), + access: { + // 15.7.3 CreateDecoratorAccessObject (kind, name) + // 2. If _kind_ is ~field~, ~method~, ~accessor~, or ~getter~, then ... + get: rs(z) || Af(z) || hc(z), + // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... + set: rs(z) || rf(z) + }, + metadata: he.metadataReference + }; + if (PT(z)) { + const Or = Os(z) ? he.staticMethodExtraInitializersName : he.instanceMethodExtraInitializersName; + E.assertIsDefined(Or); + let tn; + Pu(z) && q && (tn = q(z, Ar(br, ($a) => Jn($a, Z4), Qs)), mn.memberDescriptorName = wt = ne(z, "descriptor"), tn = t.createAssignment(wt, tn)); + const qt = n().createESDecorateHelper(t.createThis(), tn ?? t.createNull(), Lr, Mr, t.createNull(), Or), ma = t.createExpressionStatement(qt); + aa(ma, mh(z)), Di.push(ma); + } else if (rs(z)) { + Te = mn.memberInitializersName ?? (mn.memberInitializersName = ne(z, "initializers")), dt = mn.memberExtraInitializersName ?? (mn.memberExtraInitializersName = ne(z, "extraInitializers")), Os(z) && (xt = he.classThis); + let Or; + Pu(z) && im(z) && q && (Or = q( + z, + /*modifiers*/ + void 0 + ), mn.memberDescriptorName = wt = ne(z, "descriptor"), Or = t.createAssignment(wt, Or)); + const tn = n().createESDecorateHelper( + u_(z) ? t.createThis() : t.createNull(), + Or ?? t.createNull(), + Lr, + Mr, + Te, + dt + ), qt = t.createExpressionStatement(tn); + aa(qt, mh(z)), Di.push(qt); + } + } + return _e === void 0 && (F(), _e = os(z.name), V()), !ut(br) && (hc(z) || rs(z)) && Kr( + _e, + 1024 + /* NoLeadingComments */ + ), { modifiers: br, referencedName: we, name: _e, initializersName: Te, extraInitializersName: dt, descriptorName: wt, thisArg: xt }; + } + function Ie(z) { + O(z); + const { modifiers: he, name: q, descriptorName: we } = Xe(z, u, jt); + if (we) + return j(), De(kt(he, q, we), z); + { + const _e = Ar(z.parameters, G, ji), Te = Ge(z.body, G, ms); + return j(), De(t.updateMethodDeclaration( + z, + he, + z.asteriskToken, + q, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + _e, + /*type*/ + void 0, + Te + ), z); + } + } + function ye(z) { + O(z); + const { modifiers: he, name: q, descriptorName: we } = Xe(z, u, be); + if (we) + return j(), De(yt(he, q, we), z); + { + const _e = Ar(z.parameters, G, ji), Te = Ge(z.body, G, ms); + return j(), De(t.updateGetAccessorDeclaration( + z, + he, + q, + _e, + /*type*/ + void 0, + Te + ), z); + } + } + function Fe(z) { + O(z); + const { modifiers: he, name: q, descriptorName: we } = Xe(z, u, ft); + if (we) + return j(), De(Ut(he, q, we), z); + { + const _e = Ar(z.parameters, G, ji), Te = Ge(z.body, G, ms); + return j(), De(t.updateSetAccessorDeclaration(z, he, q, _e, Te), z); + } + } + function Qe(z) { + O(z); + let he; + if (Ix(z)) + he = gr(z, G, e); + else if (wD(z)) { + const q = d; + d = void 0, he = gr(z, G, e), d = q; + } else if (z = gr(z, G, e), he = z, u && (u.hasStaticInitializers = !0, ut(u.pendingStaticInitializers))) { + const q = []; + for (const Te of u.pendingStaticInitializers) { + const dt = t.createExpressionStatement(Te); + aa(dt, g0(Te)), q.push(dt); + } + const we = t.createBlock( + q, + /*multiLine*/ + !0 + ); + he = [t.createClassStaticBlockDeclaration(we), he], u.pendingStaticInitializers = void 0; + } + return j(), he; + } + function Ke(z) { + Z_(z, Vt) && (z = sf(e, z, zt(z.initializer))), O(z), E.assert(!Wj(z), "Not yet implemented."); + const { modifiers: he, name: q, initializersName: we, extraInitializersName: _e, descriptorName: Te, thisArg: dt } = Xe(z, u, im(z) ? bt : void 0); + i(); + let xt = Ge(z.initializer, G, ct); + we && (xt = n().createRunInitializersHelper( + dt ?? t.createThis(), + we, + xt ?? t.createVoidZero() + )), Os(z) && u && xt && (u.hasStaticInitializers = !0); + const wt = s(); + if (ut(wt) && (xt = t.createImmediatelyInvokedArrowFunction([ + ...wt, + t.createReturnStatement(xt) + ])), u && (Os(z) ? (xt = Ee( + u, + /*isStatic*/ + !0, + xt + ), _e && (u.pendingStaticInitializers ?? (u.pendingStaticInitializers = []), u.pendingStaticInitializers.push( + n().createRunInitializersHelper( + u.classThis ?? t.createThis(), + _e + ) + ))) : (xt = Ee( + u, + /*isStatic*/ + !1, + xt + ), _e && (u.pendingInstanceInitializers ?? (u.pendingInstanceInitializers = []), u.pendingInstanceInitializers.push( + n().createRunInitializersHelper( + t.createThis(), + _e + ) + )))), j(), im(z) && Te) { + const ir = lm(z), br = g0(z), Lr = z.name; + let en = Lr, fr = Lr; + if (oa(Lr) && !mm(Lr.expression)) { + const Mr = uO(Lr); + if (Mr) + en = t.updateComputedPropertyName(Lr, Ge(Lr.expression, G, ct)), fr = t.updateComputedPropertyName(Lr, Mr.left); + else { + const Or = t.createTempVariable(o); + aa(Or, Lr.expression); + const tn = Ge(Lr.expression, G, ct), qt = t.createAssignment(Or, tn); + aa(qt, Lr.expression), en = t.updateComputedPropertyName(Lr, qt), fr = t.updateComputedPropertyName(Lr, Or); + } + } + const mn = Ar(he, (Mr) => Mr.kind !== 129 ? Mr : void 0, Qs), Di = sz(t, z, mn, xt); + kn(Di, z), Kr( + Di, + 3072 + /* NoComments */ + ), aa(Di, br), aa(Di.name, z.name); + const Fi = yt(mn, en, Te); + kn(Fi, z), el(Fi, ir), aa(Fi, br); + const ur = Ut(mn, fr, Te); + return kn(ur, z), Kr( + ur, + 3072 + /* NoComments */ + ), aa(ur, br), [Di, Fi, ur]; + } + return De(t.updatePropertyDeclaration( + z, + he, + q, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + xt + ), z); + } + function Be(z) { + return d ?? z; + } + function at(z) { + if (f_(z.expression) && d) { + const he = Ge(z.expression, G, ct), q = Ar(z.arguments, G, ct), we = t.createFunctionCallCall(he, d, q); + return kn(we, z), ot(we, z), we; + } + return gr(z, G, e); + } + function Wt(z) { + if (f_(z.tag) && d) { + const he = Ge(z.tag, G, ct), q = t.createFunctionBindCall(he, d, []); + kn(q, z), ot(q, z); + const we = Ge(z.template, G, wT); + return t.updateTaggedTemplateExpression( + z, + q, + /*typeArguments*/ + void 0, + we + ); + } + return gr(z, G, e); + } + function nr(z) { + if (f_(z) && Re(z.name) && d && g) { + const he = t.createStringLiteralFromNode(z.name), q = t.createReflectGetCall(g, he, d); + return kn(q, z.expression), ot(q, z.expression), q; + } + return gr(z, G, e); + } + function Kt(z) { + if (f_(z) && d && g) { + const he = Ge(z.argumentExpression, G, ct), q = t.createReflectGetCall(g, he, d); + return kn(q, z.expression), ot(q, z.expression), q; + } + return gr(z, G, e); + } + function Pr(z) { + Z_(z, Vt) && (z = sf(e, z, zt(z.initializer))); + const he = t.updateParameterDeclaration( + z, + /*modifiers*/ + void 0, + z.dotDotDotToken, + Ge(z.name, G, W2), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Ge(z.initializer, G, ct) + ); + return he !== z && (el(he, z), ot(he, am(z)), aa(he, am(z)), Kr( + he.name, + 64 + /* NoTrailingSourceMap */ + )), he; + } + function Vt(z) { + return tl(z) && !z.name && ae(z); + } + function zt(z) { + const he = Bc(z); + return tl(he) && !he.name && !c0( + /*useLegacyDecorators*/ + !1, + he + ); + } + function jr(z) { + return t.updateForStatement( + z, + Ge(z.initializer, Z, tp), + Ge(z.condition, G, ct), + Ge(z.incrementor, Z, ct), + Zu(z.statement, G, e) + ); + } + function ci(z) { + return gr(z, Z, e); + } + function Xt(z, he) { + if (p0(z)) { + const q = Ca(z.left), we = Ge(z.right, G, ct); + return t.updateBinaryExpression(z, q, z.operatorToken, we); + } + if (Tl(z)) { + if (Z_(z, Vt)) + return z = sf(e, z, zt(z.right)), gr(z, G, e); + if (f_(z.left) && d && g) { + let q = ho(z.left) ? Ge(z.left.argumentExpression, G, ct) : Re(z.left.name) ? t.createStringLiteralFromNode(z.left.name) : void 0; + if (q) { + let we = Ge(z.right, G, ct); + if (ED(z.operatorToken.kind)) { + let Te = q; + mm(q) || (Te = t.createTempVariable(o), q = t.createAssignment(Te, q)); + const dt = t.createReflectGetCall( + g, + Te, + d + ); + kn(dt, z.left), ot(dt, z.left), we = t.createBinaryExpression( + dt, + DD(z.operatorToken.kind), + we + ), ot(we, z); + } + const _e = he ? void 0 : t.createTempVariable(o); + return _e && (we = t.createAssignment(_e, we), ot(_e, z)), we = t.createReflectSetCall( + g, + q, + we, + d + ), kn(we, z), ot(we, z), _e && (we = t.createComma(we, _e), ot(we, z)), we; + } + } + } + if (z.operatorToken.kind === 28) { + const q = Ge(z.left, Z, ct), we = Ge(z.right, he ? Z : G, ct); + return t.updateBinaryExpression(z, q, z.operatorToken, we); + } + return gr(z, G, e); + } + function Ai(z, he) { + if (z.operator === 46 || z.operator === 47) { + const q = Ja(z.operand); + if (f_(q) && d && g) { + let we = ho(q) ? Ge(q.argumentExpression, G, ct) : Re(q.name) ? t.createStringLiteralFromNode(q.name) : void 0; + if (we) { + let _e = we; + mm(we) || (_e = t.createTempVariable(o), we = t.createAssignment(_e, we)); + let Te = t.createReflectGetCall(g, _e, d); + kn(Te, z), ot(Te, z); + const dt = he ? void 0 : t.createTempVariable(o); + return Te = nO(t, z, Te, o, dt), Te = t.createReflectSetCall(g, we, Te, d), kn(Te, z), ot(Te, z), dt && (Te = t.createComma(Te, dt), ot(Te, z)), Te; + } + } + } + return gr(z, G, e); + } + function _s(z, he) { + const q = he ? NA(z.elements, Z) : NA(z.elements, G, Z); + return t.updateCommaListExpression(z, q); + } + function $n(z) { + if (rm(z) || wi(z)) { + const Te = t.createStringLiteralFromNode(z), dt = Ge(z, G, Rc); + return { referencedName: Te, name: dt }; + } + if (rm(z.expression) && !Re(z.expression)) { + const Te = t.createStringLiteralFromNode(z.expression), dt = Ge(z, G, Rc); + return { referencedName: Te, name: dt }; + } + const he = t.getGeneratedNameForNode(z); + o(he); + const q = n().createPropKeyHelper(Ge(z.expression, G, ct)), we = t.createAssignment(he, q), _e = t.updateComputedPropertyName(z, re(we)); + return { referencedName: he, name: _e }; + } + function os(z) { + return oa(z) ? wr(z) : Ge(z, G, Rc); + } + function wr(z) { + let he = Ge(z.expression, G, ct); + return mm(he) || (he = re(he)), t.updateComputedPropertyName(z, he); + } + function Ss(z) { + return Z_(z, Vt) && (z = sf(e, z, zt(z.initializer))), gr(z, G, e); + } + function Le(z) { + return Z_(z, Vt) && (z = sf(e, z, zt(z.initializer))), gr(z, G, e); + } + function At(z) { + return Z_(z, Vt) && (z = sf(e, z, zt(z.initializer))), gr(z, G, e); + } + function vr(z) { + if (Gs(z) || Wl(z)) + return Ca(z); + if (f_(z) && d && g) { + const he = ho(z) ? Ge(z.argumentExpression, G, ct) : Re(z.name) ? t.createStringLiteralFromNode(z.name) : void 0; + if (he) { + const q = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), we = t.createAssignmentTargetWrapper( + q, + t.createReflectSetCall( + g, + he, + q, + d + ) + ); + return kn(we, z), ot(we, z), we; + } + } + return gr(z, G, e); + } + function ln(z) { + if (Tl( + z, + /*excludeCompoundAssignment*/ + !0 + )) { + Z_(z, Vt) && (z = sf(e, z, zt(z.right))); + const he = vr(z.left), q = Ge(z.right, G, ct); + return t.updateBinaryExpression(z, he, z.operatorToken, q); + } else + return vr(z); + } + function Zn(z) { + if (__(z.expression)) { + const he = vr(z.expression); + return t.updateSpreadElement(z, he); + } + return gr(z, G, e); + } + function ri(z) { + return E.assertNode(z, Fw), cp(z) ? Zn(z) : ml(z) ? gr(z, G, e) : ln(z); + } + function mi(z) { + const he = Ge(z.name, G, Rc); + if (Tl( + z.initializer, + /*excludeCompoundAssignment*/ + !0 + )) { + const q = ln(z.initializer); + return t.updatePropertyAssignment(z, he, q); + } + if (__(z.initializer)) { + const q = vr(z.initializer); + return t.updatePropertyAssignment(z, he, q); + } + return gr(z, G, e); + } + function Ps(z) { + return Z_(z, Vt) && (z = sf(e, z, zt(z.objectAssignmentInitializer))), gr(z, G, e); + } + function ws(z) { + if (__(z.expression)) { + const he = vr(z.expression); + return t.updateSpreadAssignment(z, he); + } + return gr(z, G, e); + } + function Yt(z) { + return E.assertNode(z, Ow), Bg(z) ? ws(z) : du(z) ? Ps(z) : qc(z) ? mi(z) : gr(z, G, e); + } + function Ca(z) { + if (Wl(z)) { + const he = Ar(z.elements, ri, ct); + return t.updateArrayLiteralExpression(z, he); + } else { + const he = Ar(z.properties, Yt, lh); + return t.updateObjectLiteralExpression(z, he); + } + } + function $e(z) { + return Z_(z, Vt) && (z = sf(e, z, zt(z.expression))), gr(z, G, e); + } + function nt(z, he) { + const q = he ? Z : G, we = Ge(z.expression, q, ct); + return t.updateParenthesizedExpression(z, we); + } + function te(z, he) { + const q = he ? Z : G, we = Ge(z.expression, q, ct); + return t.updatePartiallyEmittedExpression(z, we); + } + function rt(z, he) { + return ut(z) && (he ? Qu(he) ? (z.push(he.expression), he = t.updateParenthesizedExpression(he, t.inlineExpressions(z))) : (z.push(he), he = t.inlineExpressions(z)) : he = t.inlineExpressions(z)), he; + } + function re(z) { + const he = rt(h, z); + return E.assertIsDefined(he), he !== z && (h = void 0), he; + } + function Ee(z, he, q) { + const we = rt(he ? z.pendingStaticInitializers : z.pendingInstanceInitializers, q); + return we !== q && (he ? z.pendingStaticInitializers = void 0 : z.pendingInstanceInitializers = void 0), we; + } + function Ne(z) { + if (!z) + return; + const he = []; + return Bn(he, or(z.decorators, et)), he; + } + function et(z) { + const he = Ge(z.expression, G, ct); + Kr( + he, + 3072 + /* NoComments */ + ); + const q = Bc(he); + if (go(q)) { + const { target: we, thisArg: _e } = t.createCallBinding( + he, + o, + c, + /*cacheIdentifiers*/ + !0 + ); + return t.restoreOuterExpressions(he, t.createFunctionBindCall(we, _e, [])); + } + return he; + } + function lt(z, he, q, we, _e, Te, dt) { + const xt = t.createFunctionExpression( + q, + we, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + Te, + /*type*/ + void 0, + dt ?? t.createBlock([]) + ); + kn(xt, z), aa(xt, mh(z)), Kr( + xt, + 3072 + /* NoComments */ + ); + const wt = _e === "get" || _e === "set" ? _e : void 0, ir = t.createStringLiteralFromNode( + he, + /*isSingleQuote*/ + void 0 + ), br = n().createSetFunctionNameHelper(xt, ir, wt), Lr = t.createPropertyAssignment(t.createIdentifier(_e), br); + return kn(Lr, z), aa(Lr, mh(z)), Kr( + Lr, + 3072 + /* NoComments */ + ), Lr; + } + function jt(z, he) { + return t.createObjectLiteralExpression([ + lt( + z, + z.name, + he, + z.asteriskToken, + "value", + Ar(z.parameters, G, ji), + Ge(z.body, G, ms) + ) + ]); + } + function be(z, he) { + return t.createObjectLiteralExpression([ + lt( + z, + z.name, + he, + /*asteriskToken*/ + void 0, + "get", + [], + Ge(z.body, G, ms) + ) + ]); + } + function ft(z, he) { + return t.createObjectLiteralExpression([ + lt( + z, + z.name, + he, + /*asteriskToken*/ + void 0, + "set", + Ar(z.parameters, G, ji), + Ge(z.body, G, ms) + ) + ]); + } + function bt(z, he) { + return t.createObjectLiteralExpression([ + lt( + z, + z.name, + he, + /*asteriskToken*/ + void 0, + "get", + [], + t.createBlock([ + t.createReturnStatement( + t.createPropertyAccessExpression( + t.createThis(), + t.getGeneratedPrivateNameForNode(z.name) + ) + ) + ]) + ), + lt( + z, + z.name, + he, + /*asteriskToken*/ + void 0, + "set", + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression( + t.createThis(), + t.getGeneratedPrivateNameForNode(z.name) + ), + t.createIdentifier("value") + ) + ) + ]) + ) + ]); + } + function kt(z, he, q) { + return z = Ar(z, (we) => fx(we) ? we : void 0, Qs), t.createGetAccessorDeclaration( + z, + he, + [], + /*type*/ + void 0, + t.createBlock([ + t.createReturnStatement( + t.createPropertyAccessExpression( + q, + t.createIdentifier("value") + ) + ) + ]) + ); + } + function yt(z, he, q) { + return z = Ar(z, (we) => fx(we) ? we : void 0, Qs), t.createGetAccessorDeclaration( + z, + he, + [], + /*type*/ + void 0, + t.createBlock([ + t.createReturnStatement( + t.createFunctionCallCall( + t.createPropertyAccessExpression( + q, + t.createIdentifier("get") + ), + t.createThis(), + [] + ) + ) + ]) + ); + } + function Ut(z, he, q) { + return z = Ar(z, (we) => fx(we) ? we : void 0, Qs), t.createSetAccessorDeclaration( + z, + he, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )], + t.createBlock([ + t.createReturnStatement( + t.createFunctionCallCall( + t.createPropertyAccessExpression( + q, + t.createIdentifier("set") + ), + t.createThis(), + [t.createIdentifier("value")] + ) + ) + ]) + ); + } + function W(z, he) { + const q = t.createVariableDeclaration( + z, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createConditionalExpression( + t.createLogicalAnd( + t.createTypeCheck(t.createIdentifier("Symbol"), "function"), + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata") + ), + t.createToken( + 58 + /* QuestionToken */ + ), + t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "create"), + /*typeArguments*/ + void 0, + [he ? st(he) : t.createNull()] + ), + t.createToken( + 59 + /* ColonToken */ + ), + t.createVoidZero() + ) + ); + return t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [q], + 2 + /* Const */ + ) + ); + } + function je(z, he) { + const q = t.createObjectDefinePropertyCall( + z, + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata"), + t.createPropertyDescriptor( + { configurable: !0, writable: !0, enumerable: !0, value: he }, + /*singleLine*/ + !0 + ) + ); + return Kr( + t.createIfStatement(he, t.createExpressionStatement(q)), + 1 + /* SingleLine */ + ); + } + function st(z) { + return t.createBinaryExpression( + t.createElementAccessExpression( + z, + t.createPropertyAccessExpression(t.createIdentifier("Symbol"), "metadata") + ), + 61, + t.createNull() + ); + } + } + function Qne(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = e.getEmitResolver(), _ = e.getCompilerOptions(), u = pa(_); + let d, g = 0, h, S, T, C; + const D = []; + let P = 0; + const O = e.onEmitNode, j = e.onSubstituteNode; + return e.onEmitNode = ci, e.onSubstituteNode = Xt, Pd(e, F); + function F(Le) { + if (Le.isDeclarationFile) + return Le; + V(1, !1), V(2, !zj(Le, _)); + const At = gr(Le, X, e); + return vh(At, e.readEmitHelpers()), At; + } + function V(Le, At) { + P = At ? P | Le : P & ~Le; + } + function L(Le) { + return (P & Le) !== 0; + } + function $() { + return !L( + 1 + /* NonTopLevel */ + ); + } + function U() { + return L( + 2 + /* HasLexicalThis */ + ); + } + function G(Le, At, vr) { + const ln = Le & ~P; + if (ln) { + V( + ln, + /*val*/ + !0 + ); + const Zn = At(vr); + return V( + ln, + /*val*/ + !1 + ), Zn; + } + return At(vr); + } + function ce(Le) { + return gr(Le, X, e); + } + function K(Le) { + switch (Le.kind) { + case 218: + case 262: + case 174: + case 177: + case 178: + case 176: + return Le; + case 169: + case 208: + case 260: + break; + case 80: + if (C && c.isArgumentsLocalBinding(Le)) + return C; + break; + } + return gr(Le, K, e); + } + function X(Le) { + if (!(Le.transformFlags & 256)) + return C ? K(Le) : Le; + switch (Le.kind) { + case 134: + return; + case 223: + return ae(Le); + case 174: + return G(3, Ae, Le); + case 262: + return G(3, ve, Le); + case 218: + return G(3, De, Le); + case 219: + return G(1, Xe, Le); + case 211: + return S && Dn(Le) && Le.expression.kind === 108 && S.add(Le.name.escapedText), gr(Le, X, e); + case 212: + return S && Le.expression.kind === 108 && (T = !0), gr(Le, X, e); + case 177: + return G(3, ge, Le); + case 178: + return G(3, de, Le); + case 176: + return G(3, le, Le); + case 263: + case 231: + return G(3, ce, Le); + default: + return gr(Le, X, e); + } + } + function Z(Le) { + if (KZ(Le)) + switch (Le.kind) { + case 243: + return ne(Le); + case 248: + return H(Le); + case 249: + return pe(Le); + case 250: + return fe(Le); + case 299: + return oe(Le); + case 241: + case 255: + case 269: + case 296: + case 297: + case 258: + case 246: + case 247: + case 245: + case 254: + case 256: + return gr(Le, Z, e); + default: + return E.assertNever(Le, "Unhandled node."); + } + return X(Le); + } + function oe(Le) { + const At = /* @__PURE__ */ new Set(); + Ie(Le.variableDeclaration, At); + let vr; + if (At.forEach((ln, Zn) => { + h.has(Zn) && (vr || (vr = new Set(h)), vr.delete(Zn)); + }), vr) { + const ln = h; + h = vr; + const Zn = gr(Le, Z, e); + return h = ln, Zn; + } else + return gr(Le, Z, e); + } + function ne(Le) { + if (ye(Le.declarationList)) { + const At = Fe( + Le.declarationList, + /*hasReceiver*/ + !1 + ); + return At ? t.createExpressionStatement(At) : void 0; + } + return gr(Le, X, e); + } + function pe(Le) { + return t.updateForInStatement( + Le, + ye(Le.initializer) ? Fe( + Le.initializer, + /*hasReceiver*/ + !0 + ) : E.checkDefined(Ge(Le.initializer, X, tp)), + E.checkDefined(Ge(Le.expression, X, ct)), + Zu(Le.statement, Z, e) + ); + } + function fe(Le) { + return t.updateForOfStatement( + Le, + Ge(Le.awaitModifier, X, AJ), + ye(Le.initializer) ? Fe( + Le.initializer, + /*hasReceiver*/ + !0 + ) : E.checkDefined(Ge(Le.initializer, X, tp)), + E.checkDefined(Ge(Le.expression, X, ct)), + Zu(Le.statement, Z, e) + ); + } + function H(Le) { + const At = Le.initializer; + return t.updateForStatement( + Le, + ye(At) ? Fe( + At, + /*hasReceiver*/ + !1 + ) : Ge(Le.initializer, X, tp), + Ge(Le.condition, X, ct), + Ge(Le.incrementor, X, ct), + Zu(Le.statement, Z, e) + ); + } + function ae(Le) { + return $() ? gr(Le, X, e) : kn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + Ge(Le.expression, X, ct) + ), + Le + ), + Le + ); + } + function le(Le) { + const At = C; + C = void 0; + const vr = t.updateConstructorDeclaration( + Le, + Ar(Le.modifiers, X, Qs), + cc(Le.parameters, X, e), + Wt(Le) + ); + return C = At, vr; + } + function Ae(Le) { + let At; + const vr = jc(Le), ln = C; + C = void 0; + const Zn = t.updateMethodDeclaration( + Le, + Ar(Le.modifiers, X, Lo), + Le.asteriskToken, + Le.name, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + At = vr & 2 ? Kt(Le) : cc(Le.parameters, X, e), + /*type*/ + void 0, + vr & 2 ? Pr(Le, At) : Wt(Le) + ); + return C = ln, Zn; + } + function ge(Le) { + const At = C; + C = void 0; + const vr = t.updateGetAccessorDeclaration( + Le, + Ar(Le.modifiers, X, Lo), + Le.name, + cc(Le.parameters, X, e), + /*type*/ + void 0, + Wt(Le) + ); + return C = At, vr; + } + function de(Le) { + const At = C; + C = void 0; + const vr = t.updateSetAccessorDeclaration( + Le, + Ar(Le.modifiers, X, Lo), + Le.name, + cc(Le.parameters, X, e), + Wt(Le) + ); + return C = At, vr; + } + function ve(Le) { + let At; + const vr = C; + C = void 0; + const ln = jc(Le), Zn = t.updateFunctionDeclaration( + Le, + Ar(Le.modifiers, X, Lo), + Le.asteriskToken, + Le.name, + /*typeParameters*/ + void 0, + At = ln & 2 ? Kt(Le) : cc(Le.parameters, X, e), + /*type*/ + void 0, + ln & 2 ? Pr(Le, At) : Lf(Le.body, X, e) + ); + return C = vr, Zn; + } + function De(Le) { + let At; + const vr = C; + C = void 0; + const ln = jc(Le), Zn = t.updateFunctionExpression( + Le, + Ar(Le.modifiers, X, Qs), + Le.asteriskToken, + Le.name, + /*typeParameters*/ + void 0, + At = ln & 2 ? Kt(Le) : cc(Le.parameters, X, e), + /*type*/ + void 0, + ln & 2 ? Pr(Le, At) : Lf(Le.body, X, e) + ); + return C = vr, Zn; + } + function Xe(Le) { + let At; + const vr = jc(Le); + return t.updateArrowFunction( + Le, + Ar(Le.modifiers, X, Qs), + /*typeParameters*/ + void 0, + At = vr & 2 ? Kt(Le) : cc(Le.parameters, X, e), + /*type*/ + void 0, + Le.equalsGreaterThanToken, + vr & 2 ? Pr(Le, At) : Lf(Le.body, X, e) + ); + } + function Ie({ name: Le }, At) { + if (Re(Le)) + At.add(Le.escapedText); + else + for (const vr of Le.elements) + ml(vr) || Ie(vr, At); + } + function ye(Le) { + return !!Le && Il(Le) && !(Le.flags & 7) && Le.declarations.some(at); + } + function Fe(Le, At) { + Qe(Le); + const vr = P4(Le); + return vr.length === 0 ? At ? Ge(t.converters.convertToAssignmentElementTarget(Le.declarations[0].name), X, ct) : void 0 : t.inlineExpressions(or(vr, Be)); + } + function Qe(Le) { + rr(Le.declarations, Ke); + } + function Ke({ name: Le }) { + if (Re(Le)) + o(Le); + else + for (const At of Le.elements) + ml(At) || Ke(At); + } + function Be(Le) { + const At = aa( + t.createAssignment( + t.converters.convertToAssignmentElementTarget(Le.name), + Le.initializer + ), + Le + ); + return E.checkDefined(Ge(At, X, ct)); + } + function at({ name: Le }) { + if (Re(Le)) + return h.has(Le.escapedText); + for (const At of Le.elements) + if (!ml(At) && at(At)) + return !0; + return !1; + } + function Wt(Le) { + E.assertIsDefined(Le.body); + const At = S, vr = T; + S = /* @__PURE__ */ new Set(), T = !1; + let ln = Lf(Le.body, X, e); + const Zn = Zo(Le, so); + if (u >= 2 && (c.hasNodeCheckFlag( + Le, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + Le, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )) && (jc(Zn) & 3) !== 3) { + if (jr(), S.size) { + const mi = $O(t, c, Le, S); + D[ja(mi)] = !0; + const Ps = ln.statements.slice(); + Pg(Ps, [mi]), ln = t.updateBlock(ln, Ps); + } + T && (c.hasNodeCheckFlag( + Le, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? ox(ln, j5) : c.hasNodeCheckFlag( + Le, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && ox(ln, R5)); + } + return S = At, T = vr, ln; + } + function nr() { + E.assert(C); + const Le = t.createVariableDeclaration( + C, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("arguments") + ), At = t.createVariableStatement( + /*modifiers*/ + void 0, + [Le] + ); + return mu(At), cm( + At, + 2097152 + /* CustomPrologue */ + ), At; + } + function Kt(Le) { + if (OA(Le.parameters)) + return cc(Le.parameters, X, e); + const At = []; + for (const ln of Le.parameters) { + if (ln.initializer || ln.dotDotDotToken) { + if (Le.kind === 219) { + const ri = t.createParameterDeclaration( + /*modifiers*/ + void 0, + t.createToken( + 26 + /* DotDotDotToken */ + ), + t.createUniqueName( + "args", + 8 + /* ReservedInNestedScopes */ + ) + ); + At.push(ri); + } + break; + } + const Zn = t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode( + ln.name, + 8 + /* ReservedInNestedScopes */ + ) + ); + At.push(Zn); + } + const vr = t.createNodeArray(At); + return ot(vr, Le.parameters), vr; + } + function Pr(Le, At) { + const vr = OA(Le.parameters) ? void 0 : cc(Le.parameters, X, e); + i(); + const Zn = Zo(Le, ps).type, ri = u < 2 ? zt(Zn) : void 0, mi = Le.kind === 219, Ps = C, Yt = c.hasNodeCheckFlag( + Le, + 512 + /* CaptureArguments */ + ) && !C; + Yt && (C = t.createUniqueName("arguments")); + let Ca; + if (vr) + if (mi) { + const Ne = []; + E.assert(At.length <= Le.parameters.length); + for (let et = 0; et < Le.parameters.length; et++) { + E.assert(et < At.length); + const lt = Le.parameters[et], jt = At[et]; + if (E.assertNode(jt.name, Re), lt.initializer || lt.dotDotDotToken) { + E.assert(et === At.length - 1), Ne.push(t.createSpreadElement(jt.name)); + break; + } + Ne.push(jt.name); + } + Ca = t.createArrayLiteralExpression(Ne); + } else + Ca = t.createIdentifier("arguments"); + const $e = h; + h = /* @__PURE__ */ new Set(); + for (const Ne of Le.parameters) + Ie(Ne, h); + const nt = S, te = T; + mi || (S = /* @__PURE__ */ new Set(), T = !1); + const rt = U(); + let re = Vt(Le.body); + re = t.updateBlock(re, t.mergeLexicalEnvironment(re.statements, s())); + let Ee; + if (mi) { + if (Ee = n().createAwaiterHelper( + rt, + Ca, + ri, + vr, + re + ), Yt) { + const Ne = t.converters.convertToFunctionBlock(Ee); + Ee = t.updateBlock(Ne, t.mergeLexicalEnvironment(Ne.statements, [nr()])); + } + } else { + const Ne = []; + Ne.push( + t.createReturnStatement( + n().createAwaiterHelper( + rt, + Ca, + ri, + vr, + re + ) + ) + ); + const et = u >= 2 && (c.hasNodeCheckFlag( + Le, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + Le, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )); + if (et && (jr(), S.size)) { + const jt = $O(t, c, Le, S); + D[ja(jt)] = !0, Pg(Ne, [jt]); + } + Yt && Pg(Ne, [nr()]); + const lt = t.createBlock( + Ne, + /*multiLine*/ + !0 + ); + ot(lt, Le.body), et && T && (c.hasNodeCheckFlag( + Le, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? ox(lt, j5) : c.hasNodeCheckFlag( + Le, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && ox(lt, R5)), Ee = lt; + } + return h = $e, mi || (S = nt, T = te, C = Ps), Ee; + } + function Vt(Le, At) { + return ms(Le) ? t.updateBlock(Le, Ar(Le.statements, Z, hi, At)) : t.converters.convertToFunctionBlock(E.checkDefined(Ge(Le, Z, qI))); + } + function zt(Le) { + const At = Le && e3(Le); + if (At && l_(At)) { + const vr = c.getTypeReferenceSerializationKind(At); + if (vr === 1 || vr === 0) + return At; + } + } + function jr() { + d & 1 || (d |= 1, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ), e.enableEmitNotification( + 263 + /* ClassDeclaration */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 243 + /* VariableStatement */ + )); + } + function ci(Le, At, vr) { + if (d & 1 && wr(At)) { + const ln = (c.hasNodeCheckFlag( + At, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) ? 128 : 0) | (c.hasNodeCheckFlag( + At, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? 256 : 0); + if (ln !== g) { + const Zn = g; + g = ln, O(Le, At, vr), g = Zn; + return; + } + } else if (d && D[ja(At)]) { + const ln = g; + g = 0, O(Le, At, vr), g = ln; + return; + } + O(Le, At, vr); + } + function Xt(Le, At) { + return At = j(Le, At), Le === 1 && g ? Ai(At) : At; + } + function Ai(Le) { + switch (Le.kind) { + case 211: + return _s(Le); + case 212: + return $n(Le); + case 213: + return os(Le); + } + return Le; + } + function _s(Le) { + return Le.expression.kind === 108 ? ot( + t.createPropertyAccessExpression( + t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + Le.name + ), + Le + ) : Le; + } + function $n(Le) { + return Le.expression.kind === 108 ? Ss( + Le.argumentExpression, + Le + ) : Le; + } + function os(Le) { + const At = Le.expression; + if (f_(At)) { + const vr = Dn(At) ? _s(At) : $n(At); + return t.createCallExpression( + t.createPropertyAccessExpression(vr, "call"), + /*typeArguments*/ + void 0, + [ + t.createThis(), + ...Le.arguments + ] + ); + } + return Le; + } + function wr(Le) { + const At = Le.kind; + return At === 263 || At === 176 || At === 174 || At === 177 || At === 178; + } + function Ss(Le, At) { + return g & 256 ? ot( + t.createPropertyAccessExpression( + t.createCallExpression( + t.createUniqueName( + "_superIndex", + 48 + /* FileLevel */ + ), + /*typeArguments*/ + void 0, + [Le] + ), + "value" + ), + At + ) : ot( + t.createCallExpression( + t.createUniqueName( + "_superIndex", + 48 + /* FileLevel */ + ), + /*typeArguments*/ + void 0, + [Le] + ), + At + ); + } + } + function $O(e, t, n, i) { + const s = t.hasNodeCheckFlag( + n, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ), o = []; + return i.forEach((c, _) => { + const u = Pi(_), d = []; + d.push(e.createPropertyAssignment( + "get", + e.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /* parameters */ + [], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + Kr( + e.createPropertyAccessExpression( + Kr( + e.createSuper(), + 8 + /* NoSubstitution */ + ), + u + ), + 8 + /* NoSubstitution */ + ) + ) + )), s && d.push( + e.createPropertyAssignment( + "set", + e.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /* parameters */ + [ + e.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "v", + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) + ], + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + e.createAssignment( + Kr( + e.createPropertyAccessExpression( + Kr( + e.createSuper(), + 8 + /* NoSubstitution */ + ), + u + ), + 8 + /* NoSubstitution */ + ), + e.createIdentifier("v") + ) + ) + ) + ), o.push( + e.createPropertyAssignment( + u, + e.createObjectLiteralExpression(d) + ) + ); + }), e.createVariableStatement( + /*modifiers*/ + void 0, + e.createVariableDeclarationList( + [ + e.createVariableDeclaration( + e.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + e.createCallExpression( + e.createPropertyAccessExpression( + e.createIdentifier("Object"), + "create" + ), + /*typeArguments*/ + void 0, + [ + e.createNull(), + e.createObjectLiteralExpression( + o, + /*multiLine*/ + !0 + ) + ] + ) + ) + ], + 2 + /* Const */ + ) + ); + } + function Yne(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistVariableDeclaration: o + } = e, c = e.getEmitResolver(), _ = e.getCompilerOptions(), u = pa(_), d = e.onEmitNode; + e.onEmitNode = Ps; + const g = e.onSubstituteNode; + e.onSubstituteNode = ws; + let h = !1, S, T, C, D = 0, P = 0, O, j, F, V; + const L = []; + return Pd(e, K); + function $(re, Ee) { + return P !== (P & ~re | Ee); + } + function U(re, Ee) { + const Ne = P; + return P = (P & ~re | Ee) & 3, Ne; + } + function G(re) { + P = re; + } + function ce(re) { + j = Tr( + j, + t.createVariableDeclaration(re) + ); + } + function K(re) { + if (re.isDeclarationFile) + return re; + O = re; + const Ee = Xe(re); + return vh(Ee, e.readEmitHelpers()), O = void 0, j = void 0, Ee; + } + function X(re) { + return fe( + re, + /*expressionResultIsUnused*/ + !1 + ); + } + function Z(re) { + return fe( + re, + /*expressionResultIsUnused*/ + !0 + ); + } + function oe(re) { + if (re.kind !== 134) + return re; + } + function ne(re, Ee, Ne, et) { + if ($(Ne, et)) { + const lt = U(Ne, et), jt = re(Ee); + return G(lt), jt; + } + return re(Ee); + } + function pe(re) { + return gr(re, X, e); + } + function fe(re, Ee) { + if (!(re.transformFlags & 128)) + return re; + switch (re.kind) { + case 223: + return H(re); + case 229: + return ae(re); + case 253: + return le(re); + case 256: + return Ae(re); + case 210: + return de(re); + case 226: + return ye(re, Ee); + case 355: + return Fe(re, Ee); + case 299: + return Qe(re); + case 243: + return Ke(re); + case 260: + return Be(re); + case 246: + case 247: + case 249: + return ne( + pe, + re, + 0, + 2 + /* IterationStatementIncludes */ + ); + case 250: + return Kt( + re, + /*outermostLabeledStatement*/ + void 0 + ); + case 248: + return ne( + Wt, + re, + 0, + 2 + /* IterationStatementIncludes */ + ); + case 222: + return nr(re); + case 176: + return ne( + _s, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 174: + return ne( + wr, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 177: + return ne( + $n, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 178: + return ne( + os, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 262: + return ne( + Ss, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 218: + return ne( + At, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + case 219: + return ne( + Le, + re, + 2, + 0 + /* ArrowFunctionIncludes */ + ); + case 169: + return Xt(re); + case 244: + return ve(re); + case 217: + return De(re, Ee); + case 215: + return Ie(re); + case 211: + return F && Dn(re) && re.expression.kind === 108 && F.add(re.name.escapedText), gr(re, X, e); + case 212: + return F && re.expression.kind === 108 && (V = !0), gr(re, X, e); + case 263: + case 231: + return ne( + pe, + re, + 2, + 1 + /* ClassOrFunctionIncludes */ + ); + default: + return gr(re, X, e); + } + } + function H(re) { + return T & 2 && T & 1 ? kn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper(Ge(re.expression, X, ct)) + ), + /*location*/ + re + ), + re + ) : gr(re, X, e); + } + function ae(re) { + if (T & 2 && T & 1) { + if (re.asteriskToken) { + const Ee = Ge(E.checkDefined(re.expression), X, ct); + return kn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper( + t.updateYieldExpression( + re, + re.asteriskToken, + ot( + n().createAsyncDelegatorHelper( + ot( + n().createAsyncValuesHelper(Ee), + Ee + ) + ), + Ee + ) + ) + ) + ), + re + ), + re + ); + } + return kn( + ot( + t.createYieldExpression( + /*asteriskToken*/ + void 0, + zt( + re.expression ? Ge(re.expression, X, ct) : t.createVoidZero() + ) + ), + re + ), + re + ); + } + return gr(re, X, e); + } + function le(re) { + return T & 2 && T & 1 ? t.updateReturnStatement( + re, + zt( + re.expression ? Ge(re.expression, X, ct) : t.createVoidZero() + ) + ) : gr(re, X, e); + } + function Ae(re) { + if (T & 2) { + const Ee = Qj(re); + return Ee.kind === 250 && Ee.awaitModifier ? Kt(Ee, re) : t.restoreEnclosingLabel(Ge(Ee, X, hi, t.liftToBlock), re); + } + return gr(re, X, e); + } + function ge(re) { + let Ee; + const Ne = []; + for (const et of re) + if (et.kind === 305) { + Ee && (Ne.push(t.createObjectLiteralExpression(Ee)), Ee = void 0); + const lt = et.expression; + Ne.push(Ge(lt, X, ct)); + } else + Ee = Tr( + Ee, + et.kind === 303 ? t.createPropertyAssignment(et.name, Ge(et.initializer, X, ct)) : Ge(et, X, lh) + ); + return Ee && Ne.push(t.createObjectLiteralExpression(Ee)), Ne; + } + function de(re) { + if (re.transformFlags & 65536) { + const Ee = ge(re.properties); + Ee.length && Ee[0].kind !== 210 && Ee.unshift(t.createObjectLiteralExpression()); + let Ne = Ee[0]; + if (Ee.length > 1) { + for (let et = 1; et < Ee.length; et++) + Ne = n().createAssignHelper([Ne, Ee[et]]); + return Ne; + } else + return n().createAssignHelper(Ee); + } + return gr(re, X, e); + } + function ve(re) { + return gr(re, Z, e); + } + function De(re, Ee) { + return gr(re, Ee ? Z : X, e); + } + function Xe(re) { + const Ee = U( + 2, + zj(re, _) ? 0 : 1 + /* SourceFileIncludes */ + ); + h = !1; + const Ne = gr(re, X, e), et = Hi( + Ne.statements, + j && [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(j) + ) + ] + ), lt = t.updateSourceFile(Ne, ot(t.createNodeArray(et), re.statements)); + return G(Ee), lt; + } + function Ie(re) { + return _W( + e, + re, + X, + O, + ce, + 0 + /* LiftRestriction */ + ); + } + function ye(re, Ee) { + return p0(re) && mA(re.left) ? mS( + re, + X, + e, + 1, + !Ee + ) : re.operatorToken.kind === 28 ? t.updateBinaryExpression( + re, + Ge(re.left, Z, ct), + re.operatorToken, + Ge(re.right, Ee ? Z : X, ct) + ) : gr(re, X, e); + } + function Fe(re, Ee) { + if (Ee) + return gr(re, Z, e); + let Ne; + for (let lt = 0; lt < re.elements.length; lt++) { + const jt = re.elements[lt], be = Ge(jt, lt < re.elements.length - 1 ? Z : X, ct); + (Ne || be !== jt) && (Ne || (Ne = re.elements.slice(0, lt)), Ne.push(be)); + } + const et = Ne ? ot(t.createNodeArray(Ne), re.elements) : re.elements; + return t.updateCommaListExpression(re, et); + } + function Qe(re) { + if (re.variableDeclaration && Ts(re.variableDeclaration.name) && re.variableDeclaration.name.transformFlags & 65536) { + const Ee = t.getGeneratedNameForNode(re.variableDeclaration.name), Ne = t.updateVariableDeclaration( + re.variableDeclaration, + re.variableDeclaration.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ee + ), et = zb( + Ne, + X, + e, + 1 + /* ObjectRest */ + ); + let lt = Ge(re.block, X, ms); + return ut(et) && (lt = t.updateBlock(lt, [ + t.createVariableStatement( + /*modifiers*/ + void 0, + et + ), + ...lt.statements + ])), t.updateCatchClause( + re, + t.updateVariableDeclaration( + re.variableDeclaration, + Ee, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + lt + ); + } + return gr(re, X, e); + } + function Ke(re) { + if (Vn( + re, + 32 + /* Export */ + )) { + const Ee = h; + h = !0; + const Ne = gr(re, X, e); + return h = Ee, Ne; + } + return gr(re, X, e); + } + function Be(re) { + if (h) { + const Ee = h; + h = !1; + const Ne = at( + re, + /*exportedVariableStatement*/ + !0 + ); + return h = Ee, Ne; + } + return at( + re, + /*exportedVariableStatement*/ + !1 + ); + } + function at(re, Ee) { + return Ts(re.name) && re.name.transformFlags & 65536 ? zb( + re, + X, + e, + 1, + /*rval*/ + void 0, + Ee + ) : gr(re, X, e); + } + function Wt(re) { + return t.updateForStatement( + re, + Ge(re.initializer, Z, tp), + Ge(re.condition, X, ct), + Ge(re.incrementor, Z, ct), + Zu(re.statement, X, e) + ); + } + function nr(re) { + return gr(re, Z, e); + } + function Kt(re, Ee) { + const Ne = U( + 0, + 2 + /* IterationStatementIncludes */ + ); + (re.initializer.transformFlags & 65536 || YE(re.initializer) && mA(re.initializer)) && (re = Pr(re)); + const et = re.awaitModifier ? jr(re, Ee, Ne) : t.restoreEnclosingLabel(gr(re, X, e), Ee); + return G(Ne), et; + } + function Pr(re) { + const Ee = Ja(re.initializer); + if (Il(Ee) || YE(Ee)) { + let Ne, et; + const lt = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), jt = [XJ(t, Ee, lt)]; + return ms(re.statement) ? (Bn(jt, re.statement.statements), Ne = re.statement, et = re.statement.statements) : re.statement && (Tr(jt, re.statement), Ne = re.statement, et = re.statement), t.updateForOfStatement( + re, + re.awaitModifier, + ot( + t.createVariableDeclarationList( + [ + ot(t.createVariableDeclaration(lt), re.initializer) + ], + 1 + /* Let */ + ), + re.initializer + ), + re.expression, + ot( + t.createBlock( + ot(t.createNodeArray(jt), et), + /*multiLine*/ + !0 + ), + Ne + ) + ); + } + return re; + } + function Vt(re, Ee, Ne) { + const et = t.createTempVariable(o), lt = t.createAssignment(et, Ee), jt = t.createExpressionStatement(lt); + aa(jt, re.expression); + const be = t.createAssignment(Ne, t.createFalse()), ft = t.createExpressionStatement(be); + aa(ft, re.expression); + const bt = [jt, ft], kt = XJ(t, re.initializer, et); + bt.push(Ge(kt, X, hi)); + let yt, Ut; + const W = Zu(re.statement, X, e); + return ms(W) ? (Bn(bt, W.statements), yt = W, Ut = W.statements) : bt.push(W), ot( + t.createBlock( + ot(t.createNodeArray(bt), Ut), + /*multiLine*/ + !0 + ), + yt + ); + } + function zt(re) { + return T & 1 ? t.createYieldExpression( + /*asteriskToken*/ + void 0, + n().createAwaitHelper(re) + ) : t.createAwaitExpression(re); + } + function jr(re, Ee, Ne) { + const et = Ge(re.expression, X, ct), lt = Re(et) ? t.getGeneratedNameForNode(et) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), jt = Re(et) ? t.getGeneratedNameForNode(lt) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), be = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), ft = t.createTempVariable(o), bt = t.createUniqueName("e"), kt = t.getGeneratedNameForNode(bt), yt = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Ut = ot(n().createAsyncValuesHelper(et), re.expression), W = t.createCallExpression( + t.createPropertyAccessExpression(lt, "next"), + /*typeArguments*/ + void 0, + [] + ), je = t.createPropertyAccessExpression(jt, "done"), st = t.createPropertyAccessExpression(jt, "value"), z = t.createFunctionCallCall(yt, lt, []); + o(bt), o(yt); + const he = Ne & 2 ? t.inlineExpressions([t.createAssignment(bt, t.createVoidZero()), Ut]) : Ut, q = Kr( + ot( + t.createForStatement( + /*initializer*/ + Kr( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + be, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createTrue() + ), + ot(t.createVariableDeclaration( + lt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + he + ), re.expression), + t.createVariableDeclaration(jt) + ]), + re.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + t.inlineExpressions([ + t.createAssignment(jt, zt(W)), + t.createAssignment(ft, je), + t.createLogicalNot(ft) + ]), + /*incrementor*/ + t.createAssignment(be, t.createTrue()), + /*statement*/ + Vt(re, st, be) + ), + /*location*/ + re + ), + 512 + /* NoTokenTrailingSourceMaps */ + ); + return kn(q, re), t.createTryStatement( + t.createBlock([ + t.restoreEnclosingLabel( + q, + Ee + ) + ]), + t.createCatchClause( + t.createVariableDeclaration(kt), + Kr( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + bt, + t.createObjectLiteralExpression([ + t.createPropertyAssignment("error", kt) + ]) + ) + ) + ]), + 1 + /* SingleLine */ + ) + ), + t.createBlock([ + t.createTryStatement( + /*tryBlock*/ + t.createBlock([ + Kr( + t.createIfStatement( + t.createLogicalAnd( + t.createLogicalAnd( + t.createLogicalNot(be), + t.createLogicalNot(ft) + ), + t.createAssignment( + yt, + t.createPropertyAccessExpression(lt, "return") + ) + ), + t.createExpressionStatement(zt(z)) + ), + 1 + /* SingleLine */ + ) + ]), + /*catchClause*/ + void 0, + /*finallyBlock*/ + Kr( + t.createBlock([ + Kr( + t.createIfStatement( + bt, + t.createThrowStatement( + t.createPropertyAccessExpression(bt, "error") + ) + ), + 1 + /* SingleLine */ + ) + ]), + 1 + /* SingleLine */ + ) + ) + ]) + ); + } + function ci(re) { + return E.assertNode(re, ji), Xt(re); + } + function Xt(re) { + return C?.has(re) ? t.updateParameterDeclaration( + re, + /*modifiers*/ + void 0, + re.dotDotDotToken, + Ts(re.name) ? t.getGeneratedNameForNode(re) : re.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) : re.transformFlags & 65536 ? t.updateParameterDeclaration( + re, + /*modifiers*/ + void 0, + re.dotDotDotToken, + t.getGeneratedNameForNode(re), + /*questionToken*/ + void 0, + /*type*/ + void 0, + Ge(re.initializer, X, ct) + ) : gr(re, X, e); + } + function Ai(re) { + let Ee; + for (const Ne of re.parameters) + Ee ? Ee.add(Ne) : Ne.transformFlags & 65536 && (Ee = /* @__PURE__ */ new Set()); + return Ee; + } + function _s(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateConstructorDeclaration( + re, + re.modifiers, + cc(re.parameters, ci, e), + Zn(re) + ); + return T = Ee, C = Ne, et; + } + function $n(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateGetAccessorDeclaration( + re, + re.modifiers, + Ge(re.name, X, Rc), + cc(re.parameters, ci, e), + /*type*/ + void 0, + Zn(re) + ); + return T = Ee, C = Ne, et; + } + function os(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateSetAccessorDeclaration( + re, + re.modifiers, + Ge(re.name, X, Rc), + cc(re.parameters, ci, e), + Zn(re) + ); + return T = Ee, C = Ne, et; + } + function wr(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateMethodDeclaration( + re, + T & 1 ? Ar(re.modifiers, oe, Lo) : re.modifiers, + T & 2 ? void 0 : re.asteriskToken, + Ge(re.name, X, Rc), + Ge( + /*node*/ + void 0, + X, + xy + ), + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? vr(re) : cc(re.parameters, ci, e), + /*type*/ + void 0, + T & 2 && T & 1 ? ln(re) : Zn(re) + ); + return T = Ee, C = Ne, et; + } + function Ss(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateFunctionDeclaration( + re, + T & 1 ? Ar(re.modifiers, oe, Qs) : re.modifiers, + T & 2 ? void 0 : re.asteriskToken, + re.name, + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? vr(re) : cc(re.parameters, ci, e), + /*type*/ + void 0, + T & 2 && T & 1 ? ln(re) : Zn(re) + ); + return T = Ee, C = Ne, et; + } + function Le(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateArrowFunction( + re, + re.modifiers, + /*typeParameters*/ + void 0, + cc(re.parameters, ci, e), + /*type*/ + void 0, + re.equalsGreaterThanToken, + Zn(re) + ); + return T = Ee, C = Ne, et; + } + function At(re) { + const Ee = T, Ne = C; + T = jc(re), C = Ai(re); + const et = t.updateFunctionExpression( + re, + T & 1 ? Ar(re.modifiers, oe, Qs) : re.modifiers, + T & 2 ? void 0 : re.asteriskToken, + re.name, + /*typeParameters*/ + void 0, + T & 2 && T & 1 ? vr(re) : cc(re.parameters, ci, e), + /*type*/ + void 0, + T & 2 && T & 1 ? ln(re) : Zn(re) + ); + return T = Ee, C = Ne, et; + } + function vr(re) { + if (OA(re.parameters)) + return cc(re.parameters, X, e); + const Ee = []; + for (const et of re.parameters) { + if (et.initializer || et.dotDotDotToken) + break; + const lt = t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode( + et.name, + 8 + /* ReservedInNestedScopes */ + ) + ); + Ee.push(lt); + } + const Ne = t.createNodeArray(Ee); + return ot(Ne, re.parameters), Ne; + } + function ln(re) { + const Ee = OA(re.parameters) ? void 0 : cc(re.parameters, X, e); + i(); + const Ne = F, et = V; + F = /* @__PURE__ */ new Set(), V = !1; + const lt = []; + let jt = t.updateBlock(re.body, Ar(re.body.statements, X, hi)); + jt = t.updateBlock(jt, t.mergeLexicalEnvironment(jt.statements, ri(s(), re))); + const be = t.createReturnStatement( + n().createAsyncGeneratorHelper( + t.createFunctionExpression( + /*modifiers*/ + void 0, + t.createToken( + 42 + /* AsteriskToken */ + ), + re.name && t.getGeneratedNameForNode(re.name), + /*typeParameters*/ + void 0, + Ee ?? [], + /*type*/ + void 0, + jt + ), + !!(P & 1) + ) + ), ft = u >= 2 && (c.hasNodeCheckFlag( + re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) || c.hasNodeCheckFlag( + re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + )); + if (ft) { + mi(); + const kt = $O(t, c, re, F); + L[ja(kt)] = !0, Pg(lt, [kt]); + } + lt.push(be); + const bt = t.updateBlock(re.body, lt); + return ft && V && (c.hasNodeCheckFlag( + re, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? ox(bt, j5) : c.hasNodeCheckFlag( + re, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) && ox(bt, R5)), F = Ne, V = et, bt; + } + function Zn(re) { + i(); + let Ee = 0; + const Ne = [], et = Ge(re.body, X, qI) ?? t.createBlock([]); + ms(et) && (Ee = t.copyPrologue( + et.statements, + Ne, + /*ensureUseStrict*/ + !1, + X + )), Bn(Ne, ri( + /*statements*/ + void 0, + re + )); + const lt = s(); + if (Ee > 0 || ut(Ne) || ut(lt)) { + const jt = t.converters.convertToFunctionBlock( + et, + /*multiLine*/ + !0 + ); + return Pg(Ne, lt), Bn(Ne, jt.statements.slice(Ee)), t.updateBlock(jt, ot(t.createNodeArray(Ne), jt.statements)); + } + return et; + } + function ri(re, Ee) { + let Ne = !1; + for (const et of Ee.parameters) + if (Ne) { + if (Ts(et.name)) { + if (et.name.elements.length > 0) { + const lt = zb( + et, + X, + e, + 0, + t.getGeneratedNameForNode(et) + ); + if (ut(lt)) { + const jt = t.createVariableDeclarationList(lt), be = t.createVariableStatement( + /*modifiers*/ + void 0, + jt + ); + Kr( + be, + 2097152 + /* CustomPrologue */ + ), re = Tr(re, be); + } + } else if (et.initializer) { + const lt = t.getGeneratedNameForNode(et), jt = Ge(et.initializer, X, ct), be = t.createAssignment(lt, jt), ft = t.createExpressionStatement(be); + Kr( + ft, + 2097152 + /* CustomPrologue */ + ), re = Tr(re, ft); + } + } else if (et.initializer) { + const lt = t.cloneNode(et.name); + ot(lt, et.name), Kr( + lt, + 96 + /* NoSourceMap */ + ); + const jt = Ge(et.initializer, X, ct); + cm( + jt, + 3168 + /* NoComments */ + ); + const be = t.createAssignment(lt, jt); + ot(be, et), Kr( + be, + 3072 + /* NoComments */ + ); + const ft = t.createBlock([t.createExpressionStatement(be)]); + ot(ft, et), Kr( + ft, + 3905 + /* NoComments */ + ); + const bt = t.createTypeCheck(t.cloneNode(et.name), "undefined"), kt = t.createIfStatement(bt, ft); + mu(kt), ot(kt, et), Kr( + kt, + 2101056 + /* NoComments */ + ), re = Tr(re, kt); + } + } else if (et.transformFlags & 65536) { + Ne = !0; + const lt = zb( + et, + X, + e, + 1, + t.getGeneratedNameForNode(et), + /*hoistTempVariables*/ + !1, + /*skipInitializer*/ + !0 + ); + if (ut(lt)) { + const jt = t.createVariableDeclarationList(lt), be = t.createVariableStatement( + /*modifiers*/ + void 0, + jt + ); + Kr( + be, + 2097152 + /* CustomPrologue */ + ), re = Tr(re, be); + } + } + return re; + } + function mi() { + S & 1 || (S |= 1, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 211 + /* PropertyAccessExpression */ + ), e.enableSubstitution( + 212 + /* ElementAccessExpression */ + ), e.enableEmitNotification( + 263 + /* ClassDeclaration */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 243 + /* VariableStatement */ + )); + } + function Ps(re, Ee, Ne) { + if (S & 1 && te(Ee)) { + const et = (c.hasNodeCheckFlag( + Ee, + 128 + /* MethodWithSuperPropertyAccessInAsync */ + ) ? 128 : 0) | (c.hasNodeCheckFlag( + Ee, + 256 + /* MethodWithSuperPropertyAssignmentInAsync */ + ) ? 256 : 0); + if (et !== D) { + const lt = D; + D = et, d(re, Ee, Ne), D = lt; + return; + } + } else if (S && L[ja(Ee)]) { + const et = D; + D = 0, d(re, Ee, Ne), D = et; + return; + } + d(re, Ee, Ne); + } + function ws(re, Ee) { + return Ee = g(re, Ee), re === 1 && D ? Yt(Ee) : Ee; + } + function Yt(re) { + switch (re.kind) { + case 211: + return Ca(re); + case 212: + return $e(re); + case 213: + return nt(re); + } + return re; + } + function Ca(re) { + return re.expression.kind === 108 ? ot( + t.createPropertyAccessExpression( + t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ), + re.name + ), + re + ) : re; + } + function $e(re) { + return re.expression.kind === 108 ? rt( + re.argumentExpression, + re + ) : re; + } + function nt(re) { + const Ee = re.expression; + if (f_(Ee)) { + const Ne = Dn(Ee) ? Ca(Ee) : $e(Ee); + return t.createCallExpression( + t.createPropertyAccessExpression(Ne, "call"), + /*typeArguments*/ + void 0, + [ + t.createThis(), + ...re.arguments + ] + ); + } + return re; + } + function te(re) { + const Ee = re.kind; + return Ee === 263 || Ee === 176 || Ee === 174 || Ee === 177 || Ee === 178; + } + function rt(re, Ee) { + return D & 256 ? ot( + t.createPropertyAccessExpression( + t.createCallExpression( + t.createIdentifier("_superIndex"), + /*typeArguments*/ + void 0, + [re] + ), + "value" + ), + Ee + ) : ot( + t.createCallExpression( + t.createIdentifier("_superIndex"), + /*typeArguments*/ + void 0, + [re] + ), + Ee + ); + } + } + function Zne(e) { + const t = e.factory; + return Pd(e, n); + function n(o) { + return o.isDeclarationFile ? o : gr(o, i, e); + } + function i(o) { + if (!(o.transformFlags & 64)) + return o; + switch (o.kind) { + case 299: + return s(o); + default: + return gr(o, i, e); + } + } + function s(o) { + return o.variableDeclaration ? gr(o, i, e) : t.updateCatchClause( + o, + t.createVariableDeclaration(t.createTempVariable( + /*recordTempVariable*/ + void 0 + )), + Ge(o.block, i, ms) + ); + } + } + function Kne(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e; + return Pd(e, i); + function i(C) { + return C.isDeclarationFile ? C : gr(C, s, e); + } + function s(C) { + if (!(C.transformFlags & 32)) + return C; + switch (C.kind) { + case 213: { + const D = u( + C, + /*captureThisArg*/ + !1 + ); + return E.assertNotNode(D, bx), D; + } + case 211: + case 212: + if (fu(C)) { + const D = g( + C, + /*captureThisArg*/ + !1, + /*isDelete*/ + !1 + ); + return E.assertNotNode(D, bx), D; + } + return gr(C, s, e); + case 226: + return C.operatorToken.kind === 61 ? S(C) : gr(C, s, e); + case 220: + return T(C); + default: + return gr(C, s, e); + } + } + function o(C) { + E.assertNotNode(C, JI); + const D = [C]; + for (; !C.questionDotToken && !Ob(C); ) + C = Is(Xp(C.expression), fu), E.assertNotNode(C, JI), D.unshift(C); + return { expression: C.expression, chain: D }; + } + function c(C, D, P) { + const O = d(C.expression, D, P); + return bx(O) ? t.createSyntheticReferenceExpression(t.updateParenthesizedExpression(C, O.expression), O.thisArg) : t.updateParenthesizedExpression(C, O); + } + function _(C, D, P) { + if (fu(C)) + return g(C, D, P); + let O = Ge(C.expression, s, ct); + E.assertNotNode(O, bx); + let j; + return D && (Jb(O) ? j = O : (j = t.createTempVariable(n), O = t.createAssignment(j, O))), O = C.kind === 211 ? t.updatePropertyAccessExpression(C, O, Ge(C.name, s, Re)) : t.updateElementAccessExpression(C, O, Ge(C.argumentExpression, s, ct)), j ? t.createSyntheticReferenceExpression(O, j) : O; + } + function u(C, D) { + if (fu(C)) + return g( + C, + D, + /*isDelete*/ + !1 + ); + if (Qu(C.expression) && fu(Ja(C.expression))) { + const P = c( + C.expression, + /*captureThisArg*/ + !0, + /*isDelete*/ + !1 + ), O = Ar(C.arguments, s, ct); + return bx(P) ? ot(t.createFunctionCallCall(P.expression, P.thisArg, O), C) : t.updateCallExpression( + C, + P, + /*typeArguments*/ + void 0, + O + ); + } + return gr(C, s, e); + } + function d(C, D, P) { + switch (C.kind) { + case 217: + return c(C, D, P); + case 211: + case 212: + return _(C, D, P); + case 213: + return u(C, D); + default: + return Ge(C, s, ct); + } + } + function g(C, D, P) { + const { expression: O, chain: j } = o(C), F = d( + Xp(O), + J2(j[0]), + /*isDelete*/ + !1 + ); + let V = bx(F) ? F.thisArg : void 0, L = bx(F) ? F.expression : F, $ = t.restoreOuterExpressions( + O, + L, + 8 + /* PartiallyEmittedExpressions */ + ); + Jb(L) || (L = t.createTempVariable(n), $ = t.createAssignment(L, $)); + let U = L, G; + for (let K = 0; K < j.length; K++) { + const X = j[K]; + switch (X.kind) { + case 211: + case 212: + K === j.length - 1 && D && (Jb(U) ? G = U : (G = t.createTempVariable(n), U = t.createAssignment(G, U))), U = X.kind === 211 ? t.createPropertyAccessExpression(U, Ge(X.name, s, Re)) : t.createElementAccessExpression(U, Ge(X.argumentExpression, s, ct)); + break; + case 213: + K === 0 && V ? (Fo(V) || (V = t.cloneNode(V), cm( + V, + 3072 + /* NoComments */ + )), U = t.createFunctionCallCall( + U, + V.kind === 108 ? t.createThis() : V, + Ar(X.arguments, s, ct) + )) : U = t.createCallExpression( + U, + /*typeArguments*/ + void 0, + Ar(X.arguments, s, ct) + ); + break; + } + kn(U, X); + } + const ce = P ? t.createConditionalExpression( + h( + $, + L, + /*invert*/ + !0 + ), + /*questionToken*/ + void 0, + t.createTrue(), + /*colonToken*/ + void 0, + t.createDeleteExpression(U) + ) : t.createConditionalExpression( + h( + $, + L, + /*invert*/ + !0 + ), + /*questionToken*/ + void 0, + t.createVoidZero(), + /*colonToken*/ + void 0, + U + ); + return ot(ce, C), G ? t.createSyntheticReferenceExpression(ce, G) : ce; + } + function h(C, D, P) { + return t.createBinaryExpression( + t.createBinaryExpression( + C, + t.createToken( + P ? 37 : 38 + /* ExclamationEqualsEqualsToken */ + ), + t.createNull() + ), + t.createToken( + P ? 57 : 56 + /* AmpersandAmpersandToken */ + ), + t.createBinaryExpression( + D, + t.createToken( + P ? 37 : 38 + /* ExclamationEqualsEqualsToken */ + ), + t.createVoidZero() + ) + ); + } + function S(C) { + let D = Ge(C.left, s, ct), P = D; + return Jb(D) || (P = t.createTempVariable(n), D = t.createAssignment(P, D)), ot( + t.createConditionalExpression( + h(D, P), + /*questionToken*/ + void 0, + P, + /*colonToken*/ + void 0, + Ge(C.right, s, ct) + ), + C + ); + } + function T(C) { + return fu(Ja(C.expression)) ? kn(d( + C.expression, + /*captureThisArg*/ + !1, + /*isDelete*/ + !0 + ), C) : t.updateDeleteExpression(C, Ge(C.expression, s, ct)); + } + } + function eie(e) { + const { + hoistVariableDeclaration: t, + factory: n + } = e; + return Pd(e, i); + function i(c) { + return c.isDeclarationFile ? c : gr(c, s, e); + } + function s(c) { + return c.transformFlags & 16 ? NB(c) ? o(c) : gr(c, s, e) : c; + } + function o(c) { + const _ = c.operatorToken, u = DD(_.kind); + let d = Ja(Ge(c.left, s, __)), g = d; + const h = Ja(Ge(c.right, s, ct)); + if (go(d)) { + const S = Jb(d.expression), T = S ? d.expression : n.createTempVariable(t), C = S ? d.expression : n.createAssignment( + T, + d.expression + ); + if (Dn(d)) + g = n.createPropertyAccessExpression( + T, + d.name + ), d = n.createPropertyAccessExpression( + C, + d.name + ); + else { + const D = Jb(d.argumentExpression), P = D ? d.argumentExpression : n.createTempVariable(t); + g = n.createElementAccessExpression( + T, + P + ), d = n.createElementAccessExpression( + C, + D ? d.argumentExpression : n.createAssignment( + P, + d.argumentExpression + ) + ); + } + } + return n.createBinaryExpression( + d, + u, + n.createParenthesizedExpression( + n.createAssignment( + g, + h + ) + ) + ); + } + } + function tie(e) { + const { + factory: t, + getEmitHelperFactory: n, + hoistVariableDeclaration: i, + startLexicalEnvironment: s, + endLexicalEnvironment: o + } = e; + let c, _, u, d; + return Pd(e, g); + function g(ne) { + if (ne.isDeclarationFile) + return ne; + const pe = Ge(ne, h, yi); + return vh(pe, e.readEmitHelpers()), _ = void 0, c = void 0, u = void 0, pe; + } + function h(ne) { + if (!(ne.transformFlags & 4)) + return ne; + switch (ne.kind) { + case 307: + return S(ne); + case 241: + return T(ne); + case 248: + return C(ne); + case 250: + return D(ne); + case 255: + return O(ne); + default: + return gr(ne, h, e); + } + } + function S(ne) { + const pe = fW(ne.statements); + if (pe) { + s(), c = new XC(), _ = []; + const fe = ove(ne.statements), H = []; + Bn(H, AA(ne.statements, h, hi, 0, fe)); + let ae = fe; + for (; ae < ne.statements.length; ) { + const ge = ne.statements[ae]; + if (nie(ge) !== 0) { + ae > fe && Bn(H, Ar(ne.statements, h, hi, fe, ae - fe)); + break; + } + ae++; + } + E.assert(ae < ne.statements.length, "Should have encountered at least one 'using' statement."); + const le = Z(), Ae = j(ne.statements, ae, ne.statements.length, le, H); + return c.size && Tr( + H, + t.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + t.createNamedExports(ts(c.values())) + ) + ), Bn(H, o()), _.length && H.push(t.createVariableStatement( + t.createModifiersFromModifierFlags( + 32 + /* Export */ + ), + t.createVariableDeclarationList( + _, + 1 + /* Let */ + ) + )), Bn(H, oe( + Ae, + le, + pe === 2 + /* Async */ + )), d && H.push(t.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !0, + d + )), t.updateSourceFile(ne, H); + } + return gr(ne, h, e); + } + function T(ne) { + const pe = fW(ne.statements); + if (pe) { + const fe = ove(ne.statements), H = Z(); + return t.updateBlock( + ne, + [ + ...AA(ne.statements, h, hi, 0, fe), + ...oe( + j( + ne.statements, + fe, + ne.statements.length, + H, + /*topLevelStatements*/ + void 0 + ), + H, + pe === 2 + /* Async */ + ) + ] + ); + } + return gr(ne, h, e); + } + function C(ne) { + return ne.initializer && cve(ne.initializer) ? Ge( + t.createBlock([ + t.createVariableStatement( + /*modifiers*/ + void 0, + ne.initializer + ), + t.updateForStatement( + ne, + /*initializer*/ + void 0, + ne.condition, + ne.incrementor, + ne.statement + ) + ]), + h, + hi + ) : gr(ne, h, e); + } + function D(ne) { + if (cve(ne.initializer)) { + const pe = ne.initializer, fe = ul(pe.declarations) || t.createVariableDeclaration(t.createTempVariable( + /*recordTempVariable*/ + void 0 + )), H = rie(pe) === 2, ae = t.getGeneratedNameForNode(fe.name), le = t.updateVariableDeclaration( + fe, + fe.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ae + ), Ae = t.createVariableDeclarationList( + [le], + H ? 6 : 4 + /* Using */ + ), ge = t.createVariableStatement( + /*modifiers*/ + void 0, + Ae + ); + return Ge( + t.updateForOfStatement( + ne, + ne.awaitModifier, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration(ae) + ], + 2 + /* Const */ + ), + ne.expression, + ms(ne.statement) ? t.updateBlock(ne.statement, [ + ge, + ...ne.statement.statements + ]) : t.createBlock( + [ + ge, + ne.statement + ], + /*multiLine*/ + !0 + ) + ), + h, + hi + ); + } + return gr(ne, h, e); + } + function P(ne, pe) { + return fW(ne.statements) !== 0 ? OC(ne) ? t.updateCaseClause( + ne, + Ge(ne.expression, h, ct), + j( + ne.statements, + /*start*/ + 0, + ne.statements.length, + pe, + /*topLevelStatements*/ + void 0 + ) + ) : t.updateDefaultClause( + ne, + j( + ne.statements, + /*start*/ + 0, + ne.statements.length, + pe, + /*topLevelStatements*/ + void 0 + ) + ) : gr(ne, h, e); + } + function O(ne) { + const pe = iRe(ne.caseBlock.clauses); + if (pe) { + const fe = Z(); + return oe( + [ + t.updateSwitchStatement( + ne, + Ge(ne.expression, h, ct), + t.updateCaseBlock( + ne.caseBlock, + ne.caseBlock.clauses.map((H) => P(H, fe)) + ) + ) + ], + fe, + pe === 2 + /* Async */ + ); + } + return gr(ne, h, e); + } + function j(ne, pe, fe, H, ae) { + const le = []; + for (let de = pe; de < fe; de++) { + const ve = ne[de], De = nie(ve); + if (De) { + E.assertNode(ve, yc); + const Ie = []; + for (let ye of ve.declarationList.declarations) { + if (!Re(ye.name)) { + Ie.length = 0; + break; + } + Z_(ye) && (ye = sf(e, ye)); + const Fe = Ge(ye.initializer, h, ct) ?? t.createVoidZero(); + Ie.push(t.updateVariableDeclaration( + ye, + ye.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n().createAddDisposableResourceHelper( + H, + Fe, + De === 2 + /* Async */ + ) + )); + } + if (Ie.length) { + const ye = t.createVariableDeclarationList( + Ie, + 2 + /* Const */ + ); + kn(ye, ve.declarationList), ot(ye, ve.declarationList), Ae(t.updateVariableStatement( + ve, + /*modifiers*/ + void 0, + ye + )); + continue; + } + } + const Xe = h(ve); + ss(Xe) ? Xe.forEach(Ae) : Xe && Ae(Xe); + } + return le; + function Ae(de) { + E.assertNode(de, hi), Tr(le, ge(de)); + } + function ge(de) { + if (!ae) return de; + switch (de.kind) { + case 272: + case 271: + case 278: + case 262: + return F(de, ae); + case 277: + return V(de); + case 263: + return U(de); + case 243: + return G(de); + } + return de; + } + } + function F(ne, pe) { + pe.push(ne); + } + function V(ne) { + return ne.isExportEquals ? $(ne) : L(ne); + } + function L(ne) { + if (u) + return ne; + u = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), X( + u, + /*isExport*/ + !0, + "default", + ne + ); + let pe = ne.expression, fe = Bc(pe); + Z_(fe) && (fe = sf( + e, + fe, + /*ignoreEmptyStringLiteral*/ + !1, + "default" + ), pe = t.restoreOuterExpressions(pe, fe)); + const H = t.createAssignment(u, pe); + return t.createExpressionStatement(H); + } + function $(ne) { + if (d) + return ne; + d = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), i(d); + const pe = t.createAssignment(d, ne.expression); + return t.createExpressionStatement(pe); + } + function U(ne) { + if (!ne.name && u) + return ne; + const pe = Vn( + ne, + 32 + /* Export */ + ), fe = Vn( + ne, + 2048 + /* Default */ + ); + let H = t.converters.convertToClassExpression(ne); + return ne.name && (X( + t.getLocalName(ne), + pe && !fe, + /*exportAlias*/ + void 0, + ne + ), H = t.createAssignment(t.getDeclarationName(ne), H), Z_(H) && (H = sf( + e, + H, + /*ignoreEmptyStringLiteral*/ + !1 + )), kn(H, ne), aa(H, ne), el(H, ne)), fe && !u && (u = t.createUniqueName( + "_default", + 56 + /* Optimistic */ + ), X( + u, + /*isExport*/ + !0, + "default", + ne + ), H = t.createAssignment(u, H), Z_(H) && (H = sf( + e, + H, + /*ignoreEmptyStringLiteral*/ + !1, + "default" + )), kn(H, ne)), t.createExpressionStatement(H); + } + function G(ne) { + let pe; + const fe = Vn( + ne, + 32 + /* Export */ + ); + for (const H of ne.declarationList.declarations) + K(H, fe, H), H.initializer && (pe = Tr(pe, ce(H))); + if (pe) { + const H = t.createExpressionStatement(t.inlineExpressions(pe)); + return kn(H, ne), el(H, ne), aa(H, ne), H; + } + } + function ce(ne) { + E.assertIsDefined(ne.initializer); + let pe; + Re(ne.name) ? (pe = t.cloneNode(ne.name), Kr(pe, ua(pe) & -114689)) : pe = t.converters.convertToAssignmentPattern(ne.name); + const fe = t.createAssignment(pe, ne.initializer); + return kn(fe, ne), el(fe, ne), aa(fe, ne), fe; + } + function K(ne, pe, fe) { + if (Ts(ne.name)) + for (const H of ne.name.elements) + ml(H) || K(H, pe, fe); + else + X( + ne.name, + pe, + /*exportAlias*/ + void 0, + fe + ); + } + function X(ne, pe, fe, H) { + const ae = Fo(ne) ? ne : t.cloneNode(ne); + if (pe) { + if (fe === void 0 && !xh(ae)) { + const de = t.createVariableDeclaration(ae); + H && kn(de, H), _.push(de); + return; + } + const le = fe !== void 0 ? ae : void 0, Ae = fe !== void 0 ? fe : ae, ge = t.createExportSpecifier( + /*isTypeOnly*/ + !1, + le, + Ae + ); + H && kn(ge, H), c.set(ae, ge); + } + i(ae); + } + function Z() { + return t.createUniqueName("env"); + } + function oe(ne, pe, fe) { + const H = [], ae = t.createObjectLiteralExpression([ + t.createPropertyAssignment("stack", t.createArrayLiteralExpression()), + t.createPropertyAssignment("error", t.createVoidZero()), + t.createPropertyAssignment("hasError", t.createFalse()) + ]), le = t.createVariableDeclaration( + pe, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ae + ), Ae = t.createVariableDeclarationList( + [le], + 2 + /* Const */ + ), ge = t.createVariableStatement( + /*modifiers*/ + void 0, + Ae + ); + H.push(ge); + const de = t.createBlock( + ne, + /*multiLine*/ + !0 + ), ve = t.createUniqueName("e"), De = t.createCatchClause( + ve, + t.createBlock( + [ + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(pe, "error"), + ve + ) + ), + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(pe, "hasError"), + t.createTrue() + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + let Xe; + if (fe) { + const ye = t.createUniqueName("result"); + Xe = t.createBlock( + [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + ye, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n().createDisposeResourcesHelper(pe) + ) + ], + 2 + /* Const */ + ) + ), + t.createIfStatement(ye, t.createExpressionStatement(t.createAwaitExpression(ye))) + ], + /*multiLine*/ + !0 + ); + } else + Xe = t.createBlock( + [ + t.createExpressionStatement( + n().createDisposeResourcesHelper(pe) + ) + ], + /*multiLine*/ + !0 + ); + const Ie = t.createTryStatement(de, De, Xe); + return H.push(Ie), H; + } + } + function ove(e) { + for (let t = 0; t < e.length; t++) + if (!Kd(e[t]) && !Qw(e[t])) + return t; + return 0; + } + function cve(e) { + return Il(e) && rie(e) !== 0; + } + function rie(e) { + return (e.flags & 7) === 6 ? 2 : (e.flags & 7) === 4 ? 1 : 0; + } + function nRe(e) { + return rie(e.declarationList); + } + function nie(e) { + return yc(e) ? nRe(e) : 0; + } + function fW(e) { + let t = 0; + for (const n of e) { + const i = nie(n); + if (i === 2) return 2; + i > t && (t = i); + } + return t; + } + function iRe(e) { + let t = 0; + for (const n of e) { + const i = fW(n.statements); + if (i === 2) return 2; + i > t && (t = i); + } + return t; + } + function iie(e) { + const { + factory: t, + getEmitHelperFactory: n + } = e, i = e.getCompilerOptions(); + let s, o; + return Pd(e, h); + function c() { + if (o.filenameDeclaration) + return o.filenameDeclaration.name; + const Ie = t.createVariableDeclaration( + t.createUniqueName( + "_jsxFileName", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createStringLiteral(s.fileName) + ); + return o.filenameDeclaration = Ie, o.filenameDeclaration.name; + } + function _(Ie) { + return i.jsx === 5 ? "jsxDEV" : Ie ? "jsxs" : "jsx"; + } + function u(Ie) { + const ye = _(Ie); + return g(ye); + } + function d() { + return g("Fragment"); + } + function g(Ie) { + var ye, Fe; + const Qe = Ie === "createElement" ? o.importSpecifier : _5(o.importSpecifier, i), Ke = (Fe = (ye = o.utilizedImplicitRuntimeImports) == null ? void 0 : ye.get(Qe)) == null ? void 0 : Fe.get(Ie); + if (Ke) + return Ke.name; + o.utilizedImplicitRuntimeImports || (o.utilizedImplicitRuntimeImports = /* @__PURE__ */ new Map()); + let Be = o.utilizedImplicitRuntimeImports.get(Qe); + Be || (Be = /* @__PURE__ */ new Map(), o.utilizedImplicitRuntimeImports.set(Qe, Be)); + const at = t.createUniqueName( + `_${Ie}`, + 112 + /* AllowNameSubstitution */ + ), Wt = t.createImportSpecifier( + /*isTypeOnly*/ + !1, + t.createIdentifier(Ie), + at + ); + return Jee(at, Wt), Be.set(Ie, Wt), at; + } + function h(Ie) { + if (Ie.isDeclarationFile) + return Ie; + s = Ie, o = {}, o.importSpecifier = u5(i, Ie); + let ye = gr(Ie, S, e); + vh(ye, e.readEmitHelpers()); + let Fe = ye.statements; + if (o.filenameDeclaration && (Fe = q2(Fe.slice(), t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [o.filenameDeclaration], + 2 + /* Const */ + ) + ))), o.utilizedImplicitRuntimeImports) { + for (const [Qe, Ke] of ts(o.utilizedImplicitRuntimeImports.entries())) + if (il(Ie)) { + const Be = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamedImports(ts(Ke.values())) + ), + t.createStringLiteral(Qe), + /*attributes*/ + void 0 + ); + yh( + Be, + /*incremental*/ + !1 + ), Fe = q2(Fe.slice(), Be); + } else if (A_(Ie)) { + const Be = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + t.createObjectBindingPattern(ts(Ke.values(), (at) => t.createBindingElement( + /*dotDotDotToken*/ + void 0, + at.propertyName, + at.name + ))), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createCallExpression( + t.createIdentifier("require"), + /*typeArguments*/ + void 0, + [t.createStringLiteral(Qe)] + ) + ) + ], + 2 + /* Const */ + ) + ); + yh( + Be, + /*incremental*/ + !1 + ), Fe = q2(Fe.slice(), Be); + } + } + return Fe !== ye.statements && (ye = t.updateSourceFile(ye, Fe)), o = void 0, ye; + } + function S(Ie) { + return Ie.transformFlags & 2 ? T(Ie) : Ie; + } + function T(Ie) { + switch (Ie.kind) { + case 284: + return j( + Ie, + /*isChild*/ + !1 + ); + case 285: + return F( + Ie, + /*isChild*/ + !1 + ); + case 288: + return V( + Ie, + /*isChild*/ + !1 + ); + case 294: + return Xe(Ie); + default: + return gr(Ie, S, e); + } + } + function C(Ie) { + switch (Ie.kind) { + case 12: + return ae(Ie); + case 294: + return Xe(Ie); + case 284: + return j( + Ie, + /*isChild*/ + !0 + ); + case 285: + return F( + Ie, + /*isChild*/ + !0 + ); + case 288: + return V( + Ie, + /*isChild*/ + !0 + ); + default: + return E.failBadSyntaxKind(Ie); + } + } + function D(Ie) { + return Ie.properties.some( + (ye) => qc(ye) && (Re(ye.name) && dn(ye.name) === "__proto__" || Ks(ye.name) && ye.name.text === "__proto__") + ); + } + function P(Ie) { + let ye = !1; + for (const Fe of Ie.attributes.properties) + if (Sx(Fe) && (!Gs(Fe.expression) || Fe.expression.properties.some(Bg))) + ye = !0; + else if (ye && dm(Fe) && Re(Fe.name) && Fe.name.escapedText === "key") + return !0; + return !1; + } + function O(Ie) { + return o.importSpecifier === void 0 || P(Ie); + } + function j(Ie, ye) { + return (O(Ie.openingElement) ? ce : U)( + Ie.openingElement, + Ie.children, + ye, + /*location*/ + Ie + ); + } + function F(Ie, ye) { + return (O(Ie) ? ce : U)( + Ie, + /*children*/ + void 0, + ye, + /*location*/ + Ie + ); + } + function V(Ie, ye) { + return (o.importSpecifier === void 0 ? X : K)( + Ie.openingFragment, + Ie.children, + ye, + /*location*/ + Ie + ); + } + function L(Ie) { + const ye = $(Ie); + return ye && t.createObjectLiteralExpression([ye]); + } + function $(Ie) { + const ye = gC(Ie); + if (Dr(ye) === 1 && !ye[0].dotDotDotToken) { + const Qe = C(ye[0]); + return Qe && t.createPropertyAssignment("children", Qe); + } + const Fe = Ii(Ie, C); + return Dr(Fe) ? t.createPropertyAssignment("children", t.createArrayLiteralExpression(Fe)) : void 0; + } + function U(Ie, ye, Fe, Qe) { + const Ke = ve(Ie), Be = ye && ye.length ? $(ye) : void 0, at = Nn(Ie.attributes.properties, (Kt) => !!Kt.name && Re(Kt.name) && Kt.name.escapedText === "key"), Wt = at ? Ln(Ie.attributes.properties, (Kt) => Kt !== at) : Ie.attributes.properties, nr = Dr(Wt) ? oe(Wt, Be) : t.createObjectLiteralExpression(Be ? [Be] : He); + return G( + Ke, + nr, + at, + ye || He, + Fe, + Qe + ); + } + function G(Ie, ye, Fe, Qe, Ke, Be) { + var at; + const Wt = gC(Qe), nr = Dr(Wt) > 1 || !!((at = Wt[0]) != null && at.dotDotDotToken), Kt = [Ie, ye]; + if (Fe && Kt.push(H(Fe.initializer)), i.jsx === 5) { + const Vt = Zo(s); + if (Vt && yi(Vt)) { + Fe === void 0 && Kt.push(t.createVoidZero()), Kt.push(nr ? t.createTrue() : t.createFalse()); + const zt = Vs(Vt, Be.pos); + Kt.push(t.createObjectLiteralExpression([ + t.createPropertyAssignment("fileName", c()), + t.createPropertyAssignment("lineNumber", t.createNumericLiteral(zt.line + 1)), + t.createPropertyAssignment("columnNumber", t.createNumericLiteral(zt.character + 1)) + ])), Kt.push(t.createThis()); + } + } + const Pr = ot( + t.createCallExpression( + u(nr), + /*typeArguments*/ + void 0, + Kt + ), + Be + ); + return Ke && mu(Pr), Pr; + } + function ce(Ie, ye, Fe, Qe) { + const Ke = ve(Ie), Be = Ie.attributes.properties, at = Dr(Be) ? oe(Be) : t.createNull(), Wt = o.importSpecifier === void 0 ? $J( + t, + e.getEmitResolver().getJsxFactoryEntity(s), + i.reactNamespace, + // TODO: GH#18217 + Ie + ) : g("createElement"), nr = Ute( + t, + Wt, + Ke, + at, + Ii(ye, C), + Qe + ); + return Fe && mu(nr), nr; + } + function K(Ie, ye, Fe, Qe) { + let Ke; + if (ye && ye.length) { + const Be = L(ye); + Be && (Ke = Be); + } + return G( + d(), + Ke || t.createObjectLiteralExpression([]), + /*keyAttr*/ + void 0, + ye, + Fe, + Qe + ); + } + function X(Ie, ye, Fe, Qe) { + const Ke = qte( + t, + e.getEmitResolver().getJsxFactoryEntity(s), + e.getEmitResolver().getJsxFragmentFactoryEntity(s), + i.reactNamespace, + // TODO: GH#18217 + Ii(ye, C), + Ie, + Qe + ); + return Fe && mu(Ke), Ke; + } + function Z(Ie) { + return Gs(Ie.expression) && !D(Ie.expression) ? Zc(Ie.expression.properties, (ye) => E.checkDefined(Ge(ye, S, lh))) : t.createSpreadAssignment(E.checkDefined(Ge(Ie.expression, S, ct))); + } + function oe(Ie, ye) { + const Fe = pa(i); + return Fe && Fe >= 5 ? t.createObjectLiteralExpression(ne(Ie, ye)) : pe(Ie, ye); + } + function ne(Ie, ye) { + const Fe = Ep(nR(Ie, Sx, (Qe, Ke) => Ep(or(Qe, (Be) => Ke ? Z(Be) : fe(Be))))); + return ye && Fe.push(ye), Fe; + } + function pe(Ie, ye) { + const Fe = []; + let Qe = []; + for (const Be of Ie) { + if (Sx(Be)) { + if (Gs(Be.expression) && !D(Be.expression)) { + for (const at of Be.expression.properties) { + if (Bg(at)) { + Ke(), Fe.push(E.checkDefined(Ge(at.expression, S, ct))); + continue; + } + Qe.push(E.checkDefined(Ge(at, S))); + } + continue; + } + Ke(), Fe.push(E.checkDefined(Ge(Be.expression, S, ct))); + continue; + } + Qe.push(fe(Be)); + } + return ye && Qe.push(ye), Ke(), Fe.length && !Gs(Fe[0]) && Fe.unshift(t.createObjectLiteralExpression()), Rm(Fe) || n().createAssignHelper(Fe); + function Ke() { + Qe.length && (Fe.push(t.createObjectLiteralExpression(Qe)), Qe = []); + } + } + function fe(Ie) { + const ye = De(Ie), Fe = H(Ie.initializer); + return t.createPropertyAssignment(ye, Fe); + } + function H(Ie) { + if (Ie === void 0) + return t.createTrue(); + if (Ie.kind === 11) { + const ye = Ie.singleQuote !== void 0 ? Ie.singleQuote : !E7(Ie, s), Fe = t.createStringLiteral(de(Ie.text) || Ie.text, ye); + return ot(Fe, Ie); + } + return Ie.kind === 294 ? Ie.expression === void 0 ? t.createTrue() : E.checkDefined(Ge(Ie.expression, S, ct)) : jg(Ie) ? j( + Ie, + /*isChild*/ + !1 + ) : oS(Ie) ? F( + Ie, + /*isChild*/ + !1 + ) : Lb(Ie) ? V( + Ie, + /*isChild*/ + !1 + ) : E.failBadSyntaxKind(Ie); + } + function ae(Ie) { + const ye = le(Ie.text); + return ye === void 0 ? void 0 : t.createStringLiteral(ye); + } + function le(Ie) { + let ye, Fe = 0, Qe = -1; + for (let Ke = 0; Ke < Ie.length; Ke++) { + const Be = Ie.charCodeAt(Ke); + _u(Be) ? (Fe !== -1 && Qe !== -1 && (ye = Ae(ye, Ie.substr(Fe, Qe - Fe + 1))), Fe = -1) : Xd(Be) || (Qe = Ke, Fe === -1 && (Fe = Ke)); + } + return Fe !== -1 ? Ae(ye, Ie.substr(Fe)) : ye; + } + function Ae(Ie, ye) { + const Fe = ge(ye); + return Ie === void 0 ? Fe : Ie + " " + Fe; + } + function ge(Ie) { + return Ie.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, (ye, Fe, Qe, Ke, Be, at, Wt) => { + if (Be) + return JE(parseInt(Be, 10)); + if (at) + return JE(parseInt(at, 16)); + { + const nr = sRe.get(Wt); + return nr ? JE(nr) : ye; + } + }); + } + function de(Ie) { + const ye = ge(Ie); + return ye === Ie ? void 0 : ye; + } + function ve(Ie) { + if (Ie.kind === 284) + return ve(Ie.openingElement); + { + const ye = Ie.tagName; + return Re(ye) && hC(ye.escapedText) ? t.createStringLiteral(dn(ye)) : Cd(ye) ? t.createStringLiteral(dn(ye.namespace) + ":" + dn(ye.name)) : lA(t, ye); + } + } + function De(Ie) { + const ye = Ie.name; + if (Re(ye)) { + const Fe = dn(ye); + return /^[A-Za-z_]\w*$/.test(Fe) ? ye : t.createStringLiteral(Fe); + } + return t.createStringLiteral(dn(ye.namespace) + ":" + dn(ye.name)); + } + function Xe(Ie) { + const ye = Ge(Ie.expression, S, ct); + return Ie.dotDotDotToken ? t.createSpreadElement(ye) : ye; + } + } + var sRe = new Map(Object.entries({ + quot: 34, + amp: 38, + apos: 39, + lt: 60, + gt: 62, + nbsp: 160, + iexcl: 161, + cent: 162, + pound: 163, + curren: 164, + yen: 165, + brvbar: 166, + sect: 167, + uml: 168, + copy: 169, + ordf: 170, + laquo: 171, + not: 172, + shy: 173, + reg: 174, + macr: 175, + deg: 176, + plusmn: 177, + sup2: 178, + sup3: 179, + acute: 180, + micro: 181, + para: 182, + middot: 183, + cedil: 184, + sup1: 185, + ordm: 186, + raquo: 187, + frac14: 188, + frac12: 189, + frac34: 190, + iquest: 191, + Agrave: 192, + Aacute: 193, + Acirc: 194, + Atilde: 195, + Auml: 196, + Aring: 197, + AElig: 198, + Ccedil: 199, + Egrave: 200, + Eacute: 201, + Ecirc: 202, + Euml: 203, + Igrave: 204, + Iacute: 205, + Icirc: 206, + Iuml: 207, + ETH: 208, + Ntilde: 209, + Ograve: 210, + Oacute: 211, + Ocirc: 212, + Otilde: 213, + Ouml: 214, + times: 215, + Oslash: 216, + Ugrave: 217, + Uacute: 218, + Ucirc: 219, + Uuml: 220, + Yacute: 221, + THORN: 222, + szlig: 223, + agrave: 224, + aacute: 225, + acirc: 226, + atilde: 227, + auml: 228, + aring: 229, + aelig: 230, + ccedil: 231, + egrave: 232, + eacute: 233, + ecirc: 234, + euml: 235, + igrave: 236, + iacute: 237, + icirc: 238, + iuml: 239, + eth: 240, + ntilde: 241, + ograve: 242, + oacute: 243, + ocirc: 244, + otilde: 245, + ouml: 246, + divide: 247, + oslash: 248, + ugrave: 249, + uacute: 250, + ucirc: 251, + uuml: 252, + yacute: 253, + thorn: 254, + yuml: 255, + OElig: 338, + oelig: 339, + Scaron: 352, + scaron: 353, + Yuml: 376, + fnof: 402, + circ: 710, + tilde: 732, + Alpha: 913, + Beta: 914, + Gamma: 915, + Delta: 916, + Epsilon: 917, + Zeta: 918, + Eta: 919, + Theta: 920, + Iota: 921, + Kappa: 922, + Lambda: 923, + Mu: 924, + Nu: 925, + Xi: 926, + Omicron: 927, + Pi: 928, + Rho: 929, + Sigma: 931, + Tau: 932, + Upsilon: 933, + Phi: 934, + Chi: 935, + Psi: 936, + Omega: 937, + alpha: 945, + beta: 946, + gamma: 947, + delta: 948, + epsilon: 949, + zeta: 950, + eta: 951, + theta: 952, + iota: 953, + kappa: 954, + lambda: 955, + mu: 956, + nu: 957, + xi: 958, + omicron: 959, + pi: 960, + rho: 961, + sigmaf: 962, + sigma: 963, + tau: 964, + upsilon: 965, + phi: 966, + chi: 967, + psi: 968, + omega: 969, + thetasym: 977, + upsih: 978, + piv: 982, + ensp: 8194, + emsp: 8195, + thinsp: 8201, + zwnj: 8204, + zwj: 8205, + lrm: 8206, + rlm: 8207, + ndash: 8211, + mdash: 8212, + lsquo: 8216, + rsquo: 8217, + sbquo: 8218, + ldquo: 8220, + rdquo: 8221, + bdquo: 8222, + dagger: 8224, + Dagger: 8225, + bull: 8226, + hellip: 8230, + permil: 8240, + prime: 8242, + Prime: 8243, + lsaquo: 8249, + rsaquo: 8250, + oline: 8254, + frasl: 8260, + euro: 8364, + image: 8465, + weierp: 8472, + real: 8476, + trade: 8482, + alefsym: 8501, + larr: 8592, + uarr: 8593, + rarr: 8594, + darr: 8595, + harr: 8596, + crarr: 8629, + lArr: 8656, + uArr: 8657, + rArr: 8658, + dArr: 8659, + hArr: 8660, + forall: 8704, + part: 8706, + exist: 8707, + empty: 8709, + nabla: 8711, + isin: 8712, + notin: 8713, + ni: 8715, + prod: 8719, + sum: 8721, + minus: 8722, + lowast: 8727, + radic: 8730, + prop: 8733, + infin: 8734, + ang: 8736, + and: 8743, + or: 8744, + cap: 8745, + cup: 8746, + int: 8747, + there4: 8756, + sim: 8764, + cong: 8773, + asymp: 8776, + ne: 8800, + equiv: 8801, + le: 8804, + ge: 8805, + sub: 8834, + sup: 8835, + nsub: 8836, + sube: 8838, + supe: 8839, + oplus: 8853, + otimes: 8855, + perp: 8869, + sdot: 8901, + lceil: 8968, + rceil: 8969, + lfloor: 8970, + rfloor: 8971, + lang: 9001, + rang: 9002, + loz: 9674, + spades: 9824, + clubs: 9827, + hearts: 9829, + diams: 9830 + })); + function sie(e) { + const { + factory: t, + hoistVariableDeclaration: n + } = e; + return Pd(e, i); + function i(u) { + return u.isDeclarationFile ? u : gr(u, s, e); + } + function s(u) { + if (!(u.transformFlags & 512)) + return u; + switch (u.kind) { + case 226: + return o(u); + default: + return gr(u, s, e); + } + } + function o(u) { + switch (u.operatorToken.kind) { + case 68: + return c(u); + case 43: + return _(u); + default: + return gr(u, s, e); + } + } + function c(u) { + let d, g; + const h = Ge(u.left, s, ct), S = Ge(u.right, s, ct); + if (ho(h)) { + const T = t.createTempVariable(n), C = t.createTempVariable(n); + d = ot( + t.createElementAccessExpression( + ot(t.createAssignment(T, h.expression), h.expression), + ot(t.createAssignment(C, h.argumentExpression), h.argumentExpression) + ), + h + ), g = ot( + t.createElementAccessExpression( + T, + C + ), + h + ); + } else if (Dn(h)) { + const T = t.createTempVariable(n); + d = ot( + t.createPropertyAccessExpression( + ot(t.createAssignment(T, h.expression), h.expression), + h.name + ), + h + ), g = ot( + t.createPropertyAccessExpression( + T, + h.name + ), + h + ); + } else + d = h, g = h; + return ot( + t.createAssignment( + d, + ot(t.createGlobalMethodCall("Math", "pow", [g, S]), u) + ), + u + ); + } + function _(u) { + const d = Ge(u.left, s, ct), g = Ge(u.right, s, ct); + return ot(t.createGlobalMethodCall("Math", "pow", [d, g]), u); + } + } + function lve(e, t) { + return { kind: e, expression: t }; + } + function aie(e) { + const { + factory: t, + getEmitHelperFactory: n, + startLexicalEnvironment: i, + resumeLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = e.getEmitResolver(), d = e.onSubstituteNode, g = e.onEmitNode; + e.onEmitNode = zf, e.onSubstituteNode = Wf; + let h, S, T, C; + function D(Y) { + C = Tr( + C, + t.createVariableDeclaration(Y) + ); + } + let P, O; + return Pd(e, j); + function j(Y) { + if (Y.isDeclarationFile) + return Y; + h = Y, S = Y.text; + const tt = oe(Y); + return vh(tt, e.readEmitHelpers()), h = void 0, S = void 0, C = void 0, T = 0, tt; + } + function F(Y, tt) { + const Pt = T; + return T = (T & ~Y | tt) & 32767, Pt; + } + function V(Y, tt, Pt) { + T = (T & ~tt | Pt) & -32768 | Y; + } + function L(Y) { + return (T & 8192) !== 0 && Y.kind === 253 && !Y.expression; + } + function $(Y) { + return Y.transformFlags & 4194304 && (Mp(Y) || ev(Y) || Ate(Y) || sD(Y) || aD(Y) || OC(Y) || cD(Y) || sS(Y) || Rb(Y) || Dy(Y) || fy( + Y, + /*lookInLabeledStatements*/ + !1 + ) || ms(Y)); + } + function U(Y) { + return (Y.transformFlags & 1024) !== 0 || P !== void 0 || T & 8192 && $(Y) || fy( + Y, + /*lookInLabeledStatements*/ + !1 + ) && Li(Y) || (Qp(Y) & 1) !== 0; + } + function G(Y) { + return U(Y) ? Z( + Y, + /*expressionResultIsUnused*/ + !1 + ) : Y; + } + function ce(Y) { + return U(Y) ? Z( + Y, + /*expressionResultIsUnused*/ + !0 + ) : Y; + } + function K(Y) { + if (U(Y)) { + const tt = Zo(Y); + if (rs(tt) && Uc(tt)) { + const Pt = F( + 32670, + 16449 + /* StaticInitializerIncludes */ + ), It = Z( + Y, + /*expressionResultIsUnused*/ + !1 + ); + return V( + Pt, + 229376, + 0 + /* None */ + ), It; + } + return Z( + Y, + /*expressionResultIsUnused*/ + !1 + ); + } + return Y; + } + function X(Y) { + return Y.kind === 108 ? bf( + Y, + /*isExpressionOfCall*/ + !0 + ) : G(Y); + } + function Z(Y, tt) { + switch (Y.kind) { + case 126: + return; + case 263: + return ve(Y); + case 231: + return De(Y); + case 169: + return ws(Y); + case 262: + return yt(Y); + case 219: + return bt(Y); + case 218: + return kt(Y); + case 260: + return ir(Y); + case 80: + return ge(Y); + case 261: + return Te(Y); + case 255: + return ne(Y); + case 269: + return pe(Y); + case 241: + return je( + Y, + /*isFunctionBody*/ + !1 + ); + case 252: + case 251: + return de(Y); + case 256: + return en(Y); + case 246: + case 247: + return Di( + Y, + /*outermostLabeledStatement*/ + void 0 + ); + case 248: + return Fi( + Y, + /*outermostLabeledStatement*/ + void 0 + ); + case 249: + return Mr( + Y, + /*outermostLabeledStatement*/ + void 0 + ); + case 250: + return Or( + Y, + /*outermostLabeledStatement*/ + void 0 + ); + case 244: + return st(Y); + case 210: + return Ro(Y); + case 299: + return li(Y); + case 304: + return ol(Y); + case 167: + return vo(Y); + case 209: + return Eo(Y); + case 213: + return gl(Y); + case 214: + return F_(Y); + case 217: + return z(Y, tt); + case 226: + return he(Y, tt); + case 355: + return q(Y, tt); + case 15: + case 16: + case 17: + case 18: + return Pa(Y); + case 11: + return vc(Y); + case 9: + return Do(Y); + case 215: + return to(Y); + case 228: + return pc(Y); + case 229: + return cl(Y); + case 230: + return ha(Y); + case 108: + return bf( + Y, + /*isExpressionOfCall*/ + !1 + ); + case 110: + return le(Y); + case 236: + return Id(Y); + case 174: + return eo(Y); + case 177: + case 178: + return qo(Y); + case 243: + return _e(Y); + case 253: + return ae(Y); + case 222: + return Ae(Y); + default: + return gr(Y, G, e); + } + } + function oe(Y) { + const tt = F( + 8064, + 64 + /* SourceFileIncludes */ + ), Pt = [], It = []; + i(); + const hr = t.copyPrologue( + Y.statements, + Pt, + /*ensureUseStrict*/ + !1, + G + ); + return Bn(It, Ar(Y.statements, G, hi, hr)), C && It.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(C) + ) + ), t.mergeLexicalEnvironment(Pt, o()), re(Pt, Y), V( + tt, + 0, + 0 + /* None */ + ), t.updateSourceFile( + Y, + ot(t.createNodeArray(Hi(Pt, It)), Y.statements) + ); + } + function ne(Y) { + if (P !== void 0) { + const tt = P.allowedNonLabeledJumps; + P.allowedNonLabeledJumps |= 2; + const Pt = gr(Y, G, e); + return P.allowedNonLabeledJumps = tt, Pt; + } + return gr(Y, G, e); + } + function pe(Y) { + const tt = F( + 7104, + 0 + /* BlockScopeIncludes */ + ), Pt = gr(Y, G, e); + return V( + tt, + 0, + 0 + /* None */ + ), Pt; + } + function fe(Y) { + return kn(t.createReturnStatement(H()), Y); + } + function H() { + return t.createUniqueName( + "_this", + 48 + /* FileLevel */ + ); + } + function ae(Y) { + return P ? (P.nonLocalJumps |= 8, L(Y) && (Y = fe(Y)), t.createReturnStatement( + t.createObjectLiteralExpression( + [ + t.createPropertyAssignment( + t.createIdentifier("value"), + Y.expression ? E.checkDefined(Ge(Y.expression, G, ct)) : t.createVoidZero() + ) + ] + ) + )) : L(Y) ? fe(Y) : gr(Y, G, e); + } + function le(Y) { + return T |= 65536, T & 2 && !(T & 16384) && (T |= 131072), P ? T & 2 ? (P.containsLexicalThis = !0, Y) : P.thisName || (P.thisName = t.createUniqueName("this")) : Y; + } + function Ae(Y) { + return gr(Y, ce, e); + } + function ge(Y) { + return P && u.isArgumentsLocalBinding(Y) ? P.argumentsName || (P.argumentsName = t.createUniqueName("arguments")) : Y.flags & 256 ? kn( + ot( + t.createIdentifier(Pi(Y.escapedText)), + Y + ), + Y + ) : Y; + } + function de(Y) { + if (P) { + const tt = Y.kind === 252 ? 2 : 4; + if (!(Y.label && P.labels && P.labels.get(dn(Y.label)) || !Y.label && P.allowedNonLabeledJumps & tt)) { + let It; + const hr = Y.label; + hr ? Y.kind === 252 ? (It = `break-${hr.escapedText}`, Me( + P, + /*isBreak*/ + !0, + dn(hr), + It + )) : (It = `continue-${hr.escapedText}`, Me( + P, + /*isBreak*/ + !1, + dn(hr), + It + )) : Y.kind === 252 ? (P.nonLocalJumps |= 2, It = "break") : (P.nonLocalJumps |= 4, It = "continue"); + let zr = t.createStringLiteral(It); + if (P.loopOutParameters.length) { + const Cn = P.loopOutParameters; + let ei; + for (let M = 0; M < Cn.length; M++) { + const ke = y_( + Cn[M], + 1 + /* ToOutParameter */ + ); + M === 0 ? ei = ke : ei = t.createBinaryExpression(ei, 28, ke); + } + zr = t.createBinaryExpression(ei, 28, zr); + } + return t.createReturnStatement(zr); + } + } + return gr(Y, G, e); + } + function ve(Y) { + const tt = t.createVariableDeclaration( + t.getLocalName( + Y, + /*allowComments*/ + !0 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Xe(Y) + ); + kn(tt, Y); + const Pt = [], It = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([tt]) + ); + if (kn(It, Y), ot(It, Y), mu(It), Pt.push(It), Vn( + Y, + 32 + /* Export */ + )) { + const hr = Vn( + Y, + 2048 + /* Default */ + ) ? t.createExportDefault(t.getLocalName(Y)) : t.createExternalModuleExport(t.getLocalName(Y)); + kn(hr, It), Pt.push(hr); + } + return jm(Pt); + } + function De(Y) { + return Xe(Y); + } + function Xe(Y) { + Y.name && v_(); + const tt = vb(Y), Pt = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + tt ? [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Cc() + )] : [], + /*type*/ + void 0, + Ie(Y, tt) + ); + Kr( + Pt, + ua(Y) & 131072 | 1048576 + /* ReuseTempVariableScope */ + ); + const It = t.createPartiallyEmittedExpression(Pt); + DC(It, Y.end), Kr( + It, + 3072 + /* NoComments */ + ); + const hr = t.createPartiallyEmittedExpression(It); + DC(hr, sa(S, Y.pos)), Kr( + hr, + 3072 + /* NoComments */ + ); + const zr = t.createParenthesizedExpression( + t.createCallExpression( + hr, + /*typeArguments*/ + void 0, + tt ? [E.checkDefined(Ge(tt.expression, G, ct))] : [] + ) + ); + return X4(zr, 3, "* @class "), zr; + } + function Ie(Y, tt) { + const Pt = [], It = t.getInternalName(Y), hr = pB(It) ? t.getGeneratedNameForNode(It) : It; + i(), ye(Pt, Y, tt), Fe(Pt, Y, hr, tt), et(Pt, Y); + const zr = RB( + sa(S, Y.members.end), + 20 + /* CloseBraceToken */ + ), Cn = t.createPartiallyEmittedExpression(hr); + DC(Cn, zr.end), Kr( + Cn, + 3072 + /* NoComments */ + ); + const ei = t.createReturnStatement(Cn); + z4(ei, zr.pos), Kr( + ei, + 3840 + /* NoTokenSourceMaps */ + ), Pt.push(ei), Pg(Pt, o()); + const M = t.createBlock( + ot( + t.createNodeArray(Pt), + /*location*/ + Y.members + ), + /*multiLine*/ + !0 + ); + return Kr( + M, + 3072 + /* NoComments */ + ), M; + } + function ye(Y, tt, Pt) { + Pt && Y.push( + ot( + t.createExpressionStatement( + n().createExtendsHelper(t.getInternalName(tt)) + ), + /*location*/ + Pt + ) + ); + } + function Fe(Y, tt, Pt, It) { + const hr = P; + P = void 0; + const zr = F( + 32662, + 73 + /* ConstructorIncludes */ + ), Cn = Ng(tt), ei = Vf(Cn, It !== void 0), M = t.createFunctionDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + Pt, + /*typeParameters*/ + void 0, + Qe(Cn, ei), + /*type*/ + void 0, + Wt(Cn, tt, It, ei) + ); + ot(M, Cn || tt), It && Kr( + M, + 16 + /* CapturesThis */ + ), Y.push(M), V( + zr, + 229376, + 0 + /* None */ + ), P = hr; + } + function Qe(Y, tt) { + return cc(Y && !tt ? Y.parameters : void 0, G, e) || []; + } + function Ke(Y, tt) { + const Pt = []; + s(), t.mergeLexicalEnvironment(Pt, o()), tt && Pt.push(t.createReturnStatement(Ps())); + const It = t.createNodeArray(Pt); + ot(It, Y.members); + const hr = t.createBlock( + It, + /*multiLine*/ + !0 + ); + return ot(hr, Y), Kr( + hr, + 3072 + /* NoComments */ + ), hr; + } + function Be(Y) { + return yc(Y) && Ri(Y.declarationList.declarations, (tt) => Re(tt.name) && !tt.initializer); + } + function at(Y) { + if (G2(Y)) + return !0; + if (!(Y.transformFlags & 134217728)) + return !1; + switch (Y.kind) { + case 219: + case 218: + case 262: + case 176: + case 175: + return !1; + case 177: + case 178: + case 174: + case 172: { + const tt = Y; + return oa(tt.name) ? !!gs(tt.name, at) : !1; + } + } + return !!gs(Y, at); + } + function Wt(Y, tt, Pt, It) { + const hr = !!Pt && Bc(Pt.expression).kind !== 106; + if (!Y) return Ke(tt, hr); + const zr = [], Cn = []; + s(); + const ei = t.copyStandardPrologue( + Y.body.statements, + zr, + /*statementOffset*/ + 0 + ); + (It || at(Y.body)) && (T |= 8192), Bn(Cn, Ar(Y.body.statements, G, hi, ei)); + const M = hr || T & 8192; + Ca(zr, Y), rt(zr, Y, It), Ne(zr, Y), M ? Ee(zr, Y, mi()) : re(zr, Y), t.mergeLexicalEnvironment(zr, o()), M && !ri(Y.body) && Cn.push(t.createReturnStatement(H())); + const ke = t.createBlock( + ot( + t.createNodeArray( + [ + ...zr, + ...Cn + ] + ), + /*location*/ + Y.body.statements + ), + /*multiLine*/ + !0 + ); + return ot(ke, Y.body), Zn(ke, Y.body, It); + } + function nr(Y) { + return Fo(Y) && dn(Y) === "_this"; + } + function Kt(Y) { + return Fo(Y) && dn(Y) === "_super"; + } + function Pr(Y) { + return yc(Y) && Y.declarationList.declarations.length === 1 && Vt(Y.declarationList.declarations[0]); + } + function Vt(Y) { + return ti(Y) && nr(Y.name) && !!Y.initializer; + } + function zt(Y) { + return Tl( + Y, + /*excludeCompoundAssignment*/ + !0 + ) && nr(Y.left); + } + function jr(Y) { + return Es(Y) && Dn(Y.expression) && Kt(Y.expression.expression) && Re(Y.expression.name) && (dn(Y.expression.name) === "call" || dn(Y.expression.name) === "apply") && Y.arguments.length >= 1 && Y.arguments[0].kind === 110; + } + function ci(Y) { + return cn(Y) && Y.operatorToken.kind === 57 && Y.right.kind === 110 && jr(Y.left); + } + function Xt(Y) { + return cn(Y) && Y.operatorToken.kind === 56 && cn(Y.left) && Y.left.operatorToken.kind === 38 && Kt(Y.left.left) && Y.left.right.kind === 106 && jr(Y.right) && dn(Y.right.expression.name) === "apply"; + } + function Ai(Y) { + return cn(Y) && Y.operatorToken.kind === 57 && Y.right.kind === 110 && Xt(Y.left); + } + function _s(Y) { + return zt(Y) && ci(Y.right); + } + function $n(Y) { + return zt(Y) && Ai(Y.right); + } + function os(Y) { + return jr(Y) || ci(Y) || _s(Y) || Xt(Y) || Ai(Y) || $n(Y); + } + function wr(Y) { + for (let tt = 0; tt < Y.statements.length - 1; tt++) { + const Pt = Y.statements[tt]; + if (!Pr(Pt)) + continue; + const It = Pt.declarationList.declarations[0]; + if (It.initializer.kind !== 110) + continue; + const hr = tt; + let zr = tt + 1; + for (; zr < Y.statements.length; ) { + const ui = Y.statements[zr]; + if (Pl(ui) && os(Bc(ui.expression))) + break; + if (Be(ui)) { + zr++; + continue; + } + return Y; + } + const Cn = Y.statements[zr]; + let ei = Cn.expression; + zt(ei) && (ei = ei.right); + const M = t.updateVariableDeclaration( + It, + It.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ei + ), ke = t.updateVariableDeclarationList(Pt.declarationList, [M]), vt = t.createVariableStatement(Pt.modifiers, ke); + kn(vt, Cn), ot(vt, Cn); + const Nr = t.createNodeArray([ + ...Y.statements.slice(0, hr), + // copy statements preceding to `var _this` + ...Y.statements.slice(hr + 1, zr), + // copy intervening temp variables + vt, + ...Y.statements.slice(zr + 1) + // copy statements following `super.call(this, ...)` + ]); + return ot(Nr, Y.statements), t.updateBlock(Y, Nr); + } + return Y; + } + function Ss(Y, tt) { + for (const It of tt.statements) + if (It.transformFlags & 134217728 && !WO(It)) + return Y; + const Pt = !(tt.transformFlags & 16384) && !(T & 65536) && !(T & 131072); + for (let It = Y.statements.length - 1; It > 0; It--) { + const hr = Y.statements[It]; + if (Mp(hr) && hr.expression && nr(hr.expression)) { + const zr = Y.statements[It - 1]; + let Cn; + if (Pl(zr) && _s(Bc(zr.expression))) + Cn = zr.expression; + else if (Pt && Pr(zr)) { + const ke = zr.declarationList.declarations[0]; + os(Bc(ke.initializer)) && (Cn = t.createAssignment( + H(), + ke.initializer + )); + } + if (!Cn) + break; + const ei = t.createReturnStatement(Cn); + kn(ei, zr), ot(ei, zr); + const M = t.createNodeArray([ + ...Y.statements.slice(0, It - 1), + // copy all statements preceding `_super.call(this, ...)` + ei, + ...Y.statements.slice(It + 1) + // copy all statements following `return _this;` + ]); + return ot(M, Y.statements), t.updateBlock(Y, M); + } + } + return Y; + } + function Le(Y) { + if (Pr(Y)) { + if (Y.declarationList.declarations[0].initializer.kind === 110) + return; + } else if (zt(Y)) + return t.createPartiallyEmittedExpression(Y.right, Y); + switch (Y.kind) { + case 219: + case 218: + case 262: + case 176: + case 175: + return Y; + case 177: + case 178: + case 174: + case 172: { + const tt = Y; + return oa(tt.name) ? t.replacePropertyName(tt, gr( + tt.name, + Le, + /*context*/ + void 0 + )) : Y; + } + } + return gr( + Y, + Le, + /*context*/ + void 0 + ); + } + function At(Y, tt) { + if (tt.transformFlags & 16384 || T & 65536 || T & 131072) + return Y; + for (const Pt of tt.statements) + if (Pt.transformFlags & 134217728 && !WO(Pt)) + return Y; + return t.updateBlock(Y, Ar(Y.statements, Le, hi)); + } + function vr(Y) { + if (jr(Y) && Y.arguments.length === 2 && Re(Y.arguments[1]) && dn(Y.arguments[1]) === "arguments") + return t.createLogicalAnd( + t.createStrictInequality( + Cc(), + t.createNull() + ), + Y + ); + switch (Y.kind) { + case 219: + case 218: + case 262: + case 176: + case 175: + return Y; + case 177: + case 178: + case 174: + case 172: { + const tt = Y; + return oa(tt.name) ? t.replacePropertyName(tt, gr( + tt.name, + vr, + /*context*/ + void 0 + )) : Y; + } + } + return gr( + Y, + vr, + /*context*/ + void 0 + ); + } + function ln(Y) { + return t.updateBlock(Y, Ar(Y.statements, vr, hi)); + } + function Zn(Y, tt, Pt) { + const It = Y; + return Y = wr(Y), Y = Ss(Y, tt), Y !== It && (Y = At(Y, tt)), Pt && (Y = ln(Y)), Y; + } + function ri(Y) { + if (Y.kind === 253) + return !0; + if (Y.kind === 245) { + const tt = Y; + if (tt.elseStatement) + return ri(tt.thenStatement) && ri(tt.elseStatement); + } else if (Y.kind === 241) { + const tt = Bo(Y.statements); + if (tt && ri(tt)) + return !0; + } + return !1; + } + function mi() { + return Kr( + t.createThis(), + 8 + /* NoSubstitution */ + ); + } + function Ps() { + return t.createLogicalOr( + t.createLogicalAnd( + t.createStrictInequality( + Cc(), + t.createNull() + ), + t.createFunctionApplyCall( + Cc(), + mi(), + t.createIdentifier("arguments") + ) + ), + mi() + ); + } + function ws(Y) { + if (!Y.dotDotDotToken) + return Ts(Y.name) ? kn( + ot( + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + t.getGeneratedNameForNode(Y), + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + /*location*/ + Y + ), + /*original*/ + Y + ) : Y.initializer ? kn( + ot( + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + Y.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + /*location*/ + Y + ), + /*original*/ + Y + ) : Y; + } + function Yt(Y) { + return Y.initializer !== void 0 || Ts(Y.name); + } + function Ca(Y, tt) { + if (!ut(tt.parameters, Yt)) + return !1; + let Pt = !1; + for (const It of tt.parameters) { + const { name: hr, initializer: zr, dotDotDotToken: Cn } = It; + Cn || (Ts(hr) ? Pt = $e(Y, It, hr, zr) || Pt : zr && (nt(Y, It, hr, zr), Pt = !0)); + } + return Pt; + } + function $e(Y, tt, Pt, It) { + return Pt.elements.length > 0 ? (q2( + Y, + Kr( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + zb( + tt, + G, + e, + 0, + t.getGeneratedNameForNode(tt) + ) + ) + ), + 2097152 + /* CustomPrologue */ + ) + ), !0) : It ? (q2( + Y, + Kr( + t.createExpressionStatement( + t.createAssignment( + t.getGeneratedNameForNode(tt), + E.checkDefined(Ge(It, G, ct)) + ) + ), + 2097152 + /* CustomPrologue */ + ) + ), !0) : !1; + } + function nt(Y, tt, Pt, It) { + It = E.checkDefined(Ge(It, G, ct)); + const hr = t.createIfStatement( + t.createTypeCheck(t.cloneNode(Pt), "undefined"), + Kr( + ot( + t.createBlock([ + t.createExpressionStatement( + Kr( + ot( + t.createAssignment( + // TODO(rbuckton): Does this need to be parented? + Kr( + Da(ot(t.cloneNode(Pt), Pt), Pt.parent), + 96 + /* NoSourceMap */ + ), + Kr( + It, + 96 | ua(It) | 3072 + /* NoComments */ + ) + ), + tt + ), + 3072 + /* NoComments */ + ) + ) + ]), + tt + ), + 3905 + /* NoComments */ + ) + ); + mu(hr), ot(hr, tt), Kr( + hr, + 2101056 + /* NoComments */ + ), q2(Y, hr); + } + function te(Y, tt) { + return !!(Y && Y.dotDotDotToken && !tt); + } + function rt(Y, tt, Pt) { + const It = [], hr = Bo(tt.parameters); + if (!te(hr, Pt)) + return !1; + const zr = hr.name.kind === 80 ? Da(ot(t.cloneNode(hr.name), hr.name), hr.name.parent) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + Kr( + zr, + 96 + /* NoSourceMap */ + ); + const Cn = hr.name.kind === 80 ? t.cloneNode(hr.name) : zr, ei = tt.parameters.length - 1, M = t.createLoopVariable(); + It.push( + Kr( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + zr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createArrayLiteralExpression([]) + ) + ]) + ), + /*location*/ + hr + ), + 2097152 + /* CustomPrologue */ + ) + ); + const ke = t.createForStatement( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + M, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createNumericLiteral(ei) + ) + ]), + hr + ), + ot( + t.createLessThan( + M, + t.createPropertyAccessExpression(t.createIdentifier("arguments"), "length") + ), + hr + ), + ot(t.createPostfixIncrement(M), hr), + t.createBlock([ + mu( + ot( + t.createExpressionStatement( + t.createAssignment( + t.createElementAccessExpression( + Cn, + ei === 0 ? M : t.createSubtract(M, t.createNumericLiteral(ei)) + ), + t.createElementAccessExpression(t.createIdentifier("arguments"), M) + ) + ), + /*location*/ + hr + ) + ) + ]) + ); + return Kr( + ke, + 2097152 + /* CustomPrologue */ + ), mu(ke), It.push(ke), hr.name.kind !== 80 && It.push( + Kr( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + zb(hr, G, e, 0, Cn) + ) + ), + hr + ), + 2097152 + /* CustomPrologue */ + ) + ), Ij(Y, It), !0; + } + function re(Y, tt) { + return T & 131072 && tt.kind !== 219 ? (Ee(Y, tt, t.createThis()), !0) : !1; + } + function Ee(Y, tt, Pt) { + pp(); + const It = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + H(), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Pt + ) + ]) + ); + Kr( + It, + 2100224 + /* CustomPrologue */ + ), aa(It, tt), q2(Y, It); + } + function Ne(Y, tt) { + if (T & 32768) { + let Pt; + switch (tt.kind) { + case 219: + return Y; + case 174: + case 177: + case 178: + Pt = t.createVoidZero(); + break; + case 176: + Pt = t.createPropertyAccessExpression( + Kr( + t.createThis(), + 8 + /* NoSubstitution */ + ), + "constructor" + ); + break; + case 262: + case 218: + Pt = t.createConditionalExpression( + t.createLogicalAnd( + Kr( + t.createThis(), + 8 + /* NoSubstitution */ + ), + t.createBinaryExpression( + Kr( + t.createThis(), + 8 + /* NoSubstitution */ + ), + 104, + t.getLocalName(tt) + ) + ), + /*questionToken*/ + void 0, + t.createPropertyAccessExpression( + Kr( + t.createThis(), + 8 + /* NoSubstitution */ + ), + "constructor" + ), + /*colonToken*/ + void 0, + t.createVoidZero() + ); + break; + default: + return E.failBadSyntaxKind(tt); + } + const It = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + t.createUniqueName( + "_newTarget", + 48 + /* FileLevel */ + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Pt + ) + ]) + ); + Kr( + It, + 2100224 + /* CustomPrologue */ + ), q2(Y, It); + } + return Y; + } + function et(Y, tt) { + for (const Pt of tt.members) + switch (Pt.kind) { + case 240: + Y.push(lt(Pt)); + break; + case 174: + Y.push(jt(bm(tt, Pt), Pt, tt)); + break; + case 177: + case 178: + const It = gy(tt.members, Pt); + Pt === It.firstAccessor && Y.push(be(bm(tt, Pt), It, tt)); + break; + case 176: + case 175: + break; + default: + E.failBadSyntaxKind(Pt, h && h.fileName); + break; + } + } + function lt(Y) { + return ot(t.createEmptyStatement(), Y); + } + function jt(Y, tt, Pt) { + const It = lm(tt), hr = g0(tt), zr = Ut( + tt, + /*location*/ + tt, + /*name*/ + void 0, + Pt + ), Cn = Ge(tt.name, G, Rc); + E.assert(Cn); + let ei; + if (!wi(Cn) && B3(e.getCompilerOptions())) { + const ke = oa(Cn) ? Cn.expression : Re(Cn) ? t.createStringLiteral(Pi(Cn.escapedText)) : Cn; + ei = t.createObjectDefinePropertyCall(Y, ke, t.createPropertyDescriptor({ value: zr, enumerable: !1, writable: !0, configurable: !0 })); + } else { + const ke = _S( + t, + Y, + Cn, + /*location*/ + tt.name + ); + ei = t.createAssignment(ke, zr); + } + Kr( + zr, + 3072 + /* NoComments */ + ), aa(zr, hr); + const M = ot( + t.createExpressionStatement(ei), + /*location*/ + tt + ); + return kn(M, tt), el(M, It), Kr( + M, + 96 + /* NoSourceMap */ + ), M; + } + function be(Y, tt, Pt) { + const It = t.createExpressionStatement(ft( + Y, + tt, + Pt, + /*startsOnNewLine*/ + !1 + )); + return Kr( + It, + 3072 + /* NoComments */ + ), aa(It, g0(tt.firstAccessor)), It; + } + function ft(Y, { firstAccessor: tt, getAccessor: Pt, setAccessor: It }, hr, zr) { + const Cn = Da(ot(t.cloneNode(Y), Y), Y.parent); + Kr( + Cn, + 3136 + /* NoTrailingSourceMap */ + ), aa(Cn, tt.name); + const ei = Ge(tt.name, G, Rc); + if (E.assert(ei), wi(ei)) + return E.failBadSyntaxKind(ei, "Encountered unhandled private identifier while transforming ES2015."); + const M = QJ(t, ei); + Kr( + M, + 3104 + /* NoLeadingSourceMap */ + ), aa(M, tt.name); + const ke = []; + if (Pt) { + const Nr = Ut( + Pt, + /*location*/ + void 0, + /*name*/ + void 0, + hr + ); + aa(Nr, g0(Pt)), Kr( + Nr, + 1024 + /* NoLeadingComments */ + ); + const ui = t.createPropertyAssignment("get", Nr); + el(ui, lm(Pt)), ke.push(ui); + } + if (It) { + const Nr = Ut( + It, + /*location*/ + void 0, + /*name*/ + void 0, + hr + ); + aa(Nr, g0(It)), Kr( + Nr, + 1024 + /* NoLeadingComments */ + ); + const ui = t.createPropertyAssignment("set", Nr); + el(ui, lm(It)), ke.push(ui); + } + ke.push( + t.createPropertyAssignment("enumerable", Pt || It ? t.createFalse() : t.createTrue()), + t.createPropertyAssignment("configurable", t.createTrue()) + ); + const vt = t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ + void 0, + [ + Cn, + M, + t.createObjectLiteralExpression( + ke, + /*multiLine*/ + !0 + ) + ] + ); + return zr && mu(vt), vt; + } + function bt(Y) { + Y.transformFlags & 16384 && !(T & 16384) && (T |= 131072); + const tt = P; + P = void 0; + const Pt = F( + 15232, + 66 + /* ArrowFunctionIncludes */ + ), It = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + cc(Y.parameters, G, e), + /*type*/ + void 0, + W(Y) + ); + return ot(It, Y), kn(It, Y), Kr( + It, + 16 + /* CapturesThis */ + ), V( + Pt, + 0, + 0 + /* None */ + ), P = tt, It; + } + function kt(Y) { + const tt = ua(Y) & 524288 ? F( + 32662, + 69 + /* AsyncFunctionBodyIncludes */ + ) : F( + 32670, + 65 + /* FunctionIncludes */ + ), Pt = P; + P = void 0; + const It = cc(Y.parameters, G, e), hr = W(Y), zr = T & 32768 ? t.getLocalName(Y) : Y.name; + return V( + tt, + 229376, + 0 + /* None */ + ), P = Pt, t.updateFunctionExpression( + Y, + /*modifiers*/ + void 0, + Y.asteriskToken, + zr, + /*typeParameters*/ + void 0, + It, + /*type*/ + void 0, + hr + ); + } + function yt(Y) { + const tt = P; + P = void 0; + const Pt = F( + 32670, + 65 + /* FunctionIncludes */ + ), It = cc(Y.parameters, G, e), hr = W(Y), zr = T & 32768 ? t.getLocalName(Y) : Y.name; + return V( + Pt, + 229376, + 0 + /* None */ + ), P = tt, t.updateFunctionDeclaration( + Y, + Ar(Y.modifiers, G, Qs), + Y.asteriskToken, + zr, + /*typeParameters*/ + void 0, + It, + /*type*/ + void 0, + hr + ); + } + function Ut(Y, tt, Pt, It) { + const hr = P; + P = void 0; + const zr = It && Qn(It) && !Os(Y) ? F( + 32670, + 73 + /* NonStaticClassElement */ + ) : F( + 32670, + 65 + /* FunctionIncludes */ + ), Cn = cc(Y.parameters, G, e), ei = W(Y); + return T & 32768 && !Pt && (Y.kind === 262 || Y.kind === 218) && (Pt = t.getGeneratedNameForNode(Y)), V( + zr, + 229376, + 0 + /* None */ + ), P = hr, kn( + ot( + t.createFunctionExpression( + /*modifiers*/ + void 0, + Y.asteriskToken, + Pt, + /*typeParameters*/ + void 0, + Cn, + /*type*/ + void 0, + ei + ), + tt + ), + /*original*/ + Y + ); + } + function W(Y) { + let tt = !1, Pt = !1, It, hr; + const zr = [], Cn = [], ei = Y.body; + let M; + if (s(), ms(ei) && (M = t.copyStandardPrologue( + ei.statements, + zr, + 0, + /*ensureUseStrict*/ + !1 + ), M = t.copyCustomPrologue(ei.statements, Cn, M, G, _7), M = t.copyCustomPrologue(ei.statements, Cn, M, G, f7)), tt = Ca(Cn, Y) || tt, tt = rt( + Cn, + Y, + /*inConstructorWithSynthesizedSuper*/ + !1 + ) || tt, ms(ei)) + M = t.copyCustomPrologue(ei.statements, Cn, M, G), It = ei.statements, Bn(Cn, Ar(ei.statements, G, hi, M)), !tt && ei.multiLine && (tt = !0); + else { + E.assert( + Y.kind === 219 + /* ArrowFunction */ + ), It = X7(ei, -1); + const vt = Y.equalsGreaterThanToken; + !oo(vt) && !oo(ei) && (L3(vt, ei, h) ? Pt = !0 : tt = !0); + const Nr = Ge(ei, G, ct), ui = t.createReturnStatement(Nr); + ot(ui, ei), Fee(ui, ei), Kr( + ui, + 2880 + /* NoTrailingComments */ + ), Cn.push(ui), hr = ei; + } + if (t.mergeLexicalEnvironment(zr, o()), Ne(zr, Y), re(zr, Y), ut(zr) && (tt = !0), Cn.unshift(...zr), ms(ei) && md(Cn, ei.statements)) + return ei; + const ke = t.createBlock(ot(t.createNodeArray(Cn), It), tt); + return ot(ke, Y.body), !tt && Pt && Kr( + ke, + 1 + /* SingleLine */ + ), hr && Oee(ke, 20, hr), kn(ke, Y.body), ke; + } + function je(Y, tt) { + if (tt) + return gr(Y, G, e); + const Pt = T & 256 ? F( + 7104, + 512 + /* IterationStatementBlockIncludes */ + ) : F( + 6976, + 128 + /* BlockIncludes */ + ), It = gr(Y, G, e); + return V( + Pt, + 0, + 0 + /* None */ + ), It; + } + function st(Y) { + return gr(Y, ce, e); + } + function z(Y, tt) { + return gr(Y, tt ? ce : G, e); + } + function he(Y, tt) { + return p0(Y) ? mS( + Y, + G, + e, + 0, + !tt + ) : Y.operatorToken.kind === 28 ? t.updateBinaryExpression( + Y, + E.checkDefined(Ge(Y.left, ce, ct)), + Y.operatorToken, + E.checkDefined(Ge(Y.right, tt ? ce : G, ct)) + ) : gr(Y, G, e); + } + function q(Y, tt) { + if (tt) + return gr(Y, ce, e); + let Pt; + for (let hr = 0; hr < Y.elements.length; hr++) { + const zr = Y.elements[hr], Cn = Ge(zr, hr < Y.elements.length - 1 ? ce : G, ct); + (Pt || Cn !== zr) && (Pt || (Pt = Y.elements.slice(0, hr)), E.assert(Cn), Pt.push(Cn)); + } + const It = Pt ? ot(t.createNodeArray(Pt), Y.elements) : Y.elements; + return t.updateCommaListExpression(Y, It); + } + function we(Y) { + return Y.declarationList.declarations.length === 1 && !!Y.declarationList.declarations[0].initializer && !!(Qp(Y.declarationList.declarations[0].initializer) & 1); + } + function _e(Y) { + const tt = F( + 0, + Vn( + Y, + 32 + /* Export */ + ) ? 32 : 0 + /* None */ + ); + let Pt; + if (P && !(Y.declarationList.flags & 7) && !we(Y)) { + let It; + for (const hr of Y.declarationList.declarations) + if (wl(P, hr), hr.initializer) { + let zr; + Ts(hr.name) ? zr = mS( + hr, + G, + e, + 0 + /* All */ + ) : (zr = t.createBinaryExpression(hr.name, 64, E.checkDefined(Ge(hr.initializer, G, ct))), ot(zr, hr)), It = Tr(It, zr); + } + It ? Pt = ot(t.createExpressionStatement(t.inlineExpressions(It)), Y) : Pt = void 0; + } else + Pt = gr(Y, G, e); + return V( + tt, + 0, + 0 + /* None */ + ), Pt; + } + function Te(Y) { + if (Y.flags & 7 || Y.transformFlags & 524288) { + Y.flags & 7 && v_(); + const tt = Ar( + Y.declarations, + Y.flags & 1 ? wt : ir, + ti + ), Pt = t.createVariableDeclarationList(tt); + return kn(Pt, Y), ot(Pt, Y), el(Pt, Y), Y.transformFlags & 524288 && (Ts(Y.declarations[0].name) || Ts(ia(Y.declarations).name)) && aa(Pt, dt(tt)), Pt; + } + return gr(Y, G, e); + } + function dt(Y) { + let tt = -1, Pt = -1; + for (const It of Y) + tt = tt === -1 ? It.pos : It.pos === -1 ? tt : Math.min(tt, It.pos), Pt = Math.max(Pt, It.end); + return np(tt, Pt); + } + function xt(Y) { + const tt = u.hasNodeCheckFlag( + Y, + 16384 + /* CapturedBlockScopedBinding */ + ), Pt = u.hasNodeCheckFlag( + Y, + 32768 + /* BlockScopedBindingInLoop */ + ); + return !((T & 64) !== 0 || tt && Pt && (T & 512) !== 0) && (T & 4096) === 0 && (!u.isDeclarationWithCollidingName(Y) || Pt && !tt && (T & 6144) === 0); + } + function wt(Y) { + const tt = Y.name; + return Ts(tt) ? ir(Y) : !Y.initializer && xt(Y) ? t.updateVariableDeclaration( + Y, + Y.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createVoidZero() + ) : gr(Y, G, e); + } + function ir(Y) { + const tt = F( + 32, + 0 + /* None */ + ); + let Pt; + return Ts(Y.name) ? Pt = zb( + Y, + G, + e, + 0, + /*rval*/ + void 0, + (tt & 32) !== 0 + ) : Pt = gr(Y, G, e), V( + tt, + 0, + 0 + /* None */ + ), Pt; + } + function br(Y) { + P.labels.set(dn(Y.label), !0); + } + function Lr(Y) { + P.labels.set(dn(Y.label), !1); + } + function en(Y) { + P && !P.labels && (P.labels = /* @__PURE__ */ new Map()); + const tt = Qj(Y, P && br); + return fy( + tt, + /*lookInLabeledStatements*/ + !1 + ) ? fr( + tt, + /*outermostLabeledStatement*/ + Y + ) : t.restoreEnclosingLabel(E.checkDefined(Ge(tt, G, hi, t.liftToBlock)), Y, P && Lr); + } + function fr(Y, tt) { + switch (Y.kind) { + case 246: + case 247: + return Di(Y, tt); + case 248: + return Fi(Y, tt); + case 249: + return Mr(Y, tt); + case 250: + return Or(Y, tt); + } + } + function mn(Y, tt, Pt, It, hr) { + const zr = F(Y, tt), Cn = jo(Pt, It, zr, hr); + return V( + zr, + 0, + 0 + /* None */ + ), Cn; + } + function Di(Y, tt) { + return mn( + 0, + 1280, + Y, + tt + ); + } + function Fi(Y, tt) { + return mn( + 5056, + 3328, + Y, + tt + ); + } + function ur(Y) { + return t.updateForStatement( + Y, + Ge(Y.initializer, ce, tp), + Ge(Y.condition, G, ct), + Ge(Y.incrementor, ce, ct), + E.checkDefined(Ge(Y.statement, G, hi, t.liftToBlock)) + ); + } + function Mr(Y, tt) { + return mn( + 3008, + 5376, + Y, + tt + ); + } + function Or(Y, tt) { + return mn( + 3008, + 5376, + Y, + tt, + _.downlevelIteration ? $a : ma + ); + } + function tn(Y, tt, Pt) { + const It = [], hr = Y.initializer; + if (Il(hr)) { + Y.initializer.flags & 7 && v_(); + const zr = ul(hr.declarations); + if (zr && Ts(zr.name)) { + const Cn = zb( + zr, + G, + e, + 0, + tt + ), ei = ot(t.createVariableDeclarationList(Cn), Y.initializer); + kn(ei, Y.initializer), aa(ei, np(Cn[0].pos, ia(Cn).end)), It.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + ei + ) + ); + } else + It.push( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + kn( + ot( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + zr ? zr.name : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + tt + ) + ]), + Q1(hr, -1) + ), + hr + ) + ), + X7(hr, -1) + ) + ); + } else { + const zr = t.createAssignment(hr, tt); + p0(zr) ? It.push(t.createExpressionStatement(he( + zr, + /*expressionResultIsUnused*/ + !0 + ))) : (DC(zr, hr.end), It.push(ot(t.createExpressionStatement(E.checkDefined(Ge(zr, G, ct))), X7(hr, -1)))); + } + if (Pt) + return qt(Bn(It, Pt)); + { + const zr = Ge(Y.statement, G, hi, t.liftToBlock); + return E.assert(zr), ms(zr) ? t.updateBlock(zr, ot(t.createNodeArray(Hi(It, zr.statements)), zr.statements)) : (It.push(zr), qt(It)); + } + } + function qt(Y) { + return Kr( + t.createBlock( + t.createNodeArray(Y), + /*multiLine*/ + !0 + ), + 864 + /* NoTokenSourceMaps */ + ); + } + function ma(Y, tt, Pt) { + const It = Ge(Y.expression, G, ct); + E.assert(It); + const hr = t.createLoopVariable(), zr = Re(It) ? t.getGeneratedNameForNode(It) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + Kr(It, 96 | ua(It)); + const Cn = ot( + t.createForStatement( + /*initializer*/ + Kr( + ot( + t.createVariableDeclarationList([ + ot(t.createVariableDeclaration( + hr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createNumericLiteral(0) + ), Q1(Y.expression, -1)), + ot(t.createVariableDeclaration( + zr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + It + ), Y.expression) + ]), + Y.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + ot( + t.createLessThan( + hr, + t.createPropertyAccessExpression(zr, "length") + ), + Y.expression + ), + /*incrementor*/ + ot(t.createPostfixIncrement(hr), Y.expression), + /*statement*/ + tn( + Y, + t.createElementAccessExpression(zr, hr), + Pt + ) + ), + /*location*/ + Y + ); + return Kr( + Cn, + 512 + /* NoTokenTrailingSourceMaps */ + ), ot(Cn, Y), t.restoreEnclosingLabel(Cn, tt, P && Lr); + } + function $a(Y, tt, Pt, It) { + const hr = Ge(Y.expression, G, ct); + E.assert(hr); + const zr = Re(hr) ? t.getGeneratedNameForNode(hr) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), Cn = Re(hr) ? t.getGeneratedNameForNode(zr) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), ei = t.createUniqueName("e"), M = t.getGeneratedNameForNode(ei), ke = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), vt = ot(n().createValuesHelper(hr), Y.expression), Nr = t.createCallExpression( + t.createPropertyAccessExpression(zr, "next"), + /*typeArguments*/ + void 0, + [] + ); + c(ei), c(ke); + const ui = It & 1024 ? t.inlineExpressions([t.createAssignment(ei, t.createVoidZero()), vt]) : vt, ds = Kr( + ot( + t.createForStatement( + /*initializer*/ + Kr( + ot( + t.createVariableDeclarationList([ + ot(t.createVariableDeclaration( + zr, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ui + ), Y.expression), + t.createVariableDeclaration( + Cn, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Nr + ) + ]), + Y.expression + ), + 4194304 + /* NoHoisting */ + ), + /*condition*/ + t.createLogicalNot(t.createPropertyAccessExpression(Cn, "done")), + /*incrementor*/ + t.createAssignment(Cn, Nr), + /*statement*/ + tn( + Y, + t.createPropertyAccessExpression(Cn, "value"), + Pt + ) + ), + /*location*/ + Y + ), + 512 + /* NoTokenTrailingSourceMaps */ + ); + return t.createTryStatement( + t.createBlock([ + t.restoreEnclosingLabel( + ds, + tt, + P && Lr + ) + ]), + t.createCatchClause( + t.createVariableDeclaration(M), + Kr( + t.createBlock([ + t.createExpressionStatement( + t.createAssignment( + ei, + t.createObjectLiteralExpression([ + t.createPropertyAssignment("error", M) + ]) + ) + ) + ]), + 1 + /* SingleLine */ + ) + ), + t.createBlock([ + t.createTryStatement( + /*tryBlock*/ + t.createBlock([ + Kr( + t.createIfStatement( + t.createLogicalAnd( + t.createLogicalAnd( + Cn, + t.createLogicalNot( + t.createPropertyAccessExpression(Cn, "done") + ) + ), + t.createAssignment( + ke, + t.createPropertyAccessExpression(zr, "return") + ) + ), + t.createExpressionStatement( + t.createFunctionCallCall(ke, zr, []) + ) + ), + 1 + /* SingleLine */ + ) + ]), + /*catchClause*/ + void 0, + /*finallyBlock*/ + Kr( + t.createBlock([ + Kr( + t.createIfStatement( + ei, + t.createThrowStatement( + t.createPropertyAccessExpression(ei, "error") + ) + ), + 1 + /* SingleLine */ + ) + ]), + 1 + /* SingleLine */ + ) + ) + ]) + ); + } + function Ro(Y) { + const tt = Y.properties; + let Pt = -1, It = !1; + for (let ei = 0; ei < tt.length; ei++) { + const M = tt[ei]; + if (M.transformFlags & 1048576 && T & 4 || (It = E.checkDefined(M.name).kind === 167)) { + Pt = ei; + break; + } + } + if (Pt < 0) + return gr(Y, G, e); + const hr = t.createTempVariable(c), zr = [], Cn = t.createAssignment( + hr, + Kr( + t.createObjectLiteralExpression( + Ar(tt, G, lh, 0, Pt), + Y.multiLine + ), + It ? 131072 : 0 + ) + ); + return Y.multiLine && mu(Cn), zr.push(Cn), kr(zr, Y, hr, Pt), zr.push(Y.multiLine ? mu(Da(ot(t.cloneNode(hr), hr), hr.parent)) : hr), t.inlineExpressions(zr); + } + function Vo(Y) { + return u.hasNodeCheckFlag( + Y, + 8192 + /* ContainsCapturedBlockScopeBinding */ + ); + } + function hs(Y) { + return tv(Y) && !!Y.initializer && Vo(Y.initializer); + } + function ga(Y) { + return tv(Y) && !!Y.condition && Vo(Y.condition); + } + function Co(Y) { + return tv(Y) && !!Y.incrementor && Vo(Y.incrementor); + } + function Li(Y) { + return bi(Y) || hs(Y); + } + function bi(Y) { + return u.hasNodeCheckFlag( + Y, + 4096 + /* LoopWithCapturedBlockScopedBinding */ + ); + } + function wl(Y, tt) { + Y.hoistedLocalVariables || (Y.hoistedLocalVariables = []), Pt(tt.name); + function Pt(It) { + if (It.kind === 80) + Y.hoistedLocalVariables.push(It); + else + for (const hr of It.elements) + ml(hr) || Pt(hr.name); + } + } + function jo(Y, tt, Pt, It) { + if (!Li(Y)) { + let vt; + P && (vt = P.allowedNonLabeledJumps, P.allowedNonLabeledJumps = 6); + const Nr = It ? It( + Y, + tt, + /*convertedLoopBodyStatements*/ + void 0, + Pt + ) : t.restoreEnclosingLabel( + tv(Y) ? ur(Y) : gr(Y, G, e), + tt, + P && Lr + ); + return P && (P.allowedNonLabeledJumps = vt), Nr; + } + const hr = Fa(Y), zr = [], Cn = P; + P = hr; + const ei = hs(Y) ? Fu(Y, hr) : void 0, M = bi(Y) ? Lu(Y, hr, Cn) : void 0; + P = Cn, ei && zr.push(ei.functionDeclaration), M && zr.push(M.functionDeclaration), Bt(zr, hr, Cn), ei && zr.push(Uo(ei.functionName, ei.containsYield)); + let ke; + if (M) + if (It) + ke = It(Y, tt, M.part, Pt); + else { + const vt = Su(Y, ei, t.createBlock( + M.part, + /*multiLine*/ + !0 + )); + ke = t.restoreEnclosingLabel(vt, tt, P && Lr); + } + else { + const vt = Su(Y, ei, E.checkDefined(Ge(Y.statement, G, hi, t.liftToBlock))); + ke = t.restoreEnclosingLabel(vt, tt, P && Lr); + } + return zr.push(ke), zr; + } + function Su(Y, tt, Pt) { + switch (Y.kind) { + case 248: + return fc(Y, tt, Pt); + case 249: + return ea(Y, Pt); + case 250: + return ql(Y, Pt); + case 246: + return wo(Y, Pt); + case 247: + return Ka(Y, Pt); + default: + return E.failBadSyntaxKind(Y, "IterationStatement expected"); + } + } + function fc(Y, tt, Pt) { + const It = Y.condition && Vo(Y.condition), hr = It || Y.incrementor && Vo(Y.incrementor); + return t.updateForStatement( + Y, + Ge(tt ? tt.part : Y.initializer, ce, tp), + Ge(It ? void 0 : Y.condition, G, ct), + Ge(hr ? void 0 : Y.incrementor, ce, ct), + Pt + ); + } + function ql(Y, tt) { + return t.updateForOfStatement( + Y, + /*awaitModifier*/ + void 0, + E.checkDefined(Ge(Y.initializer, G, tp)), + E.checkDefined(Ge(Y.expression, G, ct)), + tt + ); + } + function ea(Y, tt) { + return t.updateForInStatement( + Y, + E.checkDefined(Ge(Y.initializer, G, tp)), + E.checkDefined(Ge(Y.expression, G, ct)), + tt + ); + } + function wo(Y, tt) { + return t.updateDoStatement( + Y, + tt, + E.checkDefined(Ge(Y.expression, G, ct)) + ); + } + function Ka(Y, tt) { + return t.updateWhileStatement( + Y, + E.checkDefined(Ge(Y.expression, G, ct)), + tt + ); + } + function Fa(Y) { + let tt; + switch (Y.kind) { + case 248: + case 249: + case 250: + const zr = Y.initializer; + zr && zr.kind === 261 && (tt = zr); + break; + } + const Pt = [], It = []; + if (tt && ch(tt) & 7) { + const zr = hs(Y) || ga(Y) || Co(Y); + for (const Cn of tt.declarations) + Ot(Y, Cn, Pt, It, zr); + } + const hr = { loopParameters: Pt, loopOutParameters: It }; + return P && (P.argumentsName && (hr.argumentsName = P.argumentsName), P.thisName && (hr.thisName = P.thisName), P.hoistedLocalVariables && (hr.hoistedLocalVariables = P.hoistedLocalVariables)), hr; + } + function Bt(Y, tt, Pt) { + let It; + if (tt.argumentsName && (Pt ? Pt.argumentsName = tt.argumentsName : (It || (It = [])).push( + t.createVariableDeclaration( + tt.argumentsName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("arguments") + ) + )), tt.thisName && (Pt ? Pt.thisName = tt.thisName : (It || (It = [])).push( + t.createVariableDeclaration( + tt.thisName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createIdentifier("this") + ) + )), tt.hoistedLocalVariables) + if (Pt) + Pt.hoistedLocalVariables = tt.hoistedLocalVariables; + else { + It || (It = []); + for (const hr of tt.hoistedLocalVariables) + It.push(t.createVariableDeclaration(hr)); + } + if (tt.loopOutParameters.length) { + It || (It = []); + for (const hr of tt.loopOutParameters) + It.push(t.createVariableDeclaration(hr.outParamName)); + } + tt.conditionVariable && (It || (It = []), It.push(t.createVariableDeclaration( + tt.conditionVariable, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createFalse() + ))), It && Y.push(t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList(It) + )); + } + function lc(Y) { + return t.createVariableDeclaration( + Y.originalName, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Y.outParamName + ); + } + function Fu(Y, tt) { + const Pt = t.createUniqueName("_loop_init"), It = (Y.initializer.transformFlags & 1048576) !== 0; + let hr = 0; + tt.containsLexicalThis && (hr |= 16), It && T & 4 && (hr |= 524288); + const zr = []; + zr.push(t.createVariableStatement( + /*modifiers*/ + void 0, + Y.initializer + )), Ao(tt.loopOutParameters, 2, 1, zr); + const Cn = t.createVariableStatement( + /*modifiers*/ + void 0, + Kr( + t.createVariableDeclarationList([ + t.createVariableDeclaration( + Pt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Kr( + t.createFunctionExpression( + /*modifiers*/ + void 0, + It ? t.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + void 0, + /*type*/ + void 0, + E.checkDefined(Ge( + t.createBlock( + zr, + /*multiLine*/ + !0 + ), + G, + ms + )) + ), + hr + ) + ) + ]), + 4194304 + /* NoHoisting */ + ) + ), ei = t.createVariableDeclarationList(or(tt.loopOutParameters, lc)); + return { functionName: Pt, containsYield: It, functionDeclaration: Cn, part: ei }; + } + function Lu(Y, tt, Pt) { + const It = t.createUniqueName("_loop"); + i(); + const hr = Ge(Y.statement, G, hi, t.liftToBlock), zr = o(), Cn = []; + (ga(Y) || Co(Y)) && (tt.conditionVariable = t.createUniqueName("inc"), Y.incrementor ? Cn.push(t.createIfStatement( + tt.conditionVariable, + t.createExpressionStatement(E.checkDefined(Ge(Y.incrementor, G, ct))), + t.createExpressionStatement(t.createAssignment(tt.conditionVariable, t.createTrue())) + )) : Cn.push(t.createIfStatement( + t.createLogicalNot(tt.conditionVariable), + t.createExpressionStatement(t.createAssignment(tt.conditionVariable, t.createTrue())) + )), ga(Y) && Cn.push(t.createIfStatement( + t.createPrefixUnaryExpression(54, E.checkDefined(Ge(Y.condition, G, ct))), + E.checkDefined(Ge(t.createBreakStatement(), G, hi)) + ))), E.assert(hr), ms(hr) ? Bn(Cn, hr.statements) : Cn.push(hr), Ao(tt.loopOutParameters, 1, 1, Cn), Pg(Cn, zr); + const ei = t.createBlock( + Cn, + /*multiLine*/ + !0 + ); + ms(hr) && kn(ei, hr); + const M = (Y.statement.transformFlags & 1048576) !== 0; + let ke = 1048576; + tt.containsLexicalThis && (ke |= 16), M && T & 4 && (ke |= 524288); + const vt = t.createVariableStatement( + /*modifiers*/ + void 0, + Kr( + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + It, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Kr( + t.createFunctionExpression( + /*modifiers*/ + void 0, + M ? t.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + tt.loopParameters, + /*type*/ + void 0, + ei + ), + ke + ) + ) + ] + ), + 4194304 + /* NoHoisting */ + ) + ), Nr = A(It, tt, Pt, M); + return { functionName: It, containsYield: M, functionDeclaration: vt, part: Nr }; + } + function y_(Y, tt) { + const Pt = tt === 0 ? Y.outParamName : Y.originalName, It = tt === 0 ? Y.originalName : Y.outParamName; + return t.createBinaryExpression(It, 64, Pt); + } + function Ao(Y, tt, Pt, It) { + for (const hr of Y) + hr.flags & tt && It.push(t.createExpressionStatement(y_(hr, Pt))); + } + function Uo(Y, tt) { + const Pt = t.createCallExpression( + Y, + /*typeArguments*/ + void 0, + [] + ), It = tt ? t.createYieldExpression( + t.createToken( + 42 + /* AsteriskToken */ + ), + Kr( + Pt, + 8388608 + /* Iterator */ + ) + ) : Pt; + return t.createExpressionStatement(It); + } + function A(Y, tt, Pt, It) { + const hr = [], zr = !(tt.nonLocalJumps & -5) && !tt.labeledNonLocalBreaks && !tt.labeledNonLocalContinues, Cn = t.createCallExpression( + Y, + /*typeArguments*/ + void 0, + or(tt.loopParameters, (M) => M.name) + ), ei = It ? t.createYieldExpression( + t.createToken( + 42 + /* AsteriskToken */ + ), + Kr( + Cn, + 8388608 + /* Iterator */ + ) + ) : Cn; + if (zr) + hr.push(t.createExpressionStatement(ei)), Ao(tt.loopOutParameters, 1, 0, hr); + else { + const M = t.createUniqueName("state"), ke = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [t.createVariableDeclaration( + M, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ei + )] + ) + ); + if (hr.push(ke), Ao(tt.loopOutParameters, 1, 0, hr), tt.nonLocalJumps & 8) { + let vt; + Pt ? (Pt.nonLocalJumps |= 8, vt = t.createReturnStatement(M)) : vt = t.createReturnStatement(t.createPropertyAccessExpression(M, "value")), hr.push( + t.createIfStatement( + t.createTypeCheck(M, "object"), + vt + ) + ); + } + if (tt.nonLocalJumps & 2 && hr.push( + t.createIfStatement( + t.createStrictEquality( + M, + t.createStringLiteral("break") + ), + t.createBreakStatement() + ) + ), tt.labeledNonLocalBreaks || tt.labeledNonLocalContinues) { + const vt = []; + it( + tt.labeledNonLocalBreaks, + /*isBreak*/ + !0, + M, + Pt, + vt + ), it( + tt.labeledNonLocalContinues, + /*isBreak*/ + !1, + M, + Pt, + vt + ), hr.push( + t.createSwitchStatement( + M, + t.createCaseBlock(vt) + ) + ); + } + } + return hr; + } + function Me(Y, tt, Pt, It) { + tt ? (Y.labeledNonLocalBreaks || (Y.labeledNonLocalBreaks = /* @__PURE__ */ new Map()), Y.labeledNonLocalBreaks.set(Pt, It)) : (Y.labeledNonLocalContinues || (Y.labeledNonLocalContinues = /* @__PURE__ */ new Map()), Y.labeledNonLocalContinues.set(Pt, It)); + } + function it(Y, tt, Pt, It, hr) { + Y && Y.forEach((zr, Cn) => { + const ei = []; + if (!It || It.labels && It.labels.get(Cn)) { + const M = t.createIdentifier(Cn); + ei.push(tt ? t.createBreakStatement(M) : t.createContinueStatement(M)); + } else + Me(It, tt, Cn, zr), ei.push(t.createReturnStatement(Pt)); + hr.push(t.createCaseClause(t.createStringLiteral(zr), ei)); + }); + } + function Ot(Y, tt, Pt, It, hr) { + const zr = tt.name; + if (Ts(zr)) + for (const Cn of zr.elements) + ml(Cn) || Ot(Y, Cn, Pt, It, hr); + else { + Pt.push(t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + zr + )); + const Cn = u.hasNodeCheckFlag( + tt, + 65536 + /* NeedsLoopOutParameter */ + ); + if (Cn || hr) { + const ei = t.createUniqueName("out_" + dn(zr)); + let M = 0; + Cn && (M |= 1), tv(Y) && (Y.initializer && u.isBindingCapturedByNode(Y.initializer, tt) && (M |= 2), (Y.condition && u.isBindingCapturedByNode(Y.condition, tt) || Y.incrementor && u.isBindingCapturedByNode(Y.incrementor, tt)) && (M |= 1)), It.push({ flags: M, originalName: zr, outParamName: ei }); + } + } + } + function kr(Y, tt, Pt, It) { + const hr = tt.properties, zr = hr.length; + for (let Cn = It; Cn < zr; Cn++) { + const ei = hr[Cn]; + switch (ei.kind) { + case 177: + case 178: + const M = gy(tt.properties, ei); + ei === M.firstAccessor && Y.push(ft(Pt, M, tt, !!tt.multiLine)); + break; + case 174: + Y.push(yn(ei, Pt, tt, tt.multiLine)); + break; + case 303: + Y.push(qn(ei, Pt, tt.multiLine)); + break; + case 304: + Y.push(Ht(ei, Pt, tt.multiLine)); + break; + default: + E.failBadSyntaxKind(tt); + break; + } + } + } + function qn(Y, tt, Pt) { + const It = t.createAssignment( + _S( + t, + tt, + E.checkDefined(Ge(Y.name, G, Rc)) + ), + E.checkDefined(Ge(Y.initializer, G, ct)) + ); + return ot(It, Y), Pt && mu(It), It; + } + function Ht(Y, tt, Pt) { + const It = t.createAssignment( + _S( + t, + tt, + E.checkDefined(Ge(Y.name, G, Rc)) + ), + t.cloneNode(Y.name) + ); + return ot(It, Y), Pt && mu(It), It; + } + function yn(Y, tt, Pt, It) { + const hr = t.createAssignment( + _S( + t, + tt, + E.checkDefined(Ge(Y.name, G, Rc)) + ), + Ut( + Y, + /*location*/ + Y, + /*name*/ + void 0, + Pt + ) + ); + return ot(hr, Y), It && mu(hr), hr; + } + function li(Y) { + const tt = F( + 7104, + 0 + /* BlockScopeIncludes */ + ); + let Pt; + if (E.assert(!!Y.variableDeclaration, "Catch clause variable should always be present when downleveling ES2015."), Ts(Y.variableDeclaration.name)) { + const It = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), hr = t.createVariableDeclaration(It); + ot(hr, Y.variableDeclaration); + const zr = zb( + Y.variableDeclaration, + G, + e, + 0, + It + ), Cn = t.createVariableDeclarationList(zr); + ot(Cn, Y.variableDeclaration); + const ei = t.createVariableStatement( + /*modifiers*/ + void 0, + Cn + ); + Pt = t.updateCatchClause(Y, hr, _i(Y.block, ei)); + } else + Pt = gr(Y, G, e); + return V( + tt, + 0, + 0 + /* None */ + ), Pt; + } + function _i(Y, tt) { + const Pt = Ar(Y.statements, G, hi); + return t.updateBlock(Y, [tt, ...Pt]); + } + function eo(Y) { + E.assert(!oa(Y.name)); + const tt = Ut( + Y, + /*location*/ + Q1(Y, -1), + /*name*/ + void 0, + /*container*/ + void 0 + ); + return Kr(tt, 1024 | ua(tt)), ot( + t.createPropertyAssignment( + Y.name, + tt + ), + /*location*/ + Y + ); + } + function qo(Y) { + E.assert(!oa(Y.name)); + const tt = P; + P = void 0; + const Pt = F( + 32670, + 65 + /* FunctionIncludes */ + ); + let It; + const hr = cc(Y.parameters, G, e), zr = W(Y); + return Y.kind === 177 ? It = t.updateGetAccessorDeclaration(Y, Y.modifiers, Y.name, hr, Y.type, zr) : It = t.updateSetAccessorDeclaration(Y, Y.modifiers, Y.name, hr, zr), V( + Pt, + 229376, + 0 + /* None */ + ), P = tt, It; + } + function ol(Y) { + return ot( + t.createPropertyAssignment( + Y.name, + ge(t.cloneNode(Y.name)) + ), + /*location*/ + Y + ); + } + function vo(Y) { + return gr(Y, G, e); + } + function cl(Y) { + return gr(Y, G, e); + } + function Eo(Y) { + return ut(Y.elements, cp) ? Jf( + Y.elements, + /*isArgumentList*/ + !1, + !!Y.multiLine, + /*hasTrailingComma*/ + !!Y.elements.hasTrailingComma + ) : gr(Y, G, e); + } + function gl(Y) { + if (Qp(Y) & 1) + return Cl(Y); + const tt = Bc(Y.expression); + return tt.kind === 108 || f_(tt) || ut(Y.arguments, cp) ? kc( + Y, + /*assignToCapturedThis*/ + !0 + ) : t.updateCallExpression( + Y, + E.checkDefined(Ge(Y.expression, X, ct)), + /*typeArguments*/ + void 0, + Ar(Y.arguments, G, ct) + ); + } + function Cl(Y) { + const tt = Is(Is(Bc(Y.expression), xo).body, ms), Pt = (tc) => yc(tc) && !!fa(tc.declarationList.declarations).initializer, It = P; + P = void 0; + const hr = Ar(tt.statements, K, hi); + P = It; + const zr = Ln(hr, Pt), Cn = Ln(hr, (tc) => !Pt(tc)), M = Is(fa(zr), yc).declarationList.declarations[0], ke = Bc(M.initializer); + let vt = Jn(ke, Tl); + !vt && cn(ke) && ke.operatorToken.kind === 28 && (vt = Jn(ke.left, Tl)); + const Nr = Is(vt ? Bc(vt.right) : ke, Es), ui = Is(Bc(Nr.expression), po), ds = ui.body.statements; + let Qi = 0, ys = -1; + const wa = []; + if (vt) { + const tc = Jn(ds[Qi], Pl); + tc && (wa.push(tc), Qi++), wa.push(ds[Qi]), Qi++, wa.push( + t.createExpressionStatement( + t.createAssignment( + vt.left, + Is(M.name, Re) + ) + ) + ); + } + for (; !Mp(ny(ds, ys)); ) + ys--; + Bn(wa, ds, Qi, ys), ys < -1 && Bn(wa, ds, ys + 1); + const ya = Jn(ny(ds, ys), Mp); + for (const tc of Cn) + Mp(tc) && ya?.expression && !Re(ya.expression) ? wa.push(ya) : wa.push(tc); + return Bn( + wa, + zr, + /*start*/ + 1 + ), t.restoreOuterExpressions( + Y.expression, + t.restoreOuterExpressions( + M.initializer, + t.restoreOuterExpressions( + vt && vt.right, + t.updateCallExpression( + Nr, + t.restoreOuterExpressions( + Nr.expression, + t.updateFunctionExpression( + ui, + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + ui.parameters, + /*type*/ + void 0, + t.updateBlock( + ui.body, + wa + ) + ) + ), + /*typeArguments*/ + void 0, + Nr.arguments + ) + ) + ) + ); + } + function kc(Y, tt) { + if (Y.transformFlags & 32768 || Y.expression.kind === 108 || f_(Bc(Y.expression))) { + const { target: Pt, thisArg: It } = t.createCallBinding(Y.expression, c); + Y.expression.kind === 108 && Kr( + It, + 8 + /* NoSubstitution */ + ); + let hr; + if (Y.transformFlags & 32768 ? hr = t.createFunctionApplyCall( + E.checkDefined(Ge(Pt, X, ct)), + Y.expression.kind === 108 ? It : E.checkDefined(Ge(It, G, ct)), + Jf( + Y.arguments, + /*isArgumentList*/ + !0, + /*multiLine*/ + !1, + /*hasTrailingComma*/ + !1 + ) + ) : hr = ot( + t.createFunctionCallCall( + E.checkDefined(Ge(Pt, X, ct)), + Y.expression.kind === 108 ? It : E.checkDefined(Ge(It, G, ct)), + Ar(Y.arguments, G, ct) + ), + Y + ), Y.expression.kind === 108) { + const zr = t.createLogicalOr( + hr, + mi() + ); + hr = tt ? t.createAssignment(H(), zr) : zr; + } + return kn(hr, Y); + } + return G2(Y) && (T |= 131072), gr(Y, G, e); + } + function F_(Y) { + if (ut(Y.arguments, cp)) { + const { target: tt, thisArg: Pt } = t.createCallBinding(t.createPropertyAccessExpression(Y.expression, "bind"), c); + return t.createNewExpression( + t.createFunctionApplyCall( + E.checkDefined(Ge(tt, G, ct)), + Pt, + Jf( + t.createNodeArray([t.createVoidZero(), ...Y.arguments]), + /*isArgumentList*/ + !0, + /*multiLine*/ + !1, + /*hasTrailingComma*/ + !1 + ) + ), + /*typeArguments*/ + void 0, + [] + ); + } + return gr(Y, G, e); + } + function Jf(Y, tt, Pt, It) { + const hr = Y.length, zr = Ep( + // As we visit each element, we return one of two functions to use as the "key": + // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` + // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` + nR(Y, Pe, (ke, vt, Nr, ui) => vt(ke, Pt, It && ui === hr)) + ); + if (zr.length === 1) { + const ke = zr[0]; + if (tt && !_.downlevelIteration || _J(ke.expression) || Y4(ke.expression, "___spreadArray")) + return ke.expression; + } + const Cn = n(), ei = zr[0].kind !== 0; + let M = ei ? t.createArrayLiteralExpression() : zr[0].expression; + for (let ke = ei ? 0 : 1; ke < zr.length; ke++) { + const vt = zr[ke]; + M = Cn.createSpreadArrayHelper( + M, + vt.expression, + vt.kind === 1 && !tt + ); + } + return M; + } + function Pe(Y) { + return cp(Y) ? Ct : Vi; + } + function Ct(Y) { + return or(Y, Jr); + } + function Jr(Y) { + E.assertNode(Y, cp); + let tt = Ge(Y.expression, G, ct); + E.assert(tt); + const Pt = Y4(tt, "___read"); + let It = Pt || _J(tt) ? 2 : 1; + return _.downlevelIteration && It === 1 && !Wl(tt) && !Pt && (tt = n().createReadHelper( + tt, + /*count*/ + void 0 + ), It = 2), lve(It, tt); + } + function Vi(Y, tt, Pt) { + const It = t.createArrayLiteralExpression( + Ar(t.createNodeArray(Y, Pt), G, ct), + tt + ); + return lve(0, It); + } + function ha(Y) { + return Ge(Y.expression, G, ct); + } + function Pa(Y) { + return ot(t.createStringLiteral(Y.text), Y); + } + function vc(Y) { + return Y.hasExtendedUnicodeEscape ? ot(t.createStringLiteral(Y.text), Y) : Y; + } + function Do(Y) { + return Y.numericLiteralFlags & 384 ? ot(t.createNumericLiteral(Y.text), Y) : Y; + } + function to(Y) { + return _W( + e, + Y, + G, + h, + D, + 1 + /* All */ + ); + } + function pc(Y) { + let tt = t.createStringLiteral(Y.head.text); + for (const Pt of Y.templateSpans) { + const It = [E.checkDefined(Ge(Pt.expression, G, ct))]; + Pt.literal.text.length > 0 && It.push(t.createStringLiteral(Pt.literal.text)), tt = t.createCallExpression( + t.createPropertyAccessExpression(tt, "concat"), + /*typeArguments*/ + void 0, + It + ); + } + return ot(tt, Y); + } + function Cc() { + return t.createUniqueName( + "_super", + 48 + /* FileLevel */ + ); + } + function bf(Y, tt) { + const Pt = T & 8 && !tt ? t.createPropertyAccessExpression(kn(Cc(), Y), "prototype") : Cc(); + return kn(Pt, Y), el(Pt, Y), aa(Pt, Y), Pt; + } + function Id(Y) { + return Y.keywordToken === 105 && Y.name.escapedText === "target" ? (T |= 32768, t.createUniqueName( + "_newTarget", + 48 + /* FileLevel */ + )) : Y; + } + function zf(Y, tt, Pt) { + if (O & 1 && ps(tt)) { + const It = F( + 32670, + ua(tt) & 16 ? 81 : 65 + /* FunctionIncludes */ + ); + g(Y, tt, Pt), V( + It, + 0, + 0 + /* None */ + ); + return; + } + g(Y, tt, Pt); + } + function v_() { + O & 2 || (O |= 2, e.enableSubstitution( + 80 + /* Identifier */ + )); + } + function pp() { + O & 1 || (O |= 1, e.enableSubstitution( + 110 + /* ThisKeyword */ + ), e.enableEmitNotification( + 176 + /* Constructor */ + ), e.enableEmitNotification( + 174 + /* MethodDeclaration */ + ), e.enableEmitNotification( + 177 + /* GetAccessor */ + ), e.enableEmitNotification( + 178 + /* SetAccessor */ + ), e.enableEmitNotification( + 219 + /* ArrowFunction */ + ), e.enableEmitNotification( + 218 + /* FunctionExpression */ + ), e.enableEmitNotification( + 262 + /* FunctionDeclaration */ + )); + } + function Wf(Y, tt) { + return tt = d(Y, tt), Y === 1 ? b_(tt) : Re(tt) ? tg(tt) : tt; + } + function tg(Y) { + if (O & 2 && !YJ(Y)) { + const tt = Ki(Y, Re); + if (tt && rg(tt)) + return ot(t.getGeneratedNameForNode(tt), Y); + } + return Y; + } + function rg(Y) { + switch (Y.parent.kind) { + case 208: + case 263: + case 266: + case 260: + return Y.parent.name === Y && u.isDeclarationWithCollidingName(Y.parent); + } + return !1; + } + function b_(Y) { + switch (Y.kind) { + case 80: + return Gc(Y); + case 110: + return L_(Y); + } + return Y; + } + function Gc(Y) { + if (O & 2 && !YJ(Y)) { + const tt = u.getReferencedDeclarationWithCollidingName(Y); + if (tt && !(Qn(tt) && ng(tt, Y))) + return ot(t.getGeneratedNameForNode(es(tt)), Y); + } + return Y; + } + function ng(Y, tt) { + let Pt = Ki(tt); + if (!Pt || Pt === Y || Pt.end <= Y.pos || Pt.pos >= Y.end) + return !1; + const It = bd(Y); + for (; Pt; ) { + if (Pt === It || Pt === Y) + return !1; + if (fl(Pt) && Pt.parent === Y) + return !0; + Pt = Pt.parent; + } + return !1; + } + function L_(Y) { + return O & 1 && T & 16 ? ot(H(), Y) : Y; + } + function bm(Y, tt) { + return Os(tt) ? t.getInternalName(Y) : t.createPropertyAccessExpression(t.getInternalName(Y), "prototype"); + } + function Vf(Y, tt) { + if (!Y || !tt || ut(Y.parameters)) + return !1; + const Pt = ul(Y.body.statements); + if (!Pt || !oo(Pt) || Pt.kind !== 244) + return !1; + const It = Pt.expression; + if (!oo(It) || It.kind !== 213) + return !1; + const hr = It.expression; + if (!oo(hr) || hr.kind !== 108) + return !1; + const zr = Rm(It.arguments); + if (!zr || !oo(zr) || zr.kind !== 230) + return !1; + const Cn = zr.expression; + return Re(Cn) && Cn.escapedText === "arguments"; + } + } + function aRe(e) { + switch (e) { + case 2: + return "return"; + case 3: + return "break"; + case 4: + return "yield"; + case 5: + return "yield*"; + case 7: + return "endfinally"; + default: + return; + } + } + function oie(e) { + const { + factory: t, + getEmitHelperFactory: n, + resumeLexicalEnvironment: i, + endLexicalEnvironment: s, + hoistFunctionDeclaration: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = pa(_), d = e.getEmitResolver(), g = e.onSubstituteNode; + e.onSubstituteNode = st; + let h, S, T, C, D, P, O, j, F, V, L = 1, $, U, G, ce, K = 0, X = 0, Z, oe, ne, pe, fe, H, ae, le; + return Pd(e, Ae); + function Ae(Pe) { + if (Pe.isDeclarationFile || !(Pe.transformFlags & 2048)) + return Pe; + const Ct = gr(Pe, ge, e); + return vh(Ct, e.readEmitHelpers()), Ct; + } + function ge(Pe) { + const Ct = Pe.transformFlags; + return C ? de(Pe) : T ? ve(Pe) : so(Pe) && Pe.asteriskToken ? Xe(Pe) : Ct & 2048 ? gr(Pe, ge, e) : Pe; + } + function de(Pe) { + switch (Pe.kind) { + case 246: + return Ps(Pe); + case 247: + return Yt(Pe); + case 255: + return ft(Pe); + case 256: + return kt(Pe); + default: + return ve(Pe); + } + } + function ve(Pe) { + switch (Pe.kind) { + case 262: + return Ie(Pe); + case 218: + return ye(Pe); + case 177: + case 178: + return Fe(Pe); + case 243: + return Ke(Pe); + case 248: + return $e(Pe); + case 249: + return te(Pe); + case 252: + return Ne(Pe); + case 251: + return re(Pe); + case 253: + return lt(Pe); + default: + return Pe.transformFlags & 1048576 ? De(Pe) : Pe.transformFlags & 4196352 ? gr(Pe, ge, e) : Pe; + } + } + function De(Pe) { + switch (Pe.kind) { + case 226: + return Be(Pe); + case 355: + return Kt(Pe); + case 227: + return Vt(Pe); + case 229: + return zt(Pe); + case 209: + return jr(Pe); + case 210: + return Xt(Pe); + case 212: + return Ai(Pe); + case 213: + return _s(Pe); + case 214: + return $n(Pe); + default: + return gr(Pe, ge, e); + } + } + function Xe(Pe) { + switch (Pe.kind) { + case 262: + return Ie(Pe); + case 218: + return ye(Pe); + default: + return E.failBadSyntaxKind(Pe); + } + } + function Ie(Pe) { + if (Pe.asteriskToken) + Pe = kn( + ot( + t.createFunctionDeclaration( + Pe.modifiers, + /*asteriskToken*/ + void 0, + Pe.name, + /*typeParameters*/ + void 0, + cc(Pe.parameters, ge, e), + /*type*/ + void 0, + Qe(Pe.body) + ), + /*location*/ + Pe + ), + Pe + ); + else { + const Ct = T, Jr = C; + T = !1, C = !1, Pe = gr(Pe, ge, e), T = Ct, C = Jr; + } + if (T) { + o(Pe); + return; + } else + return Pe; + } + function ye(Pe) { + if (Pe.asteriskToken) + Pe = kn( + ot( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + Pe.name, + /*typeParameters*/ + void 0, + cc(Pe.parameters, ge, e), + /*type*/ + void 0, + Qe(Pe.body) + ), + /*location*/ + Pe + ), + Pe + ); + else { + const Ct = T, Jr = C; + T = !1, C = !1, Pe = gr(Pe, ge, e), T = Ct, C = Jr; + } + return Pe; + } + function Fe(Pe) { + const Ct = T, Jr = C; + return T = !1, C = !1, Pe = gr(Pe, ge, e), T = Ct, C = Jr, Pe; + } + function Qe(Pe) { + const Ct = [], Jr = T, Vi = C, ha = D, Pa = P, vc = O, Do = j, to = F, pc = V, Cc = L, bf = $, Id = U, zf = G, v_ = ce; + T = !0, C = !1, D = void 0, P = void 0, O = void 0, j = void 0, F = void 0, V = void 0, L = 1, $ = void 0, U = void 0, G = void 0, ce = t.createTempVariable( + /*recordTempVariable*/ + void 0 + ), i(); + const pp = t.copyPrologue( + Pe.statements, + Ct, + /*ensureUseStrict*/ + !1, + ge + ); + os(Pe.statements, pp); + const Wf = Me(); + return Pg(Ct, s()), Ct.push(t.createReturnStatement(Wf)), T = Jr, C = Vi, D = ha, P = Pa, O = vc, j = Do, F = to, V = pc, L = Cc, $ = bf, U = Id, G = zf, ce = v_, ot(t.createBlock(Ct, Pe.multiLine), Pe); + } + function Ke(Pe) { + if (Pe.transformFlags & 1048576) { + ln(Pe.declarationList); + return; + } else { + if (ua(Pe) & 2097152) + return Pe; + for (const Jr of Pe.declarationList.declarations) + c(Jr.name); + const Ct = P4(Pe.declarationList); + return Ct.length === 0 ? void 0 : aa( + t.createExpressionStatement( + t.inlineExpressions( + or(Ct, Zn) + ) + ), + Pe + ); + } + } + function Be(Pe) { + const Ct = hB(Pe); + switch (Ct) { + case 0: + return Wt(Pe); + case 1: + return at(Pe); + default: + return E.assertNever(Ct); + } + } + function at(Pe) { + const { left: Ct, right: Jr } = Pe; + if (W(Jr)) { + let Vi; + switch (Ct.kind) { + case 211: + Vi = t.updatePropertyAccessExpression( + Ct, + q(E.checkDefined(Ge(Ct.expression, ge, __))), + Ct.name + ); + break; + case 212: + Vi = t.updateElementAccessExpression(Ct, q(E.checkDefined(Ge(Ct.expression, ge, __))), q(E.checkDefined(Ge(Ct.argumentExpression, ge, ct)))); + break; + default: + Vi = E.checkDefined(Ge(Ct, ge, ct)); + break; + } + const ha = Pe.operatorToken.kind; + return ED(ha) ? ot( + t.createAssignment( + Vi, + ot( + t.createBinaryExpression( + q(Vi), + DD(ha), + E.checkDefined(Ge(Jr, ge, ct)) + ), + Pe + ) + ), + Pe + ) : t.updateBinaryExpression(Pe, Vi, Pe.operatorToken, E.checkDefined(Ge(Jr, ge, ct))); + } + return gr(Pe, ge, e); + } + function Wt(Pe) { + return W(Pe.right) ? EK(Pe.operatorToken.kind) ? Pr(Pe) : Pe.operatorToken.kind === 28 ? nr(Pe) : t.updateBinaryExpression(Pe, q(E.checkDefined(Ge(Pe.left, ge, ct))), Pe.operatorToken, E.checkDefined(Ge(Pe.right, ge, ct))) : gr(Pe, ge, e); + } + function nr(Pe) { + let Ct = []; + return Jr(Pe.left), Jr(Pe.right), t.inlineExpressions(Ct); + function Jr(Vi) { + cn(Vi) && Vi.operatorToken.kind === 28 ? (Jr(Vi.left), Jr(Vi.right)) : (W(Vi) && Ct.length > 0 && (A(1, [t.createExpressionStatement(t.inlineExpressions(Ct))]), Ct = []), Ct.push(E.checkDefined(Ge(Vi, ge, ct)))); + } + } + function Kt(Pe) { + let Ct = []; + for (const Jr of Pe.elements) + cn(Jr) && Jr.operatorToken.kind === 28 ? Ct.push(nr(Jr)) : (W(Jr) && Ct.length > 0 && (A(1, [t.createExpressionStatement(t.inlineExpressions(Ct))]), Ct = []), Ct.push(E.checkDefined(Ge(Jr, ge, ct)))); + return t.inlineExpressions(Ct); + } + function Pr(Pe) { + const Ct = _e(), Jr = we(); + return Ka( + Jr, + E.checkDefined(Ge(Pe.left, ge, ct)), + /*location*/ + Pe.left + ), Pe.operatorToken.kind === 56 ? lc( + Ct, + Jr, + /*location*/ + Pe.left + ) : Bt( + Ct, + Jr, + /*location*/ + Pe.left + ), Ka( + Jr, + E.checkDefined(Ge(Pe.right, ge, ct)), + /*location*/ + Pe.right + ), Te(Ct), Jr; + } + function Vt(Pe) { + if (W(Pe.whenTrue) || W(Pe.whenFalse)) { + const Ct = _e(), Jr = _e(), Vi = we(); + return lc( + Ct, + E.checkDefined(Ge(Pe.condition, ge, ct)), + /*location*/ + Pe.condition + ), Ka( + Vi, + E.checkDefined(Ge(Pe.whenTrue, ge, ct)), + /*location*/ + Pe.whenTrue + ), Fa(Jr), Te(Ct), Ka( + Vi, + E.checkDefined(Ge(Pe.whenFalse, ge, ct)), + /*location*/ + Pe.whenFalse + ), Te(Jr), Vi; + } + return gr(Pe, ge, e); + } + function zt(Pe) { + const Ct = _e(), Jr = Ge(Pe.expression, ge, ct); + if (Pe.asteriskToken) { + const Vi = ua(Pe.expression) & 8388608 ? Jr : ot(n().createValuesHelper(Jr), Pe); + Fu( + Vi, + /*location*/ + Pe + ); + } else + Lu( + Jr, + /*location*/ + Pe + ); + return Te(Ct), ql( + /*location*/ + Pe + ); + } + function jr(Pe) { + return ci( + Pe.elements, + /*leadingElement*/ + void 0, + /*location*/ + void 0, + Pe.multiLine + ); + } + function ci(Pe, Ct, Jr, Vi) { + const ha = je(Pe); + let Pa; + if (ha > 0) { + Pa = we(); + const to = Ar(Pe, ge, ct, 0, ha); + Ka( + Pa, + t.createArrayLiteralExpression( + Ct ? [Ct, ...to] : to + ) + ), Ct = void 0; + } + const vc = Eu(Pe, Do, [], ha); + return Pa ? t.createArrayConcatCall(Pa, [t.createArrayLiteralExpression(vc, Vi)]) : ot( + t.createArrayLiteralExpression(Ct ? [Ct, ...vc] : vc, Vi), + Jr + ); + function Do(to, pc) { + if (W(pc) && to.length > 0) { + const Cc = Pa !== void 0; + Pa || (Pa = we()), Ka( + Pa, + Cc ? t.createArrayConcatCall( + Pa, + [t.createArrayLiteralExpression(to, Vi)] + ) : t.createArrayLiteralExpression( + Ct ? [Ct, ...to] : to, + Vi + ) + ), Ct = void 0, to = []; + } + return to.push(E.checkDefined(Ge(pc, ge, ct))), to; + } + } + function Xt(Pe) { + const Ct = Pe.properties, Jr = Pe.multiLine, Vi = je(Ct), ha = we(); + Ka( + ha, + t.createObjectLiteralExpression( + Ar(Ct, ge, lh, 0, Vi), + Jr + ) + ); + const Pa = Eu(Ct, vc, [], Vi); + return Pa.push(Jr ? mu(Da(ot(t.cloneNode(ha), ha), ha.parent)) : ha), t.inlineExpressions(Pa); + function vc(Do, to) { + W(to) && Do.length > 0 && (wo(t.createExpressionStatement(t.inlineExpressions(Do))), Do = []); + const pc = Hte(t, Pe, to, ha), Cc = Ge(pc, ge, ct); + return Cc && (Jr && mu(Cc), Do.push(Cc)), Do; + } + } + function Ai(Pe) { + return W(Pe.argumentExpression) ? t.updateElementAccessExpression(Pe, q(E.checkDefined(Ge(Pe.expression, ge, __))), E.checkDefined(Ge(Pe.argumentExpression, ge, ct))) : gr(Pe, ge, e); + } + function _s(Pe) { + if (!hf(Pe) && rr(Pe.arguments, W)) { + const { target: Ct, thisArg: Jr } = t.createCallBinding( + Pe.expression, + c, + u, + /*cacheIdentifiers*/ + !0 + ); + return kn( + ot( + t.createFunctionApplyCall( + q(E.checkDefined(Ge(Ct, ge, __))), + Jr, + ci(Pe.arguments) + ), + Pe + ), + Pe + ); + } + return gr(Pe, ge, e); + } + function $n(Pe) { + if (rr(Pe.arguments, W)) { + const { target: Ct, thisArg: Jr } = t.createCallBinding(t.createPropertyAccessExpression(Pe.expression, "bind"), c); + return kn( + ot( + t.createNewExpression( + t.createFunctionApplyCall( + q(E.checkDefined(Ge(Ct, ge, ct))), + Jr, + ci( + Pe.arguments, + /*leadingElement*/ + t.createVoidZero() + ) + ), + /*typeArguments*/ + void 0, + [] + ), + Pe + ), + Pe + ); + } + return gr(Pe, ge, e); + } + function os(Pe, Ct = 0) { + const Jr = Pe.length; + for (let Vi = Ct; Vi < Jr; Vi++) + Ss(Pe[Vi]); + } + function wr(Pe) { + ms(Pe) ? os(Pe.statements) : Ss(Pe); + } + function Ss(Pe) { + const Ct = C; + C || (C = W(Pe)), Le(Pe), C = Ct; + } + function Le(Pe) { + switch (Pe.kind) { + case 241: + return At(Pe); + case 244: + return vr(Pe); + case 245: + return ri(Pe); + case 246: + return mi(Pe); + case 247: + return ws(Pe); + case 248: + return Ca(Pe); + case 249: + return nt(Pe); + case 251: + return rt(Pe); + case 252: + return Ee(Pe); + case 253: + return et(Pe); + case 254: + return jt(Pe); + case 255: + return be(Pe); + case 256: + return bt(Pe); + case 257: + return yt(Pe); + case 258: + return Ut(Pe); + default: + return wo(Ge(Pe, ge, hi)); + } + } + function At(Pe) { + W(Pe) ? os(Pe.statements) : wo(Ge(Pe, ge, hi)); + } + function vr(Pe) { + wo(Ge(Pe, ge, hi)); + } + function ln(Pe) { + for (const Pa of Pe.declarations) { + const vc = t.cloneNode(Pa.name); + el(vc, Pa.name), c(vc); + } + const Ct = P4(Pe), Jr = Ct.length; + let Vi = 0, ha = []; + for (; Vi < Jr; ) { + for (let Pa = Vi; Pa < Jr; Pa++) { + const vc = Ct[Pa]; + if (W(vc.initializer) && ha.length > 0) + break; + ha.push(Zn(vc)); + } + ha.length && (wo(t.createExpressionStatement(t.inlineExpressions(ha))), Vi += ha.length, ha = []); + } + } + function Zn(Pe) { + return aa( + t.createAssignment( + aa(t.cloneNode(Pe.name), Pe.name), + E.checkDefined(Ge(Pe.initializer, ge, ct)) + ), + Pe + ); + } + function ri(Pe) { + if (W(Pe)) + if (W(Pe.thenStatement) || W(Pe.elseStatement)) { + const Ct = _e(), Jr = Pe.elseStatement ? _e() : void 0; + lc( + Pe.elseStatement ? Jr : Ct, + E.checkDefined(Ge(Pe.expression, ge, ct)), + /*location*/ + Pe.expression + ), wr(Pe.thenStatement), Pe.elseStatement && (Fa(Ct), Te(Jr), wr(Pe.elseStatement)), Te(Ct); + } else + wo(Ge(Pe, ge, hi)); + else + wo(Ge(Pe, ge, hi)); + } + function mi(Pe) { + if (W(Pe)) { + const Ct = _e(), Jr = _e(); + ur( + /*continueLabel*/ + Ct + ), Te(Jr), wr(Pe.statement), Te(Ct), Bt(Jr, E.checkDefined(Ge(Pe.expression, ge, ct))), Mr(); + } else + wo(Ge(Pe, ge, hi)); + } + function Ps(Pe) { + return C ? (Fi(), Pe = gr(Pe, ge, e), Mr(), Pe) : gr(Pe, ge, e); + } + function ws(Pe) { + if (W(Pe)) { + const Ct = _e(), Jr = ur(Ct); + Te(Ct), lc(Jr, E.checkDefined(Ge(Pe.expression, ge, ct))), wr(Pe.statement), Fa(Ct), Mr(); + } else + wo(Ge(Pe, ge, hi)); + } + function Yt(Pe) { + return C ? (Fi(), Pe = gr(Pe, ge, e), Mr(), Pe) : gr(Pe, ge, e); + } + function Ca(Pe) { + if (W(Pe)) { + const Ct = _e(), Jr = _e(), Vi = ur(Jr); + if (Pe.initializer) { + const ha = Pe.initializer; + Il(ha) ? ln(ha) : wo( + ot( + t.createExpressionStatement( + E.checkDefined(Ge(ha, ge, ct)) + ), + ha + ) + ); + } + Te(Ct), Pe.condition && lc(Vi, E.checkDefined(Ge(Pe.condition, ge, ct))), wr(Pe.statement), Te(Jr), Pe.incrementor && wo( + ot( + t.createExpressionStatement( + E.checkDefined(Ge(Pe.incrementor, ge, ct)) + ), + Pe.incrementor + ) + ), Fa(Ct), Mr(); + } else + wo(Ge(Pe, ge, hi)); + } + function $e(Pe) { + C && Fi(); + const Ct = Pe.initializer; + if (Ct && Il(Ct)) { + for (const Vi of Ct.declarations) + c(Vi.name); + const Jr = P4(Ct); + Pe = t.updateForStatement( + Pe, + Jr.length > 0 ? t.inlineExpressions(or(Jr, Zn)) : void 0, + Ge(Pe.condition, ge, ct), + Ge(Pe.incrementor, ge, ct), + Zu(Pe.statement, ge, e) + ); + } else + Pe = gr(Pe, ge, e); + return C && Mr(), Pe; + } + function nt(Pe) { + if (W(Pe)) { + const Ct = we(), Jr = we(), Vi = we(), ha = t.createLoopVariable(), Pa = Pe.initializer; + c(ha), Ka(Ct, E.checkDefined(Ge(Pe.expression, ge, ct))), Ka(Jr, t.createArrayLiteralExpression()), wo( + t.createForInStatement( + Vi, + Ct, + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(Jr, "push"), + /*typeArguments*/ + void 0, + [Vi] + ) + ) + ) + ), Ka(ha, t.createNumericLiteral(0)); + const vc = _e(), Do = _e(), to = ur(Do); + Te(vc), lc(to, t.createLessThan(ha, t.createPropertyAccessExpression(Jr, "length"))), Ka(Vi, t.createElementAccessExpression(Jr, ha)), lc(Do, t.createBinaryExpression(Vi, 103, Ct)); + let pc; + if (Il(Pa)) { + for (const Cc of Pa.declarations) + c(Cc.name); + pc = t.cloneNode(Pa.declarations[0].name); + } else + pc = E.checkDefined(Ge(Pa, ge, ct)), E.assert(__(pc)); + Ka(pc, Vi), wr(Pe.statement), Te(Do), wo(t.createExpressionStatement(t.createPostfixIncrement(ha))), Fa(vc), Mr(); + } else + wo(Ge(Pe, ge, hi)); + } + function te(Pe) { + C && Fi(); + const Ct = Pe.initializer; + if (Il(Ct)) { + for (const Jr of Ct.declarations) + c(Jr.name); + Pe = t.updateForInStatement(Pe, Ct.declarations[0].name, E.checkDefined(Ge(Pe.expression, ge, ct)), E.checkDefined(Ge(Pe.statement, ge, hi, t.liftToBlock))); + } else + Pe = gr(Pe, ge, e); + return C && Mr(), Pe; + } + function rt(Pe) { + const Ct = bi(Pe.label ? dn(Pe.label) : void 0); + Ct > 0 ? Fa( + Ct, + /*location*/ + Pe + ) : wo(Pe); + } + function re(Pe) { + if (C) { + const Ct = bi(Pe.label && dn(Pe.label)); + if (Ct > 0) + return Su( + Ct, + /*location*/ + Pe + ); + } + return gr(Pe, ge, e); + } + function Ee(Pe) { + const Ct = Li(Pe.label ? dn(Pe.label) : void 0); + Ct > 0 ? Fa( + Ct, + /*location*/ + Pe + ) : wo(Pe); + } + function Ne(Pe) { + if (C) { + const Ct = Li(Pe.label && dn(Pe.label)); + if (Ct > 0) + return Su( + Ct, + /*location*/ + Pe + ); + } + return gr(Pe, ge, e); + } + function et(Pe) { + y_( + Ge(Pe.expression, ge, ct), + /*location*/ + Pe + ); + } + function lt(Pe) { + return fc( + Ge(Pe.expression, ge, ct), + /*location*/ + Pe + ); + } + function jt(Pe) { + W(Pe) ? (br(q(E.checkDefined(Ge(Pe.expression, ge, ct)))), wr(Pe.statement), Lr()) : wo(Ge(Pe, ge, hi)); + } + function be(Pe) { + if (W(Pe.caseBlock)) { + const Ct = Pe.caseBlock, Jr = Ct.clauses.length, Vi = tn(), ha = q(E.checkDefined(Ge(Pe.expression, ge, ct))), Pa = []; + let vc = -1; + for (let pc = 0; pc < Jr; pc++) { + const Cc = Ct.clauses[pc]; + Pa.push(_e()), Cc.kind === 297 && vc === -1 && (vc = pc); + } + let Do = 0, to = []; + for (; Do < Jr; ) { + let pc = 0; + for (let Cc = Do; Cc < Jr; Cc++) { + const bf = Ct.clauses[Cc]; + if (bf.kind === 296) { + if (W(bf.expression) && to.length > 0) + break; + to.push( + t.createCaseClause( + E.checkDefined(Ge(bf.expression, ge, ct)), + [ + Su( + Pa[Cc], + /*location*/ + bf.expression + ) + ] + ) + ); + } else + pc++; + } + to.length && (wo(t.createSwitchStatement(ha, t.createCaseBlock(to))), Do += to.length, to = []), pc > 0 && (Do += pc, pc = 0); + } + vc >= 0 ? Fa(Pa[vc]) : Fa(Vi); + for (let pc = 0; pc < Jr; pc++) + Te(Pa[pc]), os(Ct.clauses[pc].statements); + qt(); + } else + wo(Ge(Pe, ge, hi)); + } + function ft(Pe) { + return C && Or(), Pe = gr(Pe, ge, e), C && qt(), Pe; + } + function bt(Pe) { + W(Pe) ? ($a(dn(Pe.label)), wr(Pe.statement), Ro()) : wo(Ge(Pe, ge, hi)); + } + function kt(Pe) { + return C && ma(dn(Pe.label)), Pe = gr(Pe, ge, e), C && Ro(), Pe; + } + function yt(Pe) { + Ao( + E.checkDefined(Ge(Pe.expression ?? t.createVoidZero(), ge, ct)), + /*location*/ + Pe + ); + } + function Ut(Pe) { + W(Pe) ? (en(), wr(Pe.tryBlock), Pe.catchClause && (fr(Pe.catchClause.variableDeclaration), wr(Pe.catchClause.block)), Pe.finallyBlock && (mn(), wr(Pe.finallyBlock)), Di()) : wo(gr(Pe, ge, e)); + } + function W(Pe) { + return !!Pe && (Pe.transformFlags & 1048576) !== 0; + } + function je(Pe) { + const Ct = Pe.length; + for (let Jr = 0; Jr < Ct; Jr++) + if (W(Pe[Jr])) + return Jr; + return -1; + } + function st(Pe, Ct) { + return Ct = g(Pe, Ct), Pe === 1 ? z(Ct) : Ct; + } + function z(Pe) { + return Re(Pe) ? he(Pe) : Pe; + } + function he(Pe) { + if (!Fo(Pe) && h && h.has(dn(Pe))) { + const Ct = Zo(Pe); + if (Re(Ct) && Ct.parent) { + const Jr = d.getReferencedValueDeclaration(Ct); + if (Jr) { + const Vi = S[Ku(Jr)]; + if (Vi) { + const ha = Da(ot(t.cloneNode(Vi), Vi), Vi.parent); + return aa(ha, Pe), el(ha, Pe), ha; + } + } + } + } + return Pe; + } + function q(Pe) { + if (Fo(Pe) || ua(Pe) & 8192) + return Pe; + const Ct = t.createTempVariable(c); + return Ka( + Ct, + Pe, + /*location*/ + Pe + ), Ct; + } + function we(Pe) { + const Ct = Pe ? t.createUniqueName(Pe) : t.createTempVariable( + /*recordTempVariable*/ + void 0 + ); + return c(Ct), Ct; + } + function _e() { + F || (F = []); + const Pe = L; + return L++, F[Pe] = -1, Pe; + } + function Te(Pe) { + E.assert(F !== void 0, "No labels were defined."), F[Pe] = $ ? $.length : 0; + } + function dt(Pe) { + D || (D = [], O = [], P = [], j = []); + const Ct = O.length; + return O[Ct] = 0, P[Ct] = $ ? $.length : 0, D[Ct] = Pe, j.push(Pe), Ct; + } + function xt() { + const Pe = wt(); + if (Pe === void 0) return E.fail("beginBlock was never called."); + const Ct = O.length; + return O[Ct] = 1, P[Ct] = $ ? $.length : 0, D[Ct] = Pe, j.pop(), Pe; + } + function wt() { + return Bo(j); + } + function ir() { + const Pe = wt(); + return Pe && Pe.kind; + } + function br(Pe) { + const Ct = _e(), Jr = _e(); + Te(Ct), dt({ + kind: 1, + expression: Pe, + startLabel: Ct, + endLabel: Jr + }); + } + function Lr() { + E.assert( + ir() === 1 + /* With */ + ); + const Pe = xt(); + Te(Pe.endLabel); + } + function en() { + const Pe = _e(), Ct = _e(); + return Te(Pe), dt({ + kind: 0, + state: 0, + startLabel: Pe, + endLabel: Ct + }), ea(), Ct; + } + function fr(Pe) { + E.assert( + ir() === 0 + /* Exception */ + ); + let Ct; + if (Fo(Pe.name)) + Ct = Pe.name, c(Pe.name); + else { + const Pa = dn(Pe.name); + Ct = we(Pa), h || (h = /* @__PURE__ */ new Map(), S = [], e.enableSubstitution( + 80 + /* Identifier */ + )), h.set(Pa, !0), S[Ku(Pe)] = Ct; + } + const Jr = wt(); + E.assert( + Jr.state < 1 + /* Catch */ + ); + const Vi = Jr.endLabel; + Fa(Vi); + const ha = _e(); + Te(ha), Jr.state = 1, Jr.catchVariable = Ct, Jr.catchLabel = ha, Ka(Ct, t.createCallExpression( + t.createPropertyAccessExpression(ce, "sent"), + /*typeArguments*/ + void 0, + [] + )), ea(); + } + function mn() { + E.assert( + ir() === 0 + /* Exception */ + ); + const Pe = wt(); + E.assert( + Pe.state < 2 + /* Finally */ + ); + const Ct = Pe.endLabel; + Fa(Ct); + const Jr = _e(); + Te(Jr), Pe.state = 2, Pe.finallyLabel = Jr; + } + function Di() { + E.assert( + ir() === 0 + /* Exception */ + ); + const Pe = xt(); + Pe.state < 2 ? Fa(Pe.endLabel) : Uo(), Te(Pe.endLabel), ea(), Pe.state = 3; + } + function Fi() { + dt({ + kind: 3, + isScript: !0, + breakLabel: -1, + continueLabel: -1 + }); + } + function ur(Pe) { + const Ct = _e(); + return dt({ + kind: 3, + isScript: !1, + breakLabel: Ct, + continueLabel: Pe + }), Ct; + } + function Mr() { + E.assert( + ir() === 3 + /* Loop */ + ); + const Pe = xt(), Ct = Pe.breakLabel; + Pe.isScript || Te(Ct); + } + function Or() { + dt({ + kind: 2, + isScript: !0, + breakLabel: -1 + }); + } + function tn() { + const Pe = _e(); + return dt({ + kind: 2, + isScript: !1, + breakLabel: Pe + }), Pe; + } + function qt() { + E.assert( + ir() === 2 + /* Switch */ + ); + const Pe = xt(), Ct = Pe.breakLabel; + Pe.isScript || Te(Ct); + } + function ma(Pe) { + dt({ + kind: 4, + isScript: !0, + labelText: Pe, + breakLabel: -1 + }); + } + function $a(Pe) { + const Ct = _e(); + dt({ + kind: 4, + isScript: !1, + labelText: Pe, + breakLabel: Ct + }); + } + function Ro() { + E.assert( + ir() === 4 + /* Labeled */ + ); + const Pe = xt(); + Pe.isScript || Te(Pe.breakLabel); + } + function Vo(Pe) { + return Pe.kind === 2 || Pe.kind === 3; + } + function hs(Pe) { + return Pe.kind === 4; + } + function ga(Pe) { + return Pe.kind === 3; + } + function Co(Pe, Ct) { + for (let Jr = Ct; Jr >= 0; Jr--) { + const Vi = j[Jr]; + if (hs(Vi)) { + if (Vi.labelText === Pe) + return !0; + } else + break; + } + return !1; + } + function Li(Pe) { + if (j) + if (Pe) + for (let Ct = j.length - 1; Ct >= 0; Ct--) { + const Jr = j[Ct]; + if (hs(Jr) && Jr.labelText === Pe) + return Jr.breakLabel; + if (Vo(Jr) && Co(Pe, Ct - 1)) + return Jr.breakLabel; + } + else + for (let Ct = j.length - 1; Ct >= 0; Ct--) { + const Jr = j[Ct]; + if (Vo(Jr)) + return Jr.breakLabel; + } + return 0; + } + function bi(Pe) { + if (j) + if (Pe) + for (let Ct = j.length - 1; Ct >= 0; Ct--) { + const Jr = j[Ct]; + if (ga(Jr) && Co(Pe, Ct - 1)) + return Jr.continueLabel; + } + else + for (let Ct = j.length - 1; Ct >= 0; Ct--) { + const Jr = j[Ct]; + if (ga(Jr)) + return Jr.continueLabel; + } + return 0; + } + function wl(Pe) { + if (Pe !== void 0 && Pe > 0) { + V === void 0 && (V = []); + const Ct = t.createNumericLiteral(Number.MAX_SAFE_INTEGER); + return V[Pe] === void 0 ? V[Pe] = [Ct] : V[Pe].push(Ct), Ct; + } + return t.createOmittedExpression(); + } + function jo(Pe) { + const Ct = t.createNumericLiteral(Pe); + return F5(Ct, 3, aRe(Pe)), Ct; + } + function Su(Pe, Ct) { + return E.assertLessThan(0, Pe, "Invalid label"), ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 3 + /* Break */ + ), + wl(Pe) + ]) + ), + Ct + ); + } + function fc(Pe, Ct) { + return ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Pe ? [jo( + 2 + /* Return */ + ), Pe] : [jo( + 2 + /* Return */ + )] + ) + ), + Ct + ); + } + function ql(Pe) { + return ot( + t.createCallExpression( + t.createPropertyAccessExpression(ce, "sent"), + /*typeArguments*/ + void 0, + [] + ), + Pe + ); + } + function ea() { + A( + 0 + /* Nop */ + ); + } + function wo(Pe) { + Pe ? A(1, [Pe]) : ea(); + } + function Ka(Pe, Ct, Jr) { + A(2, [Pe, Ct], Jr); + } + function Fa(Pe, Ct) { + A(3, [Pe], Ct); + } + function Bt(Pe, Ct, Jr) { + A(4, [Pe, Ct], Jr); + } + function lc(Pe, Ct, Jr) { + A(5, [Pe, Ct], Jr); + } + function Fu(Pe, Ct) { + A(7, [Pe], Ct); + } + function Lu(Pe, Ct) { + A(6, [Pe], Ct); + } + function y_(Pe, Ct) { + A(8, [Pe], Ct); + } + function Ao(Pe, Ct) { + A(9, [Pe], Ct); + } + function Uo() { + A( + 10 + /* Endfinally */ + ); + } + function A(Pe, Ct, Jr) { + $ === void 0 && ($ = [], U = [], G = []), F === void 0 && Te(_e()); + const Vi = $.length; + $[Vi] = Pe, U[Vi] = Ct, G[Vi] = Jr; + } + function Me() { + K = 0, X = 0, Z = void 0, oe = !1, ne = !1, pe = void 0, fe = void 0, H = void 0, ae = void 0, le = void 0; + const Pe = it(); + return n().createGeneratorHelper( + Kr( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + ce + )], + /*type*/ + void 0, + t.createBlock( + Pe, + /*multiLine*/ + Pe.length > 0 + ) + ), + 1048576 + /* ReuseTempVariableScope */ + ) + ); + } + function it() { + if ($) { + for (let Pe = 0; Pe < $.length; Pe++) + eo(Pe); + kr($.length); + } else + kr(0); + if (pe) { + const Pe = t.createPropertyAccessExpression(ce, "label"), Ct = t.createSwitchStatement(Pe, t.createCaseBlock(pe)); + return [mu(Ct)]; + } + return fe || []; + } + function Ot() { + fe && (Ht( + /*markLabelEnd*/ + !oe + ), oe = !1, ne = !1, X++); + } + function kr(Pe) { + qn(Pe) && (yn(Pe), le = void 0, cl( + /*expression*/ + void 0, + /*operationLocation*/ + void 0 + )), fe && pe && Ht( + /*markLabelEnd*/ + !1 + ), li(); + } + function qn(Pe) { + if (!ne) + return !0; + if (!F || !V) + return !1; + for (let Ct = 0; Ct < F.length; Ct++) + if (F[Ct] === Pe && V[Ct]) + return !0; + return !1; + } + function Ht(Pe) { + if (pe || (pe = []), fe) { + if (le) + for (let Ct = le.length - 1; Ct >= 0; Ct--) { + const Jr = le[Ct]; + fe = [t.createWithStatement(Jr.expression, t.createBlock(fe))]; + } + if (ae) { + const { startLabel: Ct, catchLabel: Jr, finallyLabel: Vi, endLabel: ha } = ae; + fe.unshift( + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(t.createPropertyAccessExpression(ce, "trys"), "push"), + /*typeArguments*/ + void 0, + [ + t.createArrayLiteralExpression([ + wl(Ct), + wl(Jr), + wl(Vi), + wl(ha) + ]) + ] + ) + ) + ), ae = void 0; + } + Pe && fe.push( + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression(ce, "label"), + t.createNumericLiteral(X + 1) + ) + ) + ); + } + pe.push( + t.createCaseClause( + t.createNumericLiteral(X), + fe || [] + ) + ), fe = void 0; + } + function yn(Pe) { + if (F) + for (let Ct = 0; Ct < F.length; Ct++) + F[Ct] === Pe && (Ot(), Z === void 0 && (Z = []), Z[X] === void 0 ? Z[X] = [Ct] : Z[X].push(Ct)); + } + function li() { + if (V !== void 0 && Z !== void 0) + for (let Pe = 0; Pe < Z.length; Pe++) { + const Ct = Z[Pe]; + if (Ct !== void 0) + for (const Jr of Ct) { + const Vi = V[Jr]; + if (Vi !== void 0) + for (const ha of Vi) + ha.text = String(Pe); + } + } + } + function _i(Pe) { + if (D) + for (; K < O.length && P[K] <= Pe; K++) { + const Ct = D[K], Jr = O[K]; + switch (Ct.kind) { + case 0: + Jr === 0 ? (H || (H = []), fe || (fe = []), H.push(ae), ae = Ct) : Jr === 1 && (ae = H.pop()); + break; + case 1: + Jr === 0 ? (le || (le = []), le.push(Ct)) : Jr === 1 && le.pop(); + break; + } + } + } + function eo(Pe) { + if (yn(Pe), _i(Pe), oe) + return; + oe = !1, ne = !1; + const Ct = $[Pe]; + if (Ct === 0) + return; + if (Ct === 10) + return Jf(); + const Jr = U[Pe]; + if (Ct === 1) + return qo(Jr[0]); + const Vi = G[Pe]; + switch (Ct) { + case 2: + return ol(Jr[0], Jr[1], Vi); + case 3: + return Eo(Jr[0], Vi); + case 4: + return gl(Jr[0], Jr[1], Vi); + case 5: + return Cl(Jr[0], Jr[1], Vi); + case 6: + return kc(Jr[0], Vi); + case 7: + return F_(Jr[0], Vi); + case 8: + return cl(Jr[0], Vi); + case 9: + return vo(Jr[0], Vi); + } + } + function qo(Pe) { + Pe && (fe ? fe.push(Pe) : fe = [Pe]); + } + function ol(Pe, Ct, Jr) { + qo(ot(t.createExpressionStatement(t.createAssignment(Pe, Ct)), Jr)); + } + function vo(Pe, Ct) { + oe = !0, ne = !0, qo(ot(t.createThrowStatement(Pe), Ct)); + } + function cl(Pe, Ct) { + oe = !0, ne = !0, qo( + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Pe ? [jo( + 2 + /* Return */ + ), Pe] : [jo( + 2 + /* Return */ + )] + ) + ), + Ct + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function Eo(Pe, Ct) { + oe = !0, qo( + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 3 + /* Break */ + ), + wl(Pe) + ]) + ), + Ct + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function gl(Pe, Ct, Jr) { + qo( + Kr( + t.createIfStatement( + Ct, + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 3 + /* Break */ + ), + wl(Pe) + ]) + ), + Jr + ), + 768 + /* NoTokenSourceMaps */ + ) + ), + 1 + /* SingleLine */ + ) + ); + } + function Cl(Pe, Ct, Jr) { + qo( + Kr( + t.createIfStatement( + t.createLogicalNot(Ct), + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 3 + /* Break */ + ), + wl(Pe) + ]) + ), + Jr + ), + 768 + /* NoTokenSourceMaps */ + ) + ), + 1 + /* SingleLine */ + ) + ); + } + function kc(Pe, Ct) { + oe = !0, qo( + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression( + Pe ? [jo( + 4 + /* Yield */ + ), Pe] : [jo( + 4 + /* Yield */ + )] + ) + ), + Ct + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function F_(Pe, Ct) { + oe = !0, qo( + Kr( + ot( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 5 + /* YieldStar */ + ), + Pe + ]) + ), + Ct + ), + 768 + /* NoTokenSourceMaps */ + ) + ); + } + function Jf() { + oe = !0, qo( + t.createReturnStatement( + t.createArrayLiteralExpression([ + jo( + 7 + /* Endfinally */ + ) + ]) + ) + ); + } + } + function pW(e) { + function t(W) { + switch (W) { + case 2: + return $; + case 3: + return U; + default: + return L; + } + } + const { + factory: n, + getEmitHelperFactory: i, + startLexicalEnvironment: s, + endLexicalEnvironment: o, + hoistVariableDeclaration: c + } = e, _ = e.getCompilerOptions(), u = e.getEmitResolver(), d = e.getEmitHost(), g = pa(_), h = Nu(_), S = e.onSubstituteNode, T = e.onEmitNode; + e.onSubstituteNode = lt, e.onEmitNode = et, e.enableSubstitution( + 213 + /* CallExpression */ + ), e.enableSubstitution( + 215 + /* TaggedTemplateExpression */ + ), e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 226 + /* BinaryExpression */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + const C = []; + let D, P; + const O = []; + let j; + return Pd(e, F); + function F(W) { + if (W.isDeclarationFile || !(NT(W, _) || W.transformFlags & 8388608 || Ap(W) && a5(_) && _.outFile)) + return W; + D = W, P = sW(e, W), C[Ku(W)] = P; + const st = t(h)(W); + return D = void 0, P = void 0, j = !1, st; + } + function V() { + return Lg(D.fileName) && D.commonJsModuleIndicator && (!D.externalModuleIndicator || D.externalModuleIndicator === !0) ? !1 : !!(!P.exportEquals && il(D)); + } + function L(W) { + s(); + const je = [], st = Iu(_, "alwaysStrict") || il(D), z = n.copyPrologue(W.statements, je, st && !Ap(W), Z); + if (V() && Tr(je, rt()), ut(P.exportedNames)) + for (let we = 0; we < P.exportedNames.length; we += 50) + Tr( + je, + n.createExpressionStatement( + Eu( + P.exportedNames.slice(we, we + 50), + (_e, Te) => n.createAssignment(n.createPropertyAccessExpression(n.createIdentifier("exports"), n.createIdentifier(dn(Te))), _e), + n.createVoidZero() + ) + ) + ); + for (const q of P.exportedFunctions) + $e(je, q); + Tr(je, Ge(P.externalHelpersImportDeclaration, Z, hi)), Bn(je, Ar(W.statements, Z, hi, z)), X( + je, + /*emitAsReturn*/ + !1 + ), Pg(je, o()); + const he = n.updateSourceFile(W, ot(n.createNodeArray(je), W.statements)); + return vh(he, e.readEmitHelpers()), he; + } + function $(W) { + const je = n.createIdentifier("define"), st = _A(n, W, d, _), z = Ap(W) && W, { aliasedModuleNames: he, unaliasedModuleNames: q, importAliasNames: we } = G( + W, + /*includeNonAmdDependencies*/ + !0 + ), _e = n.updateSourceFile( + W, + ot( + n.createNodeArray([ + n.createExpressionStatement( + n.createCallExpression( + je, + /*typeArguments*/ + void 0, + [ + // Add the module name (if provided). + ...st ? [st] : [], + // Add the dependency array argument: + // + // ["require", "exports", module1", "module2", ...] + n.createArrayLiteralExpression( + z ? He : [ + n.createStringLiteral("require"), + n.createStringLiteral("exports"), + ...he, + ...q + ] + ), + // Add the module body function argument: + // + // function (require, exports, module1, module2) ... + z ? z.statements.length ? z.statements[0].expression : n.createObjectLiteralExpression() : n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "require" + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "exports" + ), + ...we + ], + /*type*/ + void 0, + K(W) + ) + ] + ) + ) + ]), + /*location*/ + W.statements + ) + ); + return vh(_e, e.readEmitHelpers()), _e; + } + function U(W) { + const { aliasedModuleNames: je, unaliasedModuleNames: st, importAliasNames: z } = G( + W, + /*includeNonAmdDependencies*/ + !1 + ), he = _A(n, W, d, _), q = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "factory" + )], + /*type*/ + void 0, + ot( + n.createBlock( + [ + n.createIfStatement( + n.createLogicalAnd( + n.createTypeCheck(n.createIdentifier("module"), "object"), + n.createTypeCheck(n.createPropertyAccessExpression(n.createIdentifier("module"), "exports"), "object") + ), + n.createBlock([ + n.createVariableStatement( + /*modifiers*/ + void 0, + [ + n.createVariableDeclaration( + "v", + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.createCallExpression( + n.createIdentifier("factory"), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("require"), + n.createIdentifier("exports") + ] + ) + ) + ] + ), + Kr( + n.createIfStatement( + n.createStrictInequality( + n.createIdentifier("v"), + n.createIdentifier("undefined") + ), + n.createExpressionStatement( + n.createAssignment( + n.createPropertyAccessExpression(n.createIdentifier("module"), "exports"), + n.createIdentifier("v") + ) + ) + ), + 1 + /* SingleLine */ + ) + ]), + n.createIfStatement( + n.createLogicalAnd( + n.createTypeCheck(n.createIdentifier("define"), "function"), + n.createPropertyAccessExpression(n.createIdentifier("define"), "amd") + ), + n.createBlock([ + n.createExpressionStatement( + n.createCallExpression( + n.createIdentifier("define"), + /*typeArguments*/ + void 0, + [ + // Add the module name (if provided). + ...he ? [he] : [], + n.createArrayLiteralExpression([ + n.createStringLiteral("require"), + n.createStringLiteral("exports"), + ...je, + ...st + ]), + n.createIdentifier("factory") + ] + ) + ) + ]) + ) + ) + ], + /*multiLine*/ + !0 + ), + /*location*/ + void 0 + ) + ), we = n.updateSourceFile( + W, + ot( + n.createNodeArray([ + n.createExpressionStatement( + n.createCallExpression( + q, + /*typeArguments*/ + void 0, + [ + // Add the module body function argument: + // + // function (require, exports) ... + n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "require" + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "exports" + ), + ...z + ], + /*type*/ + void 0, + K(W) + ) + ] + ) + ) + ]), + /*location*/ + W.statements + ) + ); + return vh(we, e.readEmitHelpers()), we; + } + function G(W, je) { + const st = [], z = [], he = []; + for (const q of W.amdDependencies) + q.name ? (st.push(n.createStringLiteral(q.path)), he.push(n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + q.name + ))) : z.push(n.createStringLiteral(q.path)); + for (const q of P.externalImports) { + const we = xx(n, q, D, d, u, _), _e = jC(n, q, D); + we && (je && _e ? (Kr( + _e, + 8 + /* NoSubstitution */ + ), st.push(we), he.push(n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + _e + ))) : z.push(we)); + } + return { aliasedModuleNames: st, unaliasedModuleNames: z, importAliasNames: he }; + } + function ce(W) { + if (nl(W) || Ic(W) || !xx(n, W, D, d, u, _)) + return; + const je = jC(n, W, D), st = _s(W, je); + if (st !== je) + return n.createExpressionStatement(n.createAssignment(je, st)); + } + function K(W) { + s(); + const je = [], st = n.copyPrologue( + W.statements, + je, + /*ensureUseStrict*/ + !0, + Z + ); + V() && Tr(je, rt()), ut(P.exportedNames) && Tr(je, n.createExpressionStatement(Eu(P.exportedNames, (he, q) => n.createAssignment(n.createPropertyAccessExpression(n.createIdentifier("exports"), n.createIdentifier(dn(q))), he), n.createVoidZero()))); + for (const he of P.exportedFunctions) + $e(je, he); + Tr(je, Ge(P.externalHelpersImportDeclaration, Z, hi)), h === 2 && Bn(je, Ii(P.externalImports, ce)), Bn(je, Ar(W.statements, Z, hi, st)), X( + je, + /*emitAsReturn*/ + !0 + ), Pg(je, o()); + const z = n.createBlock( + je, + /*multiLine*/ + !0 + ); + return j && ox(z, oRe), z; + } + function X(W, je) { + if (P.exportEquals) { + const st = Ge(P.exportEquals.expression, pe, ct); + if (st) + if (je) { + const z = n.createReturnStatement(st); + ot(z, P.exportEquals), Kr( + z, + 3840 + /* NoComments */ + ), W.push(z); + } else { + const z = n.createExpressionStatement( + n.createAssignment( + n.createPropertyAccessExpression( + n.createIdentifier("module"), + "exports" + ), + st + ) + ); + ot(z, P.exportEquals), Kr( + z, + 3072 + /* NoComments */ + ), W.push(z); + } + } + } + function Z(W) { + switch (W.kind) { + case 272: + return $n(W); + case 271: + return wr(W); + case 278: + return Ss(W); + case 277: + return Le(W); + default: + return oe(W); + } + } + function oe(W) { + switch (W.kind) { + case 243: + return ln(W); + case 262: + return At(W); + case 263: + return vr(W); + case 248: + return le( + W, + /*isTopLevel*/ + !0 + ); + case 249: + return Ae(W); + case 250: + return ge(W); + case 246: + return de(W); + case 247: + return ve(W); + case 256: + return De(W); + case 254: + return Xe(W); + case 245: + return Ie(W); + case 255: + return ye(W); + case 269: + return Fe(W); + case 296: + return Qe(W); + case 297: + return Ke(W); + case 258: + return Be(W); + case 299: + return at(W); + case 241: + return Wt(W); + default: + return pe(W); + } + } + function ne(W, je) { + if (!(W.transformFlags & 276828160)) + return W; + switch (W.kind) { + case 248: + return le( + W, + /*isTopLevel*/ + !1 + ); + case 244: + return nr(W); + case 217: + return Kt(W, je); + case 354: + return Pr(W, je); + case 213: + if (hf(W) && D.impliedNodeFormat === void 0) + return zt(W); + break; + case 226: + if (p0(W)) + return ae(W, je); + break; + case 224: + case 225: + return Vt(W, je); + } + return gr(W, pe, e); + } + function pe(W) { + return ne( + W, + /*valueIsDiscarded*/ + !1 + ); + } + function fe(W) { + return ne( + W, + /*valueIsDiscarded*/ + !0 + ); + } + function H(W) { + if (Gs(W)) + for (const je of W.properties) + switch (je.kind) { + case 303: + if (H(je.initializer)) + return !0; + break; + case 304: + if (H(je.name)) + return !0; + break; + case 305: + if (H(je.expression)) + return !0; + break; + case 174: + case 177: + case 178: + return !1; + default: + E.assertNever(je, "Unhandled object member kind"); + } + else if (Wl(W)) { + for (const je of W.elements) + if (cp(je)) { + if (H(je.expression)) + return !0; + } else if (H(je)) + return !0; + } else if (Re(W)) + return Dr(Ut(W)) > (iO(W) ? 1 : 0); + return !1; + } + function ae(W, je) { + return H(W.left) ? mS(W, pe, e, 0, !je, Zn) : gr(W, pe, e); + } + function le(W, je) { + if (je && W.initializer && Il(W.initializer) && !(W.initializer.flags & 7)) { + const st = Yt( + /*statements*/ + void 0, + W.initializer, + /*isForInOrOfInitializer*/ + !1 + ); + if (st) { + const z = [], he = Ge(W.initializer, fe, Il), q = n.createVariableStatement( + /*modifiers*/ + void 0, + he + ); + z.push(q), Bn(z, st); + const we = Ge(W.condition, pe, ct), _e = Ge(W.incrementor, fe, ct), Te = Zu(W.statement, je ? oe : pe, e); + return z.push(n.updateForStatement( + W, + /*initializer*/ + void 0, + we, + _e, + Te + )), z; + } + } + return n.updateForStatement( + W, + Ge(W.initializer, fe, tp), + Ge(W.condition, pe, ct), + Ge(W.incrementor, fe, ct), + Zu(W.statement, je ? oe : pe, e) + ); + } + function Ae(W) { + if (Il(W.initializer) && !(W.initializer.flags & 7)) { + const je = Yt( + /*statements*/ + void 0, + W.initializer, + /*isForInOrOfInitializer*/ + !0 + ); + if (ut(je)) { + const st = Ge(W.initializer, fe, tp), z = Ge(W.expression, pe, ct), he = Zu(W.statement, oe, e), q = ms(he) ? n.updateBlock(he, [...je, ...he.statements]) : n.createBlock( + [...je, he], + /*multiLine*/ + !0 + ); + return n.updateForInStatement(W, st, z, q); + } + } + return n.updateForInStatement( + W, + Ge(W.initializer, fe, tp), + Ge(W.expression, pe, ct), + Zu(W.statement, oe, e) + ); + } + function ge(W) { + if (Il(W.initializer) && !(W.initializer.flags & 7)) { + const je = Yt( + /*statements*/ + void 0, + W.initializer, + /*isForInOrOfInitializer*/ + !0 + ), st = Ge(W.initializer, fe, tp), z = Ge(W.expression, pe, ct); + let he = Zu(W.statement, oe, e); + return ut(je) && (he = ms(he) ? n.updateBlock(he, [...je, ...he.statements]) : n.createBlock( + [...je, he], + /*multiLine*/ + !0 + )), n.updateForOfStatement(W, W.awaitModifier, st, z, he); + } + return n.updateForOfStatement( + W, + W.awaitModifier, + Ge(W.initializer, fe, tp), + Ge(W.expression, pe, ct), + Zu(W.statement, oe, e) + ); + } + function de(W) { + return n.updateDoStatement( + W, + Zu(W.statement, oe, e), + Ge(W.expression, pe, ct) + ); + } + function ve(W) { + return n.updateWhileStatement( + W, + Ge(W.expression, pe, ct), + Zu(W.statement, oe, e) + ); + } + function De(W) { + return n.updateLabeledStatement( + W, + W.label, + E.checkDefined(Ge(W.statement, oe, hi, n.liftToBlock)) + ); + } + function Xe(W) { + return n.updateWithStatement( + W, + Ge(W.expression, pe, ct), + E.checkDefined(Ge(W.statement, oe, hi, n.liftToBlock)) + ); + } + function Ie(W) { + return n.updateIfStatement( + W, + Ge(W.expression, pe, ct), + E.checkDefined(Ge(W.thenStatement, oe, hi, n.liftToBlock)), + Ge(W.elseStatement, oe, hi, n.liftToBlock) + ); + } + function ye(W) { + return n.updateSwitchStatement( + W, + Ge(W.expression, pe, ct), + E.checkDefined(Ge(W.caseBlock, oe, aD)) + ); + } + function Fe(W) { + return n.updateCaseBlock( + W, + Ar(W.clauses, oe, GI) + ); + } + function Qe(W) { + return n.updateCaseClause( + W, + Ge(W.expression, pe, ct), + Ar(W.statements, oe, hi) + ); + } + function Ke(W) { + return gr(W, oe, e); + } + function Be(W) { + return gr(W, oe, e); + } + function at(W) { + return n.updateCatchClause( + W, + W.variableDeclaration, + E.checkDefined(Ge(W.block, oe, ms)) + ); + } + function Wt(W) { + return W = gr(W, oe, e), W; + } + function nr(W) { + return n.updateExpressionStatement( + W, + Ge(W.expression, fe, ct) + ); + } + function Kt(W, je) { + return n.updateParenthesizedExpression(W, Ge(W.expression, je ? fe : pe, ct)); + } + function Pr(W, je) { + return n.updatePartiallyEmittedExpression(W, Ge(W.expression, je ? fe : pe, ct)); + } + function Vt(W, je) { + if ((W.operator === 46 || W.operator === 47) && Re(W.operand) && !Fo(W.operand) && !xh(W.operand) && !BB(W.operand)) { + const st = Ut(W.operand); + if (st) { + let z, he = Ge(W.operand, pe, ct); + Ey(W) ? he = n.updatePrefixUnaryExpression(W, he) : (he = n.updatePostfixUnaryExpression(W, he), je || (z = n.createTempVariable(c), he = n.createAssignment(z, he), ot(he, W)), he = n.createComma(he, n.cloneNode(W.operand)), ot(he, W)); + for (const q of st) + O[ja(he)] = !0, he = Ee(q, he), ot(he, W); + return z && (O[ja(he)] = !0, he = n.createComma(he, z), ot(he, W)), he; + } + } + return gr(W, pe, e); + } + function zt(W) { + if (h === 0 && g >= 7) + return gr(W, pe, e); + const je = xx(n, W, D, d, u, _), st = Ge(ul(W.arguments), pe, ct), z = je && (!st || !Ks(st) || st.text !== je.text) ? je : st, he = !!(W.transformFlags & 16384); + switch (_.module) { + case 2: + return ci(z, he); + case 3: + return jr(z ?? n.createVoidZero(), he); + case 1: + default: + return Xt(z); + } + } + function jr(W, je) { + if (j = !0, Jb(W)) { + const st = Fo(W) ? W : Ks(W) ? n.createStringLiteralFromNode(W) : Kr( + ot(n.cloneNode(W), W), + 3072 + /* NoComments */ + ); + return n.createConditionalExpression( + /*condition*/ + n.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + Xt(W), + /*colonToken*/ + void 0, + /*whenFalse*/ + ci(st, je) + ); + } else { + const st = n.createTempVariable(c); + return n.createComma( + n.createAssignment(st, W), + n.createConditionalExpression( + /*condition*/ + n.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + Xt( + st, + /*isInlineable*/ + !0 + ), + /*colonToken*/ + void 0, + /*whenFalse*/ + ci(st, je) + ) + ); + } + } + function ci(W, je) { + const st = n.createUniqueName("resolve"), z = n.createUniqueName("reject"), he = [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + st + ), + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + z + ) + ], q = n.createBlock([ + n.createExpressionStatement( + n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + [n.createArrayLiteralExpression([W || n.createOmittedExpression()]), st, z] + ) + ) + ]); + let we; + g >= 2 ? we = n.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + he, + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + q + ) : (we = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + he, + /*type*/ + void 0, + q + ), je && Kr( + we, + 16 + /* CapturesThis */ + )); + const _e = n.createNewExpression( + n.createIdentifier("Promise"), + /*typeArguments*/ + void 0, + [we] + ); + return Fg(_) ? n.createCallExpression( + n.createPropertyAccessExpression(_e, n.createIdentifier("then")), + /*typeArguments*/ + void 0, + [i().createImportStarCallbackHelper()] + ) : _e; + } + function Xt(W, je) { + const st = W && !mm(W) && !je, z = n.createCallExpression( + n.createPropertyAccessExpression(n.createIdentifier("Promise"), "resolve"), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + st ? g >= 2 ? [ + n.createTemplateExpression(n.createTemplateHead(""), [ + n.createTemplateSpan(W, n.createTemplateTail("")) + ]) + ] : [ + n.createCallExpression( + n.createPropertyAccessExpression(n.createStringLiteral(""), "concat"), + /*typeArguments*/ + void 0, + [W] + ) + ] : [] + ); + let he = n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + st ? [n.createIdentifier("s")] : W ? [W] : [] + ); + Fg(_) && (he = i().createImportStarHelper(he)); + const q = st ? [ + n.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + "s" + ) + ] : []; + let we; + return g >= 2 ? we = n.createArrowFunction( + /*modifiers*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + q, + /*type*/ + void 0, + /*equalsGreaterThanToken*/ + void 0, + he + ) : we = n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + q, + /*type*/ + void 0, + n.createBlock([n.createReturnStatement(he)]) + ), n.createCallExpression( + n.createPropertyAccessExpression(z, "then"), + /*typeArguments*/ + void 0, + [we] + ); + } + function Ai(W, je) { + return !Fg(_) || Qp(W) & 2 ? je : Pne(W) ? i().createImportStarHelper(je) : je; + } + function _s(W, je) { + return !Fg(_) || Qp(W) & 2 ? je : zO(W) ? i().createImportStarHelper(je) : iW(W) ? i().createImportDefaultHelper(je) : je; + } + function $n(W) { + let je; + const st = uC(W); + if (h !== 2) + if (W.importClause) { + const z = []; + st && !jT(W) ? z.push( + n.createVariableDeclaration( + n.cloneNode(st.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + _s(W, os(W)) + ) + ) : (z.push( + n.createVariableDeclaration( + n.getGeneratedNameForNode(W), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + _s(W, os(W)) + ) + ), st && jT(W) && z.push( + n.createVariableDeclaration( + n.cloneNode(st.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.getGeneratedNameForNode(W) + ) + )), je = Tr( + je, + kn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + z, + g >= 2 ? 2 : 0 + /* None */ + ) + ), + /*location*/ + W + ), + /*original*/ + W + ) + ); + } else + return kn(ot(n.createExpressionStatement(os(W)), W), W); + else st && jT(W) && (je = Tr( + je, + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + [ + kn( + ot( + n.createVariableDeclaration( + n.cloneNode(st.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n.getGeneratedNameForNode(W) + ), + /*location*/ + W + ), + /*original*/ + W + ) + ], + g >= 2 ? 2 : 0 + /* None */ + ) + ) + )); + return je = mi(je, W), jm(je); + } + function os(W) { + const je = xx(n, W, D, d, u, _), st = []; + return je && st.push(je), n.createCallExpression( + n.createIdentifier("require"), + /*typeArguments*/ + void 0, + st + ); + } + function wr(W) { + E.assert(V1(W), "import= for internal module references should be handled in an earlier transformer."); + let je; + return h !== 2 ? Vn( + W, + 32 + /* Export */ + ) ? je = Tr( + je, + kn( + ot( + n.createExpressionStatement( + Ee( + W.name, + os(W) + ) + ), + W + ), + W + ) + ) : je = Tr( + je, + kn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + [ + n.createVariableDeclaration( + n.cloneNode(W.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + os(W) + ) + ], + /*flags*/ + g >= 2 ? 2 : 0 + /* None */ + ) + ), + W + ), + W + ) + ) : Vn( + W, + 32 + /* Export */ + ) && (je = Tr( + je, + kn( + ot( + n.createExpressionStatement( + Ee(n.getExportName(W), n.getLocalName(W)) + ), + W + ), + W + ) + )), je = Ps(je, W), jm(je); + } + function Ss(W) { + if (!W.moduleSpecifier) + return; + const je = n.getGeneratedNameForNode(W); + if (W.exportClause && lp(W.exportClause)) { + const st = []; + h !== 2 && st.push( + kn( + ot( + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList([ + n.createVariableDeclaration( + je, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + os(W) + ) + ]) + ), + /*location*/ + W + ), + /* original */ + W + ) + ); + for (const z of W.exportClause.elements) { + const he = !!Fg(_) && !(Qp(W) & 2) && dn(z.propertyName || z.name) === "default", q = n.createPropertyAccessExpression( + he ? i().createImportDefaultHelper(je) : je, + z.propertyName || z.name + ); + st.push( + kn( + ot( + n.createExpressionStatement( + Ee( + n.getExportName(z), + q, + /*location*/ + void 0, + /*liveBinding*/ + !0 + ) + ), + z + ), + z + ) + ); + } + return jm(st); + } else if (W.exportClause) { + const st = []; + return st.push( + kn( + ot( + n.createExpressionStatement( + Ee( + n.cloneNode(W.exportClause.name), + Ai( + W, + h !== 2 ? os(W) : s7(W) ? je : n.createIdentifier(dn(W.exportClause.name)) + ) + ) + ), + W + ), + W + ) + ), jm(st); + } else + return kn( + ot( + n.createExpressionStatement( + i().createExportStarHelper(h !== 2 ? os(W) : je) + ), + W + ), + W + ); + } + function Le(W) { + if (!W.isExportEquals) + return re( + n.createIdentifier("default"), + Ge(W.expression, pe, ct), + /*location*/ + W, + /*allowComments*/ + !0 + ); + } + function At(W) { + let je; + return Vn( + W, + 32 + /* Export */ + ) ? je = Tr( + je, + kn( + ot( + n.createFunctionDeclaration( + Ar(W.modifiers, Ne, Qs), + W.asteriskToken, + n.getDeclarationName( + W, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Ar(W.parameters, pe, ji), + /*type*/ + void 0, + gr(W.body, pe, e) + ), + /*location*/ + W + ), + /*original*/ + W + ) + ) : je = Tr(je, gr(W, pe, e)), jm(je); + } + function vr(W) { + let je; + return Vn( + W, + 32 + /* Export */ + ) ? je = Tr( + je, + kn( + ot( + n.createClassDeclaration( + Ar(W.modifiers, Ne, Lo), + n.getDeclarationName( + W, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Ar(W.heritageClauses, pe, nf), + Ar(W.members, pe, fl) + ), + W + ), + W + ) + ) : je = Tr(je, gr(W, pe, e)), je = $e(je, W), jm(je); + } + function ln(W) { + let je, st, z; + if (Vn( + W, + 32 + /* Export */ + )) { + let he, q = !1; + for (const we of W.declarationList.declarations) + if (Re(we.name) && xh(we.name)) + if (he || (he = Ar(W.modifiers, Ne, Qs)), we.initializer) { + const _e = n.updateVariableDeclaration( + we, + we.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Ee( + we.name, + Ge(we.initializer, pe, ct) + ) + ); + st = Tr(st, _e); + } else + st = Tr(st, we); + else if (we.initializer) + if (!Ts(we.name) && (xo(we.initializer) || po(we.initializer) || tl(we.initializer))) { + const _e = n.createAssignment( + ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + we.name + ), + /*location*/ + we.name + ), + n.createIdentifier(Ip(we.name)) + ), Te = n.createVariableDeclaration( + we.name, + we.exclamationToken, + we.type, + Ge(we.initializer, pe, ct) + ); + st = Tr(st, Te), z = Tr(z, _e), q = !0; + } else + z = Tr(z, ri(we)); + if (st && (je = Tr(je, n.updateVariableStatement(W, he, n.updateVariableDeclarationList(W.declarationList, st)))), z) { + const we = kn(ot(n.createExpressionStatement(n.inlineExpressions(z)), W), W); + q && Q3(we), je = Tr(je, we); + } + } else + je = Tr(je, gr(W, pe, e)); + return je = ws(je, W), jm(je); + } + function Zn(W, je, st) { + const z = Ut(W); + if (z) { + let he = iO(W) ? je : n.createAssignment(W, je); + for (const q of z) + Kr( + he, + 8 + /* NoSubstitution */ + ), he = Ee( + q, + he, + /*location*/ + st + ); + return he; + } + return n.createAssignment(W, je); + } + function ri(W) { + return Ts(W.name) ? mS( + Ge(W, pe, M3), + pe, + e, + 0, + /*needsValue*/ + !1, + Zn + ) : n.createAssignment( + ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + W.name + ), + /*location*/ + W.name + ), + W.initializer ? Ge(W.initializer, pe, ct) : n.createVoidZero() + ); + } + function mi(W, je) { + if (P.exportEquals) + return W; + const st = je.importClause; + if (!st) + return W; + const z = new XC(); + st.name && (W = nt(W, z, st)); + const he = st.namedBindings; + if (he) + switch (he.kind) { + case 274: + W = nt(W, z, he); + break; + case 275: + for (const q of he.elements) + W = nt( + W, + z, + q, + /*liveBinding*/ + !0 + ); + break; + } + return W; + } + function Ps(W, je) { + return P.exportEquals ? W : nt(W, new XC(), je); + } + function ws(W, je) { + return Yt( + W, + je.declarationList, + /*isForInOrOfInitializer*/ + !1 + ); + } + function Yt(W, je, st) { + if (P.exportEquals) + return W; + for (const z of je.declarations) + W = Ca(W, z, st); + return W; + } + function Ca(W, je, st) { + if (P.exportEquals) + return W; + if (Ts(je.name)) + for (const z of je.name.elements) + ml(z) || (W = Ca(W, z, st)); + else !Fo(je.name) && (!ti(je) || je.initializer || st) && (W = nt(W, new XC(), je)); + return W; + } + function $e(W, je) { + if (P.exportEquals) + return W; + const st = new XC(); + if (Vn( + je, + 32 + /* Export */ + )) { + const z = Vn( + je, + 2048 + /* Default */ + ) ? n.createIdentifier("default") : n.getDeclarationName(je); + W = te( + W, + st, + z, + n.getLocalName(je), + /*location*/ + je + ); + } + return je.name && (W = nt(W, st, je)), W; + } + function nt(W, je, st, z) { + const he = n.getDeclarationName(st), q = P.exportSpecifiers.get(he); + if (q) + for (const we of q) + W = te( + W, + je, + we.name, + he, + /*location*/ + we.name, + /*allowComments*/ + void 0, + z + ); + return W; + } + function te(W, je, st, z, he, q, we) { + return je.has(st) || (je.set(st, !0), W = Tr(W, re(st, z, he, q, we))), W; + } + function rt() { + const W = n.createExpressionStatement( + n.createCallExpression( + n.createPropertyAccessExpression(n.createIdentifier("Object"), "defineProperty"), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("exports"), + n.createStringLiteral("__esModule"), + n.createObjectLiteralExpression([ + n.createPropertyAssignment("value", n.createTrue()) + ]) + ] + ) + ); + return Kr( + W, + 2097152 + /* CustomPrologue */ + ), W; + } + function re(W, je, st, z, he) { + const q = ot(n.createExpressionStatement(Ee( + W, + je, + /*location*/ + void 0, + he + )), st); + return mu(q), z || Kr( + q, + 3072 + /* NoComments */ + ), q; + } + function Ee(W, je, st, z) { + return ot( + z ? n.createCallExpression( + n.createPropertyAccessExpression( + n.createIdentifier("Object"), + "defineProperty" + ), + /*typeArguments*/ + void 0, + [ + n.createIdentifier("exports"), + n.createStringLiteralFromNode(W), + n.createObjectLiteralExpression([ + n.createPropertyAssignment("enumerable", n.createTrue()), + n.createPropertyAssignment( + "get", + n.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + n.createBlock([n.createReturnStatement(je)]) + ) + ) + ]) + ] + ) : n.createAssignment( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + n.cloneNode(W) + ), + je + ), + st + ); + } + function Ne(W) { + switch (W.kind) { + case 95: + case 90: + return; + } + return W; + } + function et(W, je, st) { + je.kind === 307 ? (D = je, P = C[Ku(D)], T(W, je, st), D = void 0, P = void 0) : T(W, je, st); + } + function lt(W, je) { + return je = S(W, je), je.id && O[je.id] ? je : W === 1 ? be(je) : du(je) ? jt(je) : je; + } + function jt(W) { + const je = W.name, st = kt(je); + if (st !== je) { + if (W.objectAssignmentInitializer) { + const z = n.createAssignment(st, W.objectAssignmentInitializer); + return ot(n.createPropertyAssignment(je, z), W); + } + return ot(n.createPropertyAssignment(je, st), W); + } + return W; + } + function be(W) { + switch (W.kind) { + case 80: + return kt(W); + case 213: + return ft(W); + case 215: + return bt(W); + case 226: + return yt(W); + } + return W; + } + function ft(W) { + if (Re(W.expression)) { + const je = kt(W.expression); + if (O[ja(je)] = !0, !Re(je) && !(ua(W.expression) & 8192)) + return sx( + n.updateCallExpression( + W, + je, + /*typeArguments*/ + void 0, + W.arguments + ), + 16 + /* IndirectCall */ + ); + } + return W; + } + function bt(W) { + if (Re(W.tag)) { + const je = kt(W.tag); + if (O[ja(je)] = !0, !Re(je) && !(ua(W.tag) & 8192)) + return sx( + n.updateTaggedTemplateExpression( + W, + je, + /*typeArguments*/ + void 0, + W.template + ), + 16 + /* IndirectCall */ + ); + } + return W; + } + function kt(W) { + var je, st; + if (ua(W) & 8192) { + const z = aO(D); + return z ? n.createPropertyAccessExpression(z, W) : W; + } else if (!(Fo(W) && !(W.emitNode.autoGenerate.flags & 64)) && !xh(W)) { + const z = u.getReferencedExportContainer(W, iO(W)); + if (z && z.kind === 307) + return ot( + n.createPropertyAccessExpression( + n.createIdentifier("exports"), + n.cloneNode(W) + ), + /*location*/ + W + ); + const he = u.getReferencedImportDeclaration(W); + if (he) { + if (kd(he)) + return ot( + n.createPropertyAccessExpression( + n.getGeneratedNameForNode(he.parent), + n.createIdentifier("default") + ), + /*location*/ + W + ); + if (Yu(he)) { + const q = he.propertyName || he.name; + return ot( + n.createPropertyAccessExpression( + n.getGeneratedNameForNode(((st = (je = he.parent) == null ? void 0 : je.parent) == null ? void 0 : st.parent) || he), + n.cloneNode(q) + ), + /*location*/ + W + ); + } + } + } + return W; + } + function yt(W) { + if (dh(W.operatorToken.kind) && Re(W.left) && (!Fo(W.left) || Aw(W.left)) && !xh(W.left)) { + const je = Ut(W.left); + if (je) { + let st = W; + for (const z of je) + O[ja(st)] = !0, st = Ee( + z, + st, + /*location*/ + W + ); + return st; + } + } + return W; + } + function Ut(W) { + if (Fo(W)) { + if (Aw(W)) { + const je = P?.exportSpecifiers.get(W); + if (je) { + const st = []; + for (const z of je) + st.push(z.name); + return st; + } + } + } else { + const je = u.getReferencedImportDeclaration(W); + if (je) + return P?.exportedBindings[Ku(je)]; + const st = /* @__PURE__ */ new Set(), z = u.getReferencedValueDeclarations(W); + if (z) { + for (const he of z) { + const q = P?.exportedBindings[Ku(he)]; + if (q) + for (const we of q) + st.add(we); + } + if (st.size) + return ts(st); + } + } + } + } + var oRe = { + name: "typescript:dynamicimport-sync-require", + scoped: !0, + text: ` + var __syncRequire = typeof module === "object" && typeof module.exports === "object";` + }; + function cie(e) { + const { + factory: t, + startLexicalEnvironment: n, + endLexicalEnvironment: i, + hoistVariableDeclaration: s + } = e, o = e.getCompilerOptions(), c = e.getEmitResolver(), _ = e.getEmitHost(), u = e.onSubstituteNode, d = e.onEmitNode; + e.onSubstituteNode = Ee, e.onEmitNode = re, e.enableSubstitution( + 80 + /* Identifier */ + ), e.enableSubstitution( + 304 + /* ShorthandPropertyAssignment */ + ), e.enableSubstitution( + 226 + /* BinaryExpression */ + ), e.enableSubstitution( + 236 + /* MetaProperty */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + const g = [], h = [], S = [], T = []; + let C, D, P, O, j, F, V; + return Pd(e, L); + function L(W) { + if (W.isDeclarationFile || !(NT(W, o) || W.transformFlags & 8388608)) + return W; + const je = Ku(W); + C = W, F = W, D = g[je] = sW(e, W), P = t.createUniqueName("exports"), h[je] = P, O = T[je] = t.createUniqueName("context"); + const st = $(D.externalImports), z = U(W, st), he = t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [ + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + P + ), + t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + O + ) + ], + /*type*/ + void 0, + z + ), q = _A(t, W, _, o), we = t.createArrayLiteralExpression(or(st, (Te) => Te.name)), _e = Kr( + t.updateSourceFile( + W, + ot( + t.createNodeArray([ + t.createExpressionStatement( + t.createCallExpression( + t.createPropertyAccessExpression(t.createIdentifier("System"), "register"), + /*typeArguments*/ + void 0, + q ? [q, we, he] : [we, he] + ) + ) + ]), + W.statements + ) + ), + 2048 + /* NoTrailingComments */ + ); + return o.outFile || Ree(_e, z, (Te) => !Te.scoped), V && (S[je] = V, V = void 0), C = void 0, D = void 0, P = void 0, O = void 0, j = void 0, F = void 0, _e; + } + function $(W) { + const je = /* @__PURE__ */ new Map(), st = []; + for (const z of W) { + const he = xx(t, z, C, _, c, o); + if (he) { + const q = he.text, we = je.get(q); + we !== void 0 ? st[we].externalImports.push(z) : (je.set(q, st.length), st.push({ + name: he, + externalImports: [z] + })); + } + } + return st; + } + function U(W, je) { + const st = []; + n(); + const z = Iu(o, "alwaysStrict") || il(C), he = t.copyPrologue(W.statements, st, z, X); + st.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + "__moduleName", + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createLogicalAnd( + O, + t.createPropertyAccessExpression(O, "id") + ) + ) + ]) + ) + ), Ge(D.externalHelpersImportDeclaration, X, hi); + const q = Ar(W.statements, X, hi, he); + Bn(st, j), Pg(st, i()); + const we = G(st), _e = W.transformFlags & 2097152 ? t.createModifiersFromModifierFlags( + 1024 + /* Async */ + ) : void 0, Te = t.createObjectLiteralExpression( + [ + t.createPropertyAssignment("setters", K(we, je)), + t.createPropertyAssignment( + "execute", + t.createFunctionExpression( + _e, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + t.createBlock( + q, + /*multiLine*/ + !0 + ) + ) + ) + ], + /*multiLine*/ + !0 + ); + return st.push(t.createReturnStatement(Te)), t.createBlock( + st, + /*multiLine*/ + !0 + ); + } + function G(W) { + if (!D.hasExportStarsToExportValues) + return; + if (!ut(D.exportedNames) && D.exportedFunctions.size === 0 && D.exportSpecifiers.size === 0) { + let he = !1; + for (const q of D.externalImports) + if (q.kind === 278 && q.exportClause) { + he = !0; + break; + } + if (!he) { + const q = ce( + /*localNames*/ + void 0 + ); + return W.push(q), q.name; + } + } + const je = []; + if (D.exportedNames) + for (const he of D.exportedNames) + he.escapedText !== "default" && je.push( + t.createPropertyAssignment( + t.createStringLiteralFromNode(he), + t.createTrue() + ) + ); + for (const he of D.exportedFunctions) + Vn( + he, + 2048 + /* Default */ + ) || (E.assert(!!he.name), je.push( + t.createPropertyAssignment( + t.createStringLiteralFromNode(he.name), + t.createTrue() + ) + )); + const st = t.createUniqueName("exportedNames"); + W.push( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + st, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createObjectLiteralExpression( + je, + /*multiLine*/ + !0 + ) + ) + ]) + ) + ); + const z = ce(st); + return W.push(z), z.name; + } + function ce(W) { + const je = t.createUniqueName("exportStar"), st = t.createIdentifier("m"), z = t.createIdentifier("n"), he = t.createIdentifier("exports"); + let q = t.createStrictInequality(z, t.createStringLiteral("default")); + return W && (q = t.createLogicalAnd( + q, + t.createLogicalNot( + t.createCallExpression( + t.createPropertyAccessExpression(W, "hasOwnProperty"), + /*typeArguments*/ + void 0, + [z] + ) + ) + )), t.createFunctionDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + je, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + st + )], + /*type*/ + void 0, + t.createBlock( + [ + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList([ + t.createVariableDeclaration( + he, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createObjectLiteralExpression([]) + ) + ]) + ), + t.createForInStatement( + t.createVariableDeclarationList([ + t.createVariableDeclaration(z) + ]), + st, + t.createBlock([ + Kr( + t.createIfStatement( + q, + t.createExpressionStatement( + t.createAssignment( + t.createElementAccessExpression(he, z), + t.createElementAccessExpression(st, z) + ) + ) + ), + 1 + /* SingleLine */ + ) + ]) + ), + t.createExpressionStatement( + t.createCallExpression( + P, + /*typeArguments*/ + void 0, + [he] + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function K(W, je) { + const st = []; + for (const z of je) { + const he = rr(z.externalImports, (_e) => jC(t, _e, C)), q = he ? t.getGeneratedNameForNode(he) : t.createUniqueName(""), we = []; + for (const _e of z.externalImports) { + const Te = jC(t, _e, C); + switch (_e.kind) { + case 272: + if (!_e.importClause) + break; + case 271: + E.assert(Te !== void 0), we.push( + t.createExpressionStatement( + t.createAssignment(Te, q) + ) + ), Vn( + _e, + 32 + /* Export */ + ) && we.push( + t.createExpressionStatement( + t.createCallExpression( + P, + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(dn(Te)), + q + ] + ) + ) + ); + break; + case 278: + if (E.assert(Te !== void 0), _e.exportClause) + if (lp(_e.exportClause)) { + const dt = []; + for (const xt of _e.exportClause.elements) + dt.push( + t.createPropertyAssignment( + t.createStringLiteral(dn(xt.name)), + t.createElementAccessExpression( + q, + t.createStringLiteral(dn(xt.propertyName || xt.name)) + ) + ) + ); + we.push( + t.createExpressionStatement( + t.createCallExpression( + P, + /*typeArguments*/ + void 0, + [t.createObjectLiteralExpression( + dt, + /*multiLine*/ + !0 + )] + ) + ) + ); + } else + we.push( + t.createExpressionStatement( + t.createCallExpression( + P, + /*typeArguments*/ + void 0, + [ + t.createStringLiteral(dn(_e.exportClause.name)), + q + ] + ) + ) + ); + else + we.push( + t.createExpressionStatement( + t.createCallExpression( + W, + /*typeArguments*/ + void 0, + [q] + ) + ) + ); + break; + } + } + st.push( + t.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + [t.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + q + )], + /*type*/ + void 0, + t.createBlock( + we, + /*multiLine*/ + !0 + ) + ) + ); + } + return t.createArrayLiteralExpression( + st, + /*multiLine*/ + !0 + ); + } + function X(W) { + switch (W.kind) { + case 272: + return Z(W); + case 271: + return ne(W); + case 278: + return oe(W); + case 277: + return pe(W); + default: + return nr(W); + } + } + function Z(W) { + let je; + return W.importClause && s(jC(t, W, C)), jm(Xe(je, W)); + } + function oe(W) { + E.assertIsDefined(W); + } + function ne(W) { + E.assert(V1(W), "import= for internal module references should be handled in an earlier transformer."); + let je; + return s(jC(t, W, C)), jm(Ie(je, W)); + } + function pe(W) { + if (W.isExportEquals) + return; + const je = Ge(W.expression, ri, ct); + return at( + t.createIdentifier("default"), + je, + /*allowComments*/ + !0 + ); + } + function fe(W) { + Vn( + W, + 32 + /* Export */ + ) ? j = Tr( + j, + t.updateFunctionDeclaration( + W, + Ar(W.modifiers, rt, Lo), + W.asteriskToken, + t.getDeclarationName( + W, + /*allowComments*/ + !0, + /*allowSourceMaps*/ + !0 + ), + /*typeParameters*/ + void 0, + Ar(W.parameters, ri, ji), + /*type*/ + void 0, + Ge(W.body, ri, ms) + ) + ) : j = Tr(j, gr(W, ri, e)), j = Qe(j, W); + } + function H(W) { + let je; + const st = t.getLocalName(W); + return s(st), je = Tr( + je, + ot( + t.createExpressionStatement( + t.createAssignment( + st, + ot( + t.createClassExpression( + Ar(W.modifiers, rt, Lo), + W.name, + /*typeParameters*/ + void 0, + Ar(W.heritageClauses, ri, nf), + Ar(W.members, ri, fl) + ), + W + ) + ) + ), + W + ) + ), je = Qe(je, W), jm(je); + } + function ae(W) { + if (!Ae(W.declarationList)) + return Ge(W, ri, hi); + let je; + if (Xw(W.declarationList) || $w(W.declarationList)) { + const st = Ar(W.modifiers, rt, Lo), z = []; + for (const q of W.declarationList.declarations) + z.push(t.updateVariableDeclaration( + q, + t.getGeneratedNameForNode(q.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + ge( + q, + /*isExportedDeclaration*/ + !1 + ) + )); + const he = t.updateVariableDeclarationList( + W.declarationList, + z + ); + je = Tr(je, t.updateVariableStatement(W, st, he)); + } else { + let st; + const z = Vn( + W, + 32 + /* Export */ + ); + for (const he of W.declarationList.declarations) + he.initializer ? st = Tr(st, ge(he, z)) : le(he); + st && (je = Tr(je, ot(t.createExpressionStatement(t.inlineExpressions(st)), W))); + } + return je = ye( + je, + W, + /*exportSelf*/ + !1 + ), jm(je); + } + function le(W) { + if (Ts(W.name)) + for (const je of W.name.elements) + ml(je) || le(je); + else + s(t.cloneNode(W.name)); + } + function Ae(W) { + return (ua(W) & 4194304) === 0 && (F.kind === 307 || (Zo(W).flags & 7) === 0); + } + function ge(W, je) { + const st = je ? de : ve; + return Ts(W.name) ? mS( + W, + ri, + e, + 0, + /*needsValue*/ + !1, + st + ) : W.initializer ? st(W.name, Ge(W.initializer, ri, ct)) : W.name; + } + function de(W, je, st) { + return De( + W, + je, + st, + /*isExportedDeclaration*/ + !0 + ); + } + function ve(W, je, st) { + return De( + W, + je, + st, + /*isExportedDeclaration*/ + !1 + ); + } + function De(W, je, st, z) { + return s(t.cloneNode(W)), z ? Wt(W, yt(ot(t.createAssignment(W, je), st))) : yt(ot(t.createAssignment(W, je), st)); + } + function Xe(W, je) { + if (D.exportEquals) + return W; + const st = je.importClause; + if (!st) + return W; + st.name && (W = Ke(W, st)); + const z = st.namedBindings; + if (z) + switch (z.kind) { + case 274: + W = Ke(W, z); + break; + case 275: + for (const he of z.elements) + W = Ke(W, he); + break; + } + return W; + } + function Ie(W, je) { + return D.exportEquals ? W : Ke(W, je); + } + function ye(W, je, st) { + if (D.exportEquals) + return W; + for (const z of je.declarationList.declarations) + (z.initializer || st) && (W = Fe(W, z, st)); + return W; + } + function Fe(W, je, st) { + if (D.exportEquals) + return W; + if (Ts(je.name)) + for (const z of je.name.elements) + ml(z) || (W = Fe(W, z, st)); + else if (!Fo(je.name)) { + let z; + st && (W = Be(W, je.name, t.getLocalName(je)), z = dn(je.name)), W = Ke(W, je, z); + } + return W; + } + function Qe(W, je) { + if (D.exportEquals) + return W; + let st; + if (Vn( + je, + 32 + /* Export */ + )) { + const z = Vn( + je, + 2048 + /* Default */ + ) ? t.createStringLiteral("default") : je.name; + W = Be(W, z, t.getLocalName(je)), st = Ip(z); + } + return je.name && (W = Ke(W, je, st)), W; + } + function Ke(W, je, st) { + if (D.exportEquals) + return W; + const z = t.getDeclarationName(je), he = D.exportSpecifiers.get(z); + if (he) + for (const q of he) + q.name.escapedText !== st && (W = Be(W, q.name, z)); + return W; + } + function Be(W, je, st, z) { + return W = Tr(W, at(je, st, z)), W; + } + function at(W, je, st) { + const z = t.createExpressionStatement(Wt(W, je)); + return mu(z), st || Kr( + z, + 3072 + /* NoComments */ + ), z; + } + function Wt(W, je) { + const st = Re(W) ? t.createStringLiteralFromNode(W) : W; + return Kr( + je, + ua(je) | 3072 + /* NoComments */ + ), el(t.createCallExpression( + P, + /*typeArguments*/ + void 0, + [st, je] + ), je); + } + function nr(W) { + switch (W.kind) { + case 243: + return ae(W); + case 262: + return fe(W); + case 263: + return H(W); + case 248: + return Kt( + W, + /*isTopLevel*/ + !0 + ); + case 249: + return Pr(W); + case 250: + return Vt(W); + case 246: + return ci(W); + case 247: + return Xt(W); + case 256: + return Ai(W); + case 254: + return _s(W); + case 245: + return $n(W); + case 255: + return os(W); + case 269: + return wr(W); + case 296: + return Ss(W); + case 297: + return Le(W); + case 258: + return At(W); + case 299: + return vr(W); + case 241: + return ln(W); + default: + return ri(W); + } + } + function Kt(W, je) { + const st = F; + return F = W, W = t.updateForStatement( + W, + Ge(W.initializer, je ? jr : mi, tp), + Ge(W.condition, ri, ct), + Ge(W.incrementor, mi, ct), + Zu(W.statement, je ? nr : ri, e) + ), F = st, W; + } + function Pr(W) { + const je = F; + return F = W, W = t.updateForInStatement( + W, + jr(W.initializer), + Ge(W.expression, ri, ct), + Zu(W.statement, nr, e) + ), F = je, W; + } + function Vt(W) { + const je = F; + return F = W, W = t.updateForOfStatement( + W, + W.awaitModifier, + jr(W.initializer), + Ge(W.expression, ri, ct), + Zu(W.statement, nr, e) + ), F = je, W; + } + function zt(W) { + return Il(W) && Ae(W); + } + function jr(W) { + if (zt(W)) { + let je; + for (const st of W.declarations) + je = Tr(je, ge( + st, + /*isExportedDeclaration*/ + !1 + )), st.initializer || le(st); + return je ? t.inlineExpressions(je) : t.createOmittedExpression(); + } else + return Ge(W, mi, tp); + } + function ci(W) { + return t.updateDoStatement( + W, + Zu(W.statement, nr, e), + Ge(W.expression, ri, ct) + ); + } + function Xt(W) { + return t.updateWhileStatement( + W, + Ge(W.expression, ri, ct), + Zu(W.statement, nr, e) + ); + } + function Ai(W) { + return t.updateLabeledStatement( + W, + W.label, + E.checkDefined(Ge(W.statement, nr, hi, t.liftToBlock)) + ); + } + function _s(W) { + return t.updateWithStatement( + W, + Ge(W.expression, ri, ct), + E.checkDefined(Ge(W.statement, nr, hi, t.liftToBlock)) + ); + } + function $n(W) { + return t.updateIfStatement( + W, + Ge(W.expression, ri, ct), + E.checkDefined(Ge(W.thenStatement, nr, hi, t.liftToBlock)), + Ge(W.elseStatement, nr, hi, t.liftToBlock) + ); + } + function os(W) { + return t.updateSwitchStatement( + W, + Ge(W.expression, ri, ct), + E.checkDefined(Ge(W.caseBlock, nr, aD)) + ); + } + function wr(W) { + const je = F; + return F = W, W = t.updateCaseBlock( + W, + Ar(W.clauses, nr, GI) + ), F = je, W; + } + function Ss(W) { + return t.updateCaseClause( + W, + Ge(W.expression, ri, ct), + Ar(W.statements, nr, hi) + ); + } + function Le(W) { + return gr(W, nr, e); + } + function At(W) { + return gr(W, nr, e); + } + function vr(W) { + const je = F; + return F = W, W = t.updateCatchClause( + W, + W.variableDeclaration, + E.checkDefined(Ge(W.block, nr, ms)) + ), F = je, W; + } + function ln(W) { + const je = F; + return F = W, W = gr(W, nr, e), F = je, W; + } + function Zn(W, je) { + if (!(W.transformFlags & 276828160)) + return W; + switch (W.kind) { + case 248: + return Kt( + W, + /*isTopLevel*/ + !1 + ); + case 244: + return Ps(W); + case 217: + return ws(W, je); + case 354: + return Yt(W, je); + case 226: + if (p0(W)) + return $e(W, je); + break; + case 213: + if (hf(W)) + return Ca(W); + break; + case 224: + case 225: + return te(W, je); + } + return gr(W, ri, e); + } + function ri(W) { + return Zn( + W, + /*valueIsDiscarded*/ + !1 + ); + } + function mi(W) { + return Zn( + W, + /*valueIsDiscarded*/ + !0 + ); + } + function Ps(W) { + return t.updateExpressionStatement(W, Ge(W.expression, mi, ct)); + } + function ws(W, je) { + return t.updateParenthesizedExpression(W, Ge(W.expression, je ? mi : ri, ct)); + } + function Yt(W, je) { + return t.updatePartiallyEmittedExpression(W, Ge(W.expression, je ? mi : ri, ct)); + } + function Ca(W) { + const je = xx(t, W, C, _, c, o), st = Ge(ul(W.arguments), ri, ct), z = je && (!st || !Ks(st) || st.text !== je.text) ? je : st; + return t.createCallExpression( + t.createPropertyAccessExpression( + O, + t.createIdentifier("import") + ), + /*typeArguments*/ + void 0, + z ? [z] : [] + ); + } + function $e(W, je) { + return nt(W.left) ? mS( + W, + ri, + e, + 0, + !je + ) : gr(W, ri, e); + } + function nt(W) { + if (Tl( + W, + /*excludeCompoundAssignment*/ + !0 + )) + return nt(W.left); + if (cp(W)) + return nt(W.expression); + if (Gs(W)) + return ut(W.properties, nt); + if (Wl(W)) + return ut(W.elements, nt); + if (du(W)) + return nt(W.name); + if (qc(W)) + return nt(W.initializer); + if (Re(W)) { + const je = c.getReferencedExportContainer(W); + return je !== void 0 && je.kind === 307; + } else + return !1; + } + function te(W, je) { + if ((W.operator === 46 || W.operator === 47) && Re(W.operand) && !Fo(W.operand) && !xh(W.operand) && !BB(W.operand)) { + const st = bt(W.operand); + if (st) { + let z, he = Ge(W.operand, ri, ct); + Ey(W) ? he = t.updatePrefixUnaryExpression(W, he) : (he = t.updatePostfixUnaryExpression(W, he), je || (z = t.createTempVariable(s), he = t.createAssignment(z, he), ot(he, W)), he = t.createComma(he, t.cloneNode(W.operand)), ot(he, W)); + for (const q of st) + he = Wt(q, yt(he)); + return z && (he = t.createComma(he, z), ot(he, W)), he; + } + } + return gr(W, ri, e); + } + function rt(W) { + switch (W.kind) { + case 95: + case 90: + return; + } + return W; + } + function re(W, je, st) { + if (je.kind === 307) { + const z = Ku(je); + C = je, D = g[z], P = h[z], V = S[z], O = T[z], V && delete S[z], d(W, je, st), C = void 0, D = void 0, P = void 0, O = void 0, V = void 0; + } else + d(W, je, st); + } + function Ee(W, je) { + return je = u(W, je), Ut(je) ? je : W === 1 ? lt(je) : W === 4 ? Ne(je) : je; + } + function Ne(W) { + switch (W.kind) { + case 304: + return et(W); + } + return W; + } + function et(W) { + var je, st; + const z = W.name; + if (!Fo(z) && !xh(z)) { + const he = c.getReferencedImportDeclaration(z); + if (he) { + if (kd(he)) + return ot( + t.createPropertyAssignment( + t.cloneNode(z), + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(he.parent), + t.createIdentifier("default") + ) + ), + /*location*/ + W + ); + if (Yu(he)) + return ot( + t.createPropertyAssignment( + t.cloneNode(z), + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(((st = (je = he.parent) == null ? void 0 : je.parent) == null ? void 0 : st.parent) || he), + t.cloneNode(he.propertyName || he.name) + ) + ), + /*location*/ + W + ); + } + } + return W; + } + function lt(W) { + switch (W.kind) { + case 80: + return jt(W); + case 226: + return be(W); + case 236: + return ft(W); + } + return W; + } + function jt(W) { + var je, st; + if (ua(W) & 8192) { + const z = aO(C); + return z ? t.createPropertyAccessExpression(z, W) : W; + } + if (!Fo(W) && !xh(W)) { + const z = c.getReferencedImportDeclaration(W); + if (z) { + if (kd(z)) + return ot( + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(z.parent), + t.createIdentifier("default") + ), + /*location*/ + W + ); + if (Yu(z)) + return ot( + t.createPropertyAccessExpression( + t.getGeneratedNameForNode(((st = (je = z.parent) == null ? void 0 : je.parent) == null ? void 0 : st.parent) || z), + t.cloneNode(z.propertyName || z.name) + ), + /*location*/ + W + ); + } + } + return W; + } + function be(W) { + if (dh(W.operatorToken.kind) && Re(W.left) && (!Fo(W.left) || Aw(W.left)) && !xh(W.left)) { + const je = bt(W.left); + if (je) { + let st = W; + for (const z of je) + st = Wt(z, yt(st)); + return st; + } + } + return W; + } + function ft(W) { + return sC(W) ? t.createPropertyAccessExpression(O, t.createIdentifier("meta")) : W; + } + function bt(W) { + let je; + const st = kt(W); + if (st) { + const z = c.getReferencedExportContainer( + W, + /*prefixLocals*/ + !1 + ); + z && z.kind === 307 && (je = Tr(je, t.getDeclarationName(st))), je = Bn(je, D?.exportedBindings[Ku(st)]); + } else if (Fo(W) && Aw(W)) { + const z = D?.exportSpecifiers.get(W); + if (z) { + const he = []; + for (const q of z) + he.push(q.name); + return he; + } + } + return je; + } + function kt(W) { + if (!Fo(W)) { + const je = c.getReferencedImportDeclaration(W); + if (je) return je; + const st = c.getReferencedValueDeclaration(W); + if (st && D?.exportedBindings[Ku(st)]) return st; + const z = c.getReferencedValueDeclarations(W); + if (z) { + for (const he of z) + if (he !== st && D?.exportedBindings[Ku(he)]) return he; + } + return st; + } + } + function yt(W) { + return V === void 0 && (V = []), V[ja(W)] = !0, W; + } + function Ut(W) { + return V && W.id && V[W.id]; + } + } + function dW(e) { + const { + factory: t, + getEmitHelperFactory: n + } = e, i = e.getEmitHost(), s = e.getEmitResolver(), o = e.getCompilerOptions(), c = pa(o), _ = e.onEmitNode, u = e.onSubstituteNode; + e.onEmitNode = V, e.onSubstituteNode = L, e.enableEmitNotification( + 307 + /* SourceFile */ + ), e.enableSubstitution( + 80 + /* Identifier */ + ); + let d, g, h; + return Pd(e, S); + function S(U) { + if (U.isDeclarationFile) + return U; + if (il(U) || ap(o)) { + g = U, h = void 0; + let G = T(U); + return g = void 0, h && (G = t.updateSourceFile( + G, + ot(t.createNodeArray(Ij(G.statements.slice(), h)), G.statements) + )), !il(U) || Nu(o) === 200 || ut(G.statements, Mw) ? G : t.updateSourceFile( + G, + ot(t.createNodeArray([...G.statements, cA(t)]), G.statements) + ); + } + return U; + } + function T(U) { + const G = KJ(t, n(), U, o); + if (G) { + const ce = [], K = t.copyPrologue(U.statements, ce); + return Tr(ce, G), Bn(ce, Ar(U.statements, C, hi, K)), t.updateSourceFile( + U, + ot(t.createNodeArray(ce), U.statements) + ); + } else + return gr(U, C, e); + } + function C(U) { + switch (U.kind) { + case 271: + return Nu(o) >= 100 ? P(U) : void 0; + case 277: + return j(U); + case 278: + return F(U); + } + return U; + } + function D(U) { + const G = xx(t, U, E.checkDefined(g), i, s, o), ce = []; + if (G && ce.push(G), Nu(o) === 200) + return t.createCallExpression( + t.createIdentifier("require"), + /*typeArguments*/ + void 0, + ce + ); + if (!h) { + const X = t.createUniqueName( + "_createRequire", + 48 + /* FileLevel */ + ), Z = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamedImports([ + t.createImportSpecifier( + /*isTypeOnly*/ + !1, + t.createIdentifier("createRequire"), + X + ) + ]) + ), + t.createStringLiteral("module"), + /*attributes*/ + void 0 + ), oe = t.createUniqueName( + "__require", + 48 + /* FileLevel */ + ), ne = t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + oe, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + t.createCallExpression( + t.cloneNode(X), + /*typeArguments*/ + void 0, + [ + t.createPropertyAccessExpression(t.createMetaProperty(102, t.createIdentifier("meta")), t.createIdentifier("url")) + ] + ) + ) + ], + /*flags*/ + c >= 2 ? 2 : 0 + /* None */ + ) + ); + h = [Z, ne]; + } + const K = h[1].declarationList.declarations[0].name; + return E.assertNode(K, Re), t.createCallExpression( + t.cloneNode(K), + /*typeArguments*/ + void 0, + ce + ); + } + function P(U) { + E.assert(V1(U), "import= for internal module references should be handled in an earlier transformer."); + let G; + return G = Tr( + G, + kn( + ot( + t.createVariableStatement( + /*modifiers*/ + void 0, + t.createVariableDeclarationList( + [ + t.createVariableDeclaration( + t.cloneNode(U.name), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + D(U) + ) + ], + /*flags*/ + c >= 2 ? 2 : 0 + /* None */ + ) + ), + U + ), + U + ) + ), G = O(G, U), jm(G); + } + function O(U, G) { + return Vn( + G, + 32 + /* Export */ + ) && (U = Tr( + U, + t.createExportDeclaration( + /*modifiers*/ + void 0, + G.isTypeOnly, + t.createNamedExports([t.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + dn(G.name) + )]) + ) + )), U; + } + function j(U) { + return U.isExportEquals ? Nu(o) === 200 ? kn( + t.createExpressionStatement( + t.createAssignment( + t.createPropertyAccessExpression( + t.createIdentifier("module"), + "exports" + ), + U.expression + ) + ), + U + ) : void 0 : U; + } + function F(U) { + if (o.module !== void 0 && o.module > 5 || !U.exportClause || !Ym(U.exportClause) || !U.moduleSpecifier) + return U; + const G = U.exportClause.name, ce = t.getGeneratedNameForNode(G), K = t.createImportDeclaration( + /*modifiers*/ + void 0, + t.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + t.createNamespaceImport( + ce + ) + ), + U.moduleSpecifier, + U.attributes + ); + kn(K, U.exportClause); + const X = s7(U) ? t.createExportDefault(ce) : t.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + t.createNamedExports([t.createExportSpecifier( + /*isTypeOnly*/ + !1, + ce, + G + )]) + ); + return kn(X, U), [K, X]; + } + function V(U, G, ce) { + yi(G) ? ((il(G) || ap(o)) && o.importHelpers && (d = /* @__PURE__ */ new Map()), _(U, G, ce), d = void 0) : _(U, G, ce); + } + function L(U, G) { + return G = u(U, G), d && Re(G) && ua(G) & 8192 ? $(G) : G; + } + function $(U) { + const G = dn(U); + let ce = d.get(G); + return ce || d.set(G, ce = t.createUniqueName( + G, + 48 + /* FileLevel */ + )), ce; + } + } + function lie(e) { + const t = e.onSubstituteNode, n = e.onEmitNode, i = dW(e), s = e.onSubstituteNode, o = e.onEmitNode; + e.onSubstituteNode = t, e.onEmitNode = n; + const c = pW(e), _ = e.onSubstituteNode, u = e.onEmitNode; + e.onSubstituteNode = g, e.onEmitNode = h, e.enableSubstitution( + 307 + /* SourceFile */ + ), e.enableEmitNotification( + 307 + /* SourceFile */ + ); + let d; + return C; + function g(P, O) { + return yi(O) ? (d = O, t(P, O)) : d ? d.impliedNodeFormat === 99 ? s(P, O) : _(P, O) : t(P, O); + } + function h(P, O, j) { + return yi(O) && (d = O), d ? d.impliedNodeFormat === 99 ? o(P, O, j) : u(P, O, j) : n(P, O, j); + } + function S(P) { + return P.impliedNodeFormat === 99 ? i : c; + } + function T(P) { + if (P.isDeclarationFile) + return P; + d = P; + const O = S(P)(P); + return d = void 0, E.assert(yi(O)), O; + } + function C(P) { + return P.kind === 307 ? T(P) : D(P); + } + function D(P) { + return e.factory.createBundle(or(P.sourceFiles, T)); + } + } + function XO(e) { + return ti(e) || rs(e) || I_(e) || da(e) || Yd(e) || n0(e) || nA(e) || px(e) || hc(e) || um(e) || Ac(e) || ji(e) || Mo(e) || bh(e) || nl(e) || Rp(e) || ec(e) || Pb(e) || Dn(e) || ho(e) || cn(e) || Np(e); + } + function uie(e) { + if (Yd(e) || n0(e)) + return t; + return um(e) || hc(e) ? i : b0(e); + function t(o) { + const c = n(o); + return c !== void 0 ? { + diagnosticMessage: c, + errorNode: e, + typeName: e.name + } : void 0; + } + function n(o) { + return Os(e) ? o.errorModuleName ? o.accessibility === 2 ? p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 ? o.errorModuleName ? o.accessibility === 2 ? p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_property_0_of_exported_class_has_or_is_using_private_name_1 : o.errorModuleName ? p.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Property_0_of_exported_interface_has_or_is_using_private_name_1; + } + function i(o) { + const c = s(o); + return c !== void 0 ? { + diagnosticMessage: c, + errorNode: e, + typeName: e.name + } : void 0; + } + function s(o) { + return Os(e) ? o.errorModuleName ? o.accessibility === 2 ? p.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 ? o.errorModuleName ? o.accessibility === 2 ? p.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_method_0_of_exported_class_has_or_is_using_private_name_1 : o.errorModuleName ? p.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Method_0_of_exported_interface_has_or_is_using_private_name_1; + } + } + function b0(e) { + if (ti(e) || rs(e) || I_(e) || Dn(e) || ho(e) || cn(e) || da(e) || ec(e)) + return n; + return Yd(e) || n0(e) ? i : nA(e) || px(e) || hc(e) || um(e) || Ac(e) || Pb(e) ? s : ji(e) ? Q_(e, e.parent) && Vn( + e.parent, + 2 + /* Private */ + ) ? n : o : Mo(e) ? _ : bh(e) ? u : nl(e) ? d : Rp(e) || Np(e) ? g : E.assertNever(e, `Attempted to set a declaration diagnostic context for unhandled node kind: ${E.formatSyntaxKind(e.kind)}`); + function t(h) { + if (e.kind === 260 || e.kind === 208) + return h.errorModuleName ? h.accessibility === 2 ? p.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : p.Exported_variable_0_has_or_is_using_private_name_1; + if (e.kind === 172 || e.kind === 211 || e.kind === 212 || e.kind === 226 || e.kind === 171 || e.kind === 169 && Vn( + e.parent, + 2 + /* Private */ + )) + return Os(e) ? h.errorModuleName ? h.accessibility === 2 ? p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1 : e.parent.kind === 263 || e.kind === 169 ? h.errorModuleName ? h.accessibility === 2 ? p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Public_property_0_of_exported_class_has_or_is_using_private_name_1 : h.errorModuleName ? p.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Property_0_of_exported_interface_has_or_is_using_private_name_1; + } + function n(h) { + const S = t(h); + return S !== void 0 ? { + diagnosticMessage: S, + errorNode: e, + typeName: e.name + } : void 0; + } + function i(h) { + let S; + return e.kind === 178 ? Os(e) ? S = h.errorModuleName ? p.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1 : S = h.errorModuleName ? p.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1 : Os(e) ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1 : S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1, { + diagnosticMessage: S, + errorNode: e.name, + typeName: e.name + }; + } + function s(h) { + let S; + switch (e.kind) { + case 180: + S = h.errorModuleName ? p.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 179: + S = h.errorModuleName ? p.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 181: + S = h.errorModuleName ? p.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; + break; + case 174: + case 173: + Os(e) ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0 : e.parent.kind === 263 ? S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0 : S = h.errorModuleName ? p.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; + break; + case 262: + S = h.errorModuleName ? h.accessibility === 2 ? p.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : p.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : p.Return_type_of_exported_function_has_or_is_using_private_name_0; + break; + default: + return E.fail("This is unknown kind for signature: " + e.kind); + } + return { + diagnosticMessage: S, + errorNode: e.name || e + }; + } + function o(h) { + const S = c(h); + return S !== void 0 ? { + diagnosticMessage: S, + errorNode: e, + typeName: e.name + } : void 0; + } + function c(h) { + switch (e.parent.kind) { + case 176: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; + case 180: + case 185: + return h.errorModuleName ? p.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + case 179: + return h.errorModuleName ? p.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + case 181: + return h.errorModuleName ? p.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; + case 174: + case 173: + return Os(e.parent) ? h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 : e.parent.parent.kind === 263 ? h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 : h.errorModuleName ? p.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + case 262: + case 184: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_exported_function_has_or_is_using_private_name_1; + case 178: + case 177: + return h.errorModuleName ? h.accessibility === 2 ? p.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : p.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : p.Parameter_0_of_accessor_has_or_is_using_private_name_1; + default: + return E.fail(`Unknown parent for parameter: ${E.formatSyntaxKind(e.parent.kind)}`); + } + } + function _() { + let h; + switch (e.parent.kind) { + case 263: + h = p.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; + break; + case 264: + h = p.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; + break; + case 200: + h = p.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; + break; + case 185: + case 180: + h = p.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; + break; + case 179: + h = p.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; + break; + case 174: + case 173: + Os(e.parent) ? h = p.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1 : e.parent.parent.kind === 263 ? h = p.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1 : h = p.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; + break; + case 184: + case 262: + h = p.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; + break; + case 195: + h = p.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; + break; + case 265: + h = p.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; + break; + default: + return E.fail("This is unknown parent for type parameter: " + e.parent.kind); + } + return { + diagnosticMessage: h, + errorNode: e, + typeName: e.name + }; + } + function u() { + let h; + return rl(e.parent.parent) ? h = nf(e.parent) && e.parent.token === 119 ? p.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : e.parent.parent.name ? p.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : p.extends_clause_of_exported_class_has_or_is_using_private_name_0 : h = p.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1, { + diagnosticMessage: h, + errorNode: e, + typeName: es(e.parent.parent) + }; + } + function d() { + return { + diagnosticMessage: p.Import_declaration_0_is_using_private_name_1, + errorNode: e, + typeName: e.name + }; + } + function g(h) { + return { + diagnosticMessage: h.errorModuleName ? p.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2 : p.Exported_type_alias_0_has_or_is_using_private_name_1, + errorNode: Np(e) ? E.checkDefined(e.typeExpression) : e.type, + typeName: Np(e) ? es(e) : e.name + }; + } + } + function _ie(e) { + const t = { + 219: p.Add_a_return_type_to_the_function_expression, + 218: p.Add_a_return_type_to_the_function_expression, + 174: p.Add_a_return_type_to_the_method, + 177: p.Add_a_return_type_to_the_get_accessor_declaration, + 178: p.Add_a_type_to_parameter_of_the_set_accessor_declaration, + 262: p.Add_a_return_type_to_the_function_declaration, + 180: p.Add_a_return_type_to_the_function_declaration, + 169: p.Add_a_type_annotation_to_the_parameter_0, + 260: p.Add_a_type_annotation_to_the_variable_0, + 172: p.Add_a_type_annotation_to_the_property_0, + 171: p.Add_a_type_annotation_to_the_property_0, + 277: p.Move_the_expression_in_default_export_to_a_variable_and_add_a_type_annotation_to_it + }, n = { + 218: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 262: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 219: p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 174: p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 180: p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 177: p.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 178: p.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations, + 169: p.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 260: p.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 172: p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 171: p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations, + 167: p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations, + 305: p.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations, + 304: p.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations, + 209: p.Only_const_arrays_can_be_inferred_with_isolatedDeclarations, + 277: p.Default_exports_can_t_be_inferred_with_isolatedDeclarations, + 230: p.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations + }; + return i; + function i(P) { + if (sr(P, nf)) + return Xr(P, p.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations); + if ((em(P) || wb(P.parent)) && (l_(P) || fo(P))) + return C(P); + switch (E.type(P), P.kind) { + case 177: + case 178: + return o(P); + case 167: + case 304: + case 305: + return _(P); + case 209: + case 230: + return u(P); + case 174: + case 180: + case 218: + case 219: + case 262: + return d(P); + case 208: + return g(P); + case 172: + case 260: + return h(P); + case 169: + return S(P); + case 303: + return D(P.initializer); + case 231: + return T(P); + default: + return D(P); + } + } + function s(P) { + const O = sr(P, (j) => ko(j) || hi(j) || ti(j) || rs(j) || ji(j)); + if (O) + return ko(O) ? O : Mp(O) ? sr(O, (j) => so(j) && !ec(j)) : hi(O) ? void 0 : O; + } + function o(P) { + const { getAccessor: O, setAccessor: j } = gy(P.symbol.declarations, P), F = (Yd(P) ? P.parameters[0] : P) ?? P, V = Xr(F, n[P.kind]); + return j && Fs(V, Xr(j, t[j.kind])), O && Fs(V, Xr(O, t[O.kind])), V; + } + function c(P, O) { + const j = s(P); + if (j) { + const F = ko(j) || !j.name ? "" : sc( + j.name, + /*includeTrivia*/ + !1 + ); + Fs(O, Xr(j, t[j.kind], F)); + } + return O; + } + function _(P) { + const O = Xr(P, n[P.kind]); + return c(P, O), O; + } + function u(P) { + const O = Xr(P, n[P.kind]); + return c(P, O), O; + } + function d(P) { + const O = Xr(P, n[P.kind]); + return c(P, O), Fs(O, Xr(P, t[P.kind])), O; + } + function g(P) { + return Xr(P, p.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations); + } + function h(P) { + const O = Xr(P, n[P.kind]), j = sc( + P.name, + /*includeTrivia*/ + !1 + ); + return Fs(O, Xr(P, t[P.kind], j)), O; + } + function S(P) { + if (Yd(P.parent)) + return o(P.parent); + const O = e.requiresAddingImplicitUndefined(P); + if (!O && P.initializer) + return D(P.initializer); + const j = O ? p.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations : n[P.kind], F = Xr(P, j), V = sc( + P.name, + /*includeTrivia*/ + !1 + ); + return Fs(F, Xr(P, t[P.kind], V)), F; + } + function T(P) { + return D(P, p.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations); + } + function C(P) { + const O = Xr(P, p.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations, sc( + P, + /*includeTrivia*/ + !1 + )); + return c(P, O), O; + } + function D(P, O) { + const j = s(P); + let F; + if (j) { + const V = ko(j) || !j.name ? "" : sc( + j.name, + /*includeTrivia*/ + !1 + ), L = sr(P.parent, ($) => ko($) || (hi($) ? "quit" : !Qu($) && !IJ($) && !tD($))); + j === L ? (F = Xr(P, O ?? n[j.kind]), Fs(F, Xr(j, t[j.kind], V))) : (F = Xr(P, O ?? p.Expression_type_can_t_be_inferred_with_isolatedDeclarations), Fs(F, Xr(j, t[j.kind], V)), Fs(F, Xr(P, p.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit))); + } else + F = Xr(P, O ?? p.Expression_type_can_t_be_inferred_with_isolatedDeclarations); + return F; + } + } + function fie(e, t, n) { + const i = e.getCompilerOptions(), s = Ln(J7(e, n), k7); + return MA( + t, + e, + N, + i, + n ? ls(s, n) ? [n] : He : s, + [mW], + /*allowDtsFiles*/ + !1 + ).diagnostics; + } + var FA = 531469; + function mW(e) { + const t = () => E.fail("Diagnostic emitted without context"); + let n = t, i = !0, s = !1, o = !1, c = !1, _ = !1, u, d, g, h; + const { factory: S } = e, T = e.getEmitHost(), C = { + trackSymbol: oe, + reportInaccessibleThisError: ae, + reportInaccessibleUniqueSymbolError: fe, + reportCyclicStructureError: H, + reportPrivateInBaseOfClassExpression: ne, + reportLikelyUnsafeImportRequiredError: le, + reportTruncationError: Ae, + moduleResolverHost: T, + reportNonlocalAugmentation: ge, + reportNonSerializableProperty: de, + reportInferenceFallback: X + }; + let D, P, O, j, F, V; + const L = e.getEmitResolver(), $ = e.getCompilerOptions(), U = _ie(L), { stripInternal: G, isolatedDeclarations: ce } = $; + return De; + function K(te) { + L.getPropertiesOfContainerFunction(te).forEach((rt) => { + if (nx(rt.valueDeclaration)) { + const re = cn(rt.valueDeclaration) ? rt.valueDeclaration.left : rt.valueDeclaration; + e.addDiagnostic(Xr( + re, + p.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function + )); + } + }); + } + function X(te) { + !ce || p_(O) || (ti(te) && L.isExpandoFunctionDeclaration(te) ? K(te) : e.addDiagnostic(U(te))); + } + function Z(te) { + if (te.accessibility === 0) { + if (te.aliasesToMakeVisible) + if (!d) + d = te.aliasesToMakeVisible; + else + for (const rt of te.aliasesToMakeVisible) + Zf(d, rt); + } else if (te.accessibility !== 3) { + const rt = n(te); + if (rt) + return rt.typeName ? e.addDiagnostic(Xr(te.errorNode || rt.errorNode, rt.diagnosticMessage, sc(rt.typeName), te.errorSymbolName, te.errorModuleName)) : e.addDiagnostic(Xr(te.errorNode || rt.errorNode, rt.diagnosticMessage, te.errorSymbolName, te.errorModuleName)), !0; + } + return !1; + } + function oe(te, rt, re) { + return te.flags & 262144 ? !1 : Z(L.isSymbolAccessible( + te, + rt, + re, + /*shouldComputeAliasToMarkVisible*/ + !0 + )); + } + function ne(te) { + (D || P) && e.addDiagnostic( + Xr(D || P, p.Property_0_of_exported_class_expression_may_not_be_private_or_protected, te) + ); + } + function pe() { + return D ? ao(D) : P && es(P) ? ao(es(P)) : P && ko(P) ? P.isExportEquals ? "export=" : "default" : "(Missing)"; + } + function fe() { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, pe(), "unique symbol")); + } + function H() { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, pe())); + } + function ae() { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, pe(), "this")); + } + function le(te) { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, pe(), te)); + } + function Ae() { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); + } + function ge(te, rt, re) { + var Ee; + const Ne = (Ee = rt.declarations) == null ? void 0 : Ee.find((lt) => xr(lt) === te), et = Ln(re.declarations, (lt) => xr(lt) !== te); + if (Ne && et) + for (const lt of et) + e.addDiagnostic(Fs( + Xr(lt, p.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), + Xr(Ne, p.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file) + )); + } + function de(te) { + (D || P) && e.addDiagnostic(Xr(D || P, p.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, te)); + } + function ve(te) { + const rt = n; + n = (Ee) => Ee.errorNode && XO(Ee.errorNode) ? b0(Ee.errorNode)(Ee) : { + diagnosticMessage: Ee.errorModuleName ? p.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : p.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, + errorNode: Ee.errorNode || te + }; + const re = L.getDeclarationStatementsForSourceFile(te, FA, C); + return n = rt, re; + } + function De(te) { + if (te.kind === 307 && te.isDeclarationFile) + return te; + if (te.kind === 308) { + s = !0, j = [], F = [], V = []; + let be = !1; + const ft = S.createBundle( + or(te.sourceFiles, (kt) => { + if (kt.isDeclarationFile) return; + if (be = be || kt.hasNoDefaultLib, O = kt, u = kt, d = void 0, h = !1, g = /* @__PURE__ */ new Map(), n = t, c = !1, _ = !1, Ee(kt), A_(kt) || Ap(kt)) { + o = !1, i = !1; + const Ut = p_(kt) ? S.createNodeArray(ve(kt)) : Ar(kt.statements, wr, hi); + return S.updateSourceFile( + kt, + [S.createModuleDeclaration( + [S.createModifier( + 138 + /* DeclareKeyword */ + )], + S.createStringLiteral(kB(e.getEmitHost(), kt)), + S.createModuleBlock(ot(S.createNodeArray(_s(Ut)), kt.statements)) + )], + /*isDeclarationFile*/ + !0, + /*referencedFiles*/ + [], + /*typeReferences*/ + [], + /*hasNoDefaultLib*/ + !1, + /*libReferences*/ + [] + ); + } + i = !0; + const yt = p_(kt) ? S.createNodeArray(ve(kt)) : Ar(kt.statements, wr, hi); + return S.updateSourceFile( + kt, + _s(yt), + /*isDeclarationFile*/ + !0, + /*referencedFiles*/ + [], + /*typeReferences*/ + [], + /*hasNoDefaultLib*/ + !1, + /*libReferences*/ + [] + ); + }) + ), bt = Xn(Rl(OD( + te, + T, + /*forceDtsPaths*/ + !0 + ).declarationFilePath)); + return ft.syntheticFileReferences = jt(bt), ft.syntheticTypeReferences = et(), ft.syntheticLibReferences = lt(), ft.hasNoDefaultLib = be, ft; + } + i = !0, c = !1, _ = !1, u = te, O = te, n = t, s = !1, o = !1, h = !1, d = void 0, g = /* @__PURE__ */ new Map(), j = [], F = [], V = [], Ee(O); + let rt; + if (p_(O)) + rt = S.createNodeArray(ve(te)); + else { + const be = Ar(te.statements, wr, hi); + rt = ot(S.createNodeArray(_s(be)), te.statements), il(te) && (!o || c && !_) && (rt = ot(S.createNodeArray([...rt, cA(S)]), rt)); + } + const re = Xn(Rl(OD( + te, + T, + /*forceDtsPaths*/ + !0 + ).declarationFilePath)); + return S.updateSourceFile( + te, + rt, + /*isDeclarationFile*/ + !0, + jt(re), + et(), + te.hasNoDefaultLib, + lt() + ); + function Ee(be) { + j = Hi(j, or(be.referencedFiles, (ft) => [be, ft])), F = Hi(F, be.typeReferenceDirectives), V = Hi(V, be.libReferenceDirectives); + } + function Ne(be) { + const ft = { ...be }; + return ft.pos = -1, ft.end = -1, ft; + } + function et() { + return Ii(F, (be) => { + if (be.preserve) + return Ne(be); + }); + } + function lt() { + return Ii(V, (be) => { + if (be.preserve) + return Ne(be); + }); + } + function jt(be) { + return Ii(j, ([ft, bt]) => { + if (!bt.preserve) return; + const kt = T.getSourceFileFromReference(ft, bt); + if (!kt) + return; + let yt; + if (kt.isDeclarationFile) + yt = kt.fileName; + else { + if (s && ls(te.sourceFiles, kt)) return; + const je = OD( + kt, + T, + /*forceDtsPaths*/ + !0 + ); + yt = je.declarationFilePath || je.jsFilePath || kt.fileName; + } + if (!yt) return; + const Ut = xT( + be, + yt, + T.getCurrentDirectory(), + T.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !1 + ), W = Ne(bt); + return W.fileName = Ut, W; + }); + } + } + function Xe(te) { + if (te.kind === 80) + return te; + return te.kind === 207 ? S.updateArrayBindingPattern(te, Ar(te.elements, rt, VI)) : S.updateObjectBindingPattern(te, Ar(te.elements, rt, da)); + function rt(re) { + return re.kind === 232 ? re : (re.propertyName && oa(re.propertyName) && fo(re.propertyName.expression) && Vt(re.propertyName.expression, u), S.updateBindingElement( + re, + re.dotDotDotToken, + re.propertyName, + Xe(re.name), + /*initializer*/ + void 0 + )); + } + } + function Ie(te, rt, re) { + let Ee; + h || (Ee = n, n = b0(te)); + const Ne = S.updateParameterDeclaration( + te, + lRe(S, te, rt), + te.dotDotDotToken, + Xe(te.name), + L.isOptionalParameter(te) ? te.questionToken || S.createToken( + 58 + /* QuestionToken */ + ) : void 0, + Qe( + te, + re || te.type, + /*ignorePrivate*/ + !0 + ), + // Ignore private param props, since this type is going straight back into a param + Fe(te) + ); + return h || (n = Ee), Ne; + } + function ye(te) { + return _ve(te) && !!te.initializer && L.isLiteralConstDeclaration(Ki(te)); + } + function Fe(te) { + if (ye(te)) { + const rt = kee(te.initializer); + return A5(rt) || X(te), L.createLiteralConstValue(Ki(te, _ve), C); + } + } + function Qe(te, rt, re) { + if (!re && ef( + te, + 2 + /* Private */ + ) || ye(te)) + return; + const Ee = te.kind === 169 && L.requiresAddingImplicitUndefined(te); + if (rt && !Ee) + return Ge(rt, $n, ai); + D = te.name; + let Ne; + h || (Ne = n, n = b0(te)); + let et; + switch (te.kind) { + case 169: + case 171: + case 172: + case 208: + case 260: + et = L.createTypeOfDeclaration(te, u, FA, C); + break; + case 262: + case 180: + case 173: + case 174: + case 177: + case 179: + et = L.createReturnTypeOfSignatureDeclaration(te, u, FA, C); + break; + default: + E.assertNever(te); + } + return D = void 0, h || (n = Ne), et ?? S.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function Ke(te) { + switch (te = Ki(te), te.kind) { + case 262: + case 267: + case 264: + case 263: + case 265: + case 266: + return !L.isDeclarationVisible(te); + case 260: + return !at(te); + case 271: + case 272: + case 278: + case 277: + return !1; + case 175: + return !0; + } + return !1; + } + function Be(te) { + var rt; + if (te.body) + return !0; + const re = (rt = te.symbol.declarations) == null ? void 0 : rt.filter((Ee) => Ac(Ee) && !Ee.body); + return !re || re.indexOf(te) === re.length - 1; + } + function at(te) { + return ml(te) ? !1 : Ts(te.name) ? ut(te.name.elements, at) : L.isDeclarationVisible(te); + } + function Wt(te, rt, re) { + if (ef( + te, + 2 + /* Private */ + )) + return S.createNodeArray(); + const Ee = or(rt, (Ne) => Ie(Ne, re)); + return Ee ? S.createNodeArray(Ee, rt.hasTrailingComma) : S.createNodeArray(); + } + function nr(te, rt) { + let re; + if (!rt) { + const Ee = bb(te); + Ee && (re = [Ie(Ee)]); + } + if (rf(te)) { + let Ee; + if (!rt) { + const Ne = bC(te); + if (Ne) { + const et = $e(te, gy(Gs(te.parent) ? te.parent.properties : te.parent.members, te)); + Ee = Ie( + Ne, + /*modifierMask*/ + void 0, + et + ); + } + } + Ee || (Ee = S.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "value" + )), re = Tr(re, Ee); + } + return S.createNodeArray(re || He); + } + function Kt(te, rt) { + return ef( + te, + 2 + /* Private */ + ) ? void 0 : Ar(rt, $n, Mo); + } + function Pr(te) { + return yi(te) || Rp(te) || Nc(te) || rl(te) || Vl(te) || ps(te) || Pb(te) || iS(te); + } + function Vt(te, rt) { + const re = L.isEntityNameVisible(te, rt); + Z(re); + } + function zt(te, rt) { + return gf(te) && gf(rt) && (te.jsDoc = rt.jsDoc), el(te, lm(rt)); + } + function jr(te, rt) { + if (rt) { + if (o = o || te.kind !== 267 && te.kind !== 205, Ga(rt) && s) { + const re = lK(e.getEmitHost(), L, te); + if (re) + return S.createStringLiteral(re); + } + return rt; + } + } + function ci(te) { + if (L.isDeclarationVisible(te)) + if (te.moduleReference.kind === 283) { + const rt = o4(te); + return S.updateImportEqualsDeclaration( + te, + te.modifiers, + te.isTypeOnly, + te.name, + S.updateExternalModuleReference(te.moduleReference, jr(te, rt)) + ); + } else { + const rt = n; + return n = b0(te), Vt(te.moduleReference, u), n = rt, te; + } + } + function Xt(te) { + if (!te.importClause) + return S.updateImportDeclaration( + te, + te.modifiers, + te.importClause, + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ); + const rt = te.importClause && te.importClause.name && L.isDeclarationVisible(te.importClause) ? te.importClause.name : void 0; + if (!te.importClause.namedBindings) + return rt && S.updateImportDeclaration( + te, + te.modifiers, + S.updateImportClause( + te.importClause, + te.importClause.isTypeOnly, + rt, + /*namedBindings*/ + void 0 + ), + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ); + if (te.importClause.namedBindings.kind === 274) { + const Ee = L.isDeclarationVisible(te.importClause.namedBindings) ? te.importClause.namedBindings : ( + /*namedBindings*/ + void 0 + ); + return rt || Ee ? S.updateImportDeclaration( + te, + te.modifiers, + S.updateImportClause( + te.importClause, + te.importClause.isTypeOnly, + rt, + Ee + ), + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ) : void 0; + } + const re = Ii(te.importClause.namedBindings.elements, (Ee) => L.isDeclarationVisible(Ee) ? Ee : void 0); + if (re && re.length || rt) + return S.updateImportDeclaration( + te, + te.modifiers, + S.updateImportClause( + te.importClause, + te.importClause.isTypeOnly, + rt, + re && re.length ? S.updateNamedImports(te.importClause.namedBindings, re) : void 0 + ), + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ); + if (L.isImportRequiredByAugmentation(te)) + return ce && e.addDiagnostic(Xr(te, p.Declaration_emit_for_this_file_requires_preserving_this_import_for_augmentations_This_is_not_supported_with_isolatedDeclarations)), S.updateImportDeclaration( + te, + te.modifiers, + /*importClause*/ + void 0, + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ); + } + function Ai(te) { + const rt = ZC(te); + return te && rt !== void 0 ? te : void 0; + } + function _s(te) { + for (; Dr(d); ) { + const re = d.shift(); + if (!o7(re)) + return E.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${E.formatSyntaxKind(re.kind)}`); + const Ee = i; + i = re.parent && yi(re.parent) && !(il(re.parent) && s); + const Ne = At(re); + i = Ee, g.set(Ku(re), Ne); + } + return Ar(te, rt, hi); + function rt(re) { + if (o7(re)) { + const Ee = Ku(re); + if (g.has(Ee)) { + const Ne = g.get(Ee); + return g.delete(Ee), Ne && ((ss(Ne) ? ut(Ne, UI) : UI(Ne)) && (c = !0), yi(re.parent) && (ss(Ne) ? ut(Ne, Mw) : Mw(Ne)) && (o = !0)), Ne; + } + } + return re; + } + } + function $n(te) { + if (mi(te)) return; + if (tu(te)) { + if (Ke(te)) return; + if (ph(te)) { + if (ce) { + if (rl(te.parent) || Gs(te.parent)) { + e.addDiagnostic(Xr(te, p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations)); + return; + } else if ( + // Type declarations just need to double-check that the input computed name is an entity name expression + (Vl(te.parent) || Xu(te.parent)) && !fo(te.name.expression) + ) { + e.addDiagnostic(Xr(te, p.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); + return; + } + } else if (!L.isLateBound(Ki(te)) || !fo(te.name.expression)) + return; + } + } + if (ps(te) && L.isImplementationOfOverload(te) || wte(te)) return; + let rt; + Pr(te) && (rt = u, u = te); + const re = n, Ee = XO(te), Ne = h; + let et = (te.kind === 187 || te.kind === 200) && te.parent.kind !== 265; + if ((hc(te) || um(te)) && ef( + te, + 2 + /* Private */ + )) + return te.symbol && te.symbol.declarations && te.symbol.declarations[0] !== te ? void 0 : lt(S.createPropertyDeclaration( + Yt(te), + te.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )); + if (Ee && !h && (n = b0(te)), wb(te) && Vt(te.exprName, u), et && (h = !0), _Re(te)) + switch (te.kind) { + case 233: { + (l_(te.expression) || fo(te.expression)) && Vt(te.expression, u); + const jt = gr(te, $n, e); + return lt(S.updateExpressionWithTypeArguments(jt, jt.expression, jt.typeArguments)); + } + case 183: { + Vt(te.typeName, u); + const jt = gr(te, $n, e); + return lt(S.updateTypeReferenceNode(jt, jt.typeName, jt.typeArguments)); + } + case 180: + return lt(S.updateConstructSignature( + te, + Kt(te, te.typeParameters), + Wt(te, te.parameters), + Qe(te, te.type) + )); + case 176: { + const jt = S.createConstructorDeclaration( + /*modifiers*/ + Yt(te), + Wt( + te, + te.parameters, + 0 + /* None */ + ), + /*body*/ + void 0 + ); + return lt(jt); + } + case 174: { + if (wi(te.name)) + return lt( + /*returnValue*/ + void 0 + ); + const jt = S.createMethodDeclaration( + Yt(te), + /*asteriskToken*/ + void 0, + te.name, + te.questionToken, + Kt(te, te.typeParameters), + Wt(te, te.parameters), + Qe(te, te.type), + /*body*/ + void 0 + ); + return lt(jt); + } + case 177: { + if (wi(te.name)) + return lt( + /*returnValue*/ + void 0 + ); + const jt = $e(te, gy(Gs(te.parent) ? te.parent.properties : te.parent.members, te)); + return lt(S.updateGetAccessorDeclaration( + te, + Yt(te), + te.name, + nr(te, ef( + te, + 2 + /* Private */ + )), + Qe(te, jt), + /*body*/ + void 0 + )); + } + case 178: + return wi(te.name) ? lt( + /*returnValue*/ + void 0 + ) : lt(S.updateSetAccessorDeclaration( + te, + Yt(te), + te.name, + nr(te, ef( + te, + 2 + /* Private */ + )), + /*body*/ + void 0 + )); + case 172: + return wi(te.name) ? lt( + /*returnValue*/ + void 0 + ) : lt(S.updatePropertyDeclaration( + te, + Yt(te), + te.name, + te.questionToken, + Qe(te, te.type), + Fe(te) + )); + case 171: + return wi(te.name) ? lt( + /*returnValue*/ + void 0 + ) : lt(S.updatePropertySignature( + te, + Yt(te), + te.name, + te.questionToken, + Qe(te, te.type) + )); + case 173: + return wi(te.name) ? lt( + /*returnValue*/ + void 0 + ) : lt(S.updateMethodSignature( + te, + Yt(te), + te.name, + te.questionToken, + Kt(te, te.typeParameters), + Wt(te, te.parameters), + Qe(te, te.type) + )); + case 179: + return lt( + S.updateCallSignature( + te, + Kt(te, te.typeParameters), + Wt(te, te.parameters), + Qe(te, te.type) + ) + ); + case 181: + return lt(S.updateIndexSignature( + te, + Yt(te), + Wt(te, te.parameters), + Ge(te.type, $n, ai) || S.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + )); + case 260: + return Ts(te.name) ? ln(te.name) : (et = !0, h = !0, lt(S.updateVariableDeclaration( + te, + te.name, + /*exclamationToken*/ + void 0, + Qe(te, te.type), + Fe(te) + ))); + case 168: + return os(te) && (te.default || te.constraint) ? lt(S.updateTypeParameterDeclaration( + te, + te.modifiers, + te.name, + /*constraint*/ + void 0, + /*defaultType*/ + void 0 + )) : lt(gr(te, $n, e)); + case 194: { + const jt = Ge(te.checkType, $n, ai), be = Ge(te.extendsType, $n, ai), ft = u; + u = te.trueType; + const bt = Ge(te.trueType, $n, ai); + u = ft; + const kt = Ge(te.falseType, $n, ai); + return E.assert(jt), E.assert(be), E.assert(bt), E.assert(kt), lt(S.updateConditionalTypeNode(te, jt, be, bt, kt)); + } + case 184: + return lt(S.updateFunctionTypeNode( + te, + Ar(te.typeParameters, $n, Mo), + Wt(te, te.parameters), + E.checkDefined(Ge(te.type, $n, ai)) + )); + case 185: + return lt(S.updateConstructorTypeNode( + te, + Yt(te), + Ar(te.typeParameters, $n, Mo), + Wt(te, te.parameters), + E.checkDefined(Ge(te.type, $n, ai)) + )); + case 205: + return a0(te) ? lt(S.updateImportTypeNode( + te, + S.updateLiteralTypeNode(te.argument, jr(te, te.argument.literal)), + te.attributes, + te.qualifier, + Ar(te.typeArguments, $n, ai), + te.isTypeOf + )) : lt(te); + default: + E.assertNever(te, `Attempted to process unhandled node kind: ${E.formatSyntaxKind(te.kind)}`); + } + return mx(te) && Vs(O, te.pos).line === Vs(O, te.end).line && Kr( + te, + 1 + /* SingleLine */ + ), lt(gr(te, $n, e)); + function lt(jt) { + return jt && Ee && ph(te) && ri(te), Pr(te) && (u = rt), Ee && !h && (n = re), et && (h = Ne), jt === te ? jt : jt && kn(zt(jt, te), te); + } + } + function os(te) { + return te.parent.kind === 174 && ef( + te.parent, + 2 + /* Private */ + ); + } + function wr(te) { + if (!uRe(te) || mi(te)) return; + switch (te.kind) { + case 278: + return yi(te.parent) && (o = !0), _ = !0, S.updateExportDeclaration( + te, + te.modifiers, + te.isTypeOnly, + te.exportClause, + jr(te, te.moduleSpecifier), + Ai(te.attributes) + ); + case 277: { + if (yi(te.parent) && (o = !0), _ = !0, te.expression.kind === 80) + return te; + { + const re = S.createUniqueName( + "_default", + 16 + /* Optimistic */ + ); + n = () => ({ + diagnosticMessage: p.Default_export_of_the_module_has_or_is_using_private_name_0, + errorNode: te + }), P = te; + const Ee = S.createVariableDeclaration( + re, + /*exclamationToken*/ + void 0, + L.createTypeOfExpression(te.expression, te, FA, C), + /*initializer*/ + void 0 + ); + P = void 0; + const Ne = S.createVariableStatement(i ? [S.createModifier( + 138 + /* DeclareKeyword */ + )] : [], S.createVariableDeclarationList( + [Ee], + 2 + /* Const */ + )); + return zt(Ne, te), Q3(te), [Ne, S.updateExportAssignment(te, te.modifiers, re)]; + } + } + } + const rt = At(te); + return g.set(Ku(te), rt), te; + } + function Ss(te) { + if (nl(te) || ef( + te, + 2048 + /* Default */ + ) || !ed(te)) + return te; + const rt = S.createModifiersFromModifierFlags(Au(te) & 131039); + return S.replaceModifiers(te, rt); + } + function Le(te, rt, re, Ee) { + const Ne = S.updateModuleDeclaration(te, rt, re, Ee); + if (wu(Ne) || Ne.flags & 32) + return Ne; + const et = S.createModuleDeclaration( + Ne.modifiers, + Ne.name, + Ne.body, + Ne.flags | 32 + /* Namespace */ + ); + return kn(et, Ne), ot(et, Ne), et; + } + function At(te) { + if (d) + for (; xE(d, te); ) ; + if (mi(te)) return; + switch (te.kind) { + case 271: + return ci(te); + case 272: + return Xt(te); + } + if (tu(te) && Ke(te) || Jg(te) || ps(te) && L.isImplementationOfOverload(te)) return; + let rt; + Pr(te) && (rt = u, u = te); + const re = XO(te), Ee = n; + re && (n = b0(te)); + const Ne = i; + switch (te.kind) { + case 265: { + i = !1; + const lt = et(S.updateTypeAliasDeclaration( + te, + Yt(te), + te.name, + Ar(te.typeParameters, $n, Mo), + E.checkDefined(Ge(te.type, $n, ai)) + )); + return i = Ne, lt; + } + case 264: + return et(S.updateInterfaceDeclaration( + te, + Yt(te), + te.name, + Kt(te, te.typeParameters), + nt(te.heritageClauses), + Ar(te.members, $n, cb) + )); + case 262: { + const lt = et(S.updateFunctionDeclaration( + te, + Yt(te), + /*asteriskToken*/ + void 0, + te.name, + Kt(te, te.typeParameters), + Wt(te, te.parameters), + Qe(te, te.type), + /*body*/ + void 0 + )); + if (lt && L.isExpandoFunctionDeclaration(te) && Be(te)) { + const jt = L.getPropertiesOfContainerFunction(te); + ce && K(te); + const be = av.createModuleDeclaration( + /*modifiers*/ + void 0, + lt.name || S.createIdentifier("_default"), + S.createModuleBlock([]), + 32 + /* Namespace */ + ); + Da(be, u), be.locals = Ms(jt), be.symbol = jt[0].parent; + const ft = []; + let bt = Ii(jt, (st) => { + if (!nx(st.valueDeclaration)) + return; + const z = Pi(st.escapedName); + if (!X_( + z, + 99 + /* ESNext */ + )) + return; + n = b0(st.valueDeclaration); + const he = L.createTypeOfDeclaration(st.valueDeclaration, be, FA | -2147483648, C); + n = Ee; + const q = WT(z), we = q ? S.getGeneratedNameForNode(st.valueDeclaration) : S.createIdentifier(z); + q && ft.push([we, z]); + const _e = S.createVariableDeclaration( + we, + /*exclamationToken*/ + void 0, + he, + /*initializer*/ + void 0 + ); + return S.createVariableStatement(q ? void 0 : [S.createToken( + 95 + /* ExportKeyword */ + )], S.createVariableDeclarationList([_e])); + }); + ft.length ? bt.push(S.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + S.createNamedExports(or(ft, ([st, z]) => S.createExportSpecifier( + /*isTypeOnly*/ + !1, + st, + z + ))) + )) : bt = Ii(bt, (st) => S.replaceModifiers( + st, + 0 + /* None */ + )); + const kt = S.createModuleDeclaration( + Yt(te), + te.name, + S.createModuleBlock(bt), + 32 + /* Namespace */ + ); + if (!ef( + lt, + 2048 + /* Default */ + )) + return [lt, kt]; + const yt = S.createModifiersFromModifierFlags( + Au(lt) & -2081 | 128 + /* Ambient */ + ), Ut = S.updateFunctionDeclaration( + lt, + yt, + /*asteriskToken*/ + void 0, + lt.name, + lt.typeParameters, + lt.parameters, + lt.type, + /*body*/ + void 0 + ), W = S.updateModuleDeclaration( + kt, + yt, + kt.name, + kt.body + ), je = S.createExportAssignment( + /*modifiers*/ + void 0, + /*isExportEquals*/ + !1, + kt.name + ); + return yi(te.parent) && (o = !0), _ = !0, [Ut, W, je]; + } else + return lt; + } + case 267: { + i = !1; + const lt = te.body; + if (lt && lt.kind === 268) { + const jt = c, be = _; + _ = !1, c = !1; + const ft = Ar(lt.statements, wr, hi); + let bt = _s(ft); + te.flags & 33554432 && (c = !1), !Zd(te) && !ws(bt) && !_ && (c ? bt = S.createNodeArray([...bt, cA(S)]) : bt = Ar(bt, Ss, hi)); + const kt = S.updateModuleBlock(lt, bt); + i = Ne, c = jt, _ = be; + const yt = Yt(te); + return et(Le( + te, + yt, + _b(te) ? jr(te, te.name) : te.name, + kt + )); + } else { + i = Ne; + const jt = Yt(te); + i = !1, Ge(lt, wr); + const be = Ku(lt), ft = g.get(be); + return g.delete(be), et(Le( + te, + jt, + te.name, + ft + )); + } + } + case 263: { + D = te.name, P = te; + const lt = S.createNodeArray(Yt(te)), jt = Kt(te, te.typeParameters), be = Ng(te); + let ft; + if (be) { + const je = n; + ft = iw(Xs(be.parameters, (st) => { + if (!Vn( + st, + 31 + /* ParameterPropertyModifier */ + ) || mi(st)) return; + if (n = b0(st), st.name.kind === 80) + return zt( + S.createPropertyDeclaration( + Yt(st), + st.name, + st.questionToken, + Qe(st, st.type), + Fe(st) + ), + st + ); + return z(st.name); + function z(he) { + let q; + for (const we of he.elements) + ml(we) || (Ts(we.name) && (q = Hi(q, z(we.name))), q = q || [], q.push(S.createPropertyDeclaration( + Yt(st), + we.name, + /*questionOrExclamationToken*/ + void 0, + Qe( + we, + /*type*/ + void 0 + ), + /*initializer*/ + void 0 + ))); + return q; + } + })), n = je; + } + const kt = ut(te.members, (je) => !!je.name && wi(je.name)) ? [ + S.createPropertyDeclaration( + /*modifiers*/ + void 0, + S.createPrivateIdentifier("#private"), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ) + ] : void 0, yt = Hi(Hi(kt, ft), Ar(te.members, $n, fl)), Ut = S.createNodeArray(yt), W = tm(te); + if (W && !fo(W.expression) && W.expression.kind !== 106) { + const je = te.name ? Pi(te.name.escapedText) : "default", st = S.createUniqueName( + `${je}_base`, + 16 + /* Optimistic */ + ); + n = () => ({ + diagnosticMessage: p.extends_clause_of_exported_class_0_has_or_is_using_private_name_1, + errorNode: W, + typeName: te.name + }); + const z = S.createVariableDeclaration( + st, + /*exclamationToken*/ + void 0, + L.createTypeOfExpression(W.expression, te, FA, C), + /*initializer*/ + void 0 + ), he = S.createVariableStatement(i ? [S.createModifier( + 138 + /* DeclareKeyword */ + )] : [], S.createVariableDeclarationList( + [z], + 2 + /* Const */ + )), q = S.createNodeArray(or(te.heritageClauses, (we) => { + if (we.token === 96) { + const _e = n; + n = b0(we.types[0]); + const Te = S.updateHeritageClause(we, or(we.types, (dt) => S.updateExpressionWithTypeArguments(dt, st, Ar(dt.typeArguments, $n, ai)))); + return n = _e, Te; + } + return S.updateHeritageClause(we, Ar(S.createNodeArray(Ln( + we.types, + (_e) => fo(_e.expression) || _e.expression.kind === 106 + /* NullKeyword */ + )), $n, bh)); + })); + return [ + he, + et(S.updateClassDeclaration( + te, + lt, + te.name, + jt, + q, + Ut + )) + ]; + } else { + const je = nt(te.heritageClauses); + return et(S.updateClassDeclaration( + te, + lt, + te.name, + jt, + je, + Ut + )); + } + } + case 243: + return et(vr(te)); + case 266: + return et(S.updateEnumDeclaration( + te, + S.createNodeArray(Yt(te)), + te.name, + S.createNodeArray(Ii(te.members, (lt) => { + if (mi(lt)) return; + const jt = L.getEnumMemberValue(lt), be = jt?.value; + ce && lt.initializer && jt?.hasExternalReferences && // This will be its own compiler error instead, so don't report. + !oa(lt.name) && e.addDiagnostic(Xr(lt, p.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations)); + const ft = be === void 0 ? void 0 : typeof be == "string" ? S.createStringLiteral(be) : be < 0 ? S.createPrefixUnaryExpression(41, S.createNumericLiteral(-be)) : S.createNumericLiteral(be); + return zt(S.updateEnumMember(lt, lt.name, ft), lt); + })) + )); + } + return E.assertNever(te, `Unhandled top-level node in declaration emit: ${E.formatSyntaxKind(te.kind)}`); + function et(lt) { + return Pr(te) && (u = rt), re && (n = Ee), te.kind === 267 && (i = Ne), lt === te ? lt : (P = void 0, D = void 0, lt && kn(zt(lt, te), te)); + } + } + function vr(te) { + if (!rr(te.declarationList.declarations, at)) return; + const rt = Ar(te.declarationList.declarations, $n, ti); + if (!Dr(rt)) return; + const re = S.createNodeArray(Yt(te)); + let Ee; + return Xw(te.declarationList) || $w(te.declarationList) ? (Ee = S.createVariableDeclarationList( + rt, + 2 + /* Const */ + ), kn(Ee, te.declarationList), ot(Ee, te.declarationList), el(Ee, te.declarationList)) : Ee = S.updateVariableDeclarationList(te.declarationList, rt), S.updateVariableStatement(te, re, Ee); + } + function ln(te) { + return Ep(Ii(te.elements, (rt) => Zn(rt))); + } + function Zn(te) { + if (te.kind !== 232 && te.name) + return at(te) ? Ts(te.name) ? ln(te.name) : S.createVariableDeclaration( + te.name, + /*exclamationToken*/ + void 0, + Qe( + te, + /*type*/ + void 0 + ), + /*initializer*/ + void 0 + ) : void 0; + } + function ri(te) { + let rt; + h || (rt = n, n = uie(te)), D = te.name, E.assert(ph(te)); + const Ee = te.name.expression; + Vt(Ee, u), h || (n = rt), D = void 0; + } + function mi(te) { + return !!G && !!te && tZ(te, O); + } + function Ps(te) { + return ko(te) || Ic(te); + } + function ws(te) { + return ut(te, Ps); + } + function Yt(te) { + const rt = Au(te), re = Ca(te); + return rt === re ? AA(te.modifiers, (Ee) => Jn(Ee, Qs), Qs) : S.createModifiersFromModifierFlags(re); + } + function Ca(te) { + let rt = 130030, re = i && !cRe(te) ? 128 : 0; + const Ee = te.parent.kind === 307; + return (!Ee || s && Ee && il(te.parent)) && (rt ^= 128, re = 0), uve(te, rt, re); + } + function $e(te, rt) { + let re = pie(te); + return !re && te !== rt.firstAccessor && (re = pie(rt.firstAccessor), n = b0(rt.firstAccessor)), !re && rt.secondAccessor && te !== rt.secondAccessor && (re = pie(rt.secondAccessor), n = b0(rt.secondAccessor)), re; + } + function nt(te) { + return S.createNodeArray(Ln( + or(te, (rt) => S.updateHeritageClause( + rt, + Ar( + S.createNodeArray(Ln(rt.types, (re) => fo(re.expression) || rt.token === 96 && re.expression.kind === 106)), + $n, + bh + ) + )), + (rt) => rt.types && !!rt.types.length + )); + } + } + function cRe(e) { + return e.kind === 264; + } + function lRe(e, t, n, i) { + return e.createModifiersFromModifierFlags(uve(t, n, i)); + } + function uve(e, t = 131070, n = 0) { + let i = Au(e) & t | n; + return i & 2048 && !(i & 32) && (i ^= 32), i & 2048 && i & 128 && (i ^= 128), i; + } + function pie(e) { + if (e) + return e.kind === 177 ? e.type : e.parameters.length > 0 ? e.parameters[0].type : void 0; + } + function _ve(e) { + switch (e.kind) { + case 172: + case 171: + return !ef( + e, + 2 + /* Private */ + ); + case 169: + case 260: + return !0; + } + return !1; + } + function uRe(e) { + switch (e.kind) { + case 262: + case 267: + case 271: + case 264: + case 263: + case 265: + case 266: + case 243: + case 272: + case 278: + case 277: + return !0; + } + return !1; + } + function _Re(e) { + switch (e.kind) { + case 180: + case 176: + case 174: + case 177: + case 178: + case 172: + case 171: + case 173: + case 179: + case 181: + case 260: + case 168: + case 233: + case 183: + case 194: + case 184: + case 185: + case 205: + return !0; + } + return !1; + } + function fRe(e) { + switch (e) { + case 99: + case 7: + case 6: + case 5: + case 200: + return dW; + case 4: + return cie; + case 100: + case 199: + return lie; + default: + return pW; + } + } + var die = { scriptTransformers: He, declarationTransformers: He }; + function mie(e, t, n) { + return { + scriptTransformers: pRe(e, t, n), + declarationTransformers: dRe(t) + }; + } + function pRe(e, t, n) { + if (n) return He; + const i = pa(e), s = Nu(e), o = B3(e), c = []; + return Bn(c, t && or(t.before, pve)), c.push(qne), e.experimentalDecorators && c.push($ne), l5(e) && c.push(iie), i < 99 && c.push(tie), !e.experimentalDecorators && (i < 99 || !o) && c.push(Xne), c.push(Hne), i < 8 && c.push(eie), i < 7 && c.push(Kne), i < 6 && c.push(Zne), i < 5 && c.push(Yne), i < 4 && c.push(Qne), i < 3 && c.push(sie), i < 2 && (c.push(aie), c.push(oie)), c.push(fRe(s)), Bn(c, t && or(t.after, pve)), c; + } + function dRe(e) { + const t = []; + return t.push(mW), Bn(t, e && or(e.afterDeclarations, gRe)), t; + } + function mRe(e) { + return (t) => Fte(t) ? e.transformBundle(t) : e.transformSourceFile(t); + } + function fve(e, t) { + return (n) => { + const i = e(n); + return typeof i == "function" ? t(n, i) : mRe(i); + }; + } + function pve(e) { + return fve(e, Pd); + } + function gRe(e) { + return fve(e, (t, n) => n); + } + function ID(e, t) { + return t; + } + function LA(e, t, n) { + n(e, t); + } + function MA(e, t, n, i, s, o, c) { + var _, u; + const d = new Array( + 357 + /* Count */ + ); + let g, h, S, T = 0, C = [], D = [], P = [], O = [], j = 0, F = !1, V = [], L = 0, $, U, G = ID, ce = LA, K = 0; + const X = [], Z = { + factory: n, + getCompilerOptions: () => i, + getEmitResolver: () => e, + // TODO: GH#18217 + getEmitHost: () => t, + // TODO: GH#18217 + getEmitHelperFactory: Wu(() => Vee(Z)), + startLexicalEnvironment: Ie, + suspendLexicalEnvironment: ye, + resumeLexicalEnvironment: Fe, + endLexicalEnvironment: Qe, + setLexicalEnvironmentFlags: Ke, + getLexicalEnvironmentFlags: Be, + hoistVariableDeclaration: ve, + hoistFunctionDeclaration: De, + addInitializationStatement: Xe, + startBlockScope: at, + endBlockScope: Wt, + addBlockScopedVariable: nr, + requestEmitHelper: Kt, + readEmitHelpers: Pr, + enableSubstitution: H, + enableEmitNotification: Ae, + isSubstitutionEnabled: ae, + isEmitNotificationEnabled: ge, + get onSubstituteNode() { + return G; + }, + set onSubstituteNode(zt) { + E.assert(K < 1, "Cannot modify transformation hooks after initialization has completed."), E.assert(zt !== void 0, "Value must not be 'undefined'"), G = zt; + }, + get onEmitNode() { + return ce; + }, + set onEmitNode(zt) { + E.assert(K < 1, "Cannot modify transformation hooks after initialization has completed."), E.assert(zt !== void 0, "Value must not be 'undefined'"), ce = zt; + }, + addDiagnostic(zt) { + X.push(zt); + } + }; + for (const zt of s) + bJ(xr(Ki(zt))); + Yo("beforeTransform"); + const oe = o.map((zt) => zt(Z)), ne = (zt) => { + for (const jr of oe) + zt = jr(zt); + return zt; + }; + K = 1; + const pe = []; + for (const zt of s) + (_ = rn) == null || _.push(rn.Phase.Emit, "transformNodes", zt.kind === 307 ? { path: zt.path } : { kind: zt.kind, pos: zt.pos, end: zt.end }), pe.push((c ? ne : fe)(zt)), (u = rn) == null || u.pop(); + return K = 2, Yo("afterTransform"), ep("transformTime", "beforeTransform", "afterTransform"), { + transformed: pe, + substituteNode: le, + emitNodeWithNotification: de, + isEmitNotificationEnabled: ge, + dispose: Vt, + diagnostics: X + }; + function fe(zt) { + return zt && (!yi(zt) || !zt.isDeclarationFile) ? ne(zt) : zt; + } + function H(zt) { + E.assert(K < 2, "Cannot modify the transformation context after transformation has completed."), d[zt] |= 1; + } + function ae(zt) { + return (d[zt.kind] & 1) !== 0 && (ua(zt) & 8) === 0; + } + function le(zt, jr) { + return E.assert(K < 3, "Cannot substitute a node after the result is disposed."), jr && ae(jr) && G(zt, jr) || jr; + } + function Ae(zt) { + E.assert(K < 2, "Cannot modify the transformation context after transformation has completed."), d[zt] |= 2; + } + function ge(zt) { + return (d[zt.kind] & 2) !== 0 || (ua(zt) & 4) !== 0; + } + function de(zt, jr, ci) { + E.assert(K < 3, "Cannot invoke TransformationResult callbacks after the result is disposed."), jr && (ge(jr) ? ce(zt, jr, ci) : ci(zt, jr)); + } + function ve(zt) { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."); + const jr = Kr( + n.createVariableDeclaration(zt), + 128 + /* NoNestedSourceMaps */ + ); + g ? g.push(jr) : g = [jr], T & 1 && (T |= 2); + } + function De(zt) { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), Kr( + zt, + 2097152 + /* CustomPrologue */ + ), h ? h.push(zt) : h = [zt]; + } + function Xe(zt) { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), Kr( + zt, + 2097152 + /* CustomPrologue */ + ), S ? S.push(zt) : S = [zt]; + } + function Ie() { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is suspended."), C[j] = g, D[j] = h, P[j] = S, O[j] = T, j++, g = void 0, h = void 0, S = void 0, T = 0; + } + function ye() { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is already suspended."), F = !0; + } + function Fe() { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(F, "Lexical environment is not suspended."), F = !1; + } + function Qe() { + E.assert(K > 0, "Cannot modify the lexical environment during initialization."), E.assert(K < 2, "Cannot modify the lexical environment after transformation has completed."), E.assert(!F, "Lexical environment is suspended."); + let zt; + if (g || h || S) { + if (h && (zt = [...h]), g) { + const jr = n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList(g) + ); + Kr( + jr, + 2097152 + /* CustomPrologue */ + ), zt ? zt.push(jr) : zt = [jr]; + } + S && (zt ? zt = [...zt, ...S] : zt = [...S]); + } + return j--, g = C[j], h = D[j], S = P[j], T = O[j], j === 0 && (C = [], D = [], P = [], O = []), zt; + } + function Ke(zt, jr) { + T = jr ? T | zt : T & ~zt; + } + function Be() { + return T; + } + function at() { + E.assert(K > 0, "Cannot start a block scope during initialization."), E.assert(K < 2, "Cannot start a block scope after transformation has completed."), V[L] = $, L++, $ = void 0; + } + function Wt() { + E.assert(K > 0, "Cannot end a block scope during initialization."), E.assert(K < 2, "Cannot end a block scope after transformation has completed."); + const zt = ut($) ? [ + n.createVariableStatement( + /*modifiers*/ + void 0, + n.createVariableDeclarationList( + $.map((jr) => n.createVariableDeclaration(jr)), + 1 + /* Let */ + ) + ) + ] : void 0; + return L--, $ = V[L], L === 0 && (V = []), zt; + } + function nr(zt) { + E.assert(L > 0, "Cannot add a block scoped variable outside of an iteration body."), ($ || ($ = [])).push(zt); + } + function Kt(zt) { + if (E.assert(K > 0, "Cannot modify the transformation context during initialization."), E.assert(K < 2, "Cannot modify the transformation context after transformation has completed."), E.assert(!zt.scoped, "Cannot request a scoped emit helper."), zt.dependencies) + for (const jr of zt.dependencies) + Kt(jr); + U = Tr(U, zt); + } + function Pr() { + E.assert(K > 0, "Cannot modify the transformation context during initialization."), E.assert(K < 2, "Cannot modify the transformation context after transformation has completed."); + const zt = U; + return U = void 0, zt; + } + function Vt() { + if (K < 3) { + for (const zt of s) + bJ(xr(Ki(zt))); + g = void 0, C = void 0, h = void 0, D = void 0, G = void 0, ce = void 0, U = void 0, K = 3; + } + } + } + var RA = { + factory: N, + // eslint-disable-line object-shorthand + getCompilerOptions: () => ({}), + getEmitResolver: Rs, + getEmitHost: Rs, + getEmitHelperFactory: Rs, + startLexicalEnvironment: ka, + resumeLexicalEnvironment: ka, + suspendLexicalEnvironment: ka, + endLexicalEnvironment: nb, + setLexicalEnvironmentFlags: ka, + getLexicalEnvironmentFlags: () => 0, + hoistVariableDeclaration: ka, + hoistFunctionDeclaration: ka, + addInitializationStatement: ka, + startBlockScope: ka, + endBlockScope: nb, + addBlockScopedVariable: ka, + requestEmitHelper: ka, + readEmitHelpers: Rs, + enableSubstitution: ka, + enableEmitNotification: ka, + isSubstitutionEnabled: Rs, + isEmitNotificationEnabled: Rs, + onSubstituteNode: ID, + onEmitNode: LA, + addDiagnostic: ka + }, dve = hRe(); + function gie(e) { + return Go( + e, + ".tsbuildinfo" + /* TsBuildInfo */ + ); + } + function gW(e, t, n, i = !1, s, o) { + const c = ss(n) ? n : J7(e, n, i), _ = e.getCompilerOptions(); + if (_.outFile) { + if (c.length) { + const u = N.createBundle(c), d = t(OD(u, e, i), u); + if (d) + return d; + } + } else { + if (!s) + for (const u of c) { + const d = t(OD(u, e, i), u); + if (d) + return d; + } + if (o) { + const u = S0(_); + if (u) return t( + { buildInfoPath: u }, + /*sourceFileOrBundle*/ + void 0 + ); + } + } + } + function S0(e) { + const t = e.configFilePath; + if (!I4(e)) return; + if (e.tsBuildInfoFile) return e.tsBuildInfoFile; + const n = e.outFile; + let i; + if (n) + i = Gu(n); + else { + if (!t) return; + const s = Gu(t); + i = e.outDir ? e.rootDir ? O1(e.outDir, hd( + e.rootDir, + s, + /*ignoreCase*/ + !0 + )) : Mn(e.outDir, Wc(s)) : s; + } + return i + ".tsbuildinfo"; + } + function QO(e, t) { + const n = e.outFile, i = e.emitDeclarationOnly ? void 0 : n, s = i && mve(i, e), o = t || op(e) ? Gu(n) + ".d.ts" : void 0, c = o && i5(e) ? o + ".map" : void 0, _ = S0(e); + return { jsFilePath: i, sourceMapFilePath: s, declarationFilePath: o, declarationMapPath: c, buildInfoPath: _ }; + } + function OD(e, t, n) { + const i = t.getCompilerOptions(); + if (e.kind === 308) + return QO(i, n); + { + const s = uK(e.fileName, t, YO(e.fileName, i)), o = Ap(e), c = o && oh(e.fileName, s, t.getCurrentDirectory(), !t.useCaseSensitiveFileNames()) === 0, _ = i.emitDeclarationOnly || c ? void 0 : s, u = !_ || Ap(e) ? void 0 : mve(_, i), d = n || op(i) && !o ? _K(e.fileName, t) : void 0, g = d && i5(i) ? d + ".map" : void 0; + return { jsFilePath: _, sourceMapFilePath: u, declarationFilePath: d, declarationMapPath: g, buildInfoPath: void 0 }; + } + } + function mve(e, t) { + return t.sourceMap && !t.inlineSourceMap ? e + ".map" : void 0; + } + function YO(e, t) { + return Go( + e, + ".json" + /* Json */ + ) ? ".json" : t.jsx === 1 && Lc(e, [ + ".jsx", + ".tsx" + /* Tsx */ + ]) ? ".jsx" : Lc(e, [ + ".mts", + ".mjs" + /* Mjs */ + ]) ? ".mjs" : Lc(e, [ + ".cts", + ".cjs" + /* Cjs */ + ]) ? ".cjs" : ".js"; + } + function gve(e, t, n, i) { + return n ? O1( + n, + hd(i(), e, t) + ) : e; + } + function YC(e, t, n, i = () => Ox(t, n)) { + return hW(e, t.options, n, i); + } + function hW(e, t, n, i) { + return by( + gve(e, n, t.declarationDir || t.outDir, i), + j7(e) + ); + } + function hve(e, t, n, i = () => Ox(t, n)) { + if (t.options.emitDeclarationOnly) return; + const s = Go( + e, + ".json" + /* Json */ + ), o = yW(e, t.options, n, i); + return !s || oh(e, o, E.checkDefined(t.options.configFilePath), n) !== 0 ? o : void 0; + } + function yW(e, t, n, i) { + return by( + gve(e, n, t.outDir, i), + YO(e, t) + ); + } + function yve() { + let e; + return { addOutput: t, getOutputs: n }; + function t(i) { + i && (e || (e = [])).push(i); + } + function n() { + return e || He; + } + } + function vve(e, t) { + const { jsFilePath: n, sourceMapFilePath: i, declarationFilePath: s, declarationMapPath: o, buildInfoPath: c } = QO( + e.options, + /*forceDtsPaths*/ + !1 + ); + t(n), t(i), t(s), t(o), t(c); + } + function bve(e, t, n, i, s) { + if (Ol(t)) return; + const o = hve(t, e, n, s); + if (i(o), !Go( + t, + ".json" + /* Json */ + ) && (o && e.options.sourceMap && i(`${o}.map`), op(e.options))) { + const c = YC(t, e, n, s); + i(c), e.options.declarationMap && i(`${c}.map`); + } + } + function FD(e, t, n, i, s) { + let o; + return e.rootDir ? (o = Xi(e.rootDir, n), s?.(e.rootDir)) : e.composite && e.configFilePath ? (o = Xn(Rl(e.configFilePath)), s?.(o)) : o = kie(t(), n, i), o && o[o.length - 1] !== Oo && (o += Oo), o; + } + function Ox({ options: e, fileNames: t }, n) { + return FD( + e, + () => Ln(t, (i) => !(e.noEmitForJsFiles && Lc(i, CC)) && !Ol(i)), + Xn(Rl(E.checkDefined(e.configFilePath))), + eu(!n) + ); + } + function ZO(e, t) { + const { addOutput: n, getOutputs: i } = yve(); + if (e.options.outFile) + vve(e, n); + else { + const s = Wu(() => Ox(e, t)); + for (const o of e.fileNames) + bve(e, o, t, n, s); + n(S0(e.options)); + } + return i(); + } + function Sve(e, t, n) { + t = Cs(t), E.assert(ls(e.fileNames, t), "Expected fileName to be present in command line"); + const { addOutput: i, getOutputs: s } = yve(); + return e.options.outFile ? vve(e, i) : bve(e, t, n, i), s(); + } + function vW(e, t) { + if (e.options.outFile) { + const { jsFilePath: s, declarationFilePath: o } = QO( + e.options, + /*forceDtsPaths*/ + !1 + ); + return E.checkDefined(s || o, `project ${e.options.configFilePath} expected to have at least one output`); + } + const n = Wu(() => Ox(e, t)); + for (const s of e.fileNames) { + if (Ol(s)) continue; + const o = hve(s, e, t, n); + if (o) return o; + if (!Go( + s, + ".json" + /* Json */ + ) && op(e.options)) + return YC(s, e, t, n); + } + const i = S0(e.options); + return i || E.fail(`project ${e.options.configFilePath} expected to have at least one output`); + } + function bW(e, t) { + return !!t && !!e; + } + function SW(e, t, n, { scriptTransformers: i, declarationTransformers: s }, o, c, _) { + var u = t.getCompilerOptions(), d = u.sourceMap || u.inlineSourceMap || i5(u) ? [] : void 0, g = u.listEmittedFiles ? [] : void 0, h = b4(), S = d0(u), T = P3(S), { enter: C, exit: D } = TR("printTime", "beforePrint", "afterPrint"), P = !1; + return C(), gW( + t, + O, + J7(t, n, _), + _, + c, + !n + ), D(), { + emitSkipped: P, + diagnostics: h.getDiagnostics(), + emittedFiles: g, + sourceMaps: d + }; + function O({ jsFilePath: Z, sourceMapFilePath: oe, declarationFilePath: ne, declarationMapPath: pe, buildInfoPath: fe }, H) { + var ae, le, Ae, ge, de, ve; + (ae = rn) == null || ae.push(rn.Phase.Emit, "emitJsFileOrBundle", { jsFilePath: Z }), F(H, Z, oe), (le = rn) == null || le.pop(), (Ae = rn) == null || Ae.push(rn.Phase.Emit, "emitDeclarationFileOrBundle", { declarationFilePath: ne }), V(H, ne, pe), (ge = rn) == null || ge.pop(), (de = rn) == null || de.push(rn.Phase.Emit, "emitBuildInfo", { buildInfoPath: fe }), j(fe), (ve = rn) == null || ve.pop(); + } + function j(Z) { + if (!Z || n || P) return; + if (t.isEmitBlocked(Z)) { + P = !0; + return; + } + const oe = t.getBuildInfo() || KO( + /*program*/ + void 0 + ); + w3( + t, + h, + Z, + hie(oe), + /*writeByteOrderMark*/ + !1, + /*sourceFiles*/ + void 0, + { buildInfo: oe } + ), g?.push(Z); + } + function F(Z, oe, ne) { + if (!Z || o || !oe) + return; + if (t.isEmitBlocked(oe) || u.noEmit) { + P = !0; + return; + } + (yi(Z) ? [Z] : Ln(Z.sourceFiles, k7)).forEach( + (ae) => { + (u.noCheck || !V3(ae, u)) && $(ae); + } + ); + const pe = MA( + e, + t, + N, + u, + [Z], + i, + /*allowDtsFiles*/ + !1 + ), fe = { + removeComments: u.removeComments, + newLine: u.newLine, + noEmitHelpers: u.noEmitHelpers, + module: Nu(u), + target: pa(u), + sourceMap: u.sourceMap, + inlineSourceMap: u.inlineSourceMap, + inlineSources: u.inlineSources, + extendedDiagnostics: u.extendedDiagnostics + }, H = Iy(fe, { + // resolver hooks + hasGlobalName: e.hasGlobalName, + // transform hooks + onEmitNode: pe.emitNodeWithNotification, + isEmitNotificationEnabled: pe.isEmitNotificationEnabled, + substituteNode: pe.substituteNode + }); + E.assert(pe.transformed.length === 1, "Should only see one output from the transform"), U(oe, ne, pe, H, u), pe.dispose(), g && (g.push(oe), ne && g.push(ne)); + } + function V(Z, oe, ne) { + if (!Z || o === 0) return; + if (!oe) { + (o || u.emitDeclarationOnly) && (P = !0); + return; + } + const pe = yi(Z) ? [Z] : Z.sourceFiles, fe = _ ? pe : Ln(pe, k7), H = u.outFile ? [N.createBundle(fe)] : fe; + fe.forEach((Ae) => { + (o && !op(u) || u.noCheck || bW(o, _) || !V3(Ae, u)) && L(Ae); + }); + const ae = MA( + e, + t, + N, + u, + H, + s, + /*allowDtsFiles*/ + !1 + ); + if (Dr(ae.diagnostics)) + for (const Ae of ae.diagnostics) + h.add(Ae); + const le = !!ae.diagnostics && !!ae.diagnostics.length || !!t.isEmitBlocked(oe) || !!u.noEmit; + if (P = P || le, !le || _) { + E.assert(ae.transformed.length === 1, "Should only see one output from the decl transform"); + const Ae = { + removeComments: u.removeComments, + newLine: u.newLine, + noEmitHelpers: !0, + module: u.module, + target: u.target, + sourceMap: !_ && u.declarationMap, + inlineSourceMap: u.inlineSourceMap, + extendedDiagnostics: u.extendedDiagnostics, + onlyPrintJsDocStyle: !0, + omitBraceSourceMapPositions: !0 + }, ge = Iy(Ae, { + // resolver hooks + hasGlobalName: e.hasGlobalName, + // transform hooks + onEmitNode: ae.emitNodeWithNotification, + isEmitNotificationEnabled: ae.isEmitNotificationEnabled, + substituteNode: ae.substituteNode + }); + U( + oe, + ne, + ae, + ge, + { + sourceMap: Ae.sourceMap, + sourceRoot: u.sourceRoot, + mapRoot: u.mapRoot, + extendedDiagnostics: u.extendedDiagnostics + // Explicitly do not passthru either `inline` option + } + ), g && (g.push(oe), ne && g.push(ne)); + } + ae.dispose(); + } + function L(Z) { + if (ko(Z)) { + Z.expression.kind === 80 && e.collectLinkedAliases( + Z.expression, + /*setVisibility*/ + !0 + ); + return; + } else if (pu(Z)) { + e.collectLinkedAliases( + Z.propertyName || Z.name, + /*setVisibility*/ + !0 + ); + return; + } + gs(Z, L); + } + function $(Z) { + kx(Z, (oe) => { + if (nl(oe) && !(f0(oe) & 32) || oc(oe)) return "skip"; + e.markLinkedReferences(oe); + }); + } + function U(Z, oe, ne, pe, fe) { + const H = ne.transformed[0], ae = H.kind === 308 ? H : void 0, le = H.kind === 307 ? H : void 0, Ae = ae ? ae.sourceFiles : [le]; + let ge; + G(fe, H) && (ge = Sne( + t, + Wc(Rl(Z)), + ce(fe), + K(fe, Z, le), + fe + )), ae ? pe.writeBundle(ae, T, ge) : pe.writeFile(le, T, ge); + let de; + if (ge) { + d && d.push({ + inputSourceFileNames: ge.getSources(), + sourceMap: ge.toJSON() + }); + const De = X( + fe, + ge, + Z, + oe, + le + ); + if (De && (T.isAtStartOfLine() || T.rawWrite(S), de = T.getTextPos(), T.writeComment(`//# sourceMappingURL=${De}`)), oe) { + const Xe = ge.toString(); + w3( + t, + h, + oe, + Xe, + /*writeByteOrderMark*/ + !1, + Ae + ); + } + } else + T.writeLine(); + const ve = T.getText(); + w3(t, h, Z, ve, !!u.emitBOM, Ae, { sourceMapUrlPos: de, diagnostics: ne.diagnostics }), T.clear(); + } + function G(Z, oe) { + return (Z.sourceMap || Z.inlineSourceMap) && (oe.kind !== 307 || !Go( + oe.fileName, + ".json" + /* Json */ + )); + } + function ce(Z) { + const oe = Rl(Z.sourceRoot || ""); + return oe && bl(oe); + } + function K(Z, oe, ne) { + if (Z.sourceRoot) return t.getCommonSourceDirectory(); + if (Z.mapRoot) { + let pe = Rl(Z.mapRoot); + return ne && (pe = Xn(z7(ne.fileName, t, pe))), zm(pe) === 0 && (pe = Mn(t.getCommonSourceDirectory(), pe)), pe; + } + return Xn(Cs(oe)); + } + function X(Z, oe, ne, pe, fe) { + if (Z.inlineSourceMap) { + const ae = oe.toString(); + return `data:application/json;base64,${NK(_l, ae)}`; + } + const H = Wc(Rl(E.checkDefined(pe))); + if (Z.mapRoot) { + let ae = Rl(Z.mapRoot); + return fe && (ae = Xn(z7(fe.fileName, t, ae))), zm(ae) === 0 ? (ae = Mn(t.getCommonSourceDirectory(), ae), encodeURI( + xT( + Xn(Cs(ne)), + // get the relative sourceMapDir path based on jsFilePath + Mn(ae, H), + // this is where user expects to see sourceMap + t.getCurrentDirectory(), + t.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ + !0 + ) + )) : encodeURI(Mn(ae, H)); + } + return encodeURI(H); + } + } + function KO(e) { + return { program: e, version: dd }; + } + function hie(e) { + return JSON.stringify(e); + } + function TW(e, t) { + return MB(e, t); + } + var yie = { + hasGlobalName: Rs, + getReferencedExportContainer: Rs, + getReferencedImportDeclaration: Rs, + getReferencedDeclarationWithCollidingName: Rs, + isDeclarationWithCollidingName: Rs, + isValueAliasDeclaration: Rs, + isReferencedAliasDeclaration: Rs, + isTopLevelValueImportEqualsWithEntityName: Rs, + hasNodeCheckFlag: Rs, + isDeclarationVisible: Rs, + isLateBound: (e) => !1, + collectLinkedAliases: Rs, + markLinkedReferences: Rs, + isImplementationOfOverload: Rs, + requiresAddingImplicitUndefined: Rs, + isExpandoFunctionDeclaration: Rs, + getPropertiesOfContainerFunction: Rs, + createTypeOfDeclaration: Rs, + createReturnTypeOfSignatureDeclaration: Rs, + createTypeOfExpression: Rs, + createLiteralConstValue: Rs, + isSymbolAccessible: Rs, + isEntityNameVisible: Rs, + // Returns the constant value this property access resolves to: notImplemented, or 'undefined' for a non-constant + getConstantValue: Rs, + getEnumMemberValue: Rs, + getReferencedValueDeclaration: Rs, + getReferencedValueDeclarations: Rs, + getTypeReferenceSerializationKind: Rs, + isOptionalParameter: Rs, + isArgumentsLocalBinding: Rs, + getExternalModuleFileFromDeclaration: Rs, + isLiteralConstDeclaration: Rs, + getJsxFactoryEntity: Rs, + getJsxFragmentFactoryEntity: Rs, + isBindingCapturedByNode: Rs, + getDeclarationStatementsForSourceFile: Rs, + isImportRequiredByAugmentation: Rs + }, vie = /* @__PURE__ */ Wu(() => Iy({})), gS = /* @__PURE__ */ Wu(() => Iy({ removeComments: !0 })), bie = /* @__PURE__ */ Wu(() => Iy({ removeComments: !0, neverAsciiEscape: !0 })), eF = /* @__PURE__ */ Wu(() => Iy({ removeComments: !0, omitTrailingSemicolon: !0 })); + function Iy(e = {}, t = {}) { + var { + hasGlobalName: n, + onEmitNode: i = LA, + isEmitNotificationEnabled: s, + substituteNode: o = ID, + onBeforeEmitNode: c, + onAfterEmitNode: _, + onBeforeEmitNodeArray: u, + onAfterEmitNodeArray: d, + onBeforeEmitToken: g, + onAfterEmitToken: h + } = t, S = !!e.extendedDiagnostics, T = !!e.omitBraceSourceMapPositions, C = d0(e), D = Nu(e), P = /* @__PURE__ */ new Map(), O, j, F, V, L, $, U, G, ce, K, X, Z, oe, ne, pe, fe = e.preserveSourceNewlines, H, ae, le, Ae = hP, ge, de = !0, ve, De, Xe = -1, Ie, ye = -1, Fe = -1, Qe = -1, Ke = -1, Be, at, Wt = !1, nr = !!e.removeComments, Kt, Pr, { enter: Vt, exit: zt } = hge(S, "commentTime", "beforeComment", "afterComment"), jr = N.parenthesizer, ci = { + select: (k) => k === 0 ? jr.parenthesizeLeadingTypeArgument : void 0 + }, Xt = Do(); + return Ps(), { + // public API + printNode: Ai, + printList: _s, + printFile: os, + printBundle: $n, + // internal API + writeNode: wr, + writeList: Ss, + writeFile: At, + writeBundle: Le + }; + function Ai(k, ie, _t) { + switch (k) { + case 0: + E.assert(yi(ie), "Expected a SourceFile node."); + break; + case 2: + E.assert(Re(ie), "Expected an Identifier node."); + break; + case 1: + E.assert(ct(ie), "Expected an Expression node."); + break; + } + switch (ie.kind) { + case 307: + return os(ie); + case 308: + return $n(ie); + } + return wr(k, ie, _t, vr()), ln(); + } + function _s(k, ie, _t) { + return Ss(k, ie, _t, vr()), ln(); + } + function $n(k) { + return Le( + k, + vr(), + /*sourceMapGenerator*/ + void 0 + ), ln(); + } + function os(k) { + return At( + k, + vr(), + /*sourceMapGenerator*/ + void 0 + ), ln(); + } + function wr(k, ie, _t, Qt) { + const Hn = ae; + mi( + Qt, + /*_sourceMapGenerator*/ + void 0 + ), Zn(k, ie, _t), Ps(), ae = Hn; + } + function Ss(k, ie, _t, Qt) { + const Hn = ae; + mi( + Qt, + /*_sourceMapGenerator*/ + void 0 + ), _t && ri(_t), bo( + /*parentNode*/ + void 0, + ie, + k + ), Ps(), ae = Hn; + } + function Le(k, ie, _t) { + ge = !1; + const Qt = ae; + mi(ie, _t), Cv(k), i2(k), yt(k), Sm(k); + for (const Hn of k.sourceFiles) + Zn(0, Hn, Hn); + Ps(), ae = Qt; + } + function At(k, ie, _t) { + ge = !0; + const Qt = ae; + mi(ie, _t), Cv(k), i2(k), Zn(0, k, k), Ps(), ae = Qt; + } + function vr() { + return le || (le = P3(C)); + } + function ln() { + const k = le.getText(); + return le.clear(), k; + } + function Zn(k, ie, _t) { + _t && ri(_t), re( + k, + ie, + /*parenthesizerRule*/ + void 0 + ); + } + function ri(k) { + O = k, Be = void 0, at = void 0, k && r1(k); + } + function mi(k, ie) { + k && e.omitTrailingSemicolon && (k = xB(k)), ae = k, ve = ie, de = !ae || !ve; + } + function Ps() { + j = [], F = [], V = [], L = /* @__PURE__ */ new Set(), $ = [], U = /* @__PURE__ */ new Map(), G = [], ce = 0, K = [], X = 0, Z = [], oe = void 0, ne = [], pe = void 0, O = void 0, Be = void 0, at = void 0, mi( + /*output*/ + void 0, + /*_sourceMapGenerator*/ + void 0 + ); + } + function ws() { + return Be || (Be = Tg(E.checkDefined(O))); + } + function Yt(k, ie) { + k !== void 0 && re(4, k, ie); + } + function Ca(k) { + k !== void 0 && re( + 2, + k, + /*parenthesizerRule*/ + void 0 + ); + } + function $e(k, ie) { + k !== void 0 && re(1, k, ie); + } + function nt(k) { + re(Ks(k) ? 6 : 4, k); + } + function te(k) { + fe && Qp(k) & 4 && (fe = !1); + } + function rt(k) { + fe = k; + } + function re(k, ie, _t) { + Pr = _t, et(0, k, ie)(k, ie), Pr = void 0; + } + function Ee(k) { + return !nr && !yi(k); + } + function Ne(k) { + return !de && !yi(k) && !x7(k); + } + function et(k, ie, _t) { + switch (k) { + case 0: + if (i !== LA && (!s || s(_t))) + return jt; + case 1: + if (o !== ID && (Kt = o(ie, _t) || _t) !== _t) + return Pr && (Kt = Pr(Kt)), kt; + case 2: + if (Ee(_t)) + return M_; + case 3: + if (Ne(_t)) + return u2; + case 4: + return be; + default: + return E.assertNever(k); + } + } + function lt(k, ie, _t) { + return et(k + 1, ie, _t); + } + function jt(k, ie) { + const _t = lt(0, k, ie); + i(k, ie, _t); + } + function be(k, ie) { + if (c?.(ie), fe) { + const _t = fe; + te(ie), ft(k, ie), rt(_t); + } else + ft(k, ie); + _?.(ie), Pr = void 0; + } + function ft(k, ie, _t = !0) { + if (_t) { + const Qt = SJ(ie); + if (Qt) + return st(k, ie, Qt); + } + if (k === 0) return va(Is(ie, yi)); + if (k === 2) return q(Is(ie, Re)); + if (k === 6) return je( + Is(ie, Ks), + /*jsxAttributeEscape*/ + !0 + ); + if (k === 3) return bt(Is(ie, Mo)); + if (k === 7) return nn(Is(ie, aS)); + if (k === 5) + return E.assertNode(ie, FJ), L_( + /*isEmbeddedStatement*/ + !0 + ); + if (k === 4) { + switch (ie.kind) { + case 16: + case 17: + case 18: + return je( + ie, + /*jsxAttributeEscape*/ + !1 + ); + case 80: + return q(ie); + case 81: + return we(ie); + case 166: + return _e(ie); + case 167: + return dt(ie); + case 168: + return xt(ie); + case 169: + return wt(ie); + case 170: + return ir(ie); + case 171: + return br(ie); + case 172: + return Lr(ie); + case 173: + return en(ie); + case 174: + return fr(ie); + case 175: + return mn(ie); + case 176: + return Di(ie); + case 177: + case 178: + return Fi(ie); + case 179: + return ur(ie); + case 180: + return Mr(ie); + case 181: + return Or(ie); + case 182: + return ma(ie); + case 183: + return $a(ie); + case 184: + return Ro(ie); + case 185: + return wl(ie); + case 186: + return jo(ie); + case 187: + return Su(ie); + case 188: + return fc(ie); + case 189: + return ea(ie); + case 190: + return Ka(ie); + case 192: + return Fa(ie); + case 193: + return Bt(ie); + case 194: + return lc(ie); + case 195: + return Fu(ie); + case 196: + return Lu(ie); + case 233: + return zf(ie); + case 197: + return y_(); + case 198: + return Ao(ie); + case 199: + return Uo(ie); + case 200: + return A(ie); + case 201: + return Me(ie); + case 202: + return wo(ie); + case 203: + return it(ie); + case 204: + return tn(ie); + case 205: + return Ot(ie); + case 206: + return kr(ie); + case 207: + return qn(ie); + case 208: + return Ht(ie); + case 239: + return rg(ie); + case 240: + return qt(); + case 241: + return b_(ie); + case 243: + return ng(ie); + case 242: + return L_( + /*isEmbeddedStatement*/ + !1 + ); + case 244: + return bm(ie); + case 245: + return Vf(ie); + case 246: + return tt(ie); + case 247: + return Pt(ie); + case 248: + return It(ie); + case 249: + return hr(ie); + case 250: + return zr(ie); + case 251: + return ei(ie); + case 252: + return M(ie); + case 253: + return Qi(ie); + case 254: + return ys(ie); + case 255: + return wa(ie); + case 256: + return ya(ie); + case 257: + return tc(ie); + case 258: + return dp(ie); + case 259: + return rd(ie); + case 260: + return ig(ie); + case 261: + return Ug(ie); + case 262: + return w0(ie); + case 263: + return zp(ie); + case 264: + return I0(ie); + case 265: + return nd(ie); + case 266: + return Hg(ie); + case 267: + return wh(ie); + case 268: + return Sf(ie); + case 269: + return sg(ie); + case 270: + return Yi(ie); + case 271: + return Oe(ie); + case 272: + return Tt(ie); + case 273: + return Lt(ie); + case 274: + return lr(ie); + case 280: + return ca(ie); + case 275: + return Gr(ie); + case 276: + return _r(ie); + case 277: + return _n(ie); + case 278: + return gi(ie); + case 279: + return El(ie); + case 281: + return Tu(ie); + case 300: + return ii(ie); + case 301: + return Vr(ie); + case 282: + return; + case 283: + return Wp(ie); + case 12: + return Jy(ie); + case 286: + case 289: + return e2(ie); + case 287: + case 290: + return Tv(ie); + case 291: + return zy(ie); + case 292: + return CS(ie); + case 293: + return xv(ie); + case 294: + return ES(ie); + case 295: + return w6(ie); + case 296: + return O0(ie); + case 297: + return og(ie); + case 298: + return lf(ie); + case 299: + return r_(ie); + case 303: + return Tf(ie); + case 304: + return Gg(ie); + case 305: + return gP(ie); + case 306: + return F0(ie); + case 307: + return va(ie); + case 308: + return E.fail("Bundles should be printed using printBundle"); + case 309: + return qy(ie); + case 310: + return A6(ie); + case 312: + return hn("*"); + case 313: + return hn("?"); + case 314: + return Co(ie); + case 315: + return Li(ie); + case 316: + return bi(ie); + case 317: + return ga(ie); + case 191: + case 318: + return ql(ie); + case 319: + return; + case 320: + return Wy(ie); + case 322: + return id(ie); + case 323: + return T_(ie); + case 327: + case 332: + case 337: + return ll(ie); + case 328: + case 329: + return Al(ie); + case 330: + case 331: + return; + case 333: + case 334: + case 335: + case 336: + return; + case 338: + return We(ie); + case 339: + return Vy(ie); + case 341: + case 348: + return Uy(ie); + case 340: + case 342: + case 343: + case 344: + case 349: + case 350: + return DS(ie); + case 345: + return Fd(ie); + case 346: + return r2(ie); + case 347: + return PS(ie); + case 351: + return kv(ie); + case 353: + return; + } + if (ct(ie) && (k = 1, o !== ID)) { + const Qt = o(k, ie) || ie; + Qt !== ie && (ie = Qt, Pr && (ie = Pr(ie))); + } + } + if (k === 1) + switch (ie.kind) { + case 9: + case 10: + return W(ie); + case 11: + case 14: + case 15: + return je( + ie, + /*jsxAttributeEscape*/ + !1 + ); + case 80: + return q(ie); + case 81: + return we(ie); + case 209: + return yn(ie); + case 210: + return li(ie); + case 211: + return _i(ie); + case 212: + return qo(ie); + case 213: + return ol(ie); + case 214: + return vo(ie); + case 215: + return cl(ie); + case 216: + return Eo(ie); + case 217: + return gl(ie); + case 218: + return Cl(ie); + case 219: + return kc(ie); + case 220: + return Pe(ie); + case 221: + return Ct(ie); + case 222: + return Jr(ie); + case 223: + return Vi(ie); + case 224: + return ha(ie); + case 225: + return vc(ie); + case 226: + return Xt(ie); + case 227: + return to(ie); + case 228: + return pc(ie); + case 229: + return Cc(ie); + case 230: + return bf(ie); + case 231: + return Id(ie); + case 232: + return; + case 234: + return v_(ie); + case 235: + return pp(ie); + case 233: + return zf(ie); + case 238: + return Wf(ie); + case 236: + return tg(ie); + case 237: + return E.fail("SyntheticExpression should never be printed."); + case 282: + return; + case 284: + return Zx(ie); + case 285: + return P6(ie); + case 288: + return Kb(ie); + case 352: + return E.fail("SyntaxList should not be printed"); + case 353: + return; + case 354: + return NS(ie); + case 355: + return Nh(ie); + case 356: + return E.fail("SyntheticReferenceExpression should not be printed"); + } + if (qu(ie.kind)) return Pv(ie, ns); + if (mj(ie.kind)) return Pv(ie, hn); + E.fail(`Unhandled SyntaxKind: ${E.formatSyntaxKind(ie.kind)}.`); + } + function bt(k) { + Yt(k.name), sn(), ns("in"), sn(), Yt(k.constraint); + } + function kt(k, ie) { + const _t = lt(1, k, ie); + E.assertIsDefined(Kt), ie = Kt, Kt = void 0, _t(k, ie); + } + function yt(k) { + let ie = !1; + const _t = k.kind === 308 ? k : void 0; + if (_t && D === 0) + return; + const Qt = _t ? _t.sourceFiles.length : 1; + for (let Hn = 0; Hn < Qt; Hn++) { + const Ui = _t ? _t.sourceFiles[Hn] : k, Zi = yi(Ui) ? Ui : O, fs = e.noEmitHelpers || !!Zi && Xte(Zi), ta = yi(Ui) && !ge, su = Ut(Ui); + if (su) + for (const au of su) { + if (au.scoped) { + if (_t) + continue; + } else { + if (fs) continue; + if (ta) { + if (P.get(au.name)) + continue; + P.set(au.name, !0); + } + } + typeof au.text == "string" ? cd(au.text) : cd(au.text(M6)), ie = !0; + } + } + return ie; + } + function Ut(k) { + const ie = L5(k); + return ie && Sg(ie, Uee); + } + function W(k) { + je( + k, + /*jsxAttributeEscape*/ + !1 + ); + } + function je(k, ie) { + const _t = Fh(k, e.neverAsciiEscape, ie); + (e.sourceMap || e.inlineSourceMap) && (k.kind === 11 || uy(k.kind)) ? FS(_t) : tk(_t); + } + function st(k, ie, _t) { + switch (_t.kind) { + case 1: + z(k, ie, _t); + break; + case 0: + he(k, ie, _t); + break; + } + } + function z(k, ie, _t) { + Dv(`\${${_t.order}:`), ft( + k, + ie, + /*allowSnippets*/ + !1 + ), Dv("}"); + } + function he(k, ie, _t) { + E.assert(ie.kind === 242, `A tab stop cannot be attached to a node of kind ${E.formatSyntaxKind(ie.kind)}.`), E.assert(k !== 5, "A tab stop cannot be attached to an embedded statement."), Dv(`$${_t.order}`); + } + function q(k) { + (k.symbol ? I6 : Ae)(Zy( + k, + /*includeTrivia*/ + !1 + ), k.symbol), bo( + k, + tS(k), + 53776 + /* TypeParameters */ + ); + } + function we(k) { + Ae(Zy( + k, + /*includeTrivia*/ + !1 + )); + } + function _e(k) { + Te(k.left), hn("."), Yt(k.right); + } + function Te(k) { + k.kind === 80 ? $e(k) : Yt(k); + } + function dt(k) { + hn("["), $e(k.expression, jr.parenthesizeExpressionOfComputedPropertyName), hn("]"); + } + function xt(k) { + L0(k, k.modifiers), Yt(k.name), k.constraint && (sn(), ns("extends"), sn(), Yt(k.constraint)), k.default && (sn(), k_("="), sn(), Yt(k.default)); + } + function wt(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), Yt(k.dotDotDotToken), sd(k.name, Ev), Yt(k.questionToken), k.parent && k.parent.kind === 317 && !k.name ? Yt(k.type) : Ni(k.type), bn(k.initializer, k.type ? k.type.end : k.questionToken ? k.questionToken.end : k.name ? k.name.end : k.modifiers ? k.modifiers.end : k.pos, k, jr.parenthesizeExpressionForDisallowedComma); + } + function ir(k) { + hn("@"), $e(k.expression, jr.parenthesizeLeftSideOfAccess); + } + function br(k) { + L0(k, k.modifiers), sd(k.name, O6), Yt(k.questionToken), Ni(k.type), iu(); + } + function Lr(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), Yt(k.name), Yt(k.questionToken), Yt(k.exclamationToken), Ni(k.type), bn(k.initializer, k.type ? k.type.end : k.questionToken ? k.questionToken.end : k.name.end, k), iu(); + } + function en(k) { + L0(k, k.modifiers), Yt(k.name), Yt(k.questionToken), Uf(k, t_, za); + } + function fr(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), Yt(k.asteriskToken), Yt(k.name), Yt(k.questionToken), Uf(k, t_, cf); + } + function mn(k) { + ns("static"), j0(k), Od(k.body), hp(k); + } + function Di(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ns("constructor"), Uf(k, t_, cf); + } + function Fi(k) { + const ie = xf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), _t = k.kind === 177 ? 139 : 153; + ke(_t, ie, ns, k), sn(), Yt(k.name), Uf(k, t_, cf); + } + function ur(k) { + Uf(k, t_, za); + } + function Mr(k) { + ns("new"), sn(), Uf(k, t_, za); + } + function Or(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), $y(k, k.parameters), Ni(k.type), iu(); + } + function tn(k) { + Yt(k.type), Yt(k.literal); + } + function qt() { + iu(); + } + function ma(k) { + k.assertsModifier && (Yt(k.assertsModifier), sn()), Yt(k.parameterName), k.type && (sn(), ns("is"), sn(), Yt(k.type)); + } + function $a(k) { + Yt(k.typeName), $g(k, k.typeArguments); + } + function Ro(k) { + Uf(k, Vo, hs); + } + function Vo(k) { + M0(k, k.typeParameters), IS(k, k.parameters), sn(), hn("=>"); + } + function hs(k) { + sn(), Yt(k.type); + } + function ga(k) { + ns("function"), Tm(k, k.parameters), hn(":"), Yt(k.type); + } + function Co(k) { + hn("?"), Yt(k.type); + } + function Li(k) { + hn("!"), Yt(k.type); + } + function bi(k) { + Yt(k.type), hn("="); + } + function wl(k) { + L0(k, k.modifiers), ns("new"), sn(), Uf(k, Vo, hs); + } + function jo(k) { + ns("typeof"), sn(), Yt(k.exprName), $g(k, k.typeArguments); + } + function Su(k) { + j0(k), rr(k.members, bc), hn("{"); + const ie = ua(k) & 1 ? 768 : 32897; + bo( + k, + k.members, + ie | 524288 + /* NoSpaceIfEmpty */ + ), hn("}"), hp(k); + } + function fc(k) { + Yt(k.elementType, jr.parenthesizeNonArrayTypeOfPostfixType), hn("["), hn("]"); + } + function ql(k) { + hn("..."), Yt(k.type); + } + function ea(k) { + ke(23, k.pos, hn, k); + const ie = ua(k) & 1 ? 528 : 657; + bo(k, k.elements, ie | 524288, jr.parenthesizeElementTypeOfTupleType), ke(24, k.elements.end, hn, k); + } + function wo(k) { + Yt(k.dotDotDotToken), Yt(k.name), Yt(k.questionToken), ke(59, k.name.end, hn, k), sn(), Yt(k.type); + } + function Ka(k) { + Yt(k.type, jr.parenthesizeTypeOfOptionalType), hn("?"); + } + function Fa(k) { + bo(k, k.types, 516, jr.parenthesizeConstituentTypeOfUnionType); + } + function Bt(k) { + bo(k, k.types, 520, jr.parenthesizeConstituentTypeOfIntersectionType); + } + function lc(k) { + Yt(k.checkType, jr.parenthesizeCheckTypeOfConditionalType), sn(), ns("extends"), sn(), Yt(k.extendsType, jr.parenthesizeExtendsTypeOfConditionalType), sn(), hn("?"), sn(), Yt(k.trueType), sn(), hn(":"), sn(), Yt(k.falseType); + } + function Fu(k) { + ns("infer"), sn(), Yt(k.typeParameter); + } + function Lu(k) { + hn("("), Yt(k.type), hn(")"); + } + function y_() { + ns("this"); + } + function Ao(k) { + Xg(k.operator, ns), sn(); + const ie = k.operator === 148 ? jr.parenthesizeOperandOfReadonlyTypeOperator : jr.parenthesizeOperandOfTypeOperator; + Yt(k.type, ie); + } + function Uo(k) { + Yt(k.objectType, jr.parenthesizeNonArrayTypeOfPostfixType), hn("["), Yt(k.indexType), hn("]"); + } + function A(k) { + const ie = ua(k); + hn("{"), ie & 1 ? sn() : (Mu(), od()), k.readonlyToken && (Yt(k.readonlyToken), k.readonlyToken.kind !== 148 && ns("readonly"), sn()), hn("["), re(3, k.typeParameter), k.nameType && (sn(), ns("as"), sn(), Yt(k.nameType)), hn("]"), k.questionToken && (Yt(k.questionToken), k.questionToken.kind !== 58 && hn("?")), hn(":"), sn(), Yt(k.type), iu(), ie & 1 ? sn() : (Mu(), gp()), bo( + k, + k.members, + 2 + /* PreserveLines */ + ), hn("}"); + } + function Me(k) { + $e(k.literal); + } + function it(k) { + Yt(k.head), bo( + k, + k.templateSpans, + 262144 + /* TemplateExpressionSpans */ + ); + } + function Ot(k) { + k.isTypeOf && (ns("typeof"), sn()), ns("import"), hn("("), Yt(k.argument), k.attributes && (hn(","), sn(), re(7, k.attributes)), hn(")"), k.qualifier && (hn("."), Yt(k.qualifier)), $g(k, k.typeArguments); + } + function kr(k) { + hn("{"), bo( + k, + k.elements, + 525136 + /* ObjectBindingPatternElements */ + ), hn("}"); + } + function qn(k) { + hn("["), bo( + k, + k.elements, + 524880 + /* ArrayBindingPatternElements */ + ), hn("]"); + } + function Ht(k) { + Yt(k.dotDotDotToken), k.propertyName && (Yt(k.propertyName), hn(":"), sn()), Yt(k.name), bn(k.initializer, k.name.end, k, jr.parenthesizeExpressionForDisallowedComma); + } + function yn(k) { + const ie = k.elements, _t = k.multiLine ? 65536 : 0; + Oh(k, ie, 8914 | _t, jr.parenthesizeExpressionForDisallowedComma); + } + function li(k) { + j0(k), rr(k.properties, bc); + const ie = ua(k) & 131072; + ie && od(); + const _t = k.multiLine ? 65536 : 0, Qt = O && O.languageVersion >= 1 && !Ap(O) ? 64 : 0; + bo(k, k.properties, 526226 | Qt | _t), ie && gp(), hp(k); + } + function _i(k) { + $e(k.expression, jr.parenthesizeLeftSideOfAccess); + const ie = k.questionDotToken || om(N.createToken( + 25 + /* DotToken */ + ), k.expression.end, k.name.pos), _t = Ld(k, k.expression, ie), Qt = Ld(k, ie, k.name); + ld( + _t, + /*writeSpaceIfNotIndenting*/ + !1 + ), ie.kind !== 29 && eo(k.expression) && !ae.hasTrailingComment() && !ae.hasTrailingWhitespace() && hn("."), k.questionDotToken ? Yt(ie) : ke(ie.kind, k.expression.end, hn, k), ld( + Qt, + /*writeSpaceIfNotIndenting*/ + !1 + ), Yt(k.name), R0(_t, Qt); + } + function eo(k) { + if (k = Xp(k), m_(k)) { + const ie = Fh( + k, + /*neverAsciiEscape*/ + !0, + /*jsxAttributeEscape*/ + !1 + ); + return !(k.numericLiteralFlags & 448) && !ie.includes(Ws( + 25 + /* DotToken */ + )) && !ie.includes("E") && !ie.includes("e"); + } else if (go(k)) { + const ie = Lee(k); + return typeof ie == "number" && isFinite(ie) && ie >= 0 && Math.floor(ie) === ie; + } + } + function qo(k) { + $e(k.expression, jr.parenthesizeLeftSideOfAccess), Yt(k.questionDotToken), ke(23, k.expression.end, hn, k), $e(k.argumentExpression), ke(24, k.argumentExpression.end, hn, k); + } + function ol(k) { + const ie = Qp(k) & 16; + ie && (hn("("), FS("0"), hn(","), sn()), $e(k.expression, jr.parenthesizeLeftSideOfAccess), ie && hn(")"), Yt(k.questionDotToken), $g(k, k.typeArguments), Oh(k, k.arguments, 2576, jr.parenthesizeExpressionForDisallowedComma); + } + function vo(k) { + ke(105, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeExpressionOfNew), $g(k, k.typeArguments), Oh(k, k.arguments, 18960, jr.parenthesizeExpressionForDisallowedComma); + } + function cl(k) { + const ie = Qp(k) & 16; + ie && (hn("("), FS("0"), hn(","), sn()), $e(k.tag, jr.parenthesizeLeftSideOfAccess), ie && hn(")"), $g(k, k.typeArguments), sn(), $e(k.template); + } + function Eo(k) { + hn("<"), Yt(k.type), hn(">"), $e(k.expression, jr.parenthesizeOperandOfPrefixUnary); + } + function gl(k) { + const ie = ke(21, k.pos, hn, k), _t = MS(k.expression, k); + $e( + k.expression, + /*parenthesizerRule*/ + void 0 + ), o2(k.expression, k), R0(_t), ke(22, k.expression ? k.expression.end : ie, hn, k); + } + function Cl(k) { + Ec(k.name), qg(k); + } + function kc(k) { + L0(k, k.modifiers), Uf(k, F_, Jf); + } + function F_(k) { + M0(k, k.typeParameters), IS(k, k.parameters), Ni(k.type), sn(), Yt(k.equalsGreaterThanToken); + } + function Jf(k) { + ms(k.body) ? Od(k.body) : (sn(), $e(k.body, jr.parenthesizeConciseBodyOfArrowFunction)); + } + function Pe(k) { + ke(91, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeOperandOfPrefixUnary); + } + function Ct(k) { + ke(114, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeOperandOfPrefixUnary); + } + function Jr(k) { + ke(116, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeOperandOfPrefixUnary); + } + function Vi(k) { + ke(135, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeOperandOfPrefixUnary); + } + function ha(k) { + Xg(k.operator, k_), Pa(k) && sn(), $e(k.operand, jr.parenthesizeOperandOfPrefixUnary); + } + function Pa(k) { + const ie = k.operand; + return ie.kind === 224 && (k.operator === 40 && (ie.operator === 40 || ie.operator === 46) || k.operator === 41 && (ie.operator === 41 || ie.operator === 47)); + } + function vc(k) { + $e(k.operand, jr.parenthesizeOperandOfPostfixUnary), Xg(k.operator, k_); + } + function Do() { + return lO( + k, + ie, + _t, + Qt, + Hn, + /*foldState*/ + void 0 + ); + function k(Zi, fs) { + if (fs) { + fs.stackIndex++, fs.preserveSourceNewlinesStack[fs.stackIndex] = fe, fs.containerPosStack[fs.stackIndex] = Fe, fs.containerEndStack[fs.stackIndex] = Qe, fs.declarationListContainerEndStack[fs.stackIndex] = Ke; + const ta = fs.shouldEmitCommentsStack[fs.stackIndex] = Ee(Zi), su = fs.shouldEmitSourceMapsStack[fs.stackIndex] = Ne(Zi); + c?.(Zi), ta && c2(Zi), su && $c(Zi), te(Zi); + } else + fs = { + stackIndex: 0, + preserveSourceNewlinesStack: [void 0], + containerPosStack: [-1], + containerEndStack: [-1], + declarationListContainerEndStack: [-1], + shouldEmitCommentsStack: [!1], + shouldEmitSourceMapsStack: [!1] + }; + return fs; + } + function ie(Zi, fs, ta) { + return Ui(Zi, ta, "left"); + } + function _t(Zi, fs, ta) { + const su = Zi.kind !== 28, au = Ld(ta, ta.left, Zi), n1 = Ld(ta, Zi, ta.right); + ld(au, su), C_(Zi.pos), Pv(Zi, Zi.kind === 103 ? ns : k_), Mh( + Zi.end, + /*prefixSpace*/ + !0 + ), ld( + n1, + /*writeSpaceIfNotIndenting*/ + !0 + ); + } + function Qt(Zi, fs, ta) { + return Ui(Zi, ta, "right"); + } + function Hn(Zi, fs) { + const ta = Ld(Zi, Zi.left, Zi.operatorToken), su = Ld(Zi, Zi.operatorToken, Zi.right); + if (R0(ta, su), fs.stackIndex > 0) { + const au = fs.preserveSourceNewlinesStack[fs.stackIndex], n1 = fs.containerPosStack[fs.stackIndex], xm = fs.containerEndStack[fs.stackIndex], E_ = fs.declarationListContainerEndStack[fs.stackIndex], i1 = fs.shouldEmitCommentsStack[fs.stackIndex], Fv = fs.shouldEmitSourceMapsStack[fs.stackIndex]; + rt(au), Fv && uk(Zi), i1 && e1(Zi, n1, xm, E_), _?.(Zi), fs.stackIndex--; + } + } + function Ui(Zi, fs, ta) { + const su = ta === "left" ? jr.getParenthesizeLeftSideOfBinaryForOperator(fs.operatorToken.kind) : jr.getParenthesizeRightSideOfBinaryForOperator(fs.operatorToken.kind); + let au = et(0, 1, Zi); + if (au === kt && (E.assertIsDefined(Kt), Zi = su(Is(Kt, ct)), au = lt(1, 1, Zi), Kt = void 0), (au === M_ || au === u2 || au === be) && cn(Zi)) + return Zi; + Pr = su, au(1, Zi); + } + } + function to(k) { + const ie = Ld(k, k.condition, k.questionToken), _t = Ld(k, k.questionToken, k.whenTrue), Qt = Ld(k, k.whenTrue, k.colonToken), Hn = Ld(k, k.colonToken, k.whenFalse); + $e(k.condition, jr.parenthesizeConditionOfConditionalExpression), ld( + ie, + /*writeSpaceIfNotIndenting*/ + !0 + ), Yt(k.questionToken), ld( + _t, + /*writeSpaceIfNotIndenting*/ + !0 + ), $e(k.whenTrue, jr.parenthesizeBranchOfConditionalExpression), R0(ie, _t), ld( + Qt, + /*writeSpaceIfNotIndenting*/ + !0 + ), Yt(k.colonToken), ld( + Hn, + /*writeSpaceIfNotIndenting*/ + !0 + ), $e(k.whenFalse, jr.parenthesizeBranchOfConditionalExpression), R0(Qt, Hn); + } + function pc(k) { + Yt(k.head), bo( + k, + k.templateSpans, + 262144 + /* TemplateExpressionSpans */ + ); + } + function Cc(k) { + ke(127, k.pos, ns, k), Yt(k.asteriskToken), cg(k.expression && ui(k.expression), ds); + } + function bf(k) { + ke(26, k.pos, hn, k), $e(k.expression, jr.parenthesizeExpressionForDisallowedComma); + } + function Id(k) { + Ec(k.name), jy(k); + } + function zf(k) { + $e(k.expression, jr.parenthesizeLeftSideOfAccess), $g(k, k.typeArguments); + } + function v_(k) { + $e( + k.expression, + /*parenthesizerRule*/ + void 0 + ), k.type && (sn(), ns("as"), sn(), Yt(k.type)); + } + function pp(k) { + $e(k.expression, jr.parenthesizeLeftSideOfAccess), k_("!"); + } + function Wf(k) { + $e( + k.expression, + /*parenthesizerRule*/ + void 0 + ), k.type && (sn(), ns("satisfies"), sn(), Yt(k.type)); + } + function tg(k) { + Qy(k.keywordToken, k.pos, hn), hn("."), Yt(k.name); + } + function rg(k) { + $e(k.expression), Yt(k.literal); + } + function b_(k) { + Gc( + k, + /*forceSingleLine*/ + !k.multiLine && F6(k) + ); + } + function Gc(k, ie) { + ke( + 19, + k.pos, + hn, + /*contextNode*/ + k + ); + const _t = ie || ua(k) & 1 ? 768 : 129; + bo(k, k.statements, _t), ke( + 20, + k.statements.end, + hn, + /*contextNode*/ + k, + /*indentLeading*/ + !!(_t & 1) + ); + } + function ng(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), Yt(k.declarationList), iu(); + } + function L_(k) { + k ? hn(";") : iu(); + } + function bm(k) { + $e(k.expression, jr.parenthesizeExpressionOfExpressionStatement), (!O || !Ap(O) || oo(k.expression)) && iu(); + } + function Vf(k) { + const ie = ke(101, k.pos, ns, k); + sn(), ke(21, ie, hn, k), $e(k.expression), ke(22, k.expression.end, hn, k), Ih(k, k.thenStatement), k.elseStatement && (uf(k, k.thenStatement, k.elseStatement), ke(93, k.thenStatement.end, ns, k), k.elseStatement.kind === 245 ? (sn(), Yt(k.elseStatement)) : Ih(k, k.elseStatement)); + } + function Y(k, ie) { + const _t = ke(117, ie, ns, k); + sn(), ke(21, _t, hn, k), $e(k.expression), ke(22, k.expression.end, hn, k); + } + function tt(k) { + ke(92, k.pos, ns, k), Ih(k, k.statement), ms(k.statement) && !fe ? sn() : uf(k, k.statement, k.expression), Y(k, k.statement.end), iu(); + } + function Pt(k) { + Y(k, k.pos), Ih(k, k.statement); + } + function It(k) { + const ie = ke(99, k.pos, ns, k); + sn(); + let _t = ke( + 21, + ie, + hn, + /*contextNode*/ + k + ); + Cn(k.initializer), _t = ke(27, k.initializer ? k.initializer.end : _t, hn, k), cg(k.condition), _t = ke(27, k.condition ? k.condition.end : _t, hn, k), cg(k.incrementor), ke(22, k.incrementor ? k.incrementor.end : _t, hn, k), Ih(k, k.statement); + } + function hr(k) { + const ie = ke(99, k.pos, ns, k); + sn(), ke(21, ie, hn, k), Cn(k.initializer), sn(), ke(103, k.initializer.end, ns, k), sn(), $e(k.expression), ke(22, k.expression.end, hn, k), Ih(k, k.statement); + } + function zr(k) { + const ie = ke(99, k.pos, ns, k); + sn(), Kx(k.awaitModifier), ke(21, ie, hn, k), Cn(k.initializer), sn(), ke(165, k.initializer.end, ns, k), sn(), $e(k.expression), ke(22, k.expression.end, hn, k), Ih(k, k.statement); + } + function Cn(k) { + k !== void 0 && (k.kind === 261 ? Yt(k) : $e(k)); + } + function ei(k) { + ke(88, k.pos, ns, k), Gy(k.label), iu(); + } + function M(k) { + ke(83, k.pos, ns, k), Gy(k.label), iu(); + } + function ke(k, ie, _t, Qt, Hn) { + const Ui = Ki(Qt), Zi = Ui && Ui.kind === Qt.kind, fs = ie; + if (Zi && O && (ie = sa(O.text, ie)), Zi && Qt.pos !== fs) { + const ta = Hn && O && !ip(fs, ie, O); + ta && od(), C_(fs), ta && gp(); + } + if (!T && (k === 19 || k === 20) ? ie = Qy(k, ie, _t, Qt) : ie = Xg(k, _t, ie), Zi && Qt.end !== ie) { + const ta = Qt.kind === 294; + Mh( + ie, + /*prefixSpace*/ + !ta, + /*forceNoNewline*/ + ta + ); + } + return ie; + } + function vt(k) { + return k.kind === 2 || !!k.hasTrailingNewLine; + } + function Nr(k) { + if (!O) return !1; + const ie = kg(O.text, k.pos); + if (ie) { + const _t = Ki(k); + if (_t && Qu(_t.parent)) + return !0; + } + return ut(ie, vt) || ut(PC(k), vt) ? !0 : $5(k) ? k.pos !== k.expression.pos && ut(oy(O.text, k.expression.pos), vt) ? !0 : Nr(k.expression) : !1; + } + function ui(k) { + if (!nr && $5(k) && Nr(k)) { + const ie = Ki(k); + if (ie && Qu(ie)) { + const _t = N.createParenthesizedExpression(k.expression); + return kn(_t, k), ot(_t, ie), _t; + } + return N.createParenthesizedExpression(k); + } + return k; + } + function ds(k) { + return ui(jr.parenthesizeExpressionForDisallowedComma(k)); + } + function Qi(k) { + ke( + 107, + k.pos, + ns, + /*contextNode*/ + k + ), cg(k.expression && ui(k.expression), ui), iu(); + } + function ys(k) { + const ie = ke(118, k.pos, ns, k); + sn(), ke(21, ie, hn, k), $e(k.expression), ke(22, k.expression.end, hn, k), Ih(k, k.statement); + } + function wa(k) { + const ie = ke(109, k.pos, ns, k); + sn(), ke(21, ie, hn, k), $e(k.expression), ke(22, k.expression.end, hn, k), sn(), Yt(k.caseBlock); + } + function ya(k) { + Yt(k.label), ke(59, k.label.end, hn, k), sn(), Yt(k.statement); + } + function tc(k) { + ke(111, k.pos, ns, k), cg(ui(k.expression), ui), iu(); + } + function dp(k) { + ke(113, k.pos, ns, k), sn(), Yt(k.tryBlock), k.catchClause && (uf(k, k.tryBlock, k.catchClause), Yt(k.catchClause)), k.finallyBlock && (uf(k, k.catchClause || k.tryBlock, k.finallyBlock), ke(98, (k.catchClause || k.tryBlock).end, ns, k), sn(), Yt(k.finallyBlock)); + } + function rd(k) { + Qy(89, k.pos, ns), iu(); + } + function ig(k) { + var ie, _t, Qt; + Yt(k.name), Yt(k.exclamationToken), Ni(k.type), bn(k.initializer, ((ie = k.type) == null ? void 0 : ie.end) ?? ((Qt = (_t = k.name.emitNode) == null ? void 0 : _t.typeNode) == null ? void 0 : Qt.end) ?? k.name.end, k, jr.parenthesizeExpressionForDisallowedComma); + } + function Ug(k) { + if ($w(k)) + ns("await"), sn(), ns("using"); + else { + const ie = u7(k) ? "let" : iC(k) ? "const" : Xw(k) ? "using" : "var"; + ns(ie); + } + sn(), bo( + k, + k.declarations, + 528 + /* VariableDeclarationList */ + ); + } + function w0(k) { + qg(k); + } + function qg(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ns("function"), Yt(k.asteriskToken), sn(), Ca(k.name), Uf(k, t_, cf); + } + function Uf(k, ie, _t) { + const Qt = ua(k) & 131072; + Qt && od(), j0(k), rr(k.parameters, hl), ie(k), _t(k), hp(k), Qt && gp(); + } + function cf(k) { + const ie = k.body; + ie ? Od(ie) : iu(); + } + function za(k) { + iu(); + } + function t_(k) { + M0(k, k.typeParameters), Tm(k, k.parameters), Ni(k.type); + } + function S_(k) { + if (ua(k) & 1) + return !0; + if (k.multiLine || !oo(k) && O && !eS(k, O) || wv( + k, + ul(k.statements), + 2 + /* PreserveLines */ + ) || LS(k, Bo(k.statements), 2, k.statements)) + return !1; + let ie; + for (const _t of k.statements) { + if (rk( + ie, + _t, + 2 + /* PreserveLines */ + ) > 0) + return !1; + ie = _t; + } + return !0; + } + function Od(k) { + hl(k), c?.(k), sn(), hn("{"), od(); + const ie = S_(k) ? A0 : N0; + WS(k, k.statements, ie), gp(), Qy(20, k.statements.end, hn, k), _?.(k); + } + function A0(k) { + N0( + k, + /*emitBlockFunctionBodyOnSingleLine*/ + !0 + ); + } + function N0(k, ie) { + const _t = Hy(k.statements), Qt = ae.getTextPos(); + yt(k), _t === 0 && Qt === ae.getTextPos() && ie ? (gp(), bo( + k, + k.statements, + 768 + /* SingleLineFunctionBodyStatements */ + ), od()) : bo( + k, + k.statements, + 1, + /*parenthesizerRule*/ + void 0, + _t + ); + } + function zp(k) { + jy(k); + } + function jy(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !0 + ), ke(86, am(k).pos, ns, k), k.name && (sn(), Ca(k.name)); + const ie = ua(k) & 131072; + ie && od(), M0(k, k.typeParameters), bo( + k, + k.heritageClauses, + 0 + /* ClassHeritageClauses */ + ), sn(), hn("{"), j0(k), rr(k.members, bc), bo( + k, + k.members, + 129 + /* ClassMembers */ + ), hp(k), hn("}"), ie && gp(); + } + function I0(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ns("interface"), sn(), Yt(k.name), M0(k, k.typeParameters), bo( + k, + k.heritageClauses, + 512 + /* HeritageClauses */ + ), sn(), hn("{"), j0(k), rr(k.members, bc), bo( + k, + k.members, + 129 + /* InterfaceMembers */ + ), hp(k), hn("}"); + } + function nd(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ns("type"), sn(), Yt(k.name), M0(k, k.typeParameters), sn(), hn("="), sn(), Yt(k.type), iu(); + } + function Hg(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ns("enum"), sn(), Yt(k.name), sn(), hn("{"), bo( + k, + k.members, + 145 + /* EnumMembers */ + ), hn("}"); + } + function wh(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ~k.flags & 2048 && (ns(k.flags & 32 ? "namespace" : "module"), sn()), Yt(k.name); + let ie = k.body; + if (!ie) return iu(); + for (; ie && Nc(ie); ) + hn("."), Yt(ie.name), ie = ie.body; + sn(), Yt(ie); + } + function Sf(k) { + j0(k), rr(k.statements, hl), Gc( + k, + /*forceSingleLine*/ + F6(k) + ), hp(k); + } + function sg(k) { + ke(19, k.pos, hn, k), bo( + k, + k.clauses, + 129 + /* CaseBlockClauses */ + ), ke( + 20, + k.clauses.end, + hn, + k, + /*indentLeading*/ + !0 + ); + } + function Oe(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ke(102, k.modifiers ? k.modifiers.end : k.pos, ns, k), sn(), k.isTypeOnly && (ke(156, k.pos, ns, k), sn()), Yt(k.name), sn(), ke(64, k.name.end, hn, k), sn(), Ue(k.moduleReference), iu(); + } + function Ue(k) { + k.kind === 80 ? $e(k) : Yt(k); + } + function Tt(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ), ke(102, k.modifiers ? k.modifiers.end : k.pos, ns, k), sn(), k.importClause && (Yt(k.importClause), sn(), ke(161, k.importClause.end, ns, k), sn()), $e(k.moduleSpecifier), k.attributes && Gy(k.attributes), iu(); + } + function Lt(k) { + k.isTypeOnly && (ke(156, k.pos, ns, k), sn()), Yt(k.name), k.name && k.namedBindings && (ke(28, k.name.end, hn, k), sn()), Yt(k.namedBindings); + } + function lr(k) { + const ie = ke(42, k.pos, hn, k); + sn(), ke(130, ie, ns, k), sn(), Yt(k.name); + } + function Gr(k) { + mp(k); + } + function _r(k) { + By(k); + } + function _n(k) { + const ie = ke(95, k.pos, ns, k); + sn(), k.isExportEquals ? ke(64, ie, k_, k) : ke(90, ie, ns, k), sn(), $e( + k.expression, + k.isExportEquals ? jr.getParenthesizeRightSideOfBinaryForOperator( + 64 + /* EqualsToken */ + ) : jr.parenthesizeExpressionOfExportDefault + ), iu(); + } + function gi(k) { + xf( + k, + k.modifiers, + /*allowDecorators*/ + !1 + ); + let ie = ke(95, k.pos, ns, k); + if (sn(), k.isTypeOnly && (ie = ke(156, ie, ns, k), sn()), k.exportClause ? Yt(k.exportClause) : ie = ke(42, ie, hn, k), k.moduleSpecifier) { + sn(); + const _t = k.exportClause ? k.exportClause.end : ie; + ke(161, _t, ns, k), sn(), $e(k.moduleSpecifier); + } + k.attributes && Gy(k.attributes), iu(); + } + function nn(k) { + hn("{"), sn(), ns(k.token === 132 ? "assert" : "with"), hn(":"), sn(); + const ie = k.elements; + bo( + k, + ie, + 526226 + /* ImportAttributes */ + ), sn(), hn("}"); + } + function ii(k) { + ke(k.token, k.pos, ns, k), sn(); + const ie = k.elements; + bo( + k, + ie, + 526226 + /* ImportAttributes */ + ); + } + function Vr(k) { + Yt(k.name), hn(":"), sn(); + const ie = k.value; + if (!(ua(ie) & 1024)) { + const _t = lm(ie); + Mh(_t.pos); + } + Yt(ie); + } + function Yi(k) { + let ie = ke(95, k.pos, ns, k); + sn(), ie = ke(130, ie, ns, k), sn(), ie = ke(145, ie, ns, k), sn(), Yt(k.name), iu(); + } + function ca(k) { + const ie = ke(42, k.pos, hn, k); + sn(), ke(130, ie, ns, k), sn(), Yt(k.name); + } + function El(k) { + mp(k); + } + function Tu(k) { + By(k); + } + function mp(k) { + hn("{"), bo( + k, + k.elements, + 525136 + /* NamedImportsOrExportsElements */ + ), hn("}"); + } + function By(k) { + k.isTypeOnly && (ns("type"), sn()), k.propertyName && (Yt(k.propertyName), sn(), ke(130, k.propertyName.end, ns, k), sn()), Yt(k.name); + } + function Wp(k) { + ns("require"), hn("("), $e(k.expression), hn(")"); + } + function Zx(k) { + Yt(k.openingElement), bo( + k, + k.children, + 262144 + /* JsxElementOrFragmentChildren */ + ), Yt(k.closingElement); + } + function P6(k) { + hn("<"), Ah(k.tagName), $g(k, k.typeArguments), sn(), Yt(k.attributes), hn("/>"); + } + function Kb(k) { + Yt(k.openingFragment), bo( + k, + k.children, + 262144 + /* JsxElementOrFragmentChildren */ + ), Yt(k.closingFragment); + } + function e2(k) { + if (hn("<"), pm(k)) { + const ie = MS(k.tagName, k); + Ah(k.tagName), $g(k, k.typeArguments), k.attributes.properties && k.attributes.properties.length > 0 && sn(), Yt(k.attributes), o2(k.attributes, k), R0(ie); + } + hn(">"); + } + function Jy(k) { + ae.writeLiteral(k.text); + } + function Tv(k) { + hn(""); + } + function CS(k) { + bo( + k, + k.properties, + 262656 + /* JsxElementAttributes */ + ); + } + function zy(k) { + Yt(k.name), x_("=", hn, k.initializer, nt); + } + function xv(k) { + hn("{..."), $e(k.expression), hn("}"); + } + function t2(k) { + let ie = !1; + return yw(O?.text || "", k + 1, () => ie = !0), ie; + } + function ag(k) { + let ie = !1; + return hw(O?.text || "", k + 1, () => ie = !0), ie; + } + function La(k) { + return t2(k) || ag(k); + } + function ES(k) { + var ie; + if (k.expression || !nr && !oo(k) && La(k.pos)) { + const _t = O && !oo(k) && Vs(O, k.pos).line !== Vs(O, k.end).line; + _t && ae.increaseIndent(); + const Qt = ke(19, k.pos, hn, k); + Yt(k.dotDotDotToken), $e(k.expression), ke(20, ((ie = k.expression) == null ? void 0 : ie.end) || Qt, hn, k), _t && ae.decreaseIndent(); + } + } + function w6(k) { + Ca(k.namespace), hn(":"), Ca(k.name); + } + function Ah(k) { + k.kind === 80 ? $e(k) : Yt(k); + } + function O0(k) { + ke(84, k.pos, ns, k), sn(), $e(k.expression, jr.parenthesizeExpressionForDisallowedComma), qf(k, k.statements, k.expression.end); + } + function og(k) { + const ie = ke(90, k.pos, ns, k); + qf(k, k.statements, ie); + } + function qf(k, ie, _t) { + const Qt = ie.length === 1 && // treat synthesized nodes as located on the same line for emit purposes + (!O || oo(k) || oo(ie[0]) || Q7(k, ie[0], O)); + let Hn = 163969; + Qt ? (Qy(59, _t, hn, k), sn(), Hn &= -130) : ke(59, _t, hn, k), bo(k, ie, Hn); + } + function lf(k) { + sn(), Xg(k.token, ns), sn(), bo( + k, + k.types, + 528 + /* HeritageClauseTypes */ + ); + } + function r_(k) { + const ie = ke(85, k.pos, ns, k); + sn(), k.variableDeclaration && (ke(21, ie, hn, k), Yt(k.variableDeclaration), ke(22, k.variableDeclaration.end, hn, k), sn()), Yt(k.block); + } + function Tf(k) { + Yt(k.name), hn(":"), sn(); + const ie = k.initializer; + if (!(ua(ie) & 1024)) { + const _t = lm(ie); + Mh(_t.pos); + } + $e(ie, jr.parenthesizeExpressionForDisallowedComma); + } + function Gg(k) { + Yt(k.name), k.objectAssignmentInitializer && (sn(), hn("="), sn(), $e(k.objectAssignmentInitializer, jr.parenthesizeExpressionForDisallowedComma)); + } + function gP(k) { + k.expression && (ke(26, k.pos, hn, k), $e(k.expression, jr.parenthesizeExpressionForDisallowedComma)); + } + function F0(k) { + Yt(k.name), bn(k.initializer, k.name.end, k, jr.parenthesizeExpressionForDisallowedComma); + } + function Wy(k) { + if (Ae("/**"), k.comment) { + const ie = Dw(k.comment); + if (ie) { + const _t = ie.split(/\r\n?|\n/g); + for (const Qt of _t) + Mu(), sn(), hn("*"), sn(), Ae(Qt); + } + } + k.tags && (k.tags.length === 1 && k.tags[0].kind === 344 && !k.comment ? (sn(), Yt(k.tags[0])) : bo( + k, + k.tags, + 33 + /* JSDocComment */ + )), sn(), Ae("*/"); + } + function DS(k) { + Vp(k.tagName), qy(k.typeExpression), Hf(k.comment); + } + function PS(k) { + Vp(k.tagName), Yt(k.name), Hf(k.comment); + } + function kv(k) { + Vp(k.tagName), sn(), k.importClause && (Yt(k.importClause), sn(), ke(161, k.importClause.end, ns, k), sn()), $e(k.moduleSpecifier), k.attributes && Gy(k.attributes), Hf(k.comment); + } + function A6(k) { + sn(), hn("{"), Yt(k.name), hn("}"); + } + function Al(k) { + Vp(k.tagName), sn(), hn("{"), Yt(k.class), hn("}"), Hf(k.comment); + } + function Fd(k) { + Vp(k.tagName), qy(k.constraint), sn(), bo( + k, + k.typeParameters, + 528 + /* CommaListElements */ + ), Hf(k.comment); + } + function r2(k) { + Vp(k.tagName), k.typeExpression && (k.typeExpression.kind === 309 ? qy(k.typeExpression) : (sn(), hn("{"), Ae("Object"), k.typeExpression.isArrayType && (hn("["), hn("]")), hn("}"))), k.fullName && (sn(), Yt(k.fullName)), Hf(k.comment), k.typeExpression && k.typeExpression.kind === 322 && id(k.typeExpression); + } + function We(k) { + Vp(k.tagName), k.name && (sn(), Yt(k.name)), Hf(k.comment), T_(k.typeExpression); + } + function Vy(k) { + Hf(k.comment), T_(k.typeExpression); + } + function ll(k) { + Vp(k.tagName), Hf(k.comment); + } + function id(k) { + bo( + k, + N.createNodeArray(k.jsDocPropertyTags), + 33 + /* JSDocComment */ + ); + } + function T_(k) { + k.typeParameters && bo( + k, + N.createNodeArray(k.typeParameters), + 33 + /* JSDocComment */ + ), k.parameters && bo( + k, + N.createNodeArray(k.parameters), + 33 + /* JSDocComment */ + ), k.type && (Mu(), sn(), hn("*"), sn(), Yt(k.type)); + } + function Uy(k) { + Vp(k.tagName), qy(k.typeExpression), sn(), k.isBracketed && hn("["), Yt(k.name), k.isBracketed && hn("]"), Hf(k.comment); + } + function Vp(k) { + hn("@"), Yt(k); + } + function Hf(k) { + const ie = Dw(k); + ie && (sn(), Ae(ie)); + } + function qy(k) { + k && (sn(), hn("{"), Yt(k.type), hn("}")); + } + function va(k) { + Mu(); + const ie = k.statements; + if (ie.length === 0 || !Kd(ie[0]) || oo(ie[0])) { + WS(k, ie, AS); + return; + } + AS(k); + } + function Sm(k) { + n2(!!k.hasNoDefaultLib, k.syntheticFileReferences || [], k.syntheticTypeReferences || [], k.syntheticLibReferences || []); + } + function wS(k) { + k.isDeclarationFile && n2(k.hasNoDefaultLib, k.referencedFiles, k.typeReferenceDirectives, k.libReferenceDirectives); + } + function n2(k, ie, _t, Qt) { + if (k && (Xy('/// '), Mu()), O && O.moduleName && (Xy(`/// `), Mu()), O && O.amdDependencies) + for (const Ui of O.amdDependencies) + Ui.name ? Xy(`/// `) : Xy(`/// `), Mu(); + function Hn(Ui, Zi) { + for (const fs of Zi) { + const ta = fs.resolutionMode ? `resolution-mode="${fs.resolutionMode === 99 ? "import" : "require"}" ` : "", su = fs.preserve ? 'preserve="true" ' : ""; + Xy(`/// `), Mu(); + } + } + Hn("path", ie), Hn("types", _t), Hn("lib", Qt); + } + function AS(k) { + const ie = k.statements; + j0(k), rr(k.statements, hl), yt(k); + const _t = rc(ie, (Qt) => !Kd(Qt)); + wS(k), bo( + k, + ie, + 1, + /*parenthesizerRule*/ + void 0, + _t === -1 ? ie.length : _t + ), hp(k); + } + function NS(k) { + const ie = ua(k); + !(ie & 1024) && k.pos !== k.expression.pos && Mh(k.expression.pos), $e(k.expression), !(ie & 2048) && k.end !== k.expression.end && C_(k.expression.end); + } + function Nh(k) { + Oh( + k, + k.elements, + 528, + /*parenthesizerRule*/ + void 0 + ); + } + function Hy(k, ie, _t) { + let Qt = !!ie; + for (let Hn = 0; Hn < k.length; Hn++) { + const Ui = k[Hn]; + if (Kd(Ui)) + (_t ? !_t.has(Ui.expression.text) : !0) && (Qt && (Qt = !1, ri(ie)), Mu(), Yt(Ui), _t && _t.add(Ui.expression.text)); + else + return Hn; + } + return k.length; + } + function i2(k) { + if (yi(k)) + Hy(k.statements, k); + else { + const ie = /* @__PURE__ */ new Set(); + for (const _t of k.sourceFiles) + Hy(_t.statements, _t, ie); + ri(void 0); + } + } + function Cv(k) { + if (yi(k)) { + const ie = NI(k.text); + if (ie) + return Xy(ie), Mu(), !0; + } else + for (const ie of k.sourceFiles) + if (Cv(ie)) + return !0; + } + function sd(k, ie) { + if (!k) return; + const _t = Ae; + Ae = ie, Yt(k), Ae = _t; + } + function xf(k, ie, _t) { + if (ie?.length) { + if (Ri(ie, Qs)) + return L0(k, ie); + if (Ri(ie, dl)) + return _t ? N6(k, ie) : k.pos; + u?.(ie); + let Qt, Hn, Ui = 0, Zi = 0, fs; + for (; Ui < ie.length; ) { + for (; Zi < ie.length; ) { + if (fs = ie[Zi], Hn = dl(fs) ? "decorators" : "modifiers", Qt === void 0) + Qt = Hn; + else if (Hn !== Qt) + break; + Zi++; + } + const ta = { pos: -1, end: -1 }; + Ui === 0 && (ta.pos = ie.pos), Zi === ie.length - 1 && (ta.end = ie.end), (Qt === "modifiers" || _t) && OS( + Yt, + k, + ie, + Qt === "modifiers" ? 2359808 : 2146305, + /*parenthesizerRule*/ + void 0, + Ui, + Zi - Ui, + /*hasTrailingComma*/ + !1, + ta + ), Ui = Zi, Qt = Hn, Zi++; + } + if (d?.(ie), fs && !xd(fs.end)) + return fs.end; + } + return k.pos; + } + function L0(k, ie) { + bo( + k, + ie, + 2359808 + /* Modifiers */ + ); + const _t = Bo(ie); + return _t && !xd(_t.end) ? _t.end : k.pos; + } + function Ni(k) { + k && (hn(":"), sn(), Yt(k)); + } + function bn(k, ie, _t, Qt) { + k && (sn(), ke(64, ie, k_, _t), sn(), $e(k, Qt)); + } + function x_(k, ie, _t, Qt) { + _t && (ie(k), Qt(_t)); + } + function Gy(k) { + k && (sn(), Yt(k)); + } + function cg(k, ie) { + k && (sn(), $e(k, ie)); + } + function Kx(k) { + k && (Yt(k), sn()); + } + function Ih(k, ie) { + ms(ie) || ua(k) & 1 || fe && !wv( + k, + ie, + 0 + /* None */ + ) ? (sn(), Yt(ie)) : (Mu(), od(), FJ(ie) ? re(5, ie) : Yt(ie), gp()); + } + function N6(k, ie) { + bo( + k, + ie, + 2146305 + /* Decorators */ + ); + const _t = Bo(ie); + return _t && !xd(_t.end) ? _t.end : k.pos; + } + function $g(k, ie) { + bo(k, ie, 53776, ci); + } + function M0(k, ie) { + if (ps(k) && k.typeArguments) + return $g(k, k.typeArguments); + bo( + k, + ie, + 53776 + /* TypeParameters */ + ); + } + function Tm(k, ie) { + bo( + k, + ie, + 2576 + /* Parameters */ + ); + } + function ad(k, ie) { + const _t = Rm(ie); + return _t && _t.pos === k.pos && xo(k) && !k.type && !ut(k.modifiers) && !ut(k.typeParameters) && !ut(_t.modifiers) && !_t.dotDotDotToken && !_t.questionToken && !_t.type && !_t.initializer && Re(_t.name); + } + function IS(k, ie) { + ad(k, ie) ? bo( + k, + ie, + 528 + /* Parenthesis */ + ) : Tm(k, ie); + } + function $y(k, ie) { + bo( + k, + ie, + 8848 + /* IndexSignatureParameters */ + ); + } + function s2(k) { + switch (k & 60) { + case 0: + break; + case 16: + hn(","); + break; + case 4: + sn(), hn("|"); + break; + case 32: + sn(), hn("*"), sn(); + break; + case 8: + sn(), hn("&"); + break; + } + } + function bo(k, ie, _t, Qt, Hn, Ui) { + ek( + Yt, + k, + ie, + _t | (k && ua(k) & 2 ? 65536 : 0), + Qt, + Hn, + Ui + ); + } + function Oh(k, ie, _t, Qt, Hn, Ui) { + ek($e, k, ie, _t, Qt, Hn, Ui); + } + function ek(k, ie, _t, Qt, Hn, Ui = 0, Zi = _t ? _t.length - Ui : 0) { + if (_t === void 0 && Qt & 16384) + return; + const ta = _t === void 0 || Ui >= _t.length || Zi === 0; + if (ta && Qt & 32768) { + u?.(_t), d?.(_t); + return; + } + Qt & 15360 && (hn(yRe(Qt)), ta && _t && Mh( + _t.pos, + /*prefixSpace*/ + !0 + )), u?.(_t), ta ? Qt & 1 && !(fe && (!ie || O && eS(ie, O))) ? Mu() : Qt & 256 && !(Qt & 524288) && sn() : OS(k, ie, _t, Qt, Hn, Ui, Zi, _t.hasTrailingComma, _t), d?.(_t), Qt & 15360 && (ta && _t && C_(_t.end), hn(vRe(Qt))); + } + function OS(k, ie, _t, Qt, Hn, Ui, Zi, fs, ta) { + const su = (Qt & 262144) === 0; + let au = su; + const n1 = wv(ie, _t[Ui], Qt); + n1 ? (Mu(n1), au = !1) : Qt & 256 && sn(), Qt & 128 && od(); + const xm = xRe(k, Hn); + let E_, i1 = !1; + for (let Lv = 0; Lv < Zi; Lv++) { + const Si = _t[Ui + Lv]; + if (Qt & 32) + Mu(), s2(Qt); + else if (E_) { + Qt & 60 && E_.end !== (ie ? ie.end : -1) && (ua(E_) & 2048 || C_(E_.end)), s2(Qt); + const km = rk(E_, Si, Qt); + if (km > 0) { + if (Qt & 131 || (od(), i1 = !0), au && Qt & 60 && !xd(Si.pos)) { + const Ur = lm(Si); + Mh( + Ur.pos, + /*prefixSpace*/ + !!(Qt & 512), + /*forceNoNewline*/ + !0 + ); + } + Mu(km), au = !1; + } else E_ && Qt & 512 && sn(); + } + if (au) { + const km = lm(Si); + Mh(km.pos); + } else + au = su; + H = Si.pos, xm(Si, k, Hn, Lv), i1 && (gp(), i1 = !1), E_ = Si; + } + const Fv = E_ ? ua(E_) : 0, Rh = nr || !!(Fv & 2048), fk = fs && Qt & 64 && Qt & 16; + fk && (E_ && !Rh ? ke(28, E_.end, hn, E_) : hn(",")), E_ && (ie ? ie.end : -1) !== E_.end && Qt & 60 && !Rh && C_(fk && ta?.end ? ta.end : E_.end), Qt & 128 && gp(); + const VS = LS(ie, _t[Ui + Zi - 1], Qt, ta); + VS ? Mu(VS) : Qt & 2097408 && sn(); + } + function FS(k) { + ae.writeLiteral(k); + } + function tk(k) { + ae.writeStringLiteral(k); + } + function hP(k) { + ae.write(k); + } + function I6(k, ie) { + ae.writeSymbol(k, ie); + } + function hn(k) { + ae.writePunctuation(k); + } + function iu() { + ae.writeTrailingSemicolon(";"); + } + function ns(k) { + ae.writeKeyword(k); + } + function k_(k) { + ae.writeOperator(k); + } + function Ev(k) { + ae.writeParameter(k); + } + function Xy(k) { + ae.writeComment(k); + } + function sn() { + ae.writeSpace(" "); + } + function O6(k) { + ae.writeProperty(k); + } + function Dv(k) { + ae.nonEscapingWrite ? ae.nonEscapingWrite(k) : ae.write(k); + } + function Mu(k = 1) { + for (let ie = 0; ie < k; ie++) + ae.writeLine(ie > 0); + } + function od() { + ae.increaseIndent(); + } + function gp() { + ae.decreaseIndent(); + } + function Qy(k, ie, _t, Qt) { + return de ? Xg(k, _t, ie) : lg(Qt, k, _t, ie, Xg); + } + function Pv(k, ie) { + g && g(k), ie(Ws(k.kind)), h && h(k); + } + function Xg(k, ie, _t) { + const Qt = Ws(k); + return ie(Qt), _t < 0 ? _t : _t + Qt.length; + } + function uf(k, ie, _t) { + if (ua(k) & 1) + sn(); + else if (fe) { + const Qt = Ld(k, ie, _t); + Qt ? Mu(Qt) : sn(); + } else + Mu(); + } + function cd(k) { + const ie = k.split(/\r\n?|\n/g), _t = eZ(ie); + for (const Qt of ie) { + const Hn = _t ? Qt.slice(_t) : Qt; + Hn.length && (Mu(), Ae(Hn)); + } + } + function ld(k, ie) { + k ? (od(), Mu(k)) : ie && sn(); + } + function R0(k, ie) { + k && gp(), ie && gp(); + } + function wv(k, ie, _t) { + if (_t & 2 || fe) { + if (_t & 65536) + return 1; + if (ie === void 0) + return !k || O && eS(k, O) ? 0 : 1; + if (ie.pos === H || ie.kind === 12) + return 0; + if (O && k && !xd(k.pos) && !oo(ie) && (!ie.parent || Zo(ie.parent) === Zo(k))) + return fe ? a2( + (Qt) => MK( + ie.pos, + k.pos, + O, + Qt + ) + ) : Q7(k, ie, O) ? 0 : 1; + if (RS(ie, _t)) + return 1; + } + return _t & 1 ? 1 : 0; + } + function rk(k, ie, _t) { + if (_t & 2 || fe) { + if (k === void 0 || ie === void 0 || ie.kind === 12) + return 0; + if (O && !oo(k) && !oo(ie)) + return fe && _f(k, ie) ? a2( + (Qt) => jB( + k, + ie, + O, + Qt + ) + ) : !fe && kf(k, ie) ? L3(k, ie, O) ? 0 : 1 : _t & 65536 ? 1 : 0; + if (RS(k, _t) || RS(ie, _t)) + return 1; + } else if ($4(ie)) + return 1; + return _t & 1 ? 1 : 0; + } + function LS(k, ie, _t, Qt) { + if (_t & 2 || fe) { + if (_t & 65536) + return 1; + if (ie === void 0) + return !k || O && eS(k, O) ? 0 : 1; + if (O && k && !xd(k.pos) && !oo(ie) && (!ie.parent || ie.parent === k)) { + if (fe) { + const Hn = Qt && !xd(Qt.end) ? Qt.end : ie.end; + return a2( + (Ui) => RK( + Hn, + k.end, + O, + Ui + ) + ); + } + return OK(k, ie, O) ? 0 : 1; + } + if (RS(ie, _t)) + return 1; + } + return _t & 1 && !(_t & 131072) ? 1 : 0; + } + function a2(k) { + E.assert(!!fe); + const ie = k( + /*includeComments*/ + !0 + ); + return ie === 0 ? k( + /*includeComments*/ + !1 + ) : ie; + } + function MS(k, ie) { + const _t = fe && wv( + ie, + k, + 0 + /* None */ + ); + return _t && ld( + _t, + /*writeSpaceIfNotIndenting*/ + !1 + ), !!_t; + } + function o2(k, ie) { + const _t = fe && LS( + ie, + k, + 0, + /*childrenTextRange*/ + void 0 + ); + _t && Mu(_t); + } + function RS(k, ie) { + if (oo(k)) { + const _t = $4(k); + return _t === void 0 ? (ie & 65536) !== 0 : _t; + } + return (ie & 65536) !== 0; + } + function Ld(k, ie, _t) { + return ua(k) & 262144 ? 0 : (k = Yy(k), ie = Yy(ie), _t = Yy(_t), $4(_t) ? 1 : O && !oo(k) && !oo(ie) && !oo(_t) ? fe ? a2( + (Qt) => jB( + ie, + _t, + O, + Qt + ) + ) : L3(ie, _t, O) ? 0 : 1 : 0); + } + function F6(k) { + return k.statements.length === 0 && (!O || L3(k, k, O)); + } + function Yy(k) { + for (; k.kind === 217 && oo(k); ) + k = k.expression; + return k; + } + function Zy(k, ie) { + if (Fo(k) || z2(k)) + return jS(k); + if (Ks(k) && k.textSourceNode) + return Zy(k.textSourceNode, ie); + const _t = O, Qt = !!_t && !!k.parent && !oo(k); + if (Dg(k)) { + if (!Qt || xr(k) !== Zo(_t)) + return dn(k); + } else if (Cd(k)) { + if (!Qt || xr(k) !== Zo(_t)) + return G4(k); + } else if (E.assertNode(k, ob), !Qt) + return k.text; + return ub(_t, k, ie); + } + function Fh(k, ie, _t) { + if (k.kind === 11 && k.textSourceNode) { + const Hn = k.textSourceNode; + if (Re(Hn) || wi(Hn) || m_(Hn) || Cd(Hn)) { + const Ui = m_(Hn) ? Hn.text : Zy(Hn); + return _t ? `"${TB(Ui)}"` : ie || ua(k) & 16777216 ? `"${$m(Ui)}"` : `"${L7(Ui)}"`; + } else + return Fh(Hn, ie, _t); + } + const Qt = (ie ? 1 : 0) | (_t ? 2 : 0) | (e.terminateUnterminatedLiterals ? 4 : 0) | (e.target && e.target >= 8 ? 8 : 0); + return fZ(k, O, Qt); + } + function j0(k) { + G.push(ce), ce = 0, ne.push(pe), !(k && ua(k) & 1048576) && (K.push(X), X = 0, $.push(U), U = void 0, Z.push(oe)); + } + function hp(k) { + ce = G.pop(), pe = ne.pop(), !(k && ua(k) & 1048576) && (X = K.pop(), U = $.pop(), oe = Z.pop()); + } + function B0(k) { + (!oe || oe === Bo(Z)) && (oe = /* @__PURE__ */ new Set()), oe.add(k); + } + function Lh(k) { + (!pe || pe === Bo(ne)) && (pe = /* @__PURE__ */ new Set()), pe.add(k); + } + function hl(k) { + if (k) + switch (k.kind) { + case 241: + rr(k.statements, hl); + break; + case 256: + case 254: + case 246: + case 247: + hl(k.statement); + break; + case 245: + hl(k.thenStatement), hl(k.elseStatement); + break; + case 248: + case 250: + case 249: + hl(k.initializer), hl(k.statement); + break; + case 255: + hl(k.caseBlock); + break; + case 269: + rr(k.clauses, hl); + break; + case 296: + case 297: + rr(k.statements, hl); + break; + case 258: + hl(k.tryBlock), hl(k.catchClause), hl(k.finallyBlock); + break; + case 299: + hl(k.variableDeclaration), hl(k.block); + break; + case 243: + hl(k.declarationList); + break; + case 261: + rr(k.declarations, hl); + break; + case 260: + case 169: + case 208: + case 263: + Ec(k.name); + break; + case 262: + Ec(k.name), ua(k) & 1048576 && (rr(k.parameters, hl), hl(k.body)); + break; + case 206: + case 207: + rr(k.elements, hl); + break; + case 272: + hl(k.importClause); + break; + case 273: + Ec(k.name), hl(k.namedBindings); + break; + case 274: + Ec(k.name); + break; + case 280: + Ec(k.name); + break; + case 275: + rr(k.elements, hl); + break; + case 276: + Ec(k.propertyName || k.name); + break; + } + } + function bc(k) { + if (k) + switch (k.kind) { + case 303: + case 304: + case 172: + case 171: + case 174: + case 173: + case 177: + case 178: + Ec(k.name); + break; + } + } + function Ec(k) { + k && (Fo(k) || z2(k) ? jS(k) : Ts(k) && hl(k)); + } + function jS(k) { + const ie = k.emitNode.autoGenerate; + if ((ie.flags & 7) === 4) + return n_(dA(k), wi(k), ie.flags, ie.prefix, ie.suffix); + { + const _t = ie.id; + return V[_t] || (V[_t] = ak(k)); + } + } + function n_(k, ie, _t, Qt, Hn) { + const Ui = ja(k), Zi = ie ? F : j; + return Zi[Ui] || (Zi[Ui] = Nv(k, ie, _t ?? 0, JC(Qt, jS), JC(Hn))); + } + function i_(k, ie) { + return ud(k) && !nk(k, ie) && !L.has(k); + } + function nk(k, ie) { + let _t, Qt; + if (ie ? (_t = pe, Qt = ne) : (_t = oe, Qt = Z), _t?.has(k)) + return !0; + for (let Hn = Qt.length - 1; Hn >= 0; Hn--) + if (_t !== Qt[Hn] && (_t = Qt[Hn], _t?.has(k))) + return !0; + return !1; + } + function ud(k, ie) { + return O ? n7(O, k, n) : !0; + } + function ik(k, ie) { + for (let _t = ie; _t && yb(_t, ie); _t = _t.nextContainer) + if (Vm(_t) && _t.locals) { + const Qt = _t.locals.get(Ko(k)); + if (Qt && Qt.flags & 3257279) + return !1; + } + return !0; + } + function Ky(k) { + switch (k) { + case "": + return X; + case "#": + return ce; + default: + return U?.get(k) ?? 0; + } + } + function L6(k, ie) { + switch (k) { + case "": + X = ie; + break; + case "#": + ce = ie; + break; + default: + U ?? (U = /* @__PURE__ */ new Map()), U.set(k, ie); + break; + } + } + function Av(k, ie, _t, Qt, Hn) { + Qt.length > 0 && Qt.charCodeAt(0) === 35 && (Qt = Qt.slice(1)); + const Ui = sv(_t, Qt, "", Hn); + let Zi = Ky(Ui); + if (k && !(Zi & k)) { + const ta = sv(_t, Qt, k === 268435456 ? "_i" : "_n", Hn); + if (i_(ta, _t)) + return Zi |= k, _t ? Lh(ta) : ie && B0(ta), L6(Ui, Zi), ta; + } + for (; ; ) { + const fs = Zi & 268435455; + if (Zi++, fs !== 8 && fs !== 13) { + const ta = fs < 26 ? "_" + String.fromCharCode(97 + fs) : "_" + (fs - 26), su = sv(_t, Qt, ta, Hn); + if (i_(su, _t)) + return _t ? Lh(su) : ie && B0(su), L6(Ui, Zi), su; + } + } + } + function No(k, ie = i_, _t, Qt, Hn, Ui, Zi) { + if (k.length > 0 && k.charCodeAt(0) === 35 && (k = k.slice(1)), Ui.length > 0 && Ui.charCodeAt(0) === 35 && (Ui = Ui.slice(1)), _t) { + const ta = sv(Hn, Ui, k, Zi); + if (ie(ta, Hn)) + return Hn ? Lh(ta) : Qt ? B0(ta) : L.add(ta), ta; + } + k.charCodeAt(k.length - 1) !== 95 && (k += "_"); + let fs = 1; + for (; ; ) { + const ta = sv(Hn, Ui, k + fs, Zi); + if (ie(ta, Hn)) + return Hn ? Lh(ta) : Qt ? B0(ta) : L.add(ta), ta; + fs++; + } + } + function M6(k) { + return No( + k, + ud, + /*optimistic*/ + !0, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function yP(k) { + const ie = Zy(k.name); + return ik(ie, Jn(k, Vm)) ? ie : No( + ie, + i_, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function BS(k) { + const ie = RT(k), _t = Ks(ie) ? dZ(ie.text) : "module"; + return No( + _t, + i_, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function R6() { + return No( + "default", + i_, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function Ru() { + return No( + "class", + i_, + /*optimistic*/ + !1, + /*scoped*/ + !1, + /*privateName*/ + !1, + /*prefix*/ + "", + /*suffix*/ + "" + ); + } + function sk(k, ie, _t, Qt) { + return Re(k.name) ? n_(k.name, ie) : Av( + 0, + /*reservedInNestedScopes*/ + !1, + ie, + _t, + Qt + ); + } + function Nv(k, ie, _t, Qt, Hn) { + switch (k.kind) { + case 80: + case 81: + return No( + Zy(k), + i_, + !!(_t & 16), + !!(_t & 8), + ie, + Qt, + Hn + ); + case 267: + case 266: + return E.assert(!Qt && !Hn && !ie), yP(k); + case 272: + case 278: + return E.assert(!Qt && !Hn && !ie), BS(k); + case 262: + case 263: { + E.assert(!Qt && !Hn && !ie); + const Ui = k.name; + return Ui && !Fo(Ui) ? Nv( + Ui, + /*privateName*/ + !1, + _t, + Qt, + Hn + ) : R6(); + } + case 277: + return E.assert(!Qt && !Hn && !ie), R6(); + case 231: + return E.assert(!Qt && !Hn && !ie), Ru(); + case 174: + case 177: + case 178: + return sk(k, ie, Qt, Hn); + case 167: + return Av( + 0, + /*reservedInNestedScopes*/ + !0, + ie, + Qt, + Hn + ); + default: + return Av( + 0, + /*reservedInNestedScopes*/ + !1, + ie, + Qt, + Hn + ); + } + } + function ak(k) { + const ie = k.emitNode.autoGenerate, _t = JC(ie.prefix, jS), Qt = JC(ie.suffix); + switch (ie.flags & 7) { + case 1: + return Av(0, !!(ie.flags & 8), wi(k), _t, Qt); + case 2: + return E.assertNode(k, Re), Av( + 268435456, + !!(ie.flags & 8), + /*privateName*/ + !1, + _t, + Qt + ); + case 3: + return No( + dn(k), + ie.flags & 32 ? ud : i_, + !!(ie.flags & 16), + !!(ie.flags & 8), + wi(k), + _t, + Qt + ); + } + return E.fail(`Unsupported GeneratedIdentifierKind: ${E.formatEnum( + ie.flags & 7, + wR, + /*isFlags*/ + !0 + )}.`); + } + function M_(k, ie) { + const _t = lt(2, k, ie), Qt = Fe, Hn = Qe, Ui = Ke; + c2(ie), _t(k, ie), e1(ie, Qt, Hn, Ui); + } + function c2(k) { + const ie = ua(k), _t = lm(k); + j6(k, ie, _t.pos, _t.end), ie & 4096 && (nr = !0); + } + function e1(k, ie, _t, Qt) { + const Hn = ua(k), Ui = lm(k); + Hn & 4096 && (nr = !1), l2(k, Hn, Ui.pos, Ui.end, ie, _t, Qt); + const Zi = Bee(k); + Zi && l2(k, Hn, Zi.pos, Zi.end, ie, _t, Qt); + } + function j6(k, ie, _t, Qt) { + Vt(), Wt = !1; + const Hn = _t < 0 || (ie & 1024) !== 0 || k.kind === 12, Ui = Qt < 0 || (ie & 2048) !== 0 || k.kind === 12; + (_t > 0 || Qt > 0) && _t !== Qt && (Hn || Md( + _t, + /*isEmittedNode*/ + k.kind !== 353 + /* NotEmittedStatement */ + ), (!Hn || _t >= 0 && ie & 1024) && (Fe = _t), (!Ui || Qt >= 0 && ie & 2048) && (Qe = Qt, k.kind === 261 && (Ke = Qt))), rr(PC(k), ok), zt(); + } + function l2(k, ie, _t, Qt, Hn, Ui, Zi) { + Vt(); + const fs = Qt < 0 || (ie & 2048) !== 0 || k.kind === 12; + rr(Z3(k), JS), (_t > 0 || Qt > 0) && _t !== Qt && (Fe = Hn, Qe = Ui, Ke = Zi, !fs && k.kind !== 353 && s_(Qt)), zt(); + } + function ok(k) { + (k.hasLeadingNewline || k.kind === 2) && ae.writeLine(), ck(k), k.hasTrailingNewLine || k.kind === 2 ? ae.writeLine() : ae.writeSpace(" "); + } + function JS(k) { + ae.isAtStartOfLine() || ae.writeSpace(" "), ck(k), k.hasTrailingNewLine && ae.writeLine(); + } + function ck(k) { + const ie = zS(k), _t = k.kind === 3 ? kT(ie) : void 0; + SC(ie, _t, ae, 0, ie.length, C); + } + function zS(k) { + return k.kind === 3 ? `/*${k.text}*/` : `//${k.text}`; + } + function WS(k, ie, _t) { + Vt(); + const { pos: Qt, end: Hn } = ie, Ui = ua(k), Zi = Qt < 0 || (Ui & 1024) !== 0, fs = nr || Hn < 0 || (Ui & 2048) !== 0; + Zi || t1(ie), zt(), Ui & 4096 && !nr ? (nr = !0, _t(k), nr = !1) : _t(k), Vt(), fs || (Md( + ie.end, + /*isEmittedNode*/ + !0 + ), Wt && !ae.isAtStartOfLine() && ae.writeLine()), zt(); + } + function kf(k, ie) { + return k = Zo(k), k.parent && k.parent === Zo(ie).parent; + } + function _f(k, ie) { + if (ie.pos < k.end) + return !1; + k = Zo(k), ie = Zo(ie); + const _t = k.parent; + if (!_t || _t !== ie.parent) + return !1; + const Qt = hee(k), Hn = Qt?.indexOf(k); + return Hn !== void 0 && Hn > -1 && Qt.indexOf(ie) === Hn + 1; + } + function Md(k, ie) { + Wt = !1, ie ? k === 0 && O?.isDeclarationFile ? Ov(k, Iv) : Ov(k, xn) : k === 0 && Ov(k, B6); + } + function B6(k, ie, _t, Qt, Hn) { + jd(k, ie) && xn(k, ie, _t, Qt, Hn); + } + function Iv(k, ie, _t, Qt, Hn) { + jd(k, ie) || xn(k, ie, _t, Qt, Hn); + } + function Ma(k, ie) { + return e.onlyPrintJsDocStyle ? az(k, ie) || i7(k, ie) : !0; + } + function xn(k, ie, _t, Qt, Hn) { + !O || !Ma(O.text, k) || (Wt || (yK(ws(), ae, Hn, k), Wt = !0), _d(k), SC(O.text, ws(), ae, k, ie, C), _d(ie), Qt ? ae.writeLine() : _t === 3 && ae.writeSpace(" ")); + } + function C_(k) { + nr || k === -1 || Md( + k, + /*isEmittedNode*/ + !0 + ); + } + function s_(k) { + Qg(k, lk); + } + function lk(k, ie, _t, Qt) { + !O || !Ma(O.text, k) || (ae.isAtStartOfLine() || ae.writeSpace(" "), _d(k), SC(O.text, ws(), ae, k, ie, C), _d(ie), Qt && ae.writeLine()); + } + function Mh(k, ie, _t) { + nr || (Vt(), Qg(k, ie ? lk : _t ? J6 : z6), zt()); + } + function J6(k, ie, _t) { + O && (_d(k), SC(O.text, ws(), ae, k, ie, C), _d(ie), _t === 2 && ae.writeLine()); + } + function z6(k, ie, _t, Qt) { + O && (_d(k), SC(O.text, ws(), ae, k, ie, C), _d(ie), Qt ? ae.writeLine() : ae.writeSpace(" ")); + } + function Ov(k, ie) { + O && (Fe === -1 || k !== Fe) && (Rd(k) ? R_(ie) : hw( + O.text, + k, + ie, + /*state*/ + k + )); + } + function Qg(k, ie) { + O && (Qe === -1 || k !== Qe && k !== Ke) && yw(O.text, k, ie); + } + function Rd(k) { + return at !== void 0 && ia(at).nodePos === k; + } + function R_(k) { + if (!O) return; + const ie = ia(at).detachedCommentEndPos; + at.length - 1 ? at.pop() : at = void 0, hw( + O.text, + ie, + k, + /*state*/ + ie + ); + } + function t1(k) { + const ie = O && bK(O.text, ws(), ae, Yg, k, C, nr); + ie && (at ? at.push(ie) : at = [ie]); + } + function Yg(k, ie, _t, Qt, Hn, Ui) { + !O || !Ma(O.text, Qt) || (_d(Qt), SC(k, ie, _t, Qt, Hn, Ui), _d(Hn)); + } + function jd(k, ie) { + return !!O && Oj(O.text, k, ie); + } + function u2(k, ie) { + const _t = lt(3, k, ie); + $c(ie), _t(k, ie), uk(ie); + } + function $c(k) { + const ie = ua(k), _t = g0(k), Qt = _t.source || De; + k.kind !== 353 && !(ie & 32) && _t.pos >= 0 && ff(_t.source || De, yp(Qt, _t.pos)), ie & 128 && (de = !0); + } + function uk(k) { + const ie = ua(k), _t = g0(k); + ie & 128 && (de = !1), k.kind !== 353 && !(ie & 64) && _t.end >= 0 && ff(_t.source || De, _t.end); + } + function yp(k, ie) { + return k.skipTrivia ? k.skipTrivia(ie) : sa(k.text, ie); + } + function _d(k) { + if (de || xd(k) || _k(De)) + return; + const { line: ie, character: _t } = Vs(De, k); + ve.addMapping( + ae.getLine(), + ae.getColumn(), + Xe, + ie, + _t, + /*nameIndex*/ + void 0 + ); + } + function ff(k, ie) { + if (k !== De) { + const _t = De, Qt = Xe; + r1(k), _d(ie), W6(_t, Qt); + } else + _d(ie); + } + function lg(k, ie, _t, Qt, Hn) { + if (de || k && x7(k)) + return Hn(ie, _t, Qt); + const Ui = k && k.emitNode, Zi = Ui && Ui.flags || 0, fs = Ui && Ui.tokenSourceMapRanges && Ui.tokenSourceMapRanges[ie], ta = fs && fs.source || De; + return Qt = yp(ta, fs ? fs.pos : Qt), !(Zi & 256) && Qt >= 0 && ff(ta, Qt), Qt = Hn(ie, _t, Qt), fs && (Qt = fs.end), !(Zi & 512) && Qt >= 0 && ff(ta, Qt), Qt; + } + function r1(k) { + if (!de) { + if (De = k, k === Ie) { + Xe = ye; + return; + } + _k(k) || (Xe = ve.addSource(k.fileName), e.inlineSources && ve.setSourceContent(Xe, k.text), Ie = k, ye = Xe); + } + } + function W6(k, ie) { + De = k, Xe = ie; + } + function _k(k) { + return Go( + k.fileName, + ".json" + /* Json */ + ); + } + } + function hRe() { + const e = []; + return e[ + 1024 + /* Braces */ + ] = ["{", "}"], e[ + 2048 + /* Parenthesis */ + ] = ["(", ")"], e[ + 4096 + /* AngleBrackets */ + ] = ["<", ">"], e[ + 8192 + /* SquareBrackets */ + ] = ["[", "]"], e; + } + function yRe(e) { + return dve[ + e & 15360 + /* BracketsMask */ + ][0]; + } + function vRe(e) { + return dve[ + e & 15360 + /* BracketsMask */ + ][1]; + } + function bRe(e, t, n, i) { + t(e); + } + function SRe(e, t, n, i) { + t(e, n.select(i)); + } + function TRe(e, t, n, i) { + t(e, n); + } + function xRe(e, t) { + return e.length === 1 ? bRe : typeof t == "object" ? SRe : TRe; + } + function tF(e, t, n) { + if (!e.getDirectories || !e.readDirectory) + return; + const i = /* @__PURE__ */ new Map(), s = eu(n); + return { + useCaseSensitiveFileNames: n, + fileExists: T, + readFile: (U, G) => e.readFile(U, G), + directoryExists: e.directoryExists && C, + getDirectories: P, + readDirectory: O, + createDirectory: e.createDirectory && D, + writeFile: e.writeFile && S, + addOrDeleteFileOrDirectory: F, + addOrDeleteFile: V, + clearCache: $, + realpath: e.realpath && j + }; + function o(U) { + return _o(U, t, s); + } + function c(U) { + return i.get(bl(U)); + } + function _(U) { + const G = c(Xn(U)); + return G && (G.sortedAndCanonicalizedFiles || (G.sortedAndCanonicalizedFiles = G.files.map(s).sort(), G.sortedAndCanonicalizedDirectories = G.directories.map(s).sort()), G); + } + function u(U) { + return Wc(Cs(U)); + } + function d(U, G) { + var ce; + if (!e.realpath || bl(o(e.realpath(U))) === G) { + const K = { + files: or(e.readDirectory( + U, + /*extensions*/ + void 0, + /*exclude*/ + void 0, + /*include*/ + ["*.*"] + ), u) || [], + directories: e.getDirectories(U) || [] + }; + return i.set(bl(G), K), K; + } + if ((ce = e.directoryExists) != null && ce.call(e, U)) + return i.set(G, !1), !1; + } + function g(U, G) { + G = bl(G); + const ce = c(G); + if (ce) + return ce; + try { + return d(U, G); + } catch { + E.assert(!i.has(bl(G))); + return; + } + } + function h(U, G) { + return Zh(U, G, lo, Kl) >= 0; + } + function S(U, G, ce) { + const K = o(U), X = _(K); + return X && L( + X, + u(U), + /*fileExists*/ + !0 + ), e.writeFile(U, G, ce); + } + function T(U) { + const G = o(U), ce = _(G); + return ce && h(ce.sortedAndCanonicalizedFiles, s(u(U))) || e.fileExists(U); + } + function C(U) { + const G = o(U); + return i.has(bl(G)) || e.directoryExists(U); + } + function D(U) { + const G = o(U), ce = _(G); + if (ce) { + const K = u(U), X = s(K), Z = ce.sortedAndCanonicalizedDirectories; + ry(Z, X, Kl) && ce.directories.push(K); + } + e.createDirectory(U); + } + function P(U) { + const G = o(U), ce = g(U, G); + return ce ? ce.directories.slice() : e.getDirectories(U); + } + function O(U, G, ce, K, X) { + const Z = o(U), oe = g(U, Z); + let ne; + if (oe !== void 0) + return tJ(U, G, ce, K, n, t, X, pe, j); + return e.readDirectory(U, G, ce, K, X); + function pe(H) { + const ae = o(H); + if (ae === Z) + return oe || fe(H, ae); + const le = g(H, ae); + return le !== void 0 ? le || fe(H, ae) : iJ; + } + function fe(H, ae) { + if (ne && ae === Z) return ne; + const le = { + files: or(e.readDirectory( + H, + /*extensions*/ + void 0, + /*exclude*/ + void 0, + /*include*/ + ["*.*"] + ), u) || He, + directories: e.getDirectories(H) || He + }; + return ae === Z && (ne = le), le; + } + } + function j(U) { + return e.realpath ? e.realpath(U) : U; + } + function F(U, G) { + if (c(G) !== void 0) { + $(); + return; + } + const K = _(G); + if (!K) + return; + if (!e.directoryExists) { + $(); + return; + } + const X = u(U), Z = { + fileExists: e.fileExists(U), + directoryExists: e.directoryExists(U) + }; + return Z.directoryExists || h(K.sortedAndCanonicalizedDirectories, s(X)) ? $() : L(K, X, Z.fileExists), Z; + } + function V(U, G, ce) { + if (ce === 1) + return; + const K = _(G); + K && L( + K, + u(U), + ce === 0 + /* Created */ + ); + } + function L(U, G, ce) { + const K = U.sortedAndCanonicalizedFiles, X = s(G); + if (ce) + ry(K, X, Kl) && U.files.push(G); + else { + const Z = Zh(K, X, lo, Kl); + if (Z >= 0) { + K.splice(Z, 1); + const oe = U.files.findIndex((ne) => s(ne) === X); + U.files.splice(oe, 1); + } + } + } + function $() { + i.clear(); + } + } + var Sie = /* @__PURE__ */ ((e) => (e[e.Update = 0] = "Update", e[e.RootNamesAndUpdate = 1] = "RootNamesAndUpdate", e[e.Full = 2] = "Full", e))(Sie || {}); + function rF(e, t, n, i, s) { + var o; + const c = jk(((o = t?.configFile) == null ? void 0 : o.extendedSourceFiles) || He, s); + n.forEach((_, u) => { + c.has(u) || (_.projects.delete(e), _.close()); + }), c.forEach((_, u) => { + const d = n.get(u); + d ? d.projects.add(e) : n.set(u, { + projects: /* @__PURE__ */ new Set([e]), + watcher: i(_, u), + close: () => { + const g = n.get(u); + !g || g.projects.size !== 0 || (g.watcher.close(), n.delete(u)); + } + }); + }); + } + function xW(e, t) { + t.forEach((n) => { + n.projects.delete(e) && n.close(); + }); + } + function nF(e, t, n) { + e.delete(t) && e.forEach(({ extendedResult: i }, s) => { + var o; + (o = i.extendedSourceFiles) != null && o.some((c) => n(c) === t) && nF(e, s, n); + }); + } + function kW(e, t, n) { + A4( + t, + e.getMissingFilePaths(), + { + // Watch the missing files + createNewValue: n, + // Files that are no longer missing (e.g. because they are no longer required) + // should no longer be watched. + onDeleteValue: Zp + } + ); + } + function jA(e, t, n) { + t ? A4( + e, + new Map(Object.entries(t)), + { + // Create new watch and recursive info + createNewValue: i, + // Close existing watch thats not needed any more + onDeleteValue: _p, + // Close existing watch that doesnt match in the flags + onExistingValue: s + } + ) : N_(e, _p); + function i(o, c) { + return { + watcher: n(o, c), + flags: c + }; + } + function s(o, c, _) { + o.flags !== c && (o.watcher.close(), e.set(_, i(_, c))); + } + } + function BA({ + watchedDirPath: e, + fileOrDirectory: t, + fileOrDirectoryPath: n, + configFileName: i, + options: s, + program: o, + extraFileExtensions: c, + currentDirectory: _, + useCaseSensitiveFileNames: u, + writeLog: d, + toPath: g, + getScriptKind: h + }) { + const S = fF(n); + if (!S) + return d(`Project: ${i} Detected ignored path: ${t}`), !0; + if (n = S, n === e) return !1; + if (zk(n) && !(cee(t, s, c) || O())) + return d(`Project: ${i} Detected file add/remove of non supported extension: ${t}`), !0; + if (Mre(t, s.configFile.configFileSpecs, Xi(Xn(i), _), u, _)) + return d(`Project: ${i} Detected excluded file: ${t}`), !0; + if (!o || s.outFile || s.outDir) return !1; + if (Ol(n)) { + if (s.declarationDir) return !1; + } else if (!Lc(n, CC)) + return !1; + const T = Gu(n), C = ss(o) ? void 0 : kRe(o) ? o.getProgramOrUndefined() : o, D = !C && !ss(o) ? o : void 0; + if (P( + T + ".ts" + /* Ts */ + ) || P( + T + ".tsx" + /* Tsx */ + )) + return d(`Project: ${i} Detected output file: ${t}`), !0; + return !1; + function P(j) { + return C ? !!C.getSourceFileByPath(j) : D ? D.getState().fileInfos.has(j) : !!Nn(o, (F) => g(F) === j); + } + function O() { + if (!h) return !1; + switch (h(t)) { + case 3: + case 4: + case 7: + case 5: + return !0; + case 1: + case 2: + return yy(s); + case 6: + return kb(s); + case 0: + return !1; + } + } + } + function kRe(e) { + return !!e.getState; + } + function Tie(e, t) { + return e ? e.isEmittedFile(t) : !1; + } + var xie = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.TriggerOnly = 1] = "TriggerOnly", e[e.Verbose = 2] = "Verbose", e))(xie || {}); + function CW(e, t, n, i) { + YQ(t === 2 ? n : ka); + const s = { + watchFile: (D, P, O, j) => e.watchFile(D, P, O, j), + watchDirectory: (D, P, O, j) => e.watchDirectory(D, P, (O & 1) !== 0, j) + }, o = t !== 0 ? { + watchFile: T("watchFile"), + watchDirectory: T("watchDirectory") + } : void 0, c = t === 2 ? { + watchFile: h, + watchDirectory: S + } : o || s, _ = t === 2 ? g : BD; + return { + watchFile: u("watchFile"), + watchDirectory: u("watchDirectory") + }; + function u(D) { + return (P, O, j, F, V, L) => { + var $; + return EO(P, D === "watchFile" ? F?.excludeFiles : F?.excludeDirectories, d(), (($ = e.getCurrentDirectory) == null ? void 0 : $.call(e)) || "") ? _(P, j, F, V, L) : c[D].call( + /*thisArgs*/ + void 0, + P, + O, + j, + F, + V, + L + ); + }; + } + function d() { + return typeof e.useCaseSensitiveFileNames == "boolean" ? e.useCaseSensitiveFileNames : e.useCaseSensitiveFileNames(); + } + function g(D, P, O, j, F) { + return n(`ExcludeWatcher:: Added:: ${C(D, P, O, j, F, i)}`), { + close: () => n(`ExcludeWatcher:: Close:: ${C(D, P, O, j, F, i)}`) + }; + } + function h(D, P, O, j, F, V) { + n(`FileWatcher:: Added:: ${C(D, O, j, F, V, i)}`); + const L = o.watchFile(D, P, O, j, F, V); + return { + close: () => { + n(`FileWatcher:: Close:: ${C(D, O, j, F, V, i)}`), L.close(); + } + }; + } + function S(D, P, O, j, F, V) { + const L = `DirectoryWatcher:: Added:: ${C(D, O, j, F, V, i)}`; + n(L); + const $ = Io(), U = o.watchDirectory(D, P, O, j, F, V), G = Io() - $; + return n(`Elapsed:: ${G}ms ${L}`), { + close: () => { + const ce = `DirectoryWatcher:: Close:: ${C(D, O, j, F, V, i)}`; + n(ce); + const K = Io(); + U.close(); + const X = Io() - K; + n(`Elapsed:: ${X}ms ${ce}`); + } + }; + } + function T(D) { + return (P, O, j, F, V, L) => s[D].call( + /*thisArgs*/ + void 0, + P, + (...$) => { + const U = `${D === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${$[0]} ${$[1] !== void 0 ? $[1] : ""}:: ${C(P, j, F, V, L, i)}`; + n(U); + const G = Io(); + O.call( + /*thisArg*/ + void 0, + ...$ + ); + const ce = Io() - G; + n(`Elapsed:: ${ce}ms ${U}`); + }, + j, + F, + V, + L + ); + } + function C(D, P, O, j, F, V) { + return `WatchInfo: ${D} ${P} ${JSON.stringify(O)} ${V ? V(j, F) : F === void 0 ? j : `${j} ${F}`}`; + } + } + function JA(e) { + const t = e?.fallbackPolling; + return { + watchFile: t !== void 0 ? t : 1 + /* PriorityPollingInterval */ + }; + } + function _p(e) { + e.watcher.close(); + } + function EW(e, t, n = "tsconfig.json") { + return $p(e, (i) => { + const s = Mn(i, n); + return t(s) ? s : void 0; + }); + } + function DW(e, t) { + const n = Xn(t), i = $_(e) ? e : Mn(n, e); + return Cs(i); + } + function kie(e, t, n) { + let i; + return rr(e, (o) => { + const c = pw(o, t); + if (c.pop(), !i) { + i = c; + return; + } + const _ = Math.min(i.length, c.length); + for (let u = 0; u < _; u++) + if (n(i[u]) !== n(c[u])) { + if (u === 0) + return !0; + i.length = u; + break; + } + c.length < i.length && (i.length = c.length); + }) ? "" : i ? ah(i) : t; + } + function Cie(e, t) { + return iF(e, t); + } + function PW(e, t) { + return (n, i, s) => { + let o; + try { + Yo("beforeIORead"), o = e(n), Yo("afterIORead"), ep("I/O Read", "beforeIORead", "afterIORead"); + } catch (c) { + s && s(c.message), o = ""; + } + return o !== void 0 ? Cx(n, o, i, t) : void 0; + }; + } + function wW(e, t, n) { + return (i, s, o, c) => { + try { + Yo("beforeIOWrite"), EB( + i, + s, + o, + e, + t, + n + ), Yo("afterIOWrite"), ep("I/O Write", "beforeIOWrite", "afterIOWrite"); + } catch (_) { + c && c(_.message); + } + }; + } + function iF(e, t, n = _l) { + const i = /* @__PURE__ */ new Map(), s = eu(n.useCaseSensitiveFileNames); + function o(g) { + return i.has(g) ? !0 : (d.directoryExists || n.directoryExists)(g) ? (i.set(g, !0), !0) : !1; + } + function c() { + return Xn(Cs(n.getExecutingFilePath())); + } + const _ = d0(e), u = n.realpath && ((g) => n.realpath(g)), d = { + getSourceFile: PW((g) => d.readFile(g), t), + getDefaultLibLocation: c, + getDefaultLibFileName: (g) => Mn(c(), bw(g)), + writeFile: wW( + (g, h, S) => n.writeFile(g, h, S), + (g) => (d.createDirectory || n.createDirectory)(g), + (g) => o(g) + ), + getCurrentDirectory: Wu(() => n.getCurrentDirectory()), + useCaseSensitiveFileNames: () => n.useCaseSensitiveFileNames, + getCanonicalFileName: s, + getNewLine: () => _, + fileExists: (g) => n.fileExists(g), + readFile: (g) => n.readFile(g), + trace: (g) => n.write(g + _), + directoryExists: (g) => n.directoryExists(g), + getEnvironmentVariable: (g) => n.getEnvironmentVariable ? n.getEnvironmentVariable(g) : "", + getDirectories: (g) => n.getDirectories(g), + realpath: u, + readDirectory: (g, h, S, T, C) => n.readDirectory(g, h, S, T, C), + createDirectory: (g) => n.createDirectory(g), + createHash: Ns(n, n.createHash) + }; + return d; + } + function LD(e, t, n) { + const i = e.readFile, s = e.fileExists, o = e.directoryExists, c = e.createDirectory, _ = e.writeFile, u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), S = (D) => { + const P = t(D), O = u.get(P); + return O !== void 0 ? O !== !1 ? O : void 0 : T(P, D); + }, T = (D, P) => { + const O = i.call(e, P); + return u.set(D, O !== void 0 ? O : !1), O; + }; + e.readFile = (D) => { + const P = t(D), O = u.get(P); + return O !== void 0 ? O !== !1 ? O : void 0 : !Go( + D, + ".json" + /* Json */ + ) && !gie(D) ? i.call(e, D) : T(P, D); + }; + const C = n ? (D, P, O, j) => { + const F = t(D), V = typeof P == "object" ? P.impliedNodeFormat : void 0, L = h.get(V), $ = L?.get(F); + if ($) return $; + const U = n(D, P, O, j); + return U && (Ol(D) || Go( + D, + ".json" + /* Json */ + )) && h.set(V, (L || /* @__PURE__ */ new Map()).set(F, U)), U; + } : void 0; + return e.fileExists = (D) => { + const P = t(D), O = d.get(P); + if (O !== void 0) return O; + const j = s.call(e, D); + return d.set(P, !!j), j; + }, _ && (e.writeFile = (D, P, ...O) => { + const j = t(D); + d.delete(j); + const F = u.get(j); + F !== void 0 && F !== P ? (u.delete(j), h.forEach((V) => V.delete(j))) : C && h.forEach((V) => { + const L = V.get(j); + L && L.text !== P && V.delete(j); + }), _.call(e, D, P, ...O); + }), o && (e.directoryExists = (D) => { + const P = t(D), O = g.get(P); + if (O !== void 0) return O; + const j = o.call(e, D); + return g.set(P, !!j), j; + }, c && (e.createDirectory = (D) => { + const P = t(D); + g.delete(P), c.call(e, D); + })), { + originalReadFile: i, + originalFileExists: s, + originalDirectoryExists: o, + originalCreateDirectory: c, + originalWriteFile: _, + getSourceFileWithCache: C, + readFileWithCache: S + }; + } + function Tve(e, t, n) { + let i; + return i = Bn(i, e.getConfigFileParsingDiagnostics()), i = Bn(i, e.getOptionsDiagnostics(n)), i = Bn(i, e.getSyntacticDiagnostics(t, n)), i = Bn(i, e.getGlobalDiagnostics(n)), i = Bn(i, e.getSemanticDiagnostics(t, n)), op(e.getCompilerOptions()) && (i = Bn(i, e.getDeclarationDiagnostics(t, n))), qk(i || He); + } + function xve(e, t) { + let n = ""; + for (const i of e) + n += AW(i, t); + return n; + } + function AW(e, t) { + const n = `${M2(e)} TS${e.code}: ${gm(e.messageText, t.getNewLine())}${t.getNewLine()}`; + if (e.file) { + const { line: i, character: s } = Vs(e.file, e.start), o = e.file.fileName; + return `${FE(o, t.getCurrentDirectory(), (_) => t.getCanonicalFileName(_))}(${i + 1},${s + 1}): ` + n; + } + return n; + } + var Eie = /* @__PURE__ */ ((e) => (e.Grey = "\x1B[90m", e.Red = "\x1B[91m", e.Yellow = "\x1B[93m", e.Blue = "\x1B[94m", e.Cyan = "\x1B[96m", e))(Eie || {}), Die = "\x1B[7m", Pie = " ", kve = "\x1B[0m", Cve = "...", CRe = " ", Eve = " "; + function Dve(e) { + switch (e) { + case 1: + return "\x1B[91m"; + case 0: + return "\x1B[93m"; + case 2: + return E.fail("Should never get an Info diagnostic on the command line."); + case 3: + return "\x1B[94m"; + } + } + function Wb(e, t) { + return t + e + kve; + } + function Pve(e, t, n, i, s, o) { + const { line: c, character: _ } = Vs(e, t), { line: u, character: d } = Vs(e, t + n), g = Vs(e, e.text.length).line, h = u - c >= 4; + let S = (u + 1 + "").length; + h && (S = Math.max(Cve.length, S)); + let T = ""; + for (let C = c; C <= u; C++) { + T += o.getNewLine(), h && c + 1 < C && C < u - 1 && (T += i + Wb(Cve.padStart(S), Die) + Pie + o.getNewLine(), C = u - 1); + const D = mw(e, C, 0), P = C < g ? mw(e, C + 1, 0) : e.text.length; + let O = e.text.slice(D, P); + if (O = O.trimEnd(), O = O.replace(/\t/g, " "), T += i + Wb((C + 1 + "").padStart(S), Die) + Pie, T += O + o.getNewLine(), T += i + Wb("".padStart(S), Die) + Pie, T += s, C === c) { + const j = C === u ? d : void 0; + T += O.slice(0, _).replace(/\S/g, " "), T += O.slice(_, j).replace(/./g, "~"); + } else C === u ? T += O.slice(0, d).replace(/./g, "~") : T += O.replace(/./g, "~"); + T += kve; + } + return T; + } + function NW(e, t, n, i = Wb) { + const { line: s, character: o } = Vs(e, t), c = n ? FE(e.fileName, n.getCurrentDirectory(), (u) => n.getCanonicalFileName(u)) : e.fileName; + let _ = ""; + return _ += i( + c, + "\x1B[96m" + /* Cyan */ + ), _ += ":", _ += i( + `${s + 1}`, + "\x1B[93m" + /* Yellow */ + ), _ += ":", _ += i( + `${o + 1}`, + "\x1B[93m" + /* Yellow */ + ), _; + } + function wie(e, t) { + let n = ""; + for (const i of e) { + if (i.file) { + const { file: s, start: o } = i; + n += NW(s, o, t), n += " - "; + } + if (n += Wb(M2(i), Dve(i.category)), n += Wb( + ` TS${i.code}: `, + "\x1B[90m" + /* Grey */ + ), n += gm(i.messageText, t.getNewLine()), i.file && i.code !== p.File_appears_to_be_binary.code && (n += t.getNewLine(), n += Pve(i.file, i.start, i.length, "", Dve(i.category), t)), i.relatedInformation) { + n += t.getNewLine(); + for (const { file: s, start: o, length: c, messageText: _ } of i.relatedInformation) + s && (n += t.getNewLine(), n += CRe + NW(s, o, t), n += Pve(s, o, c, Eve, "\x1B[96m", t)), n += t.getNewLine(), n += Eve + gm(_, t.getNewLine()); + } + n += t.getNewLine(); + } + return n; + } + function gm(e, t, n = 0) { + if (Gi(e)) + return e; + if (e === void 0) + return ""; + let i = ""; + if (n) { + i += t; + for (let s = 0; s < n; s++) + i += " "; + } + if (i += e.messageText, n++, e.next) + for (const s of e.next) + i += gm(s, t, n); + return i; + } + function zA(e, t) { + return (Gi(e) ? t : e.resolutionMode) || t; + } + function Aie(e, t, n) { + return FW(e, qA(e, t), n); + } + function IW(e) { + var t; + return Ic(e) ? e.isTypeOnly : !!((t = e.importClause) != null && t.isTypeOnly); + } + function OW(e, t, n) { + return FW(e, t, n); + } + function FW(e, t, n) { + var i; + if ((oc(t.parent) || Ic(t.parent)) && IW(t.parent)) { + const c = ZC(t.parent.attributes); + if (c) + return c; + } + if (t.parent.parent && Qm(t.parent.parent)) { + const o = ZC(t.parent.parent.attributes); + if (o) + return o; + } + if (n && Nu(n) === 200) + return t.parent.parent && nl(t.parent.parent) || d_( + t.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) ? 1 : 99; + if (e.impliedNodeFormat === void 0) return; + if (e.impliedNodeFormat !== 99) + return hf(fh(t.parent)) ? 99 : 1; + const s = (i = fh(t.parent)) == null ? void 0 : i.parent; + return s && nl(s) ? 1 : 99; + } + function ZC(e, t) { + if (!e) return; + if (Dr(e.elements) !== 1) { + t?.( + e, + e.token === 118 ? p.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : p.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require + ); + return; + } + const n = e.elements[0]; + if (Ga(n.name)) { + if (n.name.text !== "resolution-mode") { + t?.( + n.name, + e.token === 118 ? p.resolution_mode_is_the_only_valid_key_for_type_import_attributes : p.resolution_mode_is_the_only_valid_key_for_type_import_assertions + ); + return; + } + if (Ga(n.value)) { + if (n.value.text !== "import" && n.value.text !== "require") { + t?.(n.value, p.resolution_mode_should_be_either_require_or_import); + return; + } + return n.value.text === "import" ? 99 : 1; + } + } + } + var wve = { + resolvedModule: void 0, + resolvedTypeReferenceDirective: void 0 + }; + function Nie(e) { + return e.text; + } + var LW = { + getName: Nie, + getMode: (e, t, n) => OW(t, e, n) + }; + function MW(e, t, n, i, s) { + return { + nameAndMode: LW, + resolve: (o, c) => Ax( + o, + e, + n, + i, + s, + t, + c + ) + }; + } + function RW(e) { + return Gi(e) ? e : e.fileName; + } + var ERe = { + getName: RW, + getMode: (e, t) => zA(e, t?.impliedNodeFormat) + }; + function sF(e, t, n, i, s) { + return { + nameAndMode: ERe, + resolve: (o, c) => Hre( + o, + e, + n, + i, + t, + s, + c + ) + }; + } + function WA(e, t, n, i, s, o, c, _) { + if (e.length === 0) return He; + const u = [], d = /* @__PURE__ */ new Map(), g = _(t, n, i, o, c); + for (const h of e) { + const S = g.nameAndMode.getName(h), T = g.nameAndMode.getMode(h, s, n?.commandLine.options || i), C = bD(S, T); + let D = d.get(C); + D || d.set(C, D = g.resolve(S, T)), u.push(D); + } + return u; + } + function jW(e, t) { + return aF( + /*projectReferences*/ + void 0, + e, + (n, i) => n && t(n, i) + ); + } + function aF(e, t, n, i) { + let s; + return o( + e, + t, + /*parent*/ + void 0 + ); + function o(c, _, u) { + if (i) { + const d = i(c, u); + if (d) return d; + } + return rr(_, (d, g) => { + if (d && s?.has(d.sourceFile.path)) + return; + const h = n(d, u, g); + return h || !d ? h : ((s || (s = /* @__PURE__ */ new Set())).add(d.sourceFile.path), o(d.commandLine.projectReferences, d.references, d)); + }); + } + } + var MD = "__inferred type names__.ts"; + function oF(e, t, n) { + const i = e.configFilePath ? Xn(e.configFilePath) : t; + return Mn(i, `__lib_node_modules_lookup_${n}__.ts`); + } + function BW(e) { + const t = e.split("."); + let n = t[1], i = 2; + for (; t[i] && t[i] !== "d"; ) + n += (i === 2 ? "/" : "-") + t[i], i++; + return "@typescript/lib-" + n; + } + function Ave(e) { + return sy(e.fileName); + } + function Nve(e) { + const t = Ave(e); + return fz.get(t); + } + function pv(e) { + switch (e?.kind) { + case 3: + case 4: + case 5: + case 7: + return !0; + default: + return !1; + } + } + function KC(e) { + return e.pos !== void 0; + } + function RD(e, t) { + var n, i, s, o; + const c = E.checkDefined(e.getSourceFileByPath(t.file)), { kind: _, index: u } = t; + let d, g, h; + switch (_) { + case 3: + const S = qA(c, u); + if (h = (i = (n = e.getResolvedModuleFromModuleSpecifier(S, c)) == null ? void 0 : n.resolvedModule) == null ? void 0 : i.packageId, S.pos === -1) return { file: c, packageId: h, text: S.text }; + d = sa(c.text, S.pos), g = S.end; + break; + case 4: + ({ pos: d, end: g } = c.referencedFiles[u]); + break; + case 5: + ({ pos: d, end: g } = c.typeReferenceDirectives[u]), h = (o = (s = e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(c.typeReferenceDirectives[u], c)) == null ? void 0 : s.resolvedTypeReferenceDirective) == null ? void 0 : o.packageId; + break; + case 7: + ({ pos: d, end: g } = c.libReferenceDirectives[u]); + break; + default: + return E.assertNever(_); + } + return { file: c, pos: d, end: g, packageId: h }; + } + function JW(e, t, n, i, s, o, c, _, u, d) { + if (!e || _?.() || !md(e.getRootFileNames(), t)) return !1; + let g; + if (!md(e.getProjectReferences(), d, D) || e.getSourceFiles().some(T)) return !1; + const h = e.getMissingFilePaths(); + if (h && Dl(h, s)) return !1; + const S = e.getCompilerOptions(); + if (!zB(S, n) || e.resolvedLibReferences && Dl(e.resolvedLibReferences, (O, j) => c(j))) return !1; + if (S.configFile && n.configFile) return S.configFile.text === n.configFile.text; + return !0; + function T(O) { + return !C(O) || o(O.path); + } + function C(O) { + return O.version === i(O.resolvedPath, O.fileName); + } + function D(O, j, F) { + return Aj(O, j) && P(e.getResolvedProjectReferences()[F], O); + } + function P(O, j) { + if (O) { + if (ls(g, O)) return !0; + const V = e6(j), L = u(V); + return !L || O.commandLine.options.configFile !== L.options.configFile || !md(O.commandLine.fileNames, L.fileNames) ? !1 : ((g || (g = [])).push(O), !rr(O.references, ($, U) => !P($, O.commandLine.projectReferences[U]))); + } + const F = e6(j); + return !u(F); + } + } + function Vb(e) { + return e.options.configFile ? [...e.options.configFile.parseDiagnostics, ...e.errors] : e.errors; + } + function VA(e, t, n, i) { + const s = cF(e, t, n, i); + return typeof s == "object" ? s.impliedNodeFormat : s; + } + function cF(e, t, n, i) { + switch (Hu(i)) { + case 3: + case 99: + return Lc(e, [ + ".d.mts", + ".mts", + ".mjs" + /* Mjs */ + ]) ? 99 : Lc(e, [ + ".d.cts", + ".cts", + ".cjs" + /* Cjs */ + ]) ? 1 : Lc(e, [ + ".d.ts", + ".ts", + ".tsx", + ".js", + ".jsx" + /* Jsx */ + ]) ? s() : void 0; + default: + return; + } + function s() { + const o = SD(t, n, i), c = []; + o.failedLookupLocations = c, o.affectingLocations = c; + const _ = TD(e, o); + return { impliedNodeFormat: _?.contents.packageJsonContent.type === "module" ? 99 : 1, packageJsonLocations: c, packageJsonScope: _ }; + } + } + var zW = /* @__PURE__ */ new Set([ + // binder errors + p.Cannot_redeclare_block_scoped_variable_0.code, + p.A_module_cannot_have_multiple_default_exports.code, + p.Another_export_default_is_here.code, + p.The_first_export_default_is_here.code, + p.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code, + p.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code, + p.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code, + p.constructor_is_a_reserved_word.code, + p.delete_cannot_be_called_on_an_identifier_in_strict_mode.code, + p.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code, + p.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code, + p.Invalid_use_of_0_in_strict_mode.code, + p.A_label_is_not_allowed_here.code, + p.with_statements_are_not_allowed_in_strict_mode.code, + // grammar errors + p.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code, + p.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code, + p.A_class_declaration_without_the_default_modifier_must_have_a_name.code, + p.A_class_member_cannot_have_the_0_keyword.code, + p.A_comma_expression_is_not_allowed_in_a_computed_property_name.code, + p.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code, + p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, + p.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, + p.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code, + p.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code, + p.A_definite_assignment_assertion_is_not_permitted_in_this_context.code, + p.A_destructuring_declaration_must_have_an_initializer.code, + p.A_get_accessor_cannot_have_parameters.code, + p.A_rest_element_cannot_contain_a_binding_pattern.code, + p.A_rest_element_cannot_have_a_property_name.code, + p.A_rest_element_cannot_have_an_initializer.code, + p.A_rest_element_must_be_last_in_a_destructuring_pattern.code, + p.A_rest_parameter_cannot_have_an_initializer.code, + p.A_rest_parameter_must_be_last_in_a_parameter_list.code, + p.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code, + p.A_return_statement_cannot_be_used_inside_a_class_static_block.code, + p.A_set_accessor_cannot_have_rest_parameter.code, + p.A_set_accessor_must_have_exactly_one_parameter.code, + p.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code, + p.An_export_declaration_cannot_have_modifiers.code, + p.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code, + p.An_import_declaration_cannot_have_modifiers.code, + p.An_object_member_cannot_be_declared_optional.code, + p.Argument_of_dynamic_import_cannot_be_spread_element.code, + p.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code, + p.Cannot_redeclare_identifier_0_in_catch_clause.code, + p.Catch_clause_variable_cannot_have_an_initializer.code, + p.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code, + p.Classes_can_only_extend_a_single_class.code, + p.Classes_may_not_have_a_field_named_constructor.code, + p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code, + p.Duplicate_label_0.code, + p.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, + p.for_await_loops_cannot_be_used_inside_a_class_static_block.code, + p.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, + p.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, + p.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, + p.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code, + p.Jump_target_cannot_cross_function_boundary.code, + p.Line_terminator_not_permitted_before_arrow.code, + p.Modifiers_cannot_appear_here.code, + p.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code, + p.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code, + p.Private_identifiers_are_not_allowed_outside_class_bodies.code, + p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, + p.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code, + p.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code, + p.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code, + p.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code, + p.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code, + p.Trailing_comma_not_allowed.code, + p.Variable_declaration_list_cannot_be_empty.code, + p._0_and_1_operations_cannot_be_mixed_without_parentheses.code, + p._0_expected.code, + p._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code, + p._0_list_cannot_be_empty.code, + p._0_modifier_already_seen.code, + p._0_modifier_cannot_appear_on_a_constructor_declaration.code, + p._0_modifier_cannot_appear_on_a_module_or_namespace_element.code, + p._0_modifier_cannot_appear_on_a_parameter.code, + p._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, + p._0_modifier_cannot_be_used_here.code, + p._0_modifier_must_precede_1_modifier.code, + p._0_declarations_can_only_be_declared_inside_a_block.code, + p._0_declarations_must_be_initialized.code, + p.extends_clause_already_seen.code, + p.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, + p.Class_constructor_may_not_be_a_generator.code, + p.Class_constructor_may_not_be_an_accessor.code, + p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.Private_field_0_must_be_declared_in_an_enclosing_class.code, + // Type errors + p.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code + ]); + function DRe(e, t) { + return e ? eC(e.getCompilerOptions(), t, mz) : !1; + } + function PRe(e, t, n, i, s, o) { + return { + rootNames: e, + options: t, + host: n, + oldProgram: i, + configFileParsingDiagnostics: s, + typeScriptVersion: o + }; + } + function UA(e, t, n, i, s) { + var o, c, _, u, d, g, h, S, T, C, D, P, O, j, F, V; + const L = ss(e) ? PRe(e, t, n, i, s) : e, { rootNames: $, options: U, configFileParsingDiagnostics: G, projectReferences: ce, typeScriptVersion: K } = L; + let { oldProgram: X } = L; + for (const Oe of xre) + if (io(U, Oe.name) && typeof U[Oe.name] == "string") + throw new Error(`${Oe.name} is a string value; tsconfig JSON must be parsed with parseJsonSourceFileConfigFileContent or getParsedCommandLineOfConfigFile before passing to createProgram`); + const Z = Wu(() => t_("ignoreDeprecations", p.Invalid_value_for_ignoreDeprecations)); + let oe, ne, pe, fe, H, ae, le; + const Ae = /* @__PURE__ */ new Map(); + let ge = Kf(), de, ve, De; + const Xe = {}, Ie = {}; + let ye, Fe, Qe, Ke, Be, at, Wt, nr, Kt, Pr; + const Vt = typeof U.maxNodeModuleJsDepth == "number" ? U.maxNodeModuleJsDepth : 0; + let zt = 0; + const jr = /* @__PURE__ */ new Map(), ci = /* @__PURE__ */ new Map(); + (o = rn) == null || o.push( + rn.Phase.Program, + "createProgram", + { configFilePath: U.configFilePath, rootDir: U.rootDir }, + /*separateBeginAndEnd*/ + !0 + ), Yo("beforeProgram"); + const Xt = L.host || Cie(U), Ai = uF(Xt); + let _s = U.noLib; + const $n = Wu(() => Xt.getDefaultLibFileName(U)), os = Xt.getDefaultLibLocation ? Xt.getDefaultLibLocation() : Xn($n()), wr = b4(); + let Ss = []; + const Le = Xt.getCurrentDirectory(), At = L4(U), vr = J3(U, At), ln = /* @__PURE__ */ new Map(); + let Zn, ri, mi, Ps; + const ws = Xt.hasInvalidatedResolutions || $d; + Xt.resolveModuleNameLiterals ? (Ps = Xt.resolveModuleNameLiterals.bind(Xt), mi = (c = Xt.getModuleResolutionCache) == null ? void 0 : c.call(Xt)) : Xt.resolveModuleNames ? (Ps = (Oe, Ue, Tt, Lt, lr, Gr) => Xt.resolveModuleNames( + Oe.map(Nie), + Ue, + Gr?.map(Nie), + Tt, + Lt, + lr + ).map( + (_r) => _r ? _r.extension !== void 0 ? { resolvedModule: _r } : ( + // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. + { resolvedModule: { ..._r, extension: R4(_r.resolvedFileName) } } + ) : wve + ), mi = (_ = Xt.getModuleResolutionCache) == null ? void 0 : _.call(Xt)) : (mi = qC(Le, Cn, U), Ps = (Oe, Ue, Tt, Lt, lr) => WA( + Oe, + Ue, + Tt, + Lt, + lr, + Xt, + mi, + MW + )); + let Yt; + if (Xt.resolveTypeReferenceDirectiveReferences) + Yt = Xt.resolveTypeReferenceDirectiveReferences.bind(Xt); + else if (Xt.resolveTypeReferenceDirectives) + Yt = (Oe, Ue, Tt, Lt, lr) => Xt.resolveTypeReferenceDirectives( + Oe.map(RW), + Ue, + Tt, + Lt, + lr?.impliedNodeFormat + ).map((Gr) => ({ resolvedTypeReferenceDirective: Gr })); + else { + const Oe = NO( + Le, + Cn, + /*options*/ + void 0, + mi?.getPackageJsonInfoCache(), + mi?.optionsToRedirectsKey + ); + Yt = (Ue, Tt, Lt, lr, Gr) => WA( + Ue, + Tt, + Lt, + lr, + Gr, + Xt, + Oe, + sF + ); + } + const Ca = Xt.hasInvalidatedLibResolutions || $d; + let $e; + if (Xt.resolveLibrary) + $e = Xt.resolveLibrary.bind(Xt); + else { + const Oe = qC(Le, Cn, U, mi?.getPackageJsonInfoCache()); + $e = (Ue, Tt, Lt) => IO(Ue, Tt, Lt, Xt, Oe); + } + const nt = /* @__PURE__ */ new Map(); + let te = /* @__PURE__ */ new Map(), rt = Kf(), re = !1; + const Ee = /* @__PURE__ */ new Map(); + let Ne = /* @__PURE__ */ new Map(); + const et = Xt.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0; + let lt, jt, be, ft; + const bt = !!((u = Xt.useSourceOfProjectReferenceRedirect) != null && u.call(Xt)) && !U.disableSourceOfProjectReferenceRedirect, { onProgramCreateComplete: kt, fileExists: yt, directoryExists: Ut } = wRe({ + compilerHost: Xt, + getSymlinkCache: wh, + useSourceOfProjectReferenceRedirect: bt, + toPath: qt, + getResolvedProjectReferences: wl, + getSourceOfProjectReferenceRedirect: ng, + forEachResolvedProjectReference: Gc + }), W = Xt.readFile.bind(Xt); + (d = rn) == null || d.push(rn.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!X }); + const je = DRe(X, U); + (g = rn) == null || g.pop(); + let st; + if ((h = rn) == null || h.push(rn.Phase.Program, "tryReuseStructureFromOldProgram", {}), st = ga(), (S = rn) == null || S.pop(), st !== 2) { + if (oe = [], ne = [], ce && (lt || (lt = ce.map(ke)), $.length && lt?.forEach((Oe, Ue) => { + if (!Oe) return; + const Tt = Oe.commandLine.options.outFile; + if (bt) { + if (Tt || Nu(Oe.commandLine.options) === 0) + for (const Lt of Oe.commandLine.fileNames) + Do(Lt, { kind: 1, index: Ue }); + } else if (Tt) + Do(by(Tt, ".d.ts"), { kind: 2, index: Ue }); + else if (Nu(Oe.commandLine.options) === 0) { + const Lt = Wu(() => Ox(Oe.commandLine, !Xt.useCaseSensitiveFileNames())); + for (const lr of Oe.commandLine.fileNames) + !Ol(lr) && !Go( + lr, + ".json" + /* Json */ + ) && Do(YC(lr, Oe.commandLine, !Xt.useCaseSensitiveFileNames(), Lt), { kind: 2, index: Ue }); + } + })), (T = rn) == null || T.push(rn.Phase.Program, "processRootFiles", { count: $.length }), rr($, (Oe, Ue) => F_( + Oe, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + { kind: 0, index: Ue } + )), (C = rn) == null || C.pop(), Fe ?? (Fe = $.length ? wO(U, Xt) : He), Qe = UC(), Fe.length) { + (D = rn) == null || D.push(rn.Phase.Program, "processTypeReferences", { count: Fe.length }); + const Oe = U.configFilePath ? Xn(U.configFilePath) : Le, Ue = Mn(Oe, MD), Tt = Vo(Fe, Ue); + for (let Lt = 0; Lt < Fe.length; Lt++) + Qe.set( + Fe[Lt], + /*mode*/ + void 0, + Tt[Lt] + ), tt( + Fe[Lt], + /*mode*/ + void 0, + Tt[Lt], + { + kind: 8, + typeReference: Fe[Lt], + packageId: (O = (P = Tt[Lt]) == null ? void 0 : P.resolvedTypeReferenceDirective) == null ? void 0 : O.packageId + } + ); + (j = rn) == null || j.pop(); + } + if ($.length && !_s) { + const Oe = $n(); + !U.lib && Oe ? F_( + Oe, + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !1, + { + kind: 6 + /* LibFile */ + } + ) : rr(U.lib, (Ue, Tt) => { + F_( + It(Ue), + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !1, + { kind: 6, index: Tt } + ); + }); + } + pe = Sg(oe, Or).concat(ne), oe = void 0, ne = void 0, de = void 0; + } + if (X && Xt.onReleaseOldSourceFile) { + const Oe = X.getSourceFiles(); + for (const Ue of Oe) { + const Tt = Bt(Ue.resolvedPath); + (je || !Tt || Tt.impliedNodeFormat !== Ue.impliedNodeFormat || // old file wasn't redirect but new file is + Ue.resolvedPath === Ue.path && Tt.resolvedPath !== Ue.path) && Xt.onReleaseOldSourceFile(Ue, X.getCompilerOptions(), !!Bt(Ue.path)); + } + Xt.getParsedCommandLine || X.forEachResolvedProjectReference((Ue) => { + bm(Ue.sourceFile.path) || Xt.onReleaseOldSourceFile( + Ue.sourceFile, + X.getCompilerOptions(), + /*hasSourceFileByPath*/ + !1 + ); + }); + } + X && Xt.onReleaseParsedCommandLine && aF( + X.getProjectReferences(), + X.getResolvedProjectReferences(), + (Oe, Ue, Tt) => { + const Lt = Ue?.commandLine.projectReferences[Tt] || X.getProjectReferences()[Tt], lr = e6(Lt); + jt?.has(qt(lr)) || Xt.onReleaseParsedCommandLine(lr, Oe, X.getCompilerOptions()); + } + ), X = void 0, Be = void 0, Wt = void 0, Kt = void 0; + const z = { + getRootFileNames: () => $, + getSourceFile: Fa, + getSourceFileByPath: Bt, + getSourceFiles: () => pe, + getMissingFilePaths: () => Ne, + getModuleResolutionCache: () => mi, + getFilesByNameMap: () => Ee, + getCompilerOptions: () => U, + getSyntacticDiagnostics: Fu, + getOptionsDiagnostics: Eo, + getGlobalDiagnostics: Cl, + getSemanticDiagnostics: Lu, + getCachedSemanticDiagnostics: y_, + getSuggestionDiagnostics: li, + getDeclarationDiagnostics: A, + getBindAndCheckDiagnostics: Ao, + getProgramDiagnostics: Uo, + getTypeChecker: ql, + getClassifiableNames: $a, + getCommonSourceDirectory: ma, + emit: ea, + getCurrentDirectory: () => Le, + getNodeCount: () => ql().getNodeCount(), + getIdentifierCount: () => ql().getIdentifierCount(), + getSymbolCount: () => ql().getSymbolCount(), + getTypeCount: () => ql().getTypeCount(), + getInstantiationCount: () => ql().getInstantiationCount(), + getRelationCacheSizes: () => ql().getRelationCacheSizes(), + getFileProcessingDiagnostics: () => ye, + getAutomaticTypeDirectiveNames: () => Fe, + getAutomaticTypeDirectiveResolutions: () => Qe, + isSourceFileFromExternalLibrary: Su, + isSourceFileDefaultLibrary: fc, + getModeForUsageLocation: Sf, + getModeForResolutionAtIndex: sg, + getSourceFileFromReference: ha, + getLibFileFromReference: Vi, + sourceFileToPackageName: te, + redirectTargetsMap: rt, + usesUriStyleNodeCoreModules: re, + resolvedModules: at, + resolvedTypeReferenceDirectiveNames: nr, + resolvedLibReferences: Ke, + getResolvedModule: we, + getResolvedModuleFromModuleSpecifier: _e, + getResolvedTypeReferenceDirective: Te, + getResolvedTypeReferenceDirectiveFromTypeReferenceDirective: dt, + forEachResolvedModule: xt, + forEachResolvedTypeReferenceDirective: wt, + getCurrentPackagesMap: () => Pr, + typesPackageExists: Lr, + packageBundlesTypes: en, + isEmittedFile: nd, + getConfigFileParsingDiagnostics: kc, + getProjectReferences: jo, + getResolvedProjectReferences: wl, + getProjectReferenceRedirect: Wf, + getResolvedProjectReferenceToRedirect: b_, + getResolvedProjectReferenceByPath: bm, + forEachResolvedProjectReference: Gc, + isSourceOfProjectReferenceRedirect: L_, + getRedirectReferenceForResolutionFromSourceOfProject: Mr, + emitBuildInfo: bi, + fileExists: yt, + readFile: W, + directoryExists: Ut, + getSymlinkCache: wh, + realpath: (F = Xt.realpath) == null ? void 0 : F.bind(Xt), + useCaseSensitiveFileNames: () => Xt.useCaseSensitiveFileNames(), + getCanonicalFileName: Cn, + getFileIncludeReasons: () => ge, + structureIsReused: st, + writeFile: Li + }; + return kt(), vt(), Yo("afterProgram"), ep("Program", "beforeProgram", "afterProgram"), (V = rn) == null || V.pop(), z; + function he() { + return Ss && (ye?.forEach((Oe) => { + switch (Oe.kind) { + case 1: + return wr.add( + ys( + Oe.file && Bt(Oe.file), + Oe.fileProcessingReason, + Oe.diagnostic, + Oe.args || He + ) + ); + case 0: + return wr.add(q(Oe)); + case 2: + return Oe.diagnostics.forEach((Ue) => wr.add(Ue)); + default: + E.assertNever(Oe); + } + }), Ss.forEach( + ({ file: Oe, diagnostic: Ue, args: Tt }) => wr.add( + ys( + Oe, + /*fileProcessingReason*/ + void 0, + Ue, + Tt + ) + ) + ), Ss = void 0, ve = void 0, De = void 0), wr; + } + function q({ reason: Oe }) { + const { file: Ue, pos: Tt, end: Lt } = RD(z, Oe), lr = Ue.libReferenceDirectives[Oe.index], Gr = Ave(lr), _r = Jk(kE(Gr, "lib."), ".d.ts"), _n = F2(_r, pO, lo); + return xl( + Ue, + E.checkDefined(Tt), + E.checkDefined(Lt) - Tt, + _n ? p.Cannot_find_lib_definition_for_0_Did_you_mean_1 : p.Cannot_find_lib_definition_for_0, + Gr, + _n + ); + } + function we(Oe, Ue, Tt) { + var Lt; + return (Lt = at?.get(Oe.path)) == null ? void 0 : Lt.get(Ue, Tt); + } + function _e(Oe, Ue) { + return Ue ?? (Ue = xr(Oe)), E.assertIsDefined(Ue, "`moduleSpecifier` must have a `SourceFile` ancestor. Use `program.getResolvedModule` instead to provide the containing file and resolution mode."), we(Ue, Oe.text, Sf(Ue, Oe)); + } + function Te(Oe, Ue, Tt) { + var Lt; + return (Lt = nr?.get(Oe.path)) == null ? void 0 : Lt.get(Ue, Tt); + } + function dt(Oe, Ue) { + return Te(Ue, Oe.fileName, Oe.resolutionMode || Ue.impliedNodeFormat); + } + function xt(Oe, Ue) { + ir(at, Oe, Ue); + } + function wt(Oe, Ue) { + ir(nr, Oe, Ue); + } + function ir(Oe, Ue, Tt) { + var Lt; + Tt ? (Lt = Oe?.get(Tt.path)) == null || Lt.forEach((lr, Gr, _r) => Ue(lr, Gr, _r, Tt.path)) : Oe?.forEach((lr, Gr) => lr.forEach((_r, _n, gi) => Ue(_r, _n, gi, Gr))); + } + function br() { + return Pr || (Pr = /* @__PURE__ */ new Map(), xt(({ resolvedModule: Oe }) => { + Oe?.packageId && Pr.set(Oe.packageId.name, Oe.extension === ".d.ts" || !!Pr.get(Oe.packageId.name)); + }), Pr); + } + function Lr(Oe) { + return br().has(MO(Oe)); + } + function en(Oe) { + return !!br().get(Oe); + } + function fr(Oe) { + var Ue; + (Ue = Oe.resolutionDiagnostics) != null && Ue.length && (ye ?? (ye = [])).push({ + kind: 2, + diagnostics: Oe.resolutionDiagnostics + }); + } + function mn(Oe, Ue, Tt, Lt) { + if (Xt.resolveModuleNameLiterals || !Xt.resolveModuleNames) return fr(Tt); + if (!mi || Sl(Ue)) return; + const lr = Xi(Oe.originalFileName, Le), Gr = Xn(lr), _r = ur(Oe), _n = mi.getFromNonRelativeNameCache(Ue, Lt, Gr, _r); + _n && fr(_n); + } + function Di(Oe, Ue, Tt) { + var Lt, lr; + if (!Oe.length) return He; + const Gr = Xi(Ue.originalFileName, Le), _r = ur(Ue); + (Lt = rn) == null || Lt.push(rn.Phase.Program, "resolveModuleNamesWorker", { containingFileName: Gr }), Yo("beforeResolveModule"); + const _n = Ps(Oe, Gr, _r, U, Ue, Tt); + return Yo("afterResolveModule"), ep("ResolveModule", "beforeResolveModule", "afterResolveModule"), (lr = rn) == null || lr.pop(), _n; + } + function Fi(Oe, Ue, Tt) { + var Lt, lr; + if (!Oe.length) return []; + const Gr = Gi(Ue) ? void 0 : Ue, _r = Gi(Ue) ? Ue : Xi(Ue.originalFileName, Le), _n = Gr && ur(Gr); + (Lt = rn) == null || Lt.push(rn.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName: _r }), Yo("beforeResolveTypeReference"); + const gi = Yt(Oe, _r, _n, U, Gr, Tt); + return Yo("afterResolveTypeReference"), ep("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"), (lr = rn) == null || lr.pop(), gi; + } + function ur(Oe) { + const Ue = b_(Oe.originalFileName); + if (Ue || !Ol(Oe.originalFileName)) return Ue; + const Tt = Mr(Oe.path); + if (Tt) return Tt; + if (!Xt.realpath || !U.preserveSymlinks || !Oe.originalFileName.includes(zg)) return; + const Lt = qt(Xt.realpath(Oe.originalFileName)); + return Lt === Oe.path ? void 0 : Mr(Lt); + } + function Mr(Oe) { + const Ue = ng(Oe); + if (Gi(Ue)) return b_(Ue); + if (Ue) + return Gc((Tt) => { + const Lt = Tt.commandLine.options.outFile; + if (Lt) + return qt(Lt) === Oe ? Tt : void 0; + }); + } + function Or(Oe, Ue) { + return uo(tn(Oe), tn(Ue)); + } + function tn(Oe) { + if (Gp( + os, + Oe.fileName, + /*ignoreCase*/ + !1 + )) { + const Ue = Wc(Oe.fileName); + if (Ue === "lib.d.ts" || Ue === "lib.es6.d.ts") return 0; + const Tt = Jk(kE(Ue, "lib."), ".d.ts"), Lt = pO.indexOf(Tt); + if (Lt !== -1) return Lt + 1; + } + return pO.length + 2; + } + function qt(Oe) { + return _o(Oe, Le, Cn); + } + function ma() { + if (H === void 0) { + const Oe = Ln(pe, (Ue) => Z2(Ue, z)); + H = FD( + U, + () => Ii(Oe, (Ue) => Ue.isDeclarationFile ? void 0 : Ue.fileName), + Le, + Cn, + (Ue) => M(Oe, Ue) + ); + } + return H; + } + function $a() { + var Oe; + if (!le) { + ql(), le = /* @__PURE__ */ new Set(); + for (const Ue of pe) + (Oe = Ue.classifiableNames) == null || Oe.forEach((Tt) => le.add(Tt)); + } + return le; + } + function Ro(Oe, Ue) { + if (st === 0 && !Ue.ambientModuleNames.length) + return Di( + Oe, + Ue, + /*reusedNames*/ + void 0 + ); + let Tt, Lt, lr; + const Gr = wve, _r = X && X.getSourceFile(Ue.fileName); + for (let ii = 0; ii < Oe.length; ii++) { + const Vr = Oe[ii]; + if (Ue === _r && !ws(Ue.path)) { + const ca = X?.getResolvedModule(Ue, Vr.text, Sf(Ue, Vr)); + if (ca?.resolvedModule) { + kh(U, Xt) && Wi( + Xt, + ca.resolvedModule.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2, + Vr.text, + Xi(Ue.originalFileName, Le), + ca.resolvedModule.resolvedFileName, + ca.resolvedModule.packageId && py(ca.resolvedModule.packageId) + ), (Lt ?? (Lt = new Array(Oe.length)))[ii] = ca, (lr ?? (lr = [])).push(Vr); + continue; + } + } + let Yi = !1; + ls(Ue.ambientModuleNames, Vr.text) ? (Yi = !0, kh(U, Xt) && Wi(Xt, p.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, Vr.text, Xi(Ue.originalFileName, Le))) : Yi = nn(Vr), Yi ? (Lt || (Lt = new Array(Oe.length)))[ii] = Gr : (Tt ?? (Tt = [])).push(Vr); + } + const _n = Tt && Tt.length ? Di(Tt, Ue, lr) : He; + if (!Lt) + return E.assert(_n.length === Oe.length), _n; + let gi = 0; + for (let ii = 0; ii < Lt.length; ii++) + Lt[ii] || (Lt[ii] = _n[gi], gi++); + return E.assert(gi === _n.length), Lt; + function nn(ii) { + var Vr; + const Yi = (Vr = X?.getResolvedModule(Ue, ii.text, Sf(Ue, ii))) == null ? void 0 : Vr.resolvedModule, ca = Yi && X.getSourceFile(Yi.resolvedFileName); + if (Yi && ca) + return !1; + const El = Ae.get(ii.text); + return El ? (kh(U, Xt) && Wi(Xt, p.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, ii.text, El), !0) : !1; + } + } + function Vo(Oe, Ue) { + var Tt; + if (st === 0) + return Fi( + Oe, + Ue, + /*reusedNames*/ + void 0 + ); + let Lt, lr, Gr; + const _r = Gi(Ue) ? void 0 : Ue, _n = Gi(Ue) ? void 0 : X && X.getSourceFile(Ue.fileName), gi = Gi(Ue) ? !ws(qt(Ue)) : Ue === _n && !ws(Ue.path); + for (let Vr = 0; Vr < Oe.length; Vr++) { + const Yi = Oe[Vr]; + if (gi) { + const ca = RW(Yi), El = zA(Yi, _r?.impliedNodeFormat), Tu = Gi(Ue) ? (Tt = X?.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : Tt.get(ca, El) : X?.getResolvedTypeReferenceDirective(Ue, ca, El); + if (Tu?.resolvedTypeReferenceDirective) { + kh(U, Xt) && Wi( + Xt, + Tu.resolvedTypeReferenceDirective.packageId ? p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2, + ca, + Gi(Ue) ? Ue : Xi(Ue.originalFileName, Le), + Tu.resolvedTypeReferenceDirective.resolvedFileName, + Tu.resolvedTypeReferenceDirective.packageId && py(Tu.resolvedTypeReferenceDirective.packageId) + ), (lr ?? (lr = new Array(Oe.length)))[Vr] = Tu, (Gr ?? (Gr = [])).push(Yi); + continue; + } + } + (Lt ?? (Lt = [])).push(Yi); + } + if (!Lt) return lr || He; + const nn = Fi( + Lt, + Ue, + Gr + ); + if (!lr) + return E.assert(nn.length === Oe.length), nn; + let ii = 0; + for (let Vr = 0; Vr < lr.length; Vr++) + lr[Vr] || (lr[Vr] = nn[ii], ii++); + return E.assert(ii === nn.length), lr; + } + function hs() { + return !aF( + X.getProjectReferences(), + X.getResolvedProjectReferences(), + (Oe, Ue, Tt) => { + const Lt = (Ue ? Ue.commandLine.projectReferences : ce)[Tt], lr = ke(Lt); + return Oe ? !lr || lr.sourceFile !== Oe.sourceFile || !md(Oe.commandLine.fileNames, lr.commandLine.fileNames) : lr !== void 0; + }, + (Oe, Ue) => { + const Tt = Ue ? bm(Ue.sourceFile.path).commandLine.projectReferences : ce; + return !md(Oe, Tt, Aj); + } + ); + } + function ga() { + var Oe; + if (!X) + return 0; + const Ue = X.getCompilerOptions(); + if (ZI(Ue, U)) + return 0; + const Tt = X.getRootFileNames(); + if (!md(Tt, $) || !hs()) + return 0; + ce && (lt = ce.map(ke)); + const Lt = [], lr = []; + if (st = 2, Dl(X.getMissingFilePaths(), (nn) => Xt.fileExists(nn))) + return 0; + const Gr = X.getSourceFiles(); + let _r; + ((nn) => { + nn[nn.Exists = 0] = "Exists", nn[nn.Modified = 1] = "Modified"; + })(_r || (_r = {})); + const _n = /* @__PURE__ */ new Map(); + for (const nn of Gr) { + const ii = bf(nn.fileName, mi, Xt, U); + let Vr = Xt.getSourceFileByPath ? Xt.getSourceFileByPath( + nn.fileName, + nn.resolvedPath, + ii, + /*onError*/ + void 0, + je + ) : Xt.getSourceFile( + nn.fileName, + ii, + /*onError*/ + void 0, + je + ); + if (!Vr) + return 0; + Vr.packageJsonLocations = (Oe = ii.packageJsonLocations) != null && Oe.length ? ii.packageJsonLocations : void 0, Vr.packageJsonScope = ii.packageJsonScope, E.assert(!Vr.redirectInfo, "Host should not return a redirect source file from `getSourceFile`"); + let Yi; + if (nn.redirectInfo) { + if (Vr !== nn.redirectInfo.unredirected) + return 0; + Yi = !1, Vr = nn; + } else if (X.redirectTargetsMap.has(nn.path)) { + if (Vr !== nn) + return 0; + Yi = !1; + } else + Yi = Vr !== nn; + Vr.path = nn.path, Vr.originalFileName = nn.originalFileName, Vr.resolvedPath = nn.resolvedPath, Vr.fileName = nn.fileName; + const ca = X.sourceFileToPackageName.get(nn.path); + if (ca !== void 0) { + const El = _n.get(ca), Tu = Yi ? 1 : 0; + if (El !== void 0 && Tu === 1 || El === 1) + return 0; + _n.set(ca, Tu); + } + if (Yi) + nn.impliedNodeFormat !== Vr.impliedNodeFormat ? st = 1 : md(nn.libReferenceDirectives, Vr.libReferenceDirectives, Jf) ? nn.hasNoDefaultLib !== Vr.hasNoDefaultLib ? st = 1 : md(nn.referencedFiles, Vr.referencedFiles, Jf) ? (Jr(Vr), md(nn.imports, Vr.imports, Pe) && md(nn.moduleAugmentations, Vr.moduleAugmentations, Pe) ? (nn.flags & 12582912) !== (Vr.flags & 12582912) ? st = 1 : md(nn.typeReferenceDirectives, Vr.typeReferenceDirectives, Jf) || (st = 1) : st = 1) : st = 1 : st = 1, lr.push(Vr); + else if (ws(nn.path)) + st = 1, lr.push(Vr); + else + for (const El of nn.ambientModuleNames) + Ae.set(El, nn.fileName); + Lt.push(Vr); + } + if (st !== 2) + return st; + for (const nn of lr) { + const ii = Ive(nn), Vr = Ro(ii, nn); + (Wt ?? (Wt = /* @__PURE__ */ new Map())).set(nn.path, Vr), Nj( + ii, + Vr, + (mp) => X.getResolvedModule(nn, mp.text, Sf(nn, mp)), + aZ + ) && (st = 1); + const ca = nn.typeReferenceDirectives, El = Vo(ca, nn); + (Kt ?? (Kt = /* @__PURE__ */ new Map())).set(nn.path, El), Nj( + ca, + El, + (mp) => X.getResolvedTypeReferenceDirective(nn, RW(mp), zA(mp, nn.impliedNodeFormat)), + oZ + ) && (st = 1); + } + if (st !== 2) + return st; + if (iZ(Ue, U) || X.resolvedLibReferences && Dl(X.resolvedLibReferences, (nn, ii) => hr(ii).actual !== nn.actual)) + return 1; + if (Xt.hasChangedAutomaticTypeDirectiveNames) { + if (Xt.hasChangedAutomaticTypeDirectiveNames()) return 1; + } else if (Fe = wO(U, Xt), !md(X.getAutomaticTypeDirectiveNames(), Fe)) return 1; + Ne = X.getMissingFilePaths(), E.assert(Lt.length === X.getSourceFiles().length); + for (const nn of Lt) + Ee.set(nn.path, nn); + return X.getFilesByNameMap().forEach((nn, ii) => { + if (!nn) { + Ee.set(ii, nn); + return; + } + if (nn.path === ii) { + X.isSourceFileFromExternalLibrary(nn) && ci.set(nn.path, !0); + return; + } + Ee.set(ii, Ee.get(nn.path)); + }), pe = Lt, ge = X.getFileIncludeReasons(), ye = X.getFileProcessingDiagnostics(), Fe = X.getAutomaticTypeDirectiveNames(), Qe = X.getAutomaticTypeDirectiveResolutions(), te = X.sourceFileToPackageName, rt = X.redirectTargetsMap, re = X.usesUriStyleNodeCoreModules, at = X.resolvedModules, nr = X.resolvedTypeReferenceDirectiveNames, Ke = X.resolvedLibReferences, Pr = X.getCurrentPackagesMap(), 2; + } + function Co(Oe) { + return { + getCanonicalFileName: Cn, + getCommonSourceDirectory: z.getCommonSourceDirectory, + getCompilerOptions: z.getCompilerOptions, + getCurrentDirectory: () => Le, + getSourceFile: z.getSourceFile, + getSourceFileByPath: z.getSourceFileByPath, + getSourceFiles: z.getSourceFiles, + isSourceFileFromExternalLibrary: Su, + getResolvedProjectReferenceToRedirect: b_, + getProjectReferenceRedirect: Wf, + isSourceOfProjectReferenceRedirect: L_, + getSymlinkCache: wh, + writeFile: Oe || Li, + isEmitBlocked: wo, + readFile: (Ue) => Xt.readFile(Ue), + fileExists: (Ue) => { + const Tt = qt(Ue); + return Bt(Tt) ? !0 : Ne.has(Tt) ? !1 : Xt.fileExists(Ue); + }, + realpath: Ns(Xt, Xt.realpath), + useCaseSensitiveFileNames: () => Xt.useCaseSensitiveFileNames(), + getBuildInfo: () => { + var Ue; + return (Ue = z.getBuildInfo) == null ? void 0 : Ue.call(z); + }, + getSourceFileFromReference: (Ue, Tt) => z.getSourceFileFromReference(Ue, Tt), + redirectTargetsMap: rt, + getFileIncludeReasons: z.getFileIncludeReasons, + createHash: Ns(Xt, Xt.createHash), + getModuleResolutionCache: () => z.getModuleResolutionCache(), + trace: Ns(Xt, Xt.trace) + }; + } + function Li(Oe, Ue, Tt, Lt, lr, Gr) { + Xt.writeFile(Oe, Ue, Tt, Lt, lr, Gr); + } + function bi(Oe) { + var Ue, Tt; + E.assert(!U.outFile), (Ue = rn) == null || Ue.push( + rn.Phase.Emit, + "emitBuildInfo", + {}, + /*separateBeginAndEnd*/ + !0 + ), Yo("beforeEmit"); + const Lt = SW( + yie, + Co(Oe), + /*targetSourceFile*/ + void 0, + /*transformers*/ + die, + /*emitOnly*/ + !1, + /*onlyBuildInfo*/ + !0 + ); + return Yo("afterEmit"), ep("Emit", "beforeEmit", "afterEmit"), (Tt = rn) == null || Tt.pop(), Lt; + } + function wl() { + return lt; + } + function jo() { + return ce; + } + function Su(Oe) { + return !!ci.get(Oe.path); + } + function fc(Oe) { + if (!Oe.isDeclarationFile) + return !1; + if (Oe.hasNoDefaultLib) + return !0; + if (!U.noLib) + return !1; + const Ue = Xt.useCaseSensitiveFileNames() ? O2 : N1; + return U.lib ? ut(U.lib, (Tt) => Ue(Oe.fileName, Ke.get(Tt).actual)) : Ue(Oe.fileName, $n()); + } + function ql() { + return ae || (ae = vne(z)); + } + function ea(Oe, Ue, Tt, Lt, lr, Gr) { + var _r, _n; + (_r = rn) == null || _r.push( + rn.Phase.Emit, + "emit", + { path: Oe?.path }, + /*separateBeginAndEnd*/ + !0 + ); + const gi = it(() => Ka(z, Oe, Ue, Tt, Lt, lr, Gr)); + return (_n = rn) == null || _n.pop(), gi; + } + function wo(Oe) { + return ln.has(qt(Oe)); + } + function Ka(Oe, Ue, Tt, Lt, lr, Gr, _r) { + if (!_r) { + const ii = VW(Oe, Ue, Tt, Lt); + if (ii) return ii; + } + const _n = ql(), gi = _n.getEmitResolver( + U.outFile ? void 0 : Ue, + Lt, + bW(lr, _r) + ); + Yo("beforeEmit"); + const nn = _n.runWithCancellationToken( + Lt, + () => SW( + gi, + Co(Tt), + Ue, + mie(U, Gr, lr), + lr, + /*onlyBuildInfo*/ + !1, + _r + ) + ); + return Yo("afterEmit"), ep("Emit", "beforeEmit", "afterEmit"), nn; + } + function Fa(Oe) { + return Bt(qt(Oe)); + } + function Bt(Oe) { + return Ee.get(Oe) || void 0; + } + function lc(Oe, Ue, Tt) { + return qk(Oe ? Ue(Oe, Tt) : Xs(z.getSourceFiles(), (Lt) => (Tt && Tt.throwIfCancellationRequested(), Ue(Lt, Tt)))); + } + function Fu(Oe, Ue) { + return lc(Oe, Me, Ue); + } + function Lu(Oe, Ue) { + return lc(Oe, Ot, Ue); + } + function y_(Oe) { + var Ue; + return Oe ? (Ue = Xe.perFile) == null ? void 0 : Ue.get(Oe.path) : Xe.allDiagnostics; + } + function Ao(Oe, Ue) { + return kr(Oe, Ue); + } + function Uo(Oe) { + var Ue; + if (B4(Oe, U, z)) + return He; + const Tt = he().getDiagnostics(Oe.fileName); + return (Ue = Oe.commentDirectives) != null && Ue.length ? yn(Oe, Oe.commentDirectives, Tt).diagnostics : Tt; + } + function A(Oe, Ue) { + const Tt = z.getCompilerOptions(); + return !Oe || Tt.outFile ? qo(Oe, Ue) : lc(Oe, cl, Ue); + } + function Me(Oe) { + return p_(Oe) ? (Oe.additionalSyntacticDiagnostics || (Oe.additionalSyntacticDiagnostics = eo(Oe)), Hi(Oe.additionalSyntacticDiagnostics, Oe.parseDiagnostics)) : Oe.parseDiagnostics; + } + function it(Oe) { + try { + return Oe(); + } catch (Ue) { + throw Ue instanceof AE && (ae = void 0), Ue; + } + } + function Ot(Oe, Ue) { + return Hi( + lF(kr(Oe, Ue), U), + Uo(Oe) + ); + } + function kr(Oe, Ue) { + return vo(Oe, Ue, Xe, qn); + } + function qn(Oe, Ue) { + return it(() => { + if (B4(Oe, U, z)) + return He; + const Tt = ql(); + E.assert(!!Oe.bindDiagnostics); + const lr = (Oe.scriptKind === 1 || Oe.scriptKind === 2) && j4(Oe, U), Gr = t4(Oe, U.checkJs); + let _r = Oe.bindDiagnostics, _n = Tt.getDiagnostics(Oe, Ue); + return Gr && (_r = Ln(_r, (gi) => zW.has(gi.code)), _n = Ln(_n, (gi) => zW.has(gi.code))), Ht(Oe, !Gr, _r, _n, lr ? Oe.jsDocDiagnostics : void 0); + }); + } + function Ht(Oe, Ue, ...Tt) { + var Lt; + const lr = Ep(Tt); + if (!Ue || !((Lt = Oe.commentDirectives) != null && Lt.length)) + return lr; + const { diagnostics: Gr, directives: _r } = yn(Oe, Oe.commentDirectives, lr); + for (const _n of _r.getUnusedExpectations()) + Gr.push(kZ(Oe, _n.range, p.Unused_ts_expect_error_directive)); + return Gr; + } + function yn(Oe, Ue, Tt) { + const Lt = uZ(Oe, Ue); + return { diagnostics: Tt.filter((Gr) => _i(Gr, Lt) === -1), directives: Lt }; + } + function li(Oe, Ue) { + return it(() => ql().getSuggestionDiagnostics(Oe, Ue)); + } + function _i(Oe, Ue) { + const { file: Tt, start: Lt } = Oe; + if (!Tt) + return -1; + const lr = Tg(Tt); + let Gr = Vk(lr, Lt).line - 1; + for (; Gr >= 0; ) { + if (Ue.markUsed(Gr)) + return Gr; + const _r = Tt.text.slice(lr[Gr], lr[Gr + 1]).trim(); + if (_r !== "" && !/^(\s*)\/\/(.*)$/.test(_r)) + return -1; + Gr--; + } + return -1; + } + function eo(Oe) { + return it(() => { + const Ue = []; + return Tt(Oe, Oe), kx(Oe, Tt, Lt), Ue; + function Tt(_n, gi) { + switch (gi.kind) { + case 169: + case 172: + case 174: + if (gi.questionToken === _n) + return Ue.push(_r(_n, p.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")), "skip"; + case 173: + case 176: + case 177: + case 178: + case 218: + case 262: + case 219: + case 260: + if (gi.type === _n) + return Ue.push(_r(_n, p.Type_annotations_can_only_be_used_in_TypeScript_files)), "skip"; + } + switch (_n.kind) { + case 273: + if (_n.isTypeOnly) + return Ue.push(_r(gi, p._0_declarations_can_only_be_used_in_TypeScript_files, "import type")), "skip"; + break; + case 278: + if (_n.isTypeOnly) + return Ue.push(_r(_n, p._0_declarations_can_only_be_used_in_TypeScript_files, "export type")), "skip"; + break; + case 276: + case 281: + if (_n.isTypeOnly) + return Ue.push(_r(_n, p._0_declarations_can_only_be_used_in_TypeScript_files, Yu(_n) ? "import...type" : "export...type")), "skip"; + break; + case 271: + return Ue.push(_r(_n, p.import_can_only_be_used_in_TypeScript_files)), "skip"; + case 277: + if (_n.isExportEquals) + return Ue.push(_r(_n, p.export_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 298: + if (_n.token === 119) + return Ue.push(_r(_n, p.implements_clauses_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 264: + const ii = Ws( + 120 + /* InterfaceKeyword */ + ); + return E.assertIsDefined(ii), Ue.push(_r(_n, p._0_declarations_can_only_be_used_in_TypeScript_files, ii)), "skip"; + case 267: + const Vr = _n.flags & 32 ? Ws( + 145 + /* NamespaceKeyword */ + ) : Ws( + 144 + /* ModuleKeyword */ + ); + return E.assertIsDefined(Vr), Ue.push(_r(_n, p._0_declarations_can_only_be_used_in_TypeScript_files, Vr)), "skip"; + case 265: + return Ue.push(_r(_n, p.Type_aliases_can_only_be_used_in_TypeScript_files)), "skip"; + case 176: + case 174: + case 262: + return _n.body ? void 0 : (Ue.push(_r(_n, p.Signature_declarations_can_only_be_used_in_TypeScript_files)), "skip"); + case 266: + const Yi = E.checkDefined(Ws( + 94 + /* EnumKeyword */ + )); + return Ue.push(_r(_n, p._0_declarations_can_only_be_used_in_TypeScript_files, Yi)), "skip"; + case 235: + return Ue.push(_r(_n, p.Non_null_assertions_can_only_be_used_in_TypeScript_files)), "skip"; + case 234: + return Ue.push(_r(_n.type, p.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)), "skip"; + case 238: + return Ue.push(_r(_n.type, p.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)), "skip"; + case 216: + E.fail(); + } + } + function Lt(_n, gi) { + if (rz(gi)) { + const nn = Nn(gi.modifiers, dl); + nn && Ue.push(_r(nn, p.Decorators_are_not_valid_here)); + } else if (jb(gi) && gi.modifiers) { + const nn = rc(gi.modifiers, dl); + if (nn >= 0) { + if (ji(gi) && !U.experimentalDecorators) + Ue.push(_r(gi.modifiers[nn], p.Decorators_are_not_valid_here)); + else if (rl(gi)) { + const ii = rc(gi.modifiers, _x); + if (ii >= 0) { + const Vr = rc(gi.modifiers, W5); + if (nn > ii && Vr >= 0 && nn < Vr) + Ue.push(_r(gi.modifiers[nn], p.Decorators_are_not_valid_here)); + else if (ii >= 0 && nn < ii) { + const Yi = rc(gi.modifiers, dl, ii); + Yi >= 0 && Ue.push(Fs( + _r(gi.modifiers[Yi], p.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), + _r(gi.modifiers[nn], p.Decorator_used_before_export_here) + )); + } + } + } + } + } + switch (gi.kind) { + case 263: + case 231: + case 174: + case 176: + case 177: + case 178: + case 218: + case 262: + case 219: + if (_n === gi.typeParameters) + return Ue.push(Gr(_n, p.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)), "skip"; + case 243: + if (_n === gi.modifiers) + return lr( + gi.modifiers, + gi.kind === 243 + /* VariableStatement */ + ), "skip"; + break; + case 172: + if (_n === gi.modifiers) { + for (const nn of _n) + Qs(nn) && nn.kind !== 126 && nn.kind !== 129 && Ue.push(_r(nn, p.The_0_modifier_can_only_be_used_in_TypeScript_files, Ws(nn.kind))); + return "skip"; + } + break; + case 169: + if (_n === gi.modifiers && ut(_n, Qs)) + return Ue.push(Gr(_n, p.Parameter_modifiers_can_only_be_used_in_TypeScript_files)), "skip"; + break; + case 213: + case 214: + case 233: + case 285: + case 286: + case 215: + if (_n === gi.typeArguments) + return Ue.push(Gr(_n, p.Type_arguments_can_only_be_used_in_TypeScript_files)), "skip"; + break; + } + } + function lr(_n, gi) { + for (const nn of _n) + switch (nn.kind) { + case 87: + if (gi) + continue; + case 125: + case 123: + case 124: + case 148: + case 138: + case 128: + case 164: + case 103: + case 147: + Ue.push(_r(nn, p.The_0_modifier_can_only_be_used_in_TypeScript_files, Ws(nn.kind))); + break; + case 126: + case 95: + case 90: + case 129: + } + } + function Gr(_n, gi, ...nn) { + const ii = _n.pos; + return xl(Oe, ii, _n.end - ii, gi, ...nn); + } + function _r(_n, gi, ...nn) { + return rp(Oe, _n, gi, ...nn); + } + }); + } + function qo(Oe, Ue) { + return vo(Oe, Ue, Ie, ol); + } + function ol(Oe, Ue) { + return it(() => { + const Tt = ql().getEmitResolver(Oe, Ue); + return fie(Co(ka), Tt, Oe) || He; + }); + } + function vo(Oe, Ue, Tt, Lt) { + var lr; + const Gr = Oe ? (lr = Tt.perFile) == null ? void 0 : lr.get(Oe.path) : Tt.allDiagnostics; + if (Gr) + return Gr; + const _r = Lt(Oe, Ue); + return Oe ? (Tt.perFile || (Tt.perFile = /* @__PURE__ */ new Map())).set(Oe.path, _r) : Tt.allDiagnostics = _r, _r; + } + function cl(Oe, Ue) { + return Oe.isDeclarationFile ? [] : qo(Oe, Ue); + } + function Eo() { + return qk(Hi( + he().getGlobalDiagnostics(), + gl() + )); + } + function gl() { + if (!U.configFile) return He; + let Oe = he().getDiagnostics(U.configFile.fileName); + return Gc((Ue) => { + Oe = Hi(Oe, he().getDiagnostics(Ue.sourceFile.fileName)); + }), Oe; + } + function Cl() { + return $.length ? qk(ql().getGlobalDiagnostics().slice()) : He; + } + function kc() { + return G || He; + } + function F_(Oe, Ue, Tt, Lt) { + vc( + Cs(Oe), + Ue, + Tt, + /*packageId*/ + void 0, + Lt + ); + } + function Jf(Oe, Ue) { + return Oe.fileName === Ue.fileName; + } + function Pe(Oe, Ue) { + return Oe.kind === 80 ? Ue.kind === 80 && Oe.escapedText === Ue.escapedText : Ue.kind === 11 && Oe.text === Ue.text; + } + function Ct(Oe, Ue) { + const Tt = N.createStringLiteral(Oe), Lt = N.createImportDeclaration( + /*modifiers*/ + void 0, + /*importClause*/ + void 0, + Tt + ); + return sx( + Lt, + 2 + /* NeverApplyImportHelper */ + ), Da(Tt, Lt), Da(Lt, Ue), Tt.flags &= -17, Lt.flags &= -17, Tt; + } + function Jr(Oe) { + if (Oe.imports) + return; + const Ue = p_(Oe), Tt = il(Oe); + let Lt, lr, Gr; + if (Ue || !Oe.isDeclarationFile && (ap(U) || il(Oe))) { + U.importHelpers && (Lt = [Ct(z1, Oe)]); + const nn = _5(u5(U, Oe), U); + nn && (Lt || (Lt = [])).push(Ct(nn, Oe)); + } + for (const nn of Oe.statements) + _r( + nn, + /*inAmbientModule*/ + !1 + ); + (Oe.flags & 4194304 || Ue) && _n(Oe), Oe.imports = Lt || He, Oe.moduleAugmentations = lr || He, Oe.ambientModuleNames = Gr || He; + return; + function _r(nn, ii) { + if (Uw(nn)) { + const Vr = RT(nn); + Vr && Ks(Vr) && Vr.text && (!ii || !Sl(Vr.text)) && (yh( + nn, + /*incremental*/ + !1 + ), Lt = Tr(Lt, Vr), !re && zt === 0 && !Oe.isDeclarationFile && (re = zi(Vr.text, "node:"))); + } else if (Nc(nn) && wu(nn) && (ii || Vn( + nn, + 128 + /* Ambient */ + ) || Oe.isDeclarationFile)) { + nn.name.parent = nn; + const Vr = Ip(nn.name); + if (Tt || ii && !Sl(Vr)) + (lr || (lr = [])).push(nn.name); + else if (!ii) { + Oe.isDeclarationFile && (Gr || (Gr = [])).push(Vr); + const Yi = nn.body; + if (Yi) + for (const ca of Yi.statements) + _r( + ca, + /*inAmbientModule*/ + !0 + ); + } + } + } + function _n(nn) { + const ii = /import|require/g; + for (; ii.exec(nn.text) !== null; ) { + const Vr = gi(nn, ii.lastIndex); + if (Ue && d_( + Vr, + /*requireStringLiteralLikeArgument*/ + !0 + )) + yh( + Vr, + /*incremental*/ + !1 + ), Lt = Tr(Lt, Vr.arguments[0]); + else if (hf(Vr) && Vr.arguments.length >= 1 && Ga(Vr.arguments[0])) + yh( + Vr, + /*incremental*/ + !1 + ), Lt = Tr(Lt, Vr.arguments[0]); + else if (a0(Vr)) + yh( + Vr, + /*incremental*/ + !1 + ), Lt = Tr(Lt, Vr.argument.literal); + else if (Ue && Jg(Vr)) { + const Yi = RT(Vr); + Yi && Ks(Yi) && Yi.text && (yh( + Vr, + /*incremental*/ + !1 + ), Lt = Tr(Lt, Yi)); + } + } + } + function gi(nn, ii) { + let Vr = nn; + const Yi = (ca) => { + if (ca.pos <= ii && (ii < ca.end || ii === ca.end && ca.kind === 1)) + return ca; + }; + for (; ; ) { + const ca = Ue && gf(Vr) && rr(Vr.jsDoc, Yi) || gs(Vr, Yi); + if (!ca) + return Vr; + Vr = ca; + } + } + } + function Vi(Oe) { + var Ue; + const Tt = Nve(Oe), Lt = Tt && ((Ue = Ke?.get(Tt)) == null ? void 0 : Ue.actual); + return Lt !== void 0 ? Fa(Lt) : void 0; + } + function ha(Oe, Ue) { + return Pa(DW(Ue.fileName, Oe.fileName), Fa); + } + function Pa(Oe, Ue, Tt, Lt) { + if (zk(Oe)) { + const lr = Xt.getCanonicalFileName(Oe); + if (!U.allowNonTsExtensions && !rr(Ep(vr), (_r) => Go(lr, _r))) { + Tt && (Lg(lr) ? Tt(p.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, Oe) : Tt(p.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, Oe, "'" + Ep(At).join("', '") + "'")); + return; + } + const Gr = Ue(Oe); + if (Tt) + if (Gr) + pv(Lt) && lr === Xt.getCanonicalFileName(Bt(Lt.file).fileName) && Tt(p.A_file_cannot_have_a_reference_to_itself); + else { + const _r = Wf(Oe); + _r ? Tt(p.Output_file_0_has_not_been_built_from_source_file_1, _r, Oe) : Tt(p.File_0_not_found, Oe); + } + return Gr; + } else { + const lr = U.allowNonTsExtensions && Ue(Oe); + if (lr) return lr; + if (Tt && U.allowNonTsExtensions) { + Tt(p.File_0_not_found, Oe); + return; + } + const Gr = rr(At[0], (_r) => Ue(Oe + _r)); + return Tt && !Gr && Tt(p.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, Oe, "'" + Ep(At).join("', '") + "'"), Gr; + } + } + function vc(Oe, Ue, Tt, Lt, lr) { + Pa( + Oe, + (Gr) => Cc(Gr, Ue, Tt, lr, Lt), + // TODO: GH#18217 + (Gr, ..._r) => wa( + /*file*/ + void 0, + lr, + Gr, + _r + ), + lr + ); + } + function Do(Oe, Ue) { + return vc( + Oe, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + /*packageId*/ + void 0, + Ue + ); + } + function to(Oe, Ue, Tt) { + !pv(Tt) && ut(ge.get(Ue.path), pv) ? wa(Ue, Tt, p.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [Ue.fileName, Oe]) : wa(Ue, Tt, p.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [Oe, Ue.fileName]); + } + function pc(Oe, Ue, Tt, Lt, lr, Gr, _r) { + var _n; + const gi = av.createRedirectedSourceFile({ redirectTarget: Oe, unredirected: Ue }); + return gi.fileName = Tt, gi.path = Lt, gi.resolvedPath = lr, gi.originalFileName = Gr, gi.packageJsonLocations = (_n = _r.packageJsonLocations) != null && _n.length ? _r.packageJsonLocations : void 0, gi.packageJsonScope = _r.packageJsonScope, ci.set(Lt, zt > 0), gi; + } + function Cc(Oe, Ue, Tt, Lt, lr) { + var Gr, _r; + (Gr = rn) == null || Gr.push(rn.Phase.Program, "findSourceFile", { + fileName: Oe, + isDefaultLib: Ue || void 0, + fileIncludeKind: AR[Lt.kind] + }); + const _n = Id(Oe, Ue, Tt, Lt, lr); + return (_r = rn) == null || _r.pop(), _n; + } + function bf(Oe, Ue, Tt, Lt) { + const lr = cF(Xi(Oe, Le), Ue?.getPackageJsonInfoCache(), Tt, Lt), Gr = pa(Lt), _r = j3(Lt); + return typeof lr == "object" ? { ...lr, languageVersion: Gr, setExternalModuleIndicator: _r, jsDocParsingMode: Tt.jsDocParsingMode } : { languageVersion: Gr, impliedNodeFormat: lr, setExternalModuleIndicator: _r, jsDocParsingMode: Tt.jsDocParsingMode }; + } + function Id(Oe, Ue, Tt, Lt, lr) { + var Gr; + const _r = qt(Oe); + if (bt) { + let Vr = ng(_r); + if (!Vr && Xt.realpath && U.preserveSymlinks && Ol(Oe) && Oe.includes(zg)) { + const Yi = qt(Xt.realpath(Oe)); + Yi !== _r && (Vr = ng(Yi)); + } + if (Vr) { + const Yi = Gi(Vr) ? Cc(Vr, Ue, Tt, Lt, lr) : void 0; + return Yi && v_( + Yi, + _r, + Oe, + /*redirectedPath*/ + void 0 + ), Yi; + } + } + const _n = Oe; + if (Ee.has(_r)) { + const Vr = Ee.get(_r), Yi = zf( + Vr || void 0, + Lt, + /*checkExisting*/ + !0 + ); + if (Vr && Yi && U.forceConsistentCasingInFileNames !== !1) { + const ca = Vr.fileName; + qt(ca) !== qt(Oe) && (Oe = Wf(Oe) || Oe); + const Tu = $R(ca, Le), mp = $R(Oe, Le); + Tu !== mp && to(Oe, Vr, Lt); + } + return Vr && ci.get(Vr.path) && zt === 0 ? (ci.set(Vr.path, !1), U.noResolve || (Vf(Vr, Ue), Y(Vr)), U.noLib || zr(Vr), jr.set(Vr.path, !1), ei(Vr)) : Vr && jr.get(Vr.path) && zt < Vt && (jr.set(Vr.path, !1), ei(Vr)), Vr || void 0; + } + let gi; + if (!bt) { + const Vr = tg(Oe); + if (Vr) { + if (Vr.commandLine.options.outFile) + return; + const Yi = rg(Vr, Oe); + Oe = Yi, gi = qt(Yi); + } + } + const nn = bf(Oe, mi, Xt, U), ii = Xt.getSourceFile( + Oe, + nn, + (Vr) => wa( + /*file*/ + void 0, + Lt, + p.Cannot_read_file_0_Colon_1, + [Oe, Vr] + ), + je + ); + if (lr) { + const Vr = py(lr), Yi = nt.get(Vr); + if (Yi) { + const ca = pc(Yi, ii, Oe, _r, qt(Oe), _n, nn); + return rt.add(Yi.path, Oe), v_(ca, _r, Oe, gi), zf( + ca, + Lt, + /*checkExisting*/ + !1 + ), te.set(_r, t7(lr)), ne.push(ca), ca; + } else ii && (nt.set(Vr, ii), te.set(_r, t7(lr))); + } + if (v_(ii, _r, Oe, gi), ii) { + if (ci.set(_r, zt > 0), ii.fileName = Oe, ii.path = _r, ii.resolvedPath = qt(Oe), ii.originalFileName = _n, ii.packageJsonLocations = (Gr = nn.packageJsonLocations) != null && Gr.length ? nn.packageJsonLocations : void 0, ii.packageJsonScope = nn.packageJsonScope, zf( + ii, + Lt, + /*checkExisting*/ + !1 + ), Xt.useCaseSensitiveFileNames()) { + const Vr = sy(_r), Yi = et.get(Vr); + Yi ? to(Oe, Yi, Lt) : et.set(Vr, ii); + } + _s = _s || ii.hasNoDefaultLib && !Tt, U.noResolve || (Vf(ii, Ue), Y(ii)), U.noLib || zr(ii), ei(ii), Ue ? oe.push(ii) : ne.push(ii), (de ?? (de = /* @__PURE__ */ new Set())).add(ii.path); + } + return ii; + } + function zf(Oe, Ue, Tt) { + return Oe && (!Tt || !pv(Ue) || !de?.has(Ue.file)) ? (ge.add(Oe.path, Ue), !0) : !1; + } + function v_(Oe, Ue, Tt, Lt) { + Lt ? (pp(Tt, Lt, Oe), pp(Tt, Ue, Oe || !1)) : pp(Tt, Ue, Oe); + } + function pp(Oe, Ue, Tt) { + Ee.set(Ue, Tt), Tt !== void 0 ? Ne.delete(Ue) : Ne.set(Ue, Oe); + } + function Wf(Oe) { + const Ue = tg(Oe); + return Ue && rg(Ue, Oe); + } + function tg(Oe) { + if (!(!lt || !lt.length || Ol(Oe) || Go( + Oe, + ".json" + /* Json */ + ))) + return b_(Oe); + } + function rg(Oe, Ue) { + const Tt = Oe.commandLine.options.outFile; + return Tt ? by( + Tt, + ".d.ts" + /* Dts */ + ) : YC(Ue, Oe.commandLine, !Xt.useCaseSensitiveFileNames()); + } + function b_(Oe) { + be === void 0 && (be = /* @__PURE__ */ new Map(), Gc((Tt) => { + qt(U.configFilePath) !== Tt.sourceFile.path && Tt.commandLine.fileNames.forEach((Lt) => be.set(qt(Lt), Tt.sourceFile.path)); + })); + const Ue = be.get(qt(Oe)); + return Ue && bm(Ue); + } + function Gc(Oe) { + return jW(lt, Oe); + } + function ng(Oe) { + if (Ol(Oe)) + return ft === void 0 && (ft = /* @__PURE__ */ new Map(), Gc((Ue) => { + const Tt = Ue.commandLine.options.outFile; + if (Tt) { + const Lt = by( + Tt, + ".d.ts" + /* Dts */ + ); + ft.set(qt(Lt), !0); + } else { + const Lt = Wu(() => Ox(Ue.commandLine, !Xt.useCaseSensitiveFileNames())); + rr(Ue.commandLine.fileNames, (lr) => { + if (!Ol(lr) && !Go( + lr, + ".json" + /* Json */ + )) { + const Gr = YC(lr, Ue.commandLine, !Xt.useCaseSensitiveFileNames(), Lt); + ft.set(qt(Gr), lr); + } + }); + } + })), ft.get(Oe); + } + function L_(Oe) { + return bt && !!b_(Oe); + } + function bm(Oe) { + if (jt) + return jt.get(Oe) || void 0; + } + function Vf(Oe, Ue) { + rr(Oe.referencedFiles, (Tt, Lt) => { + vc( + DW(Tt.fileName, Oe.fileName), + Ue, + /*ignoreNoDefaultLib*/ + !1, + /*packageId*/ + void 0, + { kind: 4, file: Oe.path, index: Lt } + ); + }); + } + function Y(Oe) { + const Ue = Oe.typeReferenceDirectives; + if (!Ue.length) return; + const Tt = Kt?.get(Oe.path) || Vo(Ue, Oe), Lt = UC(); + (nr ?? (nr = /* @__PURE__ */ new Map())).set(Oe.path, Lt); + for (let lr = 0; lr < Ue.length; lr++) { + const Gr = Oe.typeReferenceDirectives[lr], _r = Tt[lr], _n = Gr.fileName; + Lt.set(_n, zA(Gr, Oe.impliedNodeFormat), _r); + const gi = Gr.resolutionMode || Oe.impliedNodeFormat; + tt(_n, gi, _r, { kind: 5, file: Oe.path, index: lr }); + } + } + function tt(Oe, Ue, Tt, Lt) { + var lr, Gr; + (lr = rn) == null || lr.push(rn.Phase.Program, "processTypeReferenceDirective", { directive: Oe, hasResolved: !!Tt.resolvedTypeReferenceDirective, refKind: Lt.kind, refPath: pv(Lt) ? Lt.file : void 0 }), Pt(Oe, Ue, Tt, Lt), (Gr = rn) == null || Gr.pop(); + } + function Pt(Oe, Ue, Tt, Lt) { + fr(Tt); + const { resolvedTypeReferenceDirective: lr } = Tt; + lr ? (lr.isExternalLibraryImport && zt++, vc( + lr.resolvedFileName, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + lr.packageId, + Lt + ), lr.isExternalLibraryImport && zt--) : wa( + /*file*/ + void 0, + Lt, + p.Cannot_find_type_definition_file_for_0, + [Oe] + ); + } + function It(Oe) { + const Ue = Ke?.get(Oe); + if (Ue) return Ue.actual; + const Tt = hr(Oe); + return (Ke ?? (Ke = /* @__PURE__ */ new Map())).set(Oe, Tt), Tt.actual; + } + function hr(Oe) { + var Ue, Tt, Lt, lr, Gr; + const _r = Be?.get(Oe); + if (_r) return _r; + if (st !== 0 && X && !Ca(Oe)) { + const Vr = (Ue = X.resolvedLibReferences) == null ? void 0 : Ue.get(Oe); + if (Vr) { + if (Vr.resolution && kh(U, Xt)) { + const Yi = BW(Oe), ca = oF(U, Le, Oe); + Wi( + Xt, + Vr.resolution.resolvedModule ? Vr.resolution.resolvedModule.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, + Yi, + Xi(ca, Le), + (Tt = Vr.resolution.resolvedModule) == null ? void 0 : Tt.resolvedFileName, + ((Lt = Vr.resolution.resolvedModule) == null ? void 0 : Lt.packageId) && py(Vr.resolution.resolvedModule.packageId) + ); + } + return (Be ?? (Be = /* @__PURE__ */ new Map())).set(Oe, Vr), Vr; + } + } + const _n = BW(Oe), gi = oF(U, Le, Oe); + (lr = rn) == null || lr.push(rn.Phase.Program, "resolveLibrary", { resolveFrom: gi }), Yo("beforeResolveLibrary"); + const nn = $e(_n, gi, U, Oe); + Yo("afterResolveLibrary"), ep("ResolveLibrary", "beforeResolveLibrary", "afterResolveLibrary"), (Gr = rn) == null || Gr.pop(); + const ii = { + resolution: nn, + actual: nn.resolvedModule ? nn.resolvedModule.resolvedFileName : Mn(os, Oe) + }; + return (Be ?? (Be = /* @__PURE__ */ new Map())).set(Oe, ii), ii; + } + function zr(Oe) { + rr(Oe.libReferenceDirectives, (Ue, Tt) => { + const Lt = Nve(Ue); + Lt ? F_( + It(Lt), + /*isDefaultLib*/ + !0, + /*ignoreNoDefaultLib*/ + !0, + { kind: 7, file: Oe.path, index: Tt } + ) : (ye || (ye = [])).push({ + kind: 0, + reason: { kind: 7, file: Oe.path, index: Tt } + }); + }); + } + function Cn(Oe) { + return Xt.getCanonicalFileName(Oe); + } + function ei(Oe) { + var Ue; + if (Jr(Oe), Oe.imports.length || Oe.moduleAugmentations.length) { + const Tt = Ive(Oe), Lt = Wt?.get(Oe.path) || Ro(Tt, Oe); + E.assert(Lt.length === Tt.length); + const lr = ((Ue = ur(Oe)) == null ? void 0 : Ue.commandLine.options) || U, Gr = UC(); + (at ?? (at = /* @__PURE__ */ new Map())).set(Oe.path, Gr); + for (let _r = 0; _r < Tt.length; _r++) { + const _n = Lt[_r].resolvedModule, gi = Tt[_r].text, nn = FW(Oe, Tt[_r], lr); + if (Gr.set(gi, nn, Lt[_r]), mn(Oe, gi, Lt[_r], nn), !_n) + continue; + const ii = _n.isExternalLibraryImport, Vr = !M4(_n.extension) && !tg(_n.resolvedFileName), Yi = ii && Vr && (!_n.originalPath || uv(_n.resolvedFileName)), ca = _n.resolvedFileName; + ii && zt++; + const El = Yi && zt > Vt, Tu = ca && !UW(lr, _n, Oe) && !lr.noResolve && _r < Oe.imports.length && !El && !(Vr && !yy(lr)) && (Qr(Oe.imports[_r]) || !(Oe.imports[_r].flags & 16777216)); + El ? jr.set(Oe.path, !0) : Tu && Cc( + ca, + /*isDefaultLib*/ + !1, + /*ignoreNoDefaultLib*/ + !1, + { kind: 3, file: Oe.path, index: _r }, + _n.packageId + ), ii && zt--; + } + } + } + function M(Oe, Ue) { + let Tt = !0; + const Lt = Xt.getCanonicalFileName(Xi(Ue, Le)); + for (const lr of Oe) + lr.isDeclarationFile || Xt.getCanonicalFileName(Xi(lr.fileName, Le)).indexOf(Lt) !== 0 && (ya( + lr, + p.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, + [lr.fileName, Ue] + ), Tt = !1); + return Tt; + } + function ke(Oe) { + jt || (jt = /* @__PURE__ */ new Map()); + const Ue = e6(Oe), Tt = qt(Ue), Lt = jt.get(Tt); + if (Lt !== void 0) + return Lt || void 0; + let lr, Gr; + if (Xt.getParsedCommandLine) { + if (lr = Xt.getParsedCommandLine(Ue), !lr) { + v_( + /*file*/ + void 0, + Tt, + Ue, + /*redirectedPath*/ + void 0 + ), jt.set(Tt, !1); + return; + } + Gr = E.checkDefined(lr.options.configFile), E.assert(!Gr.path || Gr.path === Tt), v_( + Gr, + Tt, + Ue, + /*redirectedPath*/ + void 0 + ); + } else { + const _n = Xi(Xn(Ue), Le); + if (Gr = Xt.getSourceFile( + Ue, + 100 + /* JSON */ + ), v_( + Gr, + Tt, + Ue, + /*redirectedPath*/ + void 0 + ), Gr === void 0) { + jt.set(Tt, !1); + return; + } + lr = xA( + Gr, + Ai, + _n, + /*existingOptions*/ + void 0, + Ue + ); + } + Gr.fileName = Ue, Gr.path = Tt, Gr.resolvedPath = Tt, Gr.originalFileName = Ue; + const _r = { commandLine: lr, sourceFile: Gr }; + return jt.set(Tt, _r), lr.projectReferences && (_r.references = lr.projectReferences.map(ke)), _r; + } + function vt() { + U.strictPropertyInitialization && !Iu(U, "strictNullChecks") && za(p.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks"), U.exactOptionalPropertyTypes && !Iu(U, "strictNullChecks") && za(p.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks"), (U.isolatedModules || U.verbatimModuleSyntax) && U.outFile && za(p.Option_0_cannot_be_specified_with_option_1, "outFile", U.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"), U.isolatedDeclarations && (yy(U) && za(p.Option_0_cannot_be_specified_with_option_1, "allowJs", "isolatedDeclarations"), op(U) || za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "isolatedDeclarations", "declaration", "composite")), U.inlineSourceMap && (U.sourceMap && za(p.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap"), U.mapRoot && za(p.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap")), U.composite && (U.declaration === !1 && za(p.Composite_projects_may_not_disable_declaration_emit, "declaration"), U.incremental === !1 && za(p.Composite_projects_may_not_disable_incremental_compilation, "declaration")); + const Oe = U.outFile; + if (U.tsBuildInfoFile ? I4(U) || za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite") : U.incremental && !Oe && !U.configFilePath && wr.add(zo(p.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)), ds(), rd(), U.composite) { + const _r = new Set($.map(qt)); + for (const _n of pe) + Z2(_n, z) && !_r.has(_n.path) && ya( + _n, + p.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, + [_n.fileName, U.configFilePath || ""] + ); + } + if (U.paths) { + for (const _r in U.paths) + if (io(U.paths, _r)) + if (YB(_r) || Ug( + /*onKey*/ + !0, + _r, + p.Pattern_0_can_have_at_most_one_Asterisk_character, + _r + ), ss(U.paths[_r])) { + const _n = U.paths[_r].length; + _n === 0 && Ug( + /*onKey*/ + !1, + _r, + p.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array, + _r + ); + for (let gi = 0; gi < _n; gi++) { + const nn = U.paths[_r][gi], ii = typeof nn; + ii === "string" ? (YB(nn) || ig(_r, gi, p.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, nn, _r), !U.baseUrl && !Df(nn) && !OE(nn) && ig(_r, gi, p.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash)) : ig(_r, gi, p.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, nn, _r, ii); + } + } else + Ug( + /*onKey*/ + !1, + _r, + p.Substitutions_for_pattern_0_should_be_an_array, + _r + ); + } + !U.sourceMap && !U.inlineSourceMap && (U.inlineSources && za(p.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources"), U.sourceRoot && za(p.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot")), U.mapRoot && !(U.sourceMap || U.declarationMap) && za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "mapRoot", "sourceMap", "declarationMap"), U.declarationDir && (op(U) || za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite"), Oe && za(p.Option_0_cannot_be_specified_with_option_1, "declarationDir", "outFile")), U.declarationMap && !op(U) && za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationMap", "declaration", "composite"), U.lib && U.noLib && za(p.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"); + const Ue = pa(U), Tt = Nn(pe, (_r) => il(_r) && !_r.isDeclarationFile); + if (U.isolatedModules || U.verbatimModuleSyntax) + U.module === 0 && Ue < 2 && U.isolatedModules && za(p.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target"), U.preserveConstEnums === !1 && za(p.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, U.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", "preserveConstEnums"); + else if (Tt && Ue < 2 && U.module === 0) { + const _r = H2(Tt, typeof Tt.externalModuleIndicator == "boolean" ? Tt : Tt.externalModuleIndicator); + wr.add(xl(Tt, _r.start, _r.length, p.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); + } + if (Oe && !U.emitDeclarationOnly) { + if (U.module && !(U.module === 2 || U.module === 4)) + za(p.Only_amd_and_system_modules_are_supported_alongside_0, "outFile", "module"); + else if (U.module === void 0 && Tt) { + const _r = H2(Tt, typeof Tt.externalModuleIndicator == "boolean" ? Tt : Tt.externalModuleIndicator); + wr.add(xl(Tt, _r.start, _r.length, p.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, "outFile")); + } + } + if (kb(U) && (Hu(U) === 1 ? za(p.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule") : a5(U) || za(p.Option_resolveJsonModule_cannot_be_specified_when_module_is_set_to_none_system_or_umd, "resolveJsonModule", "module")), U.outDir || // there is --outDir specified + U.rootDir || // there is --rootDir specified + U.sourceRoot || // there is --sourceRoot specified + U.mapRoot) { + const _r = ma(); + U.outDir && _r === "" && pe.some((_n) => zm(_n.fileName) > 1) && za(p.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir"); + } + U.checkJs && !yy(U) && za(p.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs"), U.emitDeclarationOnly && (op(U) || za(p.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite"), U.noEmit && za(p.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit")), U.noCheck && U.noEmit && za(p.Option_0_cannot_be_specified_with_option_1, "noCheck", "noEmit"), U.emitDecoratorMetadata && !U.experimentalDecorators && za(p.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"), U.jsxFactory ? (U.reactNamespace && za(p.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory"), (U.jsx === 4 || U.jsx === 5) && za(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFactory", yA.get("" + U.jsx)), Ex(U.jsxFactory, Ue) || t_("jsxFactory", p.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, U.jsxFactory)) : U.reactNamespace && !X_(U.reactNamespace, Ue) && t_("reactNamespace", p.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, U.reactNamespace), U.jsxFragmentFactory && (U.jsxFactory || za(p.Option_0_cannot_be_specified_without_specifying_option_1, "jsxFragmentFactory", "jsxFactory"), (U.jsx === 4 || U.jsx === 5) && za(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFragmentFactory", yA.get("" + U.jsx)), Ex(U.jsxFragmentFactory, Ue) || t_("jsxFragmentFactory", p.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, U.jsxFragmentFactory)), U.reactNamespace && (U.jsx === 4 || U.jsx === 5) && za(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "reactNamespace", yA.get("" + U.jsx)), U.jsxImportSource && U.jsx === 2 && za(p.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", yA.get("" + U.jsx)); + const Lt = Nu(U); + U.verbatimModuleSyntax && (Lt === 2 || Lt === 3 || Lt === 4) && za(p.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"), U.allowImportingTsExtensions && !(U.noEmit || U.emitDeclarationOnly) && t_("allowImportingTsExtensions", p.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set); + const lr = Hu(U); + if (U.resolvePackageJsonExports && !KT(lr) && za(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports"), U.resolvePackageJsonImports && !KT(lr) && za(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports"), U.customConditions && !KT(lr) && za(p.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions"), lr === 100 && !s5(Lt) && Lt !== 200 && t_("moduleResolution", p.Option_0_can_only_be_used_when_module_is_set_to_preserve_or_to_es2015_or_later, "bundler"), _w[Lt] && 100 <= Lt && Lt <= 199 && !(3 <= lr && lr <= 99)) { + const _r = _w[Lt]; + t_("moduleResolution", p.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, _r, _r); + } else if (NE[lr] && 3 <= lr && lr <= 99 && !(100 <= Lt && Lt <= 199)) { + const _r = NE[lr]; + t_("module", p.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, _r, _r); + } + if (!U.noEmit && !U.suppressOutputPathCheck) { + const _r = Co(), _n = /* @__PURE__ */ new Set(); + gW(_r, (gi) => { + U.emitDeclarationOnly || Gr(gi.jsFilePath, _n), Gr(gi.declarationFilePath, _n); + }); + } + function Gr(_r, _n) { + if (_r) { + const gi = qt(_r); + if (Ee.has(gi)) { + let ii; + U.configFilePath || (ii = us( + /*details*/ + void 0, + p.Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig + )), ii = us(ii, p.Cannot_write_file_0_because_it_would_overwrite_input_file, _r), I0(_r, t5(ii)); + } + const nn = Xt.useCaseSensitiveFileNames() ? gi : sy(gi); + _n.has(nn) ? I0(_r, zo(p.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, _r)) : _n.add(nn); + } + } + } + function Nr() { + const Oe = U.ignoreDeprecations; + if (Oe) { + if (Oe === "5.0") + return new gd(Oe); + Z(); + } + return gd.zero; + } + function ui(Oe, Ue, Tt, Lt, lr) { + const Gr = new gd(Oe), _r = new gd(Tt), _n = new gd(K || N2), gi = Nr(), nn = _r.compareTo(_n) !== 1, ii = !nn && gi.compareTo(Gr) === -1; + (nn || ii) && lr((Vr, Yi, ca) => { + nn ? Yi === void 0 ? Lt(Vr, Yi, ca, p.Option_0_has_been_removed_Please_remove_it_from_your_configuration, Vr) : Lt(Vr, Yi, ca, p.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, Vr, Yi) : Yi === void 0 ? Lt(Vr, Yi, ca, p.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, Vr, Ue, Oe) : Lt(Vr, Yi, ca, p.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, Vr, Yi, Ue, Oe); + }); + } + function ds() { + function Oe(Ue, Tt, Lt, lr, ...Gr) { + if (Lt) { + const _r = us( + /*details*/ + void 0, + p.Use_0_instead, + Lt + ), _n = us(_r, lr, ...Gr); + Od( + /*onKey*/ + !Tt, + Ue, + /*option2*/ + void 0, + _n + ); + } else + Od( + /*onKey*/ + !Tt, + Ue, + /*option2*/ + void 0, + lr, + ...Gr + ); + } + ui("5.0", "5.5", "6.0", Oe, (Ue) => { + U.target === 0 && Ue("target", "ES3"), U.noImplicitUseStrict && Ue("noImplicitUseStrict"), U.keyofStringsOnly && Ue("keyofStringsOnly"), U.suppressExcessPropertyErrors && Ue("suppressExcessPropertyErrors"), U.suppressImplicitAnyIndexErrors && Ue("suppressImplicitAnyIndexErrors"), U.noStrictGenericChecks && Ue("noStrictGenericChecks"), U.charset && Ue("charset"), U.out && Ue( + "out", + /*value*/ + void 0, + "outFile" + ), U.importsNotUsedAsValues && Ue( + "importsNotUsedAsValues", + /*value*/ + void 0, + "verbatimModuleSyntax" + ), U.preserveValueImports && Ue( + "preserveValueImports", + /*value*/ + void 0, + "verbatimModuleSyntax" + ); + }); + } + function Qi(Oe, Ue, Tt) { + function Lt(lr, Gr, _r, _n, ...gi) { + S_(Ue, Tt, _n, ...gi); + } + ui("5.0", "5.5", "6.0", Lt, (lr) => { + Oe.prepend && lr("prepend"); + }); + } + function ys(Oe, Ue, Tt, Lt) { + let lr; + const Gr = Oe && ge.get(Oe.path); + let _r, _n, gi = pv(Ue) ? Ue : void 0, nn, ii, Vr = Oe && ve?.get(Oe.path), Yi; + Vr ? (Vr.fileIncludeReasonDetails ? (lr = new Set(Gr), Gr?.forEach(mp)) : Gr?.forEach(Tu), ii = Vr.redirectInfo) : (Gr?.forEach(Tu), ii = Oe && sV(Oe)), Ue && Tu(Ue); + const ca = lr?.size !== Gr?.length; + gi && lr?.size === 1 && (lr = void 0), lr && Vr && (Vr.details && !ca ? Yi = us(Vr.details, Tt, ...Lt || He) : Vr.fileIncludeReasonDetails && (ca ? By() ? _r = Tr(Vr.fileIncludeReasonDetails.next.slice(0, Gr.length), _r[0]) : _r = [...Vr.fileIncludeReasonDetails.next, _r[0]] : By() ? _r = Vr.fileIncludeReasonDetails.next.slice(0, Gr.length) : nn = Vr.fileIncludeReasonDetails)), Yi || (nn || (nn = lr && us(_r, p.The_file_is_in_the_program_because_Colon)), Yi = us( + ii ? nn ? [nn, ...ii] : ii : nn, + Tt, + ...Lt || He + )), Oe && (Vr ? (!Vr.fileIncludeReasonDetails || !ca && nn) && (Vr.fileIncludeReasonDetails = nn) : (ve ?? (ve = /* @__PURE__ */ new Map())).set(Oe.path, Vr = { fileIncludeReasonDetails: nn, redirectInfo: ii }), !Vr.details && !ca && (Vr.details = Yi.next)); + const El = gi && RD(z, gi); + return El && KC(El) ? l7(El.file, El.pos, El.end - El.pos, Yi, _n) : t5(Yi, _n); + function Tu(Wp) { + lr?.has(Wp) || ((lr ?? (lr = /* @__PURE__ */ new Set())).add(Wp), (_r ?? (_r = [])).push(cV(z, Wp)), mp(Wp)); + } + function mp(Wp) { + !gi && pv(Wp) ? gi = Wp : gi !== Wp && (_n = Tr(_n, tc(Wp))); + } + function By() { + var Wp; + return ((Wp = Vr.fileIncludeReasonDetails.next) == null ? void 0 : Wp.length) !== Gr?.length; + } + } + function wa(Oe, Ue, Tt, Lt) { + (ye || (ye = [])).push({ + kind: 1, + file: Oe && Oe.path, + fileProcessingReason: Ue, + diagnostic: Tt, + args: Lt + }); + } + function ya(Oe, Ue, Tt) { + Ss.push({ file: Oe, diagnostic: Ue, args: Tt }); + } + function tc(Oe) { + let Ue = De?.get(Oe); + return Ue === void 0 && (De ?? (De = /* @__PURE__ */ new Map())).set(Oe, Ue = dp(Oe) ?? !1), Ue || void 0; + } + function dp(Oe) { + if (pv(Oe)) { + const Lt = RD(z, Oe); + let lr; + switch (Oe.kind) { + case 3: + lr = p.File_is_included_via_import_here; + break; + case 4: + lr = p.File_is_included_via_reference_here; + break; + case 5: + lr = p.File_is_included_via_type_library_reference_here; + break; + case 7: + lr = p.File_is_included_via_library_reference_here; + break; + default: + E.assertNever(Oe); + } + return KC(Lt) ? xl( + Lt.file, + Lt.pos, + Lt.end - Lt.pos, + lr + ) : void 0; + } + if (!U.configFile) return; + let Ue, Tt; + switch (Oe.kind) { + case 0: + if (!U.configFile.configFileSpecs) return; + const Lt = Xi($[Oe.index], Le), lr = aV(z, Lt); + if (lr) { + Ue = m7(U.configFile, "files", lr), Tt = p.File_is_matched_by_files_list_specified_here; + break; + } + const Gr = oV(z, Lt); + if (!Gr || !Gi(Gr)) return; + Ue = m7(U.configFile, "include", Gr), Tt = p.File_is_matched_by_include_pattern_specified_here; + break; + case 1: + case 2: + const _r = E.checkDefined(lt?.[Oe.index]), _n = aF(ce, lt, (Yi, ca, El) => Yi === _r ? { sourceFile: ca?.sourceFile || U.configFile, index: El } : void 0); + if (!_n) return; + const { sourceFile: gi, index: nn } = _n, ii = Yw(gi, "references", (Yi) => Wl(Yi.initializer) ? Yi.initializer : void 0); + return ii && ii.elements.length > nn ? rp( + gi, + ii.elements[nn], + Oe.kind === 2 ? p.File_is_output_from_referenced_project_specified_here : p.File_is_source_from_referenced_project_specified_here + ) : void 0; + case 8: + if (!U.types) return; + Ue = cf("types", Oe.typeReference), Tt = p.File_is_entry_point_of_type_library_specified_here; + break; + case 6: + if (Oe.index !== void 0) { + Ue = cf("lib", U.lib[Oe.index]), Tt = p.File_is_library_specified_here; + break; + } + const Vr = o5(pa(U)); + Ue = Vr ? Uf("target", Vr) : void 0, Tt = p.File_is_default_library_for_target_specified_here; + break; + default: + E.assertNever(Oe); + } + return Ue && rp( + U.configFile, + Ue, + Tt + ); + } + function rd() { + const Oe = U.suppressOutputPathCheck ? void 0 : S0(U); + aF(ce, lt, (Ue, Tt, Lt) => { + const lr = (Tt ? Tt.commandLine.projectReferences : ce)[Lt], Gr = Tt && Tt.sourceFile; + if (Qi(lr, Gr, Lt), !Ue) { + S_(Gr, Lt, p.File_0_not_found, lr.path); + return; + } + const _r = Ue.commandLine.options; + (!_r.composite || _r.noEmit) && (Tt ? Tt.commandLine.fileNames : $).length && (_r.composite || S_(Gr, Lt, p.Referenced_project_0_must_have_setting_composite_Colon_true, lr.path), _r.noEmit && S_(Gr, Lt, p.Referenced_project_0_may_not_disable_emit, lr.path)), !Tt && Oe && Oe === S0(_r) && (S_(Gr, Lt, p.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, Oe, lr.path), ln.set(qt(Oe), !0)); + }); + } + function ig(Oe, Ue, Tt, ...Lt) { + let lr = !0; + qg((Gr) => { + Gs(Gr.initializer) && aC(Gr.initializer, Oe, (_r) => { + const _n = _r.initializer; + Wl(_n) && _n.elements.length > Ue && (wr.add(rp(U.configFile, _n.elements[Ue], Tt, ...Lt)), lr = !1); + }); + }), lr && A0(Tt, ...Lt); + } + function Ug(Oe, Ue, Tt, ...Lt) { + let lr = !0; + qg((Gr) => { + Gs(Gr.initializer) && jy( + Gr.initializer, + Oe, + Ue, + /*key2*/ + void 0, + Tt, + ...Lt + ) && (lr = !1); + }), lr && A0(Tt, ...Lt); + } + function w0(Oe, Ue) { + return aC(N0(), Oe, Ue); + } + function qg(Oe) { + return w0("paths", Oe); + } + function Uf(Oe, Ue) { + return w0(Oe, (Tt) => Ks(Tt.initializer) && Tt.initializer.text === Ue ? Tt.initializer : void 0); + } + function cf(Oe, Ue) { + const Tt = N0(); + return Tt && jZ(Tt, Oe, Ue); + } + function za(Oe, Ue, Tt, Lt) { + Od( + /*onKey*/ + !0, + Ue, + Tt, + Oe, + Ue, + Tt, + Lt + ); + } + function t_(Oe, Ue, ...Tt) { + Od( + /*onKey*/ + !1, + Oe, + /*option2*/ + void 0, + Ue, + ...Tt + ); + } + function S_(Oe, Ue, Tt, ...Lt) { + const lr = Yw(Oe || U.configFile, "references", (Gr) => Wl(Gr.initializer) ? Gr.initializer : void 0); + lr && lr.elements.length > Ue ? wr.add(rp(Oe || U.configFile, lr.elements[Ue], Tt, ...Lt)) : wr.add(zo(Tt, ...Lt)); + } + function Od(Oe, Ue, Tt, Lt, ...lr) { + const Gr = N0(); + (!Gr || !jy(Gr, Oe, Ue, Tt, Lt, ...lr)) && A0(Lt, ...lr); + } + function A0(Oe, ...Ue) { + const Tt = zp(); + Tt ? "messageText" in Oe ? wr.add(wg(U.configFile, Tt.name, Oe)) : wr.add(rp(U.configFile, Tt.name, Oe, ...Ue)) : "messageText" in Oe ? wr.add(t5(Oe)) : wr.add(zo(Oe, ...Ue)); + } + function N0() { + if (Zn === void 0) { + const Oe = zp(); + Zn = Oe && Jn(Oe.initializer, Gs) || !1; + } + return Zn || void 0; + } + function zp() { + return ri === void 0 && (ri = aC( + s4(U.configFile), + "compilerOptions", + lo + ) || !1), ri || void 0; + } + function jy(Oe, Ue, Tt, Lt, lr, ...Gr) { + let _r = !1; + return aC(Oe, Tt, (_n) => { + "messageText" in lr ? wr.add(wg(U.configFile, Ue ? _n.name : _n.initializer, lr)) : wr.add(rp(U.configFile, Ue ? _n.name : _n.initializer, lr, ...Gr)), _r = !0; + }, Lt), _r; + } + function I0(Oe, Ue) { + ln.set(qt(Oe), !0), wr.add(Ue); + } + function nd(Oe) { + if (U.noEmit) + return !1; + const Ue = qt(Oe); + if (Bt(Ue)) + return !1; + const Tt = U.outFile; + if (Tt) + return Hg(Ue, Tt) || Hg( + Ue, + Gu(Tt) + ".d.ts" + /* Dts */ + ); + if (U.declarationDir && Gp(U.declarationDir, Ue, Le, !Xt.useCaseSensitiveFileNames())) + return !0; + if (U.outDir) + return Gp(U.outDir, Ue, Le, !Xt.useCaseSensitiveFileNames()); + if (Lc(Ue, CC) || Ol(Ue)) { + const Lt = Gu(Ue); + return !!Bt( + Lt + ".ts" + /* Ts */ + ) || !!Bt( + Lt + ".tsx" + /* Tsx */ + ); + } + return !1; + } + function Hg(Oe, Ue) { + return oh(Oe, Ue, Le, !Xt.useCaseSensitiveFileNames()) === 0; + } + function wh() { + return Xt.getSymlinkCache ? Xt.getSymlinkCache() : (fe || (fe = ZB(Le, Cn)), pe && !fe.hasProcessedResolutions() && fe.setSymlinksFromResolutions(xt, wt, Qe), fe); + } + function Sf(Oe, Ue) { + var Tt; + const Lt = ((Tt = ur(Oe)) == null ? void 0 : Tt.commandLine.options) || U; + return FW(Oe, Ue, Lt); + } + function sg(Oe, Ue) { + return Sf(Oe, qA(Oe, Ue)); + } + } + function wRe(e) { + let t; + const n = e.compilerHost.fileExists, i = e.compilerHost.directoryExists, s = e.compilerHost.getDirectories, o = e.compilerHost.realpath; + if (!e.useSourceOfProjectReferenceRedirect) return { onProgramCreateComplete: ka, fileExists: u }; + e.compilerHost.fileExists = u; + let c; + return i && (c = e.compilerHost.directoryExists = (T) => i.call(e.compilerHost, T) ? (h(T), !0) : e.getResolvedProjectReferences() ? (t || (t = /* @__PURE__ */ new Set(), e.forEachResolvedProjectReference((C) => { + const D = C.commandLine.options.outFile; + if (D) + t.add(Xn(e.toPath(D))); + else { + const P = C.commandLine.options.declarationDir || C.commandLine.options.outDir; + P && t.add(e.toPath(P)); + } + })), S( + T, + /*isFile*/ + !1 + )) : !1), s && (e.compilerHost.getDirectories = (T) => !e.getResolvedProjectReferences() || i && i.call(e.compilerHost, T) ? s.call(e.compilerHost, T) : []), o && (e.compilerHost.realpath = (T) => { + var C; + return ((C = e.getSymlinkCache().getSymlinkedFiles()) == null ? void 0 : C.get(e.toPath(T))) || o.call(e.compilerHost, T); + }), { onProgramCreateComplete: _, fileExists: u, directoryExists: c }; + function _() { + e.compilerHost.fileExists = n, e.compilerHost.directoryExists = i, e.compilerHost.getDirectories = s; + } + function u(T) { + return n.call(e.compilerHost, T) ? !0 : !e.getResolvedProjectReferences() || !Ol(T) ? !1 : S( + T, + /*isFile*/ + !0 + ); + } + function d(T) { + const C = e.getSourceOfProjectReferenceRedirect(e.toPath(T)); + return C !== void 0 ? Gi(C) ? n.call(e.compilerHost, C) : !0 : void 0; + } + function g(T) { + const C = e.toPath(T), D = `${C}${Oo}`; + return uh( + t, + (P) => C === P || // Any parent directory of declaration dir + zi(P, D) || // Any directory inside declaration dir + zi(C, `${P}/`) + ); + } + function h(T) { + var C; + if (!e.getResolvedProjectReferences() || W4(T) || !o || !T.includes(zg)) return; + const D = e.getSymlinkCache(), P = bl(e.toPath(T)); + if ((C = D.getSymlinkedDirectories()) != null && C.has(P)) return; + const O = Cs(o.call(e.compilerHost, T)); + let j; + if (O === T || (j = bl(e.toPath(O))) === P) { + D.setSymlinkedDirectory(P, !1); + return; + } + D.setSymlinkedDirectory(T, { + real: bl(O), + realPath: j + }); + } + function S(T, C) { + var D; + const P = C ? (L) => d(L) : (L) => g(L), O = P(T); + if (O !== void 0) return O; + const j = e.getSymlinkCache(), F = j.getSymlinkedDirectories(); + if (!F) return !1; + const V = e.toPath(T); + return V.includes(zg) ? C && ((D = j.getSymlinkedFiles()) != null && D.has(V)) ? !0 : tw( + F.entries(), + ([L, $]) => { + if (!$ || !zi(V, L)) return; + const U = P(V.replace(L, $.realPath)); + if (C && U) { + const G = Xi(T, e.compilerHost.getCurrentDirectory()); + j.setSymlinkedFile( + V, + `${$.real}${G.replace(new RegExp(L, "i"), "")}` + ); + } + return U; + } + ) || !1 : !1; + } + } + var WW = { diagnostics: He, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: !0 }; + function VW(e, t, n, i) { + const s = e.getCompilerOptions(); + if (s.noEmit) + return e.getSemanticDiagnostics(t, i), t || s.outFile ? WW : e.emitBuildInfo(n, i); + if (!s.noEmitOnError) return; + let o = [ + ...e.getOptionsDiagnostics(i), + ...e.getSyntacticDiagnostics(t, i), + ...e.getGlobalDiagnostics(i), + ...e.getSemanticDiagnostics(t, i) + ]; + if (o.length === 0 && op(e.getCompilerOptions()) && (o = e.getDeclarationDiagnostics( + /*sourceFile*/ + void 0, + i + )), !o.length) return; + let c; + if (!t && !s.outFile) { + const _ = e.emitBuildInfo(n, i); + _.diagnostics && (o = [...o, ..._.diagnostics]), c = _.emittedFiles; + } + return { diagnostics: o, sourceMaps: void 0, emittedFiles: c, emitSkipped: !0 }; + } + function lF(e, t) { + return Ln(e, (n) => !n.skippedOn || !t[n.skippedOn]); + } + function uF(e, t = e) { + return { + fileExists: (n) => t.fileExists(n), + readDirectory(n, i, s, o, c) { + return E.assertIsDefined(t.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"), t.readDirectory(n, i, s, o, c); + }, + readFile: (n) => t.readFile(n), + directoryExists: Ns(t, t.directoryExists), + getDirectories: Ns(t, t.getDirectories), + realpath: Ns(t, t.realpath), + useCaseSensitiveFileNames: e.useCaseSensitiveFileNames(), + getCurrentDirectory: () => e.getCurrentDirectory(), + onUnRecoverableConfigFileDiagnostic: e.onUnRecoverableConfigFileDiagnostic || nb, + trace: e.trace ? (n) => e.trace(n) : void 0 + }; + } + function e6(e) { + return hV(e.path); + } + function UW(e, { extension: t }, { isDeclarationFile: n }) { + switch (t) { + case ".ts": + case ".d.ts": + case ".mts": + case ".d.mts": + case ".cts": + case ".d.cts": + return; + case ".tsx": + return i(); + case ".jsx": + return i() || s(); + case ".js": + case ".mjs": + case ".cjs": + return s(); + case ".json": + return o(); + default: + return c(); + } + function i() { + return e.jsx ? void 0 : p.Module_0_was_resolved_to_1_but_jsx_is_not_set; + } + function s() { + return yy(e) || !Iu(e, "noImplicitAny") ? void 0 : p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type; + } + function o() { + return kb(e) ? void 0 : p.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used; + } + function c() { + return n || e.allowArbitraryExtensions ? void 0 : p.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set; + } + } + function Ive({ imports: e, moduleAugmentations: t }) { + const n = e.map((i) => i); + for (const i of t) + i.kind === 11 && n.push(i); + return n; + } + function qA({ imports: e, moduleAugmentations: t }, n) { + if (n < e.length) return e[n]; + let i = e.length; + for (const s of t) + if (s.kind === 11) { + if (n === i) return s; + i++; + } + E.fail("should never ask for module name at index higher than possible module name"); + } + function Iie(e, t, n, i, s, o) { + const c = [], { emitSkipped: _, diagnostics: u } = e.emit(t, d, i, n, s, o); + return { outputFiles: c, emitSkipped: _, diagnostics: u }; + function d(g, h, S) { + c.push({ name: g, writeByteOrderMark: S, text: h }); + } + } + var Oie = /* @__PURE__ */ ((e) => (e[e.ComputedDts = 0] = "ComputedDts", e[e.StoredSignatureAtEmit = 1] = "StoredSignatureAtEmit", e[e.UsedVersion = 2] = "UsedVersion", e))(Oie || {}), wd; + ((e) => { + function t() { + function K(X, Z, oe) { + const ne = { + getKeys: (pe) => Z.get(pe), + getValues: (pe) => X.get(pe), + keys: () => X.keys(), + size: () => X.size, + deleteKey: (pe) => { + (oe || (oe = /* @__PURE__ */ new Set())).add(pe); + const fe = X.get(pe); + return fe ? (fe.forEach((H) => i(Z, H, pe)), X.delete(pe), !0) : !1; + }, + set: (pe, fe) => { + oe?.delete(pe); + const H = X.get(pe); + return X.set(pe, fe), H?.forEach((ae) => { + fe.has(ae) || i(Z, ae, pe); + }), fe.forEach((ae) => { + H?.has(ae) || n(Z, ae, pe); + }), ne; + } + }; + return ne; + } + return K( + /* @__PURE__ */ new Map(), + /* @__PURE__ */ new Map(), + /*deleted*/ + void 0 + ); + } + e.createManyToManyPathMap = t; + function n(K, X, Z) { + let oe = K.get(X); + oe || (oe = /* @__PURE__ */ new Set(), K.set(X, oe)), oe.add(Z); + } + function i(K, X, Z) { + const oe = K.get(X); + return oe?.delete(Z) ? (oe.size || K.delete(X), !0) : !1; + } + function s(K) { + return Ii(K.declarations, (X) => { + var Z; + return (Z = xr(X)) == null ? void 0 : Z.resolvedPath; + }); + } + function o(K, X) { + const Z = K.getSymbolAtLocation(X); + return Z && s(Z); + } + function c(K, X, Z, oe) { + return _o(K.getProjectReferenceRedirect(X) || X, Z, oe); + } + function _(K, X, Z) { + let oe; + if (X.imports && X.imports.length > 0) { + const H = K.getTypeChecker(); + for (const ae of X.imports) { + const le = o(H, ae); + le?.forEach(fe); + } + } + const ne = Xn(X.resolvedPath); + if (X.referencedFiles && X.referencedFiles.length > 0) + for (const H of X.referencedFiles) { + const ae = c(K, H.fileName, ne, Z); + fe(ae); + } + if (K.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective: H }) => { + if (!H) + return; + const ae = H.resolvedFileName, le = c(K, ae, ne, Z); + fe(le); + }, X), X.moduleAugmentations.length) { + const H = K.getTypeChecker(); + for (const ae of X.moduleAugmentations) { + if (!Ks(ae)) continue; + const le = H.getSymbolAtLocation(ae); + le && pe(le); + } + } + for (const H of K.getTypeChecker().getAmbientModules()) + H.declarations && H.declarations.length > 1 && pe(H); + return oe; + function pe(H) { + if (H.declarations) + for (const ae of H.declarations) { + const le = xr(ae); + le && le !== X && fe(le.resolvedPath); + } + } + function fe(H) { + (oe || (oe = /* @__PURE__ */ new Set())).add(H); + } + } + function u(K, X) { + return X && !X.referencedMap == !K; + } + e.canReuseOldState = u; + function d(K) { + return K.module !== 0 && !K.outFile ? t() : void 0; + } + e.createReferencedMap = d; + function g(K, X, Z) { + var oe, ne; + const pe = /* @__PURE__ */ new Map(), fe = K.getCompilerOptions(), H = d(fe), ae = u(H, X); + K.getTypeChecker(); + for (const le of K.getSourceFiles()) { + const Ae = E.checkDefined(le.version, "Program intended to be used with Builder should have source files with versions set"), ge = ae ? (oe = X.oldSignatures) == null ? void 0 : oe.get(le.resolvedPath) : void 0, de = ge === void 0 ? ae ? (ne = X.fileInfos.get(le.resolvedPath)) == null ? void 0 : ne.signature : void 0 : ge || void 0; + if (H) { + const ve = _(K, le, K.getCanonicalFileName); + ve && H.set(le.resolvedPath, ve); + } + pe.set(le.resolvedPath, { + version: Ae, + signature: de, + // No need to calculate affectsGlobalScope with --out since its not used at all + affectsGlobalScope: fe.outFile ? void 0 : $(le) || void 0, + impliedFormat: le.impliedNodeFormat + }); + } + return { + fileInfos: pe, + referencedMap: H, + useFileVersionAsSignature: !Z && !ae + }; + } + e.create = g; + function h(K) { + K.allFilesExcludingDefaultLibraryFile = void 0, K.allFileNames = void 0; + } + e.releaseCache = h; + function S(K, X, Z, oe, ne) { + var pe; + const fe = T( + K, + X, + Z, + oe, + ne + ); + return (pe = K.oldSignatures) == null || pe.clear(), fe; + } + e.getFilesAffectedBy = S; + function T(K, X, Z, oe, ne) { + const pe = X.getSourceFileByPath(Z); + return pe ? P(K, X, pe, oe, ne) ? (K.referencedMap ? ce : G)(K, X, pe, oe, ne) : [pe] : He; + } + e.getFilesAffectedByWithOldState = T; + function C(K, X, Z) { + K.fileInfos.get(Z).signature = X, (K.hasCalledUpdateShapeSignature || (K.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(Z); + } + e.updateSignatureOfFile = C; + function D(K, X, Z, oe, ne) { + K.emit( + X, + (pe, fe, H, ae, le, Ae) => { + E.assert(Ol(pe), `File extension for signature expected to be dts: Got:: ${pe}`), ne( + qW( + K, + X, + fe, + oe, + Ae + ), + le + ); + }, + Z, + /*emitOnly*/ + !0, + /*customTransformers*/ + void 0, + /*forceDtsEmit*/ + !0 + ); + } + e.computeDtsSignature = D; + function P(K, X, Z, oe, ne, pe = K.useFileVersionAsSignature) { + var fe; + if ((fe = K.hasCalledUpdateShapeSignature) != null && fe.has(Z.resolvedPath)) return !1; + const H = K.fileInfos.get(Z.resolvedPath), ae = H.signature; + let le; + return !Z.isDeclarationFile && !pe && D(X, Z, oe, ne, (Ae) => { + le = Ae, ne.storeSignatureInfo && (K.signatureInfo ?? (K.signatureInfo = /* @__PURE__ */ new Map())).set( + Z.resolvedPath, + 0 + /* ComputedDts */ + ); + }), le === void 0 && (le = Z.version, ne.storeSignatureInfo && (K.signatureInfo ?? (K.signatureInfo = /* @__PURE__ */ new Map())).set( + Z.resolvedPath, + 2 + /* UsedVersion */ + )), (K.oldSignatures || (K.oldSignatures = /* @__PURE__ */ new Map())).set(Z.resolvedPath, ae || !1), (K.hasCalledUpdateShapeSignature || (K.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(Z.resolvedPath), H.signature = le, le !== ae; + } + e.updateShapeSignature = P; + function O(K, X, Z) { + if (X.getCompilerOptions().outFile || !K.referencedMap || $(Z)) + return j(K, X); + const ne = /* @__PURE__ */ new Set(), pe = [Z.resolvedPath]; + for (; pe.length; ) { + const fe = pe.pop(); + if (!ne.has(fe)) { + ne.add(fe); + const H = K.referencedMap.getValues(fe); + if (H) + for (const ae of H.keys()) + pe.push(ae); + } + } + return ts(P1(ne.keys(), (fe) => { + var H; + return ((H = X.getSourceFileByPath(fe)) == null ? void 0 : H.fileName) ?? fe; + })); + } + e.getAllDependencies = O; + function j(K, X) { + if (!K.allFileNames) { + const Z = X.getSourceFiles(); + K.allFileNames = Z === He ? He : Z.map((oe) => oe.fileName); + } + return K.allFileNames; + } + function F(K, X) { + const Z = K.referencedMap.getKeys(X); + return Z ? ts(Z.keys()) : []; + } + e.getReferencedByPaths = F; + function V(K) { + for (const X of K.statements) + if (!a7(X)) + return !1; + return !0; + } + function L(K) { + return ut(K.moduleAugmentations, (X) => Zd(X.parent)); + } + function $(K) { + return L(K) || !A_(K) && !Ap(K) && !V(K); + } + function U(K, X, Z) { + if (K.allFilesExcludingDefaultLibraryFile) + return K.allFilesExcludingDefaultLibraryFile; + let oe; + Z && ne(Z); + for (const pe of X.getSourceFiles()) + pe !== Z && ne(pe); + return K.allFilesExcludingDefaultLibraryFile = oe || He, K.allFilesExcludingDefaultLibraryFile; + function ne(pe) { + X.isSourceFileDefaultLibrary(pe) || (oe || (oe = [])).push(pe); + } + } + e.getAllFilesExcludingDefaultLibraryFile = U; + function G(K, X, Z) { + const oe = X.getCompilerOptions(); + return oe && oe.outFile ? [Z] : U(K, X, Z); + } + function ce(K, X, Z, oe, ne) { + if ($(Z)) + return U(K, X, Z); + const pe = X.getCompilerOptions(); + if (pe && (ap(pe) || pe.outFile)) + return [Z]; + const fe = /* @__PURE__ */ new Map(); + fe.set(Z.resolvedPath, Z); + const H = F(K, Z.resolvedPath); + for (; H.length > 0; ) { + const ae = H.pop(); + if (!fe.has(ae)) { + const le = X.getSourceFileByPath(ae); + fe.set(ae, le), le && P(K, X, le, oe, ne) && H.push(...F(K, le.resolvedPath)); + } + } + return ts(P1(fe.values(), (ae) => ae)); + } + })(wd || (wd = {})); + var Fie = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Js = 1] = "Js", e[e.JsMap = 2] = "JsMap", e[e.JsInlineMap = 4] = "JsInlineMap", e[e.Dts = 8] = "Dts", e[e.DtsMap = 16] = "DtsMap", e[e.AllJs = 7] = "AllJs", e[e.AllDts = 24] = "AllDts", e[e.All = 31] = "All", e))(Fie || {}); + function Oy(e) { + let t = 1; + return e.sourceMap && (t = t | 2), e.inlineSourceMap && (t = t | 4), op(e) && (t = t | 8), e.declarationMap && (t = t | 16), e.emitDeclarationOnly && (t = t & 24), t; + } + function t6(e, t) { + const n = t && (iy(t) ? t : Oy(t)), i = iy(e) ? e : Oy(e); + if (n === i) return 0; + if (!n || !i) return i; + const s = n ^ i; + let o = 0; + return s & 7 && (o = i & 7), s & 24 && (o = o | i & 24), o; + } + function ARe(e, t) { + return e === t || e !== void 0 && t !== void 0 && e.size === t.size && !uh(e, (n) => !t.has(n)); + } + function NRe(e, t) { + var n, i; + const s = wd.create( + e, + t, + /*disableUseFileVersionAsSignature*/ + !1 + ); + s.program = e; + const o = e.getCompilerOptions(); + s.compilerOptions = o; + const c = o.outFile; + c ? o.composite && t?.outSignature && c === t.compilerOptions.outFile && (s.outSignature = t.outSignature && Fve(o, t.compilerOptions, t.outSignature)) : s.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(), s.changedFilesSet = /* @__PURE__ */ new Set(), s.latestChangedDtsFile = o.composite ? t?.latestChangedDtsFile : void 0; + const _ = wd.canReuseOldState(s.referencedMap, t), u = _ ? t.compilerOptions : void 0, d = _ && t.semanticDiagnosticsPerFile && !!s.semanticDiagnosticsPerFile && !XK(o, u), g = o.composite && t?.emitSignatures && !c && !YK(o, t.compilerOptions); + _ ? ((n = t.changedFilesSet) == null || n.forEach((D) => s.changedFilesSet.add(D)), !c && ((i = t.affectedFilesPendingEmit) != null && i.size) && (s.affectedFilesPendingEmit = new Map(t.affectedFilesPendingEmit), s.seenAffectedFiles = /* @__PURE__ */ new Set()), s.programEmitPending = t.programEmitPending) : s.buildInfoEmitPending = !0; + const h = s.referencedMap, S = _ ? t.referencedMap : void 0, T = d && !o.skipLibCheck == !u.skipLibCheck, C = T && !o.skipDefaultLibCheck == !u.skipDefaultLibCheck; + if (s.fileInfos.forEach((D, P) => { + var O; + let j, F; + if (!_ || // File wasn't present in old state + !(j = t.fileInfos.get(P)) || // versions dont match + j.version !== D.version || // Implied formats dont match + j.impliedFormat !== D.impliedFormat || // Referenced files changed + !ARe(F = h && h.getValues(P), S && S.getValues(P)) || // Referenced file was deleted in the new program + F && uh(F, (V) => !s.fileInfos.has(V) && t.fileInfos.has(V))) + Ove(s, P); + else { + const V = e.getSourceFileByPath(P), L = (O = t.emitDiagnosticsPerFile) == null ? void 0 : O.get(P); + if (L && (s.emitDiagnosticsPerFile ?? (s.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set( + P, + t.hasReusableDiagnostic ? Rve(L, P, e) : Lve(L, e) + ), d) { + if (V.isDeclarationFile && !T || V.hasNoDefaultLib && !C) return; + const $ = t.semanticDiagnosticsPerFile.get(P); + $ && (s.semanticDiagnosticsPerFile.set( + P, + t.hasReusableDiagnostic ? Rve($, P, e) : Lve($, e) + ), (s.semanticDiagnosticsFromOldState ?? (s.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set())).add(P)); + } + } + if (g) { + const V = t.emitSignatures.get(P); + V && (s.emitSignatures ?? (s.emitSignatures = /* @__PURE__ */ new Map())).set(P, Fve(o, t.compilerOptions, V)); + } + }), _ && Dl(t.fileInfos, (D, P) => s.fileInfos.has(P) ? !1 : c || D.affectsGlobalScope ? !0 : (s.buildInfoEmitPending = !0, !1))) + wd.getAllFilesExcludingDefaultLibraryFile( + s, + e, + /*firstSourceFile*/ + void 0 + ).forEach((D) => Ove(s, D.resolvedPath)); + else if (u) { + const D = QK(o, u) ? Oy(o) : t6(o, u); + D !== 0 && (c ? s.programEmitPending = s.programEmitPending ? s.programEmitPending | D : D : (e.getSourceFiles().forEach((P) => { + s.changedFilesSet.has(P.resolvedPath) || GW( + s, + P.resolvedPath, + D + ); + }), E.assert(!s.seenAffectedFiles || !s.seenAffectedFiles.size), s.seenAffectedFiles = s.seenAffectedFiles || /* @__PURE__ */ new Set(), s.buildInfoEmitPending = !0)); + } + return s; + } + function Ove(e, t) { + e.changedFilesSet.add(t), e.buildInfoEmitPending = !0, e.programEmitPending = void 0; + } + function Fve(e, t, n) { + return !!e.declarationMap == !!t.declarationMap ? ( + // Use same format of signature + n + ) : ( + // Convert to different format + Gi(n) ? [n] : n[0] + ); + } + function Lve(e, t) { + return e.length ? Zc(e, (n) => { + if (Gi(n.messageText)) return n; + const i = Lie(n.messageText, n.file, t, (s) => { + var o; + return (o = s.repopulateInfo) == null ? void 0 : o.call(s); + }); + return i === n.messageText ? n : { ...n, messageText: i }; + }) : e; + } + function Lie(e, t, n, i) { + const s = i(e); + if (s) + return { + ...e7(t, n, s.moduleReference, s.mode, s.packageName || s.moduleReference), + next: Mve(e.next, t, n, i) + }; + const o = Mve(e.next, t, n, i); + return o === e.next ? e : { ...e, next: o }; + } + function Mve(e, t, n, i) { + return Zc(e, (s) => Lie(s, t, n, i)); + } + function Rve(e, t, n) { + if (!e.length) return He; + let i; + return e.map((o) => { + const c = jve(o, t, n, s); + c.reportsUnnecessary = o.reportsUnnecessary, c.reportsDeprecated = o.reportDeprecated, c.source = o.source, c.skippedOn = o.skippedOn; + const { relatedInformation: _ } = o; + return c.relatedInformation = _ ? _.length ? _.map((u) => jve(u, t, n, s)) : [] : void 0, c; + }); + function s(o) { + return i ?? (i = Xn(Xi(S0(n.getCompilerOptions()), n.getCurrentDirectory()))), _o(o, i, n.getCanonicalFileName); + } + } + function jve(e, t, n, i) { + const { file: s } = e, o = s !== !1 ? n.getSourceFileByPath(s ? i(s) : t) : void 0; + return { + ...e, + file: o, + messageText: Gi(e.messageText) ? e.messageText : Lie(e.messageText, o, n, (c) => c.info) + }; + } + function IRe(e) { + wd.releaseCache(e), e.program = void 0; + } + function ORe(e) { + const t = e.compilerOptions.outFile; + return E.assert(!e.changedFilesSet.size || t), { + affectedFilesPendingEmit: e.affectedFilesPendingEmit && new Map(e.affectedFilesPendingEmit), + seenEmittedFiles: e.seenEmittedFiles && new Map(e.seenEmittedFiles), + programEmitPending: e.programEmitPending, + emitSignatures: e.emitSignatures && new Map(e.emitSignatures), + outSignature: e.outSignature, + latestChangedDtsFile: e.latestChangedDtsFile, + hasChangedEmitSignature: e.hasChangedEmitSignature, + changedFilesSet: t ? new Set(e.changedFilesSet) : void 0, + buildInfoEmitPending: e.buildInfoEmitPending, + emitDiagnosticsPerFile: e.emitDiagnosticsPerFile && new Map(e.emitDiagnosticsPerFile) + }; + } + function FRe(e, t) { + e.affectedFilesPendingEmit = t.affectedFilesPendingEmit, e.seenEmittedFiles = t.seenEmittedFiles, e.programEmitPending = t.programEmitPending, e.emitSignatures = t.emitSignatures, e.outSignature = t.outSignature, e.latestChangedDtsFile = t.latestChangedDtsFile, e.hasChangedEmitSignature = t.hasChangedEmitSignature, e.buildInfoEmitPending = t.buildInfoEmitPending, e.emitDiagnosticsPerFile = t.emitDiagnosticsPerFile, t.changedFilesSet && (e.changedFilesSet = t.changedFilesSet); + } + function Bve(e, t) { + E.assert(!t || !e.affectedFiles || e.affectedFiles[e.affectedFilesIndex - 1] !== t || !e.semanticDiagnosticsPerFile.has(t.resolvedPath)); + } + function Jve(e, t, n) { + for (var i; ; ) { + const { affectedFiles: s } = e; + if (s) { + const u = e.seenAffectedFiles; + let d = e.affectedFilesIndex; + for (; d < s.length; ) { + const g = s[d]; + if (!u.has(g.resolvedPath)) + return e.affectedFilesIndex = d, GW(e, g.resolvedPath, Oy(e.compilerOptions)), jRe( + e, + g, + t, + n + ), g; + d++; + } + e.changedFilesSet.delete(e.currentChangedFilePath), e.currentChangedFilePath = void 0, (i = e.oldSignatures) == null || i.clear(), e.affectedFiles = void 0; + } + const o = e.changedFilesSet.keys().next(); + if (o.done) + return; + const c = E.checkDefined(e.program); + if (c.getCompilerOptions().outFile) + return E.assert(!e.semanticDiagnosticsPerFile), c; + e.affectedFiles = wd.getFilesAffectedByWithOldState( + e, + c, + o.value, + t, + n + ), e.currentChangedFilePath = o.value, e.affectedFilesIndex = 0, e.seenAffectedFiles || (e.seenAffectedFiles = /* @__PURE__ */ new Set()); + } + } + function LRe(e, t) { + var n; + if ((n = e.affectedFilesPendingEmit) != null && n.size) { + if (!t) return e.affectedFilesPendingEmit = void 0; + e.affectedFilesPendingEmit.forEach((i, s) => { + const o = i & 7; + o ? e.affectedFilesPendingEmit.set(s, o) : e.affectedFilesPendingEmit.delete(s); + }); + } + } + function MRe(e, t) { + var n; + if ((n = e.affectedFilesPendingEmit) != null && n.size) + return Dl(e.affectedFilesPendingEmit, (i, s) => { + var o; + const c = e.program.getSourceFileByPath(s); + if (!c || !Z2(c, e.program)) { + e.affectedFilesPendingEmit.delete(s); + return; + } + const _ = (o = e.seenEmittedFiles) == null ? void 0 : o.get(c.resolvedPath); + let u = t6(i, _); + if (t && (u = u & 24), u) return { affectedFile: c, emitKind: u }; + }); + } + function RRe(e) { + var t; + if ((t = e.emitDiagnosticsPerFile) != null && t.size) + return Dl(e.emitDiagnosticsPerFile, (n, i) => { + var s; + const o = e.program.getSourceFileByPath(i); + if (!o || !Z2(o, e.program)) { + e.emitDiagnosticsPerFile.delete(i); + return; + } + const c = ((s = e.seenEmittedFiles) == null ? void 0 : s.get(o.resolvedPath)) || 0; + if (!(c & 24)) return { affectedFile: o, diagnostics: n, seenKind: c }; + }); + } + function zve(e) { + if (!e.cleanedDiagnosticsOfLibFiles) { + e.cleanedDiagnosticsOfLibFiles = !0; + const t = E.checkDefined(e.program), n = t.getCompilerOptions(); + rr(t.getSourceFiles(), (i) => t.isSourceFileDefaultLibrary(i) && !B4(i, n, t) && Rie(e, i.resolvedPath)); + } + } + function jRe(e, t, n, i) { + if (Rie(e, t.resolvedPath), e.allFilesExcludingDefaultLibraryFile === e.affectedFiles) { + zve(e), wd.updateShapeSignature( + e, + E.checkDefined(e.program), + t, + n, + i + ); + return; + } + e.compilerOptions.assumeChangesOnlyAffectDirectDependencies || BRe( + e, + t, + n, + i + ); + } + function Mie(e, t, n, i, s) { + if (Rie(e, t), !e.changedFilesSet.has(t)) { + const o = E.checkDefined(e.program), c = o.getSourceFileByPath(t); + c && (wd.updateShapeSignature( + e, + o, + c, + i, + s, + /*useFileVersionAsSignature*/ + !0 + ), n ? GW(e, t, Oy(e.compilerOptions)) : op(e.compilerOptions) && GW( + e, + t, + e.compilerOptions.declarationMap ? 24 : 8 + /* Dts */ + )); + } + } + function Rie(e, t) { + return e.semanticDiagnosticsFromOldState ? (e.semanticDiagnosticsFromOldState.delete(t), e.semanticDiagnosticsPerFile.delete(t), !e.semanticDiagnosticsFromOldState.size) : !0; + } + function Wve(e, t) { + const n = E.checkDefined(e.oldSignatures).get(t) || void 0; + return E.checkDefined(e.fileInfos.get(t)).signature !== n; + } + function jie(e, t, n, i, s) { + var o; + return (o = e.fileInfos.get(t)) != null && o.affectsGlobalScope ? (wd.getAllFilesExcludingDefaultLibraryFile( + e, + e.program, + /*firstSourceFile*/ + void 0 + ).forEach( + (c) => Mie( + e, + c.resolvedPath, + n, + i, + s + ) + ), zve(e), !0) : !1; + } + function BRe(e, t, n, i) { + var s, o; + if (!e.referencedMap || !e.changedFilesSet.has(t.resolvedPath) || !Wve(e, t.resolvedPath)) return; + if (ap(e.compilerOptions)) { + const u = /* @__PURE__ */ new Map(); + u.set(t.resolvedPath, !0); + const d = wd.getReferencedByPaths(e, t.resolvedPath); + for (; d.length > 0; ) { + const g = d.pop(); + if (!u.has(g)) { + if (u.set(g, !0), jie( + e, + g, + /*invalidateJsFiles*/ + !1, + n, + i + )) return; + if (Mie( + e, + g, + /*invalidateJsFiles*/ + !1, + n, + i + ), Wve(e, g)) { + const h = E.checkDefined(e.program).getSourceFileByPath(g); + d.push(...wd.getReferencedByPaths(e, h.resolvedPath)); + } + } + } + } + const c = /* @__PURE__ */ new Set(), _ = !!((s = t.symbol) != null && s.exports) && !!Dl( + t.symbol.exports, + (u) => { + if (u.flags & 128) return !0; + const d = Jl(u, e.program.getTypeChecker()); + return d === u ? !1 : (d.flags & 128) !== 0 && ut(d.declarations, (g) => xr(g) === t); + } + ); + (o = e.referencedMap.getKeys(t.resolvedPath)) == null || o.forEach((u) => { + if (jie(e, u, _, n, i)) return !0; + const d = e.referencedMap.getKeys(u); + return d && uh(d, (g) => Vve( + e, + g, + _, + c, + n, + i + )); + }); + } + function Vve(e, t, n, i, s, o) { + var c; + if (ih(i, t)) { + if (jie(e, t, n, s, o)) return !0; + Mie(e, t, n, s, o), (c = e.referencedMap.getKeys(t)) == null || c.forEach( + (_) => Vve( + e, + _, + n, + i, + s, + o + ) + ); + } + } + function Bie(e, t, n) { + return Hi( + JRe(e, t, n), + E.checkDefined(e.program).getProgramDiagnostics(t) + ); + } + function JRe(e, t, n) { + const i = t.resolvedPath; + if (e.semanticDiagnosticsPerFile) { + const o = e.semanticDiagnosticsPerFile.get(i); + if (o) + return lF(o, e.compilerOptions); + } + const s = E.checkDefined(e.program).getBindAndCheckDiagnostics(t, n); + return e.semanticDiagnosticsPerFile && e.semanticDiagnosticsPerFile.set(i, s), lF(s, e.compilerOptions); + } + function Jie(e) { + var t; + return !!((t = e.options) != null && t.outFile); + } + function zRe(e) { + var t, n; + const i = E.checkDefined(e.program).getCurrentDirectory(), s = Xn(Xi(S0(e.compilerOptions), i)), o = e.latestChangedDtsFile ? V(e.latestChangedDtsFile) : void 0, c = [], _ = /* @__PURE__ */ new Map(), u = new Set(e.program.getRootFileNames().map((ae) => _o(ae, i, e.program.getCanonicalFileName))), d = []; + if (e.compilerOptions.outFile) { + const ae = ts(e.fileInfos.entries(), ([Ae, ge]) => { + const de = $(Ae); + return G(Ae, de), ge.impliedFormat ? { version: ge.version, impliedFormat: ge.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : ge.version; + }), le = { + fileNames: c, + fileInfos: ae, + root: d, + resolvedRoot: ce(), + options: K(e.compilerOptions), + outSignature: e.outSignature, + latestChangedDtsFile: o, + pendingEmit: e.programEmitPending ? ( + // Pending is undefined or None is encoded as undefined + e.programEmitPending === Oy(e.compilerOptions) ? !1 : ( + // Pending emit is same as deteremined by compilerOptions + e.programEmitPending + ) + ) : void 0 + // Actual value + }; + return KO(le); + } + let g, h, S; + const T = ts(e.fileInfos.entries(), ([ae, le]) => { + var Ae, ge; + const de = $(ae); + G(ae, de), E.assert(c[de - 1] === L(ae)); + const ve = (Ae = e.oldSignatures) == null ? void 0 : Ae.get(ae), De = ve !== void 0 ? ve || void 0 : le.signature; + if (e.compilerOptions.composite) { + const Xe = e.program.getSourceFileByPath(ae); + if (!Ap(Xe) && Z2(Xe, e.program)) { + const Ie = (ge = e.emitSignatures) == null ? void 0 : ge.get(ae); + Ie !== De && (S = Tr( + S, + Ie === void 0 ? de : ( + // There is no emit, encode as false + // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature + [de, !Gi(Ie) && Ie[0] === De ? He : Ie] + ) + )); + } + } + return le.version === De ? le.affectsGlobalScope || le.impliedFormat ? ( + // If file version is same as signature, dont serialize signature + { version: le.version, signature: void 0, affectsGlobalScope: le.affectsGlobalScope, impliedFormat: le.impliedFormat } + ) : ( + // If file info only contains version and signature and both are same we can just write string + le.version + ) : De !== void 0 ? ( + // If signature is not same as version, encode signature in the fileInfo + ve === void 0 ? ( + // If we havent computed signature, use fileInfo as is + le + ) : ( + // Serialize fileInfo with new updated signature + { version: le.version, signature: De, affectsGlobalScope: le.affectsGlobalScope, impliedFormat: le.impliedFormat } + ) + ) : ( + // Signature of the FileInfo is undefined, serialize it as false + { version: le.version, signature: !1, affectsGlobalScope: le.affectsGlobalScope, impliedFormat: le.impliedFormat } + ); + }); + let C; + (t = e.referencedMap) != null && t.size() && (C = ts(e.referencedMap.keys()).sort(Kl).map((ae) => [ + $(ae), + U(e.referencedMap.getValues(ae)) + ])); + const D = Z(); + let P; + if ((n = e.affectedFilesPendingEmit) != null && n.size) { + const ae = Oy(e.compilerOptions), le = /* @__PURE__ */ new Set(); + for (const Ae of ts(e.affectedFilesPendingEmit.keys()).sort(Kl)) + if (ih(le, Ae)) { + const ge = e.program.getSourceFileByPath(Ae); + if (!ge || !Z2(ge, e.program)) continue; + const de = $(Ae), ve = e.affectedFilesPendingEmit.get(Ae); + P = Tr( + P, + ve === ae ? de : ( + // Pending full emit per options + ve === 8 ? [de] : ( + // Pending on Dts only + [de, ve] + ) + ) + // Anything else + ); + } + } + let O; + if (e.changedFilesSet.size) + for (const ae of ts(e.changedFilesSet.keys()).sort(Kl)) + O = Tr(O, $(ae)); + const j = oe(), F = { + fileNames: c, + fileInfos: T, + root: d, + resolvedRoot: ce(), + options: K(e.compilerOptions), + fileIdsList: g, + referencedMap: C, + semanticDiagnosticsPerFile: D, + emitDiagnosticsPerFile: j, + affectedFilesPendingEmit: P, + changeFileSet: O, + emitSignatures: S, + latestChangedDtsFile: o + }; + return KO(F); + function V(ae) { + return L(Xi(ae, i)); + } + function L(ae) { + return j2(hd(s, ae, e.program.getCanonicalFileName)); + } + function $(ae) { + let le = _.get(ae); + return le === void 0 && (c.push(L(ae)), _.set(ae, le = c.length)), le; + } + function U(ae) { + const le = ts(ae.keys(), $).sort(uo), Ae = le.join(); + let ge = h?.get(Ae); + return ge === void 0 && (g = Tr(g, le), (h ?? (h = /* @__PURE__ */ new Map())).set(Ae, ge = g.length)), ge; + } + function G(ae, le) { + const Ae = e.program.getSourceFile(ae); + if (!e.program.getFileIncludeReasons().get(Ae.path).some( + (De) => De.kind === 0 + /* RootFile */ + )) return; + if (!d.length) return d.push(le); + const ge = d[d.length - 1], de = ss(ge); + if (de && ge[1] === le - 1) return ge[1] = le; + if (de || d.length === 1 || ge !== le - 1) return d.push(le); + const ve = d[d.length - 2]; + return !iy(ve) || ve !== ge - 1 ? d.push(le) : (d[d.length - 2] = [ve, le], d.length = d.length - 1); + } + function ce() { + let ae; + return u.forEach((le) => { + const Ae = e.program.getSourceFileByPath(le); + Ae && le !== Ae.resolvedPath && (ae = Tr(ae, [$(Ae.resolvedPath), $(le)])); + }), ae; + } + function K(ae) { + let le; + const { optionsNameMap: Ae } = WC(); + for (const ge of Gd(ae).sort(Kl)) { + const de = Ae.get(ge.toLowerCase()); + de?.affectsBuildInfo && ((le || (le = {}))[ge] = X( + de, + ae[ge] + )); + } + return le; + } + function X(ae, le) { + if (ae) { + if (E.assert(ae.type !== "listOrElement"), ae.type === "list") { + const Ae = le; + if (ae.element.isFilePath && Ae.length) + return Ae.map(V); + } else if (ae.isFilePath) + return V(le); + } + return le; + } + function Z() { + let ae; + return e.fileInfos.forEach((le, Ae) => { + var ge; + const de = (ge = e.semanticDiagnosticsPerFile) == null ? void 0 : ge.get(Ae); + de ? de.length && (ae = Tr(ae, [ + $(Ae), + ne(de, Ae) + ])) : e.changedFilesSet.has(Ae) || (ae = Tr(ae, $(Ae))); + }), ae; + } + function oe() { + var ae; + let le; + if (!((ae = e.emitDiagnosticsPerFile) != null && ae.size)) return le; + for (const Ae of ts(e.emitDiagnosticsPerFile.keys()).sort(Kl)) { + const ge = e.emitDiagnosticsPerFile.get(Ae); + le = Tr(le, [ + $(Ae), + ne(ge, Ae) + ]); + } + return le; + } + function ne(ae, le) { + return E.assert(!!ae.length), ae.map((Ae) => { + const ge = pe(Ae, le); + ge.reportsUnnecessary = Ae.reportsUnnecessary, ge.reportDeprecated = Ae.reportsDeprecated, ge.source = Ae.source, ge.skippedOn = Ae.skippedOn; + const { relatedInformation: de } = Ae; + return ge.relatedInformation = de ? de.length ? de.map((ve) => pe(ve, le)) : [] : void 0, ge; + }); + } + function pe(ae, le) { + const { file: Ae } = ae; + return { + ...ae, + file: Ae ? Ae.resolvedPath === le ? void 0 : L(Ae.resolvedPath) : !1, + messageText: Gi(ae.messageText) ? ae.messageText : fe(ae.messageText) + }; + } + function fe(ae) { + if (ae.repopulateInfo) + return { + info: ae.repopulateInfo(), + next: H(ae.next) + }; + const le = H(ae.next); + return le === ae.next ? ae : { ...ae, next: le }; + } + function H(ae) { + return ae && (rr(ae, (le, Ae) => { + const ge = fe(le); + if (le === ge) return; + const de = Ae > 0 ? ae.slice(0, Ae - 1) : []; + de.push(ge); + for (let ve = Ae + 1; ve < ae.length; ve++) + de.push(fe(ae[ve])); + return de; + }) || ae); + } + } + var zie = /* @__PURE__ */ ((e) => (e[e.SemanticDiagnosticsBuilderProgram = 0] = "SemanticDiagnosticsBuilderProgram", e[e.EmitAndSemanticDiagnosticsBuilderProgram = 1] = "EmitAndSemanticDiagnosticsBuilderProgram", e))(zie || {}); + function _F(e, t, n, i, s, o) { + let c, _, u; + return e === void 0 ? (E.assert(t === void 0), c = n, u = i, E.assert(!!u), _ = u.getProgram()) : ss(e) ? (u = i, _ = UA({ + rootNames: e, + options: t, + host: n, + oldProgram: u && u.getProgramOrUndefined(), + configFileParsingDiagnostics: s, + projectReferences: o + }), c = n) : (_ = e, c = t, u = n, s = i), { host: c, newProgram: _, oldProgram: u, configFileParsingDiagnostics: s || He }; + } + function Uve(e, t) { + return t?.sourceMapUrlPos !== void 0 ? e.substring(0, t.sourceMapUrlPos) : e; + } + function qW(e, t, n, i, s) { + var o; + n = Uve(n, s); + let c; + return (o = s?.diagnostics) != null && o.length && (n += s.diagnostics.map((d) => `${u(d)}${bI[d.category]}${d.code}: ${_(d.messageText)}`).join(` +`)), (i.createHash ?? IE)(n); + function _(d) { + return Gi(d) ? d : d === void 0 ? "" : d.next ? d.messageText + d.next.map(_).join(` +`) : d.messageText; + } + function u(d) { + return d.file.resolvedPath === t.resolvedPath ? `(${d.start},${d.length})` : (c === void 0 && (c = Xn(t.resolvedPath)), `${j2(hd( + c, + d.file.resolvedPath, + e.getCanonicalFileName + ))}(${d.start},${d.length})`); + } + } + function Wie(e, t, n) { + return (t.createHash ?? IE)(Uve(e, n)); + } + function HW(e, { newProgram: t, host: n, oldProgram: i, configFileParsingDiagnostics: s }) { + let o = i && i.getState(); + if (o && t === o.program && s === t.getConfigFileParsingDiagnostics()) + return t = void 0, o = void 0, i; + const c = NRe(t, o); + t.getBuildInfo = () => zRe(c), t = void 0, i = void 0, o = void 0; + const _ = () => c, u = XW(_, s); + return u.getState = _, u.saveEmitState = () => ORe(c), u.restoreEmitState = (D) => FRe(c, D), u.hasChangedEmitSignature = () => !!c.hasChangedEmitSignature, u.getAllDependencies = (D) => wd.getAllDependencies(c, E.checkDefined(c.program), D), u.getSemanticDiagnostics = C, u.emit = S, u.releaseProgram = () => IRe(c), e === 0 ? u.getSemanticDiagnosticsOfNextAffectedFile = T : e === 1 ? (u.getSemanticDiagnosticsOfNextAffectedFile = T, u.emitNextAffectedFile = g, u.emitBuildInfo = d) : Rs(), u; + function d(D, P) { + if (c.buildInfoEmitPending) { + const O = E.checkDefined(c.program).emitBuildInfo(D || Ns(n, n.writeFile), P); + return c.buildInfoEmitPending = !1, O; + } + return WW; + } + function g(D, P, O, j) { + var F, V, L; + let $ = Jve(c, P, n); + const U = Oy(c.compilerOptions); + let G = O ? U & 24 : U; + if (!$) + if (c.compilerOptions.outFile) { + if (!c.programEmitPending || (G = c.programEmitPending, O && (G = G & 24), !G)) return; + $ = c.program; + } else { + const X = MRe(c, O); + if (!X) { + const Z = RRe(c); + if (Z) + return (c.seenEmittedFiles ?? (c.seenEmittedFiles = /* @__PURE__ */ new Map())).set( + Z.affectedFile.resolvedPath, + Z.seenKind | 24 + /* AllDts */ + ), { + result: { emitSkipped: !0, diagnostics: Z.diagnostics }, + affected: Z.affectedFile + }; + if (!c.buildInfoEmitPending) return; + const oe = c.program, ne = oe.emitBuildInfo(D || Ns(n, n.writeFile), P); + return c.buildInfoEmitPending = !1, { result: ne, affected: oe }; + } + ({ affectedFile: $, emitKind: G } = X); + } + let ce; + G & 7 && (ce = 0), G & 24 && (ce = ce === void 0 ? 1 : void 0), $ === c.program && (c.programEmitPending = c.changedFilesSet.size ? t6(U, G) : c.programEmitPending ? t6(c.programEmitPending, G) : void 0); + const K = c.program.emit( + $ === c.program ? void 0 : $, + h(D, j), + P, + ce, + j + ); + if ($ !== c.program) { + const X = $; + c.seenAffectedFiles.add(X.resolvedPath), c.affectedFilesIndex !== void 0 && c.affectedFilesIndex++, c.buildInfoEmitPending = !0; + const Z = ((F = c.seenEmittedFiles) == null ? void 0 : F.get(X.resolvedPath)) || 0; + (c.seenEmittedFiles ?? (c.seenEmittedFiles = /* @__PURE__ */ new Map())).set(X.resolvedPath, G | Z); + const oe = ((V = c.affectedFilesPendingEmit) == null ? void 0 : V.get(X.resolvedPath)) || U, ne = t6(oe, G | Z); + ne ? (c.affectedFilesPendingEmit ?? (c.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(X.resolvedPath, ne) : (L = c.affectedFilesPendingEmit) == null || L.delete(X.resolvedPath), K.diagnostics.length && (c.emitDiagnosticsPerFile ?? (c.emitDiagnosticsPerFile = /* @__PURE__ */ new Map())).set(X.resolvedPath, K.diagnostics); + } else + c.changedFilesSet.clear(); + return { result: K, affected: $ }; + } + function h(D, P) { + return op(c.compilerOptions) ? (O, j, F, V, L, $) => { + var U, G, ce; + if (Ol(O)) + if (c.compilerOptions.outFile) { + if (c.compilerOptions.composite) { + const X = K( + c.outSignature, + /*newSignature*/ + void 0 + ); + if (!X) return; + c.outSignature = X; + } + } else { + E.assert(L?.length === 1); + let X; + if (!P) { + const Z = L[0], oe = c.fileInfos.get(Z.resolvedPath); + if (oe.signature === Z.version) { + const ne = qW( + c.program, + Z, + j, + n, + $ + ); + (U = $?.diagnostics) != null && U.length || (X = ne), ne !== Z.version && (n.storeSignatureInfo && (c.signatureInfo ?? (c.signatureInfo = /* @__PURE__ */ new Map())).set( + Z.resolvedPath, + 1 + /* StoredSignatureAtEmit */ + ), c.affectedFiles && ((G = c.oldSignatures) == null ? void 0 : G.get(Z.resolvedPath)) === void 0 && (c.oldSignatures ?? (c.oldSignatures = /* @__PURE__ */ new Map())).set(Z.resolvedPath, oe.signature || !1), oe.signature = ne); + } + } + if (c.compilerOptions.composite) { + const Z = L[0].resolvedPath; + if (X = K((ce = c.emitSignatures) == null ? void 0 : ce.get(Z), X), !X) return; + (c.emitSignatures ?? (c.emitSignatures = /* @__PURE__ */ new Map())).set(Z, X); + } + } + D ? D(O, j, F, V, L, $) : n.writeFile ? n.writeFile(O, j, F, V, L, $) : c.program.writeFile(O, j, F, V, L, $); + function K(X, Z) { + const oe = !X || Gi(X) ? X : X[0]; + if (Z ?? (Z = Wie(j, n, $)), Z === oe) { + if (X === oe) return; + $ ? $.differsOnlyInMap = !0 : $ = { differsOnlyInMap: !0 }; + } else + c.hasChangedEmitSignature = !0, c.latestChangedDtsFile = O; + return Z; + } + } : D || Ns(n, n.writeFile); + } + function S(D, P, O, j, F) { + e === 1 && Bve(c, D); + const V = VW(u, D, P, O); + if (V) return V; + if (!D) + if (e === 1) { + let L = [], $ = !1, U, G = [], ce; + for (; ce = g(P, O, j, F); ) + $ = $ || ce.result.emitSkipped, U = Bn(U, ce.result.diagnostics), G = Bn(G, ce.result.emittedFiles), L = Bn(L, ce.result.sourceMaps); + return { + emitSkipped: $, + diagnostics: U || He, + emittedFiles: G, + sourceMaps: L + }; + } else + LRe(c, j); + return E.checkDefined(c.program).emit( + D, + h(P, F), + O, + j, + F + ); + } + function T(D, P) { + for (; ; ) { + const O = Jve(c, D, n); + let j; + if (O) if (O !== c.program) { + const F = O; + if ((!P || !P(F)) && (j = Bie(c, F, D)), c.seenAffectedFiles.add(F.resolvedPath), c.affectedFilesIndex++, c.buildInfoEmitPending = !0, !j) continue; + } else + j = c.program.getSemanticDiagnostics( + /*sourceFile*/ + void 0, + D + ), c.changedFilesSet.clear(), c.programEmitPending = Oy(c.compilerOptions); + else return; + return { result: j, affected: O }; + } + } + function C(D, P) { + if (Bve(c, D), E.checkDefined(c.program).getCompilerOptions().outFile) + return E.assert(!c.semanticDiagnosticsPerFile), E.checkDefined(c.program).getSemanticDiagnostics(D, P); + if (D) + return Bie(c, D, P); + for (; T(P); ) + ; + let j; + for (const F of E.checkDefined(c.program).getSourceFiles()) + j = Bn(j, Bie(c, F, P)); + return j || He; + } + } + function GW(e, t, n) { + var i, s; + const o = ((i = e.affectedFilesPendingEmit) == null ? void 0 : i.get(t)) || 0; + (e.affectedFilesPendingEmit ?? (e.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(t, o | n), (s = e.emitDiagnosticsPerFile) == null || s.delete(t); + } + function Vie(e) { + return Gi(e) ? { version: e, signature: e, affectsGlobalScope: void 0, impliedFormat: void 0 } : Gi(e.signature) ? e : { version: e.version, signature: e.signature === !1 ? void 0 : e.version, affectsGlobalScope: e.affectsGlobalScope, impliedFormat: e.impliedFormat }; + } + function Uie(e, t) { + return iy(e) ? t : e[1] || 8; + } + function qie(e, t) { + return e || Oy(t || {}); + } + function Hie(e, t, n) { + var i, s, o, c; + const _ = e.program, u = Xn(Xi(t, n.getCurrentDirectory())), d = eu(n.useCaseSensitiveFileNames()); + let g; + const h = (i = _.fileNames) == null ? void 0 : i.map(C); + let S; + const T = _.latestChangedDtsFile ? D(_.latestChangedDtsFile) : void 0; + if (Jie(_)) { + const L = /* @__PURE__ */ new Map(); + _.fileInfos.forEach(($, U) => { + const G = P(U + 1); + L.set(G, Gi($) ? { version: $, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : $); + }), g = { + fileInfos: L, + compilerOptions: _.options ? TO(_.options, D) : {}, + latestChangedDtsFile: T, + outSignature: _.outSignature, + programEmitPending: _.pendingEmit === void 0 ? void 0 : qie(_.pendingEmit, _.options) + }; + } else { + S = (s = _.fileIdsList) == null ? void 0 : s.map((ce) => new Set(ce.map(P))); + const L = /* @__PURE__ */ new Map(), $ = (o = _.options) != null && o.composite && !_.options.outFile ? /* @__PURE__ */ new Map() : void 0; + _.fileInfos.forEach((ce, K) => { + const X = P(K + 1), Z = Vie(ce); + L.set(X, Z), $ && Z.signature && $.set(X, Z.signature); + }), (c = _.emitSignatures) == null || c.forEach((ce) => { + if (iy(ce)) $.delete(P(ce)); + else { + const K = P(ce[0]); + $.set( + K, + !Gi(ce[1]) && !ce[1].length ? ( + // File signature is emit signature but differs in map + [$.get(K)] + ) : ce[1] + ); + } + }); + const U = new Set(or(_.changeFileSet, P)), G = _.affectedFilesPendingEmit ? Oy(_.options || {}) : void 0; + g = { + fileInfos: L, + compilerOptions: _.options ? TO(_.options, D) : {}, + referencedMap: j(_.referencedMap, _.options ?? {}), + semanticDiagnosticsPerFile: F(_.semanticDiagnosticsPerFile, L, U), + emitDiagnosticsPerFile: V(_.emitDiagnosticsPerFile), + hasReusableDiagnostic: !0, + affectedFilesPendingEmit: _.affectedFilesPendingEmit && jk(_.affectedFilesPendingEmit, (ce) => P(iy(ce) ? ce : ce[0]), (ce) => Uie(ce, G)), + changedFilesSet: U, + latestChangedDtsFile: T, + emitSignatures: $?.size ? $ : void 0 + }; + } + return { + getState: () => g, + saveEmitState: ka, + restoreEmitState: ka, + getProgram: Rs, + getProgramOrUndefined: nb, + releaseProgram: ka, + getCompilerOptions: () => g.compilerOptions, + getSourceFile: Rs, + getSourceFiles: Rs, + getOptionsDiagnostics: Rs, + getGlobalDiagnostics: Rs, + getConfigFileParsingDiagnostics: Rs, + getSyntacticDiagnostics: Rs, + getDeclarationDiagnostics: Rs, + getSemanticDiagnostics: Rs, + emit: Rs, + getAllDependencies: Rs, + getCurrentDirectory: Rs, + emitNextAffectedFile: Rs, + getSemanticDiagnosticsOfNextAffectedFile: Rs, + emitBuildInfo: Rs, + close: ka, + hasChangedEmitSignature: $d + }; + function C(L) { + return _o(L, u, d); + } + function D(L) { + return Xi(L, u); + } + function P(L) { + return h[L - 1]; + } + function O(L) { + return S[L - 1]; + } + function j(L, $) { + const U = wd.createReferencedMap($); + return !U || !L || L.forEach(([G, ce]) => U.set(P(G), O(ce))), U; + } + function F(L, $, U) { + const G = new Map( + P1( + $.keys(), + (ce) => U.has(ce) ? void 0 : [ce, He] + ) + ); + return L?.forEach((ce) => { + iy(ce) ? G.delete(P(ce)) : G.set(P(ce[0]), ce[1]); + }), G.size ? G : void 0; + } + function V(L) { + return L && jk(L, ($) => P($[0]), ($) => $[1]); + } + } + function $W(e, t, n) { + const i = Xn(Xi(t, n.getCurrentDirectory())), s = eu(n.useCaseSensitiveFileNames()), o = /* @__PURE__ */ new Map(); + let c = 0; + const _ = /* @__PURE__ */ new Map(), u = new Map(e.resolvedRoot); + return e.fileInfos.forEach((g, h) => { + const S = _o(e.fileNames[h], i, s), T = Gi(g) ? g : g.version; + if (o.set(S, T), c < e.root.length) { + const C = e.root[c], D = h + 1; + ss(C) ? C[0] <= D && D <= C[1] && (d(D, S), C[1] === D && c++) : C === D && (d(D, S), c++); + } + }), { fileInfos: o, roots: _ }; + function d(g, h) { + const S = u.get(g); + S ? _.set(_o(e.fileNames[S - 1], i, s), h) : _.set(h, void 0); + } + } + function XW(e, t) { + return { + getState: Rs, + saveEmitState: ka, + restoreEmitState: ka, + getProgram: n, + getProgramOrUndefined: () => e().program, + releaseProgram: () => e().program = void 0, + getCompilerOptions: () => e().compilerOptions, + getSourceFile: (i) => n().getSourceFile(i), + getSourceFiles: () => n().getSourceFiles(), + getOptionsDiagnostics: (i) => n().getOptionsDiagnostics(i), + getGlobalDiagnostics: (i) => n().getGlobalDiagnostics(i), + getConfigFileParsingDiagnostics: () => t, + getSyntacticDiagnostics: (i, s) => n().getSyntacticDiagnostics(i, s), + getDeclarationDiagnostics: (i, s) => n().getDeclarationDiagnostics(i, s), + getSemanticDiagnostics: (i, s) => n().getSemanticDiagnostics(i, s), + emit: (i, s, o, c, _) => n().emit(i, s, o, c, _), + emitBuildInfo: (i, s) => n().emitBuildInfo(i, s), + getAllDependencies: Rs, + getCurrentDirectory: () => n().getCurrentDirectory(), + close: ka + }; + function n() { + return E.checkDefined(e().program); + } + } + function qve(e, t, n, i, s, o) { + return HW(0, _F(e, t, n, i, s, o)); + } + function QW(e, t, n, i, s, o) { + return HW(1, _F(e, t, n, i, s, o)); + } + function Hve(e, t, n, i, s, o) { + const { newProgram: c, configFileParsingDiagnostics: _ } = _F(e, t, n, i, s, o); + return XW(() => ({ program: c, compilerOptions: c.getCompilerOptions() }), _); + } + function fF(e) { + return nc(e, "/node_modules/.staging") ? Jk(e, "/.staging") : ut(xI, (t) => e.includes(t)) ? void 0 : e; + } + function Gie(e, t) { + if (t <= 1) return 1; + let n = 1, i = e[0].search(/[a-zA-Z]:/) === 0; + if (e[0] !== Oo && !i && // Non dos style paths + e[1].search(/[a-zA-Z]\$$/) === 0) { + if (t === 2) return 2; + n = 2, i = !0; + } + return i && !e[n].match(/^users$/i) ? n : e[n].match(/^workspaces$/i) ? n + 1 : n + 2; + } + function pF(e, t) { + if (t === void 0 && (t = e.length), t <= 2) return !1; + const n = Gie(e, t); + return t > n + 1; + } + function $ie(e) { + return $ve(Xn(e)); + } + function Gve(e, t) { + if (t.length < t.length) return !1; + for (let n = 0; n < e.length; n++) + if (t[n] !== e[n]) return !1; + return !0; + } + function $ve(e) { + return pF(vl(e)); + } + function Xie(e) { + return $ve(e); + } + function YW(e, t, n, i, s, o) { + const c = vl(t); + e = $_(e) ? Cs(e) : Xi(e, o()); + const _ = vl(e), u = Gie(c, c.length); + if (c.length <= u + 1) return; + const d = c.indexOf("node_modules"); + if (d !== -1 && d + 1 <= u + 1) return; + const g = c.lastIndexOf("node_modules"); + return Gve(s, c) ? c.length > s.length + 1 ? Qie( + _, + c, + Math.max(s.length + 1, u + 1), + g + ) : { + dir: n, + dirPath: i, + nonRecursive: !0 + } : Xve( + _, + c, + c.length - 1, + u, + d, + s, + g + ); + } + function Xve(e, t, n, i, s, o, c) { + if (s !== -1) + return Qie( + e, + t, + s + 1, + c + ); + let _ = !0, u = n; + for (let d = 0; d < n; d++) + if (t[d] !== o[d]) { + _ = !1, u = Math.max(d + 1, i + 1); + break; + } + return Qie( + e, + t, + u, + c, + _ + ); + } + function Qie(e, t, n, i, s) { + let o; + return i !== -1 && i + 1 >= n && i + 2 < t.length && (zi(t[i + 1], "@") ? i + 3 < t.length && (o = i + 3) : o = i + 2), { + dir: ah(e, n), + dirPath: ah(t, n), + nonRecursive: s, + packageDir: o !== void 0 ? ah(e, o) : void 0, + packageDirPath: o !== void 0 ? ah(t, o) : void 0 + }; + } + function Yie(e, t, n, i, s, o) { + const c = vl(t); + if (Gve(i, c)) + return n; + e = $_(e) ? Cs(e) : Xi(e, s()); + const _ = Xve( + vl(e), + c, + c.length, + Gie(c, c.length), + c.indexOf("node_modules"), + i, + c.lastIndexOf("node_modules") + ); + return _ && o(_.dirPath) ? _.dirPath : void 0; + } + function Zie(e, t) { + const n = Xi(e, t()); + return HR(n) ? n : F1(n); + } + function Qve(e) { + return e.split(Oo).length - (e0(e) ? 1 : 0); + } + function dF(e) { + var t; + return ((t = e.getCompilerHost) == null ? void 0 : t.call(e)) || e; + } + function Kie(e, t, n, i, s) { + return { + nameAndMode: LW, + resolve: (o, c) => WRe( + i, + s, + o, + e, + n, + t, + c + ) + }; + } + function WRe(e, t, n, i, s, o, c) { + const _ = dF(e), u = Ax(n, i, s, _, t, o, c); + if (!e.getGlobalCache) + return u; + const d = e.getGlobalCache(); + if (d !== void 0 && !Sl(n) && !(u.resolvedModule && S5(u.resolvedModule.extension))) { + const { resolvedModule: g, failedLookupLocations: h, affectingLocations: S, resolutionDiagnostics: T } = ane( + E.checkDefined(e.globalCacheResolutionModuleName)(n), + e.projectName, + s, + _, + d, + t + ); + if (g) + return u.resolvedModule = g, u.failedLookupLocations = VC(u.failedLookupLocations, h), u.affectingLocations = VC(u.affectingLocations, S), u.resolutionDiagnostics = VC(u.resolutionDiagnostics, T), u; + } + return u; + } + function ZW(e, t, n) { + let i, s, o; + const c = Kf(), _ = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(); + let h = !1, S, T, C, D, P, O = !1; + const j = Wu(() => e.getCurrentDirectory()), F = e.getCachedDirectoryStructureHost(), V = /* @__PURE__ */ new Map(), L = qC( + j(), + e.getCanonicalFileName, + e.getCompilationSettings() + ), $ = /* @__PURE__ */ new Map(), U = NO( + j(), + e.getCanonicalFileName, + e.getCompilationSettings(), + L.getPackageJsonInfoCache(), + L.optionsToRedirectsKey + ), G = /* @__PURE__ */ new Map(), ce = qC( + j(), + e.getCanonicalFileName, + Lz(e.getCompilationSettings()), + L.getPackageJsonInfoCache() + ), K = /* @__PURE__ */ new Map(), X = /* @__PURE__ */ new Map(), Z = Zie(t, j), oe = e.toPath(Z), ne = vl(oe), pe = /* @__PURE__ */ new Map(), fe = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(); + return { + rootDirForResolution: t, + resolvedModuleNames: V, + resolvedTypeReferenceDirectives: $, + resolvedLibraries: G, + resolvedFileToResolution: d, + resolutionsWithFailedLookups: _, + resolutionsWithOnlyAffectingLocations: u, + directoryWatchesOfFailedLookups: K, + fileWatchesOfAffectingLocations: X, + packageDirWatchers: fe, + dirPathToSymlinkPackageRefCount: H, + watchFailedLookupLocationsOfExternalModuleResolutions: jr, + getModuleResolutionCache: () => L, + startRecordingFilesWithChangedResolutions: ve, + finishRecordingFilesWithChangedResolutions: De, + // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update + // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) + startCachingPerDirectoryResolution: ye, + finishCachingPerDirectoryResolution: Qe, + resolveModuleNameLiterals: Kt, + resolveTypeReferenceDirectiveReferences: nr, + resolveLibrary: Pr, + resolveSingleModuleNameWithoutWatching: Vt, + removeResolutionsFromProjectReferenceRedirects: mi, + removeResolutionsOfFile: Ps, + hasChangedAutomaticTypeDirectiveNames: () => h, + invalidateResolutionOfFile: Yt, + invalidateResolutionsOfFailedLookupLocations: te, + setFilesWithInvalidatedNonRelativeUnresolvedImports: Ca, + createHasInvalidatedResolutions: Ie, + isFileWithInvalidatedNonRelativeUnresolvedImports: Xe, + updateTypeRootsWatch: lt, + closeTypeRootsWatch: Ne, + clear: ge, + onChangesAffectModuleResolution: de + }; + function le(be) { + return be.resolvedModule; + } + function Ae(be) { + return be.resolvedTypeReferenceDirective; + } + function ge() { + N_(K, _p), N_(X, _p), pe.clear(), fe.clear(), H.clear(), c.clear(), Ne(), V.clear(), $.clear(), d.clear(), _.clear(), u.clear(), C = void 0, D = void 0, P = void 0, T = void 0, S = void 0, O = !1, L.clear(), U.clear(), L.update(e.getCompilationSettings()), U.update(e.getCompilationSettings()), ce.clear(), g.clear(), G.clear(), h = !1; + } + function de() { + O = !0, L.clearAllExceptPackageJsonInfoCache(), U.clearAllExceptPackageJsonInfoCache(), L.update(e.getCompilationSettings()), U.update(e.getCompilationSettings()); + } + function ve() { + i = []; + } + function De() { + const be = i; + return i = void 0, be; + } + function Xe(be) { + if (!o) + return !1; + const ft = o.get(be); + return !!ft && !!ft.length; + } + function Ie(be, ft) { + te(); + const bt = s; + return s = void 0, { + hasInvalidatedResolutions: (kt) => be(kt) || O || !!bt?.has(kt) || Xe(kt), + hasInvalidatedLibResolutions: (kt) => { + var yt; + return ft(kt) || !!((yt = G?.get(kt)) != null && yt.isInvalidated); + } + }; + } + function ye() { + L.isReadonly = void 0, U.isReadonly = void 0, ce.isReadonly = void 0, L.getPackageJsonInfoCache().isReadonly = void 0, L.clearAllExceptPackageJsonInfoCache(), U.clearAllExceptPackageJsonInfoCache(), ce.clearAllExceptPackageJsonInfoCache(), c.forEach(os), c.clear(), pe.clear(); + } + function Fe(be) { + G.forEach((ft, bt) => { + var kt; + (kt = be?.resolvedLibReferences) != null && kt.has(bt) || (vr( + ft, + e.toPath(oF(e.getCompilationSettings(), j(), bt)), + le + ), G.delete(bt)); + }); + } + function Qe(be, ft) { + o = void 0, O = !1, c.forEach(os), c.clear(), be !== ft && (Fe(be), be?.getSourceFiles().forEach((bt) => { + var kt; + const yt = A_(bt) ? ((kt = bt.packageJsonLocations) == null ? void 0 : kt.length) ?? 0 : 0, Ut = g.get(bt.resolvedPath) ?? He; + for (let W = Ut.length; W < yt; W++) + _s( + bt.packageJsonLocations[W], + /*forResolution*/ + !1 + ); + if (Ut.length > yt) + for (let W = yt; W < Ut.length; W++) + X.get(Ut[W]).files--; + yt ? g.set(bt.resolvedPath, bt.packageJsonLocations) : g.delete(bt.resolvedPath); + }), g.forEach((bt, kt) => { + const yt = be?.getSourceFileByPath(kt); + (!yt || yt.resolvedPath !== kt) && (bt.forEach((Ut) => X.get(Ut).files--), g.delete(kt)); + })), K.forEach(Be), X.forEach(at), fe.forEach(Ke), h = !1, L.isReadonly = !0, U.isReadonly = !0, ce.isReadonly = !0, L.getPackageJsonInfoCache().isReadonly = !0, pe.clear(); + } + function Ke(be, ft) { + be.dirPathToWatcher.size === 0 && fe.delete(ft); + } + function Be(be, ft) { + be.refCount === 0 && (K.delete(ft), be.watcher.close()); + } + function at(be, ft) { + var bt; + be.files === 0 && be.resolutions === 0 && !((bt = be.symlinks) != null && bt.size) && (X.delete(ft), be.watcher.close()); + } + function Wt({ + entries: be, + containingFile: ft, + containingSourceFile: bt, + redirectedReference: kt, + options: yt, + perFileCache: Ut, + reusedNames: W, + loader: je, + getResolutionWithResolvedFileName: st, + deferWatchingNonRelativeResolution: z, + shouldRetryResolution: he, + logChanges: q + }) { + const we = e.toPath(ft), _e = Ut.get(we) || Ut.set(we, UC()).get(we), Te = [], dt = q && Xe(we), xt = e.getCurrentProgram(), wt = xt && xt.getResolvedProjectReferenceToRedirect(ft), ir = wt ? !kt || kt.sourceFile.path !== wt.sourceFile.path : !!kt, br = UC(); + for (const en of be) { + const fr = je.nameAndMode.getName(en), mn = je.nameAndMode.getMode(en, bt, kt?.commandLine.options || yt); + let Di = _e.get(fr, mn); + if (!br.has(fr, mn) && (O || ir || !Di || Di.isInvalidated || // If the name is unresolved import that was invalidated, recalculate + dt && !Sl(fr) && he(Di))) { + const Fi = Di; + Di = je.resolve(fr, mn), e.onDiscoveredSymlink && VRe(Di) && e.onDiscoveredSymlink(), _e.set(fr, mn, Di), Di !== Fi && (jr(fr, Di, we, st, z), Fi && vr(Fi, we, st)), q && i && !Lr(Fi, Di) && (i.push(we), q = !1); + } else { + const Fi = dF(e); + if (kh(yt, Fi) && !br.has(fr, mn)) { + const ur = st(Di); + Wi( + Fi, + Ut === V ? ur?.resolvedFileName ? ur.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : ur?.resolvedFileName ? ur.packageId ? p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved, + fr, + ft, + ur?.resolvedFileName, + ur?.packageId && py(ur.packageId) + ); + } + } + E.assert(Di !== void 0 && !Di.isInvalidated), br.set(fr, mn, !0), Te.push(Di); + } + return W?.forEach( + (en) => br.set( + je.nameAndMode.getName(en), + je.nameAndMode.getMode(en, bt, kt?.commandLine.options || yt), + !0 + ) + ), _e.size() !== br.size() && _e.forEach((en, fr, mn) => { + br.has(fr, mn) || (vr(en, we, st), _e.delete(fr, mn)); + }), Te; + function Lr(en, fr) { + if (en === fr) + return !0; + if (!en || !fr) + return !1; + const mn = st(en), Di = st(fr); + return mn === Di ? !0 : !mn || !Di ? !1 : mn.resolvedFileName === Di.resolvedFileName; + } + } + function nr(be, ft, bt, kt, yt, Ut) { + return Wt({ + entries: be, + containingFile: ft, + containingSourceFile: yt, + redirectedReference: bt, + options: kt, + reusedNames: Ut, + perFileCache: $, + loader: sF( + ft, + bt, + kt, + dF(e), + U + ), + getResolutionWithResolvedFileName: Ae, + shouldRetryResolution: (W) => W.resolvedTypeReferenceDirective === void 0, + deferWatchingNonRelativeResolution: !1 + }); + } + function Kt(be, ft, bt, kt, yt, Ut) { + return Wt({ + entries: be, + containingFile: ft, + containingSourceFile: yt, + redirectedReference: bt, + options: kt, + reusedNames: Ut, + perFileCache: V, + loader: Kie( + ft, + bt, + kt, + e, + L + ), + getResolutionWithResolvedFileName: le, + shouldRetryResolution: (W) => !W.resolvedModule || !M4(W.resolvedModule.extension), + logChanges: n, + deferWatchingNonRelativeResolution: !0 + // Defer non relative resolution watch because we could be using ambient modules + }); + } + function Pr(be, ft, bt, kt) { + const yt = dF(e); + let Ut = G?.get(kt); + if (!Ut || Ut.isInvalidated) { + const W = Ut; + Ut = IO(be, ft, bt, yt, ce); + const je = e.toPath(ft); + jr( + be, + Ut, + je, + le, + /*deferWatchingNonRelativeResolution*/ + !1 + ), G.set(kt, Ut), W && vr(W, je, le); + } else if (kh(bt, yt)) { + const W = le(Ut); + Wi( + yt, + W?.resolvedFileName ? W.packageId ? p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : p.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, + be, + ft, + W?.resolvedFileName, + W?.packageId && py(W.packageId) + ); + } + return Ut; + } + function Vt(be, ft) { + var bt, kt; + const yt = e.toPath(ft), Ut = V.get(yt), W = Ut?.get( + be, + /*mode*/ + void 0 + ); + if (W && !W.isInvalidated) return W; + const je = (bt = e.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : bt.call(e, L), st = dF(e), z = Ax( + be, + ft, + e.getCompilationSettings(), + st, + L + ); + return (kt = e.afterResolveSingleModuleNameWithoutWatching) == null || kt.call(e, L, be, ft, z, je), z; + } + function zt(be) { + return nc(be, "/node_modules/@types"); + } + function jr(be, ft, bt, kt, yt) { + var Ut; + if (ft.refCount) + ft.refCount++, E.assertIsDefined(ft.files); + else { + ft.refCount = 1, E.assert(!((Ut = ft.files) != null && Ut.size)), !yt || Sl(be) ? Xt(ft) : c.add(be, ft); + const W = kt(ft); + if (W && W.resolvedFileName) { + const je = e.toPath(W.resolvedFileName); + let st = d.get(je); + st || d.set(je, st = /* @__PURE__ */ new Set()), st.add(ft); + } + } + (ft.files ?? (ft.files = /* @__PURE__ */ new Set())).add(bt); + } + function ci(be, ft) { + const bt = e.toPath(be), kt = YW( + be, + bt, + Z, + oe, + ne, + j + ); + if (kt) { + const { dir: yt, dirPath: Ut, nonRecursive: W, packageDir: je, packageDirPath: st } = kt; + Ut === oe ? (E.assert(W), E.assert(!je), ft = !0) : Ss(yt, Ut, je, st, W); + } + return ft; + } + function Xt(be) { + E.assert(!!be.refCount); + const { failedLookupLocations: ft, affectingLocations: bt, alternateResult: kt } = be; + if (!ft?.length && !bt?.length && !kt) return; + (ft?.length || kt) && _.add(be); + let yt = !1; + if (ft) + for (const Ut of ft) + yt = ci(Ut, yt); + kt && (yt = ci(kt, yt)), yt && Ss( + Z, + oe, + /*packageDir*/ + void 0, + /*packageDirPath*/ + void 0, + /*nonRecursive*/ + !0 + ), Ai(be, !ft?.length && !kt); + } + function Ai(be, ft) { + E.assert(!!be.refCount); + const { affectingLocations: bt } = be; + if (bt?.length) { + ft && u.add(be); + for (const kt of bt) + _s( + kt, + /*forResolution*/ + !0 + ); + } + } + function _s(be, ft) { + const bt = X.get(be); + if (bt) { + ft ? bt.resolutions++ : bt.files++; + return; + } + let kt = be, yt = !1, Ut; + e.realpath && (kt = e.realpath(be), be !== kt && (yt = !0, Ut = X.get(kt))); + const W = ft ? 1 : 0, je = ft ? 0 : 1; + if (!yt || !Ut) { + const st = { + watcher: Xie(e.toPath(kt)) ? e.watchAffectingFileLocation(kt, (z, he) => { + F?.addOrDeleteFile(z, e.toPath(kt), he), $n(kt, L.getPackageJsonInfoCache().getInternalMap()), e.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : jD, + resolutions: yt ? 0 : W, + files: yt ? 0 : je, + symlinks: void 0 + }; + X.set(kt, st), yt && (Ut = st); + } + if (yt) { + E.assert(!!Ut); + const st = { + watcher: { + close: () => { + var z; + const he = X.get(kt); + (z = he?.symlinks) != null && z.delete(be) && !he.symlinks.size && !he.resolutions && !he.files && (X.delete(kt), he.watcher.close()); + } + }, + resolutions: W, + files: je, + symlinks: void 0 + }; + X.set(be, st), (Ut.symlinks ?? (Ut.symlinks = /* @__PURE__ */ new Set())).add(be); + } + } + function $n(be, ft) { + var bt; + const kt = X.get(be); + kt?.resolutions && (T ?? (T = /* @__PURE__ */ new Set())).add(be), kt?.files && (S ?? (S = /* @__PURE__ */ new Set())).add(be), (bt = kt?.symlinks) == null || bt.forEach((yt) => $n(yt, ft)), ft?.delete(e.toPath(be)); + } + function os(be, ft) { + const bt = e.getCurrentProgram(); + !bt || !bt.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(ft) ? be.forEach(Xt) : be.forEach((kt) => Ai( + kt, + /*addToResolutionsWithOnlyAffectingLocations*/ + !0 + )); + } + function wr(be, ft, bt, kt, yt) { + E.assert(!yt); + let Ut = pe.get(kt), W = fe.get(kt); + if (Ut === void 0) { + const z = e.realpath(bt); + Ut = z !== bt && e.toPath(z) !== kt, pe.set(kt, Ut), W ? W.isSymlink !== Ut && (W.dirPathToWatcher.forEach((he) => { + ln( + W.isSymlink ? kt : ft, + /*syncDirWatcherRemove*/ + !1 + ), he.watcher = st(); + }), W.isSymlink = Ut) : fe.set( + kt, + W = { + dirPathToWatcher: /* @__PURE__ */ new Map(), + isSymlink: Ut + } + ); + } else + E.assertIsDefined(W), E.assert(Ut === W.isSymlink); + const je = W.dirPathToWatcher.get(ft); + je ? je.refCount++ : (W.dirPathToWatcher.set(ft, { + watcher: st(), + refCount: 1 + }), Ut && H.set(ft, (H.get(ft) ?? 0) + 1)); + function st() { + return Ut ? Le(bt, kt, yt) : Le(be, ft, yt); + } + } + function Ss(be, ft, bt, kt, yt) { + !kt || !e.realpath ? Le(be, ft, yt) : wr(be, ft, bt, kt, yt); + } + function Le(be, ft, bt) { + let kt = K.get(ft); + return kt ? (E.assert(!!bt == !!kt.nonRecursive), kt.refCount++) : K.set(ft, kt = { watcher: Zn(be, ft, bt), refCount: 1, nonRecursive: bt }), kt; + } + function At(be, ft, bt) { + const kt = e.toPath(be), yt = YW( + be, + kt, + Z, + oe, + ne, + j + ); + if (yt) { + const { dirPath: Ut, packageDirPath: W } = yt; + if (Ut === oe) + ft = !0; + else if (W && e.realpath) { + const je = fe.get(W), st = je.dirPathToWatcher.get(Ut); + if (st.refCount--, st.refCount === 0) { + if (ln(je.isSymlink ? W : Ut, bt), je.dirPathToWatcher.delete(Ut), je.isSymlink) { + const z = H.get(Ut) - 1; + z === 0 ? H.delete(Ut) : H.set(Ut, z); + } + bt && Ke(je, W); + } + } else + ln(Ut, bt); + } + return ft; + } + function vr(be, ft, bt, kt) { + if (E.checkDefined(be.files).delete(ft), be.refCount--, be.refCount) + return; + const yt = bt(be); + if (yt && yt.resolvedFileName) { + const st = e.toPath(yt.resolvedFileName), z = d.get(st); + z?.delete(be) && !z.size && d.delete(st); + } + const { failedLookupLocations: Ut, affectingLocations: W, alternateResult: je } = be; + if (_.delete(be)) { + let st = !1; + if (Ut) + for (const z of Ut) + st = At(z, st, kt); + je && (st = At(je, st, kt)), st && ln(oe, kt); + } else W?.length && u.delete(be); + if (W) + for (const st of W) { + const z = X.get(st); + z.resolutions--, kt && at(z, st); + } + } + function ln(be, ft) { + const bt = K.get(be); + bt.refCount--, ft && Be(bt, be); + } + function Zn(be, ft, bt) { + return e.watchDirectoryOfFailedLookupLocation( + be, + (kt) => { + const yt = e.toPath(kt); + F && F.addOrDeleteFileOrDirectory(kt, yt), $e(yt, ft === yt); + }, + bt ? 0 : 1 + /* Recursive */ + ); + } + function ri(be, ft, bt, kt) { + const yt = be.get(ft); + yt && (yt.forEach( + (Ut) => vr( + Ut, + ft, + bt, + kt + ) + ), be.delete(ft)); + } + function mi(be) { + if (!Go( + be, + ".json" + /* Json */ + )) return; + const ft = e.getCurrentProgram(); + if (!ft) return; + const bt = ft.getResolvedProjectReferenceByPath(be); + bt && bt.commandLine.fileNames.forEach((kt) => Ps(e.toPath(kt))); + } + function Ps(be, ft) { + ri(V, be, le, ft), ri($, be, Ae, ft); + } + function ws(be, ft) { + if (!be) return !1; + let bt = !1; + return be.forEach((kt) => { + if (!(kt.isInvalidated || !ft(kt))) { + kt.isInvalidated = bt = !0; + for (const yt of E.checkDefined(kt.files)) + (s ?? (s = /* @__PURE__ */ new Set())).add(yt), h = h || nc(yt, MD); + } + }), bt; + } + function Yt(be) { + Ps(be); + const ft = h; + ws(d.get(be), A1) && h && !ft && e.onChangedAutomaticTypeDirectiveNames(); + } + function Ca(be) { + E.assert(o === be || o === void 0), o = be; + } + function $e(be, ft) { + if (ft) + (P || (P = /* @__PURE__ */ new Set())).add(be); + else { + const bt = fF(be); + if (!bt || (be = bt, e.fileIsOpen(be))) + return !1; + const kt = Xn(be); + if (zt(be) || EI(be) || zt(kt) || EI(kt)) + (C || (C = /* @__PURE__ */ new Set())).add(be), (D || (D = /* @__PURE__ */ new Set())).add(be); + else { + if (Tie(e.getCurrentProgram(), be) || Go(be, ".map")) + return !1; + (C || (C = /* @__PURE__ */ new Set())).add(be); + const yt = EA( + be, + /*isFolder*/ + !0 + ); + yt && (D || (D = /* @__PURE__ */ new Set())).add(yt); + } + } + e.scheduleInvalidateResolutionsOfFailedLookupLocations(); + } + function nt() { + const be = L.getPackageJsonInfoCache().getInternalMap(); + be && (C || D || P) && be.forEach((ft, bt) => re(bt) ? be.delete(bt) : void 0); + } + function te() { + var be; + if (O) + return S = void 0, nt(), (C || D || P || T) && ws(G, rt), C = void 0, D = void 0, P = void 0, T = void 0, !0; + let ft = !1; + return S && ((be = e.getCurrentProgram()) == null || be.getSourceFiles().forEach((bt) => { + ut(bt.packageJsonLocations, (kt) => S.has(kt)) && ((s ?? (s = /* @__PURE__ */ new Set())).add(bt.path), ft = !0); + }), S = void 0), !C && !D && !P && !T || (ft = ws(_, rt) || ft, nt(), C = void 0, D = void 0, P = void 0, ft = ws(u, Ee) || ft, T = void 0), ft; + } + function rt(be) { + var ft; + return Ee(be) ? !0 : !C && !D && !P ? !1 : ((ft = be.failedLookupLocations) == null ? void 0 : ft.some((bt) => re(e.toPath(bt)))) || !!be.alternateResult && re(e.toPath(be.alternateResult)); + } + function re(be) { + return C?.has(be) || tw(D?.keys() || [], (ft) => zi(be, ft) ? !0 : void 0) || tw(P?.keys() || [], (ft) => be.length > ft.length && zi(be, ft) && (HR(ft) || be[ft.length] === Oo) ? !0 : void 0); + } + function Ee(be) { + var ft; + return !!T && ((ft = be.affectingLocations) == null ? void 0 : ft.some((bt) => T.has(bt))); + } + function Ne() { + N_(ae, Zp); + } + function et(be) { + return jt(be) ? e.watchTypeRootsDirectory( + be, + (ft) => { + const bt = e.toPath(ft); + F && F.addOrDeleteFileOrDirectory(ft, bt), h = !0, e.onChangedAutomaticTypeDirectiveNames(); + const kt = Yie( + be, + e.toPath(be), + oe, + ne, + j, + (yt) => K.has(yt) || H.has(yt) + ); + kt && $e(bt, kt === bt); + }, + 1 + /* Recursive */ + ) : jD; + } + function lt() { + const be = e.getCompilationSettings(); + if (be.types) { + Ne(); + return; + } + const ft = vD(be, { getCurrentDirectory: j }); + ft ? A4( + ae, + new Set(ft), + { + createNewValue: et, + onDeleteValue: Zp + } + ) : Ne(); + } + function jt(be) { + return e.getCompilationSettings().typeRoots ? !0 : $ie(e.toPath(be)); + } + } + function VRe(e) { + var t, n; + return !!((t = e.resolvedModule) != null && t.originalPath || (n = e.resolvedTypeReferenceDirective) != null && n.originalPath); + } + var Yve = _l ? { + getCurrentDirectory: () => _l.getCurrentDirectory(), + getNewLine: () => _l.newLine, + getCanonicalFileName: eu(_l.useCaseSensitiveFileNames) + } : void 0; + function Fx(e, t) { + const n = e === _l && Yve ? Yve : { + getCurrentDirectory: () => e.getCurrentDirectory(), + getNewLine: () => e.newLine, + getCanonicalFileName: eu(e.useCaseSensitiveFileNames) + }; + if (!t) + return (s) => e.write(AW(s, n)); + const i = new Array(1); + return (s) => { + i[0] = s, e.write(wie(i, n) + n.getNewLine()), i[0] = void 0; + }; + } + function Zve(e, t, n) { + return e.clearScreen && !n.preserveWatchOutput && !n.extendedDiagnostics && !n.diagnostics && ls(KW, t.code) ? (e.clearScreen(), !0) : !1; + } + var KW = [ + p.Starting_compilation_in_watch_mode.code, + p.File_change_detected_Starting_incremental_compilation.code + ]; + function URe(e, t) { + return ls(KW, e.code) ? t + t : t; + } + function HA(e) { + return e.now ? ( + // On some systems / builds of Node, there's a non-breaking space between the time and AM/PM. + // This branch is solely for testing, so just switch it to a normal space for baseline stability. + // See: + // - https://github.com/nodejs/node/issues/45171 + // - https://github.com/nodejs/node/issues/45753 + e.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace(" ", " ") + ) : (/* @__PURE__ */ new Date()).toLocaleTimeString(); + } + function eV(e, t) { + return t ? (n, i, s) => { + Zve(e, n, s); + let o = `[${Wb( + HA(e), + "\x1B[90m" + /* Grey */ + )}] `; + o += `${gm(n.messageText, e.newLine)}${i + i}`, e.write(o); + } : (n, i, s) => { + let o = ""; + Zve(e, n, s) || (o += i), o += `${HA(e)} - `, o += `${gm(n.messageText, e.newLine)}${URe(n, i)}`, e.write(o); + }; + } + function ese(e, t, n, i, s, o) { + const c = s; + c.onUnRecoverableConfigFileDiagnostic = (u) => tbe(s, o, u); + const _ = bA(e, t, c, n, i); + return c.onUnRecoverableConfigFileDiagnostic = void 0, _; + } + function mF(e) { + return ty( + e, + (t) => t.category === 1 + /* Error */ + ); + } + function gF(e) { + return Ln( + e, + (n) => n.category === 1 + /* Error */ + ).map( + (n) => { + if (n.file !== void 0) + return `${n.file.fileName}`; + } + ).map((n) => { + if (n === void 0) + return; + const i = Nn(e, (s) => s.file !== void 0 && s.file.fileName === n); + if (i !== void 0) { + const { line: s } = Vs(i.file, i.start); + return { + fileName: n, + line: s + 1 + }; + } + }); + } + function tV(e) { + return e === 1 ? p.Found_1_error_Watching_for_file_changes : p.Found_0_errors_Watching_for_file_changes; + } + function Kve(e, t) { + const n = Wb( + ":" + e.line, + "\x1B[90m" + /* Grey */ + ); + return OE(e.fileName) && OE(t) ? hd( + t, + e.fileName, + /*ignoreCase*/ + !1 + ) + n : e.fileName + n; + } + function rV(e, t, n, i) { + if (e === 0) return ""; + const s = t.filter((g) => g !== void 0), o = s.map((g) => `${g.fileName}:${g.line}`).filter((g, h, S) => S.indexOf(g) === h), c = s[0] && Kve(s[0], i.getCurrentDirectory()); + let _; + e === 1 ? _ = t[0] !== void 0 ? [p.Found_1_error_in_0, c] : [p.Found_1_error] : _ = o.length === 0 ? [p.Found_0_errors, e] : o.length === 1 ? [p.Found_0_errors_in_the_same_file_starting_at_Colon_1, e, c] : [p.Found_0_errors_in_1_files, e, o.length]; + const u = zo(..._), d = o.length > 1 ? qRe(s, i) : ""; + return `${n}${gm(u.messageText, n)}${n}${n}${d}`; + } + function qRe(e, t) { + const n = e.filter((h, S, T) => S === T.findIndex((C) => C?.fileName === h?.fileName)); + if (n.length === 0) return ""; + const i = (h) => Math.log(h) * Math.LOG10E + 1, s = n.map((h) => [h, ty(e, (S) => S.fileName === h.fileName)]), o = s.reduce((h, S) => Math.max(h, S[1] || 0), 0), c = p.Errors_Files.message, _ = c.split(" ")[0].length, u = Math.max(_, i(o)), d = Math.max(i(o) - _, 0); + let g = ""; + return g += " ".repeat(d) + c + ` +`, s.forEach((h) => { + const [S, T] = h, C = Math.log(T) * Math.LOG10E + 1 | 0, D = C < u ? " ".repeat(u - C) : "", P = Kve(S, t.getCurrentDirectory()); + g += `${D}${T} ${P} +`; + }), g; + } + function tse(e) { + return !!e.getState; + } + function nV(e, t) { + const n = e.getCompilerOptions(); + n.explainFiles ? iV(tse(e) ? e.getProgram() : e, t) : (n.listFiles || n.listFilesOnly) && rr(e.getSourceFiles(), (i) => { + t(i.fileName); + }); + } + function iV(e, t) { + var n, i; + const s = e.getFileIncludeReasons(), o = (c) => FE(c, e.getCurrentDirectory(), e.getCanonicalFileName); + for (const c of e.getSourceFiles()) + t(`${r6(c, o)}`), (n = s.get(c.path)) == null || n.forEach((_) => t(` ${cV(e, _, o).messageText}`)), (i = sV(c, o)) == null || i.forEach((_) => t(` ${_.messageText}`)); + } + function sV(e, t) { + var n; + let i; + if (e.path !== e.resolvedPath && (i ?? (i = [])).push(us( + /*details*/ + void 0, + p.File_is_output_of_project_reference_source_0, + r6(e.originalFileName, t) + )), e.redirectInfo && (i ?? (i = [])).push(us( + /*details*/ + void 0, + p.File_redirects_to_file_0, + r6(e.redirectInfo.redirectTarget, t) + )), A_(e)) + switch (e.impliedNodeFormat) { + case 99: + e.packageJsonScope && (i ?? (i = [])).push(us( + /*details*/ + void 0, + p.File_is_ECMAScript_module_because_0_has_field_type_with_value_module, + r6(ia(e.packageJsonLocations), t) + )); + break; + case 1: + e.packageJsonScope ? (i ?? (i = [])).push(us( + /*details*/ + void 0, + e.packageJsonScope.contents.packageJsonContent.type ? p.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module : p.File_is_CommonJS_module_because_0_does_not_have_field_type, + r6(ia(e.packageJsonLocations), t) + )) : (n = e.packageJsonLocations) != null && n.length && (i ?? (i = [])).push(us( + /*details*/ + void 0, + p.File_is_CommonJS_module_because_package_json_was_not_found + )); + break; + } + return i; + } + function aV(e, t) { + var n; + const i = e.getCompilerOptions().configFile; + if (!((n = i?.configFileSpecs) != null && n.validatedFilesSpec)) return; + const s = e.getCanonicalFileName(t), o = Xn(Xi(i.fileName, e.getCurrentDirectory())), c = rc(i.configFileSpecs.validatedFilesSpec, (_) => e.getCanonicalFileName(Xi(_, o)) === s); + return c !== -1 ? i.configFileSpecs.validatedFilesSpecBeforeSubstitution[c] : void 0; + } + function oV(e, t) { + var n, i; + const s = e.getCompilerOptions().configFile; + if (!((n = s?.configFileSpecs) != null && n.validatedIncludeSpecs)) return; + if (s.configFileSpecs.isDefaultIncludeSpec) return !0; + const o = Go( + t, + ".json" + /* Json */ + ), c = Xn(Xi(s.fileName, e.getCurrentDirectory())), _ = e.useCaseSensitiveFileNames(), u = rc((i = s?.configFileSpecs) == null ? void 0 : i.validatedIncludeSpecs, (d) => { + if (o && !nc( + d, + ".json" + /* Json */ + )) return !1; + const g = ree(d, c, "files"); + return !!g && vy(`(${g})$`, _).test(t); + }); + return u !== -1 ? s.configFileSpecs.validatedIncludeSpecsBeforeSubstitution[u] : void 0; + } + function cV(e, t, n) { + var i, s; + const o = e.getCompilerOptions(); + if (pv(t)) { + const c = RD(e, t), _ = KC(c) ? c.file.text.substring(c.pos, c.end) : `"${c.text}"`; + let u; + switch (E.assert(KC(c) || t.kind === 3, "Only synthetic references are imports"), t.kind) { + case 3: + KC(c) ? u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2 : p.Imported_via_0_from_file_1 : c.text === z1 ? u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions : p.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions : u = c.packageId ? p.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions : p.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions; + break; + case 4: + E.assert(!c.packageId), u = p.Referenced_via_0_from_file_1; + break; + case 5: + u = c.packageId ? p.Type_library_referenced_via_0_from_file_1_with_packageId_2 : p.Type_library_referenced_via_0_from_file_1; + break; + case 7: + E.assert(!c.packageId), u = p.Library_referenced_via_0_from_file_1; + break; + default: + E.assertNever(t); + } + return us( + /*details*/ + void 0, + u, + _, + r6(c.file, n), + c.packageId && py(c.packageId) + ); + } + switch (t.kind) { + case 0: + if (!((i = o.configFile) != null && i.configFileSpecs)) return us( + /*details*/ + void 0, + p.Root_file_specified_for_compilation + ); + const c = Xi(e.getRootFileNames()[t.index], e.getCurrentDirectory()); + if (aV(e, c)) return us( + /*details*/ + void 0, + p.Part_of_files_list_in_tsconfig_json + ); + const u = oV(e, c); + return Gi(u) ? us( + /*details*/ + void 0, + p.Matched_by_include_pattern_0_in_1, + u, + r6(o.configFile, n) + ) : ( + // Could be additional files specified as roots or matched by default include + us( + /*details*/ + void 0, + u ? p.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk : p.Root_file_specified_for_compilation + ) + ); + case 1: + case 2: + const d = t.kind === 2, g = E.checkDefined((s = e.getResolvedProjectReferences()) == null ? void 0 : s[t.index]); + return us( + /*details*/ + void 0, + o.outFile ? d ? p.Output_from_referenced_project_0_included_because_1_specified : p.Source_from_referenced_project_0_included_because_1_specified : d ? p.Output_from_referenced_project_0_included_because_module_is_specified_as_none : p.Source_from_referenced_project_0_included_because_module_is_specified_as_none, + r6(g.sourceFile.fileName, n), + o.outFile ? "--outFile" : "--out" + ); + case 8: { + const h = o.types ? t.packageId ? [p.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, t.typeReference, py(t.packageId)] : [p.Entry_point_of_type_library_0_specified_in_compilerOptions, t.typeReference] : t.packageId ? [p.Entry_point_for_implicit_type_library_0_with_packageId_1, t.typeReference, py(t.packageId)] : [p.Entry_point_for_implicit_type_library_0, t.typeReference]; + return us( + /*details*/ + void 0, + ...h + ); + } + case 6: { + if (t.index !== void 0) return us( + /*details*/ + void 0, + p.Library_0_specified_in_compilerOptions, + o.lib[t.index] + ); + const h = o5(pa(o)), S = h ? [p.Default_library_for_target_0, h] : [p.Default_library]; + return us( + /*details*/ + void 0, + ...S + ); + } + default: + E.assertNever(t); + } + } + function r6(e, t) { + const n = Gi(e) ? e : e.fileName; + return t ? t(n) : n; + } + function hF(e, t, n, i, s, o, c, _) { + const u = !!e.getCompilerOptions().listFilesOnly, d = e.getConfigFileParsingDiagnostics().slice(), g = d.length; + Bn(d, e.getSyntacticDiagnostics( + /*sourceFile*/ + void 0, + o + )), d.length === g && (Bn(d, e.getOptionsDiagnostics(o)), u || (Bn(d, e.getGlobalDiagnostics(o)), d.length === g && Bn(d, e.getSemanticDiagnostics( + /*sourceFile*/ + void 0, + o + )))); + const h = u ? { emitSkipped: !0, diagnostics: He } : e.emit( + /*targetSourceFile*/ + void 0, + s, + o, + c, + _ + ), { emittedFiles: S, diagnostics: T } = h; + Bn(d, T); + const C = qk(d); + if (C.forEach(t), n) { + const D = e.getCurrentDirectory(); + rr(S, (P) => { + const O = Xi(P, D); + n(`TSFILE: ${O}`); + }), nV(e, n); + } + return i && i(mF(C), gF(C)), { + emitResult: h, + diagnostics: C + }; + } + function lV(e, t, n, i, s, o, c, _) { + const { emitResult: u, diagnostics: d } = hF( + e, + t, + n, + i, + s, + o, + c, + _ + ); + return u.emitSkipped && d.length > 0 ? 1 : d.length > 0 ? 2 : 0; + } + var jD = { close: ka }, BD = () => jD; + function uV(e = _l, t) { + return { + onWatchStatusChange: t || eV(e), + watchFile: Ns(e, e.watchFile) || BD, + watchDirectory: Ns(e, e.watchDirectory) || BD, + setTimeout: Ns(e, e.setTimeout) || ka, + clearTimeout: Ns(e, e.clearTimeout) || ka + }; + } + var kl = { + ConfigFile: "Config file", + ExtendedConfigFile: "Extended config file", + SourceFile: "Source file", + MissingFile: "Missing file", + WildcardDirectory: "Wild card directory", + FailedLookupLocations: "Failed Lookup Locations", + AffectingFileLocation: "File location affecting resolution", + TypeRoots: "Type roots", + ConfigFileOfReferencedProject: "Config file of referened project", + ExtendedConfigOfReferencedProject: "Extended config file of referenced project", + WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project", + PackageJson: "package.json file", + ClosedScriptInfo: "Closed Script info", + ConfigFileForInferredRoot: "Config file for the inferred project root", + NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache", + MissingSourceMapFile: "Missing source map file", + NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root", + MissingGeneratedFile: "Missing generated file", + NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation", + TypingInstallerLocationFile: "File location for typing installer", + TypingInstallerLocationDirectory: "Directory location for typing installer" + }; + function _V(e, t) { + const n = e.trace ? t.extendedDiagnostics ? 2 : t.diagnostics ? 1 : 0 : 0, i = n !== 0 ? (o) => e.trace(o) : ka, s = CW(e, n, i); + return s.writeLog = i, s; + } + function fV(e, t, n = e) { + const i = e.useCaseSensitiveFileNames(), s = { + getSourceFile: PW( + (o, c) => c ? e.readFile(o, c) : s.readFile(o), + /*setParentNodes*/ + void 0 + ), + getDefaultLibLocation: Ns(e, e.getDefaultLibLocation), + getDefaultLibFileName: (o) => e.getDefaultLibFileName(o), + writeFile: wW( + (o, c, _) => e.writeFile(o, c, _), + (o) => e.createDirectory(o), + (o) => e.directoryExists(o) + ), + getCurrentDirectory: Wu(() => e.getCurrentDirectory()), + useCaseSensitiveFileNames: () => i, + getCanonicalFileName: eu(i), + getNewLine: () => d0(t()), + fileExists: (o) => e.fileExists(o), + readFile: (o) => e.readFile(o), + trace: Ns(e, e.trace), + directoryExists: Ns(n, n.directoryExists), + getDirectories: Ns(n, n.getDirectories), + realpath: Ns(e, e.realpath), + getEnvironmentVariable: Ns(e, e.getEnvironmentVariable) || (() => ""), + createHash: Ns(e, e.createHash), + readDirectory: Ns(e, e.readDirectory), + storeSignatureInfo: e.storeSignatureInfo, + jsDocParsingMode: e.jsDocParsingMode + }; + return s; + } + function yF(e, t) { + if (t.match(Tne)) { + let n = t.length, i = n; + for (let s = n - 1; s >= 0; s--) { + const o = t.charCodeAt(s); + switch (o) { + case 10: + s && t.charCodeAt(s - 1) === 13 && s--; + case 13: + break; + default: + if (o < 127 || !_u(o)) { + i = s; + continue; + } + break; + } + const c = t.substring(i, n); + if (c.match(Kz)) { + t = t.substring(0, i); + break; + } else if (!c.match(eW)) + break; + n = i; + } + } + return (e.createHash || IE)(t); + } + function vF(e) { + const t = e.getSourceFile; + e.getSourceFile = (...n) => { + const i = t.call(e, ...n); + return i && (i.version = yF(e, i.text)), i; + }; + } + function pV(e, t) { + const n = Wu(() => Xn(Cs(e.getExecutingFilePath()))); + return { + useCaseSensitiveFileNames: () => e.useCaseSensitiveFileNames, + getNewLine: () => e.newLine, + getCurrentDirectory: Wu(() => e.getCurrentDirectory()), + getDefaultLibLocation: n, + getDefaultLibFileName: (i) => Mn(n(), bw(i)), + fileExists: (i) => e.fileExists(i), + readFile: (i, s) => e.readFile(i, s), + directoryExists: (i) => e.directoryExists(i), + getDirectories: (i) => e.getDirectories(i), + readDirectory: (i, s, o, c, _) => e.readDirectory(i, s, o, c, _), + realpath: Ns(e, e.realpath), + getEnvironmentVariable: Ns(e, e.getEnvironmentVariable), + trace: (i) => e.write(i + e.newLine), + createDirectory: (i) => e.createDirectory(i), + writeFile: (i, s, o) => e.writeFile(i, s, o), + createHash: Ns(e, e.createHash), + createProgram: t || QW, + storeSignatureInfo: e.storeSignatureInfo, + now: Ns(e, e.now) + }; + } + function ebe(e = _l, t, n, i) { + const s = (c) => e.write(c + e.newLine), o = pV(e, t); + return fR(o, uV(e, i)), o.afterProgramCreate = (c) => { + const _ = c.getCompilerOptions(), u = d0(_); + hF( + c, + n, + s, + (d) => o.onWatchStatusChange( + zo(tV(d), d), + u, + _, + d + ) + ); + }, o; + } + function tbe(e, t, n) { + t(n), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } + function dV({ + configFileName: e, + optionsToExtend: t, + watchOptionsToExtend: n, + extraFileExtensions: i, + system: s, + createProgram: o, + reportDiagnostic: c, + reportWatchStatus: _ + }) { + const u = c || Fx(s), d = ebe(s, o, u, _); + return d.onUnRecoverableConfigFileDiagnostic = (g) => tbe(s, u, g), d.configFileName = e, d.optionsToExtend = t, d.watchOptionsToExtend = n, d.extraFileExtensions = i, d; + } + function mV({ + rootFiles: e, + options: t, + watchOptions: n, + projectReferences: i, + system: s, + createProgram: o, + reportDiagnostic: c, + reportWatchStatus: _ + }) { + const u = ebe(s, o, c || Fx(s), _); + return u.rootFiles = e, u.options = t, u.watchOptions = n, u.projectReferences = i, u; + } + function rse(e) { + const t = e.system || _l, n = e.host || (e.host = SF(e.options, t)), i = nse(e), s = lV( + i, + e.reportDiagnostic || Fx(t), + (o) => n.trace && n.trace(o), + e.reportErrorSummary || e.options.pretty ? (o, c) => t.write(rV(o, c, t.newLine, n)) : void 0 + ); + return e.afterProgramEmitAndDiagnostics && e.afterProgramEmitAndDiagnostics(i), s; + } + function bF(e, t) { + const n = S0(e); + if (!n) return; + let i; + if (t.getBuildInfo) + i = t.getBuildInfo(n, e.configFilePath); + else { + const s = t.readFile(n); + if (!s) return; + i = TW(n, s); + } + if (!(!i || i.version !== dd || !i.program)) + return Hie(i, n, t); + } + function SF(e, t = _l) { + const n = iF( + e, + /*setParentNodes*/ + void 0, + t + ); + return n.createHash = Ns(t, t.createHash), n.storeSignatureInfo = t.storeSignatureInfo, vF(n), LD(n, (i) => _o(i, n.getCurrentDirectory(), n.getCanonicalFileName)), n; + } + function nse({ + rootNames: e, + options: t, + configFileParsingDiagnostics: n, + projectReferences: i, + host: s, + createProgram: o + }) { + s = s || SF(t), o = o || QW; + const c = bF(t, s); + return o(e, t, s, c, n, i); + } + function rbe(e, t, n, i, s, o, c, _) { + return ss(e) ? mV({ + rootFiles: e, + options: t, + watchOptions: _, + projectReferences: c, + system: n, + createProgram: i, + reportDiagnostic: s, + reportWatchStatus: o + }) : dV({ + configFileName: e, + optionsToExtend: t, + watchOptionsToExtend: c, + extraFileExtensions: _, + system: n, + createProgram: i, + reportDiagnostic: s, + reportWatchStatus: o + }); + } + function gV(e) { + let t, n, i, s, o, c, _, u, d = e.extendedConfigCache, g = !1; + const h = /* @__PURE__ */ new Map(); + let S, T = !1; + const C = e.useCaseSensitiveFileNames(), D = e.getCurrentDirectory(), { configFileName: P, optionsToExtend: O = {}, watchOptionsToExtend: j, extraFileExtensions: F, createProgram: V } = e; + let { rootFiles: L, options: $, watchOptions: U, projectReferences: G } = e, ce, K, X = !1, Z = !1; + const oe = P === void 0 ? void 0 : tF(e, D, C), ne = oe || e, pe = uF(e, ne); + let fe = Kt(); + P && e.configFileParsingResult && (ws(e.configFileParsingResult), fe = Kt()), $n(p.Starting_compilation_in_watch_mode), P && !e.configFileParsingResult && (fe = d0(O), E.assert(!L), Ps(), fe = Kt()), E.assert($), E.assert(L); + const { watchFile: H, watchDirectory: ae, writeLog: le } = _V(e, $), Ae = eu(C); + le(`Current directory: ${D} CaseSensitiveFileNames: ${C}`); + let ge; + P && (ge = H(P, vr, 2e3, U, kl.ConfigFile)); + const de = fV(e, () => $, ne); + vF(de); + const ve = de.getSourceFile; + de.getSourceFile = (be, ...ft) => ci(be, Pr(be), ...ft), de.getSourceFileByPath = ci, de.getNewLine = () => fe, de.fileExists = jr, de.onReleaseOldSourceFile = _s, de.onReleaseParsedCommandLine = $e, de.toPath = Pr, de.getCompilationSettings = () => $, de.useSourceOfProjectReferenceRedirect = Ns(e, e.useSourceOfProjectReferenceRedirect), de.watchDirectoryOfFailedLookupLocation = (be, ft, bt) => ae(be, ft, bt, U, kl.FailedLookupLocations), de.watchAffectingFileLocation = (be, ft) => H(be, ft, 2e3, U, kl.AffectingFileLocation), de.watchTypeRootsDirectory = (be, ft, bt) => ae(be, ft, bt, U, kl.TypeRoots), de.getCachedDirectoryStructureHost = () => oe, de.scheduleInvalidateResolutionsOfFailedLookupLocations = Ss, de.onInvalidatedResolution = At, de.onChangedAutomaticTypeDirectiveNames = At, de.fileIsOpen = $d, de.getCurrentProgram = Be, de.writeLog = le, de.getParsedCommandLine = Yt; + const De = ZW( + de, + P ? Xn(Xi(P, D)) : D, + /*logChangesWhenResolvingModule*/ + !1 + ); + de.resolveModuleNameLiterals = Ns(e, e.resolveModuleNameLiterals), de.resolveModuleNames = Ns(e, e.resolveModuleNames), !de.resolveModuleNameLiterals && !de.resolveModuleNames && (de.resolveModuleNameLiterals = De.resolveModuleNameLiterals.bind(De)), de.resolveTypeReferenceDirectiveReferences = Ns(e, e.resolveTypeReferenceDirectiveReferences), de.resolveTypeReferenceDirectives = Ns(e, e.resolveTypeReferenceDirectives), !de.resolveTypeReferenceDirectiveReferences && !de.resolveTypeReferenceDirectives && (de.resolveTypeReferenceDirectiveReferences = De.resolveTypeReferenceDirectiveReferences.bind(De)), de.resolveLibrary = e.resolveLibrary ? e.resolveLibrary.bind(e) : De.resolveLibrary.bind(De), de.getModuleResolutionCache = e.resolveModuleNameLiterals || e.resolveModuleNames ? Ns(e, e.getModuleResolutionCache) : () => De.getModuleResolutionCache(); + const Ie = !!e.resolveModuleNameLiterals || !!e.resolveTypeReferenceDirectiveReferences || !!e.resolveModuleNames || !!e.resolveTypeReferenceDirectives ? Ns(e, e.hasInvalidatedResolutions) || A1 : $d, ye = e.resolveLibrary ? Ns(e, e.hasInvalidatedLibResolutions) || A1 : $d; + return t = bF($, de), at(), Ne(), P && lt(Pr(P), $, U, kl.ExtendedConfigFile), P ? { getCurrentProgram: Ke, getProgram: Zn, close: Fe, getResolutionCache: Qe } : { getCurrentProgram: Ke, getProgram: Zn, updateRootFileNames: nr, close: Fe, getResolutionCache: Qe }; + function Fe() { + wr(), De.clear(), N_(h, (be) => { + be && be.fileWatcher && (be.fileWatcher.close(), be.fileWatcher = void 0); + }), ge && (ge.close(), ge = void 0), d?.clear(), d = void 0, u && (N_(u, _p), u = void 0), s && (N_(s, _p), s = void 0), i && (N_(i, Zp), i = void 0), _ && (N_(_, (be) => { + var ft; + (ft = be.watcher) == null || ft.close(), be.watcher = void 0, be.watchedDirectories && N_(be.watchedDirectories, _p), be.watchedDirectories = void 0; + }), _ = void 0), t = void 0; + } + function Qe() { + return De; + } + function Ke() { + return t; + } + function Be() { + return t && t.getProgramOrUndefined(); + } + function at() { + le("Synchronizing program"), E.assert($), E.assert(L), wr(); + const be = Ke(); + T && (fe = Kt(), be && ZI(be.getCompilerOptions(), $) && De.onChangesAffectModuleResolution()); + const { hasInvalidatedResolutions: ft, hasInvalidatedLibResolutions: bt } = De.createHasInvalidatedResolutions(Ie, ye), { + originalReadFile: kt, + originalFileExists: yt, + originalDirectoryExists: Ut, + originalCreateDirectory: W, + originalWriteFile: je, + readFileWithCache: st + } = LD(de, Pr); + return JW(Be(), L, $, (z) => Ai(z, st), (z) => de.fileExists(z), ft, bt, os, Yt, G) ? Z && (g && $n(p.File_change_detected_Starting_incremental_compilation), t = V( + /*rootNames*/ + void 0, + /*options*/ + void 0, + de, + t, + K, + G + ), Z = !1) : (g && $n(p.File_change_detected_Starting_incremental_compilation), Wt(ft, bt)), g = !1, e.afterProgramCreate && be !== t && e.afterProgramCreate(t), de.readFile = kt, de.fileExists = yt, de.directoryExists = Ut, de.createDirectory = W, de.writeFile = je, t; + } + function Wt(be, ft) { + le("CreatingProgramWith::"), le(` roots: ${JSON.stringify(L)}`), le(` options: ${JSON.stringify($)}`), G && le(` projectReferences: ${JSON.stringify(G)}`); + const bt = T || !Be(); + T = !1, Z = !1, De.startCachingPerDirectoryResolution(), de.hasInvalidatedResolutions = be, de.hasInvalidatedLibResolutions = ft, de.hasChangedAutomaticTypeDirectiveNames = os; + const kt = Be(); + if (t = V(L, $, de, t, K, G), De.finishCachingPerDirectoryResolution(t.getProgram(), kt), kW( + t.getProgram(), + i || (i = /* @__PURE__ */ new Map()), + re + ), bt && De.updateTypeRootsWatch(), S) { + for (const yt of S) + i.has(yt) || h.delete(yt); + S = void 0; + } + } + function nr(be) { + E.assert(!P, "Cannot update root file names with config file watch mode"), L = be, At(); + } + function Kt() { + return d0($ || O); + } + function Pr(be) { + return _o(be, D, Ae); + } + function Vt(be) { + return typeof be == "boolean"; + } + function zt(be) { + return typeof be.version == "boolean"; + } + function jr(be) { + const ft = Pr(be); + return Vt(h.get(ft)) ? !1 : ne.fileExists(be); + } + function ci(be, ft, bt, kt, yt) { + const Ut = h.get(ft); + if (Vt(Ut)) + return; + const W = typeof bt == "object" ? bt.impliedNodeFormat : void 0; + if (Ut === void 0 || yt || zt(Ut) || Ut.sourceFile.impliedNodeFormat !== W) { + const je = ve(be, bt, kt); + if (Ut) + je ? (Ut.sourceFile = je, Ut.version = je.version, Ut.fileWatcher || (Ut.fileWatcher = nt(ft, be, te, 250, U, kl.SourceFile))) : (Ut.fileWatcher && Ut.fileWatcher.close(), h.set(ft, !1)); + else if (je) { + const st = nt(ft, be, te, 250, U, kl.SourceFile); + h.set(ft, { sourceFile: je, version: je.version, fileWatcher: st }); + } else + h.set(ft, !1); + return je; + } + return Ut.sourceFile; + } + function Xt(be) { + const ft = h.get(be); + ft !== void 0 && (Vt(ft) ? h.set(be, { version: !1 }) : ft.version = !1); + } + function Ai(be, ft) { + const bt = h.get(be); + if (!bt) return; + if (bt.version) return bt.version; + const kt = ft(be); + return kt !== void 0 ? yF(de, kt) : void 0; + } + function _s(be, ft, bt) { + const kt = h.get(be.resolvedPath); + kt !== void 0 && (Vt(kt) ? (S || (S = [])).push(be.path) : kt.sourceFile === be && (kt.fileWatcher && kt.fileWatcher.close(), h.delete(be.resolvedPath), bt || De.removeResolutionsOfFile(be.path))); + } + function $n(be) { + e.onWatchStatusChange && e.onWatchStatusChange(zo(be), fe, $ || O); + } + function os() { + return De.hasChangedAutomaticTypeDirectiveNames(); + } + function wr() { + return c ? (e.clearTimeout(c), c = void 0, !0) : !1; + } + function Ss() { + if (!e.setTimeout || !e.clearTimeout) + return De.invalidateResolutionsOfFailedLookupLocations(); + const be = wr(); + le(`Scheduling invalidateFailedLookup${be ? ", Cancelled earlier one" : ""}`), c = e.setTimeout(Le, 250, "timerToInvalidateFailedLookupResolutions"); + } + function Le() { + c = void 0, De.invalidateResolutionsOfFailedLookupLocations() && At(); + } + function At() { + !e.setTimeout || !e.clearTimeout || (o && e.clearTimeout(o), le("Scheduling update"), o = e.setTimeout(ln, 250, "timerToUpdateProgram")); + } + function vr() { + E.assert(!!P), n = 2, At(); + } + function ln() { + o = void 0, g = !0, Zn(); + } + function Zn() { + var be, ft, bt, kt; + switch (n) { + case 1: + (be = Vu) == null || be.logStartUpdateProgram("PartialConfigReload"), ri(); + break; + case 2: + (ft = Vu) == null || ft.logStartUpdateProgram("FullConfigReload"), mi(); + break; + default: + (bt = Vu) == null || bt.logStartUpdateProgram("SynchronizeProgram"), at(); + break; + } + return (kt = Vu) == null || kt.logStopUpdateProgram("Done"), Ke(); + } + function ri() { + le("Reloading new file names and options"), E.assert($), E.assert(P), n = 0, L = hD($.configFile.configFileSpecs, Xi(Xn(P), D), $, pe, F), CO(L, Xi(P, D), $.configFile.configFileSpecs, K, X) && (Z = !0), at(); + } + function mi() { + E.assert(P), le(`Reloading config file: ${P}`), n = 0, oe && oe.clearCache(), Ps(), T = !0, at(), Ne(), lt(Pr(P), $, U, kl.ExtendedConfigFile); + } + function Ps() { + E.assert(P), ws( + bA( + P, + O, + pe, + d || (d = /* @__PURE__ */ new Map()), + j, + F + ) + ); + } + function ws(be) { + L = be.fileNames, $ = be.options, U = be.watchOptions, G = be.projectReferences, ce = be.wildcardDirectories, K = Vb(be).slice(), X = gD(be.raw), Z = !0; + } + function Yt(be) { + const ft = Pr(be); + let bt = _?.get(ft); + if (bt) { + if (!bt.updateLevel) return bt.parsedCommandLine; + if (bt.parsedCommandLine && bt.updateLevel === 1 && !e.getParsedCommandLine) { + le("Reloading new file names and options"), E.assert($); + const yt = hD( + bt.parsedCommandLine.options.configFile.configFileSpecs, + Xi(Xn(be), D), + $, + pe + ); + return bt.parsedCommandLine = { ...bt.parsedCommandLine, fileNames: yt }, bt.updateLevel = void 0, bt.parsedCommandLine; + } + } + le(`Loading config file: ${be}`); + const kt = e.getParsedCommandLine ? e.getParsedCommandLine(be) : Ca(be); + return bt ? (bt.parsedCommandLine = kt, bt.updateLevel = void 0) : (_ || (_ = /* @__PURE__ */ new Map())).set(ft, bt = { parsedCommandLine: kt }), jt(be, ft, bt), kt; + } + function Ca(be) { + const ft = pe.onUnRecoverableConfigFileDiagnostic; + pe.onUnRecoverableConfigFileDiagnostic = ka; + const bt = bA( + be, + /*optionsToExtend*/ + void 0, + pe, + d || (d = /* @__PURE__ */ new Map()), + j + ); + return pe.onUnRecoverableConfigFileDiagnostic = ft, bt; + } + function $e(be) { + var ft; + const bt = Pr(be), kt = _?.get(bt); + kt && (_.delete(bt), kt.watchedDirectories && N_(kt.watchedDirectories, _p), (ft = kt.watcher) == null || ft.close(), xW(bt, u)); + } + function nt(be, ft, bt, kt, yt, Ut) { + return H(ft, (W, je) => bt(W, je, be), kt, yt, Ut); + } + function te(be, ft, bt) { + rt(be, bt, ft), ft === 2 && h.has(bt) && De.invalidateResolutionOfFile(bt), Xt(bt), At(); + } + function rt(be, ft, bt) { + oe && oe.addOrDeleteFile(be, ft, bt); + } + function re(be, ft) { + return _?.has(be) ? jD : nt( + be, + ft, + Ee, + 500, + U, + kl.MissingFile + ); + } + function Ee(be, ft, bt) { + rt(be, bt, ft), ft === 0 && i.has(bt) && (i.get(bt).close(), i.delete(bt), Xt(bt), At()); + } + function Ne() { + jA( + s || (s = /* @__PURE__ */ new Map()), + ce, + et + ); + } + function et(be, ft) { + return ae( + be, + (bt) => { + E.assert(P), E.assert($); + const kt = Pr(bt); + oe && oe.addOrDeleteFileOrDirectory(bt, kt), Xt(kt), !BA({ + watchedDirPath: Pr(be), + fileOrDirectory: bt, + fileOrDirectoryPath: kt, + configFileName: P, + extraFileExtensions: F, + options: $, + program: Ke() || L, + currentDirectory: D, + useCaseSensitiveFileNames: C, + writeLog: le, + toPath: Pr + }) && n !== 2 && (n = 1, At()); + }, + ft, + U, + kl.WildcardDirectory + ); + } + function lt(be, ft, bt, kt) { + rF( + be, + ft, + u || (u = /* @__PURE__ */ new Map()), + (yt, Ut) => H( + yt, + (W, je) => { + var st; + rt(yt, Ut, je), d && nF(d, Ut, Pr); + const z = (st = u.get(Ut)) == null ? void 0 : st.projects; + z?.size && z.forEach((he) => { + if (P && Pr(P) === he) + n = 2; + else { + const q = _?.get(he); + q && (q.updateLevel = 2), De.removeResolutionsFromProjectReferenceRedirects(he); + } + At(); + }); + }, + 2e3, + bt, + kt + ), + Pr + ); + } + function jt(be, ft, bt) { + var kt, yt, Ut, W; + bt.watcher || (bt.watcher = H( + be, + (je, st) => { + rt(be, ft, st); + const z = _?.get(ft); + z && (z.updateLevel = 2), De.removeResolutionsFromProjectReferenceRedirects(ft), At(); + }, + 2e3, + ((kt = bt.parsedCommandLine) == null ? void 0 : kt.watchOptions) || U, + kl.ConfigFileOfReferencedProject + )), jA( + bt.watchedDirectories || (bt.watchedDirectories = /* @__PURE__ */ new Map()), + (yt = bt.parsedCommandLine) == null ? void 0 : yt.wildcardDirectories, + (je, st) => { + var z; + return ae( + je, + (he) => { + const q = Pr(he); + oe && oe.addOrDeleteFileOrDirectory(he, q), Xt(q); + const we = _?.get(ft); + we?.parsedCommandLine && (BA({ + watchedDirPath: Pr(je), + fileOrDirectory: he, + fileOrDirectoryPath: q, + configFileName: be, + options: we.parsedCommandLine.options, + program: we.parsedCommandLine.fileNames, + currentDirectory: D, + useCaseSensitiveFileNames: C, + writeLog: le, + toPath: Pr + }) || we.updateLevel !== 2 && (we.updateLevel = 1, At())); + }, + st, + ((z = bt.parsedCommandLine) == null ? void 0 : z.watchOptions) || U, + kl.WildcardDirectoryOfReferencedProject + ); + } + ), lt( + ft, + (Ut = bt.parsedCommandLine) == null ? void 0 : Ut.options, + ((W = bt.parsedCommandLine) == null ? void 0 : W.watchOptions) || U, + kl.ExtendedConfigOfReferencedProject + ); + } + } + var ise = /* @__PURE__ */ ((e) => (e[e.Unbuildable = 0] = "Unbuildable", e[e.UpToDate = 1] = "UpToDate", e[e.UpToDateWithUpstreamTypes = 2] = "UpToDateWithUpstreamTypes", e[e.OutputMissing = 3] = "OutputMissing", e[e.ErrorReadingFile = 4] = "ErrorReadingFile", e[e.OutOfDateWithSelf = 5] = "OutOfDateWithSelf", e[e.OutOfDateWithUpstream = 6] = "OutOfDateWithUpstream", e[e.OutOfDateBuildInfo = 7] = "OutOfDateBuildInfo", e[e.OutOfDateOptions = 8] = "OutOfDateOptions", e[e.OutOfDateRoots = 9] = "OutOfDateRoots", e[e.UpstreamOutOfDate = 10] = "UpstreamOutOfDate", e[e.UpstreamBlocked = 11] = "UpstreamBlocked", e[e.ComputingUpstream = 12] = "ComputingUpstream", e[e.TsVersionOutputOfDate = 13] = "TsVersionOutputOfDate", e[e.UpToDateWithInputFileText = 14] = "UpToDateWithInputFileText", e[e.ContainerOnly = 15] = "ContainerOnly", e[e.ForceBuild = 16] = "ForceBuild", e))(ise || {}); + function hV(e) { + return Go( + e, + ".json" + /* Json */ + ) ? e : Mn(e, "tsconfig.json"); + } + var HRe = /* @__PURE__ */ new Date(-864e13), GRe = /* @__PURE__ */ new Date(864e13); + function $Re(e, t, n) { + const i = e.get(t); + let s; + return i || (s = n(), e.set(t, s)), i || s; + } + function sse(e, t) { + return $Re(e, t, () => /* @__PURE__ */ new Map()); + } + function GA(e) { + return e.now ? e.now() : /* @__PURE__ */ new Date(); + } + function Lx(e) { + return !!e && !!e.buildOrder; + } + function $A(e) { + return Lx(e) ? e.buildOrder : e; + } + function TF(e, t) { + return (n) => { + let i = t ? `[${Wb( + HA(e), + "\x1B[90m" + /* Grey */ + )}] ` : `${HA(e)} - `; + i += `${gm(n.messageText, e.newLine)}${e.newLine + e.newLine}`, e.write(i); + }; + } + function nbe(e, t, n, i) { + const s = pV(e, t); + return s.getModifiedTime = e.getModifiedTime ? (o) => e.getModifiedTime(o) : nb, s.setModifiedTime = e.setModifiedTime ? (o, c) => e.setModifiedTime(o, c) : ka, s.deleteFile = e.deleteFile ? (o) => e.deleteFile(o) : ka, s.reportDiagnostic = n || Fx(e), s.reportSolutionBuilderStatus = i || TF(e), s.now = Ns(e, e.now), s; + } + function ase(e = _l, t, n, i, s) { + const o = nbe(e, t, n, i); + return o.reportErrorSummary = s, o; + } + function ose(e = _l, t, n, i, s) { + const o = nbe(e, t, n, i), c = uV(e, s); + return fR(o, c), o; + } + function XRe(e) { + const t = {}; + return dO.forEach((n) => { + io(e, n.name) && (t[n.name] = e[n.name]); + }), t; + } + function cse(e, t, n) { + return Ebe( + /*watch*/ + !1, + e, + t, + n + ); + } + function lse(e, t, n, i) { + return Ebe( + /*watch*/ + !0, + e, + t, + n, + i + ); + } + function QRe(e, t, n, i, s) { + const o = t, c = t, _ = XRe(i), u = fV(o, () => D.projectCompilerOptions); + vF(u), u.getParsedCommandLine = (P) => n6(D, P, Km(D, P)), u.resolveModuleNameLiterals = Ns(o, o.resolveModuleNameLiterals), u.resolveTypeReferenceDirectiveReferences = Ns(o, o.resolveTypeReferenceDirectiveReferences), u.resolveLibrary = Ns(o, o.resolveLibrary), u.resolveModuleNames = Ns(o, o.resolveModuleNames), u.resolveTypeReferenceDirectives = Ns(o, o.resolveTypeReferenceDirectives), u.getModuleResolutionCache = Ns(o, o.getModuleResolutionCache); + let d, g; + !u.resolveModuleNameLiterals && !u.resolveModuleNames && (d = qC(u.getCurrentDirectory(), u.getCanonicalFileName), u.resolveModuleNameLiterals = (P, O, j, F, V) => WA( + P, + O, + j, + F, + V, + o, + d, + MW + ), u.getModuleResolutionCache = () => d), !u.resolveTypeReferenceDirectiveReferences && !u.resolveTypeReferenceDirectives && (g = NO( + u.getCurrentDirectory(), + u.getCanonicalFileName, + /*options*/ + void 0, + d?.getPackageJsonInfoCache(), + d?.optionsToRedirectsKey + ), u.resolveTypeReferenceDirectiveReferences = (P, O, j, F, V) => WA( + P, + O, + j, + F, + V, + o, + g, + sF + )); + let h; + u.resolveLibrary || (h = qC( + u.getCurrentDirectory(), + u.getCanonicalFileName, + /*options*/ + void 0, + d?.getPackageJsonInfoCache() + ), u.resolveLibrary = (P, O, j) => IO( + P, + O, + j, + o, + h + )), u.getBuildInfo = (P, O) => hbe( + D, + P, + Km(D, O), + /*modifiedTime*/ + void 0 + ); + const { watchFile: S, watchDirectory: T, writeLog: C } = _V(c, i), D = { + host: o, + hostWithWatch: c, + parseConfigFileHost: uF(o), + write: Ns(o, o.trace), + // State of solution + options: i, + baseCompilerOptions: _, + rootNames: n, + baseWatchOptions: s, + resolvedConfigFilePaths: /* @__PURE__ */ new Map(), + configFileCache: /* @__PURE__ */ new Map(), + projectStatus: /* @__PURE__ */ new Map(), + extendedConfigCache: /* @__PURE__ */ new Map(), + buildInfoCache: /* @__PURE__ */ new Map(), + outputTimeStamps: /* @__PURE__ */ new Map(), + builderPrograms: /* @__PURE__ */ new Map(), + diagnostics: /* @__PURE__ */ new Map(), + projectPendingBuild: /* @__PURE__ */ new Map(), + projectErrorsReported: /* @__PURE__ */ new Map(), + compilerHost: u, + moduleResolutionCache: d, + typeReferenceDirectiveResolutionCache: g, + libraryResolutionCache: h, + // Mutable state + buildOrder: void 0, + readFileWithCache: (P) => o.readFile(P), + projectCompilerOptions: _, + cache: void 0, + allProjectBuildPending: !0, + needsSummary: !0, + watchAllProjectsPending: e, + // Watch state + watch: e, + allWatchedWildcardDirectories: /* @__PURE__ */ new Map(), + allWatchedInputFiles: /* @__PURE__ */ new Map(), + allWatchedConfigFiles: /* @__PURE__ */ new Map(), + allWatchedExtendedConfigFiles: /* @__PURE__ */ new Map(), + allWatchedPackageJsonFiles: /* @__PURE__ */ new Map(), + filesWatched: /* @__PURE__ */ new Map(), + lastCachedPackageJsonLookups: /* @__PURE__ */ new Map(), + timerToBuildInvalidatedProject: void 0, + reportFileChangeDetected: !1, + watchFile: S, + watchDirectory: T, + writeLog: C + }; + return D; + } + function td(e, t) { + return _o(t, e.compilerHost.getCurrentDirectory(), e.compilerHost.getCanonicalFileName); + } + function Km(e, t) { + const { resolvedConfigFilePaths: n } = e, i = n.get(t); + if (i !== void 0) return i; + const s = td(e, t); + return n.set(t, s), s; + } + function ibe(e) { + return !!e.options; + } + function YRe(e, t) { + const n = e.configFileCache.get(t); + return n && ibe(n) ? n : void 0; + } + function n6(e, t, n) { + const { configFileCache: i } = e, s = i.get(n); + if (s) + return ibe(s) ? s : void 0; + Yo("SolutionBuilder::beforeConfigFileParsing"); + let o; + const { parseConfigFileHost: c, baseCompilerOptions: _, baseWatchOptions: u, extendedConfigCache: d, host: g } = e; + let h; + return g.getParsedCommandLine ? (h = g.getParsedCommandLine(t), h || (o = zo(p.File_0_not_found, t))) : (c.onUnRecoverableConfigFileDiagnostic = (S) => o = S, h = bA(t, _, c, d, u), c.onUnRecoverableConfigFileDiagnostic = ka), i.set(n, h || o), Yo("SolutionBuilder::afterConfigFileParsing"), ep("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing"), h; + } + function XA(e, t) { + return hV(O1(e.compilerHost.getCurrentDirectory(), t)); + } + function sbe(e, t) { + const n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), s = []; + let o, c; + for (const u of t) + _(u); + return c ? { buildOrder: o || He, circularDiagnostics: c } : o || He; + function _(u, d) { + const g = Km(e, u); + if (i.has(g)) return; + if (n.has(g)) { + d || (c || (c = [])).push( + zo( + p.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, + s.join(`\r +`) + ) + ); + return; + } + n.set(g, !0), s.push(u); + const h = n6(e, u, g); + if (h && h.projectReferences) + for (const S of h.projectReferences) { + const T = XA(e, S.path); + _(T, d || S.circular); + } + s.pop(), i.set(g, !0), (o || (o = [])).push(u); + } + } + function xF(e) { + return e.buildOrder || ZRe(e); + } + function ZRe(e) { + const t = sbe(e, e.rootNames.map((s) => XA(e, s))); + e.resolvedConfigFilePaths.clear(); + const n = new Set( + $A(t).map( + (s) => Km(e, s) + ) + ), i = { onDeleteValue: ka }; + return Ig(e.configFileCache, n, i), Ig(e.projectStatus, n, i), Ig(e.builderPrograms, n, i), Ig(e.diagnostics, n, i), Ig(e.projectPendingBuild, n, i), Ig(e.projectErrorsReported, n, i), Ig(e.buildInfoCache, n, i), Ig(e.outputTimeStamps, n, i), Ig(e.lastCachedPackageJsonLookups, n, i), e.watch && (Ig( + e.allWatchedConfigFiles, + n, + { onDeleteValue: Zp } + ), e.allWatchedExtendedConfigFiles.forEach((s) => { + s.projects.forEach((o) => { + n.has(o) || s.projects.delete(o); + }), s.close(); + }), Ig( + e.allWatchedWildcardDirectories, + n, + { onDeleteValue: (s) => s.forEach(_p) } + ), Ig( + e.allWatchedInputFiles, + n, + { onDeleteValue: (s) => s.forEach(Zp) } + ), Ig( + e.allWatchedPackageJsonFiles, + n, + { onDeleteValue: (s) => s.forEach(Zp) } + )), e.buildOrder = t; + } + function abe(e, t, n) { + const i = t && XA(e, t), s = xF(e); + if (Lx(s)) return s; + if (i) { + const c = Km(e, i); + if (rc( + s, + (u) => Km(e, u) === c + ) === -1) return; + } + const o = i ? sbe(e, [i]) : s; + return E.assert(!Lx(o)), E.assert(!n || i !== void 0), E.assert(!n || o[o.length - 1] === i), n ? o.slice(0, o.length - 1) : o; + } + function obe(e) { + e.cache && use(e); + const { compilerHost: t, host: n } = e, i = e.readFileWithCache, s = t.getSourceFile, { + originalReadFile: o, + originalFileExists: c, + originalDirectoryExists: _, + originalCreateDirectory: u, + originalWriteFile: d, + getSourceFileWithCache: g, + readFileWithCache: h + } = LD( + n, + (S) => td(e, S), + (...S) => s.call(t, ...S) + ); + e.readFileWithCache = h, t.getSourceFile = g, e.cache = { + originalReadFile: o, + originalFileExists: c, + originalDirectoryExists: _, + originalCreateDirectory: u, + originalWriteFile: d, + originalReadFileWithCache: i, + originalGetSourceFile: s + }; + } + function use(e) { + if (!e.cache) return; + const { cache: t, host: n, compilerHost: i, extendedConfigCache: s, moduleResolutionCache: o, typeReferenceDirectiveResolutionCache: c, libraryResolutionCache: _ } = e; + n.readFile = t.originalReadFile, n.fileExists = t.originalFileExists, n.directoryExists = t.originalDirectoryExists, n.createDirectory = t.originalCreateDirectory, n.writeFile = t.originalWriteFile, i.getSourceFile = t.originalGetSourceFile, e.readFileWithCache = t.originalReadFileWithCache, s.clear(), o?.clear(), c?.clear(), _?.clear(), e.cache = void 0; + } + function cbe(e, t) { + e.projectStatus.delete(t), e.diagnostics.delete(t); + } + function lbe({ projectPendingBuild: e }, t, n) { + const i = e.get(t); + (i === void 0 || i < n) && e.set(t, n); + } + function ube(e, t) { + if (!e.allProjectBuildPending) return; + e.allProjectBuildPending = !1, e.options.watch && Tse(e, p.Starting_compilation_in_watch_mode), obe(e), $A(xF(e)).forEach( + (i) => e.projectPendingBuild.set( + Km(e, i), + 0 + /* Update */ + ) + ), t && t.throwIfCancellationRequested(); + } + var _se = /* @__PURE__ */ ((e) => (e[e.Build = 0] = "Build", e[e.UpdateOutputFileStamps = 1] = "UpdateOutputFileStamps", e))(_se || {}); + function _be(e, t) { + return e.projectPendingBuild.delete(t), e.diagnostics.has(t) ? 1 : 0; + } + function KRe(e, t, n, i, s) { + let o = !0; + return { + kind: 1, + project: t, + projectPath: n, + buildOrder: s, + getCompilerOptions: () => i.options, + getCurrentDirectory: () => e.compilerHost.getCurrentDirectory(), + updateOutputFileStatmps: () => { + vbe(e, i, n), o = !1; + }, + done: () => (o && vbe(e, i, n), Yo("SolutionBuilder::Timestamps only updates"), _be(e, n)) + }; + } + function eje(e, t, n, i, s, o) { + let c = 0, _, u; + return { + kind: 0, + project: t, + projectPath: n, + buildOrder: o, + getCompilerOptions: () => s.options, + getCurrentDirectory: () => e.compilerHost.getCurrentDirectory(), + getBuilderProgram: () => g(lo), + getProgram: () => g( + (V) => V.getProgramOrUndefined() + ), + getSourceFile: (V) => g( + (L) => L.getSourceFile(V) + ), + getSourceFiles: () => h( + (V) => V.getSourceFiles() + ), + getOptionsDiagnostics: (V) => h( + (L) => L.getOptionsDiagnostics(V) + ), + getGlobalDiagnostics: (V) => h( + (L) => L.getGlobalDiagnostics(V) + ), + getConfigFileParsingDiagnostics: () => h( + (V) => V.getConfigFileParsingDiagnostics() + ), + getSyntacticDiagnostics: (V, L) => h( + ($) => $.getSyntacticDiagnostics(V, L) + ), + getAllDependencies: (V) => h( + (L) => L.getAllDependencies(V) + ), + getSemanticDiagnostics: (V, L) => h( + ($) => $.getSemanticDiagnostics(V, L) + ), + getSemanticDiagnosticsOfNextAffectedFile: (V, L) => g( + ($) => $.getSemanticDiagnosticsOfNextAffectedFile && $.getSemanticDiagnosticsOfNextAffectedFile(V, L) + ), + emit: (V, L, $, U, G) => { + if (V || U) + return g( + (ce) => { + var K, X; + return ce.emit(V, L, $, U, G || ((X = (K = e.host).getCustomTransformers) == null ? void 0 : X.call(K, t))); + } + ); + if (F(2, $), c === 4) + return O(L, $); + if (c === 3) + return P(L, $, G); + }, + done: d + }; + function d(V, L, $) { + return F(6, V, L, $), Yo("SolutionBuilder::Projects built"), _be(e, n); + } + function g(V) { + return F( + 0 + /* CreateProgram */ + ), _ && V(_); + } + function h(V) { + return g(V) || He; + } + function S() { + var V, L, $; + if (E.assert(_ === void 0), e.options.dry) { + vf(e, p.A_non_dry_build_would_build_project_0, t), u = 1, c = 5; + return; + } + if (e.options.verbose && vf(e, p.Building_project_0, t), s.fileNames.length === 0) { + JD(e, n, Vb(s)), u = 0, c = 5; + return; + } + const { host: U, compilerHost: G } = e; + if (e.projectCompilerOptions = s.options, (V = e.moduleResolutionCache) == null || V.update(s.options), (L = e.typeReferenceDirectiveResolutionCache) == null || L.update(s.options), _ = U.createProgram( + s.fileNames, + s.options, + G, + tje(e, n, s), + Vb(s), + s.projectReferences + ), e.watch) { + const ce = ($ = e.moduleResolutionCache) == null ? void 0 : $.getPackageJsonInfoCache().getInternalMap(); + e.lastCachedPackageJsonLookups.set( + n, + ce && new Set(ts( + ce.values(), + (K) => e.host.realpath && (AO(K) || K.directoryExists) ? e.host.realpath(Mn(K.packageDirectory, "package.json")) : Mn(K.packageDirectory, "package.json") + )) + ), e.builderPrograms.set(n, _); + } + c++; + } + function T(V, L, $) { + V.length ? { buildResult: u, step: c } = dse( + e, + n, + _, + s, + V, + L, + $ + ) : c++; + } + function C(V) { + E.assertIsDefined(_), T( + [ + ..._.getConfigFileParsingDiagnostics(), + ..._.getOptionsDiagnostics(V), + ..._.getGlobalDiagnostics(V), + ..._.getSyntacticDiagnostics( + /*sourceFile*/ + void 0, + V + ) + ], + 8, + "Syntactic" + ); + } + function D(V) { + T( + E.checkDefined(_).getSemanticDiagnostics( + /*sourceFile*/ + void 0, + V + ), + 16, + "Semantic" + ); + } + function P(V, L, $) { + var U, G, ce; + E.assertIsDefined(_), E.assert( + c === 3 + /* Emit */ + ); + const K = _.saveEmitState(); + let X; + const Z = (De) => (X || (X = [])).push(De), oe = [], { emitResult: ne } = hF( + _, + Z, + /*write*/ + void 0, + /*reportSummary*/ + void 0, + (De, Xe, Ie, ye, Fe, Qe) => oe.push({ name: De, text: Xe, writeByteOrderMark: Ie, data: Qe }), + L, + /*emitOnlyDtsFiles*/ + !1, + $ || ((G = (U = e.host).getCustomTransformers) == null ? void 0 : G.call(U, t)) + ); + if (X) + return _.restoreEmitState(K), { buildResult: u, step: c } = dse( + e, + n, + _, + s, + X, + 32, + "Declaration file" + ), { + emitSkipped: !0, + diagnostics: ne.diagnostics + }; + const { host: pe, compilerHost: fe } = e, H = (ce = _.hasChangedEmitSignature) != null && ce.call(_) ? 0 : 2, ae = b4(), le = /* @__PURE__ */ new Map(), Ae = _.getCompilerOptions(), ge = I4(Ae); + let de, ve; + return oe.forEach(({ name: De, text: Xe, writeByteOrderMark: Ie, data: ye }) => { + const Fe = td(e, De); + le.set(td(e, De), De), ye?.buildInfo && gbe(e, ye.buildInfo, n, Ae, H); + const Qe = ye?.differsOnlyInMap ? TT(e.host, De) : void 0; + w3(V ? { writeFile: V } : fe, ae, De, Xe, Ie), ye?.differsOnlyInMap ? e.host.setModifiedTime(De, Qe) : !ge && e.watch && (de || (de = mse(e, n))).set(Fe, ve || (ve = GA(e.host))); + }), j( + ae, + le, + oe.length ? oe[0].name : vW(s, !pe.useCaseSensitiveFileNames()), + H + ), ne; + } + function O(V, L) { + E.assertIsDefined(_), E.assert( + c === 4 + /* EmitBuildInfo */ + ); + const $ = _.emitBuildInfo((U, G, ce, K, X, Z) => { + Z?.buildInfo && gbe( + e, + Z.buildInfo, + n, + _.getCompilerOptions(), + 2 + /* DeclarationOutputUnchanged */ + ), V ? V(U, G, ce, K, X, Z) : e.compilerHost.writeFile(U, G, ce, K, X, Z); + }, L); + return $.diagnostics.length && (CF(e, $.diagnostics), e.diagnostics.set(n, [...e.diagnostics.get(n), ...$.diagnostics]), u = 64 & u), $.emittedFiles && e.write && $.emittedFiles.forEach((U) => dbe(e, s, U)), pse(e, _), c = 5, $; + } + function j(V, L, $, U) { + const G = V.getDiagnostics(); + return G.length ? ({ buildResult: u, step: c } = dse( + e, + n, + _, + s, + G, + 64, + "Emit" + ), G) : (e.write && L.forEach((ce) => dbe(e, s, ce)), ybe(e, s, n, p.Updating_unchanged_output_timestamps_of_project_0, L), e.diagnostics.delete(n), e.projectStatus.set(n, { + type: 1, + oldestOutputFileName: $ + }), pse(e, _), c = 5, u = U, G); + } + function F(V, L, $, U) { + for (; c <= V && c < 6; ) { + const G = c; + switch (c) { + case 0: + S(); + break; + case 1: + C(L); + break; + case 2: + D(L); + break; + case 3: + P($, L, U); + break; + case 4: + O($, L); + break; + case 5: + sje(e, t, n, i, s, o, E.checkDefined(u)), c++; + break; + } + E.assert(c > G); + } + } + } + function fbe(e, t, n) { + if (!e.projectPendingBuild.size || Lx(t)) return; + const { options: i, projectPendingBuild: s } = e; + for (let o = 0; o < t.length; o++) { + const c = t[o], _ = Km(e, c), u = e.projectPendingBuild.get(_); + if (u === void 0) continue; + n && (n = !1, wbe(e, t)); + const d = n6(e, c, _); + if (!d) { + Dbe(e, _), s.delete(_); + continue; + } + u === 2 ? (xbe(e, c, _, d), kbe(e, _, d), Cbe(e, c, _, d), bse(e, c, _, d), Sse(e, c, _, d)) : u === 1 && (d.fileNames = hD(d.options.configFile.configFileSpecs, Xn(c), d.options, e.parseConfigFileHost), CO(d.fileNames, c, d.options.configFile.configFileSpecs, d.errors, gD(d.raw)), bse(e, c, _, d), Sse(e, c, _, d)); + const g = yse(e, d, _); + if (!i.force) { + if (g.type === 1) { + bV(e, c, g), JD(e, _, Vb(d)), s.delete(_), i.dry && vf(e, p.Project_0_is_up_to_date, c); + continue; + } + if (g.type === 2 || g.type === 14) + return JD(e, _, Vb(d)), { + kind: 1, + status: g, + project: c, + projectPath: _, + projectIndex: o, + config: d + }; + } + if (g.type === 11) { + bV(e, c, g), JD(e, _, Vb(d)), s.delete(_), i.verbose && vf( + e, + g.upstreamProjectBlocked ? p.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : p.Skipping_build_of_project_0_because_its_dependency_1_has_errors, + c, + g.upstreamProjectName + ); + continue; + } + if (g.type === 15) { + bV(e, c, g), JD(e, _, Vb(d)), s.delete(_); + continue; + } + return { + kind: 0, + status: g, + project: c, + projectPath: _, + projectIndex: o, + config: d + }; + } + } + function pbe(e, t, n) { + return bV(e, t.project, t.status), t.kind !== 1 ? eje( + e, + t.project, + t.projectPath, + t.projectIndex, + t.config, + n + ) : KRe( + e, + t.project, + t.projectPath, + t.config, + n + ); + } + function fse(e, t, n) { + const i = fbe(e, t, n); + return i && pbe(e, i, t); + } + function dbe({ write: e }, t, n) { + e && t.options.listEmittedFiles && e(`TSFILE: ${n}`); + } + function tje({ options: e, builderPrograms: t, compilerHost: n }, i, s) { + if (e.force) return; + const o = t.get(i); + return o || bF(s.options, n); + } + function pse(e, t) { + t && (e.write && nV(t, e.write), e.host.afterProgramEmitAndDiagnostics && e.host.afterProgramEmitAndDiagnostics(t), t.releaseProgram()), e.projectCompilerOptions = e.baseCompilerOptions; + } + function dse(e, t, n, i, s, o, c) { + const _ = n && !n.getCompilerOptions().outFile; + return JD(e, t, s), e.projectStatus.set(t, { type: 0, reason: `${c} errors` }), _ ? { + buildResult: o, + step: 4 + /* EmitBuildInfo */ + } : (pse(e, n), { + buildResult: o, + step: 5 + /* QueueReferencingProjects */ + }); + } + function yV(e) { + return !!e.watcher; + } + function mbe(e, t) { + const n = td(e, t), i = e.filesWatched.get(n); + if (e.watch && i) { + if (!yV(i)) return i; + if (i.modifiedTime) return i.modifiedTime; + } + const s = TT(e.host, t); + return e.watch && (i ? i.modifiedTime = s : e.filesWatched.set(n, s)), s; + } + function vV(e, t, n, i, s, o, c) { + const _ = td(e, t), u = e.filesWatched.get(_); + if (u && yV(u)) + u.callbacks.push(n); + else { + const d = e.watchFile( + t, + (g, h, S) => { + const T = E.checkDefined(e.filesWatched.get(_)); + E.assert(yV(T)), T.modifiedTime = S, T.callbacks.forEach((C) => C(g, h, S)); + }, + i, + s, + o, + c + ); + e.filesWatched.set(_, { callbacks: [n], watcher: d, modifiedTime: u }); + } + return { + close: () => { + const d = E.checkDefined(e.filesWatched.get(_)); + E.assert(yV(d)), d.callbacks.length === 1 ? (e.filesWatched.delete(_), _p(d)) : bT(d.callbacks, n); + } + }; + } + function mse(e, t) { + if (!e.watch) return; + let n = e.outputTimeStamps.get(t); + return n || e.outputTimeStamps.set(t, n = /* @__PURE__ */ new Map()), n; + } + function gbe(e, t, n, i, s) { + const o = S0(i), c = gse(e, o, n), _ = GA(e.host); + c ? (c.buildInfo = t, c.modifiedTime = _, s & 2 || (c.latestChangedDtsTime = _)) : e.buildInfoCache.set(n, { + path: td(e, o), + buildInfo: t, + modifiedTime: _, + latestChangedDtsTime: s & 2 ? void 0 : _ + }); + } + function gse(e, t, n) { + const i = td(e, t), s = e.buildInfoCache.get(n); + return s?.path === i ? s : void 0; + } + function hbe(e, t, n, i) { + const s = td(e, t), o = e.buildInfoCache.get(n); + if (o !== void 0 && o.path === s) + return o.buildInfo || void 0; + const c = e.readFileWithCache(t), _ = c ? TW(t, c) : void 0; + return e.buildInfoCache.set(n, { path: s, buildInfo: _ || !1, modifiedTime: i || G_ }), _; + } + function hse(e, t, n, i) { + const s = mbe(e, t); + if (n < s) + return { + type: 5, + outOfDateOutputFileName: i, + newerInputFileName: t + }; + } + function rje(e, t, n) { + var i, s, o, c; + if (!t.fileNames.length && !gD(t.raw)) + return { + type: 15 + /* ContainerOnly */ + }; + let _; + const u = !!e.options.force; + if (t.projectReferences) { + e.projectStatus.set(n, { + type: 12 + /* ComputingUpstream */ + }); + for (const K of t.projectReferences) { + const X = e6(K), Z = Km(e, X), oe = n6(e, X, Z), ne = yse(e, oe, Z); + if (!(ne.type === 12 || ne.type === 15)) { + if (ne.type === 0 || ne.type === 11) + return { + type: 11, + upstreamProjectName: K.path, + upstreamProjectBlocked: ne.type === 11 + /* UpstreamBlocked */ + }; + if (ne.type !== 1) + return { + type: 10, + upstreamProjectName: K.path + }; + u || (_ || (_ = [])).push({ ref: K, refStatus: ne, resolvedRefPath: Z, resolvedConfig: oe }); + } + } + } + if (u) return { + type: 16 + /* ForceBuild */ + }; + const { host: d } = e, g = S0(t.options); + let h, S = GRe, T, C, D; + if (g) { + const K = gse(e, g, n); + if (T = K?.modifiedTime || TT(d, g), T === G_) + return K || e.buildInfoCache.set(n, { + path: td(e, g), + buildInfo: !1, + modifiedTime: T + }), { + type: 3, + missingOutputFileName: g + }; + const X = hbe(e, g, n, T); + if (!X) + return { + type: 4, + fileName: g + }; + if (X.program && X.version !== dd) + return { + type: 13, + version: X.version + }; + if (X.program) { + if ((i = X.program.changeFileSet) != null && i.length || (t.options.noEmit ? (c = X.program.semanticDiagnosticsPerFile) != null && c.length : (s = X.program.affectedFilesPendingEmit) != null && s.length || (o = X.program.emitDiagnosticsPerFile) != null && o.length)) + return { + type: 7, + buildInfoFile: g + }; + if (!t.options.noEmit && t6(t.options, X.program.options || {})) + return { + type: 8, + buildInfoFile: g + }; + C = X.program; + } + S = T, h = g; + } + let P, O = HRe, j = !1; + const F = /* @__PURE__ */ new Set(); + for (const K of t.fileNames) { + const X = mbe(e, K); + if (X === G_) + return { + type: 0, + reason: `${K} does not exist` + }; + const Z = C ? td(e, K) : void 0; + if (T && T < X) { + let oe, ne; + if (C) { + D || (D = $W(C, g, d)); + const pe = D.roots.get(Z); + oe = D.fileInfos.get(pe ?? Z); + const fe = oe ? e.readFileWithCache(pe ?? K) : void 0; + ne = fe !== void 0 ? yF(d, fe) : void 0, oe && oe === ne && (j = !0); + } + if (!oe || oe !== ne) + return { + type: 5, + outOfDateOutputFileName: g, + newerInputFileName: K + }; + } + X > O && (P = K, O = X), C && F.add(Z); + } + if (C) { + D || (D = $W(C, g, d)); + const K = Dl( + D.roots, + // File was root file when project was built but its not any more + (X, Z) => F.has(Z) ? void 0 : Z + ); + if (K) + return { + type: 9, + buildInfoFile: g, + inputFile: K + }; + } + if (!g) { + const K = ZO(t, !d.useCaseSensitiveFileNames()), X = mse(e, n); + for (const Z of K) { + const oe = td(e, Z); + let ne = X?.get(oe); + if (ne || (ne = TT(e.host, Z), X?.set(oe, ne)), ne === G_) + return { + type: 3, + missingOutputFileName: Z + }; + if (ne < O) + return { + type: 5, + outOfDateOutputFileName: Z, + newerInputFileName: P + }; + ne < S && (S = ne, h = Z); + } + } + const V = e.buildInfoCache.get(n); + let L = !1; + if (_) + for (const { ref: K, refStatus: X, resolvedConfig: Z, resolvedRefPath: oe } of _) { + if (X.newestInputFileTime && X.newestInputFileTime <= S) + continue; + if (V && nje(e, V, oe)) + return { + type: 6, + outOfDateOutputFileName: g, + newerProjectName: K.path + }; + const ne = ije(e, Z.options, oe); + if (ne && ne <= S) { + L = !0; + continue; + } + return E.assert(h !== void 0, "Should have an oldest output filename here"), { + type: 6, + outOfDateOutputFileName: h, + newerProjectName: K.path + }; + } + const $ = hse(e, t.options.configFilePath, S, h); + if ($) return $; + const U = rr(t.options.configFile.extendedSourceFiles || He, (K) => hse(e, K, S, h)); + if (U) return U; + const G = e.lastCachedPackageJsonLookups.get(n), ce = G && uh( + G, + (K) => hse(e, K, S, h) + ); + return ce || { + type: L ? 2 : j ? 14 : 1, + newestInputFileTime: O, + newestInputFileName: P, + oldestOutputFileName: h + }; + } + function nje(e, t, n) { + return e.buildInfoCache.get(n).path === t.path; + } + function yse(e, t, n) { + if (t === void 0) + return { type: 0, reason: "File deleted mid-build" }; + const i = e.projectStatus.get(n); + if (i !== void 0) + return i; + Yo("SolutionBuilder::beforeUpToDateCheck"); + const s = rje(e, t, n); + return Yo("SolutionBuilder::afterUpToDateCheck"), ep("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck"), e.projectStatus.set(n, s), s; + } + function ybe(e, t, n, i, s) { + if (t.options.noEmit) return; + let o; + const c = S0(t.options); + if (c) { + s?.has(td(e, c)) || (e.options.verbose && vf(e, i, t.options.configFilePath), e.host.setModifiedTime(c, o = GA(e.host)), gse(e, c, n).modifiedTime = o), e.outputTimeStamps.delete(n); + return; + } + const { host: _ } = e, u = ZO(t, !_.useCaseSensitiveFileNames()), d = mse(e, n), g = d ? /* @__PURE__ */ new Set() : void 0; + if (!s || u.length !== s.size) { + let h = !!e.options.verbose; + for (const S of u) { + const T = td(e, S); + s?.has(T) || (h && (h = !1, vf(e, i, t.options.configFilePath)), _.setModifiedTime(S, o || (o = GA(e.host))), d && (d.set(T, o), g.add(T))); + } + } + d?.forEach((h, S) => { + !s?.has(S) && !g.has(S) && d.delete(S); + }); + } + function ije(e, t, n) { + if (!t.composite) return; + const i = E.checkDefined(e.buildInfoCache.get(n)); + if (i.latestChangedDtsTime !== void 0) return i.latestChangedDtsTime || void 0; + const s = i.buildInfo && i.buildInfo.program && i.buildInfo.program.latestChangedDtsFile ? e.host.getModifiedTime(Xi(i.buildInfo.program.latestChangedDtsFile, Xn(i.path))) : void 0; + return i.latestChangedDtsTime = s || !1, s; + } + function vbe(e, t, n) { + if (e.options.dry) + return vf(e, p.A_non_dry_build_would_update_timestamps_for_output_of_project_0, t.options.configFilePath); + ybe(e, t, n, p.Updating_output_timestamps_of_project_0), e.projectStatus.set(n, { + type: 1, + oldestOutputFileName: vW(t, !e.host.useCaseSensitiveFileNames()) + }); + } + function sje(e, t, n, i, s, o, c) { + if (!(c & 124) && s.options.composite) + for (let _ = i + 1; _ < o.length; _++) { + const u = o[_], d = Km(e, u); + if (e.projectPendingBuild.has(d)) continue; + const g = n6(e, u, d); + if (!(!g || !g.projectReferences)) + for (const h of g.projectReferences) { + const S = XA(e, h.path); + if (Km(e, S) !== n) continue; + const T = e.projectStatus.get(d); + if (T) + switch (T.type) { + case 1: + if (c & 2) { + T.type = 2; + break; + } + case 14: + case 2: + c & 2 || e.projectStatus.set(d, { + type: 6, + outOfDateOutputFileName: T.oldestOutputFileName, + newerProjectName: t + }); + break; + case 11: + Km(e, XA(e, T.upstreamProjectName)) === n && cbe(e, d); + break; + } + lbe( + e, + d, + 0 + /* Update */ + ); + break; + } + } + } + function bbe(e, t, n, i, s, o) { + Yo("SolutionBuilder::beforeBuild"); + const c = aje(e, t, n, i, s, o); + return Yo("SolutionBuilder::afterBuild"), ep("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"), c; + } + function aje(e, t, n, i, s, o) { + const c = abe(e, t, o); + if (!c) return 3; + ube(e, n); + let _ = !0, u = 0; + for (; ; ) { + const d = fse(e, c, _); + if (!d) break; + _ = !1, d.done(n, i, s?.(d.project)), e.diagnostics.has(d.projectPath) || u++; + } + return use(e), Pbe(e, c), uje(e, c), Lx(c) ? 4 : c.some((d) => e.diagnostics.has(Km(e, d))) ? u ? 2 : 1 : 0; + } + function Sbe(e, t, n) { + Yo("SolutionBuilder::beforeClean"); + const i = oje(e, t, n); + return Yo("SolutionBuilder::afterClean"), ep("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean"), i; + } + function oje(e, t, n) { + const i = abe(e, t, n); + if (!i) return 3; + if (Lx(i)) + return CF(e, i.circularDiagnostics), 4; + const { options: s, host: o } = e, c = s.dry ? [] : void 0; + for (const _ of i) { + const u = Km(e, _), d = n6(e, _, u); + if (d === void 0) { + Dbe(e, u); + continue; + } + const g = ZO(d, !o.useCaseSensitiveFileNames()); + if (!g.length) continue; + const h = new Set(d.fileNames.map((S) => td(e, S))); + for (const S of g) + h.has(td(e, S)) || o.fileExists(S) && (c ? c.push(S) : (o.deleteFile(S), vse( + e, + u, + 0 + /* Update */ + ))); + } + return c && vf(e, p.A_non_dry_build_would_delete_the_following_files_Colon_0, c.map((_) => `\r + * ${_}`).join("")), 0; + } + function vse(e, t, n) { + e.host.getParsedCommandLine && n === 1 && (n = 2), n === 2 && (e.configFileCache.delete(t), e.buildOrder = void 0), e.needsSummary = !0, cbe(e, t), lbe(e, t, n), obe(e); + } + function kF(e, t, n) { + e.reportFileChangeDetected = !0, vse(e, t, n), Tbe( + e, + 250, + /*changeDetected*/ + !0 + ); + } + function Tbe(e, t, n) { + const { hostWithWatch: i } = e; + !i.setTimeout || !i.clearTimeout || (e.timerToBuildInvalidatedProject && i.clearTimeout(e.timerToBuildInvalidatedProject), e.timerToBuildInvalidatedProject = i.setTimeout(cje, t, "timerToBuildInvalidatedProject", e, n)); + } + function cje(e, t, n) { + Yo("SolutionBuilder::beforeBuild"); + const i = lje(t, n); + Yo("SolutionBuilder::afterBuild"), ep("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"), i && Pbe(t, i); + } + function lje(e, t) { + e.timerToBuildInvalidatedProject = void 0, e.reportFileChangeDetected && (e.reportFileChangeDetected = !1, e.projectErrorsReported.clear(), Tse(e, p.File_change_detected_Starting_incremental_compilation)); + let n = 0; + const i = xF(e), s = fse( + e, + i, + /*reportQueue*/ + !1 + ); + if (s) + for (s.done(), n++; e.projectPendingBuild.size; ) { + if (e.timerToBuildInvalidatedProject) return; + const o = fbe( + e, + i, + /*reportQueue*/ + !1 + ); + if (!o) break; + if (o.kind !== 1 && (t || n === 5)) { + Tbe( + e, + 100, + /*changeDetected*/ + !1 + ); + return; + } + pbe(e, o, i).done(), o.kind !== 1 && n++; + } + return use(e), i; + } + function xbe(e, t, n, i) { + !e.watch || e.allWatchedConfigFiles.has(n) || e.allWatchedConfigFiles.set( + n, + vV( + e, + t, + () => kF( + e, + n, + 2 + /* Full */ + ), + 2e3, + i?.watchOptions, + kl.ConfigFile, + t + ) + ); + } + function kbe(e, t, n) { + rF( + t, + n?.options, + e.allWatchedExtendedConfigFiles, + (i, s) => vV( + e, + i, + () => { + var o; + return (o = e.allWatchedExtendedConfigFiles.get(s)) == null ? void 0 : o.projects.forEach((c) => kF( + e, + c, + 2 + /* Full */ + )); + }, + 2e3, + n?.watchOptions, + kl.ExtendedConfigFile + ), + (i) => td(e, i) + ); + } + function Cbe(e, t, n, i) { + e.watch && jA( + sse(e.allWatchedWildcardDirectories, n), + i.wildcardDirectories, + (s, o) => e.watchDirectory( + s, + (c) => { + var _; + BA({ + watchedDirPath: td(e, s), + fileOrDirectory: c, + fileOrDirectoryPath: td(e, c), + configFileName: t, + currentDirectory: e.compilerHost.getCurrentDirectory(), + options: i.options, + program: e.builderPrograms.get(n) || ((_ = YRe(e, n)) == null ? void 0 : _.fileNames), + useCaseSensitiveFileNames: e.parseConfigFileHost.useCaseSensitiveFileNames, + writeLog: (u) => e.writeLog(u), + toPath: (u) => td(e, u) + }) || kF( + e, + n, + 1 + /* RootNamesAndUpdate */ + ); + }, + o, + i?.watchOptions, + kl.WildcardDirectory, + t + ) + ); + } + function bse(e, t, n, i) { + e.watch && A4( + sse(e.allWatchedInputFiles, n), + new Set(i.fileNames), + { + createNewValue: (s) => vV( + e, + s, + () => kF( + e, + n, + 0 + /* Update */ + ), + 250, + i?.watchOptions, + kl.SourceFile, + t + ), + onDeleteValue: Zp + } + ); + } + function Sse(e, t, n, i) { + !e.watch || !e.lastCachedPackageJsonLookups || A4( + sse(e.allWatchedPackageJsonFiles, n), + e.lastCachedPackageJsonLookups.get(n), + { + createNewValue: (s) => vV( + e, + s, + () => kF( + e, + n, + 0 + /* Update */ + ), + 2e3, + i?.watchOptions, + kl.PackageJson, + t + ), + onDeleteValue: Zp + } + ); + } + function uje(e, t) { + if (e.watchAllProjectsPending) { + Yo("SolutionBuilder::beforeWatcherCreation"), e.watchAllProjectsPending = !1; + for (const n of $A(t)) { + const i = Km(e, n), s = n6(e, n, i); + xbe(e, n, i, s), kbe(e, i, s), s && (Cbe(e, n, i, s), bse(e, n, i, s), Sse(e, n, i, s)); + } + Yo("SolutionBuilder::afterWatcherCreation"), ep("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation"); + } + } + function _je(e) { + N_(e.allWatchedConfigFiles, Zp), N_(e.allWatchedExtendedConfigFiles, _p), N_(e.allWatchedWildcardDirectories, (t) => N_(t, _p)), N_(e.allWatchedInputFiles, (t) => N_(t, Zp)), N_(e.allWatchedPackageJsonFiles, (t) => N_(t, Zp)); + } + function Ebe(e, t, n, i, s) { + const o = QRe(e, t, n, i, s); + return { + build: (c, _, u, d) => bbe(o, c, _, u, d), + clean: (c) => Sbe(o, c), + buildReferences: (c, _, u, d) => bbe( + o, + c, + _, + u, + d, + /*onlyReferences*/ + !0 + ), + cleanReferences: (c) => Sbe( + o, + c, + /*onlyReferences*/ + !0 + ), + getNextInvalidatedProject: (c) => (ube(o, c), fse( + o, + xF(o), + /*reportQueue*/ + !1 + )), + getBuildOrder: () => xF(o), + getUpToDateStatusOfProject: (c) => { + const _ = XA(o, c), u = Km(o, _); + return yse(o, n6(o, _, u), u); + }, + invalidateProject: (c, _) => vse( + o, + c, + _ || 0 + /* Update */ + ), + close: () => _je(o) + }; + } + function hu(e, t) { + return FE(t, e.compilerHost.getCurrentDirectory(), e.compilerHost.getCanonicalFileName); + } + function vf(e, t, ...n) { + e.host.reportSolutionBuilderStatus(zo(t, ...n)); + } + function Tse(e, t, ...n) { + var i, s; + (s = (i = e.hostWithWatch).onWatchStatusChange) == null || s.call(i, zo(t, ...n), e.host.getNewLine(), e.baseCompilerOptions); + } + function CF({ host: e }, t) { + t.forEach((n) => e.reportDiagnostic(n)); + } + function JD(e, t, n) { + CF(e, n), e.projectErrorsReported.set(t, !0), n.length && e.diagnostics.set(t, n); + } + function Dbe(e, t) { + JD(e, t, [e.configFileCache.get(t)]); + } + function Pbe(e, t) { + if (!e.needsSummary) return; + e.needsSummary = !1; + const n = e.watch || !!e.host.reportErrorSummary, { diagnostics: i } = e; + let s = 0, o = []; + Lx(t) ? (wbe(e, t.buildOrder), CF(e, t.circularDiagnostics), n && (s += mF(t.circularDiagnostics)), n && (o = [...o, ...gF(t.circularDiagnostics)])) : (t.forEach((c) => { + const _ = Km(e, c); + e.projectErrorsReported.has(_) || CF(e, i.get(_) || He); + }), n && i.forEach((c) => s += mF(c)), n && i.forEach((c) => [...o, ...gF(c)])), e.watch ? Tse(e, tV(s), s) : e.host.reportErrorSummary && e.host.reportErrorSummary(s, o); + } + function wbe(e, t) { + e.options.verbose && vf(e, p.Projects_in_this_build_Colon_0, t.map((n) => `\r + * ` + hu(e, n)).join("")); + } + function fje(e, t, n) { + switch (n.type) { + case 5: + return vf( + e, + p.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, + hu(e, t), + hu(e, n.outOfDateOutputFileName), + hu(e, n.newerInputFileName) + ); + case 6: + return vf( + e, + p.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, + hu(e, t), + hu(e, n.outOfDateOutputFileName), + hu(e, n.newerProjectName) + ); + case 3: + return vf( + e, + p.Project_0_is_out_of_date_because_output_file_1_does_not_exist, + hu(e, t), + hu(e, n.missingOutputFileName) + ); + case 4: + return vf( + e, + p.Project_0_is_out_of_date_because_there_was_error_reading_file_1, + hu(e, t), + hu(e, n.fileName) + ); + case 7: + return vf( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, + hu(e, t), + hu(e, n.buildInfoFile) + ); + case 8: + return vf( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, + hu(e, t), + hu(e, n.buildInfoFile) + ); + case 9: + return vf( + e, + p.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more, + hu(e, t), + hu(e, n.buildInfoFile), + hu(e, n.inputFile) + ); + case 1: + if (n.newestInputFileTime !== void 0) + return vf( + e, + p.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, + hu(e, t), + hu(e, n.newestInputFileName || ""), + hu(e, n.oldestOutputFileName || "") + ); + break; + case 2: + return vf( + e, + p.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, + hu(e, t) + ); + case 14: + return vf( + e, + p.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files, + hu(e, t) + ); + case 10: + return vf( + e, + p.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, + hu(e, t), + hu(e, n.upstreamProjectName) + ); + case 11: + return vf( + e, + n.upstreamProjectBlocked ? p.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : p.Project_0_can_t_be_built_because_its_dependency_1_has_errors, + hu(e, t), + hu(e, n.upstreamProjectName) + ); + case 0: + return vf( + e, + p.Failed_to_parse_file_0_Colon_1, + hu(e, t), + n.reason + ); + case 13: + return vf( + e, + p.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, + hu(e, t), + n.version, + dd + ); + case 16: + return vf( + e, + p.Project_0_is_being_forcibly_rebuilt, + hu(e, t) + ); + } + } + function bV(e, t, n) { + e.options.verbose && fje(e, t, n); + } + var xse = /* @__PURE__ */ ((e) => (e[e.time = 0] = "time", e[e.count = 1] = "count", e[e.memory = 2] = "memory", e))(xse || {}); + function pje(e) { + const t = dje(); + return rr(e.getSourceFiles(), (n) => { + const i = mje(e, n), s = Tg(n).length; + t.set(i, t.get(i) + s); + }), t; + } + function dje() { + const e = /* @__PURE__ */ new Map(); + return e.set("Library", 0), e.set("Definitions", 0), e.set("TypeScript", 0), e.set("JavaScript", 0), e.set("JSON", 0), e.set("Other", 0), e; + } + function mje(e, t) { + if (e.isSourceFileDefaultLibrary(t)) + return "Library"; + if (t.isDeclarationFile) + return "Definitions"; + const n = t.path; + return Lc(n, rJ) ? "TypeScript" : Lc(n, CC) ? "JavaScript" : Go( + n, + ".json" + /* Json */ + ) ? "JSON" : "Other"; + } + function SV(e, t, n) { + return EF(e, n) ? Fx( + e, + /*pretty*/ + !0 + ) : t; + } + function Abe(e) { + return !!e.writeOutputIsTTY && e.writeOutputIsTTY() && !e.getEnvironmentVariable("NO_COLOR"); + } + function EF(e, t) { + return !t || typeof t.pretty > "u" ? Abe(e) : t.pretty; + } + function Nbe(e) { + return e.options.all ? rb(Dd, (t, n) => ow(t.name, n.name)) : Ln(Dd.slice(), (t) => !!t.showInSimplifiedHelpView); + } + function TV(e) { + e.write(g_(p.Version_0, dd) + e.newLine); + } + function xV(e) { + if (!Abe(e)) + return { + bold: (g) => g, + blue: (g) => g, + blueBackground: (g) => g, + brightWhite: (g) => g + }; + function n(g) { + return `\x1B[1m${g}\x1B[22m`; + } + const i = e.getEnvironmentVariable("OS") && e.getEnvironmentVariable("OS").toLowerCase().includes("windows"), s = e.getEnvironmentVariable("WT_SESSION"), o = e.getEnvironmentVariable("TERM_PROGRAM") && e.getEnvironmentVariable("TERM_PROGRAM") === "vscode"; + function c(g) { + return i && !s && !o ? d(g) : `\x1B[94m${g}\x1B[39m`; + } + const _ = e.getEnvironmentVariable("COLORTERM") === "truecolor" || e.getEnvironmentVariable("TERM") === "xterm-256color"; + function u(g) { + return _ ? `\x1B[48;5;68m${g}\x1B[39;49m` : `\x1B[44m${g}\x1B[39;49m`; + } + function d(g) { + return `\x1B[97m${g}\x1B[39m`; + } + return { + bold: n, + blue: c, + brightWhite: d, + blueBackground: u + }; + } + function Ibe(e) { + return `--${e.name}${e.shortName ? `, -${e.shortName}` : ""}`; + } + function gje(e, t, n, i) { + var s; + const o = [], c = xV(e), _ = Ibe(t), u = C(t), d = typeof t.defaultValueDescription == "object" ? g_(t.defaultValueDescription) : h( + t.defaultValueDescription, + t.type === "list" || t.type === "listOrElement" ? t.element.type : t.type + ), g = ((s = e.getWidthOfTerminal) == null ? void 0 : s.call(e)) ?? 0; + if (g >= 80) { + let D = ""; + t.description && (D = g_(t.description)), o.push(...T( + _, + D, + n, + i, + g, + /*colorLeft*/ + !0 + ), e.newLine), S(u, t) && (u && o.push(...T( + u.valueType, + u.possibleValues, + n, + i, + g, + /*colorLeft*/ + !1 + ), e.newLine), d && o.push(...T( + g_(p.default_Colon), + d, + n, + i, + g, + /*colorLeft*/ + !1 + ), e.newLine)), o.push(e.newLine); + } else { + if (o.push(c.blue(_), e.newLine), t.description) { + const D = g_(t.description); + o.push(D); + } + if (o.push(e.newLine), S(u, t)) { + if (u && o.push(`${u.valueType} ${u.possibleValues}`), d) { + u && o.push(e.newLine); + const D = g_(p.default_Colon); + o.push(`${D} ${d}`); + } + o.push(e.newLine); + } + o.push(e.newLine); + } + return o; + function h(D, P) { + return D !== void 0 && typeof P == "object" ? ts(P.entries()).filter(([, O]) => O === D).map(([O]) => O).join("/") : String(D); + } + function S(D, P) { + const O = ["string"], j = [void 0, "false", "n/a"], F = P.defaultValueDescription; + return !(P.category === p.Command_line_Options || ls(O, D?.possibleValues) && ls(j, F)); + } + function T(D, P, O, j, F, V) { + const L = []; + let $ = !0, U = P; + const G = F - j; + for (; U.length > 0; ) { + let ce = ""; + $ ? (ce = D.padStart(O), ce = ce.padEnd(j), ce = V ? c.blue(ce) : ce) : ce = "".padStart(j); + const K = U.substr(0, G); + U = U.slice(G), L.push(`${ce}${K}`), $ = !1; + } + return L; + } + function C(D) { + if (D.type === "object") + return; + return { + valueType: P(D), + possibleValues: O(D) + }; + function P(j) { + switch (E.assert(j.type !== "listOrElement"), j.type) { + case "string": + case "number": + case "boolean": + return g_(p.type_Colon); + case "list": + return g_(p.one_or_more_Colon); + default: + return g_(p.one_of_Colon); + } + } + function O(j) { + let F; + switch (j.type) { + case "string": + case "number": + case "boolean": + F = j.type; + break; + case "list": + case "listOrElement": + F = O(j.element); + break; + case "object": + F = ""; + break; + default: + const V = {}; + return j.type.forEach((L, $) => { + var U; + (U = j.deprecatedKeys) != null && U.has($) || (V[L] || (V[L] = [])).push($); + }), Object.entries(V).map(([, L]) => L.join("/")).join(", "); + } + return F; + } + } + } + function Obe(e, t) { + let n = 0; + for (const c of t) { + const _ = Ibe(c).length; + n = n > _ ? n : _; + } + const i = n + 2, s = i + 2; + let o = []; + for (const c of t) { + const _ = gje(e, c, i, s); + o = [...o, ..._]; + } + return o[o.length - 2] !== e.newLine && o.push(e.newLine), o; + } + function QA(e, t, n, i, s, o) { + let c = []; + if (c.push(xV(e).bold(t) + e.newLine + e.newLine), s && c.push(s + e.newLine + e.newLine), !i) + return c = [...c, ...Obe(e, n)], o && c.push(o + e.newLine + e.newLine), c; + const _ = /* @__PURE__ */ new Map(); + for (const u of n) { + if (!u.category) + continue; + const d = g_(u.category), g = _.get(d) ?? []; + g.push(u), _.set(d, g); + } + return _.forEach((u, d) => { + c.push(`### ${d}${e.newLine}${e.newLine}`), c = [...c, ...Obe(e, u)]; + }), o && c.push(o + e.newLine + e.newLine), c; + } + function hje(e, t) { + const n = xV(e); + let i = [...kV(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, dd)}`)]; + i.push(n.bold(g_(p.COMMON_COMMANDS)) + e.newLine + e.newLine), c("tsc", p.Compiles_the_current_project_tsconfig_json_in_the_working_directory), c("tsc app.ts util.ts", p.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options), c("tsc -b", p.Build_a_composite_project_in_the_working_directory), c("tsc --init", p.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory), c("tsc -p ./path/to/tsconfig.json", p.Compiles_the_TypeScript_project_located_at_the_specified_path), c("tsc --help --all", p.An_expanded_version_of_this_information_showing_all_possible_compiler_options), c(["tsc --noEmit", "tsc --target esnext"], p.Compiles_the_current_project_with_additional_settings); + const s = t.filter((_) => _.isCommandLineOnly || _.category === p.Command_line_Options), o = t.filter((_) => !ls(s, _)); + i = [ + ...i, + ...QA( + e, + g_(p.COMMAND_LINE_FLAGS), + s, + /*subCategory*/ + !1, + /*beforeOptionsDescription*/ + void 0, + /*afterOptionsDescription*/ + void 0 + ), + ...QA( + e, + g_(p.COMMON_COMPILER_OPTIONS), + o, + /*subCategory*/ + !1, + /*beforeOptionsDescription*/ + void 0, + YT(p.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") + ) + ]; + for (const _ of i) + e.write(_); + function c(_, u) { + const d = typeof _ == "string" ? [_] : _; + for (const g of d) + i.push(" " + n.blue(g) + e.newLine); + i.push(" " + g_(u) + e.newLine + e.newLine); + } + } + function yje(e, t, n, i) { + let s = [...kV(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, dd)}`)]; + s = [...s, ...QA( + e, + g_(p.ALL_COMPILER_OPTIONS), + t, + /*subCategory*/ + !0, + /*beforeOptionsDescription*/ + void 0, + YT(p.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") + )], s = [...s, ...QA( + e, + g_(p.WATCH_OPTIONS), + i, + /*subCategory*/ + !1, + g_(p.Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon) + )], s = [...s, ...QA( + e, + g_(p.BUILD_OPTIONS), + n, + /*subCategory*/ + !1, + YT(p.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") + )]; + for (const o of s) + e.write(o); + } + function Fbe(e, t) { + let n = [...kV(e, `${g_(p.tsc_Colon_The_TypeScript_Compiler)} - ${g_(p.Version_0, dd)}`)]; + n = [...n, ...QA( + e, + g_(p.BUILD_OPTIONS), + t, + /*subCategory*/ + !1, + YT(p.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") + )]; + for (const i of n) + e.write(i); + } + function kV(e, t) { + var n; + const i = xV(e), s = [], o = ((n = e.getWidthOfTerminal) == null ? void 0 : n.call(e)) ?? 0, c = 5, _ = i.blueBackground("".padStart(c)), u = i.blueBackground(i.brightWhite("TS ".padStart(c))); + if (o >= t.length + c) { + const g = (o > 120 ? 120 : o) - c; + s.push(t.padEnd(g) + _ + e.newLine), s.push("".padStart(g) + u + e.newLine); + } else + s.push(t + e.newLine), s.push(e.newLine); + return s; + } + function Lbe(e, t) { + t.options.all ? yje(e, Nbe(t), gz, Dx) : hje(e, Nbe(t)); + } + function Mbe(e, t, n) { + let i = Fx(e); + if (n.options.build) + return i(zo(p.Option_build_must_be_the_first_command_line_argument)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + let s; + if (n.options.locale && aj(n.options.locale, e, n.errors), n.errors.length > 0) + return n.errors.forEach(i), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.options.init) + return Tje(e, i, n.options, n.fileNames), e.exit( + 0 + /* Success */ + ); + if (n.options.version) + return TV(e), e.exit( + 0 + /* Success */ + ); + if (n.options.help || n.options.all) + return Lbe(e, n), e.exit( + 0 + /* Success */ + ); + if (n.options.watch && n.options.listFilesOnly) + return i(zo(p.Options_0_and_1_cannot_be_combined, "watch", "listFilesOnly")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.options.project) { + if (n.fileNames.length !== 0) + return i(zo(p.Option_project_cannot_be_mixed_with_source_files_on_a_command_line)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + const _ = Cs(n.options.project); + if (!_ || e.directoryExists(_)) { + if (s = Mn(_, "tsconfig.json"), !e.fileExists(s)) + return i(zo(p.Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0, n.options.project)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } else if (s = _, !e.fileExists(s)) + return i(zo(p.The_specified_path_does_not_exist_Colon_0, n.options.project)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + } else if (n.fileNames.length === 0) { + const _ = Cs(e.getCurrentDirectory()); + s = EW(_, (u) => e.fileExists(u)); + } + if (n.fileNames.length === 0 && !s) + return n.options.showConfig ? i(zo(p.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, Cs(e.getCurrentDirectory()))) : (TV(e), Lbe(e, n)), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + const o = e.getCurrentDirectory(), c = TO( + n.options, + (_) => Xi(_, o) + ); + if (s) { + const _ = /* @__PURE__ */ new Map(), u = ese(s, c, _, n.watchOptions, e, i); + if (c.showConfig) + return u.errors.length !== 0 ? (i = SV( + e, + i, + u.options + ), u.errors.forEach(i), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + )) : (e.write(JSON.stringify(kz(u, s, e), null, 4) + e.newLine), e.exit( + 0 + /* Success */ + )); + if (i = SV( + e, + i, + u.options + ), JB(u.options)) + return Cse(e, i) ? void 0 : vje( + e, + t, + i, + u, + c, + n.watchOptions, + _ + ); + I4(u.options) ? Jbe( + e, + t, + i, + u + ) : Bbe( + e, + t, + i, + u + ); + } else { + if (c.showConfig) + return e.write(JSON.stringify(kz(n, Mn(o, "tsconfig.json"), e), null, 4) + e.newLine), e.exit( + 0 + /* Success */ + ); + if (i = SV( + e, + i, + c + ), JB(c)) + return Cse(e, i) ? void 0 : bje( + e, + t, + i, + n.fileNames, + c, + n.watchOptions + ); + I4(c) ? Jbe( + e, + t, + i, + { ...n, options: c } + ) : Bbe( + e, + t, + i, + { ...n, options: c } + ); + } + } + function kse(e) { + if (e.length > 0 && e[0].charCodeAt(0) === 45) { + const t = e[0].slice(e[0].charCodeAt(1) === 45 ? 2 : 1).toLowerCase(); + return t === "build" || t === "b"; + } + return !1; + } + function Rbe(e, t, n) { + if (kse(n)) { + const { buildOptions: s, watchOptions: o, projects: c, errors: _ } = wre(n.slice(1)); + if (s.generateCpuProfile && e.enableCPUProfiler) + e.enableCPUProfiler(s.generateCpuProfile, () => jbe( + e, + t, + s, + o, + c, + _ + )); + else + return jbe( + e, + t, + s, + o, + c, + _ + ); + } + const i = Dre(n, (s) => e.readFile(s)); + if (i.options.generateCpuProfile && e.enableCPUProfiler) + e.enableCPUProfiler(i.options.generateCpuProfile, () => Mbe( + e, + t, + i + )); + else + return Mbe(e, t, i); + } + function Cse(e, t) { + return !e.watchFile || !e.watchDirectory ? (t(zo(p.The_current_host_does_not_support_the_0_option, "--watch")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ), !0) : !1; + } + var DF = 2; + function jbe(e, t, n, i, s, o) { + const c = SV( + e, + Fx(e), + n + ); + if (n.locale && aj(n.locale, e, o), o.length > 0) + return o.forEach(c), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.help || s.length === 0) + return TV(e), Fbe(e, vA), e.exit( + 0 + /* Success */ + ); + if (!e.getModifiedTime || !e.setModifiedTime || n.clean && !e.deleteFile) + return c(zo(p.The_current_host_does_not_support_the_0_option, "--build")), e.exit( + 1 + /* DiagnosticsPresent_OutputsSkipped */ + ); + if (n.watch) { + if (Cse(e, c)) return; + const h = ose( + e, + /*createProgram*/ + void 0, + c, + TF(e, EF(e, n)), + Dse(e, n) + ); + h.jsDocParsingMode = DF; + const S = Ube(e, n); + zbe(e, t, h, S); + const T = h.onWatchStatusChange; + let C = !1; + h.onWatchStatusChange = (P, O, j, F) => { + T?.(P, O, j, F), C && (P.code === p.Found_0_errors_Watching_for_file_changes.code || P.code === p.Found_1_error_Watching_for_file_changes.code) && Pse(D, S); + }; + const D = lse(h, s, n, i); + return D.build(), Pse(D, S), C = !0, D; + } + const _ = ase( + e, + /*createProgram*/ + void 0, + c, + TF(e, EF(e, n)), + Ese(e, n) + ); + _.jsDocParsingMode = DF; + const u = Ube(e, n); + zbe(e, t, _, u); + const d = cse(_, s, n), g = n.clean ? d.clean() : d.build(); + return Pse(d, u), XX(), e.exit(g); + } + function Ese(e, t) { + return EF(e, t) ? (n, i) => e.write(rV(n, i, e.newLine, e)) : void 0; + } + function Bbe(e, t, n, i) { + const { fileNames: s, options: o, projectReferences: c } = i, _ = iF( + o, + /*setParentNodes*/ + void 0, + e + ); + _.jsDocParsingMode = DF; + const u = _.getCurrentDirectory(), d = eu(_.useCaseSensitiveFileNames()); + LD(_, (T) => _o(T, u, d)), wse( + e, + o, + /*isBuildMode*/ + !1 + ); + const g = { + rootNames: s, + options: o, + projectReferences: c, + host: _, + configFileParsingDiagnostics: Vb(i) + }, h = UA(g), S = lV( + h, + n, + (T) => e.write(T + e.newLine), + Ese(e, o) + ); + return EV( + e, + h, + /*solutionPerformance*/ + void 0 + ), t(h), e.exit(S); + } + function Jbe(e, t, n, i) { + const { options: s, fileNames: o, projectReferences: c } = i; + wse( + e, + s, + /*isBuildMode*/ + !1 + ); + const _ = SF(s, e); + _.jsDocParsingMode = DF; + const u = rse({ + host: _, + system: e, + rootNames: o, + options: s, + configFileParsingDiagnostics: Vb(i), + projectReferences: c, + reportDiagnostic: n, + reportErrorSummary: Ese(e, s), + afterProgramEmitAndDiagnostics: (d) => { + EV( + e, + d.getProgram(), + /*solutionPerformance*/ + void 0 + ), t(d); + } + }); + return e.exit(u); + } + function zbe(e, t, n, i) { + Wbe( + e, + n, + /*isBuildMode*/ + !0 + ), n.afterProgramEmitAndDiagnostics = (s) => { + EV(e, s.getProgram(), i), t(s); + }; + } + function Wbe(e, t, n) { + const i = t.createProgram; + t.createProgram = (s, o, c, _, u, d) => (E.assert(s !== void 0 || o === void 0 && !!_), o !== void 0 && wse(e, o, n), i(s, o, c, _, u, d)); + } + function Vbe(e, t, n) { + n.jsDocParsingMode = DF, Wbe( + e, + n, + /*isBuildMode*/ + !1 + ); + const i = n.afterProgramCreate; + n.afterProgramCreate = (s) => { + i(s), EV( + e, + s.getProgram(), + /*solutionPerformance*/ + void 0 + ), t(s); + }; + } + function Dse(e, t) { + return eV(e, EF(e, t)); + } + function vje(e, t, n, i, s, o, c) { + const _ = dV({ + configFileName: i.options.configFilePath, + optionsToExtend: s, + watchOptionsToExtend: o, + system: e, + reportDiagnostic: n, + reportWatchStatus: Dse(e, i.options) + }); + return Vbe(e, t, _), _.configFileParsingResult = i, _.extendedConfigCache = c, gV(_); + } + function bje(e, t, n, i, s, o) { + const c = mV({ + rootFiles: i, + options: s, + watchOptions: o, + system: e, + reportDiagnostic: n, + reportWatchStatus: Dse(e, s) + }); + return Vbe(e, t, c), gV(c); + } + function Ube(e, t) { + if (e === _l && t.extendedDiagnostics) + return kR(), Sje(); + } + function Sje() { + let e; + return { + addAggregateStatistic: t, + forEachAggregateStatistics: n, + clear: i + }; + function t(s) { + const o = e?.get(s.name); + o ? o.type === 2 ? o.value = Math.max(o.value, s.value) : o.value += s.value : (e ?? (e = /* @__PURE__ */ new Map())).set(s.name, s); + } + function n(s) { + e?.forEach(s); + } + function i() { + e = void 0; + } + } + function Pse(e, t) { + if (!t) return; + if (!HX()) { + _l.write(p.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + ` +`); + return; + } + const n = []; + n.push( + { + name: "Projects in scope", + value: $A(e.getBuildOrder()).length, + type: 1 + /* count */ + } + ), i("SolutionBuilder::Projects built"), i("SolutionBuilder::Timestamps only updates"), i("SolutionBuilder::Bundles updated"), t.forEachAggregateStatistics((o) => { + o.name = `Aggregate ${o.name}`, n.push(o); + }), xR((o, c) => { + CV(o) && n.push({ + name: `${s(o)} time`, + value: c, + type: 0 + /* time */ + }); + }), GX(), kR(), t.clear(), Gbe(_l, n); + function i(o) { + const c = vge(o); + c && n.push({ + name: s(o), + value: c, + type: 1 + /* count */ + }); + } + function s(o) { + return o.replace("SolutionBuilder::", ""); + } + } + function qbe(e, t) { + return e === _l && (t.diagnostics || t.extendedDiagnostics); + } + function Hbe(e, t) { + return e === _l && t.generateTrace; + } + function wse(e, t, n) { + qbe(e, t) && kR(e), Hbe(e, t) && $X(n ? "build" : "project", t.generateTrace, t.configFilePath); + } + function CV(e) { + return zi(e, "SolutionBuilder::"); + } + function EV(e, t, n) { + var i; + const s = t.getCompilerOptions(); + Hbe(e, s) && ((i = rn) == null || i.stopTracing()); + let o; + if (qbe(e, s)) { + o = []; + const d = e.getMemoryUsage ? e.getMemoryUsage() : -1; + _("Files", t.getSourceFiles().length); + const g = pje(t); + if (s.extendedDiagnostics) + for (const [P, O] of g.entries()) + _("Lines of " + P, O); + else + _("Lines", mX(g.values(), (P, O) => P + O, 0)); + _("Identifiers", t.getIdentifierCount()), _("Symbols", t.getSymbolCount()), _("Types", t.getTypeCount()), _("Instantiations", t.getInstantiationCount()), d >= 0 && c( + { + name: "Memory used", + value: d, + type: 2 + /* memory */ + }, + /*aggregate*/ + !0 + ); + const h = HX(), S = h ? wE("Program") : 0, T = h ? wE("Bind") : 0, C = h ? wE("Check") : 0, D = h ? wE("Emit") : 0; + if (s.extendedDiagnostics) { + const P = t.getRelationCacheSizes(); + _("Assignability cache size", P.assignable), _("Identity cache size", P.identity), _("Subtype cache size", P.subtype), _("Strict subtype cache size", P.strictSubtype), h && xR((O, j) => { + CV(O) || u( + `${O} time`, + j, + /*aggregate*/ + !0 + ); + }); + } else h && (u( + "I/O read", + wE("I/O Read"), + /*aggregate*/ + !0 + ), u( + "I/O write", + wE("I/O Write"), + /*aggregate*/ + !0 + ), u( + "Parse time", + S, + /*aggregate*/ + !0 + ), u( + "Bind time", + T, + /*aggregate*/ + !0 + ), u( + "Check time", + C, + /*aggregate*/ + !0 + ), u( + "Emit time", + D, + /*aggregate*/ + !0 + )); + h && u( + "Total time", + S + T + C + D, + /*aggregate*/ + !1 + ), Gbe(e, o), h ? n ? (xR((P) => { + CV(P) || Sge(P); + }), bge((P) => { + CV(P) || Tge(P); + })) : GX() : e.write(p.Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found.message + ` +`); + } + function c(d, g) { + o.push(d), g && n?.addAggregateStatistic(d); + } + function _(d, g) { + c( + { + name: d, + value: g, + type: 1 + /* count */ + }, + /*aggregate*/ + !0 + ); + } + function u(d, g, h) { + c({ + name: d, + value: g, + type: 0 + /* time */ + }, h); + } + } + function Gbe(e, t) { + let n = 0, i = 0; + for (const s of t) { + s.name.length > n && (n = s.name.length); + const o = $be(s); + o.length > i && (i = o.length); + } + for (const s of t) + e.write(`${s.name}:`.padEnd(n + 2) + $be(s).toString().padStart(i) + e.newLine); + } + function $be(e) { + switch (e.type) { + case 1: + return "" + e.value; + case 0: + return (e.value / 1e3).toFixed(2) + "s"; + case 2: + return Math.round(e.value / 1e3) + "K"; + default: + E.assertNever(e.type); + } + } + function Tje(e, t, n, i) { + const s = e.getCurrentDirectory(), o = Cs(Mn(s, "tsconfig.json")); + if (e.fileExists(o)) + t(zo(p.A_tsconfig_json_file_is_already_defined_at_Colon_0, o)); + else { + e.writeFile(o, Fre(n, i, e.newLine)); + const c = [e.newLine, ...kV(e, "Created a new tsconfig.json with:")]; + c.push(Ore(n, e.newLine) + e.newLine + e.newLine), c.push("You can learn more at https://aka.ms/tsconfig" + e.newLine); + for (const _ of c) + e.write(_); + } + } + function Ase(e, t) { + const n = Iu(e, "strictNullChecks"); + return { + typeFromExpression: j, + serializeTypeOfDeclaration: o, + serializeReturnTypeForSignature: c, + serializeTypeOfExpression: s + }; + function i(H, ae) { + return H !== void 0 && (!ae || H && ne(H)) ? !0 : void 0; + } + function s(H, ae, le, Ae) { + return j( + H, + ae, + /*isConstContext*/ + !1, + le, + Ae + ) ?? C(H, ae); + } + function o(H, ae) { + switch (H.kind) { + case 171: + return i(Vc(H)); + case 169: + return h(H, ae); + case 260: + return g(H, ae); + case 172: + return S(H, ae); + case 208: + return T(H, ae); + case 277: + return s( + H.expression, + ae, + /*addUndefined*/ + void 0, + /*preserveLiterals*/ + !0 + ); + case 211: + case 212: + case 226: + return i(Vc(H)) || T(H, ae); + case 303: + return j(H.initializer, ae) || T(H, ae); + default: + E.assertNever(H, `Node needs to be an inferrable node, found ${E.formatSyntaxKind(H.kind)}`); + } + } + function c(H, ae) { + switch (H.kind) { + case 177: + return d(H, ae); + case 174: + case 262: + case 180: + case 173: + case 179: + case 176: + case 178: + case 181: + case 184: + case 185: + case 218: + case 219: + case 317: + case 323: + return pe(H, ae); + default: + E.assertNever(H, `Node needs to be an inferrable node, found ${E.formatSyntaxKind(H.kind)}`); + } + } + function _(H) { + if (H) + return H.kind === 177 ? K_(H) : H.parameters.length > 0 ? Vc(H.parameters[0]) : void 0; + } + function u(H, ae) { + let le = _(H); + return !le && H !== ae.firstAccessor && (le = _(ae.firstAccessor)), !le && ae.secondAccessor && H !== ae.secondAccessor && (le = _(ae.secondAccessor)), le; + } + function d(H, ae) { + const le = t.getAllAccessorDeclarations(H), Ae = u(H, le); + return Ae ? i(Ae) : le.getAccessor ? pe(le.getAccessor, ae) : !1; + } + function g(H, ae) { + const le = Vc(H); + if (le) + return i(le); + let Ae; + return H.initializer && (t.isExpandoFunctionDeclaration(H) || (Ae = j( + H.initializer, + ae, + /*isConstContext*/ + void 0, + /*requiresAddingUndefined*/ + void 0, + DZ(H) + ))), Ae ?? T(H, ae); + } + function h(H, ae) { + const le = H.parent; + if (le.kind === 178) + return d(le, ae); + const Ae = Vc(H), ge = t.requiresAddingImplicitUndefined(H); + let de; + return Ae ? de = i(Ae, ge) : H.initializer && Re(H.name) && (de = j( + H.initializer, + ae, + /*isConstContext*/ + void 0, + ge + )), de ?? T(H, ae); + } + function S(H, ae) { + const le = Vc(H); + if (le) + return i(le); + let Ae; + if (H.initializer) { + const ge = Gw(H); + Ae = j( + H.initializer, + ae, + /*isConstContext*/ + void 0, + /*requiresAddingUndefined*/ + void 0, + ge + ); + } + return Ae ?? T(H, ae); + } + function T(H, ae) { + return ae.tracker.reportInferenceFallback(H), !1; + } + function C(H, ae) { + return ae.tracker.reportInferenceFallback(H), !1; + } + function D(H, ae) { + return ae.tracker.reportInferenceFallback(H), !1; + } + function P(H, ae, le) { + return H.kind === 177 ? pe(H, le) : (le.tracker.reportInferenceFallback(H), !1); + } + function O(H, ae, le, Ae) { + return yd(ae) ? j( + H, + le, + /*isConstContext*/ + !0, + Ae + ) : (Ae && !ne(ae) && le.tracker.reportInferenceFallback(ae), i(ae)); + } + function j(H, ae, le = !1, Ae = !1, ge = !1) { + switch (H.kind) { + case 217: + return fS(H) ? O(H.expression, fD(H), ae, Ae) : j(H.expression, ae, le, Ae); + case 80: + if (t.isUndefinedIdentifierExpression(H)) + return !0; + break; + case 106: + return !0; + case 219: + case 218: + return F(H, ae); + case 216: + case 234: + const de = H; + return O(de.expression, de.type, ae, Ae); + case 224: + const ve = H; + if (A5(ve) && (ve.operand.kind === 10 || ve.operand.kind === 9)) + return oe(); + break; + case 9: + return oe(); + case 228: + if (!le && !ge) + return !0; + break; + case 15: + case 11: + return oe(); + case 10: + return oe(); + case 112: + case 97: + return oe(); + case 209: + return L(H, ae, le); + case 210: + return U(H, ae, le); + case 231: + return C(H, ae); + } + } + function F(H, ae) { + const le = i(H.type) ?? pe(H, ae), Ae = K(H.typeParameters), ge = H.parameters.every((de) => ce(de, ae)); + return le && Ae && ge; + } + function V(H, ae, le) { + if (!le) + return ae.tracker.reportInferenceFallback(H), !1; + for (const Ae of H.elements) + if (Ae.kind === 230) + return ae.tracker.reportInferenceFallback(Ae), !1; + return !0; + } + function L(H, ae, le) { + if (!V(H, ae, le)) + return !1; + let Ae = !0; + for (const ge of H.elements) + E.assert( + ge.kind !== 230 + /* SpreadElement */ + ), ge.kind !== 232 && (Ae = (j(ge, ae, le) ?? C(ge, ae)) && Ae); + return !0; + } + function $(H, ae) { + let le = !0; + for (const Ae of H.properties) { + if (Ae.flags & 262144) { + le = !1; + break; + } + if (Ae.kind === 304 || Ae.kind === 305) + ae.tracker.reportInferenceFallback(Ae), le = !1; + else if (Ae.name.flags & 262144) { + le = !1; + break; + } else if (Ae.name.kind === 81) + le = !1; + else if (Ae.name.kind === 167) { + const ge = Ae.name.expression; + A5( + ge, + /*includeBigInt*/ + !1 + ) || (ae.tracker.reportInferenceFallback(Ae.name), le = !1); + } + } + return le; + } + function U(H, ae, le) { + if (!$(H, ae)) return !1; + let Ae = !0; + for (const ge of H.properties) { + E.assert(!du(ge) && !Bg(ge)); + const de = ge.name; + switch (ge.kind) { + case 174: + Ae = !!X(ge, de, ae) && Ae; + break; + case 303: + Ae = !!G(ge, de, ae, le) && Ae; + break; + case 178: + case 177: + Ae = !!Z(ge, de, ae) && Ae; + break; + } + } + return Ae; + } + function G(H, ae, le, Ae) { + return j(H.initializer, le, Ae) ?? T(H, le); + } + function ce(H, ae) { + return h(H, ae); + } + function K(H) { + return H?.every( + (ae) => i(ae.constraint) && i(ae.default) + ) ?? !0; + } + function X(H, ae, le) { + const Ae = pe(H, le), ge = K(H.typeParameters), de = H.parameters.every((ve) => ce(ve, le)); + return Ae && ge && de; + } + function Z(H, ae, le) { + const Ae = t.getAllAccessorDeclarations(H), ge = Ae.getAccessor && _(Ae.getAccessor), de = Ae.setAccessor && _(Ae.setAccessor); + if (ge !== void 0 && de !== void 0) { + const ve = H.parameters.every((De) => ce(De, le)); + return n0(H) ? ve && i(ge) : ve; + } else if (Ae.firstAccessor === H) { + const ve = ge ?? de; + return ve ? i(ve) : P(H, Ae, le); + } + return !1; + } + function oe() { + return !0; + } + function ne(H) { + return !n || qu(H.kind) || H.kind === 201 || H.kind === 184 || H.kind === 185 || H.kind === 188 || H.kind === 189 || H.kind === 187 || H.kind === 203 || H.kind === 197 ? !0 : H.kind === 196 ? ne(H.type) : H.kind === 192 || H.kind === 193 ? H.types.every(ne) : !1; + } + function pe(H, ae) { + let le; + const Ae = K_(H); + return Ae && (le = i(Ae)), !le && zT(H) && (le = fe(H, ae)), le ?? D(H, ae); + } + function fe(H, ae) { + let le; + if (H && !ic(H.body)) { + if (jc(H) & 3) return; + const Ae = H.body; + Ae && ms(Ae) ? o0(Ae, (ge) => { + if (!le) + le = ge.expression; + else + return le = void 0, !0; + }) : le = Ae; + } + if (le) + return j(le, ae); + } + } + var hm = {}; + Qa(hm, { + NameValidationResult: () => s2e, + discoverTypings: () => Cje, + isTypingUpToDate: () => Kbe, + loadSafeList: () => xje, + loadTypesMap: () => kje, + nodeCoreModuleList: () => r2e, + nodeCoreModules: () => n2e, + nonRelativeModuleNameForTypingCache: () => i2e, + prefixedNodeCoreModuleList: () => t2e, + renderPackageNameValidationFailure: () => Dje, + validatePackageName: () => Eje + }); + var PF = "action::set", wF = "action::invalidate", AF = "action::packageInstalled", DV = "event::typesRegistry", PV = "event::beginInstallTypes", wV = "event::endInstallTypes", Nse = "event::initializationFailed", YA = "action::watchTypingLocations", AV; + ((e) => { + e.GlobalCacheLocation = "--globalTypingsCacheLocation", e.LogFile = "--logFile", e.EnableTelemetry = "--enableTelemetry", e.TypingSafeListLocation = "--typingSafeListLocation", e.TypesMapLocation = "--typesMapLocation", e.NpmLocation = "--npmLocation", e.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; + })(AV || (AV = {})); + function Xbe(e) { + return _l.args.includes(e); + } + function Qbe(e) { + const t = _l.args.indexOf(e); + return t >= 0 && t < _l.args.length - 1 ? _l.args[t + 1] : void 0; + } + function Ybe() { + const e = /* @__PURE__ */ new Date(); + return `${e.getHours().toString().padStart(2, "0")}:${e.getMinutes().toString().padStart(2, "0")}:${e.getSeconds().toString().padStart(2, "0")}.${e.getMilliseconds().toString().padStart(3, "0")}`; + } + var Zbe = ` + `; + function zD(e) { + return Zbe + e.replace(/\n/g, Zbe); + } + function dv(e) { + return zD(JSON.stringify(e, void 0, 2)); + } + function Kbe(e, t) { + return new gd(uI(t, `ts${N2}`) || uI(t, "latest")).compareTo(e.version) <= 0; + } + var e2e = [ + "assert", + "assert/strict", + "async_hooks", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "diagnostics_channel", + "dns", + "dns/promises", + "domain", + "events", + "fs", + "fs/promises", + "http", + "https", + "http2", + "inspector", + "module", + "net", + "os", + "path", + "perf_hooks", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "stream/promises", + "string_decoder", + "timers", + "timers/promises", + "tls", + "trace_events", + "tty", + "url", + "util", + "util/types", + "v8", + "vm", + "wasi", + "worker_threads", + "zlib" + ], t2e = e2e.map((e) => `node:${e}`), r2e = [...e2e, ...t2e], n2e = new Set(r2e); + function i2e(e) { + return n2e.has(e) ? "node" : e; + } + function xje(e, t) { + const n = SA(t, (i) => e.readFile(i)); + return new Map(Object.entries(n.config)); + } + function kje(e, t) { + var n; + const i = SA(t, (s) => e.readFile(s)); + if ((n = i.config) != null && n.simpleMap) + return new Map(Object.entries(i.config.simpleMap)); + } + function Cje(e, t, n, i, s, o, c, _, u, d) { + if (!c || !c.enable) + return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] }; + const g = /* @__PURE__ */ new Map(); + n = Ii(n, (V) => { + const L = Cs(V); + if (Lg(L)) + return L; + }); + const h = []; + c.include && O(c.include, "Explicitly included types"); + const S = c.exclude || []; + if (!d.types) { + const V = new Set(n.map(Xn)); + V.add(i), V.forEach((L) => { + j(L, "bower.json", "bower_components", h), j(L, "package.json", "node_modules", h); + }); + } + if (c.disableFilenameBasedTypeAcquisition || F(n), _) { + const V = tb( + _.map(i2e), + O2, + Kl + ); + O(V, "Inferred typings from unresolved imports"); + } + for (const V of S) + g.delete(V) && t && t(`Typing for ${V} is in exclude list, will be ignored.`); + o.forEach((V, L) => { + const $ = u.get(L); + g.get(L) === !1 && $ !== void 0 && Kbe(V, $) && g.set(L, V.typingLocation); + }); + const T = [], C = []; + g.forEach((V, L) => { + V ? C.push(V) : T.push(L); + }); + const D = { cachedTypingPaths: C, newTypingNames: T, filesToWatch: h }; + return t && t(`Finished typings discovery:${dv(D)}`), D; + function P(V) { + g.has(V) || g.set(V, !1); + } + function O(V, L) { + t && t(`${L}: ${JSON.stringify(V)}`), rr(V, P); + } + function j(V, L, $, U) { + const G = Mn(V, L); + let ce, K; + e.fileExists(G) && (U.push(G), ce = SA(G, (ne) => e.readFile(ne)).config, K = Xs([ce.dependencies, ce.devDependencies, ce.optionalDependencies, ce.peerDependencies], Gd), O(K, `Typing names in '${G}' dependencies`)); + const X = Mn(V, $); + if (U.push(X), !e.directoryExists(X)) + return; + const Z = [], oe = K ? K.map((ne) => Mn(X, ne, L)) : e.readDirectory( + X, + [ + ".json" + /* Json */ + ], + /*excludes*/ + void 0, + /*includes*/ + void 0, + /*depth*/ + 3 + ).filter((ne) => { + if (Wc(ne) !== L) + return !1; + const pe = vl(Cs(ne)), fe = pe[pe.length - 3][0] === "@"; + return fe && sy(pe[pe.length - 4]) === $ || // `node_modules/@foo/bar` + !fe && sy(pe[pe.length - 3]) === $; + }); + t && t(`Searching for typing names in ${X}; all files: ${JSON.stringify(oe)}`); + for (const ne of oe) { + const pe = Cs(ne), H = SA(pe, (le) => e.readFile(le)).config; + if (!H.name) + continue; + const ae = H.types || H.typings; + if (ae) { + const le = Xi(ae, Xn(pe)); + e.fileExists(le) ? (t && t(` Package '${H.name}' provides its own types.`), g.set(H.name, le)) : t && t(` Package '${H.name}' provides its own types but they are missing.`); + } else + Z.push(H.name); + } + O(Z, " Found package names"); + } + function F(V) { + const L = Ii(V, (U) => { + if (!Lg(U)) return; + const G = Gu(sy(Wc(U))), ce = gR(G); + return s.get(ce); + }); + L.length && O(L, "Inferred typings from file names"), ut(V, (U) => Go( + U, + ".jsx" + /* Jsx */ + )) && (t && t("Inferred 'react' typings due to presence of '.jsx' extension"), P("react")); + } + } + var s2e = /* @__PURE__ */ ((e) => (e[e.Ok = 0] = "Ok", e[e.EmptyName = 1] = "EmptyName", e[e.NameTooLong = 2] = "NameTooLong", e[e.NameStartsWithDot = 3] = "NameStartsWithDot", e[e.NameStartsWithUnderscore = 4] = "NameStartsWithUnderscore", e[e.NameContainsNonURISafeCharacters = 5] = "NameContainsNonURISafeCharacters", e))(s2e || {}), a2e = 214; + function Eje(e) { + return Ise( + e, + /*supportScopedPackage*/ + !0 + ); + } + function Ise(e, t) { + if (!e) + return 1; + if (e.length > a2e) + return 2; + if (e.charCodeAt(0) === 46) + return 3; + if (e.charCodeAt(0) === 95) + return 4; + if (t) { + const n = /^@([^/]+)\/([^/]+)$/.exec(e); + if (n) { + const i = Ise( + n[1], + /*supportScopedPackage*/ + !1 + ); + if (i !== 0) + return { name: n[1], isScopeName: !0, result: i }; + const s = Ise( + n[2], + /*supportScopedPackage*/ + !1 + ); + return s !== 0 ? { name: n[2], isScopeName: !1, result: s } : 0; + } + } + return encodeURIComponent(e) !== e ? 5 : 0; + } + function Dje(e, t) { + return typeof e == "object" ? o2e(t, e.result, e.name, e.isScopeName) : o2e( + t, + e, + t, + /*isScopeName*/ + !1 + ); + } + function o2e(e, t, n, i) { + const s = i ? "Scope" : "Package"; + switch (t) { + case 1: + return `'${e}':: ${s} name '${n}' cannot be empty`; + case 2: + return `'${e}':: ${s} name '${n}' should be less than ${a2e} characters`; + case 3: + return `'${e}':: ${s} name '${n}' cannot start with '.'`; + case 4: + return `'${e}':: ${s} name '${n}' cannot start with '_'`; + case 5: + return `'${e}':: ${s} name '${n}' contains non URI safe characters`; + case 0: + return E.fail(); + default: + E.assertNever(t); + } + } + var NF; + ((e) => { + class t { + constructor(s) { + this.text = s; + } + getText(s, o) { + return s === 0 && o === this.text.length ? this.text : this.text.substring(s, o); + } + getLength() { + return this.text.length; + } + getChangeRange() { + } + } + function n(i) { + return new t(i); + } + e.fromString = n; + })(NF || (NF = {})); + var Ose = /* @__PURE__ */ ((e) => (e[e.Dependencies = 1] = "Dependencies", e[e.DevDependencies = 2] = "DevDependencies", e[e.PeerDependencies = 4] = "PeerDependencies", e[e.OptionalDependencies = 8] = "OptionalDependencies", e[e.All = 15] = "All", e))(Ose || {}), Fse = /* @__PURE__ */ ((e) => (e[e.Off = 0] = "Off", e[e.On = 1] = "On", e[e.Auto = 2] = "Auto", e))(Fse || {}), Lse = /* @__PURE__ */ ((e) => (e[e.Semantic = 0] = "Semantic", e[e.PartialSemantic = 1] = "PartialSemantic", e[e.Syntactic = 2] = "Syntactic", e))(Lse || {}), Bp = {}, Mse = /* @__PURE__ */ ((e) => (e.Original = "original", e.TwentyTwenty = "2020", e))(Mse || {}), NV = /* @__PURE__ */ ((e) => (e.All = "All", e.SortAndCombine = "SortAndCombine", e.RemoveUnused = "RemoveUnused", e))(NV || {}), IV = /* @__PURE__ */ ((e) => (e[e.Invoked = 1] = "Invoked", e[e.TriggerCharacter = 2] = "TriggerCharacter", e[e.TriggerForIncompleteCompletions = 3] = "TriggerForIncompleteCompletions", e))(IV || {}), Rse = /* @__PURE__ */ ((e) => (e.Type = "Type", e.Parameter = "Parameter", e.Enum = "Enum", e))(Rse || {}), jse = /* @__PURE__ */ ((e) => (e.none = "none", e.definition = "definition", e.reference = "reference", e.writtenReference = "writtenReference", e))(jse || {}), Bse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Block = 1] = "Block", e[e.Smart = 2] = "Smart", e))(Bse || {}), OV = /* @__PURE__ */ ((e) => (e.Ignore = "ignore", e.Insert = "insert", e.Remove = "remove", e))(OV || {}); + function IF(e) { + return { + indentSize: 4, + tabSize: 4, + newLineCharacter: e || ` +`, + convertTabsToSpaces: !0, + indentStyle: 2, + insertSpaceAfterConstructor: !1, + insertSpaceAfterCommaDelimiter: !0, + insertSpaceAfterSemicolonInForStatements: !0, + insertSpaceBeforeAndAfterBinaryOperators: !0, + insertSpaceAfterKeywordsInControlFlowStatements: !0, + insertSpaceAfterFunctionKeywordForAnonymousFunctions: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: !1, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: !0, + insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: !1, + insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: !1, + insertSpaceBeforeFunctionParenthesis: !1, + placeOpenBraceOnNewLineForFunctions: !1, + placeOpenBraceOnNewLineForControlBlocks: !1, + semicolons: "ignore", + trimTrailingWhitespace: !0, + indentSwitchCase: !0 + }; + } + var c2e = IF(` +`), OF = /* @__PURE__ */ ((e) => (e[e.aliasName = 0] = "aliasName", e[e.className = 1] = "className", e[e.enumName = 2] = "enumName", e[e.fieldName = 3] = "fieldName", e[e.interfaceName = 4] = "interfaceName", e[e.keyword = 5] = "keyword", e[e.lineBreak = 6] = "lineBreak", e[e.numericLiteral = 7] = "numericLiteral", e[e.stringLiteral = 8] = "stringLiteral", e[e.localName = 9] = "localName", e[e.methodName = 10] = "methodName", e[e.moduleName = 11] = "moduleName", e[e.operator = 12] = "operator", e[e.parameterName = 13] = "parameterName", e[e.propertyName = 14] = "propertyName", e[e.punctuation = 15] = "punctuation", e[e.space = 16] = "space", e[e.text = 17] = "text", e[e.typeParameterName = 18] = "typeParameterName", e[e.enumMemberName = 19] = "enumMemberName", e[e.functionName = 20] = "functionName", e[e.regularExpressionLiteral = 21] = "regularExpressionLiteral", e[e.link = 22] = "link", e[e.linkName = 23] = "linkName", e[e.linkText = 24] = "linkText", e))(OF || {}), Jse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.MayIncludeAutoImports = 1] = "MayIncludeAutoImports", e[e.IsImportStatementCompletion = 2] = "IsImportStatementCompletion", e[e.IsContinuation = 4] = "IsContinuation", e[e.ResolvedModuleSpecifiers = 8] = "ResolvedModuleSpecifiers", e[e.ResolvedModuleSpecifiersBeyondLimit = 16] = "ResolvedModuleSpecifiersBeyondLimit", e[e.MayIncludeMethodSnippets = 32] = "MayIncludeMethodSnippets", e))(Jse || {}), zse = /* @__PURE__ */ ((e) => (e.Comment = "comment", e.Region = "region", e.Code = "code", e.Imports = "imports", e))(zse || {}), Wse = /* @__PURE__ */ ((e) => (e[e.JavaScript = 0] = "JavaScript", e[e.SourceMap = 1] = "SourceMap", e[e.Declaration = 2] = "Declaration", e))(Wse || {}), Vse = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InMultiLineCommentTrivia = 1] = "InMultiLineCommentTrivia", e[e.InSingleQuoteStringLiteral = 2] = "InSingleQuoteStringLiteral", e[e.InDoubleQuoteStringLiteral = 3] = "InDoubleQuoteStringLiteral", e[e.InTemplateHeadOrNoSubstitutionTemplate = 4] = "InTemplateHeadOrNoSubstitutionTemplate", e[e.InTemplateMiddleOrTail = 5] = "InTemplateMiddleOrTail", e[e.InTemplateSubstitutionPosition = 6] = "InTemplateSubstitutionPosition", e))(Vse || {}), Use = /* @__PURE__ */ ((e) => (e[e.Punctuation = 0] = "Punctuation", e[e.Keyword = 1] = "Keyword", e[e.Operator = 2] = "Operator", e[e.Comment = 3] = "Comment", e[e.Whitespace = 4] = "Whitespace", e[e.Identifier = 5] = "Identifier", e[e.NumberLiteral = 6] = "NumberLiteral", e[e.BigIntLiteral = 7] = "BigIntLiteral", e[e.StringLiteral = 8] = "StringLiteral", e[e.RegExpLiteral = 9] = "RegExpLiteral", e))(Use || {}), qse = /* @__PURE__ */ ((e) => (e.unknown = "", e.warning = "warning", e.keyword = "keyword", e.scriptElement = "script", e.moduleElement = "module", e.classElement = "class", e.localClassElement = "local class", e.interfaceElement = "interface", e.typeElement = "type", e.enumElement = "enum", e.enumMemberElement = "enum member", e.variableElement = "var", e.localVariableElement = "local var", e.variableUsingElement = "using", e.variableAwaitUsingElement = "await using", e.functionElement = "function", e.localFunctionElement = "local function", e.memberFunctionElement = "method", e.memberGetAccessorElement = "getter", e.memberSetAccessorElement = "setter", e.memberVariableElement = "property", e.memberAccessorVariableElement = "accessor", e.constructorImplementationElement = "constructor", e.callSignatureElement = "call", e.indexSignatureElement = "index", e.constructSignatureElement = "construct", e.parameterElement = "parameter", e.typeParameterElement = "type parameter", e.primitiveType = "primitive type", e.label = "label", e.alias = "alias", e.constElement = "const", e.letElement = "let", e.directory = "directory", e.externalModuleName = "external module name", e.jsxAttribute = "JSX attribute", e.string = "string", e.link = "link", e.linkName = "link name", e.linkText = "link text", e))(qse || {}), Hse = /* @__PURE__ */ ((e) => (e.none = "", e.publicMemberModifier = "public", e.privateMemberModifier = "private", e.protectedMemberModifier = "protected", e.exportedModifier = "export", e.ambientModifier = "declare", e.staticModifier = "static", e.abstractModifier = "abstract", e.optionalModifier = "optional", e.deprecatedModifier = "deprecated", e.dtsModifier = ".d.ts", e.tsModifier = ".ts", e.tsxModifier = ".tsx", e.jsModifier = ".js", e.jsxModifier = ".jsx", e.jsonModifier = ".json", e.dmtsModifier = ".d.mts", e.mtsModifier = ".mts", e.mjsModifier = ".mjs", e.dctsModifier = ".d.cts", e.ctsModifier = ".cts", e.cjsModifier = ".cjs", e))(Hse || {}), Gse = /* @__PURE__ */ ((e) => (e.comment = "comment", e.identifier = "identifier", e.keyword = "keyword", e.numericLiteral = "number", e.bigintLiteral = "bigint", e.operator = "operator", e.stringLiteral = "string", e.whiteSpace = "whitespace", e.text = "text", e.punctuation = "punctuation", e.className = "class name", e.enumName = "enum name", e.interfaceName = "interface name", e.moduleName = "module name", e.typeParameterName = "type parameter name", e.typeAliasName = "type alias name", e.parameterName = "parameter name", e.docCommentTagName = "doc comment tag name", e.jsxOpenTagName = "jsx open tag name", e.jsxCloseTagName = "jsx close tag name", e.jsxSelfClosingTagName = "jsx self closing tag name", e.jsxAttribute = "jsx attribute", e.jsxText = "jsx text", e.jsxAttributeStringLiteralValue = "jsx attribute string literal value", e))(Gse || {}), FV = /* @__PURE__ */ ((e) => (e[e.comment = 1] = "comment", e[e.identifier = 2] = "identifier", e[e.keyword = 3] = "keyword", e[e.numericLiteral = 4] = "numericLiteral", e[e.operator = 5] = "operator", e[e.stringLiteral = 6] = "stringLiteral", e[e.regularExpressionLiteral = 7] = "regularExpressionLiteral", e[e.whiteSpace = 8] = "whiteSpace", e[e.text = 9] = "text", e[e.punctuation = 10] = "punctuation", e[e.className = 11] = "className", e[e.enumName = 12] = "enumName", e[e.interfaceName = 13] = "interfaceName", e[e.moduleName = 14] = "moduleName", e[e.typeParameterName = 15] = "typeParameterName", e[e.typeAliasName = 16] = "typeAliasName", e[e.parameterName = 17] = "parameterName", e[e.docCommentTagName = 18] = "docCommentTagName", e[e.jsxOpenTagName = 19] = "jsxOpenTagName", e[e.jsxCloseTagName = 20] = "jsxCloseTagName", e[e.jsxSelfClosingTagName = 21] = "jsxSelfClosingTagName", e[e.jsxAttribute = 22] = "jsxAttribute", e[e.jsxText = 23] = "jsxText", e[e.jsxAttributeStringLiteralValue = 24] = "jsxAttributeStringLiteralValue", e[e.bigintLiteral = 25] = "bigintLiteral", e))(FV || {}), Ou = Eg( + 99, + /*skipTrivia*/ + !0 + ), $se = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Value = 1] = "Value", e[e.Type = 2] = "Type", e[e.Namespace = 4] = "Namespace", e[e.All = 7] = "All", e))($se || {}); + function FF(e) { + switch (e.kind) { + case 260: + return Qr(e) && uj(e) ? 7 : 1; + case 169: + case 208: + case 172: + case 171: + case 303: + case 304: + case 174: + case 173: + case 176: + case 177: + case 178: + case 262: + case 218: + case 219: + case 299: + case 291: + return 1; + case 168: + case 264: + case 265: + case 187: + return 2; + case 346: + return e.name === void 0 ? 3 : 2; + case 306: + case 263: + return 3; + case 267: + return wu(e) || Ch(e) === 1 ? 5 : 4; + case 266: + case 275: + case 276: + case 271: + case 272: + case 277: + case 278: + return 7; + case 307: + return 5; + } + return 7; + } + function hS(e) { + e = GV(e); + const t = e.parent; + return e.kind === 307 ? 1 : ko(t) || pu(t) || Sh(t) || Yu(t) || kd(t) || nl(t) && e === t.name ? 7 : LF(e) ? Pje(e) : Gm(e) ? FF(t) : l_(e) && sr(e, Ef(lD, AT, iv)) ? 7 : Ije(e) ? 2 : wje(e) ? 4 : Mo(t) ? (E.assert(jp(t.parent)), 2) : y0(t) ? 3 : 1; + } + function Pje(e) { + const t = e.kind === 166 ? e : $u(e.parent) && e.parent.right === e ? e.parent : void 0; + return t && t.parent.kind === 271 ? 7 : 4; + } + function LF(e) { + for (; e.parent.kind === 166; ) + e = e.parent; + return LT(e.parent) && e.parent.moduleReference === e; + } + function wje(e) { + return Aje(e) || Nje(e); + } + function Aje(e) { + let t = e, n = !0; + if (t.parent.kind === 166) { + for (; t.parent && t.parent.kind === 166; ) + t = t.parent; + n = t.right === e; + } + return t.parent.kind === 183 && !n; + } + function Nje(e) { + let t = e, n = !0; + if (t.parent.kind === 211) { + for (; t.parent && t.parent.kind === 211; ) + t = t.parent; + n = t.name === e; + } + if (!n && t.parent.kind === 233 && t.parent.parent.kind === 298) { + const i = t.parent.parent.parent; + return i.kind === 263 && t.parent.parent.token === 119 || i.kind === 264 && t.parent.parent.token === 96; + } + return !1; + } + function Ije(e) { + switch (k4(e) && (e = e.parent), e.kind) { + case 110: + return !Sd(e); + case 197: + return !0; + } + switch (e.parent.kind) { + case 183: + return !0; + case 205: + return !e.parent.isTypeOf; + case 233: + return em(e.parent); + } + return !1; + } + function LV(e, t = !1, n = !1) { + return ZA(e, Es, RV, t, n); + } + function WD(e, t = !1, n = !1) { + return ZA(e, Ib, RV, t, n); + } + function MV(e, t = !1, n = !1) { + return ZA(e, Qd, RV, t, n); + } + function Xse(e, t = !1, n = !1) { + return ZA(e, Ob, Oje, t, n); + } + function Qse(e, t = !1, n = !1) { + return ZA(e, dl, RV, t, n); + } + function Yse(e, t = !1, n = !1) { + return ZA(e, ru, Fje, t, n); + } + function RV(e) { + return e.expression; + } + function Oje(e) { + return e.tag; + } + function Fje(e) { + return e.tagName; + } + function ZA(e, t, n, i, s) { + let o = i ? Zse(e) : MF(e); + return s && (o = Bc(o)), !!o && !!o.parent && t(o.parent) && n(o.parent) === o; + } + function MF(e) { + return i6(e) ? e.parent : e; + } + function Zse(e) { + return i6(e) || zV(e) ? e.parent : e; + } + function RF(e, t) { + for (; e; ) { + if (e.kind === 256 && e.label.escapedText === t) + return e.label; + e = e.parent; + } + } + function KA(e, t) { + return Dn(e.expression) ? e.expression.name.text === t : !1; + } + function eN(e) { + var t; + return Re(e) && ((t = Jn(e.parent, qE)) == null ? void 0 : t.label) === e; + } + function jV(e) { + var t; + return Re(e) && ((t = Jn(e.parent, Dy)) == null ? void 0 : t.label) === e; + } + function BV(e) { + return jV(e) || eN(e); + } + function JV(e) { + var t; + return ((t = Jn(e.parent, Zk)) == null ? void 0 : t.tagName) === e; + } + function Kse(e) { + var t; + return ((t = Jn(e.parent, $u)) == null ? void 0 : t.right) === e; + } + function i6(e) { + var t; + return ((t = Jn(e.parent, Dn)) == null ? void 0 : t.name) === e; + } + function zV(e) { + var t; + return ((t = Jn(e.parent, ho)) == null ? void 0 : t.argumentExpression) === e; + } + function WV(e) { + var t; + return ((t = Jn(e.parent, Nc)) == null ? void 0 : t.name) === e; + } + function VV(e) { + var t; + return Re(e) && ((t = Jn(e.parent, ps)) == null ? void 0 : t.name) === e; + } + function jF(e) { + switch (e.parent.kind) { + case 172: + case 171: + case 303: + case 306: + case 174: + case 173: + case 177: + case 178: + case 267: + return es(e.parent) === e; + case 212: + return e.parent.argumentExpression === e; + case 167: + return !0; + case 201: + return e.parent.parent.kind === 199; + default: + return !1; + } + } + function eae(e) { + return V1(e.parent.parent) && o4(e.parent.parent) === e; + } + function yS(e) { + for (Np(e) && (e = e.parent.parent); ; ) { + if (e = e.parent, !e) + return; + switch (e.kind) { + case 307: + case 174: + case 173: + case 262: + case 218: + case 177: + case 178: + case 263: + case 264: + case 266: + case 267: + return e; + } + } + } + function Ub(e) { + switch (e.kind) { + case 307: + return il(e) ? "module" : "script"; + case 267: + return "module"; + case 263: + case 231: + return "class"; + case 264: + return "interface"; + case 265: + case 338: + case 346: + return "type"; + case 266: + return "enum"; + case 260: + return t(e); + case 208: + return t(nm(e)); + case 219: + case 262: + case 218: + return "function"; + case 177: + return "getter"; + case 178: + return "setter"; + case 174: + case 173: + return "method"; + case 303: + const { initializer: n } = e; + return ps(n) ? "method" : "property"; + case 172: + case 171: + case 304: + case 305: + return "property"; + case 181: + return "index"; + case 180: + return "construct"; + case 179: + return "call"; + case 176: + case 175: + return "constructor"; + case 168: + return "type parameter"; + case 306: + return "enum member"; + case 169: + return Vn( + e, + 31 + /* ParameterPropertyModifier */ + ) ? "property" : "parameter"; + case 271: + case 276: + case 281: + case 274: + case 280: + return "alias"; + case 226: + const i = mc(e), { right: s } = e; + switch (i) { + case 7: + case 8: + case 9: + case 0: + return ""; + case 1: + case 2: + const c = Ub(s); + return c === "" ? "const" : c; + case 3: + return po(s) ? "method" : "property"; + case 4: + return "property"; + case 5: + return po(s) ? "method" : "property"; + case 6: + return "local class"; + default: + return ""; + } + case 80: + return kd(e.parent) ? "alias" : ""; + case 277: + const o = Ub(e.expression); + return o === "" ? "const" : o; + default: + return ""; + } + function t(n) { + return iC(n) ? "const" : u7(n) ? "let" : "var"; + } + } + function s6(e) { + switch (e.kind) { + case 110: + return !0; + case 80: + return DB(e) && e.parent.kind === 169; + default: + return !1; + } + } + var Lje = /^\/\/\/\s*= n.end; + } + function nN(e, t, n) { + return e.pos <= t && e.end >= n; + } + function VD(e, t, n) { + return JF(e.pos, e.end, t, n); + } + function BF(e, t, n, i) { + return JF(e.getStart(t), e.end, n, i); + } + function JF(e, t, n, i) { + const s = Math.max(e, n), o = Math.min(t, i); + return s < o; + } + function qV(e, t, n) { + return E.assert(e.pos <= t), t < e.end || !Ad(e, n); + } + function Ad(e, t) { + if (e === void 0 || ic(e)) + return !1; + switch (e.kind) { + case 263: + case 264: + case 266: + case 210: + case 206: + case 187: + case 241: + case 268: + case 269: + case 275: + case 279: + return HV(e, 20, t); + case 299: + return Ad(e.block, t); + case 214: + if (!e.arguments) + return !0; + case 213: + case 217: + case 196: + return HV(e, 22, t); + case 184: + case 185: + return Ad(e.type, t); + case 176: + case 177: + case 178: + case 262: + case 218: + case 174: + case 173: + case 180: + case 179: + case 219: + return e.body ? Ad(e.body, t) : e.type ? Ad(e.type, t) : iN(e, 22, t); + case 267: + return !!e.body && Ad(e.body, t); + case 245: + return e.elseStatement ? Ad(e.elseStatement, t) : Ad(e.thenStatement, t); + case 244: + return Ad(e.expression, t) || iN(e, 27, t); + case 209: + case 207: + case 212: + case 167: + case 189: + return HV(e, 24, t); + case 181: + return e.type ? Ad(e.type, t) : iN(e, 24, t); + case 296: + case 297: + return !1; + case 248: + case 249: + case 250: + case 247: + return Ad(e.statement, t); + case 246: + return iN(e, 117, t) ? HV(e, 22, t) : Ad(e.statement, t); + case 186: + return Ad(e.exprName, t); + case 221: + case 220: + case 222: + case 229: + case 230: + return Ad(e.expression, t); + case 215: + return Ad(e.template, t); + case 228: + const i = Bo(e.templateSpans); + return Ad(i, t); + case 239: + return wp(e.literal); + case 278: + case 272: + return wp(e.moduleSpecifier); + case 224: + return Ad(e.operand, t); + case 226: + return Ad(e.right, t); + case 227: + return Ad(e.whenFalse, t); + default: + return !0; + } + } + function HV(e, t, n) { + const i = e.getChildren(n); + if (i.length) { + const s = ia(i); + if (s.kind === t) + return !0; + if (s.kind === 27 && i.length !== 1) + return i[i.length - 2].kind === t; + } + return !1; + } + function rae(e) { + const t = zF(e); + if (!t) + return; + const n = t.getChildren(); + return { + listItemIndex: rC(n, e), + list: t + }; + } + function iN(e, t, n) { + return !!Ya(e, t, n); + } + function Ya(e, t, n) { + return Nn(e.getChildren(n), (i) => i.kind === t); + } + function zF(e) { + const t = Nn(e.parent.getChildren(), (n) => RC(n) && Mf(n, e)); + return E.assert(!t || ls(t.getChildren(), e)), t; + } + function l2e(e) { + return e.kind === 90; + } + function Mje(e) { + return e.kind === 86; + } + function Rje(e) { + return e.kind === 100; + } + function jje(e) { + if (Bl(e)) + return e.name; + if (rl(e)) { + const t = e.modifiers && Nn(e.modifiers, l2e); + if (t) return t; + } + if (tl(e)) { + const t = Nn(e.getChildren(), Mje); + if (t) return t; + } + } + function Bje(e) { + if (Bl(e)) + return e.name; + if (Ac(e)) { + const t = Nn(e.modifiers, l2e); + if (t) return t; + } + if (po(e)) { + const t = Nn(e.getChildren(), Rje); + if (t) return t; + } + } + function Jje(e) { + let t; + return sr(e, (n) => (ai(n) && (t = n), !$u(n.parent) && !ai(n.parent) && !cb(n.parent))), t; + } + function WF(e, t) { + if (e.flags & 16777216) return; + const n = a9(e, t); + if (n) return n; + const i = Jje(e); + return i && t.getTypeAtLocation(i); + } + function zje(e, t) { + if (!t) + switch (e.kind) { + case 263: + case 231: + return jje(e); + case 262: + case 218: + return Bje(e); + case 176: + return e; + } + if (Bl(e)) + return e.name; + } + function u2e(e, t) { + if (e.importClause) { + if (e.importClause.name && e.importClause.namedBindings) + return; + if (e.importClause.name) + return e.importClause.name; + if (e.importClause.namedBindings) { + if (fm(e.importClause.namedBindings)) { + const n = Rm(e.importClause.namedBindings.elements); + return n ? n.name : void 0; + } else if (Rg(e.importClause.namedBindings)) + return e.importClause.namedBindings.name; + } + } + if (!t) + return e.moduleSpecifier; + } + function _2e(e, t) { + if (e.exportClause) { + if (lp(e.exportClause)) + return Rm(e.exportClause.elements) ? e.exportClause.elements[0].name : void 0; + if (Ym(e.exportClause)) + return e.exportClause.name; + } + if (!t) + return e.moduleSpecifier; + } + function Wje(e) { + if (e.types.length === 1) + return e.types[0].expression; + } + function f2e(e, t) { + const { parent: n } = e; + if (Qs(e) && (t || e.kind !== 90) ? ed(n) && ls(n.modifiers, e) : e.kind === 86 ? rl(n) || tl(e) : e.kind === 100 ? Ac(n) || po(e) : e.kind === 120 ? Vl(n) : e.kind === 94 ? rv(n) : e.kind === 156 ? Rp(n) : e.kind === 145 || e.kind === 144 ? Nc(n) : e.kind === 102 ? nl(n) : e.kind === 139 ? Af(n) : e.kind === 153 && rf(n)) { + const i = zje(n, t); + if (i) + return i; + } + if ((e.kind === 115 || e.kind === 87 || e.kind === 121) && Il(n) && n.declarations.length === 1) { + const i = n.declarations[0]; + if (Re(i.name)) + return i.name; + } + if (e.kind === 156) { + if (kd(n) && n.isTypeOnly) { + const i = u2e(n.parent, t); + if (i) + return i; + } + if (Ic(n) && n.isTypeOnly) { + const i = _2e(n, t); + if (i) + return i; + } + } + if (e.kind === 130) { + if (Yu(n) && n.propertyName || pu(n) && n.propertyName || Rg(n) || Ym(n)) + return n.name; + if (Ic(n) && n.exportClause && Ym(n.exportClause)) + return n.exportClause.name; + } + if (e.kind === 102 && oc(n)) { + const i = u2e(n, t); + if (i) + return i; + } + if (e.kind === 95) { + if (Ic(n)) { + const i = _2e(n, t); + if (i) + return i; + } + if (ko(n)) + return Bc(n.expression); + } + if (e.kind === 149 && Sh(n)) + return n.expression; + if (e.kind === 161 && (oc(n) || Ic(n)) && n.moduleSpecifier) + return n.moduleSpecifier; + if ((e.kind === 96 || e.kind === 119) && nf(n) && n.token === e.kind) { + const i = Wje(n); + if (i) + return i; + } + if (e.kind === 96) { + if (Mo(n) && n.constraint && Nf(n.constraint)) + return n.constraint.typeName; + if (Ab(n) && Nf(n.extendsType)) + return n.extendsType.typeName; + } + if (e.kind === 140 && rS(n)) + return n.typeParameter.name; + if (e.kind === 103 && Mo(n) && iS(n.parent)) + return n.name; + if (e.kind === 143 && K1(n) && n.operator === 143 && Nf(n.type)) + return n.type.typeName; + if (e.kind === 148 && K1(n) && n.operator === 148 && iA(n.type) && Nf(n.type.elementType)) + return n.type.elementType.typeName; + if (!t) { + if ((e.kind === 105 && Ib(n) || e.kind === 116 && hx(n) || e.kind === 114 && IC(n) || e.kind === 135 && Cy(n) || e.kind === 127 && H5(n) || e.kind === 91 && Pte(n)) && n.expression) + return Bc(n.expression); + if ((e.kind === 103 || e.kind === 104) && cn(n) && n.operatorToken === e) + return Bc(n.right); + if (e.kind === 130 && tD(n) && Nf(n.type)) + return n.type.typeName; + if (e.kind === 103 && X5(n) || e.kind === 165 && sA(n)) + return Bc(n.expression); + } + return e; + } + function GV(e) { + return f2e( + e, + /*forRename*/ + !1 + ); + } + function VF(e) { + return f2e( + e, + /*forRename*/ + !0 + ); + } + function h_(e, t) { + return a6(e, t, (n) => rm(n) || qu(n.kind) || wi(n)); + } + function a6(e, t, n) { + return p2e( + e, + t, + /*allowPositionInLeadingTrivia*/ + !1, + n, + /*includeEndPosition*/ + !1 + ); + } + function Ei(e, t) { + return p2e( + e, + t, + /*allowPositionInLeadingTrivia*/ + !0, + /*includePrecedingTokenAtEndPosition*/ + void 0, + /*includeEndPosition*/ + !1 + ); + } + function p2e(e, t, n, i, s) { + let o = e, c; + e: + for (; ; ) { + const u = o.getChildren(e), d = hT(u, t, (g, h) => h, (g, h) => { + const S = u[g].getEnd(); + if (S < t) + return -1; + const T = n ? u[g].getFullStart() : u[g].getStart( + e, + /*includeJsDocComment*/ + !0 + ); + return T > t ? 1 : _(u[g], T, S) ? u[g - 1] && _(u[g - 1]) ? 1 : 0 : i && T === t && u[g - 1] && u[g - 1].getEnd() === t && _(u[g - 1]) ? 1 : -1; + }); + if (c) + return c; + if (d >= 0 && u[d]) { + o = u[d]; + continue e; + } + return o; + } + function _(u, d, g) { + if (g ?? (g = u.getEnd()), g < t || (d ?? (d = n ? u.getFullStart() : u.getStart( + e, + /*includeJsDocComment*/ + !0 + )), d > t)) + return !1; + if (t < g || t === g && (u.kind === 1 || s)) + return !0; + if (i && g === t) { + const h = sl(t, e, u); + if (h && i(h)) + return c = h, !0; + } + return !1; + } + } + function nae(e, t) { + let n = Ei(e, t); + for (; qF(n); ) { + const i = qb(n, n.parent, e); + if (!i) return; + n = i; + } + return n; + } + function UF(e, t) { + const n = Ei(e, t); + return CT(n) && t > n.getStart(e) && t < n.getEnd() ? n : sl(t, e); + } + function qb(e, t, n) { + return i(t); + function i(s) { + return CT(s) && s.pos === e.end ? s : xc(s.getChildren(n), (o) => /* previous token is enclosed somewhere in the child */ (o.pos <= e.pos && o.end > e.end || // previous token ends exactly at the beginning of child + o.pos === e.end) && uae(o, n) ? i(o) : void 0); + } + } + function sl(e, t, n, i) { + const s = o(n || t); + return E.assert(!(s && qF(s))), s; + function o(c) { + if (d2e(c) && c.kind !== 1) + return c; + const _ = c.getChildren(t), u = hT(_, e, (g, h) => h, (g, h) => e < _[g].end ? !_[g - 1] || e >= _[g - 1].end ? 0 : 1 : -1); + if (u >= 0 && _[u]) { + const g = _[u]; + if (e < g.end) + if (g.getStart( + t, + /*includeJsDoc*/ + !i + ) >= e || // cursor in the leading trivia + !uae(g, t) || qF(g)) { + const T = sae( + _, + /*exclusiveStartPosition*/ + u, + t, + c.kind + ); + return T ? !i && $I(T) && T.getChildren(t).length ? o(T) : iae(T, t) : void 0; + } else + return o(g); + } + E.assert(n !== void 0 || c.kind === 307 || c.kind === 1 || $I(c)); + const d = sae( + _, + /*exclusiveStartPosition*/ + _.length, + t, + c.kind + ); + return d && iae(d, t); + } + } + function d2e(e) { + return CT(e) && !qF(e); + } + function iae(e, t) { + if (d2e(e)) + return e; + const n = e.getChildren(t); + if (n.length === 0) + return e; + const i = sae( + n, + /*exclusiveStartPosition*/ + n.length, + t, + e.kind + ); + return i && iae(i, t); + } + function sae(e, t, n, i) { + for (let s = t - 1; s >= 0; s--) { + const o = e[s]; + if (qF(o)) + s === 0 && (i === 12 || i === 285) && E.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); + else if (uae(e[s], n)) + return e[s]; + } + } + function Mx(e, t, n = sl(t, e)) { + if (n && hj(n)) { + const i = n.getStart(e), s = n.getEnd(); + if (i < t && t < s) + return !0; + if (t === s) + return !!n.isUnterminated; + } + return !1; + } + function aae(e, t) { + const n = Ei(e, t); + return n ? !!(n.kind === 12 || n.kind === 30 && n.parent.kind === 12 || n.kind === 30 && n.parent.kind === 294 || n && n.kind === 20 && n.parent.kind === 294 || n.kind === 30 && n.parent.kind === 287) : !1; + } + function qF(e) { + return cx(e) && e.containsOnlyTriviaWhiteSpaces; + } + function $V(e, t) { + const n = Ei(e, t); + return uy(n.kind) && t > n.getStart(e); + } + function oae(e, t) { + const n = Ei(e, t); + return !!(cx(n) || n.kind === 19 && oD(n.parent) && jg(n.parent.parent) || n.kind === 30 && ru(n.parent) && jg(n.parent.parent)); + } + function HF(e, t) { + function n(i) { + for (; i; ) + if (i.kind >= 285 && i.kind <= 294 || i.kind === 12 || i.kind === 30 || i.kind === 32 || i.kind === 80 || i.kind === 20 || i.kind === 19 || i.kind === 44) + i = i.parent; + else if (i.kind === 284) { + if (t > i.getStart(e)) return !0; + i = i.parent; + } else + return !1; + return !1; + } + return n(Ei(e, t)); + } + function GF(e, t, n) { + const i = Ws(e.kind), s = Ws(t), o = e.getFullStart(), c = n.text.lastIndexOf(s, o); + if (c === -1) + return; + if (n.text.lastIndexOf(i, o - 1) < c) { + const d = sl(c + 1, n); + if (d && d.kind === t) + return d; + } + const _ = e.kind; + let u = 0; + for (; ; ) { + const d = sl(e.getFullStart(), n); + if (!d) + return; + if (e = d, e.kind === t) { + if (u === 0) + return e; + u--; + } else e.kind === _ && u++; + } + } + function cae(e, t, n) { + return t ? e.getNonNullableType() : n ? e.getNonOptionalType() : e; + } + function sN(e, t, n) { + const i = QV(e, t); + return i !== void 0 && (em(i.called) || XV(i.called, i.nTypeArguments, n).length !== 0 || sN(i.called, t, n)); + } + function XV(e, t, n) { + let i = n.getTypeAtLocation(e); + return fu(e.parent) && (i = cae( + i, + VE(e.parent), + /*isOptionalChain*/ + !0 + )), (Ib(e.parent) ? i.getConstructSignatures() : i.getCallSignatures()).filter((o) => !!o.typeParameters && o.typeParameters.length >= t); + } + function QV(e, t) { + if (t.text.lastIndexOf("<", e ? e.pos : t.text.length) === -1) + return; + let n = e, i = 0, s = 0; + for (; n; ) { + switch (n.kind) { + case 30: + if (n = sl(n.getFullStart(), t), n && n.kind === 29 && (n = sl(n.getFullStart(), t)), !n || !Re(n)) return; + if (!i) + return Gm(n) ? void 0 : { called: n, nTypeArguments: s }; + i--; + break; + case 50: + i = 3; + break; + case 49: + i = 2; + break; + case 32: + i++; + break; + case 20: + if (n = GF(n, 19, t), !n) return; + break; + case 22: + if (n = GF(n, 21, t), !n) return; + break; + case 24: + if (n = GF(n, 23, t), !n) return; + break; + case 28: + s++; + break; + case 39: + case 80: + case 11: + case 9: + case 10: + case 112: + case 97: + case 114: + case 96: + case 143: + case 25: + case 52: + case 58: + case 59: + break; + default: + if (ai(n)) + break; + return; + } + n = sl(n.getFullStart(), t); + } + } + function T0(e, t, n) { + return Hc.getRangeOfEnclosingComment( + e, + t, + /*precedingToken*/ + void 0, + n + ); + } + function lae(e, t) { + const n = Ei(e, t); + return !!sr(n, Ed); + } + function uae(e, t) { + return e.kind === 1 ? !!e.jsDoc : e.getWidth(t) !== 0; + } + function UD(e, t = 0) { + const n = [], i = tu(e) ? sj(e) & ~t : 0; + return i & 2 && n.push( + "private" + /* privateMemberModifier */ + ), i & 4 && n.push( + "protected" + /* protectedMemberModifier */ + ), i & 1 && n.push( + "public" + /* publicMemberModifier */ + ), (i & 256 || ac(e)) && n.push( + "static" + /* staticModifier */ + ), i & 64 && n.push( + "abstract" + /* abstractModifier */ + ), i & 32 && n.push( + "export" + /* exportedModifier */ + ), i & 65536 && n.push( + "deprecated" + /* deprecatedModifier */ + ), e.flags & 33554432 && n.push( + "declare" + /* ambientModifier */ + ), e.kind === 277 && n.push( + "export" + /* exportedModifier */ + ), n.length > 0 ? n.join(",") : ""; + } + function _ae(e) { + if (e.kind === 183 || e.kind === 213) + return e.typeArguments; + if (ps(e) || e.kind === 263 || e.kind === 264) + return e.typeParameters; + } + function $F(e) { + return e === 2 || e === 3; + } + function YV(e) { + return !!(e === 11 || e === 14 || uy(e)); + } + function m2e(e, t, n) { + return !!(t.flags & 4) && e.isEmptyAnonymousObjectType(n); + } + function fae(e) { + if (!e.isIntersection()) + return !1; + const { types: t, checker: n } = e; + return t.length === 2 && (m2e(n, t[0], t[1]) || m2e(n, t[1], t[0])); + } + function aN(e, t, n) { + return uy(e.kind) && e.getStart(n) < t && t < e.end || !!e.isUnterminated && t === e.end; + } + function ZV(e) { + switch (e) { + case 125: + case 123: + case 124: + return !0; + } + return !1; + } + function KV(e) { + const t = EX(e); + return Ez(t, e && e.configFile), t; + } + function x0(e) { + return !!((e.kind === 209 || e.kind === 210) && (e.parent.kind === 226 && e.parent.left === e && e.parent.operatorToken.kind === 64 || e.parent.kind === 250 && e.parent.initializer === e || x0(e.parent.kind === 303 ? e.parent.parent : e.parent))); + } + function pae(e, t) { + return g2e( + e, + t, + /*shouldBeReference*/ + !0 + ); + } + function dae(e, t) { + return g2e( + e, + t, + /*shouldBeReference*/ + !1 + ); + } + function g2e(e, t, n) { + const i = T0( + e, + t, + /*tokenAtPosition*/ + void 0 + ); + return !!i && n === Lje.test(e.text.substring(i.pos, i.end)); + } + function eU(e, t) { + if (e) + switch (e.kind) { + case 11: + case 15: + return tU(e, t); + default: + return e_(e); + } + } + function e_(e, t, n) { + return Mc(e.getStart(t), (n || e).getEnd()); + } + function tU(e, t) { + let n = e.getEnd() - 1; + if (e.isUnterminated) { + if (e.getStart() === n) return; + n = Math.min(t, e.getEnd()); + } + return Mc(e.getStart() + 1, n); + } + function rU(e, t) { + return np(e.getStart(t), e.end); + } + function Fy(e) { + return Mc(e.pos, e.end); + } + function XF(e) { + return np(e.start, e.start + e.length); + } + function QF(e, t, n) { + return oN(jl(e, t), n); + } + function oN(e, t) { + return { span: e, newText: t }; + } + var nU = [ + 133, + 131, + 163, + 136, + 97, + 140, + 143, + 146, + 106, + 150, + 151, + 148, + 154, + 155, + 114, + 112, + 116, + 157, + 158, + 159 + /* UnknownKeyword */ + ]; + function qD(e) { + return ls(nU, e); + } + function iU(e) { + return e.kind === 156; + } + function YF(e) { + return iU(e) || Re(e) && e.text === "type"; + } + function o6() { + const e = []; + return (t) => { + const n = ja(t); + return !e[n] && (e[n] = !0); + }; + } + function Rx(e) { + return e.getText(0, e.getLength()); + } + function cN(e, t) { + let n = ""; + for (let i = 0; i < t; i++) + n += e; + return n; + } + function sU(e) { + return e.isTypeParameter() && e.getConstraint() || e; + } + function lN(e) { + return e.kind === 167 ? Pf(e.expression) ? e.expression.text : void 0 : wi(e) ? dn(e) : Ip(e); + } + function mae(e) { + return e.getSourceFiles().some((t) => !t.isDeclarationFile && !e.isSourceFileFromExternalLibrary(t) && !!(t.externalModuleIndicator || t.commonJsModuleIndicator)); + } + function gae(e) { + return e.getSourceFiles().some((t) => !t.isDeclarationFile && !e.isSourceFileFromExternalLibrary(t) && !!t.externalModuleIndicator); + } + function aU(e) { + return !!e.module || pa(e) >= 2 || !!e.noEmit; + } + function jx(e, t) { + return { + fileExists: (n) => e.fileExists(n), + getCurrentDirectory: () => t.getCurrentDirectory(), + readFile: Ns(t, t.readFile), + useCaseSensitiveFileNames: Ns(t, t.useCaseSensitiveFileNames), + getSymlinkCache: Ns(t, t.getSymlinkCache) || e.getSymlinkCache, + getModuleSpecifierCache: Ns(t, t.getModuleSpecifierCache), + getPackageJsonInfoCache: () => { + var n; + return (n = e.getModuleResolutionCache()) == null ? void 0 : n.getPackageJsonInfoCache(); + }, + getGlobalTypingsCacheLocation: Ns(t, t.getGlobalTypingsCacheLocation), + redirectTargetsMap: e.redirectTargetsMap, + getProjectReferenceRedirect: (n) => e.getProjectReferenceRedirect(n), + isSourceOfProjectReferenceRedirect: (n) => e.isSourceOfProjectReferenceRedirect(n), + getNearestAncestorDirectoryWithPackageJson: Ns(t, t.getNearestAncestorDirectoryWithPackageJson), + getFileIncludeReasons: () => e.getFileIncludeReasons(), + getCommonSourceDirectory: () => e.getCommonSourceDirectory() + }; + } + function oU(e, t) { + return { + ...jx(e, t), + getCommonSourceDirectory: () => e.getCommonSourceDirectory() + }; + } + function ZF(e) { + return e === 2 || e >= 3 && e <= 99 || e === 100; + } + function Ly(e, t, n, i, s) { + return N.createImportDeclaration( + /*modifiers*/ + void 0, + e || t ? N.createImportClause(!!s, e, t && t.length ? N.createNamedImports(t) : void 0) : void 0, + typeof n == "string" ? HD(n, i) : n, + /*attributes*/ + void 0 + ); + } + function HD(e, t) { + return N.createStringLiteral( + e, + t === 0 + /* Single */ + ); + } + var hae = /* @__PURE__ */ ((e) => (e[e.Single = 0] = "Single", e[e.Double = 1] = "Double", e))(hae || {}); + function cU(e, t) { + return E7(e, t) ? 1 : 0; + } + function Rf(e, t) { + if (t.quotePreference && t.quotePreference !== "auto") + return t.quotePreference === "single" ? 0 : 1; + { + const n = l0(e) && e.imports && Nn(e.imports, (i) => Ks(i) && !oo(i.parent)); + return n ? cU(n, e) : 1; + } + } + function lU(e) { + switch (e) { + case 0: + return "'"; + case 1: + return '"'; + default: + return E.assertNever(e); + } + } + function uU(e) { + const t = KF(e); + return t === void 0 ? void 0 : Pi(t); + } + function KF(e) { + return e.escapedName !== "default" ? e.escapedName : xc(e.declarations, (t) => { + const n = es(t); + return n && n.kind === 80 ? n.escapedText : void 0; + }); + } + function e9(e) { + return Ga(e) && (Sh(e.parent) || oc(e.parent) || Jg(e.parent) || d_( + e.parent, + /*requireStringLiteralLikeArgument*/ + !1 + ) && e.parent.arguments[0] === e || hf(e.parent) && e.parent.arguments[0] === e); + } + function uN(e) { + return da(e) && If(e.parent) && Re(e.name) && !e.propertyName; + } + function t9(e, t) { + const n = e.getTypeAtLocation(t.parent); + return n && e.getPropertyOfType(n, t.name.text); + } + function _N(e, t, n) { + if (e) + for (; e.parent; ) { + if (yi(e.parent) || !Vje(n, e.parent, t)) + return e; + e = e.parent; + } + } + function Vje(e, t, n) { + return ij(e, t.getStart(n)) && t.getEnd() <= wc(e); + } + function c6(e, t) { + return ed(e) ? Nn(e.modifiers, (n) => n.kind === t) : void 0; + } + function _U(e, t, n, i, s) { + var o; + const _ = (ss(n) ? n[0] : n).kind === 243 ? s3 : IT, u = Ln(t.statements, _), { comparer: d, isSorted: g } = Sv.getOrganizeImportsStringComparerWithDetection(u, s), h = ss(n) ? Sg(n, (S, T) => Sv.compareImportsOrRequireStatements(S, T, d)) : [n]; + if (!u?.length) { + if (l0(t)) + e.insertNodesAtTopOfFile(t, h, i); + else + for (const S of h) + e.insertStatementsInNewFile(t.fileName, [S], (o = Zo(S)) == null ? void 0 : o.getSourceFile()); + return; + } + if (E.assert(l0(t)), u && g) + for (const S of h) { + const T = Sv.getImportDeclarationInsertionIndex(u, S, d); + if (T === 0) { + const C = u[0] === t.statements[0] ? { leadingTriviaOption: Yr.LeadingTriviaOption.Exclude } : {}; + e.insertNodeBefore( + t, + u[0], + S, + /*blankLineBetween*/ + !1, + C + ); + } else { + const C = u[T - 1]; + e.insertNodeAfter(t, C, S); + } + } + else { + const S = Bo(u); + S ? e.insertNodesAfter(t, S, h) : e.insertNodesAtTopOfFile(t, h, i); + } + } + function fU(e, t) { + return E.assert(e.isTypeOnly), Is(e.getChildAt(0, t), iU); + } + function l6(e, t) { + return !!e && !!t && e.start === t.start && e.length === t.length; + } + function pU(e, t, n) { + return (n ? O2 : N1)(e.fileName, t.fileName) && l6(e.textSpan, t.textSpan); + } + function dU(e) { + return (t, n) => pU(t, n, e); + } + function mU(e, t) { + if (e) { + for (let n = 0; n < e.length; n++) + if (e.indexOf(e[n]) === n) { + const i = t(e[n], n); + if (i) + return i; + } + } + } + function yae(e, t, n) { + for (let i = t; i < n; i++) + if (!xg(e.charCodeAt(i))) + return !1; + return !0; + } + function GD(e, t, n) { + const i = t.tryGetSourcePosition(e); + return i && (!n || n(Cs(i.fileName)) ? i : void 0); + } + function r9(e, t, n) { + const { fileName: i, textSpan: s } = e, o = GD({ fileName: i, pos: s.start }, t, n); + if (!o) return; + const c = GD({ fileName: i, pos: s.start + s.length }, t, n), _ = c ? c.pos - o.pos : s.length; + return { + fileName: o.fileName, + textSpan: { + start: o.pos, + length: _ + }, + originalFileName: e.fileName, + originalTextSpan: e.textSpan, + contextSpan: gU(e, t, n), + originalContextSpan: e.contextSpan + }; + } + function gU(e, t, n) { + const i = e.contextSpan && GD( + { fileName: e.fileName, pos: e.contextSpan.start }, + t, + n + ), s = e.contextSpan && GD( + { fileName: e.fileName, pos: e.contextSpan.start + e.contextSpan.length }, + t, + n + ); + return i && s ? { start: i.pos, length: s.pos - i.pos } : void 0; + } + function hU(e) { + const t = e.declarations ? ul(e.declarations) : void 0; + return !!sr(t, (n) => ji(n) ? !0 : da(n) || If(n) || v0(n) ? !1 : "quit"); + } + var vae = Uje(); + function Uje() { + const e = KE * 10; + let t, n, i, s; + g(); + const o = (h) => _( + h, + 17 + /* text */ + ); + return { + displayParts: () => { + const h = t.length && t[t.length - 1].text; + return s > e && h && h !== "..." && (xg(h.charCodeAt(h.length - 1)) || t.push(O_( + " ", + 16 + /* space */ + )), t.push(O_( + "...", + 15 + /* punctuation */ + ))), t; + }, + writeKeyword: (h) => _( + h, + 5 + /* keyword */ + ), + writeOperator: (h) => _( + h, + 12 + /* operator */ + ), + writePunctuation: (h) => _( + h, + 15 + /* punctuation */ + ), + writeTrailingSemicolon: (h) => _( + h, + 15 + /* punctuation */ + ), + writeSpace: (h) => _( + h, + 16 + /* space */ + ), + writeStringLiteral: (h) => _( + h, + 8 + /* stringLiteral */ + ), + writeParameter: (h) => _( + h, + 13 + /* parameterName */ + ), + writeProperty: (h) => _( + h, + 14 + /* propertyName */ + ), + writeLiteral: (h) => _( + h, + 8 + /* stringLiteral */ + ), + writeSymbol: u, + writeLine: d, + write: o, + writeComment: o, + getText: () => "", + getTextPos: () => 0, + getColumn: () => 0, + getLine: () => 0, + isAtStartOfLine: () => !1, + hasTrailingWhitespace: () => !1, + hasTrailingComment: () => !1, + rawWrite: Rs, + getIndent: () => i, + increaseIndent: () => { + i++; + }, + decreaseIndent: () => { + i--; + }, + clear: g + }; + function c() { + if (!(s > e) && n) { + const h = M7(i); + h && (s += h.length, t.push(O_( + h, + 16 + /* space */ + ))), n = !1; + } + } + function _(h, S) { + s > e || (c(), s += h.length, t.push(O_(h, S))); + } + function u(h, S) { + s > e || (c(), s += h.length, t.push(bae(h, S))); + } + function d() { + s > e || (s += 1, t.push(u6()), n = !0); + } + function g() { + t = [], n = !0, i = 0, s = 0; + } + } + function bae(e, t) { + return O_(e, n(t)); + function n(i) { + const s = i.flags; + return s & 3 ? hU(i) ? 13 : 9 : s & 4 || s & 32768 || s & 65536 ? 14 : s & 8 ? 19 : s & 16 ? 20 : s & 32 ? 1 : s & 64 ? 4 : s & 384 ? 2 : s & 1536 ? 11 : s & 8192 ? 10 : s & 262144 ? 18 : s & 524288 || s & 2097152 ? 0 : 17; + } + } + function O_(e, t) { + return { text: e, kind: OF[t] }; + } + function _c() { + return O_( + " ", + 16 + /* space */ + ); + } + function af(e) { + return O_( + Ws(e), + 5 + /* keyword */ + ); + } + function yu(e) { + return O_( + Ws(e), + 15 + /* punctuation */ + ); + } + function $D(e) { + return O_( + Ws(e), + 12 + /* operator */ + ); + } + function Sae(e) { + return O_( + e, + 13 + /* parameterName */ + ); + } + function Tae(e) { + return O_( + e, + 14 + /* propertyName */ + ); + } + function yU(e) { + const t = ib(e); + return t === void 0 ? jf(e) : af(t); + } + function jf(e) { + return O_( + e, + 17 + /* text */ + ); + } + function xae(e) { + return O_( + e, + 0 + /* aliasName */ + ); + } + function kae(e) { + return O_( + e, + 18 + /* typeParameterName */ + ); + } + function n9(e) { + return O_( + e, + 24 + /* linkText */ + ); + } + function Cae(e, t) { + return { + text: e, + kind: OF[ + 23 + /* linkName */ + ], + target: { + fileName: xr(t).fileName, + textSpan: e_(t) + } + }; + } + function vU(e) { + return O_( + e, + 22 + /* link */ + ); + } + function Eae(e, t) { + var n; + const i = Lte(e) ? "link" : Mte(e) ? "linkcode" : "linkplain", s = [vU(`{@${i} `)]; + if (!e.name) + e.text && s.push(n9(e.text)); + else { + const o = t?.getSymbolAtLocation(e.name), c = o && t ? TU(o, t) : void 0, _ = Hje(e.text), u = sc(e.name) + e.text.slice(0, _), d = qje(e.text.slice(_)), g = c?.valueDeclaration || ((n = c?.declarations) == null ? void 0 : n[0]); + if (g) + s.push(Cae(u, g)), d && s.push(n9(d)); + else { + const h = _ === 0 || e.text.charCodeAt(_) === 124 && u.charCodeAt(u.length - 1) !== 32 ? " " : ""; + s.push(n9(u + h + d)); + } + } + return s.push(vU("}")), s; + } + function qje(e) { + let t = 0; + if (e.charCodeAt(t++) === 124) { + for (; t < e.length && e.charCodeAt(t) === 32; ) t++; + return e.slice(t); + } + return e; + } + function Hje(e) { + let t = e.indexOf("://"); + if (t === 0) { + for (; t < e.length && e.charCodeAt(t) !== 124; ) t++; + return t; + } + if (e.indexOf("()") === 0) return 2; + if (e.charAt(0) === "<") { + let n = 0, i = 0; + for (; i < e.length; ) + if (e[i] === "<" && n++, e[i] === ">" && n--, i++, !n) return i; + } + return 0; + } + var Gje = ` +`; + function k0(e, t) { + var n; + return t?.newLineCharacter || ((n = e.getNewLine) == null ? void 0 : n.call(e)) || Gje; + } + function u6() { + return O_( + ` +`, + 6 + /* lineBreak */ + ); + } + function My(e) { + try { + return e(vae), vae.displayParts(); + } finally { + vae.clear(); + } + } + function fN(e, t, n, i = 0) { + return My((s) => { + e.writeType(t, n, i | 1024 | 16384, s); + }); + } + function XD(e, t, n, i, s = 0) { + return My((o) => { + e.writeSymbol(t, n, i, s | 8, o); + }); + } + function bU(e, t, n, i = 0) { + return i |= 25632, My((s) => { + e.writeSignature( + t, + n, + i, + /*kind*/ + void 0, + s + ); + }); + } + function h2e(e, t) { + const n = t.getSourceFile(); + return My((i) => { + eF().writeNode(4, e, n, i); + }); + } + function Dae(e) { + return !!e.parent && ET(e.parent) && e.parent.propertyName === e; + } + function SU(e, t) { + return m5(e, t.getScriptKind && t.getScriptKind(e)); + } + function TU(e, t) { + let n = e; + for (; $je(n) || qm(n) && n.links.target; ) + qm(n) && n.links.target ? n = n.links.target : n = Jl(n, t); + return n; + } + function $je(e) { + return (e.flags & 2097152) !== 0; + } + function Pae(e, t) { + return $s(Jl(e, t)); + } + function wae(e, t) { + for (; xg(e.charCodeAt(t)); ) + t += 1; + return t; + } + function i9(e, t) { + for (; t > -1 && Xd(e.charCodeAt(t)); ) + t -= 1; + return t + 1; + } + function qa(e, t = !0) { + const n = e && y2e(e); + return n && !t && of(n), yh( + n, + /*incremental*/ + !1 + ); + } + function pN(e, t, n) { + let i = n(e); + return i ? kn(i, e) : i = y2e(e, n), i && !t && of(i), i; + } + function y2e(e, t) { + const n = t ? (o) => pN( + o, + /*includeTrivia*/ + !0, + t + ) : qa, s = gr( + e, + n, + /*context*/ + void 0, + t ? (o) => o && xU( + o, + /*includeTrivia*/ + !0, + t + ) : (o) => o && Hb(o), + n + ); + if (s === e) { + const o = Ks(e) ? kn(N.createStringLiteralFromNode(e), e) : m_(e) ? kn(N.createNumericLiteral(e.text, e.numericLiteralFlags), e) : N.cloneNode(e); + return ot(o, e); + } + return s.parent = void 0, s; + } + function Hb(e, t = !0) { + if (e) { + const n = N.createNodeArray(e.map((i) => qa(i, t)), e.hasTrailingComma); + return ot(n, e), n; + } + return e; + } + function xU(e, t, n) { + return N.createNodeArray(e.map((i) => pN(i, t, n)), e.hasTrailingComma); + } + function of(e) { + kU(e), Aae(e); + } + function kU(e) { + Nae(e, 1024, Qje); + } + function Aae(e) { + Nae(e, 2048, WB); + } + function vS(e, t) { + const n = e.getSourceFile(), i = n.text; + Xje(e, i) ? _6(e, t, n) : mN(e, t, n), QD(e, t, n); + } + function Xje(e, t) { + const n = e.getFullStart(), i = e.getStart(); + for (let s = n; s < i; s++) + if (t.charCodeAt(s) === 10) return !0; + return !1; + } + function Nae(e, t, n) { + cm(e, t); + const i = n(e); + i && Nae(i, t, n); + } + function Qje(e) { + return e.forEachChild((t) => t); + } + function bS(e, t) { + let n = e; + for (let i = 1; !n7(t, n); i++) + n = `${e}_${i}`; + return n; + } + function dN(e, t, n, i) { + let s = 0, o = -1; + for (const { fileName: c, textChanges: _ } of e) { + E.assert(c === t); + for (const u of _) { + const { span: d, newText: g } = u, h = Yje(g, $m(n)); + if (h !== -1 && (o = d.start + s + h, !i)) + return o; + s += g.length - d.length; + } + } + return E.assert(i), E.assert(o >= 0), o; + } + function _6(e, t, n, i, s) { + hw(n.text, e.pos, Iae(t, n, i, s, X4)); + } + function QD(e, t, n, i, s) { + yw(n.text, e.end, Iae(t, n, i, s, F5)); + } + function mN(e, t, n, i, s) { + yw(n.text, e.pos, Iae(t, n, i, s, X4)); + } + function Iae(e, t, n, i, s) { + return (o, c, _, u) => { + _ === 3 ? (o += 2, c -= 2) : o += 2, s(e, n || _, t.text.slice(o, c), i !== void 0 ? i : u); + }; + } + function Yje(e, t) { + if (zi(e, t)) return 0; + let n = e.indexOf(" " + t); + return n === -1 && (n = e.indexOf("." + t)), n === -1 && (n = e.indexOf('"' + t)), n === -1 ? -1 : n + 1; + } + function s9(e) { + return cn(e) && e.operatorToken.kind === 28 || Gs(e) || (tD(e) || G5(e)) && Gs(e.expression); + } + function a9(e, t, n) { + const i = fh(e.parent); + switch (i.kind) { + case 214: + return t.getContextualType(i, n); + case 226: { + const { left: s, operatorToken: o, right: c } = i; + return o9(o.kind) ? t.getTypeAtLocation(e === c ? s : c) : t.getContextualType(e, n); + } + case 296: + return EU(i, t); + default: + return t.getContextualType(e, n); + } + } + function YD(e, t, n) { + const i = Rf(e, t), s = JSON.stringify(n); + return i === 0 ? `'${Op(s).replace(/'/g, () => "\\'").replace(/\\"/g, '"')}'` : s; + } + function o9(e) { + switch (e) { + case 37: + case 35: + case 38: + case 36: + return !0; + default: + return !1; + } + } + function Oae(e) { + switch (e.kind) { + case 11: + case 15: + case 228: + case 215: + return !0; + default: + return !1; + } + } + function CU(e) { + return !!e.getStringIndexType() || !!e.getNumberIndexType(); + } + function EU(e, t) { + return t.getTypeAtLocation(e.parent.parent.expression); + } + var DU = "anonymous function"; + function ZD(e, t, n, i) { + const s = n.getTypeChecker(); + let o = !0; + const c = () => o = !1, _ = s.typeToTypeNode(e, t, 1, { + trackSymbol: (u, d, g) => (o = o && s.isSymbolAccessible( + u, + d, + g, + /*shouldComputeAliasToMarkVisible*/ + !1 + ).accessibility === 0, !o), + reportInaccessibleThisError: c, + reportPrivateInBaseOfClassExpression: c, + reportInaccessibleUniqueSymbolError: c, + moduleResolverHost: oU(n, i) + }); + return o ? _ : void 0; + } + function Fae(e) { + return e === 179 || e === 180 || e === 181 || e === 171 || e === 173; + } + function v2e(e) { + return e === 262 || e === 176 || e === 174 || e === 177 || e === 178; + } + function b2e(e) { + return e === 267; + } + function c9(e) { + return e === 243 || e === 244 || e === 246 || e === 251 || e === 252 || e === 253 || e === 257 || e === 259 || e === 172 || e === 265 || e === 272 || e === 271 || e === 278 || e === 270 || e === 277; + } + var Lae = Ef( + Fae, + v2e, + b2e, + c9 + ); + function Zje(e, t) { + const n = e.getLastToken(t); + if (n && n.kind === 27) + return !1; + if (Fae(e.kind)) { + if (n && n.kind === 28) + return !1; + } else if (b2e(e.kind)) { + const _ = ia(e.getChildren(t)); + if (_ && _m(_)) + return !1; + } else if (v2e(e.kind)) { + const _ = ia(e.getChildren(t)); + if (_ && pb(_)) + return !1; + } else if (!c9(e.kind)) + return !1; + if (e.kind === 246) + return !0; + const i = sr(e, (_) => !_.parent), s = qb(e, i, t); + if (!s || s.kind === 20) + return !0; + const o = t.getLineAndCharacterOfPosition(e.getEnd()).line, c = t.getLineAndCharacterOfPosition(s.getStart(t)).line; + return o !== c; + } + function l9(e, t, n) { + const i = sr(t, (s) => s.end !== e ? "quit" : Lae(s.kind)); + return !!i && Zje(i, n); + } + function gN(e) { + let t = 0, n = 0; + const i = 5; + return gs(e, function s(o) { + if (c9(o.kind)) { + const c = o.getLastToken(e); + c?.kind === 27 ? t++ : n++; + } else if (Fae(o.kind)) { + const c = o.getLastToken(e); + if (c?.kind === 27) + t++; + else if (c && c.kind !== 28) { + const _ = Vs(e, c.getStart(e)).line, u = Vs(e, Hm(e, c.end).start).line; + _ !== u && n++; + } + } + return t + n >= i ? !0 : gs(o, s); + }), t === 0 && n <= 1 ? !0 : t / n > 1 / i; + } + function u9(e, t) { + return p9(e, e.getDirectories, t) || []; + } + function PU(e, t, n, i, s) { + return p9(e, e.readDirectory, t, n, i, s) || He; + } + function hN(e, t) { + return p9(e, e.fileExists, t); + } + function _9(e, t) { + return f9(() => Td(t, e)) || !1; + } + function f9(e) { + try { + return e(); + } catch { + return; + } + } + function p9(e, t, ...n) { + return f9(() => t && t.apply(e, n)); + } + function wU(e, t, n) { + const i = []; + return $p(e, (s) => { + if (s === n) + return !0; + const o = Mn(s, "package.json"); + hN(t, o) && i.push(o); + }), i; + } + function Mae(e, t) { + let n; + return $p(e, (i) => { + if (i === "node_modules" || (n = EW(i, (s) => hN(t, s), "package.json"), n)) + return !0; + }), n; + } + function Rae(e, t) { + if (!t.fileExists) + return []; + const n = []; + return $p(Xn(e), (i) => { + const s = Mn(i, "package.json"); + if (t.fileExists(s)) { + const o = AU(s, t); + o && n.push(o); + } + }), n; + } + function AU(e, t) { + if (!t.readFile) + return; + const n = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"], i = t.readFile(e) || "", s = $7(i), o = {}; + if (s) + for (const u of n) { + const d = s[u]; + if (!d) + continue; + const g = /* @__PURE__ */ new Map(); + for (const h in d) + g.set(h, d[h]); + o[u] = g; + } + const c = [ + [1, o.dependencies], + [2, o.devDependencies], + [8, o.optionalDependencies], + [4, o.peerDependencies] + ]; + return { + ...o, + parseable: !!s, + fileName: e, + get: _, + has(u, d) { + return !!_(u, d); + } + }; + function _(u, d = 15) { + for (const [g, h] of c) + if (h && d & g) { + const S = h.get(u); + if (S !== void 0) + return S; + } + } + } + function f6(e, t, n) { + const i = (n.getPackageJsonsVisibleToFile && n.getPackageJsonsVisibleToFile(e.fileName) || Rae(e.fileName, n)).filter((C) => C.parseable); + let s, o, c; + return { + allowsImportingAmbientModule: u, + allowsImportingSourceFile: d, + allowsImportingSpecifier: g + }; + function _(C) { + const D = T(C); + for (const P of i) + if (P.has(D) || P.has(MO(D))) + return !0; + return !1; + } + function u(C, D) { + if (!i.length || !C.valueDeclaration) + return !0; + if (!o) + o = /* @__PURE__ */ new Map(); + else { + const V = o.get(C); + if (V !== void 0) + return V; + } + const P = Op(C.getName()); + if (h(P)) + return o.set(C, !0), !0; + const O = C.valueDeclaration.getSourceFile(), j = S(O.fileName, D); + if (typeof j > "u") + return o.set(C, !0), !0; + const F = _(j) || _(P); + return o.set(C, F), F; + } + function d(C, D) { + if (!i.length) + return !0; + if (!c) + c = /* @__PURE__ */ new Map(); + else { + const j = c.get(C); + if (j !== void 0) + return j; + } + const P = S(C.fileName, D); + if (!P) + return c.set(C, !0), !0; + const O = _(P); + return c.set(C, O), O; + } + function g(C) { + return !i.length || h(C) || Df(C) || $_(C) ? !0 : _(C); + } + function h(C) { + return !!(l0(e) && p_(e) && hm.nodeCoreModules.has(C) && (s === void 0 && (s = d9(e)), s)); + } + function S(C, D) { + if (!C.includes("node_modules")) + return; + const P = fv.getNodeModulesPackageName( + n.getCompilationSettings(), + e, + C, + D, + t + ); + if (P && !Df(P) && !$_(P)) + return T(P); + } + function T(C) { + const D = vl(xD(C)).slice(1); + return zi(D[0], "@") ? `${D[0]}/${D[1]}` : D[0]; + } + } + function d9(e) { + return ut(e.imports, ({ text: t }) => hm.nodeCoreModules.has(t)); + } + function yN(e) { + return ls(vl(e), "node_modules"); + } + function NU(e) { + return e.file !== void 0 && e.start !== void 0 && e.length !== void 0; + } + function jae(e, t) { + const n = e_(e), i = hT(t, n, lo, fI); + if (i >= 0) { + const s = t[i]; + return E.assertEqual(s.file, e.getSourceFile(), "Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"), Is(s, NU); + } + } + function Bae(e, t) { + var n; + let i = hT(t, e.start, (c) => c.start, uo); + for (i < 0 && (i = ~i); ((n = t[i - 1]) == null ? void 0 : n.start) === e.start; ) + i--; + const s = [], o = wc(e); + for (; ; ) { + const c = Jn(t[i], NU); + if (!c || c.start > o) + break; + fY(e, c) && s.push(c), i++; + } + return s; + } + function Bx({ startPosition: e, endPosition: t }) { + return Mc(e, t === void 0 ? e : t); + } + function IU(e, t) { + const n = Ei(e, t.start); + return sr(n, (s) => s.getStart(e) < t.start || s.getEnd() > wc(t) ? "quit" : ct(s) && l6(t, e_(s, e))); + } + function OU(e, t, n = lo) { + return e ? ss(e) ? n(or(e, t)) : t(e, 0) : void 0; + } + function FU(e) { + return ss(e) ? fa(e) : e; + } + function Jae(e, t) { + if (S2e(e)) { + const n = g9(e); + if (n) return n; + const i = KD( + h9(e), + t, + /*forceCapitalize*/ + !1 + ), s = KD( + h9(e), + t, + /*forceCapitalize*/ + !0 + ); + return i === s ? i : [i, s]; + } + return e.name; + } + function m9(e, t, n) { + return S2e(e) ? g9(e) || KD(h9(e), t, !!n) : e.name; + } + function S2e(e) { + return !(e.flags & 33554432) && (e.escapedName === "export=" || e.escapedName === "default"); + } + function g9(e) { + return xc(e.declarations, (t) => { + var n, i, s; + return ko(t) ? (n = Jn(Bc(t.expression), Re)) == null ? void 0 : n.text : pu(t) && t.symbol.flags === 2097152 ? (i = Jn(t.propertyName, Re)) == null ? void 0 : i.text : (s = Jn(es(t), Re)) == null ? void 0 : s.text; + }); + } + function h9(e) { + var t; + return E.checkDefined( + e.parent, + `Symbol parent was undefined. Flags: ${E.formatSymbolFlags(e.flags)}. Declarations: ${(t = e.declarations) == null ? void 0 : t.map((n) => { + const i = E.formatSyntaxKind(n.kind), s = Qr(n), { expression: o } = n; + return (s ? "[JS]" : "") + i + (o ? ` (expression: ${E.formatSyntaxKind(o.kind)})` : ""); + }).join(", ")}.` + ); + } + function KD(e, t, n) { + return vN(Gu(Op(e.name)), t, n); + } + function vN(e, t, n) { + const i = Wc(Jk(e, "/index")); + let s = "", o = !0; + const c = i.charCodeAt(0); + Cg(c, t) ? (s += String.fromCharCode(c), n && (s = s.toUpperCase())) : o = !1; + for (let _ = 1; _ < i.length; _++) { + const u = i.charCodeAt(_), d = t0(u, t); + if (d) { + let g = String.fromCharCode(u); + o || (g = g.toUpperCase()), s += g; + } + o = d; + } + return WT(s) ? `_${s}` : s || "_"; + } + function zae(e, t, n) { + const i = t.length; + if (i + n > e.length) + return !1; + for (let s = 0; s < i; s++) + if (t.charCodeAt(s) !== e.charCodeAt(s + n)) return !1; + return !0; + } + function LU(e) { + return e.charCodeAt(0) === 95; + } + function T2e(e) { + return !Wae(e); + } + function Wae(e) { + const t = e.getSourceFile(); + return !t.externalModuleIndicator && !t.commonJsModuleIndicator ? !1 : Qr(e) || !sr(e, (n) => Nc(n) && Zd(n)); + } + function y9(e) { + return !!(sj(e) & 65536); + } + function v9(e, t) { + return xc(e.imports, (i) => { + if (hm.nodeCoreModules.has(i.text)) + return zi(i.text, "node:"); + }) ?? t.usesUriStyleNodeCoreModules; + } + function bN(e) { + return e === ` +` ? 1 : 0; + } + function Gb(e) { + return ss(e) ? Og(as(e[0]), e.slice(1)) : as(e); + } + function b9({ options: e }, t) { + const n = !e.semicolons || e.semicolons === "ignore", i = e.semicolons === "remove" || n && !gN(t); + return { + ...e, + semicolons: i ? "remove" : "ignore" + /* Ignore */ + }; + } + function MU(e) { + return e === 2 || e === 3; + } + function p6(e, t) { + return e.isSourceFileFromExternalLibrary(t) || e.isSourceFileDefaultLibrary(t); + } + function S9(e, t) { + const n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(); + for (const _ of t) + if (!cD(_)) { + const u = Ja(_.expression); + if (ob(u)) + switch (u.kind) { + case 15: + case 11: + n.add(u.text); + break; + case 9: + i.add(parseInt(u.text)); + break; + case 10: + const d = fee(nc(u.text, "n") ? u.text.slice(0, -1) : u.text); + d && s.add(Eb(d)); + break; + } + else { + const d = e.getSymbolAtLocation(_.expression); + if (d && d.valueDeclaration && Py(d.valueDeclaration)) { + const g = e.getConstantValue(d.valueDeclaration); + g !== void 0 && o(g); + } + } + } + return { + addValue: o, + hasValue: c + }; + function o(_) { + switch (typeof _) { + case "string": + n.add(_); + break; + case "number": + i.add(_); + } + } + function c(_) { + switch (typeof _) { + case "string": + return n.has(_); + case "number": + return i.has(_); + case "object": + return s.has(Eb(_)); + } + } + } + function RU(e, t, n, i) { + var s; + const o = typeof e == "string" ? e : e.fileName; + if (!Lg(o)) + return !1; + const c = t.getCompilerOptions(), _ = Nu(c), u = typeof e == "string" ? VA(_o(e, n.getCurrentDirectory(), _0(n)), (s = t.getPackageJsonInfoCache) == null ? void 0 : s.call(t), n, c) : e.impliedNodeFormat; + if (u === 99) + return !1; + if (u === 1 || c.verbatimModuleSyntax && _ === 1) + return !0; + if (c.verbatimModuleSyntax && s5(_)) + return !1; + if (typeof e == "object") { + if (e.commonJsModuleIndicator) + return !0; + if (e.externalModuleIndicator) + return !1; + } + return i; + } + function d6(e) { + switch (e.kind) { + case 241: + case 307: + case 268: + case 296: + return !0; + default: + return !1; + } + } + function T9(e, t, n, i) { + var s; + const o = cF(e, (s = n.getPackageJsonInfoCache) == null ? void 0 : s.call(n), i, n.getCompilerOptions()); + let c, _; + return typeof o == "object" && (c = o.impliedNodeFormat, _ = o.packageJsonScope), { + path: _o(e, n.getCurrentDirectory(), n.getCanonicalFileName), + fileName: e, + externalModuleIndicator: t === 99 ? !0 : void 0, + commonJsModuleIndicator: t === 1 ? !0 : void 0, + impliedNodeFormat: c, + packageJsonScope: _, + statements: He, + imports: He + }; + } + var Vae = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.Namespace = 2] = "Namespace", e[e.CommonJS = 3] = "CommonJS", e))(Vae || {}), Uae = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.ExportEquals = 2] = "ExportEquals", e[e.UMD = 3] = "UMD", e))(Uae || {}); + function jU(e) { + let t = 1; + const n = Kf(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(); + let o; + const c = { + isUsableByFile: (T) => T === o, + isEmpty: () => !n.size, + clear: () => { + n.clear(), i.clear(), o = void 0; + }, + add: (T, C, D, P, O, j, F, V) => { + T !== o && (c.clear(), o = T); + let L; + if (O) { + const fe = E5(O.fileName); + if (fe) { + const { topLevelNodeModulesIndex: H, topLevelPackageNameIndex: ae, packageRootIndex: le } = fe; + if (L = PA(xD(O.fileName.substring(ae + 1, le))), zi(T, O.path.substring(0, H))) { + const Ae = s.get(L), ge = O.fileName.substring(0, ae + 1); + if (Ae) { + const de = Ae.indexOf(zg); + H > de && s.set(L, ge); + } else + s.set(L, ge); + } + } + } + const U = j === 1 && C4(C) || C, G = j === 0 || Kk(U) ? Pi(D) : Jae( + U, + /*scriptTarget*/ + void 0 + ), ce = typeof G == "string" ? G : G[0], K = typeof G == "string" ? void 0 : G[1], X = Op(P.name), Z = t++, oe = Jl(C, V), ne = C.flags & 33554432 ? void 0 : C, pe = P.flags & 33554432 ? void 0 : P; + (!ne || !pe) && i.set(Z, [C, P]), n.add(u(ce, C, Sl(X) ? void 0 : X, V), { + id: Z, + symbolTableKey: D, + symbolName: ce, + capitalizedSymbolName: K, + moduleName: X, + moduleFile: O, + moduleFileName: O?.fileName, + packageName: L, + exportKind: j, + targetFlags: oe.flags, + isFromPackageJson: F, + symbol: ne, + moduleSymbol: pe + }); + }, + get: (T, C) => { + if (T !== o) return; + const D = n.get(C); + return D?.map(_); + }, + search: (T, C, D, P) => { + if (T === o) + return Dl(n, (O, j) => { + const { symbolName: F, ambientModuleName: V } = d(j), L = C && O[0].capitalizedSymbolName || F; + if (D(L, O[0].targetFlags)) { + const U = O.map(_).filter((G, ce) => S(G, O[ce].packageName)); + if (U.length) { + const G = P(U, L, !!V, j); + if (G !== void 0) return G; + } + } + }); + }, + releaseSymbols: () => { + i.clear(); + }, + onFileChanged: (T, C, D) => g(T) && g(C) ? !1 : o && o !== C.path || // If ATA is enabled, auto-imports uses existing imports to guess whether you want auto-imports from node. + // Adding or removing imports from node could change the outcome of that guess, so could change the suggestions list. + D && d9(T) !== d9(C) || // Module agumentation and ambient module changes can add or remove exports available to be auto-imported. + // Changes elsewhere in the file can change the *type* of an export in a module augmentation, + // but type info is gathered in getCompletionEntryDetails, which doesn't use the cache. + !md(T.moduleAugmentations, C.moduleAugmentations) || !h(T, C) ? (c.clear(), !0) : (o = C.path, !1) + }; + return E.isDebugging && Object.defineProperty(c, "__cache", { value: n }), c; + function _(T) { + if (T.symbol && T.moduleSymbol) return T; + const { id: C, exportKind: D, targetFlags: P, isFromPackageJson: O, moduleFileName: j } = T, [F, V] = i.get(C) || He; + if (F && V) + return { + symbol: F, + moduleSymbol: V, + moduleFileName: j, + exportKind: D, + targetFlags: P, + isFromPackageJson: O + }; + const L = (O ? e.getPackageJsonAutoImportProvider() : e.getCurrentProgram()).getTypeChecker(), $ = T.moduleSymbol || V || E.checkDefined( + T.moduleFile ? L.getMergedSymbol(T.moduleFile.symbol) : L.tryFindAmbientModule(T.moduleName) + ), U = T.symbol || F || E.checkDefined( + D === 2 ? L.resolveExternalModuleSymbol($) : L.tryGetMemberInModuleExportsAndProperties(Pi(T.symbolTableKey), $), + `Could not find symbol '${T.symbolName}' by key '${T.symbolTableKey}' in module ${$.name}` + ); + return i.set(C, [U, $]), { + symbol: U, + moduleSymbol: $, + moduleFileName: j, + exportKind: D, + targetFlags: P, + isFromPackageJson: O + }; + } + function u(T, C, D, P) { + const O = D || ""; + return `${T.length} ${$s(Jl(C, P))} ${T} ${O}`; + } + function d(T) { + const C = T.indexOf(" "), D = T.indexOf(" ", C + 1), P = parseInt(T.substring(0, C), 10), O = T.substring(D + 1), j = O.substring(0, P), F = O.substring(P + 1); + return { symbolName: j, ambientModuleName: F === "" ? void 0 : F }; + } + function g(T) { + return !T.commonJsModuleIndicator && !T.externalModuleIndicator && !T.moduleAugmentations && !T.ambientModuleNames; + } + function h(T, C) { + if (!md(T.ambientModuleNames, C.ambientModuleNames)) + return !1; + let D = -1, P = -1; + for (const O of C.ambientModuleNames) { + const j = (F) => jj(F) && F.name.text === O; + if (D = rc(T.statements, j, D + 1), P = rc(C.statements, j, P + 1), T.statements[D] !== C.statements[P]) + return !1; + } + return !0; + } + function S(T, C) { + if (!C || !T.moduleFileName) return !0; + const D = e.getGlobalTypingsCacheLocation(); + if (D && zi(T.moduleFileName, D)) return !0; + const P = s.get(C); + return !P || zi(T.moduleFileName, P); + } + } + function BU(e, t, n, i, s, o, c) { + var _; + if (t === n) return !1; + const u = c?.get(t.path, n.path, i, {}); + if (u?.isBlockedByPackageJsonDependencies !== void 0) + return !u.isBlockedByPackageJsonDependencies; + const d = _0(o), g = (_ = o.getGlobalTypingsCacheLocation) == null ? void 0 : _.call(o), h = !!fv.forEachFileNameOfModule( + t.fileName, + n.fileName, + o, + /*preferSymlinks*/ + !1, + (S) => { + const T = e.getSourceFile(S); + return (T === n || !T) && Kje(t.fileName, S, d, g); + } + ); + if (s) { + const S = h && s.allowsImportingSourceFile(n, o); + return c?.setBlockedByPackageJsonDependencies(t.path, n.path, i, {}, !S), S; + } + return h; + } + function Kje(e, t, n, i) { + const s = $p(t, (c) => Wc(c) === "node_modules" ? c : void 0), o = s && Xn(n(s)); + return o === void 0 || zi(n(e), o) || !!i && zi(n(i), o); + } + function JU(e, t, n, i, s) { + var o, c; + const _ = vC(t), u = n.autoImportFileExcludePatterns && Ii(n.autoImportFileExcludePatterns, (g) => { + const h = p5(g, "", "exclude"); + return h ? vy(h, _) : void 0; + }); + x2e(e.getTypeChecker(), e.getSourceFiles(), u, t, (g, h) => s( + g, + h, + e, + /*isFromPackageJson*/ + !1 + )); + const d = i && ((o = t.getPackageJsonAutoImportProvider) == null ? void 0 : o.call(t)); + if (d) { + const g = Io(), h = e.getTypeChecker(); + x2e(d.getTypeChecker(), d.getSourceFiles(), u, t, (S, T) => { + (T && !e.getSourceFile(T.fileName) || !T && !h.resolveName( + S.name, + /*location*/ + void 0, + 1536, + /*excludeGlobals*/ + !1 + )) && s( + S, + T, + d, + /*isFromPackageJson*/ + !0 + ); + }), (c = t.log) == null || c.call(t, `forEachExternalModuleToImportFrom autoImportProvider: ${Io() - g}`); + } + } + function x2e(e, t, n, i, s) { + var o, c; + const _ = (o = i.getSymlinkCache) == null ? void 0 : o.call(i).getSymlinkedDirectoriesByRealpath(), u = n && (({ fileName: d, path: g }) => { + if (n.some((h) => h.test(d))) return !0; + if (_?.size && uv(d)) { + let h = Xn(d); + return $p(Xn(g), (S) => { + const T = _.get(bl(S)); + if (T) + return T.some((C) => n.some((D) => D.test(d.replace(h, C)))); + h = Xn(h); + }) ?? !1; + } + return !1; + }); + for (const d of e.getAmbientModules()) + !d.name.includes("*") && !(n && ((c = d.declarations) != null && c.every((g) => u(g.getSourceFile())))) && s( + d, + /*sourceFile*/ + void 0 + ); + for (const d of t) + A_(d) && !u?.(d) && s(e.getMergedSymbol(d.symbol), d); + } + function SN(e, t, n, i, s) { + var o, c, _, u, d; + const g = Io(); + (o = t.getPackageJsonAutoImportProvider) == null || o.call(t); + const h = ((c = t.getCachedExportInfoMap) == null ? void 0 : c.call(t)) || jU({ + getCurrentProgram: () => n, + getPackageJsonAutoImportProvider: () => { + var T; + return (T = t.getPackageJsonAutoImportProvider) == null ? void 0 : T.call(t); + }, + getGlobalTypingsCacheLocation: () => { + var T; + return (T = t.getGlobalTypingsCacheLocation) == null ? void 0 : T.call(t); + } + }); + if (h.isUsableByFile(e.path)) + return (_ = t.log) == null || _.call(t, "getExportInfoMap: cache hit"), h; + (u = t.log) == null || u.call(t, "getExportInfoMap: cache miss or empty; calculating new results"); + let S = 0; + try { + JU( + n, + t, + i, + /*useAutoImportProvider*/ + !0, + (T, C, D, P) => { + ++S % 100 === 0 && s?.throwIfCancellationRequested(); + const O = /* @__PURE__ */ new Map(), j = D.getTypeChecker(), F = x9(T, j); + F && k2e(F.symbol, j) && h.add( + e.path, + F.symbol, + F.exportKind === 1 ? "default" : "export=", + T, + C, + F.exportKind, + P, + j + ), j.forEachExportAndPropertyOfModule(T, (V, L) => { + V !== F?.symbol && k2e(V, j) && Kp(O, L) && h.add( + e.path, + V, + L, + T, + C, + 0, + P, + j + ); + }); + } + ); + } catch (T) { + throw h.clear(), T; + } + return (d = t.log) == null || d.call(t, `getExportInfoMap: done in ${Io() - g} ms`), h; + } + function x9(e, t) { + const n = t.resolveExternalModuleSymbol(e); + if (n !== e) return { + symbol: n, + exportKind: 2 + /* ExportEquals */ + }; + const i = t.tryGetMemberInModuleExports("default", e); + if (i) return { + symbol: i, + exportKind: 1 + /* Default */ + }; + } + function k2e(e, t) { + return !t.isUndefinedSymbol(e) && !t.isUnknownSymbol(e) && !k3(e) && !iK(e); + } + function zU(e, t, n, i, s) { + let o, c = e; + for (; c; ) { + const _ = g9(c); + if (_) { + const u = s(_); + if (u) return u; + } + if (c.escapedName !== "default" && c.escapedName !== "export=") { + const u = s(c.name); + if (u) return u; + } + o = Tr(o, c), c = c.flags & 2097152 ? t.getImmediateAliasedSymbol(c) : void 0; + } + for (const _ of o ?? He) + if (_.parent && Kk(_.parent)) { + const u = s(KD(_.parent, pa(n), i)); + if (u) return u; + } + } + function C2e() { + const e = Eg( + 99, + /*skipTrivia*/ + !1 + ); + function t(i, s, o) { + return nBe(n(i, s, o), i); + } + function n(i, s, o) { + let c = 0, _ = 0; + const u = [], { prefix: d, pushTemplate: g } = aBe(s); + i = d + i; + const h = d.length; + g && u.push( + 16 + /* TemplateHead */ + ), e.setText(i); + let S = 0; + const T = []; + let C = 0; + do { + c = e.scan(), mC(c) || (D(), _ = c); + const P = e.getTokenEnd(); + if (rBe(e.getTokenStart(), P, h, lBe(c), T), P >= i.length) { + const O = tBe(e, c, Bo(u)); + O !== void 0 && (S = O); + } + } while (c !== 1); + function D() { + switch (c) { + case 44: + case 69: + !eBe[_] && e.reScanSlashToken() === 14 && (c = 14); + break; + case 30: + _ === 80 && C++; + break; + case 32: + C > 0 && C--; + break; + case 133: + case 154: + case 150: + case 136: + case 155: + C > 0 && !o && (c = 80); + break; + case 16: + u.push(c); + break; + case 19: + u.length > 0 && u.push(c); + break; + case 20: + if (u.length > 0) { + const P = Bo(u); + P === 16 ? (c = e.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ), c === 18 ? u.pop() : E.assertEqual(c, 17, "Should have been a template middle.")) : (E.assertEqual(P, 19, "Should have been an open brace"), u.pop()); + } + break; + default: + if (!qu(c)) + break; + (_ === 25 || qu(_) && qu(c) && !sBe(_, c)) && (c = 80); + } + } + return { endOfLineState: S, spans: T }; + } + return { getClassificationsForLine: t, getEncodedLexicalClassifications: n }; + } + var eBe = CX( + [ + 80, + 11, + 9, + 10, + 14, + 110, + 46, + 47, + 22, + 24, + 20, + 112, + 97 + /* FalseKeyword */ + ], + (e) => e, + () => !0 + ); + function tBe(e, t, n) { + switch (t) { + case 11: { + if (!e.isUnterminated()) return; + const i = e.getTokenText(), s = i.length - 1; + let o = 0; + for (; i.charCodeAt(s - o) === 92; ) + o++; + return o & 1 ? i.charCodeAt(0) === 34 ? 3 : 2 : void 0; + } + case 3: + return e.isUnterminated() ? 1 : void 0; + default: + if (uy(t)) { + if (!e.isUnterminated()) + return; + switch (t) { + case 18: + return 5; + case 15: + return 4; + default: + return E.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #" + t); + } + } + return n === 16 ? 6 : void 0; + } + } + function rBe(e, t, n, i, s) { + if (i === 8) + return; + e === 0 && n > 0 && (e += n); + const o = t - e; + o > 0 && s.push(e - n, o, i); + } + function nBe(e, t) { + const n = [], i = e.spans; + let s = 0; + for (let c = 0; c < i.length; c += 3) { + const _ = i[c], u = i[c + 1], d = i[c + 2]; + if (s >= 0) { + const g = _ - s; + g > 0 && n.push({ + length: g, + classification: 4 + /* Whitespace */ + }); + } + n.push({ length: u, classification: iBe(d) }), s = _ + u; + } + const o = t.length - s; + return o > 0 && n.push({ + length: o, + classification: 4 + /* Whitespace */ + }), { entries: n, finalLexState: e.endOfLineState }; + } + function iBe(e) { + switch (e) { + case 1: + return 3; + case 3: + return 1; + case 4: + return 6; + case 25: + return 7; + case 5: + return 2; + case 6: + return 8; + case 8: + return 4; + case 10: + return 0; + case 2: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 9: + case 17: + return 5; + default: + return; + } + } + function sBe(e, t) { + if (!ZV(e)) + return !0; + switch (t) { + case 139: + case 153: + case 137: + case 126: + case 129: + return !0; + default: + return !1; + } + } + function aBe(e) { + switch (e) { + case 3: + return { prefix: `"\\ +` }; + case 2: + return { prefix: `'\\ +` }; + case 1: + return { prefix: `/* +` }; + case 4: + return { prefix: "`\n" }; + case 5: + return { prefix: `} +`, pushTemplate: !0 }; + case 6: + return { prefix: "", pushTemplate: !0 }; + case 0: + return { prefix: "" }; + default: + return E.assertNever(e); + } + } + function oBe(e) { + switch (e) { + case 42: + case 44: + case 45: + case 40: + case 41: + case 48: + case 49: + case 50: + case 30: + case 32: + case 33: + case 34: + case 104: + case 103: + case 130: + case 152: + case 35: + case 36: + case 37: + case 38: + case 51: + case 53: + case 52: + case 56: + case 57: + case 75: + case 74: + case 79: + case 71: + case 72: + case 73: + case 65: + case 66: + case 67: + case 69: + case 70: + case 64: + case 28: + case 61: + case 76: + case 77: + case 78: + return !0; + default: + return !1; + } + } + function cBe(e) { + switch (e) { + case 40: + case 41: + case 55: + case 54: + case 46: + case 47: + return !0; + default: + return !1; + } + } + function lBe(e) { + if (qu(e)) + return 3; + if (oBe(e) || cBe(e)) + return 5; + if (e >= 19 && e <= 79) + return 10; + switch (e) { + case 9: + return 4; + case 10: + return 25; + case 11: + return 6; + case 14: + return 7; + case 7: + case 3: + case 2: + return 1; + case 5: + case 4: + return 8; + case 80: + default: + return uy(e) ? 6 : 2; + } + } + function qae(e, t, n, i, s) { + return P2e(WU(e, t, n, i, s)); + } + function E2e(e, t) { + switch (t) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 219: + e.throwIfCancellationRequested(); + } + } + function WU(e, t, n, i, s) { + const o = []; + return n.forEachChild(function _(u) { + if (!(!u || !II(s, u.pos, u.getFullWidth()))) { + if (E2e(t, u.kind), Re(u) && !ic(u) && i.has(u.escapedText)) { + const d = e.getSymbolAtLocation(u), g = d && D2e(d, hS(u), e); + g && c(u.getStart(n), u.getEnd(), g); + } + u.forEachChild(_); + } + }), { + spans: o, + endOfLineState: 0 + /* None */ + }; + function c(_, u, d) { + const g = u - _; + E.assert(g > 0, `Classification had non-positive length of ${g}`), o.push(_), o.push(g), o.push(d); + } + } + function D2e(e, t, n) { + const i = e.getFlags(); + if (i & 2885600) + return i & 32 ? 11 : i & 384 ? 12 : i & 524288 ? 16 : i & 1536 ? t & 4 || t & 1 && uBe(e) ? 14 : void 0 : i & 2097152 ? D2e(n.getAliasedSymbol(e), t, n) : t & 2 ? i & 64 ? 13 : i & 262144 ? 15 : void 0 : void 0; + } + function uBe(e) { + return ut( + e.declarations, + (t) => Nc(t) && Ch(t) === 1 + /* Instantiated */ + ); + } + function _Be(e) { + switch (e) { + case 1: + return "comment"; + case 2: + return "identifier"; + case 3: + return "keyword"; + case 4: + return "number"; + case 25: + return "bigint"; + case 5: + return "operator"; + case 6: + return "string"; + case 8: + return "whitespace"; + case 9: + return "text"; + case 10: + return "punctuation"; + case 11: + return "class name"; + case 12: + return "enum name"; + case 13: + return "interface name"; + case 14: + return "module name"; + case 15: + return "type parameter name"; + case 16: + return "type alias name"; + case 17: + return "parameter name"; + case 18: + return "doc comment tag name"; + case 19: + return "jsx open tag name"; + case 20: + return "jsx close tag name"; + case 21: + return "jsx self closing tag name"; + case 22: + return "jsx attribute"; + case 23: + return "jsx text"; + case 24: + return "jsx attribute string literal value"; + default: + return; + } + } + function P2e(e) { + E.assert(e.spans.length % 3 === 0); + const t = e.spans, n = []; + for (let i = 0; i < t.length; i += 3) + n.push({ + textSpan: jl(t[i], t[i + 1]), + classificationType: _Be(t[i + 2]) + }); + return n; + } + function Hae(e, t, n) { + return P2e(VU(e, t, n)); + } + function VU(e, t, n) { + const i = n.start, s = n.length, o = Eg( + 99, + /*skipTrivia*/ + !1, + t.languageVariant, + t.text + ), c = Eg( + 99, + /*skipTrivia*/ + !1, + t.languageVariant, + t.text + ), _ = []; + return V(t), { + spans: _, + endOfLineState: 0 + /* None */ + }; + function u(L, $, U) { + _.push(L), _.push($), _.push(U); + } + function d(L) { + for (o.resetTokenState(L.pos); ; ) { + const $ = o.getTokenEnd(); + if (!oY(t.text, $)) + return $; + const U = o.scan(), G = o.getTokenEnd(), ce = G - $; + if (!mC(U)) + return $; + switch (U) { + case 4: + case 5: + continue; + case 2: + case 3: + g(L, U, $, ce), o.resetTokenState(G); + continue; + case 7: + const K = t.text, X = K.charCodeAt($); + if (X === 60 || X === 62) { + u( + $, + ce, + 1 + /* comment */ + ); + continue; + } + E.assert( + X === 124 || X === 61 + /* equals */ + ), D(K, $, G); + break; + case 6: + break; + default: + E.assertNever(U); + } + } + } + function g(L, $, U, G) { + if ($ === 3) { + const ce = _re(t.text, U, G); + if (ce && ce.jsDoc) { + Da(ce.jsDoc, L), S(ce.jsDoc); + return; + } + } else if ($ === 2 && T(U, G)) + return; + h(U, G); + } + function h(L, $) { + u( + L, + $, + 1 + /* comment */ + ); + } + function S(L) { + var $, U, G, ce, K, X, Z, oe; + let ne = L.pos; + if (L.tags) + for (const fe of L.tags) { + fe.pos !== ne && h(ne, fe.pos - ne), u( + fe.pos, + 1, + 10 + /* punctuation */ + ), u( + fe.tagName.pos, + fe.tagName.end - fe.tagName.pos, + 18 + /* docCommentTagName */ + ), ne = fe.tagName.end; + let H = fe.tagName.end; + switch (fe.kind) { + case 341: + const ae = fe; + pe(ae), H = ae.isNameFirst && (($ = ae.typeExpression) == null ? void 0 : $.end) || ae.name.end; + break; + case 348: + const le = fe; + H = le.isNameFirst && ((U = le.typeExpression) == null ? void 0 : U.end) || le.name.end; + break; + case 345: + C(fe), ne = fe.end, H = fe.typeParameters.end; + break; + case 346: + const Ae = fe; + H = ((G = Ae.typeExpression) == null ? void 0 : G.kind) === 309 && ((ce = Ae.fullName) == null ? void 0 : ce.end) || ((K = Ae.typeExpression) == null ? void 0 : K.end) || H; + break; + case 338: + H = fe.typeExpression.end; + break; + case 344: + V(fe.typeExpression), ne = fe.end, H = fe.typeExpression.end; + break; + case 343: + case 340: + H = fe.typeExpression.end; + break; + case 342: + V(fe.typeExpression), ne = fe.end, H = ((X = fe.typeExpression) == null ? void 0 : X.end) || H; + break; + case 347: + H = ((Z = fe.name) == null ? void 0 : Z.end) || H; + break; + case 328: + case 329: + H = fe.class.end; + break; + case 349: + V(fe.typeExpression), ne = fe.end, H = ((oe = fe.typeExpression) == null ? void 0 : oe.end) || H; + break; + } + typeof fe.comment == "object" ? h(fe.comment.pos, fe.comment.end - fe.comment.pos) : typeof fe.comment == "string" && h(H, fe.end - H); + } + ne !== L.end && h(ne, L.end - ne); + return; + function pe(fe) { + fe.isNameFirst && (h(ne, fe.name.pos - ne), u( + fe.name.pos, + fe.name.end - fe.name.pos, + 17 + /* parameterName */ + ), ne = fe.name.end), fe.typeExpression && (h(ne, fe.typeExpression.pos - ne), V(fe.typeExpression), ne = fe.typeExpression.end), fe.isNameFirst || (h(ne, fe.name.pos - ne), u( + fe.name.pos, + fe.name.end - fe.name.pos, + 17 + /* parameterName */ + ), ne = fe.name.end); + } + } + function T(L, $) { + const U = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im, G = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img, ce = t.text.substr(L, $), K = U.exec(ce); + if (!K || !K[3] || !(K[3] in SI)) + return !1; + let X = L; + h(X, K[1].length), X += K[1].length, u( + X, + K[2].length, + 10 + /* punctuation */ + ), X += K[2].length, u( + X, + K[3].length, + 21 + /* jsxSelfClosingTagName */ + ), X += K[3].length; + const Z = K[4]; + let oe = X; + for (; ; ) { + const pe = G.exec(Z); + if (!pe) + break; + const fe = X + pe.index + pe[1].length; + fe > oe && (h(oe, fe - oe), oe = fe), u( + oe, + pe[2].length, + 22 + /* jsxAttribute */ + ), oe += pe[2].length, pe[3].length && (h(oe, pe[3].length), oe += pe[3].length), u( + oe, + pe[4].length, + 5 + /* operator */ + ), oe += pe[4].length, pe[5].length && (h(oe, pe[5].length), oe += pe[5].length), u( + oe, + pe[6].length, + 24 + /* jsxAttributeStringLiteralValue */ + ), oe += pe[6].length; + } + X += K[4].length, X > oe && h(oe, X - oe), K[5] && (u( + X, + K[5].length, + 10 + /* punctuation */ + ), X += K[5].length); + const ne = L + $; + return X < ne && h(X, ne - X), !0; + } + function C(L) { + for (const $ of L.getChildren()) + V($); + } + function D(L, $, U) { + let G; + for (G = $; G < U && !_u(L.charCodeAt(G)); G++) + ; + for (u( + $, + G - $, + 1 + /* comment */ + ), c.resetTokenState(G); c.getTokenEnd() < U; ) + P(); + } + function P() { + const L = c.getTokenEnd(), $ = c.scan(), U = c.getTokenEnd(), G = F($); + G && u(L, U - L, G); + } + function O(L) { + if (Ed(L) || ic(L)) + return !0; + const $ = j(L); + if (!CT(L) && L.kind !== 12 && $ === void 0) + return !1; + const U = L.kind === 12 ? L.pos : d(L), G = L.end - U; + if (E.assert(G >= 0), G > 0) { + const ce = $ || F(L.kind, L); + ce && u(U, G, ce); + } + return !0; + } + function j(L) { + switch (L.parent && L.parent.kind) { + case 286: + if (L.parent.tagName === L) + return 19; + break; + case 287: + if (L.parent.tagName === L) + return 20; + break; + case 285: + if (L.parent.tagName === L) + return 21; + break; + case 291: + if (L.parent.name === L) + return 22; + break; + } + } + function F(L, $) { + if (qu(L)) + return 3; + if ((L === 30 || L === 32) && $ && _ae($.parent)) + return 10; + if (_B(L)) { + if ($) { + const U = $.parent; + if (L === 64 && (U.kind === 260 || U.kind === 172 || U.kind === 169 || U.kind === 291) || U.kind === 226 || U.kind === 224 || U.kind === 225 || U.kind === 227) + return 5; + } + return 10; + } else { + if (L === 9) + return 4; + if (L === 10) + return 25; + if (L === 11) + return $ && $.parent.kind === 291 ? 24 : 6; + if (L === 14) + return 6; + if (uy(L)) + return 6; + if (L === 12) + return 23; + if (L === 80) { + if ($) { + switch ($.parent.kind) { + case 263: + return $.parent.name === $ ? 11 : void 0; + case 168: + return $.parent.name === $ ? 15 : void 0; + case 264: + return $.parent.name === $ ? 13 : void 0; + case 266: + return $.parent.name === $ ? 12 : void 0; + case 267: + return $.parent.name === $ ? 14 : void 0; + case 169: + return $.parent.name === $ ? my($) ? 3 : 17 : void 0; + } + if (yd($.parent)) + return 3; + } + return 2; + } + } + } + function V(L) { + if (L && Tw(i, s, L.pos, L.getFullWidth())) { + E2e(e, L.kind); + for (const $ of L.getChildren(t)) + O($) || V($); + } + } + } + var k9; + ((e) => { + function t(X, Z, oe, ne, pe) { + const fe = h_(oe, ne); + if (fe.parent && (pm(fe.parent) && fe.parent.tagName === fe || Fb(fe.parent))) { + const { openingElement: H, closingElement: ae } = fe.parent.parent, le = [H, ae].map(({ tagName: Ae }) => n(Ae, oe)); + return [{ fileName: oe.fileName, highlightSpans: le }]; + } + return i(ne, fe, X, Z, pe) || s(fe, oe); + } + e.getDocumentHighlights = t; + function n(X, Z) { + return { + fileName: Z.fileName, + textSpan: e_(X, Z), + kind: "none" + /* none */ + }; + } + function i(X, Z, oe, ne, pe) { + const fe = new Set(pe.map((Ae) => Ae.fileName)), H = yo.getReferenceEntriesForNode( + X, + Z, + oe, + pe, + ne, + /*options*/ + void 0, + fe + ); + if (!H) return; + const ae = sw(H.map(yo.toHighlightSpan), (Ae) => Ae.fileName, (Ae) => Ae.span), le = eu(oe.useCaseSensitiveFileNames()); + return ts(P1(ae.entries(), ([Ae, ge]) => { + if (!fe.has(Ae)) { + if (!oe.redirectTargetsMap.has(_o(Ae, oe.getCurrentDirectory(), le))) + return; + const de = oe.getSourceFile(Ae); + Ae = Nn(pe, (De) => !!De.redirectInfo && De.redirectInfo.redirectTarget === de).fileName, E.assert(fe.has(Ae)); + } + return { fileName: Ae, highlightSpans: ge }; + })); + } + function s(X, Z) { + const oe = o(X, Z); + return oe && [{ fileName: Z.fileName, highlightSpans: oe }]; + } + function o(X, Z) { + switch (X.kind) { + case 101: + case 93: + return ev(X.parent) ? G(X.parent, Z) : void 0; + case 107: + return ne(X.parent, Mp, V); + case 111: + return ne(X.parent, MJ, F); + case 113: + case 85: + case 98: + const fe = X.kind === 85 ? X.parent.parent : X.parent; + return ne(fe, sS, j); + case 109: + return ne(X.parent, sD, O); + case 84: + case 90: + return cD(X.parent) || OC(X.parent) ? ne(X.parent.parent.parent, sD, O) : void 0; + case 83: + case 88: + return ne(X.parent, qE, P); + case 99: + case 117: + case 92: + return ne(X.parent, (H) => fy( + H, + /*lookInLabeledStatements*/ + !0 + ), D); + case 137: + return oe(ec, [ + 137 + /* ConstructorKeyword */ + ]); + case 139: + case 153: + return oe(_y, [ + 139, + 153 + /* SetKeyword */ + ]); + case 135: + return ne(X.parent, Cy, L); + case 134: + return pe(L(X)); + case 127: + return pe($(X)); + case 103: + case 147: + return; + default: + return r0(X.kind) && (tu(X.parent) || yc(X.parent)) ? pe(S(X.kind, X.parent)) : void 0; + } + function oe(fe, H) { + return ne(X.parent, fe, (ae) => { + var le; + return Ii((le = Jn(ae, vd)) == null ? void 0 : le.symbol.declarations, (Ae) => fe(Ae) ? Nn(Ae.getChildren(Z), (ge) => ls(H, ge.kind)) : void 0); + }); + } + function ne(fe, H, ae) { + return H(fe) ? pe(ae(fe, Z)) : void 0; + } + function pe(fe) { + return fe && fe.map((H) => n(H, Z)); + } + } + function c(X) { + return MJ(X) ? [X] : sS(X) ? Hi( + X.catchClause ? c(X.catchClause) : X.tryBlock && c(X.tryBlock), + X.finallyBlock && c(X.finallyBlock) + ) : ps(X) ? void 0 : d(X, c); + } + function _(X) { + let Z = X; + for (; Z.parent; ) { + const oe = Z.parent; + if (pb(oe) || oe.kind === 307) + return oe; + if (sS(oe) && oe.tryBlock === Z && oe.catchClause) + return Z; + Z = oe; + } + } + function u(X) { + return qE(X) ? [X] : ps(X) ? void 0 : d(X, u); + } + function d(X, Z) { + const oe = []; + return X.forEachChild((ne) => { + const pe = Z(ne); + pe !== void 0 && oe.push(...vT(pe)); + }), oe; + } + function g(X, Z) { + const oe = h(Z); + return !!oe && oe === X; + } + function h(X) { + return sr(X, (Z) => { + switch (Z.kind) { + case 255: + if (X.kind === 251) + return !1; + case 248: + case 249: + case 250: + case 247: + case 246: + return !X.label || K(Z, X.label.escapedText); + default: + return ps(Z) && "quit"; + } + }); + } + function S(X, Z) { + return Ii(T(Z, qT(X)), (oe) => c6(oe, X)); + } + function T(X, Z) { + const oe = X.parent; + switch (oe.kind) { + case 268: + case 307: + case 241: + case 296: + case 297: + return Z & 64 && rl(X) ? [...X.members, X] : oe.statements; + case 176: + case 174: + case 262: + return [...oe.parameters, ...Qn(oe.parent) ? oe.parent.members : []]; + case 263: + case 231: + case 264: + case 187: + const ne = oe.members; + if (Z & 15) { + const pe = Nn(oe.members, ec); + if (pe) + return [...ne, ...pe.parameters]; + } else if (Z & 64) + return [...ne, oe]; + return ne; + case 210: + return; + default: + E.assertNever(oe, "Invalid container kind."); + } + } + function C(X, Z, ...oe) { + return Z && ls(oe, Z.kind) ? (X.push(Z), !0) : !1; + } + function D(X) { + const Z = []; + if (C( + Z, + X.getFirstToken(), + 99, + 117, + 92 + /* DoKeyword */ + ) && X.kind === 246) { + const oe = X.getChildren(); + for (let ne = oe.length - 1; ne >= 0 && !C( + Z, + oe[ne], + 117 + /* WhileKeyword */ + ); ne--) + ; + } + return rr(u(X.statement), (oe) => { + g(X, oe) && C( + Z, + oe.getFirstToken(), + 83, + 88 + /* ContinueKeyword */ + ); + }), Z; + } + function P(X) { + const Z = h(X); + if (Z) + switch (Z.kind) { + case 248: + case 249: + case 250: + case 246: + case 247: + return D(Z); + case 255: + return O(Z); + } + } + function O(X) { + const Z = []; + return C( + Z, + X.getFirstToken(), + 109 + /* SwitchKeyword */ + ), rr(X.caseBlock.clauses, (oe) => { + C( + Z, + oe.getFirstToken(), + 84, + 90 + /* DefaultKeyword */ + ), rr(u(oe), (ne) => { + g(X, ne) && C( + Z, + ne.getFirstToken(), + 83 + /* BreakKeyword */ + ); + }); + }), Z; + } + function j(X, Z) { + const oe = []; + if (C( + oe, + X.getFirstToken(), + 113 + /* TryKeyword */ + ), X.catchClause && C( + oe, + X.catchClause.getFirstToken(), + 85 + /* CatchKeyword */ + ), X.finallyBlock) { + const ne = Ya(X, 98, Z); + C( + oe, + ne, + 98 + /* FinallyKeyword */ + ); + } + return oe; + } + function F(X, Z) { + const oe = _(X); + if (!oe) + return; + const ne = []; + return rr(c(oe), (pe) => { + ne.push(Ya(pe, 111, Z)); + }), pb(oe) && o0(oe, (pe) => { + ne.push(Ya(pe, 107, Z)); + }), ne; + } + function V(X, Z) { + const oe = yf(X); + if (!oe) + return; + const ne = []; + return o0(Is(oe.body, ms), (pe) => { + ne.push(Ya(pe, 107, Z)); + }), rr(c(oe.body), (pe) => { + ne.push(Ya(pe, 111, Z)); + }), ne; + } + function L(X) { + const Z = yf(X); + if (!Z) + return; + const oe = []; + return Z.modifiers && Z.modifiers.forEach((ne) => { + C( + oe, + ne, + 134 + /* AsyncKeyword */ + ); + }), gs(Z, (ne) => { + U(ne, (pe) => { + Cy(pe) && C( + oe, + pe.getFirstToken(), + 135 + /* AwaitKeyword */ + ); + }); + }), oe; + } + function $(X) { + const Z = yf(X); + if (!Z) + return; + const oe = []; + return gs(Z, (ne) => { + U(ne, (pe) => { + H5(pe) && C( + oe, + pe.getFirstToken(), + 127 + /* YieldKeyword */ + ); + }); + }), oe; + } + function U(X, Z) { + Z(X), !ps(X) && !Qn(X) && !Vl(X) && !Nc(X) && !Rp(X) && !ai(X) && gs(X, (oe) => U(oe, Z)); + } + function G(X, Z) { + const oe = ce(X, Z), ne = []; + for (let pe = 0; pe < oe.length; pe++) { + if (oe[pe].kind === 93 && pe < oe.length - 1) { + const fe = oe[pe], H = oe[pe + 1]; + let ae = !0; + for (let le = H.getStart(Z) - 1; le >= fe.end; le--) + if (!Xd(Z.text.charCodeAt(le))) { + ae = !1; + break; + } + if (ae) { + ne.push({ + fileName: Z.fileName, + textSpan: Mc(fe.getStart(), H.end), + kind: "reference" + /* reference */ + }), pe++; + continue; + } + } + ne.push(n(oe[pe], Z)); + } + return ne; + } + function ce(X, Z) { + const oe = []; + for (; ev(X.parent) && X.parent.elseStatement === X; ) + X = X.parent; + for (; ; ) { + const ne = X.getChildren(Z); + C( + oe, + ne[0], + 101 + /* IfKeyword */ + ); + for (let pe = ne.length - 1; pe >= 0 && !C( + oe, + ne[pe], + 93 + /* ElseKeyword */ + ); pe--) + ; + if (!X.elseStatement || !ev(X.elseStatement)) + break; + X = X.elseStatement; + } + return oe; + } + function K(X, Z) { + return !!sr(X.parent, (oe) => Dy(oe) ? oe.label.escapedText === Z : "quit"); + } + })(k9 || (k9 = {})); + function TN(e) { + return !!e.sourceFile; + } + function Gae(e, t, n) { + return UU(e, t, n); + } + function UU(e, t = "", n, i) { + const s = /* @__PURE__ */ new Map(), o = eu(!!e); + function c() { + const P = ts(s.keys()).filter((O) => O && O.charAt(0) === "_").map((O) => { + const j = s.get(O), F = []; + return j.forEach((V, L) => { + TN(V) ? F.push({ + name: L, + scriptKind: V.sourceFile.scriptKind, + refCount: V.languageServiceRefCount + }) : V.forEach(($, U) => F.push({ name: L, scriptKind: U, refCount: $.languageServiceRefCount })); + }), F.sort((V, L) => L.refCount - V.refCount), { + bucket: O, + sourceFiles: F + }; + }); + return JSON.stringify(P, void 0, 2); + } + function _(P) { + return typeof P.getCompilationSettings == "function" ? P.getCompilationSettings() : P; + } + function u(P, O, j, F, V, L) { + const $ = _o(P, t, o), U = qU(_(O)); + return d(P, $, O, U, j, F, V, L); + } + function d(P, O, j, F, V, L, $, U) { + return T( + P, + O, + j, + F, + V, + L, + /*acquiring*/ + !0, + $, + U + ); + } + function g(P, O, j, F, V, L) { + const $ = _o(P, t, o), U = qU(_(O)); + return h(P, $, O, U, j, F, V, L); + } + function h(P, O, j, F, V, L, $, U) { + return T( + P, + O, + _(j), + F, + V, + L, + /*acquiring*/ + !1, + $, + U + ); + } + function S(P, O) { + const j = TN(P) ? P : P.get(E.checkDefined(O, "If there are more than one scriptKind's for same document the scriptKind should be provided")); + return E.assert(O === void 0 || !j || j.sourceFile.scriptKind === O, `Script kind should match provided ScriptKind:${O} and sourceFile.scriptKind: ${j?.sourceFile.scriptKind}, !entry: ${!j}`), j; + } + function T(P, O, j, F, V, L, $, U, G) { + var ce, K, X, Z; + U = m5(P, U); + const oe = _(j), ne = j === oe ? void 0 : j, pe = U === 6 ? 100 : pa(oe), fe = typeof G == "object" ? G : { + languageVersion: pe, + impliedNodeFormat: ne && VA(O, (Z = (X = (K = (ce = ne.getCompilerHost) == null ? void 0 : ce.call(ne)) == null ? void 0 : K.getModuleResolutionCache) == null ? void 0 : X.call(K)) == null ? void 0 : Z.getPackageJsonInfoCache(), ne, oe), + setExternalModuleIndicator: j3(oe), + jsDocParsingMode: n + }; + fe.languageVersion = pe, E.assertEqual(n, fe.jsDocParsingMode); + const H = s.size, ae = $ae(F, fe.impliedNodeFormat), le = bE(s, ae, () => /* @__PURE__ */ new Map()); + if (rn) { + s.size > H && rn.instant(rn.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: oe.configFilePath, key: ae }); + const ve = !Ol(O) && Dl(s, (De, Xe) => Xe !== ae && De.has(O) && Xe); + ve && rn.instant(rn.Phase.Session, "documentRegistryBucketOverlap", { path: O, key1: ve, key2: ae }); + } + const Ae = le.get(O); + let ge = Ae && S(Ae, U); + if (!ge && i) { + const ve = i.getDocument(ae, O); + ve && ve.scriptKind === U && ve.text === Rx(V) && (E.assert($), ge = { + sourceFile: ve, + languageServiceRefCount: 0 + }, de()); + } + if (ge) + ge.sourceFile.version !== L && (ge.sourceFile = kq(ge.sourceFile, V, L, V.getChangeRange(ge.sourceFile.scriptSnapshot)), i && i.setDocument(ae, O, ge.sourceFile)), $ && ge.languageServiceRefCount++; + else { + const ve = J9( + P, + V, + fe, + L, + /*setNodeParents*/ + !1, + U + ); + i && i.setDocument(ae, O, ve), ge = { + sourceFile: ve, + languageServiceRefCount: 1 + }, de(); + } + return E.assert(ge.languageServiceRefCount !== 0), ge.sourceFile; + function de() { + if (!Ae) + le.set(O, ge); + else if (TN(Ae)) { + const ve = /* @__PURE__ */ new Map(); + ve.set(Ae.sourceFile.scriptKind, Ae), ve.set(U, ge), le.set(O, ve); + } else + Ae.set(U, ge); + } + } + function C(P, O, j, F) { + const V = _o(P, t, o), L = qU(O); + return D(V, L, j, F); + } + function D(P, O, j, F) { + const V = E.checkDefined(s.get($ae(O, F))), L = V.get(P), $ = S(L, j); + $.languageServiceRefCount--, E.assert($.languageServiceRefCount >= 0), $.languageServiceRefCount === 0 && (TN(L) ? V.delete(P) : (L.delete(j), L.size === 1 && V.set(P, tw(L.values(), lo)))); + } + return { + acquireDocument: u, + acquireDocumentWithKey: d, + updateDocument: g, + updateDocumentWithKey: h, + releaseDocument: C, + releaseDocumentWithKey: D, + getKeyForCompilationSettings: qU, + getDocumentRegistryBucketKeyWithMode: $ae, + reportStats: c, + getBuckets: () => s + }; + } + function qU(e) { + return Oz(e, mz); + } + function $ae(e, t) { + return t ? `${e}|${t}` : e; + } + function Xae(e, t, n, i, s, o, c) { + const _ = vC(i), u = eu(_), d = HU(t, n, u, c), g = HU(n, t, u, c); + return Yr.ChangeTracker.with({ host: i, formatContext: s, preferences: o }, (h) => { + pBe(e, h, d, t, n, i.getCurrentDirectory(), _), dBe(e, h, d, g, i, u); + }); + } + function HU(e, t, n, i) { + const s = n(e); + return (c) => { + const _ = i && i.tryGetSourcePosition({ fileName: c, pos: 0 }), u = o(_ ? _.fileName : c); + return _ ? u === void 0 ? void 0 : fBe(_.fileName, u, c, n) : u; + }; + function o(c) { + if (n(c) === s) return t; + const _ = KB(c, s, n); + return _ === void 0 ? void 0 : t + "/" + _; + } + } + function fBe(e, t, n, i) { + const s = LE(e, t, i); + return Qae(Xn(n), s); + } + function pBe(e, t, n, i, s, o, c) { + const { configFile: _ } = e.getCompilerOptions(); + if (!_) return; + const u = Xn(_.fileName), d = s4(_); + if (!d) return; + Yae(d, (T, C) => { + switch (C) { + case "files": + case "include": + case "exclude": { + if (g(T) || C !== "include" || !Wl(T.initializer)) return; + const P = Ii(T.initializer.elements, (j) => Ks(j) ? j.text : void 0); + if (P.length === 0) return; + const O = d5( + u, + /*excludes*/ + [], + P, + c, + o + ); + vy(E.checkDefined(O.includeFilePattern), c).test(i) && !vy(E.checkDefined(O.includeFilePattern), c).test(s) && t.insertNodeAfter(_, ia(T.initializer.elements), N.createStringLiteral(S(s))); + return; + } + case "compilerOptions": + Yae(T.initializer, (D, P) => { + const O = vz(P); + E.assert(O?.type !== "listOrElement"), O && (O.isFilePath || O.type === "list" && O.element.isFilePath) ? g(D) : P === "paths" && Yae(D.initializer, (j) => { + if (Wl(j.initializer)) + for (const F of j.initializer.elements) + h(F); + }); + }); + return; + } + }); + function g(T) { + const C = Wl(T.initializer) ? T.initializer.elements : [T.initializer]; + let D = !1; + for (const P of C) + D = h(P) || D; + return D; + } + function h(T) { + if (!Ks(T)) return !1; + const C = Qae(u, T.text), D = n(C); + return D !== void 0 ? (t.replaceRangeWithText(_, A2e(T, _), S(D)), !0) : !1; + } + function S(T) { + return hd( + u, + T, + /*ignoreCase*/ + !c + ); + } + } + function dBe(e, t, n, i, s, o) { + const c = e.getSourceFiles(); + for (const _ of c) { + const u = n(_.fileName), d = u ?? _.fileName, g = Xn(d), h = i(_.fileName), S = h || _.fileName, T = Xn(S), C = u !== void 0 || h !== void 0; + hBe(_, t, (D) => { + if (!Df(D)) return; + const P = Qae(T, D), O = n(P); + return O === void 0 ? void 0 : j2(hd(g, O, o)); + }, (D) => { + const P = e.getTypeChecker().getSymbolAtLocation(D); + if (P?.declarations && P.declarations.some((j) => wu(j))) return; + const O = h !== void 0 ? w2e(D, Ax(D.text, S, e.getCompilerOptions(), s), n, c) : gBe(P, D, _, e, s, n); + return O !== void 0 && (O.updated || C && Df(D.text)) ? fv.updateModuleSpecifier(e.getCompilerOptions(), _, d, O.newFileName, jx(e, s), D.text) : void 0; + }); + } + } + function mBe(e, t) { + return Cs(Mn(e, t)); + } + function Qae(e, t) { + return j2(mBe(e, t)); + } + function gBe(e, t, n, i, s, o) { + if (e) { + const c = Nn(e.declarations, yi).fileName, _ = o(c); + return _ === void 0 ? { newFileName: c, updated: !1 } : { newFileName: _, updated: !0 }; + } else { + const c = i.getModeForUsageLocation(n, t), _ = s.resolveModuleNameLiterals || !s.resolveModuleNames ? i.getResolvedModuleFromModuleSpecifier(t, n) : s.getResolvedModuleWithFailedLookupLocationsFromCache && s.getResolvedModuleWithFailedLookupLocationsFromCache(t.text, n.fileName, c); + return w2e(t, _, o, i.getSourceFiles()); + } + } + function w2e(e, t, n, i) { + if (!t) return; + if (t.resolvedModule) { + const u = _(t.resolvedModule.resolvedFileName); + if (u) return u; + } + const s = rr(t.failedLookupLocations, o) || Df(e.text) && rr(t.failedLookupLocations, c); + if (s) return s; + return t.resolvedModule && { newFileName: t.resolvedModule.resolvedFileName, updated: !1 }; + function o(u) { + const d = n(u); + return d && Nn(i, (g) => g.fileName === d) ? c(u) : void 0; + } + function c(u) { + return nc(u, "/package.json") ? void 0 : _(u); + } + function _(u) { + const d = n(u); + return d && { newFileName: d, updated: !0 }; + } + } + function hBe(e, t, n, i) { + for (const s of e.referencedFiles || He) { + const o = n(s.fileName); + o !== void 0 && o !== e.text.slice(s.pos, s.end) && t.replaceRangeWithText(e, s, o); + } + for (const s of e.imports) { + const o = i(s); + o !== void 0 && o !== s.text && t.replaceRangeWithText(e, A2e(s, e), o); + } + } + function A2e(e, t) { + return np(e.getStart(t) + 1, e.end - 1); + } + function Yae(e, t) { + if (Gs(e)) + for (const n of e.properties) + qc(n) && Ks(n.name) && t(n, n.name.text); + } + var GU = /* @__PURE__ */ ((e) => (e[e.exact = 0] = "exact", e[e.prefix = 1] = "prefix", e[e.substring = 2] = "substring", e[e.camelCase = 3] = "camelCase", e))(GU || {}); + function eP(e, t) { + return { + kind: e, + isCaseSensitive: t + }; + } + function Zae(e) { + const t = /* @__PURE__ */ new Map(), n = e.trim().split(".").map((i) => SBe(i.trim())); + if (n.length === 1 && n[0].totalTextChunk.text === "") + return { + getMatchForLastSegmentOfPattern: () => eP( + 2, + /*isCaseSensitive*/ + !0 + ), + getFullMatch: () => eP( + 2, + /*isCaseSensitive*/ + !0 + ), + patternContainsDots: !1 + }; + if (!n.some((i) => !i.subWordTextChunks.length)) + return { + getFullMatch: (i, s) => yBe(i, s, n, t), + getMatchForLastSegmentOfPattern: (i) => Kae(i, ia(n), t), + patternContainsDots: n.length > 1 + }; + } + function yBe(e, t, n, i) { + if (!Kae(t, ia(n), i) || n.length - 1 > e.length) + return; + let o; + for (let c = n.length - 2, _ = e.length - 1; c >= 0; c -= 1, _ -= 1) + o = O2e(o, Kae(e[_], n[c], i)); + return o; + } + function N2e(e, t) { + let n = t.get(e); + return n || t.set(e, n = soe(e)), n; + } + function I2e(e, t, n) { + const i = TBe(e, t.textLowerCase); + if (i === 0) + return eP( + t.text.length === e.length ? 0 : 1, + /*isCaseSensitive:*/ + zi(e, t.text) + ); + if (t.isLowerCase) { + if (i === -1) return; + const s = N2e(e, n); + for (const o of s) + if (eoe( + e, + o, + t.text, + /*ignoreCase*/ + !0 + )) + return eP( + 2, + /*isCaseSensitive:*/ + eoe( + e, + o, + t.text, + /*ignoreCase*/ + !1 + ) + ); + if (t.text.length < e.length && m6(e.charCodeAt(i))) + return eP( + 2, + /*isCaseSensitive*/ + !1 + ); + } else { + if (e.indexOf(t.text) > 0) + return eP( + 2, + /*isCaseSensitive*/ + !0 + ); + if (t.characterSpans.length > 0) { + const s = N2e(e, n), o = F2e( + e, + s, + t, + /*ignoreCase*/ + !1 + ) ? !0 : F2e( + e, + s, + t, + /*ignoreCase*/ + !0 + ) ? !1 : void 0; + if (o !== void 0) + return eP(3, o); + } + } + } + function Kae(e, t, n) { + if ($U( + t.totalTextChunk.text, + (o) => o !== 32 && o !== 42 + /* asterisk */ + )) { + const o = I2e(e, t.totalTextChunk, n); + if (o) return o; + } + const i = t.subWordTextChunks; + let s; + for (const o of i) + s = O2e(s, I2e(e, o, n)); + return s; + } + function O2e(e, t) { + return dR([e, t], vBe); + } + function vBe(e, t) { + return e === void 0 ? 1 : t === void 0 ? -1 : uo(e.kind, t.kind) || I1(!e.isCaseSensitive, !t.isCaseSensitive); + } + function eoe(e, t, n, i, s = { start: 0, length: n.length }) { + return s.length <= t.length && j2e(0, s.length, (o) => bBe(n.charCodeAt(s.start + o), e.charCodeAt(t.start + o), i)); + } + function bBe(e, t, n) { + return n ? toe(e) === toe(t) : e === t; + } + function F2e(e, t, n, i) { + const s = n.characterSpans; + let o = 0, c = 0; + for (; ; ) { + if (c === s.length) + return !0; + if (o === t.length) + return !1; + let _ = t[o], u = !1; + for (; c < s.length; c++) { + const d = s[c]; + if (u && (!m6(n.text.charCodeAt(s[c - 1].start)) || !m6(n.text.charCodeAt(s[c].start))) || !eoe(e, _, n.text, i, d)) + break; + u = !0, _ = jl(_.start + d.length, _.length - d.length); + } + o++; + } + } + function SBe(e) { + return { + totalTextChunk: noe(e), + subWordTextChunks: kBe(e) + }; + } + function m6(e) { + if (e >= 65 && e <= 90) + return !0; + if (e < 127 || !PI( + e, + 99 + /* Latest */ + )) + return !1; + const t = String.fromCharCode(e); + return t === t.toUpperCase(); + } + function L2e(e) { + if (e >= 97 && e <= 122) + return !0; + if (e < 127 || !PI( + e, + 99 + /* Latest */ + )) + return !1; + const t = String.fromCharCode(e); + return t === t.toLowerCase(); + } + function TBe(e, t) { + const n = e.length - t.length; + for (let i = 0; i <= n; i++) + if ($U(t, (s, o) => toe(e.charCodeAt(o + i)) === s)) + return i; + return -1; + } + function toe(e) { + return e >= 65 && e <= 90 ? 97 + (e - 65) : e < 127 ? e : String.fromCharCode(e).toLowerCase().charCodeAt(0); + } + function roe(e) { + return e >= 48 && e <= 57; + } + function xBe(e) { + return m6(e) || L2e(e) || roe(e) || e === 95 || e === 36; + } + function kBe(e) { + const t = []; + let n = 0, i = 0; + for (let s = 0; s < e.length; s++) { + const o = e.charCodeAt(s); + xBe(o) ? (i === 0 && (n = s), i++) : i > 0 && (t.push(noe(e.substr(n, i))), i = 0); + } + return i > 0 && t.push(noe(e.substr(n, i))), t; + } + function noe(e) { + const t = e.toLowerCase(); + return { + text: e, + textLowerCase: t, + isLowerCase: e === t, + characterSpans: ioe(e) + }; + } + function ioe(e) { + return M2e( + e, + /*word*/ + !1 + ); + } + function soe(e) { + return M2e( + e, + /*word*/ + !0 + ); + } + function M2e(e, t) { + const n = []; + let i = 0; + for (let s = 1; s < e.length; s++) { + const o = roe(e.charCodeAt(s - 1)), c = roe(e.charCodeAt(s)), _ = EBe(e, t, s), u = t && CBe(e, s, i); + (aoe(e.charCodeAt(s - 1)) || aoe(e.charCodeAt(s)) || o !== c || _ || u) && (R2e(e, i, s) || n.push(jl(i, s - i)), i = s); + } + return R2e(e, i, e.length) || n.push(jl(i, e.length - i)), n; + } + function aoe(e) { + switch (e) { + case 33: + case 34: + case 35: + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 44: + case 45: + case 46: + case 47: + case 58: + case 59: + case 63: + case 64: + case 91: + case 92: + case 93: + case 95: + case 123: + case 125: + return !0; + } + return !1; + } + function R2e(e, t, n) { + return $U(e, (i) => aoe(i) && i !== 95, t, n); + } + function CBe(e, t, n) { + return t !== n && t + 1 < e.length && m6(e.charCodeAt(t)) && L2e(e.charCodeAt(t + 1)) && $U(e, m6, n, t); + } + function EBe(e, t, n) { + const i = m6(e.charCodeAt(n - 1)); + return m6(e.charCodeAt(n)) && (!t || !i); + } + function j2e(e, t, n) { + for (let i = e; i < t; i++) + if (!n(i)) + return !1; + return !0; + } + function $U(e, t, n = 0, i = e.length) { + return j2e(n, i, (s) => t(e.charCodeAt(s), s)); + } + function B2e(e, t = !0, n = !1) { + const i = { + languageVersion: 1, + // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia + pragmas: void 0, + checkJsDirective: void 0, + referencedFiles: [], + typeReferenceDirectives: [], + libReferenceDirectives: [], + amdDependencies: [], + hasNoDefaultLib: void 0, + moduleName: void 0 + }, s = []; + let o, c, _, u = 0, d = !1; + function g() { + return c = _, _ = Ou.scan(), _ === 19 ? u++ : _ === 20 && u--, _; + } + function h() { + const L = Ou.getTokenValue(), $ = Ou.getTokenStart(); + return { fileName: L, pos: $, end: $ + L.length }; + } + function S() { + o || (o = []), o.push({ ref: h(), depth: u }); + } + function T() { + s.push(h()), C(); + } + function C() { + u === 0 && (d = !0); + } + function D() { + let L = Ou.getToken(); + return L === 138 ? (L = g(), L === 144 && (L = g(), L === 11 && S()), !0) : !1; + } + function P() { + if (c === 25) + return !1; + let L = Ou.getToken(); + if (L === 102) { + if (L = g(), L === 21) { + if (L = g(), L === 11 || L === 15) + return T(), !0; + } else { + if (L === 11) + return T(), !0; + if (L === 156 && Ou.lookAhead(() => { + const U = Ou.scan(); + return U !== 161 && (U === 42 || U === 19 || U === 80 || qu(U)); + }) && (L = g()), L === 80 || qu(L)) + if (L = g(), L === 161) { + if (L = g(), L === 11) + return T(), !0; + } else if (L === 64) { + if (j( + /*skipCurrentToken*/ + !0 + )) + return !0; + } else if (L === 28) + L = g(); + else + return !0; + if (L === 19) { + for (L = g(); L !== 20 && L !== 1; ) + L = g(); + L === 20 && (L = g(), L === 161 && (L = g(), L === 11 && T())); + } else L === 42 && (L = g(), L === 130 && (L = g(), (L === 80 || qu(L)) && (L = g(), L === 161 && (L = g(), L === 11 && T())))); + } + return !0; + } + return !1; + } + function O() { + let L = Ou.getToken(); + if (L === 95) { + if (C(), L = g(), L === 156 && Ou.lookAhead(() => { + const U = Ou.scan(); + return U === 42 || U === 19; + }) && (L = g()), L === 19) { + for (L = g(); L !== 20 && L !== 1; ) + L = g(); + L === 20 && (L = g(), L === 161 && (L = g(), L === 11 && T())); + } else if (L === 42) + L = g(), L === 161 && (L = g(), L === 11 && T()); + else if (L === 102 && (L = g(), L === 156 && Ou.lookAhead(() => { + const U = Ou.scan(); + return U === 80 || qu(U); + }) && (L = g()), (L === 80 || qu(L)) && (L = g(), L === 64 && j( + /*skipCurrentToken*/ + !0 + )))) + return !0; + return !0; + } + return !1; + } + function j(L, $ = !1) { + let U = L ? g() : Ou.getToken(); + return U === 149 ? (U = g(), U === 21 && (U = g(), (U === 11 || $ && U === 15) && T()), !0) : !1; + } + function F() { + let L = Ou.getToken(); + if (L === 80 && Ou.getTokenValue() === "define") { + if (L = g(), L !== 21) + return !0; + if (L = g(), L === 11 || L === 15) + if (L = g(), L === 28) + L = g(); + else + return !0; + if (L !== 23) + return !0; + for (L = g(); L !== 24 && L !== 1; ) + (L === 11 || L === 15) && T(), L = g(); + return !0; + } + return !1; + } + function V() { + for (Ou.setText(e), g(); Ou.getToken() !== 1; ) { + if (Ou.getToken() === 16) { + const L = [Ou.getToken()]; + e: + for (; Dr(L); ) { + const $ = Ou.scan(); + switch ($) { + case 1: + break e; + case 102: + P(); + break; + case 16: + L.push($); + break; + case 19: + Dr(L) && L.push($); + break; + case 20: + Dr(L) && (Bo(L) === 16 ? Ou.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ) === 18 && L.pop() : L.pop()); + break; + } + } + g(); + } + D() || P() || O() || n && (j( + /*skipCurrentToken*/ + !1, + /*allowTemplateLiterals*/ + !0 + ) || F()) || g(); + } + Ou.setText(void 0); + } + if (t && V(), uz(i, e), _z(i, ka), d) { + if (o) + for (const L of o) + s.push(L.ref); + return { referencedFiles: i.referencedFiles, typeReferenceDirectives: i.typeReferenceDirectives, libReferenceDirectives: i.libReferenceDirectives, importedFiles: s, isLibFile: !!i.hasNoDefaultLib, ambientExternalModules: void 0 }; + } else { + let L; + if (o) + for (const $ of o) + $.depth === 0 ? (L || (L = []), L.push($.ref.fileName)) : s.push($.ref); + return { referencedFiles: i.referencedFiles, typeReferenceDirectives: i.typeReferenceDirectives, libReferenceDirectives: i.libReferenceDirectives, importedFiles: s, isLibFile: !!i.hasNoDefaultLib, ambientExternalModules: L }; + } + } + var DBe = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; + function ooe(e) { + const t = eu(e.useCaseSensitiveFileNames()), n = e.getCurrentDirectory(), i = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(); + return { + tryGetSourcePosition: _, + tryGetGeneratedPosition: u, + toLineColumnOffset: S, + clearCache: T, + documentPositionMappers: s + }; + function o(C) { + return _o(C, n, t); + } + function c(C, D) { + const P = o(C), O = s.get(P); + if (O) return O; + let j; + if (e.getDocumentPositionMapper) + j = e.getDocumentPositionMapper(C, D); + else if (e.readFile) { + const F = h(C); + j = F && XU( + { getSourceFileLike: h, getCanonicalFileName: t, log: (V) => e.log(V) }, + C, + tW(F.text, Tg(F)), + (V) => !e.fileExists || e.fileExists(V) ? e.readFile(V) : void 0 + ); + } + return s.set(P, j || nW), j || nW; + } + function _(C) { + if (!Ol(C.fileName) || !d(C.fileName)) return; + const P = c(C.fileName).getSourcePosition(C); + return !P || P === C ? void 0 : _(P) || P; + } + function u(C) { + if (Ol(C.fileName)) return; + const D = d(C.fileName); + if (!D) return; + const P = e.getProgram(); + if (P.isSourceOfProjectReferenceRedirect(D.fileName)) + return; + const j = P.getCompilerOptions().outFile, F = j ? Gu(j) + ".d.ts" : R7(C.fileName, P.getCompilerOptions(), n, P.getCommonSourceDirectory(), t); + if (F === void 0) return; + const V = c(F, C.fileName).getGeneratedPosition(C); + return V === C ? void 0 : V; + } + function d(C) { + const D = e.getProgram(); + if (!D) return; + const P = o(C), O = D.getSourceFileByPath(P); + return O && O.resolvedPath === P ? O : void 0; + } + function g(C) { + const D = o(C), P = i.get(D); + if (P !== void 0) return P || void 0; + if (!e.readFile || e.fileExists && !e.fileExists(C)) { + i.set(D, !1); + return; + } + const O = e.readFile(C), j = O ? PBe(O) : !1; + return i.set(D, j), j || void 0; + } + function h(C) { + return e.getSourceFileLike ? e.getSourceFileLike(C) : d(C) || g(C); + } + function S(C, D) { + return h(C).getLineAndCharacterOfPosition(D); + } + function T() { + i.clear(), s.clear(); + } + } + function XU(e, t, n, i) { + let s = xne(n); + if (s) { + const _ = DBe.exec(s); + if (_) { + if (_[1]) { + const u = _[1]; + return J2e(e, IK(_l, u), t); + } + s = void 0; + } + } + const o = []; + s && o.push(s), o.push(t + ".map"); + const c = s && Xi(s, Xn(t)); + for (const _ of o) { + const u = Xi(_, Xn(t)), d = i(u, c); + if (Gi(d)) + return J2e(e, d, u); + if (d !== void 0) + return d || void 0; + } + } + function J2e(e, t, n) { + const i = Cne(t); + if (!(!i || !i.sources || !i.file || !i.mappings) && !(i.sourcesContent && i.sourcesContent.some(Gi))) + return Dne(e, i, n); + } + function PBe(e, t) { + return { + text: e, + lineMap: t, + getLineAndCharacterOfPosition(n) { + return Vk(Tg(this), n); + } + }; + } + var coe = /* @__PURE__ */ new Map(); + function QU(e, t, n) { + var i; + t.getSemanticDiagnostics(e, n); + const s = [], o = t.getTypeChecker(); + !(e.impliedNodeFormat === 1 || Lc(e.fileName, [ + ".cts", + ".cjs" + /* Cjs */ + ])) && e.commonJsModuleIndicator && (gae(t) || aU(t.getCompilerOptions())) && wBe(e) && s.push(Xr(OBe(e.commonJsModuleIndicator), p.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module)); + const _ = p_(e); + if (coe.clear(), u(e), ZT(t.getCompilerOptions())) + for (const d of e.imports) { + const g = _4(d), h = ABe(g); + if (!h) continue; + const S = (i = t.getResolvedModuleFromModuleSpecifier(d, e)) == null ? void 0 : i.resolvedModule, T = S && t.getSourceFile(S.resolvedFileName); + T && T.externalModuleIndicator && T.externalModuleIndicator !== !0 && ko(T.externalModuleIndicator) && T.externalModuleIndicator.isExportEquals && s.push(Xr(h, p.Import_may_be_converted_to_a_default_import)); + } + return Bn(s, e.bindSuggestionDiagnostics), Bn(s, t.getSuggestionDiagnostics(e, n)), s.sort((d, g) => d.start - g.start); + function u(d) { + if (_) + LBe(d, o) && s.push(Xr(ti(d.parent) ? d.parent.name : d, p.This_constructor_function_may_be_converted_to_a_class_declaration)); + else { + if (yc(d) && d.parent === e && d.declarationList.flags & 2 && d.declarationList.declarations.length === 1) { + const h = d.declarationList.declarations[0].initializer; + h && d_( + h, + /*requireStringLiteralLikeArgument*/ + !0 + ) && s.push(Xr(h, p.require_call_may_be_converted_to_an_import)); + } + const g = vu.getJSDocTypedefNodes(d); + for (const h of g) + s.push(Xr(h, p.JSDoc_typedef_may_be_converted_to_TypeScript_type)); + vu.parameterShouldGetTypeFromJSDoc(d) && s.push(Xr(d.name || d, p.JSDoc_types_may_be_moved_to_TypeScript_types)); + } + KU(d) && NBe(d, o, s), d.forEachChild(u); + } + } + function wBe(e) { + return e.statements.some((t) => { + switch (t.kind) { + case 243: + return t.declarationList.declarations.some((n) => !!n.initializer && d_( + z2e(n.initializer), + /*requireStringLiteralLikeArgument*/ + !0 + )); + case 244: { + const { expression: n } = t; + if (!cn(n)) return d_( + n, + /*requireStringLiteralLikeArgument*/ + !0 + ); + const i = mc(n); + return i === 1 || i === 2; + } + default: + return !1; + } + }); + } + function z2e(e) { + return Dn(e) ? z2e(e.expression) : e; + } + function ABe(e) { + switch (e.kind) { + case 272: + const { importClause: t, moduleSpecifier: n } = e; + return t && !t.name && t.namedBindings && t.namedBindings.kind === 274 && Ks(n) ? t.namedBindings.name : void 0; + case 271: + return e.name; + default: + return; + } + } + function NBe(e, t, n) { + IBe(e, t) && !coe.has(q2e(e)) && n.push(Xr( + !e.name && ti(e.parent) && Re(e.parent.name) ? e.parent.name : e, + p.This_may_be_converted_to_an_async_function + )); + } + function IBe(e, t) { + return !g4(e) && e.body && ms(e.body) && FBe(e.body, t) && YU(e, t); + } + function YU(e, t) { + const n = t.getSignatureFromDeclaration(e), i = n ? t.getReturnTypeOfSignature(n) : void 0; + return !!i && !!t.getPromisedTypeOfPromise(i); + } + function OBe(e) { + return cn(e) ? e.left : e; + } + function FBe(e, t) { + return !!o0(e, (n) => C9(n, t)); + } + function C9(e, t) { + return Mp(e) && !!e.expression && ZU(e.expression, t); + } + function ZU(e, t) { + if (!W2e(e) || !V2e(e) || !e.arguments.every((i) => U2e(i, t))) + return !1; + let n = e.expression.expression; + for (; W2e(n) || Dn(n); ) + if (Es(n)) { + if (!V2e(n) || !n.arguments.every((i) => U2e(i, t))) + return !1; + n = n.expression.expression; + } else + n = n.expression; + return !0; + } + function W2e(e) { + return Es(e) && (KA(e, "then") || KA(e, "catch") || KA(e, "finally")); + } + function V2e(e) { + const t = e.expression.name.text, n = t === "then" ? 2 : t === "catch" || t === "finally" ? 1 : 0; + return e.arguments.length > n ? !1 : e.arguments.length < n ? !0 : n === 1 || ut(e.arguments, (i) => i.kind === 106 || Re(i) && i.text === "undefined"); + } + function U2e(e, t) { + switch (e.kind) { + case 262: + case 218: + if (jc(e) & 1) + return !1; + case 219: + coe.set(q2e(e), !0); + case 106: + return !0; + case 80: + case 211: { + const i = t.getSymbolAtLocation(e); + return i ? t.isUndefinedSymbol(i) || ut(Jl(i, t).declarations, (s) => ps(s) || i0(s) && !!s.initializer && ps(s.initializer)) : !1; + } + default: + return !1; + } + } + function q2e(e) { + return `${e.pos.toString()}:${e.end.toString()}`; + } + function LBe(e, t) { + var n, i, s, o; + if (po(e)) { + if (ti(e.parent) && ((n = e.symbol.members) != null && n.size)) + return !0; + const c = t.getSymbolOfExpando( + e, + /*allowDeclaration*/ + !1 + ); + return !!(c && ((i = c.exports) != null && i.size || (s = c.members) != null && s.size)); + } + return Ac(e) ? !!((o = e.symbol.members) != null && o.size) : !1; + } + function KU(e) { + switch (e.kind) { + case 262: + case 174: + case 218: + case 219: + return !0; + default: + return !1; + } + } + var MBe = /* @__PURE__ */ new Set([ + "isolatedModules" + ]); + function loe(e, t) { + return G2e( + e, + t, + /*declaration*/ + !1 + ); + } + function H2e(e, t) { + return G2e( + e, + t, + /*declaration*/ + !0 + ); + } + var RBe = `/// +interface Boolean {} +interface Function {} +interface CallableFunction {} +interface NewableFunction {} +interface IArguments {} +interface Number {} +interface Object {} +interface RegExp {} +interface String {} +interface Array { length: number; [n: number]: T; } +interface SymbolConstructor { + (desc?: string | number): symbol; + for(name: string): symbol; + readonly toStringTag: symbol; +} +declare var Symbol: SymbolConstructor; +interface Symbol { + readonly [Symbol.toStringTag]: string; +}`, E9 = "lib.d.ts", uoe; + function G2e(e, t, n) { + uoe ?? (uoe = Cx(E9, RBe, { + languageVersion: 99 + /* Latest */ + })); + const i = [], s = t.compilerOptions ? eq(t.compilerOptions, i) : {}, o = B9(); + for (const D in o) + io(o, D) && s[D] === void 0 && (s[D] = o[D]); + for (const D of bre) + s.verbatimModuleSyntax && MBe.has(D.name) || (s[D.name] = D.transpileOptionValue); + s.suppressOutputPathCheck = !0, s.allowNonTsExtensions = !0, n ? (s.declaration = !0, s.emitDeclarationOnly = !0, s.isolatedDeclarations = !0) : s.declaration = !1; + const c = d0(s), _ = { + getSourceFile: (D) => D === Cs(u) ? d : D === Cs(E9) ? uoe : void 0, + writeFile: (D, P) => { + Go(D, ".map") ? (E.assertEqual(h, void 0, "Unexpected multiple source map outputs, file:", D), h = P) : (E.assertEqual(g, void 0, "Unexpected multiple outputs, file:", D), g = P); + }, + getDefaultLibFileName: () => E9, + useCaseSensitiveFileNames: () => !1, + getCanonicalFileName: (D) => D, + getCurrentDirectory: () => "", + getNewLine: () => c, + fileExists: (D) => D === u || !!n && D === E9, + readFile: () => "", + directoryExists: () => !0, + getDirectories: () => [] + }, u = t.fileName || (t.compilerOptions && t.compilerOptions.jsx ? "module.tsx" : "module.ts"), d = Cx( + u, + e, + { + languageVersion: pa(s), + impliedNodeFormat: VA( + _o(u, "", _.getCanonicalFileName), + /*packageJsonInfoCache*/ + void 0, + _, + s + ), + setExternalModuleIndicator: j3(s), + jsDocParsingMode: t.jsDocParsingMode ?? 0 + /* ParseAll */ + } + ); + t.moduleName && (d.moduleName = t.moduleName), t.renamedDependencies && (d.renamedDependencies = new Map(Object.entries(t.renamedDependencies))); + let g, h; + const T = UA(n ? [u, E9] : [u], s, _); + t.reportDiagnostics && (Bn( + /*to*/ + i, + /*from*/ + T.getSyntacticDiagnostics(d) + ), Bn( + /*to*/ + i, + /*from*/ + T.getOptionsDiagnostics() + )); + const C = T.emit( + /*targetSourceFile*/ + void 0, + /*writeFile*/ + void 0, + /*cancellationToken*/ + void 0, + /*emitOnlyDtsFiles*/ + n, + t.transformers, + /*forceDtsEmit*/ + n + ); + return Bn( + /*to*/ + i, + /*from*/ + C.diagnostics + ), g === void 0 ? E.fail("Output generation failed") : { outputText: g, diagnostics: i, sourceMapText: h }; + } + function $2e(e, t, n, i, s) { + const o = loe(e, { compilerOptions: t, fileName: n, reportDiagnostics: !!i, moduleName: s }); + return Bn(i, o.diagnostics), o.outputText; + } + var _oe; + function eq(e, t) { + _oe = _oe || Ln(Dd, (n) => typeof n.type == "object" && !Dl(n.type, (i) => typeof i != "number")), e = KV(e); + for (const n of _oe) { + if (!io(e, n.name)) + continue; + const i = e[n.name]; + Gi(i) ? e[n.name] = hO(n, i, t) : Dl(n.type, (s) => s === i) || t.push(kre(n)); + } + return e; + } + var foe = {}; + Qa(foe, { + getNavigateToItems: () => X2e + }); + function X2e(e, t, n, i, s, o, c) { + const _ = Zae(i); + if (!_) return He; + const u = [], d = e.length === 1 ? e[0] : void 0; + for (const g of e) + n.throwIfCancellationRequested(), !(o && g.isDeclarationFile) && (Q2e(g, !!c, d) || g.getNamedDeclarations().forEach((h, S) => { + jBe(_, S, h, t, g.fileName, !!c, d, u); + })); + return u.sort(WBe), (s === void 0 ? u : u.slice(0, s)).map(VBe); + } + function Q2e(e, t, n) { + return e !== n && t && (yN(e.path) || e.hasNoDefaultLib); + } + function jBe(e, t, n, i, s, o, c, _) { + const u = e.getMatchForLastSegmentOfPattern(t); + if (u) { + for (const d of n) + if (BBe(d, i, o, c)) + if (e.patternContainsDots) { + const g = e.getFullMatch(zBe(d), t); + g && _.push({ name: t, fileName: s, matchKind: g.kind, isCaseSensitive: g.isCaseSensitive, declaration: d }); + } else + _.push({ name: t, fileName: s, matchKind: u.kind, isCaseSensitive: u.isCaseSensitive, declaration: d }); + } + } + function BBe(e, t, n, i) { + var s; + switch (e.kind) { + case 273: + case 276: + case 271: + const o = t.getSymbolAtLocation(e.name), c = t.getAliasedSymbol(o); + return o.escapedName !== c.escapedName && !((s = c.declarations) != null && s.every((_) => Q2e(_.getSourceFile(), n, i))); + default: + return !0; + } + } + function JBe(e, t) { + const n = es(e); + return !!n && (Y2e(n, t) || n.kind === 167 && poe(n.expression, t)); + } + function poe(e, t) { + return Y2e(e, t) || Dn(e) && (t.push(e.name.text), !0) && poe(e.expression, t); + } + function Y2e(e, t) { + return rm(e) && (t.push(Ip(e)), !0); + } + function zBe(e) { + const t = [], n = es(e); + if (n && n.kind === 167 && !poe(n.expression, t)) + return He; + t.shift(); + let i = yS(e); + for (; i; ) { + if (!JBe(i, t)) + return He; + i = yS(i); + } + return t.reverse(); + } + function WBe(e, t) { + return uo(e.matchKind, t.matchKind) || cw(e.name, t.name); + } + function VBe(e) { + const t = e.declaration, n = yS(t), i = n && es(n); + return { + name: e.name, + kind: Ub(t), + kindModifiers: UD(t), + matchKind: GU[e.matchKind], + isCaseSensitive: e.isCaseSensitive, + fileName: e.fileName, + textSpan: e_(t), + // TODO(jfreeman): What should be the containerName when the container has a computed name? + containerName: i ? i.text : "", + containerKind: i ? Ub(n) : "" + /* unknown */ + }; + } + var doe = {}; + Qa(doe, { + getNavigationBarItems: () => K2e, + getNavigationTree: () => eSe + }); + var UBe = /\s+/g, moe = 150, tq, xN, D9 = [], C0, Z2e = [], g6, goe = []; + function K2e(e, t) { + tq = t, xN = e; + try { + return or(XBe(nSe(e)), QBe); + } finally { + tSe(); + } + } + function eSe(e, t) { + tq = t, xN = e; + try { + return fSe(nSe(e)); + } finally { + tSe(); + } + } + function tSe() { + xN = void 0, tq = void 0, D9 = [], C0 = void 0, goe = []; + } + function P9(e) { + return tP(e.getText(xN)); + } + function rq(e) { + return e.node.kind; + } + function rSe(e, t) { + e.children ? e.children.push(t) : e.children = [t]; + } + function nSe(e) { + E.assert(!D9.length); + const t = { node: e, name: void 0, additionalNodes: void 0, parent: void 0, children: void 0, indent: 0 }; + C0 = t; + for (const n of e.statements) + Jx(n); + return mv(), E.assert(!C0 && !D9.length), t; + } + function $b(e, t) { + rSe(C0, hoe(e, t)); + } + function hoe(e, t) { + return { + node: e, + name: t || (tu(e) || ct(e) ? es(e) : void 0), + additionalNodes: void 0, + parent: C0, + children: void 0, + indent: C0.indent + 1 + }; + } + function iSe(e) { + g6 || (g6 = /* @__PURE__ */ new Map()), g6.set(e, !0); + } + function sSe(e) { + for (let t = 0; t < e; t++) mv(); + } + function aSe(e, t) { + const n = []; + for (; !rm(t); ) { + const i = u3(t), s = _h(t); + t = t.expression, !(s === "prototype" || wi(i)) && n.push(i); + } + n.push(t); + for (let i = n.length - 1; i > 0; i--) { + const s = n[i]; + Xb(e, s); + } + return [n.length - 1, n[0]]; + } + function Xb(e, t) { + const n = hoe(e, t); + rSe(C0, n), D9.push(C0), Z2e.push(g6), g6 = void 0, C0 = n; + } + function mv() { + C0.children && (nq(C0.children, C0), boe(C0.children)), C0 = D9.pop(), g6 = Z2e.pop(); + } + function gv(e, t, n) { + Xb(e, n), Jx(t), mv(); + } + function oSe(e) { + e.initializer && ZBe(e.initializer) ? (Xb(e), gs(e.initializer, Jx), mv()) : gv(e, e.initializer); + } + function yoe(e) { + const t = es(e); + if (t === void 0) return !1; + if (oa(t)) { + const n = t.expression; + return fo(n) || m_(n) || Pf(n); + } + return !!t; + } + function Jx(e) { + if (tq.throwIfCancellationRequested(), !(!e || CT(e))) + switch (e.kind) { + case 176: + const t = e; + gv(t, t.body); + for (const c of t.parameters) + Q_(c, t) && $b(c); + break; + case 174: + case 177: + case 178: + case 173: + yoe(e) && gv(e, e.body); + break; + case 172: + yoe(e) && oSe(e); + break; + case 171: + yoe(e) && $b(e); + break; + case 273: + const n = e; + n.name && $b(n.name); + const { namedBindings: i } = n; + if (i) + if (i.kind === 274) + $b(i); + else + for (const c of i.elements) + $b(c); + break; + case 304: + gv(e, e.name); + break; + case 305: + const { expression: s } = e; + Re(s) ? $b(e, s) : $b(e); + break; + case 208: + case 303: + case 260: { + const c = e; + Ts(c.name) ? Jx(c.name) : oSe(c); + break; + } + case 262: + const o = e.name; + o && Re(o) && iSe(o.text), gv(e, e.body); + break; + case 219: + case 218: + gv(e, e.body); + break; + case 266: + Xb(e); + for (const c of e.members) + YBe(c) || $b(c); + mv(); + break; + case 263: + case 231: + case 264: + Xb(e); + for (const c of e.members) + Jx(c); + mv(); + break; + case 267: + gv(e, dSe(e).body); + break; + case 277: { + const c = e.expression, _ = Gs(c) || Es(c) ? c : xo(c) || po(c) ? c.body : void 0; + _ ? (Xb(e), Jx(_), mv()) : $b(e); + break; + } + case 281: + case 271: + case 181: + case 179: + case 180: + case 265: + $b(e); + break; + case 213: + case 226: { + const c = mc(e); + switch (c) { + case 1: + case 2: + gv(e, e.right); + return; + case 6: + case 3: { + const _ = e, u = _.left, d = c === 3 ? u.expression : u; + let g = 0, h; + Re(d.expression) ? (iSe(d.expression.text), h = d.expression) : [g, h] = aSe(_, d.expression), c === 6 ? Gs(_.right) && _.right.properties.length > 0 && (Xb(_, h), gs(_.right, Jx), mv()) : po(_.right) || xo(_.right) ? gv(e, _.right, h) : (Xb(_, h), gv(e, _.right, u.name), mv()), sSe(g); + return; + } + case 7: + case 9: { + const _ = e, u = c === 7 ? _.arguments[0] : _.arguments[0].expression, d = _.arguments[1], [g, h] = aSe(e, u); + Xb(e, h), Xb(e, ot(N.createIdentifier(d.text), d)), Jx(e.arguments[2]), mv(), mv(), sSe(g); + return; + } + case 5: { + const _ = e, u = _.left, d = u.expression; + if (Re(d) && _h(u) !== "prototype" && g6 && g6.has(d.text)) { + po(_.right) || xo(_.right) ? gv(e, _.right, d) : gb(u) && (Xb(_, d), gv(_.left, _.right, u3(u)), mv()); + return; + } + break; + } + case 4: + case 0: + case 8: + break; + default: + E.assertNever(c); + } + } + default: + gf(e) && rr(e.jsDoc, (c) => { + rr(c.tags, (_) => { + Np(_) && $b(_); + }); + }), gs(e, Jx); + } + } + function nq(e, t) { + const n = /* @__PURE__ */ new Map(); + eR(e, (i, s) => { + const o = i.name || es(i.node), c = o && P9(o); + if (!c) + return !0; + const _ = n.get(c); + if (!_) + return n.set(c, i), !0; + if (_ instanceof Array) { + for (const u of _) + if (cSe(u, i, s, t)) + return !1; + return _.push(i), !0; + } else { + const u = _; + return cSe(u, i, s, t) ? !1 : (n.set(c, [u, i]), !0); + } + }); + } + var kN = { + 5: !0, + 3: !0, + 7: !0, + 9: !0, + 0: !1, + 1: !1, + 2: !1, + 8: !1, + 6: !0, + 4: !1 + }; + function qBe(e, t, n, i) { + function s(_) { + return po(_) || Ac(_) || ti(_); + } + const o = cn(t.node) || Es(t.node) ? mc(t.node) : 0, c = cn(e.node) || Es(e.node) ? mc(e.node) : 0; + if (kN[o] && kN[c] || s(e.node) && kN[o] || s(t.node) && kN[c] || rl(e.node) && voe(e.node) && kN[o] || rl(t.node) && kN[c] || rl(e.node) && voe(e.node) && s(t.node) || rl(t.node) && s(e.node) && voe(e.node)) { + let _ = e.additionalNodes && Bo(e.additionalNodes) || e.node; + if (!rl(e.node) && !rl(t.node) || s(e.node) || s(t.node)) { + const d = s(e.node) ? e.node : s(t.node) ? t.node : void 0; + if (d !== void 0) { + const g = ot( + N.createConstructorDeclaration( + /*modifiers*/ + void 0, + [], + /*body*/ + void 0 + ), + d + ), h = hoe(g); + h.indent = e.indent + 1, h.children = e.node === d ? e.children : t.children, e.children = e.node === d ? Hi([h], t.children || [t]) : Hi(e.children || [{ ...e }], [h]); + } else + (e.children || t.children) && (e.children = Hi(e.children || [{ ...e }], t.children || [t]), e.children && (nq(e.children, e), boe(e.children))); + _ = e.node = ot( + N.createClassDeclaration( + /*modifiers*/ + void 0, + e.name || N.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + e.node + ); + } else + e.children = Hi(e.children, t.children), e.children && nq(e.children, e); + const u = t.node; + return i.children[n - 1].node.end === _.end ? ot(_, { pos: _.pos, end: u.end }) : (e.additionalNodes || (e.additionalNodes = []), e.additionalNodes.push(ot( + N.createClassDeclaration( + /*modifiers*/ + void 0, + e.name || N.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + t.node + ))), !0; + } + return o !== 0; + } + function cSe(e, t, n, i) { + return qBe(e, t, n, i) ? !0 : HBe(e.node, t.node, i) ? (GBe(e, t), !0) : !1; + } + function HBe(e, t, n) { + if (e.kind !== t.kind || e.parent !== t.parent && !(lSe(e, n) && lSe(t, n))) + return !1; + switch (e.kind) { + case 172: + case 174: + case 177: + case 178: + return Os(e) === Os(t); + case 267: + return uSe(e, t) && xoe(e) === xoe(t); + default: + return !0; + } + } + function voe(e) { + return !!(e.flags & 16); + } + function lSe(e, t) { + const n = _m(e.parent) ? e.parent.parent : e.parent; + return n === t.node || ls(t.additionalNodes, n); + } + function uSe(e, t) { + return !e.body || !t.body ? e.body === t.body : e.body.kind === t.body.kind && (e.body.kind !== 267 || uSe(e.body, t.body)); + } + function GBe(e, t) { + e.additionalNodes = e.additionalNodes || [], e.additionalNodes.push(t.node), t.additionalNodes && e.additionalNodes.push(...t.additionalNodes), e.children = Hi(e.children, t.children), e.children && (nq(e.children, e), boe(e.children)); + } + function boe(e) { + e.sort($Be); + } + function $Be(e, t) { + return cw(_Se(e.node), _Se(t.node)) || uo(rq(e), rq(t)); + } + function _Se(e) { + if (e.kind === 267) + return pSe(e); + const t = es(e); + if (t && Rc(t)) { + const n = Y2(t); + return n && Pi(n); + } + switch (e.kind) { + case 218: + case 219: + case 231: + return gSe(e); + default: + return; + } + } + function Soe(e, t) { + if (e.kind === 267) + return tP(pSe(e)); + if (t) { + const n = Re(t) ? t.text : ho(t) ? `[${P9(t.argumentExpression)}]` : P9(t); + if (n.length > 0) + return tP(n); + } + switch (e.kind) { + case 307: + const n = e; + return il(n) ? `"${$m(Wc(Gu(Cs(n.fileName))))}"` : ""; + case 277: + return ko(e) && e.isExportEquals ? "export=" : "default"; + case 219: + case 262: + case 218: + case 263: + case 231: + return f0(e) & 2048 ? "default" : gSe(e); + case 176: + return "constructor"; + case 180: + return "new()"; + case 179: + return "()"; + case 181: + return "[]"; + default: + return ""; + } + } + function XBe(e) { + const t = []; + function n(s) { + if (i(s) && (t.push(s), s.children)) + for (const o of s.children) + n(o); + } + return n(e), t; + function i(s) { + if (s.children) + return !0; + switch (rq(s)) { + case 263: + case 231: + case 266: + case 264: + case 267: + case 307: + case 265: + case 346: + case 338: + return !0; + case 219: + case 262: + case 218: + return o(s); + default: + return !1; + } + function o(c) { + if (!c.node.body) + return !1; + switch (rq(c.parent)) { + case 268: + case 307: + case 174: + case 176: + return !0; + default: + return !1; + } + } + } + } + function fSe(e) { + return { + text: Soe(e.node, e.name), + kind: Ub(e.node), + kindModifiers: mSe(e.node), + spans: Toe(e), + nameSpan: e.name && koe(e.name), + childItems: or(e.children, fSe) + }; + } + function QBe(e) { + return { + text: Soe(e.node, e.name), + kind: Ub(e.node), + kindModifiers: mSe(e.node), + spans: Toe(e), + childItems: or(e.children, t) || goe, + indent: e.indent, + bolded: !1, + grayed: !1 + }; + function t(n) { + return { + text: Soe(n.node, n.name), + kind: Ub(n.node), + kindModifiers: UD(n.node), + spans: Toe(n), + childItems: goe, + indent: 0, + bolded: !1, + grayed: !1 + }; + } + } + function Toe(e) { + const t = [koe(e.node)]; + if (e.additionalNodes) + for (const n of e.additionalNodes) + t.push(koe(n)); + return t; + } + function pSe(e) { + return wu(e) ? sc(e.name) : xoe(e); + } + function xoe(e) { + const t = [Ip(e.name)]; + for (; e.body && e.body.kind === 267; ) + e = e.body, t.push(Ip(e.name)); + return t.join("."); + } + function dSe(e) { + return e.body && Nc(e.body) ? dSe(e.body) : e; + } + function YBe(e) { + return !e.name || e.name.kind === 167; + } + function koe(e) { + return e.kind === 307 ? Fy(e) : e_(e, xN); + } + function mSe(e) { + return e.parent && e.parent.kind === 260 && (e = e.parent), UD(e); + } + function gSe(e) { + const { parent: t } = e; + if (e.name && Jw(e.name) > 0) + return tP(ao(e.name)); + if (ti(t)) + return tP(ao(t.name)); + if (cn(t) && t.operatorToken.kind === 64) + return P9(t.left).replace(UBe, ""); + if (qc(t)) + return P9(t.name); + if (f0(e) & 2048) + return "default"; + if (Qn(e)) + return ""; + if (Es(t)) { + let n = hSe(t.expression); + if (n !== void 0) { + if (n = tP(n), n.length > moe) + return `${n} callback`; + const i = tP(Ii(t.arguments, (s) => Ga(s) || wT(s) ? s.getText(xN) : void 0).join(", ")); + return `${n}(${i}) callback`; + } + } + return ""; + } + function hSe(e) { + if (Re(e)) + return e.text; + if (Dn(e)) { + const t = hSe(e.expression), n = e.name.text; + return t === void 0 ? n : `${t}.${n}`; + } else + return; + } + function ZBe(e) { + switch (e.kind) { + case 219: + case 218: + case 231: + return !0; + default: + return !1; + } + } + function tP(e) { + return e = e.length > moe ? e.substring(0, moe) + "..." : e, e.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g, ""); + } + var zx = {}; + Qa(zx, { + addExportToChanges: () => JSe, + addExportsInOldFile: () => Loe, + addImportsForMovedSymbols: () => Roe, + addNewFileToTsconfig: () => Foe, + addOrRemoveBracesToArrowFunction: () => BJe, + addTargetFileImports: () => Hoe, + containsJsx: () => zoe, + convertArrowFunctionOrFunctionExpression: () => UJe, + convertParamsToDestructuredObject: () => tze, + convertStringOrTemplateLiteral: () => vze, + convertToOptionalChainExpression: () => wze, + createNewFileName: () => Joe, + deleteMovedStatements: () => PSe, + deleteUnusedImports: () => LSe, + deleteUnusedOldImports: () => wSe, + doChangeNamedToNamespaceOrDefault: () => xSe, + extractSymbol: () => TTe, + filterImport: () => jSe, + forEachImportInStatement: () => Moe, + generateGetAccessorAndSetAccessor: () => fWe, + getApplicableRefactors: () => KBe, + getEditsForRefactor: () => eJe, + getExistingLocals: () => Uoe, + getIdentifierForNode: () => qoe, + getNewStatementsAndRemoveFromOldFile: () => Ooe, + getStatementsToMove: () => CN, + getTopLevelDeclarationStatement: () => Boe, + getUsageInfo: () => w9, + inferFunctionReturnType: () => pWe, + isRefactorErrorInfo: () => Eh, + isTopLevelDeclaration: () => fq, + moduleSpecifierFromImport: () => ISe, + nameOfTopLevelDeclaration: () => BSe, + refactorKindBeginsWith: () => hv, + registerRefactor: () => Wg, + updateImportsInOtherFiles: () => ASe + }); + var Coe = /* @__PURE__ */ new Map(); + function Wg(e, t) { + Coe.set(e, t); + } + function KBe(e, t) { + return ts(tR(Coe.values(), (n) => { + var i; + return e.cancellationToken && e.cancellationToken.isCancellationRequested() || !((i = n.kinds) != null && i.some((s) => hv(s, e.kind))) ? void 0 : n.getAvailableActions(e, t); + })); + } + function eJe(e, t, n, i) { + const s = Coe.get(t); + return s && s.getEditsForAction(e, n, i); + } + var Eoe = "Convert export", iq = { + name: "Convert default export to named export", + description: as(p.Convert_default_export_to_named_export), + kind: "refactor.rewrite.export.named" + }, sq = { + name: "Convert named export to default export", + description: as(p.Convert_named_export_to_default_export), + kind: "refactor.rewrite.export.default" + }; + Wg(Eoe, { + kinds: [ + iq.kind, + sq.kind + ], + getAvailableActions: function(t) { + const n = ySe(t, t.triggerReason === "invoked"); + if (!n) return He; + if (!Eh(n)) { + const i = n.wasDefault ? iq : sq; + return [{ name: Eoe, description: i.description, actions: [i] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [ + { + name: Eoe, + description: as(p.Convert_default_export_to_named_export), + actions: [ + { ...iq, notApplicableReason: n.error }, + { ...sq, notApplicableReason: n.error } + ] + } + ] : He; + }, + getEditsForAction: function(t, n) { + E.assert(n === iq.name || n === sq.name, "Unexpected action name"); + const i = ySe(t); + return E.assert(i && !Eh(i), "Expected applicable refactor info"), { edits: Yr.ChangeTracker.with(t, (o) => tJe(t.file, t.program, i, o, t.cancellationToken)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function ySe(e, t = !0) { + const { file: n, program: i } = e, s = Bx(e), o = Ei(n, s.start), c = o.parent && f0(o.parent) & 32 && t ? o.parent : _N(o, n, s); + if (!c || !yi(c.parent) && !(_m(c.parent) && wu(c.parent.parent))) + return { error: as(p.Could_not_find_export_statement) }; + const _ = i.getTypeChecker(), u = aJe(c.parent, _), d = f0(c) || (ko(c) && !c.isExportEquals ? 2080 : 0), g = !!(d & 2048); + if (!(d & 32) || !g && u.exports.has( + "default" + /* Default */ + )) + return { error: as(p.This_file_already_has_a_default_export) }; + const h = (S) => Re(S) && _.getSymbolAtLocation(S) ? void 0 : { error: as(p.Can_only_convert_named_export) }; + switch (c.kind) { + case 262: + case 263: + case 264: + case 266: + case 265: + case 267: { + const S = c; + return S.name ? h(S.name) || { exportNode: S, exportName: S.name, wasDefault: g, exportingModuleSymbol: u } : void 0; + } + case 243: { + const S = c; + if (!(S.declarationList.flags & 2) || S.declarationList.declarations.length !== 1) + return; + const T = fa(S.declarationList.declarations); + return T.initializer ? (E.assert(!g, "Can't have a default flag here"), h(T.name) || { exportNode: S, exportName: T.name, wasDefault: g, exportingModuleSymbol: u }) : void 0; + } + case 277: { + const S = c; + return S.isExportEquals ? void 0 : h(S.expression) || { exportNode: S, exportName: S.expression, wasDefault: g, exportingModuleSymbol: u }; + } + default: + return; + } + } + function tJe(e, t, n, i, s) { + rJe(e, n, i, t.getTypeChecker()), nJe(t, n, i, s); + } + function rJe(e, { wasDefault: t, exportNode: n, exportName: i }, s, o) { + if (t) + if (ko(n) && !n.isExportEquals) { + const c = n.expression, _ = vSe(c.text, c.text); + s.replaceNode(e, n, N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([_]) + )); + } else + s.delete(e, E.checkDefined(c6( + n, + 90 + /* DefaultKeyword */ + ), "Should find a default keyword in modifier list")); + else { + const c = E.checkDefined(c6( + n, + 95 + /* ExportKeyword */ + ), "Should find an export keyword in modifier list"); + switch (n.kind) { + case 262: + case 263: + case 264: + s.insertNodeAfter(e, c, N.createToken( + 90 + /* DefaultKeyword */ + )); + break; + case 243: + const _ = fa(n.declarationList.declarations); + if (!yo.Core.isSymbolReferencedInFile(i, o, e) && !_.type) { + s.replaceNode(e, n, N.createExportDefault(E.checkDefined(_.initializer, "Initializer was previously known to be present"))); + break; + } + case 266: + case 265: + case 267: + s.deleteModifier(e, c), s.insertNodeAfter(e, n, N.createExportDefault(N.createIdentifier(i.text))); + break; + default: + E.fail(`Unexpected exportNode kind ${n.kind}`); + } + } + } + function nJe(e, { wasDefault: t, exportName: n, exportingModuleSymbol: i }, s, o) { + const c = e.getTypeChecker(), _ = E.checkDefined(c.getSymbolAtLocation(n), "Export name should resolve to a symbol"); + yo.Core.eachExportReference(e.getSourceFiles(), c, o, _, i, n.text, t, (u) => { + if (n === u) return; + const d = u.getSourceFile(); + t ? iJe(d, u, s, n.text) : sJe(d, u, s); + }); + } + function iJe(e, t, n, i) { + const { parent: s } = t; + switch (s.kind) { + case 211: + n.replaceNode(e, t, N.createIdentifier(i)); + break; + case 276: + case 281: { + const c = s; + n.replaceNode(e, c, Doe(i, c.name.text)); + break; + } + case 273: { + const c = s; + E.assert(c.name === t, "Import clause name should match provided ref"); + const _ = Doe(i, t.text), { namedBindings: u } = c; + if (!u) + n.replaceNode(e, t, N.createNamedImports([_])); + else if (u.kind === 274) { + n.deleteRange(e, { pos: t.getStart(e), end: u.getStart(e) }); + const d = Ks(c.parent.moduleSpecifier) ? cU(c.parent.moduleSpecifier, e) : 1, g = Ly( + /*defaultImport*/ + void 0, + [Doe(i, t.text)], + c.parent.moduleSpecifier, + d + ); + n.insertNodeAfter(e, c.parent, g); + } else + n.delete(e, t), n.insertNodeAtEndOfList(e, u.elements, _); + break; + } + case 205: + const o = s; + n.replaceNode(e, s, N.createImportTypeNode(o.argument, o.attributes, N.createIdentifier(i), o.typeArguments, o.isTypeOf)); + break; + default: + E.failBadSyntaxKind(s); + } + } + function sJe(e, t, n) { + const i = t.parent; + switch (i.kind) { + case 211: + n.replaceNode(e, t, N.createIdentifier("default")); + break; + case 276: { + const s = N.createIdentifier(i.name.text); + i.parent.elements.length === 1 ? n.replaceNode(e, i.parent, s) : (n.delete(e, i), n.insertNodeBefore(e, i.parent, s)); + break; + } + case 281: { + n.replaceNode(e, i, vSe("default", i.name.text)); + break; + } + default: + E.assertNever(i, `Unexpected parent kind ${i.kind}`); + } + } + function Doe(e, t) { + return N.createImportSpecifier( + /*isTypeOnly*/ + !1, + e === t ? void 0 : N.createIdentifier(e), + N.createIdentifier(t) + ); + } + function vSe(e, t) { + return N.createExportSpecifier( + /*isTypeOnly*/ + !1, + e === t ? void 0 : N.createIdentifier(e), + N.createIdentifier(t) + ); + } + function aJe(e, t) { + if (yi(e)) + return e.symbol; + const n = e.parent.symbol; + return n.valueDeclaration && _b(n.valueDeclaration) ? t.getMergedSymbol(n) : n; + } + var Poe = "Convert import", aq = { + 0: { + name: "Convert namespace import to named imports", + description: as(p.Convert_namespace_import_to_named_imports), + kind: "refactor.rewrite.import.named" + }, + 2: { + name: "Convert named imports to namespace import", + description: as(p.Convert_named_imports_to_namespace_import), + kind: "refactor.rewrite.import.namespace" + }, + 1: { + name: "Convert named imports to default import", + description: as(p.Convert_named_imports_to_default_import), + kind: "refactor.rewrite.import.default" + } + }; + Wg(Poe, { + kinds: yT(aq).map((e) => e.kind), + getAvailableActions: function(t) { + const n = bSe(t, t.triggerReason === "invoked"); + if (!n) return He; + if (!Eh(n)) { + const i = aq[n.convertTo]; + return [{ name: Poe, description: i.description, actions: [i] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? yT(aq).map((i) => ({ + name: Poe, + description: i.description, + actions: [{ ...i, notApplicableReason: n.error }] + })) : He; + }, + getEditsForAction: function(t, n) { + E.assert(ut(yT(aq), (o) => o.name === n), "Unexpected action name"); + const i = bSe(t); + return E.assert(i && !Eh(i), "Expected applicable refactor info"), { edits: Yr.ChangeTracker.with(t, (o) => oJe(t.file, t.program, o, i)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function bSe(e, t = !0) { + const { file: n } = e, i = Bx(e), s = Ei(n, i.start), o = t ? sr(s, Ef(oc, Jg)) : _N(s, n, i); + if (o === void 0 || !(oc(o) || Jg(o))) return { error: "Selection is not an import declaration." }; + const c = i.start + i.length, _ = qb(o, o.parent, n); + if (_ && c > _.getStart()) return; + const { importClause: u } = o; + return u ? u.namedBindings ? u.namedBindings.kind === 274 ? { convertTo: 0, import: u.namedBindings } : SSe(e.program, u) ? { convertTo: 1, import: u.namedBindings } : { convertTo: 2, import: u.namedBindings } : { error: as(p.Could_not_find_namespace_import_or_named_imports) } : { error: as(p.Could_not_find_import_clause) }; + } + function SSe(e, t) { + return ZT(e.getCompilerOptions()) && uJe(t.parent.moduleSpecifier, e.getTypeChecker()); + } + function oJe(e, t, n, i) { + const s = t.getTypeChecker(); + i.convertTo === 0 ? cJe(e, s, n, i.import, ZT(t.getCompilerOptions())) : xSe( + e, + t, + n, + i.import, + i.convertTo === 1 + /* Default */ + ); + } + function cJe(e, t, n, i, s) { + let o = !1; + const c = [], _ = /* @__PURE__ */ new Map(); + yo.Core.eachSymbolReferenceInFile(i.name, t, e, (h) => { + if (!Lw(h.parent)) + o = !0; + else { + const S = TSe(h.parent).text; + t.resolveName( + S, + h, + -1, + /*excludeGlobals*/ + !0 + ) && _.set(S, !0), E.assert(lJe(h.parent) === h, "Parent expression should match id"), c.push(h.parent); + } + }); + const u = /* @__PURE__ */ new Map(); + for (const h of c) { + const S = TSe(h).text; + let T = u.get(S); + T === void 0 && u.set(S, T = _.has(S) ? bS(S, e) : S), n.replaceNode(e, h, N.createIdentifier(T)); + } + const d = []; + u.forEach((h, S) => { + d.push(N.createImportSpecifier( + /*isTypeOnly*/ + !1, + h === S ? void 0 : N.createIdentifier(S), + N.createIdentifier(h) + )); + }); + const g = i.parent.parent; + if (o && !s && oc(g)) + n.insertNodeAfter(e, g, kSe( + g, + /*defaultImportName*/ + void 0, + d + )); + else { + const h = o ? N.createIdentifier(i.name.text) : void 0; + n.replaceNode(e, i.parent, CSe(h, d)); + } + } + function TSe(e) { + return Dn(e) ? e.name : e.right; + } + function lJe(e) { + return Dn(e) ? e.expression : e.left; + } + function xSe(e, t, n, i, s = SSe(t, i.parent)) { + const o = t.getTypeChecker(), c = i.parent.parent, { moduleSpecifier: _ } = c, u = /* @__PURE__ */ new Set(); + i.elements.forEach((C) => { + const D = o.getSymbolAtLocation(C.name); + D && u.add(D); + }); + const d = _ && Ks(_) ? vN( + _.text, + 99 + /* ESNext */ + ) : "module"; + function g(C) { + return !!yo.Core.eachSymbolReferenceInFile(C.name, o, e, (D) => { + const P = o.resolveName( + d, + D, + -1, + /*excludeGlobals*/ + !0 + ); + return P ? u.has(P) ? pu(D.parent) : !0 : !1; + }); + } + const S = i.elements.some(g) ? bS(d, e) : d, T = /* @__PURE__ */ new Set(); + for (const C of i.elements) { + const D = (C.propertyName || C.name).text; + yo.Core.eachSymbolReferenceInFile(C.name, o, e, (P) => { + const O = N.createPropertyAccessExpression(N.createIdentifier(S), D); + du(P.parent) ? n.replaceNode(e, P.parent, N.createPropertyAssignment(P.text, O)) : pu(P.parent) ? T.add(C) : n.replaceNode(e, P, O); + }); + } + if (n.replaceNode( + e, + i, + s ? N.createIdentifier(S) : N.createNamespaceImport(N.createIdentifier(S)) + ), T.size && oc(c)) { + const C = ts(T.values(), (D) => N.createImportSpecifier(D.isTypeOnly, D.propertyName && N.createIdentifier(D.propertyName.text), N.createIdentifier(D.name.text))); + n.insertNodeAfter(e, i.parent.parent, kSe( + c, + /*defaultImportName*/ + void 0, + C + )); + } + } + function uJe(e, t) { + const n = t.resolveExternalModuleName(e); + if (!n) return !1; + const i = t.resolveExternalModuleSymbol(n); + return n !== i; + } + function kSe(e, t, n) { + return N.createImportDeclaration( + /*modifiers*/ + void 0, + CSe(t, n), + e.moduleSpecifier, + /*attributes*/ + void 0 + ); + } + function CSe(e, t) { + return N.createImportClause( + /*isTypeOnly*/ + !1, + e, + t && t.length ? N.createNamedImports(t) : void 0 + ); + } + var woe = "Extract type", oq = { + name: "Extract to type alias", + description: as(p.Extract_to_type_alias), + kind: "refactor.extract.type" + }, cq = { + name: "Extract to interface", + description: as(p.Extract_to_interface), + kind: "refactor.extract.interface" + }, lq = { + name: "Extract to typedef", + description: as(p.Extract_to_typedef), + kind: "refactor.extract.typedef" + }; + Wg(woe, { + kinds: [ + oq.kind, + cq.kind, + lq.kind + ], + getAvailableActions: function(t) { + const { info: n, affectedTextRange: i } = ESe(t, t.triggerReason === "invoked"); + return n ? Eh(n) ? t.preferences.provideRefactorNotApplicableReason ? [{ + name: woe, + description: as(p.Extract_type), + actions: [ + { ...lq, notApplicableReason: n.error }, + { ...oq, notApplicableReason: n.error }, + { ...cq, notApplicableReason: n.error } + ] + }] : He : [{ + name: woe, + description: as(p.Extract_type), + actions: n.isJS ? [lq] : Tr([oq], n.typeElements && cq) + }].map((o) => ({ + ...o, + actions: o.actions.map((c) => ({ + ...c, + range: i ? { + start: { line: Vs(t.file, i.pos).line, offset: Vs(t.file, i.pos).character }, + end: { line: Vs(t.file, i.end).line, offset: Vs(t.file, i.end).character } + } : void 0 + })) + })) : He; + }, + getEditsForAction: function(t, n) { + const { file: i } = t, { info: s } = ESe(t); + E.assert(s && !Eh(s), "Expected to find a range to extract"); + const o = bS("NewType", i), c = Yr.ChangeTracker.with(t, (d) => { + switch (n) { + case oq.name: + return E.assert(!s.isJS, "Invalid actionName/JS combo"), pJe(d, i, o, s); + case lq.name: + return E.assert(s.isJS, "Invalid actionName/JS combo"), mJe(d, t, i, o, s); + case cq.name: + return E.assert(!s.isJS && !!s.typeElements, "Invalid actionName/JS combo"), dJe(d, i, o, s); + default: + E.fail("Unexpected action name"); + } + }), _ = i.fileName, u = dN( + c, + _, + o, + /*preferLastLocation*/ + !1 + ); + return { edits: c, renameFilename: _, renameLocation: u }; + } + }); + function ESe(e, t = !0) { + const { file: n, startPosition: i } = e, s = p_(n), o = XF(Bx(e)), c = o.pos === o.end && t, _ = _Je(n, i, o, c); + if (!_ || !ai(_)) return { info: { error: as(p.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 }; + const u = e.program.getTypeChecker(), d = gJe(_, s); + if (d === void 0) return { info: { error: as(p.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 }; + const g = hJe(_, d); + if (!ai(g)) return { info: { error: as(p.Selection_is_not_a_valid_type_node) }, affectedTextRange: void 0 }; + const h = []; + (ky(g.parent) || gx(g.parent)) && o.end > _.end && Bn( + h, + g.parent.types.filter((P) => BF(P, n, o.pos, o.end)) + ); + const S = h.length > 1 ? h : g, { typeParameters: T, affectedTextRange: C } = fJe(u, S, d, n); + if (!T) return { info: { error: as(p.No_type_could_be_extracted_from_this_type_node) }, affectedTextRange: void 0 }; + const D = uq(u, S); + return { info: { isJS: s, selection: S, enclosingNode: d, typeParameters: T, typeElements: D }, affectedTextRange: C }; + } + function _Je(e, t, n, i) { + const s = [ + () => Ei(e, t), + () => a6(e, t, () => !0) + ]; + for (const o of s) { + const c = o(), _ = BF(c, e, n.pos, n.end), u = sr(c, (d) => d.parent && ai(d) && !Qb(n, d.parent, e) && (i || _)); + if (u) + return u; + } + } + function uq(e, t) { + if (t) { + if (ss(t)) { + const n = []; + for (const i of t) { + const s = uq(e, i); + if (!s) return; + Bn(n, s); + } + return n; + } + if (gx(t)) { + const n = [], i = /* @__PURE__ */ new Map(); + for (const s of t.types) { + const o = uq(e, s); + if (!o || !o.every((c) => c.name && Kp(i, lN(c.name)))) + return; + Bn(n, o); + } + return n; + } else { + if (nS(t)) + return uq(e, t.type); + if (Xu(t)) + return t.members; + } + } + } + function Qb(e, t, n) { + return nN(e, sa(n.text, t.pos), t.end); + } + function fJe(e, t, n, i) { + const s = [], o = vT(t), c = { pos: o[0].getStart(i), end: o[o.length - 1].end }; + for (const u of o) + if (_(u)) return { typeParameters: void 0, affectedTextRange: void 0 }; + return { typeParameters: s, affectedTextRange: c }; + function _(u) { + if (Nf(u)) { + if (Re(u.typeName)) { + const d = u.typeName, g = e.resolveName( + d.text, + d, + 262144, + /*excludeGlobals*/ + !0 + ); + for (const h of g?.declarations || He) + if (Mo(h) && h.getSourceFile() === i) { + if (h.name.escapedText === d.escapedText && Qb(h, c, i)) + return !0; + if (Qb(n, h, i) && !Qb(c, h, i)) { + Zf(s, h); + break; + } + } + } + } else if (rS(u)) { + const d = sr(u, (g) => Ab(g) && Qb(g.extendsType, u, i)); + if (!d || !Qb(c, d, i)) + return !0; + } else if (dx(u) || NC(u)) { + const d = sr(u.parent, ps); + if (d && d.type && Qb(d.type, u, i) && !Qb(c, d, i)) + return !0; + } else if (wb(u)) { + if (Re(u.exprName)) { + const d = e.resolveName( + u.exprName.text, + u.exprName, + 111551, + /*excludeGlobals*/ + !1 + ); + if (d?.valueDeclaration && Qb(n, d.valueDeclaration, i) && !Qb(c, d.valueDeclaration, i)) + return !0; + } else if (my(u.exprName.left) && !Qb(c, u.parent, i)) + return !0; + } + return i && mx(u) && Vs(i, u.pos).line === Vs(i, u.end).line && Kr( + u, + 1 + /* SingleLine */ + ), gs(u, _); + } + } + function pJe(e, t, n, i) { + const { enclosingNode: s, typeParameters: o } = i, { firstTypeNode: c, lastTypeNode: _, newTypeNode: u } = Aoe(i), d = N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + n, + o.map((g) => N.updateTypeParameterDeclaration( + g, + g.modifiers, + g.name, + g.constraint, + /*defaultType*/ + void 0 + )), + u + ); + e.insertNodeBefore( + t, + s, + xJ(d), + /*blankLineBetween*/ + !0 + ), e.replaceNodeRange(t, c, _, N.createTypeReferenceNode(n, o.map((g) => N.createTypeReferenceNode( + g.name, + /*typeArguments*/ + void 0 + ))), { leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, trailingTriviaOption: Yr.TrailingTriviaOption.ExcludeWhitespace }); + } + function dJe(e, t, n, i) { + var s; + const { enclosingNode: o, typeParameters: c, typeElements: _ } = i, u = N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + n, + c, + /*heritageClauses*/ + void 0, + _ + ); + ot(u, (s = _[0]) == null ? void 0 : s.parent), e.insertNodeBefore( + t, + o, + xJ(u), + /*blankLineBetween*/ + !0 + ); + const { firstTypeNode: d, lastTypeNode: g } = Aoe(i); + e.replaceNodeRange(t, d, g, N.createTypeReferenceNode(n, c.map((h) => N.createTypeReferenceNode( + h.name, + /*typeArguments*/ + void 0 + ))), { leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, trailingTriviaOption: Yr.TrailingTriviaOption.ExcludeWhitespace }); + } + function mJe(e, t, n, i, s) { + var o; + vT(s.selection).forEach((C) => { + Kr( + C, + 7168 + /* NoNestedComments */ + ); + }); + const { enclosingNode: c, typeParameters: _ } = s, { firstTypeNode: u, lastTypeNode: d, newTypeNode: g } = Aoe(s), h = N.createJSDocTypedefTag( + N.createIdentifier("typedef"), + N.createJSDocTypeExpression(g), + N.createIdentifier(i) + ), S = []; + rr(_, (C) => { + const D = $k(C), P = N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + C.name + ), O = N.createJSDocTemplateTag( + N.createIdentifier("template"), + D && Is(D, nv), + [P] + ); + S.push(O); + }); + const T = N.createJSDocComment( + /*comment*/ + void 0, + N.createNodeArray(Hi(S, [h])) + ); + if (Ed(c)) { + const C = c.getStart(n), D = k0(t.host, (o = t.formatContext) == null ? void 0 : o.options); + e.insertNodeAt(n, c.getStart(n), T, { + suffix: D + D + n.text.slice(i9(n.text, C - 1), C) + }); + } else + e.insertNodeBefore( + n, + c, + T, + /*blankLineBetween*/ + !0 + ); + e.replaceNodeRange(n, u, d, N.createTypeReferenceNode(i, _.map((C) => N.createTypeReferenceNode( + C.name, + /*typeArguments*/ + void 0 + )))); + } + function Aoe(e) { + return ss(e.selection) ? { + firstTypeNode: e.selection[0], + lastTypeNode: e.selection[e.selection.length - 1], + newTypeNode: ky(e.selection[0].parent) ? N.createUnionTypeNode(e.selection) : N.createIntersectionTypeNode(e.selection) + } : { + firstTypeNode: e.selection, + lastTypeNode: e.selection, + newTypeNode: e.selection + }; + } + function gJe(e, t) { + return sr(e, hi) || (t ? sr(e, Ed) : void 0); + } + function hJe(e, t) { + return sr(e, (n) => n === t ? "quit" : !!(ky(n.parent) || gx(n.parent))) ?? e; + } + var _q = "Move to file", Noe = as(p.Move_to_file), Ioe = { + name: "Move to file", + description: Noe, + kind: "refactor.move.file" + }; + Wg(_q, { + kinds: [Ioe.kind], + getAvailableActions: function(t, n) { + const i = t.file, s = CN(t); + if (!n) + return He; + if (t.triggerReason === "implicit" && t.endPosition !== void 0) { + const o = sr(Ei(i, t.startPosition), d6), c = sr(Ei(i, t.endPosition), d6); + if (o && !yi(o) && c && !yi(c)) + return He; + } + if (t.preferences.allowTextChangesInNewFiles && s) { + const o = { + start: { line: Vs(i, s.all[0].getStart(i)).line, offset: Vs(i, s.all[0].getStart(i)).character }, + end: { line: Vs(i, ia(s.all).end).line, offset: Vs(i, ia(s.all).end).character } + }; + return [{ name: _q, description: Noe, actions: [{ ...Ioe, range: o }] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [{ name: _q, description: Noe, actions: [{ ...Ioe, notApplicableReason: as(p.Selection_is_not_a_valid_statement_or_statements) }] }] : He; + }, + getEditsForAction: function(t, n, i) { + E.assert(n === _q, "Wrong refactor invoked"); + const s = E.checkDefined(CN(t)), { host: o, program: c } = t; + E.assert(i, "No interactive refactor arguments available"); + const _ = i.targetFile; + return Lg(_) || ex(_) ? o.fileExists(_) && c.getSourceFile(_) === void 0 ? DSe(as(p.Cannot_move_statements_to_the_selected_file)) : { edits: Yr.ChangeTracker.with(t, (d) => yJe(t, t.file, i.targetFile, t.program, s, d, t.host, t.preferences)), renameFilename: void 0, renameLocation: void 0 } : DSe(as(p.Cannot_move_to_file_selected_file_is_invalid)); + } + }); + function DSe(e) { + return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason: e }; + } + function yJe(e, t, n, i, s, o, c, _) { + const u = i.getTypeChecker(), d = !c.fileExists(n), g = d ? T9(n, t.externalModuleIndicator ? 99 : t.commonJsModuleIndicator ? 1 : void 0, i, c) : E.checkDefined(i.getSourceFile(n)), h = vu.createImportAdder(t, e.program, e.preferences, e.host), S = vu.createImportAdder(g, e.program, e.preferences, e.host); + Ooe(t, g, w9(t, s.all, u, d ? void 0 : Uoe(g, s.all, u)), o, s, i, c, _, S, h), d && Foe(i, o, t.fileName, n, _0(c)); + } + function Ooe(e, t, n, i, s, o, c, _, u, d) { + const g = o.getTypeChecker(), h = bR(e.statements, Kd), S = !RU(t.fileName, o, c, !!e.commonJsModuleIndicator), T = Rf(e, _); + Roe(n.oldFileImportsFromTargetFile, t.fileName, d, o), wSe(e, s.all, n.unusedImportsFromOldFile, d), d.writeFixes(i, T), PSe(e, s.ranges, i), ASe(i, o, c, e, n.movedSymbols, t.fileName, T), Loe(e, n.targetFileImportsFromOldFile, i, S), Hoe(e, n.oldImportsNeededByTargetFile, n.targetFileImportsFromOldFile, g, o, u), !l0(t) && h.length && i.insertStatementsInNewFile(t.fileName, h, e), u.writeFixes(i, T); + const C = xJe(e, s.all, ts(n.oldFileImportsFromTargetFile.keys()), S); + l0(t) && t.statements.length > 0 ? MJe(i, o, C, t, s) : l0(t) ? i.insertNodesAtEndOfFile( + t, + C, + /*blankLineBetween*/ + !1 + ) : i.insertStatementsInNewFile(t.fileName, u.hasFixes() ? [4, ...C] : C, e); + } + function Foe(e, t, n, i, s) { + const o = e.getCompilerOptions().configFile; + if (!o) return; + const c = Cs(Mn(n, "..", i)), _ = LE(o.fileName, c, s), u = o.statements[0] && Jn(o.statements[0].expression, Gs), d = u && Nn(u.properties, (g) => qc(g) && Ks(g.name) && g.name.text === "files"); + d && Wl(d.initializer) && t.insertNodeInListAfter(o, ia(d.initializer.elements), N.createStringLiteral(_), d.initializer.elements); + } + function PSe(e, t, n) { + for (const { first: i, afterLast: s } of t) + n.deleteNodeRangeExcludingEnd(e, i, s); + } + function wSe(e, t, n, i) { + for (const s of e.statements) + ls(t, s) || Moe(s, (o) => { + OSe(o, (c) => { + n.has(c.symbol) && i.removeExistingImport(c); + }); + }); + } + function Loe(e, t, n, i) { + const s = o6(); + t.forEach((o, c) => { + if (c.declarations) + for (const _ of c.declarations) { + if (!fq(_)) continue; + const u = BSe(_); + if (!u) continue; + const d = Boe(_); + s(d) && JSe(e, d, u, n, i); + } + }); + } + function ASe(e, t, n, i, s, o, c) { + const _ = t.getTypeChecker(); + for (const u of t.getSourceFiles()) + if (u !== i) + for (const d of u.statements) + Moe(d, (g) => { + if (_.getSymbolAtLocation(ISe(g)) !== i.symbol) return; + const h = (P) => { + const O = da(P.parent) ? t9(_, P.parent) : Jl(_.getSymbolAtLocation(P), _); + return !!O && s.has(O); + }; + LSe(u, g, e, h); + const S = O1(Xn(Xi(i.fileName, t.getCurrentDirectory())), o); + if (Bk(!t.useCaseSensitiveFileNames())(S, u.fileName) === 0) return; + const T = P1e(t.getCompilerOptions(), u, u.fileName, S, jx(t, n)), C = jSe(g, HD(T, c), h); + C && e.insertNodeAfter(u, d, C); + const D = vJe(g); + D && bJe(e, u, _, s, T, D, g, c); + }); + } + function vJe(e) { + switch (e.kind) { + case 272: + return e.importClause && e.importClause.namedBindings && e.importClause.namedBindings.kind === 274 ? e.importClause.namedBindings.name : void 0; + case 271: + return e.name; + case 260: + return Jn(e.name, Re); + default: + return E.assertNever(e, `Unexpected node kind ${e.kind}`); + } + } + function bJe(e, t, n, i, s, o, c, _) { + const u = vN( + s, + 99 + /* ESNext */ + ); + let d = !1; + const g = []; + if (yo.Core.eachSymbolReferenceInFile(o, n, t, (h) => { + Dn(h.parent) && (d = d || !!n.resolveName( + u, + h, + -1, + /*excludeGlobals*/ + !0 + ), i.has(n.getSymbolAtLocation(h.parent.name)) && g.push(h)); + }), g.length) { + const h = d ? bS(u, t) : u; + for (const S of g) + e.replaceNode(t, S, N.createIdentifier(h)); + e.insertNodeAfter(t, c, SJe(c, u, s, _)); + } + } + function SJe(e, t, n, i) { + const s = N.createIdentifier(t), o = HD(n, i); + switch (e.kind) { + case 272: + return N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + /*name*/ + void 0, + N.createNamespaceImport(s) + ), + o, + /*attributes*/ + void 0 + ); + case 271: + return N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + s, + N.createExternalModuleReference(o) + ); + case 260: + return N.createVariableDeclaration( + s, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + NSe(o) + ); + default: + return E.assertNever(e, `Unexpected node kind ${e.kind}`); + } + } + function NSe(e) { + return N.createCallExpression( + N.createIdentifier("require"), + /*typeArguments*/ + void 0, + [e] + ); + } + function ISe(e) { + return e.kind === 272 ? e.moduleSpecifier : e.kind === 271 ? e.moduleReference.expression : e.initializer.arguments[0]; + } + function Moe(e, t) { + if (oc(e)) + Ks(e.moduleSpecifier) && t(e); + else if (nl(e)) + Sh(e.moduleReference) && Ga(e.moduleReference.expression) && t(e); + else if (yc(e)) + for (const n of e.declarationList.declarations) + n.initializer && d_( + n.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ) && t(n); + } + function OSe(e, t) { + var n, i, s, o, c; + if (e.kind === 272) { + if ((n = e.importClause) != null && n.name && t(e.importClause), ((s = (i = e.importClause) == null ? void 0 : i.namedBindings) == null ? void 0 : s.kind) === 274 && t(e.importClause.namedBindings), ((c = (o = e.importClause) == null ? void 0 : o.namedBindings) == null ? void 0 : c.kind) === 275) + for (const _ of e.importClause.namedBindings.elements) + t(_); + } else if (e.kind === 271) + t(e); + else if (e.kind === 260) { + if (e.name.kind === 80) + t(e); + else if (e.name.kind === 206) + for (const _ of e.name.elements) + Re(_.name) && t(_); + } + } + function Roe(e, t, n, i) { + for (const [s, o] of e) { + const c = m9(s, pa(i.getCompilerOptions())), _ = s.name === "default" && s.parent ? 1 : 0; + n.addImportForNonExistentExport(c, t, _, s.flags, o); + } + } + function TJe(e, t, n, i = 2) { + return N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([N.createVariableDeclaration( + e, + /*exclamationToken*/ + void 0, + t, + n + )], i) + ); + } + function xJe(e, t, n, i) { + return Xs(t, (s) => { + if (MSe(s) && !FSe(e, s, i) && Voe(s, (o) => { + var c; + return n.includes(E.checkDefined((c = Jn(o, vd)) == null ? void 0 : c.symbol)); + })) { + const o = kJe(qa(s), i); + if (o) return o; + } + return qa(s); + }); + } + function FSe(e, t, n, i) { + var s; + return n ? !Pl(t) && Vn( + t, + 32 + /* Export */ + ) || !!(i && e.symbol && ((s = e.symbol.exports) != null && s.has(i.escapedText))) : !!e.symbol && !!e.symbol.exports && joe(t).some((o) => e.symbol.exports.has(Ko(o))); + } + function LSe(e, t, n, i) { + if (t.kind === 272 && t.importClause) { + const { name: s, namedBindings: o } = t.importClause; + if ((!s || i(s)) && (!o || o.kind === 275 && o.elements.length !== 0 && o.elements.every((c) => i(c.name)))) + return n.delete(e, t); + } + OSe(t, (s) => { + s.name && Re(s.name) && i(s.name) && n.delete(e, s); + }); + } + function MSe(e) { + return E.assert(yi(e.parent), "Node parent should be a SourceFile"), USe(e) || yc(e); + } + function kJe(e, t) { + return t ? [CJe(e)] : EJe(e); + } + function CJe(e) { + const t = ed(e) ? Hi([N.createModifier( + 95 + /* ExportKeyword */ + )], sb(e)) : void 0; + switch (e.kind) { + case 262: + return N.updateFunctionDeclaration(e, t, e.asteriskToken, e.name, e.typeParameters, e.parameters, e.type, e.body); + case 263: + const n = jb(e) ? cy(e) : void 0; + return N.updateClassDeclaration(e, Hi(n, t), e.name, e.typeParameters, e.heritageClauses, e.members); + case 243: + return N.updateVariableStatement(e, t, e.declarationList); + case 267: + return N.updateModuleDeclaration(e, t, e.name, e.body); + case 266: + return N.updateEnumDeclaration(e, t, e.name, e.members); + case 265: + return N.updateTypeAliasDeclaration(e, t, e.name, e.typeParameters, e.type); + case 264: + return N.updateInterfaceDeclaration(e, t, e.name, e.typeParameters, e.heritageClauses, e.members); + case 271: + return N.updateImportEqualsDeclaration(e, t, e.isTypeOnly, e.name, e.moduleReference); + case 244: + return E.fail(); + default: + return E.assertNever(e, `Unexpected declaration kind ${e.kind}`); + } + } + function EJe(e) { + return [e, ...joe(e).map(RSe)]; + } + function RSe(e) { + return N.createExpressionStatement( + N.createBinaryExpression( + N.createPropertyAccessExpression(N.createIdentifier("exports"), N.createIdentifier(e)), + 64, + N.createIdentifier(e) + ) + ); + } + function joe(e) { + switch (e.kind) { + case 262: + case 263: + return [e.name.text]; + case 243: + return Ii(e.declarationList.declarations, (t) => Re(t.name) ? t.name.text : void 0); + case 267: + case 266: + case 265: + case 264: + case 271: + return He; + case 244: + return E.fail("Can't export an ExpressionStatement"); + default: + return E.assertNever(e, `Unexpected decl kind ${e.kind}`); + } + } + function jSe(e, t, n) { + switch (e.kind) { + case 272: { + const i = e.importClause; + if (!i) return; + const s = i.name && n(i.name) ? i.name : void 0, o = i.namedBindings && DJe(i.namedBindings, n); + return s || o ? N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause(i.isTypeOnly, s, o), + qa(t), + /*attributes*/ + void 0 + ) : void 0; + } + case 271: + return n(e.name) ? e : void 0; + case 260: { + const i = PJe(e.name, n); + return i ? TJe(i, e.type, NSe(t), e.parent.flags) : void 0; + } + default: + return E.assertNever(e, `Unexpected import kind ${e.kind}`); + } + } + function DJe(e, t) { + if (e.kind === 274) + return t(e.name) ? e : void 0; + { + const n = e.elements.filter((i) => t(i.name)); + return n.length ? N.createNamedImports(n) : void 0; + } + } + function PJe(e, t) { + switch (e.kind) { + case 80: + return t(e) ? e : void 0; + case 207: + return e; + case 206: { + const n = e.elements.filter((i) => i.propertyName || !Re(i.name) || t(i.name)); + return n.length ? N.createObjectBindingPattern(n) : void 0; + } + } + } + function BSe(e) { + return Pl(e) ? Jn(e.expression.left.name, Re) : Jn(e.name, Re); + } + function Boe(e) { + switch (e.kind) { + case 260: + return e.parent.parent; + case 208: + return Boe( + Is(e.parent.parent, (t) => ti(t) || da(t)) + ); + default: + return e; + } + } + function JSe(e, t, n, i, s) { + if (!FSe(e, t, s, n)) + if (s) + Pl(t) || i.insertExportModifier(e, t); + else { + const o = joe(t); + o.length !== 0 && i.insertNodesAfter(e, t, o.map(RSe)); + } + } + function Joe(e, t, n, i) { + const s = t.getTypeChecker(); + if (i) { + const o = w9(e, i.all, s), c = Xn(e.fileName), _ = R4(e.fileName); + return Mn( + // new file is always placed in the same directory as the old file + c, + // ensures the filename computed below isn't already taken + OJe( + // infers a name for the new file from the symbols being moved + FJe(o.oldFileImportsFromTargetFile, o.movedSymbols), + _, + c, + n + ) + ) + _; + } + return ""; + } + function wJe(e) { + const { file: t } = e, n = XF(Bx(e)), { statements: i } = t; + let s = rc(i, (d) => d.end > n.pos); + if (s === -1) return; + const o = i[s], c = qSe(t, o); + c && (s = c.start); + let _ = rc(i, (d) => d.end >= n.end, s); + _ !== -1 && n.end <= i[_].getStart() && _--; + const u = qSe(t, i[_]); + return u && (_ = u.end), { + toMove: i.slice(s, _ === -1 ? i.length : _ + 1), + afterLast: _ === -1 ? void 0 : i[_ + 1] + }; + } + function CN(e) { + const t = wJe(e); + if (t === void 0) return; + const n = [], i = [], { toMove: s, afterLast: o } = t; + return iR(s, AJe, (c, _) => { + for (let u = c; u < _; u++) n.push(s[u]); + i.push({ first: s[c], afterLast: o }); + }), n.length === 0 ? void 0 : { all: n, ranges: i }; + } + function zoe(e) { + return Nn(e, (t) => !!(t.transformFlags & 2)); + } + function AJe(e) { + return !NJe(e) && !Kd(e); + } + function NJe(e) { + switch (e.kind) { + case 272: + return !0; + case 271: + return !Vn( + e, + 32 + /* Export */ + ); + case 243: + return e.declarationList.declarations.every((t) => !!t.initializer && d_( + t.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + )); + default: + return !1; + } + } + function w9(e, t, n, i = /* @__PURE__ */ new Set()) { + var s; + const o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map(), u = h(zoe(t)); + u && c.set(u, [!1, Jn((s = u.declarations) == null ? void 0 : s[0], (S) => Yu(S) || kd(S) || Rg(S) || nl(S) || da(S) || ti(S))]); + for (const S of t) + Voe(S, (T) => { + o.add(E.checkDefined(Pl(T) ? n.getSymbolAtLocation(T.expression.left) : T.symbol, "Need a symbol here")); + }); + const d = /* @__PURE__ */ new Set(); + for (const S of t) + Woe(S, n, (T, C) => { + if (!(!T.declarations || IJe(n, T))) { + if (i.has(Jl(T, n))) { + d.add(T); + return; + } + for (const D of T.declarations) + if (zSe(D)) { + const P = c.get(T); + c.set(T, [ + (P === void 0 || P) && C, + Jn(D, (O) => Yu(O) || kd(O) || Rg(O) || nl(O) || da(O) || ti(O)) + ]); + } else fq(D) && LJe(D) === e && !o.has(T) && _.set(T, C); + } + }); + for (const S of c.keys()) + d.add(S); + const g = /* @__PURE__ */ new Map(); + for (const S of e.statements) + ls(t, S) || (u && S.transformFlags & 2 && d.delete(u), Woe(S, n, (T, C) => { + o.has(T) && g.set(T, C), d.delete(T); + })); + return { movedSymbols: o, targetFileImportsFromOldFile: _, oldFileImportsFromTargetFile: g, oldImportsNeededByTargetFile: c, unusedImportsFromOldFile: d }; + function h(S) { + if (S === void 0) + return; + const T = n.getJsxNamespace(S), C = n.resolveName( + T, + S, + 1920, + /*excludeGlobals*/ + !0 + ); + return C && ut(C.declarations, zSe) ? C : void 0; + } + } + function IJe(e, t) { + return !!e.resolveName( + t.name, + /*location*/ + void 0, + 788968, + /*excludeGlobals*/ + !1 + ); + } + function OJe(e, t, n, i) { + let s = e; + for (let o = 1; ; o++) { + const c = Mn(n, s + t); + if (!i.fileExists(c)) return s; + s = `${e}.${o}`; + } + } + function FJe(e, t) { + return uh(e, uU) || uh(t, uU) || "newFile"; + } + function Woe(e, t, n) { + e.forEachChild(function i(s) { + if (Re(s) && !Gm(s)) { + const o = t.getSymbolAtLocation(s); + o && n(o, Y1(s)); + } else + s.forEachChild(i); + }); + } + function Voe(e, t) { + switch (e.kind) { + case 262: + case 263: + case 267: + case 266: + case 265: + case 264: + case 271: + return t(e); + case 243: + return xc(e.declarationList.declarations, (n) => VSe(n.name, t)); + case 244: { + const { expression: n } = e; + return cn(n) && mc(n) === 1 ? t(e) : void 0; + } + } + } + function zSe(e) { + switch (e.kind) { + case 271: + case 276: + case 273: + case 274: + return !0; + case 260: + return WSe(e); + case 208: + return ti(e.parent.parent) && WSe(e.parent.parent); + default: + return !1; + } + } + function WSe(e) { + return yi(e.parent.parent.parent) && !!e.initializer && d_( + e.initializer, + /*requireStringLiteralLikeArgument*/ + !0 + ); + } + function fq(e) { + return USe(e) && yi(e.parent) || ti(e) && yi(e.parent.parent.parent); + } + function LJe(e) { + return ti(e) ? e.parent.parent.parent : e.parent; + } + function VSe(e, t) { + switch (e.kind) { + case 80: + return t(Is(e.parent, (n) => ti(n) || da(n))); + case 207: + case 206: + return xc(e.elements, (n) => ml(n) ? void 0 : VSe(n.name, t)); + default: + return E.assertNever(e, `Unexpected name kind ${e.kind}`); + } + } + function USe(e) { + switch (e.kind) { + case 262: + case 263: + case 267: + case 266: + case 265: + case 264: + case 271: + return !0; + default: + return !1; + } + } + function MJe(e, t, n, i, s) { + var o; + const c = /* @__PURE__ */ new Set(), _ = (o = i.symbol) == null ? void 0 : o.exports; + if (_) { + const d = t.getTypeChecker(), g = /* @__PURE__ */ new Map(); + for (const h of s.all) + MSe(h) && Vn( + h, + 32 + /* Export */ + ) && Voe(h, (S) => { + var T; + const C = vd(S) ? (T = _.get(S.symbol.escapedName)) == null ? void 0 : T.declarations : void 0, D = xc(C, (P) => Ic(P) ? P : pu(P) ? Jn(P.parent.parent, Ic) : void 0); + D && D.moduleSpecifier && g.set(D, (g.get(D) || /* @__PURE__ */ new Set()).add(S)); + }); + for (const [h, S] of ts(g)) + if (h.exportClause && lp(h.exportClause) && Dr(h.exportClause.elements)) { + const T = h.exportClause.elements, C = Ln(T, (D) => Nn(Jl(D.symbol, d).declarations, (P) => fq(P) && S.has(P)) === void 0); + if (Dr(C) === 0) { + e.deleteNode(i, h), c.add(h); + continue; + } + Dr(C) < Dr(T) && e.replaceNode(i, h, N.updateExportDeclaration(h, h.modifiers, h.isTypeOnly, N.updateNamedExports(h.exportClause, N.createNodeArray(C, T.hasTrailingComma)), h.moduleSpecifier, h.attributes)); + } + } + const u = eb(i.statements, (d) => Ic(d) && !!d.moduleSpecifier && !c.has(d)); + u ? e.insertNodesBefore( + i, + u, + n, + /*blankLineBetween*/ + !0 + ) : e.insertNodesAfter(i, i.statements[i.statements.length - 1], n); + } + function qSe(e, t) { + if (so(t)) { + const n = t.symbol.declarations; + if (n === void 0 || Dr(n) <= 1 || !ls(n, t)) + return; + const i = n[0], s = n[Dr(n) - 1], o = Ii(n, (u) => xr(u) === e && hi(u) ? u : void 0), c = rc(e.statements, (u) => u.end >= s.end), _ = rc(e.statements, (u) => u.end >= i.end); + return { toMove: o, start: _, end: c }; + } + } + function Uoe(e, t, n) { + const i = /* @__PURE__ */ new Set(); + for (const s of e.imports) { + const o = _4(s); + if (oc(o) && o.importClause && o.importClause.namedBindings && fm(o.importClause.namedBindings)) + for (const c of o.importClause.namedBindings.elements) { + const _ = n.getSymbolAtLocation(c.propertyName || c.name); + _ && i.add(Jl(_, n)); + } + if (i3(o.parent) && If(o.parent.name)) + for (const c of o.parent.name.elements) { + const _ = n.getSymbolAtLocation(c.propertyName || c.name); + _ && i.add(Jl(_, n)); + } + } + for (const s of t) + Woe(s, n, (o) => { + const c = Jl(o, n); + c.valueDeclaration && xr(c.valueDeclaration).path === e.path && i.add(c); + }); + return i; + } + function Eh(e) { + return e.error !== void 0; + } + function hv(e, t) { + return t ? e.substr(0, t.length) === t : !0; + } + function qoe(e, t, n, i) { + return Dn(e) && !Qn(t) && !n.resolveName( + e.name.text, + e, + 111551, + /*excludeGlobals*/ + !1 + ) && !wi(e.name) && !B2(e.name) ? e.name.text : bS(Qn(t) ? "newProperty" : "newLocal", i); + } + function Hoe(e, t, n, i, s, o) { + t.forEach(([c, _], u) => { + var d; + const g = Jl(u, i); + i.isUnknownSymbol(g) ? o.addVerbatimImport(E.checkDefined(_ ?? sr((d = u.declarations) == null ? void 0 : d[0], yZ))) : o.addImportFromExportedSymbol(g, c, _); + }), Roe(n, e.fileName, o, s); + } + var A9 = "Inline variable", Goe = as(p.Inline_variable), $oe = { + name: A9, + description: Goe, + kind: "refactor.inline.variable" + }; + Wg(A9, { + kinds: [$oe.kind], + getAvailableActions(e) { + const { + file: t, + program: n, + preferences: i, + startPosition: s, + triggerReason: o + } = e, c = HSe(t, s, o === "invoked", n); + return c ? zx.isRefactorErrorInfo(c) ? i.provideRefactorNotApplicableReason ? [{ + name: A9, + description: Goe, + actions: [{ + ...$oe, + notApplicableReason: c.error + }] + }] : He : [{ + name: A9, + description: Goe, + actions: [$oe] + }] : He; + }, + getEditsForAction(e, t) { + E.assert(t === A9, "Unexpected refactor invoked"); + const { file: n, program: i, startPosition: s } = e, o = HSe( + n, + s, + /*tryWithReferenceToken*/ + !0, + i + ); + if (!o || zx.isRefactorErrorInfo(o)) + return; + const { references: c, declaration: _, replacement: u } = o; + return { edits: Yr.ChangeTracker.with(e, (g) => { + for (const h of c) + g.replaceNode(n, h, RJe(h, u)); + g.delete(n, _); + }) }; + } + }); + function HSe(e, t, n, i) { + var s, o; + const c = i.getTypeChecker(), _ = h_(e, t), u = _.parent; + if (Re(_)) { + if (M3(u) && i4(u) && Re(u.name)) { + if (((s = c.getMergedSymbol(u.symbol).declarations) == null ? void 0 : s.length) !== 1) + return { error: as(p.Variables_with_multiple_declarations_cannot_be_inlined) }; + if (GSe(u)) + return; + const d = $Se(u, c, e); + return d && { references: d, declaration: u, replacement: u.initializer }; + } + if (n) { + let d = c.resolveName( + _.text, + _, + 111551, + /*excludeGlobals*/ + !1 + ); + if (d = d && c.getMergedSymbol(d), ((o = d?.declarations) == null ? void 0 : o.length) !== 1) + return { error: as(p.Variables_with_multiple_declarations_cannot_be_inlined) }; + const g = d.declarations[0]; + if (!M3(g) || !i4(g) || !Re(g.name) || GSe(g)) + return; + const h = $Se(g, c, e); + return h && { references: h, declaration: g, replacement: g.initializer }; + } + return { error: as(p.Could_not_find_variable_to_inline) }; + } + } + function GSe(e) { + const t = Is(e.parent.parent, yc); + return ut(t.modifiers, _x); + } + function $Se(e, t, n) { + const i = [], s = yo.Core.eachSymbolReferenceInFile(e.name, t, n, (o) => { + if (yo.isWriteAccessForReference(o) && !du(o.parent) || pu(o.parent) || ko(o.parent) || wb(o.parent) || Sw(e, o.pos)) + return !0; + i.push(o); + }); + return i.length === 0 || s ? void 0 : i; + } + function RJe(e, t) { + t = qa(t); + const { parent: n } = e; + return ct(n) && (v4(t) < v4(n) || s9(n)) || ps(t) && (lb(n) || Dn(n)) || Dn(n) && (m_(t) || Gs(t)) ? N.createParenthesizedExpression(t) : Re(e) && du(n) ? N.createPropertyAssignment(e, t) : t; + } + var N9 = "Move to a new file", Xoe = as(p.Move_to_a_new_file), Qoe = { + name: N9, + description: Xoe, + kind: "refactor.move.newFile" + }; + Wg(N9, { + kinds: [Qoe.kind], + getAvailableActions: function(t) { + const n = CN(t), i = t.file; + if (t.triggerReason === "implicit" && t.endPosition !== void 0) { + const s = sr(Ei(i, t.startPosition), d6), o = sr(Ei(i, t.endPosition), d6); + if (s && !yi(s) && o && !yi(o)) + return He; + } + if (t.preferences.allowTextChangesInNewFiles && n) { + const s = t.file, o = { + start: { line: Vs(s, n.all[0].getStart(s)).line, offset: Vs(s, n.all[0].getStart(s)).character }, + end: { line: Vs(s, ia(n.all).end).line, offset: Vs(s, ia(n.all).end).character } + }; + return [{ name: N9, description: Xoe, actions: [{ ...Qoe, range: o }] }]; + } + return t.preferences.provideRefactorNotApplicableReason ? [{ name: N9, description: Xoe, actions: [{ ...Qoe, notApplicableReason: as(p.Selection_is_not_a_valid_statement_or_statements) }] }] : He; + }, + getEditsForAction: function(t, n) { + E.assert(n === N9, "Wrong refactor invoked"); + const i = E.checkDefined(CN(t)); + return { edits: Yr.ChangeTracker.with(t, (o) => jJe(t.file, t.program, i, o, t.host, t, t.preferences)), renameFilename: void 0, renameLocation: void 0 }; + } + }); + function jJe(e, t, n, i, s, o, c) { + const _ = t.getTypeChecker(), u = w9(e, n.all, _), d = Joe(e, t, s, n), g = T9(d, e.externalModuleIndicator ? 99 : e.commonJsModuleIndicator ? 1 : void 0, t, s), h = vu.createImportAdder(e, o.program, o.preferences, o.host), S = vu.createImportAdder(g, o.program, o.preferences, o.host); + Ooe(e, g, u, i, n, t, s, c, S, h), Foe(t, i, e.fileName, d, _0(s)); + } + var BJe = {}, Yoe = "Convert overload list to single signature", XSe = as(p.Convert_overload_list_to_single_signature), QSe = { + name: Yoe, + description: XSe, + kind: "refactor.rewrite.function.overloadList" + }; + Wg(Yoe, { + kinds: [QSe.kind], + getEditsForAction: zJe, + getAvailableActions: JJe + }); + function JJe(e) { + const { file: t, startPosition: n, program: i } = e; + return ZSe(t, n, i) ? [{ + name: Yoe, + description: XSe, + actions: [QSe] + }] : He; + } + function zJe(e) { + const { file: t, startPosition: n, program: i } = e, s = ZSe(t, n, i); + if (!s) return; + const o = i.getTypeChecker(), c = s[s.length - 1]; + let _ = c; + switch (c.kind) { + case 173: { + _ = N.updateMethodSignature( + c, + c.modifiers, + c.name, + c.questionToken, + c.typeParameters, + d(s), + c.type + ); + break; + } + case 174: { + _ = N.updateMethodDeclaration( + c, + c.modifiers, + c.asteriskToken, + c.name, + c.questionToken, + c.typeParameters, + d(s), + c.type, + c.body + ); + break; + } + case 179: { + _ = N.updateCallSignature( + c, + c.typeParameters, + d(s), + c.type + ); + break; + } + case 176: { + _ = N.updateConstructorDeclaration( + c, + c.modifiers, + d(s), + c.body + ); + break; + } + case 180: { + _ = N.updateConstructSignature( + c, + c.typeParameters, + d(s), + c.type + ); + break; + } + case 262: { + _ = N.updateFunctionDeclaration( + c, + c.modifiers, + c.asteriskToken, + c.name, + c.typeParameters, + d(s), + c.type, + c.body + ); + break; + } + default: + return E.failBadSyntaxKind(c, "Unhandled signature kind in overload list conversion refactoring"); + } + if (_ === c) + return; + return { renameFilename: void 0, renameLocation: void 0, edits: Yr.ChangeTracker.with(e, (S) => { + S.replaceNodeRange(t, s[0], s[s.length - 1], _); + }) }; + function d(S) { + const T = S[S.length - 1]; + return so(T) && T.body && (S = S.slice(0, S.length - 1)), N.createNodeArray([ + N.createParameterDeclaration( + /*modifiers*/ + void 0, + N.createToken( + 26 + /* DotDotDotToken */ + ), + "args", + /*questionToken*/ + void 0, + N.createUnionTypeNode(or(S, g)) + ) + ]); + } + function g(S) { + const T = or(S.parameters, h); + return Kr( + N.createTupleTypeNode(T), + ut(T, (C) => !!Dr(PC(C))) ? 0 : 1 + /* SingleLine */ + ); + } + function h(S) { + E.assert(Re(S.name)); + const T = ot( + N.createNamedTupleMember( + S.dotDotDotToken, + S.name, + S.questionToken, + S.type || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ), + S + ), C = S.symbol && S.symbol.getDocumentationComment(o); + if (C) { + const D = PN(C); + D.length && Z1(T, [{ + text: `* +${D.split(` +`).map((P) => ` * ${P}`).join(` +`)} + `, + kind: 3, + pos: -1, + end: -1, + hasTrailingNewLine: !0, + hasLeadingNewline: !0 + }]); + } + return T; + } + } + function YSe(e) { + switch (e.kind) { + case 173: + case 174: + case 179: + case 176: + case 180: + case 262: + return !0; + } + return !1; + } + function ZSe(e, t, n) { + const i = Ei(e, t), s = sr(i, YSe); + if (!s || so(s) && s.body && tN(s.body, t)) + return; + const o = n.getTypeChecker(), c = s.symbol; + if (!c) + return; + const _ = c.declarations; + if (Dr(_) <= 1 || !Ri(_, (S) => xr(S) === e) || !YSe(_[0])) + return; + const u = _[0].kind; + if (!Ri(_, (S) => S.kind === u)) + return; + const d = _; + if (ut(d, (S) => !!S.typeParameters || ut(S.parameters, (T) => !!T.modifiers || !Re(T.name)))) + return; + const g = Ii(d, (S) => o.getSignatureFromDeclaration(S)); + if (Dr(g) !== Dr(_)) + return; + const h = o.getReturnTypeOfSignature(g[0]); + if (Ri(g, (S) => o.getReturnTypeOfSignature(S) === h)) + return d; + } + var Zoe = "Add or remove braces in an arrow function", KSe = as(p.Add_or_remove_braces_in_an_arrow_function), pq = { + name: "Add braces to arrow function", + description: as(p.Add_braces_to_arrow_function), + kind: "refactor.rewrite.arrow.braces.add" + }, I9 = { + name: "Remove braces from arrow function", + description: as(p.Remove_braces_from_arrow_function), + kind: "refactor.rewrite.arrow.braces.remove" + }; + Wg(Zoe, { + kinds: [I9.kind], + getEditsForAction: VJe, + getAvailableActions: WJe + }); + function WJe(e) { + const { file: t, startPosition: n, triggerReason: i } = e, s = eTe(t, n, i === "invoked"); + return s ? Eh(s) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: Zoe, + description: KSe, + actions: [ + { ...pq, notApplicableReason: s.error }, + { ...I9, notApplicableReason: s.error } + ] + }] : He : [{ + name: Zoe, + description: KSe, + actions: [ + s.addBraces ? pq : I9 + ] + }] : He; + } + function VJe(e, t) { + const { file: n, startPosition: i } = e, s = eTe(n, i); + E.assert(s && !Eh(s), "Expected applicable refactor info"); + const { expression: o, returnStatement: c, func: _ } = s; + let u; + if (t === pq.name) { + const g = N.createReturnStatement(o); + u = N.createBlock( + [g], + /*multiLine*/ + !0 + ), _6( + o, + g, + n, + 3, + /*hasTrailingNewLine*/ + !0 + ); + } else if (t === I9.name && c) { + const g = o || N.createVoidZero(); + u = s9(g) ? N.createParenthesizedExpression(g) : g, mN( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ), _6( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ), QD( + c, + u, + n, + 3, + /*hasTrailingNewLine*/ + !1 + ); + } else + E.fail("invalid action"); + return { renameFilename: void 0, renameLocation: void 0, edits: Yr.ChangeTracker.with(e, (g) => { + g.replaceNode(n, _.body, u); + }) }; + } + function eTe(e, t, n = !0, i) { + const s = Ei(e, t), o = yf(s); + if (!o) + return { + error: as(p.Could_not_find_a_containing_arrow_function) + }; + if (!xo(o)) + return { + error: as(p.Containing_function_is_not_an_arrow_function) + }; + if (!(!Mf(o, s) || Mf(o.body, s) && !n)) { + if (hv(pq.kind, i) && ct(o.body)) + return { func: o, addBraces: !0, expression: o.body }; + if (hv(I9.kind, i) && ms(o.body) && o.body.statements.length === 1) { + const c = fa(o.body.statements); + if (Mp(c)) { + const _ = c.expression && Gs(kC( + c.expression, + /*stopAtCallExpressions*/ + !1 + )) ? N.createParenthesizedExpression(c.expression) : c.expression; + return { func: o, addBraces: !1, expression: _, returnStatement: c }; + } + } + } + } + var UJe = {}, tTe = "Convert arrow function or function expression", qJe = as(p.Convert_arrow_function_or_function_expression), O9 = { + name: "Convert to anonymous function", + description: as(p.Convert_to_anonymous_function), + kind: "refactor.rewrite.function.anonymous" + }, F9 = { + name: "Convert to named function", + description: as(p.Convert_to_named_function), + kind: "refactor.rewrite.function.named" + }, L9 = { + name: "Convert to arrow function", + description: as(p.Convert_to_arrow_function), + kind: "refactor.rewrite.function.arrow" + }; + Wg(tTe, { + kinds: [ + O9.kind, + F9.kind, + L9.kind + ], + getEditsForAction: GJe, + getAvailableActions: HJe + }); + function HJe(e) { + const { file: t, startPosition: n, program: i, kind: s } = e, o = nTe(t, n, i); + if (!o) return He; + const { selectedVariableDeclaration: c, func: _ } = o, u = [], d = []; + if (hv(F9.kind, s)) { + const g = c || xo(_) && ti(_.parent) ? void 0 : as(p.Could_not_convert_to_named_function); + g ? d.push({ ...F9, notApplicableReason: g }) : u.push(F9); + } + if (hv(O9.kind, s)) { + const g = !c && xo(_) ? void 0 : as(p.Could_not_convert_to_anonymous_function); + g ? d.push({ ...O9, notApplicableReason: g }) : u.push(O9); + } + if (hv(L9.kind, s)) { + const g = po(_) ? void 0 : as(p.Could_not_convert_to_arrow_function); + g ? d.push({ ...L9, notApplicableReason: g }) : u.push(L9); + } + return [{ + name: tTe, + description: qJe, + actions: u.length === 0 && e.preferences.provideRefactorNotApplicableReason ? d : u + }]; + } + function GJe(e, t) { + const { file: n, startPosition: i, program: s } = e, o = nTe(n, i, s); + if (!o) return; + const { func: c } = o, _ = []; + switch (t) { + case O9.name: + _.push(...YJe(e, c)); + break; + case F9.name: + const u = QJe(c); + if (!u) return; + _.push(...ZJe(e, c, u)); + break; + case L9.name: + if (!po(c)) return; + _.push(...KJe(e, c)); + break; + default: + return E.fail("invalid action"); + } + return { renameFilename: void 0, renameLocation: void 0, edits: _ }; + } + function rTe(e) { + let t = !1; + return e.forEachChild(function n(i) { + if (s6(i)) { + t = !0; + return; + } + !Qn(i) && !Ac(i) && !po(i) && gs(i, n); + }), t; + } + function nTe(e, t, n) { + const i = Ei(e, t), s = n.getTypeChecker(), o = XJe(e, s, i.parent); + if (o && !rTe(o.body) && !s.containsArgumentsReference(o)) + return { selectedVariableDeclaration: !0, func: o }; + const c = yf(i); + if (c && (po(c) || xo(c)) && !Mf(c.body, i) && !rTe(c.body) && !s.containsArgumentsReference(c)) + return po(c) && sTe(e, s, c) ? void 0 : { selectedVariableDeclaration: !1, func: c }; + } + function $Je(e) { + return ti(e) || Il(e) && e.declarations.length === 1; + } + function XJe(e, t, n) { + if (!$Je(n)) + return; + const s = (ti(n) ? n : fa(n.declarations)).initializer; + if (s && (xo(s) || po(s) && !sTe(e, t, s))) + return s; + } + function iTe(e) { + if (ct(e)) { + const t = N.createReturnStatement(e), n = e.getSourceFile(); + return ot(t, e), of(t), mN( + e, + t, + n, + /*commentKind*/ + void 0, + /*hasTrailingNewLine*/ + !0 + ), N.createBlock( + [t], + /*multiLine*/ + !0 + ); + } else + return e; + } + function QJe(e) { + const t = e.parent; + if (!ti(t) || !i4(t)) return; + const n = t.parent, i = n.parent; + if (!(!Il(n) || !yc(i) || !Re(t.name))) + return { variableDeclaration: t, variableDeclarationList: n, statement: i, name: t.name }; + } + function YJe(e, t) { + const { file: n } = e, i = iTe(t.body), s = N.createFunctionExpression( + t.modifiers, + t.asteriskToken, + /*name*/ + void 0, + t.typeParameters, + t.parameters, + t.type, + i + ); + return Yr.ChangeTracker.with(e, (o) => o.replaceNode(n, t, s)); + } + function ZJe(e, t, n) { + const { file: i } = e, s = iTe(t.body), { variableDeclaration: o, variableDeclarationList: c, statement: _, name: u } = n; + kU(_); + const d = L1(o) & 32 | Au(t), g = N.createModifiersFromModifierFlags(d), h = N.createFunctionDeclaration(Dr(g) ? g : void 0, t.asteriskToken, u, t.typeParameters, t.parameters, t.type, s); + return c.declarations.length === 1 ? Yr.ChangeTracker.with(e, (S) => S.replaceNode(i, _, h)) : Yr.ChangeTracker.with(e, (S) => { + S.delete(i, o), S.insertNodeAfter(i, _, h); + }); + } + function KJe(e, t) { + const { file: n } = e, s = t.body.statements[0]; + let o; + eze(t.body, s) ? (o = s.expression, of(o), vS(s, o)) : o = t.body; + const c = N.createArrowFunction(t.modifiers, t.typeParameters, t.parameters, t.type, N.createToken( + 39 + /* EqualsGreaterThanToken */ + ), o); + return Yr.ChangeTracker.with(e, (_) => _.replaceNode(n, t, c)); + } + function eze(e, t) { + return e.statements.length === 1 && Mp(t) && !!t.expression; + } + function sTe(e, t, n) { + return !!n.name && yo.Core.isSymbolReferencedInFile(n.name, t, e); + } + var tze = {}, dq = "Convert parameters to destructured object", rze = 1, aTe = as(p.Convert_parameters_to_destructured_object), oTe = { + name: dq, + description: aTe, + kind: "refactor.rewrite.parameters.toDestructured" + }; + Wg(dq, { + kinds: [oTe.kind], + getEditsForAction: ize, + getAvailableActions: nze + }); + function nze(e) { + const { file: t, startPosition: n } = e; + return p_(t) || !uTe(t, n, e.program.getTypeChecker()) ? He : [{ + name: dq, + description: aTe, + actions: [oTe] + }]; + } + function ize(e, t) { + E.assert(t === dq, "Unexpected action name"); + const { file: n, startPosition: i, program: s, cancellationToken: o, host: c } = e, _ = uTe(n, i, s.getTypeChecker()); + if (!_ || !o) return; + const u = aze(_, s, o); + return u.valid ? { renameFilename: void 0, renameLocation: void 0, edits: Yr.ChangeTracker.with(e, (g) => sze(n, s, c, g, _, u)) } : { edits: [] }; + } + function sze(e, t, n, i, s, o) { + const c = o.signature, _ = or(dTe(s, t, n), (g) => qa(g)); + if (c) { + const g = or(dTe(c, t, n), (h) => qa(h)); + d(c, g); + } + d(s, _); + const u = SE( + o.functionCalls, + /*comparer*/ + (g, h) => uo(g.pos, h.pos) + ); + for (const g of u) + if (g.arguments && g.arguments.length) { + const h = qa( + gze(s, g.arguments), + /*includeTrivia*/ + !0 + ); + i.replaceNodeRange( + xr(g), + fa(g.arguments), + ia(g.arguments), + h, + { leadingTriviaOption: Yr.LeadingTriviaOption.IncludeAll, trailingTriviaOption: Yr.TrailingTriviaOption.Include } + ); + } + function d(g, h) { + i.replaceNodeRangeWithNodes( + e, + fa(g.parameters), + ia(g.parameters), + h, + { + joiner: ", ", + // indentation is set to 0 because otherwise the object parameter will be indented if there is a `this` parameter + indentation: 0, + leadingTriviaOption: Yr.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: Yr.TrailingTriviaOption.Include + } + ); + } + } + function aze(e, t, n) { + const i = yze(e), s = ec(e) ? hze(e) : [], o = tb([...i, ...s], Kh), c = t.getTypeChecker(), _ = Xs( + o, + /*mapfn*/ + (h) => yo.getReferenceEntriesForNode(-1, h, t, t.getSourceFiles(), n) + ), u = d(_); + return Ri( + u.declarations, + /*callback*/ + (h) => ls(o, h) + ) || (u.valid = !1), u; + function d(h) { + const S = { accessExpressions: [], typeUsages: [] }, T = { functionCalls: [], declarations: [], classReferences: S, valid: !0 }, C = or(i, g), D = or(s, g), P = ec(e), O = or(i, (j) => Koe(j, c)); + for (const j of h) { + if (j.kind === yo.EntryKind.Span) { + T.valid = !1; + continue; + } + if (ls(O, g(j.node))) { + if (uze(j.node.parent)) { + T.signature = j.node.parent; + continue; + } + const V = lTe(j); + if (V) { + T.functionCalls.push(V); + continue; + } + } + const F = Koe(j.node, c); + if (F && ls(O, F)) { + const V = ece(j); + if (V) { + T.declarations.push(V); + continue; + } + } + if (ls(C, g(j.node)) || WD(j.node)) { + if (cTe(j)) + continue; + const L = ece(j); + if (L) { + T.declarations.push(L); + continue; + } + const $ = lTe(j); + if ($) { + T.functionCalls.push($); + continue; + } + } + if (P && ls(D, g(j.node))) { + if (cTe(j)) + continue; + const L = ece(j); + if (L) { + T.declarations.push(L); + continue; + } + const $ = oze(j); + if ($) { + S.accessExpressions.push($); + continue; + } + if (rl(e.parent)) { + const U = cze(j); + if (U) { + S.typeUsages.push(U); + continue; + } + } + } + T.valid = !1; + } + return T; + } + function g(h) { + const S = c.getSymbolAtLocation(h); + return S && TU(S, c); + } + } + function Koe(e, t) { + const n = wN(e); + if (n) { + const i = t.getContextualTypeForObjectLiteralElement(n), s = i?.getSymbol(); + if (s && !(gc(s) & 6)) + return s; + } + } + function cTe(e) { + const t = e.node; + if (Yu(t.parent) || kd(t.parent) || nl(t.parent) || Rg(t.parent) || pu(t.parent) || ko(t.parent)) + return t; + } + function ece(e) { + if (tu(e.node.parent)) + return e.node; + } + function lTe(e) { + if (e.node.parent) { + const t = e.node, n = t.parent; + switch (n.kind) { + case 213: + case 214: + const i = Jn(n, Qd); + if (i && i.expression === t) + return i; + break; + case 211: + const s = Jn(n, Dn); + if (s && s.parent && s.name === t) { + const c = Jn(s.parent, Qd); + if (c && c.expression === s) + return c; + } + break; + case 212: + const o = Jn(n, ho); + if (o && o.parent && o.argumentExpression === t) { + const c = Jn(o.parent, Qd); + if (c && c.expression === o) + return c; + } + break; + } + } + } + function oze(e) { + if (e.node.parent) { + const t = e.node, n = t.parent; + switch (n.kind) { + case 211: + const i = Jn(n, Dn); + if (i && i.expression === t) + return i; + break; + case 212: + const s = Jn(n, ho); + if (s && s.expression === t) + return s; + break; + } + } + } + function cze(e) { + const t = e.node; + if (hS(t) === 2 || q7(t.parent)) + return t; + } + function uTe(e, t, n) { + const i = a6(e, t), s = BZ(i); + if (!lze(i) && s && _ze(s, n) && Mf(s, i) && !(s.body && Mf(s.body, i))) + return s; + } + function lze(e) { + const t = sr(e, Yk); + if (t) { + const n = sr(t, (i) => !Yk(i)); + return !!n && so(n); + } + return !1; + } + function uze(e) { + return um(e) && (Vl(e.parent) || Xu(e.parent)); + } + function _ze(e, t) { + var n; + if (!fze(e.parameters, t)) return !1; + switch (e.kind) { + case 262: + return _Te(e) && M9(e, t); + case 174: + if (Gs(e.parent)) { + const i = Koe(e.name, t); + return ((n = i?.declarations) == null ? void 0 : n.length) === 1 && M9(e, t); + } + return M9(e, t); + case 176: + return rl(e.parent) ? _Te(e.parent) && M9(e, t) : fTe(e.parent.parent) && M9(e, t); + case 218: + case 219: + return fTe(e.parent); + } + return !1; + } + function M9(e, t) { + return !!e.body && !t.isImplementationOfOverload(e); + } + function _Te(e) { + return e.name ? !0 : !!c6( + e, + 90 + /* DefaultKeyword */ + ); + } + function fze(e, t) { + return dze(e) >= rze && Ri( + e, + /*callback*/ + (n) => pze(n, t) + ); + } + function pze(e, t) { + if (Um(e)) { + const n = t.getTypeAtLocation(e); + if (!t.isArrayType(n) && !t.isTupleType(n)) return !1; + } + return !e.modifiers && Re(e.name); + } + function fTe(e) { + return ti(e) && iC(e) && Re(e.name) && !e.type; + } + function tce(e) { + return e.length > 0 && s6(e[0].name); + } + function dze(e) { + return tce(e) ? e.length - 1 : e.length; + } + function pTe(e) { + return tce(e) && (e = N.createNodeArray(e.slice(1), e.hasTrailingComma)), e; + } + function mze(e, t) { + return Re(t) && Ip(t) === e ? N.createShorthandPropertyAssignment(e) : N.createPropertyAssignment(e, t); + } + function gze(e, t) { + const n = pTe(e.parameters), i = Um(ia(n)), s = i ? t.slice(0, n.length - 1) : t, o = or(s, (_, u) => { + const d = mq(n[u]), g = mze(d, _); + return of(g.name), qc(g) && of(g.initializer), vS(_, g), g; + }); + if (i && t.length >= n.length) { + const _ = t.slice(n.length - 1), u = N.createPropertyAssignment(mq(ia(n)), N.createArrayLiteralExpression(_)); + o.push(u); + } + return N.createObjectLiteralExpression( + o, + /*multiLine*/ + !1 + ); + } + function dTe(e, t, n) { + const i = t.getTypeChecker(), s = pTe(e.parameters), o = or(s, g), c = N.createObjectBindingPattern(o), _ = h(s); + let u; + Ri(s, C) && (u = N.createObjectLiteralExpression()); + const d = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + c, + /*questionToken*/ + void 0, + _, + u + ); + if (tce(e.parameters)) { + const D = e.parameters[0], P = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + D.name, + /*questionToken*/ + void 0, + D.type + ); + return of(P.name), vS(D.name, P.name), D.type && (of(P.type), vS(D.type, P.type)), N.createNodeArray([P, d]); + } + return N.createNodeArray([d]); + function g(D) { + const P = N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + mq(D), + Um(D) && C(D) ? N.createArrayLiteralExpression() : D.initializer + ); + return of(P), D.initializer && P.initializer && vS(D.initializer, P.initializer), P; + } + function h(D) { + const P = or(D, S); + return cm( + N.createTypeLiteralNode(P), + 1 + /* SingleLine */ + ); + } + function S(D) { + let P = D.type; + !P && (D.initializer || Um(D)) && (P = T(D)); + const O = N.createPropertySignature( + /*modifiers*/ + void 0, + mq(D), + C(D) ? N.createToken( + 58 + /* QuestionToken */ + ) : D.questionToken, + P + ); + return of(O), vS(D.name, O.name), D.type && O.type && vS(D.type, O.type), O; + } + function T(D) { + const P = i.getTypeAtLocation(D); + return ZD(P, D, t, n); + } + function C(D) { + if (Um(D)) { + const P = i.getTypeAtLocation(D); + return !i.isTupleType(P); + } + return i.isOptionalParameter(D); + } + } + function mq(e) { + return Ip(e.name); + } + function hze(e) { + switch (e.parent.kind) { + case 263: + const t = e.parent; + return t.name ? [t.name] : [E.checkDefined( + c6( + t, + 90 + /* DefaultKeyword */ + ), + "Nameless class declaration should be a default export" + )]; + case 231: + const i = e.parent, s = e.parent.parent, o = i.name; + return o ? [o, s.name] : [s.name]; + } + } + function yze(e) { + switch (e.kind) { + case 262: + return e.name ? [e.name] : [E.checkDefined( + c6( + e, + 90 + /* DefaultKeyword */ + ), + "Nameless function declaration should be a default export" + )]; + case 174: + return [e.name]; + case 176: + const n = E.checkDefined( + Ya(e, 137, e.getSourceFile()), + "Constructor declaration should have constructor keyword" + ); + return e.parent.kind === 231 ? [e.parent.parent.name, n] : [n]; + case 219: + return [e.parent.name]; + case 218: + return e.name ? [e.name, e.parent.name] : [e.parent.name]; + default: + return E.assertNever(e, `Unexpected function declaration kind ${e.kind}`); + } + } + var vze = {}, rce = "Convert to template string", nce = as(p.Convert_to_template_string), ice = { + name: rce, + description: nce, + kind: "refactor.rewrite.string" + }; + Wg(rce, { + kinds: [ice.kind], + getEditsForAction: Sze, + getAvailableActions: bze + }); + function bze(e) { + const { file: t, startPosition: n } = e, i = mTe(t, n), s = sce(i), o = Ks(s), c = { name: rce, description: nce, actions: [] }; + return o && e.triggerReason !== "invoked" ? He : Sd(s) && (o || cn(s) && ace(s).isValidConcatenation) ? (c.actions.push(ice), [c]) : e.preferences.provideRefactorNotApplicableReason ? (c.actions.push({ ...ice, notApplicableReason: as(p.Can_only_convert_string_concatenations_and_string_literals) }), [c]) : He; + } + function mTe(e, t) { + const n = Ei(e, t), i = sce(n); + return !ace(i).isValidConcatenation && Qu(i.parent) && cn(i.parent.parent) ? i.parent.parent : n; + } + function Sze(e, t) { + const { file: n, startPosition: i } = e, s = mTe(n, i); + switch (t) { + case nce: + return { edits: Tze(e, s) }; + default: + return E.fail("invalid action"); + } + } + function Tze(e, t) { + const n = sce(t), i = e.file, s = Dze(ace(n), i), o = oy(i.text, n.end); + if (o) { + const c = o[o.length - 1], _ = { pos: o[0].pos, end: c.end }; + return Yr.ChangeTracker.with(e, (u) => { + u.deleteRange(i, _), u.replaceNode(i, n, s); + }); + } else + return Yr.ChangeTracker.with(e, (c) => c.replaceNode(i, n, s)); + } + function xze(e) { + return !(e.operatorToken.kind === 64 || e.operatorToken.kind === 65); + } + function sce(e) { + return sr(e.parent, (n) => { + switch (n.kind) { + case 211: + case 212: + return !1; + case 228: + case 226: + return !(cn(n.parent) && xze(n.parent)); + default: + return "quit"; + } + }) || e; + } + function ace(e) { + const t = (c) => { + if (!cn(c)) + return { nodes: [c], operators: [], validOperators: !0, hasString: Ks(c) || lx(c) }; + const { nodes: _, operators: u, hasString: d, validOperators: g } = t(c.left); + if (!(d || Ks(c.right) || q5(c.right))) + return { nodes: [c], operators: [], hasString: !1, validOperators: !0 }; + const h = c.operatorToken.kind === 40, S = g && h; + return _.push(c.right), u.push(c.operatorToken), { nodes: _, operators: u, hasString: !0, validOperators: S }; + }, { nodes: n, operators: i, validOperators: s, hasString: o } = t(e); + return { nodes: n, operators: i, isValidConcatenation: s && o }; + } + var kze = (e, t) => (n, i) => { + n < e.length && QD( + e[n], + i, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ); + }, Cze = (e, t, n) => (i, s) => { + for (; i.length > 0; ) { + const o = i.shift(); + QD( + e[o], + s, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ), n(o, s); + } + }; + function Eze(e) { + return e.replace(/\\.|[$`]/g, (t) => t[0] === "\\" ? t : "\\" + t); + } + function gTe(e) { + const t = ux(e) || DJ(e) ? -2 : -1; + return sc(e).slice(1, t); + } + function hTe(e, t) { + const n = []; + let i = "", s = ""; + for (; e < t.length; ) { + const o = t[e]; + if (Ga(o)) + i += o.text, s += Eze(sc(o).slice(1, -1)), n.push(e), e++; + else if (q5(o)) { + i += o.head.text, s += gTe(o.head); + break; + } else + break; + } + return [e, i, s, n]; + } + function Dze({ nodes: e, operators: t }, n) { + const i = kze(t, n), s = Cze(e, n, i), [o, c, _, u] = hTe(0, e); + if (o === e.length) { + const h = N.createNoSubstitutionTemplateLiteral(c, _); + return s(u, h), h; + } + const d = [], g = N.createTemplateHead(c, _); + s(u, g); + for (let h = o; h < e.length; h++) { + const S = Pze(e[h]); + i(h, S); + const [T, C, D, P] = hTe(h + 1, e); + h = T - 1; + const O = h === e.length - 1; + if (q5(S)) { + const j = or(S.templateSpans, (F, V) => { + yTe(F); + const L = V === S.templateSpans.length - 1, $ = F.literal.text + (L ? C : ""), U = gTe(F.literal) + (L ? D : ""); + return N.createTemplateSpan( + F.expression, + O && L ? N.createTemplateTail($, U) : N.createTemplateMiddle($, U) + ); + }); + d.push(...j); + } else { + const j = O ? N.createTemplateTail(C, D) : N.createTemplateMiddle(C, D); + s(P, j), d.push(N.createTemplateSpan(S, j)); + } + } + return N.createTemplateExpression(g, d); + } + function yTe(e) { + const t = e.getSourceFile(); + QD( + e, + e.expression, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ), mN( + e.expression, + e.expression, + t, + 3, + /*hasTrailingNewLine*/ + !1 + ); + } + function Pze(e) { + return Qu(e) && (yTe(e), e = e.expression), e; + } + var wze = {}, gq = "Convert to optional chain expression", oce = as(p.Convert_to_optional_chain_expression), cce = { + name: gq, + description: oce, + kind: "refactor.rewrite.expression.optionalChain" + }; + Wg(gq, { + kinds: [cce.kind], + getEditsForAction: Nze, + getAvailableActions: Aze + }); + function Aze(e) { + const t = vTe(e, e.triggerReason === "invoked"); + return t ? Eh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: gq, + description: oce, + actions: [{ ...cce, notApplicableReason: t.error }] + }] : He : [{ + name: gq, + description: oce, + actions: [cce] + }] : He; + } + function Nze(e, t) { + const n = vTe(e); + return E.assert(n && !Eh(n), "Expected applicable refactor info"), { edits: Yr.ChangeTracker.with(e, (s) => Bze(e.file, e.program.getTypeChecker(), s, n)), renameFilename: void 0, renameLocation: void 0 }; + } + function hq(e) { + return cn(e) || yx(e); + } + function Ize(e) { + return Pl(e) || Mp(e) || yc(e); + } + function yq(e) { + return hq(e) || Ize(e); + } + function vTe(e, t = !0) { + const { file: n, program: i } = e, s = Bx(e), o = s.length === 0; + if (o && !t) return; + const c = Ei(n, s.start), _ = UF(n, s.start + s.length), u = Mc(c.pos, _ && _.end >= c.pos ? _.getEnd() : c.getEnd()), d = o ? Rze(c) : Mze(c, u), g = d && yq(d) ? jze(d) : void 0; + if (!g) return { error: as(p.Could_not_find_convertible_access_expression) }; + const h = i.getTypeChecker(); + return yx(g) ? Oze(g, h) : Fze(g); + } + function Oze(e, t) { + const n = e.condition, i = uce(e.whenTrue); + if (!i || t.isNullableType(t.getTypeAtLocation(i))) + return { error: as(p.Could_not_find_convertible_access_expression) }; + if ((Dn(n) || Re(n)) && lce(n, i.expression)) + return { finalExpression: i, occurrences: [n], expression: e }; + if (cn(n)) { + const s = bTe(i.expression, n); + return s ? { finalExpression: i, occurrences: s, expression: e } : { error: as(p.Could_not_find_matching_access_expressions) }; + } + } + function Fze(e) { + if (e.operatorToken.kind !== 56) + return { error: as(p.Can_only_convert_logical_AND_access_chains) }; + const t = uce(e.right); + if (!t) return { error: as(p.Could_not_find_convertible_access_expression) }; + const n = bTe(t.expression, e.left); + return n ? { finalExpression: t, occurrences: n, expression: e } : { error: as(p.Could_not_find_matching_access_expressions) }; + } + function bTe(e, t) { + const n = []; + for (; cn(t) && t.operatorToken.kind === 56; ) { + const s = lce(Ja(e), Ja(t.right)); + if (!s) + break; + n.push(s), e = s, t = t.left; + } + const i = lce(e, t); + return i && n.push(i), n.length > 0 ? n : void 0; + } + function lce(e, t) { + if (!(!Re(t) && !Dn(t) && !ho(t))) + return Lze(e, t) ? t : void 0; + } + function Lze(e, t) { + for (; (Es(e) || Dn(e) || ho(e)) && EN(e) !== EN(t); ) + e = e.expression; + for (; Dn(e) && Dn(t) || ho(e) && ho(t); ) { + if (EN(e) !== EN(t)) return !1; + e = e.expression, t = t.expression; + } + return Re(e) && Re(t) && e.getText() === t.getText(); + } + function EN(e) { + if (Re(e) || Pf(e)) + return e.getText(); + if (Dn(e)) + return EN(e.name); + if (ho(e)) + return EN(e.argumentExpression); + } + function Mze(e, t) { + for (; e.parent; ) { + if (yq(e) && t.length !== 0 && e.end >= t.start + t.length) + return e; + e = e.parent; + } + } + function Rze(e) { + for (; e.parent; ) { + if (yq(e) && !yq(e.parent)) + return e; + e = e.parent; + } + } + function jze(e) { + if (hq(e)) + return e; + if (yc(e)) { + const t = JT(e), n = t?.initializer; + return n && hq(n) ? n : void 0; + } + return e.expression && hq(e.expression) ? e.expression : void 0; + } + function uce(e) { + if (e = Ja(e), cn(e)) + return uce(e.left); + if ((Dn(e) || ho(e) || Es(e)) && !fu(e)) + return e; + } + function STe(e, t, n) { + if (Dn(t) || ho(t) || Es(t)) { + const i = STe(e, t.expression, n), s = n.length > 0 ? n[n.length - 1] : void 0, o = s?.getText() === t.expression.getText(); + if (o && n.pop(), Es(t)) + return o ? N.createCallChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.typeArguments, t.arguments) : N.createCallChain(i, t.questionDotToken, t.typeArguments, t.arguments); + if (Dn(t)) + return o ? N.createPropertyAccessChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.name) : N.createPropertyAccessChain(i, t.questionDotToken, t.name); + if (ho(t)) + return o ? N.createElementAccessChain(i, N.createToken( + 29 + /* QuestionDotToken */ + ), t.argumentExpression) : N.createElementAccessChain(i, t.questionDotToken, t.argumentExpression); + } + return t; + } + function Bze(e, t, n, i, s) { + const { finalExpression: o, occurrences: c, expression: _ } = i, u = c[c.length - 1], d = STe(t, o, c); + d && (Dn(d) || ho(d) || Es(d)) && (cn(_) ? n.replaceNodeRange(e, u, o, d) : yx(_) && n.replaceNode(e, _, N.createBinaryExpression(d, N.createToken( + 61 + /* QuestionQuestionToken */ + ), _.whenFalse))); + } + var TTe = {}; + Qa(TTe, { + Messages: () => Ul, + RangeFacts: () => CTe, + getRangeToExtract: () => _ce, + getRefactorActionsToExtractSymbol: () => xTe, + getRefactorEditsToExtractSymbol: () => kTe + }); + var rP = "Extract Symbol", nP = { + name: "Extract Constant", + description: as(p.Extract_constant), + kind: "refactor.extract.constant" + }, iP = { + name: "Extract Function", + description: as(p.Extract_function), + kind: "refactor.extract.function" + }; + Wg(rP, { + kinds: [ + nP.kind, + iP.kind + ], + getEditsForAction: kTe, + getAvailableActions: xTe + }); + function xTe(e) { + const t = e.kind, n = _ce(e.file, Bx(e), e.triggerReason === "invoked"), i = n.targetRange; + if (i === void 0) { + if (!n.errors || n.errors.length === 0 || !e.preferences.provideRefactorNotApplicableReason) + return He; + const D = []; + return hv(iP.kind, t) && D.push({ + name: rP, + description: iP.description, + actions: [{ ...iP, notApplicableReason: C(n.errors) }] + }), hv(nP.kind, t) && D.push({ + name: rP, + description: nP.description, + actions: [{ ...nP, notApplicableReason: C(n.errors) }] + }), D; + } + const { affectedTextRange: s, extractions: o } = qze(i, e); + if (o === void 0) + return He; + const c = [], _ = /* @__PURE__ */ new Map(); + let u; + const d = [], g = /* @__PURE__ */ new Map(); + let h, S = 0; + for (const { functionExtraction: D, constantExtraction: P } of o) { + if (hv(iP.kind, t)) { + const O = D.description; + D.errors.length === 0 ? _.has(O) || (_.set(O, !0), c.push({ + description: O, + name: `function_scope_${S}`, + kind: iP.kind, + range: { + start: { line: Vs(e.file, s.pos).line, offset: Vs(e.file, s.pos).character }, + end: { line: Vs(e.file, s.end).line, offset: Vs(e.file, s.end).character } + } + })) : u || (u = { + description: O, + name: `function_scope_${S}`, + notApplicableReason: C(D.errors), + kind: iP.kind + }); + } + if (hv(nP.kind, t)) { + const O = P.description; + P.errors.length === 0 ? g.has(O) || (g.set(O, !0), d.push({ + description: O, + name: `constant_scope_${S}`, + kind: nP.kind, + range: { + start: { line: Vs(e.file, s.pos).line, offset: Vs(e.file, s.pos).character }, + end: { line: Vs(e.file, s.end).line, offset: Vs(e.file, s.end).character } + } + })) : h || (h = { + description: O, + name: `constant_scope_${S}`, + notApplicableReason: C(P.errors), + kind: nP.kind + }); + } + S++; + } + const T = []; + return c.length ? T.push({ + name: rP, + description: as(p.Extract_function), + actions: c + }) : e.preferences.provideRefactorNotApplicableReason && u && T.push({ + name: rP, + description: as(p.Extract_function), + actions: [u] + }), d.length ? T.push({ + name: rP, + description: as(p.Extract_constant), + actions: d + }) : e.preferences.provideRefactorNotApplicableReason && h && T.push({ + name: rP, + description: as(p.Extract_constant), + actions: [h] + }), T.length ? T : He; + function C(D) { + let P = D[0].messageText; + return typeof P != "string" && (P = P.messageText), P; + } + } + function kTe(e, t) { + const i = _ce(e.file, Bx(e)).targetRange, s = /^function_scope_(\d+)$/.exec(t); + if (s) { + const c = +s[1]; + return E.assert(isFinite(c), "Expected to parse a finite number from the function scope index"), Vze(i, e, c); + } + const o = /^constant_scope_(\d+)$/.exec(t); + if (o) { + const c = +o[1]; + return E.assert(isFinite(c), "Expected to parse a finite number from the constant scope index"), Uze(i, e, c); + } + E.fail("Unrecognized action name"); + } + var Ul; + ((e) => { + function t(n) { + return { message: n, code: 0, category: 3, key: n }; + } + e.cannotExtractRange = t("Cannot extract range."), e.cannotExtractImport = t("Cannot extract import statement."), e.cannotExtractSuper = t("Cannot extract super call."), e.cannotExtractJSDoc = t("Cannot extract JSDoc."), e.cannotExtractEmpty = t("Cannot extract empty range."), e.expressionExpected = t("expression expected."), e.uselessConstantType = t("No reason to extract constant of type."), e.statementOrExpressionExpected = t("Statement or expression expected."), e.cannotExtractRangeContainingConditionalBreakOrContinueStatements = t("Cannot extract range containing conditional break or continue statements."), e.cannotExtractRangeContainingConditionalReturnStatement = t("Cannot extract range containing conditional return statement."), e.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange = t("Cannot extract range containing labeled break or continue with target outside of the range."), e.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators = t("Cannot extract range containing writes to references located outside of the target range in generators."), e.typeWillNotBeVisibleInTheNewScope = t("Type will not visible in the new scope."), e.functionWillNotBeVisibleInTheNewScope = t("Function will not visible in the new scope."), e.cannotExtractIdentifier = t("Select more than a single identifier."), e.cannotExtractExportedEntity = t("Cannot extract exported declaration"), e.cannotWriteInExpression = t("Cannot write back side-effects when extracting an expression"), e.cannotExtractReadonlyPropertyInitializerOutsideConstructor = t("Cannot move initialization of read-only class property outside of the constructor"), e.cannotExtractAmbientBlock = t("Cannot extract code from ambient contexts"), e.cannotAccessVariablesFromNestedScopes = t("Cannot access variables from nested scopes"), e.cannotExtractToJSClass = t("Cannot extract constant to a class scope in JS"), e.cannotExtractToExpressionArrowFunction = t("Cannot extract constant to an arrow function without a block"), e.cannotExtractFunctionsContainingThisToMethod = t("Cannot extract functions containing this to method"); + })(Ul || (Ul = {})); + var CTe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.HasReturn = 1] = "HasReturn", e[e.IsGenerator = 2] = "IsGenerator", e[e.IsAsyncFunction = 4] = "IsAsyncFunction", e[e.UsesThis = 8] = "UsesThis", e[e.UsesThisInFunction = 16] = "UsesThisInFunction", e[e.InStaticRegion = 32] = "InStaticRegion", e))(CTe || {}); + function _ce(e, t, n = !0) { + const { length: i } = t; + if (i === 0 && !n) + return { errors: [xl(e, t.start, i, Ul.cannotExtractEmpty)] }; + const s = i === 0 && n, o = nae(e, t.start), c = UF(e, wc(t)), _ = o && c && n ? Jze(o, c, e) : t, u = s ? _We(o) : _N(o, e, _), d = s ? u : _N(c, e, _); + let g = 0, h; + if (!u || !d) + return { errors: [xl(e, t.start, i, Ul.cannotExtractRange)] }; + if (u.flags & 16777216) + return { errors: [xl(e, t.start, i, Ul.cannotExtractJSDoc)] }; + if (u.parent !== d.parent) + return { errors: [xl(e, t.start, i, Ul.cannotExtractRange)] }; + if (u !== d) { + if (!d6(u.parent)) + return { errors: [xl(e, t.start, i, Ul.cannotExtractRange)] }; + const j = []; + for (const F of u.parent.statements) { + if (F === u || j.length) { + const V = O(F); + if (V) + return { errors: V }; + j.push(F); + } + if (F === d) + break; + } + return j.length ? { targetRange: { range: j, facts: g, thisNode: h } } : { errors: [xl(e, t.start, i, Ul.cannotExtractRange)] }; + } + if (Mp(u) && !u.expression) + return { errors: [xl(e, t.start, i, Ul.cannotExtractRange)] }; + const S = C(u), T = D(S) || O(S); + if (T) + return { errors: T }; + return { targetRange: { range: zze(S), facts: g, thisNode: h } }; + function C(j) { + if (Mp(j)) { + if (j.expression) + return j.expression; + } else if (yc(j) || Il(j)) { + const F = yc(j) ? j.declarationList.declarations : j.declarations; + let V = 0, L; + for (const $ of F) + $.initializer && (V++, L = $.initializer); + if (V === 1) + return L; + } else if (ti(j) && j.initializer) + return j.initializer; + return j; + } + function D(j) { + if (Re(Pl(j) ? j.expression : j)) + return [Xr(j, Ul.cannotExtractIdentifier)]; + } + function P(j, F) { + let V = j; + for (; V !== F; ) { + if (V.kind === 172) { + Os(V) && (g |= 32); + break; + } else if (V.kind === 169) { + yf(V).kind === 176 && (g |= 32); + break; + } else V.kind === 174 && Os(V) && (g |= 32); + V = V.parent; + } + } + function O(j) { + let F; + if (((ce) => { + ce[ce.None = 0] = "None", ce[ce.Break = 1] = "Break", ce[ce.Continue = 2] = "Continue", ce[ce.Return = 4] = "Return"; + })(F || (F = {})), E.assert(j.pos <= j.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"), E.assert(!xd(j.pos), "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"), !hi(j) && !(Sd(j) && ETe(j)) && !gce(j)) + return [Xr(j, Ul.statementOrExpressionExpected)]; + if (j.flags & 33554432) + return [Xr(j, Ul.cannotExtractAmbientBlock)]; + const V = Nl(j); + V && P(j, V); + let L, $ = 4, U; + if (G(j), g & 8) { + const ce = Uu( + j, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + (ce.kind === 262 || ce.kind === 174 && ce.parent.kind === 210 || ce.kind === 218) && (g |= 16); + } + return L; + function G(ce) { + if (L) + return !0; + if (tu(ce)) { + const X = ce.kind === 260 ? ce.parent.parent : ce; + if (Vn( + X, + 32 + /* Export */ + )) + return (L || (L = [])).push(Xr(ce, Ul.cannotExtractExportedEntity)), !0; + } + switch (ce.kind) { + case 272: + return (L || (L = [])).push(Xr(ce, Ul.cannotExtractImport)), !0; + case 277: + return (L || (L = [])).push(Xr(ce, Ul.cannotExtractExportedEntity)), !0; + case 108: + if (ce.parent.kind === 213) { + const X = Nl(ce); + if (X === void 0 || X.pos < t.start || X.end >= t.start + t.length) + return (L || (L = [])).push(Xr(ce, Ul.cannotExtractSuper)), !0; + } else + g |= 8, h = ce; + break; + case 219: + gs(ce, function X(Z) { + if (s6(Z)) + g |= 8, h = ce; + else { + if (Qn(Z) || ps(Z) && !xo(Z)) + return !1; + gs(Z, X); + } + }); + case 263: + case 262: + yi(ce.parent) && ce.parent.externalModuleIndicator === void 0 && (L || (L = [])).push(Xr(ce, Ul.functionWillNotBeVisibleInTheNewScope)); + case 231: + case 218: + case 174: + case 176: + case 177: + case 178: + return !1; + } + const K = $; + switch (ce.kind) { + case 245: + $ &= -5; + break; + case 258: + $ = 0; + break; + case 241: + ce.parent && ce.parent.kind === 258 && ce.parent.finallyBlock === ce && ($ = 4); + break; + case 297: + case 296: + $ |= 1; + break; + default: + fy( + ce, + /*lookInLabeledStatements*/ + !1 + ) && ($ |= 3); + break; + } + switch (ce.kind) { + case 197: + case 110: + g |= 8, h = ce; + break; + case 256: { + const X = ce.label; + (U || (U = [])).push(X.escapedText), gs(ce, G), U.pop(); + break; + } + case 252: + case 251: { + const X = ce.label; + X ? ls(U, X.escapedText) || (L || (L = [])).push(Xr(ce, Ul.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)) : $ & (ce.kind === 252 ? 1 : 2) || (L || (L = [])).push(Xr(ce, Ul.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); + break; + } + case 223: + g |= 4; + break; + case 229: + g |= 2; + break; + case 253: + $ & 4 ? g |= 1 : (L || (L = [])).push(Xr(ce, Ul.cannotExtractRangeContainingConditionalReturnStatement)); + break; + default: + gs(ce, G); + break; + } + $ = K; + } + } + } + function Jze(e, t, n) { + const i = e.getStart(n); + let s = t.getEnd(); + return n.text.charCodeAt(s) === 59 && s++, { start: i, length: s - i }; + } + function zze(e) { + if (hi(e)) + return [e]; + if (Sd(e)) + return Pl(e.parent) ? [e.parent] : e; + if (gce(e)) + return e; + } + function fce(e) { + return xo(e) ? kj(e.body) : so(e) || yi(e) || _m(e) || Qn(e); + } + function Wze(e) { + let t = E0(e.range) ? fa(e.range) : e.range; + if (e.facts & 8 && !(e.facts & 16)) { + const i = Nl(t); + if (i) { + const s = sr(t, so); + return s ? [s, i] : [i]; + } + } + const n = []; + for (; ; ) + if (t = t.parent, t.kind === 169 && (t = sr(t, (i) => so(i)).parent), fce(t) && (n.push(t), t.kind === 307)) + return n; + } + function Vze(e, t, n) { + const { scopes: i, readsAndWrites: { target: s, usagesPerScope: o, functionErrorsPerScope: c, exposedVariableDeclarations: _ } } = pce(e, t); + return E.assert(!c[n].length, "The extraction went missing? How?"), t.cancellationToken.throwIfCancellationRequested(), Yze(s, i[n], o[n], _, e, t); + } + function Uze(e, t, n) { + const { scopes: i, readsAndWrites: { target: s, usagesPerScope: o, constantErrorsPerScope: c, exposedVariableDeclarations: _ } } = pce(e, t); + E.assert(!c[n].length, "The extraction went missing? How?"), E.assert(_.length === 0, "Extract constant accepted a range containing a variable declaration?"), t.cancellationToken.throwIfCancellationRequested(); + const u = ct(s) ? s : s.statements[0].expression; + return Zze(u, i[n], o[n], e.facts, t); + } + function qze(e, t) { + const { scopes: n, affectedTextRange: i, readsAndWrites: { functionErrorsPerScope: s, constantErrorsPerScope: o } } = pce(e, t), c = n.map((_, u) => { + const d = Hze(_), g = Gze(_), h = so(_) ? $ze(_) : Qn(_) ? Xze(_) : Qze(_); + let S, T; + return h === 1 ? (S = Og(as(p.Extract_to_0_in_1_scope), [d, "global"]), T = Og(as(p.Extract_to_0_in_1_scope), [g, "global"])) : h === 0 ? (S = Og(as(p.Extract_to_0_in_1_scope), [d, "module"]), T = Og(as(p.Extract_to_0_in_1_scope), [g, "module"])) : (S = Og(as(p.Extract_to_0_in_1), [d, h]), T = Og(as(p.Extract_to_0_in_1), [g, h])), u === 0 && !Qn(_) && (T = Og(as(p.Extract_to_0_in_enclosing_scope), [g])), { + functionExtraction: { + description: S, + errors: s[u] + }, + constantExtraction: { + description: T, + errors: o[u] + } + }; + }); + return { affectedTextRange: i, extractions: c }; + } + function pce(e, t) { + const { file: n } = t, i = Wze(e), s = lWe(e, n), o = uWe( + e, + i, + s, + n, + t.program.getTypeChecker(), + t.cancellationToken + ); + return { scopes: i, affectedTextRange: s, readsAndWrites: o }; + } + function Hze(e) { + return so(e) ? "inner function" : Qn(e) ? "method" : "function"; + } + function Gze(e) { + return Qn(e) ? "readonly field" : "constant"; + } + function $ze(e) { + switch (e.kind) { + case 176: + return "constructor"; + case 218: + case 262: + return e.name ? `function '${e.name.text}'` : DU; + case 219: + return "arrow function"; + case 174: + return `method '${e.name.getText()}'`; + case 177: + return `'get ${e.name.getText()}'`; + case 178: + return `'set ${e.name.getText()}'`; + default: + E.assertNever(e, `Unexpected scope kind ${e.kind}`); + } + } + function Xze(e) { + return e.kind === 263 ? e.name ? `class '${e.name.text}'` : "anonymous class declaration" : e.name ? `class expression '${e.name.text}'` : "anonymous class expression"; + } + function Qze(e) { + return e.kind === 268 ? `namespace '${e.parent.name.getText()}'` : e.externalModuleIndicator ? 0 : 1; + } + function Yze(e, t, { usages: n, typeParameterUsages: i, substitutions: s }, o, c, _) { + const u = _.program.getTypeChecker(), d = pa(_.program.getCompilerOptions()), g = vu.createImportAdder(_.file, _.program, _.preferences, _.host), h = t.getSourceFile(), S = bS(Qn(t) ? "newMethod" : "newFunction", h), T = Qr(t), C = N.createIdentifier(S); + let D; + const P = [], O = []; + let j; + n.forEach((de, ve) => { + let De; + if (!T) { + let Ie = u.getTypeOfSymbolAtLocation(de.symbol, de.node); + Ie = u.getBaseTypeOfLiteralType(Ie), De = vu.typeToAutoImportableTypeNode( + u, + g, + Ie, + t, + d, + 1 + /* NoTruncation */ + ); + } + const Xe = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + ve, + /*questionToken*/ + void 0, + De + ); + P.push(Xe), de.usage === 2 && (j || (j = [])).push(de), O.push(N.createIdentifier(ve)); + }); + const V = ts(i.values(), (de) => ({ type: de, declaration: eWe(de, _.startPosition) })).sort(tWe), L = V.length === 0 ? void 0 : Ii(V, ({ declaration: de }) => de), $ = L !== void 0 ? L.map((de) => N.createTypeReferenceNode( + de.name, + /*typeArguments*/ + void 0 + )) : void 0; + if (ct(e) && !T) { + const de = u.getContextualType(e); + D = u.typeToTypeNode( + de, + t, + 1 + /* NoTruncation */ + ); + } + const { body: U, returnValueProperty: G } = nWe(e, o, j, s, !!(c.facts & 1)); + of(U); + let ce; + const K = !!(c.facts & 16); + if (Qn(t)) { + const de = T ? [] : [N.createModifier( + 123 + /* PrivateKeyword */ + )]; + c.facts & 32 && de.push(N.createModifier( + 126 + /* StaticKeyword */ + )), c.facts & 4 && de.push(N.createModifier( + 134 + /* AsyncKeyword */ + )), ce = N.createMethodDeclaration( + de.length ? de : void 0, + c.facts & 2 ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + C, + /*questionToken*/ + void 0, + L, + P, + D, + U + ); + } else + K && P.unshift( + N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + "this", + /*questionToken*/ + void 0, + u.typeToTypeNode( + u.getTypeAtLocation(c.thisNode), + t, + 1 + /* NoTruncation */ + ), + /*initializer*/ + void 0 + ) + ), ce = N.createFunctionDeclaration( + c.facts & 4 ? [N.createToken( + 134 + /* AsyncKeyword */ + )] : void 0, + c.facts & 2 ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, + C, + L, + P, + D, + U + ); + const X = Yr.ChangeTracker.fromContext(_), Z = (E0(c.range) ? ia(c.range) : c.range).end, oe = aWe(Z, t); + oe ? X.insertNodeBefore( + _.file, + oe, + ce, + /*blankLineBetween*/ + !0 + ) : X.insertNodeAtEndOfScope(_.file, t, ce), g.writeFixes(X); + const ne = [], pe = rWe(t, c, S); + K && O.unshift(N.createIdentifier("this")); + let fe = N.createCallExpression( + K ? N.createPropertyAccessExpression( + pe, + "call" + ) : pe, + $, + // Note that no attempt is made to take advantage of type argument inference + O + ); + if (c.facts & 2 && (fe = N.createYieldExpression(N.createToken( + 42 + /* AsteriskToken */ + ), fe)), c.facts & 4 && (fe = N.createAwaitExpression(fe)), mce(e) && (fe = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + fe + )), o.length && !j) + if (E.assert(!G, "Expected no returnValueProperty"), E.assert(!(c.facts & 1), "Expected RangeFacts.HasReturn flag to be unset"), o.length === 1) { + const de = o[0]; + ne.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + qa(de.name), + /*exclamationToken*/ + void 0, + /*type*/ + qa(de.type), + /*initializer*/ + fe + )], + de.parent.flags + ) + )); + } else { + const de = [], ve = []; + let De = o[0].parent.flags, Xe = !1; + for (const ye of o) { + de.push(N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + /*name*/ + qa(ye.name) + )); + const Fe = u.typeToTypeNode( + u.getBaseTypeOfLiteralType(u.getTypeAtLocation(ye)), + t, + 1 + /* NoTruncation */ + ); + ve.push(N.createPropertySignature( + /*modifiers*/ + void 0, + /*name*/ + ye.symbol.name, + /*questionToken*/ + void 0, + /*type*/ + Fe + )), Xe = Xe || ye.type !== void 0, De = De & ye.parent.flags; + } + const Ie = Xe ? N.createTypeLiteralNode(ve) : void 0; + Ie && Kr( + Ie, + 1 + /* SingleLine */ + ), ne.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + N.createObjectBindingPattern(de), + /*exclamationToken*/ + void 0, + /*type*/ + Ie, + /*initializer*/ + fe + )], + De + ) + )); + } + else if (o.length || j) { + if (o.length) + for (const ve of o) { + let De = ve.parent.flags; + De & 2 && (De = De & -3 | 1), ne.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + ve.symbol.name, + /*exclamationToken*/ + void 0, + ge(ve.type) + )], + De + ) + )); + } + G && ne.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + G, + /*exclamationToken*/ + void 0, + ge(D) + )], + 1 + /* Let */ + ) + )); + const de = dce(o, j); + G && de.unshift(N.createShorthandPropertyAssignment(G)), de.length === 1 ? (E.assert(!G, "Shouldn't have returnValueProperty here"), ne.push(N.createExpressionStatement(N.createAssignment(de[0].name, fe))), c.facts & 1 && ne.push(N.createReturnStatement())) : (ne.push(N.createExpressionStatement(N.createAssignment(N.createObjectLiteralExpression(de), fe))), G && ne.push(N.createReturnStatement(N.createIdentifier(G)))); + } else + c.facts & 1 ? ne.push(N.createReturnStatement(fe)) : E0(c.range) ? ne.push(N.createExpressionStatement(fe)) : ne.push(fe); + E0(c.range) ? X.replaceNodeRangeWithNodes(_.file, fa(c.range), ia(c.range), ne) : X.replaceNodeWithNodes(_.file, c.range, ne); + const H = X.getChanges(), le = (E0(c.range) ? fa(c.range) : c.range).getSourceFile().fileName, Ae = dN( + H, + le, + S, + /*preferLastLocation*/ + !1 + ); + return { renameFilename: le, renameLocation: Ae, edits: H }; + function ge(de) { + if (de === void 0) + return; + const ve = qa(de); + let De = ve; + for (; nS(De); ) + De = De.type; + return ky(De) && Nn( + De.types, + (Xe) => Xe.kind === 157 + /* UndefinedKeyword */ + ) ? ve : N.createUnionTypeNode([ve, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + } + function Zze(e, t, { substitutions: n }, i, s) { + const o = s.program.getTypeChecker(), c = t.getSourceFile(), _ = qoe(e, t, o, c), u = Qr(t); + let d = u || !o.isContextSensitive(e) ? void 0 : o.typeToTypeNode( + o.getContextualType(e), + t, + 1 + /* NoTruncation */ + ), g = iWe(Ja(e), n); + ({ variableType: d, initializer: g } = D(d, g)), of(g); + const h = Yr.ChangeTracker.fromContext(s); + if (Qn(t)) { + E.assert(!u, "Cannot extract to a JS class"); + const P = []; + P.push(N.createModifier( + 123 + /* PrivateKeyword */ + )), i & 32 && P.push(N.createModifier( + 126 + /* StaticKeyword */ + )), P.push(N.createModifier( + 148 + /* ReadonlyKeyword */ + )); + const O = N.createPropertyDeclaration( + P, + _, + /*questionOrExclamationToken*/ + void 0, + d, + g + ); + let j = N.createPropertyAccessExpression( + i & 32 ? N.createIdentifier(t.name.getText()) : N.createThis(), + N.createIdentifier(_) + ); + mce(e) && (j = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + j + )); + const F = e.pos, V = oWe(F, t); + h.insertNodeBefore( + s.file, + V, + O, + /*blankLineBetween*/ + !0 + ), h.replaceNode(s.file, e, j); + } else { + const P = N.createVariableDeclaration( + _, + /*exclamationToken*/ + void 0, + d, + g + ), O = Kze(e, t); + if (O) { + h.insertNodeBefore(s.file, O, P); + const j = N.createIdentifier(_); + h.replaceNode(s.file, e, j); + } else if (e.parent.kind === 244 && t === sr(e, fce)) { + const j = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [P], + 2 + /* Const */ + ) + ); + h.replaceNode(s.file, e.parent, j); + } else { + const j = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [P], + 2 + /* Const */ + ) + ), F = cWe(e, t); + if (F.pos === 0 ? h.insertNodeAtTopOfFile( + s.file, + j, + /*blankLineBetween*/ + !1 + ) : h.insertNodeBefore( + s.file, + F, + j, + /*blankLineBetween*/ + !1 + ), e.parent.kind === 244) + h.delete(s.file, e.parent); + else { + let V = N.createIdentifier(_); + mce(e) && (V = N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + V + )), h.replaceNode(s.file, e, V); + } + } + } + const S = h.getChanges(), T = e.getSourceFile().fileName, C = dN( + S, + T, + _, + /*preferLastLocation*/ + !0 + ); + return { renameFilename: T, renameLocation: C, edits: S }; + function D(P, O) { + if (P === void 0) return { variableType: P, initializer: O }; + if (!po(O) && !xo(O) || O.typeParameters) return { variableType: P, initializer: O }; + const j = o.getTypeAtLocation(e), F = Rm(o.getSignaturesOfType( + j, + 0 + /* Call */ + )); + if (!F) return { variableType: P, initializer: O }; + if (F.getTypeParameters()) return { variableType: P, initializer: O }; + const V = []; + let L = !1; + for (const $ of O.parameters) + if ($.type) + V.push($); + else { + const U = o.getTypeAtLocation($); + U === o.getAnyType() && (L = !0), V.push(N.updateParameterDeclaration($, $.modifiers, $.dotDotDotToken, $.name, $.questionToken, $.type || o.typeToTypeNode( + U, + t, + 1 + /* NoTruncation */ + ), $.initializer)); + } + if (L) return { variableType: P, initializer: O }; + if (P = void 0, xo(O)) + O = N.updateArrowFunction(O, ed(e) ? sb(e) : void 0, O.typeParameters, V, O.type || o.typeToTypeNode( + F.getReturnType(), + t, + 1 + /* NoTruncation */ + ), O.equalsGreaterThanToken, O.body); + else { + if (F && F.thisParameter) { + const $ = ul(V); + if (!$ || Re($.name) && $.name.escapedText !== "this") { + const U = o.getTypeOfSymbolAtLocation(F.thisParameter, e); + V.splice( + 0, + 0, + N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + o.typeToTypeNode( + U, + t, + 1 + /* NoTruncation */ + ) + ) + ); + } + } + O = N.updateFunctionExpression(O, ed(e) ? sb(e) : void 0, O.asteriskToken, O.name, O.typeParameters, V, O.type || o.typeToTypeNode( + F.getReturnType(), + t, + 1 + /* NoTruncation */ + ), O.body); + } + return { variableType: P, initializer: O }; + } + } + function Kze(e, t) { + let n; + for (; e !== void 0 && e !== t; ) { + if (ti(e) && e.initializer === n && Il(e.parent) && e.parent.declarations.length > 1) + return e; + n = e, e = e.parent; + } + } + function eWe(e, t) { + let n; + const i = e.symbol; + if (i && i.declarations) + for (const s of i.declarations) + (n === void 0 || s.pos < n.pos) && s.pos < t && (n = s); + return n; + } + function tWe({ type: e, declaration: t }, { type: n, declaration: i }) { + return OX(t, i, "pos", uo) || Kl( + e.symbol ? e.symbol.getName() : "", + n.symbol ? n.symbol.getName() : "" + ) || uo(e.id, n.id); + } + function rWe(e, t, n) { + const i = N.createIdentifier(n); + if (Qn(e)) { + const s = t.facts & 32 ? N.createIdentifier(e.name.text) : N.createThis(); + return N.createPropertyAccessExpression(s, i); + } else + return i; + } + function nWe(e, t, n, i, s) { + const o = n !== void 0 || t.length > 0; + if (ms(e) && !o && i.size === 0) + return { body: N.createBlock( + e.statements, + /*multiLine*/ + !0 + ), returnValueProperty: void 0 }; + let c, _ = !1; + const u = N.createNodeArray(ms(e) ? e.statements.slice(0) : [hi(e) ? e : N.createReturnStatement(Ja(e))]); + if (o || i.size) { + const g = Ar(u, d, hi).slice(); + if (o && !s && hi(e)) { + const h = dce(t, n); + h.length === 1 ? g.push(N.createReturnStatement(h[0].name)) : g.push(N.createReturnStatement(N.createObjectLiteralExpression(h))); + } + return { body: N.createBlock( + g, + /*multiLine*/ + !0 + ), returnValueProperty: c }; + } else + return { body: N.createBlock( + u, + /*multiLine*/ + !0 + ), returnValueProperty: void 0 }; + function d(g) { + if (!_ && Mp(g) && o) { + const h = dce(t, n); + return g.expression && (c || (c = "__return"), h.unshift(N.createPropertyAssignment(c, Ge(g.expression, d, ct)))), h.length === 1 ? N.createReturnStatement(h[0].name) : N.createReturnStatement(N.createObjectLiteralExpression(h)); + } else { + const h = _; + _ = _ || so(g) || Qn(g); + const S = i.get(ja(g).toString()), T = S ? qa(S) : gr( + g, + d, + /*context*/ + void 0 + ); + return _ = h, T; + } + } + } + function iWe(e, t) { + return t.size ? n(e) : e; + function n(i) { + const s = t.get(ja(i).toString()); + return s ? qa(s) : gr( + i, + n, + /*context*/ + void 0 + ); + } + } + function sWe(e) { + if (so(e)) { + const t = e.body; + if (ms(t)) + return t.statements; + } else { + if (_m(e) || yi(e)) + return e.statements; + if (Qn(e)) + return e.members; + } + return He; + } + function aWe(e, t) { + return Nn(sWe(t), (n) => n.pos >= e && so(n) && !ec(n)); + } + function oWe(e, t) { + const n = t.members; + E.assert(n.length > 0, "Found no members"); + let i, s = !0; + for (const o of n) { + if (o.pos > e) + return i || n[0]; + if (s && !rs(o)) { + if (i !== void 0) + return o; + s = !1; + } + i = o; + } + return i === void 0 ? E.fail() : i; + } + function cWe(e, t) { + E.assert(!Qn(t)); + let n; + for (let i = e; i !== t; i = i.parent) + fce(i) && (n = i); + for (let i = (n || e).parent; ; i = i.parent) { + if (d6(i)) { + let s; + for (const o of i.statements) { + if (o.pos > e.pos) + break; + s = o; + } + return !s && OC(i) ? (E.assert(sD(i.parent.parent), "Grandparent isn't a switch statement"), i.parent.parent) : E.checkDefined(s, "prevStatement failed to get set"); + } + E.assert(i !== t, "Didn't encounter a block-like before encountering scope"); + } + } + function dce(e, t) { + const n = or(e, (s) => N.createShorthandPropertyAssignment(s.symbol.name)), i = or(t, (s) => N.createShorthandPropertyAssignment(s.symbol.name)); + return n === void 0 ? i : i === void 0 ? n : n.concat(i); + } + function E0(e) { + return ss(e); + } + function lWe(e, t) { + return E0(e.range) ? { pos: fa(e.range).getStart(t), end: ia(e.range).getEnd() } : e.range; + } + function uWe(e, t, n, i, s, o) { + const c = /* @__PURE__ */ new Map(), _ = [], u = [], d = [], g = [], h = [], S = /* @__PURE__ */ new Map(), T = []; + let C; + const D = E0(e.range) ? e.range.length === 1 && Pl(e.range[0]) ? e.range[0].expression : void 0 : e.range; + let P; + if (D === void 0) { + const oe = e.range, ne = fa(oe).getStart(), pe = ia(oe).end; + P = xl(i, ne, pe - ne, Ul.expressionExpected); + } else s.getTypeAtLocation(D).flags & 147456 && (P = Xr(D, Ul.uselessConstantType)); + for (const oe of t) { + _.push({ usages: /* @__PURE__ */ new Map(), typeParameterUsages: /* @__PURE__ */ new Map(), substitutions: /* @__PURE__ */ new Map() }), u.push(/* @__PURE__ */ new Map()), d.push([]); + const ne = []; + P && ne.push(P), Qn(oe) && Qr(oe) && ne.push(Xr(oe, Ul.cannotExtractToJSClass)), xo(oe) && !ms(oe.body) && ne.push(Xr(oe, Ul.cannotExtractToExpressionArrowFunction)), g.push(ne); + } + const O = /* @__PURE__ */ new Map(), j = E0(e.range) ? N.createBlock(e.range) : e.range, F = E0(e.range) ? fa(e.range) : e.range, V = L(F); + if (U(j), V && !E0(e.range) && !dm(e.range)) { + const oe = s.getContextualType(e.range); + $(oe); + } + if (c.size > 0) { + const oe = /* @__PURE__ */ new Map(); + let ne = 0; + for (let pe = F; pe !== void 0 && ne < t.length; pe = pe.parent) + if (pe === t[ne] && (oe.forEach((fe, H) => { + _[ne].typeParameterUsages.set(H, fe); + }), ne++), Uj(pe)) + for (const fe of ly(pe)) { + const H = s.getTypeAtLocation(fe); + c.has(H.id.toString()) && oe.set(H.id.toString(), H); + } + E.assert(ne === t.length, "Should have iterated all scopes"); + } + if (h.length) { + const oe = Vj(t[0], t[0].parent) ? t[0] : bd(t[0]); + gs(oe, K); + } + for (let oe = 0; oe < t.length; oe++) { + const ne = _[oe]; + if (oe > 0 && (ne.usages.size > 0 || ne.typeParameterUsages.size > 0)) { + const H = E0(e.range) ? e.range[0] : e.range; + g[oe].push(Xr(H, Ul.cannotAccessVariablesFromNestedScopes)); + } + e.facts & 16 && Qn(t[oe]) && d[oe].push(Xr(e.thisNode, Ul.cannotExtractFunctionsContainingThisToMethod)); + let pe = !1, fe; + if (_[oe].usages.forEach((H) => { + H.usage === 2 && (pe = !0, H.symbol.flags & 106500 && H.symbol.valueDeclaration && ef( + H.symbol.valueDeclaration, + 8 + /* Readonly */ + ) && (fe = H.symbol.valueDeclaration)); + }), E.assert(E0(e.range) || T.length === 0, "No variable declarations expected if something was extracted"), pe && !E0(e.range)) { + const H = Xr(e.range, Ul.cannotWriteInExpression); + d[oe].push(H), g[oe].push(H); + } else if (fe && oe > 0) { + const H = Xr(fe, Ul.cannotExtractReadonlyPropertyInitializerOutsideConstructor); + d[oe].push(H), g[oe].push(H); + } else if (C) { + const H = Xr(C, Ul.cannotExtractExportedEntity); + d[oe].push(H), g[oe].push(H); + } + } + return { target: j, usagesPerScope: _, functionErrorsPerScope: d, constantErrorsPerScope: g, exposedVariableDeclarations: T }; + function L(oe) { + return !!sr(oe, (ne) => Uj(ne) && ly(ne).length !== 0); + } + function $(oe) { + const ne = s.getSymbolWalker(() => (o.throwIfCancellationRequested(), !0)), { visitedTypes: pe } = ne.walkType(oe); + for (const fe of pe) + fe.isTypeParameter() && c.set(fe.id.toString(), fe); + } + function U(oe, ne = 1) { + if (V) { + const pe = s.getTypeAtLocation(oe); + $(pe); + } + if (tu(oe) && oe.symbol && h.push(oe), Tl(oe)) + U( + oe.left, + 2 + /* Write */ + ), U(oe.right); + else if (VY(oe)) + U( + oe.operand, + 2 + /* Write */ + ); + else if (Dn(oe) || ho(oe)) + gs(oe, U); + else if (Re(oe)) { + if (!oe.parent || $u(oe.parent) && oe !== oe.parent.left || Dn(oe.parent) && oe !== oe.parent.expression) + return; + G( + oe, + ne, + /*isTypeNode*/ + em(oe) + ); + } else + gs(oe, U); + } + function G(oe, ne, pe) { + const fe = ce(oe, ne, pe); + if (fe) + for (let H = 0; H < t.length; H++) { + const ae = u[H].get(fe); + ae && _[H].substitutions.set(ja(oe).toString(), ae); + } + } + function ce(oe, ne, pe) { + const fe = X(oe); + if (!fe) + return; + const H = $s(fe).toString(), ae = O.get(H); + if (ae && ae >= ne) + return H; + if (O.set(H, ne), ae) { + for (const ge of _) + ge.usages.get(oe.text) && ge.usages.set(oe.text, { usage: ne, symbol: fe, node: oe }); + return H; + } + const le = fe.getDeclarations(), Ae = le && Nn(le, (ge) => ge.getSourceFile() === i); + if (Ae && !nN(n, Ae.getStart(), Ae.end)) { + if (e.facts & 2 && ne === 2) { + const ge = Xr(oe, Ul.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators); + for (const de of d) + de.push(ge); + for (const de of g) + de.push(ge); + } + for (let ge = 0; ge < t.length; ge++) { + const de = t[ge]; + if (s.resolveName( + fe.name, + de, + fe.flags, + /*excludeGlobals*/ + !1 + ) !== fe && !u[ge].has(H)) { + const De = Z(fe.exportSymbol || fe, de, pe); + if (De) + u[ge].set(H, De); + else if (pe) { + if (!(fe.flags & 262144)) { + const Xe = Xr(oe, Ul.typeWillNotBeVisibleInTheNewScope); + d[ge].push(Xe), g[ge].push(Xe); + } + } else + _[ge].usages.set(oe.text, { usage: ne, symbol: fe, node: oe }); + } + } + return H; + } + } + function K(oe) { + if (oe === e.range || E0(e.range) && e.range.includes(oe)) + return; + const ne = Re(oe) ? X(oe) : s.getSymbolAtLocation(oe); + if (ne) { + const pe = Nn(h, (fe) => fe.symbol === ne); + if (pe) + if (ti(pe)) { + const fe = pe.symbol.id.toString(); + S.has(fe) || (T.push(pe), S.set(fe, !0)); + } else + C = C || pe; + } + gs(oe, K); + } + function X(oe) { + return oe.parent && du(oe.parent) && oe.parent.name === oe ? s.getShorthandAssignmentValueSymbol(oe.parent) : s.getSymbolAtLocation(oe); + } + function Z(oe, ne, pe) { + if (!oe) + return; + const fe = oe.getDeclarations(); + if (fe && fe.some((ae) => ae.parent === ne)) + return N.createIdentifier(oe.name); + const H = Z(oe.parent, ne, pe); + if (H !== void 0) + return pe ? N.createQualifiedName(H, N.createIdentifier(oe.name)) : N.createPropertyAccessExpression(H, oe.name); + } + } + function _We(e) { + return sr(e, (t) => t.parent && ETe(t) && !cn(t.parent)); + } + function ETe(e) { + const { parent: t } = e; + switch (t.kind) { + case 306: + return !1; + } + switch (e.kind) { + case 11: + return t.kind !== 272 && t.kind !== 276; + case 230: + case 206: + case 208: + return !1; + case 80: + return t.kind !== 208 && t.kind !== 276 && t.kind !== 281; + } + return !0; + } + function mce(e) { + return gce(e) || (jg(e) || oS(e) || Lb(e)) && (jg(e.parent) || Lb(e.parent)); + } + function gce(e) { + return Ks(e) && e.parent && dm(e.parent); + } + var fWe = {}, vq = "Generate 'get' and 'set' accessors", hce = as(p.Generate_get_and_set_accessors), yce = { + name: vq, + description: hce, + kind: "refactor.rewrite.property.generateAccessors" + }; + Wg(vq, { + kinds: [yce.kind], + getEditsForAction: function(t, n) { + if (!t.endPosition) return; + const i = vu.getAccessorConvertiblePropertyAtPosition(t.file, t.program, t.startPosition, t.endPosition); + E.assert(i && !Eh(i), "Expected applicable refactor info"); + const s = vu.generateAccessorFromProperty(t.file, t.program, t.startPosition, t.endPosition, t, n); + if (!s) return; + const o = t.file.fileName, c = i.renameAccessor ? i.accessorName : i.fieldName, u = (Re(c) ? 0 : -1) + dN( + s, + o, + c.text, + /*preferLastLocation*/ + ji(i.declaration) + ); + return { renameFilename: o, renameLocation: u, edits: s }; + }, + getAvailableActions(e) { + if (!e.endPosition) return He; + const t = vu.getAccessorConvertiblePropertyAtPosition(e.file, e.program, e.startPosition, e.endPosition, e.triggerReason === "invoked"); + return t ? Eh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: vq, + description: hce, + actions: [{ ...yce, notApplicableReason: t.error }] + }] : He : [{ + name: vq, + description: hce, + actions: [yce] + }] : He; + } + }); + var pWe = {}, bq = "Infer function return type", vce = as(p.Infer_function_return_type), Sq = { + name: bq, + description: vce, + kind: "refactor.rewrite.function.returnType" + }; + Wg(bq, { + kinds: [Sq.kind], + getEditsForAction: dWe, + getAvailableActions: mWe + }); + function dWe(e) { + const t = DTe(e); + if (t && !Eh(t)) + return { renameFilename: void 0, renameLocation: void 0, edits: Yr.ChangeTracker.with(e, (i) => gWe(e.file, i, t.declaration, t.returnTypeNode)) }; + } + function mWe(e) { + const t = DTe(e); + return t ? Eh(t) ? e.preferences.provideRefactorNotApplicableReason ? [{ + name: bq, + description: vce, + actions: [{ ...Sq, notApplicableReason: t.error }] + }] : He : [{ + name: bq, + description: vce, + actions: [Sq] + }] : He; + } + function gWe(e, t, n, i) { + const s = Ya(n, 22, e), o = xo(n) && s === void 0, c = o ? fa(n.parameters) : s; + c && (o && (t.insertNodeBefore(e, c, N.createToken( + 21 + /* OpenParenToken */ + )), t.insertNodeAfter(e, c, N.createToken( + 22 + /* CloseParenToken */ + ))), t.insertNodeAt(e, c.end, i, { prefix: ": " })); + } + function DTe(e) { + if (Qr(e.file) || !hv(Sq.kind, e.kind)) return; + const t = h_(e.file, e.startPosition), n = sr(t, (c) => ms(c) || c.parent && xo(c.parent) && (c.kind === 39 || c.parent.body === c) ? "quit" : hWe(c)); + if (!n || !n.body || n.type) + return { error: as(p.Return_type_must_be_inferred_from_a_function) }; + const i = e.program.getTypeChecker(), s = yWe(i, n); + if (!s) + return { error: as(p.Could_not_determine_function_return_type) }; + const o = i.typeToTypeNode( + s, + n, + 1 + /* NoTruncation */ + ); + if (o) + return { declaration: n, returnTypeNode: o }; + } + function hWe(e) { + switch (e.kind) { + case 262: + case 218: + case 219: + case 174: + return !0; + default: + return !1; + } + } + function yWe(e, t) { + if (e.isImplementationOfOverload(t)) { + const i = e.getTypeAtLocation(t).getCallSignatures(); + if (i.length > 1) + return e.getUnionType(Ii(i, (s) => s.getReturnType())); + } + const n = e.getSignatureFromDeclaration(t); + if (n) + return e.getReturnTypeOfSignature(n); + } + var PTe = /* @__PURE__ */ ((e) => (e[e.typeOffset = 8] = "typeOffset", e[e.modifierMask = 255] = "modifierMask", e))(PTe || {}), wTe = /* @__PURE__ */ ((e) => (e[e.class = 0] = "class", e[e.enum = 1] = "enum", e[e.interface = 2] = "interface", e[e.namespace = 3] = "namespace", e[e.typeParameter = 4] = "typeParameter", e[e.type = 5] = "type", e[e.parameter = 6] = "parameter", e[e.variable = 7] = "variable", e[e.enumMember = 8] = "enumMember", e[e.property = 9] = "property", e[e.function = 10] = "function", e[e.member = 11] = "member", e))(wTe || {}), ATe = /* @__PURE__ */ ((e) => (e[e.declaration = 0] = "declaration", e[e.static = 1] = "static", e[e.async = 2] = "async", e[e.readonly = 3] = "readonly", e[e.defaultLibrary = 4] = "defaultLibrary", e[e.local = 5] = "local", e))(ATe || {}); + function NTe(e, t, n, i) { + const s = bce(e, t, n, i); + E.assert(s.spans.length % 3 === 0); + const o = s.spans, c = []; + for (let _ = 0; _ < o.length; _ += 3) + c.push({ + textSpan: jl(o[_], o[_ + 1]), + classificationType: o[_ + 2] + }); + return c; + } + function bce(e, t, n, i) { + return { + spans: vWe(e, n, i, t), + endOfLineState: 0 + /* None */ + }; + } + function vWe(e, t, n, i) { + const s = []; + return e && t && bWe(e, t, n, (c, _, u) => { + s.push(c.getStart(t), c.getWidth(t), (_ + 1 << 8) + u); + }, i), s; + } + function bWe(e, t, n, i, s) { + const o = e.getTypeChecker(); + let c = !1; + function _(u) { + switch (u.kind) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 219: + s.throwIfCancellationRequested(); + } + if (!u || !II(n, u.pos, u.getFullWidth()) || u.getFullWidth() === 0) + return; + const d = c; + if ((jg(u) || oS(u)) && (c = !0), oD(u) && (c = !1), Re(u) && !c && !kWe(u) && !V4(u.escapedText)) { + let g = o.getSymbolAtLocation(u); + if (g) { + g.flags & 2097152 && (g = o.getAliasedSymbol(g)); + let h = SWe(g, hS(u)); + if (h !== void 0) { + let S = 0; + u.parent && (da(u.parent) || FTe.get(u.parent.kind) === h) && u.parent.name === u && (S = 1), h === 6 && OTe(u) && (h = 9), h = TWe(o, u, h); + const T = g.valueDeclaration; + if (T) { + const C = L1(T), D = ch(T); + C & 256 && (S |= 2), C & 1024 && (S |= 4), h !== 0 && h !== 2 && (C & 8 || D & 2 || g.getFlags() & 8) && (S |= 8), (h === 7 || h === 10) && xWe(T, t) && (S |= 32), e.isSourceFileDefaultLibrary(T.getSourceFile()) && (S |= 16); + } else g.declarations && g.declarations.some((C) => e.isSourceFileDefaultLibrary(C.getSourceFile())) && (S |= 16); + i(u, h, S); + } + } + } + gs(u, _), c = d; + } + _(t); + } + function SWe(e, t) { + const n = e.getFlags(); + if (n & 32) + return 0; + if (n & 384) + return 1; + if (n & 524288) + return 5; + if (n & 64) { + if (t & 2) + return 2; + } else if (n & 262144) + return 4; + let i = e.valueDeclaration || e.declarations && e.declarations[0]; + return i && da(i) && (i = ITe(i)), i && FTe.get(i.kind); + } + function TWe(e, t, n) { + if (n === 7 || n === 9 || n === 6) { + const i = e.getTypeAtLocation(t); + if (i) { + const s = (o) => o(i) || i.isUnion() && i.types.some(o); + if (n !== 6 && s((o) => o.getConstructSignatures().length > 0)) + return 0; + if (s((o) => o.getCallSignatures().length > 0) && !s((o) => o.getProperties().length > 0) || CWe(t)) + return n === 9 ? 11 : 10; + } + } + return n; + } + function xWe(e, t) { + return da(e) && (e = ITe(e)), ti(e) ? (!yi(e.parent.parent.parent) || Rb(e.parent)) && e.getSourceFile() === t : Ac(e) ? !yi(e.parent) && e.getSourceFile() === t : !1; + } + function ITe(e) { + for (; ; ) + if (da(e.parent.parent)) + e = e.parent.parent; + else + return e.parent.parent; + } + function kWe(e) { + const t = e.parent; + return t && (kd(t) || Yu(t) || Rg(t)); + } + function CWe(e) { + for (; OTe(e); ) + e = e.parent; + return Es(e.parent) && e.parent.expression === e; + } + function OTe(e) { + return $u(e.parent) && e.parent.right === e || Dn(e.parent) && e.parent.name === e; + } + var FTe = /* @__PURE__ */ new Map([ + [ + 260, + 7 + /* variable */ + ], + [ + 169, + 6 + /* parameter */ + ], + [ + 172, + 9 + /* property */ + ], + [ + 267, + 3 + /* namespace */ + ], + [ + 266, + 1 + /* enum */ + ], + [ + 306, + 8 + /* enumMember */ + ], + [ + 263, + 0 + /* class */ + ], + [ + 174, + 11 + /* member */ + ], + [ + 262, + 10 + /* function */ + ], + [ + 218, + 10 + /* function */ + ], + [ + 173, + 11 + /* member */ + ], + [ + 177, + 9 + /* property */ + ], + [ + 178, + 9 + /* property */ + ], + [ + 171, + 9 + /* property */ + ], + [ + 264, + 2 + /* interface */ + ], + [ + 265, + 5 + /* type */ + ], + [ + 168, + 4 + /* typeParameter */ + ], + [ + 303, + 9 + /* property */ + ], + [ + 304, + 9 + /* property */ + ] + ]), LTe = "0.8"; + function MTe(e, t, n, i) { + const s = ww(e) ? new Sce(e, t, n) : e === 80 ? new jTe(80, t, n) : e === 81 ? new BTe(81, t, n) : new RTe(e, t, n); + return s.parent = i, s.flags = i.flags & 101441536, s; + } + var Sce = class { + constructor(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.modifierFlagsCache = 0, this.transformFlags = 0, this.parent = void 0, this.original = void 0, this.emitNode = void 0; + } + assertHasRealPosition(e) { + E.assert(!xd(this.pos) && !xd(this.end), e || "Node must have a real position for this operation"); + } + getSourceFile() { + return xr(this); + } + getStart(e, t) { + return this.assertHasRealPosition(), W1(this, e, t); + } + getFullStart() { + return this.assertHasRealPosition(), this.pos; + } + getEnd() { + return this.assertHasRealPosition(), this.end; + } + getWidth(e) { + return this.assertHasRealPosition(), this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.assertHasRealPosition(), this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.assertHasRealPosition(), this.getStart(e) - this.pos; + } + getFullText(e) { + return this.assertHasRealPosition(), (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return this.assertHasRealPosition(), e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount(e) { + return this.getChildren(e).length; + } + getChildAt(e, t) { + return this.getChildren(t)[e]; + } + getChildren(e) { + return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"), HJ(this) ?? rO(this, EWe(this, e)); + } + getFirstToken(e) { + this.assertHasRealPosition(); + const t = this.getChildren(e); + if (!t.length) + return; + const n = Nn( + t, + (i) => i.kind < 309 || i.kind > 351 + /* LastJSDocNode */ + ); + return n.kind < 166 ? n : n.getFirstToken(e); + } + getLastToken(e) { + this.assertHasRealPosition(); + const t = this.getChildren(e), n = Bo(t); + if (n) + return n.kind < 166 ? n : n.getLastToken(e); + } + forEachChild(e, t) { + return gs(this, e, t); + } + }; + function EWe(e, t) { + const n = []; + if ($I(e)) + return e.forEachChild((c) => { + n.push(c); + }), n; + Ou.setText((t || e.getSourceFile()).text); + let i = e.pos; + const s = (c) => { + R9(n, i, c.pos, e), n.push(c), i = c.end; + }, o = (c) => { + R9(n, i, c.pos, e), n.push(DWe(c, e)), i = c.end; + }; + return rr(e.jsDoc, s), i = e.pos, e.forEachChild(s, o), R9(n, i, e.end, e), Ou.setText(void 0), n; + } + function R9(e, t, n, i) { + for (Ou.resetTokenState(t); t < n; ) { + const s = Ou.scan(), o = Ou.getTokenEnd(); + if (o <= n) { + if (s === 80) { + if (vee(i)) + continue; + E.fail(`Did not expect ${E.formatSyntaxKind(i.kind)} to have an Identifier in its trivia`); + } + e.push(MTe(s, t, o, i)); + } + if (t = o, s === 1) + break; + } + } + function DWe(e, t) { + const n = MTe(352, e.pos, e.end, t), i = []; + let s = e.pos; + for (const o of e) + R9(i, s, o.pos, t), i.push(o), s = o.end; + return R9(i, s, e.end, t), rO(n, i), n; + } + var Tce = class { + constructor(e, t, n) { + this.pos = t, this.end = n, this.kind = e, this.id = 0, this.flags = 0, this.transformFlags = 0, this.parent = void 0, this.emitNode = void 0; + } + getSourceFile() { + return xr(this); + } + getStart(e, t) { + return W1(this, e, t); + } + getFullStart() { + return this.pos; + } + getEnd() { + return this.end; + } + getWidth(e) { + return this.getEnd() - this.getStart(e); + } + getFullWidth() { + return this.end - this.pos; + } + getLeadingTriviaWidth(e) { + return this.getStart(e) - this.pos; + } + getFullText(e) { + return (e || this.getSourceFile()).text.substring(this.pos, this.end); + } + getText(e) { + return e || (e = this.getSourceFile()), e.text.substring(this.getStart(e), this.getEnd()); + } + getChildCount() { + return this.getChildren().length; + } + getChildAt(e) { + return this.getChildren()[e]; + } + getChildren() { + return this.kind === 1 && this.jsDoc || He; + } + getFirstToken() { + } + getLastToken() { + } + forEachChild() { + } + }, PWe = class { + constructor(e, t) { + this.flags = e, this.escapedName = t, this.declarations = void 0, this.valueDeclaration = void 0, this.id = 0, this.mergeId = 0, this.parent = void 0, this.members = void 0, this.exports = void 0, this.exportSymbol = void 0, this.constEnumOnlyModule = void 0, this.isReferenced = void 0, this.lastAssignmentPos = void 0, this.links = void 0; + } + getFlags() { + return this.flags; + } + get name() { + return uc(this); + } + getEscapedName() { + return this.escapedName; + } + getName() { + return this.name; + } + getDeclarations() { + return this.declarations; + } + getDocumentationComment(e) { + if (!this.documentationComment) + if (this.documentationComment = He, !this.declarations && qm(this) && this.links.target && qm(this.links.target) && this.links.target.links.tupleLabelDeclaration) { + const t = this.links.target.links.tupleLabelDeclaration; + this.documentationComment = j9([t], e); + } else + this.documentationComment = j9(this.declarations, e); + return this.documentationComment; + } + getContextualDocumentationComment(e, t) { + if (e) { + if (n0(e) && (this.contextualGetAccessorDocumentationComment || (this.contextualGetAccessorDocumentationComment = j9(Ln(this.declarations, n0), t)), Dr(this.contextualGetAccessorDocumentationComment))) + return this.contextualGetAccessorDocumentationComment; + if (Yd(e) && (this.contextualSetAccessorDocumentationComment || (this.contextualSetAccessorDocumentationComment = j9(Ln(this.declarations, Yd), t)), Dr(this.contextualSetAccessorDocumentationComment))) + return this.contextualSetAccessorDocumentationComment; + } + return this.getDocumentationComment(t); + } + getJsDocTags(e) { + return this.tags === void 0 && (this.tags = He, this.tags = Tq(this.declarations, e)), this.tags; + } + getContextualJsDocTags(e, t) { + if (e) { + if (n0(e) && (this.contextualGetAccessorTags || (this.contextualGetAccessorTags = Tq(Ln(this.declarations, n0), t)), Dr(this.contextualGetAccessorTags))) + return this.contextualGetAccessorTags; + if (Yd(e) && (this.contextualSetAccessorTags || (this.contextualSetAccessorTags = Tq(Ln(this.declarations, Yd), t)), Dr(this.contextualSetAccessorTags))) + return this.contextualSetAccessorTags; + } + return this.getJsDocTags(t); + } + }, RTe = class extends Tce { + constructor(e, t, n) { + super(e, t, n); + } + }, jTe = class extends Tce { + constructor(e, t, n) { + super(e, t, n); + } + get text() { + return dn(this); + } + }, BTe = class extends Tce { + constructor(e, t, n) { + super(e, t, n); + } + get text() { + return dn(this); + } + }, wWe = class { + constructor(e, t) { + this.flags = t, this.checker = e; + } + getFlags() { + return this.flags; + } + getSymbol() { + return this.symbol; + } + getProperties() { + return this.checker.getPropertiesOfType(this); + } + getProperty(e) { + return this.checker.getPropertyOfType(this, e); + } + getApparentProperties() { + return this.checker.getAugmentedPropertiesOfType(this); + } + getCallSignatures() { + return this.checker.getSignaturesOfType( + this, + 0 + /* Call */ + ); + } + getConstructSignatures() { + return this.checker.getSignaturesOfType( + this, + 1 + /* Construct */ + ); + } + getStringIndexType() { + return this.checker.getIndexTypeOfType( + this, + 0 + /* String */ + ); + } + getNumberIndexType() { + return this.checker.getIndexTypeOfType( + this, + 1 + /* Number */ + ); + } + getBaseTypes() { + return this.isClassOrInterface() ? this.checker.getBaseTypes(this) : void 0; + } + isNullableType() { + return this.checker.isNullableType(this); + } + getNonNullableType() { + return this.checker.getNonNullableType(this); + } + getNonOptionalType() { + return this.checker.getNonOptionalType(this); + } + getConstraint() { + return this.checker.getBaseConstraintOfType(this); + } + getDefault() { + return this.checker.getDefaultFromTypeParameter(this); + } + isUnion() { + return !!(this.flags & 1048576); + } + isIntersection() { + return !!(this.flags & 2097152); + } + isUnionOrIntersection() { + return !!(this.flags & 3145728); + } + isLiteral() { + return !!(this.flags & 2432); + } + isStringLiteral() { + return !!(this.flags & 128); + } + isNumberLiteral() { + return !!(this.flags & 256); + } + isTypeParameter() { + return !!(this.flags & 262144); + } + isClassOrInterface() { + return !!(wn(this) & 3); + } + isClass() { + return !!(wn(this) & 1); + } + isIndexType() { + return !!(this.flags & 4194304); + } + /** + * This polyfills `referenceType.typeArguments` for API consumers + */ + get typeArguments() { + if (wn(this) & 4) + return this.checker.getTypeArguments(this); + } + }, AWe = class { + // same + constructor(e, t) { + this.flags = t, this.checker = e; + } + getDeclaration() { + return this.declaration; + } + getTypeParameters() { + return this.typeParameters; + } + getParameters() { + return this.parameters; + } + getReturnType() { + return this.checker.getReturnTypeOfSignature(this); + } + getTypeParameterAtPosition(e) { + const t = this.checker.getParameterType(this, e); + if (t.isIndexType() && U4(t.type)) { + const n = t.type.getConstraint(); + if (n) + return this.checker.getIndexType(n); + } + return t; + } + getDocumentationComment() { + return this.documentationComment || (this.documentationComment = j9(ST(this.declaration), this.checker)); + } + getJsDocTags() { + return this.jsDocTags || (this.jsDocTags = Tq(ST(this.declaration), this.checker)); + } + }; + function JTe(e) { + return j1(e).some((t) => t.tagName.text === "inheritDoc" || t.tagName.text === "inheritdoc"); + } + function Tq(e, t) { + if (!e) return He; + let n = bv.getJsDocTagsFromDeclarations(e, t); + if (t && (n.length === 0 || e.some(JTe))) { + const i = /* @__PURE__ */ new Set(); + for (const s of e) { + const o = zTe(t, s, (c) => { + var _; + if (!i.has(c)) + return i.add(c), s.kind === 177 || s.kind === 178 ? c.getContextualJsDocTags(s, t) : ((_ = c.declarations) == null ? void 0 : _.length) === 1 ? c.getJsDocTags(t) : void 0; + }); + o && (n = [...o, ...n]); + } + } + return n; + } + function j9(e, t) { + if (!e) return He; + let n = bv.getJsDocCommentsFromDeclarations(e, t); + if (t && (n.length === 0 || e.some(JTe))) { + const i = /* @__PURE__ */ new Set(); + for (const s of e) { + const o = zTe(t, s, (c) => { + if (!i.has(c)) + return i.add(c), s.kind === 177 || s.kind === 178 ? c.getContextualDocumentationComment(s, t) : c.getDocumentationComment(t); + }); + o && (n = n.length === 0 ? o.slice() : o.concat(u6(), n)); + } + } + return n; + } + function zTe(e, t, n) { + var i; + const s = ((i = t.parent) == null ? void 0 : i.kind) === 176 ? t.parent.parent : t.parent; + if (!s) return; + const o = Uc(t); + return xc(d4(s), (c) => { + const _ = e.getTypeAtLocation(c), u = o && _.symbol ? e.getTypeOfSymbol(_.symbol) : _, d = e.getPropertyOfType(u, t.symbol.name); + return d ? n(d) : void 0; + }); + } + var NWe = class extends Sce { + constructor(e, t, n) { + super(e, t, n); + } + update(e, t) { + return oz(this, e, t); + } + getLineAndCharacterOfPosition(e) { + return Vs(this, e); + } + getLineStarts() { + return Tg(this); + } + getPositionOfLineAndCharacter(e, t, n) { + return wI(Tg(this), e, t, this.text, n); + } + getLineEndOfPosition(e) { + const { line: t } = this.getLineAndCharacterOfPosition(e), n = this.getLineStarts(); + let i; + t + 1 >= n.length && (i = this.getEnd()), i || (i = n[t + 1] - 1); + const s = this.getFullText(); + return s[i] === ` +` && s[i - 1] === "\r" ? i - 1 : i; + } + getNamedDeclarations() { + return this.namedDeclarations || (this.namedDeclarations = this.computeNamedDeclarations()), this.namedDeclarations; + } + computeNamedDeclarations() { + const e = Kf(); + return this.forEachChild(s), e; + function t(o) { + const c = i(o); + c && e.add(c, o); + } + function n(o) { + let c = e.get(o); + return c || e.set(o, c = []), c; + } + function i(o) { + const c = FI(o); + return c && (oa(c) && Dn(c.expression) ? c.expression.name.text : Rc(c) ? lN(c) : void 0); + } + function s(o) { + switch (o.kind) { + case 262: + case 218: + case 174: + case 173: + const c = o, _ = i(c); + if (_) { + const g = n(_), h = Bo(g); + h && c.parent === h.parent && c.symbol === h.symbol ? c.body && !h.body && (g[g.length - 1] = c) : g.push(c); + } + gs(o, s); + break; + case 263: + case 231: + case 264: + case 265: + case 266: + case 267: + case 271: + case 281: + case 276: + case 273: + case 274: + case 177: + case 178: + case 187: + t(o), gs(o, s); + break; + case 169: + if (!Vn( + o, + 31 + /* ParameterPropertyModifier */ + )) + break; + case 260: + case 208: { + const g = o; + if (Ts(g.name)) { + gs(g.name, s); + break; + } + g.initializer && s(g.initializer); + } + case 306: + case 172: + case 171: + t(o); + break; + case 278: + const u = o; + u.exportClause && (lp(u.exportClause) ? rr(u.exportClause.elements, s) : s(u.exportClause.name)); + break; + case 272: + const d = o.importClause; + d && (d.name && t(d.name), d.namedBindings && (d.namedBindings.kind === 274 ? t(d.namedBindings) : rr(d.namedBindings.elements, s))); + break; + case 226: + mc(o) !== 0 && t(o); + default: + gs(o, s); + } + } + } + }, IWe = class { + constructor(e, t, n) { + this.fileName = e, this.text = t, this.skipTrivia = n || ((i) => i); + } + getLineAndCharacterOfPosition(e) { + return Vs(this, e); + } + }; + function OWe() { + return { + getNodeConstructor: () => Sce, + getTokenConstructor: () => RTe, + getIdentifierConstructor: () => jTe, + getPrivateIdentifierConstructor: () => BTe, + getSourceFileConstructor: () => NWe, + getSymbolConstructor: () => PWe, + getTypeConstructor: () => wWe, + getSignatureConstructor: () => AWe, + getSourceMapSourceConstructor: () => IWe + }; + } + function DN(e) { + let t = !0; + for (const i in e) + if (io(e, i) && !WTe(i)) { + t = !1; + break; + } + if (t) + return e; + const n = {}; + for (const i in e) + if (io(e, i)) { + const s = WTe(i) ? i : i.charAt(0).toLowerCase() + i.substr(1); + n[s] = e[i]; + } + return n; + } + function WTe(e) { + return !e.length || e.charAt(0) === e.charAt(0).toLowerCase(); + } + function PN(e) { + return e ? or(e, (t) => t.text).join("") : ""; + } + function B9() { + return { + target: 1, + jsx: 1 + /* Preserve */ + }; + } + function xq() { + return vu.getSupportedErrorCodes(); + } + var FWe = class { + constructor(e) { + this.host = e; + } + getCurrentSourceFile(e) { + var t, n, i, s, o, c, _, u; + const d = this.host.getScriptSnapshot(e); + if (!d) + throw new Error("Could not find file: '" + e + "'."); + const g = SU(e, this.host), h = this.host.getScriptVersion(e); + let S; + if (this.currentFileName !== e) { + const T = { + languageVersion: 99, + impliedNodeFormat: VA( + _o(e, this.host.getCurrentDirectory(), ((i = (n = (t = this.host).getCompilerHost) == null ? void 0 : n.call(t)) == null ? void 0 : i.getCanonicalFileName) || _0(this.host)), + (u = (_ = (c = (o = (s = this.host).getCompilerHost) == null ? void 0 : o.call(s)) == null ? void 0 : c.getModuleResolutionCache) == null ? void 0 : _.call(c)) == null ? void 0 : u.getPackageJsonInfoCache(), + this.host, + this.host.getCompilationSettings() + ), + setExternalModuleIndicator: j3(this.host.getCompilationSettings()), + // These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll. + jsDocParsingMode: 0 + /* ParseAll */ + }; + S = J9( + e, + d, + T, + h, + /*setNodeParents*/ + !0, + g + ); + } else if (this.currentFileVersion !== h) { + const T = d.getChangeRange(this.currentFileScriptSnapshot); + S = kq(this.currentSourceFile, d, h, T); + } + return S && (this.currentFileVersion = h, this.currentFileName = e, this.currentFileScriptSnapshot = d, this.currentSourceFile = S), this.currentSourceFile; + } + }; + function VTe(e, t, n) { + e.version = n, e.scriptSnapshot = t; + } + function J9(e, t, n, i, s, o) { + const c = Cx(e, Rx(t), n, s, o); + return VTe(c, t, i), c; + } + function kq(e, t, n, i, s) { + if (i && n !== e.version) { + let c; + const _ = i.span.start !== 0 ? e.text.substr(0, i.span.start) : "", u = wc(i.span) !== e.text.length ? e.text.substr(wc(i.span)) : ""; + if (i.newLength === 0) + c = _ && u ? _ + u : _ || u; + else { + const g = t.getText(i.span.start, i.span.start + i.newLength); + c = _ && u ? _ + g + u : _ ? _ + g : g + u; + } + const d = oz(e, c, i, s); + return VTe(d, t, n), d.nameTable = void 0, e !== d && e.scriptSnapshot && (e.scriptSnapshot.dispose && e.scriptSnapshot.dispose(), e.scriptSnapshot = void 0), d; + } + const o = { + languageVersion: e.languageVersion, + impliedNodeFormat: e.impliedNodeFormat, + setExternalModuleIndicator: e.setExternalModuleIndicator, + jsDocParsingMode: e.jsDocParsingMode + }; + return J9( + e.fileName, + t, + o, + n, + /*setNodeParents*/ + !0, + e.scriptKind + ); + } + var LWe = { + isCancellationRequested: $d, + throwIfCancellationRequested: ka + }, MWe = class { + constructor(e) { + this.cancellationToken = e; + } + isCancellationRequested() { + return this.cancellationToken.isCancellationRequested(); + } + throwIfCancellationRequested() { + var e; + if (this.isCancellationRequested()) + throw (e = rn) == null || e.instant(rn.Phase.Session, "cancellationThrown", { kind: "CancellationTokenObject" }), new AE(); + } + }, xce = class { + constructor(e, t = 20) { + this.hostCancellationToken = e, this.throttleWaitMilliseconds = t, this.lastCancellationCheckTime = 0; + } + isCancellationRequested() { + const e = Io(); + return Math.abs(e - this.lastCancellationCheckTime) >= this.throttleWaitMilliseconds ? (this.lastCancellationCheckTime = e, this.hostCancellationToken.isCancellationRequested()) : !1; + } + throwIfCancellationRequested() { + var e; + if (this.isCancellationRequested()) + throw (e = rn) == null || e.instant(rn.Phase.Session, "cancellationThrown", { kind: "ThrottledCancellationToken" }), new AE(); + } + }, UTe = [ + "getSemanticDiagnostics", + "getSuggestionDiagnostics", + "getCompilerOptionsDiagnostics", + "getSemanticClassifications", + "getEncodedSemanticClassifications", + "getCodeFixesAtPosition", + "getCombinedCodeFix", + "applyCodeActionCommand", + "organizeImports", + "getEditsForFileRename", + "getEmitOutput", + "getApplicableRefactors", + "getEditsForRefactor", + "prepareCallHierarchy", + "provideCallHierarchyIncomingCalls", + "provideCallHierarchyOutgoingCalls", + "provideInlayHints", + "getSupportedCodeFixes", + "getPasteEdits" + ], RWe = [ + ...UTe, + "getCompletionsAtPosition", + "getCompletionEntryDetails", + "getCompletionEntrySymbol", + "getSignatureHelpItems", + "getQuickInfoAtPosition", + "getDefinitionAtPosition", + "getDefinitionAndBoundSpan", + "getImplementationAtPosition", + "getTypeDefinitionAtPosition", + "getReferencesAtPosition", + "findReferences", + "getDocumentHighlights", + "getNavigateToItems", + "getRenameInfo", + "findRenameLocations", + "getApplicableRefactors" + ]; + function kce(e, t = Gae(e.useCaseSensitiveFileNames && e.useCaseSensitiveFileNames(), e.getCurrentDirectory(), e.jsDocParsingMode), n) { + var i; + let s; + n === void 0 ? s = 0 : typeof n == "boolean" ? s = n ? 2 : 0 : s = n; + const o = new FWe(e); + let c, _, u = 0; + const d = e.getCancellationToken ? new MWe(e.getCancellationToken()) : LWe, g = e.getCurrentDirectory(); + UK((i = e.getLocalizedDiagnosticMessages) == null ? void 0 : i.bind(e)); + function h(q) { + e.log && e.log(q); + } + const S = vC(e), T = eu(S), C = ooe({ + useCaseSensitiveFileNames: () => S, + getCurrentDirectory: () => g, + getProgram: j, + fileExists: Ns(e, e.fileExists), + readFile: Ns(e, e.readFile), + getDocumentPositionMapper: Ns(e, e.getDocumentPositionMapper), + getSourceFileLike: Ns(e, e.getSourceFileLike), + log: h + }); + function D(q) { + const we = c.getSourceFile(q); + if (!we) { + const _e = new Error(`Could not find source file: '${q}'.`); + throw _e.ProgramFiles = c.getSourceFiles().map((Te) => Te.fileName), _e; + } + return we; + } + function P() { + e.updateFromProject && !e.updateFromProjectInProgress ? e.updateFromProject() : O(); + } + function O() { + var q, we, _e; + if (E.assert( + s !== 2 + /* Syntactic */ + ), e.getProjectVersion) { + const hs = e.getProjectVersion(); + if (hs) { + if (_ === hs && !((q = e.hasChangedAutomaticTypeDirectiveNames) != null && q.call(e))) + return; + _ = hs; + } + } + const Te = e.getTypeRootsVersion ? e.getTypeRootsVersion() : 0; + u !== Te && (h("TypeRoots version has changed; provide new program"), c = void 0, u = Te); + const dt = e.getScriptFileNames().slice(), xt = e.getCompilationSettings() || B9(), wt = e.hasInvalidatedResolutions || $d, ir = Ns(e, e.hasInvalidatedLibResolutions) || $d, br = Ns(e, e.hasChangedAutomaticTypeDirectiveNames), Lr = (we = e.getProjectReferences) == null ? void 0 : we.call(e); + let en, fr = { + getSourceFile: Ro, + getSourceFileByPath: Vo, + getCancellationToken: () => d, + getCanonicalFileName: T, + useCaseSensitiveFileNames: () => S, + getNewLine: () => d0(xt), + getDefaultLibFileName: (hs) => e.getDefaultLibFileName(hs), + writeFile: ka, + getCurrentDirectory: () => g, + fileExists: (hs) => e.fileExists(hs), + readFile: (hs) => e.readFile && e.readFile(hs), + getSymlinkCache: Ns(e, e.getSymlinkCache), + realpath: Ns(e, e.realpath), + directoryExists: (hs) => Td(hs, e), + getDirectories: (hs) => e.getDirectories ? e.getDirectories(hs) : [], + readDirectory: (hs, ga, Co, Li, bi) => (E.checkDefined(e.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"), e.readDirectory(hs, ga, Co, Li, bi)), + onReleaseOldSourceFile: $a, + onReleaseParsedCommandLine: ma, + hasInvalidatedResolutions: wt, + hasInvalidatedLibResolutions: ir, + hasChangedAutomaticTypeDirectiveNames: br, + trace: Ns(e, e.trace), + resolveModuleNames: Ns(e, e.resolveModuleNames), + getModuleResolutionCache: Ns(e, e.getModuleResolutionCache), + createHash: Ns(e, e.createHash), + resolveTypeReferenceDirectives: Ns(e, e.resolveTypeReferenceDirectives), + resolveModuleNameLiterals: Ns(e, e.resolveModuleNameLiterals), + resolveTypeReferenceDirectiveReferences: Ns(e, e.resolveTypeReferenceDirectiveReferences), + resolveLibrary: Ns(e, e.resolveLibrary), + useSourceOfProjectReferenceRedirect: Ns(e, e.useSourceOfProjectReferenceRedirect), + getParsedCommandLine: tn, + jsDocParsingMode: e.jsDocParsingMode + }; + const mn = fr.getSourceFile, { getSourceFileWithCache: Di } = LD( + fr, + (hs) => _o(hs, g, T), + (...hs) => mn.call(fr, ...hs) + ); + fr.getSourceFile = Di, (_e = e.setCompilerHost) == null || _e.call(e, fr); + const Fi = { + useCaseSensitiveFileNames: S, + fileExists: (hs) => fr.fileExists(hs), + readFile: (hs) => fr.readFile(hs), + directoryExists: (hs) => fr.directoryExists(hs), + getDirectories: (hs) => fr.getDirectories(hs), + realpath: fr.realpath, + readDirectory: (...hs) => fr.readDirectory(...hs), + trace: fr.trace, + getCurrentDirectory: fr.getCurrentDirectory, + onUnRecoverableConfigFileDiagnostic: ka + }, ur = t.getKeyForCompilationSettings(xt); + let Mr = /* @__PURE__ */ new Set(); + if (JW(c, dt, xt, (hs, ga) => e.getScriptVersion(ga), (hs) => fr.fileExists(hs), wt, ir, br, tn, Lr)) { + fr = void 0, en = void 0, Mr = void 0; + return; + } + c = UA({ + rootNames: dt, + options: xt, + host: fr, + oldProgram: c, + projectReferences: Lr + }), fr = void 0, en = void 0, Mr = void 0, C.clearCache(), c.getTypeChecker(); + return; + function tn(hs) { + const ga = _o(hs, g, T), Co = en?.get(ga); + if (Co !== void 0) return Co || void 0; + const Li = e.getParsedCommandLine ? e.getParsedCommandLine(hs) : qt(hs); + return (en || (en = /* @__PURE__ */ new Map())).set(ga, Li || !1), Li; + } + function qt(hs) { + const ga = Ro( + hs, + 100 + /* JSON */ + ); + if (ga) + return ga.path = _o(hs, g, T), ga.resolvedPath = ga.path, ga.originalFileName = ga.fileName, xA( + ga, + Fi, + Xi(Xn(hs), g), + /*existingOptions*/ + void 0, + Xi(hs, g) + ); + } + function ma(hs, ga, Co) { + var Li; + e.getParsedCommandLine ? (Li = e.onReleaseParsedCommandLine) == null || Li.call(e, hs, ga, Co) : ga && $a(ga.sourceFile, Co); + } + function $a(hs, ga) { + const Co = t.getKeyForCompilationSettings(ga); + t.releaseDocumentWithKey(hs.resolvedPath, Co, hs.scriptKind, hs.impliedNodeFormat); + } + function Ro(hs, ga, Co, Li) { + return Vo(hs, _o(hs, g, T), ga, Co, Li); + } + function Vo(hs, ga, Co, Li, bi) { + E.assert(fr, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host."); + const wl = e.getScriptSnapshot(hs); + if (!wl) + return; + const jo = SU(hs, e), Su = e.getScriptVersion(hs); + if (!bi) { + const fc = c && c.getSourceFileByPath(ga); + if (fc) { + if (jo === fc.scriptKind || Mr.has(fc.resolvedPath)) + return t.updateDocumentWithKey(hs, ga, e, ur, wl, Su, jo, Co); + t.releaseDocumentWithKey(fc.resolvedPath, t.getKeyForCompilationSettings(c.getCompilerOptions()), fc.scriptKind, fc.impliedNodeFormat), Mr.add(fc.resolvedPath); + } + } + return t.acquireDocumentWithKey(hs, ga, e, ur, wl, Su, jo, Co); + } + } + function j() { + if (s === 2) { + E.assert(c === void 0); + return; + } + return P(), c; + } + function F() { + var q; + return (q = e.getPackageJsonAutoImportProvider) == null ? void 0 : q.call(e); + } + function V(q, we) { + const _e = c.getTypeChecker(), Te = dt(); + if (!Te) return !1; + for (const wt of q) + for (const ir of wt.references) { + const br = xt(ir); + if (E.assertIsDefined(br), we.has(ir) || yo.isDeclarationOfSymbol(br, Te)) { + we.add(ir), ir.isDefinition = !0; + const Lr = r9(ir, C, Ns(e, e.fileExists)); + Lr && we.add(Lr); + } else + ir.isDefinition = !1; + } + return !0; + function dt() { + for (const wt of q) + for (const ir of wt.references) { + if (we.has(ir)) { + const Lr = xt(ir); + return E.assertIsDefined(Lr), _e.getSymbolAtLocation(Lr); + } + const br = r9(ir, C, Ns(e, e.fileExists)); + if (br && we.has(br)) { + const Lr = xt(br); + if (Lr) + return _e.getSymbolAtLocation(Lr); + } + } + } + function xt(wt) { + const ir = c.getSourceFile(wt.fileName); + if (!ir) return; + const br = h_(ir, wt.textSpan.start); + return yo.Core.getAdjustedNode(br, { use: yo.FindReferencesUse.References }); + } + } + function L() { + if (c) { + const q = t.getKeyForCompilationSettings(c.getCompilerOptions()); + rr(c.getSourceFiles(), (we) => t.releaseDocumentWithKey(we.resolvedPath, q, we.scriptKind, we.impliedNodeFormat)), c = void 0; + } + } + function $() { + L(), e = void 0; + } + function U(q) { + return P(), c.getSyntacticDiagnostics(D(q), d).slice(); + } + function G(q) { + P(); + const we = D(q), _e = c.getSemanticDiagnostics(we, d); + if (!op(c.getCompilerOptions())) + return _e.slice(); + const Te = c.getDeclarationDiagnostics(we, d); + return [..._e, ...Te]; + } + function ce(q) { + return P(), QU(D(q), c, d); + } + function K() { + return P(), [...c.getOptionsDiagnostics(d), ...c.getGlobalDiagnostics(d)]; + } + function X(q, we, _e = Bp, Te) { + const dt = { + ..._e, + // avoid excess property check + includeCompletionsForModuleExports: _e.includeCompletionsForModuleExports || _e.includeExternalModuleExports, + includeCompletionsWithInsertText: _e.includeCompletionsWithInsertText || _e.includeInsertTextCompletions + }; + return P(), $x.getCompletionsAtPosition( + e, + c, + h, + D(q), + we, + dt, + _e.triggerCharacter, + _e.triggerKind, + d, + Te && Hc.getFormatContext(Te, e), + _e.includeSymbol + ); + } + function Z(q, we, _e, Te, dt, xt = Bp, wt) { + return P(), $x.getCompletionEntryDetails( + c, + h, + D(q), + we, + { name: _e, source: dt, data: wt }, + e, + Te && Hc.getFormatContext(Te, e), + // TODO: GH#18217 + xt, + d + ); + } + function oe(q, we, _e, Te, dt = Bp) { + return P(), $x.getCompletionEntrySymbol(c, h, D(q), we, { name: _e, source: Te }, e, dt); + } + function ne(q, we) { + P(); + const _e = D(q), Te = h_(_e, we); + if (Te === _e) + return; + const dt = c.getTypeChecker(), xt = fe(Te), wt = zWe(xt, dt); + if (!wt || dt.isUnknownSymbol(wt)) { + const fr = H(_e, xt, we) ? dt.getTypeAtLocation(xt) : void 0; + return fr && { + kind: "", + kindModifiers: "", + textSpan: e_(xt, _e), + displayParts: dt.runWithCancellationToken(d, (mn) => fN(mn, fr, yS(xt))), + documentation: fr.symbol ? fr.symbol.getDocumentationComment(dt) : void 0, + tags: fr.symbol ? fr.symbol.getJsDocTags(dt) : void 0 + }; + } + const { symbolKind: ir, displayParts: br, documentation: Lr, tags: en } = dt.runWithCancellationToken(d, (fr) => D0.getSymbolDisplayPartsDocumentationAndSymbolKind(fr, wt, _e, yS(xt), xt)); + return { + kind: ir, + kindModifiers: D0.getSymbolModifiers(dt, wt), + textSpan: e_(xt, _e), + displayParts: br, + documentation: Lr, + tags: en + }; + } + function pe(q, we) { + return P(), MH.pasteEditsProvider( + D(q.targetFile), + q.pastedText, + q.pasteLocations, + q.copiedFrom ? { file: D(q.copiedFrom.file), range: q.copiedFrom.range } : void 0, + e, + q.preferences, + Hc.getFormatContext(we, e), + d + ); + } + function fe(q) { + return Ib(q.parent) && q.pos === q.parent.pos ? q.parent.expression : AC(q.parent) && q.pos === q.parent.pos || sC(q.parent) && q.parent.name === q || Cd(q.parent) ? q.parent : q; + } + function H(q, we, _e) { + switch (we.kind) { + case 80: + return we.flags & 16777216 && !Qr(we) && (we.parent.kind === 171 && we.parent.name === we || sr( + we, + (Te) => Te.kind === 169 + /* Parameter */ + )) ? !1 : !BV(we) && !JV(we) && !yd(we.parent); + case 211: + case 166: + return !T0(q, _e); + case 110: + case 197: + case 108: + case 202: + return !0; + case 236: + return sC(we); + default: + return !1; + } + } + function ae(q, we, _e, Te) { + return P(), b6.getDefinitionAtPosition(c, D(q), we, _e, Te); + } + function le(q, we) { + return P(), b6.getDefinitionAndBoundSpan(c, D(q), we); + } + function Ae(q, we) { + return P(), b6.getTypeDefinitionAtPosition(c.getTypeChecker(), D(q), we); + } + function ge(q, we) { + return P(), yo.getImplementationsAtPosition(c, d, c.getSourceFiles(), D(q), we); + } + function de(q, we, _e) { + const Te = Cs(q); + E.assert(_e.some((wt) => Cs(wt) === Te)), P(); + const dt = Ii(_e, (wt) => c.getSourceFile(wt)), xt = D(q); + return k9.getDocumentHighlights(c, d, xt, we, dt); + } + function ve(q, we, _e, Te, dt) { + P(); + const xt = D(q), wt = VF(h_(xt, we)); + if (lL.nodeIsEligibleForRename(wt)) + if (Re(wt) && (pm(wt.parent) || Fb(wt.parent)) && hC(wt.escapedText)) { + const { openingElement: ir, closingElement: br } = wt.parent.parent; + return [ir, br].map((Lr) => { + const en = e_(Lr.tagName, xt); + return { + fileName: xt.fileName, + textSpan: en, + ...yo.toContextSpan(en, xt, Lr.parent) + }; + }); + } else { + const ir = Rf(xt, dt ?? Bp), br = typeof dt == "boolean" ? dt : dt?.providePrefixAndSuffixTextForRename; + return Xe(wt, we, { findInStrings: _e, findInComments: Te, providePrefixAndSuffixTextForRename: br, use: yo.FindReferencesUse.Rename }, (Lr, en, fr) => yo.toRenameLocation(Lr, en, fr, br || !1, ir)); + } + } + function De(q, we) { + return P(), Xe(h_(D(q), we), we, { use: yo.FindReferencesUse.References }, yo.toReferenceEntry); + } + function Xe(q, we, _e, Te) { + P(); + const dt = _e && _e.use === yo.FindReferencesUse.Rename ? c.getSourceFiles().filter((xt) => !c.isSourceFileDefaultLibrary(xt)) : c.getSourceFiles(); + return yo.findReferenceOrRenameEntries(c, d, dt, q, we, _e, Te); + } + function Ie(q, we) { + return P(), yo.findReferencedSymbols(c, d, c.getSourceFiles(), D(q), we); + } + function ye(q) { + return P(), yo.Core.getReferencesForFileName(q, c, c.getSourceFiles()).map(yo.toReferenceEntry); + } + function Fe(q, we, _e, Te = !1, dt = !1) { + P(); + const xt = _e ? [D(_e)] : c.getSourceFiles(); + return X2e(xt, c.getTypeChecker(), d, q, we, Te, dt); + } + function Qe(q, we, _e) { + P(); + const Te = D(q), dt = e.getCustomTransformers && e.getCustomTransformers(); + return Iie(c, Te, !!we, d, dt, _e); + } + function Ke(q, we, { triggerReason: _e } = Bp) { + P(); + const Te = D(q); + return WN.getSignatureHelpItems(c, Te, we, _e, d); + } + function Be(q) { + return o.getCurrentSourceFile(q); + } + function at(q, we, _e) { + const Te = o.getCurrentSourceFile(q), dt = h_(Te, we); + if (dt === Te) + return; + switch (dt.kind) { + case 211: + case 166: + case 11: + case 97: + case 112: + case 106: + case 108: + case 110: + case 197: + case 80: + break; + default: + return; + } + let xt = dt; + for (; ; ) + if (i6(xt) || Kse(xt)) + xt = xt.parent; + else if (WV(xt)) + if (xt.parent.parent.kind === 267 && xt.parent.parent.body === xt.parent) + xt = xt.parent.parent.name; + else + break; + else + break; + return Mc(xt.getStart(), dt.getEnd()); + } + function Wt(q, we) { + const _e = o.getCurrentSourceFile(q); + return Eq.spanInSourceFileAtLocation(_e, we); + } + function nr(q) { + return K2e(o.getCurrentSourceFile(q), d); + } + function Kt(q) { + return eSe(o.getCurrentSourceFile(q), d); + } + function Pr(q, we, _e) { + return P(), (_e || "original") === "2020" ? NTe(c, d, D(q), we) : qae(c.getTypeChecker(), d, D(q), c.getClassifiableNames(), we); + } + function Vt(q, we, _e) { + return P(), (_e || "original") === "original" ? WU(c.getTypeChecker(), d, D(q), c.getClassifiableNames(), we) : bce(c, d, D(q), we); + } + function zt(q, we) { + return Hae(d, o.getCurrentSourceFile(q), we); + } + function jr(q, we) { + return VU(d, o.getCurrentSourceFile(q), we); + } + function ci(q) { + const we = o.getCurrentSourceFile(q); + return SH.collectElements(we, d); + } + const Xt = new Map(Object.entries({ + 19: 20, + 21: 22, + 23: 24, + 32: 30 + /* LessThanToken */ + })); + Xt.forEach((q, we) => Xt.set(q.toString(), Number(we))); + function Ai(q, we) { + const _e = o.getCurrentSourceFile(q), Te = a6(_e, we), dt = Te.getStart(_e) === we ? Xt.get(Te.kind.toString()) : void 0, xt = dt && Ya(Te.parent, dt, _e); + return xt ? [e_(Te, _e), e_(xt, _e)].sort((wt, ir) => wt.start - ir.start) : He; + } + function _s(q, we, _e) { + let Te = Io(); + const dt = DN(_e), xt = o.getCurrentSourceFile(q); + h("getIndentationAtPosition: getCurrentSourceFile: " + (Io() - Te)), Te = Io(); + const wt = Hc.SmartIndenter.getIndentation(we, xt, dt); + return h("getIndentationAtPosition: computeIndentation : " + (Io() - Te)), wt; + } + function $n(q, we, _e, Te) { + const dt = o.getCurrentSourceFile(q); + return Hc.formatSelection(we, _e, dt, Hc.getFormatContext(DN(Te), e)); + } + function os(q, we) { + return Hc.formatDocument(o.getCurrentSourceFile(q), Hc.getFormatContext(DN(we), e)); + } + function wr(q, we, _e, Te) { + const dt = o.getCurrentSourceFile(q), xt = Hc.getFormatContext(DN(Te), e); + if (!T0(dt, we)) + switch (_e) { + case "{": + return Hc.formatOnOpeningCurly(we, dt, xt); + case "}": + return Hc.formatOnClosingCurly(we, dt, xt); + case ";": + return Hc.formatOnSemicolon(we, dt, xt); + case ` +`: + return Hc.formatOnEnter(we, dt, xt); + } + return []; + } + function Ss(q, we, _e, Te, dt, xt = Bp) { + P(); + const wt = D(q), ir = Mc(we, _e), br = Hc.getFormatContext(dt, e); + return Xs(tb(Te, Kh, uo), (Lr) => (d.throwIfCancellationRequested(), vu.getFixes({ errorCode: Lr, sourceFile: wt, span: ir, program: c, host: e, cancellationToken: d, formatContext: br, preferences: xt }))); + } + function Le(q, we, _e, Te = Bp) { + P(), E.assert(q.type === "file"); + const dt = D(q.fileName), xt = Hc.getFormatContext(_e, e); + return vu.getAllFixes({ fixId: we, sourceFile: dt, program: c, host: e, cancellationToken: d, formatContext: xt, preferences: Te }); + } + function At(q, we, _e = Bp) { + P(), E.assert(q.type === "file"); + const Te = D(q.fileName), dt = Hc.getFormatContext(we, e), xt = q.mode ?? (q.skipDestructiveCodeActions ? "SortAndCombine" : "All"); + return Sv.organizeImports(Te, dt, e, c, _e, xt); + } + function vr(q, we, _e, Te = Bp) { + return Xae(j(), q, we, e, Hc.getFormatContext(_e, e), Te, C); + } + function ln(q, we) { + const _e = typeof q == "string" ? we : q; + return ss(_e) ? Promise.all(_e.map((Te) => Zn(Te))) : Zn(_e); + } + function Zn(q) { + const we = (_e) => _o(_e, g, T); + return E.assertEqual(q.type, "install package"), e.installPackage ? e.installPackage({ fileName: we(q.file), packageName: q.packageName }) : Promise.reject("Host does not implement `installPackage`"); + } + function ri(q, we, _e, Te) { + const dt = Te ? Hc.getFormatContext(Te, e).options : void 0; + return bv.getDocCommentTemplateAtPosition(k0(e, dt), o.getCurrentSourceFile(q), we, _e); + } + function mi(q, we, _e) { + if (_e === 60) + return !1; + const Te = o.getCurrentSourceFile(q); + if (Mx(Te, we)) + return !1; + if (aae(Te, we)) + return _e === 123; + if ($V(Te, we)) + return !1; + switch (_e) { + case 39: + case 34: + case 96: + return !T0(Te, we); + } + return !0; + } + function Ps(q, we) { + const _e = o.getCurrentSourceFile(q), Te = sl(we, _e); + if (!Te) return; + const dt = Te.kind === 32 && pm(Te.parent) ? Te.parent.parent : cx(Te) && jg(Te.parent) ? Te.parent : void 0; + if (dt && rt(dt)) + return { newText: `` }; + const xt = Te.kind === 32 && cS(Te.parent) ? Te.parent.parent : cx(Te) && Lb(Te.parent) ? Te.parent : void 0; + if (xt && re(xt)) + return { newText: "" }; + } + function ws(q, we) { + const _e = o.getCurrentSourceFile(q), Te = sl(we, _e); + if (!Te || Te.parent.kind === 307) return; + const dt = "[a-zA-Z0-9:\\-\\._$]*"; + if (Lb(Te.parent.parent)) { + const xt = Te.parent.parent.openingFragment, wt = Te.parent.parent.closingFragment; + if (tC(xt) || tC(wt)) return; + const ir = xt.getStart(_e) + 1, br = wt.getStart(_e) + 2; + return we !== ir && we !== br ? void 0 : { + ranges: [{ start: ir, length: 0 }, { start: br, length: 0 }], + wordPattern: dt + }; + } else { + const xt = sr(Te.parent, (Di) => !!(pm(Di) || Fb(Di))); + if (!xt) return; + E.assert(pm(xt) || Fb(xt), "tag should be opening or closing element"); + const wt = xt.parent.openingElement, ir = xt.parent.closingElement, br = wt.tagName.getStart(_e), Lr = wt.tagName.end, en = ir.tagName.getStart(_e), fr = ir.tagName.end; + return br === wt.getStart(_e) || en === ir.getStart(_e) || Lr === wt.getEnd() || fr === ir.getEnd() || !(br <= we && we <= Lr || en <= we && we <= fr) || wt.tagName.getText(_e) !== ir.tagName.getText(_e) ? void 0 : { + ranges: [{ start: br, length: Lr - br }, { start: en, length: fr - en }], + wordPattern: dt + }; + } + } + function Yt(q, we) { + return { + lineStarts: q.getLineStarts(), + firstLine: q.getLineAndCharacterOfPosition(we.pos).line, + lastLine: q.getLineAndCharacterOfPosition(we.end).line + }; + } + function Ca(q, we, _e) { + const Te = o.getCurrentSourceFile(q), dt = [], { lineStarts: xt, firstLine: wt, lastLine: ir } = Yt(Te, we); + let br = _e || !1, Lr = Number.MAX_VALUE; + const en = /* @__PURE__ */ new Map(), fr = new RegExp(/\S/), mn = HF(Te, xt[wt]), Di = mn ? "{/*" : "//"; + for (let Fi = wt; Fi <= ir; Fi++) { + const ur = Te.text.substring(xt[Fi], Te.getLineEndOfPosition(xt[Fi])), Mr = fr.exec(ur); + Mr && (Lr = Math.min(Lr, Mr.index), en.set(Fi.toString(), Mr.index), ur.substr(Mr.index, Di.length) !== Di && (br = _e === void 0 || _e)); + } + for (let Fi = wt; Fi <= ir; Fi++) { + if (wt !== ir && xt[Fi] === we.end) + continue; + const ur = en.get(Fi.toString()); + ur !== void 0 && (mn ? dt.push(...$e(q, { pos: xt[Fi] + Lr, end: Te.getLineEndOfPosition(xt[Fi]) }, br, mn)) : br ? dt.push({ + newText: Di, + span: { + length: 0, + start: xt[Fi] + Lr + } + }) : Te.text.substr(xt[Fi] + ur, Di.length) === Di && dt.push({ + newText: "", + span: { + length: Di.length, + start: xt[Fi] + ur + } + })); + } + return dt; + } + function $e(q, we, _e, Te) { + var dt; + const xt = o.getCurrentSourceFile(q), wt = [], { text: ir } = xt; + let br = !1, Lr = _e || !1; + const en = []; + let { pos: fr } = we; + const mn = Te !== void 0 ? Te : HF(xt, fr), Di = mn ? "{/*" : "/*", Fi = mn ? "*/}" : "*/", ur = mn ? "\\{\\/\\*" : "\\/\\*", Mr = mn ? "\\*\\/\\}" : "\\*\\/"; + for (; fr <= we.end; ) { + const Or = ir.substr(fr, Di.length) === Di ? Di.length : 0, tn = T0(xt, fr + Or); + if (tn) + mn && (tn.pos--, tn.end++), en.push(tn.pos), tn.kind === 3 && en.push(tn.end), br = !0, fr = tn.end + 1; + else { + const qt = ir.substring(fr, we.end).search(`(${ur})|(${Mr})`); + Lr = _e !== void 0 ? _e : Lr || !yae(ir, fr, qt === -1 ? we.end : fr + qt), fr = qt === -1 ? we.end + 1 : fr + qt + Fi.length; + } + } + if (Lr || !br) { + ((dt = T0(xt, we.pos)) == null ? void 0 : dt.kind) !== 2 && ry(en, we.pos, uo), ry(en, we.end, uo); + const Or = en[0]; + ir.substr(Or, Di.length) !== Di && wt.push({ + newText: Di, + span: { + length: 0, + start: Or + } + }); + for (let tn = 1; tn < en.length - 1; tn++) + ir.substr(en[tn] - Fi.length, Fi.length) !== Fi && wt.push({ + newText: Fi, + span: { + length: 0, + start: en[tn] + } + }), ir.substr(en[tn], Di.length) !== Di && wt.push({ + newText: Di, + span: { + length: 0, + start: en[tn] + } + }); + wt.length % 2 !== 0 && wt.push({ + newText: Fi, + span: { + length: 0, + start: en[en.length - 1] + } + }); + } else + for (const Or of en) { + const tn = Or - Fi.length > 0 ? Or - Fi.length : 0, qt = ir.substr(tn, Fi.length) === Fi ? Fi.length : 0; + wt.push({ + newText: "", + span: { + length: Di.length, + start: Or - qt + } + }); + } + return wt; + } + function nt(q, we) { + const _e = o.getCurrentSourceFile(q), { firstLine: Te, lastLine: dt } = Yt(_e, we); + return Te === dt && we.pos !== we.end ? $e( + q, + we, + /*insertComment*/ + !0 + ) : Ca( + q, + we, + /*insertComment*/ + !0 + ); + } + function te(q, we) { + const _e = o.getCurrentSourceFile(q), Te = [], { pos: dt } = we; + let { end: xt } = we; + dt === xt && (xt += HF(_e, dt) ? 2 : 1); + for (let wt = dt; wt <= xt; wt++) { + const ir = T0(_e, wt); + if (ir) { + switch (ir.kind) { + case 2: + Te.push(...Ca( + q, + { end: ir.end, pos: ir.pos + 1 }, + /*insertComment*/ + !1 + )); + break; + case 3: + Te.push(...$e( + q, + { end: ir.end, pos: ir.pos + 1 }, + /*insertComment*/ + !1 + )); + } + wt = ir.end + 1; + } + } + return Te; + } + function rt({ openingElement: q, closingElement: we, parent: _e }) { + return !cv(q.tagName, we.tagName) || jg(_e) && cv(q.tagName, _e.openingElement.tagName) && rt(_e); + } + function re({ closingFragment: q, parent: we }) { + return !!(q.flags & 262144) || Lb(we) && re(we); + } + function Ee(q, we, _e) { + const Te = o.getCurrentSourceFile(q), dt = Hc.getRangeOfEnclosingComment(Te, we); + return dt && (!_e || dt.kind === 3) ? Fy(dt) : void 0; + } + function Ne(q, we) { + P(); + const _e = D(q); + d.throwIfCancellationRequested(); + const Te = _e.text, dt = []; + if (we.length > 0 && !br(_e.fileName)) { + const Lr = wt(); + let en; + for (; en = Lr.exec(Te); ) { + d.throwIfCancellationRequested(); + const fr = 3; + E.assert(en.length === we.length + fr); + const mn = en[1], Di = en.index + mn.length; + if (!T0(_e, Di)) + continue; + let Fi; + for (let Mr = 0; Mr < we.length; Mr++) + en[Mr + fr] && (Fi = we[Mr]); + if (Fi === void 0) return E.fail(); + if (ir(Te.charCodeAt(Di + Fi.text.length))) + continue; + const ur = en[2]; + dt.push({ descriptor: Fi, message: ur, position: Di }); + } + } + return dt; + function xt(Lr) { + return Lr.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); + } + function wt() { + const Lr = /(?:\/\/+\s*)/.source, en = /(?:\/\*+\s*)/.source, mn = "(" + /(?:^(?:\s|\*)*)/.source + "|" + Lr + "|" + en + ")", Di = "(?:" + or(we, (tn) => "(" + xt(tn.text) + ")").join("|") + ")", Fi = /(?:$|\*\/)/.source, ur = /(?:.*?)/.source, Mr = "(" + Di + ur + ")", Or = mn + Mr + Fi; + return new RegExp(Or, "gim"); + } + function ir(Lr) { + return Lr >= 97 && Lr <= 122 || Lr >= 65 && Lr <= 90 || Lr >= 48 && Lr <= 57; + } + function br(Lr) { + return Lr.includes("/node_modules/"); + } + } + function et(q, we, _e) { + return P(), lL.getRenameInfo(c, D(q), we, _e || {}); + } + function lt(q, we, _e, Te, dt, xt) { + const [wt, ir] = typeof we == "number" ? [we, void 0] : [we.pos, we.end]; + return { + file: q, + startPosition: wt, + endPosition: ir, + program: j(), + host: e, + formatContext: Hc.getFormatContext(Te, e), + // TODO: GH#18217 + cancellationToken: d, + preferences: _e, + triggerReason: dt, + kind: xt + }; + } + function jt(q, we, _e) { + return { + file: q, + program: j(), + host: e, + span: we, + preferences: _e, + cancellationToken: d + }; + } + function be(q, we) { + return kH.getSmartSelectionRange(we, o.getCurrentSourceFile(q)); + } + function ft(q, we, _e = Bp, Te, dt, xt) { + P(); + const wt = D(q); + return zx.getApplicableRefactors(lt(wt, we, _e, Bp, Te, dt), xt); + } + function bt(q, we, _e = Bp) { + P(); + const Te = D(q), dt = E.checkDefined(c.getSourceFiles()), xt = R4(q), wt = CN(lt(Te, we, _e, Bp)), ir = zoe(wt?.all), br = Ii(dt, (Lr) => { + const en = R4(Lr.fileName); + return !c?.isSourceFileFromExternalLibrary(Te) && !(Te === D(Lr.fileName) || xt === ".ts" && en === ".d.ts" || xt === ".d.ts" && zi(Wc(Lr.fileName), "lib.") && en === ".d.ts") && (xt === en || (xt === ".tsx" && en === ".ts" || xt === ".jsx" && en === ".js") && !ir) ? Lr.fileName : void 0; + }); + return { newFileName: Joe(Te, c, e, wt), files: br }; + } + function kt(q, we, _e, Te, dt, xt = Bp, wt) { + P(); + const ir = D(q); + return zx.getEditsForRefactor(lt(ir, _e, xt, we), Te, dt, wt); + } + function yt(q, we) { + return we === 0 ? { line: 0, character: 0 } : C.toLineColumnOffset(q, we); + } + function Ut(q, we) { + P(); + const _e = Wx.resolveCallHierarchyDeclaration(c, h_(D(q), we)); + return _e && OU(_e, (Te) => Wx.createCallHierarchyItem(c, Te)); + } + function W(q, we) { + P(); + const _e = D(q), Te = FU(Wx.resolveCallHierarchyDeclaration(c, we === 0 ? _e : h_(_e, we))); + return Te ? Wx.getIncomingCalls(c, Te, d) : []; + } + function je(q, we) { + P(); + const _e = D(q), Te = FU(Wx.resolveCallHierarchyDeclaration(c, we === 0 ? _e : h_(_e, we))); + return Te ? Wx.getOutgoingCalls(c, Te) : []; + } + function st(q, we, _e = Bp) { + P(); + const Te = D(q); + return hH.provideInlayHints(jt(Te, we, _e)); + } + function z(q, we, _e, Te, dt) { + return yH.mapCode( + o.getCurrentSourceFile(q), + we, + _e, + e, + Hc.getFormatContext(Te, e), + dt + ); + } + const he = { + dispose: $, + cleanupSemanticCache: L, + getSyntacticDiagnostics: U, + getSemanticDiagnostics: G, + getSuggestionDiagnostics: ce, + getCompilerOptionsDiagnostics: K, + getSyntacticClassifications: zt, + getSemanticClassifications: Pr, + getEncodedSyntacticClassifications: jr, + getEncodedSemanticClassifications: Vt, + getCompletionsAtPosition: X, + getCompletionEntryDetails: Z, + getCompletionEntrySymbol: oe, + getSignatureHelpItems: Ke, + getQuickInfoAtPosition: ne, + getDefinitionAtPosition: ae, + getDefinitionAndBoundSpan: le, + getImplementationAtPosition: ge, + getTypeDefinitionAtPosition: Ae, + getReferencesAtPosition: De, + findReferences: Ie, + getFileReferences: ye, + getDocumentHighlights: de, + getNameOrDottedNameSpan: at, + getBreakpointStatementAtPosition: Wt, + getNavigateToItems: Fe, + getRenameInfo: et, + getSmartSelectionRange: be, + findRenameLocations: ve, + getNavigationBarItems: nr, + getNavigationTree: Kt, + getOutliningSpans: ci, + getTodoComments: Ne, + getBraceMatchingAtPosition: Ai, + getIndentationAtPosition: _s, + getFormattingEditsForRange: $n, + getFormattingEditsForDocument: os, + getFormattingEditsAfterKeystroke: wr, + getDocCommentTemplateAtPosition: ri, + isValidBraceCompletionAtPosition: mi, + getJsxClosingTagAtPosition: Ps, + getLinkedEditingRangeAtPosition: ws, + getSpanOfEnclosingComment: Ee, + getCodeFixesAtPosition: Ss, + getCombinedCodeFix: Le, + applyCodeActionCommand: ln, + organizeImports: At, + getEditsForFileRename: vr, + getEmitOutput: Qe, + getNonBoundSourceFile: Be, + getProgram: j, + getCurrentProgram: () => c, + getAutoImportProvider: F, + updateIsDefinitionOfReferencedSymbols: V, + getApplicableRefactors: ft, + getEditsForRefactor: kt, + getMoveToRefactoringFileSuggestions: bt, + toLineColumnOffset: yt, + getSourceMapper: () => C, + clearSourceMapperCache: () => C.clearCache(), + prepareCallHierarchy: Ut, + provideCallHierarchyIncomingCalls: W, + provideCallHierarchyOutgoingCalls: je, + toggleLineComment: Ca, + toggleMultilineComment: $e, + commentSelection: nt, + uncommentSelection: te, + provideInlayHints: st, + getSupportedCodeFixes: xq, + getPasteEdits: pe, + mapCode: z + }; + switch (s) { + case 0: + break; + case 1: + UTe.forEach( + (q) => he[q] = () => { + throw new Error(`LanguageService Operation: ${q} not allowed in LanguageServiceMode.PartialSemantic`); + } + ); + break; + case 2: + RWe.forEach( + (q) => he[q] = () => { + throw new Error(`LanguageService Operation: ${q} not allowed in LanguageServiceMode.Syntactic`); + } + ); + break; + default: + E.assertNever(s); + } + return he; + } + function Cq(e) { + return e.nameTable || jWe(e), e.nameTable; + } + function jWe(e) { + const t = e.nameTable = /* @__PURE__ */ new Map(); + e.forEachChild(function n(i) { + if (Re(i) && !JV(i) && i.escapedText || Pf(i) && BWe(i)) { + const s = h4(i); + t.set(s, t.get(s) === void 0 ? i.pos : -1); + } else if (wi(i)) { + const s = i.escapedText; + t.set(s, t.get(s) === void 0 ? i.pos : -1); + } + if (gs(i, n), gf(i)) + for (const s of i.jsDoc) + gs(s, n); + }); + } + function BWe(e) { + return Gm(e) || e.parent.kind === 283 || WWe(e) || b3(e); + } + function wN(e) { + const t = JWe(e); + return t && (Gs(t.parent) || Mb(t.parent)) ? t : void 0; + } + function JWe(e) { + switch (e.kind) { + case 11: + case 15: + case 9: + if (e.parent.kind === 167) + return Ej(e.parent.parent) ? e.parent.parent : void 0; + case 80: + return Ej(e.parent) && (e.parent.parent.kind === 210 || e.parent.parent.kind === 292) && e.parent.name === e ? e.parent : void 0; + } + } + function zWe(e, t) { + const n = wN(e); + if (n) { + const i = t.getContextualType(n.parent), s = i && z9( + n, + t, + i, + /*unionSymbolOk*/ + !1 + ); + if (s && s.length === 1) + return fa(s); + } + return t.getSymbolAtLocation(e); + } + function z9(e, t, n, i) { + const s = lN(e.name); + if (!s) return He; + if (!n.isUnion()) { + const _ = n.getProperty(s); + return _ ? [_] : He; + } + const o = Gs(e.parent) || Mb(e.parent) ? Ln(n.types, (_) => !t.isTypeInvalidDueToUnionDiscriminant(_, e.parent)) : n.types, c = Ii(o, (_) => _.getProperty(s)); + if (i && (c.length === 0 || c.length === n.types.length)) { + const _ = n.getProperty(s); + if (_) return [_]; + } + return !o.length && !c.length ? Ii(n.types, (_) => _.getProperty(s)) : tb(c, Kh); + } + function WWe(e) { + return e && e.parent && e.parent.kind === 212 && e.parent.argumentExpression === e; + } + function Cce(e) { + if (_l) + return Mn(Xn(Cs(_l.getExecutingFilePath())), bw(e)); + throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. "); + } + WK(OWe()); + function qTe(e, t, n) { + const i = []; + n = eq(n, i); + const s = ss(e) ? e : [e], o = MA( + /*resolver*/ + void 0, + /*host*/ + void 0, + N, + n, + s, + t, + /*allowDtsFiles*/ + !0 + ); + return o.diagnostics = Hi(o.diagnostics, i), o; + } + var Eq = {}; + Qa(Eq, { + spanInSourceFileAtLocation: () => VWe + }); + function VWe(e, t) { + if (e.isDeclarationFile) + return; + let n = Ei(e, t); + const i = e.getLineAndCharacterOfPosition(t).line; + if (e.getLineAndCharacterOfPosition(n.getStart(e)).line > i) { + const h = sl(n.pos, e); + if (!h || e.getLineAndCharacterOfPosition(h.getEnd()).line !== i) + return; + n = h; + } + if (n.flags & 33554432) + return; + return g(n); + function s(h, S) { + const T = jb(h) ? eb(h.modifiers, dl) : void 0, C = T ? sa(e.text, T.end) : h.getStart(e); + return Mc(C, (S || h).getEnd()); + } + function o(h, S) { + return s(h, qb(S, S.parent, e)); + } + function c(h, S) { + return h && i === e.getLineAndCharacterOfPosition(h.getStart(e)).line ? g(h) : g(S); + } + function _(h, S, T) { + if (h) { + const C = h.indexOf(S); + if (C >= 0) { + let D = C, P = C + 1; + for (; D > 0 && T(h[D - 1]); ) D--; + for (; P < h.length && T(h[P]); ) P++; + return Mc(sa(e.text, h[D].pos), h[P - 1].end); + } + } + return s(S); + } + function u(h) { + return g(sl(h.pos, e)); + } + function d(h) { + return g(qb(h, h.parent, e)); + } + function g(h) { + if (h) { + const { parent: H } = h; + switch (h.kind) { + case 243: + return T(h.declarationList.declarations[0]); + case 260: + case 172: + case 171: + return T(h); + case 169: + return D(h); + case 262: + case 174: + case 173: + case 177: + case 178: + case 176: + case 218: + case 219: + return O(h); + case 241: + if (pb(h)) + return j(h); + case 268: + return F(h); + case 299: + return F(h.block); + case 244: + return s(h.expression); + case 253: + return s(h.getChildAt(0), h.expression); + case 247: + return o(h, h.expression); + case 246: + return g(h.statement); + case 259: + return s(h.getChildAt(0)); + case 245: + return o(h, h.expression); + case 256: + return g(h.statement); + case 252: + case 251: + return s(h.getChildAt(0), h.label); + case 248: + return L(h); + case 249: + return o(h, h.expression); + case 250: + return V(h); + case 255: + return o(h, h.expression); + case 296: + case 297: + return g(h.statements[0]); + case 258: + return F(h.tryBlock); + case 257: + return s(h, h.expression); + case 277: + return s(h, h.expression); + case 271: + return s(h, h.moduleReference); + case 272: + return s(h, h.moduleSpecifier); + case 278: + return s(h, h.moduleSpecifier); + case 267: + if (Ch(h) !== 1) + return; + case 263: + case 266: + case 306: + case 208: + return s(h); + case 254: + return g(h.statement); + case 170: + return _(H.modifiers, h, dl); + case 206: + case 207: + return $(h); + case 264: + case 265: + return; + case 27: + case 1: + return c(sl(h.pos, e)); + case 28: + return u(h); + case 19: + return G(h); + case 20: + return ce(h); + case 24: + return K(h); + case 21: + return X(h); + case 22: + return Z(h); + case 59: + return oe(h); + case 32: + case 30: + return ne(h); + case 117: + return pe(h); + case 93: + case 85: + case 98: + return d(h); + case 165: + return fe(h); + default: + if (x0(h)) + return U(h); + if ((h.kind === 80 || h.kind === 230 || h.kind === 303 || h.kind === 304) && x0(H)) + return s(h); + if (h.kind === 226) { + const { left: ae, operatorToken: le } = h; + if (x0(ae)) + return U( + ae + ); + if (le.kind === 64 && x0(h.parent)) + return s(h); + if (le.kind === 28) + return g(ae); + } + if (Sd(h)) + switch (H.kind) { + case 246: + return u(h); + case 170: + return g(h.parent); + case 248: + case 250: + return s(h); + case 226: + if (h.parent.operatorToken.kind === 28) + return s(h); + break; + case 219: + if (h.parent.body === h) + return s(h); + break; + } + switch (h.parent.kind) { + case 303: + if (h.parent.name === h && !x0(h.parent.parent)) + return g(h.parent.initializer); + break; + case 216: + if (h.parent.type === h) + return d(h.parent.type); + break; + case 260: + case 169: { + const { initializer: ae, type: le } = h.parent; + if (ae === h || le === h || dh(h.kind)) + return u(h); + break; + } + case 226: { + const { left: ae } = h.parent; + if (x0(ae) && h !== ae) + return u(h); + break; + } + default: + if (ps(h.parent) && h.parent.type === h) + return u(h); + } + return g(h.parent); + } + } + function S(H) { + return Il(H.parent) && H.parent.declarations[0] === H ? s(sl(H.pos, e, H.parent), H) : s(H); + } + function T(H) { + if (H.parent.parent.kind === 249) + return g(H.parent.parent); + const ae = H.parent; + if (Ts(H.name)) + return $(H.name); + if (U2(H) && H.initializer || Vn( + H, + 32 + /* Export */ + ) || ae.parent.kind === 250) + return S(H); + if (Il(H.parent) && H.parent.declarations[0] !== H) + return g(sl(H.pos, e, H.parent)); + } + function C(H) { + return !!H.initializer || H.dotDotDotToken !== void 0 || Vn( + H, + 3 + /* Private */ + ); + } + function D(H) { + if (Ts(H.name)) + return $(H.name); + if (C(H)) + return s(H); + { + const ae = H.parent, le = ae.parameters.indexOf(H); + return E.assert(le !== -1), le !== 0 ? D(ae.parameters[le - 1]) : g(ae.body); + } + } + function P(H) { + return Vn( + H, + 32 + /* Export */ + ) || H.parent.kind === 263 && H.kind !== 176; + } + function O(H) { + if (H.body) + return P(H) ? s(H) : g(H.body); + } + function j(H) { + const ae = H.statements.length ? H.statements[0] : H.getLastToken(); + return P(H.parent) ? c(H.parent, ae) : g(ae); + } + function F(H) { + switch (H.parent.kind) { + case 267: + if (Ch(H.parent) !== 1) + return; + case 247: + case 245: + case 249: + return c(H.parent, H.statements[0]); + case 248: + case 250: + return c(sl(H.pos, e, H.parent), H.statements[0]); + } + return g(H.statements[0]); + } + function V(H) { + if (H.initializer.kind === 261) { + const ae = H.initializer; + if (ae.declarations.length > 0) + return g(ae.declarations[0]); + } else + return g(H.initializer); + } + function L(H) { + if (H.initializer) + return V(H); + if (H.condition) + return s(H.condition); + if (H.incrementor) + return s(H.incrementor); + } + function $(H) { + const ae = rr(H.elements, (le) => le.kind !== 232 ? le : void 0); + return ae ? g(ae) : H.parent.kind === 208 ? s(H.parent) : S(H.parent); + } + function U(H) { + E.assert( + H.kind !== 207 && H.kind !== 206 + /* ObjectBindingPattern */ + ); + const ae = H.kind === 209 ? H.elements : H.properties, le = rr(ae, (Ae) => Ae.kind !== 232 ? Ae : void 0); + return le ? g(le) : s(H.parent.kind === 226 ? H.parent : H); + } + function G(H) { + switch (H.parent.kind) { + case 266: + const ae = H.parent; + return c(sl(H.pos, e, H.parent), ae.members.length ? ae.members[0] : ae.getLastToken(e)); + case 263: + const le = H.parent; + return c(sl(H.pos, e, H.parent), le.members.length ? le.members[0] : le.getLastToken(e)); + case 269: + return c(H.parent.parent, H.parent.clauses[0]); + } + return g(H.parent); + } + function ce(H) { + switch (H.parent.kind) { + case 268: + if (Ch(H.parent.parent) !== 1) + return; + case 266: + case 263: + return s(H); + case 241: + if (pb(H.parent)) + return s(H); + case 299: + return g(Bo(H.parent.statements)); + case 269: + const ae = H.parent, le = Bo(ae.clauses); + return le ? g(Bo(le.statements)) : void 0; + case 206: + const Ae = H.parent; + return g(Bo(Ae.elements) || Ae); + default: + if (x0(H.parent)) { + const ge = H.parent; + return s(Bo(ge.properties) || ge); + } + return g(H.parent); + } + } + function K(H) { + switch (H.parent.kind) { + case 207: + const ae = H.parent; + return s(Bo(ae.elements) || ae); + default: + if (x0(H.parent)) { + const le = H.parent; + return s(Bo(le.elements) || le); + } + return g(H.parent); + } + } + function X(H) { + return H.parent.kind === 246 || // Go to while keyword and do action instead + H.parent.kind === 213 || H.parent.kind === 214 ? u(H) : H.parent.kind === 217 ? d(H) : g(H.parent); + } + function Z(H) { + switch (H.parent.kind) { + case 218: + case 262: + case 219: + case 174: + case 173: + case 177: + case 178: + case 176: + case 247: + case 246: + case 248: + case 250: + case 213: + case 214: + case 217: + return u(H); + default: + return g(H.parent); + } + } + function oe(H) { + return ps(H.parent) || H.parent.kind === 303 || H.parent.kind === 169 ? u(H) : g(H.parent); + } + function ne(H) { + return H.parent.kind === 216 ? d(H) : g(H.parent); + } + function pe(H) { + return H.parent.kind === 246 ? o(H, H.parent.expression) : g(H.parent); + } + function fe(H) { + return H.parent.kind === 250 ? d(H) : g(H.parent); + } + } + } + var Wx = {}; + Qa(Wx, { + createCallHierarchyItem: () => Ece, + getIncomingCalls: () => YWe, + getOutgoingCalls: () => oVe, + resolveCallHierarchyDeclaration: () => KTe + }); + function UWe(e) { + return (po(e) || tl(e)) && Bl(e); + } + function HTe(e) { + return rs(e) || ti(e); + } + function AN(e) { + return (po(e) || xo(e) || tl(e)) && HTe(e.parent) && e === e.parent.initializer && Re(e.parent.name) && (!!(ch(e.parent) & 2) || rs(e.parent)); + } + function GTe(e) { + return yi(e) || Nc(e) || Ac(e) || po(e) || rl(e) || tl(e) || ac(e) || hc(e) || um(e) || Af(e) || rf(e); + } + function h6(e) { + return yi(e) || Nc(e) && Re(e.name) || Ac(e) || rl(e) || ac(e) || hc(e) || um(e) || Af(e) || rf(e) || UWe(e) || AN(e); + } + function $Te(e) { + return yi(e) ? e : Bl(e) ? e.name : AN(e) ? e.parent.name : E.checkDefined(e.modifiers && Nn(e.modifiers, XTe)); + } + function XTe(e) { + return e.kind === 90; + } + function QTe(e, t) { + const n = $Te(t); + return n && e.getSymbolAtLocation(n); + } + function qWe(e, t) { + if (yi(t)) + return { text: t.fileName, pos: 0, end: 0 }; + if ((Ac(t) || rl(t)) && !Bl(t)) { + const s = t.modifiers && Nn(t.modifiers, XTe); + if (s) + return { text: "default", pos: s.getStart(), end: s.getEnd() }; + } + if (ac(t)) { + const s = t.getSourceFile(), o = sa(s.text, am(t).pos), c = o + 6, _ = e.getTypeChecker(), u = _.getSymbolAtLocation(t.parent); + return { text: `${u ? `${_.symbolToString(u, t.parent)} ` : ""}static {}`, pos: o, end: c }; + } + const n = AN(t) ? t.parent.name : E.checkDefined(es(t), "Expected call hierarchy item to have a name"); + let i = Re(n) ? dn(n) : Pf(n) ? n.text : oa(n) && Pf(n.expression) ? n.expression.text : void 0; + if (i === void 0) { + const s = e.getTypeChecker(), o = s.getSymbolAtLocation(n); + o && (i = s.symbolToString(o, t)); + } + if (i === void 0) { + const s = eF(); + i = e4((o) => s.writeNode(4, t, t.getSourceFile(), o)); + } + return { text: i, pos: n.getStart(), end: n.getEnd() }; + } + function HWe(e) { + var t, n, i, s; + if (AN(e)) + return rs(e.parent) && Qn(e.parent.parent) ? tl(e.parent.parent) ? (t = LI(e.parent.parent)) == null ? void 0 : t.getText() : (n = e.parent.parent.name) == null ? void 0 : n.getText() : _m(e.parent.parent.parent.parent) && Re(e.parent.parent.parent.parent.parent.name) ? e.parent.parent.parent.parent.parent.name.getText() : void 0; + switch (e.kind) { + case 177: + case 178: + case 174: + return e.parent.kind === 210 ? (i = LI(e.parent)) == null ? void 0 : i.getText() : (s = es(e.parent)) == null ? void 0 : s.getText(); + case 262: + case 263: + case 267: + if (_m(e.parent) && Re(e.parent.parent.name)) + return e.parent.parent.name.getText(); + } + } + function YTe(e, t) { + if (t.body) + return t; + if (ec(t)) + return Ng(t.parent); + if (Ac(t) || hc(t)) { + const n = QTe(e, t); + return n && n.valueDeclaration && so(n.valueDeclaration) && n.valueDeclaration.body ? n.valueDeclaration : void 0; + } + return t; + } + function ZTe(e, t) { + const n = QTe(e, t); + let i; + if (n && n.declarations) { + const s = nw(n.declarations), o = or(n.declarations, (u) => ({ file: u.getSourceFile().fileName, pos: u.pos })); + s.sort((u, d) => Kl(o[u].file, o[d].file) || o[u].pos - o[d].pos); + const c = or(s, (u) => n.declarations[u]); + let _; + for (const u of c) + h6(u) && ((!_ || _.parent !== u.parent || _.end !== u.pos) && (i = Tr(i, u)), _ = u); + } + return i; + } + function Dq(e, t) { + return ac(t) ? t : so(t) ? YTe(e, t) ?? ZTe(e, t) ?? t : ZTe(e, t) ?? t; + } + function KTe(e, t) { + const n = e.getTypeChecker(); + let i = !1; + for (; ; ) { + if (h6(t)) + return Dq(n, t); + if (GTe(t)) { + const s = sr(t, h6); + return s && Dq(n, s); + } + if (Gm(t)) { + if (h6(t.parent)) + return Dq(n, t.parent); + if (GTe(t.parent)) { + const s = sr(t.parent, h6); + return s && Dq(n, s); + } + return HTe(t.parent) && t.parent.initializer && AN(t.parent.initializer) ? t.parent.initializer : void 0; + } + if (ec(t)) + return h6(t.parent) ? t.parent : void 0; + if (t.kind === 126 && ac(t.parent)) { + t = t.parent; + continue; + } + if (ti(t) && t.initializer && AN(t.initializer)) + return t.initializer; + if (!i) { + let s = n.getSymbolAtLocation(t); + if (s && (s.flags & 2097152 && (s = n.getAliasedSymbol(s)), s.valueDeclaration)) { + i = !0, t = s.valueDeclaration; + continue; + } + } + return; + } + } + function Ece(e, t) { + const n = t.getSourceFile(), i = qWe(e, t), s = HWe(t), o = Ub(t), c = UD(t), _ = Mc(sa( + n.text, + t.getFullStart(), + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ), t.getEnd()), u = Mc(i.pos, i.end); + return { file: n.fileName, kind: o, kindModifiers: c, name: i.text, containerName: s, span: _, selectionSpan: u }; + } + function GWe(e) { + return e !== void 0; + } + function $We(e) { + if (e.kind === yo.EntryKind.Node) { + const { node: t } = e; + if (MV( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Xse( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Qse( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || Yse( + t, + /*includeElementAccess*/ + !0, + /*skipPastOuterExpressions*/ + !0 + ) || i6(t) || zV(t)) { + const n = t.getSourceFile(); + return { declaration: sr(t, h6) || n, range: rU(t, n) }; + } + } + } + function exe(e) { + return ja(e.declaration); + } + function XWe(e, t) { + return { from: e, fromSpans: t }; + } + function QWe(e, t) { + return XWe(Ece(e, t[0].declaration), or(t, (n) => Fy(n.range))); + } + function YWe(e, t, n) { + if (yi(t) || Nc(t) || ac(t)) + return []; + const i = $Te(t), s = Ln(yo.findReferenceOrRenameEntries( + e, + n, + e.getSourceFiles(), + i, + /*position*/ + 0, + { use: yo.FindReferencesUse.References }, + $We + ), GWe); + return s ? TE(s, exe, (o) => QWe(e, o)) : []; + } + function ZWe(e, t) { + function n(s) { + const o = Ob(s) ? s.tag : ru(s) ? s.tagName : go(s) || ac(s) ? s : s.expression, c = KTe(e, o); + if (c) { + const _ = rU(o, s.getSourceFile()); + if (ss(c)) + for (const u of c) + t.push({ declaration: u, range: _ }); + else + t.push({ declaration: c, range: _ }); + } + } + function i(s) { + if (s && !(s.flags & 33554432)) { + if (h6(s)) { + if (Qn(s)) + for (const o of s.members) + o.name && oa(o.name) && i(o.name.expression); + return; + } + switch (s.kind) { + case 80: + case 271: + case 272: + case 278: + case 264: + case 265: + return; + case 175: + n(s); + return; + case 216: + case 234: + i(s.expression); + return; + case 260: + case 169: + i(s.name), i(s.initializer); + return; + case 213: + n(s), i(s.expression), rr(s.arguments, i); + return; + case 214: + n(s), i(s.expression), rr(s.arguments, i); + return; + case 215: + n(s), i(s.tag), i(s.template); + return; + case 286: + case 285: + n(s), i(s.tagName), i(s.attributes); + return; + case 170: + n(s), i(s.expression); + return; + case 211: + case 212: + n(s), gs(s, i); + break; + case 238: + i(s.expression); + return; + } + em(s) || gs(s, i); + } + } + return i; + } + function KWe(e, t) { + rr(e.statements, t); + } + function eVe(e, t) { + !Vn( + e, + 128 + /* Ambient */ + ) && e.body && _m(e.body) && rr(e.body.statements, t); + } + function tVe(e, t, n) { + const i = YTe(e, t); + i && (rr(i.parameters, n), n(i.body)); + } + function rVe(e, t) { + t(e.body); + } + function nVe(e, t) { + rr(e.modifiers, t); + const n = vb(e); + n && t(n.expression); + for (const i of e.members) + ed(i) && rr(i.modifiers, t), rs(i) ? t(i.initializer) : ec(i) && i.body ? (rr(i.parameters, t), t(i.body)) : ac(i) && t(i); + } + function iVe(e, t) { + const n = [], i = ZWe(e, n); + switch (t.kind) { + case 307: + KWe(t, i); + break; + case 267: + eVe(t, i); + break; + case 262: + case 218: + case 219: + case 174: + case 177: + case 178: + tVe(e.getTypeChecker(), t, i); + break; + case 263: + case 231: + nVe(t, i); + break; + case 175: + rVe(t, i); + break; + default: + E.assertNever(t); + } + return n; + } + function sVe(e, t) { + return { to: e, fromSpans: t }; + } + function aVe(e, t) { + return sVe(Ece(e, t[0].declaration), or(t, (n) => Fy(n.range))); + } + function oVe(e, t) { + return t.flags & 33554432 || um(t) ? [] : TE(iVe(e, t), exe, (n) => aVe(e, n)); + } + var Dce = {}; + Qa(Dce, { + v2020: () => txe + }); + var txe = {}; + Qa(txe, { + TokenEncodingConsts: () => PTe, + TokenModifier: () => ATe, + TokenType: () => wTe, + getEncodedSemanticClassifications: () => bce, + getSemanticClassifications: () => NTe + }); + var vu = {}; + Qa(vu, { + PreserveOptionalFlags: () => uEe, + addNewNodeForMemberSymbol: () => _Ee, + codeFixAll: () => Za, + createCodeFixAction: () => Ds, + createCodeFixActionMaybeFixAll: () => Ace, + createCodeFixActionWithoutFixAll: () => Nd, + createCombinedCodeActions: () => Vx, + createFileTextChanges: () => rxe, + createImportAdder: () => Zb, + createImportSpecifierResolver: () => gUe, + createJsonPropertyAssignment: () => tH, + createMissingMemberNodes: () => $le, + createSignatureDeclarationFromCallExpression: () => Xle, + createSignatureDeclarationFromSignature: () => eH, + createStubbedBody: () => X9, + eachDiagnostic: () => Ux, + findAncestorMatchingSpan: () => tue, + findJsonProperty: () => eue, + generateAccessorFromProperty: () => hEe, + getAccessorConvertiblePropertyAtPosition: () => bEe, + getAllFixes: () => _Ve, + getAllSupers: () => rue, + getArgumentTypesAndTypeParameters: () => dEe, + getFixes: () => uVe, + getImportCompletionAction: () => hUe, + getImportKind: () => Bq, + getJSDocTypedefNodes: () => dUe, + getNoopSymbolTrackerWithResolver: () => v6, + getPromoteTypeOnlyCompletionAction: () => yUe, + getSupportedErrorCodes: () => cVe, + importFixName: () => Tke, + importSymbols: () => Gx, + parameterShouldGetTypeFromJSDoc: () => Nxe, + registerCodeFix: () => Us, + setJsonCompilerOptionValue: () => Kle, + setJsonCompilerOptionValues: () => Zle, + tryGetAutoImportableReferenceFromTypeNode: () => SS, + typeToAutoImportableTypeNode: () => $9 + }); + var Pce = Kf(), wce = /* @__PURE__ */ new Map(); + function Nd(e, t, n) { + return Nce( + e, + Gb(n), + t, + /*fixId*/ + void 0, + /*fixAllDescription*/ + void 0 + ); + } + function Ds(e, t, n, i, s, o) { + return Nce(e, Gb(n), t, i, Gb(s), o); + } + function Ace(e, t, n, i, s, o) { + return Nce(e, Gb(n), t, i, s && Gb(s), o); + } + function Nce(e, t, n, i, s, o) { + return { fixName: e, description: t, changes: n, fixId: i, fixAllDescription: s, commands: o ? [o] : void 0 }; + } + function Us(e) { + for (const t of e.errorCodes) + Ice = void 0, Pce.add(String(t), e); + if (e.fixIds) + for (const t of e.fixIds) + E.assert(!wce.has(t)), wce.set(t, e); + } + var Ice; + function cVe() { + return Ice ?? (Ice = ts(Pce.keys())); + } + function lVe(e, t) { + const { errorCodes: n } = e; + let i = 0; + for (const o of t) + if (ls(n, o.code) && i++, i > 1) break; + const s = i < 2; + return ({ fixId: o, fixAllDescription: c, ..._ }) => s ? _ : { ..._, fixId: o, fixAllDescription: c }; + } + function uVe(e) { + const t = nxe(e), n = Pce.get(String(e.errorCode)); + return Xs(n, (i) => or(i.getCodeActions(e), lVe(i, t))); + } + function _Ve(e) { + return wce.get(Is(e.fixId, Gi)).getAllCodeActions(e); + } + function Vx(e, t) { + return { changes: e, commands: t }; + } + function rxe(e, t) { + return { fileName: e, textChanges: t }; + } + function Za(e, t, n) { + const i = [], s = Yr.ChangeTracker.with(e, (o) => Ux(e, t, (c) => n(o, c, i))); + return Vx(s, i.length === 0 ? void 0 : i); + } + function Ux(e, t, n) { + for (const i of nxe(e)) + ls(t, i.code) && n(i); + } + function nxe({ program: e, sourceFile: t, cancellationToken: n }) { + const i = [ + ...e.getSemanticDiagnostics(t, n), + ...e.getSyntacticDiagnostics(t, n), + ...QU(t, e, n) + ]; + return op(e.getCompilerOptions()) && i.push( + ...e.getDeclarationDiagnostics(t, n) + ), i; + } + var Oce = "addConvertToUnknownForNonOverlappingTypes", ixe = [p.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code]; + Us({ + errorCodes: ixe, + getCodeActions: function(t) { + const n = axe(t.sourceFile, t.span.start); + if (n === void 0) return; + const i = Yr.ChangeTracker.with(t, (s) => sxe(s, t.sourceFile, n)); + return [Ds(Oce, i, p.Add_unknown_conversion_for_non_overlapping_types, Oce, p.Add_unknown_to_all_conversions_of_non_overlapping_types)]; + }, + fixIds: [Oce], + getAllCodeActions: (e) => Za(e, ixe, (t, n) => { + const i = axe(n.file, n.start); + i && sxe(t, n.file, i); + }) + }); + function sxe(e, t, n) { + const i = tD(n) ? N.createAsExpression(n.expression, N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )) : N.createTypeAssertion(N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ), n.expression); + e.replaceNode(t, n.expression, i); + } + function axe(e, t) { + if (!Qr(e)) + return sr(Ei(e, t), (n) => tD(n) || IJ(n)); + } + Us({ + errorCodes: [ + p.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, + p.await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code, + p.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code + ], + getCodeActions: function(t) { + const { sourceFile: n } = t, i = Yr.ChangeTracker.with(t, (s) => { + const o = N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports([]), + /*moduleSpecifier*/ + void 0 + ); + s.insertNodeAtEndOfScope(n, n, o); + }); + return [Nd("addEmptyExportDeclaration", i, p.Add_export_to_make_this_file_into_a_module)]; + } + }); + var Fce = "addMissingAsync", oxe = [ + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Type_0_is_not_comparable_to_type_1.code + ]; + Us({ + fixIds: [Fce], + errorCodes: oxe, + getCodeActions: function(t) { + const { sourceFile: n, errorCode: i, cancellationToken: s, program: o, span: c } = t, _ = Nn(o.getTypeChecker().getDiagnostics(n, s), pVe(c, i)), u = _ && _.relatedInformation && Nn(_.relatedInformation, (h) => h.code === p.Did_you_mean_to_mark_this_function_as_async.code), d = lxe(n, u); + return d ? [cxe(t, d, (h) => Yr.ChangeTracker.with(t, h))] : void 0; + }, + getAllCodeActions: (e) => { + const { sourceFile: t } = e, n = /* @__PURE__ */ new Set(); + return Za(e, oxe, (i, s) => { + const o = s.relatedInformation && Nn(s.relatedInformation, (u) => u.code === p.Did_you_mean_to_mark_this_function_as_async.code), c = lxe(t, o); + return c ? cxe(e, c, (u) => (u(i), []), n) : void 0; + }); + } + }); + function cxe(e, t, n, i) { + const s = n((o) => fVe(o, e.sourceFile, t, i)); + return Ds(Fce, s, p.Add_async_modifier_to_containing_function, Fce, p.Add_all_missing_async_modifiers); + } + function fVe(e, t, n, i) { + if (i && i.has(ja(n))) + return; + i?.add(ja(n)); + const s = N.replaceModifiers( + qa( + n, + /*includeTrivia*/ + !0 + ), + N.createNodeArray(N.createModifiersFromModifierFlags( + f0(n) | 1024 + /* Async */ + )) + ); + e.replaceNode( + t, + n, + s + ); + } + function lxe(e, t) { + if (!t) return; + const n = Ei(e, t.start); + return sr(n, (s) => s.getStart(e) < t.start || s.getEnd() > wc(t) ? "quit" : (xo(s) || hc(s) || po(s) || Ac(s)) && l6(t, e_(s, e))); + } + function pVe(e, t) { + return ({ start: n, length: i, relatedInformation: s, code: o }) => iy(n) && iy(i) && l6({ start: n, length: i }, e) && o === t && !!s && ut(s, (c) => c.code === p.Did_you_mean_to_mark_this_function_as_async.code); + } + var Lce = "addMissingAwait", uxe = p.Property_0_does_not_exist_on_type_1.code, _xe = [ + p.This_expression_is_not_callable.code, + p.This_expression_is_not_constructable.code + ], Mce = [ + p.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, + p.Operator_0_cannot_be_applied_to_type_1.code, + p.Operator_0_cannot_be_applied_to_types_1_and_2.code, + p.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code, + p.This_condition_will_always_return_true_since_this_0_is_always_defined.code, + p.Type_0_is_not_an_array_type.code, + p.Type_0_is_not_an_array_type_or_a_string_type.code, + p.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code, + p.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code, + p.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + uxe, + ..._xe + ]; + Us({ + fixIds: [Lce], + errorCodes: Mce, + getCodeActions: function(t) { + const { sourceFile: n, errorCode: i, span: s, cancellationToken: o, program: c } = t, _ = fxe(n, i, s, o, c); + if (!_) + return; + const u = t.program.getTypeChecker(), d = (g) => Yr.ChangeTracker.with(t, g); + return iw([ + pxe(t, _, i, u, d), + dxe(t, _, i, u, d) + ]); + }, + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, cancellationToken: i } = e, s = e.program.getTypeChecker(), o = /* @__PURE__ */ new Set(); + return Za(e, Mce, (c, _) => { + const u = fxe(t, _.code, _, i, n); + if (!u) + return; + const d = (g) => (g(c), []); + return pxe(e, u, _.code, s, d, o) || dxe(e, u, _.code, s, d, o); + }); + } + }); + function fxe(e, t, n, i, s) { + const o = IU(e, n); + return o && dVe(e, t, n, i, s) && mxe(o) ? o : void 0; + } + function pxe(e, t, n, i, s, o) { + const { sourceFile: c, program: _, cancellationToken: u } = e, d = mVe(t, c, u, _, i); + if (d) { + const g = s((h) => { + rr(d.initializers, ({ expression: S }) => Rce(h, n, c, i, S, o)), o && d.needsSecondPassForFixAll && Rce(h, n, c, i, t, o); + }); + return Nd( + "addMissingAwaitToInitializer", + g, + d.initializers.length === 1 ? [p.Add_await_to_initializer_for_0, d.initializers[0].declarationSymbol.name] : p.Add_await_to_initializers + ); + } + } + function dxe(e, t, n, i, s, o) { + const c = s((_) => Rce(_, n, e.sourceFile, i, t, o)); + return Ds(Lce, c, p.Add_await, Lce, p.Fix_all_expressions_possibly_missing_await); + } + function dVe(e, t, n, i, s) { + const c = s.getTypeChecker().getDiagnostics(e, i); + return ut(c, ({ start: _, length: u, relatedInformation: d, code: g }) => iy(_) && iy(u) && l6({ start: _, length: u }, n) && g === t && !!d && ut(d, (h) => h.code === p.Did_you_forget_to_use_await.code)); + } + function mVe(e, t, n, i, s) { + const o = gVe(e, s); + if (!o) + return; + let c = o.isCompleteFix, _; + for (const u of o.identifiers) { + const d = s.getSymbolAtLocation(u); + if (!d) + continue; + const g = Jn(d.valueDeclaration, ti), h = g && Jn(g.name, Re), S = $1( + g, + 243 + /* VariableStatement */ + ); + if (!g || !S || g.type || !g.initializer || S.getSourceFile() !== t || Vn( + S, + 32 + /* Export */ + ) || !h || !mxe(g.initializer)) { + c = !1; + continue; + } + const T = i.getSemanticDiagnostics(t, n); + if (yo.Core.eachSymbolReferenceInFile(h, s, t, (D) => u !== D && !hVe(D, T, t, s))) { + c = !1; + continue; + } + (_ || (_ = [])).push({ + expression: g.initializer, + declarationSymbol: d + }); + } + return _ && { + initializers: _, + needsSecondPassForFixAll: !c + }; + } + function gVe(e, t) { + if (Dn(e.parent) && Re(e.parent.expression)) + return { identifiers: [e.parent.expression], isCompleteFix: !0 }; + if (Re(e)) + return { identifiers: [e], isCompleteFix: !0 }; + if (cn(e)) { + let n, i = !0; + for (const s of [e.left, e.right]) { + const o = t.getTypeAtLocation(s); + if (t.getPromisedTypeOfPromise(o)) { + if (!Re(s)) { + i = !1; + continue; + } + (n || (n = [])).push(s); + } + } + return n && { identifiers: n, isCompleteFix: i }; + } + } + function hVe(e, t, n, i) { + const s = Dn(e.parent) ? e.parent.name : cn(e.parent) ? e.parent : e, o = Nn(t, (c) => c.start === s.getStart(n) && c.start + c.length === s.getEnd()); + return o && ls(Mce, o.code) || // A Promise is usually not correct in a binary expression (it's not valid + // in an arithmetic expression and an equality comparison seems unusual), + // but if the other side of the binary expression has an error, the side + // is typed `any` which will squash the error that would identify this + // Promise as an invalid operand. So if the whole binary expression is + // typed `any` as a result, there is a strong likelihood that this Promise + // is accidentally missing `await`. + i.getTypeAtLocation(s).flags & 1; + } + function mxe(e) { + return e.flags & 65536 || !!sr(e, (t) => t.parent && xo(t.parent) && t.parent.body === t || ms(t) && (t.parent.kind === 262 || t.parent.kind === 218 || t.parent.kind === 219 || t.parent.kind === 174)); + } + function Rce(e, t, n, i, s, o) { + if (sA(s.parent) && !s.parent.awaitModifier) { + const c = i.getTypeAtLocation(s), _ = i.getAsyncIterableType(); + if (_ && i.isTypeAssignableTo(c, _)) { + const u = s.parent; + e.replaceNode(n, u, N.updateForOfStatement(u, N.createToken( + 135 + /* AwaitKeyword */ + ), u.initializer, u.expression, u.statement)); + return; + } + } + if (cn(s)) + for (const c of [s.left, s.right]) { + if (o && Re(c)) { + const d = i.getSymbolAtLocation(c); + if (d && o.has($s(d))) + continue; + } + const _ = i.getTypeAtLocation(c), u = i.getPromisedTypeOfPromise(_) ? N.createAwaitExpression(c) : c; + e.replaceNode(n, c, u); + } + else if (t === uxe && Dn(s.parent)) { + if (o && Re(s.parent.expression)) { + const c = i.getSymbolAtLocation(s.parent.expression); + if (c && o.has($s(c))) + return; + } + e.replaceNode( + n, + s.parent.expression, + N.createParenthesizedExpression(N.createAwaitExpression(s.parent.expression)) + ), gxe(e, s.parent.expression, n); + } else if (ls(_xe, t) && Qd(s.parent)) { + if (o && Re(s)) { + const c = i.getSymbolAtLocation(s); + if (c && o.has($s(c))) + return; + } + e.replaceNode(n, s, N.createParenthesizedExpression(N.createAwaitExpression(s))), gxe(e, s, n); + } else { + if (o && ti(s.parent) && Re(s.parent.name)) { + const c = i.getSymbolAtLocation(s.parent.name); + if (c && !ih(o, $s(c))) + return; + } + e.replaceNode(n, s, N.createAwaitExpression(s)); + } + } + function gxe(e, t, n) { + const i = sl(t.pos, n); + i && l9(i.end, i.parent, n) && e.insertText(n, t.getStart(n), ";"); + } + var jce = "addMissingConst", hxe = [ + p.Cannot_find_name_0.code, + p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code + ]; + Us({ + errorCodes: hxe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => yxe(i, t.sourceFile, t.span.start, t.program)); + if (n.length > 0) + return [Ds(jce, n, p.Add_const_to_unresolved_variable, jce, p.Add_const_to_all_unresolved_variables)]; + }, + fixIds: [jce], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Za(e, hxe, (n, i) => yxe(n, i.file, i.start, e.program, t)); + } + }); + function yxe(e, t, n, i, s) { + const o = Ei(t, n), c = sr(o, (d) => V2(d.parent) ? d.parent.initializer === d : yVe(d) ? !1 : "quit"); + if (c) return Pq(e, c, t, s); + const _ = o.parent; + if (cn(_) && _.operatorToken.kind === 64 && Pl(_.parent)) + return Pq(e, o, t, s); + if (Wl(_)) { + const d = i.getTypeChecker(); + return Ri(_.elements, (g) => vVe(g, d)) ? Pq(e, _, t, s) : void 0; + } + const u = sr(o, (d) => Pl(d.parent) ? !0 : bVe(d) ? !1 : "quit"); + if (u) { + const d = i.getTypeChecker(); + return vxe(u, d) ? Pq(e, u, t, s) : void 0; + } + } + function Pq(e, t, n, i) { + (!i || ih(i, t)) && e.insertModifierBefore(n, 87, t); + } + function yVe(e) { + switch (e.kind) { + case 80: + case 209: + case 210: + case 303: + case 304: + return !0; + default: + return !1; + } + } + function vVe(e, t) { + const n = Re(e) ? e : Tl( + e, + /*excludeCompoundAssignment*/ + !0 + ) && Re(e.left) ? e.left : void 0; + return !!n && !t.getSymbolAtLocation(n); + } + function bVe(e) { + switch (e.kind) { + case 80: + case 226: + case 28: + return !0; + default: + return !1; + } + } + function vxe(e, t) { + return cn(e) ? e.operatorToken.kind === 28 ? Ri([e.left, e.right], (n) => vxe(n, t)) : e.operatorToken.kind === 64 && Re(e.left) && !t.getSymbolAtLocation(e.left) : !1; + } + var Bce = "addMissingDeclareProperty", bxe = [ + p.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code + ]; + Us({ + errorCodes: bxe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => Sxe(i, t.sourceFile, t.span.start)); + if (n.length > 0) + return [Ds(Bce, n, p.Prefix_with_declare, Bce, p.Prefix_all_incorrect_property_declarations_with_declare)]; + }, + fixIds: [Bce], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Za(e, bxe, (n, i) => Sxe(n, i.file, i.start, t)); + } + }); + function Sxe(e, t, n, i) { + const s = Ei(t, n); + if (!Re(s)) + return; + const o = s.parent; + o.kind === 172 && (!i || ih(i, o)) && e.insertModifierBefore(t, 138, o); + } + var Jce = "addMissingInvocationForDecorator", Txe = [p._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code]; + Us({ + errorCodes: Txe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => xxe(i, t.sourceFile, t.span.start)); + return [Ds(Jce, n, p.Call_decorator_expression, Jce, p.Add_to_all_uncalled_decorators)]; + }, + fixIds: [Jce], + getAllCodeActions: (e) => Za(e, Txe, (t, n) => xxe(t, n.file, n.start)) + }); + function xxe(e, t, n) { + const i = Ei(t, n), s = sr(i, dl); + E.assert(!!s, "Expected position to be owned by a decorator."); + const o = N.createCallExpression( + s.expression, + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + e.replaceNode(t, s.expression, o); + } + var zce = "addNameToNamelessParameter", kxe = [p.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; + Us({ + errorCodes: kxe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => Cxe(i, t.sourceFile, t.span.start)); + return [Ds(zce, n, p.Add_parameter_name, zce, p.Add_names_to_all_parameters_without_names)]; + }, + fixIds: [zce], + getAllCodeActions: (e) => Za(e, kxe, (t, n) => Cxe(t, n.file, n.start)) + }); + function Cxe(e, t, n) { + const i = Ei(t, n), s = i.parent; + if (!ji(s)) + return E.fail("Tried to add a parameter name to a non-parameter: " + E.formatSyntaxKind(i.kind)); + const o = s.parent.parameters.indexOf(s); + E.assert(!s.type, "Tried to add a parameter name to a parameter that already had one."), E.assert(o > -1, "Parameter not found in parent parameter list."); + let c = s.name.getEnd(), _ = N.createTypeReferenceNode( + s.name, + /*typeArguments*/ + void 0 + ), u = Exe(t, s); + for (; u; ) + _ = N.createArrayTypeNode(_), c = u.getEnd(), u = Exe(t, u); + const d = N.createParameterDeclaration( + s.modifiers, + s.dotDotDotToken, + "arg" + o, + s.questionToken, + s.dotDotDotToken && !iA(_) ? N.createArrayTypeNode(_) : _, + s.initializer + ); + e.replaceRange(t, np(s.getStart(t), c), d); + } + function Exe(e, t) { + const n = qb(t.name, t.parent, e); + if (n && n.kind === 23 && v0(n.parent) && ji(n.parent.parent)) + return n.parent.parent; + } + var Dxe = "addOptionalPropertyUndefined", SVe = [ + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code, + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code + ]; + Us({ + errorCodes: SVe, + getCodeActions(e) { + const t = e.program.getTypeChecker(), n = TVe(e.sourceFile, e.span, t); + if (!n.length) + return; + const i = Yr.ChangeTracker.with(e, (s) => kVe(s, n)); + return [Nd(Dxe, i, p.Add_undefined_to_optional_property_type)]; + }, + fixIds: [Dxe] + }); + function TVe(e, t, n) { + var i, s; + const o = Pxe(IU(e, t), n); + if (!o) + return He; + const { source: c, target: _ } = o, u = xVe(c, _, n) ? n.getTypeAtLocation(_.expression) : n.getTypeAtLocation(_); + return (s = (i = u.symbol) == null ? void 0 : i.declarations) != null && s.some((d) => xr(d).fileName.match(/\.d\.ts$/)) ? He : n.getExactOptionalProperties(u); + } + function xVe(e, t, n) { + return Dn(t) && !!n.getExactOptionalProperties(n.getTypeAtLocation(t.expression)).length && n.getTypeAtLocation(e) === n.getUndefinedType(); + } + function Pxe(e, t) { + var n; + if (e) { + if (cn(e.parent) && e.parent.operatorToken.kind === 64) + return { source: e.parent.right, target: e.parent.left }; + if (ti(e.parent) && e.parent.initializer) + return { source: e.parent.initializer, target: e.parent.name }; + if (Es(e.parent)) { + const i = t.getSymbolAtLocation(e.parent.expression); + if (!i?.valueDeclaration || !DT(i.valueDeclaration.kind) || !ct(e)) return; + const s = e.parent.arguments.indexOf(e); + if (s === -1) return; + const o = i.valueDeclaration.parameters[s].name; + if (Re(o)) return { source: e, target: o }; + } else if (qc(e.parent) && Re(e.parent.name) || du(e.parent)) { + const i = Pxe(e.parent.parent, t); + if (!i) return; + const s = t.getPropertyOfType(t.getTypeAtLocation(i.target), e.parent.name.text), o = (n = s?.declarations) == null ? void 0 : n[0]; + return o ? { + source: qc(e.parent) ? e.parent.initializer : e.parent.name, + target: o + } : void 0; + } + } else return; + } + function kVe(e, t) { + for (const n of t) { + const i = n.valueDeclaration; + if (i && (I_(i) || rs(i)) && i.type) { + const s = N.createUnionTypeNode([ + ...i.type.kind === 192 ? i.type.types : [i.type], + N.createTypeReferenceNode("undefined") + ]); + e.replaceNode(i.getSourceFile(), i.type, s); + } + } + } + var Wce = "annotateWithTypeFromJSDoc", wxe = [p.JSDoc_types_may_be_moved_to_TypeScript_types.code]; + Us({ + errorCodes: wxe, + getCodeActions(e) { + const t = Axe(e.sourceFile, e.span.start); + if (!t) return; + const n = Yr.ChangeTracker.with(e, (i) => Oxe(i, e.sourceFile, t)); + return [Ds(Wce, n, p.Annotate_with_type_from_JSDoc, Wce, p.Annotate_everything_with_types_from_JSDoc)]; + }, + fixIds: [Wce], + getAllCodeActions: (e) => Za(e, wxe, (t, n) => { + const i = Axe(n.file, n.start); + i && Oxe(t, n.file, i); + }) + }); + function Axe(e, t) { + const n = Ei(e, t); + return Jn(ji(n.parent) ? n.parent.parent : n.parent, Nxe); + } + function Nxe(e) { + return CVe(e) && Ixe(e); + } + function Ixe(e) { + return so(e) ? e.parameters.some(Ixe) || !e.type && !!Cw(e) : !e.type && !!R1(e); + } + function Oxe(e, t, n) { + if (so(n) && (Cw(n) || n.parameters.some((i) => !!R1(i)))) { + if (!n.typeParameters) { + const s = V7(n); + s.length && e.insertTypeParameters(t, n, s); + } + const i = xo(n) && !Ya(n, 21, t); + i && e.insertNodeBefore(t, fa(n.parameters), N.createToken( + 21 + /* OpenParenToken */ + )); + for (const s of n.parameters) + if (!s.type) { + const o = R1(s); + o && e.tryInsertTypeAnnotation(t, s, Ge(o, Yb, ai)); + } + if (i && e.insertNodeAfter(t, ia(n.parameters), N.createToken( + 22 + /* CloseParenToken */ + )), !n.type) { + const s = Cw(n); + s && e.tryInsertTypeAnnotation(t, n, Ge(s, Yb, ai)); + } + } else { + const i = E.checkDefined(R1(n), "A JSDocType for this declaration should exist"); + E.assert(!n.type, "The JSDocType decl should have a type"), e.tryInsertTypeAnnotation(t, n, Ge(i, Yb, ai)); + } + } + function CVe(e) { + return so(e) || e.kind === 260 || e.kind === 171 || e.kind === 172; + } + function Yb(e) { + switch (e.kind) { + case 312: + case 313: + return N.createTypeReferenceNode("any", He); + case 316: + return DVe(e); + case 315: + return Yb(e.type); + case 314: + return PVe(e); + case 318: + return wVe(e); + case 317: + return AVe(e); + case 183: + return IVe(e); + case 322: + return EVe(e); + default: + const t = gr( + e, + Yb, + /*context*/ + void 0 + ); + return Kr( + t, + 1 + /* SingleLine */ + ), t; + } + } + function EVe(e) { + const t = N.createTypeLiteralNode(or(e.jsDocPropertyTags, (n) => N.createPropertySignature( + /*modifiers*/ + void 0, + Re(n.name) ? n.name : n.name.right, + q3(n) ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + n.typeExpression && Ge(n.typeExpression.type, Yb, ai) || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) + ))); + return Kr( + t, + 1 + /* SingleLine */ + ), t; + } + function DVe(e) { + return N.createUnionTypeNode([Ge(e.type, Yb, ai), N.createTypeReferenceNode("undefined", He)]); + } + function PVe(e) { + return N.createUnionTypeNode([Ge(e.type, Yb, ai), N.createTypeReferenceNode("null", He)]); + } + function wVe(e) { + return N.createArrayTypeNode(Ge(e.type, Yb, ai)); + } + function AVe(e) { + return N.createFunctionTypeNode(He, e.parameters.map(NVe), e.type ?? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + )); + } + function NVe(e) { + const t = e.parent.parameters.indexOf(e), n = e.type.kind === 318 && t === e.parent.parameters.length - 1, i = e.name || (n ? "rest" : "arg" + t), s = n ? N.createToken( + 26 + /* DotDotDotToken */ + ) : e.dotDotDotToken; + return N.createParameterDeclaration(e.modifiers, s, i, e.questionToken, Ge(e.type, Yb, ai), e.initializer); + } + function IVe(e) { + let t = e.typeName, n = e.typeArguments; + if (Re(e.typeName)) { + if (C7(e)) + return OVe(e); + let i = e.typeName.text; + switch (e.typeName.text) { + case "String": + case "Boolean": + case "Object": + case "Number": + i = i.toLowerCase(); + break; + case "array": + case "date": + case "promise": + i = i[0].toUpperCase() + i.slice(1); + break; + } + t = N.createIdentifier(i), (i === "Array" || i === "Promise") && !e.typeArguments ? n = N.createNodeArray([N.createTypeReferenceNode("any", He)]) : n = Ar(e.typeArguments, Yb, ai); + } + return N.createTypeReferenceNode(t, n); + } + function OVe(e) { + const t = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + e.typeArguments[0].kind === 150 ? "n" : "s", + /*questionToken*/ + void 0, + N.createTypeReferenceNode(e.typeArguments[0].kind === 150 ? "number" : "string", []), + /*initializer*/ + void 0 + ), n = N.createTypeLiteralNode([N.createIndexSignature( + /*modifiers*/ + void 0, + [t], + e.typeArguments[1] + )]); + return Kr( + n, + 1 + /* SingleLine */ + ), n; + } + var Vce = "convertFunctionToEs6Class", Fxe = [p.This_constructor_function_may_be_converted_to_a_class_declaration.code]; + Us({ + errorCodes: Fxe, + getCodeActions(e) { + const t = Yr.ChangeTracker.with(e, (n) => Lxe(n, e.sourceFile, e.span.start, e.program.getTypeChecker(), e.preferences, e.program.getCompilerOptions())); + return [Ds(Vce, t, p.Convert_function_to_an_ES2015_class, Vce, p.Convert_all_constructor_functions_to_classes)]; + }, + fixIds: [Vce], + getAllCodeActions: (e) => Za(e, Fxe, (t, n) => Lxe(t, n.file, n.start, e.program.getTypeChecker(), e.preferences, e.program.getCompilerOptions())) + }); + function Lxe(e, t, n, i, s, o) { + const c = i.getSymbolAtLocation(Ei(t, n)); + if (!c || !c.valueDeclaration || !(c.flags & 19)) + return; + const _ = c.valueDeclaration; + if (Ac(_) || po(_)) + e.replaceNode(t, _, g(_)); + else if (ti(_)) { + const h = d(_); + if (!h) + return; + const S = _.parent.parent; + Il(_.parent) && _.parent.declarations.length > 1 ? (e.delete(t, _), e.insertNodeAfter(t, S, h)) : e.replaceNode(t, S, h); + } + function u(h) { + const S = []; + return h.exports && h.exports.forEach((D) => { + if (D.name === "prototype" && D.declarations) { + const P = D.declarations[0]; + if (D.declarations.length === 1 && Dn(P) && cn(P.parent) && P.parent.operatorToken.kind === 64 && Gs(P.parent.right)) { + const O = P.parent.right; + C( + O.symbol, + /*modifiers*/ + void 0, + S + ); + } + } else + C(D, [N.createToken( + 126 + /* StaticKeyword */ + )], S); + }), h.members && h.members.forEach((D, P) => { + var O, j, F, V; + if (P === "constructor" && D.valueDeclaration) { + const L = (V = (F = (j = (O = h.exports) == null ? void 0 : O.get("prototype")) == null ? void 0 : j.declarations) == null ? void 0 : F[0]) == null ? void 0 : V.parent; + L && cn(L) && Gs(L.right) && ut(L.right.properties, Aq) || e.delete(t, D.valueDeclaration.parent); + return; + } + C( + D, + /*modifiers*/ + void 0, + S + ); + }), S; + function T(D, P) { + return go(D) ? Dn(D) && Aq(D) ? !0 : ps(P) : Ri(D.properties, (O) => !!(hc(O) || Pw(O) || qc(O) && po(O.initializer) && O.name || Aq(O))); + } + function C(D, P, O) { + if (!(D.flags & 8192) && !(D.flags & 4096)) + return; + const j = D.valueDeclaration, F = j.parent, V = F.right; + if (!T(j, V) || ut(O, (ce) => { + const K = es(ce); + return !!(K && Re(K) && dn(K) === uc(D)); + })) + return; + const L = F.parent && F.parent.kind === 244 ? F.parent : F; + if (e.delete(t, L), !V) { + O.push(N.createPropertyDeclaration( + P, + D.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + )); + return; + } + if (go(j) && (po(V) || xo(V))) { + const ce = Rf(t, s), K = FVe(j, o, ce); + K && $(O, V, K); + return; + } else if (Gs(V)) { + rr( + V.properties, + (ce) => { + (hc(ce) || Pw(ce)) && O.push(ce), qc(ce) && po(ce.initializer) && $(O, ce.initializer, ce.name), Aq(ce); + } + ); + return; + } else { + if (p_(t) || !Dn(j)) return; + const ce = N.createPropertyDeclaration( + P, + j.name, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + V + ); + _6(F.parent, ce, t), O.push(ce); + return; + } + function $(ce, K, X) { + return po(K) ? U(ce, K, X) : G(ce, K, X); + } + function U(ce, K, X) { + const Z = Hi(P, wq( + K, + 134 + /* AsyncKeyword */ + )), oe = N.createMethodDeclaration( + Z, + /*asteriskToken*/ + void 0, + X, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + K.parameters, + /*type*/ + void 0, + K.body + ); + _6(F, oe, t), ce.push(oe); + } + function G(ce, K, X) { + const Z = K.body; + let oe; + Z.kind === 241 ? oe = Z : oe = N.createBlock([N.createReturnStatement(Z)]); + const ne = Hi(P, wq( + K, + 134 + /* AsyncKeyword */ + )), pe = N.createMethodDeclaration( + ne, + /*asteriskToken*/ + void 0, + X, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + K.parameters, + /*type*/ + void 0, + oe + ); + _6(F, pe, t), ce.push(pe); + } + } + } + function d(h) { + const S = h.initializer; + if (!S || !po(S) || !Re(h.name)) + return; + const T = u(h.symbol); + S.body && T.unshift(N.createConstructorDeclaration( + /*modifiers*/ + void 0, + S.parameters, + S.body + )); + const C = wq( + h.parent.parent, + 95 + /* ExportKeyword */ + ); + return N.createClassDeclaration( + C, + h.name, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + T + ); + } + function g(h) { + const S = u(c); + h.body && S.unshift(N.createConstructorDeclaration( + /*modifiers*/ + void 0, + h.parameters, + h.body + )); + const T = wq( + h, + 95 + /* ExportKeyword */ + ); + return N.createClassDeclaration( + T, + h.name, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + S + ); + } + } + function wq(e, t) { + return ed(e) ? Ln(e.modifiers, (n) => n.kind === t) : void 0; + } + function Aq(e) { + return e.name ? !!(Re(e.name) && e.name.text === "constructor") : !1; + } + function FVe(e, t, n) { + if (Dn(e)) + return e.name; + const i = e.argumentExpression; + if (m_(i)) + return i; + if (Ga(i)) + return X_(i.text, pa(t)) ? N.createIdentifier(i.text) : lx(i) ? N.createStringLiteral( + i.text, + n === 0 + /* Single */ + ) : i; + } + var Uce = "convertToAsyncFunction", Mxe = [p.This_may_be_converted_to_an_async_function.code], Nq = !0; + Us({ + errorCodes: Mxe, + getCodeActions(e) { + Nq = !0; + const t = Yr.ChangeTracker.with(e, (n) => Rxe(n, e.sourceFile, e.span.start, e.program.getTypeChecker())); + return Nq ? [Ds(Uce, t, p.Convert_to_async_function, Uce, p.Convert_all_to_async_functions)] : []; + }, + fixIds: [Uce], + getAllCodeActions: (e) => Za(e, Mxe, (t, n) => Rxe(t, n.file, n.start, e.program.getTypeChecker())) + }); + function Rxe(e, t, n, i) { + const s = Ei(t, n); + let o; + if (Re(s) && ti(s.parent) && s.parent.initializer && so(s.parent.initializer) ? o = s.parent.initializer : o = Jn(yf(Ei(t, n)), KU), !o) + return; + const c = /* @__PURE__ */ new Map(), _ = Qr(o), u = MVe(o, i), d = RVe(o, i, c); + if (!YU(d, i)) + return; + const g = d.body && ms(d.body) ? LVe(d.body, i) : He, h = { checker: i, synthNamesMap: c, setOfExpressionsToReturn: u, isInJSFile: _ }; + if (!g.length) + return; + const S = sa(t.text, am(o).pos); + e.insertModifierAt(t, S, 134, { suffix: " " }); + for (const T of g) + if (gs(T, function C(D) { + if (Es(D)) { + const P = y6( + D, + D, + h, + /*hasContinuation*/ + !1 + ); + if (qx()) + return !0; + e.replaceNodeWithNodes(t, T, P); + } else if (!ps(D) && (gs(D, C), qx())) + return !0; + }), qx()) + return; + } + function LVe(e, t) { + const n = []; + return o0(e, (i) => { + C9(i, t) && n.push(i); + }), n; + } + function MVe(e, t) { + if (!e.body) + return /* @__PURE__ */ new Set(); + const n = /* @__PURE__ */ new Set(); + return gs(e.body, function i(s) { + NN(s, t, "then") ? (n.add(ja(s)), rr(s.arguments, i)) : NN(s, t, "catch") || NN(s, t, "finally") ? (n.add(ja(s)), gs(s, i)) : Bxe(s, t) ? n.add(ja(s)) : gs(s, i); + }), n; + } + function NN(e, t, n) { + if (!Es(e)) return !1; + const s = KA(e, n) && t.getTypeAtLocation(e); + return !!(s && t.getPromisedTypeOfPromise(s)); + } + function jxe(e, t) { + return (wn(e) & 4) !== 0 && e.target === t; + } + function Iq(e, t, n) { + if (e.expression.name.escapedText === "finally") + return; + const i = n.getTypeAtLocation(e.expression.expression); + if (jxe(i, n.getPromiseType()) || jxe(i, n.getPromiseLikeType())) + if (e.expression.name.escapedText === "then") { + if (t === ny(e.arguments, 0)) + return ny(e.typeArguments, 0); + if (t === ny(e.arguments, 1)) + return ny(e.typeArguments, 1); + } else + return ny(e.typeArguments, 0); + } + function Bxe(e, t) { + return ct(e) ? !!t.getPromisedTypeOfPromise(t.getTypeAtLocation(e)) : !1; + } + function RVe(e, t, n) { + const i = /* @__PURE__ */ new Map(), s = Kf(); + return gs(e, function o(c) { + if (!Re(c)) { + gs(c, o); + return; + } + const _ = t.getSymbolAtLocation(c); + if (_) { + const u = t.getTypeAtLocation(c), d = qxe(u, t), g = $s(_).toString(); + if (d && !ji(c.parent) && !so(c.parent) && !n.has(g)) { + const h = ul(d.parameters), S = h?.valueDeclaration && ji(h.valueDeclaration) && Jn(h.valueDeclaration.name, Re) || N.createUniqueName( + "result", + 16 + /* Optimistic */ + ), T = Jxe(S, s); + n.set(g, T), s.add(S.text, _); + } else if (c.parent && (ji(c.parent) || ti(c.parent) || da(c.parent))) { + const h = c.text, S = s.get(h); + if (S && S.some((T) => T !== _)) { + const T = Jxe(c, s); + i.set(g, T.identifier), n.set(g, T), s.add(h, _); + } else { + const T = qa(c); + n.set(g, sP(T)), s.add(h, _); + } + } + } + }), pN( + e, + /*includeTrivia*/ + !0, + (o) => { + if (da(o) && Re(o.name) && If(o.parent)) { + const c = t.getSymbolAtLocation(o.name), _ = c && i.get(String($s(c))); + if (_ && _.text !== (o.name || o.propertyName).getText()) + return N.createBindingElement( + o.dotDotDotToken, + o.propertyName || o.name, + _, + o.initializer + ); + } else if (Re(o)) { + const c = t.getSymbolAtLocation(o), _ = c && i.get(String($s(c))); + if (_) + return N.createIdentifier(_.text); + } + } + ); + } + function Jxe(e, t) { + const n = (t.get(e.text) || He).length, i = n === 0 ? e : N.createIdentifier(e.text + "_" + n); + return sP(i); + } + function qx() { + return !Nq; + } + function yv() { + return Nq = !1, He; + } + function y6(e, t, n, i, s) { + if (NN(t, n.checker, "then")) + return JVe(t, ny(t.arguments, 0), ny(t.arguments, 1), n, i, s); + if (NN(t, n.checker, "catch")) + return Vxe(t, ny(t.arguments, 0), n, i, s); + if (NN(t, n.checker, "finally")) + return BVe(t, ny(t.arguments, 0), n, i, s); + if (Dn(t)) + return y6(e, t.expression, n, i, s); + const o = n.checker.getTypeAtLocation(t); + return o && n.checker.getPromisedTypeOfPromise(o) ? (E.assertNode(Zo(t).parent, Dn), zVe(e, t, n, i, s)) : yv(); + } + function Oq({ checker: e }, t) { + if (t.kind === 106) return !0; + if (Re(t) && !Fo(t) && dn(t) === "undefined") { + const n = e.getSymbolAtLocation(t); + return !n || e.isUndefinedSymbol(n); + } + return !1; + } + function jVe(e) { + const t = N.createUniqueName( + e.identifier.text, + 16 + /* Optimistic */ + ); + return sP(t); + } + function zxe(e, t, n) { + let i; + return n && !ON(e, t) && (IN(n) ? (i = n, t.synthNamesMap.forEach((s, o) => { + if (s.identifier.text === n.identifier.text) { + const c = jVe(n); + t.synthNamesMap.set(o, c); + } + })) : i = sP(N.createUniqueName( + "result", + 16 + /* Optimistic */ + ), n.types), $ce(i)), i; + } + function Wxe(e, t, n, i, s) { + const o = []; + let c; + if (i && !ON(e, t)) { + c = qa($ce(i)); + const _ = i.types, u = t.checker.getUnionType( + _, + 2 + /* Subtype */ + ), d = t.isInJSFile ? void 0 : t.checker.typeToTypeNode( + u, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0 + ), g = [N.createVariableDeclaration( + c, + /*exclamationToken*/ + void 0, + d + )], h = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + g, + 1 + /* Let */ + ) + ); + o.push(h); + } + return o.push(n), s && c && UVe(s) && o.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + qa(Xxe(s)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + c + ) + ], + 2 + /* Const */ + ) + )), o; + } + function BVe(e, t, n, i, s) { + if (!t || Oq(n, t)) + return y6( + /* returnContextNode */ + e, + e.expression.expression, + n, + i, + s + ); + const o = zxe(e, n, s), c = y6( + /*returnContextNode*/ + e, + e.expression.expression, + n, + /*hasContinuation*/ + !0, + o + ); + if (qx()) return yv(); + const _ = Hce( + t, + i, + /*continuationArgName*/ + void 0, + /*inputArgName*/ + void 0, + e, + n + ); + if (qx()) return yv(); + const u = N.createBlock(c), d = N.createBlock(_), g = N.createTryStatement( + u, + /*catchClause*/ + void 0, + d + ); + return Wxe(e, n, g, o, s); + } + function Vxe(e, t, n, i, s) { + if (!t || Oq(n, t)) + return y6( + /* returnContextNode */ + e, + e.expression.expression, + n, + i, + s + ); + const o = Gxe(t, n), c = zxe(e, n, s), _ = y6( + /*returnContextNode*/ + e, + e.expression.expression, + n, + /*hasContinuation*/ + !0, + c + ); + if (qx()) return yv(); + const u = Hce(t, i, c, o, e, n); + if (qx()) return yv(); + const d = N.createBlock(_), g = N.createCatchClause(o && qa(W9(o)), N.createBlock(u)), h = N.createTryStatement( + d, + g, + /*finallyBlock*/ + void 0 + ); + return Wxe(e, n, h, c, s); + } + function JVe(e, t, n, i, s, o) { + if (!t || Oq(i, t)) + return Vxe(e, n, i, s, o); + if (n && !Oq(i, n)) + return yv(); + const c = Gxe(t, i), _ = y6( + e.expression.expression, + e.expression.expression, + i, + /*hasContinuation*/ + !0, + c + ); + if (qx()) return yv(); + const u = Hce(t, s, o, c, e, i); + return qx() ? yv() : Hi(_, u); + } + function zVe(e, t, n, i, s) { + if (ON(e, n)) { + let o = qa(t); + return i && (o = N.createAwaitExpression(o)), [N.createReturnStatement(o)]; + } + return Fq( + s, + N.createAwaitExpression(t), + /*typeAnnotation*/ + void 0 + ); + } + function Fq(e, t, n) { + return !e || $xe(e) ? [N.createExpressionStatement(t)] : IN(e) && e.hasBeenDeclared ? [N.createExpressionStatement(N.createAssignment(qa(Gce(e)), t))] : [ + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + qa(W9(e)), + /*exclamationToken*/ + void 0, + n, + t + ) + ], + 2 + /* Const */ + ) + ) + ]; + } + function qce(e, t) { + if (t && e) { + const n = N.createUniqueName( + "result", + 16 + /* Optimistic */ + ); + return [ + ...Fq(sP(n), e, t), + N.createReturnStatement(n) + ]; + } + return [N.createReturnStatement(e)]; + } + function Hce(e, t, n, i, s, o) { + var c; + switch (e.kind) { + case 106: + break; + case 211: + case 80: + if (!i) + break; + const _ = N.createCallExpression( + qa(e), + /*typeArguments*/ + void 0, + IN(i) ? [Gce(i)] : [] + ); + if (ON(s, o)) + return qce(_, Iq(s, e, o.checker)); + const u = o.checker.getTypeAtLocation(e), d = o.checker.getSignaturesOfType( + u, + 0 + /* Call */ + ); + if (!d.length) + return yv(); + const g = d[0].getReturnType(), h = Fq(n, N.createAwaitExpression(_), Iq(s, e, o.checker)); + return n && n.types.push(o.checker.getAwaitedType(g) || g), h; + case 218: + case 219: { + const S = e.body, T = (c = qxe(o.checker.getTypeAtLocation(e), o.checker)) == null ? void 0 : c.getReturnType(); + if (ms(S)) { + let C = [], D = !1; + for (const P of S.statements) + if (Mp(P)) + if (D = !0, C9(P, o.checker)) + C = C.concat(Hxe(o, P, t, n)); + else { + const O = T && P.expression ? Uxe(o.checker, T, P.expression) : P.expression; + C.push(...qce(O, Iq(s, e, o.checker))); + } + else { + if (t && o0(P, A1)) + return yv(); + C.push(P); + } + return ON(s, o) ? C.map((P) => qa(P)) : WVe( + C, + n, + o, + D + ); + } else { + const C = ZU(S, o.checker) ? Hxe(o, N.createReturnStatement(S), t, n) : He; + if (C.length > 0) + return C; + if (T) { + const D = Uxe(o.checker, T, S); + if (ON(s, o)) + return qce(D, Iq(s, e, o.checker)); + { + const P = Fq( + n, + D, + /*typeAnnotation*/ + void 0 + ); + return n && n.types.push(o.checker.getAwaitedType(T) || T), P; + } + } else + return yv(); + } + } + default: + return yv(); + } + return He; + } + function Uxe(e, t, n) { + const i = qa(n); + return e.getPromisedTypeOfPromise(t) ? N.createAwaitExpression(i) : i; + } + function qxe(e, t) { + const n = t.getSignaturesOfType( + e, + 0 + /* Call */ + ); + return Bo(n); + } + function WVe(e, t, n, i) { + const s = []; + for (const o of e) + if (Mp(o)) { + if (o.expression) { + const c = Bxe(o.expression, n.checker) ? N.createAwaitExpression(o.expression) : o.expression; + t === void 0 ? s.push(N.createExpressionStatement(c)) : IN(t) && t.hasBeenDeclared ? s.push(N.createExpressionStatement(N.createAssignment(Gce(t), c))) : s.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + W9(t), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + c + )], + 2 + /* Const */ + ) + )); + } + } else + s.push(qa(o)); + return !i && t !== void 0 && s.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + W9(t), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + N.createIdentifier("undefined") + )], + 2 + /* Const */ + ) + )), s; + } + function Hxe(e, t, n, i) { + let s = []; + return gs(t, function o(c) { + if (Es(c)) { + const _ = y6(c, c, e, n, i); + if (s = s.concat(_), s.length > 0) + return; + } else ps(c) || gs(c, o); + }), s; + } + function Gxe(e, t) { + const n = []; + let i; + if (so(e)) { + if (e.parameters.length > 0) { + const u = e.parameters[0].name; + i = s(u); + } + } else Re(e) ? i = o(e) : Dn(e) && Re(e.name) && (i = o(e.name)); + if (!i || "identifier" in i && i.identifier.text === "undefined") + return; + return i; + function s(u) { + if (Re(u)) return o(u); + const d = Xs(u.elements, (g) => ml(g) ? [] : [s(g.name)]); + return VVe(u, d); + } + function o(u) { + const d = _(u), g = c(d); + return g && t.synthNamesMap.get($s(g).toString()) || sP(u, n); + } + function c(u) { + var d; + return ((d = Jn(u, vd)) == null ? void 0 : d.symbol) ?? t.checker.getSymbolAtLocation(u); + } + function _(u) { + return u.original ? u.original : u; + } + } + function $xe(e) { + return e ? IN(e) ? !e.identifier.text : Ri(e.elements, $xe) : !0; + } + function sP(e, t = []) { + return { kind: 0, identifier: e, types: t, hasBeenDeclared: !1, hasBeenReferenced: !1 }; + } + function VVe(e, t = He, n = []) { + return { kind: 1, bindingPattern: e, elements: t, types: n }; + } + function Gce(e) { + return e.hasBeenReferenced = !0, e.identifier; + } + function W9(e) { + return IN(e) ? $ce(e) : Xxe(e); + } + function Xxe(e) { + for (const t of e.elements) + W9(t); + return e.bindingPattern; + } + function $ce(e) { + return e.hasBeenDeclared = !0, e.identifier; + } + function IN(e) { + return e.kind === 0; + } + function UVe(e) { + return e.kind === 1; + } + function ON(e, t) { + return !!e.original && t.setOfExpressionsToReturn.has(ja(e.original)); + } + Us({ + errorCodes: [p.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code], + getCodeActions(e) { + const { sourceFile: t, program: n, preferences: i } = e, s = Yr.ChangeTracker.with(e, (o) => { + if (HVe(t, n.getTypeChecker(), o, pa(n.getCompilerOptions()), Rf(t, i))) + for (const _ of n.getSourceFiles()) + qVe(_, t, n, o, Rf(_, i)); + }); + return [Nd("convertToEsModule", s, p.Convert_to_ES_module)]; + } + }); + function qVe(e, t, n, i, s) { + var o; + for (const c of e.imports) { + const _ = (o = n.getResolvedModuleFromModuleSpecifier(c, e)) == null ? void 0 : o.resolvedModule; + if (!_ || _.resolvedFileName !== t.fileName) + continue; + const u = _4(c); + switch (u.kind) { + case 271: + i.replaceNode(e, u, Ly( + u.name, + /*namedImports*/ + void 0, + c, + s + )); + break; + case 213: + d_( + u, + /*requireStringLiteralLikeArgument*/ + !1 + ) && i.replaceNode(e, u, N.createPropertyAccessExpression(qa(u), "default")); + break; + } + } + } + function HVe(e, t, n, i, s) { + const o = { original: sUe(e), additional: /* @__PURE__ */ new Set() }, c = GVe(e, t, o); + $Ve(e, c, n); + let _ = !1, u; + for (const d of Ln(e.statements, yc)) { + const g = Yxe(e, d, n, t, o, i, s); + g && KI(g, u ?? (u = /* @__PURE__ */ new Map())); + } + for (const d of Ln(e.statements, (g) => !yc(g))) { + const g = XVe(e, d, t, n, o, i, c, u, s); + _ = _ || g; + } + return u?.forEach((d, g) => { + n.replaceNode(e, g, d); + }), _; + } + function GVe(e, t, n) { + const i = /* @__PURE__ */ new Map(); + return Qxe(e, (s) => { + const { text: o } = s.name; + !i.has(o) && (pB(s.name) || t.resolveName( + o, + s, + 111551, + /*excludeGlobals*/ + !0 + )) && i.set(o, Lq(`_${o}`, n)); + }), i; + } + function $Ve(e, t, n) { + Qxe(e, (i, s) => { + if (s) + return; + const { text: o } = i.name; + n.replaceNode(e, i, N.createIdentifier(t.get(o) || o)); + }); + } + function Qxe(e, t) { + e.forEachChild(function n(i) { + if (Dn(i) && Bb(e, i.expression) && Re(i.name)) { + const { parent: s } = i; + t( + i, + cn(s) && s.left === i && s.operatorToken.kind === 64 + /* EqualsToken */ + ); + } + i.forEachChild(n); + }); + } + function XVe(e, t, n, i, s, o, c, _, u) { + switch (t.kind) { + case 243: + return Yxe(e, t, i, n, s, o, u), !1; + case 244: { + const { expression: d } = t; + switch (d.kind) { + case 213: + return d_( + d, + /*requireStringLiteralLikeArgument*/ + !0 + ) && i.replaceNode(e, t, Ly( + /*defaultImport*/ + void 0, + /*namedImports*/ + void 0, + d.arguments[0], + u + )), !1; + case 226: { + const { operatorToken: g } = d; + return g.kind === 64 && YVe(e, n, d, i, c, _); + } + } + } + default: + return !1; + } + } + function Yxe(e, t, n, i, s, o, c) { + const { declarationList: _ } = t; + let u = !1; + const d = or(_.declarations, (g) => { + const { name: h, initializer: S } = g; + if (S) { + if (Bb(e, S)) + return u = !0, aP([]); + if (d_( + S, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return u = !0, nUe(h, S.arguments[0], i, s, o, c); + if (Dn(S) && d_( + S.expression, + /*requireStringLiteralLikeArgument*/ + !0 + )) + return u = !0, QVe(h, S.name.text, S.expression.arguments[0], s, c); + } + return aP([N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList([g], _.flags) + )]); + }); + if (u) { + n.replaceNodeWithNodes(e, t, Xs(d, (h) => h.newImports)); + let g; + return rr(d, (h) => { + h.useSitesToUnqualify && KI(h.useSitesToUnqualify, g ?? (g = /* @__PURE__ */ new Map())); + }), g; + } + } + function QVe(e, t, n, i, s) { + switch (e.kind) { + case 206: + case 207: { + const o = Lq(t, i); + return aP([ + tke(o, t, n, s), + Mq( + /*modifiers*/ + void 0, + e, + N.createIdentifier(o) + ) + ]); + } + case 80: + return aP([tke(e.text, t, n, s)]); + default: + return E.assertNever(e, `Convert to ES module got invalid syntax form ${e.kind}`); + } + } + function YVe(e, t, n, i, s, o) { + const { left: c, right: _ } = n; + if (!Dn(c)) + return !1; + if (Bb(e, c)) + if (Bb(e, _)) + i.delete(e, n.parent); + else { + const u = Gs(_) ? ZVe(_, o) : d_( + _, + /*requireStringLiteralLikeArgument*/ + !0 + ) ? eUe(_.arguments[0], t) : void 0; + return u ? (i.replaceNodeWithNodes(e, n.parent, u[0]), u[1]) : (i.replaceRangeWithText(e, np(c.getStart(e), _.pos), "export default"), !0); + } + else Bb(e, c.expression) && KVe(e, n, i, s); + return !1; + } + function ZVe(e, t) { + const n = rR(e.properties, (i) => { + switch (i.kind) { + case 177: + case 178: + case 304: + case 305: + return; + case 303: + return Re(i.name) ? rUe(i.name.text, i.initializer, t) : void 0; + case 174: + return Re(i.name) ? eke(i.name.text, [N.createToken( + 95 + /* ExportKeyword */ + )], i, t) : void 0; + default: + E.assertNever(i, `Convert to ES6 got invalid prop kind ${i.kind}`); + } + }); + return n && [n, !1]; + } + function KVe(e, t, n, i) { + const { text: s } = t.left.name, o = i.get(s); + if (o !== void 0) { + const c = [ + Mq( + /*modifiers*/ + void 0, + o, + t.right + ), + Yce([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + o, + s + )]) + ]; + n.replaceNodeWithNodes(e, t.parent, c); + } else + tUe(t, e, n); + } + function eUe(e, t) { + const n = e.text, i = t.getSymbolAtLocation(e), s = i ? i.exports : YM; + return s.has( + "export=" + /* ExportEquals */ + ) ? [[Xce(n)], !0] : s.has( + "default" + /* Default */ + ) ? ( + // If there's some non-default export, must include both `export *` and `export default`. + s.size > 1 ? [[Zxe(n), Xce(n)], !0] : [[Xce(n)], !0] + ) : [[Zxe(n)], !1]; + } + function Zxe(e) { + return Yce( + /*exportSpecifiers*/ + void 0, + e + ); + } + function Xce(e) { + return Yce([N.createExportSpecifier( + /*isTypeOnly*/ + !1, + /*propertyName*/ + void 0, + "default" + )], e); + } + function tUe({ left: e, right: t, parent: n }, i, s) { + const o = e.name.text; + if ((po(t) || xo(t) || tl(t)) && (!t.name || t.name.text === o)) { + s.replaceRange(i, { pos: e.getStart(i), end: t.getStart(i) }, N.createToken( + 95 + /* ExportKeyword */ + ), { suffix: " " }), t.name || s.insertName(i, t, o); + const c = Ya(n, 27, i); + c && s.delete(i, c); + } else + s.replaceNodeRangeWithNodes(i, e.expression, Ya(e, 25, i), [N.createToken( + 95 + /* ExportKeyword */ + ), N.createToken( + 87 + /* ConstKeyword */ + )], { joiner: " ", suffix: " " }); + } + function rUe(e, t, n) { + const i = [N.createToken( + 95 + /* ExportKeyword */ + )]; + switch (t.kind) { + case 218: { + const { name: o } = t; + if (o && o.text !== e) + return s(); + } + case 219: + return eke(e, i, t, n); + case 231: + return oUe(e, i, t, n); + default: + return s(); + } + function s() { + return Mq(i, N.createIdentifier(e), Qce(t, n)); + } + } + function Qce(e, t) { + if (!t || !ut(ts(t.keys()), (i) => Mf(e, i))) + return e; + return ss(e) ? xU( + e, + /*includeTrivia*/ + !0, + n + ) : pN( + e, + /*includeTrivia*/ + !0, + n + ); + function n(i) { + if (i.kind === 211) { + const s = t.get(i); + return t.delete(i), s; + } + } + } + function nUe(e, t, n, i, s, o) { + switch (e.kind) { + case 206: { + const c = rR(e.elements, (_) => _.dotDotDotToken || _.initializer || _.propertyName && !Re(_.propertyName) || !Re(_.name) ? void 0 : rke(_.propertyName && _.propertyName.text, _.name.text)); + if (c) + return aP([Ly( + /*defaultImport*/ + void 0, + c, + t, + o + )]); + } + case 207: { + const c = Lq(vN(t.text, s), i); + return aP([ + Ly( + N.createIdentifier(c), + /*namedImports*/ + void 0, + t, + o + ), + Mq( + /*modifiers*/ + void 0, + qa(e), + N.createIdentifier(c) + ) + ]); + } + case 80: + return iUe(e, t, n, i, o); + default: + return E.assertNever(e, `Convert to ES module got invalid name kind ${e.kind}`); + } + } + function iUe(e, t, n, i, s) { + const o = n.getSymbolAtLocation(e), c = /* @__PURE__ */ new Map(); + let _ = !1, u; + for (const g of i.original.get(e.text)) { + if (n.getSymbolAtLocation(g) !== o || g === e) + continue; + const { parent: h } = g; + if (Dn(h)) { + const { name: { text: S } } = h; + if (S === "default") { + _ = !0; + const T = g.getText(); + (u ?? (u = /* @__PURE__ */ new Map())).set(h, N.createIdentifier(T)); + } else { + E.assert(h.expression === g, "Didn't expect expression === use"); + let T = c.get(S); + T === void 0 && (T = Lq(S, i), c.set(S, T)), (u ?? (u = /* @__PURE__ */ new Map())).set(h, N.createIdentifier(T)); + } + } else + _ = !0; + } + const d = c.size === 0 ? void 0 : ts(yE(c.entries(), ([g, h]) => N.createImportSpecifier( + /*isTypeOnly*/ + !1, + g === h ? void 0 : N.createIdentifier(g), + N.createIdentifier(h) + ))); + return d || (_ = !0), aP( + [Ly(_ ? qa(e) : void 0, d, t, s)], + u + ); + } + function Lq(e, t) { + for (; t.original.has(e) || t.additional.has(e); ) + e = `_${e}`; + return t.additional.add(e), e; + } + function sUe(e) { + const t = Kf(); + return Kxe(e, (n) => t.add(n.text, n)), t; + } + function Kxe(e, t) { + Re(e) && aUe(e) && t(e), e.forEachChild((n) => Kxe(n, t)); + } + function aUe(e) { + const { parent: t } = e; + switch (t.kind) { + case 211: + return t.name !== e; + case 208: + return t.propertyName !== e; + case 276: + return t.propertyName !== e; + default: + return !0; + } + } + function eke(e, t, n, i) { + return N.createFunctionDeclaration( + Hi(t, Hb(n.modifiers)), + qa(n.asteriskToken), + e, + Hb(n.typeParameters), + Hb(n.parameters), + qa(n.type), + N.converters.convertToFunctionBlock(Qce(n.body, i)) + ); + } + function oUe(e, t, n, i) { + return N.createClassDeclaration( + Hi(t, Hb(n.modifiers)), + e, + Hb(n.typeParameters), + Hb(n.heritageClauses), + Qce(n.members, i) + ); + } + function tke(e, t, n, i) { + return t === "default" ? Ly( + N.createIdentifier(e), + /*namedImports*/ + void 0, + n, + i + ) : Ly( + /*defaultImport*/ + void 0, + [rke(t, e)], + n, + i + ); + } + function rke(e, t) { + return N.createImportSpecifier( + /*isTypeOnly*/ + !1, + e !== void 0 && e !== t ? N.createIdentifier(e) : void 0, + N.createIdentifier(t) + ); + } + function Mq(e, t, n) { + return N.createVariableStatement( + e, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + t, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + n + )], + 2 + /* Const */ + ) + ); + } + function Yce(e, t) { + return N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + e && N.createNamedExports(e), + t === void 0 ? void 0 : N.createStringLiteral(t) + ); + } + function aP(e, t) { + return { + newImports: e, + useSitesToUnqualify: t + }; + } + var Zce = "correctQualifiedNameToIndexedAccessType", nke = [p.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code]; + Us({ + errorCodes: nke, + getCodeActions(e) { + const t = ike(e.sourceFile, e.span.start); + if (!t) return; + const n = Yr.ChangeTracker.with(e, (s) => ske(s, e.sourceFile, t)), i = `${t.left.text}["${t.right.text}"]`; + return [Ds(Zce, n, [p.Rewrite_as_the_indexed_access_type_0, i], Zce, p.Rewrite_all_as_indexed_access_types)]; + }, + fixIds: [Zce], + getAllCodeActions: (e) => Za(e, nke, (t, n) => { + const i = ike(n.file, n.start); + i && ske(t, n.file, i); + }) + }); + function ike(e, t) { + const n = sr(Ei(e, t), $u); + return E.assert(!!n, "Expected position to be owned by a qualified name."), Re(n.left) ? n : void 0; + } + function ske(e, t, n) { + const i = n.right.text, s = N.createIndexedAccessTypeNode( + N.createTypeReferenceNode( + n.left, + /*typeArguments*/ + void 0 + ), + N.createLiteralTypeNode(N.createStringLiteral(i)) + ); + e.replaceNode(t, n, s); + } + var Kce = [p.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code], ele = "convertToTypeOnlyExport"; + Us({ + errorCodes: Kce, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => oke(i, ake(t.span, t.sourceFile), t)); + if (n.length) + return [Ds(ele, n, p.Convert_to_type_only_export, ele, p.Convert_all_re_exported_types_to_type_only_exports)]; + }, + fixIds: [ele], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Map(); + return Za(t, Kce, (i, s) => { + const o = ake(s, t.sourceFile); + o && Kp(n, ja(o.parent.parent)) && oke(i, o, t); + }); + } + }); + function ake(e, t) { + return Jn(Ei(t, e.start).parent, pu); + } + function oke(e, t, n) { + if (!t) + return; + const i = t.parent, s = i.parent, o = cUe(t, n); + if (o.length === i.elements.length) + e.insertModifierBefore(n.sourceFile, 156, i); + else { + const c = N.updateExportDeclaration( + s, + s.modifiers, + /*isTypeOnly*/ + !1, + N.updateNamedExports(i, Ln(i.elements, (u) => !ls(o, u))), + s.moduleSpecifier, + /*attributes*/ + void 0 + ), _ = N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !0, + N.createNamedExports(o), + s.moduleSpecifier, + /*attributes*/ + void 0 + ); + e.replaceNode(n.sourceFile, s, c, { + leadingTriviaOption: Yr.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: Yr.TrailingTriviaOption.Exclude + }), e.insertNodeAfter(n.sourceFile, s, _); + } + } + function cUe(e, t) { + const n = e.parent; + if (n.elements.length === 1) + return n.elements; + const i = Bae( + e_(n), + t.program.getSemanticDiagnostics(t.sourceFile, t.cancellationToken) + ); + return Ln(n.elements, (s) => { + var o; + return s === e || ((o = jae(s, i)) == null ? void 0 : o.code) === Kce[0]; + }); + } + var cke = [ + p._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code, + p._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code + ], Rq = "convertToTypeOnlyImport"; + Us({ + errorCodes: cke, + getCodeActions: function(t) { + var n; + const i = lke(t.sourceFile, t.span.start); + if (i) { + const s = Yr.ChangeTracker.with(t, (_) => V9(_, t.sourceFile, i)), o = i.kind === 276 && oc(i.parent.parent.parent) && uke(i, t.sourceFile, t.program) ? Yr.ChangeTracker.with(t, (_) => V9(_, t.sourceFile, i.parent.parent.parent)) : void 0, c = Ds( + Rq, + s, + i.kind === 276 ? [p.Use_type_0, ((n = i.propertyName) == null ? void 0 : n.text) ?? i.name.text] : p.Use_import_type, + Rq, + p.Fix_all_with_type_only_imports + ); + return ut(o) ? [ + Nd(Rq, o, p.Use_import_type), + c + ] : [c]; + } + }, + fixIds: [Rq], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Set(); + return Za(t, cke, (i, s) => { + const o = lke(s.file, s.start); + o?.kind === 272 && !n.has(o) ? (V9(i, s.file, o), n.add(o)) : o?.kind === 276 && oc(o.parent.parent.parent) && !n.has(o.parent.parent.parent) && uke(o, s.file, t.program) ? (V9(i, s.file, o.parent.parent.parent), n.add(o.parent.parent.parent)) : o?.kind === 276 && V9(i, s.file, o); + }); + } + }); + function lke(e, t) { + const { parent: n } = Ei(e, t); + return Yu(n) || oc(n) && n.importClause ? n : void 0; + } + function uke(e, t, n) { + if (e.parent.parent.name) + return !1; + const i = e.parent.elements.filter((o) => !o.isTypeOnly); + if (i.length === 1) + return !0; + const s = n.getTypeChecker(); + for (const o of i) + if (yo.Core.eachSymbolReferenceInFile(o.name, s, t, (_) => { + const u = s.getSymbolAtLocation(_); + return !!u && s.symbolIsValue(u) || !Y1(_); + })) + return !1; + return !0; + } + function V9(e, t, n) { + var i; + if (Yu(n)) + e.replaceNode(t, n, N.updateImportSpecifier( + n, + /*isTypeOnly*/ + !0, + n.propertyName, + n.name + )); + else { + const s = n.importClause; + if (s.name && s.namedBindings) + e.replaceNodeWithNodes(t, n, [ + N.createImportDeclaration( + Hb( + n.modifiers, + /*includeTrivia*/ + !0 + ), + N.createImportClause( + /*isTypeOnly*/ + !0, + qa( + s.name, + /*includeTrivia*/ + !0 + ), + /*namedBindings*/ + void 0 + ), + qa( + n.moduleSpecifier, + /*includeTrivia*/ + !0 + ), + qa( + n.attributes, + /*includeTrivia*/ + !0 + ) + ), + N.createImportDeclaration( + Hb( + n.modifiers, + /*includeTrivia*/ + !0 + ), + N.createImportClause( + /*isTypeOnly*/ + !0, + /*name*/ + void 0, + qa( + s.namedBindings, + /*includeTrivia*/ + !0 + ) + ), + qa( + n.moduleSpecifier, + /*includeTrivia*/ + !0 + ), + qa( + n.attributes, + /*includeTrivia*/ + !0 + ) + ) + ]); + else { + const o = ((i = s.namedBindings) == null ? void 0 : i.kind) === 275 ? N.updateNamedImports( + s.namedBindings, + Zc(s.namedBindings.elements, (_) => N.updateImportSpecifier( + _, + /*isTypeOnly*/ + !1, + _.propertyName, + _.name + )) + ) : s.namedBindings, c = N.updateImportDeclaration(n, n.modifiers, N.updateImportClause( + s, + /*isTypeOnly*/ + !0, + s.name, + o + ), n.moduleSpecifier, n.attributes); + e.replaceNode(t, n, c); + } + } + } + var tle = "convertTypedefToType", _ke = [p.JSDoc_typedef_may_be_converted_to_TypeScript_type.code]; + Us({ + fixIds: [tle], + errorCodes: _ke, + getCodeActions(e) { + const t = k0(e.host, e.formatContext.options), n = Ei( + e.sourceFile, + e.span.start + ); + if (!n) return; + const i = Yr.ChangeTracker.with(e, (s) => fke(s, n, e.sourceFile, t)); + if (i.length > 0) + return [ + Ds( + tle, + i, + p.Convert_typedef_to_TypeScript_type, + tle, + p.Convert_all_typedef_to_TypeScript_types + ) + ]; + }, + getAllCodeActions: (e) => Za( + e, + _ke, + (t, n) => { + const i = k0(e.host, e.formatContext.options), s = Ei(n.file, n.start); + s && fke(t, s, n.file, i, !0); + } + ) + }); + function fke(e, t, n, i, s = !1) { + if (!uS(t)) return; + const o = uUe(t); + if (!o) return; + const c = t.parent, { leftSibling: _, rightSibling: u } = lUe(t); + let d = c.getStart(), g = ""; + !_ && c.comment && (d = pke(c, c.getStart(), t.getStart()), g = `${i} */${i}`), _ && (s && uS(_) ? (d = t.getStart(), g = "") : (d = pke(c, _.getStart(), t.getStart()), g = `${i} */${i}`)); + let h = c.getEnd(), S = ""; + u && (s && uS(u) ? (h = u.getStart(), S = `${i}${i}`) : (h = u.getStart(), S = `${i}/**${i} * `)), e.replaceRange(n, { pos: d, end: h }, o, { prefix: g, suffix: S }); + } + function lUe(e) { + const t = e.parent, n = t.getChildCount() - 1, i = t.getChildren().findIndex( + (c) => c.getStart() === e.getStart() && c.getEnd() === e.getEnd() + ), s = i > 0 ? t.getChildAt(i - 1) : void 0, o = i < n ? t.getChildAt(i + 1) : void 0; + return { leftSibling: s, rightSibling: o }; + } + function pke(e, t, n) { + const i = e.getText().substring(t - e.getStart(), n - e.getStart()); + for (let s = i.length; s > 0; s--) + if (!/[*/\s]/g.test(i.substring(s - 1, s))) + return t + s; + return n; + } + function uUe(e) { + var t; + const { typeExpression: n } = e; + if (!n) return; + const i = (t = e.name) == null ? void 0 : t.getText(); + if (i) { + if (n.kind === 322) + return _Ue(i, n); + if (n.kind === 309) + return fUe(i, n); + } + } + function _Ue(e, t) { + const n = dke(t); + if (ut(n)) + return N.createInterfaceDeclaration( + /*modifiers*/ + void 0, + e, + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + n + ); + } + function fUe(e, t) { + const n = qa(t.type); + if (n) + return N.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + N.createIdentifier(e), + /*typeParameters*/ + void 0, + n + ); + } + function dke(e) { + const t = e.jsDocPropertyTags; + return ut(t) ? Ii(t, (i) => { + var s; + const o = pUe(i), c = (s = i.typeExpression) == null ? void 0 : s.type, _ = i.isBracketed; + let u; + if (c && lS(c)) { + const d = dke(c); + u = N.createTypeLiteralNode(d); + } else c && (u = qa(c)); + if (u && o) { + const d = _ ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0; + return N.createPropertySignature( + /*modifiers*/ + void 0, + o, + d, + u + ); + } + }) : void 0; + } + function pUe(e) { + return e.name.kind === 80 ? e.name.text : e.name.right.text; + } + function dUe(e) { + return gf(e) ? Xs(e.jsDoc, (t) => { + var n; + return (n = t.tags) == null ? void 0 : n.filter((i) => uS(i)); + }) : []; + } + var rle = "convertLiteralTypeToMappedType", mke = [p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; + Us({ + errorCodes: mke, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = gke(n, i.start); + if (!s) + return; + const { name: o, constraint: c } = s, _ = Yr.ChangeTracker.with(t, (u) => hke(u, n, s)); + return [Ds(rle, _, [p.Convert_0_to_1_in_0, c, o], rle, p.Convert_all_type_literals_to_mapped_type)]; + }, + fixIds: [rle], + getAllCodeActions: (e) => Za(e, mke, (t, n) => { + const i = gke(n.file, n.start); + i && hke(t, n.file, i); + }) + }); + function gke(e, t) { + const n = Ei(e, t); + if (Re(n)) { + const i = Is(n.parent.parent, I_), s = n.getText(e); + return { + container: Is(i.parent, Xu), + typeNode: i.type, + constraint: s, + name: s === "K" ? "P" : "K" + }; + } + } + function hke(e, t, { container: n, typeNode: i, constraint: s, name: o }) { + e.replaceNode( + t, + n, + N.createMappedTypeNode( + /*readonlyToken*/ + void 0, + N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + o, + N.createTypeReferenceNode(s) + ), + /*nameType*/ + void 0, + /*questionToken*/ + void 0, + i, + /*members*/ + void 0 + ) + ); + } + var yke = [ + p.Class_0_incorrectly_implements_interface_1.code, + p.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code + ], nle = "fixClassIncorrectlyImplementsInterface"; + Us({ + errorCodes: yke, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = vke(t, n.start); + return Ii(dC(i), (s) => { + const o = Yr.ChangeTracker.with(e, (c) => Ske(e, s, t, i, c, e.preferences)); + return o.length === 0 ? void 0 : Ds(nle, o, [p.Implement_interface_0, s.getText(t)], nle, p.Implement_all_unimplemented_interfaces); + }); + }, + fixIds: [nle], + getAllCodeActions(e) { + const t = /* @__PURE__ */ new Map(); + return Za(e, yke, (n, i) => { + const s = vke(i.file, i.start); + if (Kp(t, ja(s))) + for (const o of dC(s)) + Ske(e, o, i.file, s, n, e.preferences); + }); + } + }); + function vke(e, t) { + return E.checkDefined(Nl(Ei(e, t)), "There should be a containing class"); + } + function bke(e) { + return !e.valueDeclaration || !(Au(e.valueDeclaration) & 2); + } + function Ske(e, t, n, i, s, o) { + const c = e.program.getTypeChecker(), _ = mUe(i, c), u = c.getTypeAtLocation(t), g = c.getPropertiesOfType(u).filter(dI(bke, (P) => !_.has(P.escapedName))), h = c.getTypeAtLocation(i), S = Nn(i.members, (P) => ec(P)); + h.getNumberIndexType() || C( + u, + 1 + /* Number */ + ), h.getStringIndexType() || C( + u, + 0 + /* String */ + ); + const T = Zb(n, e.program, o, e.host); + $le(i, g, n, e, o, T, (P) => D(n, i, P)), T.writeFixes(s); + function C(P, O) { + const j = c.getIndexInfoOfType(P, O); + j && D(n, i, c.indexInfoToIndexSignatureDeclaration( + j, + i, + /*flags*/ + void 0, + v6(e) + )); + } + function D(P, O, j) { + S ? s.insertNodeAfter(P, S, j) : s.insertMemberAtStart(P, O, j); + } + } + function mUe(e, t) { + const n = tm(e); + if (!n) return Ms(); + const i = t.getTypeAtLocation(n), s = t.getPropertiesOfType(i); + return Ms(s.filter(bke)); + } + var Tke = "import", xke = "fixMissingImport", kke = [ + p.Cannot_find_name_0.code, + p.Cannot_find_name_0_Did_you_mean_1.code, + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, + p.Cannot_find_namespace_0.code, + p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code, + p._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code, + p.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code, + p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery.code, + p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later.code, + p.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode.code, + p.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig.code, + p.Cannot_find_namespace_0_Did_you_mean_1.code + ]; + Us({ + errorCodes: kke, + getCodeActions(e) { + const { errorCode: t, preferences: n, sourceFile: i, span: s, program: o } = e, c = Nke( + e, + t, + s.start, + /*useAutoImportProvider*/ + !0 + ); + if (c) + return c.map( + ({ fix: _, symbolName: u, errorIdentifierText: d }) => sle( + e, + i, + u, + _, + /*includeSymbolNameInDescription*/ + u !== d, + o, + n + ) + ); + }, + fixIds: [xke], + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, preferences: i, host: s, cancellationToken: o } = e, c = Cke( + t, + n, + /*useAutoImportProvider*/ + !0, + i, + s, + o + ); + return Ux(e, kke, (_) => c.addImportFromDiagnostic(_, e)), Vx(Yr.ChangeTracker.with(e, c.writeFixes)); + } + }); + function Zb(e, t, n, i, s) { + return Cke( + e, + t, + /*useAutoImportProvider*/ + !1, + n, + i, + s + ); + } + function Cke(e, t, n, i, s, o) { + const c = t.getCompilerOptions(), _ = [], u = [], d = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Map(); + return { addImportFromDiagnostic: D, addImportFromExportedSymbol: P, writeFixes: V, hasFixes: $, addImportForUnresolvedIdentifier: C, addImportForNonExistentExport: O, removeExistingImport: j, addVerbatimImport: T }; + function T(U) { + h.add(U); + } + function C(U, G, ce) { + const K = EUe(U, G, ce); + !K || !K.length || F(fa(K)); + } + function D(U, G) { + const ce = Nke(G, U.code, U.start, n); + !ce || !ce.length || F(fa(ce)); + } + function P(U, G, ce) { + var K; + const X = E.checkDefined(U.parent), Z = m9(U, pa(c)), oe = t.getTypeChecker(), ne = oe.getMergedSymbol(Jl(U, oe)), pe = Pke( + e, + ne, + Z, + X, + /*preferCapitalized*/ + !1, + t, + s, + i, + o + ), fe = q9(e, t); + let H = Eke( + e, + E.checkDefined(pe), + t, + /*position*/ + void 0, + !!G, + fe, + s, + i + ); + if (H) { + const ae = ((K = Jn(ce?.name, Re)) == null ? void 0 : K.text) ?? Z; + ce && $E(ce) && (H.kind === 3 || H.kind === 2) && H.addAsTypeOnly === 1 && (H = { + ...H, + addAsTypeOnly: 2 + /* Required */ + }), F({ fix: H, symbolName: ae ?? Z, errorIdentifierText: void 0 }); + } + } + function O(U, G, ce, K, X) { + const Z = t.getSourceFile(G), oe = q9(e, t); + if (Z && Z.symbol) { + const { fixes: ne } = U9( + [{ + exportKind: ce, + isFromPackageJson: !1, + moduleFileName: G, + moduleSymbol: Z.symbol, + targetFlags: K + }], + /*usagePosition*/ + void 0, + X, + oe, + t, + e, + s, + i + ); + ne.length && F({ fix: ne[0], symbolName: U, errorIdentifierText: U }); + } else { + const ne = T9(G, 99, t, s), pe = fv.getLocalModuleSpecifierBetweenFileNames( + e, + G, + c, + jx(t, s) + ), fe = Bq(ne, ce, c), H = jq( + X, + /*isForNewImportDeclaration*/ + !0, + /*symbol*/ + void 0, + K, + t.getTypeChecker(), + c + ); + F({ fix: { + kind: 3, + moduleSpecifierKind: "relative", + moduleSpecifier: pe, + importKind: fe, + addAsTypeOnly: H, + useRequire: oe + }, symbolName: U, errorIdentifierText: U }); + } + } + function j(U) { + U.kind === 273 && E.assertIsDefined(U.name, "ImportClause should have a name if it's being removed"), g.add(U); + } + function F(U) { + var G, ce; + const { fix: K, symbolName: X } = U; + switch (K.kind) { + case 0: + _.push(K); + break; + case 1: + u.push(K); + break; + case 2: { + const { importClauseOrBindingPattern: pe, importKind: fe, addAsTypeOnly: H } = K; + let ae = d.get(pe); + if (ae || d.set(pe, ae = { importClauseOrBindingPattern: pe, defaultImport: void 0, namedImports: /* @__PURE__ */ new Map() }), fe === 0) { + const le = ae?.namedImports.get(X); + ae.namedImports.set(X, Z(le, H)); + } else + E.assert(ae.defaultImport === void 0 || ae.defaultImport.name === X, "(Add to Existing) Default import should be missing or match symbolName"), ae.defaultImport = { + name: X, + addAsTypeOnly: Z((G = ae.defaultImport) == null ? void 0 : G.addAsTypeOnly, H) + }; + break; + } + case 3: { + const { moduleSpecifier: pe, importKind: fe, useRequire: H, addAsTypeOnly: ae } = K, le = oe(pe, fe, H, ae); + switch (E.assert(le.useRequire === H, "(Add new) Tried to add an `import` and a `require` for the same module"), fe) { + case 1: + E.assert(le.defaultImport === void 0 || le.defaultImport.name === X, "(Add new) Default import should be missing or match symbolName"), le.defaultImport = { name: X, addAsTypeOnly: Z((ce = le.defaultImport) == null ? void 0 : ce.addAsTypeOnly, ae) }; + break; + case 0: + const Ae = (le.namedImports || (le.namedImports = /* @__PURE__ */ new Map())).get(X); + le.namedImports.set(X, Z(Ae, ae)); + break; + case 3: + if (c.verbatimModuleSyntax) { + const ge = (le.namedImports || (le.namedImports = /* @__PURE__ */ new Map())).get(X); + le.namedImports.set(X, Z(ge, ae)); + } else + E.assert(le.namespaceLikeImport === void 0 || le.namespaceLikeImport.name === X, "Namespacelike import shoudl be missing or match symbolName"), le.namespaceLikeImport = { importKind: fe, name: X, addAsTypeOnly: ae }; + break; + case 2: + E.assert(le.namespaceLikeImport === void 0 || le.namespaceLikeImport.name === X, "Namespacelike import shoudl be missing or match symbolName"), le.namespaceLikeImport = { importKind: fe, name: X, addAsTypeOnly: ae }; + break; + } + break; + } + case 4: + break; + default: + E.assertNever(K, `fix wasn't never - got kind ${K.kind}`); + } + function Z(pe, fe) { + return Math.max(pe ?? 0, fe); + } + function oe(pe, fe, H, ae) { + const le = ne( + pe, + /*topLevelTypeOnly*/ + !0 + ), Ae = ne( + pe, + /*topLevelTypeOnly*/ + !1 + ), ge = S.get(le), de = S.get(Ae), ve = { + defaultImport: void 0, + namedImports: void 0, + namespaceLikeImport: void 0, + useRequire: H + }; + return fe === 1 && ae === 2 ? ge || (S.set(le, ve), ve) : ae === 1 && (ge || de) ? ge || de : de || (S.set(Ae, ve), ve); + } + function ne(pe, fe) { + return `${fe ? 1 : 0}|${pe}`; + } + } + function V(U, G) { + var ce, K; + let X; + l0(e) && e.imports.length === 0 && G !== void 0 ? X = G : X = Rf(e, i); + for (const ne of _) + ale(U, e, ne); + for (const ne of u) + Jke(U, e, ne, X); + let Z; + if (g.size) { + E.assert(l0(e), "Cannot remove imports from a future source file"); + const ne = new Set(Ii([...g], (le) => sr(le, oc))), pe = new Set(Ii([...g], (le) => sr(le, i3))), fe = [...ne].filter( + (le) => { + var Ae, ge, de; + return ( + // nothing added to the import declaration + !d.has(le.importClause) && // no default, or default is being removed + (!((Ae = le.importClause) != null && Ae.name) || g.has(le.importClause)) && // no namespace import, or namespace import is being removed + (!Jn((ge = le.importClause) == null ? void 0 : ge.namedBindings, Rg) || g.has(le.importClause.namedBindings)) && // no named imports, or all named imports are being removed + (!Jn((de = le.importClause) == null ? void 0 : de.namedBindings, fm) || Ri(le.importClause.namedBindings.elements, (ve) => g.has(ve))) + ); + } + ), H = [...pe].filter( + (le) => ( + // no binding elements being added to the variable declaration + (le.name.kind !== 206 || !d.has(le.name)) && // no binding elements, or all binding elements are being removed + (le.name.kind !== 206 || Ri(le.name.elements, (Ae) => g.has(Ae))) + ) + ), ae = [...ne].filter( + (le) => { + var Ae, ge; + return ( + // has named bindings + ((Ae = le.importClause) == null ? void 0 : Ae.namedBindings) && // is not being fully removed + fe.indexOf(le) === -1 && // is not gaining named imports + !((ge = d.get(le.importClause)) != null && ge.namedImports) && // all named imports are being removed + (le.importClause.namedBindings.kind === 274 || Ri(le.importClause.namedBindings.elements, (de) => g.has(de))) + ); + } + ); + for (const le of [...fe, ...H]) + U.delete(e, le); + for (const le of ae) + U.replaceNode( + e, + le.importClause, + N.updateImportClause( + le.importClause, + le.importClause.isTypeOnly, + le.importClause.name, + /*namedBindings*/ + void 0 + ) + ); + for (const le of g) { + const Ae = sr(le, oc); + Ae && fe.indexOf(Ae) === -1 && ae.indexOf(Ae) === -1 ? le.kind === 273 ? U.delete(e, le.name) : (E.assert(le.kind === 276, "NamespaceImport should have been handled earlier"), (ce = d.get(Ae.importClause)) != null && ce.namedImports ? (Z ?? (Z = /* @__PURE__ */ new Set())).add(le) : U.delete(e, le)) : le.kind === 208 ? (K = d.get(le.parent)) != null && K.namedImports ? (Z ?? (Z = /* @__PURE__ */ new Set())).add(le) : U.delete(e, le) : le.kind === 271 && U.delete(e, le); + } + } + d.forEach(({ importClauseOrBindingPattern: ne, defaultImport: pe, namedImports: fe }) => { + Bke( + U, + e, + ne, + pe, + ts(fe.entries(), ([H, ae]) => ({ addAsTypeOnly: ae, name: H })), + Z, + i + ); + }); + let oe; + S.forEach(({ useRequire: ne, defaultImport: pe, namedImports: fe, namespaceLikeImport: H }, ae) => { + const le = ae.slice(2), ge = (ne ? Vke : Wke)( + le, + X, + pe, + fe && ts(fe.entries(), ([de, ve]) => ({ addAsTypeOnly: ve, name: de })), + H, + c, + i + ); + oe = gT(oe, ge); + }), oe = gT(oe, L()), oe && _U( + U, + e, + oe, + /*blankLineBetween*/ + !0, + i + ); + } + function L() { + if (!h.size) return; + const U = new Set(Ii([...h], (ce) => sr(ce, oc))), G = new Set(Ii([...h], (ce) => sr(ce, s3))); + return [ + ...Ii([...h], (ce) => ce.kind === 271 ? qa( + ce, + /*includeTrivia*/ + !0 + ) : void 0), + ...[...U].map((ce) => { + var K; + return h.has(ce) ? qa( + ce, + /*includeTrivia*/ + !0 + ) : qa( + N.updateImportDeclaration( + ce, + ce.modifiers, + ce.importClause && N.updateImportClause( + ce.importClause, + ce.importClause.isTypeOnly, + h.has(ce.importClause) ? ce.importClause.name : void 0, + h.has(ce.importClause.namedBindings) ? ce.importClause.namedBindings : (K = Jn(ce.importClause.namedBindings, fm)) != null && K.elements.some((X) => h.has(X)) ? N.updateNamedImports( + ce.importClause.namedBindings, + ce.importClause.namedBindings.elements.filter((X) => h.has(X)) + ) : void 0 + ), + ce.moduleSpecifier, + ce.attributes + ), + /*includeTrivia*/ + !0 + ); + }), + ...[...G].map((ce) => h.has(ce) ? qa( + ce, + /*includeTrivia*/ + !0 + ) : qa( + N.updateVariableStatement( + ce, + ce.modifiers, + N.updateVariableDeclarationList( + ce.declarationList, + Ii(ce.declarationList.declarations, (K) => h.has(K) ? K : N.updateVariableDeclaration( + K, + K.name.kind === 206 ? N.updateObjectBindingPattern( + K.name, + K.name.elements.filter((X) => h.has(X)) + ) : K.name, + K.exclamationToken, + K.type, + K.initializer + )) + ) + ), + /*includeTrivia*/ + !0 + )) + ]; + } + function $() { + return _.length > 0 || u.length > 0 || d.size > 0 || S.size > 0 || h.size > 0 || g.size > 0; + } + } + function gUe(e, t, n, i) { + const s = f6(e, i, n), o = wke(t.getTypeChecker(), e, t.getCompilerOptions()); + return { getModuleSpecifierForBestExportInfo: c }; + function c(_, u, d, g) { + const { fixes: h, computedWithoutCacheCount: S } = U9( + _, + u, + d, + /*useRequire*/ + !1, + t, + e, + n, + i, + o, + g + ), T = Oke(h, e, t, s, n, i); + return T && { ...T, computedWithoutCacheCount: S }; + } + } + function hUe(e, t, n, i, s, o, c, _, u, d, g, h) { + let S; + n ? (S = SN(i, c, _, g, h).get(i.path, n), E.assertIsDefined(S, "Some exportInfo should match the specified exportMapKey")) : (S = GR(Op(t.name)) ? [vUe(e, s, t, _, c)] : Pke(i, e, s, t, o, _, c, g, h), E.assertIsDefined(S, "Some exportInfo should match the specified symbol / moduleSymbol")); + const T = q9(i, _), C = Y1(Ei(i, d)), D = E.checkDefined(Eke(i, S, _, d, C, T, c, g)); + return { + moduleSpecifier: D.moduleSpecifier, + codeAction: Dke(sle( + { host: c, formatContext: u, preferences: g }, + i, + s, + D, + /*includeSymbolNameInDescription*/ + !1, + _, + g + )) + }; + } + function yUe(e, t, n, i, s, o) { + const c = n.getCompilerOptions(), _ = lR(ile(e, n.getTypeChecker(), t, c)), u = Rke(e, t, _, n), d = _ !== t.text; + return u && Dke(sle( + { host: i, formatContext: s, preferences: o }, + e, + _, + u, + d, + n, + o + )); + } + function Eke(e, t, n, i, s, o, c, _) { + const u = f6(e, _, c); + return Oke(U9(t, i, s, o, n, e, c, _).fixes, e, n, u, c, _); + } + function Dke({ description: e, changes: t, commands: n }) { + return { description: e, changes: t, commands: n }; + } + function Pke(e, t, n, i, s, o, c, _, u) { + const d = Ake(o, c); + return SN(e, c, o, _, u).search(e.path, s, (g) => g === n, (g) => { + if (Jl(g[0].symbol, d(g[0].isFromPackageJson)) === t && g.some((h) => h.moduleSymbol === i || h.symbol.parent === i)) + return g; + }); + } + function vUe(e, t, n, i, s) { + var o, c; + const _ = d( + i.getTypeChecker(), + /*isFromPackageJson*/ + !1 + ); + if (_) + return _; + const u = (c = (o = s.getPackageJsonAutoImportProvider) == null ? void 0 : o.call(s)) == null ? void 0 : c.getTypeChecker(); + return E.checkDefined(u && d( + u, + /*isFromPackageJson*/ + !0 + ), "Could not find symbol in specified module for code actions"); + function d(g, h) { + const S = x9(n, g); + if (S && Jl(S.symbol, g) === e) + return { symbol: S.symbol, moduleSymbol: n, moduleFileName: void 0, exportKind: S.exportKind, targetFlags: Jl(e, g).flags, isFromPackageJson: h }; + const T = g.tryGetMemberInModuleExportsAndProperties(t, n); + if (T && Jl(T, g) === e) + return { symbol: T, moduleSymbol: n, moduleFileName: void 0, exportKind: 0, targetFlags: Jl(e, g).flags, isFromPackageJson: h }; + } + } + function U9(e, t, n, i, s, o, c, _, u = l0(o) ? wke(s.getTypeChecker(), o, s.getCompilerOptions()) : void 0, d) { + const g = s.getTypeChecker(), h = u ? Xs(e, u.getImportsForExportInfo) : He, S = t !== void 0 && bUe(h, t), T = TUe(h, n, g, s.getCompilerOptions()); + if (T) + return { + computedWithoutCacheCount: 0, + fixes: [...S ? [S] : He, T] + }; + const { fixes: C, computedWithoutCacheCount: D = 0 } = kUe( + e, + h, + s, + o, + t, + n, + i, + c, + _, + d + ); + return { + computedWithoutCacheCount: D, + fixes: [...S ? [S] : He, ...C] + }; + } + function bUe(e, t) { + return xc(e, ({ declaration: n, importKind: i }) => { + var s; + if (i !== 0) return; + const o = SUe(n), c = o && ((s = u4(n)) == null ? void 0 : s.text); + if (c) + return { kind: 0, namespacePrefix: o, usagePosition: t, moduleSpecifierKind: void 0, moduleSpecifier: c }; + }); + } + function SUe(e) { + var t, n, i; + switch (e.kind) { + case 260: + return (t = Jn(e.name, Re)) == null ? void 0 : t.text; + case 271: + return e.name.text; + case 351: + case 272: + return (i = Jn((n = e.importClause) == null ? void 0 : n.namedBindings, Rg)) == null ? void 0 : i.name.text; + default: + return E.assertNever(e); + } + } + function jq(e, t, n, i, s, o) { + return e ? n && o.verbatimModuleSyntax && (!(i & 111551) || s.getTypeOnlyAliasDeclaration(n)) ? 2 : 1 : 4; + } + function TUe(e, t, n, i) { + let s; + for (const c of e) { + const _ = o(c); + if (!_) continue; + const u = $E(_.importClauseOrBindingPattern); + if (_.addAsTypeOnly !== 4 && u || _.addAsTypeOnly === 4 && !u) + return _; + s ?? (s = _); + } + return s; + function o({ declaration: c, importKind: _, symbol: u, targetFlags: d }) { + if (_ === 3 || _ === 2 || c.kind === 271) + return; + if (c.kind === 260) + return (_ === 0 || _ === 1) && c.name.kind === 206 ? { + kind: 2, + importClauseOrBindingPattern: c.name, + importKind: _, + moduleSpecifierKind: void 0, + moduleSpecifier: c.initializer.arguments[0].text, + addAsTypeOnly: 4 + /* NotAllowed */ + } : void 0; + const { importClause: g } = c; + if (!g || !Ga(c.moduleSpecifier)) + return; + const { name: h, namedBindings: S } = g; + if (g.isTypeOnly && !(_ === 0 && S)) + return; + const T = jq( + t, + /*isForNewImportDeclaration*/ + !1, + u, + d, + n, + i + ); + if (!(_ === 1 && (h || // Cannot add a default import to a declaration that already has one + T === 2 && S)) && !(_ === 0 && S?.kind === 274)) + return { + kind: 2, + importClauseOrBindingPattern: g, + importKind: _, + moduleSpecifierKind: void 0, + moduleSpecifier: c.moduleSpecifier.text, + addAsTypeOnly: T + }; + } + } + function wke(e, t, n) { + let i; + for (const s of t.imports) { + const o = _4(s); + if (i3(o.parent)) { + const c = e.resolveExternalModuleName(s); + c && (i || (i = Kf())).add($s(c), o.parent); + } else if (o.kind === 272 || o.kind === 271 || o.kind === 351) { + const c = e.getSymbolAtLocation(s); + c && (i || (i = Kf())).add($s(c), o); + } + } + return { + getImportsForExportInfo: ({ moduleSymbol: s, exportKind: o, targetFlags: c, symbol: _ }) => { + const u = i?.get($s(s)); + if (!u || p_(t) && !(c & 111551) && !Ri(u, Jg)) return He; + const d = Bq(t, o, n); + return u.map((g) => ({ declaration: g, importKind: d, symbol: _, targetFlags: c })); + } + }; + } + function q9(e, t) { + if (!Lg(e.fileName)) + return !1; + if (e.commonJsModuleIndicator && !e.externalModuleIndicator) return !0; + if (e.externalModuleIndicator && !e.commonJsModuleIndicator) return !1; + const n = t.getCompilerOptions(); + if (n.configFile) + return Nu(n) < 5; + if (e.impliedNodeFormat === 1) return !0; + if (e.impliedNodeFormat === 99) return !1; + for (const i of t.getSourceFiles()) + if (!(i === e || !p_(i) || t.isSourceFileFromExternalLibrary(i))) { + if (i.commonJsModuleIndicator && !i.externalModuleIndicator) return !0; + if (i.externalModuleIndicator && !i.commonJsModuleIndicator) return !1; + } + return !0; + } + function Ake(e, t) { + return Bm((n) => n ? t.getPackageJsonAutoImportProvider().getTypeChecker() : e.getTypeChecker()); + } + function xUe(e, t, n, i, s, o, c, _, u) { + const d = Lg(t.fileName), g = e.getCompilerOptions(), h = jx(e, c), S = Ake(e, c), T = Hu(g), C = ZF(T), D = u ? (j) => fv.tryGetModuleSpecifiersFromCache(j.moduleSymbol, t, h, _) : (j, F) => fv.getModuleSpecifiersWithCacheInfo( + j.moduleSymbol, + F, + g, + t, + h, + _, + /*options*/ + void 0, + /*forAutoImport*/ + !0 + ); + let P = 0; + const O = Xs(o, (j, F) => { + const V = S(j.isFromPackageJson), { computedWithoutCache: L, moduleSpecifiers: $, kind: U } = D(j, V) ?? {}, G = !!(j.targetFlags & 111551), ce = jq( + i, + /*isForNewImportDeclaration*/ + !0, + j.symbol, + j.targetFlags, + V, + g + ); + return P += L ? 1 : 0, Ii($, (K) => { + if (C && uv(K)) + return; + if (!G && d && n !== void 0) + return { kind: 1, moduleSpecifierKind: U, moduleSpecifier: K, usagePosition: n, exportInfo: j, isReExport: F > 0 }; + const X = Bq(t, j.exportKind, g); + let Z; + if (n !== void 0 && X === 3 && j.exportKind === 0) { + const oe = V.resolveExternalModuleSymbol(j.moduleSymbol); + let ne; + oe !== j.moduleSymbol && (ne = zU( + oe, + V, + g, + /*preferCapitalizedNames*/ + !1, + lo + )), ne || (ne = KD( + j.moduleSymbol, + pa(g), + /*forceCapitalize*/ + !1 + )), Z = { namespacePrefix: ne, usagePosition: n }; + } + return { + kind: 3, + moduleSpecifierKind: U, + moduleSpecifier: K, + importKind: X, + useRequire: s, + addAsTypeOnly: ce, + exportInfo: j, + isReExport: F > 0, + qualification: Z + }; + }); + }); + return { computedWithoutCacheCount: P, fixes: O }; + } + function kUe(e, t, n, i, s, o, c, _, u, d) { + const g = xc(t, (h) => CUe(h, o, c, n.getTypeChecker(), n.getCompilerOptions())); + return g ? { fixes: [g] } : xUe(n, i, s, o, c, e, _, u, d); + } + function CUe({ declaration: e, importKind: t, symbol: n, targetFlags: i }, s, o, c, _) { + var u; + const d = (u = u4(e)) == null ? void 0 : u.text; + if (d) { + const g = o ? 4 : jq( + s, + /*isForNewImportDeclaration*/ + !0, + n, + i, + c, + _ + ); + return { kind: 3, moduleSpecifierKind: void 0, moduleSpecifier: d, importKind: t, addAsTypeOnly: g, useRequire: o }; + } + } + function Nke(e, t, n, i) { + const s = Ei(e.sourceFile, n); + let o; + if (t === p._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) + o = AUe(e, s); + else if (Re(s)) + if (t === p._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) { + const _ = lR(ile(e.sourceFile, e.program.getTypeChecker(), s, e.program.getCompilerOptions())), u = Rke(e.sourceFile, s, _, e.program); + return u && [{ fix: u, symbolName: _, errorIdentifierText: s.text }]; + } else + o = Mke(e, s, i); + else return; + const c = f6(e.sourceFile, e.preferences, e.host); + return o && Ike(o, e.sourceFile, e.program, c, e.host, e.preferences); + } + function Ike(e, t, n, i, s, o) { + const c = (_) => _o(_, s.getCurrentDirectory(), _0(s)); + return rb(e, (_, u) => I1(!!_.isJsxNamespaceFix, !!u.isJsxNamespaceFix) || uo(_.fix.kind, u.fix.kind) || Fke(_.fix, u.fix, t, n, o, i.allowsImportingSpecifier, c)); + } + function EUe(e, t, n) { + const i = Mke(e, t, n), s = f6(e.sourceFile, e.preferences, e.host); + return i && Ike(i, e.sourceFile, e.program, s, e.host, e.preferences); + } + function Oke(e, t, n, i, s, o) { + if (ut(e)) + return e[0].kind === 0 || e[0].kind === 2 ? e[0] : e.reduce( + (c, _) => ( + // Takes true branch of conditional if `fix` is better than `best` + Fke( + _, + c, + t, + n, + o, + i.allowsImportingSpecifier, + (u) => _o(u, s.getCurrentDirectory(), _0(s)) + ) === -1 ? _ : c + ) + ); + } + function Fke(e, t, n, i, s, o, c) { + return e.kind !== 0 && t.kind !== 0 ? I1( + t.moduleSpecifierKind !== "node_modules" || o(t.moduleSpecifier), + e.moduleSpecifierKind !== "node_modules" || o(e.moduleSpecifier) + ) || DUe(e, t, s) || wUe(e.moduleSpecifier, t.moduleSpecifier, n, i) || I1( + Lke(e, n.path, c), + Lke(t, n.path, c) + ) || z3(e.moduleSpecifier, t.moduleSpecifier) : 0; + } + function DUe(e, t, n) { + return n.importModuleSpecifierPreference === "non-relative" || n.importModuleSpecifierPreference === "project-relative" ? I1(e.moduleSpecifierKind === "relative", t.moduleSpecifierKind === "relative") : 0; + } + function Lke(e, t, n) { + var i; + if (e.isReExport && ((i = e.exportInfo) != null && i.moduleFileName) && PUe(e.exportInfo.moduleFileName)) { + const s = n(Xn(e.exportInfo.moduleFileName)); + return zi(t, s); + } + return !1; + } + function PUe(e) { + return Wc( + e, + [".js", ".jsx", ".d.ts", ".ts", ".tsx"], + /*ignoreCase*/ + !0 + ) === "index"; + } + function wUe(e, t, n, i) { + return zi(e, "node:") && !zi(t, "node:") ? v9(n, i) ? -1 : 1 : zi(t, "node:") && !zi(e, "node:") ? v9(n, i) ? 1 : -1 : 0; + } + function AUe({ sourceFile: e, program: t, host: n, preferences: i }, s) { + const o = t.getTypeChecker(), c = NUe(s, o); + if (!c) return; + const _ = o.getAliasedSymbol(c), u = c.name, d = [{ symbol: c, moduleSymbol: _, moduleFileName: void 0, exportKind: 3, targetFlags: _.flags, isFromPackageJson: !1 }], g = q9(e, t); + return U9( + d, + /*usagePosition*/ + void 0, + /*isValidTypeOnlyUseSite*/ + !1, + g, + t, + e, + n, + i + ).fixes.map((S) => { + var T; + return { fix: S, symbolName: u, errorIdentifierText: (T = Jn(s, Re)) == null ? void 0 : T.text }; + }); + } + function NUe(e, t) { + const n = Re(e) ? t.getSymbolAtLocation(e) : void 0; + if (Z7(n)) return n; + const { parent: i } = e; + if (ru(i) && i.tagName === e || cS(i)) { + const s = t.resolveName( + t.getJsxNamespace(i), + ru(i) ? e : i, + 111551, + /*excludeGlobals*/ + !1 + ); + if (Z7(s)) + return s; + } + } + function Bq(e, t, n, i) { + if (n.verbatimModuleSyntax && (Nu(n) === 1 || e.impliedNodeFormat === 1)) + return 3; + switch (t) { + case 0: + return 0; + case 1: + return 1; + case 2: + return LUe(e, n, !!i); + case 3: + return IUe(e, n, !!i); + default: + return E.assertNever(t); + } + } + function IUe(e, t, n) { + if (ZT(t)) + return 1; + const i = Nu(t); + switch (i) { + case 2: + case 1: + case 3: + return Lg(e.fileName) && (e.externalModuleIndicator || n) ? 2 : 3; + case 4: + case 5: + case 6: + case 7: + case 99: + case 0: + case 200: + return 2; + case 100: + case 199: + return e.impliedNodeFormat === 99 ? 2 : 3; + default: + return E.assertNever(i, `Unexpected moduleKind ${i}`); + } + } + function Mke({ sourceFile: e, program: t, cancellationToken: n, host: i, preferences: s }, o, c) { + const _ = t.getTypeChecker(), u = t.getCompilerOptions(); + return Xs(ile(e, _, o, u), (d) => { + if (d === "default") + return; + const g = Y1(o), h = q9(e, t), S = FUe(d, cC(o), hS(o), n, e, t, c, i, s); + return ts( + tR(S.values(), (T) => U9(T, o.getStart(e), g, h, t, e, i, s).fixes), + (T) => ({ fix: T, symbolName: d, errorIdentifierText: o.text, isJsxNamespaceFix: d !== o.text }) + ); + }); + } + function Rke(e, t, n, i) { + const s = i.getTypeChecker(), o = s.resolveName( + n, + t, + 111551, + /*excludeGlobals*/ + !0 + ); + if (!o) return; + const c = s.getTypeOnlyAliasDeclaration(o); + if (!(!c || xr(c) !== e)) + return { kind: 4, typeOnlyAliasDeclaration: c }; + } + function ile(e, t, n, i) { + const s = n.parent; + if ((ru(s) || Fb(s)) && s.tagName === n && MU(i.jsx)) { + const o = t.getJsxNamespace(e); + if (OUe(o, n, t)) + return !hC(n.text) && !t.resolveName( + n.text, + n, + 111551, + /*excludeGlobals*/ + !1 + ) ? [n.text, o] : [o]; + } + return [n.text]; + } + function OUe(e, t, n) { + if (hC(t.text)) return !0; + const i = n.resolveName( + e, + t, + 111551, + /*excludeGlobals*/ + !0 + ); + return !i || ut(i.declarations, B1) && !(i.flags & 111551); + } + function FUe(e, t, n, i, s, o, c, _, u) { + var d; + const g = Kf(), h = f6(s, u, _), S = (d = _.getModuleSpecifierCache) == null ? void 0 : d.call(_), T = Bm((D) => jx(D ? _.getPackageJsonAutoImportProvider() : o, _)); + function C(D, P, O, j, F, V) { + const L = T(V); + if (P && BU(F, s, P, u, h, L, S) || !P && h.allowsImportingAmbientModule(D, L)) { + const $ = F.getTypeChecker(); + g.add(Pae(O, $).toString(), { symbol: O, moduleSymbol: D, moduleFileName: P?.fileName, exportKind: j, targetFlags: Jl(O, $).flags, isFromPackageJson: V }); + } + } + return JU(o, _, u, c, (D, P, O, j) => { + const F = O.getTypeChecker(); + i.throwIfCancellationRequested(); + const V = O.getCompilerOptions(), L = x9(D, F); + L && qke(F.getSymbolFlags(L.symbol), n) && zU(L.symbol, F, V, t, (U) => U === e) && C(D, P, L.symbol, L.exportKind, O, j); + const $ = F.tryGetMemberInModuleExportsAndProperties(e, D); + $ && qke(F.getSymbolFlags($), n) && C(D, P, $, 0, O, j); + }), g; + } + function LUe(e, t, n) { + const i = ZT(t), s = Lg(e.fileName); + if (!s && Nu(t) >= 5) + return i ? 1 : 2; + if (s) + return e.externalModuleIndicator || n ? i ? 1 : 2 : 3; + for (const o of e.statements ?? He) + if (nl(o) && !ic(o.moduleReference)) + return 3; + return i ? 1 : 3; + } + function sle(e, t, n, i, s, o, c) { + let _; + const u = Yr.ChangeTracker.with(e, (d) => { + _ = MUe(d, t, n, i, s, o, c); + }); + return Ds(Tke, u, _, xke, p.Add_all_missing_imports); + } + function MUe(e, t, n, i, s, o, c) { + const _ = Rf(t, c); + switch (i.kind) { + case 0: + return ale(e, t, i), [p.Change_0_to_1, n, `${i.namespacePrefix}.${n}`]; + case 1: + return Jke(e, t, i, _), [p.Change_0_to_1, n, zke(i.moduleSpecifier, _) + n]; + case 2: { + const { importClauseOrBindingPattern: u, importKind: d, addAsTypeOnly: g, moduleSpecifier: h } = i; + Bke( + e, + t, + u, + d === 1 ? { name: n, addAsTypeOnly: g } : void 0, + d === 0 ? [{ name: n, addAsTypeOnly: g }] : He, + /*removeExistingImportSpecifiers*/ + void 0, + c + ); + const S = Op(h); + return s ? [p.Import_0_from_1, n, S] : [p.Update_import_from_0, S]; + } + case 3: { + const { importKind: u, moduleSpecifier: d, addAsTypeOnly: g, useRequire: h, qualification: S } = i, T = h ? Vke : Wke, C = u === 1 ? { name: n, addAsTypeOnly: g } : void 0, D = u === 0 ? [{ name: n, addAsTypeOnly: g }] : void 0, P = u === 2 || u === 3 ? { importKind: u, name: S?.namespacePrefix || n, addAsTypeOnly: g } : void 0; + return _U( + e, + t, + T( + d, + _, + C, + D, + P, + o.getCompilerOptions(), + c + ), + /*blankLineBetween*/ + !0, + c + ), S && ale(e, t, S), s ? [p.Import_0_from_1, n, d] : [p.Add_import_from_0, d]; + } + case 4: { + const { typeOnlyAliasDeclaration: u } = i, d = RUe(e, u, o, t, c); + return d.kind === 276 ? [p.Remove_type_from_import_of_0_from_1, n, jke(d.parent.parent)] : [p.Remove_type_from_import_declaration_from_0, jke(d)]; + } + default: + return E.assertNever(i, `Unexpected fix kind ${i.kind}`); + } + } + function jke(e) { + var t, n; + return e.kind === 271 ? ((n = Jn((t = Jn(e.moduleReference, Sh)) == null ? void 0 : t.expression, Ga)) == null ? void 0 : n.text) || e.moduleReference.getText() : Is(e.parent.moduleSpecifier, Ks).text; + } + function RUe(e, t, n, i, s) { + const o = n.getCompilerOptions(), c = o.verbatimModuleSyntax; + switch (t.kind) { + case 276: + if (t.isTypeOnly) { + if (t.parent.elements.length > 1) { + const u = N.updateImportSpecifier( + t, + /*isTypeOnly*/ + !1, + t.propertyName, + t.name + ), { specifierComparer: d } = Sv.getNamedImportSpecifierComparerWithDetection(t.parent.parent.parent, s, i), g = Sv.getImportSpecifierInsertionIndex(t.parent.elements, u, d); + if (g !== t.parent.elements.indexOf(t)) + return e.delete(i, t), e.insertImportSpecifierAtIndex(i, u, t.parent, g), t; + } + return e.deleteRange(i, { pos: W1(t.getFirstToken()), end: W1(t.propertyName ?? t.name) }), t; + } else + return E.assert(t.parent.parent.isTypeOnly), _(t.parent.parent), t.parent.parent; + case 273: + return _(t), t; + case 274: + return _(t.parent), t.parent; + case 271: + return e.deleteRange(i, t.getChildAt(1)), t; + default: + E.failBadSyntaxKind(t); + } + function _(u) { + var d; + if (e.delete(i, fU(u, i)), !o.allowImportingTsExtensions) { + const g = u4(u.parent), h = g && ((d = n.getResolvedModuleFromModuleSpecifier(g, i)) == null ? void 0 : d.resolvedModule); + if (h?.resolvedUsingTsExtension) { + const S = dw(g.text, YO(g.text, o)); + e.replaceNode(i, g, N.createStringLiteral(S)); + } + } + if (c) { + const g = Jn(u.namedBindings, fm); + if (g && g.elements.length > 1) { + Sv.getNamedImportSpecifierComparerWithDetection(u.parent, s, i).isSorted !== !1 && t.kind === 276 && g.elements.indexOf(t) !== 0 && (e.delete(i, t), e.insertImportSpecifierAtIndex(i, t, g, 0)); + for (const S of g.elements) + S !== t && !S.isTypeOnly && e.insertModifierBefore(i, 156, S); + } + } + } + } + function Bke(e, t, n, i, s, o, c) { + var _; + if (n.kind === 206) { + if (o && n.elements.some((h) => o.has(h))) { + e.replaceNode( + t, + n, + N.createObjectBindingPattern([ + ...n.elements.filter((h) => !o.has(h)), + ...i ? [N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + "default", + i.name + )] : He, + ...s.map((h) => N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + h.name + )) + ]) + ); + return; + } + i && g(n, i.name, "default"); + for (const h of s) + g( + n, + h.name, + /*propertyName*/ + void 0 + ); + return; + } + const u = n.isTypeOnly && ut( + [i, ...s], + (h) => h?.addAsTypeOnly === 4 + /* NotAllowed */ + ), d = n.namedBindings && ((_ = Jn(n.namedBindings, fm)) == null ? void 0 : _.elements); + if (i && (E.assert(!n.name, "Cannot add a default import to an import clause that already has one"), e.insertNodeAt(t, n.getStart(t), N.createIdentifier(i.name), { suffix: ", " })), s.length) { + const { specifierComparer: h, isSorted: S } = Sv.getNamedImportSpecifierComparerWithDetection(n.parent, c, t), T = Sg( + s.map( + (C) => N.createImportSpecifier( + (!n.isTypeOnly || u) && Jq(C, c), + /*propertyName*/ + void 0, + N.createIdentifier(C.name) + ) + ), + h + ); + if (o) + e.replaceNode( + t, + n.namedBindings, + N.updateNamedImports( + n.namedBindings, + Sg([...d.filter((C) => !o.has(C)), ...T], h) + ) + ); + else if (d?.length && S !== !1) { + const C = u && d ? N.updateNamedImports( + n.namedBindings, + Zc(d, (D) => N.updateImportSpecifier( + D, + /*isTypeOnly*/ + !0, + D.propertyName, + D.name + )) + ).elements : d; + for (const D of T) { + const P = Sv.getImportSpecifierInsertionIndex(C, D, h); + e.insertImportSpecifierAtIndex(t, D, n.namedBindings, P); + } + } else if (d?.length) + for (const C of T) + e.insertNodeInListAfter(t, ia(d), C, d); + else if (T.length) { + const C = N.createNamedImports(T); + n.namedBindings ? e.replaceNode(t, n.namedBindings, C) : e.insertNodeAfter(t, E.checkDefined(n.name, "Import clause must have either named imports or a default import"), C); + } + } + if (u && (e.delete(t, fU(n, t)), d)) + for (const h of d) + e.insertModifierBefore(t, 156, h); + function g(h, S, T) { + const C = N.createBindingElement( + /*dotDotDotToken*/ + void 0, + T, + S + ); + h.elements.length ? e.insertNodeInListAfter(t, ia(h.elements), C) : e.replaceNode(t, h, N.createObjectBindingPattern([C])); + } + } + function ale(e, t, { namespacePrefix: n, usagePosition: i }) { + e.insertText(t, i, n + "."); + } + function Jke(e, t, { moduleSpecifier: n, usagePosition: i }, s) { + e.insertText(t, i, zke(n, s)); + } + function zke(e, t) { + const n = lU(t); + return `import(${n}${e}${n}).`; + } + function ole({ addAsTypeOnly: e }) { + return e === 2; + } + function Jq(e, t) { + return ole(e) || !!t.preferTypeOnlyAutoImports && e.addAsTypeOnly !== 4; + } + function Wke(e, t, n, i, s, o, c) { + const _ = HD(e, t); + let u; + if (n !== void 0 || i?.length) { + const d = (!n || ole(n)) && Ri(i, ole) || (o.verbatimModuleSyntax || c.preferTypeOnlyAutoImports) && n?.addAsTypeOnly !== 4 && !ut( + i, + (g) => g.addAsTypeOnly === 4 + /* NotAllowed */ + ); + u = gT( + u, + Ly( + n && N.createIdentifier(n.name), + i?.map( + (g) => N.createImportSpecifier( + !d && Jq(g, c), + /*propertyName*/ + void 0, + N.createIdentifier(g.name) + ) + ), + e, + t, + d + ) + ); + } + if (s) { + const d = s.importKind === 3 ? N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + Jq(s, c), + N.createIdentifier(s.name), + N.createExternalModuleReference(_) + ) : N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + Jq(s, c), + /*name*/ + void 0, + N.createNamespaceImport(N.createIdentifier(s.name)) + ), + _, + /*attributes*/ + void 0 + ); + u = gT(u, d); + } + return E.checkDefined(u); + } + function Vke(e, t, n, i, s) { + const o = HD(e, t); + let c; + if (n || i?.length) { + const _ = i?.map(({ name: d }) => N.createBindingElement( + /*dotDotDotToken*/ + void 0, + /*propertyName*/ + void 0, + d + )) || []; + n && _.unshift(N.createBindingElement( + /*dotDotDotToken*/ + void 0, + "default", + n.name + )); + const u = Uke(N.createObjectBindingPattern(_), o); + c = gT(c, u); + } + if (s) { + const _ = Uke(s.name, o); + c = gT(c, _); + } + return E.checkDefined(c); + } + function Uke(e, t) { + return N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + typeof e == "string" ? N.createIdentifier(e) : e, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + N.createCallExpression( + N.createIdentifier("require"), + /*typeArguments*/ + void 0, + [t] + ) + ) + ], + 2 + /* Const */ + ) + ); + } + function qke(e, t) { + return t === 7 ? !0 : t & 1 ? !!(e & 111551) : t & 2 ? !!(e & 788968) : t & 4 ? !!(e & 1920) : !1; + } + var cle = "addMissingConstraint", Hke = [ + // We want errors this could be attached to: + // Diagnostics.This_type_parameter_probably_needs_an_extends_0_constraint + p.Type_0_is_not_comparable_to_type_1.code, + p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, + p.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, + p.Property_0_is_incompatible_with_index_signature.code, + p.Property_0_in_type_1_is_not_assignable_to_type_2.code, + p.Type_0_does_not_satisfy_the_constraint_1.code + ]; + Us({ + errorCodes: Hke, + getCodeActions(e) { + const { sourceFile: t, span: n, program: i, preferences: s, host: o } = e, c = Gke(i, t, n); + if (c === void 0) return; + const _ = Yr.ChangeTracker.with(e, (u) => $ke(u, i, s, o, t, c)); + return [Ds(cle, _, p.Add_extends_constraint, cle, p.Add_extends_constraint_to_all_type_parameters)]; + }, + fixIds: [cle], + getAllCodeActions: (e) => { + const { program: t, preferences: n, host: i } = e, s = /* @__PURE__ */ new Map(); + return Vx(Yr.ChangeTracker.with(e, (o) => { + Ux(e, Hke, (c) => { + const _ = Gke(t, c.file, jl(c.start, c.length)); + if (_ && Kp(s, ja(_.declaration))) + return $ke(o, t, n, i, c.file, _); + }); + })); + } + }); + function Gke(e, t, n) { + const i = Nn(e.getSemanticDiagnostics(t), (c) => c.start === n.start && c.length === n.length); + if (i === void 0 || i.relatedInformation === void 0) return; + const s = Nn(i.relatedInformation, (c) => c.code === p.This_type_parameter_might_need_an_extends_0_constraint.code); + if (s === void 0 || s.file === void 0 || s.start === void 0 || s.length === void 0) return; + let o = tue(s.file, jl(s.start, s.length)); + if (o !== void 0 && (Re(o) && Mo(o.parent) && (o = o.parent), Mo(o))) { + if (iS(o.parent)) return; + const c = Ei(t, n.start), _ = e.getTypeChecker(); + return { constraint: BUe(_, c) || jUe(s.messageText), declaration: o, token: c }; + } + } + function $ke(e, t, n, i, s, o) { + const { declaration: c, constraint: _ } = o, u = t.getTypeChecker(); + if (Gi(_)) + e.insertText(s, c.name.end, ` extends ${_}`); + else { + const d = pa(t.getCompilerOptions()), g = v6({ program: t, host: i }), h = Zb(s, t, n, i), S = $9( + u, + h, + _, + /*contextNode*/ + void 0, + d, + /*flags*/ + void 0, + g + ); + S && (e.replaceNode(s, c, N.updateTypeParameterDeclaration( + c, + /*modifiers*/ + void 0, + c.name, + S, + c.default + )), h.writeFixes(e)); + } + } + function jUe(e) { + const [, t] = gm(e, ` +`, 0).match(/`extends (.*)`/) || []; + return t; + } + function BUe(e, t) { + return ai(t.parent) ? e.getTypeArgumentConstraint(t.parent) : (ct(t) ? e.getContextualType(t) : void 0) || e.getTypeAtLocation(t); + } + var Xke = "fixOverrideModifier", FN = "fixAddOverrideModifier", H9 = "fixRemoveOverrideModifier", Qke = [ + p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code, + p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code, + p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code, + p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code, + p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code, + p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code + ], Yke = { + // case #1: + [p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: FN, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + [p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: FN, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + // case #2: + [p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]: { + descriptions: p.Remove_override_modifier, + fixId: H9, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + [p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]: { + descriptions: p.Remove_override_modifier, + fixId: H9, + fixAllDescriptions: p.Remove_override_modifier + }, + // case #3: + [p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: FN, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + [p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: FN, + fixAllDescriptions: p.Add_all_missing_override_modifiers + }, + // case #4: + [p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]: { + descriptions: p.Add_override_modifier, + fixId: FN, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + // case #5: + [p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]: { + descriptions: p.Remove_override_modifier, + fixId: H9, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + }, + [p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]: { + descriptions: p.Remove_override_modifier, + fixId: H9, + fixAllDescriptions: p.Remove_all_unnecessary_override_modifiers + } + }; + Us({ + errorCodes: Qke, + getCodeActions: function(t) { + const { errorCode: n, span: i } = t, s = Yke[n]; + if (!s) return He; + const { descriptions: o, fixId: c, fixAllDescriptions: _ } = s, u = Yr.ChangeTracker.with(t, (d) => Zke(d, t, n, i.start)); + return [ + Ace(Xke, u, o, c, _) + ]; + }, + fixIds: [Xke, FN, H9], + getAllCodeActions: (e) => Za(e, Qke, (t, n) => { + const { code: i, start: s } = n, o = Yke[i]; + !o || o.fixId !== e.fixId || Zke(t, e, i, s); + }) + }); + function Zke(e, t, n, i) { + switch (n) { + case p.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code: + case p.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: + case p.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code: + case p.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code: + case p.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: + return JUe(e, t.sourceFile, i); + case p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code: + case p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code: + case p.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code: + case p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code: + return zUe(e, t.sourceFile, i); + default: + E.fail("Unexpected error code: " + n); + } + } + function JUe(e, t, n) { + const i = eCe(t, n); + if (p_(t)) { + e.addJSDocTags(t, i, [N.createJSDocOverrideTag(N.createIdentifier("override"))]); + return; + } + const s = i.modifiers || He, o = Nn(s, fx), c = Nn(s, xte), _ = Nn(s, (h) => ZV(h.kind)), u = eb(s, dl), d = c ? c.end : o ? o.end : _ ? _.end : u ? sa(t.text, u.end) : i.getStart(t), g = _ || o || c ? { prefix: " " } : { suffix: " " }; + e.insertModifierAt(t, d, 164, g); + } + function zUe(e, t, n) { + const i = eCe(t, n); + if (p_(t)) { + e.filterJSDocTags(t, i, mI(Z5)); + return; + } + const s = Nn(i.modifiers, kte); + E.assertIsDefined(s), e.deleteModifier(t, s); + } + function Kke(e) { + switch (e.kind) { + case 176: + case 172: + case 174: + case 177: + case 178: + return !0; + case 169: + return Q_(e, e.parent); + default: + return !1; + } + } + function eCe(e, t) { + const n = Ei(e, t), i = sr(n, (s) => Qn(s) ? "quit" : Kke(s)); + return E.assert(i && Kke(i)), i; + } + var lle = "fixNoPropertyAccessFromIndexSignature", tCe = [ + p.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code + ]; + Us({ + errorCodes: tCe, + fixIds: [lle], + getCodeActions(e) { + const { sourceFile: t, span: n, preferences: i } = e, s = nCe(t, n.start), o = Yr.ChangeTracker.with(e, (c) => rCe(c, e.sourceFile, s, i)); + return [Ds(lle, o, [p.Use_element_access_for_0, s.name.text], lle, p.Use_element_access_for_all_undeclared_properties)]; + }, + getAllCodeActions: (e) => Za(e, tCe, (t, n) => rCe(t, n.file, nCe(n.file, n.start), e.preferences)) + }); + function rCe(e, t, n, i) { + const s = Rf(t, i), o = N.createStringLiteral( + n.name.text, + s === 0 + /* Single */ + ); + e.replaceNode( + t, + n, + jI(n) ? N.createElementAccessChain(n.expression, n.questionDotToken, o) : N.createElementAccessExpression(n.expression, o) + ); + } + function nCe(e, t) { + return Is(Ei(e, t).parent, Dn); + } + var ule = "fixImplicitThis", iCe = [p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; + Us({ + errorCodes: iCe, + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s } = t; + let o; + const c = Yr.ChangeTracker.with(t, (_) => { + o = sCe(_, n, s.start, i.getTypeChecker()); + }); + return o ? [Ds(ule, c, o, ule, p.Fix_all_implicit_this_errors)] : He; + }, + fixIds: [ule], + getAllCodeActions: (e) => Za(e, iCe, (t, n) => { + sCe(t, n.file, n.start, e.program.getTypeChecker()); + }) + }); + function sCe(e, t, n, i) { + const s = Ei(t, n); + if (!s6(s)) return; + const o = Uu( + s, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (!(!Ac(o) && !po(o)) && !yi(Uu( + o, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ))) { + const c = E.checkDefined(Ya(o, 100, t)), { name: _ } = o, u = E.checkDefined(o.body); + return po(o) ? _ && yo.Core.isSymbolReferencedInFile(_, i, t, u) ? void 0 : (e.delete(t, c), _ && e.delete(t, _), e.insertText(t, u.pos, " =>"), [p.Convert_function_expression_0_to_arrow_function, _ ? _.text : DU]) : (e.replaceNode(t, c, N.createToken( + 87 + /* ConstKeyword */ + )), e.insertText(t, _.end, " = "), e.insertText(t, u.pos, " =>"), [p.Convert_function_declaration_0_to_arrow_function, _.text]); + } + } + var _le = "fixImportNonExportedMember", aCe = [ + p.Module_0_declares_1_locally_but_it_is_not_exported.code + ]; + Us({ + errorCodes: aCe, + fixIds: [_le], + getCodeActions(e) { + const { sourceFile: t, span: n, program: i } = e, s = oCe(t, n.start, i); + if (s === void 0) return; + const o = Yr.ChangeTracker.with(e, (c) => WUe(c, i, s)); + return [Ds(_le, o, [p.Export_0_from_module_1, s.exportName.node.text, s.moduleSpecifier], _le, p.Export_all_referenced_locals)]; + }, + getAllCodeActions(e) { + const { program: t } = e; + return Vx(Yr.ChangeTracker.with(e, (n) => { + const i = /* @__PURE__ */ new Map(); + Ux(e, aCe, (s) => { + const o = oCe(s.file, s.start, t); + if (o === void 0) return; + const { exportName: c, node: _, moduleSourceFile: u } = o; + if (zq(u, c.isTypeOnly) === void 0 && U3(_)) + n.insertExportModifier(u, _); + else { + const d = i.get(u) || { typeOnlyExports: [], exports: [] }; + c.isTypeOnly ? d.typeOnlyExports.push(c) : d.exports.push(c), i.set(u, d); + } + }), i.forEach((s, o) => { + const c = zq( + o, + /*isTypeOnly*/ + !0 + ); + c && c.isTypeOnly ? (fle(n, t, o, s.typeOnlyExports, c), fle(n, t, o, s.exports, zq( + o, + /*isTypeOnly*/ + !1 + ))) : fle(n, t, o, [...s.exports, ...s.typeOnlyExports], c); + }); + })); + } + }); + function oCe(e, t, n) { + var i, s; + const o = Ei(e, t); + if (Re(o)) { + const c = sr(o, oc); + if (c === void 0) return; + const _ = Ks(c.moduleSpecifier) ? c.moduleSpecifier : void 0; + if (_ === void 0) return; + const u = (i = n.getResolvedModuleFromModuleSpecifier(_, e)) == null ? void 0 : i.resolvedModule; + if (u === void 0) return; + const d = n.getSourceFile(u.resolvedFileName); + if (d === void 0 || p6(n, d)) return; + const g = d.symbol, h = (s = Jn(g.valueDeclaration, Vm)) == null ? void 0 : s.locals; + if (h === void 0) return; + const S = h.get(o.escapedText); + if (S === void 0) return; + const T = VUe(S); + return T === void 0 ? void 0 : { exportName: { node: o, isTypeOnly: tx(T) }, node: T, moduleSourceFile: d, moduleSpecifier: _.text }; + } + } + function WUe(e, t, { exportName: n, node: i, moduleSourceFile: s }) { + const o = zq(s, n.isTypeOnly); + o ? cCe(e, t, s, o, [n]) : U3(i) ? e.insertExportModifier(s, i) : lCe(e, t, s, [n]); + } + function fle(e, t, n, i, s) { + Dr(i) && (s ? cCe(e, t, n, s, i) : lCe(e, t, n, i)); + } + function zq(e, t) { + const n = (i) => Ic(i) && (t && i.isTypeOnly || !i.isTypeOnly); + return eb(e.statements, n); + } + function cCe(e, t, n, i, s) { + const o = i.exportClause && lp(i.exportClause) ? i.exportClause.elements : N.createNodeArray([]), c = !i.isTypeOnly && !!(ap(t.getCompilerOptions()) || Nn(o, (_) => _.isTypeOnly)); + e.replaceNode( + n, + i, + N.updateExportDeclaration( + i, + i.modifiers, + i.isTypeOnly, + N.createNamedExports( + N.createNodeArray( + [...o, ...uCe(s, c)], + /*hasTrailingComma*/ + o.hasTrailingComma + ) + ), + i.moduleSpecifier, + i.attributes + ) + ); + } + function lCe(e, t, n, i) { + e.insertNodeAtEndOfScope(n, n, N.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + N.createNamedExports(uCe( + i, + /*allowTypeModifier*/ + ap(t.getCompilerOptions()) + )), + /*moduleSpecifier*/ + void 0, + /*attributes*/ + void 0 + )); + } + function uCe(e, t) { + return N.createNodeArray(or(e, (n) => N.createExportSpecifier( + t && n.isTypeOnly, + /*propertyName*/ + void 0, + n.node + ))); + } + function VUe(e) { + if (e.valueDeclaration === void 0) + return ul(e.declarations); + const t = e.valueDeclaration, n = ti(t) ? Jn(t.parent.parent, yc) : void 0; + return n && Dr(n.declarationList.declarations) === 1 ? n : t; + } + var ple = "fixIncorrectNamedTupleSyntax", UUe = [ + p.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type.code, + p.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code + ]; + Us({ + errorCodes: UUe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = qUe(n, i.start), o = Yr.ChangeTracker.with(t, (c) => HUe(c, n, s)); + return [Ds(ple, o, p.Move_labeled_tuple_element_modifiers_to_labels, ple, p.Move_labeled_tuple_element_modifiers_to_labels)]; + }, + fixIds: [ple] + }); + function qUe(e, t) { + const n = Ei(e, t); + return sr( + n, + (i) => i.kind === 202 + /* NamedTupleMember */ + ); + } + function HUe(e, t, n) { + if (!n) + return; + let i = n.type, s = !1, o = !1; + for (; i.kind === 190 || i.kind === 191 || i.kind === 196; ) + i.kind === 190 ? s = !0 : i.kind === 191 && (o = !0), i = i.type; + const c = N.updateNamedTupleMember( + n, + n.dotDotDotToken || (o ? N.createToken( + 26 + /* DotDotDotToken */ + ) : void 0), + n.name, + n.questionToken || (s ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0), + i + ); + c !== n && e.replaceNode(t, n, c); + } + var _Ce = "fixSpelling", fCe = [ + p.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, + p.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, + p.Cannot_find_name_0_Did_you_mean_1.code, + p.Could_not_find_name_0_Did_you_mean_1.code, + p.Cannot_find_namespace_0_Did_you_mean_1.code, + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, + p._0_has_no_exported_member_named_1_Did_you_mean_2.code, + p.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, + p.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, + // for JSX class components + p.No_overload_matches_this_call.code, + // for JSX FC + p.Type_0_is_not_assignable_to_type_1.code + ]; + Us({ + errorCodes: fCe, + getCodeActions(e) { + const { sourceFile: t, errorCode: n } = e, i = pCe(t, e.span.start, e, n); + if (!i) return; + const { node: s, suggestedSymbol: o } = i, c = pa(e.host.getCompilationSettings()), _ = Yr.ChangeTracker.with(e, (u) => dCe(u, t, s, o, c)); + return [Ds("spelling", _, [p.Change_spelling_to_0, uc(o)], _Ce, p.Fix_all_detected_spelling_errors)]; + }, + fixIds: [_Ce], + getAllCodeActions: (e) => Za(e, fCe, (t, n) => { + const i = pCe(n.file, n.start, e, n.code), s = pa(e.host.getCompilationSettings()); + i && dCe(t, e.sourceFile, i.node, i.suggestedSymbol, s); + }) + }); + function pCe(e, t, n, i) { + const s = Ei(e, t), o = s.parent; + if ((i === p.No_overload_matches_this_call.code || i === p.Type_0_is_not_assignable_to_type_1.code) && !dm(o)) return; + const c = n.program.getTypeChecker(); + let _; + if (Dn(o) && o.name === s) { + E.assert(Dg(s), "Expected an identifier for spelling (property access)"); + let u = c.getTypeAtLocation(o.expression); + o.flags & 64 && (u = c.getNonNullableType(u)), _ = c.getSuggestedSymbolForNonexistentProperty(s, u); + } else if (cn(o) && o.operatorToken.kind === 103 && o.left === s && wi(s)) { + const u = c.getTypeAtLocation(o.right); + _ = c.getSuggestedSymbolForNonexistentProperty(s, u); + } else if ($u(o) && o.right === s) { + const u = c.getSymbolAtLocation(o.left); + u && u.flags & 1536 && (_ = c.getSuggestedSymbolForNonexistentModule(o.right, u)); + } else if (Yu(o) && o.name === s) { + E.assertNode(s, Re, "Expected an identifier for spelling (import)"); + const u = sr(s, oc), d = $Ue(n, u, e); + d && d.symbol && (_ = c.getSuggestedSymbolForNonexistentModule(s, d.symbol)); + } else if (dm(o) && o.name === s) { + E.assertNode(s, Re, "Expected an identifier for JSX attribute"); + const u = sr(s, ru), d = c.getContextualTypeForArgumentAtIndex(u, 0); + _ = c.getSuggestedSymbolForNonexistentJSXAttribute(s, d); + } else if (U7(o) && fl(o) && o.name === s) { + const u = sr(s, Qn), d = u ? tm(u) : void 0, g = d ? c.getTypeAtLocation(d) : void 0; + g && (_ = c.getSuggestedSymbolForNonexistentClassMember(sc(s), g)); + } else { + const u = hS(s), d = sc(s); + E.assert(d !== void 0, "name should be defined"), _ = c.getSuggestedSymbolForNonexistentSymbol(s, d, GUe(u)); + } + return _ === void 0 ? void 0 : { node: s, suggestedSymbol: _ }; + } + function dCe(e, t, n, i, s) { + const o = uc(i); + if (!X_(o, s) && Dn(n.parent)) { + const c = i.valueDeclaration; + c && Bl(c) && wi(c.name) ? e.replaceNode(t, n, N.createIdentifier(o)) : e.replaceNode(t, n.parent, N.createElementAccessExpression(n.parent.expression, N.createStringLiteral(o))); + } else + e.replaceNode(t, n, N.createIdentifier(o)); + } + function GUe(e) { + let t = 0; + return e & 4 && (t |= 1920), e & 2 && (t |= 788968), e & 1 && (t |= 111551), t; + } + function $Ue(e, t, n) { + var i; + if (!t || !Ga(t.moduleSpecifier)) return; + const s = (i = e.program.getResolvedModuleFromModuleSpecifier(t.moduleSpecifier, n)) == null ? void 0 : i.resolvedModule; + if (s) + return e.program.getSourceFile(s.resolvedFileName); + } + var dle = "returnValueCorrect", mle = "fixAddReturnStatement", gle = "fixRemoveBracesFromArrowFunctionBody", hle = "fixWrapTheBlockWithParen", mCe = [ + p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code + ]; + Us({ + errorCodes: mCe, + fixIds: [mle, gle, hle], + getCodeActions: function(t) { + const { program: n, sourceFile: i, span: { start: s }, errorCode: o } = t, c = hCe(n.getTypeChecker(), i, s, o); + if (c) + return c.kind === 0 ? Tr( + [QUe(t, c.expression, c.statement)], + xo(c.declaration) ? YUe(t, c.declaration, c.expression, c.commentSource) : void 0 + ) : [ZUe(t, c.declaration, c.expression)]; + }, + getAllCodeActions: (e) => Za(e, mCe, (t, n) => { + const i = hCe(e.program.getTypeChecker(), n.file, n.start, n.code); + if (i) + switch (e.fixId) { + case mle: + yCe(t, n.file, i.expression, i.statement); + break; + case gle: + if (!xo(i.declaration)) return; + vCe( + t, + n.file, + i.declaration, + i.expression, + i.commentSource, + /*withParen*/ + !1 + ); + break; + case hle: + if (!xo(i.declaration)) return; + bCe(t, n.file, i.declaration, i.expression); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }) + }); + function gCe(e, t, n) { + const i = e.createSymbol(4, t.escapedText); + i.links.type = e.getTypeAtLocation(n); + const s = Ms([i]); + return e.createAnonymousType( + /*symbol*/ + void 0, + s, + [], + [], + [] + ); + } + function yle(e, t, n, i) { + if (!t.body || !ms(t.body) || Dr(t.body.statements) !== 1) return; + const s = fa(t.body.statements); + if (Pl(s) && vle(e, t, e.getTypeAtLocation(s.expression), n, i)) + return { + declaration: t, + kind: 0, + expression: s.expression, + statement: s, + commentSource: s.expression + }; + if (Dy(s) && Pl(s.statement)) { + const o = N.createObjectLiteralExpression([N.createPropertyAssignment(s.label, s.statement.expression)]), c = gCe(e, s.label, s.statement.expression); + if (vle(e, t, c, n, i)) + return xo(t) ? { + declaration: t, + kind: 1, + expression: o, + statement: s, + commentSource: s.statement.expression + } : { + declaration: t, + kind: 0, + expression: o, + statement: s, + commentSource: s.statement.expression + }; + } else if (ms(s) && Dr(s.statements) === 1) { + const o = fa(s.statements); + if (Dy(o) && Pl(o.statement)) { + const c = N.createObjectLiteralExpression([N.createPropertyAssignment(o.label, o.statement.expression)]), _ = gCe(e, o.label, o.statement.expression); + if (vle(e, t, _, n, i)) + return { + declaration: t, + kind: 0, + expression: c, + statement: s, + commentSource: o + }; + } + } + } + function vle(e, t, n, i, s) { + if (s) { + const o = e.getSignatureFromDeclaration(t); + if (o) { + Vn( + t, + 1024 + /* Async */ + ) && (n = e.createPromiseType(n)); + const c = e.createSignature( + t, + o.typeParameters, + o.thisParameter, + o.parameters, + n, + /*typePredicate*/ + void 0, + o.minArgumentCount, + o.flags + ); + n = e.createAnonymousType( + /*symbol*/ + void 0, + Ms(), + [c], + [], + [] + ); + } else + n = e.getAnyType(); + } + return e.isTypeAssignableTo(n, i); + } + function hCe(e, t, n, i) { + const s = Ei(t, n); + if (!s.parent) return; + const o = sr(s.parent, so); + switch (i) { + case p.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code: + return !o || !o.body || !o.type || !Mf(o.type, s) ? void 0 : yle( + e, + o, + e.getTypeFromTypeNode(o.type), + /*isFunctionType*/ + !1 + ); + case p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code: + if (!o || !Es(o.parent) || !o.body) return; + const c = o.parent.arguments.indexOf(o); + if (c === -1) return; + const _ = e.getContextualTypeForArgumentAtIndex(o.parent, c); + return _ ? yle( + e, + o, + _, + /*isFunctionType*/ + !0 + ) : void 0; + case p.Type_0_is_not_assignable_to_type_1.code: + if (!Gm(s) || !FT(s.parent) && !dm(s.parent)) return; + const u = XUe(s.parent); + return !u || !so(u) || !u.body ? void 0 : yle( + e, + u, + e.getTypeAtLocation(s.parent), + /*isFunctionType*/ + !0 + ); + } + } + function XUe(e) { + switch (e.kind) { + case 260: + case 169: + case 208: + case 172: + case 303: + return e.initializer; + case 291: + return e.initializer && (oD(e.initializer) ? e.initializer.expression : void 0); + case 304: + case 171: + case 306: + case 348: + case 341: + return; + } + } + function yCe(e, t, n, i) { + of(n); + const s = gN(t); + e.replaceNode(t, i, N.createReturnStatement(n), { + leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, + trailingTriviaOption: Yr.TrailingTriviaOption.Exclude, + suffix: s ? ";" : void 0 + }); + } + function vCe(e, t, n, i, s, o) { + const c = o || s9(i) ? N.createParenthesizedExpression(i) : i; + of(s), vS(s, c), e.replaceNode(t, n.body, c); + } + function bCe(e, t, n, i) { + e.replaceNode(t, n.body, N.createParenthesizedExpression(i)); + } + function QUe(e, t, n) { + const i = Yr.ChangeTracker.with(e, (s) => yCe(s, e.sourceFile, t, n)); + return Ds(dle, i, p.Add_a_return_statement, mle, p.Add_all_missing_return_statement); + } + function YUe(e, t, n, i) { + const s = Yr.ChangeTracker.with(e, (o) => vCe( + o, + e.sourceFile, + t, + n, + i, + /*withParen*/ + !1 + )); + return Ds(dle, s, p.Remove_braces_from_arrow_function_body, gle, p.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues); + } + function ZUe(e, t, n) { + const i = Yr.ChangeTracker.with(e, (s) => bCe(s, e.sourceFile, t, n)); + return Ds(dle, i, p.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, hle, p.Wrap_all_object_literal_with_parentheses); + } + var vv = "fixMissingMember", Wq = "fixMissingProperties", Vq = "fixMissingAttributes", Uq = "fixMissingFunctionDeclaration", SCe = [ + p.Property_0_does_not_exist_on_type_1.code, + p.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, + p.Property_0_is_missing_in_type_1_but_required_in_type_2.code, + p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code, + p.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code, + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Cannot_find_name_0.code + ]; + Us({ + errorCodes: SCe, + getCodeActions(e) { + const t = e.program.getTypeChecker(), n = TCe(e.sourceFile, e.span.start, e.errorCode, t, e.program); + if (n) { + if (n.kind === 3) { + const i = Yr.ChangeTracker.with(e, (s) => ICe(s, e, n)); + return [Ds(Wq, i, p.Add_missing_properties, Wq, p.Add_all_missing_properties)]; + } + if (n.kind === 4) { + const i = Yr.ChangeTracker.with(e, (s) => NCe(s, e, n)); + return [Ds(Vq, i, p.Add_missing_attributes, Vq, p.Add_all_missing_attributes)]; + } + if (n.kind === 2 || n.kind === 5) { + const i = Yr.ChangeTracker.with(e, (s) => ACe(s, e, n)); + return [Ds(Uq, i, [p.Add_missing_function_declaration_0, n.token.text], Uq, p.Add_all_missing_function_declarations)]; + } + if (n.kind === 1) { + const i = Yr.ChangeTracker.with(e, (s) => wCe(s, e.program.getTypeChecker(), n)); + return [Ds(vv, i, [p.Add_missing_enum_member_0, n.token.text], vv, p.Add_all_missing_members)]; + } + return Hi(nqe(e, n), KUe(e, n)); + } + }, + fixIds: [vv, Uq, Wq, Vq], + getAllCodeActions: (e) => { + const { program: t, fixId: n } = e, i = t.getTypeChecker(), s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(); + return Vx(Yr.ChangeTracker.with(e, (c) => { + Ux(e, SCe, (_) => { + const u = TCe(_.file, _.start, _.code, i, e.program); + if (!(!u || !Kp(s, ja(u.parentDeclaration) + "#" + (u.kind === 3 ? u.identifier : u.token.text)))) { + if (n === Uq && (u.kind === 2 || u.kind === 5)) + ACe(c, e, u); + else if (n === Wq && u.kind === 3) + ICe(c, e, u); + else if (n === Vq && u.kind === 4) + NCe(c, e, u); + else if (u.kind === 1 && wCe(c, i, u), u.kind === 0) { + const { parentDeclaration: d, token: g } = u, h = bE(o, d, () => []); + h.some((S) => S.token.text === g.text) || h.push(u); + } + } + }), o.forEach((_, u) => { + const d = Xu(u) ? void 0 : rue(u, i); + for (const g of _) { + if (d?.some((O) => { + const j = o.get(O); + return !!j && j.some(({ token: F }) => F.text === g.token.text); + })) continue; + const { parentDeclaration: h, declSourceFile: S, modifierFlags: T, token: C, call: D, isJSFile: P } = g; + if (D && !wi(C)) + PCe(e, c, D, C, T & 256, h, S); + else if (P && !Vl(h) && !Xu(h)) + xCe(c, S, h, C, !!(T & 256)); + else { + const O = CCe(i, h, C); + ECe( + c, + S, + h, + C.text, + O, + T & 256 + /* Static */ + ); + } + } + }); + })); + } + }); + function TCe(e, t, n, i, s) { + var o; + const c = Ei(e, t), _ = c.parent; + if (n === p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) { + if (!(c.kind === 19 && Gs(_) && Es(_.parent))) return; + const T = rc(_.parent.arguments, (O) => O === _); + if (T < 0) return; + const C = i.getResolvedSignature(_.parent); + if (!(C && C.declaration && C.parameters[T])) return; + const D = C.parameters[T].valueDeclaration; + if (!(D && ji(D) && Re(D.name))) return; + const P = ts(i.getUnmatchedProperties( + i.getTypeAtLocation(_), + i.getParameterType(C, T), + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Dr(P) ? { kind: 3, token: D.name, identifier: D.name.text, properties: P, parentDeclaration: _ } : void 0; + } + if (c.kind === 19 && Gs(_)) { + const T = i.getContextualType(_) || i.getTypeAtLocation(_), C = ts(i.getUnmatchedProperties( + i.getTypeAtLocation(_), + T, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Dr(C) ? { kind: 3, token: _, identifier: "", properties: C, parentDeclaration: _ } : void 0; + } + if (!Dg(c)) return; + if (Re(c) && i0(_) && _.initializer && Gs(_.initializer)) { + const T = i.getContextualType(c) || i.getTypeAtLocation(c), C = ts(i.getUnmatchedProperties( + i.getTypeAtLocation(_.initializer), + T, + /*requireOptionalProperties*/ + !1, + /*matchDiscriminantProperties*/ + !1 + )); + return Dr(C) ? { kind: 3, token: c, identifier: c.text, properties: C, parentDeclaration: _.initializer } : void 0; + } + if (Re(c) && ru(c.parent)) { + const T = pa(s.getCompilerOptions()), C = sqe(i, T, c.parent); + return Dr(C) ? { kind: 4, token: c, attributes: C, parentDeclaration: c.parent } : void 0; + } + if (Re(c)) { + const T = (o = i.getContextualType(c)) == null ? void 0 : o.getNonNullableType(); + if (T && wn(T) & 16) { + const C = ul(i.getSignaturesOfType( + T, + 0 + /* Call */ + )); + return C === void 0 ? void 0 : { kind: 5, token: c, signature: C, sourceFile: e, parentDeclaration: OCe(c) }; + } + if (Es(_) && _.expression === c) + return { kind: 2, token: c, call: _, sourceFile: e, modifierFlags: 0, parentDeclaration: OCe(c) }; + } + if (!Dn(_)) return; + const u = sU(i.getTypeAtLocation(_.expression)), d = u.symbol; + if (!d || !d.declarations) return; + if (Re(c) && Es(_.parent)) { + const T = Nn(d.declarations, Nc), C = T?.getSourceFile(); + if (T && C && !p6(s, C)) + return { kind: 2, token: c, call: _.parent, sourceFile: e, modifierFlags: 32, parentDeclaration: T }; + const D = Nn(d.declarations, yi); + if (e.commonJsModuleIndicator) return; + if (D && !p6(s, D)) + return { kind: 2, token: c, call: _.parent, sourceFile: D, modifierFlags: 32, parentDeclaration: D }; + } + const g = Nn(d.declarations, Qn); + if (!g && wi(c)) return; + const h = g || Nn(d.declarations, (T) => Vl(T) || Xu(T)); + if (h && !p6(s, h.getSourceFile())) { + const T = !Xu(h) && (u.target || u) !== i.getDeclaredTypeOfSymbol(d); + if (T && (wi(c) || Vl(h))) return; + const C = h.getSourceFile(), D = Xu(h) ? 0 : (T ? 256 : 0) | (LU(c.text) ? 2 : 0), P = p_(C), O = Jn(_.parent, Es); + return { kind: 0, token: c, call: O, modifierFlags: D, parentDeclaration: h, declSourceFile: C, isJSFile: P }; + } + const S = Nn(d.declarations, rv); + if (S && !(u.flags & 1056) && !wi(c) && !p6(s, S.getSourceFile())) + return { kind: 1, token: c, parentDeclaration: S }; + } + function KUe(e, t) { + return t.isJSFile ? ST(eqe(e, t)) : tqe(e, t); + } + function eqe(e, { parentDeclaration: t, declSourceFile: n, modifierFlags: i, token: s }) { + if (Vl(t) || Xu(t)) + return; + const o = Yr.ChangeTracker.with(e, (_) => xCe(_, n, t, s, !!(i & 256))); + if (o.length === 0) + return; + const c = i & 256 ? p.Initialize_static_property_0 : wi(s) ? p.Declare_a_private_field_named_0 : p.Initialize_property_0_in_the_constructor; + return Ds(vv, o, [c, s.text], vv, p.Add_all_missing_members); + } + function xCe(e, t, n, i, s) { + const o = i.text; + if (s) { + if (n.kind === 231) + return; + const c = n.name.getText(), _ = kCe(N.createIdentifier(c), o); + e.insertNodeAfter(t, n, _); + } else if (wi(i)) { + const c = N.createPropertyDeclaration( + /*modifiers*/ + void 0, + o, + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), _ = DCe(n); + _ ? e.insertNodeAfter(t, _, c) : e.insertMemberAtStart(t, n, c); + } else { + const c = Ng(n); + if (!c) + return; + const _ = kCe(N.createThis(), o); + e.insertNodeAtConstructorEnd(t, c, _); + } + } + function kCe(e, t) { + return N.createExpressionStatement(N.createAssignment(N.createPropertyAccessExpression(e, t), Hx())); + } + function tqe(e, { parentDeclaration: t, declSourceFile: n, modifierFlags: i, token: s }) { + const o = s.text, c = i & 256, _ = CCe(e.program.getTypeChecker(), t, s), u = (g) => Yr.ChangeTracker.with(e, (h) => ECe(h, n, t, o, _, g)), d = [Ds(vv, u( + i & 256 + /* Static */ + ), [c ? p.Declare_static_property_0 : p.Declare_property_0, o], vv, p.Add_all_missing_members)]; + return c || wi(s) || (i & 2 && d.unshift(Nd(vv, u( + 2 + /* Private */ + ), [p.Declare_private_property_0, o])), d.push(rqe(e, n, t, s.text, _))), d; + } + function CCe(e, t, n) { + let i; + if (n.parent.parent.kind === 226) { + const s = n.parent.parent, o = n.parent === s.left ? s.right : s.left, c = e.getWidenedType(e.getBaseTypeOfLiteralType(e.getTypeAtLocation(o))); + i = e.typeToTypeNode( + c, + t, + 1 + /* NoTruncation */ + ); + } else { + const s = e.getContextualType(n.parent); + i = s ? e.typeToTypeNode( + s, + /*enclosingDeclaration*/ + void 0, + 1 + /* NoTruncation */ + ) : void 0; + } + return i || N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ); + } + function ECe(e, t, n, i, s, o) { + const c = o ? N.createNodeArray(N.createModifiersFromModifierFlags(o)) : void 0, _ = Qn(n) ? N.createPropertyDeclaration( + c, + i, + /*questionOrExclamationToken*/ + void 0, + s, + /*initializer*/ + void 0 + ) : N.createPropertySignature( + /*modifiers*/ + void 0, + i, + /*questionToken*/ + void 0, + s + ), u = DCe(n); + u ? e.insertNodeAfter(t, u, _) : e.insertMemberAtStart(t, n, _); + } + function DCe(e) { + let t; + for (const n of e.members) { + if (!rs(n)) break; + t = n; + } + return t; + } + function rqe(e, t, n, i, s) { + const o = N.createKeywordTypeNode( + 154 + /* StringKeyword */ + ), c = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "x", + /*questionToken*/ + void 0, + o, + /*initializer*/ + void 0 + ), _ = N.createIndexSignature( + /*modifiers*/ + void 0, + [c], + s + ), u = Yr.ChangeTracker.with(e, (d) => d.insertMemberAtStart(t, n, _)); + return Nd(vv, u, [p.Add_index_signature_for_property_0, i]); + } + function nqe(e, t) { + const { parentDeclaration: n, declSourceFile: i, modifierFlags: s, token: o, call: c } = t; + if (c === void 0) + return; + const _ = o.text, u = (g) => Yr.ChangeTracker.with(e, (h) => PCe(e, h, c, o, g, n, i)), d = [Ds(vv, u( + s & 256 + /* Static */ + ), [s & 256 ? p.Declare_static_method_0 : p.Declare_method_0, _], vv, p.Add_all_missing_members)]; + return s & 2 && d.unshift(Nd(vv, u( + 2 + /* Private */ + ), [p.Declare_private_method_0, _])), d; + } + function PCe(e, t, n, i, s, o, c) { + const _ = Zb(c, e.program, e.preferences, e.host), u = Qn(o) ? 174 : 173, d = Xle(u, e, _, n, i, s, o), g = aqe(o, n); + g ? t.insertNodeAfter(c, g, d) : t.insertMemberAtStart(c, o, d), _.writeFixes(t); + } + function wCe(e, t, { token: n, parentDeclaration: i }) { + const s = ut(i.members, (u) => { + const d = t.getTypeAtLocation(u); + return !!(d && d.flags & 402653316); + }), o = i.getSourceFile(), c = N.createEnumMember(n, s ? N.createStringLiteral(n.text) : void 0), _ = Bo(i.members); + _ ? e.insertNodeInListAfter(o, _, c, i.members) : e.insertMemberAtStart(o, i, c); + } + function ACe(e, t, n) { + const i = Rf(t.sourceFile, t.preferences), s = Zb(t.sourceFile, t.program, t.preferences, t.host), o = n.kind === 2 ? Xle(262, t, s, n.call, dn(n.token), n.modifierFlags, n.parentDeclaration) : eH( + 262, + t, + i, + n.signature, + X9(p.Function_not_implemented.message, i), + n.token, + /*modifiers*/ + void 0, + /*optional*/ + void 0, + /*enclosingDeclaration*/ + void 0, + s + ); + o === void 0 && E.fail("fixMissingFunctionDeclaration codefix got unexpected error."), Mp(n.parentDeclaration) ? e.insertNodeBefore( + n.sourceFile, + n.parentDeclaration, + o, + /*blankLineBetween*/ + !0 + ) : e.insertNodeAtEndOfScope(n.sourceFile, n.parentDeclaration, o), s.writeFixes(e); + } + function NCe(e, t, n) { + const i = Zb(t.sourceFile, t.program, t.preferences, t.host), s = Rf(t.sourceFile, t.preferences), o = t.program.getTypeChecker(), c = n.parentDeclaration.attributes, _ = ut(c.properties, Sx), u = or(n.attributes, (h) => { + const S = qq(t, o, i, s, o.getTypeOfSymbol(h), n.parentDeclaration), T = N.createIdentifier(h.name), C = N.createJsxAttribute(T, N.createJsxExpression( + /*dotDotDotToken*/ + void 0, + S + )); + return Da(T, C), C; + }), d = N.createJsxAttributes(_ ? [...u, ...c.properties] : [...c.properties, ...u]), g = { prefix: c.pos === c.end ? " " : void 0 }; + e.replaceNode(t.sourceFile, c, d, g), i.writeFixes(e); + } + function ICe(e, t, n) { + const i = Zb(t.sourceFile, t.program, t.preferences, t.host), s = Rf(t.sourceFile, t.preferences), o = pa(t.program.getCompilerOptions()), c = t.program.getTypeChecker(), _ = or(n.properties, (d) => { + const g = qq(t, c, i, s, c.getTypeOfSymbol(d), n.parentDeclaration); + return N.createPropertyAssignment(oqe(d, o, s, c), g); + }), u = { + leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, + trailingTriviaOption: Yr.TrailingTriviaOption.Exclude, + indentation: n.indentation + }; + e.replaceNode(t.sourceFile, n.parentDeclaration, N.createObjectLiteralExpression( + [...n.parentDeclaration.properties, ..._], + /*multiLine*/ + !0 + ), u), i.writeFixes(e); + } + function qq(e, t, n, i, s, o) { + if (s.flags & 3) + return Hx(); + if (s.flags & 134217732) + return N.createStringLiteral( + "", + /* isSingleQuote */ + i === 0 + /* Single */ + ); + if (s.flags & 8) + return N.createNumericLiteral(0); + if (s.flags & 64) + return N.createBigIntLiteral("0n"); + if (s.flags & 16) + return N.createFalse(); + if (s.flags & 1056) { + const c = s.symbol.exports ? lI(s.symbol.exports.values()) : s.symbol, _ = t.symbolToExpression( + s.symbol.parent ? s.symbol.parent : s.symbol, + 111551, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + 64 + /* UseFullyQualifiedType */ + ); + return c === void 0 || _ === void 0 ? N.createNumericLiteral(0) : N.createPropertyAccessExpression(_, t.symbolToString(c)); + } + if (s.flags & 256) + return N.createNumericLiteral(s.value); + if (s.flags & 2048) + return N.createBigIntLiteral(s.value); + if (s.flags & 128) + return N.createStringLiteral( + s.value, + /* isSingleQuote */ + i === 0 + /* Single */ + ); + if (s.flags & 512) + return s === t.getFalseType() || s === t.getFalseType( + /*fresh*/ + !0 + ) ? N.createFalse() : N.createTrue(); + if (s.flags & 65536) + return N.createNull(); + if (s.flags & 1048576) + return xc(s.types, (_) => qq(e, t, n, i, _, o)) ?? Hx(); + if (t.isArrayLikeType(s)) + return N.createArrayLiteralExpression(); + if (iqe(s)) { + const c = or(t.getPropertiesOfType(s), (_) => { + const u = qq(e, t, n, i, t.getTypeOfSymbol(_), o); + return N.createPropertyAssignment(_.name, u); + }); + return N.createObjectLiteralExpression( + c, + /*multiLine*/ + !0 + ); + } + if (wn(s) & 16) { + if (Nn(s.symbol.declarations || He, Ef(Xm, um, hc)) === void 0) return Hx(); + const _ = t.getSignaturesOfType( + s, + 0 + /* Call */ + ); + return _ === void 0 ? Hx() : eH( + 218, + e, + i, + _[0], + X9(p.Function_not_implemented.message, i), + /*name*/ + void 0, + /*modifiers*/ + void 0, + /*optional*/ + void 0, + /*enclosingDeclaration*/ + o, + n + ) ?? Hx(); + } + if (wn(s) & 1) { + const c = gh(s.symbol); + if (c === void 0 || xb(c)) return Hx(); + const _ = Ng(c); + return _ && Dr(_.parameters) ? Hx() : N.createNewExpression( + N.createIdentifier(s.symbol.name), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + } + return Hx(); + } + function Hx() { + return N.createIdentifier("undefined"); + } + function iqe(e) { + return e.flags & 524288 && (wn(e) & 128 || e.symbol && Jn(Rm(e.symbol.declarations), Xu)); + } + function sqe(e, t, n) { + const i = e.getContextualType(n.attributes); + if (i === void 0) return He; + const s = i.getProperties(); + if (!Dr(s)) return He; + const o = /* @__PURE__ */ new Set(); + for (const c of n.attributes.properties) + if (dm(c) && o.add(H4(c.name)), Sx(c)) { + const _ = e.getTypeAtLocation(c.expression); + for (const u of _.getProperties()) + o.add(u.escapedName); + } + return Ln(s, (c) => X_( + c.name, + t, + 1 + /* JSX */ + ) && !(c.flags & 16777216 || gc(c) & 48 || o.has(c.escapedName))); + } + function aqe(e, t) { + if (Xu(e)) + return; + const n = sr(t, (i) => hc(i) || ec(i)); + return n && n.parent === e ? n : void 0; + } + function oqe(e, t, n, i) { + if (qm(e)) { + const s = i.symbolToNode( + e, + 111551, + /*enclosingDeclaration*/ + void 0, + 1073741824 + /* WriteComputedProps */ + ); + if (s && oa(s)) return s; + } + return C5( + e.name, + t, + n === 0, + /*stringNamed*/ + !1, + /*isMethod*/ + !1 + ); + } + function OCe(e) { + if (sr(e, oD)) { + const t = sr(e.parent, Mp); + if (t) return t; + } + return xr(e); + } + var ble = "addMissingNewOperator", FCe = [p.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; + Us({ + errorCodes: FCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = Yr.ChangeTracker.with(e, (s) => LCe(s, t, n)); + return [Ds(ble, i, p.Add_missing_new_operator_to_call, ble, p.Add_missing_new_operator_to_all_calls)]; + }, + fixIds: [ble], + getAllCodeActions: (e) => Za(e, FCe, (t, n) => LCe(t, e.sourceFile, n)) + }); + function LCe(e, t, n) { + const i = Is(cqe(t, n), Es), s = N.createNewExpression(i.expression, i.typeArguments, i.arguments); + e.replaceNode(t, i, s); + } + function cqe(e, t) { + let n = Ei(e, t.start); + const i = wc(t); + for (; n.end < i; ) + n = n.parent; + return n; + } + var Hq = "addMissingParam", Gq = "addOptionalParam", MCe = [p.Expected_0_arguments_but_got_1.code]; + Us({ + errorCodes: MCe, + fixIds: [Hq, Gq], + getCodeActions(e) { + const t = RCe(e.sourceFile, e.program, e.span.start); + if (t === void 0) return; + const { name: n, declarations: i, newParameters: s, newOptionalParameters: o } = t, c = []; + return Dr(s) && Tr( + c, + Ds( + Hq, + Yr.ChangeTracker.with(e, (_) => $q(_, e.program, e.preferences, e.host, i, s)), + [Dr(s) > 1 ? p.Add_missing_parameters_to_0 : p.Add_missing_parameter_to_0, n], + Hq, + p.Add_all_missing_parameters + ) + ), Dr(o) && Tr( + c, + Ds( + Gq, + Yr.ChangeTracker.with(e, (_) => $q(_, e.program, e.preferences, e.host, i, o)), + [Dr(o) > 1 ? p.Add_optional_parameters_to_0 : p.Add_optional_parameter_to_0, n], + Gq, + p.Add_all_optional_parameters + ) + ), c; + }, + getAllCodeActions: (e) => Za(e, MCe, (t, n) => { + const i = RCe(e.sourceFile, e.program, n.start); + if (i) { + const { declarations: s, newParameters: o, newOptionalParameters: c } = i; + e.fixId === Hq && $q(t, e.program, e.preferences, e.host, s, o), e.fixId === Gq && $q(t, e.program, e.preferences, e.host, s, c); + } + }) + }); + function RCe(e, t, n) { + const i = Ei(e, n), s = sr(i, Es); + if (s === void 0 || Dr(s.arguments) === 0) + return; + const o = t.getTypeChecker(), c = o.getTypeAtLocation(s.expression), _ = Ln(c.symbol.declarations, jCe); + if (_ === void 0) + return; + const u = Bo(_); + if (u === void 0 || u.body === void 0 || p6(t, u.getSourceFile())) + return; + const d = lqe(u); + if (d === void 0) + return; + const g = [], h = [], S = Dr(u.parameters), T = Dr(s.arguments); + if (S > T) + return; + const C = [u, ..._qe(u, _)]; + for (let D = 0, P = 0, O = 0; D < T; D++) { + const j = s.arguments[D], F = go(j) ? UB(j) : j, V = o.getWidenedType(o.getBaseTypeOfLiteralType(o.getTypeAtLocation(j))), L = P < S ? u.parameters[P] : void 0; + if (L && o.isTypeAssignableTo(V, o.getTypeAtLocation(L))) { + P++; + continue; + } + const $ = F && Re(F) ? F.text : `p${O++}`, U = uqe(o, V, u); + Tr(g, { + pos: D, + declaration: JCe( + $, + U, + /*questionToken*/ + void 0 + ) + }), !pqe(C, P) && Tr(h, { + pos: D, + declaration: JCe($, U, N.createToken( + 58 + /* QuestionToken */ + )) + }); + } + return { + newParameters: g, + newOptionalParameters: h, + name: ao(d), + declarations: C + }; + } + function lqe(e) { + const t = es(e); + if (t) + return t; + if (ti(e.parent) && Re(e.parent.name) || rs(e.parent) || ji(e.parent)) + return e.parent.name; + } + function uqe(e, t, n) { + return e.typeToTypeNode( + e.getWidenedType(t), + n, + 1 + /* NoTruncation */ + ) ?? N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ); + } + function $q(e, t, n, i, s, o) { + const c = pa(t.getCompilerOptions()); + rr(s, (_) => { + const u = xr(_), d = Zb(u, t, n, i); + Dr(_.parameters) ? e.replaceNodeRangeWithNodes( + u, + fa(_.parameters), + ia(_.parameters), + BCe(d, c, _, o), + { + joiner: ", ", + indentation: 0, + leadingTriviaOption: Yr.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: Yr.TrailingTriviaOption.Include + } + ) : rr(BCe(d, c, _, o), (g, h) => { + Dr(_.parameters) === 0 && h === 0 ? e.insertNodeAt(u, _.parameters.end, g) : e.insertNodeAtEndOfList(u, _.parameters, g); + }), d.writeFixes(e); + }); + } + function jCe(e) { + switch (e.kind) { + case 262: + case 218: + case 174: + case 219: + return !0; + default: + return !1; + } + } + function BCe(e, t, n, i) { + const s = or(n.parameters, (o) => N.createParameterDeclaration( + o.modifiers, + o.dotDotDotToken, + o.name, + o.questionToken, + o.type, + o.initializer + )); + for (const { pos: o, declaration: c } of i) { + const _ = o > 0 ? s[o - 1] : void 0; + s.splice( + o, + 0, + N.updateParameterDeclaration( + c, + c.modifiers, + c.dotDotDotToken, + c.name, + _ && _.questionToken ? N.createToken( + 58 + /* QuestionToken */ + ) : c.questionToken, + dqe(e, c.type, t), + c.initializer + ) + ); + } + return s; + } + function _qe(e, t) { + const n = []; + for (const i of t) + if (fqe(i)) { + if (Dr(i.parameters) === Dr(e.parameters)) { + n.push(i); + continue; + } + if (Dr(i.parameters) > Dr(e.parameters)) + return []; + } + return n; + } + function fqe(e) { + return jCe(e) && e.body === void 0; + } + function JCe(e, t, n) { + return N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + e, + n, + t, + /*initializer*/ + void 0 + ); + } + function pqe(e, t) { + return Dr(e) && ut(e, (n) => t < Dr(n.parameters) && !!n.parameters[t] && n.parameters[t].questionToken === void 0); + } + function dqe(e, t, n) { + const i = SS(t, n); + return i ? (Gx(e, i.symbols), i.typeNode) : t; + } + var mqe = "fixCannotFindModule", Sle = "installTypesPackage", zCe = p.Cannot_find_module_0_or_its_corresponding_type_declarations.code, WCe = [ + zCe, + p.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code + ]; + Us({ + errorCodes: WCe, + getCodeActions: function(t) { + const { host: n, sourceFile: i, span: { start: s } } = t, o = UCe(i, s); + if (o === void 0) return; + const c = qCe(o, n, t.errorCode); + return c === void 0 ? [] : [Ds( + mqe, + /*changes*/ + [], + [p.Install_0, c], + Sle, + p.Install_all_missing_types_packages, + VCe(i.fileName, c) + )]; + }, + fixIds: [Sle], + getAllCodeActions: (e) => Za(e, WCe, (t, n, i) => { + const s = UCe(n.file, n.start); + if (s !== void 0) + switch (e.fixId) { + case Sle: { + const o = qCe(s, e.host, n.code); + o && i.push(VCe(n.file.fileName, o)); + break; + } + default: + E.fail(`Bad fixId: ${e.fixId}`); + } + }) + }); + function VCe(e, t) { + return { type: "install package", file: e, packageName: t }; + } + function UCe(e, t) { + const n = Jn(Ei(e, t), Ks); + if (!n) return; + const i = n.text, { packageName: s } = FO(i); + return Sl(s) ? void 0 : s; + } + function qCe(e, t, n) { + var i; + return n === zCe ? hm.nodeCoreModules.has(e) ? "@types/node" : void 0 : (i = t.isKnownTypesPackageName) != null && i.call(t, e) ? MO(e) : void 0; + } + var HCe = [ + p.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code, + p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code, + p.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code, + p.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code, + p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code, + p.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code + ], Tle = "fixClassDoesntImplementInheritedAbstractMember"; + Us({ + errorCodes: HCe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = Yr.ChangeTracker.with(t, (o) => $Ce(GCe(n, i.start), n, t, o, t.preferences)); + return s.length === 0 ? void 0 : [Ds(Tle, s, p.Implement_inherited_abstract_class, Tle, p.Implement_all_inherited_abstract_classes)]; + }, + fixIds: [Tle], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Map(); + return Za(t, HCe, (i, s) => { + const o = GCe(s.file, s.start); + Kp(n, ja(o)) && $Ce(o, t.sourceFile, t, i, t.preferences); + }); + } + }); + function GCe(e, t) { + const n = Ei(e, t); + return Is(n.parent, Qn); + } + function $Ce(e, t, n, i, s) { + const o = tm(e), c = n.program.getTypeChecker(), _ = c.getTypeAtLocation(o), u = c.getPropertiesOfType(_).filter(gqe), d = Zb(t, n.program, s, n.host); + $le(e, u, t, n, s, d, (g) => i.insertMemberAtStart(t, e, g)), d.writeFixes(i); + } + function gqe(e) { + const t = f0(fa(e.getDeclarations())); + return !(t & 2) && !!(t & 64); + } + var xle = "classSuperMustPrecedeThisAccess", XCe = [p.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code]; + Us({ + errorCodes: XCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = YCe(t, n.start); + if (!i) return; + const { constructor: s, superCall: o } = i, c = Yr.ChangeTracker.with(e, (_) => QCe(_, t, s, o)); + return [Ds(xle, c, p.Make_super_call_the_first_statement_in_the_constructor, xle, p.Make_all_super_calls_the_first_statement_in_their_constructor)]; + }, + fixIds: [xle], + getAllCodeActions(e) { + const { sourceFile: t } = e, n = /* @__PURE__ */ new Map(); + return Za(e, XCe, (i, s) => { + const o = YCe(s.file, s.start); + if (!o) return; + const { constructor: c, superCall: _ } = o; + Kp(n, ja(c.parent)) && QCe(i, t, c, _); + }); + } + }); + function QCe(e, t, n, i) { + e.insertNodeAtConstructorStart(t, n, i), e.delete(t, i); + } + function YCe(e, t) { + const n = Ei(e, t); + if (n.kind !== 110) return; + const i = yf(n), s = ZCe(i.body); + return s && !s.expression.arguments.some((o) => Dn(o) && o.expression === n) ? { constructor: i, superCall: s } : void 0; + } + function ZCe(e) { + return Pl(e) && G2(e.expression) ? e : ps(e) ? void 0 : gs(e, ZCe); + } + var kle = "constructorForDerivedNeedSuperCall", KCe = [p.Constructors_for_derived_classes_must_contain_a_super_call.code]; + Us({ + errorCodes: KCe, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = e6e(t, n.start), s = Yr.ChangeTracker.with(e, (o) => t6e(o, t, i)); + return [Ds(kle, s, p.Add_missing_super_call, kle, p.Add_all_missing_super_calls)]; + }, + fixIds: [kle], + getAllCodeActions: (e) => Za(e, KCe, (t, n) => t6e(t, e.sourceFile, e6e(n.file, n.start))) + }); + function e6e(e, t) { + const n = Ei(e, t); + return E.assert(ec(n.parent), "token should be at the constructor declaration"), n.parent; + } + function t6e(e, t, n) { + const i = N.createExpressionStatement(N.createCallExpression( + N.createSuper(), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + He + )); + e.insertNodeAtConstructorStart(t, n, i); + } + var r6e = "fixEnableJsxFlag", n6e = [p.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; + Us({ + errorCodes: n6e, + getCodeActions: function(t) { + const { configFile: n } = t.program.getCompilerOptions(); + if (n === void 0) + return; + const i = Yr.ChangeTracker.with(t, (s) => i6e(s, n)); + return [ + Nd(r6e, i, p.Enable_the_jsx_flag_in_your_configuration_file) + ]; + }, + fixIds: [r6e], + getAllCodeActions: (e) => Za(e, n6e, (t) => { + const { configFile: n } = e.program.getCompilerOptions(); + n !== void 0 && i6e(t, n); + }) + }); + function i6e(e, t) { + Kle(e, t, "jsx", N.createStringLiteral("react")); + } + var Cle = "fixNaNEquality", s6e = [ + p.This_condition_will_always_return_0.code + ]; + Us({ + errorCodes: s6e, + getCodeActions(e) { + const { sourceFile: t, span: n, program: i } = e, s = a6e(i, t, n); + if (s === void 0) return; + const { suggestion: o, expression: c, arg: _ } = s, u = Yr.ChangeTracker.with(e, (d) => o6e(d, t, _, c)); + return [Ds(Cle, u, [p.Use_0, o], Cle, p.Use_Number_isNaN_in_all_conditions)]; + }, + fixIds: [Cle], + getAllCodeActions: (e) => Za(e, s6e, (t, n) => { + const i = a6e(e.program, n.file, jl(n.start, n.length)); + i && o6e(t, n.file, i.arg, i.expression); + }) + }); + function a6e(e, t, n) { + const i = Nn(e.getSemanticDiagnostics(t), (c) => c.start === n.start && c.length === n.length); + if (i === void 0 || i.relatedInformation === void 0) return; + const s = Nn(i.relatedInformation, (c) => c.code === p.Did_you_mean_0.code); + if (s === void 0 || s.file === void 0 || s.start === void 0 || s.length === void 0) return; + const o = tue(s.file, jl(s.start, s.length)); + if (o !== void 0 && ct(o) && cn(o.parent)) + return { suggestion: hqe(s.messageText), expression: o.parent, arg: o }; + } + function o6e(e, t, n, i) { + const s = N.createCallExpression( + N.createPropertyAccessExpression(N.createIdentifier("Number"), N.createIdentifier("isNaN")), + /*typeArguments*/ + void 0, + [n] + ), o = i.operatorToken.kind; + e.replaceNode( + t, + i, + o === 38 || o === 36 ? N.createPrefixUnaryExpression(54, s) : s + ); + } + function hqe(e) { + const [, t] = gm(e, ` +`, 0).match(/'(.*)'/) || []; + return t; + } + Us({ + errorCodes: [ + p.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + p.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code, + p.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_nodenext_or_preserve_and_the_target_option_is_set_to_es2017_or_higher.code + ], + getCodeActions: function(t) { + const n = t.program.getCompilerOptions(), { configFile: i } = n; + if (i === void 0) + return; + const s = [], o = Nu(n); + if (o >= 5 && o < 99) { + const d = Yr.ChangeTracker.with(t, (g) => { + Kle(g, i, "module", N.createStringLiteral("esnext")); + }); + s.push(Nd("fixModuleOption", d, [p.Set_the_module_option_in_your_configuration_file_to_0, "esnext"])); + } + const _ = pa(n); + if (_ < 4 || _ > 99) { + const d = Yr.ChangeTracker.with(t, (g) => { + if (!s4(i)) return; + const S = [["target", N.createStringLiteral("es2017")]]; + o === 1 && S.push(["module", N.createStringLiteral("commonjs")]), Zle(g, i, S); + }); + s.push(Nd("fixTargetOption", d, [p.Set_the_target_option_in_your_configuration_file_to_0, "es2017"])); + } + return s.length ? s : void 0; + } + }); + var Ele = "fixPropertyAssignment", c6e = [ + p.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern.code + ]; + Us({ + errorCodes: c6e, + fixIds: [Ele], + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = u6e(t, n.start), s = Yr.ChangeTracker.with(e, (o) => l6e(o, e.sourceFile, i)); + return [Ds(Ele, s, [p.Change_0_to_1, "=", ":"], Ele, [p.Switch_each_misused_0_to_1, "=", ":"])]; + }, + getAllCodeActions: (e) => Za(e, c6e, (t, n) => l6e(t, n.file, u6e(n.file, n.start))) + }); + function l6e(e, t, n) { + e.replaceNode(t, n, N.createPropertyAssignment(n.name, n.objectAssignmentInitializer)); + } + function u6e(e, t) { + return Is(Ei(e, t).parent, du); + } + var Dle = "extendsInterfaceBecomesImplements", _6e = [p.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; + Us({ + errorCodes: _6e, + getCodeActions(e) { + const { sourceFile: t } = e, n = f6e(t, e.span.start); + if (!n) return; + const { extendsToken: i, heritageClauses: s } = n, o = Yr.ChangeTracker.with(e, (c) => p6e(c, t, i, s)); + return [Ds(Dle, o, p.Change_extends_to_implements, Dle, p.Change_all_extended_interfaces_to_implements)]; + }, + fixIds: [Dle], + getAllCodeActions: (e) => Za(e, _6e, (t, n) => { + const i = f6e(n.file, n.start); + i && p6e(t, n.file, i.extendsToken, i.heritageClauses); + }) + }); + function f6e(e, t) { + const n = Ei(e, t), i = Nl(n).heritageClauses, s = i[0].getFirstToken(); + return s.kind === 96 ? { extendsToken: s, heritageClauses: i } : void 0; + } + function p6e(e, t, n, i) { + if (e.replaceNode(t, n, N.createToken( + 119 + /* ImplementsKeyword */ + )), i.length === 2 && i[0].token === 96 && i[1].token === 119) { + const s = i[1].getFirstToken(), o = s.getFullStart(); + e.replaceRange(t, { pos: o, end: o }, N.createToken( + 28 + /* CommaToken */ + )); + const c = t.text; + let _ = s.end; + for (; _ < c.length && Xd(c.charCodeAt(_)); ) + _++; + e.deleteRange(t, { pos: s.getStart(), end: _ }); + } + } + var Ple = "forgottenThisPropertyAccess", d6e = p.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, m6e = [ + p.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, + p.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, + d6e + ]; + Us({ + errorCodes: m6e, + getCodeActions(e) { + const { sourceFile: t } = e, n = g6e(t, e.span.start, e.errorCode); + if (!n) + return; + const i = Yr.ChangeTracker.with(e, (s) => h6e(s, t, n)); + return [Ds(Ple, i, [p.Add_0_to_unresolved_variable, n.className || "this"], Ple, p.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]; + }, + fixIds: [Ple], + getAllCodeActions: (e) => Za(e, m6e, (t, n) => { + const i = g6e(n.file, n.start, n.code); + i && h6e(t, e.sourceFile, i); + }) + }); + function g6e(e, t, n) { + const i = Ei(e, t); + if (Re(i) || wi(i)) + return { node: i, className: n === d6e ? Nl(i).name.text : void 0 }; + } + function h6e(e, t, { node: n, className: i }) { + of(n), e.replaceNode(t, n, N.createPropertyAccessExpression(i ? N.createIdentifier(i) : N.createThis(), n)); + } + var wle = "fixInvalidJsxCharacters_expression", Xq = "fixInvalidJsxCharacters_htmlEntity", y6e = [ + p.Unexpected_token_Did_you_mean_or_gt.code, + p.Unexpected_token_Did_you_mean_or_rbrace.code + ]; + Us({ + errorCodes: y6e, + fixIds: [wle, Xq], + getCodeActions(e) { + const { sourceFile: t, preferences: n, span: i } = e, s = Yr.ChangeTracker.with(e, (c) => Ale( + c, + n, + t, + i.start, + /*useHtmlEntity*/ + !1 + )), o = Yr.ChangeTracker.with(e, (c) => Ale( + c, + n, + t, + i.start, + /*useHtmlEntity*/ + !0 + )); + return [ + Ds(wle, s, p.Wrap_invalid_character_in_an_expression_container, wle, p.Wrap_all_invalid_characters_in_an_expression_container), + Ds(Xq, o, p.Convert_invalid_character_to_its_html_entity_code, Xq, p.Convert_all_invalid_characters_to_HTML_entity_code) + ]; + }, + getAllCodeActions(e) { + return Za(e, y6e, (t, n) => Ale(t, e.preferences, n.file, n.start, e.fixId === Xq)); + } + }); + var v6e = { + ">": ">", + "}": "}" + }; + function yqe(e) { + return io(v6e, e); + } + function Ale(e, t, n, i, s) { + const o = n.getText()[i]; + if (!yqe(o)) + return; + const c = s ? v6e[o] : `{${YD(n, t, o)}}`; + e.replaceRangeWithText(n, { pos: i, end: i + 1 }, c); + } + var Qq = "deleteUnmatchedParameter", b6e = "renameUnmatchedParameter", S6e = [ + p.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code + ]; + Us({ + fixIds: [Qq, b6e], + errorCodes: S6e, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = [], o = T6e(n, i.start); + if (o) + return Tr(s, vqe(t, o)), Tr(s, bqe(t, o)), s; + }, + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Map(); + return Vx(Yr.ChangeTracker.with(t, (i) => { + Ux(t, S6e, ({ file: s, start: o }) => { + const c = T6e(s, o); + c && n.set(c.signature, Tr(n.get(c.signature), c.jsDocParameterTag)); + }), n.forEach((s, o) => { + if (t.fixId === Qq) { + const c = new Set(s); + i.filterJSDocTags(o.getSourceFile(), o, (_) => !c.has(_)); + } + }); + })); + } + }); + function vqe(e, { name: t, jsDocHost: n, jsDocParameterTag: i }) { + const s = Yr.ChangeTracker.with(e, (o) => o.filterJSDocTags(e.sourceFile, n, (c) => c !== i)); + return Ds( + Qq, + s, + [p.Delete_unused_param_tag_0, t.getText(e.sourceFile)], + Qq, + p.Delete_all_unused_param_tags + ); + } + function bqe(e, { name: t, jsDocHost: n, signature: i, jsDocParameterTag: s }) { + if (!Dr(i.parameters)) return; + const o = e.sourceFile, c = j1(i), _ = /* @__PURE__ */ new Set(); + for (const h of c) + up(h) && Re(h.name) && _.add(h.name.escapedText); + const u = xc(i.parameters, (h) => Re(h.name) && !_.has(h.name.escapedText) ? h.name.getText(o) : void 0); + if (u === void 0) return; + const d = N.updateJSDocParameterTag( + s, + s.tagName, + N.createIdentifier(u), + s.isBracketed, + s.typeExpression, + s.isNameFirst, + s.comment + ), g = Yr.ChangeTracker.with(e, (h) => h.replaceJSDocComment(o, n, or(c, (S) => S === s ? d : S))); + return Nd(b6e, g, [p.Rename_param_tag_name_0_to_1, t.getText(o), u]); + } + function T6e(e, t) { + const n = Ei(e, t); + if (n.parent && up(n.parent) && Re(n.parent.name)) { + const i = n.parent, s = hb(i), o = q1(i); + if (s && o) + return { jsDocHost: s, signature: o, name: n.parent.name, jsDocParameterTag: i }; + } + } + var Nle = "fixUnreferenceableDecoratorMetadata", Sqe = [p.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code]; + Us({ + errorCodes: Sqe, + getCodeActions: (e) => { + const t = Tqe(e.sourceFile, e.program, e.span.start); + if (!t) return; + const n = Yr.ChangeTracker.with(e, (o) => t.kind === 276 && kqe(o, e.sourceFile, t, e.program)), i = Yr.ChangeTracker.with(e, (o) => xqe(o, e.sourceFile, t, e.program)); + let s; + return n.length && (s = Tr(s, Nd(Nle, n, p.Convert_named_imports_to_namespace_import))), i.length && (s = Tr(s, Nd(Nle, i, p.Use_import_type))), s; + }, + fixIds: [Nle] + }); + function Tqe(e, t, n) { + const i = Jn(Ei(e, n), Re); + if (!i || i.parent.kind !== 183) return; + const o = t.getTypeChecker().getSymbolAtLocation(i); + return Nn(o?.declarations || He, Ef(kd, Yu, nl)); + } + function xqe(e, t, n, i) { + if (n.kind === 271) { + e.insertModifierBefore(t, 156, n.name); + return; + } + const s = n.kind === 273 ? n : n.parent.parent; + if (s.name && s.namedBindings) + return; + const o = i.getTypeChecker(); + XZ(s, (_) => { + if (Jl(_.symbol, o).flags & 111551) return !0; + }) || e.insertModifierBefore(t, 156, s); + } + function kqe(e, t, n, i) { + zx.doChangeNamedToNamespaceOrDefault(t, i, e, n.parent); + } + var G9 = "unusedIdentifier", Ile = "unusedIdentifier_prefix", Ole = "unusedIdentifier_delete", Yq = "unusedIdentifier_deleteImports", Fle = "unusedIdentifier_infer", x6e = [ + p._0_is_declared_but_its_value_is_never_read.code, + p._0_is_declared_but_never_used.code, + p.Property_0_is_declared_but_its_value_is_never_read.code, + p.All_imports_in_import_declaration_are_unused.code, + p.All_destructured_elements_are_unused.code, + p.All_variables_are_unused.code, + p.All_type_parameters_are_unused.code + ]; + Us({ + errorCodes: x6e, + getCodeActions(e) { + const { errorCode: t, sourceFile: n, program: i, cancellationToken: s } = e, o = i.getTypeChecker(), c = i.getSourceFiles(), _ = Ei(n, e.span.start); + if (jp(_)) + return [oP(Yr.ChangeTracker.with(e, (h) => h.delete(n, _)), p.Remove_template_tag)]; + if (_.kind === 30) { + const h = Yr.ChangeTracker.with(e, (S) => C6e(S, n, _)); + return [oP(h, p.Remove_type_parameters)]; + } + const u = E6e(_); + if (u) { + const h = Yr.ChangeTracker.with(e, (S) => S.delete(n, u)); + return [Ds(G9, h, [p.Remove_import_from_0, BK(u)], Yq, p.Delete_all_unused_imports)]; + } else if (Lle(_)) { + const h = Yr.ChangeTracker.with(e, (S) => Zq( + n, + _, + S, + o, + c, + i, + s, + /*isFixAll*/ + !1 + )); + if (h.length) + return [Ds(G9, h, [p.Remove_unused_declaration_for_Colon_0, _.getText(n)], Yq, p.Delete_all_unused_imports)]; + } + if (If(_.parent) || v0(_.parent)) { + if (ji(_.parent.parent)) { + const h = _.parent.elements, S = [ + h.length > 1 ? p.Remove_unused_declarations_for_Colon_0 : p.Remove_unused_declaration_for_Colon_0, + or(h, (T) => T.getText(n)).join(", ") + ]; + return [ + oP(Yr.ChangeTracker.with(e, (T) => Cqe(T, n, _.parent)), S) + ]; + } + return [ + oP(Yr.ChangeTracker.with(e, (h) => Eqe(e, h, n, _.parent)), p.Remove_unused_destructuring_declaration) + ]; + } + if (D6e(n, _)) + return [ + oP(Yr.ChangeTracker.with(e, (h) => P6e(h, n, _.parent)), p.Remove_variable_statement) + ]; + if (Re(_) && Ac(_.parent)) + return [oP(Yr.ChangeTracker.with(e, (h) => Oqe(h, n, _.parent)), [p.Remove_unused_declaration_for_Colon_0, _.getText(n)])]; + const d = []; + if (_.kind === 140) { + const h = Yr.ChangeTracker.with(e, (T) => k6e(T, n, _)), S = Is(_.parent, rS).typeParameter.name.text; + d.push(Ds(G9, h, [p.Replace_infer_0_with_unknown, S], Fle, p.Replace_all_unused_infer_with_unknown)); + } else { + const h = Yr.ChangeTracker.with(e, (S) => Zq( + n, + _, + S, + o, + c, + i, + s, + /*isFixAll*/ + !1 + )); + if (h.length) { + const S = oa(_.parent) ? _.parent : _; + d.push(oP(h, [p.Remove_unused_declaration_for_Colon_0, S.getText(n)])); + } + } + const g = Yr.ChangeTracker.with(e, (h) => w6e(h, t, n, _)); + return g.length && d.push(Ds(G9, g, [p.Prefix_0_with_an_underscore, _.getText(n)], Ile, p.Prefix_all_unused_declarations_with_where_possible)), d; + }, + fixIds: [Ile, Ole, Yq, Fle], + getAllCodeActions: (e) => { + const { sourceFile: t, program: n, cancellationToken: i } = e, s = n.getTypeChecker(), o = n.getSourceFiles(); + return Za(e, x6e, (c, _) => { + const u = Ei(t, _.start); + switch (e.fixId) { + case Ile: + w6e(c, _.code, t, u); + break; + case Yq: { + const d = E6e(u); + d ? c.delete(t, d) : Lle(u) && Zq( + t, + u, + c, + s, + o, + n, + i, + /*isFixAll*/ + !0 + ); + break; + } + case Ole: { + if (u.kind === 140 || Lle(u)) + break; + if (jp(u)) + c.delete(t, u); + else if (u.kind === 30) + C6e(c, t, u); + else if (If(u.parent)) { + if (u.parent.parent.initializer) + break; + (!ji(u.parent.parent) || A6e(u.parent.parent, s, o)) && c.delete(t, u.parent.parent); + } else { + if (v0(u.parent.parent) && u.parent.parent.parent.initializer) + break; + D6e(t, u) ? P6e(c, t, u.parent) : Zq( + t, + u, + c, + s, + o, + n, + i, + /*isFixAll*/ + !0 + ); + } + break; + } + case Fle: + u.kind === 140 && k6e(c, t, u); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }); + } + }); + function k6e(e, t, n) { + e.replaceNode(t, n.parent, N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )); + } + function oP(e, t) { + return Ds(G9, e, t, Ole, p.Delete_all_unused_declarations); + } + function C6e(e, t, n) { + e.delete(t, E.checkDefined(Is(n.parent, qj).typeParameters, "The type parameter to delete should exist")); + } + function Lle(e) { + return e.kind === 102 || e.kind === 80 && (e.parent.kind === 276 || e.parent.kind === 273); + } + function E6e(e) { + return e.kind === 102 ? Jn(e.parent, oc) : void 0; + } + function D6e(e, t) { + return Il(t.parent) && fa(t.parent.getChildren(e)) === t; + } + function P6e(e, t, n) { + e.delete(t, n.parent.kind === 243 ? n.parent : n); + } + function Cqe(e, t, n) { + rr(n.elements, (i) => e.delete(t, i)); + } + function Eqe(e, t, n, { parent: i }) { + if (ti(i) && i.initializer && lb(i.initializer)) + if (Il(i.parent) && Dr(i.parent.declarations) > 1) { + const s = i.parent.parent, o = s.getStart(n), c = s.end; + t.delete(n, i), t.insertNodeAt(n, c, i.initializer, { + prefix: k0(e.host, e.formatContext.options) + n.text.slice(i9(n.text, o - 1), o), + suffix: gN(n) ? ";" : "" + }); + } else + t.replaceNode(n, i.parent, i.initializer); + else + t.delete(n, i); + } + function w6e(e, t, n, i) { + t !== p.Property_0_is_declared_but_its_value_is_never_read.code && (i.kind === 140 && (i = Is(i.parent, rS).typeParameter.name), Re(i) && Dqe(i) && (e.replaceNode(n, i, N.createIdentifier(`_${i.text}`)), ji(i.parent) && Gk(i.parent).forEach((s) => { + Re(s.name) && e.replaceNode(n, s.name, N.createIdentifier(`_${s.name.text}`)); + }))); + } + function Dqe(e) { + switch (e.parent.kind) { + case 169: + case 168: + return !0; + case 260: + switch (e.parent.parent.parent.kind) { + case 250: + case 249: + return !0; + } + } + return !1; + } + function Zq(e, t, n, i, s, o, c, _) { + Pqe(t, n, e, i, s, o, c, _), Re(t) && yo.Core.eachSymbolReferenceInFile(t, i, e, (u) => { + Dn(u.parent) && u.parent.name === u && (u = u.parent), !_ && Iqe(u) && n.delete(e, u.parent.parent); + }); + } + function Pqe(e, t, n, i, s, o, c, _) { + const { parent: u } = e; + if (ji(u)) + wqe(t, n, u, i, s, o, c, _); + else if (!(_ && Re(e) && yo.Core.isSymbolReferencedInFile(e, i, n))) { + const d = kd(u) ? e : oa(u) ? u.parent : u; + E.assert(d !== n, "should not delete whole source file"), t.delete(n, d); + } + } + function wqe(e, t, n, i, s, o, c, _ = !1) { + if (Aqe(i, t, n, s, o, c, _)) + if (n.modifiers && n.modifiers.length > 0 && (!Re(n.name) || yo.Core.isSymbolReferencedInFile(n.name, i, t))) + for (const u of n.modifiers) + Qs(u) && e.deleteModifier(t, u); + else !n.initializer && A6e(n, i, s) && e.delete(t, n); + } + function A6e(e, t, n) { + const i = e.parent.parameters.indexOf(e); + return !yo.Core.someSignatureUsage(e.parent, n, t, (s, o) => !o || o.arguments.length > i); + } + function Aqe(e, t, n, i, s, o, c) { + const { parent: _ } = n; + switch (_.kind) { + case 174: + case 176: + const u = _.parameters.indexOf(n), d = hc(_) ? _.name : _, g = yo.Core.getReferencedSymbolsForNode(_.pos, d, s, i, o); + if (g) { + for (const h of g) + for (const S of h.references) + if (S.kind === yo.EntryKind.Node) { + const T = K4(S.node) && Es(S.node.parent) && S.node.parent.arguments.length > u, C = Dn(S.node.parent) && K4(S.node.parent.expression) && Es(S.node.parent.parent) && S.node.parent.parent.arguments.length > u, D = (hc(S.node.parent) || um(S.node.parent)) && S.node.parent !== n.parent && S.node.parent.parameters.length > u; + if (T || C || D) return !1; + } + } + return !0; + case 262: + return _.name && Nqe(e, t, _.name) ? N6e(_, n, c) : !0; + case 218: + case 219: + return N6e(_, n, c); + case 178: + return !1; + case 177: + return !0; + default: + return E.failBadSyntaxKind(_); + } + } + function Nqe(e, t, n) { + return !!yo.Core.eachSymbolReferenceInFile(n, e, t, (i) => Re(i) && Es(i.parent) && i.parent.arguments.includes(i)); + } + function N6e(e, t, n) { + const i = e.parameters, s = i.indexOf(t); + return E.assert(s !== -1, "The parameter should already be in the list"), n ? i.slice(s + 1).every((o) => Re(o.name) && !o.symbol.isReferenced) : s === i.length - 1; + } + function Iqe(e) { + return (cn(e.parent) && e.parent.left === e || (OJ(e.parent) || Ey(e.parent)) && e.parent.operand === e) && Pl(e.parent.parent); + } + function Oqe(e, t, n) { + const i = n.symbol.declarations; + if (i) + for (const s of i) + e.delete(t, s); + } + var Mle = "fixUnreachableCode", I6e = [p.Unreachable_code_detected.code]; + Us({ + errorCodes: I6e, + getCodeActions(e) { + if (e.program.getSyntacticDiagnostics(e.sourceFile, e.cancellationToken).length) return; + const n = Yr.ChangeTracker.with(e, (i) => O6e(i, e.sourceFile, e.span.start, e.span.length, e.errorCode)); + return [Ds(Mle, n, p.Remove_unreachable_code, Mle, p.Remove_all_unreachable_code)]; + }, + fixIds: [Mle], + getAllCodeActions: (e) => Za(e, I6e, (t, n) => O6e(t, n.file, n.start, n.length, n.code)) + }); + function O6e(e, t, n, i, s) { + const o = Ei(t, n), c = sr(o, hi); + if (c.getStart(t) !== o.getStart(t)) { + const u = JSON.stringify({ + statementKind: E.formatSyntaxKind(c.kind), + tokenKind: E.formatSyntaxKind(o.kind), + errorCode: s, + start: n, + length: i + }); + E.fail("Token and statement should start at the same point. " + u); + } + const _ = (ms(c.parent) ? c.parent : c).parent; + if (!ms(c.parent) || c === fa(c.parent.statements)) + switch (_.kind) { + case 245: + if (_.elseStatement) { + if (ms(c.parent)) + break; + e.replaceNode(t, c, N.createBlock(He)); + return; + } + case 247: + case 248: + e.delete(t, _); + return; + } + if (ms(c.parent)) { + const u = n + i, d = E.checkDefined(Fqe(aJ(c.parent.statements, c), (g) => g.pos < u), "Some statement should be last"); + e.deleteNodeRange(t, c, d); + } else + e.delete(t, c); + } + function Fqe(e, t) { + let n; + for (const i of e) { + if (!t(i)) break; + n = i; + } + return n; + } + var Rle = "fixUnusedLabel", F6e = [p.Unused_label.code]; + Us({ + errorCodes: F6e, + getCodeActions(e) { + const t = Yr.ChangeTracker.with(e, (n) => L6e(n, e.sourceFile, e.span.start)); + return [Ds(Rle, t, p.Remove_unused_label, Rle, p.Remove_all_unused_labels)]; + }, + fixIds: [Rle], + getAllCodeActions: (e) => Za(e, F6e, (t, n) => L6e(t, n.file, n.start)) + }); + function L6e(e, t, n) { + const i = Ei(t, n), s = Is(i.parent, Dy), o = i.getStart(t), c = s.statement.getStart(t), _ = ip(o, c, t) ? c : sa( + t.text, + Ya(s, 59, t).end, + /*stopAfterLineBreak*/ + !0 + ); + e.deleteRange(t, { pos: o, end: _ }); + } + var M6e = "fixJSDocTypes_plain", jle = "fixJSDocTypes_nullable", R6e = [ + p.JSDoc_types_can_only_be_used_inside_documentation_comments.code, + p._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code, + p._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code + ]; + Us({ + errorCodes: R6e, + getCodeActions(e) { + const { sourceFile: t } = e, n = e.program.getTypeChecker(), i = B6e(t, e.span.start, n); + if (!i) return; + const { typeNode: s, type: o } = i, c = s.getText(t), _ = [u(o, M6e, p.Change_all_jsdoc_style_types_to_TypeScript)]; + return s.kind === 314 && _.push(u(o, jle, p.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)), _; + function u(d, g, h) { + const S = Yr.ChangeTracker.with(e, (T) => j6e(T, t, s, d, n)); + return Ds("jdocTypes", S, [p.Change_0_to_1, c, n.typeToString(d)], g, h); + } + }, + fixIds: [M6e, jle], + getAllCodeActions(e) { + const { fixId: t, program: n, sourceFile: i } = e, s = n.getTypeChecker(); + return Za(e, R6e, (o, c) => { + const _ = B6e(c.file, c.start, s); + if (!_) return; + const { typeNode: u, type: d } = _, g = u.kind === 314 && t === jle ? s.getNullableType( + d, + 32768 + /* Undefined */ + ) : d; + j6e(o, i, u, g, s); + }); + } + }); + function j6e(e, t, n, i, s) { + e.replaceNode(t, n, s.typeToTypeNode( + i, + /*enclosingDeclaration*/ + n, + /*flags*/ + void 0 + )); + } + function B6e(e, t, n) { + const i = sr(Ei(e, t), Lqe), s = i && i.type; + return s && { typeNode: s, type: Mqe(n, s) }; + } + function Lqe(e) { + switch (e.kind) { + case 234: + case 179: + case 180: + case 262: + case 177: + case 181: + case 200: + case 174: + case 173: + case 169: + case 172: + case 171: + case 178: + case 265: + case 216: + case 260: + return !0; + default: + return !1; + } + } + function Mqe(e, t) { + if (FC(t)) { + const n = e.getTypeFromTypeNode(t.type); + return n === e.getNeverType() || n === e.getVoidType() ? n : e.getUnionType( + Tr([n, e.getUndefinedType()], t.postfix ? void 0 : e.getNullType()) + ); + } + return e.getTypeFromTypeNode(t); + } + var Ble = "fixMissingCallParentheses", J6e = [ + p.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code + ]; + Us({ + errorCodes: J6e, + fixIds: [Ble], + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = W6e(t, n.start); + if (!i) return; + const s = Yr.ChangeTracker.with(e, (o) => z6e(o, e.sourceFile, i)); + return [Ds(Ble, s, p.Add_missing_call_parentheses, Ble, p.Add_all_missing_call_parentheses)]; + }, + getAllCodeActions: (e) => Za(e, J6e, (t, n) => { + const i = W6e(n.file, n.start); + i && z6e(t, n.file, i); + }) + }); + function z6e(e, t, n) { + e.replaceNodeWithText(t, n, `${n.text}()`); + } + function W6e(e, t) { + const n = Ei(e, t); + if (Dn(n.parent)) { + let i = n.parent; + for (; Dn(i.parent); ) + i = i.parent; + return i.name; + } + if (Re(n)) + return n; + } + var V6e = "fixMissingTypeAnnotationOnExports", Jle = "add-annotation", zle = "add-type-assertion", Rqe = "extract-expression", U6e = [ + p.Function_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + p.Method_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + p.At_least_one_accessor_must_have_an_explicit_return_type_annotation_with_isolatedDeclarations.code, + p.Variable_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Parameter_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Property_must_have_an_explicit_type_annotation_with_isolatedDeclarations.code, + p.Expression_type_can_t_be_inferred_with_isolatedDeclarations.code, + p.Binding_elements_can_t_be_exported_directly_with_isolatedDeclarations.code, + p.Computed_property_names_on_class_or_object_literals_cannot_be_inferred_with_isolatedDeclarations.code, + p.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations.code, + p.Enum_member_initializers_must_be_computable_without_references_to_external_symbols_with_isolatedDeclarations.code, + p.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations.code, + p.Objects_that_contain_shorthand_properties_can_t_be_inferred_with_isolatedDeclarations.code, + p.Objects_that_contain_spread_assignments_can_t_be_inferred_with_isolatedDeclarations.code, + p.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations.code, + p.Default_exports_can_t_be_inferred_with_isolatedDeclarations.code, + p.Only_const_arrays_can_be_inferred_with_isolatedDeclarations.code, + p.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, + p.Declaration_emit_for_this_parameter_requires_implicitly_adding_undefined_to_it_s_type_This_is_not_supported_with_isolatedDeclarations.code, + p.Type_containing_private_name_0_can_t_be_used_with_isolatedDeclarations.code, + p.Add_satisfies_and_a_type_assertion_to_this_expression_satisfies_T_as_T_to_make_the_type_explicit.code + ], jqe = /* @__PURE__ */ new Set([ + 177, + 174, + 172, + 262, + 218, + 219, + 260, + 169, + 277, + 263, + 206, + 207 + /* ArrayBindingPattern */ + ]), Bqe = 1074273293; + Us({ + errorCodes: U6e, + fixIds: [V6e], + getCodeActions(e) { + const t = []; + return cP(Jle, t, e, 0, (n) => n.addTypeAnnotation(e.span)), cP(Jle, t, e, 1, (n) => n.addTypeAnnotation(e.span)), cP(Jle, t, e, 2, (n) => n.addTypeAnnotation(e.span)), cP(zle, t, e, 0, (n) => n.addInlineAssertion(e.span)), cP(zle, t, e, 1, (n) => n.addInlineAssertion(e.span)), cP(zle, t, e, 2, (n) => n.addInlineAssertion(e.span)), cP(Rqe, t, e, 0, (n) => n.extractAsVariable(e.span)), t; + }, + getAllCodeActions: (e) => { + const t = q6e(e, 0, (n) => { + Ux(e, U6e, (i) => { + n.addTypeAnnotation(i); + }); + }); + return Vx(t.textChanges); + } + }); + function cP(e, t, n, i, s) { + const o = q6e(n, i, s); + o.result && o.textChanges.length && t.push(Ds( + e, + o.textChanges, + o.result, + V6e, + p.Add_all_missing_type_annotations + )); + } + function q6e(e, t, n) { + const i = { typeNode: void 0, mutatedTarget: !1 }, s = Yr.ChangeTracker.fromContext(e), o = e.sourceFile, c = e.program, _ = c.getTypeChecker(), u = pa(c.getCompilerOptions()), d = Zb(e.sourceFile, e.program, e.preferences, e.host), g = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), S = Iy({ + preserveSourceNewlines: !1 + }), T = n({ addTypeAnnotation: C, addInlineAssertion: F, extractAsVariable: V }); + return d.writeFixes(s), { + result: T, + textChanges: s.getChanges() + }; + function C(ye) { + e.cancellationToken.throwIfCancellationRequested(); + const Fe = Ei(o, ye.start), Qe = L(Fe); + if (Qe) + return Ac(Qe) ? D(Qe) : $(Qe); + const Ke = Xe(Fe); + if (Ke) + return $(Ke); + } + function D(ye) { + var Fe; + if (h?.has(ye)) return; + h?.add(ye); + const Qe = _.getTypeAtLocation(ye), Ke = _.getPropertiesOfType(Qe); + if (!ye.name || Ke.length === 0) return; + const Be = []; + for (const nr of Ke) + X_(nr.name, pa(c.getCompilerOptions())) && (nr.valueDeclaration && ti(nr.valueDeclaration) || Be.push(N.createVariableStatement( + [N.createModifier( + 95 + /* ExportKeyword */ + )], + N.createVariableDeclarationList( + [N.createVariableDeclaration( + nr.name, + /*exclamationToken*/ + void 0, + ge(_.getTypeOfSymbol(nr), ye), + /*initializer*/ + void 0 + )] + ) + ))); + if (Be.length === 0) return; + const at = []; + (Fe = ye.modifiers) != null && Fe.some( + (nr) => nr.kind === 95 + /* ExportKeyword */ + ) && at.push(N.createModifier( + 95 + /* ExportKeyword */ + )), at.push(N.createModifier( + 138 + /* DeclareKeyword */ + )); + const Wt = N.createModuleDeclaration( + at, + ye.name, + N.createModuleBlock(Be), + /*flags*/ + 101441696 + /* ContextFlags */ + ); + return s.insertNodeAfter(o, ye, Wt), [p.Annotate_types_of_properties_expando_function_in_a_namespace]; + } + function P(ye) { + return !fo(ye) && !Es(ye) && !Gs(ye) && !Wl(ye); + } + function O(ye, Fe) { + return P(ye) && (ye = N.createParenthesizedExpression(ye)), N.createAsExpression(ye, Fe); + } + function j(ye, Fe) { + return P(ye) && (ye = N.createParenthesizedExpression(ye)), N.createAsExpression(N.createSatisfiesExpression(ye, qa(Fe)), Fe); + } + function F(ye) { + e.cancellationToken.throwIfCancellationRequested(); + const Fe = Ei(o, ye.start); + if (L(Fe)) return; + const Ke = Ie(Fe, ye); + if (!Ke || zT(Ke) || zT(Ke.parent)) return; + const Be = ct(Ke), at = du(Ke); + if (!at && tu(Ke) || sr(Ke, Ts) || sr(Ke, Py) || Be && (sr(Ke, nf) || sr(Ke, ai)) || cp(Ke)) + return; + const Wt = sr(Ke, ti), nr = Wt && _.getTypeAtLocation(Wt); + if (nr && nr.flags & 8192 || !(Be || at)) return; + const { typeNode: Kt, mutatedTarget: Pr } = ne(Ke, nr); + if (!(!Kt || Pr)) + return at ? s.insertNodeAt( + o, + Ke.end, + O( + qa(Ke.name), + Kt + ), + { + prefix: ": " + } + ) : Be ? s.replaceNode( + o, + Ke, + j( + qa(Ke), + Kt + ) + ) : E.assertNever(Ke), [p.Add_satisfies_and_an_inline_type_assertion_with_0, De(Kt)]; + } + function V(ye) { + e.cancellationToken.throwIfCancellationRequested(); + const Fe = Ei(o, ye.start), Qe = Ie(Fe, ye); + if (!Qe || zT(Qe) || zT(Qe.parent) || !ct(Qe)) return; + if (Wl(Qe)) + return s.replaceNode( + o, + Qe, + O(Qe, N.createTypeReferenceNode("const")) + ), [p.Mark_array_literal_as_const]; + const Be = sr(Qe, qc); + if (Be) { + if (Be === Qe.parent && fo(Qe)) return; + const at = N.createUniqueName( + qoe(Qe, o, _, o), + 16 + /* Optimistic */ + ); + let Wt = Qe, nr = Qe; + if (cp(Wt) && (Wt = fh(Wt.parent), le(Wt.parent) ? nr = Wt = Wt.parent : nr = O( + Wt, + N.createTypeReferenceNode("const") + )), fo(Wt)) return; + const Kt = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + at, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + nr + ) + ], + 2 + /* Const */ + ) + ), Pr = sr(Qe, hi); + return s.insertNodeBefore(o, Pr, Kt), s.replaceNode( + o, + Wt, + N.createAsExpression( + N.cloneNode(at), + N.createTypeQueryNode( + N.cloneNode(at) + ) + ) + ), [p.Extract_to_variable_and_replace_with_0_as_typeof_0, De(at)]; + } + } + function L(ye) { + const Fe = sr(ye, (Qe) => hi(Qe) ? "quit" : nx(Qe)); + if (Fe && nx(Fe)) { + let Qe = Fe; + if (cn(Qe) && (Qe = Qe.left, !nx(Qe))) + return; + const Ke = _.getTypeAtLocation(Qe.expression); + if (!Ke) return; + const Be = _.getPropertiesOfType(Ke); + if (ut(Be, (at) => at.valueDeclaration === Fe || at.valueDeclaration === Fe.parent)) { + const at = Ke.symbol.valueDeclaration; + if (at) { + if (Sy(at) && ti(at.parent)) + return at.parent; + if (Ac(at)) + return at; + } + } + } + } + function $(ye) { + if (!g?.has(ye)) + switch (g?.add(ye), ye.kind) { + case 169: + case 172: + case 260: + return ve(ye); + case 219: + case 218: + case 262: + case 174: + case 177: + return U(ye, o); + case 277: + return G(ye); + case 263: + return ce(ye); + case 206: + case 207: + return K(ye); + default: + throw new Error(`Cannot find a fix for the given node ${ye.kind}`); + } + } + function U(ye, Fe) { + if (ye.type) + return; + const { typeNode: Qe } = ne(ye); + if (Qe) + return s.tryInsertTypeAnnotation( + Fe, + ye, + Qe + ), [p.Add_return_type_0, De(Qe)]; + } + function G(ye) { + if (ye.isExportEquals) + return; + const { typeNode: Fe } = ne(ye.expression); + if (!Fe) return; + const Qe = N.createUniqueName("_default"); + return s.replaceNodeWithNodes(o, ye, [ + N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Qe, + /*exclamationToken*/ + void 0, + Fe, + ye.expression + )], + 2 + /* Const */ + ) + ), + N.updateExportAssignment(ye, ye?.modifiers, Qe) + ]), [ + p.Extract_default_export_to_variable + ]; + } + function ce(ye) { + var Fe, Qe; + const Ke = (Fe = ye.heritageClauses) == null ? void 0 : Fe.find( + (Vt) => Vt.token === 96 + /* ExtendsKeyword */ + ), Be = Ke?.types[0]; + if (!Be) + return; + const { typeNode: at } = ne(Be.expression); + if (!at) + return; + const Wt = N.createUniqueName( + ye.name ? ye.name.text + "Base" : "Anonymous", + 16 + /* Optimistic */ + ), nr = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Wt, + /*exclamationToken*/ + void 0, + at, + Be.expression + )], + 2 + /* Const */ + ) + ); + s.insertNodeBefore(o, ye, nr); + const Kt = oy(o.text, Be.end), Pr = ((Qe = Kt?.[Kt.length - 1]) == null ? void 0 : Qe.end) ?? Be.end; + return s.replaceRange( + o, + { + pos: Be.getFullStart(), + end: Pr + }, + Wt, + { + prefix: " " + } + ), [p.Extract_base_class_to_variable]; + } + function K(ye) { + var Fe; + const Qe = ye.parent, Ke = ye.parent.parent.parent; + if (!Qe.initializer) return; + let Be; + const at = []; + if (Re(Qe.initializer)) + Be = { expression: { kind: 3, identifier: Qe.initializer } }; + else { + const Kt = N.createUniqueName( + "dest", + 16 + /* Optimistic */ + ); + Be = { expression: { kind: 3, identifier: Kt } }, at.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Kt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Qe.initializer + )], + 2 + /* Const */ + ) + )); + } + const Wt = []; + v0(ye) ? X(ye, Wt, Be) : Z(ye, Wt, Be); + const nr = /* @__PURE__ */ new Map(); + for (const Kt of Wt) { + if (Kt.element.propertyName && oa(Kt.element.propertyName)) { + const Vt = Kt.element.propertyName.expression, zt = N.getGeneratedNameForNode(Vt), jr = N.createVariableDeclaration( + zt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + Vt + ), ci = N.createVariableDeclarationList( + [jr], + 2 + /* Const */ + ), Xt = N.createVariableStatement( + /*modifiers*/ + void 0, + ci + ); + at.push(Xt), nr.set(Vt, zt); + } + const Pr = Kt.element.name; + if (v0(Pr)) + X(Pr, Wt, Kt); + else if (If(Pr)) + Z(Pr, Wt, Kt); + else { + const { typeNode: Vt } = ne(Pr); + let zt = oe(Kt, nr); + if (Kt.element.initializer) { + const ci = (Fe = Kt.element) == null ? void 0 : Fe.propertyName, Xt = N.createUniqueName( + ci && Re(ci) ? ci.text : "temp", + 16 + /* Optimistic */ + ); + at.push(N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Xt, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + zt + )], + 2 + /* Const */ + ) + )), zt = N.createConditionalExpression( + N.createBinaryExpression( + Xt, + N.createToken( + 37 + /* EqualsEqualsEqualsToken */ + ), + N.createIdentifier("undefined") + ), + N.createToken( + 58 + /* QuestionToken */ + ), + Kt.element.initializer, + N.createToken( + 59 + /* ColonToken */ + ), + zt + ); + } + const jr = Vn( + Ke, + 32 + /* Export */ + ) ? [N.createToken( + 95 + /* ExportKeyword */ + )] : void 0; + at.push(N.createVariableStatement( + jr, + N.createVariableDeclarationList( + [N.createVariableDeclaration( + Pr, + /*exclamationToken*/ + void 0, + Vt, + zt + )], + 2 + /* Const */ + ) + )); + } + } + return Ke.declarationList.declarations.length > 1 && at.push(N.updateVariableStatement( + Ke, + Ke.modifiers, + N.updateVariableDeclarationList( + Ke.declarationList, + Ke.declarationList.declarations.filter((Kt) => Kt !== ye.parent) + ) + )), s.replaceNodeWithNodes(o, Ke, at), [ + p.Extract_binding_expressions_to_variable + ]; + } + function X(ye, Fe, Qe) { + for (let Ke = 0; Ke < ye.elements.length; ++Ke) { + const Be = ye.elements[Ke]; + ml(Be) || Fe.push({ + element: Be, + parent: Qe, + expression: { kind: 2, arrayIndex: Ke } + }); + } + } + function Z(ye, Fe, Qe) { + for (const Ke of ye.elements) { + let Be; + if (Ke.propertyName) + if (oa(Ke.propertyName)) { + Fe.push({ + element: Ke, + parent: Qe, + expression: { kind: 1, computed: Ke.propertyName.expression } + }); + continue; + } else + Be = Ke.propertyName.text; + else + Be = Ke.name.text; + Fe.push({ + element: Ke, + parent: Qe, + expression: { kind: 0, text: Be } + }); + } + } + function oe(ye, Fe) { + const Qe = [ye]; + for (; ye.parent; ) + ye = ye.parent, Qe.push(ye); + let Ke = Qe[Qe.length - 1].expression.identifier; + for (let Be = Qe.length - 2; Be >= 0; --Be) { + const at = Qe[Be].expression; + at.kind === 0 ? Ke = N.createPropertyAccessChain( + Ke, + /*questionDotToken*/ + void 0, + N.createIdentifier(at.text) + ) : at.kind === 1 ? Ke = N.createElementAccessExpression( + Ke, + Fe.get(at.computed) + ) : at.kind === 2 && (Ke = N.createElementAccessExpression( + Ke, + at.arrayIndex + )); + } + return Ke; + } + function ne(ye, Fe) { + if (t === 1) + return Ae(ye); + let Qe = zT(ye) ? de(ye) : _.getTypeAtLocation(ye); + if (!Qe) + return i; + if (t === 2) { + Fe && (Qe = Fe); + const Be = _.getWidenedLiteralType(Qe); + if (_.isTypeAssignableTo(Be, Qe)) + return i; + Qe = Be; + } + ji(ye) && _.requiresAddingImplicitUndefined(ye) && (Qe = _.getUnionType( + [_.getUndefinedType(), Qe], + 0 + /* None */ + )); + const Ke = (ti(ye) || rs(ye) && Vn( + ye, + 264 + /* Readonly */ + )) && Qe.flags & 8192 ? 1048576 : 0; + return { + typeNode: ge(Qe, sr(ye, tu) ?? o, Ke), + mutatedTarget: !1 + }; + } + function pe(ye) { + return N.createTypeQueryNode(qa(ye)); + } + function fe(ye, Fe = "temp") { + const Qe = !!sr(ye, le); + return Qe ? ae( + ye, + Fe, + Qe, + (Ke) => Ke.elements, + cp, + N.createSpreadElement, + (Ke) => N.createArrayLiteralExpression( + Ke, + /*multiLine*/ + !0 + ), + (Ke) => N.createTupleTypeNode(Ke.map(N.createRestTypeNode)) + ) : i; + } + function H(ye, Fe = "temp") { + const Qe = !!sr(ye, le); + return ae( + ye, + Fe, + Qe, + (Ke) => Ke.properties, + Bg, + N.createSpreadAssignment, + (Ke) => N.createObjectLiteralExpression( + Ke, + /*multiLine*/ + !0 + ), + N.createIntersectionTypeNode + ); + } + function ae(ye, Fe, Qe, Ke, Be, at, Wt, nr) { + const Kt = [], Pr = []; + let Vt; + const zt = sr(ye, hi); + for (const Xt of Ke(ye)) + Be(Xt) ? (ci(), fo(Xt.expression) ? (Kt.push(pe(Xt.expression)), Pr.push(Xt)) : jr(Xt.expression)) : (Vt ?? (Vt = [])).push(Xt); + if (Pr.length === 0) + return i; + return ci(), s.replaceNode(o, ye, Wt(Pr)), { + typeNode: nr(Kt), + mutatedTarget: !0 + }; + function jr(Xt) { + const Ai = N.createUniqueName( + Fe + "_Part" + (Pr.length + 1), + 16 + /* Optimistic */ + ), _s = Qe ? N.createAsExpression( + Xt, + N.createTypeReferenceNode("const") + ) : Xt, $n = N.createVariableStatement( + /*modifiers*/ + void 0, + N.createVariableDeclarationList( + [ + N.createVariableDeclaration( + Ai, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + _s + ) + ], + 2 + /* Const */ + ) + ); + s.insertNodeBefore(o, zt, $n), Kt.push(pe(Ai)), Pr.push(at(Ai)); + } + function ci() { + Vt && (jr(Wt( + Vt + )), Vt = void 0); + } + } + function le(ye) { + return J1(ye) && yd(ye.type); + } + function Ae(ye) { + if (ji(ye)) + return i; + if (du(ye)) + return { + typeNode: pe(ye.name), + mutatedTarget: !1 + }; + if (fo(ye)) + return { + typeNode: pe(ye), + mutatedTarget: !1 + }; + if (le(ye)) + return Ae(ye.expression); + if (Wl(ye)) { + const Fe = sr(ye, ti), Qe = Fe && Re(Fe.name) ? Fe.name.text : void 0; + return fe(ye, Qe); + } + if (Gs(ye)) { + const Fe = sr(ye, ti), Qe = Fe && Re(Fe.name) ? Fe.name.text : void 0; + return H(ye, Qe); + } + if (ti(ye) && ye.initializer) + return Ae(ye.initializer); + if (yx(ye)) { + const { typeNode: Fe, mutatedTarget: Qe } = Ae(ye.whenTrue); + if (!Fe) return i; + const { typeNode: Ke, mutatedTarget: Be } = Ae(ye.whenFalse); + return Ke ? { + typeNode: N.createUnionTypeNode([Fe, Ke]), + mutatedTarget: Qe || Be + } : i; + } + return i; + } + function ge(ye, Fe, Qe = 0) { + let Ke = !1; + const Be = $9(_, d, ye, Fe, u, Bqe | Qe, { + moduleResolverHost: c, + trackSymbol() { + return !0; + }, + reportTruncationError() { + Ke = !0; + } + }); + return Ke ? N.createKeywordTypeNode( + 133 + /* AnyKeyword */ + ) : Be; + } + function de(ye) { + const Fe = _.getSignatureFromDeclaration(ye); + if (Fe) + return _.getReturnTypeOfSignature(Fe); + } + function ve(ye) { + const { typeNode: Fe } = ne(ye); + if (Fe) + return ye.type ? s.replaceNode(xr(ye), ye.type, Fe) : s.tryInsertTypeAnnotation(xr(ye), ye, Fe), [p.Add_annotation_of_type_0, De(Fe)]; + } + function De(ye) { + Kr( + ye, + 1 + /* SingleLine */ + ); + const Fe = S.printNode(4, ye, o); + return Fe.length > KE ? Fe.substring(0, KE - 3) + "..." : (Kr( + ye, + 0 + /* None */ + ), Fe); + } + function Xe(ye) { + return sr(ye, (Fe) => jqe.has(Fe.kind) && (!If(Fe) && !v0(Fe) || ti(Fe.parent))); + } + function Ie(ye, Fe) { + for (; ye && ye.end < Fe.start + Fe.length; ) + ye = ye.parent; + for (; ye.parent.pos === ye.pos && ye.parent.end === ye.end; ) + ye = ye.parent; + return Re(ye) && i0(ye.parent) && ye.parent.initializer ? ye.parent.initializer : ye; + } + } + var Wle = "fixAwaitInSyncFunction", H6e = [ + p.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, + p.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code + ]; + Us({ + errorCodes: H6e, + getCodeActions(e) { + const { sourceFile: t, span: n } = e, i = G6e(t, n.start); + if (!i) return; + const s = Yr.ChangeTracker.with(e, (o) => $6e(o, t, i)); + return [Ds(Wle, s, p.Add_async_modifier_to_containing_function, Wle, p.Add_all_missing_async_modifiers)]; + }, + fixIds: [Wle], + getAllCodeActions: function(t) { + const n = /* @__PURE__ */ new Map(); + return Za(t, H6e, (i, s) => { + const o = G6e(s.file, s.start); + !o || !Kp(n, ja(o.insertBefore)) || $6e(i, t.sourceFile, o); + }); + } + }); + function Jqe(e) { + if (e.type) + return e.type; + if (ti(e.parent) && e.parent.type && Xm(e.parent.type)) + return e.parent.type.type; + } + function G6e(e, t) { + const n = Ei(e, t), i = yf(n); + if (!i) + return; + let s; + switch (i.kind) { + case 174: + s = i.name; + break; + case 262: + case 218: + s = Ya(i, 100, e); + break; + case 219: + const o = i.typeParameters ? 30 : 21; + s = Ya(i, o, e) || fa(i.parameters); + break; + default: + return; + } + return s && { + insertBefore: s, + returnType: Jqe(i) + }; + } + function $6e(e, t, { insertBefore: n, returnType: i }) { + if (i) { + const s = e3(i); + (!s || s.kind !== 80 || s.text !== "Promise") && e.replaceNode(t, i, N.createTypeReferenceNode("Promise", N.createNodeArray([i]))); + } + e.insertModifierBefore(t, 134, n); + } + var X6e = [ + p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code, + p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code + ], Vle = "fixPropertyOverrideAccessor"; + Us({ + errorCodes: X6e, + getCodeActions(e) { + const t = Q6e(e.sourceFile, e.span.start, e.span.length, e.errorCode, e); + if (t) + return [Ds(Vle, t, p.Generate_get_and_set_accessors, Vle, p.Generate_get_and_set_accessors_for_all_overriding_properties)]; + }, + fixIds: [Vle], + getAllCodeActions: (e) => Za(e, X6e, (t, n) => { + const i = Q6e(n.file, n.start, n.length, n.code, e); + if (i) + for (const s of i) + t.pushRaw(e.sourceFile, s); + }) + }); + function Q6e(e, t, n, i, s) { + let o, c; + if (i === p._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code) + o = t, c = t + n; + else if (i === p._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code) { + const _ = s.program.getTypeChecker(), u = Ei(e, t).parent; + E.assert(_y(u), "error span of fixPropertyOverrideAccessor should only be on an accessor"); + const d = u.parent; + E.assert(Qn(d), "erroneous accessors should only be inside classes"); + const g = Rm(rue(d, _)); + if (!g) return []; + const h = Pi(OT(u.name)), S = _.getPropertyOfType(_.getTypeAtLocation(g), h); + if (!S || !S.valueDeclaration) return []; + o = S.valueDeclaration.pos, c = S.valueDeclaration.end, e = xr(S.valueDeclaration); + } else + E.fail("fixPropertyOverrideAccessor codefix got unexpected error code " + i); + return hEe(e, s.program, o, c, s, p.Generate_get_and_set_accessors.message); + } + var Ule = "inferFromUsage", Y6e = [ + // Variable declarations + p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, + // Variable uses + p.Variable_0_implicitly_has_an_1_type.code, + // Parameter declarations + p.Parameter_0_implicitly_has_an_1_type.code, + p.Rest_parameter_0_implicitly_has_an_any_type.code, + // Get Accessor declarations + p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code, + p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code, + // Set Accessor declarations + p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code, + // Property declarations + p.Member_0_implicitly_has_an_1_type.code, + //// Suggestions + // Variable declarations + p.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code, + // Variable uses + p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + // Parameter declarations + p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code, + // Get Accessor declarations + p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code, + p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code, + // Set Accessor declarations + p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code, + // Property declarations + p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, + // Function expressions and declarations + p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code + ]; + Us({ + errorCodes: Y6e, + getCodeActions(e) { + const { sourceFile: t, program: n, span: { start: i }, errorCode: s, cancellationToken: o, host: c, preferences: _ } = e, u = Ei(t, i); + let d; + const g = Yr.ChangeTracker.with(e, (S) => { + d = Z6e( + S, + t, + u, + s, + n, + o, + /*markSeen*/ + A1, + c, + _ + ); + }), h = d && es(d); + return !h || g.length === 0 ? void 0 : [Ds(Ule, g, [zqe(s, u), sc(h)], Ule, p.Infer_all_types_from_usage)]; + }, + fixIds: [Ule], + getAllCodeActions(e) { + const { sourceFile: t, program: n, cancellationToken: i, host: s, preferences: o } = e, c = o6(); + return Za(e, Y6e, (_, u) => { + Z6e(_, t, Ei(u.file, u.start), u.code, n, i, c, s, o); + }); + } + }); + function zqe(e, t) { + switch (e) { + case p.Parameter_0_implicitly_has_an_1_type.code: + case p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return rf(yf(t)) ? p.Infer_type_of_0_from_usage : p.Infer_parameter_types_from_usage; + case p.Rest_parameter_0_implicitly_has_an_any_type.code: + case p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Infer_parameter_types_from_usage; + case p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + return p.Infer_this_type_of_0_from_usage; + default: + return p.Infer_type_of_0_from_usage; + } + } + function Wqe(e) { + switch (e) { + case p.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code: + return p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code; + case p.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Variable_0_implicitly_has_an_1_type.code; + case p.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Parameter_0_implicitly_has_an_1_type.code; + case p.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Rest_parameter_0_implicitly_has_an_any_type.code; + case p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code: + return p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code; + case p._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code: + return p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code; + case p.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code: + return p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code; + case p.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: + return p.Member_0_implicitly_has_an_1_type.code; + } + return e; + } + function Z6e(e, t, n, i, s, o, c, _, u) { + if (!XE(n.kind) && n.kind !== 80 && n.kind !== 26 && n.kind !== 110) + return; + const { parent: d } = n, g = Zb(t, s, u, _); + switch (i = Wqe(i), i) { + case p.Member_0_implicitly_has_an_1_type.code: + case p.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: + if (ti(d) && c(d) || rs(d) || I_(d)) + return K6e(e, g, t, d, s, _, o), g.writeFixes(e), d; + if (Dn(d)) { + const T = LN(d.name, s, o), C = ZD(T, d, s, _); + if (C) { + const D = N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(C), + /*comment*/ + void 0 + ); + e.addJSDocTags(t, Is(d.parent.parent, Pl), [D]); + } + return g.writeFixes(e), d; + } + return; + case p.Variable_0_implicitly_has_an_1_type.code: { + const T = s.getTypeChecker().getSymbolAtLocation(n); + return T && T.valueDeclaration && ti(T.valueDeclaration) && c(T.valueDeclaration) ? (K6e(e, g, xr(T.valueDeclaration), T.valueDeclaration, s, _, o), g.writeFixes(e), T.valueDeclaration) : void 0; + } + } + const h = yf(n); + if (h === void 0) + return; + let S; + switch (i) { + case p.Parameter_0_implicitly_has_an_1_type.code: + if (rf(h)) { + eEe(e, g, t, h, s, _, o), S = h; + break; + } + case p.Rest_parameter_0_implicitly_has_an_any_type.code: + if (c(h)) { + const T = Is(d, ji); + Vqe(e, g, t, T, h, s, _, o), S = T; + } + break; + case p.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: + case p._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: + Af(h) && Re(h.name) && (Kq(e, g, t, h, LN(h.name, s, o), s, _), S = h); + break; + case p.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: + rf(h) && (eEe(e, g, t, h, s, _, o), S = h); + break; + case p.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: + Yr.isThisTypeAnnotatable(h) && c(h) && (Uqe(e, t, h, s, _, o), S = h); + break; + default: + return E.fail(String(i)); + } + return g.writeFixes(e), S; + } + function K6e(e, t, n, i, s, o, c) { + Re(i.name) && Kq(e, t, n, i, LN(i.name, s, c), s, o); + } + function Vqe(e, t, n, i, s, o, c, _) { + if (!Re(i.name)) + return; + const u = Gqe(s, n, o, _); + if (E.assert(s.parameters.length === u.length, "Parameter count and inference count should match"), Qr(s)) + tEe(e, n, u, o, c); + else { + const d = xo(s) && !Ya(s, 21, n); + d && e.insertNodeBefore(n, fa(s.parameters), N.createToken( + 21 + /* OpenParenToken */ + )); + for (const { declaration: g, type: h } of u) + g && !g.type && !g.initializer && Kq(e, t, n, g, h, o, c); + d && e.insertNodeAfter(n, ia(s.parameters), N.createToken( + 22 + /* CloseParenToken */ + )); + } + } + function Uqe(e, t, n, i, s, o) { + const c = rEe(n, t, i, o); + if (!c || !c.length) + return; + const _ = Hle(i, c, o).thisParameter(), u = ZD(_, n, i, s); + u && (Qr(n) ? qqe(e, t, n, u) : e.tryInsertThisTypeAnnotation(t, n, u)); + } + function qqe(e, t, n, i) { + e.addJSDocTags(t, n, [ + N.createJSDocThisTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(i) + ) + ]); + } + function eEe(e, t, n, i, s, o, c) { + const _ = ul(i.parameters); + if (_ && Re(i.name) && Re(_.name)) { + let u = LN(i.name, s, c); + u === s.getTypeChecker().getAnyType() && (u = LN(_.name, s, c)), Qr(i) ? tEe(e, n, [{ declaration: _, type: u }], s, o) : Kq(e, t, n, _, u, s, o); + } + } + function Kq(e, t, n, i, s, o, c) { + const _ = ZD(s, i, o, c); + if (_) + if (Qr(n) && i.kind !== 171) { + const u = ti(i) ? Jn(i.parent.parent, yc) : i; + if (!u) + return; + const d = N.createJSDocTypeExpression(_), g = Af(i) ? N.createJSDocReturnTag( + /*tagName*/ + void 0, + d, + /*comment*/ + void 0 + ) : N.createJSDocTypeTag( + /*tagName*/ + void 0, + d, + /*comment*/ + void 0 + ); + e.addJSDocTags(n, u, [g]); + } else Hqe(_, i, n, e, t, pa(o.getCompilerOptions())) || e.tryInsertTypeAnnotation(n, i, _); + } + function Hqe(e, t, n, i, s, o) { + const c = SS(e, o); + return c && i.tryInsertTypeAnnotation(n, t, c.typeNode) ? (rr(c.symbols, (_) => s.addImportFromExportedSymbol( + _, + /*isValidTypeOnlyUseSite*/ + !0 + )), !0) : !1; + } + function tEe(e, t, n, i, s) { + const o = n.length && n[0].declaration.parent; + if (!o) + return; + const c = Ii(n, (_) => { + const u = _.declaration; + if (u.initializer || R1(u) || !Re(u.name)) + return; + const d = _.type && ZD(_.type, u, i, s); + if (d) { + const g = N.cloneNode(u.name); + return Kr( + g, + 7168 + /* NoNestedComments */ + ), { name: N.cloneNode(u.name), param: u, isOptional: !!_.isOptional, typeNode: d }; + } + }); + if (c.length) + if (xo(o) || po(o)) { + const _ = xo(o) && !Ya(o, 21, t); + _ && e.insertNodeBefore(t, fa(o.parameters), N.createToken( + 21 + /* OpenParenToken */ + )), rr(c, ({ typeNode: u, param: d }) => { + const g = N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(u) + ), h = N.createJSDocComment( + /*comment*/ + void 0, + [g] + ); + e.insertNodeAt(t, d.getStart(t), h, { suffix: " " }); + }), _ && e.insertNodeAfter(t, ia(o.parameters), N.createToken( + 22 + /* CloseParenToken */ + )); + } else { + const _ = or(c, ({ name: u, typeNode: d, isOptional: g }) => N.createJSDocParameterTag( + /*tagName*/ + void 0, + u, + /*isBracketed*/ + !!g, + N.createJSDocTypeExpression(d), + /*isNameFirst*/ + !1, + /*comment*/ + void 0 + )); + e.addJSDocTags(t, o, _); + } + } + function qle(e, t, n) { + return Ii(yo.getReferenceEntriesForNode(-1, e, t, t.getSourceFiles(), n), (i) => i.kind !== yo.EntryKind.Span ? Jn(i.node, Re) : void 0); + } + function LN(e, t, n) { + const i = qle(e, t, n); + return Hle(t, i, n).single(); + } + function Gqe(e, t, n, i) { + const s = rEe(e, t, n, i); + return s && Hle(n, s, i).parameters(e) || e.parameters.map((o) => ({ + declaration: o, + type: Re(o.name) ? LN(o.name, n, i) : n.getTypeChecker().getAnyType() + })); + } + function rEe(e, t, n, i) { + let s; + switch (e.kind) { + case 176: + s = Ya(e, 137, t); + break; + case 219: + case 218: + const o = e.parent; + s = (ti(o) || rs(o)) && Re(o.name) ? o.name : e.name; + break; + case 262: + case 174: + case 173: + s = e.name; + break; + } + if (s) + return qle(s, n, i); + } + function Hle(e, t, n) { + const i = e.getTypeChecker(), s = { + string: () => i.getStringType(), + number: () => i.getNumberType(), + Array: (de) => i.createArrayType(de), + Promise: (de) => i.createPromiseType(de) + }, o = [ + i.getStringType(), + i.getNumberType(), + i.createArrayType(i.getAnyType()), + i.createPromiseType(i.getAnyType()) + ]; + return { + single: u, + parameters: d, + thisParameter: g + }; + function c() { + return { + isNumber: void 0, + isString: void 0, + isNumberOrString: void 0, + candidateTypes: void 0, + properties: void 0, + calls: void 0, + constructs: void 0, + numberIndex: void 0, + stringIndex: void 0, + candidateThisTypes: void 0, + inferredTypes: void 0 + }; + } + function _(de) { + const ve = /* @__PURE__ */ new Map(); + for (const Xe of de) + Xe.properties && Xe.properties.forEach((Ie, ye) => { + ve.has(ye) || ve.set(ye, []), ve.get(ye).push(Ie); + }); + const De = /* @__PURE__ */ new Map(); + return ve.forEach((Xe, Ie) => { + De.set(Ie, _(Xe)); + }), { + isNumber: de.some((Xe) => Xe.isNumber), + isString: de.some((Xe) => Xe.isString), + isNumberOrString: de.some((Xe) => Xe.isNumberOrString), + candidateTypes: Xs(de, (Xe) => Xe.candidateTypes), + properties: De, + calls: Xs(de, (Xe) => Xe.calls), + constructs: Xs(de, (Xe) => Xe.constructs), + numberIndex: rr(de, (Xe) => Xe.numberIndex), + stringIndex: rr(de, (Xe) => Xe.stringIndex), + candidateThisTypes: Xs(de, (Xe) => Xe.candidateThisTypes), + inferredTypes: void 0 + // clear type cache + }; + } + function u() { + return ce(h(t)); + } + function d(de) { + if (t.length === 0 || !de.parameters) + return; + const ve = c(); + for (const Xe of t) + n.throwIfCancellationRequested(), S(Xe, ve); + const De = [...ve.constructs || [], ...ve.calls || []]; + return de.parameters.map((Xe, Ie) => { + const ye = [], Fe = Um(Xe); + let Qe = !1; + for (const Be of De) + if (Be.argumentTypes.length <= Ie) + Qe = Qr(de), ye.push(i.getUndefinedType()); + else if (Fe) + for (let at = Ie; at < Be.argumentTypes.length; at++) + ye.push(i.getBaseTypeOfLiteralType(Be.argumentTypes[at])); + else + ye.push(i.getBaseTypeOfLiteralType(Be.argumentTypes[Ie])); + if (Re(Xe.name)) { + const Be = h(qle(Xe.name, e, n)); + ye.push(...Fe ? Ii(Be, i.getElementTypeOfArrayType) : Be); + } + const Ke = ce(ye); + return { + type: Fe ? i.createArrayType(Ke) : Ke, + isOptional: Qe && !Fe, + declaration: Xe + }; + }); + } + function g() { + const de = c(); + for (const ve of t) + n.throwIfCancellationRequested(), S(ve, de); + return ce(de.candidateThisTypes || He); + } + function h(de) { + const ve = c(); + for (const De of de) + n.throwIfCancellationRequested(), S(De, ve); + return X(ve); + } + function S(de, ve) { + for (; k4(de); ) + de = de.parent; + switch (de.parent.kind) { + case 244: + C(de, ve); + break; + case 225: + ve.isNumber = !0; + break; + case 224: + D(de.parent, ve); + break; + case 226: + P(de, de.parent, ve); + break; + case 296: + case 297: + O(de.parent, ve); + break; + case 213: + case 214: + de.parent.expression === de ? j(de.parent, ve) : T(de, ve); + break; + case 211: + F(de.parent, ve); + break; + case 212: + V(de.parent, de, ve); + break; + case 303: + case 304: + L(de.parent, ve); + break; + case 172: + $(de.parent, ve); + break; + case 260: { + const { name: De, initializer: Xe } = de.parent; + if (de === De) { + Xe && Ae(ve, i.getTypeAtLocation(Xe)); + break; + } + } + default: + return T(de, ve); + } + } + function T(de, ve) { + Sd(de) && Ae(ve, i.getContextualType(de)); + } + function C(de, ve) { + Ae(ve, Es(de) ? i.getVoidType() : i.getAnyType()); + } + function D(de, ve) { + switch (de.operator) { + case 46: + case 47: + case 41: + case 55: + ve.isNumber = !0; + break; + case 40: + ve.isNumberOrString = !0; + break; + } + } + function P(de, ve, De) { + switch (ve.operatorToken.kind) { + case 43: + case 42: + case 44: + case 45: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 66: + case 68: + case 67: + case 69: + case 70: + case 74: + case 75: + case 79: + case 71: + case 73: + case 72: + case 41: + case 30: + case 33: + case 32: + case 34: + const Xe = i.getTypeAtLocation(ve.left === de ? ve.right : ve.left); + Xe.flags & 1056 ? Ae(De, Xe) : De.isNumber = !0; + break; + case 65: + case 40: + const Ie = i.getTypeAtLocation(ve.left === de ? ve.right : ve.left); + Ie.flags & 1056 ? Ae(De, Ie) : Ie.flags & 296 ? De.isNumber = !0 : Ie.flags & 402653316 ? De.isString = !0 : Ie.flags & 1 || (De.isNumberOrString = !0); + break; + case 64: + case 35: + case 37: + case 38: + case 36: + case 77: + case 78: + case 76: + Ae(De, i.getTypeAtLocation(ve.left === de ? ve.right : ve.left)); + break; + case 103: + de === ve.left && (De.isString = !0); + break; + case 57: + case 61: + de === ve.left && (de.parent.parent.kind === 260 || Tl( + de.parent.parent, + /*excludeCompoundAssignment*/ + !0 + )) && Ae(De, i.getTypeAtLocation(ve.right)); + break; + } + } + function O(de, ve) { + Ae(ve, i.getTypeAtLocation(de.parent.parent.expression)); + } + function j(de, ve) { + const De = { + argumentTypes: [], + return_: c() + }; + if (de.arguments) + for (const Xe of de.arguments) + De.argumentTypes.push(i.getTypeAtLocation(Xe)); + S(de, De.return_), de.kind === 213 ? (ve.calls || (ve.calls = [])).push(De) : (ve.constructs || (ve.constructs = [])).push(De); + } + function F(de, ve) { + const De = Ko(de.name.text); + ve.properties || (ve.properties = /* @__PURE__ */ new Map()); + const Xe = ve.properties.get(De) || c(); + S(de, Xe), ve.properties.set(De, Xe); + } + function V(de, ve, De) { + if (ve === de.argumentExpression) { + De.isNumberOrString = !0; + return; + } else { + const Xe = i.getTypeAtLocation(de.argumentExpression), Ie = c(); + S(de, Ie), Xe.flags & 296 ? De.numberIndex = Ie : De.stringIndex = Ie; + } + } + function L(de, ve) { + const De = ti(de.parent.parent) ? de.parent.parent : de.parent; + ge(ve, i.getTypeAtLocation(De)); + } + function $(de, ve) { + ge(ve, i.getTypeAtLocation(de.parent)); + } + function U(de, ve) { + const De = []; + for (const Xe of de) + for (const { high: Ie, low: ye } of ve) + Ie(Xe) && (E.assert(!ye(Xe), "Priority can't have both low and high"), De.push(ye)); + return de.filter((Xe) => De.every((Ie) => !Ie(Xe))); + } + function G(de) { + return ce(X(de)); + } + function ce(de) { + if (!de.length) return i.getAnyType(); + const ve = i.getUnionType([i.getStringType(), i.getNumberType()]); + let Xe = U(de, [ + { + high: (ye) => ye === i.getStringType() || ye === i.getNumberType(), + low: (ye) => ye === ve + }, + { + high: (ye) => !(ye.flags & 16385), + low: (ye) => !!(ye.flags & 16385) + }, + { + high: (ye) => !(ye.flags & 114689) && !(wn(ye) & 16), + low: (ye) => !!(wn(ye) & 16) + } + ]); + const Ie = Xe.filter( + (ye) => wn(ye) & 16 + /* Anonymous */ + ); + return Ie.length && (Xe = Xe.filter((ye) => !(wn(ye) & 16)), Xe.push(K(Ie))), i.getWidenedType(i.getUnionType( + Xe.map(i.getBaseTypeOfLiteralType), + 2 + /* Subtype */ + )); + } + function K(de) { + if (de.length === 1) + return de[0]; + const ve = [], De = [], Xe = [], Ie = []; + let ye = !1, Fe = !1; + const Qe = Kf(); + for (const at of de) { + for (const Kt of i.getPropertiesOfType(at)) + Qe.add(Kt.escapedName, Kt.valueDeclaration ? i.getTypeOfSymbolAtLocation(Kt, Kt.valueDeclaration) : i.getAnyType()); + ve.push(...i.getSignaturesOfType( + at, + 0 + /* Call */ + )), De.push(...i.getSignaturesOfType( + at, + 1 + /* Construct */ + )); + const Wt = i.getIndexInfoOfType( + at, + 0 + /* String */ + ); + Wt && (Xe.push(Wt.type), ye = ye || Wt.isReadonly); + const nr = i.getIndexInfoOfType( + at, + 1 + /* Number */ + ); + nr && (Ie.push(nr.type), Fe = Fe || nr.isReadonly); + } + const Ke = bX(Qe, (at, Wt) => { + const nr = Wt.length < de.length ? 16777216 : 0, Kt = i.createSymbol(4 | nr, at); + return Kt.links.type = i.getUnionType(Wt), [at, Kt]; + }), Be = []; + return Xe.length && Be.push(i.createIndexInfo(i.getStringType(), i.getUnionType(Xe), ye)), Ie.length && Be.push(i.createIndexInfo(i.getNumberType(), i.getUnionType(Ie), Fe)), i.createAnonymousType( + de[0].symbol, + Ke, + ve, + De, + Be + ); + } + function X(de) { + var ve, De, Xe; + const Ie = []; + de.isNumber && Ie.push(i.getNumberType()), de.isString && Ie.push(i.getStringType()), de.isNumberOrString && Ie.push(i.getUnionType([i.getStringType(), i.getNumberType()])), de.numberIndex && Ie.push(i.createArrayType(G(de.numberIndex))), ((ve = de.properties) != null && ve.size || (De = de.constructs) != null && De.length || de.stringIndex) && Ie.push(Z(de)); + const ye = (de.candidateTypes || []).map((Qe) => i.getBaseTypeOfLiteralType(Qe)), Fe = (Xe = de.calls) != null && Xe.length ? Z(de) : void 0; + return Fe && ye ? Ie.push(i.getUnionType( + [Fe, ...ye], + 2 + /* Subtype */ + )) : (Fe && Ie.push(Fe), Dr(ye) && Ie.push(...ye)), Ie.push(...oe(de)), Ie; + } + function Z(de) { + const ve = /* @__PURE__ */ new Map(); + de.properties && de.properties.forEach((ye, Fe) => { + const Qe = i.createSymbol(4, Fe); + Qe.links.type = G(ye), ve.set(Fe, Qe); + }); + const De = de.calls ? [le(de.calls)] : [], Xe = de.constructs ? [le(de.constructs)] : [], Ie = de.stringIndex ? [i.createIndexInfo( + i.getStringType(), + G(de.stringIndex), + /*isReadonly*/ + !1 + )] : []; + return i.createAnonymousType( + /*symbol*/ + void 0, + ve, + De, + Xe, + Ie + ); + } + function oe(de) { + if (!de.properties || !de.properties.size) return []; + const ve = o.filter((De) => ne(De, de)); + return 0 < ve.length && ve.length < 3 ? ve.map((De) => pe(De, de)) : []; + } + function ne(de, ve) { + return ve.properties ? !Dl(ve.properties, (De, Xe) => { + const Ie = i.getTypeOfPropertyOfType(de, Xe); + return Ie ? De.calls ? !i.getSignaturesOfType( + Ie, + 0 + /* Call */ + ).length || !i.isTypeAssignableTo(Ie, ae(De.calls)) : !i.isTypeAssignableTo(Ie, G(De)) : !0; + }) : !1; + } + function pe(de, ve) { + if (!(wn(de) & 4) || !ve.properties) + return de; + const De = de.target, Xe = Rm(De.typeParameters); + if (!Xe) return de; + const Ie = []; + return ve.properties.forEach((ye, Fe) => { + const Qe = i.getTypeOfPropertyOfType(De, Fe); + E.assert(!!Qe, "generic should have all the properties of its reference."), Ie.push(...fe(Qe, G(ye), Xe)); + }), s[de.symbol.escapedName](ce(Ie)); + } + function fe(de, ve, De) { + if (de === De) + return [ve]; + if (de.flags & 3145728) + return Xs(de.types, (ye) => fe(ye, ve, De)); + if (wn(de) & 4 && wn(ve) & 4) { + const ye = i.getTypeArguments(de), Fe = i.getTypeArguments(ve), Qe = []; + if (ye && Fe) + for (let Ke = 0; Ke < ye.length; Ke++) + Fe[Ke] && Qe.push(...fe(ye[Ke], Fe[Ke], De)); + return Qe; + } + const Xe = i.getSignaturesOfType( + de, + 0 + /* Call */ + ), Ie = i.getSignaturesOfType( + ve, + 0 + /* Call */ + ); + return Xe.length === 1 && Ie.length === 1 ? H(Xe[0], Ie[0], De) : []; + } + function H(de, ve, De) { + var Xe; + const Ie = []; + for (let Qe = 0; Qe < de.parameters.length; Qe++) { + const Ke = de.parameters[Qe], Be = ve.parameters[Qe], at = de.declaration && Um(de.declaration.parameters[Qe]); + if (!Be) + break; + let Wt = Ke.valueDeclaration ? i.getTypeOfSymbolAtLocation(Ke, Ke.valueDeclaration) : i.getAnyType(); + const nr = at && i.getElementTypeOfArrayType(Wt); + nr && (Wt = nr); + const Kt = ((Xe = Jn(Be, qm)) == null ? void 0 : Xe.links.type) || (Be.valueDeclaration ? i.getTypeOfSymbolAtLocation(Be, Be.valueDeclaration) : i.getAnyType()); + Ie.push(...fe(Wt, Kt, De)); + } + const ye = i.getReturnTypeOfSignature(de), Fe = i.getReturnTypeOfSignature(ve); + return Ie.push(...fe(ye, Fe, De)), Ie; + } + function ae(de) { + return i.createAnonymousType( + /*symbol*/ + void 0, + Ms(), + [le(de)], + He, + He + ); + } + function le(de) { + const ve = [], De = Math.max(...de.map((Ie) => Ie.argumentTypes.length)); + for (let Ie = 0; Ie < De; Ie++) { + const ye = i.createSymbol(1, Ko(`arg${Ie}`)); + ye.links.type = ce(de.map((Fe) => Fe.argumentTypes[Ie] || i.getUndefinedType())), de.some((Fe) => Fe.argumentTypes[Ie] === void 0) && (ye.flags |= 16777216), ve.push(ye); + } + const Xe = G(_(de.map((Ie) => Ie.return_))); + return i.createSignature( + /*declaration*/ + void 0, + /*typeParameters*/ + void 0, + /*thisParameter*/ + void 0, + ve, + Xe, + /*typePredicate*/ + void 0, + De, + 0 + /* None */ + ); + } + function Ae(de, ve) { + ve && !(ve.flags & 1) && !(ve.flags & 131072) && (de.candidateTypes || (de.candidateTypes = [])).push(ve); + } + function ge(de, ve) { + ve && !(ve.flags & 1) && !(ve.flags & 131072) && (de.candidateThisTypes || (de.candidateThisTypes = [])).push(ve); + } + } + var Gle = "fixReturnTypeInAsyncFunction", nEe = [ + p.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code + ]; + Us({ + errorCodes: nEe, + fixIds: [Gle], + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s } = t, o = i.getTypeChecker(), c = iEe(n, i.getTypeChecker(), s.start); + if (!c) + return; + const { returnTypeNode: _, returnType: u, promisedTypeNode: d, promisedType: g } = c, h = Yr.ChangeTracker.with(t, (S) => sEe(S, n, _, d)); + return [Ds( + Gle, + h, + [p.Replace_0_with_Promise_1, o.typeToString(u), o.typeToString(g)], + Gle, + p.Fix_all_incorrect_return_type_of_an_async_functions + )]; + }, + getAllCodeActions: (e) => Za(e, nEe, (t, n) => { + const i = iEe(n.file, e.program.getTypeChecker(), n.start); + i && sEe(t, n.file, i.returnTypeNode, i.promisedTypeNode); + }) + }); + function iEe(e, t, n) { + if (Qr(e)) + return; + const i = Ei(e, n), s = sr(i, so), o = s?.type; + if (!o) + return; + const c = t.getTypeFromTypeNode(o), _ = t.getAwaitedType(c) || t.getVoidType(), u = t.typeToTypeNode( + _, + /*enclosingDeclaration*/ + o, + /*flags*/ + void 0 + ); + if (u) + return { returnTypeNode: o, returnType: c, promisedTypeNode: u, promisedType: _ }; + } + function sEe(e, t, n, i) { + e.replaceNode(t, n, N.createTypeReferenceNode("Promise", [i])); + } + var aEe = "disableJsDiagnostics", oEe = "disableJsDiagnostics", cEe = Ii(Object.keys(p), (e) => { + const t = p[e]; + return t.category === 1 ? t.code : void 0; + }); + Us({ + errorCodes: cEe, + getCodeActions: function(t) { + const { sourceFile: n, program: i, span: s, host: o, formatContext: c } = t; + if (!Qr(n) || !j4(n, i.getCompilerOptions())) + return; + const _ = n.checkJsDirective ? "" : k0(o, c.options), u = [ + // fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file. + Nd( + aEe, + [rxe(n.fileName, [ + oN( + n.checkJsDirective ? Mc(n.checkJsDirective.pos, n.checkJsDirective.end) : jl(0, 0), + `// @ts-nocheck${_}` + ) + ])], + p.Disable_checking_for_this_file + ) + ]; + return Yr.isValidLocationToAddComment(n, s.start) && u.unshift(Ds(aEe, Yr.ChangeTracker.with(t, (d) => lEe(d, n, s.start)), p.Ignore_this_error_message, oEe, p.Add_ts_ignore_to_all_error_messages)), u; + }, + fixIds: [oEe], + getAllCodeActions: (e) => { + const t = /* @__PURE__ */ new Set(); + return Za(e, cEe, (n, i) => { + Yr.isValidLocationToAddComment(i.file, i.start) && lEe(n, i.file, i.start, t); + }); + } + }); + function lEe(e, t, n, i) { + const { line: s } = Vs(t, n); + (!i || ih(i, s)) && e.insertCommentBeforeLine(t, s, n, " @ts-ignore"); + } + function $le(e, t, n, i, s, o, c) { + const _ = e.symbol.members; + for (const u of t) + _.has(u.escapedName) || _Ee( + u, + e, + n, + i, + s, + o, + c, + /*body*/ + void 0 + ); + } + function v6(e) { + return { + trackSymbol: () => !1, + moduleResolverHost: oU(e.program, e.host) + }; + } + var uEe = /* @__PURE__ */ ((e) => (e[e.Method = 1] = "Method", e[e.Property = 2] = "Property", e[e.All = 3] = "All", e))(uEe || {}); + function _Ee(e, t, n, i, s, o, c, _, u = 3, d = !1) { + const g = e.getDeclarations(), h = ul(g), S = i.program.getTypeChecker(), T = pa(i.program.getCompilerOptions()), C = h?.kind ?? 171, D = oe(e, h), P = h ? Au(h) : 0; + let O = P & 256; + O |= P & 1 ? 1 : P & 4 ? 4 : 0, h && u_(h) && (O |= 512); + const j = G(), F = S.getWidenedType(S.getTypeOfSymbolAtLocation(e, t)), V = !!(e.flags & 16777216), L = !!(t.flags & 33554432) || d, $ = Rf(n, s); + switch (C) { + case 171: + case 172: + let ne = 1; + ne |= $ === 0 ? 268435456 : 0; + let pe = S.typeToTypeNode(F, t, ne, v6(i)); + if (o) { + const H = SS(pe, T); + H && (pe = H.typeNode, Gx(o, H.symbols)); + } + c(N.createPropertyDeclaration( + j, + h ? K(D) : e.getName(), + V && u & 2 ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + pe, + /*initializer*/ + void 0 + )); + break; + case 177: + case 178: { + E.assertIsDefined(g); + let H = S.typeToTypeNode( + F, + t, + /*flags*/ + void 0, + v6(i) + ); + const ae = gy(g, h), le = ae.secondAccessor ? [ae.firstAccessor, ae.secondAccessor] : [ae.firstAccessor]; + if (o) { + const Ae = SS(H, T); + Ae && (H = Ae.typeNode, Gx(o, Ae.symbols)); + } + for (const Ae of le) + if (Af(Ae)) + c(N.createGetAccessorDeclaration( + j, + K(D), + He, + Z(H), + X(_, $, L) + )); + else { + E.assertNode(Ae, rf, "The counterpart to a getter should be a setter"); + const ge = bC(Ae), de = ge && Re(ge.name) ? dn(ge.name) : void 0; + c(N.createSetAccessorDeclaration( + j, + K(D), + Qle( + 1, + [de], + [Z(H)], + 1, + /*inJs*/ + !1 + ), + X(_, $, L) + )); + } + break; + } + case 173: + case 174: + E.assertIsDefined(g); + const fe = F.isUnion() ? Xs(F.types, (H) => H.getCallSignatures()) : F.getCallSignatures(); + if (!ut(fe)) + break; + if (g.length === 1) { + E.assert(fe.length === 1, "One declaration implies one signature"); + const H = fe[0]; + U($, H, j, K(D), X(_, $, L)); + break; + } + for (const H of fe) + U($, H, j, K(D)); + if (!L) + if (g.length > fe.length) { + const H = S.getSignatureFromDeclaration(g[g.length - 1]); + U($, H, j, K(D), X(_, $)); + } else + E.assert(g.length === fe.length, "Declarations and signatures should match count"), c(Qqe(S, i, t, fe, K(D), V && !!(u & 1), j, $, _)); + break; + } + function U(ne, pe, fe, H, ae) { + const le = eH(174, i, ne, pe, ae, H, fe, V && !!(u & 1), t, o); + le && c(le); + } + function G() { + let ne; + return O && (ne = gT(ne, N.createModifiersFromModifierFlags(O))), ce() && (ne = Tr(ne, N.createToken( + 164 + /* OverrideKeyword */ + ))), ne && N.createNodeArray(ne); + } + function ce() { + return !!(i.program.getCompilerOptions().noImplicitOverride && h && xb(h)); + } + function K(ne) { + return Re(ne) && ne.escapedText === "constructor" ? N.createComputedPropertyName(N.createStringLiteral( + dn(ne), + $ === 0 + /* Single */ + )) : qa( + ne, + /*includeTrivia*/ + !1 + ); + } + function X(ne, pe, fe) { + return fe ? void 0 : qa( + ne, + /*includeTrivia*/ + !1 + ) || Yle(pe); + } + function Z(ne) { + return qa( + ne, + /*includeTrivia*/ + !1 + ); + } + function oe(ne, pe) { + if (gc(ne) & 262144) { + const fe = ne.links.nameType; + if (fe && Fp(fe)) + return N.createIdentifier(Pi(Lp(fe))); + } + return qa( + es(pe), + /*includeTrivia*/ + !1 + ); + } + } + function eH(e, t, n, i, s, o, c, _, u, d) { + const g = t.program, h = g.getTypeChecker(), S = pa(g.getCompilerOptions()), T = Qr(u), C = 524545 | (n === 0 ? 268435456 : 0), D = h.signatureToSignatureDeclaration(i, e, u, C, v6(t)); + if (!D) + return; + let P = T ? void 0 : D.typeParameters, O = D.parameters, j = T ? void 0 : qa(D.type); + if (d) { + if (P) { + const $ = Zc(P, (U) => { + let G = U.constraint, ce = U.default; + if (G) { + const K = SS(G, S); + K && (G = K.typeNode, Gx(d, K.symbols)); + } + if (ce) { + const K = SS(ce, S); + K && (ce = K.typeNode, Gx(d, K.symbols)); + } + return N.updateTypeParameterDeclaration( + U, + U.modifiers, + U.name, + G, + ce + ); + }); + P !== $ && (P = ot(N.createNodeArray($, P.hasTrailingComma), P)); + } + const L = Zc(O, ($) => { + let U = T ? void 0 : $.type; + if (U) { + const G = SS(U, S); + G && (U = G.typeNode, Gx(d, G.symbols)); + } + return N.updateParameterDeclaration( + $, + $.modifiers, + $.dotDotDotToken, + $.name, + T ? void 0 : $.questionToken, + U, + $.initializer + ); + }); + if (O !== L && (O = ot(N.createNodeArray(L, O.hasTrailingComma), O)), j) { + const $ = SS(j, S); + $ && (j = $.typeNode, Gx(d, $.symbols)); + } + } + const F = _ ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, V = D.asteriskToken; + if (po(D)) + return N.updateFunctionExpression(D, c, D.asteriskToken, Jn(o, Re), P, O, j, s ?? D.body); + if (xo(D)) + return N.updateArrowFunction(D, c, P, O, j, D.equalsGreaterThanToken, s ?? D.body); + if (hc(D)) + return N.updateMethodDeclaration(D, c, V, o ?? N.createIdentifier(""), F, P, O, j, s); + if (Ac(D)) + return N.updateFunctionDeclaration(D, c, D.asteriskToken, Jn(o, Re), P, O, j, s ?? D.body); + } + function Xle(e, t, n, i, s, o, c) { + const _ = Rf(t.sourceFile, t.preferences), u = pa(t.program.getCompilerOptions()), d = v6(t), g = t.program.getTypeChecker(), h = Qr(c), { typeArguments: S, arguments: T, parent: C } = i, D = h ? void 0 : g.getContextualType(i), P = or(T, (ce) => Re(ce) ? ce.text : Dn(ce) && Re(ce.name) ? ce.name.text : void 0), O = h ? [] : or(T, (ce) => g.getTypeAtLocation(ce)), { argumentTypeNodes: j, argumentTypeParameters: F } = dEe( + g, + n, + O, + c, + u, + 1, + d + ), V = o ? N.createNodeArray(N.createModifiersFromModifierFlags(o)) : void 0, L = H5(C) ? N.createToken( + 42 + /* AsteriskToken */ + ) : void 0, $ = h ? void 0 : $qe(g, F, S), U = Qle( + T.length, + P, + j, + /*minArgumentCount*/ + void 0, + h + ), G = h || D === void 0 ? void 0 : g.typeToTypeNode( + D, + c, + /*flags*/ + void 0, + d + ); + switch (e) { + case 174: + return N.createMethodDeclaration( + V, + L, + s, + /*questionToken*/ + void 0, + $, + U, + G, + Yle(_) + ); + case 173: + return N.createMethodSignature( + V, + s, + /*questionToken*/ + void 0, + $, + U, + G === void 0 ? N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ) : G + ); + case 262: + return E.assert(typeof s == "string" || Re(s), "Unexpected name"), N.createFunctionDeclaration( + V, + L, + s, + $, + U, + G, + X9(p.Function_not_implemented.message, _) + ); + default: + E.fail("Unexpected kind"); + } + } + function $qe(e, t, n) { + const i = new Set(t.map((o) => o[0])), s = new Map(t); + if (n) { + const o = n.filter((_) => !t.some((u) => { + var d; + return e.getTypeAtLocation(_) === ((d = u[1]) == null ? void 0 : d.argumentType); + })), c = i.size + o.length; + for (let _ = 0; i.size < c; _ += 1) + i.add(fEe(_)); + } + return ts( + i.values(), + (o) => { + var c; + return N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + o, + (c = s.get(o)) == null ? void 0 : c.constraint + ); + } + ); + } + function fEe(e) { + return 84 + e <= 90 ? String.fromCharCode(84 + e) : `T${e}`; + } + function $9(e, t, n, i, s, o, c) { + let _ = e.typeToTypeNode(n, i, o, c); + if (_ && Qm(_)) { + const u = SS(_, s); + u && (Gx(t, u.symbols), _ = u.typeNode); + } + return qa(_); + } + function pEe(e) { + return e.isUnionOrIntersection() ? e.types.some(pEe) : e.flags & 262144; + } + function dEe(e, t, n, i, s, o, c) { + const _ = [], u = /* @__PURE__ */ new Map(); + for (let d = 0; d < n.length; d += 1) { + const g = n[d]; + if (g.isUnionOrIntersection() && g.types.some(pEe)) { + const D = fEe(d); + _.push(N.createTypeReferenceNode(D)), u.set(D, void 0); + continue; + } + const h = e.getBaseTypeOfLiteralType(g), S = $9(e, t, h, i, s, o, c); + if (!S) + continue; + _.push(S); + const T = mEe(g), C = g.isTypeParameter() && g.constraint && !Xqe(g.constraint) ? $9(e, t, g.constraint, i, s, o, c) : void 0; + T && u.set(T, { argumentType: g, constraint: C }); + } + return { argumentTypeNodes: _, argumentTypeParameters: ts(u.entries()) }; + } + function Xqe(e) { + return e.flags & 524288 && e.objectFlags === 16; + } + function mEe(e) { + var t; + if (e.flags & 3145728) + for (const n of e.types) { + const i = mEe(n); + if (i) + return i; + } + return e.flags & 262144 ? (t = e.getSymbol()) == null ? void 0 : t.getName() : void 0; + } + function Qle(e, t, n, i, s) { + const o = [], c = /* @__PURE__ */ new Map(); + for (let _ = 0; _ < e; _++) { + const u = t?.[_] || `arg${_}`, d = c.get(u); + c.set(u, (d || 0) + 1); + const g = N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + /*name*/ + u + (d || ""), + /*questionToken*/ + i !== void 0 && _ >= i ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + /*type*/ + s ? void 0 : n?.[_] || N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + ), + /*initializer*/ + void 0 + ); + o.push(g); + } + return o; + } + function Qqe(e, t, n, i, s, o, c, _, u) { + let d = i[0], g = i[0].minArgumentCount, h = !1; + for (const D of i) + g = Math.min(D.minArgumentCount, g), gu(D) && (h = !0), D.parameters.length >= d.parameters.length && (!gu(D) || gu(d)) && (d = D); + const S = d.parameters.length - (gu(d) ? 1 : 0), T = d.parameters.map((D) => D.name), C = Qle( + S, + T, + /*types*/ + void 0, + g, + /*inJs*/ + !1 + ); + if (h) { + const D = N.createParameterDeclaration( + /*modifiers*/ + void 0, + N.createToken( + 26 + /* DotDotDotToken */ + ), + T[S] || "rest", + /*questionToken*/ + S >= g ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + N.createArrayTypeNode(N.createKeywordTypeNode( + 159 + /* UnknownKeyword */ + )), + /*initializer*/ + void 0 + ); + C.push(D); + } + return Zqe( + c, + s, + o, + /*typeParameters*/ + void 0, + C, + Yqe(i, e, t, n), + _, + u + ); + } + function Yqe(e, t, n, i) { + if (Dr(e)) { + const s = t.getUnionType(or(e, t.getReturnTypeOfSignature)); + return t.typeToTypeNode(s, i, 1, v6(n)); + } + } + function Zqe(e, t, n, i, s, o, c, _) { + return N.createMethodDeclaration( + e, + /*asteriskToken*/ + void 0, + t, + n ? N.createToken( + 58 + /* QuestionToken */ + ) : void 0, + i, + s, + o, + _ || Yle(c) + ); + } + function Yle(e) { + return X9(p.Method_not_implemented.message, e); + } + function X9(e, t) { + return N.createBlock( + [N.createThrowStatement( + N.createNewExpression( + N.createIdentifier("Error"), + /*typeArguments*/ + void 0, + // TODO Handle auto quote preference. + [N.createStringLiteral( + e, + /*isSingleQuote*/ + t === 0 + /* Single */ + )] + ) + )], + /*multiLine*/ + !0 + ); + } + function Zle(e, t, n) { + const i = s4(t); + if (!i) return; + const s = eue(i, "compilerOptions"); + if (s === void 0) { + e.insertNodeAtObjectStart( + t, + i, + tH( + "compilerOptions", + N.createObjectLiteralExpression( + n.map(([c, _]) => tH(c, _)), + /*multiLine*/ + !0 + ) + ) + ); + return; + } + const o = s.initializer; + if (Gs(o)) + for (const [c, _] of n) { + const u = eue(o, c); + u === void 0 ? e.insertNodeAtObjectStart(t, o, tH(c, _)) : e.replaceNode(t, u.initializer, _); + } + } + function Kle(e, t, n, i) { + Zle(e, t, [[n, i]]); + } + function tH(e, t) { + return N.createPropertyAssignment(N.createStringLiteral(e), t); + } + function eue(e, t) { + return Nn(e.properties, (n) => qc(n) && !!n.name && Ks(n.name) && n.name.text === t); + } + function SS(e, t) { + let n; + const i = Ge(e, s, ai); + if (n && i) + return { typeNode: i, symbols: n }; + function s(o) { + if (a0(o) && o.qualifier) { + const c = tf(o.qualifier), _ = m9(c.symbol, t), u = _ !== c.text ? gEe(o.qualifier, N.createIdentifier(_)) : o.qualifier; + n = Tr(n, c.symbol); + const d = Ar(o.typeArguments, s, ai); + return N.createTypeReferenceNode(u, d); + } + return gr( + o, + s, + /*context*/ + void 0 + ); + } + } + function gEe(e, t) { + return e.kind === 80 ? t : N.createQualifiedName(gEe(e.left, t), e.right); + } + function Gx(e, t) { + t.forEach((n) => e.addImportFromExportedSymbol( + n, + /*isValidTypeOnlyUseSite*/ + !0 + )); + } + function tue(e, t) { + const n = wc(t); + let i = Ei(e, t.start); + for (; i.end < n; ) + i = i.parent; + return i; + } + function hEe(e, t, n, i, s, o) { + const c = bEe(e, t, n, i); + if (!c || zx.isRefactorErrorInfo(c)) return; + const _ = Yr.ChangeTracker.fromContext(s), { isStatic: u, isReadonly: d, fieldName: g, accessorName: h, originalName: S, type: T, container: C, declaration: D } = c; + of(g), of(h), of(D), of(C); + let P, O; + if (Qn(C)) { + const F = Au(D); + if (p_(e)) { + const V = N.createModifiersFromModifierFlags(F); + P = V, O = V; + } else + P = N.createModifiersFromModifierFlags(tHe(F)), O = N.createModifiersFromModifierFlags(rHe(F)); + jb(D) && (O = Hi(cy(D), O)); + } + oHe(_, e, D, T, g, O); + const j = nHe(g, h, T, P, u, C); + if (of(j), SEe(_, e, j, D, C), d) { + const F = Ng(C); + F && cHe(_, e, F, g.text, S); + } else { + const F = iHe(g, h, T, P, u, C); + of(F), SEe(_, e, F, D, C); + } + return _.getChanges(); + } + function Kqe(e) { + return Re(e) || Ks(e); + } + function eHe(e) { + return Q_(e, e.parent) || rs(e) || qc(e); + } + function yEe(e, t) { + return Re(t) ? N.createIdentifier(e) : N.createStringLiteral(e); + } + function vEe(e, t, n) { + const i = t ? n.name : N.createThis(); + return Re(e) ? N.createPropertyAccessExpression(i, e) : N.createElementAccessExpression(i, N.createStringLiteralFromNode(e)); + } + function tHe(e) { + return e &= -9, e &= -3, e & 4 || (e |= 1), e; + } + function rHe(e) { + return e &= -2, e &= -5, e |= 2, e; + } + function bEe(e, t, n, i, s = !0) { + const o = Ei(e, n), c = n === i && s, _ = sr(o.parent, eHe), u = 271; + if (!_ || !(BF(_.name, e, n, i) || c)) + return { + error: as(p.Could_not_find_property_for_which_to_generate_accessor) + }; + if (!Kqe(_.name)) + return { + error: as(p.Name_is_not_valid) + }; + if ((Au(_) & 98303 | u) !== u) + return { + error: as(p.Can_only_convert_property_with_modifier) + }; + const d = _.name.text, g = LU(d), h = yEe(g ? d : bS(`_${d}`, e), _.name), S = yEe(g ? bS(d.substring(1), e) : d, _.name); + return { + isStatic: Uc(_), + isReadonly: T4(_), + type: lHe(_, t), + container: _.kind === 169 ? _.parent.parent : _.parent, + originalName: _.name.text, + declaration: _, + fieldName: h, + accessorName: S, + renameAccessor: g + }; + } + function nHe(e, t, n, i, s, o) { + return N.createGetAccessorDeclaration( + i, + t, + [], + n, + N.createBlock( + [ + N.createReturnStatement( + vEe(e, s, o) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function iHe(e, t, n, i, s, o) { + return N.createSetAccessorDeclaration( + i, + t, + [N.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + N.createIdentifier("value"), + /*questionToken*/ + void 0, + n + )], + N.createBlock( + [ + N.createExpressionStatement( + N.createAssignment( + vEe(e, s, o), + N.createIdentifier("value") + ) + ) + ], + /*multiLine*/ + !0 + ) + ); + } + function sHe(e, t, n, i, s, o) { + const c = N.updatePropertyDeclaration( + n, + o, + s, + n.questionToken || n.exclamationToken, + i, + n.initializer + ); + e.replaceNode(t, n, c); + } + function aHe(e, t, n, i) { + let s = N.updatePropertyAssignment(n, i, n.initializer); + (s.modifiers || s.questionToken || s.exclamationToken) && (s === n && (s = N.cloneNode(s)), s.modifiers = void 0, s.questionToken = void 0, s.exclamationToken = void 0), e.replacePropertyAssignment(t, n, s); + } + function oHe(e, t, n, i, s, o) { + rs(n) ? sHe(e, t, n, i, s, o) : qc(n) ? aHe(e, t, n, s) : e.replaceNode(t, n, N.updateParameterDeclaration(n, o, n.dotDotDotToken, Is(s, Re), n.questionToken, n.type, n.initializer)); + } + function SEe(e, t, n, i, s) { + Q_(i, i.parent) ? e.insertMemberAtStart(t, s, n) : qc(i) ? e.insertNodeAfterComma(t, i, n) : e.insertNodeAfter(t, i, n); + } + function cHe(e, t, n, i, s) { + n.body && n.body.forEachChild(function o(c) { + ho(c) && c.expression.kind === 110 && Ks(c.argumentExpression) && c.argumentExpression.text === s && GT(c) && e.replaceNode(t, c.argumentExpression, N.createStringLiteral(i)), Dn(c) && c.expression.kind === 110 && c.name.text === s && GT(c) && e.replaceNode(t, c.name, N.createIdentifier(i)), !ps(c) && !Qn(c) && c.forEachChild(o); + }); + } + function lHe(e, t) { + const n = dK(e); + if (rs(e) && n && e.questionToken) { + const i = t.getTypeChecker(), s = i.getTypeFromTypeNode(n); + if (!i.isTypeAssignableTo(i.getUndefinedType(), s)) { + const o = ky(n) ? n.types : [n]; + return N.createUnionTypeNode([...o, N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + )]); + } + } + return n; + } + function rue(e, t) { + const n = []; + for (; e; ) { + const i = vb(e), s = i && t.getSymbolAtLocation(i.expression); + if (!s) break; + const o = s.flags & 2097152 ? t.getAliasedSymbol(s) : s, c = o.declarations && Nn(o.declarations, Qn); + if (!c) break; + n.push(c), e = c; + } + return n; + } + var TEe = "invalidImportSyntax"; + function uHe(e, t) { + const n = xr(t), i = uC(t), s = e.program.getCompilerOptions(), o = []; + return o.push(xEe(e, n, t, Ly( + i.name, + /*namedImports*/ + void 0, + t.moduleSpecifier, + Rf(n, e.preferences) + ))), Nu(s) === 1 && o.push(xEe( + e, + n, + t, + N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + i.name, + N.createExternalModuleReference(t.moduleSpecifier) + ) + )), o; + } + function xEe(e, t, n, i) { + const s = Yr.ChangeTracker.with(e, (o) => o.replaceNode(t, n, i)); + return Nd(TEe, s, [p.Replace_import_with_0, s[0].textChanges[0].newText]); + } + Us({ + errorCodes: [ + p.This_expression_is_not_callable.code, + p.This_expression_is_not_constructable.code + ], + getCodeActions: _He + }); + function _He(e) { + const t = e.sourceFile, n = p.This_expression_is_not_callable.code === e.errorCode ? 213 : 214, i = sr(Ei(t, e.span.start), (o) => o.kind === n); + if (!i) + return []; + const s = i.expression; + return kEe(e, s); + } + Us({ + errorCodes: [ + // The following error codes cover pretty much all assignability errors that could involve an expression + p.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, + p.Type_0_does_not_satisfy_the_constraint_1.code, + p.Type_0_is_not_assignable_to_type_1.code, + p.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, + p.Type_predicate_0_is_not_assignable_to_1.code, + p.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code, + p._0_index_type_1_is_not_assignable_to_2_index_type_3.code, + p.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code, + p.Property_0_in_type_1_is_not_assignable_to_type_2.code, + p.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code, + p.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code + ], + getCodeActions: fHe + }); + function fHe(e) { + const t = e.sourceFile, n = sr(Ei(t, e.span.start), (i) => i.getStart() === e.span.start && i.getEnd() === e.span.start + e.span.length); + return n ? kEe(e, n) : []; + } + function kEe(e, t) { + const n = e.program.getTypeChecker().getTypeAtLocation(t); + if (!(n.symbol && qm(n.symbol) && n.symbol.links.originatingImport)) + return []; + const i = [], s = n.symbol.links.originatingImport; + if (hf(s) || Bn(i, uHe(e, s)), ct(t) && !(Bl(t.parent) && t.parent.name === t)) { + const o = e.sourceFile, c = Yr.ChangeTracker.with(e, (_) => _.replaceNode(o, t, N.createPropertyAccessExpression(t, "default"), {})); + i.push(Nd(TEe, c, p.Use_synthetic_default_member)); + } + return i; + } + var nue = "strictClassInitialization", iue = "addMissingPropertyDefiniteAssignmentAssertions", sue = "addMissingPropertyUndefinedType", aue = "addMissingPropertyInitializer", CEe = [p.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code]; + Us({ + errorCodes: CEe, + getCodeActions: function(t) { + const n = EEe(t.sourceFile, t.span.start); + if (!n) return; + const i = []; + return Tr(i, dHe(t, n)), Tr(i, pHe(t, n)), Tr(i, mHe(t, n)), i; + }, + fixIds: [iue, sue, aue], + getAllCodeActions: (e) => Za(e, CEe, (t, n) => { + const i = EEe(n.file, n.start); + if (i) + switch (e.fixId) { + case iue: + DEe(t, n.file, i.prop); + break; + case sue: + PEe(t, n.file, i); + break; + case aue: + const s = e.program.getTypeChecker(), o = AEe(s, i.prop); + if (!o) return; + wEe(t, n.file, i.prop, o); + break; + default: + E.fail(JSON.stringify(e.fixId)); + } + }) + }); + function EEe(e, t) { + const n = Ei(e, t); + if (Re(n) && rs(n.parent)) { + const i = Vc(n.parent); + if (i) + return { type: i, prop: n.parent, isJs: Qr(n.parent) }; + } + } + function pHe(e, t) { + if (t.isJs) return; + const n = Yr.ChangeTracker.with(e, (i) => DEe(i, e.sourceFile, t.prop)); + return Ds(nue, n, [p.Add_definite_assignment_assertion_to_property_0, t.prop.getText()], iue, p.Add_definite_assignment_assertions_to_all_uninitialized_properties); + } + function DEe(e, t, n) { + of(n); + const i = N.updatePropertyDeclaration( + n, + n.modifiers, + n.name, + N.createToken( + 54 + /* ExclamationToken */ + ), + n.type, + n.initializer + ); + e.replaceNode(t, n, i); + } + function dHe(e, t) { + const n = Yr.ChangeTracker.with(e, (i) => PEe(i, e.sourceFile, t)); + return Ds(nue, n, [p.Add_undefined_type_to_property_0, t.prop.name.getText()], sue, p.Add_undefined_type_to_all_uninitialized_properties); + } + function PEe(e, t, n) { + const i = N.createKeywordTypeNode( + 157 + /* UndefinedKeyword */ + ), s = ky(n.type) ? n.type.types.concat(i) : [n.type, i], o = N.createUnionTypeNode(s); + n.isJs ? e.addJSDocTags(t, n.prop, [N.createJSDocTypeTag( + /*tagName*/ + void 0, + N.createJSDocTypeExpression(o) + )]) : e.replaceNode(t, n.type, o); + } + function mHe(e, t) { + if (t.isJs) return; + const n = e.program.getTypeChecker(), i = AEe(n, t.prop); + if (!i) return; + const s = Yr.ChangeTracker.with(e, (o) => wEe(o, e.sourceFile, t.prop, i)); + return Ds(nue, s, [p.Add_initializer_to_property_0, t.prop.name.getText()], aue, p.Add_initializers_to_all_uninitialized_properties); + } + function wEe(e, t, n, i) { + of(n); + const s = N.updatePropertyDeclaration( + n, + n.modifiers, + n.name, + n.questionToken, + n.type, + i + ); + e.replaceNode(t, n, s); + } + function AEe(e, t) { + return NEe(e, e.getTypeFromTypeNode(t.type)); + } + function NEe(e, t) { + if (t.flags & 512) + return t === e.getFalseType() || t === e.getFalseType( + /*fresh*/ + !0 + ) ? N.createFalse() : N.createTrue(); + if (t.isStringLiteral()) + return N.createStringLiteral(t.value); + if (t.isNumberLiteral()) + return N.createNumericLiteral(t.value); + if (t.flags & 2048) + return N.createBigIntLiteral(t.value); + if (t.isUnion()) + return xc(t.types, (n) => NEe(e, n)); + if (t.isClass()) { + const n = gh(t.symbol); + if (!n || Vn( + n, + 64 + /* Abstract */ + )) return; + const i = Ng(n); + return i && i.parameters.length ? void 0 : N.createNewExpression( + N.createIdentifier(t.symbol.name), + /*typeArguments*/ + void 0, + /*argumentsArray*/ + void 0 + ); + } else if (e.isArrayLikeType(t)) + return N.createArrayLiteralExpression(); + } + var oue = "requireInTs", IEe = [p.require_call_may_be_converted_to_an_import.code]; + Us({ + errorCodes: IEe, + getCodeActions(e) { + const t = FEe(e.sourceFile, e.program, e.span.start); + if (!t) + return; + const n = Yr.ChangeTracker.with(e, (i) => OEe(i, e.sourceFile, t)); + return [Ds(oue, n, p.Convert_require_to_import, oue, p.Convert_all_require_to_import)]; + }, + fixIds: [oue], + getAllCodeActions: (e) => Za(e, IEe, (t, n) => { + const i = FEe(n.file, e.program, n.start); + i && OEe(t, e.sourceFile, i); + }) + }); + function OEe(e, t, n) { + const { allowSyntheticDefaults: i, defaultImportName: s, namedImports: o, statement: c, required: _ } = n; + e.replaceNode( + t, + c, + s && !i ? N.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + !1, + s, + N.createExternalModuleReference(_) + ) : N.createImportDeclaration( + /*modifiers*/ + void 0, + N.createImportClause( + /*isTypeOnly*/ + !1, + s, + o + ), + _, + /*attributes*/ + void 0 + ) + ); + } + function FEe(e, t, n) { + const { parent: i } = Ei(e, n); + d_( + i, + /*requireStringLiteralLikeArgument*/ + !0 + ) || E.failBadSyntaxKind(i); + const s = Is(i.parent, ti), o = Jn(s.name, Re), c = If(s.name) ? gHe(s.name) : void 0; + if (o || c) + return { + allowSyntheticDefaults: ZT(t.getCompilerOptions()), + defaultImportName: o, + namedImports: c, + statement: Is(s.parent.parent, yc), + required: fa(i.arguments) + }; + } + function gHe(e) { + const t = []; + for (const n of e.elements) { + if (!Re(n.name) || n.initializer) + return; + t.push(N.createImportSpecifier( + /*isTypeOnly*/ + !1, + Jn(n.propertyName, Re), + n.name + )); + } + if (t.length) + return N.createNamedImports(t); + } + var cue = "useDefaultImport", LEe = [p.Import_may_be_converted_to_a_default_import.code]; + Us({ + errorCodes: LEe, + getCodeActions(e) { + const { sourceFile: t, span: { start: n } } = e, i = MEe(t, n); + if (!i) return; + const s = Yr.ChangeTracker.with(e, (o) => REe(o, t, i, e.preferences)); + return [Ds(cue, s, p.Convert_to_default_import, cue, p.Convert_all_to_default_imports)]; + }, + fixIds: [cue], + getAllCodeActions: (e) => Za(e, LEe, (t, n) => { + const i = MEe(n.file, n.start); + i && REe(t, n.file, i, e.preferences); + }) + }); + function MEe(e, t) { + const n = Ei(e, t); + if (!Re(n)) return; + const { parent: i } = n; + if (nl(i) && Sh(i.moduleReference)) + return { importNode: i, name: n, moduleSpecifier: i.moduleReference.expression }; + if (Rg(i) && oc(i.parent.parent)) { + const s = i.parent.parent; + return { importNode: s, name: n, moduleSpecifier: s.moduleSpecifier }; + } + } + function REe(e, t, n, i) { + e.replaceNode(t, n.importNode, Ly( + n.name, + /*namedImports*/ + void 0, + n.moduleSpecifier, + Rf(t, i) + )); + } + var lue = "useBigintLiteral", jEe = [ + p.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code + ]; + Us({ + errorCodes: jEe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => BEe(i, t.sourceFile, t.span)); + if (n.length > 0) + return [Ds(lue, n, p.Convert_to_a_bigint_numeric_literal, lue, p.Convert_all_to_bigint_numeric_literals)]; + }, + fixIds: [lue], + getAllCodeActions: (e) => Za(e, jEe, (t, n) => BEe(t, n.file, n)) + }); + function BEe(e, t, n) { + const i = Jn(Ei(t, n.start), m_); + if (!i) + return; + const s = i.getText(t) + "n"; + e.replaceNode(t, i, N.createBigIntLiteral(s)); + } + var hHe = "fixAddModuleReferTypeMissingTypeof", uue = hHe, JEe = [p.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code]; + Us({ + errorCodes: JEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = zEe(n, i.start), o = Yr.ChangeTracker.with(t, (c) => WEe(c, n, s)); + return [Ds(uue, o, p.Add_missing_typeof, uue, p.Add_missing_typeof)]; + }, + fixIds: [uue], + getAllCodeActions: (e) => Za(e, JEe, (t, n) => WEe(t, e.sourceFile, zEe(n.file, n.start))) + }); + function zEe(e, t) { + const n = Ei(e, t); + return E.assert(n.kind === 102, "This token should be an ImportKeyword"), E.assert(n.parent.kind === 205, "Token parent should be an ImportType"), n.parent; + } + function WEe(e, t, n) { + const i = N.updateImportTypeNode( + n, + n.argument, + n.attributes, + n.qualifier, + n.typeArguments, + /*isTypeOf*/ + !0 + ); + e.replaceNode(t, n, i); + } + var _ue = "wrapJsxInFragment", VEe = [p.JSX_expressions_must_have_one_parent_element.code]; + Us({ + errorCodes: VEe, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = UEe(n, i.start); + if (!s) return; + const o = Yr.ChangeTracker.with(t, (c) => qEe(c, n, s)); + return [Ds(_ue, o, p.Wrap_in_JSX_fragment, _ue, p.Wrap_all_unparented_JSX_in_JSX_fragment)]; + }, + fixIds: [_ue], + getAllCodeActions: (e) => Za(e, VEe, (t, n) => { + const i = UEe(e.sourceFile, n.start); + i && qEe(t, e.sourceFile, i); + }) + }); + function UEe(e, t) { + let s = Ei(e, t).parent.parent; + if (!(!cn(s) && (s = s.parent, !cn(s))) && ic(s.operatorToken)) + return s; + } + function qEe(e, t, n) { + const i = yHe(n); + i && e.replaceNode(t, n, N.createJsxFragment(N.createJsxOpeningFragment(), i, N.createJsxJsxClosingFragment())); + } + function yHe(e) { + const t = []; + let n = e; + for (; ; ) + if (cn(n) && ic(n.operatorToken) && n.operatorToken.kind === 28) { + if (t.push(n.left), Bw(n.right)) + return t.push(n.right), t; + if (cn(n.right)) { + n = n.right; + continue; + } else return; + } else return; + } + var fue = "wrapDecoratorInParentheses", HEe = [p.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code]; + Us({ + errorCodes: HEe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => GEe(i, t.sourceFile, t.span.start)); + return [Ds(fue, n, p.Wrap_in_parentheses, fue, p.Wrap_all_invalid_decorator_expressions_in_parentheses)]; + }, + fixIds: [fue], + getAllCodeActions: (e) => Za(e, HEe, (t, n) => GEe(t, n.file, n.start)) + }); + function GEe(e, t, n) { + const i = Ei(t, n), s = sr(i, dl); + E.assert(!!s, "Expected position to be owned by a decorator."); + const o = N.createParenthesizedExpression(s.expression); + e.replaceNode(t, s.expression, o); + } + var pue = "fixConvertToMappedObjectType", $Ee = [p.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code]; + Us({ + errorCodes: $Ee, + getCodeActions: function(t) { + const { sourceFile: n, span: i } = t, s = XEe(n, i.start); + if (!s) return; + const o = Yr.ChangeTracker.with(t, (_) => QEe(_, n, s)), c = dn(s.container.name); + return [Ds(pue, o, [p.Convert_0_to_mapped_object_type, c], pue, [p.Convert_0_to_mapped_object_type, c])]; + }, + fixIds: [pue], + getAllCodeActions: (e) => Za(e, $Ee, (t, n) => { + const i = XEe(n.file, n.start); + i && QEe(t, n.file, i); + }) + }); + function XEe(e, t) { + const n = Ei(e, t), i = Jn(n.parent.parent, Pb); + if (!i) return; + const s = Vl(i.parent) ? i.parent : Jn(i.parent.parent, Rp); + if (s) + return { indexSignature: i, container: s }; + } + function vHe(e, t) { + return N.createTypeAliasDeclaration(e.modifiers, e.name, e.typeParameters, t); + } + function QEe(e, t, { indexSignature: n, container: i }) { + const o = (Vl(i) ? i.members : i.type.members).filter((g) => !Pb(g)), c = fa(n.parameters), _ = N.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + Is(c.name, Re), + c.type + ), u = N.createMappedTypeNode( + T4(n) ? N.createModifier( + 148 + /* ReadonlyKeyword */ + ) : void 0, + _, + /*nameType*/ + void 0, + n.questionToken, + n.type, + /*members*/ + void 0 + ), d = N.createIntersectionTypeNode([ + ...d4(i), + u, + ...o.length ? [N.createTypeLiteralNode(o)] : He + ]); + e.replaceNode(t, i, vHe(i, d)); + } + var YEe = "removeAccidentalCallParentheses", bHe = [ + p.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code + ]; + Us({ + errorCodes: bHe, + getCodeActions(e) { + const t = sr(Ei(e.sourceFile, e.span.start), Es); + if (!t) + return; + const n = Yr.ChangeTracker.with(e, (i) => { + i.deleteRange(e.sourceFile, { pos: t.expression.end, end: t.end }); + }); + return [Nd(YEe, n, p.Remove_parentheses)]; + }, + fixIds: [YEe] + }); + var due = "removeUnnecessaryAwait", ZEe = [ + p.await_has_no_effect_on_the_type_of_this_expression.code + ]; + Us({ + errorCodes: ZEe, + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => KEe(i, t.sourceFile, t.span)); + if (n.length > 0) + return [Ds(due, n, p.Remove_unnecessary_await, due, p.Remove_all_unnecessary_uses_of_await)]; + }, + fixIds: [due], + getAllCodeActions: (e) => Za(e, ZEe, (t, n) => KEe(t, n.file, n)) + }); + function KEe(e, t, n) { + const i = Jn( + Ei(t, n.start), + (_) => _.kind === 135 + /* AwaitKeyword */ + ), s = i && Jn(i.parent, Cy); + if (!s) + return; + let o = s; + if (Qu(s.parent)) { + const _ = kC( + s.expression, + /*stopAtCallExpressions*/ + !1 + ); + if (Re(_)) { + const u = sl(s.parent.pos, t); + u && u.kind !== 105 && (o = s.parent); + } + } + e.replaceNode(t, o, s.expression); + } + var e4e = [p.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code], mue = "splitTypeOnlyImport"; + Us({ + errorCodes: e4e, + fixIds: [mue], + getCodeActions: function(t) { + const n = Yr.ChangeTracker.with(t, (i) => r4e(i, t4e(t.sourceFile, t.span), t)); + if (n.length) + return [Ds(mue, n, p.Split_into_two_separate_import_declarations, mue, p.Split_all_invalid_type_only_imports)]; + }, + getAllCodeActions: (e) => Za(e, e4e, (t, n) => { + r4e(t, t4e(e.sourceFile, n), e); + }) + }); + function t4e(e, t) { + return sr(Ei(e, t.start), oc); + } + function r4e(e, t, n) { + if (!t) + return; + const i = E.checkDefined(t.importClause); + e.replaceNode( + n.sourceFile, + t, + N.updateImportDeclaration( + t, + t.modifiers, + N.updateImportClause( + i, + i.isTypeOnly, + i.name, + /*namedBindings*/ + void 0 + ), + t.moduleSpecifier, + t.attributes + ) + ), e.insertNodeAfter( + n.sourceFile, + t, + N.createImportDeclaration( + /*modifiers*/ + void 0, + N.updateImportClause( + i, + i.isTypeOnly, + /*name*/ + void 0, + i.namedBindings + ), + t.moduleSpecifier, + t.attributes + ) + ); + } + var gue = "fixConvertConstToLet", n4e = [p.Cannot_assign_to_0_because_it_is_a_constant.code]; + Us({ + errorCodes: n4e, + getCodeActions: function(t) { + const { sourceFile: n, span: i, program: s } = t, o = i4e(n, i.start, s); + if (o === void 0) return; + const c = Yr.ChangeTracker.with(t, (_) => s4e(_, n, o.token)); + return [Ace(gue, c, p.Convert_const_to_let, gue, p.Convert_all_const_to_let)]; + }, + getAllCodeActions: (e) => { + const { program: t } = e, n = /* @__PURE__ */ new Map(); + return Vx(Yr.ChangeTracker.with(e, (i) => { + Ux(e, n4e, (s) => { + const o = i4e(s.file, s.start, t); + if (o && Kp(n, $s(o.symbol))) + return s4e(i, s.file, o.token); + }); + })); + }, + fixIds: [gue] + }); + function i4e(e, t, n) { + var i; + const o = n.getTypeChecker().getSymbolAtLocation(Ei(e, t)); + if (o === void 0) return; + const c = Jn((i = o?.valueDeclaration) == null ? void 0 : i.parent, Il); + if (c === void 0) return; + const _ = Ya(c, 87, e); + if (_ !== void 0) + return { symbol: o, token: _ }; + } + function s4e(e, t, n) { + e.replaceNode(t, n, N.createToken( + 121 + /* LetKeyword */ + )); + } + var hue = "fixExpectedComma", SHe = p._0_expected.code, a4e = [SHe]; + Us({ + errorCodes: a4e, + getCodeActions(e) { + const { sourceFile: t } = e, n = o4e(t, e.span.start, e.errorCode); + if (!n) return; + const i = Yr.ChangeTracker.with(e, (s) => c4e(s, t, n)); + return [Ds( + hue, + i, + [p.Change_0_to_1, ";", ","], + hue, + [p.Change_0_to_1, ";", ","] + )]; + }, + fixIds: [hue], + getAllCodeActions: (e) => Za(e, a4e, (t, n) => { + const i = o4e(n.file, n.start, n.code); + i && c4e(t, e.sourceFile, i); + }) + }); + function o4e(e, t, n) { + const i = Ei(e, t); + return i.kind === 27 && i.parent && (Gs(i.parent) || Wl(i.parent)) ? { node: i } : void 0; + } + function c4e(e, t, { node: n }) { + const i = N.createToken( + 28 + /* CommaToken */ + ); + e.replaceNode(t, n, i); + } + var THe = "addVoidToPromise", l4e = "addVoidToPromise", u4e = [ + p.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code, + p.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code + ]; + Us({ + errorCodes: u4e, + fixIds: [l4e], + getCodeActions(e) { + const t = Yr.ChangeTracker.with(e, (n) => _4e(n, e.sourceFile, e.span, e.program)); + if (t.length > 0) + return [Ds(THe, t, p.Add_void_to_Promise_resolved_without_a_value, l4e, p.Add_void_to_all_Promises_resolved_without_a_value)]; + }, + getAllCodeActions(e) { + return Za(e, u4e, (t, n) => _4e(t, n.file, n, e.program, /* @__PURE__ */ new Set())); + } + }); + function _4e(e, t, n, i, s) { + const o = Ei(t, n.start); + if (!Re(o) || !Es(o.parent) || o.parent.expression !== o || o.parent.arguments.length !== 0) return; + const c = i.getTypeChecker(), _ = c.getSymbolAtLocation(o), u = _?.valueDeclaration; + if (!u || !ji(u) || !Ib(u.parent.parent) || s?.has(u)) return; + s?.add(u); + const d = xHe(u.parent.parent); + if (ut(d)) { + const g = d[0], h = !ky(g) && !nS(g) && nS(N.createUnionTypeNode([g, N.createKeywordTypeNode( + 116 + /* VoidKeyword */ + )]).types[0]); + h && e.insertText(t, g.pos, "("), e.insertText(t, g.end, h ? ") | void" : " | void"); + } else { + const g = c.getResolvedSignature(o.parent), h = g?.parameters[0], S = h && c.getTypeOfSymbolAtLocation(h, u.parent.parent); + Qr(u) ? (!S || S.flags & 3) && (e.insertText(t, u.parent.parent.end, ")"), e.insertText(t, sa(t.text, u.parent.parent.pos), "/** @type {Promise} */(")) : (!S || S.flags & 2) && e.insertText(t, u.parent.parent.expression.end, ""); + } + } + function xHe(e) { + var t; + if (Qr(e)) { + if (Qu(e.parent)) { + const n = (t = M1(e.parent)) == null ? void 0 : t.typeExpression.type; + if (n && Nf(n) && Re(n.typeName) && dn(n.typeName) === "Promise") + return n.typeArguments; + } + } else + return e.typeArguments; + } + var $x = {}; + Qa($x, { + CompletionKind: () => w4e, + CompletionSource: () => p4e, + SortText: () => bu, + StringCompletions: () => fH, + SymbolOriginInfoKind: () => d4e, + createCompletionDetails: () => Z9, + createCompletionDetailsForSymbol: () => Cue, + getCompletionEntriesFromSymbols: () => xue, + getCompletionEntryDetails: () => KHe, + getCompletionEntrySymbol: () => tGe, + getCompletionsAtPosition: () => NHe, + getPropertiesForObjectExpression: () => lH, + moduleSpecifierResolutionCacheAttemptLimit: () => f4e, + moduleSpecifierResolutionLimit: () => yue + }); + var yue = 100, f4e = 1e3, bu = { + // Presets + LocalDeclarationPriority: "10", + LocationPriority: "11", + OptionalMember: "12", + MemberDeclaredBySpreadAssignment: "13", + SuggestedClassMembers: "14", + GlobalsOrKeywords: "15", + AutoImportSuggestions: "16", + ClassMemberSnippets: "17", + JavascriptIdentifiers: "18", + // Transformations + Deprecated(e) { + return "z" + e; + }, + ObjectLiteralProperty(e, t) { + return `${e}\0${t}\0`; + }, + SortBelow(e) { + return e + "1"; + } + }, p4e = /* @__PURE__ */ ((e) => (e.ThisProperty = "ThisProperty/", e.ClassMemberSnippet = "ClassMemberSnippet/", e.TypeOnlyAlias = "TypeOnlyAlias/", e.ObjectLiteralMethodSnippet = "ObjectLiteralMethodSnippet/", e.SwitchCases = "SwitchCases/", e.ObjectLiteralMemberWithComma = "ObjectLiteralMemberWithComma/", e))(p4e || {}), d4e = /* @__PURE__ */ ((e) => (e[e.ThisType = 1] = "ThisType", e[e.SymbolMember = 2] = "SymbolMember", e[e.Export = 4] = "Export", e[e.Promise = 8] = "Promise", e[e.Nullable = 16] = "Nullable", e[e.ResolvedExport = 32] = "ResolvedExport", e[e.TypeOnlyAlias = 64] = "TypeOnlyAlias", e[e.ObjectLiteralMethod = 128] = "ObjectLiteralMethod", e[e.Ignore = 256] = "Ignore", e[e.ComputedPropertyName = 512] = "ComputedPropertyName", e[ + e.SymbolMemberNoExport = 2 + /* SymbolMember */ + ] = "SymbolMemberNoExport", e[e.SymbolMemberExport = 6] = "SymbolMemberExport", e))(d4e || {}); + function kHe(e) { + return !!(e.kind & 1); + } + function CHe(e) { + return !!(e.kind & 2); + } + function Q9(e) { + return !!(e && e.kind & 4); + } + function lP(e) { + return !!(e && e.kind === 32); + } + function EHe(e) { + return Q9(e) || lP(e) || vue(e); + } + function DHe(e) { + return (Q9(e) || lP(e)) && !!e.isFromPackageJson; + } + function PHe(e) { + return !!(e.kind & 8); + } + function wHe(e) { + return !!(e.kind & 16); + } + function m4e(e) { + return !!(e && e.kind & 64); + } + function g4e(e) { + return !!(e && e.kind & 128); + } + function AHe(e) { + return !!(e && e.kind & 256); + } + function vue(e) { + return !!(e && e.kind & 512); + } + function h4e(e, t, n, i, s, o, c, _, u) { + var d, g, h; + const S = Io(), T = c || KT(Hu(i.getCompilerOptions())); + let C = !1, D = 0, P = 0, O = 0, j = 0; + const F = u({ + tryResolve: L, + skippedAny: () => C, + resolvedAny: () => P > 0, + resolvedBeyondLimit: () => P > yue + }), V = j ? ` (${(O / j * 100).toFixed(1)}% hit rate)` : ""; + return (d = t.log) == null || d.call(t, `${e}: resolved ${P} module specifiers, plus ${D} ambient and ${O} from cache${V}`), (g = t.log) == null || g.call(t, `${e}: response is ${C ? "incomplete" : "complete"}`), (h = t.log) == null || h.call(t, `${e}: ${Io() - S}`), F; + function L($, U) { + if (U) { + const X = n.getModuleSpecifierForBestExportInfo($, s, _); + return X && D++, X || "failed"; + } + const G = T || o.allowIncompleteCompletions && P < yue, ce = !G && o.allowIncompleteCompletions && j < f4e, K = G || ce ? n.getModuleSpecifierForBestExportInfo($, s, _, ce) : void 0; + return (!G && !ce || ce && !K) && (C = !0), P += K?.computedWithoutCacheCount || 0, O += $.length - (K?.computedWithoutCacheCount || 0), ce && j++, K || (T ? "failed" : "skipped"); + } + } + function NHe(e, t, n, i, s, o, c, _, u, d, g = !1) { + var h; + const { previousToken: S } = sH(s, i); + if (c && !Mx(i, s, S) && !fGe(i, c, S, s)) + return; + if (c === " ") + return o.includeCompletionsForImportStatements && o.includeCompletionsWithInsertText ? { isGlobalCompletion: !0, isMemberCompletion: !1, isNewIdentifierLocation: !0, isIncomplete: !0, entries: [] } : void 0; + const T = t.getCompilerOptions(), C = t.getTypeChecker(), D = o.allowIncompleteCompletions ? (h = e.getIncompleteCompletionsCache) == null ? void 0 : h.call(e) : void 0; + if (D && _ === 3 && S && Re(S)) { + const j = IHe(D, i, S, t, e, o, u, s); + if (j) + return j; + } else + D?.clear(); + const P = fH.getStringLiteralCompletions(i, s, S, T, e, t, n, o, g); + if (P) + return P; + if (S && qE(S.parent) && (S.kind === 83 || S.kind === 88 || S.kind === 80)) + return YHe(S.parent); + const O = A4e( + t, + n, + i, + T, + s, + o, + /*detailsEntryId*/ + void 0, + e, + d, + u + ); + if (O) + switch (O.kind) { + case 0: + const j = RHe(i, e, t, T, n, O, o, d, s, g); + return j?.isIncomplete && D?.set(j), j; + case 1: + return bue([ + ...bv.getJSDocTagNameCompletions(), + ...v4e( + i, + s, + C, + T, + o, + /*tagNameOnly*/ + !0 + ) + ]); + case 2: + return bue([ + ...bv.getJSDocTagCompletions(), + ...v4e( + i, + s, + C, + T, + o, + /*tagNameOnly*/ + !1 + ) + ]); + case 3: + return bue(bv.getJSDocParameterNameCompletions(O.tag)); + case 4: + return LHe(O.keywordCompletions, O.isNewIdentifierLocation); + default: + return E.assertNever(O); + } + } + function Y9(e, t) { + var n, i; + let s = cw(e.sortText, t.sortText); + return s === 0 && (s = cw(e.name, t.name)), s === 0 && ((n = e.data) != null && n.moduleSpecifier) && ((i = t.data) != null && i.moduleSpecifier) && (s = z3( + e.data.moduleSpecifier, + t.data.moduleSpecifier + )), s === 0 ? -1 : s; + } + function y4e(e) { + return !!e?.moduleSpecifier; + } + function IHe(e, t, n, i, s, o, c, _) { + const u = e.get(); + if (!u) return; + const d = h_(t, _), g = n.text.toLowerCase(), h = SN(t, s, i, o, c), S = h4e( + "continuePreviousIncompleteResponse", + s, + vu.createImportSpecifierResolver(t, i, s, o), + i, + n.getStart(), + o, + /*isForImportStatementCompletion*/ + !1, + Y1(n), + (T) => { + const C = Ii(u.entries, (D) => { + var P; + if (!D.hasAction || !D.source || !D.data || y4e(D.data)) + return D; + if (!q4e(D.name, g)) + return; + const { origin: O } = E.checkDefined(N4e(D.name, D.data, i, s)), j = h.get(t.path, D.data.exportMapKey), F = j && T.tryResolve(j, !Sl(Op(O.moduleSymbol.name))); + if (F === "skipped") return D; + if (!F || F === "failed") { + (P = s.log) == null || P.call(s, `Unexpected failure resolving auto import for '${D.name}' from '${D.source}'`); + return; + } + const V = { + ...O, + kind: 32, + moduleSpecifier: F.moduleSpecifier + }; + return D.data = E4e(V), D.source = Tue(V), D.sourceDisplay = [jf(V.moduleSpecifier)], D; + }); + return T.skippedAny() || (u.isIncomplete = void 0), C; + } + ); + return u.entries = S, u.flags = (u.flags || 0) | 4, u.optionalReplacementSpan = T4e(d), u; + } + function bue(e) { + return { isGlobalCompletion: !1, isMemberCompletion: !1, isNewIdentifierLocation: !1, entries: e }; + } + function v4e(e, t, n, i, s, o) { + const c = Ei(e, t); + if (!Zk(c) && !Ed(c)) + return []; + const _ = Ed(c) ? c : c.parent; + if (!Ed(_)) + return []; + const u = _.parent; + if (!ps(u)) + return []; + const d = p_(e), g = s.includeCompletionsWithSnippetText || void 0, h = ty(_.tags, (S) => up(S) && S.getEnd() <= t); + return Ii(u.parameters, (S) => { + if (!Gk(S).length) { + if (Re(S.name)) { + const T = { tabstop: 1 }, C = S.name.text; + let D = MN( + C, + S.initializer, + S.dotDotDotToken, + d, + /*isObject*/ + !1, + /*isSnippet*/ + !1, + n, + i, + s + ), P = g ? MN( + C, + S.initializer, + S.dotDotDotToken, + d, + /*isObject*/ + !1, + /*isSnippet*/ + !0, + n, + i, + s, + T + ) : void 0; + return o && (D = D.slice(1), P && (P = P.slice(1))), { + name: D, + kind: "parameter", + sortText: bu.LocationPriority, + insertText: g ? P : void 0, + isSnippet: g + }; + } else if (S.parent.parameters.indexOf(S) === h) { + const T = `param${h}`, C = b4e( + T, + S.name, + S.initializer, + S.dotDotDotToken, + d, + /*isSnippet*/ + !1, + n, + i, + s + ), D = g ? b4e( + T, + S.name, + S.initializer, + S.dotDotDotToken, + d, + /*isSnippet*/ + !0, + n, + i, + s + ) : void 0; + let P = C.join(d0(i) + "* "), O = D?.join(d0(i) + "* "); + return o && (P = P.slice(1), O && (O = O.slice(1))), { + name: P, + kind: "parameter", + sortText: bu.LocationPriority, + insertText: g ? O : void 0, + isSnippet: g + }; + } + } + }); + } + function b4e(e, t, n, i, s, o, c, _, u) { + if (!s) + return [ + MN( + e, + n, + i, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + { tabstop: 1 } + ) + ]; + return d(e, t, n, i, { tabstop: 1 }); + function d(h, S, T, C, D) { + if (If(S) && !C) { + const O = { tabstop: D.tabstop }, j = MN( + h, + T, + C, + s, + /*isObject*/ + !0, + o, + c, + _, + u, + O + ); + let F = []; + for (const V of S.elements) { + const L = g(h, V, O); + if (L) + F.push(...L); + else { + F = void 0; + break; + } + } + if (F) + return D.tabstop = O.tabstop, [j, ...F]; + } + return [ + MN( + h, + T, + C, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + D + ) + ]; + } + function g(h, S, T) { + if (!S.propertyName && Re(S.name) || Re(S.name)) { + const C = S.propertyName ? n4(S.propertyName) : S.name.text; + if (!C) + return; + const D = `${h}.${C}`; + return [ + MN( + D, + S.initializer, + S.dotDotDotToken, + s, + /*isObject*/ + !1, + o, + c, + _, + u, + T + ) + ]; + } else if (S.propertyName) { + const C = n4(S.propertyName); + return C && d(`${h}.${C}`, S.name, S.initializer, S.dotDotDotToken, T); + } + } + } + function MN(e, t, n, i, s, o, c, _, u, d) { + if (o && E.assertIsDefined(d), t && (e = OHe(e, t)), o && (e = Db(e)), i) { + let g = "*"; + if (s) + E.assert(!n, "Cannot annotate a rest parameter with type 'Object'."), g = "Object"; + else { + if (t) { + const T = c.getTypeAtLocation(t.parent); + if (!(T.flags & 16385)) { + const C = t.getSourceFile(), P = Rf(C, u) === 0 ? 268435456 : 0, O = c.typeToTypeNode(T, sr(t, ps), P); + if (O) { + const j = o ? iH({ + removeComments: !0, + module: _.module, + target: _.target + }) : Iy({ + removeComments: !0, + module: _.module, + target: _.target + }); + Kr( + O, + 1 + /* SingleLine */ + ), g = j.printNode(4, O, C); + } + } + } + o && g === "*" && (g = `\${${d.tabstop++}:${g}}`); + } + const h = !s && n ? "..." : "", S = o ? `\${${d.tabstop++}}` : ""; + return `@param {${h}${g}} ${e} ${S}`; + } else { + const g = o ? `\${${d.tabstop++}}` : ""; + return `@param ${e} ${g}`; + } + } + function OHe(e, t) { + const n = t.getText().trim(); + return n.includes(` +`) || n.length > 80 ? `[${e}]` : `[${e}=${n}]`; + } + function FHe(e) { + return { + name: Ws(e), + kind: "keyword", + kindModifiers: "", + sortText: bu.GlobalsOrKeywords + }; + } + function LHe(e, t) { + return { + isGlobalCompletion: !1, + isMemberCompletion: !1, + isNewIdentifierLocation: t, + entries: e.slice() + }; + } + function S4e(e, t, n) { + return { + kind: 4, + keywordCompletions: O4e(e, t), + isNewIdentifierLocation: n + }; + } + function MHe(e) { + switch (e) { + case 156: + return 8; + default: + E.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); + } + } + function T4e(e) { + return e?.kind === 80 ? e_(e) : void 0; + } + function RHe(e, t, n, i, s, o, c, _, u, d) { + const { + symbols: g, + contextToken: h, + completionKind: S, + isInSnippetScope: T, + isNewIdentifierLocation: C, + location: D, + propertyAccessToConvert: P, + keywordFilters: O, + symbolToOriginInfoMap: j, + recommendedCompletion: F, + isJsxInitializer: V, + isTypeOnlyLocation: L, + isJsxIdentifierExpected: $, + isRightOfOpenTag: U, + isRightOfDotOrQuestionDot: G, + importStatementCompletion: ce, + insideJsDocTagTypeExpression: K, + symbolToSortTextMap: X, + hasUnresolvedAutoImports: Z + } = o; + let oe = o.literals; + const ne = n.getTypeChecker(); + if (R3(e.scriptKind) === 1) { + const Ae = BHe(D, e); + if (Ae) + return Ae; + } + const pe = sr(h, OC); + if (pe && (Ete(h) || yb(h, pe.expression))) { + const Ae = S9(ne, pe.parent.clauses); + oe = oe.filter((ge) => !Ae.hasValue(ge)), g.forEach((ge, de) => { + if (ge.valueDeclaration && Py(ge.valueDeclaration)) { + const ve = ne.getConstantValue(ge.valueDeclaration); + ve !== void 0 && Ae.hasValue(ve) && (j[de] = { + kind: 256 + /* Ignore */ + }); + } + }); + } + const fe = sR(), H = x4e(e, i); + if (H && !C && (!g || g.length === 0) && O === 0) + return; + const ae = xue( + g, + fe, + /*replacementToken*/ + void 0, + h, + D, + u, + e, + t, + n, + pa(i), + s, + S, + c, + i, + _, + L, + P, + $, + V, + ce, + F, + j, + X, + $, + U, + d + ); + if (O !== 0) + for (const Ae of O4e(O, !K && p_(e))) + (L && qD(ib(Ae.name)) || !L && bGe(Ae.name) || !ae.has(Ae.name)) && (ae.add(Ae.name), ry( + fe, + Ae, + Y9, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + )); + for (const Ae of oGe(h, u)) + ae.has(Ae.name) || (ae.add(Ae.name), ry( + fe, + Ae, + Y9, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + )); + for (const Ae of oe) { + const ge = zHe(e, c, Ae); + ae.add(ge.name), ry( + fe, + ge, + Y9, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + ); + } + H || JHe(e, D.pos, ae, pa(i), fe); + let le; + if (c.includeCompletionsWithInsertText && h && !U && !G && (le = sr(h, aD))) { + const Ae = k4e(le, e, c, i, t, n, _); + Ae && fe.push(Ae.entry); + } + return { + flags: o.flags, + isGlobalCompletion: T, + isIncomplete: c.allowIncompleteCompletions && Z ? !0 : void 0, + isMemberCompletion: jHe(S), + isNewIdentifierLocation: C, + optionalReplacementSpan: T4e(D), + entries: fe + }; + } + function x4e(e, t) { + return !p_(e) || !!j4(e, t); + } + function k4e(e, t, n, i, s, o, c) { + const _ = e.clauses, u = o.getTypeChecker(), d = u.getTypeAtLocation(e.parent.expression); + if (d && d.isUnion() && Ri(d.types, (g) => g.isLiteral())) { + const g = S9(u, _), h = pa(i), S = Rf(t, n), T = vu.createImportAdder(t, o, n, s), C = []; + for (const L of d.types) + if (L.flags & 1024) { + E.assert(L.symbol, "An enum member type should have a symbol"), E.assert(L.symbol.parent, "An enum member type should have a parent symbol (the enum symbol)"); + const $ = L.symbol.valueDeclaration && u.getConstantValue(L.symbol.valueDeclaration); + if ($ !== void 0) { + if (g.hasValue($)) + continue; + g.addValue($); + } + const U = vu.typeToAutoImportableTypeNode(u, T, L, e, h); + if (!U) + return; + const G = rH(U, h, S); + if (!G) + return; + C.push(G); + } else if (!g.hasValue(L.value)) + switch (typeof L.value) { + case "object": + C.push(L.value.negative ? N.createPrefixUnaryExpression(41, N.createBigIntLiteral({ negative: !1, base10Value: L.value.base10Value })) : N.createBigIntLiteral(L.value)); + break; + case "number": + C.push(L.value < 0 ? N.createPrefixUnaryExpression(41, N.createNumericLiteral(-L.value)) : N.createNumericLiteral(L.value)); + break; + case "string": + C.push(N.createStringLiteral( + L.value, + S === 0 + /* Single */ + )); + break; + } + if (C.length === 0) + return; + const D = or(C, (L) => N.createCaseClause(L, [])), P = k0(s, c?.options), O = iH({ + removeComments: !0, + module: i.module, + target: i.target, + newLine: bN(P) + }), j = c ? (L) => O.printAndFormatNode(4, L, t, c) : (L) => O.printNode(4, L, t), F = or(D, (L, $) => n.includeCompletionsWithSnippetText ? `${j(L)}$${$ + 1}` : `${j(L)}`).join(P); + return { + entry: { + name: `${O.printNode(4, D[0], t)} ...`, + kind: "", + sortText: bu.GlobalsOrKeywords, + insertText: F, + hasAction: T.hasFixes() || void 0, + source: "SwitchCases/", + isSnippet: n.includeCompletionsWithSnippetText ? !0 : void 0 + }, + importAdder: T + }; + } + } + function rH(e, t, n) { + switch (e.kind) { + case 183: + const i = e.typeName; + return nH(i, t, n); + case 199: + const s = rH(e.objectType, t, n), o = rH(e.indexType, t, n); + return s && o && N.createElementAccessExpression(s, o); + case 201: + const c = e.literal; + switch (c.kind) { + case 11: + return N.createStringLiteral( + c.text, + n === 0 + /* Single */ + ); + case 9: + return N.createNumericLiteral(c.text, c.numericLiteralFlags); + } + return; + case 196: + const _ = rH(e.type, t, n); + return _ && (Re(_) ? _ : N.createParenthesizedExpression(_)); + case 186: + return nH(e.exprName, t, n); + case 205: + E.fail("We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'."); + } + } + function nH(e, t, n) { + if (Re(e)) + return e; + const i = Pi(e.right.escapedText); + return fJ(i, t) ? N.createPropertyAccessExpression( + nH(e.left, t, n), + i + ) : N.createElementAccessExpression( + nH(e.left, t, n), + N.createStringLiteral( + i, + n === 0 + /* Single */ + ) + ); + } + function jHe(e) { + switch (e) { + case 0: + case 3: + case 2: + return !0; + default: + return !1; + } + } + function BHe(e, t) { + const n = sr(e, (i) => { + switch (i.kind) { + case 287: + return !0; + case 44: + case 32: + case 80: + case 211: + return !1; + default: + return "quit"; + } + }); + if (n) { + const i = !!Ya(n, 32, t), c = n.parent.openingElement.tagName.getText(t) + (i ? "" : ">"), _ = e_(n.tagName), u = { + name: c, + kind: "class", + kindModifiers: void 0, + sortText: bu.LocationPriority + }; + return { isGlobalCompletion: !1, isMemberCompletion: !0, isNewIdentifierLocation: !1, optionalReplacementSpan: _, entries: [u] }; + } + } + function JHe(e, t, n, i, s) { + Cq(e).forEach((o, c) => { + if (o === t) + return; + const _ = Pi(c); + !n.has(_) && X_(_, i) && (n.add(_), ry(s, { + name: _, + kind: "warning", + kindModifiers: "", + sortText: bu.JavascriptIdentifiers, + isFromUncheckedFile: !0 + }, Y9)); + }); + } + function Sue(e, t, n) { + return typeof n == "object" ? Eb(n) + "n" : Gi(n) ? YD(e, t, n) : JSON.stringify(n); + } + function zHe(e, t, n) { + return { name: Sue(e, t, n), kind: "string", kindModifiers: "", sortText: bu.LocationPriority }; + } + function WHe(e, t, n, i, s, o, c, _, u, d, g, h, S, T, C, D, P, O, j, F, V, L, $, U) { + var G, ce; + let K, X, Z = eU(n, o), oe, ne, pe = Tue(h), fe, H, ae; + const le = u.getTypeChecker(), Ae = h && wHe(h), ge = h && CHe(h) || g; + if (h && kHe(h)) + K = g ? `this${Ae ? "?." : ""}[${D4e(c, j, d)}]` : `this${Ae ? "?." : "."}${d}`; + else if ((ge || Ae) && T) { + K = ge ? g ? `[${D4e(c, j, d)}]` : `[${d}]` : d, (Ae || T.questionDotToken) && (K = `?.${K}`); + const ve = Ya(T, 25, c) || Ya(T, 29, c); + if (!ve) + return; + const De = zi(d, T.name.text) ? T.name.end : ve.end; + Z = Mc(ve.getStart(c), De); + } + if (C && (K === void 0 && (K = d), K = `{${K}}`, typeof C != "boolean" && (Z = e_(C, c))), h && PHe(h) && T) { + K === void 0 && (K = d); + const ve = sl(T.pos, c); + let De = ""; + ve && l9(ve.end, ve.parent, c) && (De = ";"), De += `(await ${T.expression.getText()})`, K = g ? `${De}${K}` : `${De}${Ae ? "?." : "."}${K}`; + const Ie = Jn(T.parent, Cy) ? T.parent : T.expression; + Z = Mc(Ie.getStart(c), T.end); + } + if (lP(h) && (fe = [jf(h.moduleSpecifier)], D && ({ insertText: K, replacementSpan: Z } = XHe(d, D, h, P, c, O, j), ne = j.includeCompletionsWithSnippetText ? !0 : void 0)), h?.kind === 64 && (H = !0), F === 0 && i && ((G = sl(i.pos, c, i)) == null ? void 0 : G.kind) !== 28 && (hc(i.parent.parent) || Af(i.parent.parent) || rf(i.parent.parent) || Bg(i.parent) || ((ce = sr(i.parent, qc)) == null ? void 0 : ce.getLastToken(c)) === i || du(i.parent) && Vs(c, i.getEnd()).line !== Vs(c, o).line) && (pe = "ObjectLiteralMemberWithComma/", H = !0), j.includeCompletionsWithClassMemberSnippets && j.includeCompletionsWithInsertText && F === 3 && VHe(e, s, c)) { + let ve; + const De = C4e( + _, + u, + O, + j, + d, + e, + s, + o, + i, + V + ); + if (De) + ({ insertText: K, filterText: X, isSnippet: ne, importAdder: ve } = De), (ve?.hasFixes() || De.eraseRange) && (H = !0, pe = "ClassMemberSnippet/"); + else + return; + } + if (h && g4e(h) && ({ insertText: K, isSnippet: ne, labelDetails: ae } = h, j.useLabelDetailsInCompletionEntries || (d = d + ae.detail, ae = void 0), pe = "ObjectLiteralMethodSnippet/", t = bu.SortBelow(t)), L && !$ && j.includeCompletionsWithSnippetText && j.jsxAttributeCompletionStyle && j.jsxAttributeCompletionStyle !== "none" && !(dm(s.parent) && s.parent.initializer)) { + let ve = j.jsxAttributeCompletionStyle === "braces"; + const De = le.getTypeOfSymbolAtLocation(e, s); + j.jsxAttributeCompletionStyle === "auto" && !(De.flags & 528) && !(De.flags & 1048576 && Nn(De.types, (Xe) => !!(Xe.flags & 528))) && (De.flags & 402653316 || De.flags & 1048576 && Ri(De.types, (Xe) => !!(Xe.flags & 402686084 || fae(Xe))) ? (K = `${Db(d)}=${YD(c, j, "$1")}`, ne = !0) : ve = !0), ve && (K = `${Db(d)}={$1}`, ne = !0); + } + if (K !== void 0 && !j.includeCompletionsWithInsertText) + return; + (Q9(h) || lP(h)) && (oe = E4e(h), H = !D); + const de = sr(s, K7); + if (de?.kind === 275) { + const ve = ib(d); + de && ve && (ve === 135 || fB(ve)) && (K = `${d} as ${d}_`); + } + return { + name: d, + kind: D0.getSymbolKind(le, e, s), + kindModifiers: D0.getSymbolModifiers(le, e), + sortText: t, + source: pe, + hasAction: H ? !0 : void 0, + isRecommended: QHe(e, S, le) || void 0, + insertText: K, + filterText: X, + replacementSpan: Z, + sourceDisplay: fe, + labelDetails: ae, + isSnippet: ne, + isPackageJsonImport: DHe(h) || void 0, + isImportStatementCompletion: !!D || void 0, + data: oe, + ...U ? { symbol: e } : void 0 + }; + } + function VHe(e, t, n) { + return Qr(t) ? !1 : !!(e.flags & 106500) && (Qn(t) || t.parent && t.parent.parent && fl(t.parent) && t === t.parent.name && t.parent.getLastToken(n) === t.parent.name && Qn(t.parent.parent) || t.parent && RC(t) && Qn(t.parent)); + } + function C4e(e, t, n, i, s, o, c, _, u, d) { + const g = sr(c, Qn); + if (!g) + return; + let h, S = s; + const T = s, C = t.getTypeChecker(), D = c.getSourceFile(), P = iH({ + removeComments: !0, + module: n.module, + target: n.target, + omitTrailingSemicolon: !1, + newLine: bN(k0(e, d?.options)) + }), O = vu.createImportAdder(D, t, i, e); + let j; + if (i.includeCompletionsWithSnippetText) { + h = !0; + const ce = N.createEmptyStatement(); + j = N.createBlock( + [ce], + /*multiLine*/ + !0 + ), TJ(ce, { kind: 0, order: 0 }); + } else + j = N.createBlock( + [], + /*multiLine*/ + !0 + ); + let F = 0; + const { modifiers: V, range: L, decorators: $ } = UHe(u, D, _), U = V & 64 && g.modifierFlagsCache & 64; + let G = []; + if (vu.addNewNodeForMemberSymbol( + o, + g, + D, + { program: t, host: e }, + i, + O, + // `addNewNodeForMemberSymbol` calls this callback function for each new member node + // it adds for the given member symbol. + // We store these member nodes in the `completionNodes` array. + // Note: there might be: + // - No nodes if `addNewNodeForMemberSymbol` cannot figure out a node for the member; + // - One node; + // - More than one node if the member is overloaded (e.g. a method with overload signatures). + (ce) => { + let K = 0; + U && (K |= 64), fl(ce) && C.getMemberOverrideModifierStatus(g, ce, o) === 1 && (K |= 16), G.length || (F = ce.modifierFlagsCache | K), ce = N.replaceModifiers(ce, F), G.push(ce); + }, + j, + vu.PreserveOptionalFlags.Property, + !!U + ), G.length) { + const ce = o.flags & 8192; + let K = F | 16 | 1; + ce ? K |= 1024 : K |= 136; + const X = V & K; + if (V & ~K) + return; + if (F & 4 && X & 1 && (F &= -5), X !== 0 && !(X & 1) && (F &= -2), F |= X, G = G.map((oe) => N.replaceModifiers(oe, F)), $?.length) { + const oe = G[G.length - 1]; + jb(oe) && (G[G.length - 1] = N.replaceDecoratorsAndModifiers(oe, $.concat(sb(oe) || []))); + } + const Z = 131073; + d ? S = P.printAndFormatSnippetList( + Z, + N.createNodeArray(G), + D, + d + ) : S = P.printSnippetList( + Z, + N.createNodeArray(G), + D + ); + } + return { insertText: S, filterText: T, isSnippet: h, importAdder: O, eraseRange: L }; + } + function UHe(e, t, n) { + if (!e || Vs(t, n).line > Vs(t, e.getEnd()).line) + return { + modifiers: 0 + /* None */ + }; + let i = 0, s, o; + const c = { pos: n, end: n }; + if (rs(e.parent) && (o = qHe(e))) { + e.parent.modifiers && (i |= sm(e.parent.modifiers) & 98303, s = e.parent.modifiers.filter(dl) || [], c.pos = Math.min(...e.parent.modifiers.map((u) => u.getStart(t)))); + const _ = qT(o); + i & _ || (i |= _, c.pos = Math.min(c.pos, e.getStart(t))), e.parent.name !== e && (c.end = e.parent.name.getStart(t)); + } + return { modifiers: i, decorators: s, range: c.pos < c.end ? c : void 0 }; + } + function qHe(e) { + if (Qs(e)) + return e.kind; + if (Re(e)) { + const t = B2(e); + if (t && r0(t)) + return t; + } + } + function HHe(e, t, n, i, s, o, c, _) { + const u = c.includeCompletionsWithSnippetText || void 0; + let d = t; + const g = n.getSourceFile(), h = GHe(e, n, g, i, s, c); + if (!h) + return; + const S = iH({ + removeComments: !0, + module: o.module, + target: o.target, + omitTrailingSemicolon: !1, + newLine: bN(k0(s, _?.options)) + }); + _ ? d = S.printAndFormatSnippetList(80, N.createNodeArray( + [h], + /*hasTrailingComma*/ + !0 + ), g, _) : d = S.printSnippetList(80, N.createNodeArray( + [h], + /*hasTrailingComma*/ + !0 + ), g); + const T = Iy({ + removeComments: !0, + module: o.module, + target: o.target, + omitTrailingSemicolon: !0 + }), C = N.createMethodSignature( + /*modifiers*/ + void 0, + /*name*/ + "", + h.questionToken, + h.typeParameters, + h.parameters, + h.type + ), D = { detail: T.printNode(4, C, g) }; + return { isSnippet: u, insertText: d, labelDetails: D }; + } + function GHe(e, t, n, i, s, o) { + const c = e.getDeclarations(); + if (!(c && c.length)) + return; + const _ = i.getTypeChecker(), u = c[0], d = qa( + es(u), + /*includeTrivia*/ + !1 + ), g = _.getWidenedType(_.getTypeOfSymbolAtLocation(e, t)), S = 33554432 | (Rf(n, o) === 0 ? 268435456 : 0); + switch (u.kind) { + case 171: + case 172: + case 173: + case 174: { + let T = g.flags & 1048576 && g.types.length < 10 ? _.getUnionType( + g.types, + 2 + /* Subtype */ + ) : g; + if (T.flags & 1048576) { + const j = Ln(T.types, (F) => _.getSignaturesOfType( + F, + 0 + /* Call */ + ).length > 0); + if (j.length === 1) + T = j[0]; + else + return; + } + if (_.getSignaturesOfType( + T, + 0 + /* Call */ + ).length !== 1) + return; + const D = _.typeToTypeNode(T, t, S, vu.getNoopSymbolTrackerWithResolver({ program: i, host: s })); + if (!D || !Xm(D)) + return; + let P; + if (o.includeCompletionsWithSnippetText) { + const j = N.createEmptyStatement(); + P = N.createBlock( + [j], + /*multiLine*/ + !0 + ), TJ(j, { kind: 0, order: 0 }); + } else + P = N.createBlock( + [], + /*multiLine*/ + !0 + ); + const O = D.parameters.map( + (j) => N.createParameterDeclaration( + /*modifiers*/ + void 0, + j.dotDotDotToken, + j.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + j.initializer + ) + ); + return N.createMethodDeclaration( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + d, + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + O, + /*type*/ + void 0, + P + ); + } + default: + return; + } + } + function iH(e) { + let t; + const n = Yr.createWriter(d0(e)), i = Iy(e, n), s = { + ...n, + write: (S) => o(S, () => n.write(S)), + nonEscapingWrite: n.write, + writeLiteral: (S) => o(S, () => n.writeLiteral(S)), + writeStringLiteral: (S) => o(S, () => n.writeStringLiteral(S)), + writeSymbol: (S, T) => o(S, () => n.writeSymbol(S, T)), + writeParameter: (S) => o(S, () => n.writeParameter(S)), + writeComment: (S) => o(S, () => n.writeComment(S)), + writeProperty: (S) => o(S, () => n.writeProperty(S)) + }; + return { + printSnippetList: c, + printAndFormatSnippetList: u, + printNode: d, + printAndFormatNode: h + }; + function o(S, T) { + const C = Db(S); + if (C !== S) { + const D = n.getTextPos(); + T(); + const P = n.getTextPos(); + t = Tr(t || (t = []), { newText: C, span: { start: D, length: P - D } }); + } else + T(); + } + function c(S, T, C) { + const D = _(S, T, C); + return t ? Yr.applyChanges(D, t) : D; + } + function _(S, T, C) { + return t = void 0, s.clear(), i.writeList(S, T, C, s), s.getText(); + } + function u(S, T, C, D) { + const P = { + text: _( + S, + T, + C + ), + getLineAndCharacterOfPosition(V) { + return Vs(this, V); + } + }, O = b9(D, C), j = Xs(T, (V) => { + const L = Yr.assignPositionsToNode(V); + return Hc.formatNodeGivenIndentation( + L, + P, + C.languageVariant, + /* indentation */ + 0, + /* delta */ + 0, + { ...D, options: O } + ); + }), F = t ? Sg(Hi(j, t), (V, L) => fI(V.span, L.span)) : j; + return Yr.applyChanges(P.text, F); + } + function d(S, T, C) { + const D = g(S, T, C); + return t ? Yr.applyChanges(D, t) : D; + } + function g(S, T, C) { + return t = void 0, s.clear(), i.writeNode(S, T, C, s), s.getText(); + } + function h(S, T, C, D) { + const P = { + text: g( + S, + T, + C + ), + getLineAndCharacterOfPosition(L) { + return Vs(this, L); + } + }, O = b9(D, C), j = Yr.assignPositionsToNode(T), F = Hc.formatNodeGivenIndentation( + j, + P, + C.languageVariant, + /* indentation */ + 0, + /* delta */ + 0, + { ...D, options: O } + ), V = t ? Sg(Hi(F, t), (L, $) => fI(L.span, $.span)) : F; + return Yr.applyChanges(P.text, V); + } + } + function E4e(e) { + const t = e.fileName ? void 0 : Op(e.moduleSymbol.name), n = e.isFromPackageJson ? !0 : void 0; + return lP(e) ? { + exportName: e.exportName, + exportMapKey: e.exportMapKey, + moduleSpecifier: e.moduleSpecifier, + ambientModuleName: t, + fileName: e.fileName, + isPackageJsonImport: n + } : { + exportName: e.exportName, + exportMapKey: e.exportMapKey, + fileName: e.fileName, + ambientModuleName: e.fileName ? void 0 : Op(e.moduleSymbol.name), + isPackageJsonImport: e.isFromPackageJson ? !0 : void 0 + }; + } + function $He(e, t, n) { + const i = e.exportName === "default", s = !!e.isPackageJsonImport; + return y4e(e) ? { + kind: 32, + exportName: e.exportName, + exportMapKey: e.exportMapKey, + moduleSpecifier: e.moduleSpecifier, + symbolName: t, + fileName: e.fileName, + moduleSymbol: n, + isDefaultExport: i, + isFromPackageJson: s + } : { + kind: 4, + exportName: e.exportName, + exportMapKey: e.exportMapKey, + symbolName: t, + fileName: e.fileName, + moduleSymbol: n, + isDefaultExport: i, + isFromPackageJson: s + }; + } + function XHe(e, t, n, i, s, o, c) { + const _ = t.replacementSpan, u = Db(YD(s, c, n.moduleSpecifier)), d = n.isDefaultExport ? 1 : n.exportName === "export=" ? 2 : 0, g = c.includeCompletionsWithSnippetText ? "$1" : "", h = vu.getImportKind( + s, + d, + o, + /*forceImportKeyword*/ + !0 + ), S = t.couldBeTypeOnlyImportSpecifier, T = t.isTopLevelTypeOnly ? ` ${Ws( + 156 + /* TypeKeyword */ + )} ` : " ", C = S ? `${Ws( + 156 + /* TypeKeyword */ + )} ` : "", D = i ? ";" : ""; + switch (h) { + case 3: + return { replacementSpan: _, insertText: `import${T}${Db(e)}${g} = require(${u})${D}` }; + case 1: + return { replacementSpan: _, insertText: `import${T}${Db(e)}${g} from ${u}${D}` }; + case 2: + return { replacementSpan: _, insertText: `import${T}* as ${Db(e)} from ${u}${D}` }; + case 0: + return { replacementSpan: _, insertText: `import${T}{ ${C}${Db(e)}${g} } from ${u}${D}` }; + } + } + function D4e(e, t, n) { + return /^\d+$/.test(n) ? n : YD(e, t, n); + } + function QHe(e, t, n) { + return e === t || !!(e.flags & 1048576) && n.getExportSymbolOfSymbol(e) === t; + } + function Tue(e) { + if (Q9(e)) + return Op(e.moduleSymbol.name); + if (lP(e)) + return e.moduleSpecifier; + if (e?.kind === 1) + return "ThisProperty/"; + if (e?.kind === 64) + return "TypeOnlyAlias/"; + } + function xue(e, t, n, i, s, o, c, _, u, d, g, h, S, T, C, D, P, O, j, F, V, L, $, U, G, ce = !1) { + const K = Io(), X = hGe(i, s), Z = gN(c), oe = u.getTypeChecker(), ne = /* @__PURE__ */ new Map(); + for (let H = 0; H < e.length; H++) { + const ae = e[H], le = L?.[H], Ae = aH(ae, d, le, h, !!O); + if (!Ae || ne.get(Ae.name) && (!le || !g4e(le)) || h === 1 && $ && !pe(ae, $) || !D && Qr(c) && fe(ae)) + continue; + const { name: ge, needsConvertPropertyAccess: de } = Ae, ve = $?.[$s(ae)] ?? bu.LocationPriority, De = yGe(ae, oe) ? bu.Deprecated(ve) : ve, Xe = WHe( + ae, + De, + n, + i, + s, + o, + c, + _, + u, + ge, + de, + le, + V, + P, + j, + F, + Z, + T, + S, + h, + C, + U, + G, + ce + ); + if (!Xe) + continue; + const Ie = (!le || m4e(le)) && !(ae.parent === void 0 && !ut(ae.declarations, (ye) => ye.getSourceFile() === s.getSourceFile())); + ne.set(ge, Ie), ry( + t, + Xe, + Y9, + /*equalityComparer*/ + void 0, + /*allowDuplicates*/ + !0 + ); + } + return g("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (Io() - K)), { + has: (H) => ne.has(H), + add: (H) => ne.set(H, !0) + }; + function pe(H, ae) { + var le; + let Ae = H.flags; + if (!yi(s)) { + if (ko(s.parent)) + return !0; + if (Jn(X, ti) && H.valueDeclaration === X) + return !1; + const ge = H.valueDeclaration ?? ((le = H.declarations) == null ? void 0 : le[0]); + if (X && ge && (Mo(X) && Mo(ge) || ji(X) && ji(ge))) { + const ve = ge.pos, De = ji(X) ? X.parent.parameters : rS(X.parent) ? void 0 : X.parent.typeParameters; + if (ve >= X.pos && De && ve < De.end) + return !1; + } + const de = Jl(H, oe); + if (c.externalModuleIndicator && !T.allowUmdGlobalAccess && ae[$s(H)] === bu.GlobalsOrKeywords && (ae[$s(de)] === bu.AutoImportSuggestions || ae[$s(de)] === bu.LocationPriority)) + return !1; + if (Ae |= TC(de), LF(s)) + return !!(Ae & 1920); + if (D) + return Pue(H, oe); + } + return !!(Ae & 111551); + } + function fe(H) { + var ae; + const le = TC(Jl(H, oe)); + return !(le & 111551) && (!Qr((ae = H.declarations) == null ? void 0 : ae[0]) || !!(le & 788968)); + } + } + function YHe(e) { + const t = ZHe(e); + if (t.length) + return { isGlobalCompletion: !1, isMemberCompletion: !1, isNewIdentifierLocation: !1, entries: t }; + } + function ZHe(e) { + const t = [], n = /* @__PURE__ */ new Map(); + let i = e; + for (; i && !ps(i); ) { + if (Dy(i)) { + const s = i.label.text; + n.has(s) || (n.set(s, !0), t.push({ + name: s, + kindModifiers: "", + kind: "label", + sortText: bu.LocationPriority + })); + } + i = i.parent; + } + return t; + } + function P4e(e, t, n, i, s, o, c) { + if (s.source === "SwitchCases/") + return { type: "cases" }; + if (s.data) { + const F = N4e(s.name, s.data, e, o); + if (F) { + const { contextToken: V, previousToken: L } = sH(i, n); + return { + type: "symbol", + symbol: F.symbol, + location: h_(n, i), + previousToken: L, + contextToken: V, + isJsxInitializer: !1, + isTypeOnlyLocation: !1, + origin: F.origin + }; + } + } + const _ = e.getCompilerOptions(), u = A4e( + e, + t, + n, + _, + i, + { includeCompletionsForModuleExports: !0, includeCompletionsWithInsertText: !0 }, + s, + o, + /*formatContext*/ + void 0 + ); + if (!u) + return { type: "none" }; + if (u.kind !== 0) + return { type: "request", request: u }; + const { symbols: d, literals: g, location: h, completionKind: S, symbolToOriginInfoMap: T, contextToken: C, previousToken: D, isJsxInitializer: P, isTypeOnlyLocation: O } = u, j = Nn(g, (F) => Sue(n, c, F) === s.name); + return j !== void 0 ? { type: "literal", literal: j } : xc(d, (F, V) => { + const L = T[V], $ = aH(F, pa(_), L, S, u.isJsxIdentifierExpected); + return $ && $.name === s.name && (s.source === "ClassMemberSnippet/" && F.flags & 106500 || s.source === "ObjectLiteralMethodSnippet/" && F.flags & 8196 || Tue(L) === s.source || s.source === "ObjectLiteralMemberWithComma/") ? { type: "symbol", symbol: F, location: h, origin: L, contextToken: C, previousToken: D, isJsxInitializer: P, isTypeOnlyLocation: O } : void 0; + }) || { type: "none" }; + } + function KHe(e, t, n, i, s, o, c, _, u) { + const d = e.getTypeChecker(), g = e.getCompilerOptions(), { name: h, source: S, data: T } = s, { previousToken: C, contextToken: D } = sH(i, n); + if (Mx(n, i, C)) + return fH.getStringLiteralCompletionDetails(h, n, i, C, e, o, u, _); + const P = P4e(e, t, n, i, s, o, _); + switch (P.type) { + case "request": { + const { request: O } = P; + switch (O.kind) { + case 1: + return bv.getJSDocTagNameCompletionDetails(h); + case 2: + return bv.getJSDocTagCompletionDetails(h); + case 3: + return bv.getJSDocParameterNameCompletionDetails(h); + case 4: + return ut(O.keywordCompletions, (j) => j.name === h) ? kue( + h, + "keyword", + 5 + /* keyword */ + ) : void 0; + default: + return E.assertNever(O); + } + } + case "symbol": { + const { symbol: O, location: j, contextToken: F, origin: V, previousToken: L } = P, { codeActions: $, sourceDisplay: U } = eGe(h, j, F, V, O, e, o, g, n, i, L, c, _, T, S, u), G = vue(V) ? V.symbolName : O.name; + return Cue(O, G, d, n, j, u, $, U); + } + case "literal": { + const { literal: O } = P; + return kue( + Sue(n, _, O), + "string", + typeof O == "string" ? 8 : 7 + /* numericLiteral */ + ); + } + case "cases": { + const O = k4e( + D.parent, + n, + _, + e.getCompilerOptions(), + o, + e, + /*formatContext*/ + void 0 + ); + if (O?.importAdder.hasFixes()) { + const { entry: j, importAdder: F } = O, V = Yr.ChangeTracker.with( + { host: o, formatContext: c, preferences: _ }, + F.writeFixes + ); + return { + name: j.name, + kind: "", + kindModifiers: "", + displayParts: [], + sourceDisplay: void 0, + codeActions: [{ + changes: V, + description: Gb([p.Includes_imports_of_types_referenced_by_0, h]) + }] + }; + } + return { + name: h, + kind: "", + kindModifiers: "", + displayParts: [], + sourceDisplay: void 0 + }; + } + case "none": + return I4e().some((O) => O.name === h) ? kue( + h, + "keyword", + 5 + /* keyword */ + ) : void 0; + default: + E.assertNever(P); + } + } + function kue(e, t, n) { + return Z9(e, "", t, [O_(e, n)]); + } + function Cue(e, t, n, i, s, o, c, _) { + const { displayParts: u, documentation: d, symbolKind: g, tags: h } = n.runWithCancellationToken(o, (S) => D0.getSymbolDisplayPartsDocumentationAndSymbolKind( + S, + e, + i, + s, + s, + 7 + /* All */ + )); + return Z9(t, D0.getSymbolModifiers(n, e), g, u, d, h, c, _); + } + function Z9(e, t, n, i, s, o, c, _) { + return { name: e, kindModifiers: t, kind: n, displayParts: i, documentation: s, tags: o, codeActions: c, source: _, sourceDisplay: _ }; + } + function eGe(e, t, n, i, s, o, c, _, u, d, g, h, S, T, C, D) { + if (T?.moduleSpecifier && g && J4e(n || g, u).replacementSpan) + return { codeActions: void 0, sourceDisplay: [jf(T.moduleSpecifier)] }; + if (C === "ClassMemberSnippet/") { + const { importAdder: $, eraseRange: U } = C4e( + c, + o, + _, + S, + e, + s, + t, + d, + n, + h + ); + if ($?.hasFixes() || U) + return { + sourceDisplay: void 0, + codeActions: [{ + changes: Yr.ChangeTracker.with( + { host: c, formatContext: h, preferences: S }, + (ce) => { + $ && $.writeFixes(ce), U && ce.deleteRange(u, U); + } + ), + description: $?.hasFixes() ? Gb([p.Includes_imports_of_types_referenced_by_0, e]) : Gb([p.Update_modifiers_of_0, e]) + }] + }; + } + if (m4e(i)) { + const $ = vu.getPromoteTypeOnlyCompletionAction( + u, + i.declaration.name, + o, + c, + h, + S + ); + return E.assertIsDefined($, "Expected to have a code action for promoting type-only alias"), { codeActions: [$], sourceDisplay: void 0 }; + } + if (C === "ObjectLiteralMemberWithComma/" && n) { + const $ = Yr.ChangeTracker.with( + { host: c, formatContext: h, preferences: S }, + (U) => U.insertText(u, n.end, ",") + ); + if ($) + return { + sourceDisplay: void 0, + codeActions: [{ + changes: $, + description: Gb([p.Add_missing_comma_for_object_member_completion_0, e]) + }] + }; + } + if (!i || !(Q9(i) || lP(i))) + return { codeActions: void 0, sourceDisplay: void 0 }; + const P = i.isFromPackageJson ? c.getPackageJsonAutoImportProvider().getTypeChecker() : o.getTypeChecker(), { moduleSymbol: O } = i, j = P.getMergedSymbol(Jl(s.exportSymbol || s, P)), F = n?.kind === 30 && ru(n.parent), { moduleSpecifier: V, codeAction: L } = vu.getImportCompletionAction( + j, + O, + T?.exportMapKey, + u, + e, + F, + c, + o, + h, + g && Re(g) ? g.getStart(u) : d, + S, + D + ); + return E.assert(!T?.moduleSpecifier || V === T.moduleSpecifier), { sourceDisplay: [jf(V)], codeActions: [L] }; + } + function tGe(e, t, n, i, s, o, c) { + const _ = P4e(e, t, n, i, s, o, c); + return _.type === "symbol" ? _.symbol : void 0; + } + var w4e = /* @__PURE__ */ ((e) => (e[e.ObjectPropertyDeclaration = 0] = "ObjectPropertyDeclaration", e[e.Global = 1] = "Global", e[e.PropertyAccess = 2] = "PropertyAccess", e[e.MemberLike = 3] = "MemberLike", e[e.String = 4] = "String", e[e.None = 5] = "None", e))(w4e || {}); + function rGe(e, t, n) { + return xc(t && (t.isUnion() ? t.types : [t]), (i) => { + const s = i && i.symbol; + return s && s.flags & 424 && !jK(s) ? Eue(s, e, n) : void 0; + }); + } + function nGe(e, t, n, i) { + const { parent: s } = e; + switch (e.kind) { + case 80: + return a9(e, i); + case 64: + switch (s.kind) { + case 260: + return i.getContextualType(s.initializer); + case 226: + return i.getTypeAtLocation(s.left); + case 291: + return i.getContextualTypeForJsxAttribute(s); + default: + return; + } + case 105: + return i.getContextualType(s); + case 84: + const o = Jn(s, OC); + return o ? EU(o, i) : void 0; + case 19: + return oD(s) && !jg(s.parent) && !Lb(s.parent) ? i.getContextualTypeForJsxAttribute(s.parent) : void 0; + default: + const c = WN.getArgumentInfoForCompletions(e, t, n, i); + return c ? i.getContextualTypeForArgumentAtIndex(c.invocation, c.argumentIndex) : o9(e.kind) && cn(s) && o9(s.operatorToken.kind) ? ( + // completion at `x ===/**/` should be for the right side + i.getTypeAtLocation(s.left) + ) : i.getContextualType( + e, + 4 + /* Completions */ + ) || i.getContextualType(e); + } + } + function Eue(e, t, n) { + const i = n.getAccessibleSymbolChain( + e, + t, + /*meaning*/ + -1, + /*useOnlyExternalAliasing*/ + !1 + ); + return i ? fa(i) : e.parent && (iGe(e.parent) ? e : Eue(e.parent, t, n)); + } + function iGe(e) { + var t; + return !!((t = e.declarations) != null && t.some( + (n) => n.kind === 307 + /* SourceFile */ + )); + } + function A4e(e, t, n, i, s, o, c, _, u, d) { + const g = e.getTypeChecker(), h = x4e(n, i); + let S = Io(), T = Ei(n, s); + t("getCompletionData: Get current token: " + (Io() - S)), S = Io(); + const C = T0(n, s, T); + t("getCompletionData: Is inside comment: " + (Io() - S)); + let D = !1, P = !1, O = !1; + if (C) { + if (lae(n, s)) { + if (n.text.charCodeAt(s - 1) === 64) + return { + kind: 1 + /* JsDocTagName */ + }; + { + const Te = Jp(s, n); + if (!/[^*|\s(/)]/.test(n.text.substring(Te, s))) + return { + kind: 2 + /* JsDocTag */ + }; + } + } + const _e = cGe(T, s); + if (_e) { + if (_e.tagName.pos <= s && s <= _e.tagName.end) + return { + kind: 1 + /* JsDocTagName */ + }; + if (Jg(_e)) + P = !0; + else { + const Te = nr(_e); + if (Te && (T = Ei(n, s), (!T || !Gm(T) && (T.parent.kind !== 348 || T.parent.name !== T)) && (D = we(Te))), !D && up(_e) && (ic(_e.name) || _e.name.pos <= s && s <= _e.name.end)) + return { kind: 3, tag: _e }; + } + } + if (!D && !P) { + t("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment."); + return; + } + } + S = Io(); + const j = !D && !P && p_(n), F = sH(s, n), V = F.previousToken; + let L = F.contextToken; + t("getCompletionData: Get previous token: " + (Io() - S)); + let $ = T, U, G = !1, ce = !1, K = !1, X = !1, Z = !1, oe = !1, ne, pe = h_(n, s), fe = 0, H = !1, ae = 0; + if (L) { + const _e = J4e(L, n); + if (_e.keywordCompletion) { + if (_e.isKeywordOnlyCompletion) + return { + kind: 4, + keywordCompletions: [FHe(_e.keywordCompletion)], + isNewIdentifierLocation: _e.isNewIdentifierLocation + }; + fe = MHe(_e.keywordCompletion); + } + if (_e.replacementSpan && o.includeCompletionsForImportStatements && o.includeCompletionsWithInsertText && (ae |= 2, ne = _e, H = _e.isNewIdentifierLocation), !_e.replacementSpan && mi(L)) + return t("Returning an empty list because completion was requested in an invalid position."), fe ? S4e(fe, j, ws()) : void 0; + let Te = L.parent; + if (L.kind === 25 || L.kind === 29) + switch (G = L.kind === 25, ce = L.kind === 29, Te.kind) { + case 211: + U = Te, $ = U.expression; + const dt = xC(U); + if (ic(dt) || (Es($) || ps($)) && $.end === L.pos && $.getChildCount(n) && ia($.getChildren(n)).kind !== 22) + return; + break; + case 166: + $ = Te.left; + break; + case 267: + $ = Te.name; + break; + case 205: + $ = Te; + break; + case 236: + $ = Te.getFirstToken(n), E.assert( + $.kind === 102 || $.kind === 105 + /* NewKeyword */ + ); + break; + default: + return; + } + else if (!ne) { + if (Te && Te.kind === 211 && (L = Te, Te = Te.parent), T.parent === pe) + switch (T.kind) { + case 32: + (T.parent.kind === 284 || T.parent.kind === 286) && (pe = T); + break; + case 44: + T.parent.kind === 285 && (pe = T); + break; + } + switch (Te.kind) { + case 287: + L.kind === 44 && (X = !0, pe = L); + break; + case 226: + if (!B4e(Te)) + break; + case 285: + case 284: + case 286: + oe = !0, L.kind === 30 && (K = !0, pe = L); + break; + case 294: + case 293: + (V.kind === 20 || V.kind === 80 && V.parent.kind === 291) && (oe = !0); + break; + case 291: + if (Te.initializer === V && V.end < s) { + oe = !0; + break; + } + switch (V.kind) { + case 64: + Z = !0; + break; + case 80: + oe = !0, Te !== V.parent && !Te.initializer && Ya(Te, 64, n) && (Z = V); + } + break; + } + } + } + const le = Io(); + let Ae = 5, ge = !1, de = [], ve; + const De = [], Xe = [], Ie = /* @__PURE__ */ new Map(), ye = wr(), Fe = Bm((_e) => jx(_e ? _.getPackageJsonAutoImportProvider() : e, _)); + if (G || ce) + Kt(); + else if (K) + de = g.getJsxIntrinsicTagNamesAt(pe), E.assertEachIsDefined(de, "getJsxIntrinsicTagNames() should all be defined"), jr(), Ae = 1, fe = 0; + else if (X) { + const _e = L.parent.parent.openingElement.tagName, Te = g.getSymbolAtLocation(_e); + Te && (de = [Te]), Ae = 1, fe = 0; + } else if (!jr()) + return fe ? S4e(fe, j, H) : void 0; + t("getCompletionData: Semantic work: " + (Io() - le)); + const Qe = V && nGe(V, s, n, g), Be = !Jn(V, Ga) && !oe ? Ii( + Qe && (Qe.isUnion() ? Qe.types : [Qe]), + (_e) => _e.isLiteral() && !(_e.flags & 1024) ? _e.value : void 0 + ) : [], at = V && Qe && rGe(V, Qe, g); + return { + kind: 0, + symbols: de, + completionKind: Ae, + isInSnippetScope: O, + propertyAccessToConvert: U, + isNewIdentifierLocation: H, + location: pe, + keywordFilters: fe, + literals: Be, + symbolToOriginInfoMap: De, + recommendedCompletion: at, + previousToken: V, + contextToken: L, + isJsxInitializer: Z, + insideJsDocTagTypeExpression: D, + symbolToSortTextMap: Xe, + isTypeOnlyLocation: ye, + isJsxIdentifierExpected: oe, + isRightOfOpenTag: K, + isRightOfDotOrQuestionDot: G || ce, + importStatementCompletion: ne, + hasUnresolvedAutoImports: ge, + flags: ae + }; + function Wt(_e) { + switch (_e.kind) { + case 341: + case 348: + case 342: + case 344: + case 346: + case 349: + case 350: + return !0; + case 345: + return !!_e.constraint; + default: + return !1; + } + } + function nr(_e) { + if (Wt(_e)) { + const Te = jp(_e) ? _e.constraint : _e.typeExpression; + return Te && Te.kind === 309 ? Te : void 0; + } + if (Tx(_e) || eO(_e)) + return _e.class; + } + function Kt() { + Ae = 2; + const _e = a0($), Te = _e && !$.isTypeOf || em($.parent) || sN(L, n, g), dt = LF($); + if (l_($) || _e || Dn($)) { + const xt = Nc($.parent); + xt && (H = !0); + let wt = g.getSymbolAtLocation($); + if (wt && (wt = Jl(wt, g), wt.flags & 1920)) { + const ir = g.getExportsOfModule(wt); + E.assertEachIsDefined(ir, "getExportsOfModule() should all be defined"); + const br = (fr) => g.isValidPropertyAccess(_e ? $ : $.parent, fr.name), Lr = (fr) => Pue(fr, g), en = xt ? (fr) => { + var mn; + return !!(fr.flags & 1920) && !((mn = fr.declarations) != null && mn.every((Di) => Di.parent === $.parent)); + } : dt ? ( + // Any kind is allowed when dotting off namespace in internal import equals declaration + (fr) => Lr(fr) || br(fr) + ) : Te || D ? Lr : br; + for (const fr of ir) + en(fr) && de.push(fr); + if (!Te && !D && wt.declarations && wt.declarations.some( + (fr) => fr.kind !== 307 && fr.kind !== 267 && fr.kind !== 266 + /* EnumDeclaration */ + )) { + let fr = g.getTypeOfSymbolAtLocation(wt, $).getNonOptionalType(), mn = !1; + if (fr.isNullableType()) { + const Di = G && !ce && o.includeAutomaticOptionalChainCompletions !== !1; + (Di || ce) && (fr = fr.getNonNullableType(), Di && (mn = !0)); + } + Pr(fr, !!($.flags & 65536), mn); + } + return; + } + } + if (!Te || VT($)) { + g.tryGetThisTypeAt( + $, + /*includeGlobalThis*/ + !1 + ); + let xt = g.getTypeAtLocation($).getNonOptionalType(); + if (Te) + Pr( + xt.getNonNullableType(), + /*insertAwait*/ + !1, + /*insertQuestionDot*/ + !1 + ); + else { + let wt = !1; + if (xt.isNullableType()) { + const ir = G && !ce && o.includeAutomaticOptionalChainCompletions !== !1; + (ir || ce) && (xt = xt.getNonNullableType(), ir && (wt = !0)); + } + Pr(xt, !!($.flags & 65536), wt); + } + } + } + function Pr(_e, Te, dt) { + H = !!_e.getStringIndexType(), ce && ut(_e.getCallSignatures()) && (H = !0); + const xt = $.kind === 205 ? $ : $.parent; + if (h) + for (const wt of _e.getApparentProperties()) + g.isValidPropertyAccessForCompletions(xt, _e, wt) && Vt( + wt, + /*insertAwait*/ + !1, + dt + ); + else + de.push(...Ln(uH(_e, g), (wt) => g.isValidPropertyAccessForCompletions(xt, _e, wt))); + if (Te && o.includeCompletionsWithInsertText) { + const wt = g.getPromisedTypeOfPromise(_e); + if (wt) + for (const ir of wt.getApparentProperties()) + g.isValidPropertyAccessForCompletions(xt, wt, ir) && Vt( + ir, + /*insertAwait*/ + !0, + dt + ); + } + } + function Vt(_e, Te, dt) { + var xt; + const wt = xc(_e.declarations, (en) => Jn(es(en), oa)); + if (wt) { + const en = zt(wt.expression), fr = en && g.getSymbolAtLocation(en), mn = fr && Eue(fr, L, g), Di = mn && $s(mn); + if (Di && Kp(Ie, Di)) { + const Fi = de.length; + de.push(mn); + const ur = mn.parent; + if (!ur || !Kk(ur) || g.tryGetMemberInModuleExportsAndProperties(mn.name, ur) !== mn) + De[Fi] = { kind: Lr( + 2 + /* SymbolMemberNoExport */ + ) }; + else { + const Mr = Sl(Op(ur.name)) ? (xt = r7(ur)) == null ? void 0 : xt.fileName : void 0, { moduleSpecifier: Or } = (ve || (ve = vu.createImportSpecifierResolver(n, e, _, o))).getModuleSpecifierForBestExportInfo( + [{ + exportKind: 0, + moduleFileName: Mr, + isFromPackageJson: !1, + moduleSymbol: ur, + symbol: mn, + targetFlags: Jl(mn, g).flags + }], + s, + Y1(pe) + ) || {}; + if (Or) { + const tn = { + kind: Lr( + 6 + /* SymbolMemberExport */ + ), + moduleSymbol: ur, + isDefaultExport: !1, + symbolName: mn.name, + exportName: mn.name, + fileName: Mr, + moduleSpecifier: Or + }; + De[Fi] = tn; + } + } + } else if (o.includeCompletionsWithInsertText) { + if (Di && Ie.has(Di)) + return; + br(_e), ir(_e), de.push(_e); + } + } else + br(_e), ir(_e), de.push(_e); + function ir(en) { + dGe(en) && (Xe[$s(en)] = bu.LocalDeclarationPriority); + } + function br(en) { + o.includeCompletionsWithInsertText && (Te && Kp(Ie, $s(en)) ? De[de.length] = { kind: Lr( + 8 + /* Promise */ + ) } : dt && (De[de.length] = { + kind: 16 + /* Nullable */ + })); + } + function Lr(en) { + return dt ? en | 16 : en; + } + } + function zt(_e) { + return Re(_e) ? _e : Dn(_e) ? zt(_e.expression) : void 0; + } + function jr() { + return (Ca() || $e() || Ai() || nt() || te() || rt() || ci() || re() || Xt() || (_s(), 1)) === 1; + } + function ci() { + return Ne(L) ? (Ae = 5, H = !0, fe = 4, 1) : 0; + } + function Xt() { + const _e = lt(L), Te = _e && g.getContextualType(_e.attributes); + if (!Te) return 0; + const dt = _e && g.getContextualType( + _e.attributes, + 4 + /* Completions */ + ); + return de = Hi(de, q(lH(Te, dt, _e.attributes, g), _e.attributes.properties)), je(), Ae = 3, H = !1, 1; + } + function Ai() { + return ne ? (H = !0, At(), 1) : 0; + } + function _s() { + fe = et(L) ? 5 : 1, Ae = 1, H = ws(), V !== L && E.assert(!!V, "Expected 'contextToken' to be defined when different from 'previousToken'."); + const _e = V !== L ? V.getStart() : s, Te = ri(L, _e, n) || n; + O = os(Te); + const dt = (ye ? 0 : 111551) | 788968 | 1920 | 2097152, xt = V && !Y1(V); + de = Hi(de, g.getSymbolsInScope(Te, dt)), E.assertEachIsDefined(de, "getSymbolsInScope() should all be defined"); + for (let wt = 0; wt < de.length; wt++) { + const ir = de[wt]; + if (!g.isArgumentsSymbol(ir) && !ut(ir.declarations, (br) => br.getSourceFile() === n) && (Xe[$s(ir)] = bu.GlobalsOrKeywords), xt && !(ir.flags & 111551)) { + const br = ir.declarations && Nn(ir.declarations, $E); + if (br) { + const Lr = { kind: 64, declaration: br }; + De[wt] = Lr; + } + } + } + if (o.includeCompletionsWithInsertText && Te.kind !== 307) { + const wt = g.tryGetThisTypeAt( + Te, + /*includeGlobalThis*/ + !1, + Qn(Te.parent) ? Te : void 0 + ); + if (wt && !pGe(wt, n, g)) + for (const ir of uH(wt, g)) + De[de.length] = { + kind: 1 + /* ThisType */ + }, de.push(ir), Xe[$s(ir)] = bu.SuggestedClassMembers; + } + At(), ye && (fe = L && J1(L.parent) ? 6 : 7); + } + function $n() { + var _e; + return ne ? !0 : o.includeCompletionsForModuleExports ? n.externalModuleIndicator || n.commonJsModuleIndicator || aU(e.getCompilerOptions()) ? !0 : ((_e = e.getSymlinkCache) == null ? void 0 : _e.call(e).hasAnySymlinks()) || !!e.getCompilerOptions().paths || mae(e) : !1; + } + function os(_e) { + switch (_e.kind) { + case 307: + case 228: + case 294: + case 241: + return !0; + default: + return hi(_e); + } + } + function wr() { + return D || P || !!ne && B1(pe.parent) || !Ss(L) && (sN(L, n, g) || em(pe) || Le(L)); + } + function Ss(_e) { + return _e && (_e.kind === 114 && (_e.parent.kind === 186 || IC(_e.parent)) || _e.kind === 131 && _e.parent.kind === 182); + } + function Le(_e) { + if (_e) { + const Te = _e.parent.kind; + switch (_e.kind) { + case 59: + return Te === 172 || Te === 171 || Te === 169 || Te === 260 || DT(Te); + case 64: + return Te === 265 || Te === 168; + case 130: + return Te === 234; + case 30: + return Te === 183 || Te === 216; + case 96: + return Te === 168; + case 152: + return Te === 238; + } + } + return !1; + } + function At() { + var _e, Te; + if (!$n() || (E.assert(!c?.data, "Should not run 'collectAutoImports' when faster path is available via `data`"), c && !c.source)) + return; + ae |= 1; + const xt = V === L && ne ? "" : V && Re(V) ? V.text.toLowerCase() : "", wt = (_e = _.getModuleSpecifierCache) == null ? void 0 : _e.call(_), ir = SN(n, _, e, o, d), br = (Te = _.getPackageJsonAutoImportProvider) == null ? void 0 : Te.call(_), Lr = c ? void 0 : f6(n, o, _); + h4e( + "collectAutoImports", + _, + ve || (ve = vu.createImportSpecifierResolver(n, e, _, o)), + e, + s, + o, + !!ne, + Y1(pe), + (fr) => { + ir.search( + n.path, + /*preferCapitalized*/ + K, + (mn, Di) => { + if (!X_(mn, pa(_.getCompilationSettings())) || !c && WT(mn) || !ye && !ne && !(Di & 111551) || ye && !(Di & 790504)) return !1; + const Fi = mn.charCodeAt(0); + return K && (Fi < 65 || Fi > 90) ? !1 : c ? !0 : q4e(mn, xt); + }, + (mn, Di, Fi, ur) => { + if (c && !ut(mn, ($a) => c.source === Op($a.moduleSymbol.name)) || (mn = Ln(mn, en), !mn.length)) + return; + const Mr = fr.tryResolve(mn, Fi) || {}; + if (Mr === "failed") return; + let Or = mn[0], tn; + Mr !== "skipped" && ({ exportInfo: Or = mn[0], moduleSpecifier: tn } = Mr); + const qt = Or.exportKind === 1, ma = qt && C4(E.checkDefined(Or.symbol)) || E.checkDefined(Or.symbol); + vr(ma, { + kind: tn ? 32 : 4, + moduleSpecifier: tn, + symbolName: Di, + exportMapKey: ur, + exportName: Or.exportKind === 2 ? "export=" : E.checkDefined(Or.symbol).name, + fileName: Or.moduleFileName, + isDefaultExport: qt, + moduleSymbol: Or.moduleSymbol, + isFromPackageJson: Or.isFromPackageJson + }); + } + ), ge = fr.skippedAny(), ae |= fr.resolvedAny() ? 8 : 0, ae |= fr.resolvedBeyondLimit() ? 16 : 0; + } + ); + function en(fr) { + const mn = Jn(fr.moduleSymbol.valueDeclaration, yi); + if (!mn) { + const Di = Op(fr.moduleSymbol.name); + return hm.nodeCoreModules.has(Di) && zi(Di, "node:") !== v9(n, e) ? !1 : Lr ? Lr.allowsImportingAmbientModule(fr.moduleSymbol, Fe(fr.isFromPackageJson)) : !0; + } + return BU( + fr.isFromPackageJson ? br : e, + n, + mn, + o, + Lr, + Fe(fr.isFromPackageJson), + wt + ); + } + } + function vr(_e, Te) { + const dt = $s(_e); + Xe[dt] !== bu.GlobalsOrKeywords && (De[de.length] = Te, Xe[dt] = ne ? bu.LocationPriority : bu.AutoImportSuggestions, de.push(_e)); + } + function ln(_e, Te) { + Qr(pe) || _e.forEach((dt) => { + if (!Zn(dt)) + return; + const xt = aH( + dt, + pa(i), + /*origin*/ + void 0, + 0, + /*jsxIdentifierExpected*/ + !1 + ); + if (!xt) + return; + const { name: wt } = xt, ir = HHe( + dt, + wt, + Te, + e, + _, + i, + o, + u + ); + if (!ir) + return; + const br = { kind: 128, ...ir }; + ae |= 32, De[de.length] = br, de.push(dt); + }); + } + function Zn(_e) { + return !!(_e.flags & 8196); + } + function ri(_e, Te, dt) { + let xt = _e; + for (; xt && !qV(xt, Te, dt); ) + xt = xt.parent; + return xt; + } + function mi(_e) { + const Te = Io(), dt = Yt(_e) || be(_e) || kt(_e) || Ps(_e) || eA(_e); + return t("getCompletionsAtPosition: isCompletionListBlocker: " + (Io() - Te)), dt; + } + function Ps(_e) { + if (_e.kind === 12) + return !0; + if (_e.kind === 32 && _e.parent) { + if (pe === _e.parent && (pe.kind === 286 || pe.kind === 285)) + return !1; + if (_e.parent.kind === 286) + return pe.parent.kind !== 286; + if (_e.parent.kind === 287 || _e.parent.kind === 285) + return !!_e.parent.parent && _e.parent.parent.kind === 284; + } + return !1; + } + function ws() { + if (L) { + const _e = L.parent.kind, Te = cH(L); + switch (Te) { + case 28: + return _e === 213 || _e === 176 || _e === 214 || _e === 209 || _e === 226 || _e === 184 || _e === 210; + case 21: + return _e === 213 || _e === 176 || _e === 214 || _e === 217 || _e === 196; + case 23: + return _e === 209 || _e === 181 || _e === 167; + case 144: + case 145: + case 102: + return !0; + case 25: + return _e === 267; + case 19: + return _e === 263 || _e === 210; + case 64: + return _e === 260 || _e === 226; + case 16: + return _e === 228; + case 17: + return _e === 239; + case 134: + return _e === 174 || _e === 304; + case 42: + return _e === 174; + } + if (K9(Te)) + return !0; + } + return !1; + } + function Yt(_e) { + return (EJ(_e) || hj(_e)) && (rN(_e, s) || s === _e.end && (!!_e.isUnterminated || EJ(_e))); + } + function Ca() { + const _e = _Ge(L); + if (!_e) return 0; + const dt = (gx(_e.parent) ? _e.parent : void 0) || _e, xt = j4e(dt, g); + if (!xt) return 0; + const wt = g.getTypeFromTypeNode(dt), ir = uH(xt, g), br = uH(wt, g), Lr = /* @__PURE__ */ new Set(); + return br.forEach((en) => Lr.add(en.escapedName)), de = Hi(de, Ln(ir, (en) => !Lr.has(en.escapedName))), Ae = 0, H = !0, 1; + } + function $e() { + if (L?.kind === 26) return 0; + const _e = de.length, Te = sGe(L, s, n); + if (!Te) return 0; + Ae = 0; + let dt, xt; + if (Te.kind === 210) { + const wt = mGe(Te, g); + if (wt === void 0) + return Te.flags & 67108864 ? 2 : 0; + const ir = g.getContextualType( + Te, + 4 + /* Completions */ + ), br = (ir || wt).getStringIndexType(), Lr = (ir || wt).getNumberIndexType(); + if (H = !!br || !!Lr, dt = lH(wt, ir, Te, g), xt = Te.properties, dt.length === 0 && !Lr) + return 0; + } else { + E.assert( + Te.kind === 206 + /* ObjectBindingPattern */ + ), H = !1; + const wt = nm(Te.parent); + if (!FT(wt)) return E.fail("Root declaration is not variable-like."); + let ir = i0(wt) || !!Vc(wt) || wt.parent.parent.kind === 250; + if (!ir && wt.kind === 169 && (ct(wt.parent) ? ir = !!g.getContextualType(wt.parent) : (wt.parent.kind === 174 || wt.parent.kind === 178) && (ir = ct(wt.parent.parent) && !!g.getContextualType(wt.parent.parent))), ir) { + const br = g.getTypeAtLocation(Te); + if (!br) return 2; + dt = g.getPropertiesOfType(br).filter((Lr) => g.isPropertyAccessible( + Te, + /*isSuper*/ + !1, + /*isWrite*/ + !1, + br, + Lr + )), xt = Te.elements; + } + } + if (dt && dt.length > 0) { + const wt = Ut(dt, E.checkDefined(xt)); + de = Hi(de, wt), je(), Te.kind === 210 && o.includeCompletionsWithObjectLiteralMethodSnippets && o.includeCompletionsWithInsertText && (z(_e), ln(wt, Te)); + } + return 1; + } + function nt() { + if (!L) return 0; + const _e = L.kind === 19 || L.kind === 28 ? Jn(L.parent, K7) : YF(L) ? Jn(L.parent.parent, K7) : void 0; + if (!_e) return 0; + YF(L) || (fe = 8); + const { moduleSpecifier: Te } = _e.kind === 275 ? _e.parent.parent : _e.parent; + if (!Te) + return H = !0, _e.kind === 275 ? 2 : 0; + const dt = g.getSymbolAtLocation(Te); + if (!dt) + return H = !0, 2; + Ae = 3, H = !1; + const xt = g.getExportsAndPropertiesOfModule(dt), wt = new Set(_e.elements.filter((br) => !we(br)).map((br) => (br.propertyName || br.name).escapedText)), ir = xt.filter((br) => br.escapedName !== "default" && !wt.has(br.escapedName)); + return de = Hi(de, ir), ir.length || (fe = 0), 1; + } + function te() { + if (L === void 0) return 0; + const _e = L.kind === 19 || L.kind === 28 ? Jn(L.parent, aS) : L.kind === 59 ? Jn(L.parent.parent, aS) : void 0; + if (_e === void 0) return 0; + const Te = new Set(_e.elements.map(w5)); + return de = Ln(g.getTypeAtLocation(_e).getApparentProperties(), (dt) => !Te.has(dt.escapedName)), 1; + } + function rt() { + var _e; + const Te = L && (L.kind === 19 || L.kind === 28) ? Jn(L.parent, lp) : void 0; + if (!Te) + return 0; + const dt = sr(Te, Ef(yi, Nc)); + return Ae = 5, H = !1, (_e = dt.locals) == null || _e.forEach((xt, wt) => { + var ir, br; + de.push(xt), (br = (ir = dt.symbol) == null ? void 0 : ir.exports) != null && br.has(wt) && (Xe[$s(xt)] = bu.OptionalMember); + }), 1; + } + function re() { + const _e = uGe(n, L, pe, s); + if (!_e) return 0; + if (Ae = 3, H = !0, fe = L.kind === 42 ? 0 : Qn(_e) ? 2 : 3, !Qn(_e)) return 1; + const Te = L.kind === 27 ? L.parent.parent : L.parent; + let dt = fl(Te) ? Au(Te) : 0; + if (L.kind === 80 && !we(L)) + switch (L.getText()) { + case "private": + dt = dt | 2; + break; + case "static": + dt = dt | 256; + break; + case "override": + dt = dt | 16; + break; + } + if (ac(Te) && (dt |= 256), !(dt & 2)) { + const xt = Qn(_e) && dt & 16 ? ST(tm(_e)) : d4(_e), wt = Xs(xt, (ir) => { + const br = g.getTypeAtLocation(ir); + return dt & 256 ? br?.symbol && g.getPropertiesOfType(g.getTypeOfSymbolAtLocation(br.symbol, _e)) : br && g.getPropertiesOfType(br); + }); + de = Hi(de, he(wt, _e.members, dt)), rr(de, (ir, br) => { + const Lr = ir?.valueDeclaration; + if (Lr && fl(Lr) && Lr.name && oa(Lr.name)) { + const en = { + kind: 512, + symbolName: g.symbolToString(ir) + }; + De[br] = en; + } + }); + } + return 1; + } + function Ee(_e) { + return !!_e.parent && ji(_e.parent) && ec(_e.parent.parent) && (XE(_e.kind) || Gm(_e)); + } + function Ne(_e) { + if (_e) { + const Te = _e.parent; + switch (_e.kind) { + case 21: + case 28: + return ec(_e.parent) ? _e.parent : void 0; + default: + if (Ee(_e)) + return Te.parent; + } + } + } + function et(_e) { + if (_e) { + let Te; + const dt = sr(_e.parent, (xt) => Qn(xt) ? "quit" : so(xt) && Te === xt.body ? !0 : (Te = xt, !1)); + return dt && dt; + } + } + function lt(_e) { + if (_e) { + const Te = _e.parent; + switch (_e.kind) { + case 32: + case 31: + case 44: + case 80: + case 211: + case 292: + case 291: + case 293: + if (Te && (Te.kind === 285 || Te.kind === 286)) { + if (_e.kind === 32) { + const dt = sl( + _e.pos, + n, + /*startNode*/ + void 0 + ); + if (!Te.typeArguments || dt && dt.kind === 44) break; + } + return Te; + } else if (Te.kind === 291) + return Te.parent.parent; + break; + case 11: + if (Te && (Te.kind === 291 || Te.kind === 293)) + return Te.parent.parent; + break; + case 20: + if (Te && Te.kind === 294 && Te.parent && Te.parent.kind === 291) + return Te.parent.parent.parent; + if (Te && Te.kind === 293) + return Te.parent.parent; + break; + } + } + } + function jt(_e, Te) { + return n.getLineEndOfPosition(_e.getEnd()) < Te; + } + function be(_e) { + const Te = _e.parent, dt = Te.kind; + switch (_e.kind) { + case 28: + return dt === 260 || yt(_e) || dt === 243 || dt === 266 || // enum a { foo, | + bt(dt) || dt === 264 || // interface A= _e.pos; + case 25: + return dt === 207; + case 59: + return dt === 208; + case 23: + return dt === 207; + case 21: + return dt === 299 || bt(dt); + case 19: + return dt === 266; + case 30: + return dt === 263 || // class A< | + dt === 231 || // var C = class D< | + dt === 264 || // interface A< | + dt === 265 || // type List< | + DT(dt); + case 126: + return dt === 172 && !Qn(Te.parent); + case 26: + return dt === 169 || !!Te.parent && Te.parent.kind === 207; + case 125: + case 123: + case 124: + return dt === 169 && !ec(Te.parent); + case 130: + return dt === 276 || dt === 281 || dt === 274; + case 139: + case 153: + return !_H(_e); + case 80: { + if (dt === 276 && _e === Te.name && _e.text === "type" || sr( + _e.parent, + ti + ) && jt(_e, s)) + return !1; + break; + } + case 86: + case 94: + case 120: + case 100: + case 115: + case 102: + case 121: + case 87: + case 140: + return !0; + case 156: + return dt !== 276; + case 42: + return ps(_e.parent) && !hc(_e.parent); + } + if (K9(cH(_e)) && _H(_e) || Ee(_e) && (!Re(_e) || XE(cH(_e)) || we(_e))) + return !1; + switch (cH(_e)) { + case 128: + case 86: + case 87: + case 138: + case 94: + case 100: + case 120: + case 121: + case 123: + case 124: + case 125: + case 126: + case 115: + return !0; + case 134: + return rs(_e.parent); + } + if (sr(_e.parent, Qn) && _e === V && ft(_e, s)) + return !1; + const wt = $1( + _e.parent, + 172 + /* PropertyDeclaration */ + ); + if (wt && _e !== V && Qn(V.parent.parent) && s <= V.end) { + if (ft(_e, V.end)) + return !1; + if (_e.kind !== 64 && (IA(wt) || XI(wt))) + return !0; + } + return Gm(_e) && !du(_e.parent) && !dm(_e.parent) && !((Qn(_e.parent) || Vl(_e.parent) || Mo(_e.parent)) && (_e !== V || s > V.end)); + } + function ft(_e, Te) { + return _e.kind !== 64 && (_e.kind === 27 || !ip(_e.end, Te, n)); + } + function bt(_e) { + return DT(_e) && _e !== 176; + } + function kt(_e) { + if (_e.kind === 9) { + const Te = _e.getFullText(); + return Te.charAt(Te.length - 1) === "."; + } + return !1; + } + function yt(_e) { + return _e.parent.kind === 261 && !sN(_e, n, g); + } + function Ut(_e, Te) { + if (Te.length === 0) + return _e; + const dt = /* @__PURE__ */ new Set(), xt = /* @__PURE__ */ new Set(); + for (const ir of Te) { + if (ir.kind !== 303 && ir.kind !== 304 && ir.kind !== 208 && ir.kind !== 174 && ir.kind !== 177 && ir.kind !== 178 && ir.kind !== 305 || we(ir)) + continue; + let br; + if (Bg(ir)) + W(ir, dt); + else if (da(ir) && ir.propertyName) + ir.propertyName.kind === 80 && (br = ir.propertyName.escapedText); + else { + const Lr = es(ir); + br = Lr && rm(Lr) ? h4(Lr) : void 0; + } + br !== void 0 && xt.add(br); + } + const wt = _e.filter((ir) => !xt.has(ir.escapedName)); + return st(dt, wt), wt; + } + function W(_e, Te) { + const dt = _e.expression, xt = g.getSymbolAtLocation(dt), wt = xt && g.getTypeOfSymbolAtLocation(xt, dt), ir = wt && wt.properties; + ir && ir.forEach((br) => { + Te.add(br.name); + }); + } + function je() { + de.forEach((_e) => { + if (_e.flags & 16777216) { + const Te = $s(_e); + Xe[Te] = Xe[Te] ?? bu.OptionalMember; + } + }); + } + function st(_e, Te) { + if (_e.size !== 0) + for (const dt of Te) + _e.has(dt.name) && (Xe[$s(dt)] = bu.MemberDeclaredBySpreadAssignment); + } + function z(_e) { + for (let Te = _e; Te < de.length; Te++) { + const dt = de[Te], xt = $s(dt), wt = De?.[Te], ir = pa(i), br = aH( + dt, + ir, + wt, + 0, + /*jsxIdentifierExpected*/ + !1 + ); + if (br) { + const Lr = Xe[xt] ?? bu.LocationPriority, { name: en } = br; + Xe[xt] = bu.ObjectLiteralProperty(Lr, en); + } + } + } + function he(_e, Te, dt) { + const xt = /* @__PURE__ */ new Set(); + for (const wt of Te) { + if (wt.kind !== 172 && wt.kind !== 174 && wt.kind !== 177 && wt.kind !== 178 || we(wt) || ef( + wt, + 2 + /* Private */ + ) || Os(wt) !== !!(dt & 256)) + continue; + const ir = Y2(wt.name); + ir && xt.add(ir); + } + return _e.filter( + (wt) => !xt.has(wt.escapedName) && !!wt.declarations && !(sp(wt) & 2) && !(wt.valueDeclaration && Pu(wt.valueDeclaration)) + ); + } + function q(_e, Te) { + const dt = /* @__PURE__ */ new Set(), xt = /* @__PURE__ */ new Set(); + for (const ir of Te) + we(ir) || (ir.kind === 291 ? dt.add(H4(ir.name)) : Sx(ir) && W(ir, xt)); + const wt = _e.filter((ir) => !dt.has(ir.escapedName)); + return st(xt, wt), wt; + } + function we(_e) { + return _e.getStart(n) <= s && s <= _e.getEnd(); + } + } + function sGe(e, t, n) { + var i; + if (e) { + const { parent: s } = e; + switch (e.kind) { + case 19: + case 28: + if (Gs(s) || If(s)) + return s; + break; + case 42: + return hc(s) ? Jn(s.parent, Gs) : void 0; + case 134: + return Jn(s.parent, Gs); + case 80: + if (e.text === "async" && du(e.parent)) + return e.parent.parent; + { + if (Gs(e.parent.parent) && (Bg(e.parent) || du(e.parent) && Vs(n, e.getEnd()).line !== Vs(n, t).line)) + return e.parent.parent; + const c = sr(s, qc); + if (c?.getLastToken(n) === e && Gs(c.parent)) + return c.parent; + } + break; + default: + if ((i = s.parent) != null && i.parent && (hc(s.parent) || Af(s.parent) || rf(s.parent)) && Gs(s.parent.parent)) + return s.parent.parent; + if (Bg(s) && Gs(s.parent)) + return s.parent; + const o = sr(s, qc); + if (e.kind !== 59 && o?.getLastToken(n) === e && Gs(o.parent)) + return o.parent; + } + } + } + function sH(e, t) { + const n = sl(e, t); + return n && e <= n.end && (Dg(n) || qu(n.kind)) ? { contextToken: sl( + n.getFullStart(), + t, + /*startNode*/ + void 0 + ), previousToken: n } : { contextToken: n, previousToken: n }; + } + function N4e(e, t, n, i) { + const s = t.isPackageJsonImport ? i.getPackageJsonAutoImportProvider() : n, o = s.getTypeChecker(), c = t.ambientModuleName ? o.tryFindAmbientModule(t.ambientModuleName) : t.fileName ? o.getMergedSymbol(E.checkDefined(s.getSourceFile(t.fileName)).symbol) : void 0; + if (!c) return; + let _ = t.exportName === "export=" ? o.resolveExternalModuleSymbol(c) : o.tryGetMemberInModuleExportsAndProperties(t.exportName, c); + return _ ? (_ = t.exportName === "default" && C4(_) || _, { symbol: _, origin: $He(t, e, c) }) : void 0; + } + function aH(e, t, n, i, s) { + if (AHe(n)) + return; + const o = EHe(n) ? n.symbolName : e.name; + if (o === void 0 || e.flags & 1536 && a3(o.charCodeAt(0)) || k3(e)) + return; + const c = { name: o, needsConvertPropertyAccess: !1 }; + if (X_( + o, + t, + s ? 1 : 0 + /* Standard */ + ) || e.valueDeclaration && Pu(e.valueDeclaration)) + return c; + switch (i) { + case 3: + return vue(n) ? { name: n.symbolName, needsConvertPropertyAccess: !1 } : void 0; + case 0: + return { name: JSON.stringify(o), needsConvertPropertyAccess: !1 }; + case 2: + case 1: + return o.charCodeAt(0) === 32 ? void 0 : { name: o, needsConvertPropertyAccess: !0 }; + case 5: + case 4: + return c; + default: + E.assertNever(i); + } + } + var oH = [], I4e = Wu(() => { + const e = []; + for (let t = 83; t <= 165; t++) + e.push({ + name: Ws(t), + kind: "keyword", + kindModifiers: "", + sortText: bu.GlobalsOrKeywords + }); + return e; + }); + function O4e(e, t) { + if (!t) return F4e(e); + const n = e + 8 + 1; + return oH[n] || (oH[n] = F4e(e).filter((i) => !aGe(ib(i.name)))); + } + function F4e(e) { + return oH[e] || (oH[e] = I4e().filter((t) => { + const n = ib(t.name); + switch (e) { + case 0: + return !1; + case 1: + return M4e(n) || n === 138 || n === 144 || n === 156 || n === 145 || n === 128 || qD(n) && n !== 157; + case 5: + return M4e(n); + case 2: + return K9(n); + case 3: + return L4e(n); + case 4: + return XE(n); + case 6: + return qD(n) || n === 87; + case 7: + return qD(n); + case 8: + return n === 156; + default: + return E.assertNever(e); + } + })); + } + function aGe(e) { + switch (e) { + case 128: + case 133: + case 163: + case 136: + case 138: + case 94: + case 162: + case 119: + case 140: + case 120: + case 142: + case 143: + case 144: + case 145: + case 146: + case 150: + case 151: + case 164: + case 123: + case 124: + case 125: + case 148: + case 154: + case 155: + case 156: + case 158: + case 159: + return !0; + default: + return !1; + } + } + function L4e(e) { + return e === 148; + } + function K9(e) { + switch (e) { + case 128: + case 129: + case 137: + case 139: + case 153: + case 134: + case 138: + case 164: + return !0; + default: + return yj(e); + } + } + function M4e(e) { + return e === 134 || e === 135 || e === 160 || e === 130 || e === 152 || e === 156 || !I7(e) && !K9(e); + } + function cH(e) { + return Re(e) ? B2(e) ?? 0 : e.kind; + } + function oGe(e, t) { + const n = []; + if (e) { + const i = e.getSourceFile(), s = e.parent, o = i.getLineAndCharacterOfPosition(e.end).line, c = i.getLineAndCharacterOfPosition(t).line; + (oc(s) || Ic(s) && s.moduleSpecifier) && e === s.moduleSpecifier && o === c && n.push({ + name: Ws( + 132 + /* AssertKeyword */ + ), + kind: "keyword", + kindModifiers: "", + sortText: bu.GlobalsOrKeywords + }); + } + return n; + } + function cGe(e, t) { + return sr(e, (n) => Zk(n) && tN(n, t) ? !0 : Ed(n) ? "quit" : !1); + } + function lH(e, t, n, i) { + const s = t && t !== e, o = s && !(t.flags & 3) ? i.getUnionType([e, t]) : e, c = lGe(o, n, i); + return o.isClass() && R4e(c) ? [] : s ? Ln(c, _) : c; + function _(u) { + return Dr(u.declarations) ? ut(u.declarations, (d) => d.parent !== n) : !0; + } + } + function lGe(e, t, n) { + return e.isUnion() ? n.getAllPossiblePropertiesOfTypes(Ln(e.types, (i) => !(i.flags & 402784252 || n.isArrayLikeType(i) || n.isTypeInvalidDueToUnionDiscriminant(i, t) || n.typeHasCallOrConstructSignatures(i) || i.isClass() && R4e(i.getApparentProperties())))) : e.getApparentProperties(); + } + function R4e(e) { + return ut(e, (t) => !!(sp(t) & 6)); + } + function uH(e, t) { + return e.isUnion() ? E.checkEachDefined(t.getAllPossiblePropertiesOfTypes(e.types), "getAllPossiblePropertiesOfTypes() should all be defined") : E.checkEachDefined(e.getApparentProperties(), "getApparentProperties() should all be defined"); + } + function uGe(e, t, n, i) { + switch (n.kind) { + case 352: + return Jn(n.parent, $T); + case 1: + const s = Jn(Bo(Is(n.parent, yi).statements), $T); + if (s && !Ya(s, 20, e)) + return s; + break; + case 81: + if (Jn(n.parent, rs)) + return sr(n, Qn); + break; + case 80: { + if (B2(n) || rs(n.parent) && n.parent.initializer === n) + return; + if (_H(n)) + return sr(n, $T); + } + } + if (t) { + if (n.kind === 137 || Re(t) && rs(t.parent) && Qn(n)) + return sr(t, Qn); + switch (t.kind) { + case 64: + return; + case 27: + case 20: + return _H(n) && n.parent.name === n ? n.parent.parent : Jn(n, $T); + case 19: + case 28: + return Jn(t.parent, $T); + default: + if ($T(n)) { + if (Vs(e, t.getEnd()).line !== Vs(e, i).line) + return n; + const s = Qn(t.parent.parent) ? K9 : L4e; + return s(t.kind) || t.kind === 42 || Re(t) && s( + B2(t) ?? 0 + /* Unknown */ + ) ? t.parent.parent : void 0; + } + return; + } + } + } + function _Ge(e) { + if (!e) return; + const t = e.parent; + switch (e.kind) { + case 19: + if (Xu(t)) + return t; + break; + case 27: + case 28: + case 80: + if (t.kind === 171 && Xu(t.parent)) + return t.parent; + break; + } + } + function j4e(e, t) { + if (!e) return; + if (ai(e) && QI(e.parent)) + return t.getTypeArgumentConstraint(e); + const n = j4e(e.parent, t); + if (n) + switch (e.kind) { + case 171: + return t.getTypeOfPropertyOfContextualType(n, e.symbol.escapedName); + case 193: + case 187: + case 192: + return n; + } + } + function _H(e) { + return e.parent && WI(e.parent) && $T(e.parent.parent); + } + function fGe(e, t, n, i) { + switch (t) { + case ".": + case "@": + return !0; + case '"': + case "'": + case "`": + return !!n && Oae(n) && i === n.getStart(e) + 1; + case "#": + return !!n && wi(n) && !!Nl(n); + case "<": + return !!n && n.kind === 30 && (!cn(n.parent) || B4e(n.parent)); + case "/": + return !!n && (Ga(n) ? !!d3(n) : n.kind === 44 && Fb(n.parent)); + case " ": + return !!n && eD(n) && n.parent.kind === 307; + default: + return E.assertNever(t); + } + } + function B4e({ left: e }) { + return ic(e); + } + function pGe(e, t, n) { + const i = n.resolveName( + "self", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + if (i && n.getTypeOfSymbolAtLocation(i, t) === e) + return !0; + const s = n.resolveName( + "global", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + if (s && n.getTypeOfSymbolAtLocation(s, t) === e) + return !0; + const o = n.resolveName( + "globalThis", + /*location*/ + void 0, + 111551, + /*excludeGlobals*/ + !1 + ); + return !!(o && n.getTypeOfSymbolAtLocation(o, t) === e); + } + function dGe(e) { + return !!(e.valueDeclaration && Au(e.valueDeclaration) & 256 && Qn(e.valueDeclaration.parent)); + } + function mGe(e, t) { + const n = t.getContextualType(e); + if (n) + return n; + const i = fh(e.parent); + if (cn(i) && i.operatorToken.kind === 64 && e === i.left) + return t.getTypeAtLocation(i); + if (ct(i)) + return t.getContextualType(i); + } + function J4e(e, t) { + var n, i, s; + let o, c = !1; + const _ = u(); + return { + isKeywordOnlyCompletion: c, + keywordCompletion: o, + isNewIdentifierLocation: !!(_ || o === 156), + isTopLevelTypeOnly: !!((i = (n = Jn(_, oc)) == null ? void 0 : n.importClause) != null && i.isTypeOnly) || !!((s = Jn(_, nl)) != null && s.isTypeOnly), + couldBeTypeOnlyImportSpecifier: !!_ && W4e(_, e), + replacementSpan: gGe(_) + }; + function u() { + const d = e.parent; + if (nl(d)) { + const g = d.getLastToken(t); + if (Re(e) && g !== e) { + o = 161, c = !0; + return; + } + return o = e.kind === 156 ? void 0 : 156, Due(d.moduleReference) ? d : void 0; + } + if (W4e(d, e) && V4e(d.parent)) + return d; + if (fm(d) || Rg(d)) { + if (!d.parent.isTypeOnly && (e.kind === 19 || e.kind === 102 || e.kind === 28) && (o = 156), V4e(d)) + if (e.kind === 20 || e.kind === 80) + c = !0, o = 161; + else + return d.parent.parent; + return; + } + if (Ic(d) && e.kind === 42 || lp(d) && e.kind === 20) { + c = !0, o = 161; + return; + } + if (eD(e) && yi(d)) + return o = 156, e; + if (eD(e) && oc(d)) + return o = 156, Due(d.moduleSpecifier) ? d : void 0; + } + } + function gGe(e) { + var t; + if (!e) return; + const n = sr(e, Ef(oc, nl, Jg)) ?? e, i = n.getSourceFile(); + if (eS(n, i)) + return e_(n, i); + E.assert( + n.kind !== 102 && n.kind !== 276 + /* ImportSpecifier */ + ); + const s = n.kind === 272 || n.kind === 351 ? z4e((t = n.importClause) == null ? void 0 : t.namedBindings) ?? n.moduleSpecifier : n.moduleReference, o = { + pos: n.getFirstToken().getStart(), + end: s.pos + }; + if (eS(o, i)) + return Fy(o); + } + function z4e(e) { + var t; + return Nn( + (t = Jn(e, fm)) == null ? void 0 : t.elements, + (n) => { + var i; + return !n.propertyName && WT(n.name.text) && ((i = sl(n.name.pos, e.getSourceFile(), e)) == null ? void 0 : i.kind) !== 28; + } + ); + } + function W4e(e, t) { + return Yu(e) && (e.isTypeOnly || t === e.name && YF(t)); + } + function V4e(e) { + if (!Due(e.parent.parent.moduleSpecifier) || e.parent.name) + return !1; + if (fm(e)) { + const t = z4e(e); + return (t ? e.elements.indexOf(t) : e.elements.length) < 2; + } + return !0; + } + function Due(e) { + var t; + return ic(e) ? !0 : !((t = Jn(Sh(e) ? e.expression : e, Ga)) != null && t.text); + } + function hGe(e, t) { + if (!e) return; + const n = sr(e, (s) => pb(s) || U4e(s) || Ts(s) ? "quit" : (ji(s) || Mo(s)) && !Pb(s.parent)), i = sr(t, (s) => pb(s) || U4e(s) || Ts(s) ? "quit" : ti(s)); + return n || i; + } + function U4e(e) { + return e.parent && xo(e.parent) && (e.parent.body === e || // const a = () => /**/; + e.kind === 39); + } + function Pue(e, t, n = /* @__PURE__ */ new Map()) { + return i(e) || i(Jl(e.exportSymbol || e, t)); + function i(s) { + return !!(s.flags & 788968) || t.isUnknownSymbol(s) || !!(s.flags & 1536) && Kp(n, $s(s)) && t.getExportsOfModule(s).some((o) => Pue(o, t, n)); + } + } + function yGe(e, t) { + const n = Jl(e, t).declarations; + return !!Dr(n) && Ri(n, y9); + } + function q4e(e, t) { + if (t.length === 0) + return !0; + let n = !1, i, s = 0; + const o = e.length; + for (let c = 0; c < o; c++) { + const _ = e.charCodeAt(c), u = t.charCodeAt(s); + if ((_ === u || _ === vGe(u)) && (n || (n = i === void 0 || // Beginning of word + 97 <= i && i <= 122 && 65 <= _ && _ <= 90 || // camelCase transition + i === 95 && _ !== 95), n && s++, s === t.length)) + return !0; + i = _; + } + return !1; + } + function vGe(e) { + return 97 <= e && e <= 122 ? e - 32 : e; + } + function bGe(e) { + return e === "abstract" || e === "async" || e === "await" || e === "declare" || e === "module" || e === "namespace" || e === "type" || e === "satisfies" || e === "as"; + } + var fH = {}; + Qa(fH, { + getStringLiteralCompletionDetails: () => xGe, + getStringLiteralCompletions: () => SGe + }); + var H4e = { + directory: 0, + script: 1, + "external module name": 2 + }; + function wue() { + const e = /* @__PURE__ */ new Map(); + function t(n) { + const i = e.get(n.name); + (!i || H4e[i.kind] < H4e[n.kind]) && e.set(n.name, n); + } + return { + add: t, + has: e.has.bind(e), + values: e.values.bind(e) + }; + } + function SGe(e, t, n, i, s, o, c, _, u) { + if (pae(e, t)) { + const d = RGe(e, t, i, s); + return d && G4e(d); + } + if (Mx(e, t, n)) { + if (!n || !Ga(n)) return; + const d = X4e(e, n, t, o, s, _); + return TGe(d, n, e, s, o, c, i, _, t, u); + } + } + function TGe(e, t, n, i, s, o, c, _, u, d) { + if (e === void 0) + return; + const g = tU(t, u); + switch (e.kind) { + case 0: + return G4e(e.paths); + case 1: { + const h = sR(); + return xue( + e.symbols, + h, + t, + t, + n, + u, + n, + i, + s, + 99, + o, + 4, + _, + c, + /*formatContext*/ + void 0, + /*isTypeOnlyLocation*/ + void 0, + /*propertyAccessToConvert*/ + void 0, + /*jsxIdentifierExpected*/ + void 0, + /*isJsxInitializer*/ + void 0, + /*importStatementCompletion*/ + void 0, + /*recommendedCompletion*/ + void 0, + /*symbolToOriginInfoMap*/ + void 0, + /*symbolToSortTextMap*/ + void 0, + /*isJsxIdentifierExpected*/ + void 0, + /*isRightOfOpenTag*/ + void 0, + d + ), { isGlobalCompletion: !1, isMemberCompletion: !0, isNewIdentifierLocation: e.hasIndexSignature, optionalReplacementSpan: g, entries: h }; + } + case 2: { + const h = t.kind === 15 ? 96 : zi(sc(t), "'") ? 39 : 34, S = e.types.map((T) => ({ + name: $m(T.value, h), + kindModifiers: "", + kind: "string", + sortText: bu.LocationPriority, + replacementSpan: eU(t, u) + })); + return { isGlobalCompletion: !1, isMemberCompletion: !1, isNewIdentifierLocation: e.isNewIdentifier, optionalReplacementSpan: g, entries: S }; + } + default: + return E.assertNever(e); + } + } + function xGe(e, t, n, i, s, o, c, _) { + if (!i || !Ga(i)) return; + const u = X4e(t, i, n, s, o, _); + return u && kGe(e, i, u, t, s.getTypeChecker(), c); + } + function kGe(e, t, n, i, s, o) { + switch (n.kind) { + case 0: { + const c = Nn(n.paths, (_) => _.name === e); + return c && Z9(e, $4e(c.extension), c.kind, [jf(e)]); + } + case 1: { + const c = Nn(n.symbols, (_) => _.name === e); + return c && Cue(c, c.name, s, i, t, o); + } + case 2: + return Nn(n.types, (c) => c.value === e) ? Z9(e, "", "string", [jf(e)]) : void 0; + default: + return E.assertNever(n); + } + } + function G4e(e) { + return { isGlobalCompletion: !1, isMemberCompletion: !1, isNewIdentifierLocation: !0, entries: e.map(({ name: s, kind: o, span: c, extension: _ }) => ({ name: s, kind: o, kindModifiers: $4e(_), sortText: bu.LocationPriority, replacementSpan: c })) }; + } + function $4e(e) { + switch (e) { + case ".d.ts": + return ".d.ts"; + case ".js": + return ".js"; + case ".json": + return ".json"; + case ".jsx": + return ".jsx"; + case ".ts": + return ".ts"; + case ".tsx": + return ".tsx"; + case ".d.mts": + return ".d.mts"; + case ".mjs": + return ".mjs"; + case ".mts": + return ".mts"; + case ".d.cts": + return ".d.cts"; + case ".cjs": + return ".cjs"; + case ".cts": + return ".cts"; + case ".tsbuildinfo": + return E.fail("Extension .tsbuildinfo is unsupported."); + case void 0: + return ""; + default: + return E.assertNever(e); + } + } + function X4e(e, t, n, i, s, o) { + const c = i.getTypeChecker(), _ = Aue(t.parent); + switch (_.kind) { + case 201: { + const T = Aue(_.parent); + return T.kind === 205 ? { kind: 0, paths: Z4e(e, t, i, s, o) } : u(T); + } + case 303: + return Gs(_.parent) && _.name === t ? DGe(c, _.parent) : d() || d( + 0 + /* None */ + ); + case 212: { + const { expression: T, argumentExpression: C } = _; + return t === Ja(C) ? Q4e(c.getTypeAtLocation(T)) : void 0; + } + case 213: + case 214: + case 291: + if (!VGe(t) && !hf(_)) { + const T = WN.getArgumentInfoForCompletions(_.kind === 291 ? _.parent : t, n, e, c); + return T && EGe(T.invocation, t, T, c) || d( + 0 + /* None */ + ); + } + case 272: + case 278: + case 283: + case 351: + return { kind: 0, paths: Z4e(e, t, i, s, o) }; + case 296: + const g = S9(c, _.parent.clauses), h = d(); + return h ? { kind: 2, types: h.types.filter((T) => !g.hasValue(T.value)), isNewIdentifier: !1 } : void 0; + default: + return d() || d( + 0 + /* None */ + ); + } + function u(g) { + switch (g.kind) { + case 233: + case 183: { + const T = sr(_, (C) => C.parent === g); + return T ? { kind: 2, types: pH(c.getTypeArgumentConstraint(T)), isNewIdentifier: !1 } : void 0; + } + case 199: + const { indexType: h, objectType: S } = g; + return tN(h, n) ? Q4e(c.getTypeFromTypeNode(S)) : void 0; + case 192: { + const T = u(Aue(g.parent)); + if (!T) + return; + const C = CGe(g, _); + return T.kind === 1 ? { kind: 1, symbols: T.symbols.filter((D) => !ls(C, D.name)), hasIndexSignature: T.hasIndexSignature } : { kind: 2, types: T.types.filter((D) => !ls(C, D.value)), isNewIdentifier: !1 }; + } + default: + return; + } + } + function d(g = 4) { + const h = pH(a9(t, c, g)); + if (h.length) + return { kind: 2, types: h, isNewIdentifier: !1 }; + } + } + function Aue(e) { + switch (e.kind) { + case 196: + return v3(e); + case 217: + return fh(e); + default: + return e; + } + } + function CGe(e, t) { + return Ii(e.types, (n) => n !== t && y0(n) && Ks(n.literal) ? n.literal.text : void 0); + } + function EGe(e, t, n, i) { + let s = !1; + const o = /* @__PURE__ */ new Map(), c = ru(e) ? E.checkDefined(sr(t.parent, dm)) : t, _ = i.getCandidateSignaturesForStringLiteralCompletions(e, c), u = Xs(_, (d) => { + if (!gu(d) && n.argumentCount > d.parameters.length) return; + let g = d.getTypeParameterAtPosition(n.argumentIndex); + if (ru(e)) { + const h = i.getTypeOfPropertyOfType(g, H3(c.name)); + h && (g = h); + } + return s = s || !!(g.flags & 4), pH(g, o); + }); + return Dr(u) ? { kind: 2, types: u, isNewIdentifier: s } : void 0; + } + function Q4e(e) { + return e && { + kind: 1, + symbols: Ln(e.getApparentProperties(), (t) => !(t.valueDeclaration && Pu(t.valueDeclaration))), + hasIndexSignature: CU(e) + }; + } + function DGe(e, t) { + const n = e.getContextualType(t); + if (!n) return; + const i = e.getContextualType( + t, + 4 + /* Completions */ + ); + return { + kind: 1, + symbols: lH( + n, + i, + t, + e + ), + hasIndexSignature: CU(n) + }; + } + function pH(e, t = /* @__PURE__ */ new Map()) { + return e ? (e = sU(e), e.isUnion() ? Xs(e.types, (n) => pH(n, t)) : e.isStringLiteral() && !(e.flags & 1024) && Kp(t, e.value) ? [e] : He) : He; + } + function uP(e, t, n) { + return { name: e, kind: t, extension: n }; + } + function Nue(e) { + return uP( + e, + "directory", + /*extension*/ + void 0 + ); + } + function Y4e(e, t, n) { + const i = BGe(e, t), s = e.length === 0 ? void 0 : jl(t, e.length); + return n.map(({ name: o, kind: c, extension: _ }) => o.includes(Oo) || o.includes(kI) ? { name: o, kind: c, extension: _, span: s } : { name: o, kind: c, extension: _, span: i }); + } + function Z4e(e, t, n, i, s) { + return Y4e(t.text, t.getStart(e) + 1, PGe(e, t, n, i, s)); + } + function PGe(e, t, n, i, s) { + const o = Rl(t.text), c = Ga(t) ? n.getModeForUsageLocation(e, t) : void 0, _ = e.path, u = Xn(_), d = n.getCompilerOptions(), g = n.getTypeChecker(), h = Iue(d, 1, e, g, s, c); + return JGe(o) || !d.baseUrl && !d.paths && ($_(o) || tY(o)) ? wGe(o, u, d, i, _, h) : OGe(o, u, c, d, i, h, g); + } + function Iue(e, t, n, i, s, o) { + return { + extensionsToSearch: Ep(AGe(e, i)), + referenceKind: t, + importingSourceFile: n, + endingPreference: s?.importModuleSpecifierEnding, + resolutionMode: o + }; + } + function wGe(e, t, n, i, s, o) { + return n.rootDirs ? IGe( + n.rootDirs, + e, + t, + o, + n, + i, + s + ) : ts(RN( + e, + t, + o, + i, + /*moduleSpecifierIsRelative*/ + !0, + s + ).values()); + } + function AGe(e, t) { + const n = t ? Ii(t.getAmbientModules(), (o) => { + const c = o.name.slice(1, -1); + if (!(!c.startsWith("*.") || c.includes("/"))) + return c.slice(1); + }) : [], i = [...L4(e), n], s = Hu(e); + return ZF(s) ? J3(e, i) : i; + } + function NGe(e, t, n, i) { + e = e.map((o) => bl(Cs($_(o) ? o : Mn(t, o)))); + const s = xc(e, (o) => Gp(o, n, t, i) ? n.substr(o.length) : void 0); + return tb( + [...e.map((o) => Mn(o, s)), n].map((o) => F1(o)), + O2, + Kl + ); + } + function IGe(e, t, n, i, s, o, c) { + const _ = s.project || o.getCurrentDirectory(), u = !(o.useCaseSensitiveFileNames && o.useCaseSensitiveFileNames()), d = NGe(e, _, n, u); + return tb( + Xs(d, (g) => ts(RN( + t, + g, + i, + o, + /*moduleSpecifierIsRelative*/ + !0, + c + ).values())), + (g, h) => g.name === h.name && g.kind === h.kind && g.extension === h.extension + ); + } + function RN(e, t, n, i, s, o, c = wue()) { + var _; + e === void 0 && (e = ""), e = Rl(e), e0(e) || (e = Xn(e)), e === "" && (e = "." + Oo), e = bl(e); + const u = O1(t, e), d = e0(u) ? u : Xn(u); + if (!s) { + const T = Mae(d, i); + if (T) { + const D = E4(T, i).typesVersions; + if (typeof D == "object") { + const P = (_ = PO(D)) == null ? void 0 : _.paths; + if (P) { + const O = Xn(T), j = u.slice(bl(O).length); + if (eDe(c, j, O, n, i, P)) + return c; + } + } + } + } + const g = !(i.useCaseSensitiveFileNames && i.useCaseSensitiveFileNames()); + if (!_9(i, d)) return c; + const h = PU( + i, + d, + n.extensionsToSearch, + /*exclude*/ + void 0, + /*include*/ + ["./*"] + ); + if (h) + for (let T of h) { + if (T = Cs(T), o && oh(T, o, t, g) === 0) + continue; + const { name: C, extension: D } = K4e( + Wc(T), + i.getCompilationSettings(), + n, + /*isExportsWildcard*/ + !1 + ); + c.add(uP(C, "script", D)); + } + const S = u9(i, d); + if (S) + for (const T of S) { + const C = Wc(Cs(T)); + C !== "@types" && c.add(Nue(C)); + } + return c; + } + function K4e(e, t, n, i) { + const s = fv.tryGetRealFileNameForNonJsDeclarationFileName(e); + if (s) + return { name: s, extension: hh(s) }; + if (n.referenceKind === 0) + return { name: e, extension: hh(e) }; + let o = kD( + { importModuleSpecifierEnding: n.endingPreference }, + t, + n.importingSourceFile + ).getAllowedEndingsInPreferredOrder(n.resolutionMode); + if (i && (o = o.filter( + (_) => _ !== 0 && _ !== 1 + /* Index */ + )), o[0] === 3) { + if (Lc(e, y5)) + return { name: e, extension: hh(e) }; + const _ = fv.tryGetJSExtensionForFile(e, t); + return _ ? { name: by(e, _), extension: _ } : { name: e, extension: hh(e) }; + } + if (!i && (o[0] === 0 || o[0] === 1) && Lc(e, [ + ".js", + ".jsx", + ".ts", + ".tsx", + ".d.ts" + /* Dts */ + ])) + return { name: Gu(e), extension: hh(e) }; + const c = fv.tryGetJSExtensionForFile(e, t); + return c ? { name: by(e, c), extension: c } : { name: e, extension: hh(e) }; + } + function eDe(e, t, n, i, s, o) { + const c = (u) => o[u], _ = (u, d) => { + const g = EC(u), h = EC(d), S = typeof g == "object" ? g.prefix.length : u.length, T = typeof h == "object" ? h.prefix.length : d.length; + return uo(T, S); + }; + return tDe( + e, + /*isExports*/ + !1, + t, + n, + i, + s, + Gd(o), + c, + _ + ); + } + function tDe(e, t, n, i, s, o, c, _, u) { + let d = [], g; + for (const h of c) { + if (h === ".") continue; + const S = h.replace(/^\.\//, ""), T = _(h); + if (T) { + const C = EC(S); + if (!C) continue; + const D = typeof C == "object" && pI(C, n); + D && (g === void 0 || u(h, g) === -1) && (g = h, d = d.filter((O) => !O.matchedPattern)), (typeof C == "string" || g === void 0 || u(h, g) !== 1) && d.push({ + matchedPattern: D, + results: FGe(S, T, n, i, s, t && D, o).map(({ name: O, kind: j, extension: F }) => uP(O, j, F)) + }); + } + } + return d.forEach((h) => h.results.forEach((S) => e.add(S))), g !== void 0; + } + function OGe(e, t, n, i, s, o, c) { + const { baseUrl: _, paths: u } = i, d = wue(), g = Hu(i); + if (_) { + const S = Cs(Mn(s.getCurrentDirectory(), _)); + RN( + e, + S, + o, + s, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + d + ); + } + if (u) { + const S = B7(i, s); + eDe(d, e, S, o, s, u); + } + const h = nDe(e); + for (const S of MGe(e, h, c)) + d.add(uP( + S, + "external module name", + /*extension*/ + void 0 + )); + if (aDe(s, i, t, h, o, d), ZF(g)) { + let S = !1; + if (h === void 0) + for (const T of jGe(s, t)) { + const C = uP( + T, + "external module name", + /*extension*/ + void 0 + ); + d.has(C.name) || (S = !0, d.add(C)); + } + if (!S) { + let T = (C) => { + const D = Mn(C, "node_modules"); + _9(s, D) && RN( + e, + D, + o, + s, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + d + ); + }; + if (h && $B(i)) { + const C = T; + T = (D) => { + const P = vl(e); + P.shift(); + let O = P.shift(); + if (!O) + return C(D); + if (zi(O, "@")) { + const V = P.shift(); + if (!V) + return C(D); + O = Mn(O, V); + } + const j = Mn(D, "node_modules", O), F = Mn(j, "package.json"); + if (hN(s, F)) { + const L = E4(F, s).exports; + if (L) { + if (typeof L != "object" || L === null) + return; + const $ = Gd(L), U = P.join("/") + (P.length && e0(e) ? "/" : ""), G = Ay(i, n); + tDe( + d, + /*isExports*/ + !0, + U, + j, + o, + s, + $, + (ce) => ST(rDe(L[ce], G)), + Wz + ); + return; + } + } + return C(D); + }; + } + $p(t, T); + } + } + return ts(d.values()); + } + function rDe(e, t) { + if (typeof e == "string") + return e; + if (e && typeof e == "object" && !ss(e)) { + for (const n in e) + if (n === "default" || t.includes(n) || DA(t, n)) { + const i = e[n]; + return rDe(i, t); + } + } + } + function nDe(e) { + return Oue(e) ? e0(e) ? e : Xn(e) : void 0; + } + function FGe(e, t, n, i, s, o, c) { + if (!nc(e, "*")) + return e.includes("*") ? He : d( + e, + "script" + /* scriptElement */ + ); + const _ = e.slice(0, e.length - 1), u = vR(n, _); + if (u === void 0) + return e[e.length - 2] === "/" ? d( + _, + "directory" + /* directory */ + ) : Xs(t, (h) => { + var S; + return (S = iDe("", i, h, s, o, c)) == null ? void 0 : S.map(({ name: T, ...C }) => ({ name: _ + T, ...C })); + }); + return Xs(t, (g) => iDe(u, i, g, s, o, c)); + function d(g, h) { + return zi(g, n) ? [{ name: F1(g), kind: h, extension: void 0 }] : He; + } + } + function iDe(e, t, n, i, s, o) { + if (!o.readDirectory) + return; + const c = EC(n); + if (c === void 0 || Gi(c)) + return; + const _ = O1(c.prefix), u = e0(c.prefix) ? _ : Xn(_), d = e0(c.prefix) ? "" : Wc(_), g = Oue(e), h = g ? e0(e) ? e : Xn(e) : void 0, S = g ? Mn(u, d + h) : u, T = Cs(c.suffix), C = T && j7("_" + T), D = C ? [by(T, C), T] : [T], P = Cs(Mn(t, S)), O = g ? P : bl(P) + d, j = T ? D.map(($) => "**/*" + $) : ["./*"], F = Ii(PU( + o, + P, + i.extensionsToSearch, + /*exclude*/ + void 0, + j + ), ($) => { + const U = L($); + if (U) { + if (Oue(U)) + return Nue(vl(sDe(U))[1]); + const { name: G, extension: ce } = K4e(U, o.getCompilationSettings(), i, s); + return uP(G, "script", ce); + } + }), V = T ? He : Ii(u9(o, P), ($) => $ === "node_modules" ? void 0 : Nue($)); + return [...F, ...V]; + function L($) { + return xc(D, (U) => { + const G = LGe(Cs($), O, U); + return G === void 0 ? void 0 : sDe(G); + }); + } + } + function LGe(e, t, n) { + return zi(e, t) && nc(e, n) ? e.slice(t.length, e.length - n.length) : void 0; + } + function sDe(e) { + return e[0] === Oo ? e.slice(1) : e; + } + function MGe(e, t, n) { + const s = n.getAmbientModules().map((o) => Op(o.name)).filter((o) => zi(o, e) && !o.includes("*")); + if (t !== void 0) { + const o = bl(t); + return s.map((c) => kE(c, o)); + } + return s; + } + function RGe(e, t, n, i) { + const s = Ei(e, t), o = kg(e.text, s.pos), c = o && Nn(o, (C) => t >= C.pos && t <= C.end); + if (!c) + return; + const _ = e.text.slice(c.pos, t), u = zGe.exec(_); + if (!u) + return; + const [, d, g, h] = u, S = Xn(e.path), T = g === "path" ? RN( + h, + S, + Iue(n, 0, e), + i, + /*moduleSpecifierIsRelative*/ + !0, + e.path + ) : g === "types" ? aDe(i, n, S, nDe(h), Iue(n, 1, e)) : E.fail(); + return Y4e(h, c.pos + d.length, ts(T.values())); + } + function aDe(e, t, n, i, s, o = wue()) { + const c = /* @__PURE__ */ new Map(), _ = f9(() => vD(t, e)) || He; + for (const d of _) + u(d); + for (const d of wU(n, e)) { + const g = Mn(Xn(d), "node_modules/@types"); + u(g); + } + return o; + function u(d) { + if (_9(e, d)) + for (const g of u9(e, d)) { + const h = PA(g); + if (!(t.types && !ls(t.types, h))) + if (i === void 0) + c.has(h) || (o.add(uP( + h, + "external module name", + /*extension*/ + void 0 + )), c.set(h, !0)); + else { + const S = Mn(d, g), T = KB(i, h, _0(e)); + T !== void 0 && RN( + T, + S, + s, + e, + /*moduleSpecifierIsRelative*/ + !1, + /*exclude*/ + void 0, + o + ); + } + } + } + } + function jGe(e, t) { + if (!e.readFile || !e.fileExists) return He; + const n = []; + for (const i of wU(t, e)) { + const s = E4(i, e); + for (const o of WGe) { + const c = s[o]; + if (c) + for (const _ in c) + io(c, _) && !zi(_, "@types/") && n.push(_); + } + } + return n; + } + function BGe(e, t) { + const n = Math.max(e.lastIndexOf(Oo), e.lastIndexOf(kI)), i = n !== -1 ? n + 1 : 0, s = e.length - i; + return s === 0 || X_( + e.substr(i, s), + 99 + /* ESNext */ + ) ? void 0 : jl(t + i, s); + } + function JGe(e) { + if (e && e.length >= 2 && e.charCodeAt(0) === 46) { + const t = e.length >= 3 && e.charCodeAt(1) === 46 ? 2 : 1, n = e.charCodeAt(t); + return n === 47 || n === 92; + } + return !1; + } + var zGe = /^(\/\/\/\s* Xx, + DefinitionKind: () => pDe, + EntryKind: () => dDe, + ExportKind: () => oDe, + FindReferencesUse: () => mDe, + ImportExport: () => cDe, + createImportTracker: () => Fue, + findModuleReferences: () => lDe, + findReferenceOrRenameEntries: () => n$e, + findReferencedSymbols: () => e$e, + getContextNode: () => TS, + getExportInfo: () => Lue, + getImplementationsAtPosition: () => r$e, + getImportOrExportSymbol: () => fDe, + getReferenceEntriesForNode: () => hDe, + getTextSpanOfEntry: () => Bue, + isContextWithStartAndEndNode: () => Rue, + isDeclarationOfSymbol: () => SDe, + isWriteAccessForReference: () => Jue, + nodeEntry: () => Vg, + toContextSpan: () => jue, + toHighlightSpan: () => u$e, + toReferenceEntry: () => bDe, + toRenameLocation: () => s$e + }); + function Fue(e, t, n, i) { + const s = GGe(e, n, i); + return (o, c, _) => { + const { directImports: u, indirectUsers: d } = UGe(e, t, s, c, n, i); + return { indirectUsers: d, ...qGe(u, o, c.exportKind, n, _) }; + }; + } + var oDe = /* @__PURE__ */ ((e) => (e[e.Named = 0] = "Named", e[e.Default = 1] = "Default", e[e.ExportEquals = 2] = "ExportEquals", e))(oDe || {}), cDe = /* @__PURE__ */ ((e) => (e[e.Import = 0] = "Import", e[e.Export = 1] = "Export", e))(cDe || {}); + function UGe(e, t, n, { exportingModuleSymbol: i, exportKind: s }, o, c) { + const _ = o6(), u = o6(), d = [], g = !!i.globalExports, h = g ? void 0 : []; + return T(i), { directImports: d, indirectUsers: S() }; + function S() { + if (g) + return e; + if (i.declarations) + for (const F of i.declarations) + _b(F) && t.has(F.getSourceFile().fileName) && O(F); + return h.map(xr); + } + function T(F) { + const V = j(F); + if (V) { + for (const L of V) + if (_(L)) + switch (c && c.throwIfCancellationRequested(), L.kind) { + case 213: + if (hf(L)) { + C(L); + break; + } + if (!g) { + const U = L.parent; + if (s === 2 && U.kind === 260) { + const { name: G } = U; + if (G.kind === 80) { + d.push(G); + break; + } + } + } + break; + case 80: + break; + case 271: + P( + L, + L.name, + Vn( + L, + 32 + /* Export */ + ), + /*alreadyAddedDirect*/ + !1 + ); + break; + case 272: + case 351: + d.push(L); + const $ = L.importClause && L.importClause.namedBindings; + $ && $.kind === 274 ? P( + L, + $.name, + /*isReExport*/ + !1, + /*alreadyAddedDirect*/ + !0 + ) : !g && jT(L) && O(eL(L)); + break; + case 278: + L.exportClause ? L.exportClause.kind === 280 ? O( + eL(L), + /*addTransitiveDependencies*/ + !0 + ) : d.push(L) : T(ZGe(L, o)); + break; + case 205: + !g && L.isTypeOf && !L.qualifier && D(L) && O( + L.getSourceFile(), + /*addTransitiveDependencies*/ + !0 + ), d.push(L); + break; + default: + E.failBadSyntaxKind(L, "Unexpected import kind."); + } + } + } + function C(F) { + const V = sr(F, dH) || F.getSourceFile(); + O( + V, + /** addTransitiveDependencies */ + !!D( + F, + /*stopAtAmbientModule*/ + !0 + ) + ); + } + function D(F, V = !1) { + return sr(F, (L) => V && dH(L) ? "quit" : ed(L) && ut(L.modifiers, _x)); + } + function P(F, V, L, $) { + if (s === 2) + $ || d.push(F); + else if (!g) { + const U = eL(F); + E.assert( + U.kind === 307 || U.kind === 267 + /* ModuleDeclaration */ + ), L || HGe(U, V, o) ? O( + U, + /*addTransitiveDependencies*/ + !0 + ) : O(U); + } + } + function O(F, V = !1) { + if (E.assert(!g), !u(F) || (h.push(F), !V)) return; + const $ = o.getMergedSymbol(F.symbol); + if (!$) return; + E.assert(!!($.flags & 1536)); + const U = j($); + if (U) + for (const G of U) + Qm(G) || O( + eL(G), + /*addTransitiveDependencies*/ + !0 + ); + } + function j(F) { + return n.get($s(F).toString()); + } + } + function qGe(e, t, n, i, s) { + const o = [], c = []; + function _(S, T) { + o.push([S, T]); + } + if (e) + for (const S of e) + u(S); + return { importSearches: o, singleReferences: c }; + function u(S) { + if (S.kind === 271) { + Mue(S) && d(S.name); + return; + } + if (S.kind === 80) { + d(S); + return; + } + if (S.kind === 205) { + if (S.qualifier) { + const D = tf(S.qualifier); + D.escapedText === uc(t) && c.push(D); + } else n === 2 && c.push(S.argument.literal); + return; + } + if (S.moduleSpecifier.kind !== 11) + return; + if (S.kind === 278) { + S.exportClause && lp(S.exportClause) && g(S.exportClause); + return; + } + const { name: T, namedBindings: C } = S.importClause || { name: void 0, namedBindings: void 0 }; + if (C) + switch (C.kind) { + case 274: + d(C.name); + break; + case 275: + (n === 0 || n === 1) && g(C); + break; + default: + E.assertNever(C); + } + if (T && (n === 1 || n === 2) && (!s || T.escapedText === KF(t))) { + const D = i.getSymbolAtLocation(T); + _(T, D); + } + } + function d(S) { + n === 2 && (!s || h(S.escapedText)) && _(S, i.getSymbolAtLocation(S)); + } + function g(S) { + if (S) + for (const T of S.elements) { + const { name: C, propertyName: D } = T; + if (h((D || C).escapedText)) + if (D) + c.push(D), (!s || C.escapedText === t.escapedName) && _(C, i.getSymbolAtLocation(C)); + else { + const P = T.kind === 281 && T.propertyName ? i.getExportSpecifierLocalTargetSymbol(T) : i.getSymbolAtLocation(C); + _(C, P); + } + } + } + function h(S) { + return S === t.escapedName || n !== 0 && S === "default"; + } + } + function HGe(e, t, n) { + const i = n.getSymbolAtLocation(t); + return !!uDe(e, (s) => { + if (!Ic(s)) return; + const { exportClause: o, moduleSpecifier: c } = s; + return !c && o && lp(o) && o.elements.some((_) => n.getExportSpecifierLocalTargetSymbol(_) === i); + }); + } + function lDe(e, t, n) { + var i; + const s = [], o = e.getTypeChecker(); + for (const c of t) { + const _ = n.valueDeclaration; + if (_?.kind === 307) { + for (const u of c.referencedFiles) + e.getSourceFileFromReference(c, u) === _ && s.push({ kind: "reference", referencingFile: c, ref: u }); + for (const u of c.typeReferenceDirectives) { + const d = (i = e.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(u, c)) == null ? void 0 : i.resolvedTypeReferenceDirective; + d !== void 0 && d.resolvedFileName === _.fileName && s.push({ kind: "reference", referencingFile: c, ref: u }); + } + } + _De(c, (u, d) => { + o.getSymbolAtLocation(d) === n && s.push(oo(u) ? { kind: "implicit", literal: d, referencingFile: c } : { kind: "import", literal: d }); + }); + } + return s; + } + function GGe(e, t, n) { + const i = /* @__PURE__ */ new Map(); + for (const s of e) + n && n.throwIfCancellationRequested(), _De(s, (o, c) => { + const _ = t.getSymbolAtLocation(c); + if (_) { + const u = $s(_).toString(); + let d = i.get(u); + d || i.set(u, d = []), d.push(o); + } + }); + return i; + } + function uDe(e, t) { + return rr(e.kind === 307 ? e.statements : e.body.statements, (n) => ( + // TODO: GH#18217 + t(n) || dH(n) && rr(n.body && n.body.statements, t) + )); + } + function _De(e, t) { + if (e.externalModuleIndicator || e.imports !== void 0) + for (const n of e.imports) + t(_4(n), n); + else + uDe(e, (n) => { + switch (n.kind) { + case 278: + case 272: { + const i = n; + i.moduleSpecifier && Ks(i.moduleSpecifier) && t(i, i.moduleSpecifier); + break; + } + case 271: { + const i = n; + Mue(i) && t(i, i.moduleReference.expression); + break; + } + } + }); + } + function fDe(e, t, n, i) { + return i ? s() : s() || o(); + function s() { + var u; + const { parent: d } = e, g = d.parent; + if (t.exportSymbol) + return d.kind === 211 ? (u = t.declarations) != null && u.some((T) => T === d) && cn(g) ? S( + g, + /*useLhsSymbol*/ + !1 + ) : void 0 : c(t.exportSymbol, _(d)); + { + const T = XGe(d, e); + if (T && Vn( + T, + 32 + /* Export */ + )) + return nl(T) && T.moduleReference === e ? i ? void 0 : { kind: 0, symbol: n.getSymbolAtLocation(T.name) } : c(t, _(T)); + if (Ym(d)) + return c( + t, + 0 + /* Named */ + ); + if (ko(d)) + return h(d); + if (ko(g)) + return h(g); + if (cn(d)) + return S( + d, + /*useLhsSymbol*/ + !0 + ); + if (cn(g)) + return S( + g, + /*useLhsSymbol*/ + !0 + ); + if (uS(d) || BJ(d)) + return c( + t, + 0 + /* Named */ + ); + } + function h(T) { + if (!T.symbol.parent) return; + const C = T.isExportEquals ? 2 : 1; + return { kind: 1, symbol: t, exportInfo: { exportingModuleSymbol: T.symbol.parent, exportKind: C } }; + } + function S(T, C) { + let D; + switch (mc(T)) { + case 1: + D = 0; + break; + case 2: + D = 2; + break; + default: + return; + } + const P = C ? n.getSymbolAtLocation(UB(Is(T.left, go))) : t; + return P && c(P, D); + } + } + function o() { + if (!QGe(e)) return; + let d = n.getImmediateAliasedSymbol(t); + if (!d || (d = YGe(d, n), d.escapedName === "export=" && (d = $Ge(d, n), d === void 0))) + return; + const g = KF(d); + if (g === void 0 || g === "default" || g === t.escapedName) + return { kind: 0, symbol: d }; + } + function c(u, d) { + const g = Lue(u, d, n); + return g && { kind: 1, symbol: u, exportInfo: g }; + } + function _(u) { + return Vn( + u, + 2048 + /* Default */ + ) ? 1 : 0; + } + } + function $Ge(e, t) { + var n, i; + if (e.flags & 2097152) + return t.getImmediateAliasedSymbol(e); + const s = E.checkDefined(e.valueDeclaration); + if (ko(s)) + return (n = Jn(s.expression, vd)) == null ? void 0 : n.symbol; + if (cn(s)) + return (i = Jn(s.right, vd)) == null ? void 0 : i.symbol; + if (yi(s)) + return s.symbol; + } + function XGe(e, t) { + const n = ti(e) ? e : da(e) ? Hk(e) : void 0; + return n ? e.name !== t || Rb(n.parent) ? void 0 : yc(n.parent.parent) ? n.parent.parent : void 0 : e; + } + function QGe(e) { + const { parent: t } = e; + switch (t.kind) { + case 271: + return t.name === e && Mue(t); + case 276: + return !t.propertyName; + case 273: + case 274: + return E.assert(t.name === e), !0; + case 208: + return Qr(e) && mb(t.parent.parent); + default: + return !1; + } + } + function Lue(e, t, n) { + const i = e.parent; + if (!i) return; + const s = n.getMergedSymbol(i); + return Kk(s) ? { exportingModuleSymbol: s, exportKind: t } : void 0; + } + function YGe(e, t) { + if (e.declarations) + for (const n of e.declarations) { + if (pu(n) && !n.propertyName && !n.parent.parent.moduleSpecifier) + return t.getExportSpecifierLocalTargetSymbol(n) || e; + if (Dn(n) && Ag(n.expression) && !wi(n.name)) + return t.getSymbolAtLocation(n); + if (du(n) && cn(n.parent.parent) && mc(n.parent.parent) === 2) + return t.getExportSpecifierLocalTargetSymbol(n.name); + } + return e; + } + function ZGe(e, t) { + return t.getMergedSymbol(eL(e).symbol); + } + function eL(e) { + if (e.kind === 213) + return e.getSourceFile(); + const { parent: t } = e; + return t.kind === 307 ? t : (E.assert( + t.kind === 268 + /* ModuleBlock */ + ), Is(t.parent, dH)); + } + function dH(e) { + return e.kind === 267 && e.name.kind === 11; + } + function Mue(e) { + return e.moduleReference.kind === 283 && e.moduleReference.expression.kind === 11; + } + var pDe = /* @__PURE__ */ ((e) => (e[e.Symbol = 0] = "Symbol", e[e.Label = 1] = "Label", e[e.Keyword = 2] = "Keyword", e[e.This = 3] = "This", e[e.String = 4] = "String", e[e.TripleSlashReference = 5] = "TripleSlashReference", e))(pDe || {}), dDe = /* @__PURE__ */ ((e) => (e[e.Span = 0] = "Span", e[e.Node = 1] = "Node", e[e.StringLiteral = 2] = "StringLiteral", e[e.SearchedLocalFoundProperty = 3] = "SearchedLocalFoundProperty", e[e.SearchedPropertyFoundLocal = 4] = "SearchedPropertyFoundLocal", e))(dDe || {}); + function Vg(e, t = 1) { + return { + kind: t, + node: e.name || e, + context: KGe(e) + }; + } + function Rue(e) { + return e && e.kind === void 0; + } + function KGe(e) { + if (tu(e)) + return TS(e); + if (e.parent) { + if (!tu(e.parent) && !ko(e.parent)) { + if (Qr(e)) { + const n = cn(e.parent) ? e.parent : go(e.parent) && cn(e.parent.parent) && e.parent.parent.left === e.parent ? e.parent.parent : void 0; + if (n && mc(n) !== 0) + return TS(n); + } + if (pm(e.parent) || Fb(e.parent)) + return e.parent.parent; + if (oS(e.parent) || Dy(e.parent) || qE(e.parent)) + return e.parent; + if (Ga(e)) { + const n = d3(e); + if (n) { + const i = sr(n, (s) => tu(s) || hi(s) || Zk(s)); + return tu(i) ? TS(i) : i; + } + } + const t = sr(e, oa); + return t ? TS(t.parent) : void 0; + } + if (e.parent.name === e || // node is name of declaration, use parent + ec(e.parent) || ko(e.parent) || // Property name of the import export specifier or binding pattern, use parent + (ET(e.parent) || da(e.parent)) && e.parent.propertyName === e || // Is default export + e.kind === 90 && Vn( + e.parent, + 2080 + /* ExportDefault */ + )) + return TS(e.parent); + } + } + function TS(e) { + if (e) + switch (e.kind) { + case 260: + return !Il(e.parent) || e.parent.declarations.length !== 1 ? e : yc(e.parent.parent) ? e.parent.parent : V2(e.parent.parent) ? TS(e.parent.parent) : e.parent; + case 208: + return TS(e.parent.parent); + case 276: + return e.parent.parent.parent; + case 281: + case 274: + return e.parent.parent; + case 273: + case 280: + return e.parent; + case 226: + return Pl(e.parent) ? e.parent : e; + case 250: + case 249: + return { + start: e.initializer, + end: e.expression + }; + case 303: + case 304: + return x0(e.parent) ? TS( + sr(e.parent, (t) => cn(t) || V2(t)) + ) : e; + case 255: + return { + start: Nn( + e.getChildren(e.getSourceFile()), + (t) => t.kind === 109 + /* SwitchKeyword */ + ), + end: e.caseBlock + }; + default: + return e; + } + } + function jue(e, t, n) { + if (!n) return; + const i = Rue(n) ? rL(n.start, t, n.end) : rL(n, t); + return i.start !== e.start || i.length !== e.length ? { contextSpan: i } : void 0; + } + var mDe = /* @__PURE__ */ ((e) => (e[e.Other = 0] = "Other", e[e.References = 1] = "References", e[e.Rename = 2] = "Rename", e))(mDe || {}); + function e$e(e, t, n, i, s) { + const o = h_(i, s), c = { + use: 1 + /* References */ + }, _ = Xx.getReferencedSymbolsForNode(s, o, e, n, t, c), u = e.getTypeChecker(), d = Xx.getAdjustedNode(o, c), g = t$e(d) ? u.getSymbolAtLocation(d) : void 0; + return !_ || !_.length ? void 0 : Ii(_, ({ definition: h, references: S }) => ( + // Only include referenced symbols that have a valid definition. + h && { + definition: u.runWithCancellationToken(t, (T) => i$e(h, T, o)), + references: S.map((T) => a$e(T, g)) + } + )); + } + function t$e(e) { + return e.kind === 90 || !!p4(e) || b3(e) || e.kind === 137 && ec(e.parent); + } + function r$e(e, t, n, i, s) { + const o = h_(i, s); + let c; + const _ = gDe(e, t, n, o, s); + if (o.parent.kind === 211 || o.parent.kind === 208 || o.parent.kind === 212 || o.kind === 108) + c = _ && [..._]; + else if (_) { + const d = aw(_), g = /* @__PURE__ */ new Map(); + for (; !d.isEmpty(); ) { + const h = d.dequeue(); + if (!Kp(g, ja(h.node))) + continue; + c = Tr(c, h); + const S = gDe(e, t, n, h.node, h.node.pos); + S && d.enqueue(...S); + } + } + const u = e.getTypeChecker(); + return or(c, (d) => c$e(d, u)); + } + function gDe(e, t, n, i, s) { + if (i.kind === 307) + return; + const o = e.getTypeChecker(); + if (i.parent.kind === 304) { + const c = []; + return Xx.getReferenceEntriesForShorthandPropertyAssignment(i, o, (_) => c.push(Vg(_))), c; + } else if (i.kind === 108 || f_(i.parent)) { + const c = o.getSymbolAtLocation(i); + return c.valueDeclaration && [Vg(c.valueDeclaration)]; + } else + return hDe(s, i, e, n, t, { + implementations: !0, + use: 1 + /* References */ + }); + } + function n$e(e, t, n, i, s, o, c) { + return or(yDe(Xx.getReferencedSymbolsForNode(s, i, e, n, t, o)), (_) => c(_, i, e.getTypeChecker())); + } + function hDe(e, t, n, i, s, o = {}, c = new Set(i.map((_) => _.fileName))) { + return yDe(Xx.getReferencedSymbolsForNode(e, t, n, i, s, o, c)); + } + function yDe(e) { + return e && Xs(e, (t) => t.references); + } + function i$e(e, t, n) { + const i = (() => { + switch (e.type) { + case 0: { + const { symbol: g } = e, { displayParts: h, kind: S } = vDe(g, t, n), T = h.map((P) => P.text).join(""), C = g.declarations && ul(g.declarations), D = C ? es(C) || C : n; + return { + ...tL(D), + name: T, + kind: S, + displayParts: h, + context: TS(C) + }; + } + case 1: { + const { node: g } = e; + return { ...tL(g), name: g.text, kind: "label", displayParts: [O_( + g.text, + 17 + /* text */ + )] }; + } + case 2: { + const { node: g } = e, h = Ws(g.kind); + return { ...tL(g), name: h, kind: "keyword", displayParts: [{ + text: h, + kind: "keyword" + /* keyword */ + }] }; + } + case 3: { + const { node: g } = e, h = t.getSymbolAtLocation(g), S = h && D0.getSymbolDisplayPartsDocumentationAndSymbolKind( + t, + h, + g.getSourceFile(), + yS(g), + g + ).displayParts || [jf("this")]; + return { ...tL(g), name: "this", kind: "var", displayParts: S }; + } + case 4: { + const { node: g } = e; + return { + ...tL(g), + name: g.text, + kind: "var", + displayParts: [O_( + sc(g), + 8 + /* stringLiteral */ + )] + }; + } + case 5: + return { + textSpan: Fy(e.reference), + sourceFile: e.file, + name: e.reference.fileName, + kind: "string", + displayParts: [O_( + `"${e.reference.fileName}"`, + 8 + /* stringLiteral */ + )] + }; + default: + return E.assertNever(e); + } + })(), { sourceFile: s, textSpan: o, name: c, kind: _, displayParts: u, context: d } = i; + return { + containerKind: "", + containerName: "", + fileName: s.fileName, + kind: _, + name: c, + textSpan: o, + displayParts: u, + ...jue(o, s, d) + }; + } + function tL(e) { + const t = e.getSourceFile(); + return { + sourceFile: t, + textSpan: rL(oa(e) ? e.expression : e, t) + }; + } + function vDe(e, t, n) { + const i = Xx.getIntersectingMeaningFromDeclarations(n, e), s = e.declarations && ul(e.declarations) || n, { displayParts: o, symbolKind: c } = D0.getSymbolDisplayPartsDocumentationAndSymbolKind(t, e, s.getSourceFile(), s, s, i); + return { displayParts: o, kind: c }; + } + function s$e(e, t, n, i, s) { + return { ...mH(e), ...i && o$e(e, t, n, s) }; + } + function a$e(e, t) { + const n = bDe(e); + return t ? { + ...n, + isDefinition: e.kind !== 0 && SDe(e.node, t) + } : n; + } + function bDe(e) { + const t = mH(e); + if (e.kind === 0) + return { ...t, isWriteAccess: !1 }; + const { kind: n, node: i } = e; + return { + ...t, + isWriteAccess: Jue(i), + isInString: n === 2 ? !0 : void 0 + }; + } + function mH(e) { + if (e.kind === 0) + return { textSpan: e.textSpan, fileName: e.fileName }; + { + const t = e.node.getSourceFile(), n = rL(e.node, t); + return { + textSpan: n, + fileName: t.fileName, + ...jue(n, t, e.context) + }; + } + } + function o$e(e, t, n, i) { + if (e.kind !== 0 && (Re(t) || Ga(t))) { + const { node: s, kind: o } = e, c = s.parent, _ = t.text, u = du(c); + if (u || uN(c) && c.name === s && c.dotDotDotToken === void 0) { + const d = { prefixText: _ + ": " }, g = { suffixText: ": " + _ }; + if (o === 3) + return d; + if (o === 4) + return g; + if (u) { + const h = c.parent; + return Gs(h) && cn(h.parent) && Ag(h.parent.left) ? d : g; + } else + return d; + } else if (Yu(c) && !c.propertyName) { + const d = pu(t.parent) ? n.getExportSpecifierLocalTargetSymbol(t.parent) : n.getSymbolAtLocation(t); + return ls(d.declarations, c) ? { prefixText: _ + " as " } : Bp; + } else if (pu(c) && !c.propertyName) + return t === e.node || n.getSymbolAtLocation(t) === n.getSymbolAtLocation(e.node) ? { prefixText: _ + " as " } : { suffixText: " as " + _ }; + } + if (e.kind !== 0 && m_(e.node) && go(e.node.parent)) { + const s = lU(i); + return { prefixText: s, suffixText: s }; + } + return Bp; + } + function c$e(e, t) { + const n = mH(e); + if (e.kind !== 0) { + const { node: i } = e; + return { + ...n, + ...l$e(i, t) + }; + } else + return { ...n, kind: "", displayParts: [] }; + } + function l$e(e, t) { + const n = t.getSymbolAtLocation(tu(e) && e.name ? e.name : e); + return n ? vDe(n, t, e) : e.kind === 210 ? { + kind: "interface", + displayParts: [yu( + 21 + /* OpenParenToken */ + ), jf("object literal"), yu( + 22 + /* CloseParenToken */ + )] + } : e.kind === 231 ? { + kind: "local class", + displayParts: [yu( + 21 + /* OpenParenToken */ + ), jf("anonymous local class"), yu( + 22 + /* CloseParenToken */ + )] + } : { kind: Ub(e), displayParts: [] }; + } + function u$e(e) { + const t = mH(e); + if (e.kind === 0) + return { + fileName: t.fileName, + span: { + textSpan: t.textSpan, + kind: "reference" + /* reference */ + } + }; + const n = Jue(e.node), i = { + textSpan: t.textSpan, + kind: n ? "writtenReference" : "reference", + isInString: e.kind === 2 ? !0 : void 0, + ...t.contextSpan && { contextSpan: t.contextSpan } + }; + return { fileName: t.fileName, span: i }; + } + function rL(e, t, n) { + let i = e.getStart(t), s = (n || e).getEnd(); + return Ga(e) && s - i > 2 && (E.assert(n === void 0), i += 1, s -= 1), n?.kind === 269 && (s = n.getFullStart()), Mc(i, s); + } + function Bue(e) { + return e.kind === 0 ? e.textSpan : rL(e.node, e.node.getSourceFile()); + } + function Jue(e) { + const t = p4(e); + return !!t && _$e(t) || e.kind === 90 || GT(e); + } + function SDe(e, t) { + var n; + if (!t) return !1; + const i = p4(e) || (e.kind === 90 ? e.parent : b3(e) || e.kind === 137 && ec(e.parent) ? e.parent.parent : void 0), s = i && cn(i) ? i.left : void 0; + return !!(i && ((n = t.declarations) != null && n.some((o) => o === i || o === s))); + } + function _$e(e) { + if (e.flags & 33554432) return !0; + switch (e.kind) { + case 226: + case 208: + case 263: + case 231: + case 90: + case 266: + case 306: + case 281: + case 273: + case 271: + case 276: + case 264: + case 338: + case 346: + case 291: + case 267: + case 270: + case 274: + case 280: + case 169: + case 304: + case 265: + case 168: + return !0; + case 303: + return !x0(e.parent); + case 262: + case 218: + case 176: + case 174: + case 177: + case 178: + return !!e.body; + case 260: + case 172: + return !!e.initializer || Rb(e.parent); + case 173: + case 171: + case 348: + case 341: + return !1; + default: + return E.failBadSyntaxKind(e); + } + } + var Xx; + ((e) => { + function t($e, nt, te, rt, re, Ee = {}, Ne = new Set(rt.map((et) => et.fileName))) { + var et, lt; + if (nt = n(nt, Ee), yi(nt)) { + const Ut = b6.getReferenceAtPosition(nt, $e, te); + if (!Ut?.file) + return; + const W = te.getTypeChecker().getMergedSymbol(Ut.file.symbol); + if (W) + return d( + te, + W, + /*excludeImportTypeOfExportEquals*/ + !1, + rt, + Ne + ); + const je = te.getFileIncludeReasons(); + return je ? [{ + definition: { type: 5, reference: Ut.reference, file: nt }, + references: s(Ut.file, je, te) || He + }] : void 0; + } + if (!Ee.implementations) { + const Ut = h(nt, rt, re); + if (Ut) + return Ut; + } + const jt = te.getTypeChecker(), be = jt.getSymbolAtLocation(ec(nt) && nt.parent.name || nt); + if (!be) { + if (!Ee.implementations && Ga(nt)) { + if (e9(nt)) { + const Ut = te.getFileIncludeReasons(), W = (lt = (et = te.getResolvedModuleFromModuleSpecifier(nt)) == null ? void 0 : et.resolvedModule) == null ? void 0 : lt.resolvedFileName, je = W ? te.getSourceFile(W) : void 0; + if (je) + return [{ definition: { type: 4, node: nt }, references: s(je, Ut, te) || He }]; + } + return os(nt, rt, jt, re); + } + return; + } + if (be.escapedName === "export=") + return d( + te, + be.parent, + /*excludeImportTypeOfExportEquals*/ + !1, + rt, + Ne + ); + const ft = c(be, te, rt, re, Ee, Ne); + if (ft && !(be.flags & 33554432)) + return ft; + const bt = o(nt, be, jt), kt = bt && c(bt, te, rt, re, Ee, Ne), yt = S(be, nt, rt, Ne, jt, re, Ee); + return _(te, ft, yt, kt); + } + e.getReferencedSymbolsForNode = t; + function n($e, nt) { + return nt.use === 1 ? $e = GV($e) : nt.use === 2 && ($e = VF($e)), $e; + } + e.getAdjustedNode = n; + function i($e, nt, te, rt = new Set(te.map((re) => re.fileName))) { + var re, Ee; + const Ne = (re = nt.getSourceFile($e)) == null ? void 0 : re.symbol; + if (Ne) + return ((Ee = d( + nt, + Ne, + /*excludeImportTypeOfExportEquals*/ + !1, + te, + rt + )[0]) == null ? void 0 : Ee.references) || He; + const et = nt.getFileIncludeReasons(), lt = nt.getSourceFile($e); + return lt && et && s(lt, et, nt) || He; + } + e.getReferencesForFileName = i; + function s($e, nt, te) { + let rt; + const re = nt.get($e.path) || He; + for (const Ee of re) + if (pv(Ee)) { + const Ne = te.getSourceFileByPath(Ee.file), et = RD(te, Ee); + KC(et) && (rt = Tr(rt, { + kind: 0, + fileName: Ne.fileName, + textSpan: Fy(et) + })); + } + return rt; + } + function o($e, nt, te) { + if ($e.parent && aA($e.parent)) { + const rt = te.getAliasedSymbol(nt), re = te.getMergedSymbol(rt); + if (rt !== re) + return re; + } + } + function c($e, nt, te, rt, re, Ee) { + const Ne = $e.flags & 1536 && $e.declarations && Nn($e.declarations, yi); + if (!Ne) return; + const et = $e.exports.get( + "export=" + /* ExportEquals */ + ), lt = d(nt, $e, !!et, te, Ee); + if (!et || !Ee.has(Ne.fileName)) return lt; + const jt = nt.getTypeChecker(); + return $e = Jl(et, jt), _(nt, lt, S( + $e, + /*node*/ + void 0, + te, + Ee, + jt, + rt, + re + )); + } + function _($e, ...nt) { + let te; + for (const rt of nt) + if (!(!rt || !rt.length)) { + if (!te) { + te = rt; + continue; + } + for (const re of rt) { + if (!re.definition || re.definition.type !== 0) { + te.push(re); + continue; + } + const Ee = re.definition.symbol, Ne = rc(te, (lt) => !!lt.definition && lt.definition.type === 0 && lt.definition.symbol === Ee); + if (Ne === -1) { + te.push(re); + continue; + } + const et = te[Ne]; + te[Ne] = { + definition: et.definition, + references: et.references.concat(re.references).sort((lt, jt) => { + const be = u($e, lt), ft = u($e, jt); + if (be !== ft) + return uo(be, ft); + const bt = Bue(lt), kt = Bue(jt); + return bt.start !== kt.start ? uo(bt.start, kt.start) : uo(bt.length, kt.length); + }) + }; + } + } + return te; + } + function u($e, nt) { + const te = nt.kind === 0 ? $e.getSourceFile(nt.fileName) : nt.node.getSourceFile(); + return $e.getSourceFiles().indexOf(te); + } + function d($e, nt, te, rt, re) { + E.assert(!!nt.valueDeclaration); + const Ee = Ii(lDe($e, rt, nt), (et) => { + if (et.kind === "import") { + const lt = et.literal.parent; + if (y0(lt)) { + const jt = Is(lt.parent, Qm); + if (te && !jt.qualifier) + return; + } + return Vg(et.literal); + } else if (et.kind === "implicit") { + const lt = et.literal.text !== z1 && kx( + et.referencingFile, + (jt) => jt.transformFlags & 2 ? jg(jt) || oS(jt) || Lb(jt) ? jt : void 0 : "skip" + ) || et.referencingFile.statements[0] || et.referencingFile; + return Vg(lt); + } else + return { + kind: 0, + fileName: et.referencingFile.fileName, + textSpan: Fy(et.ref) + }; + }); + if (nt.declarations) + for (const et of nt.declarations) + switch (et.kind) { + case 307: + break; + case 267: + re.has(et.getSourceFile().fileName) && Ee.push(Vg(et.name)); + break; + default: + E.assert(!!(nt.flags & 33554432), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration."); + } + const Ne = nt.exports.get( + "export=" + /* ExportEquals */ + ); + if (Ne?.declarations) + for (const et of Ne.declarations) { + const lt = et.getSourceFile(); + if (re.has(lt.fileName)) { + const jt = cn(et) && Dn(et.left) ? et.left.expression : ko(et) ? E.checkDefined(Ya(et, 95, lt)) : es(et) || et; + Ee.push(Vg(jt)); + } + } + return Ee.length ? [{ definition: { type: 0, symbol: nt }, references: Ee }] : He; + } + function g($e) { + return $e.kind === 148 && K1($e.parent) && $e.parent.operator === 148; + } + function h($e, nt, te) { + if (qD($e.kind)) + return $e.kind === 116 && hx($e.parent) || $e.kind === 148 && !g($e) ? void 0 : le( + nt, + $e.kind, + te, + $e.kind === 148 ? g : void 0 + ); + if (sC($e.parent) && $e.parent.name === $e) + return ae(nt, te); + if (fx($e) && ac($e.parent)) + return [{ definition: { type: 2, node: $e }, references: [Vg($e)] }]; + if (eN($e)) { + const rt = RF($e.parent, $e.text); + return rt && fe(rt.parent, rt); + } else if (jV($e)) + return fe($e.parent, $e); + if (s6($e)) + return $n($e, nt, te); + if ($e.kind === 108) + return Ai($e); + } + function S($e, nt, te, rt, re, Ee, Ne) { + const et = nt && D( + $e, + nt, + re, + /*useLocalSymbolForExportSpecifier*/ + !Ca(Ne) + ) || $e, lt = nt ? Zn(nt, et) : 7, jt = [], be = new j(te, rt, nt ? C(nt) : 0, re, Ee, lt, Ne, jt), ft = !Ca(Ne) || !et.declarations ? void 0 : Nn(et.declarations, pu); + if (ft) + Xe( + ft.name, + et, + ft, + be.createSearch( + nt, + $e, + /*comingFrom*/ + void 0 + ), + be, + /*addReferencesHere*/ + !0, + /*alwaysGetReferences*/ + !0 + ); + else if (nt && nt.kind === 90 && et.escapedName === "default" && et.parent) + Ke(nt, et, be), F(nt, et, { + exportingModuleSymbol: et.parent, + exportKind: 1 + /* Default */ + }, be); + else { + const bt = be.createSearch( + nt, + et, + /*comingFrom*/ + void 0, + { allSearchSymbols: nt ? Ss(et, nt, re, Ne.use === 2, !!Ne.providePrefixAndSuffixTextForRename, !!Ne.implementations) : [et] } + ); + T(et, be, bt); + } + return jt; + } + function T($e, nt, te) { + const rt = ce($e); + if (rt) + ge( + rt, + rt.getSourceFile(), + te, + nt, + /*addReferencesHere*/ + !(yi(rt) && !ls(nt.sourceFiles, rt)) + ); + else + for (const re of nt.sourceFiles) + nt.cancellationToken.throwIfCancellationRequested(), U(re, te, nt); + } + function C($e) { + switch ($e.kind) { + case 176: + case 137: + return 1; + case 80: + if (Qn($e.parent)) + return E.assert($e.parent.name === $e), 2; + default: + return 0; + } + } + function D($e, nt, te, rt) { + const { parent: re } = nt; + return pu(re) && rt ? Ie(nt, $e, re, te) : xc($e.declarations, (Ee) => { + if (!Ee.parent) { + if ($e.flags & 33554432) return; + E.fail(`Unexpected symbol at ${E.formatSyntaxKind(nt.kind)}: ${E.formatSymbol($e)}`); + } + return Xu(Ee.parent) && ky(Ee.parent.parent) ? te.getPropertyOfType(te.getTypeFromTypeNode(Ee.parent.parent), $e.name) : void 0; + }); + } + let P; + (($e) => { + $e[$e.None = 0] = "None", $e[$e.Constructor = 1] = "Constructor", $e[$e.Class = 2] = "Class"; + })(P || (P = {})); + function O($e) { + if (!($e.flags & 33555968)) return; + const nt = $e.declarations && Nn($e.declarations, (te) => !yi(te) && !Nc(te)); + return nt && nt.symbol; + } + class j { + constructor(nt, te, rt, re, Ee, Ne, et, lt) { + this.sourceFiles = nt, this.sourceFilesSet = te, this.specialSearchKind = rt, this.checker = re, this.cancellationToken = Ee, this.searchMeaning = Ne, this.options = et, this.result = lt, this.inheritsFromCache = /* @__PURE__ */ new Map(), this.markSeenContainingTypeReference = o6(), this.markSeenReExportRHS = o6(), this.symbolIdToReferences = [], this.sourceFileToSeenSymbols = []; + } + includesSourceFile(nt) { + return this.sourceFilesSet.has(nt.fileName); + } + /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */ + getImportSearches(nt, te) { + return this.importTracker || (this.importTracker = Fue(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken)), this.importTracker( + nt, + te, + this.options.use === 2 + /* Rename */ + ); + } + /** @param allSearchSymbols set of additional symbols for use by `includes`. */ + createSearch(nt, te, rt, re = {}) { + const { + text: Ee = Op(uc(C4(te) || O(te) || te)), + allSearchSymbols: Ne = [te] + } = re, et = Ko(Ee), lt = this.options.implementations && nt ? Yt(nt, te, this.checker) : void 0; + return { symbol: te, comingFrom: rt, text: Ee, escapedText: et, parents: lt, allSearchSymbols: Ne, includes: (jt) => ls(Ne, jt) }; + } + /** + * Callback to add references for a particular searched symbol. + * This initializes a reference group, so only call this if you will add at least one reference. + */ + referenceAdder(nt) { + const te = $s(nt); + let rt = this.symbolIdToReferences[te]; + return rt || (rt = this.symbolIdToReferences[te] = [], this.result.push({ definition: { type: 0, symbol: nt }, references: rt })), (re, Ee) => rt.push(Vg(re, Ee)); + } + /** Add a reference with no associated definition. */ + addStringOrCommentReference(nt, te) { + this.result.push({ + definition: void 0, + references: [{ kind: 0, fileName: nt, textSpan: te }] + }); + } + /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */ + markSearchedSymbols(nt, te) { + const rt = ja(nt), re = this.sourceFileToSeenSymbols[rt] || (this.sourceFileToSeenSymbols[rt] = /* @__PURE__ */ new Set()); + let Ee = !1; + for (const Ne of te) + Ee = ih(re, $s(Ne)) || Ee; + return Ee; + } + } + function F($e, nt, te, rt) { + const { importSearches: re, singleReferences: Ee, indirectUsers: Ne } = rt.getImportSearches(nt, te); + if (Ee.length) { + const et = rt.referenceAdder(nt); + for (const lt of Ee) + L(lt, rt) && et(lt); + } + for (const [et, lt] of re) + Ae(et.getSourceFile(), rt.createSearch( + et, + lt, + 1 + /* Export */ + ), rt); + if (Ne.length) { + let et; + switch (te.exportKind) { + case 0: + et = rt.createSearch( + $e, + nt, + 1 + /* Export */ + ); + break; + case 1: + et = rt.options.use === 2 ? void 0 : rt.createSearch($e, nt, 1, { text: "default" }); + break; + } + if (et) + for (const lt of Ne) + U(lt, et, rt); + } + } + function V($e, nt, te, rt, re, Ee, Ne, et) { + const lt = Fue($e, new Set($e.map((bt) => bt.fileName)), nt, te), { importSearches: jt, indirectUsers: be, singleReferences: ft } = lt( + rt, + { exportKind: Ne ? 1 : 0, exportingModuleSymbol: re }, + /*isForRename*/ + !1 + ); + for (const [bt] of jt) + et(bt); + for (const bt of ft) + Re(bt) && Qm(bt.parent) && et(bt); + for (const bt of be) + for (const kt of ne(bt, Ne ? "default" : Ee)) { + const yt = nt.getSymbolAtLocation(kt), Ut = ut(yt?.declarations, (W) => !!Jn(W, ko)); + Re(kt) && !ET(kt.parent) && (yt === rt || Ut) && et(kt); + } + } + e.eachExportReference = V; + function L($e, nt) { + return de($e, nt) ? nt.options.use !== 2 ? !0 : Re($e) ? !(ET($e.parent) && $e.escapedText === "default") : !1 : !1; + } + function $($e, nt) { + if ($e.declarations) + for (const te of $e.declarations) { + const rt = te.getSourceFile(); + Ae(rt, nt.createSearch( + te, + $e, + 0 + /* Import */ + ), nt, nt.includesSourceFile(rt)); + } + } + function U($e, nt, te) { + Cq($e).get(nt.escapedText) !== void 0 && Ae($e, nt, te); + } + function G($e, nt) { + return x0($e.parent.parent) ? nt.getPropertySymbolOfDestructuringAssignment($e) : void 0; + } + function ce($e) { + const { declarations: nt, flags: te, parent: rt, valueDeclaration: re } = $e; + if (re && (re.kind === 218 || re.kind === 231)) + return re; + if (!nt) + return; + if (te & 8196) { + const et = Nn(nt, (lt) => ef( + lt, + 2 + /* Private */ + ) || Pu(lt)); + return et ? $1( + et, + 263 + /* ClassDeclaration */ + ) : void 0; + } + if (nt.some(uN)) + return; + const Ee = rt && !($e.flags & 262144); + if (Ee && !(Kk(rt) && !rt.globalExports)) + return; + let Ne; + for (const et of nt) { + const lt = yS(et); + if (Ne && Ne !== lt || !lt || lt.kind === 307 && !A_(lt)) + return; + if (Ne = lt, po(Ne)) { + let jt; + for (; jt = sB(Ne); ) + Ne = jt; + } + } + return Ee ? Ne.getSourceFile() : Ne; + } + function K($e, nt, te, rt = te) { + return X($e, nt, te, () => !0, rt) || !1; + } + e.isSymbolReferencedInFile = K; + function X($e, nt, te, rt, re = te) { + const Ee = Q_($e.parent, $e.parent.parent) ? fa(nt.getSymbolsOfParameterPropertyDeclaration($e.parent, $e.text)) : nt.getSymbolAtLocation($e); + if (Ee) + for (const Ne of ne(te, Ee.name, re)) { + if (!Re(Ne) || Ne === $e || Ne.escapedText !== $e.escapedText) continue; + const et = nt.getSymbolAtLocation(Ne); + if (et === Ee || nt.getShorthandAssignmentValueSymbol(Ne.parent) === Ee || pu(Ne.parent) && Ie(Ne, et, Ne.parent, nt) === Ee) { + const lt = rt(Ne); + if (lt) return lt; + } + } + } + e.eachSymbolReferenceInFile = X; + function Z($e, nt) { + return Ln(ne(nt, $e), (re) => !!p4(re)).reduce((re, Ee) => { + const Ne = rt(Ee); + return !ut(re.declarationNames) || Ne === re.depth ? (re.declarationNames.push(Ee), re.depth = Ne) : Ne < re.depth && (re.declarationNames = [Ee], re.depth = Ne), re; + }, { depth: 1 / 0, declarationNames: [] }).declarationNames; + function rt(re) { + let Ee = 0; + for (; re; ) + re = yS(re), Ee++; + return Ee; + } + } + e.getTopMostDeclarationNamesInFile = Z; + function oe($e, nt, te, rt) { + if (!$e.name || !Re($e.name)) return !1; + const re = E.checkDefined(te.getSymbolAtLocation($e.name)); + for (const Ee of nt) + for (const Ne of ne(Ee, re.name)) { + if (!Re(Ne) || Ne === $e.name || Ne.escapedText !== $e.name.escapedText) continue; + const et = MF(Ne), lt = Es(et.parent) && et.parent.expression === et ? et.parent : void 0, jt = te.getSymbolAtLocation(Ne); + if (jt && te.getRootSymbols(jt).some((be) => be === re) && rt(Ne, lt)) + return !0; + } + return !1; + } + e.someSignatureUsage = oe; + function ne($e, nt, te = $e) { + return Ii(pe($e, nt, te), (rt) => { + const re = h_($e, rt); + return re === $e ? void 0 : re; + }); + } + function pe($e, nt, te = $e) { + const rt = []; + if (!nt || !nt.length) + return rt; + const re = $e.text, Ee = re.length, Ne = nt.length; + let et = re.indexOf(nt, te.pos); + for (; et >= 0 && !(et > te.end); ) { + const lt = et + Ne; + (et === 0 || !t0( + re.charCodeAt(et - 1), + 99 + /* Latest */ + )) && (lt === Ee || !t0( + re.charCodeAt(lt), + 99 + /* Latest */ + )) && rt.push(et), et = re.indexOf(nt, et + Ne + 1); + } + return rt; + } + function fe($e, nt) { + const te = $e.getSourceFile(), rt = nt.text, re = Ii(ne(te, rt, $e), (Ee) => ( + // Only pick labels that are either the target label, or have a target that is the target label + Ee === nt || eN(Ee) && RF(Ee, rt) === nt ? Vg(Ee) : void 0 + )); + return [{ definition: { type: 1, node: nt }, references: re }]; + } + function H($e, nt) { + switch ($e.kind) { + case 81: + if (iv($e.parent)) + return !0; + case 80: + return $e.text.length === nt.length; + case 15: + case 11: { + const te = $e; + return (jF(te) || WV($e) || eae($e) || Es($e.parent) && X2($e.parent) && $e.parent.arguments[1] === $e) && te.text.length === nt.length; + } + case 9: + return jF($e) && $e.text.length === nt.length; + case 90: + return nt.length === 7; + default: + return !1; + } + } + function ae($e, nt) { + const te = Xs($e, (rt) => (nt.throwIfCancellationRequested(), Ii(ne(rt, "meta", rt), (re) => { + const Ee = re.parent; + if (sC(Ee)) + return Vg(Ee); + }))); + return te.length ? [{ definition: { type: 2, node: te[0].node }, references: te }] : void 0; + } + function le($e, nt, te, rt) { + const re = Xs($e, (Ee) => (te.throwIfCancellationRequested(), Ii(ne(Ee, Ws(nt), Ee), (Ne) => { + if (Ne.kind === nt && (!rt || rt(Ne))) + return Vg(Ne); + }))); + return re.length ? [{ definition: { type: 2, node: re[0].node }, references: re }] : void 0; + } + function Ae($e, nt, te, rt = !0) { + return te.cancellationToken.throwIfCancellationRequested(), ge($e, $e, nt, te, rt); + } + function ge($e, nt, te, rt, re) { + if (rt.markSearchedSymbols(nt, te.allSearchSymbols)) + for (const Ee of pe(nt, te.text, $e)) + ve(nt, Ee, te, rt, re); + } + function de($e, nt) { + return !!(hS($e) & nt.searchMeaning); + } + function ve($e, nt, te, rt, re) { + const Ee = h_($e, nt); + if (!H(Ee, te.text)) { + !rt.options.implementations && (rt.options.findInStrings && Mx($e, nt) || rt.options.findInComments && dae($e, nt)) && rt.addStringOrCommentReference($e.fileName, jl(nt, te.text.length)); + return; + } + if (!de(Ee, rt)) return; + let Ne = rt.checker.getSymbolAtLocation(Ee); + if (!Ne) + return; + const et = Ee.parent; + if (Yu(et) && et.propertyName === Ee) + return; + if (pu(et)) { + E.assert( + Ee.kind === 80 + /* Identifier */ + ), Xe(Ee, Ne, et, te, rt, re); + return; + } + if (HE(et) && et.isNameFirst && et.typeExpression && lS(et.typeExpression.type) && et.typeExpression.type.jsDocPropertyTags && Dr(et.typeExpression.type.jsDocPropertyTags)) { + De(et.typeExpression.type.jsDocPropertyTags, Ee, te, rt); + return; + } + const lt = ln(te, Ne, Ee, rt); + if (!lt) { + Qe(Ne, te, rt); + return; + } + switch (rt.specialSearchKind) { + case 0: + re && Ke(Ee, lt, rt); + break; + case 1: + Be(Ee, $e, te, rt); + break; + case 2: + at(Ee, te, rt); + break; + default: + E.assertNever(rt.specialSearchKind); + } + Qr(Ee) && da(Ee.parent) && mb(Ee.parent.parent.parent) && (Ne = Ee.parent.symbol, !Ne) || Fe(Ee, Ne, te, rt); + } + function De($e, nt, te, rt) { + const re = rt.referenceAdder(te.symbol); + Ke(nt, te.symbol, rt), rr($e, (Ee) => { + $u(Ee.name) && re(Ee.name.left); + }); + } + function Xe($e, nt, te, rt, re, Ee, Ne) { + E.assert(!Ne || !!re.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled"); + const { parent: et, propertyName: lt, name: jt } = te, be = et.parent, ft = Ie($e, nt, te, re.checker); + if (!Ne && !rt.includes(ft)) + return; + if (lt ? $e === lt ? (be.moduleSpecifier || bt(), Ee && re.options.use !== 2 && re.markSeenReExportRHS(jt) && Ke(jt, E.checkDefined(te.symbol), re)) : re.markSeenReExportRHS($e) && bt() : re.options.use === 2 && jt.escapedText === "default" || bt(), !Ca(re.options) || Ne) { + const yt = $e.escapedText === "default" || te.name.escapedText === "default" ? 1 : 0, Ut = E.checkDefined(te.symbol), W = Lue(Ut, yt, re.checker); + W && F($e, Ut, W, re); + } + if (rt.comingFrom !== 1 && be.moduleSpecifier && !lt && !Ca(re.options)) { + const kt = re.checker.getExportSpecifierLocalTargetSymbol(te); + kt && $(kt, re); + } + function bt() { + Ee && Ke($e, ft, re); + } + } + function Ie($e, nt, te, rt) { + return ye($e, te) && rt.getExportSpecifierLocalTargetSymbol(te) || nt; + } + function ye($e, nt) { + const { parent: te, propertyName: rt, name: re } = nt; + return E.assert(rt === $e || re === $e), rt ? rt === $e : !te.parent.moduleSpecifier; + } + function Fe($e, nt, te, rt) { + const re = fDe( + $e, + nt, + rt.checker, + te.comingFrom === 1 + /* Export */ + ); + if (!re) return; + const { symbol: Ee } = re; + re.kind === 0 ? Ca(rt.options) || $(Ee, rt) : F($e, Ee, re.exportInfo, rt); + } + function Qe({ flags: $e, valueDeclaration: nt }, te, rt) { + const re = rt.checker.getShorthandAssignmentValueSymbol(nt), Ee = nt && es(nt); + !($e & 33554432) && Ee && te.includes(re) && Ke(Ee, re, rt); + } + function Ke($e, nt, te) { + const { kind: rt, symbol: re } = "kind" in nt ? nt : { kind: void 0, symbol: nt }; + if (te.options.use === 2 && $e.kind === 90) + return; + const Ee = te.referenceAdder(re); + te.options.implementations ? zt($e, Ee, te) : Ee($e, rt); + } + function Be($e, nt, te, rt) { + WD($e) && Ke($e, te.symbol, rt); + const re = () => rt.referenceAdder(te.symbol); + if (Qn($e.parent)) + E.assert($e.kind === 90 || $e.parent.name === $e), Wt(te.symbol, nt, re()); + else { + const Ee = ws($e); + Ee && (Kt(Ee, re()), Vt(Ee, rt)); + } + } + function at($e, nt, te) { + Ke($e, nt.symbol, te); + const rt = $e.parent; + if (te.options.use === 2 || !Qn(rt)) return; + E.assert(rt.name === $e); + const re = te.referenceAdder(nt.symbol); + for (const Ee of rt.members) + PT(Ee) && Os(Ee) && Ee.body && Ee.body.forEachChild(function Ne(et) { + et.kind === 110 ? re(et) : !ps(et) && !Qn(et) && et.forEachChild(Ne); + }); + } + function Wt($e, nt, te) { + const rt = nr($e); + if (rt && rt.declarations) + for (const re of rt.declarations) { + const Ee = Ya(re, 137, nt); + E.assert(re.kind === 176 && !!Ee), te(Ee); + } + $e.exports && $e.exports.forEach((re) => { + const Ee = re.valueDeclaration; + if (Ee && Ee.kind === 174) { + const Ne = Ee.body; + Ne && Ps(Ne, 110, (et) => { + WD(et) && te(et); + }); + } + }); + } + function nr($e) { + return $e.members && $e.members.get( + "__constructor" + /* Constructor */ + ); + } + function Kt($e, nt) { + const te = nr($e.symbol); + if (te && te.declarations) + for (const rt of te.declarations) { + E.assert( + rt.kind === 176 + /* Constructor */ + ); + const re = rt.body; + re && Ps(re, 108, (Ee) => { + LV(Ee) && nt(Ee); + }); + } + } + function Pr($e) { + return !!nr($e.symbol); + } + function Vt($e, nt) { + if (Pr($e)) return; + const te = $e.symbol, rt = nt.createSearch( + /*location*/ + void 0, + te, + /*comingFrom*/ + void 0 + ); + T(te, nt, rt); + } + function zt($e, nt, te) { + if (Gm($e) && ri($e.parent)) { + nt($e); + return; + } + if ($e.kind !== 80) + return; + $e.parent.kind === 304 && mi($e, te.checker, nt); + const rt = jr($e); + if (rt) { + nt(rt); + return; + } + const re = sr($e, (et) => !$u(et.parent) && !ai(et.parent) && !cb(et.parent)), Ee = re.parent; + if (XI(Ee) && Ee.type === re && te.markSeenContainingTypeReference(Ee)) + if (i0(Ee)) + Ne(Ee.initializer); + else if (ps(Ee) && Ee.body) { + const et = Ee.body; + et.kind === 241 ? o0(et, (lt) => { + lt.expression && Ne(lt.expression); + }) : Ne(et); + } else J1(Ee) && Ne(Ee.expression); + function Ne(et) { + ci(et) && nt(et); + } + } + function jr($e) { + return Re($e) || Dn($e) ? jr($e.parent) : bh($e) ? Jn($e.parent.parent, Ef(Qn, Vl)) : void 0; + } + function ci($e) { + switch ($e.kind) { + case 217: + return ci($e.expression); + case 219: + case 218: + case 210: + case 231: + case 209: + return !0; + default: + return !1; + } + } + function Xt($e, nt, te, rt) { + if ($e === nt) + return !0; + const re = $s($e) + "," + $s(nt), Ee = te.get(re); + if (Ee !== void 0) + return Ee; + te.set(re, !1); + const Ne = !!$e.declarations && $e.declarations.some( + (et) => d4(et).some((lt) => { + const jt = rt.getTypeAtLocation(lt); + return !!jt && !!jt.symbol && Xt(jt.symbol, nt, te, rt); + }) + ); + return te.set(re, Ne), Ne; + } + function Ai($e) { + let nt = Zw( + $e, + /*stopOnFunctions*/ + !1 + ); + if (!nt) + return; + let te = 256; + switch (nt.kind) { + case 172: + case 171: + case 174: + case 173: + case 176: + case 177: + case 178: + te &= f0(nt), nt = nt.parent; + break; + default: + return; + } + const rt = nt.getSourceFile(), re = Ii(ne(rt, "super", nt), (Ee) => { + if (Ee.kind !== 108) + return; + const Ne = Zw( + Ee, + /*stopOnFunctions*/ + !1 + ); + return Ne && Os(Ne) === !!te && Ne.parent.symbol === nt.symbol ? Vg(Ee) : void 0; + }); + return [{ definition: { type: 0, symbol: nt.symbol }, references: re }]; + } + function _s($e) { + return $e.kind === 80 && $e.parent.kind === 169 && $e.parent.name === $e; + } + function $n($e, nt, te) { + let rt = Uu( + $e, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ), re = 256; + switch (rt.kind) { + case 174: + case 173: + if (Yp(rt)) { + re &= f0(rt), rt = rt.parent; + break; + } + case 172: + case 171: + case 176: + case 177: + case 178: + re &= f0(rt), rt = rt.parent; + break; + case 307: + if (il(rt) || _s($e)) + return; + case 262: + case 218: + break; + default: + return; + } + const Ee = Xs(rt.kind === 307 ? nt : [rt.getSourceFile()], (et) => (te.throwIfCancellationRequested(), ne(et, "this", yi(rt) ? et : rt).filter((lt) => { + if (!s6(lt)) + return !1; + const jt = Uu( + lt, + /*includeArrowFunctions*/ + !1, + /*includeClassComputedPropertyName*/ + !1 + ); + if (!vd(jt)) return !1; + switch (rt.kind) { + case 218: + case 262: + return rt.symbol === jt.symbol; + case 174: + case 173: + return Yp(rt) && rt.symbol === jt.symbol; + case 231: + case 263: + case 210: + return jt.parent && vd(jt.parent) && rt.symbol === jt.parent.symbol && Os(jt) === !!re; + case 307: + return jt.kind === 307 && !il(jt) && !_s(lt); + } + }))).map((et) => Vg(et)); + return [{ + definition: { type: 3, node: xc(Ee, (et) => ji(et.node.parent) ? et.node : void 0) || $e }, + references: Ee + }]; + } + function os($e, nt, te, rt) { + const re = WF($e, te), Ee = Xs(nt, (Ne) => (rt.throwIfCancellationRequested(), Ii(ne(Ne, $e.text), (et) => { + if (Ga(et) && et.text === $e.text) + if (re) { + const lt = WF(et, te); + if (re !== te.getStringType() && (re === lt || wr(et, te))) + return Vg( + et, + 2 + /* StringLiteral */ + ); + } else + return lx(et) && !eS(et, Ne) ? void 0 : Vg( + et, + 2 + /* StringLiteral */ + ); + }))); + return [{ + definition: { type: 4, node: $e }, + references: Ee + }]; + } + function wr($e, nt) { + if (I_($e.parent)) + return nt.getPropertyOfType(nt.getTypeAtLocation($e.parent.parent), $e.text); + } + function Ss($e, nt, te, rt, re, Ee) { + const Ne = []; + return Le( + $e, + nt, + te, + rt, + !(rt && re), + (et, lt, jt) => { + jt && vr($e) !== vr(jt) && (jt = void 0), Ne.push(jt || lt || et); + }, + // when try to find implementation, implementations is true, and not allowed to find base class + /*allowBaseTypes*/ + () => !Ee + ), Ne; + } + function Le($e, nt, te, rt, re, Ee, Ne) { + const et = wN(nt); + if (et) { + const yt = te.getShorthandAssignmentValueSymbol(nt.parent); + if (yt && rt) + return Ee( + yt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 3 + /* SearchedLocalFoundProperty */ + ); + const Ut = te.getContextualType(et.parent), W = Ut && xc( + z9( + et, + te, + Ut, + /*unionSymbolOk*/ + !0 + ), + (he) => bt( + he, + 4 + /* SearchedPropertyFoundLocal */ + ) + ); + if (W) return W; + const je = G(nt, te), st = je && Ee( + je, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 4 + /* SearchedPropertyFoundLocal */ + ); + if (st) return st; + const z = yt && Ee( + yt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 3 + /* SearchedLocalFoundProperty */ + ); + if (z) return z; + } + const lt = o(nt, $e, te); + if (lt) { + const yt = Ee( + lt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 1 + /* Node */ + ); + if (yt) return yt; + } + const jt = bt($e); + if (jt) return jt; + if ($e.valueDeclaration && Q_($e.valueDeclaration, $e.valueDeclaration.parent)) { + const yt = te.getSymbolsOfParameterPropertyDeclaration(Is($e.valueDeclaration, ji), $e.name); + return E.assert(yt.length === 2 && !!(yt[0].flags & 1) && !!(yt[1].flags & 4)), bt($e.flags & 1 ? yt[1] : yt[0]); + } + const be = Jo( + $e, + 281 + /* ExportSpecifier */ + ); + if (!rt || be && !be.propertyName) { + const yt = be && te.getExportSpecifierLocalTargetSymbol(be); + if (yt) { + const Ut = Ee( + yt, + /*rootSymbol*/ + void 0, + /*baseSymbol*/ + void 0, + 1 + /* Node */ + ); + if (Ut) return Ut; + } + } + if (!rt) { + let yt; + return re ? yt = uN(nt.parent) ? t9(te, nt.parent) : void 0 : yt = kt($e, te), yt && bt( + yt, + 4 + /* SearchedPropertyFoundLocal */ + ); + } + if (E.assert(rt), re) { + const yt = kt($e, te); + return yt && bt( + yt, + 4 + /* SearchedPropertyFoundLocal */ + ); + } + function bt(yt, Ut) { + return xc(te.getRootSymbols(yt), (W) => Ee( + yt, + W, + /*baseSymbol*/ + void 0, + Ut + ) || (W.parent && W.parent.flags & 96 && Ne(W) ? At(W.parent, W.name, te, (je) => Ee(yt, W, je, Ut)) : void 0)); + } + function kt(yt, Ut) { + const W = Jo( + yt, + 208 + /* BindingElement */ + ); + if (W && uN(W)) + return t9(Ut, W); + } + } + function At($e, nt, te, rt) { + const re = /* @__PURE__ */ new Map(); + return Ee($e); + function Ee(Ne) { + if (!(!(Ne.flags & 96) || !Kp(re, $s(Ne)))) + return xc(Ne.declarations, (et) => xc(d4(et), (lt) => { + const jt = te.getTypeAtLocation(lt), be = jt && jt.symbol && te.getPropertyOfType(jt, nt); + return jt && be && (xc(te.getRootSymbols(be), rt) || Ee(jt.symbol)); + })); + } + } + function vr($e) { + return $e.valueDeclaration ? !!(Au($e.valueDeclaration) & 256) : !1; + } + function ln($e, nt, te, rt) { + const { checker: re } = rt; + return Le( + nt, + te, + re, + /*isForRenamePopulateSearchSymbolSet*/ + !1, + /*onlyIncludeBindingElementAtReferenceLocation*/ + rt.options.use !== 2 || !!rt.options.providePrefixAndSuffixTextForRename, + (Ee, Ne, et, lt) => (et && vr(nt) !== vr(et) && (et = void 0), $e.includes(et || Ne || Ee) ? { symbol: Ne && !(gc(Ee) & 6) ? Ne : Ee, kind: lt } : void 0), + /*allowBaseTypes*/ + (Ee) => !($e.parents && !$e.parents.some((Ne) => Xt(Ee.parent, Ne, rt.inheritsFromCache, re))) + ); + } + function Zn($e, nt) { + let te = hS($e); + const { declarations: rt } = nt; + if (rt) { + let re; + do { + re = te; + for (const Ee of rt) { + const Ne = FF(Ee); + Ne & te && (te |= Ne); + } + } while (te !== re); + } + return te; + } + e.getIntersectingMeaningFromDeclarations = Zn; + function ri($e) { + return $e.flags & 33554432 ? !(Vl($e) || Rp($e)) : FT($e) ? i0($e) : so($e) ? !!$e.body : Qn($e) || Rw($e); + } + function mi($e, nt, te) { + const rt = nt.getSymbolAtLocation($e), re = nt.getShorthandAssignmentValueSymbol(rt.valueDeclaration); + if (re) + for (const Ee of re.getDeclarations()) + FF(Ee) & 1 && te(Ee); + } + e.getReferenceEntriesForShorthandPropertyAssignment = mi; + function Ps($e, nt, te) { + gs($e, (rt) => { + rt.kind === nt && te(rt), Ps(rt, nt, te); + }); + } + function ws($e) { + return IB(MF($e).parent); + } + function Yt($e, nt, te) { + const rt = i6($e) ? $e.parent : void 0, re = rt && te.getTypeAtLocation(rt.expression), Ee = Ii(re && (re.isUnionOrIntersection() ? re.types : re.symbol === nt.parent ? void 0 : [re]), (Ne) => Ne.symbol && Ne.symbol.flags & 96 ? Ne.symbol : void 0); + return Ee.length === 0 ? void 0 : Ee; + } + function Ca($e) { + return $e.use === 2 && $e.providePrefixAndSuffixTextForRename; + } + })(Xx || (Xx = {})); + var b6 = {}; + Qa(b6, { + createDefinitionInfo: () => BN, + findReferenceInPosition: () => fP, + getDefinitionAndBoundSpan: () => y$e, + getDefinitionAtPosition: () => TDe, + getReferenceAtPosition: () => kDe, + getTypeDefinitionAtPosition: () => g$e + }); + function TDe(e, t, n, i, s) { + var o; + const c = kDe(t, n, e), _ = c && [x$e(c.reference.fileName, c.fileName, c.unverified)] || He; + if (c?.file) + return _; + const u = h_(t, n); + if (u === t) + return; + const { parent: d } = u, g = e.getTypeChecker(); + if (u.kind === 164 || Re(u) && Z5(d) && d.tagName === u) + return p$e(g, u) || He; + if (eN(u)) { + const P = RF(u.parent, u.text); + return P ? [zue( + g, + P, + "label", + u.text, + /*containerName*/ + void 0 + )] : void 0; + } + switch (u.kind) { + case 107: + const P = sr(u.parent, (j) => ac(j) ? "quit" : so(j)); + return P ? [nL(g, P)] : void 0; + case 90: + if (!cD(u.parent)) + break; + case 84: + const O = sr(u.parent, sD); + if (O) + return [T$e(O, t)]; + break; + } + if (u.kind === 135) { + const P = sr(u, (j) => so(j)); + return P && ut( + P.modifiers, + (j) => j.kind === 134 + /* AsyncKeyword */ + ) ? [nL(g, P)] : void 0; + } + if (u.kind === 127) { + const P = sr(u, (j) => so(j)); + return P && P.asteriskToken ? [nL(g, P)] : void 0; + } + if (fx(u) && ac(u.parent)) { + const P = u.parent.parent, { symbol: O, failedAliasResolution: j } = gH(P, g, s), F = Ln(P.members, ac), V = O ? g.symbolToString(O, P) : "", L = u.getSourceFile(); + return or(F, ($) => { + let { pos: U } = am($); + return U = sa(L.text, U), zue( + g, + $, + "constructor", + "static {}", + V, + /*unverified*/ + !1, + j, + { start: U, length: 6 } + ); + }); + } + let { symbol: h, failedAliasResolution: S } = gH(u, g, s), T = u; + if (i && S) { + const P = rr([u, ...h?.declarations || He], (j) => sr(j, hZ)), O = P && u4(P); + O && ({ symbol: h, failedAliasResolution: S } = gH(O, g, s), T = O); + } + if (!h && e9(T)) { + const P = (o = e.getResolvedModuleFromModuleSpecifier(T, t)) == null ? void 0 : o.resolvedModule; + if (P) + return [{ + name: T.text, + fileName: P.resolvedFileName, + containerName: void 0, + containerKind: void 0, + kind: "script", + textSpan: jl(0, 0), + failedAliasResolution: S, + isAmbient: Ol(P.resolvedFileName), + unverified: T !== u + }]; + } + if (!h) + return Hi(_, v$e(u, g)); + if (i && Ri(h.declarations, (P) => P.getSourceFile().fileName === t.fileName)) return; + const C = C$e(g, u); + if (C && !(ru(u.parent) && E$e(C))) { + const P = nL(g, C, S); + if (g.getRootSymbols(h).some((O) => f$e(O, C))) + return [P]; + { + const O = _P(g, h, u, S, C) || He; + return u.kind === 108 ? [P, ...O] : [...O, P]; + } + } + if (u.parent.kind === 304) { + const P = g.getShorthandAssignmentValueSymbol(h.valueDeclaration), O = P?.declarations ? P.declarations.map((j) => BN( + j, + g, + P, + u, + /*unverified*/ + !1, + S + )) : He; + return Hi(O, xDe(g, u)); + } + if (Rc(u) && da(d) && If(d.parent) && u === (d.propertyName || d.name)) { + const P = lN(u), O = g.getTypeAtLocation(d.parent); + return P === void 0 ? He : Xs(O.isUnion() ? O.types : [O], (j) => { + const F = j.getProperty(P); + return F && _P(g, F, u); + }); + } + const D = xDe(g, u); + return Hi(_, D.length ? D : _P(g, h, u, S)); + } + function f$e(e, t) { + var n; + return e === t.symbol || e === t.symbol.parent || Tl(t.parent) || !lb(t.parent) && e === ((n = Jn(t.parent, vd)) == null ? void 0 : n.symbol); + } + function xDe(e, t) { + const n = wN(t); + if (n) { + const i = n && e.getContextualType(n.parent); + if (i) + return Xs(z9( + n, + e, + i, + /*unionSymbolOk*/ + !1 + ), (s) => _P(e, s, t)); + } + return He; + } + function p$e(e, t) { + const n = sr(t, fl); + if (!(n && n.name)) return; + const i = sr(n, Qn); + if (!i) return; + const s = tm(i); + if (!s) return; + const o = Ja(s.expression), c = tl(o) ? o.symbol : e.getSymbolAtLocation(o); + if (!c) return; + const _ = Pi(OT(n.name)), u = Uc(n) ? e.getPropertyOfType(e.getTypeOfSymbol(c), _) : e.getPropertyOfType(e.getDeclaredTypeOfSymbol(c), _); + if (u) + return _P(e, u, t); + } + function kDe(e, t, n) { + var i, s; + const o = fP(e.referencedFiles, t); + if (o) { + const u = n.getSourceFileFromReference(e, o); + return u && { reference: o, fileName: u.fileName, file: u, unverified: !1 }; + } + const c = fP(e.typeReferenceDirectives, t); + if (c) { + const u = (i = n.getResolvedTypeReferenceDirectiveFromTypeReferenceDirective(c, e)) == null ? void 0 : i.resolvedTypeReferenceDirective, d = u && n.getSourceFile(u.resolvedFileName); + return d && { reference: c, fileName: d.fileName, file: d, unverified: !1 }; + } + const _ = fP(e.libReferenceDirectives, t); + if (_) { + const u = n.getLibFileFromReference(_); + return u && { reference: _, fileName: u.fileName, file: u, unverified: !1 }; + } + if (e.imports.length || e.moduleAugmentations.length) { + const u = a6(e, t); + let d; + if (e9(u) && Sl(u.text) && (d = n.getResolvedModuleFromModuleSpecifier(u, e))) { + const g = (s = d.resolvedModule) == null ? void 0 : s.resolvedFileName, h = g || O1(Xn(e.fileName), u.text); + return { + file: n.getSourceFile(h), + fileName: h, + reference: { + pos: u.getStart(), + end: u.getEnd(), + fileName: u.text + }, + unverified: !g + }; + } + } + } + var CDe = /* @__PURE__ */ new Set([ + "Array", + "ArrayLike", + "ReadonlyArray", + "Promise", + "PromiseLike", + "Iterable", + "IterableIterator", + "AsyncIterable", + "Set", + "WeakSet", + "ReadonlySet", + "Map", + "WeakMap", + "ReadonlyMap", + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" + ]); + function d$e(e, t) { + const n = t.symbol.name; + if (!CDe.has(n)) + return !1; + const i = e.resolveName( + n, + /*location*/ + void 0, + 788968, + /*excludeGlobals*/ + !1 + ); + return !!i && i === t.target.symbol; + } + function EDe(e, t) { + if (!t.aliasSymbol) + return !1; + const n = t.aliasSymbol.name; + if (!CDe.has(n)) + return !1; + const i = e.resolveName( + n, + /*location*/ + void 0, + 788968, + /*excludeGlobals*/ + !1 + ); + return !!i && i === t.aliasSymbol; + } + function m$e(e, t, n, i) { + var s, o; + if (wn(t) & 4 && d$e(e, t)) + return jN(e.getTypeArguments(t)[0], e, n, i); + if (EDe(e, t) && t.aliasTypeArguments) + return jN(t.aliasTypeArguments[0], e, n, i); + if (wn(t) & 32 && t.target && EDe(e, t.target)) { + const c = (o = (s = t.aliasSymbol) == null ? void 0 : s.declarations) == null ? void 0 : o[0]; + if (c && Rp(c) && Nf(c.type) && c.type.typeArguments) + return jN(e.getTypeAtLocation(c.type.typeArguments[0]), e, n, i); + } + return []; + } + function g$e(e, t, n) { + const i = h_(t, n); + if (i === t) + return; + if (sC(i.parent) && i.parent.name === i) + return jN( + e.getTypeAtLocation(i.parent), + e, + i.parent, + /*failedAliasResolution*/ + !1 + ); + const { symbol: s, failedAliasResolution: o } = gH( + i, + e, + /*stopAtAlias*/ + !1 + ); + if (!s) return; + const c = e.getTypeOfSymbolAtLocation(s, i), _ = h$e(s, c, e), u = _ && jN(_, e, i, o), [d, g] = u && u.length !== 0 ? [_, u] : [c, jN(c, e, i, o)]; + return g.length ? [...m$e(e, d, i, o), ...g] : !(s.flags & 111551) && s.flags & 788968 ? _P(e, Jl(s, e), i, o) : void 0; + } + function jN(e, t, n, i) { + return Xs(e.isUnion() && !(e.flags & 32) ? e.types : [e], (s) => s.symbol && _P(t, s.symbol, n, i)); + } + function h$e(e, t, n) { + if (t.symbol === e || // At `const f = () => {}`, the symbol is `f` and the type symbol is at `() => {}` + e.valueDeclaration && t.symbol && ti(e.valueDeclaration) && e.valueDeclaration.initializer === t.symbol.valueDeclaration) { + const i = t.getCallSignatures(); + if (i.length === 1) return n.getReturnTypeOfSignature(fa(i)); + } + } + function y$e(e, t, n) { + const i = TDe(e, t, n); + if (!i || i.length === 0) + return; + const s = fP(t.referencedFiles, n) || fP(t.typeReferenceDirectives, n) || fP(t.libReferenceDirectives, n); + if (s) + return { definitions: i, textSpan: Fy(s) }; + const o = h_(t, n), c = jl(o.getStart(), o.getWidth()); + return { definitions: i, textSpan: c }; + } + function v$e(e, t) { + return Ii(t.getIndexInfosAtLocation(e), (n) => n.declaration && nL(t, n.declaration)); + } + function gH(e, t, n) { + const i = t.getSymbolAtLocation(e); + let s = !1; + if (i?.declarations && i.flags & 2097152 && !n && b$e(e, i.declarations[0])) { + const o = t.getAliasedSymbol(i); + if (o.declarations) + return { symbol: o }; + s = !0; + } + return { symbol: i, failedAliasResolution: s }; + } + function b$e(e, t) { + return e.kind !== 80 ? !1 : e.parent === t ? !0 : t.kind !== 274; + } + function S$e(e) { + if (!c4(e)) return !1; + const t = sr(e, (n) => Tl(n) ? !0 : c4(n) ? !1 : "quit"); + return !!t && mc(t) === 5; + } + function _P(e, t, n, i, s) { + const o = Ln(t.declarations, (S) => S !== s), c = d() || g(); + if (c) + return c; + const _ = Ln(o, (S) => !S$e(S)), u = ut(_) ? _ : o; + return or(u, (S) => BN( + S, + e, + t, + n, + /*unverified*/ + !1, + i + )); + function d() { + if (t.flags & 32 && !(t.flags & 19) && (WD(n) || n.kind === 137)) { + const S = Nn(o, Qn); + return S && h( + S.members, + /*selectConstructors*/ + !0 + ); + } + } + function g() { + return MV(n) || VV(n) ? h( + o, + /*selectConstructors*/ + !1 + ) : void 0; + } + function h(S, T) { + if (!S) + return; + const C = S.filter(T ? ec : ps), D = C.filter((P) => !!P.body); + return C.length ? D.length !== 0 ? D.map((P) => BN(P, e, t, n)) : [BN( + ia(C), + e, + t, + n, + /*unverified*/ + !1, + i + )] : void 0; + } + } + function BN(e, t, n, i, s, o) { + const c = t.symbolToString(n), _ = D0.getSymbolKind(t, n, i), u = n.parent ? t.symbolToString(n.parent, i) : ""; + return zue(t, e, _, c, u, s, o); + } + function zue(e, t, n, i, s, o, c, _) { + const u = t.getSourceFile(); + if (!_) { + const d = es(t) || t; + _ = e_(d, u); + } + return { + fileName: u.fileName, + textSpan: _, + kind: n, + name: i, + containerKind: void 0, + // TODO: GH#18217 + containerName: s, + ...yo.toContextSpan( + _, + u, + yo.getContextNode(t) + ), + isLocal: !Wue(e, t), + isAmbient: !!(t.flags & 33554432), + unverified: o, + failedAliasResolution: c + }; + } + function T$e(e, t) { + const n = yo.getContextNode(e), i = e_(Rue(n) ? n.start : n, t); + return { + fileName: t.fileName, + textSpan: i, + kind: "keyword", + name: "switch", + containerKind: void 0, + containerName: "", + ...yo.toContextSpan(i, t, n), + isLocal: !0, + isAmbient: !1, + unverified: !1, + failedAliasResolution: void 0 + }; + } + function Wue(e, t) { + if (e.isDeclarationVisible(t)) return !0; + if (!t.parent) return !1; + if (i0(t.parent) && t.parent.initializer === t) return Wue(e, t.parent); + switch (t.kind) { + case 172: + case 177: + case 178: + case 174: + if (ef( + t, + 2 + /* Private */ + )) return !1; + case 176: + case 303: + case 304: + case 210: + case 231: + case 219: + case 218: + return Wue(e, t.parent); + default: + return !1; + } + } + function nL(e, t, n) { + return BN( + t, + e, + t.symbol, + t, + /*unverified*/ + !1, + n + ); + } + function fP(e, t) { + return Nn(e, (n) => Sw(n, t)); + } + function x$e(e, t, n) { + return { + fileName: t, + textSpan: Mc(0, 0), + kind: "script", + name: e, + containerName: void 0, + containerKind: void 0, + // TODO: GH#18217 + unverified: n + }; + } + function k$e(e) { + const t = sr(e, (i) => !i6(i)), n = t?.parent; + return n && lb(n) && b7(n) === t ? n : void 0; + } + function C$e(e, t) { + const n = k$e(t), i = n && e.getResolvedSignature(n); + return Jn(i && i.declaration, (s) => ps(s) && !Xm(s)); + } + function E$e(e) { + switch (e.kind) { + case 176: + case 185: + case 179: + case 180: + return !0; + default: + return !1; + } + } + var hH = {}; + Qa(hH, { + provideInlayHints: () => A$e + }); + var D$e = (e) => new RegExp(`^\\s?/\\*\\*?\\s?${e}\\s?\\*\\/\\s?$`); + function P$e(e) { + return e.includeInlayParameterNameHints === "literals" || e.includeInlayParameterNameHints === "all"; + } + function w$e(e) { + return e.includeInlayParameterNameHints === "literals"; + } + function DDe(e) { + return e.interactiveInlayHints === !0; + } + function A$e(e) { + const { file: t, program: n, span: i, cancellationToken: s, preferences: o } = e, c = t.text, _ = n.getCompilerOptions(), u = Rf(t, o), d = n.getTypeChecker(), g = []; + return h(t), g; + function h(fe) { + if (!(!fe || fe.getFullWidth() === 0)) { + switch (fe.kind) { + case 267: + case 263: + case 264: + case 262: + case 231: + case 218: + case 174: + case 219: + s.throwIfCancellationRequested(); + } + if (II(i, fe.pos, fe.getFullWidth()) && !(ai(fe) && !bh(fe))) + return o.includeInlayVariableTypeHints && ti(fe) || o.includeInlayPropertyDeclarationTypeHints && rs(fe) ? j(fe) : o.includeInlayEnumMemberValueHints && Py(fe) ? P(fe) : P$e(o) && (Es(fe) || Ib(fe)) ? F(fe) : (o.includeInlayFunctionParameterTypeHints && so(fe) && k5(fe) && ce(fe), o.includeInlayFunctionLikeReturnTypeHints && S(fe) && U(fe)), gs(fe, h); + } + } + function S(fe) { + return xo(fe) || po(fe) || Ac(fe) || hc(fe) || Af(fe); + } + function T(fe, H, ae, le) { + let Ae = `${le ? "..." : ""}${fe}`, ge; + DDe(o) ? (ge = [pe(Ae, H), { text: ":" }], Ae = "") : Ae += ":", g.push({ + text: Ae, + position: ae, + kind: "Parameter", + whitespaceAfter: !0, + displayParts: ge + }); + } + function C(fe, H) { + g.push({ + text: typeof fe == "string" ? `: ${fe}` : "", + displayParts: typeof fe == "string" ? void 0 : [{ text: ": " }, ...fe], + position: H, + kind: "Type", + whitespaceBefore: !0 + }); + } + function D(fe, H) { + g.push({ + text: `= ${fe}`, + position: H, + kind: "Enum", + whitespaceBefore: !0 + }); + } + function P(fe) { + if (fe.initializer) + return; + const H = d.getConstantValue(fe); + H !== void 0 && D(H.toString(), fe.end); + } + function O(fe) { + return fe.symbol && fe.symbol.flags & 1536; + } + function j(fe) { + if (fe.initializer === void 0 && !(rs(fe) && !(d.getTypeAtLocation(fe).flags & 1)) || Ts(fe.name) || ti(fe) && !ne(fe) || Vc(fe)) + return; + const ae = d.getTypeAtLocation(fe); + if (O(ae)) + return; + const le = Z(ae); + if (le) { + const Ae = typeof le == "string" ? le : le.map((de) => de.text).join(""); + if (o.includeInlayVariableTypeHintsWhenTypeMatchesName === !1 && N1(fe.name.getText(), Ae)) + return; + C(le, fe.name.end); + } + } + function F(fe) { + const H = fe.arguments; + if (!H || !H.length) + return; + const ae = [], le = d.getResolvedSignatureForSignatureHelp(fe, ae); + if (!le || !ae.length) + return; + let Ae = 0; + for (const ge of H) { + const de = Ja(ge); + if (w$e(o) && !$(de)) { + Ae++; + continue; + } + let ve = 0; + if (cp(de)) { + const Xe = d.getTypeAtLocation(de.expression); + if (d.isTupleType(Xe)) { + const { elementFlags: Ie, fixedLength: ye } = Xe.target; + if (ye === 0) + continue; + const Fe = rc(Ie, (Ke) => !(Ke & 1)); + (Fe < 0 ? ye : Fe) > 0 && (ve = Fe < 0 ? ye : Fe); + } + } + const De = d.getParameterIdentifierInfoAtPosition(le, Ae); + if (Ae = Ae + (ve || 1), De) { + const { parameter: Xe, parameterName: Ie, isRestParameter: ye } = De; + if (!(o.includeInlayParameterNameHintsWhenArgumentMatchesName || !V(de, Ie)) && !ye) + continue; + const Qe = Pi(Ie); + if (L(de, Qe)) + continue; + T(Qe, Xe, ge.getStart(), ye); + } + } + } + function V(fe, H) { + return Re(fe) ? fe.text === H : Dn(fe) ? fe.name.text === H : !1; + } + function L(fe, H) { + if (!X_(H, pa(_), R3(t.scriptKind))) + return !1; + const ae = kg(c, fe.pos); + if (!ae?.length) + return !1; + const le = D$e(H); + return ut(ae, (Ae) => le.test(c.substring(Ae.pos, Ae.end))); + } + function $(fe) { + switch (fe.kind) { + case 224: { + const H = fe.operand; + return ob(H) || Re(H) && V4(H.escapedText); + } + case 112: + case 97: + case 106: + case 15: + case 228: + return !0; + case 80: { + const H = fe.escapedText; + return oe(H) || V4(H); + } + } + return ob(fe); + } + function U(fe) { + if (xo(fe) && !Ya(fe, 21, t) || K_(fe) || !fe.body) + return; + const ae = d.getSignatureFromDeclaration(fe); + if (!ae) + return; + const le = d.getReturnTypeOfSignature(ae); + if (O(le)) + return; + const Ae = Z(le); + Ae && C(Ae, G(fe)); + } + function G(fe) { + const H = Ya(fe, 22, t); + return H ? H.end : fe.parameters.end; + } + function ce(fe) { + const H = d.getSignatureFromDeclaration(fe); + if (H) + for (let ae = 0; ae < fe.parameters.length && ae < H.parameters.length; ++ae) { + const le = fe.parameters[ae]; + if (!ne(le) || Vc(le)) + continue; + const ge = K(H.parameters[ae]); + ge && C(ge, le.questionToken ? le.questionToken.end : le.name.end); + } + } + function K(fe) { + const H = fe.valueDeclaration; + if (!H || !ji(H)) + return; + const ae = d.getTypeOfSymbolAtLocation(fe, H); + if (!O(ae)) + return Z(ae); + } + function X(fe) { + const ae = gS(); + return e4((le) => { + const Ae = d.typeToTypeNode( + fe, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + E.assertIsDefined(Ae, "should always get typenode"), ae.writeNode( + 4, + Ae, + /*sourceFile*/ + t, + le + ); + }); + } + function Z(fe) { + if (!DDe(o)) + return X(fe); + const ae = d.typeToTypeNode( + fe, + /*enclosingDeclaration*/ + void 0, + 71286784 + ); + E.assertIsDefined(ae, "should always get typenode"); + const le = []; + return Ae(ae), le; + function Ae(De) { + var Xe, Ie; + if (!De) + return; + const ye = Ws(De.kind); + if (ye) { + le.push({ text: ye }); + return; + } + if (ob(De)) { + le.push({ text: ve(De) }); + return; + } + switch (De.kind) { + case 80: + E.assertNode(De, Re); + const Fe = dn(De), Qe = De.symbol && De.symbol.declarations && De.symbol.declarations.length && es(De.symbol.declarations[0]); + Qe ? le.push(pe(Fe, Qe)) : le.push({ text: Fe }); + break; + case 166: + E.assertNode(De, $u), Ae(De.left), le.push({ text: "." }), Ae(De.right); + break; + case 182: + E.assertNode(De, dx), De.assertsModifier && le.push({ text: "asserts " }), Ae(De.parameterName), De.type && (le.push({ text: " is " }), Ae(De.type)); + break; + case 183: + E.assertNode(De, Nf), Ae(De.typeName), De.typeArguments && (le.push({ text: "<" }), de(De.typeArguments, ", "), le.push({ text: ">" })); + break; + case 168: + E.assertNode(De, Mo), De.modifiers && de(De.modifiers, " "), Ae(De.name), De.constraint && (le.push({ text: " extends " }), Ae(De.constraint)), De.default && (le.push({ text: " = " }), Ae(De.default)); + break; + case 169: + E.assertNode(De, ji), De.modifiers && de(De.modifiers, " "), De.dotDotDotToken && le.push({ text: "..." }), Ae(De.name), De.questionToken && le.push({ text: "?" }), De.type && (le.push({ text: ": " }), Ae(De.type)); + break; + case 185: + E.assertNode(De, wC), le.push({ text: "new " }), ge(De), le.push({ text: " => " }), Ae(De.type); + break; + case 186: + E.assertNode(De, wb), le.push({ text: "typeof " }), Ae(De.exprName), De.typeArguments && (le.push({ text: "<" }), de(De.typeArguments, ", "), le.push({ text: ">" })); + break; + case 187: + E.assertNode(De, Xu), le.push({ text: "{" }), De.members.length && (le.push({ text: " " }), de(De.members, "; "), le.push({ text: " " })), le.push({ text: "}" }); + break; + case 188: + E.assertNode(De, iA), Ae(De.elementType), le.push({ text: "[]" }); + break; + case 189: + E.assertNode(De, mx), le.push({ text: "[" }), de(De.elements, ", "), le.push({ text: "]" }); + break; + case 202: + E.assertNode(De, AC), De.dotDotDotToken && le.push({ text: "..." }), Ae(De.name), De.questionToken && le.push({ text: "?" }), le.push({ text: ": " }), Ae(De.type); + break; + case 190: + E.assertNode(De, V5), Ae(De.type), le.push({ text: "?" }); + break; + case 191: + E.assertNode(De, U5), le.push({ text: "..." }), Ae(De.type); + break; + case 192: + E.assertNode(De, ky), de(De.types, " | "); + break; + case 193: + E.assertNode(De, gx), de(De.types, " & "); + break; + case 194: + E.assertNode(De, Ab), Ae(De.checkType), le.push({ text: " extends " }), Ae(De.extendsType), le.push({ text: " ? " }), Ae(De.trueType), le.push({ text: " : " }), Ae(De.falseType); + break; + case 195: + E.assertNode(De, rS), le.push({ text: "infer " }), Ae(De.typeParameter); + break; + case 196: + E.assertNode(De, nS), le.push({ text: "(" }), Ae(De.type), le.push({ text: ")" }); + break; + case 198: + E.assertNode(De, K1), le.push({ text: `${Ws(De.operator)} ` }), Ae(De.type); + break; + case 199: + E.assertNode(De, Nb), Ae(De.objectType), le.push({ text: "[" }), Ae(De.indexType), le.push({ text: "]" }); + break; + case 200: + E.assertNode(De, iS), le.push({ text: "{ " }), De.readonlyToken && (De.readonlyToken.kind === 40 ? le.push({ text: "+" }) : De.readonlyToken.kind === 41 && le.push({ text: "-" }), le.push({ text: "readonly " })), le.push({ text: "[" }), Ae(De.typeParameter), De.nameType && (le.push({ text: " as " }), Ae(De.nameType)), le.push({ text: "]" }), De.questionToken && (De.questionToken.kind === 40 ? le.push({ text: "+" }) : De.questionToken.kind === 41 && le.push({ text: "-" }), le.push({ text: "?" })), le.push({ text: ": " }), De.type && Ae(De.type), le.push({ text: "; }" }); + break; + case 201: + E.assertNode(De, y0), Ae(De.literal); + break; + case 184: + E.assertNode(De, Xm), ge(De), le.push({ text: " => " }), Ae(De.type); + break; + case 205: + E.assertNode(De, Qm), De.isTypeOf && le.push({ text: "typeof " }), le.push({ text: "import(" }), Ae(De.argument), De.assertions && (le.push({ text: ", { assert: " }), de(De.assertions.assertClause.elements, ", "), le.push({ text: " }" })), le.push({ text: ")" }), De.qualifier && (le.push({ text: "." }), Ae(De.qualifier)), De.typeArguments && (le.push({ text: "<" }), de(De.typeArguments, ", "), le.push({ text: ">" })); + break; + case 171: + E.assertNode(De, I_), (Xe = De.modifiers) != null && Xe.length && (de(De.modifiers, " "), le.push({ text: " " })), Ae(De.name), De.questionToken && le.push({ text: "?" }), De.type && (le.push({ text: ": " }), Ae(De.type)); + break; + case 181: + E.assertNode(De, Pb), le.push({ text: "[" }), de(De.parameters, ", "), le.push({ text: "]" }), De.type && (le.push({ text: ": " }), Ae(De.type)); + break; + case 173: + E.assertNode(De, um), (Ie = De.modifiers) != null && Ie.length && (de(De.modifiers, " "), le.push({ text: " " })), Ae(De.name), De.questionToken && le.push({ text: "?" }), ge(De), De.type && (le.push({ text: ": " }), Ae(De.type)); + break; + case 179: + E.assertNode(De, px), ge(De), De.type && (le.push({ text: ": " }), Ae(De.type)); + break; + case 207: + E.assertNode(De, v0), le.push({ text: "[" }), de(De.elements, ", "), le.push({ text: "]" }); + break; + case 206: + E.assertNode(De, If), le.push({ text: "{" }), De.elements.length && (le.push({ text: " " }), de(De.elements, ", "), le.push({ text: " " })), le.push({ text: "}" }); + break; + case 208: + E.assertNode(De, da), Ae(De.name); + break; + case 224: + E.assertNode(De, Ey), le.push({ text: Ws(De.operator) }), Ae(De.operand); + break; + case 203: + E.assertNode(De, Dte), Ae(De.head), De.templateSpans.forEach(Ae); + break; + case 16: + E.assertNode(De, ux), le.push({ text: ve(De) }); + break; + case 204: + E.assertNode(De, NJ), Ae(De.type), Ae(De.literal); + break; + case 17: + E.assertNode(De, DJ), le.push({ text: ve(De) }); + break; + case 18: + E.assertNode(De, B5), le.push({ text: ve(De) }); + break; + case 197: + E.assertNode(De, NC), le.push({ text: "this" }); + break; + default: + E.failBadSyntaxKind(De); + } + } + function ge(De) { + De.typeParameters && (le.push({ text: "<" }), de(De.typeParameters, ", "), le.push({ text: ">" })), le.push({ text: "(" }), de(De.parameters, ", "), le.push({ text: ")" }); + } + function de(De, Xe) { + De.forEach((Ie, ye) => { + ye > 0 && le.push({ text: Xe }), Ae(Ie); + }); + } + function ve(De) { + switch (De.kind) { + case 11: + return u === 0 ? `'${$m( + De.text, + 39 + /* singleQuote */ + )}'` : `"${$m( + De.text, + 34 + /* doubleQuote */ + )}"`; + case 16: + case 17: + case 18: { + const Xe = De.rawText ?? bB($m( + De.text, + 96 + /* backtick */ + )); + switch (De.kind) { + case 16: + return "`" + Xe + "${"; + case 17: + return "}" + Xe + "${"; + case 18: + return "}" + Xe + "`"; + } + } + } + return De.text; + } + } + function oe(fe) { + return fe === "undefined"; + } + function ne(fe) { + if ((X1(fe) || ti(fe) && iC(fe)) && fe.initializer) { + const H = Ja(fe.initializer); + return !($(H) || Ib(H) || Gs(H) || J1(H)); + } + return !0; + } + function pe(fe, H) { + const ae = H.getSourceFile(); + return { + text: fe, + span: e_(H, ae), + file: ae.fileName + }; + } + } + var bv = {}; + Qa(bv, { + getDocCommentTemplateAtPosition: () => z$e, + getJSDocParameterNameCompletionDetails: () => J$e, + getJSDocParameterNameCompletions: () => B$e, + getJSDocTagCompletionDetails: () => FDe, + getJSDocTagCompletions: () => j$e, + getJSDocTagNameCompletionDetails: () => R$e, + getJSDocTagNameCompletions: () => M$e, + getJsDocCommentsFromDeclarations: () => N$e, + getJsDocTagsFromDeclarations: () => F$e + }); + var PDe = [ + "abstract", + "access", + "alias", + "argument", + "async", + "augments", + "author", + "borrows", + "callback", + "class", + "classdesc", + "constant", + "constructor", + "constructs", + "copyright", + "default", + "deprecated", + "description", + "emits", + "enum", + "event", + "example", + "exports", + "extends", + "external", + "field", + "file", + "fileoverview", + "fires", + "function", + "generator", + "global", + "hideconstructor", + "host", + "ignore", + "implements", + "import", + "inheritdoc", + "inner", + "instance", + "interface", + "kind", + "lends", + "license", + "link", + "linkcode", + "linkplain", + "listens", + "member", + "memberof", + "method", + "mixes", + "module", + "name", + "namespace", + "overload", + "override", + "package", + "param", + "private", + "prop", + "property", + "protected", + "public", + "readonly", + "requires", + "returns", + "satisfies", + "see", + "since", + "static", + "summary", + "template", + "this", + "throws", + "todo", + "tutorial", + "type", + "typedef", + "var", + "variation", + "version", + "virtual", + "yields" + ], wDe, ADe; + function N$e(e, t) { + const n = []; + return mU(e, (i) => { + for (const s of O$e(i)) { + const o = Ed(s) && s.tags && Nn(s.tags, (_) => _.kind === 327 && (_.tagName.escapedText === "inheritDoc" || _.tagName.escapedText === "inheritdoc")); + if (s.comment === void 0 && !o || Ed(s) && i.kind !== 346 && i.kind !== 338 && s.tags && s.tags.some( + (_) => _.kind === 346 || _.kind === 338 + /* JSDocCallbackTag */ + ) && !s.tags.some( + (_) => _.kind === 341 || _.kind === 342 + /* JSDocReturnTag */ + )) + continue; + let c = s.comment ? S6(s.comment, t) : []; + o && o.comment && (c = c.concat(S6(o.comment, t))), ls(n, c, I$e) || n.push(c); + } + }), Ep(KM(n, [u6()])); + } + function I$e(e, t) { + return rw(e, t, (n, i) => n.kind === i.kind && n.text === i.text); + } + function O$e(e) { + switch (e.kind) { + case 341: + case 348: + return [e]; + case 338: + case 346: + return [e, e.parent]; + case 323: + if (MC(e.parent)) + return [e.parent.parent]; + default: + return iB(e); + } + } + function F$e(e, t) { + const n = []; + return mU(e, (i) => { + const s = j1(i); + if (!(s.some( + (o) => o.kind === 346 || o.kind === 338 + /* JSDocCallbackTag */ + ) && !s.some( + (o) => o.kind === 341 || o.kind === 342 + /* JSDocReturnTag */ + ))) + for (const o of s) + n.push({ name: o.tagName.text, text: ODe(o, t) }), n.push(...NDe(IDe(o), t)); + }), n; + } + function NDe(e, t) { + return Xs(e, (n) => Hi([{ name: n.tagName.text, text: ODe(n, t) }], NDe(IDe(n), t))); + } + function IDe(e) { + return HE(e) && e.isNameFirst && e.typeExpression && lS(e.typeExpression.type) ? e.typeExpression.type.jsDocPropertyTags : void 0; + } + function S6(e, t) { + return typeof e == "string" ? [jf(e)] : Xs( + e, + (n) => n.kind === 321 ? [jf(n.text)] : Eae(n, t) + ); + } + function ODe(e, t) { + const { comment: n, kind: i } = e, s = L$e(i); + switch (i) { + case 349: + const _ = e.typeExpression; + return _ ? o(_) : n === void 0 ? void 0 : S6(n, t); + case 329: + return o(e.class); + case 328: + return o(e.class); + case 345: + const u = e, d = []; + if (u.constraint && d.push(jf(u.constraint.getText())), Dr(u.typeParameters)) { + Dr(d) && d.push(_c()); + const h = u.typeParameters[u.typeParameters.length - 1]; + rr(u.typeParameters, (S) => { + d.push(s(S.getText())), h !== S && d.push(yu( + 28 + /* CommaToken */ + ), _c()); + }); + } + return n && d.push(_c(), ...S6(n, t)), d; + case 344: + case 350: + return o(e.typeExpression); + case 346: + case 338: + case 348: + case 341: + case 347: + const { name: g } = e; + return g ? o(g) : n === void 0 ? void 0 : S6(n, t); + default: + return n === void 0 ? void 0 : S6(n, t); + } + function o(_) { + return c(_.getText()); + } + function c(_) { + return n ? _.match(/^https?$/) ? [jf(_), ...S6(n, t)] : [s(_), _c(), ...S6(n, t)] : [jf(_)]; + } + } + function L$e(e) { + switch (e) { + case 341: + return Sae; + case 348: + return Tae; + case 345: + return kae; + case 346: + case 338: + return xae; + default: + return jf; + } + } + function M$e() { + return wDe || (wDe = or(PDe, (e) => ({ + name: e, + kind: "keyword", + kindModifiers: "", + sortText: $x.SortText.LocationPriority + }))); + } + var R$e = FDe; + function j$e() { + return ADe || (ADe = or(PDe, (e) => ({ + name: `@${e}`, + kind: "keyword", + kindModifiers: "", + sortText: $x.SortText.LocationPriority + }))); + } + function FDe(e) { + return { + name: e, + kind: "", + // TODO: should have its own kind? + kindModifiers: "", + displayParts: [jf(e)], + documentation: He, + tags: void 0, + codeActions: void 0 + }; + } + function B$e(e) { + if (!Re(e.name)) + return He; + const t = e.name.text, n = e.parent, i = n.parent; + return ps(i) ? Ii(i.parameters, (s) => { + if (!Re(s.name)) return; + const o = s.name.text; + if (!(n.tags.some((c) => c !== e && up(c) && Re(c.name) && c.name.escapedText === o) || t !== void 0 && !zi(o, t))) + return { name: o, kind: "parameter", kindModifiers: "", sortText: $x.SortText.LocationPriority }; + }) : []; + } + function J$e(e) { + return { + name: e, + kind: "parameter", + kindModifiers: "", + displayParts: [jf(e)], + documentation: He, + tags: void 0, + codeActions: void 0 + }; + } + function z$e(e, t, n, i) { + const s = Ei(t, n), o = sr(s, Ed); + if (o && (o.comment !== void 0 || Dr(o.tags))) + return; + const c = s.getStart(t); + if (!o && c < n) + return; + const _ = q$e(s, i); + if (!_) + return; + const { commentOwner: u, parameters: d, hasReturn: g } = _, h = gf(u) && u.jsDoc ? u.jsDoc : void 0, S = Bo(h); + if (u.getStart(t) < n || S && o && S !== o) + return; + const T = W$e(t, n), C = Lg(t.fileName), D = (d ? V$e(d || [], C, T, e) : "") + (g ? U$e(T, e) : ""), P = "/**", O = " */", j = Dr(j1(u)) > 0; + if (D && !j) { + const F = P + e + T + " * ", V = c === n ? e + T : ""; + return { newText: F + e + D + T + O + V, caretOffset: F.length }; + } + return { newText: P + O, caretOffset: 3 }; + } + function W$e(e, t) { + const { text: n } = e, i = Jp(t, e); + let s = i; + for (; s <= t && Xd(n.charCodeAt(s)); s++) ; + return n.slice(i, s); + } + function V$e(e, t, n, i) { + return e.map(({ name: s, dotDotDotToken: o }, c) => { + const _ = s.kind === 80 ? s.text : "param" + c; + return `${n} * @param ${t ? o ? "{...any} " : "{any} " : ""}${_}${i}`; + }).join(""); + } + function U$e(e, t) { + return `${e} * @returns${t}`; + } + function q$e(e, t) { + return sZ(e, (n) => Vue(n, t)); + } + function Vue(e, t) { + switch (e.kind) { + case 262: + case 218: + case 174: + case 176: + case 173: + case 219: + const n = e; + return { commentOwner: e, parameters: n.parameters, hasReturn: iL(n, t) }; + case 303: + return Vue(e.initializer, t); + case 263: + case 264: + case 266: + case 306: + case 265: + return { commentOwner: e }; + case 171: { + const s = e; + return s.type && Xm(s.type) ? { commentOwner: e, parameters: s.type.parameters, hasReturn: iL(s.type, t) } : { commentOwner: e }; + } + case 243: { + const o = e.declarationList.declarations, c = o.length === 1 && o[0].initializer ? H$e(o[0].initializer) : void 0; + return c ? { commentOwner: e, parameters: c.parameters, hasReturn: iL(c, t) } : { commentOwner: e }; + } + case 307: + return "quit"; + case 267: + return e.parent.kind === 267 ? void 0 : { commentOwner: e }; + case 244: + return Vue(e.expression, t); + case 226: { + const s = e; + return mc(s) === 0 ? "quit" : ps(s.right) ? { commentOwner: e, parameters: s.right.parameters, hasReturn: iL(s.right, t) } : { commentOwner: e }; + } + case 172: + const i = e.initializer; + if (i && (po(i) || xo(i))) + return { commentOwner: e, parameters: i.parameters, hasReturn: iL(i, t) }; + } + } + function iL(e, t) { + return !!t?.generateReturnInDocTemplate && (Xm(e) || xo(e) && ct(e.body) || so(e) && e.body && ms(e.body) && !!o0(e.body, (n) => n)); + } + function H$e(e) { + for (; e.kind === 217; ) + e = e.expression; + switch (e.kind) { + case 218: + case 219: + return e; + case 231: + return Nn(e.members, ec); + } + } + var yH = {}; + Qa(yH, { + mapCode: () => G$e + }); + function G$e(e, t, n, i, s, o) { + return Yr.ChangeTracker.with( + { host: i, formatContext: s, preferences: o }, + (c) => { + const _ = t.map((d) => $$e(e, d)), u = n && Ep(n); + for (const d of _) + X$e( + e, + c, + d, + u + ); + } + ); + } + function $$e(e, t) { + const n = [ + { + parse: () => Cx( + "__mapcode_content_nodes.ts", + t, + e.languageVersion, + /*setParentNodes*/ + !0, + e.scriptKind + ), + body: (o) => o.statements + }, + { + parse: () => Cx( + "__mapcode_class_content_nodes.ts", + `class __class { +${t} +}`, + e.languageVersion, + /*setParentNodes*/ + !0, + e.scriptKind + ), + body: (o) => o.statements[0].members + } + ], i = []; + for (const { parse: o, body: c } of n) { + const _ = o(), u = c(_); + if (u.length && _.parseDiagnostics.length === 0) + return u; + u.length && i.push({ sourceFile: _, body: u }); + } + const { body: s } = i.sort( + (o, c) => o.sourceFile.parseDiagnostics.length - c.sourceFile.parseDiagnostics.length + )[0]; + return s; + } + function X$e(e, t, n, i) { + fl(n[0]) || cb(n[0]) ? Q$e( + e, + t, + n, + i + ) : Y$e( + e, + t, + n, + i + ); + } + function Q$e(e, t, n, i) { + let s; + if (!i || !i.length ? s = Nn(e.statements, Ef(Qn, Vl)) : s = rr(i, (c) => sr( + Ei(e, c.start), + Ef(Qn, Vl) + )), !s) + return; + const o = s.members.find((c) => n.some((_) => sL(_, c))); + if (o) { + const c = eb( + s.members, + (_) => n.some((u) => sL(u, _)) + ); + rr(n, vH), t.replaceNodeRangeWithNodes( + e, + o, + c, + n + ); + return; + } + rr(n, vH), t.insertNodesAfter( + e, + s.members[s.members.length - 1], + n + ); + } + function Y$e(e, t, n, i) { + if (!i?.length) { + t.insertNodesAtEndOfFile( + e, + n, + /*blankLineBetween*/ + !1 + ); + return; + } + for (const o of i) { + const c = sr( + Ei(e, o.start), + (_) => Ef(ms, yi)(_) && ut(_.statements, (u) => n.some((d) => sL(d, u))) + ); + if (c) { + const _ = c.statements.find((u) => n.some((d) => sL(d, u))); + if (_) { + const u = eb(c.statements, (d) => n.some((g) => sL(g, d))); + rr(n, vH), t.replaceNodeRangeWithNodes( + e, + _, + u, + n + ); + return; + } + } + } + let s = e.statements; + for (const o of i) { + const c = sr( + Ei(e, o.start), + ms + ); + if (c) { + s = c.statements; + break; + } + } + rr(n, vH), t.insertNodesAfter( + e, + s[s.length - 1], + n + ); + } + function sL(e, t) { + var n, i, s, o, c, _; + return e.kind !== t.kind ? !1 : e.kind === 176 ? e.kind === t.kind : Bl(e) && Bl(t) ? e.name.getText() === t.name.getText() : ev(e) && ev(t) || LJ(e) && LJ(t) ? e.expression.getText() === t.expression.getText() : tv(e) && tv(t) ? ((n = e.initializer) == null ? void 0 : n.getText()) === ((i = t.initializer) == null ? void 0 : i.getText()) && ((s = e.incrementor) == null ? void 0 : s.getText()) === ((o = t.incrementor) == null ? void 0 : o.getText()) && ((c = e.condition) == null ? void 0 : c.getText()) === ((_ = t.condition) == null ? void 0 : _.getText()) : V2(e) && V2(t) ? e.expression.getText() === t.expression.getText() && e.initializer.getText() === t.initializer.getText() : Dy(e) && Dy(t) ? e.label.getText() === t.label.getText() : e.getText() === t.getText(); + } + function vH(e) { + LDe(e), e.parent = void 0; + } + function LDe(e) { + e.pos = -1, e.end = -1, e.forEachChild(LDe); + } + var Sv = {}; + Qa(Sv, { + compareImportsOrRequireStatements: () => Que, + compareModuleSpecifiers: () => gXe, + getDetectionLists: () => bH, + getImportDeclarationInsertionIndex: () => fXe, + getImportSpecifierInsertionIndex: () => pXe, + getNamedImportSpecifierComparerWithDetection: () => _Xe, + getOrganizeImportsStringComparerWithDetection: () => uXe, + organizeImports: () => Z$e, + testCoalesceExports: () => mXe, + testCoalesceImports: () => dXe + }); + function Z$e(e, t, n, i, s, o) { + const c = Yr.ChangeTracker.fromContext({ host: n, formatContext: t, preferences: s }), _ = o === "SortAndCombine" || o === "All", u = _, d = o === "RemoveUnused" || o === "All", g = e.statements.filter(oc), h = Uue(e, g), { comparersToTest: S, typeOrdersToTest: T } = bH(s), C = S[0], D = { + moduleSpecifierComparer: typeof s.organizeImportsIgnoreCase == "boolean" ? C : void 0, + namedImportComparer: typeof s.organizeImportsIgnoreCase == "boolean" ? C : void 0, + typeOrder: s.organizeImportsTypeOrder + }; + if (typeof s.organizeImportsIgnoreCase != "boolean" && ({ comparer: D.moduleSpecifierComparer } = jDe(h, S)), !D.typeOrder || typeof s.organizeImportsIgnoreCase != "boolean") { + const F = $ue(g, S, T); + if (F) { + const { namedImportComparer: V, typeOrder: L } = F; + D.namedImportComparer = D.namedImportComparer ?? V, D.typeOrder = D.typeOrder ?? L; + } + } + h.forEach((F) => O(F, D)), o !== "RemoveUnused" && eXe(e).forEach((F) => j(F, D.namedImportComparer)); + for (const F of e.statements.filter(wu)) { + if (!F.body) continue; + if (Uue(e, F.body.statements.filter(oc)).forEach((L) => O(L, D)), o !== "RemoveUnused") { + const L = F.body.statements.filter(Ic); + j(L, D.namedImportComparer); + } + } + return c.getChanges(); + function P(F, V) { + if (Dr(F) === 0) + return; + Kr( + F[0], + 1024 + /* NoLeadingComments */ + ); + const L = u ? TE(F, (G) => aL(G.moduleSpecifier)) : [F], $ = _ ? Sg(L, (G, ce) => Hue(G[0].moduleSpecifier, ce[0].moduleSpecifier, D.moduleSpecifierComparer ?? C)) : L, U = Xs($, (G) => aL(G[0].moduleSpecifier) || G[0].moduleSpecifier === void 0 ? V(G) : G); + if (U.length === 0) + c.deleteNodes( + e, + F, + { + leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, + trailingTriviaOption: Yr.TrailingTriviaOption.Include + }, + /*hasTrailingComment*/ + !0 + ); + else { + const G = { + leadingTriviaOption: Yr.LeadingTriviaOption.Exclude, + // Leave header comment in place + trailingTriviaOption: Yr.TrailingTriviaOption.Include, + suffix: k0(n, t.options) + }; + c.replaceNodeWithNodes(e, F[0], U, G); + const ce = c.nodeHasTrailingComment(e, F[0], G); + c.deleteNodes(e, F.slice(1), { + trailingTriviaOption: Yr.TrailingTriviaOption.Include + }, ce); + } + } + function O(F, V) { + const L = V.moduleSpecifierComparer ?? C, $ = V.namedImportComparer ?? C, U = V.typeOrder ?? "last", G = zN({ organizeImportsTypeOrder: U }, $); + P(F, (K) => (d && (K = tXe(K, e, i)), u && (K = MDe(K, L, G, e)), _ && (K = Sg(K, (X, Z) => Que(X, Z, L))), K)); + } + function j(F, V) { + const L = zN(s, V); + P(F, ($) => RDe($, L)); + } + } + function bH(e) { + return { + comparersToTest: typeof e.organizeImportsIgnoreCase == "boolean" ? [Xue(e, e.organizeImportsIgnoreCase)] : [Xue( + e, + /*ignoreCase*/ + !0 + ), Xue( + e, + /*ignoreCase*/ + !1 + )], + typeOrdersToTest: e.organizeImportsTypeOrder ? [e.organizeImportsTypeOrder] : ["last", "inline", "first"] + }; + } + function Uue(e, t) { + const n = Eg( + e.languageVersion, + /*skipTrivia*/ + !1, + e.languageVariant + ), i = []; + let s = 0; + for (const o of t) + i[s] && K$e(e, o, n) && s++, i[s] || (i[s] = []), i[s].push(o); + return i; + } + function K$e(e, t, n) { + const i = t.getFullStart(), s = t.getStart(); + n.setText(e.text, i, s - i); + let o = 0; + for (; n.getTokenStart() < s; ) + if (n.scan() === 4 && (o++, o >= 2)) + return !0; + return !1; + } + function eXe(e) { + const t = [], n = e.statements, i = Dr(n); + let s = 0, o = 0; + for (; s < i; ) + if (Ic(n[s])) { + t[o] === void 0 && (t[o] = []); + const c = n[s]; + if (c.moduleSpecifier) + t[o].push(c), s++; + else { + for (; s < i && Ic(n[s]); ) + t[o].push(n[s++]); + o++; + } + } else + s++; + return Xs(t, (c) => Uue(e, c)); + } + function tXe(e, t, n) { + const i = n.getTypeChecker(), s = n.getCompilerOptions(), o = i.getJsxNamespace(t), c = i.getJsxFragmentFactory(t), _ = !!(t.transformFlags & 2), u = []; + for (const g of e) { + const { importClause: h, moduleSpecifier: S } = g; + if (!h) { + u.push(g); + continue; + } + let { name: T, namedBindings: C } = h; + if (T && !d(T) && (T = void 0), C) + if (Rg(C)) + d(C.name) || (C = void 0); + else { + const D = C.elements.filter((P) => d(P.name)); + D.length < C.elements.length && (C = D.length ? N.updateNamedImports(C, D) : void 0); + } + T || C ? u.push(JN(g, T, C)) : iXe(t, S) && (t.isDeclarationFile ? u.push(N.createImportDeclaration( + g.modifiers, + /*importClause*/ + void 0, + S, + /*attributes*/ + void 0 + )) : u.push(g)); + } + return u; + function d(g) { + return _ && (g.text === o || c && g.text === c) && MU(s.jsx) || yo.Core.isSymbolReferencedInFile(g, i, t); + } + } + function aL(e) { + return e !== void 0 && Ga(e) ? e.text : void 0; + } + function rXe(e) { + let t; + const n = { defaultImports: [], namespaceImports: [], namedImports: [] }, i = { defaultImports: [], namespaceImports: [], namedImports: [] }; + for (const s of e) { + if (s.importClause === void 0) { + t = t || s; + continue; + } + const o = s.importClause.isTypeOnly ? n : i, { name: c, namedBindings: _ } = s.importClause; + c && o.defaultImports.push(s), _ && (Rg(_) ? o.namespaceImports.push(s) : o.namedImports.push(s)); + } + return { + importWithoutClause: t, + typeOnlyImports: n, + regularImports: i + }; + } + function MDe(e, t, n, i) { + if (e.length === 0) + return e; + const s = _R(e, (c) => { + if (c.attributes) { + let _ = c.attributes.token + " "; + for (const u of rb(c.attributes.elements, (d, g) => Kl(d.name.text, g.name.text))) + _ += u.name.text + ":", _ += Ga(u.value) ? `"${u.value.text}"` : u.value.getText() + " "; + return _; + } + return ""; + }), o = []; + for (const c in s) { + const _ = s[c], { importWithoutClause: u, typeOnlyImports: d, regularImports: g } = rXe(_); + u && o.push(u); + for (const h of [g, d]) { + const S = h === d, { defaultImports: T, namespaceImports: C, namedImports: D } = h; + if (!S && T.length === 1 && C.length === 1 && D.length === 0) { + const G = T[0]; + o.push( + JN(G, G.importClause.name, C[0].importClause.namedBindings) + ); + continue; + } + const P = Sg(C, (G, ce) => t(G.importClause.namedBindings.name.text, ce.importClause.namedBindings.name.text)); + for (const G of P) + o.push( + JN( + G, + /*name*/ + void 0, + G.importClause.namedBindings + ) + ); + const O = ul(T), j = ul(D), F = O ?? j; + if (!F) + continue; + let V; + const L = []; + if (T.length === 1) + V = T[0].importClause.name; + else + for (const G of T) + L.push( + N.createImportSpecifier( + /*isTypeOnly*/ + !1, + N.createIdentifier("default"), + G.importClause.name + ) + ); + L.push(...sXe(D)); + const $ = N.createNodeArray( + Sg(L, n), + j?.importClause.namedBindings.elements.hasTrailingComma + ), U = $.length === 0 ? V ? void 0 : N.createNamedImports(He) : j ? N.updateNamedImports(j.importClause.namedBindings, $) : N.createNamedImports($); + i && U && j?.importClause.namedBindings && !eS(j.importClause.namedBindings, i) && Kr( + U, + 2 + /* MultiLine */ + ), S && V && U ? (o.push( + JN( + F, + V, + /*namedBindings*/ + void 0 + ) + ), o.push( + JN( + j ?? F, + /*name*/ + void 0, + U + ) + )) : o.push( + JN(F, V, U) + ); + } + } + return o; + } + function RDe(e, t) { + if (e.length === 0) + return e; + const { exportWithoutClause: n, namedExports: i, typeOnlyExports: s } = c(e), o = []; + n && o.push(n); + for (const _ of [i, s]) { + if (_.length === 0) + continue; + const u = []; + u.push(...Xs(_, (h) => h.exportClause && lp(h.exportClause) ? h.exportClause.elements : He)); + const d = Sg(u, t), g = _[0]; + o.push( + N.updateExportDeclaration( + g, + g.modifiers, + g.isTypeOnly, + g.exportClause && (lp(g.exportClause) ? N.updateNamedExports(g.exportClause, d) : N.updateNamespaceExport(g.exportClause, g.exportClause.name)), + g.moduleSpecifier, + g.attributes + ) + ); + } + return o; + function c(_) { + let u; + const d = [], g = []; + for (const h of _) + h.exportClause === void 0 ? u = u || h : h.isTypeOnly ? g.push(h) : d.push(h); + return { + exportWithoutClause: u, + namedExports: d, + typeOnlyExports: g + }; + } + } + function JN(e, t, n) { + return N.updateImportDeclaration( + e, + e.modifiers, + N.updateImportClause(e.importClause, e.importClause.isTypeOnly, t, n), + // TODO: GH#18217 + e.moduleSpecifier, + e.attributes + ); + } + function que(e, t, n, i) { + switch (i?.organizeImportsTypeOrder) { + case "first": + return I1(t.isTypeOnly, e.isTypeOnly) || n(e.name.text, t.name.text); + case "inline": + return n(e.name.text, t.name.text); + default: + return I1(e.isTypeOnly, t.isTypeOnly) || n(e.name.text, t.name.text); + } + } + function Hue(e, t, n) { + const i = e === void 0 ? void 0 : aL(e), s = t === void 0 ? void 0 : aL(t); + return I1(i === void 0, s === void 0) || I1(Sl(i), Sl(s)) || n(i, s); + } + function nXe(e) { + return e.map((t) => aL(Gue(t)) || ""); + } + function Gue(e) { + var t; + switch (e.kind) { + case 271: + return (t = Jn(e.moduleReference, Sh)) == null ? void 0 : t.expression; + case 272: + return e.moduleSpecifier; + case 243: + return e.declarationList.declarations[0].initializer.arguments[0]; + } + } + function iXe(e, t) { + const n = Ks(t) && t.text; + return Gi(n) && ut(e.moduleAugmentations, (i) => Ks(i) && i.text === n); + } + function sXe(e) { + return Xs(e, (t) => or(aXe(t), (n) => n.name && n.propertyName && n.name.escapedText === n.propertyName.escapedText ? N.updateImportSpecifier( + n, + n.isTypeOnly, + /*propertyName*/ + void 0, + n.name + ) : n)); + } + function aXe(e) { + var t; + return (t = e.importClause) != null && t.namedBindings && fm(e.importClause.namedBindings) ? e.importClause.namedBindings.elements : void 0; + } + function jDe(e, t) { + const n = []; + return e.forEach((i) => { + n.push(nXe(i)); + }), JDe(n, t); + } + function $ue(e, t, n) { + let i = !1; + const s = e.filter((u) => { + var d, g; + const h = (g = Jn((d = u.importClause) == null ? void 0 : d.namedBindings, fm)) == null ? void 0 : g.elements; + return h?.length ? (!i && h.some((S) => S.isTypeOnly) && h.some((S) => !S.isTypeOnly) && (i = !0), !0) : !1; + }); + if (s.length === 0) return; + const o = s.map((u) => { + var d, g; + return (g = Jn((d = u.importClause) == null ? void 0 : d.namedBindings, fm)) == null ? void 0 : g.elements; + }).filter((u) => u !== void 0); + if (!i || n.length === 0) { + const u = JDe(o.map((d) => d.map((g) => g.name.text)), t); + return { + namedImportComparer: u.comparer, + typeOrder: n.length === 1 ? n[0] : void 0, + isSorted: u.isSorted + }; + } + const c = { first: 1 / 0, last: 1 / 0, inline: 1 / 0 }, _ = { first: t[0], last: t[0], inline: t[0] }; + for (const u of t) { + const d = { first: 0, last: 0, inline: 0 }; + for (const g of o) + for (const h of n) + d[h] = (d[h] ?? 0) + BDe(g, (S, T) => que(S, T, u, { organizeImportsTypeOrder: h })); + for (const g of n) { + const h = g; + d[h] < c[h] && (c[h] = d[h], _[h] = u); + } + } + e: for (const u of n) { + const d = u; + for (const g of n) + if (c[g] < c[d]) continue e; + return { namedImportComparer: _[d], typeOrder: d, isSorted: c[d] === 0 }; + } + return { namedImportComparer: _.last, typeOrder: "last", isSorted: c.last === 0 }; + } + function BDe(e, t) { + let n = 0; + for (let i = 0; i < e.length - 1; i++) + t(e[i], e[i + 1]) > 0 && n++; + return n; + } + function JDe(e, t) { + let n, i = 1 / 0; + for (const s of t) { + let o = 0; + for (const c of e) { + if (c.length <= 1) continue; + const _ = BDe(c, s); + o += _; + } + o < i && (i = o, n = s); + } + return { + comparer: n ?? t[0], + isSorted: i === 0 + }; + } + function oXe(e, t) { + return uo(zDe(e), zDe(t)); + } + function zDe(e) { + var t; + switch (e.kind) { + case 272: + return e.importClause ? e.importClause.isTypeOnly ? 1 : ((t = e.importClause.namedBindings) == null ? void 0 : t.kind) === 274 ? 2 : e.importClause.name ? 3 : 4 : 0; + case 271: + return 5; + case 243: + return 6; + } + } + function oL(e) { + return e ? wX : Kl; + } + function cXe(e, t) { + const n = lXe(t), i = t.organizeImportsCaseFirst ?? !1, s = t.organizeImportsNumericCollation ?? !1, o = t.organizeImportsAccentCollation ?? !0, c = e ? o ? "accent" : "base" : o ? "variant" : "case"; + return new Intl.Collator(n, { + usage: "sort", + caseFirst: i || "false", + sensitivity: c, + numeric: s + }).compare; + } + function lXe(e) { + let t = e.organizeImportsLocale; + t === "auto" && (t = NX()), t === void 0 && (t = "en"); + const n = Intl.Collator.supportedLocalesOf(t); + return n.length ? n[0] : "en"; + } + function Xue(e, t) { + return (e.organizeImportsCollation ?? "ordinal") === "unicode" ? cXe(t, e) : oL(t); + } + function uXe(e, t) { + return jDe([e], bH(t).comparersToTest); + } + function zN(e, t) { + const n = t ?? oL(!!e.organizeImportsIgnoreCase); + return (i, s) => que(i, s, n, e); + } + function _Xe(e, t, n) { + const { comparersToTest: i, typeOrdersToTest: s } = bH(t), o = $ue([e], i, s); + let c = zN(t, i[0]), _; + if (typeof t.organizeImportsIgnoreCase != "boolean" || !t.organizeImportsTypeOrder) { + if (o) { + const { namedImportComparer: u, typeOrder: d, isSorted: g } = o; + _ = g, c = zN({ organizeImportsTypeOrder: d }, u); + } else if (n) { + const u = $ue(n.statements.filter(oc), i, s); + if (u) { + const { namedImportComparer: d, typeOrder: g, isSorted: h } = u; + _ = h, c = zN({ organizeImportsTypeOrder: g }, d); + } + } + } + return { specifierComparer: c, isSorted: _ }; + } + function fXe(e, t, n) { + const i = Zh(e, t, lo, (s, o) => Que(s, o, n)); + return i < 0 ? ~i : i; + } + function pXe(e, t, n) { + const i = Zh(e, t, lo, n); + return i < 0 ? ~i : i; + } + function Que(e, t, n) { + return Hue(Gue(e), Gue(t), n) || oXe(e, t); + } + function dXe(e, t, n, i) { + const s = oL(t), o = zN({ organizeImportsTypeOrder: i?.organizeImportsTypeOrder }, s); + return MDe(e, s, o, n); + } + function mXe(e, t, n) { + return RDe(e, (s, o) => que(s, o, oL(t), { organizeImportsTypeOrder: n?.organizeImportsTypeOrder ?? "last" })); + } + function gXe(e, t, n) { + const i = oL(!!n); + return Hue(e, t, i); + } + var SH = {}; + Qa(SH, { + collectElements: () => hXe + }); + function hXe(e, t) { + const n = []; + return yXe(e, t, n), vXe(e, n), n.sort((i, s) => i.textSpan.start - s.textSpan.start); + } + function yXe(e, t, n) { + let i = 40, s = 0; + const o = [...e.statements, e.endOfFileToken], c = o.length; + for (; s < c; ) { + for (; s < c && !IT(o[s]); ) + _(o[s]), s++; + if (s === c) break; + const u = s; + for (; s < c && IT(o[s]); ) + _(o[s]), s++; + const d = s - 1; + d !== u && n.push(cL( + Ya(o[u], 102, e).getStart(e), + o[d].getEnd(), + "imports" + /* Imports */ + )); + } + function _(u) { + var d; + if (i === 0) return; + t.throwIfCancellationRequested(), (tu(u) || yc(u) || Mp(u) || Qd(u) || u.kind === 1) && VDe(u, e, t, n), ps(u) && cn(u.parent) && Dn(u.parent.left) && VDe(u.parent.left, e, t, n), (ms(u) || _m(u)) && Yue(u.statements.end, e, t, n), (Qn(u) || Vl(u)) && Yue(u.members.end, e, t, n); + const g = SXe(u, e); + g && n.push(g), i--, Es(u) ? (i++, _(u.expression), i--, u.arguments.forEach(_), (d = u.typeArguments) == null || d.forEach(_)) : ev(u) && u.elseStatement && ev(u.elseStatement) ? (_(u.expression), _(u.thenStatement), i++, _(u.elseStatement), i--) : u.forEachChild(_), i++; + } + } + function vXe(e, t) { + const n = [], i = e.getLineStarts(); + for (const s of i) { + const o = e.getLineEndOfPosition(s), c = e.text.substring(s, o), _ = WDe(c); + if (!(!_ || T0(e, s))) + if (_[1]) { + const u = n.pop(); + u && (u.textSpan.length = o - u.textSpan.start, u.hintSpan.length = o - u.textSpan.start, t.push(u)); + } else { + const u = Mc(e.text.indexOf("//", s), o); + n.push(Qx( + u, + "region", + u, + /*autoCollapse*/ + !1, + _[2] || "#region" + )); + } + } + } + var bXe = /^#(end)?region(?:\s+(.*))?(?:\r)?$/; + function WDe(e) { + return e = e.trimStart(), zi(e, "//") ? (e = e.slice(2).trim(), bXe.exec(e)) : null; + } + function Yue(e, t, n, i) { + const s = kg(t.text, e); + if (!s) return; + let o = -1, c = -1, _ = 0; + const u = t.getFullText(); + for (const { kind: g, pos: h, end: S } of s) + switch (n.throwIfCancellationRequested(), g) { + case 2: + const T = u.slice(h, S); + if (WDe(T)) { + d(), _ = 0; + break; + } + _ === 0 && (o = h), c = S, _++; + break; + case 3: + d(), i.push(cL( + h, + S, + "comment" + /* Comment */ + )), _ = 0; + break; + default: + E.assertNever(g); + } + d(); + function d() { + _ > 1 && i.push(cL( + o, + c, + "comment" + /* Comment */ + )); + } + } + function VDe(e, t, n, i) { + cx(e) || Yue(e.pos, t, n, i); + } + function cL(e, t, n) { + return Qx(Mc(e, t), n); + } + function SXe(e, t) { + switch (e.kind) { + case 241: + if (ps(e.parent)) + return TXe(e.parent, e, t); + switch (e.parent.kind) { + case 246: + case 249: + case 250: + case 248: + case 245: + case 247: + case 254: + case 299: + return g(e.parent); + case 258: + const T = e.parent; + if (T.tryBlock === e) + return g(e.parent); + if (T.finallyBlock === e) { + const C = Ya(T, 98, t); + if (C) return g(C); + } + default: + return Qx( + e_(e, t), + "code" + /* Code */ + ); + } + case 268: + return g(e.parent); + case 263: + case 231: + case 264: + case 266: + case 269: + case 187: + case 206: + return g(e); + case 189: + return g( + e, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !mx(e.parent), + 23 + /* OpenBracketToken */ + ); + case 296: + case 297: + return h(e.statements); + case 210: + return d(e); + case 209: + return d( + e, + 23 + /* OpenBracketToken */ + ); + case 284: + return o(e); + case 288: + return c(e); + case 285: + case 286: + return _(e.attributes); + case 228: + case 15: + return u(e); + case 207: + return g( + e, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !da(e.parent), + 23 + /* OpenBracketToken */ + ); + case 219: + return s(e); + case 213: + return i(e); + case 217: + return S(e); + case 275: + case 279: + case 300: + return n(e); + } + function n(T) { + if (!T.elements.length) + return; + const C = Ya(T, 19, t), D = Ya(T, 20, t); + if (!(!C || !D || ip(C.pos, D.pos, t))) + return TH( + C, + D, + T, + t, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !1 + ); + } + function i(T) { + if (!T.arguments.length) + return; + const C = Ya(T, 21, t), D = Ya(T, 22, t); + if (!(!C || !D || ip(C.pos, D.pos, t))) + return TH( + C, + D, + T, + t, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !0 + ); + } + function s(T) { + if (ms(T.body) || Qu(T.body) || ip(T.body.getFullStart(), T.body.getEnd(), t)) + return; + const C = Mc(T.body.getFullStart(), T.body.getEnd()); + return Qx(C, "code", e_(T)); + } + function o(T) { + const C = Mc(T.openingElement.getStart(t), T.closingElement.getEnd()), D = T.openingElement.tagName.getText(t), P = "<" + D + ">..."; + return Qx( + C, + "code", + C, + /*autoCollapse*/ + !1, + P + ); + } + function c(T) { + const C = Mc(T.openingFragment.getStart(t), T.closingFragment.getEnd()); + return Qx( + C, + "code", + C, + /*autoCollapse*/ + !1, + "<>..." + ); + } + function _(T) { + if (T.properties.length !== 0) + return cL( + T.getStart(t), + T.getEnd(), + "code" + /* Code */ + ); + } + function u(T) { + if (!(T.kind === 15 && T.text.length === 0)) + return cL( + T.getStart(t), + T.getEnd(), + "code" + /* Code */ + ); + } + function d(T, C = 19) { + return g( + T, + /*autoCollapse*/ + !1, + /*useFullStart*/ + !Wl(T.parent) && !Es(T.parent), + C + ); + } + function g(T, C = !1, D = !0, P = 19, O = P === 19 ? 20 : 24) { + const j = Ya(e, P, t), F = Ya(e, O, t); + return j && F && TH(j, F, T, t, C, D); + } + function h(T) { + return T.length ? Qx( + Fy(T), + "code" + /* Code */ + ) : void 0; + } + function S(T) { + if (ip(T.getStart(), T.getEnd(), t)) return; + const C = Mc(T.getStart(), T.getEnd()); + return Qx(C, "code", e_(T)); + } + } + function TXe(e, t, n) { + const i = xXe(e, t, n), s = Ya(t, 20, n); + return i && s && TH( + i, + s, + e, + n, + /*autoCollapse*/ + e.kind !== 219 + /* ArrowFunction */ + ); + } + function TH(e, t, n, i, s = !1, o = !0) { + const c = Mc(o ? e.getFullStart() : e.getStart(i), t.getEnd()); + return Qx(c, "code", e_(n, i), s); + } + function Qx(e, t, n = e, i = !1, s = "...") { + return { textSpan: e, kind: t, hintSpan: n, bannerText: s, autoCollapse: i }; + } + function xXe(e, t, n) { + if (LK(e.parameters, n)) { + const i = Ya(e, 21, n); + if (i) + return i; + } + return Ya(t, 19, n); + } + var lL = {}; + Qa(lL, { + getRenameInfo: () => kXe, + nodeIsEligibleForRename: () => qDe + }); + function kXe(e, t, n, i) { + const s = VF(h_(t, n)); + if (qDe(s)) { + const o = CXe(s, e.getTypeChecker(), t, e, i); + if (o) + return o; + } + return xH(p.You_cannot_rename_this_element); + } + function CXe(e, t, n, i, s) { + const o = t.getSymbolAtLocation(e); + if (!o) { + if (Ga(e)) { + const S = WF(e, t); + if (S && (S.flags & 128 || S.flags & 1048576 && Ri(S.types, (T) => !!(T.flags & 128)))) + return Zue(e.text, e.text, "string", "", e, n); + } else if (BV(e)) { + const S = sc(e); + return Zue(S, S, "label", "", e, n); + } + return; + } + const { declarations: c } = o; + if (!c || c.length === 0) return; + if (c.some((S) => EXe(i, S))) + return xH(p.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); + if (Re(e) && e.escapedText === "default" && o.parent && o.parent.flags & 1536) + return; + if (Ga(e) && d3(e)) + return s.allowRenameOfImportPath ? PXe(e, n, o) : void 0; + const _ = DXe(n, o, t, s); + if (_) + return xH(_); + const u = D0.getSymbolKind(t, o, e), d = Dae(e) || Pf(e) && e.parent.kind === 167 ? Op(Ip(e)) : void 0, g = d || t.symbolToString(o), h = d || t.getFullyQualifiedName(o); + return Zue(g, h, u, D0.getSymbolModifiers(t, o), e, n); + } + function EXe(e, t) { + const n = t.getSourceFile(); + return e.isSourceFileDefaultLibrary(n) && Go( + n.fileName, + ".d.ts" + /* Dts */ + ); + } + function DXe(e, t, n, i) { + if (!i.providePrefixAndSuffixTextForRename && t.flags & 2097152) { + const c = t.declarations && Nn(t.declarations, (_) => Yu(_)); + c && !c.propertyName && (t = n.getAliasedSymbol(t)); + } + const { declarations: s } = t; + if (!s) + return; + const o = UDe(e.path); + if (o === void 0) + return ut(s, (c) => yN(c.getSourceFile().path)) ? p.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder : void 0; + for (const c of s) { + const _ = UDe(c.getSourceFile().path); + if (_) { + const u = Math.min(o.length, _.length); + for (let d = 0; d <= u; d++) + if (Kl(o[d], _[d]) !== 0) + return p.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder; + } + } + } + function UDe(e) { + const t = vl(e), n = t.lastIndexOf("node_modules"); + if (n !== -1) + return t.slice(0, n + 2); + } + function PXe(e, t, n) { + if (!Sl(e.text)) + return xH(p.You_cannot_rename_a_module_via_a_global_import); + const i = n.declarations && Nn(n.declarations, yi); + if (!i) return; + const s = nc(e.text, "/index") || nc(e.text, "/index.js") ? void 0 : FX(Gu(i.fileName), "/index"), o = s === void 0 ? i.fileName : s, c = s === void 0 ? "module" : "directory", _ = e.text.lastIndexOf("/") + 1, u = jl(e.getStart(t) + 1 + _, e.text.length - _); + return { + canRename: !0, + fileToRename: o, + kind: c, + displayName: o, + fullDisplayName: e.text, + kindModifiers: "", + triggerSpan: u + }; + } + function Zue(e, t, n, i, s, o) { + return { + canRename: !0, + fileToRename: void 0, + kind: n, + displayName: e, + fullDisplayName: t, + kindModifiers: i, + triggerSpan: wXe(s, o) + }; + } + function xH(e) { + return { canRename: !1, localizedErrorMessage: as(e) }; + } + function wXe(e, t) { + let n = e.getStart(t), i = e.getWidth(t); + return Ga(e) && (n += 1, i -= 2), jl(n, i); + } + function qDe(e) { + switch (e.kind) { + case 80: + case 81: + case 11: + case 15: + case 110: + return !0; + case 9: + return jF(e); + default: + return !1; + } + } + var WN = {}; + Qa(WN, { + getArgumentInfoForCompletions: () => FXe, + getSignatureHelpItems: () => AXe + }); + function AXe(e, t, n, i, s) { + const o = e.getTypeChecker(), c = UF(t, n); + if (!c) + return; + const _ = !!i && i.kind === "characterTyped"; + if (_ && (Mx(t, n, c) || T0(t, n))) + return; + const u = !!i && i.kind === "invoked", d = GXe(c, n, t, o, u); + if (!d) return; + s.throwIfCancellationRequested(); + const g = NXe(d, o, t, c, _); + return s.throwIfCancellationRequested(), g ? o.runWithCancellationToken(s, (h) => g.kind === 0 ? KDe(g.candidates, g.resolvedSignature, d, t, h) : XXe(g.symbol, d, t, h)) : p_(t) ? OXe(d, e, s) : void 0; + } + function NXe({ invocation: e, argumentCount: t }, n, i, s, o) { + switch (e.kind) { + case 0: { + if (o && !IXe(s, e.node, i)) + return; + const c = [], _ = n.getResolvedSignatureForSignatureHelp(e.node, c, t); + return c.length === 0 ? void 0 : { kind: 0, candidates: c, resolvedSignature: _ }; + } + case 1: { + const { called: c } = e; + if (o && !HDe(s, i, Re(c) ? c.parent : c)) + return; + const _ = XV(c, t, n); + if (_.length !== 0) return { kind: 0, candidates: _, resolvedSignature: fa(_) }; + const u = n.getSymbolAtLocation(c); + return u && { kind: 1, symbol: u }; + } + case 2: + return { kind: 0, candidates: [e.signature], resolvedSignature: e.signature }; + default: + return E.assertNever(e); + } + } + function IXe(e, t, n) { + if (!Qd(t)) return !1; + const i = t.getChildren(n); + switch (e.kind) { + case 21: + return ls(i, e); + case 28: { + const s = zF(e); + return !!s && ls(i, s); + } + case 30: + return HDe(e, n, t.expression); + default: + return !1; + } + } + function OXe(e, t, n) { + if (e.invocation.kind === 2) return; + const i = YDe(e.invocation), s = Dn(i) ? i.name.text : void 0, o = t.getTypeChecker(); + return s === void 0 ? void 0 : xc(t.getSourceFiles(), (c) => xc(c.getNamedDeclarations().get(s), (_) => { + const u = _.symbol && o.getTypeOfSymbolAtLocation(_.symbol, _), d = u && u.getCallSignatures(); + if (d && d.length) + return o.runWithCancellationToken( + n, + (g) => KDe( + d, + d[0], + e, + c, + g, + /*useFullPrefix*/ + !0 + ) + ); + })); + } + function HDe(e, t, n) { + const i = e.getFullStart(); + let s = e.parent; + for (; s; ) { + const o = sl( + i, + t, + s, + /*excludeJsdoc*/ + !0 + ); + if (o) + return Mf(n, o); + s = s.parent; + } + return E.fail("Could not find preceding token"); + } + function FXe(e, t, n, i) { + const s = $De(e, t, n, i); + return !s || s.isTypeParameterList || s.invocation.kind !== 0 ? void 0 : { invocation: s.invocation.node, argumentCount: s.argumentCount, argumentIndex: s.argumentIndex }; + } + function GDe(e, t, n, i) { + const s = LXe(e, n, i); + if (!s) return; + const { list: o, argumentIndex: c } = s, _ = VXe(i, o); + c !== 0 && E.assertLessThan(c, _); + const u = qXe(o, n); + return { list: o, argumentIndex: c, argumentCount: _, argumentsSpan: u }; + } + function LXe(e, t, n) { + if (e.kind === 30 || e.kind === 21) + return { list: $Xe(e.parent, e, t), argumentIndex: 0 }; + { + const i = zF(e); + return i && { list: i, argumentIndex: WXe(n, i, e) }; + } + } + function $De(e, t, n, i) { + const { parent: s } = e; + if (Qd(s)) { + const o = s, c = GDe(e, t, n, i); + if (!c) return; + const { list: _, argumentIndex: u, argumentCount: d, argumentsSpan: g } = c; + return { isTypeParameterList: !!s.typeArguments && s.typeArguments.pos === _.pos, invocation: { kind: 0, node: o }, argumentsSpan: g, argumentIndex: u, argumentCount: d }; + } else { + if (lx(e) && Ob(s)) + return aN(e, t, n) ? e_e( + s, + /*argumentIndex*/ + 0, + n + ) : void 0; + if (ux(e) && s.parent.kind === 215) { + const o = s, c = o.parent; + E.assert( + o.kind === 228 + /* TemplateExpression */ + ); + const _ = aN(e, t, n) ? 0 : 1; + return e_e(c, _, n); + } else if (iD(s) && Ob(s.parent.parent)) { + const o = s, c = s.parent.parent; + if (B5(e) && !aN(e, t, n)) + return; + const _ = o.parent.templateSpans.indexOf(o), u = UXe(_, e, t, n); + return e_e(c, u, n); + } else if (ru(s)) { + const o = s.attributes.pos, c = sa( + n.text, + s.attributes.end, + /*stopAfterLineBreak*/ + !1 + ); + return { + isTypeParameterList: !1, + invocation: { kind: 0, node: s }, + argumentsSpan: jl(o, c - o), + argumentIndex: 0, + argumentCount: 1 + }; + } else { + const o = QV(e, n); + if (o) { + const { called: c, nTypeArguments: _ } = o, u = { kind: 1, called: c }, d = Mc(c.getStart(n), e.end); + return { isTypeParameterList: !0, invocation: u, argumentsSpan: d, argumentIndex: _, argumentCount: _ + 1 }; + } + return; + } + } + } + function MXe(e, t, n, i) { + return RXe(e, t, n, i) || $De(e, t, n, i); + } + function XDe(e) { + return cn(e.parent) ? XDe(e.parent) : e; + } + function Kue(e) { + return cn(e.left) ? Kue(e.left) + 1 : 2; + } + function RXe(e, t, n, i) { + const s = jXe(e); + if (s === void 0) return; + const o = BXe(s, n, t, i); + if (o === void 0) return; + const { contextualType: c, argumentIndex: _, argumentCount: u, argumentsSpan: d } = o, g = c.getNonNullableType(), h = g.symbol; + if (h === void 0) return; + const S = Bo(g.getCallSignatures()); + return S === void 0 ? void 0 : { isTypeParameterList: !1, invocation: { kind: 2, signature: S, node: e, symbol: JXe(h) }, argumentsSpan: d, argumentIndex: _, argumentCount: u }; + } + function jXe(e) { + switch (e.kind) { + case 21: + case 28: + return e; + default: + return sr(e.parent, (t) => ji(t) ? !0 : da(t) || If(t) || v0(t) ? !1 : "quit"); + } + } + function BXe(e, t, n, i) { + const { parent: s } = e; + switch (s.kind) { + case 217: + case 174: + case 218: + case 219: + const o = GDe(e, n, t, i); + if (!o) return; + const { argumentIndex: c, argumentCount: _, argumentsSpan: u } = o, d = hc(s) ? i.getContextualTypeForObjectLiteralElement(s) : i.getContextualType(s); + return d && { contextualType: d, argumentIndex: c, argumentCount: _, argumentsSpan: u }; + case 226: { + const g = XDe(s), h = i.getContextualType(g), S = e.kind === 21 ? 0 : Kue(s) - 1, T = Kue(g); + return h && { contextualType: h, argumentIndex: S, argumentCount: T, argumentsSpan: e_(s) }; + } + default: + return; + } + } + function JXe(e) { + return e.name === "__type" && xc(e.declarations, (t) => { + var n; + return Xm(t) ? (n = Jn(t.parent, vd)) == null ? void 0 : n.symbol : void 0; + }) || e; + } + function zXe(e, t) { + const n = t.getTypeAtLocation(e.expression); + if (t.isTupleType(n)) { + const { elementFlags: i, fixedLength: s } = n.target; + if (s === 0) + return 0; + const o = rc(i, (c) => !(c & 1)); + return o < 0 ? s : o; + } + return 0; + } + function WXe(e, t, n) { + return QDe(e, t, n); + } + function VXe(e, t) { + return QDe( + e, + t, + /*node*/ + void 0 + ); + } + function QDe(e, t, n) { + const i = t.getChildren(); + let s = 0, o = !1; + for (const c of i) { + if (n && c === n) + return !o && c.kind === 28 && s++, s; + if (cp(c)) { + s += zXe(c, e), o = !0; + continue; + } + if (c.kind !== 28) { + s++, o = !0; + continue; + } + if (o) { + o = !1; + continue; + } + s++; + } + return n ? s : i.length && ia(i).kind === 28 ? s + 1 : s; + } + function UXe(e, t, n, i) { + return E.assert(n >= t.getStart(), "Assumed 'position' could not occur before node."), MY(t) ? aN(t, n, i) ? 0 : e + 2 : e + 1; + } + function e_e(e, t, n) { + const i = lx(e.template) ? 1 : e.template.templateSpans.length + 1; + return t !== 0 && E.assertLessThan(t, i), { + isTypeParameterList: !1, + invocation: { kind: 0, node: e }, + argumentsSpan: HXe(e, n), + argumentIndex: t, + argumentCount: i + }; + } + function qXe(e, t) { + const n = e.getFullStart(), i = sa( + t.text, + e.getEnd(), + /*stopAfterLineBreak*/ + !1 + ); + return jl(n, i - n); + } + function HXe(e, t) { + const n = e.template, i = n.getStart(); + let s = n.getEnd(); + return n.kind === 228 && ia(n.templateSpans).literal.getFullWidth() === 0 && (s = sa( + t.text, + s, + /*stopAfterLineBreak*/ + !1 + )), jl(i, s - i); + } + function GXe(e, t, n, i, s) { + for (let o = e; !yi(o) && (s || !ms(o)); o = o.parent) { + E.assert(Mf(o.parent, o), "Not a subspan", () => `Child: ${E.formatSyntaxKind(o.kind)}, parent: ${E.formatSyntaxKind(o.parent.kind)}`); + const c = MXe(o, t, n, i); + if (c) + return c; + } + } + function $Xe(e, t, n) { + const i = e.getChildren(n), s = i.indexOf(t); + return E.assert(s >= 0 && i.length > s + 1), i[s + 1]; + } + function YDe(e) { + return e.kind === 0 ? b7(e.node) : e.called; + } + function ZDe(e) { + return e.kind === 0 ? e.node : e.kind === 1 ? e.called : e.node; + } + var uL = 70246400; + function KDe(e, t, { isTypeParameterList: n, argumentCount: i, argumentsSpan: s, invocation: o, argumentIndex: c }, _, u, d) { + var g; + const h = ZDe(o), S = o.kind === 2 ? o.symbol : u.getSymbolAtLocation(YDe(o)) || d && ((g = t.declaration) == null ? void 0 : g.symbol), T = S ? XD( + u, + S, + d ? _ : void 0, + /*meaning*/ + void 0 + ) : He, C = or(e, (F) => YXe(F, T, n, u, h, _)); + c !== 0 && E.assertLessThan(c, i); + let D = 0, P = 0; + for (let F = 0; F < C.length; F++) { + const V = C[F]; + if (e[F] === t && (D = P, V.length > 1)) { + let L = 0; + for (const $ of V) { + if ($.isVariadic || $.parameters.length >= i) { + D = P + L; + break; + } + L++; + } + } + P += V.length; + } + E.assert(D !== -1); + const O = { items: vE(C, lo), applicableSpan: s, selectedItemIndex: D, argumentIndex: c, argumentCount: i }, j = O.items[D]; + if (j.isVariadic) { + const F = rc(j.parameters, (V) => !!V.isRest); + -1 < F && F < j.parameters.length - 1 ? O.argumentIndex = j.parameters.length : O.argumentIndex = Math.min(O.argumentIndex, j.parameters.length - 1); + } + return O; + } + function XXe(e, { argumentCount: t, argumentsSpan: n, invocation: i, argumentIndex: s }, o, c) { + const _ = c.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(e); + return _ ? { items: [QXe(e, _, c, ZDe(i), o)], applicableSpan: n, selectedItemIndex: 0, argumentIndex: s, argumentCount: t } : void 0; + } + function QXe(e, t, n, i, s) { + const o = XD(n, e), c = gS(), _ = t.map((h) => tPe(h, n, i, s, c)), u = e.getDocumentationComment(n), d = e.getJsDocTags(n); + return { isVariadic: !1, prefixDisplayParts: [...o, yu( + 30 + /* LessThanToken */ + )], suffixDisplayParts: [yu( + 32 + /* GreaterThanToken */ + )], separatorDisplayParts: ePe, parameters: _, documentation: u, tags: d }; + } + var ePe = [yu( + 28 + /* CommaToken */ + ), _c()]; + function YXe(e, t, n, i, s, o) { + const c = (n ? KXe : eQe)(e, i, s, o); + return or(c, ({ isVariadic: _, parameters: u, prefix: d, suffix: g }) => { + const h = [...t, ...d], S = [...g, ...ZXe(e, s, i)], T = e.getDocumentationComment(i), C = e.getJsDocTags(); + return { isVariadic: _, prefixDisplayParts: h, suffixDisplayParts: S, separatorDisplayParts: ePe, parameters: u, documentation: T, tags: C }; + }); + } + function ZXe(e, t, n) { + return My((i) => { + i.writePunctuation(":"), i.writeSpace(" "); + const s = n.getTypePredicateOfSignature(e); + s ? n.writeTypePredicate( + s, + t, + /*flags*/ + void 0, + i + ) : n.writeType( + n.getReturnTypeOfSignature(e), + t, + /*flags*/ + void 0, + i + ); + }); + } + function KXe(e, t, n, i) { + const s = (e.target || e).typeParameters, o = gS(), c = (s || He).map((u) => tPe(u, t, n, i, o)), _ = e.thisParameter ? [t.symbolToParameterDeclaration(e.thisParameter, n, uL)] : []; + return t.getExpandedParameters(e).map((u) => { + const d = N.createNodeArray([..._, ...or(u, (h) => t.symbolToParameterDeclaration(h, n, uL))]), g = My((h) => { + o.writeList(2576, d, i, h); + }); + return { isVariadic: !1, parameters: c, prefix: [yu( + 30 + /* LessThanToken */ + )], suffix: [yu( + 32 + /* GreaterThanToken */ + ), ...g] }; + }); + } + function eQe(e, t, n, i) { + const s = gS(), o = My((u) => { + if (e.typeParameters && e.typeParameters.length) { + const d = N.createNodeArray(e.typeParameters.map((g) => t.typeParameterToDeclaration(g, n, uL))); + s.writeList(53776, d, i, u); + } + }), c = t.getExpandedParameters(e), _ = t.hasEffectiveRestParameter(e) ? c.length === 1 ? (u) => !0 : (u) => { + var d; + return !!(u.length && ((d = Jn(u[u.length - 1], qm)) == null ? void 0 : d.links.checkFlags) & 32768); + } : (u) => !1; + return c.map((u) => ({ + isVariadic: _(u), + parameters: u.map((d) => tQe(d, t, n, i, s)), + prefix: [...o, yu( + 21 + /* OpenParenToken */ + )], + suffix: [yu( + 22 + /* CloseParenToken */ + )] + })); + } + function tQe(e, t, n, i, s) { + const o = My((u) => { + const d = t.symbolToParameterDeclaration(e, n, uL); + s.writeNode(4, d, i, u); + }), c = t.isOptionalParameter(e.valueDeclaration), _ = qm(e) && !!(e.links.checkFlags & 32768); + return { name: e.name, documentation: e.getDocumentationComment(t), displayParts: o, isOptional: c, isRest: _ }; + } + function tPe(e, t, n, i, s) { + const o = My((c) => { + const _ = t.typeParameterToDeclaration(e, n, uL); + s.writeNode(4, _, i, c); + }); + return { name: e.symbol.name, documentation: e.symbol.getDocumentationComment(t), displayParts: o, isOptional: !1, isRest: !1 }; + } + var kH = {}; + Qa(kH, { + getSmartSelectionRange: () => rQe + }); + function rQe(e, t) { + var n, i; + let s = { + textSpan: Mc(t.getFullStart(), t.getEnd()) + }, o = t; + e: + for (; ; ) { + const u = sQe(o); + if (!u.length) break; + for (let d = 0; d < u.length; d++) { + const g = u[d - 1], h = u[d], S = u[d + 1]; + if (W1( + h, + t, + /*includeJsDoc*/ + !0 + ) > e) + break e; + const T = Rm(oy(t.text, h.end)); + if (T && T.kind === 2 && _(T.pos, T.end), nQe(t, e, h)) { + if (kj(h) && so(o) && !ip(h.getStart(t), h.getEnd(), t) && c(h.getStart(t), h.getEnd()), ms(h) || iD(h) || ux(h) || B5(h) || g && ux(g) || Il(h) && yc(o) || RC(h) && Il(o) || ti(h) && RC(o) && u.length === 1 || nv(h) || Th(h) || lS(h)) { + o = h; + break; + } + if (iD(o) && S && zI(S)) { + const O = h.getFullStart() - 2, j = S.getStart() + 1; + c(O, j); + } + const C = RC(h) && aQe(g) && oQe(S) && !ip(g.getStart(), S.getStart(), t); + let D = C ? g.getEnd() : h.getStart(); + const P = C ? S.getStart() : cQe(t, h); + if (gf(h) && ((n = h.jsDoc) != null && n.length) && c(fa(h.jsDoc).getStart(), P), RC(h)) { + const O = h.getChildren()[0]; + O && gf(O) && ((i = O.jsDoc) != null && i.length) && O.getStart() !== h.pos && (D = Math.min(D, fa(O.jsDoc).getStart())); + } + c(D, P), (Ks(h) || wT(h)) && c(D + 1, P - 1), o = h; + break; + } + if (d === u.length - 1) + break e; + } + } + return s; + function c(u, d) { + if (u !== d) { + const g = Mc(u, d); + (!s || // Skip ranges that are identical to the parent + !l6(g, s.textSpan) && // Skip ranges that don't contain the original position + dY(g, e)) && (s = { textSpan: g, ...s && { parent: s } }); + } + } + function _(u, d) { + c(u, d); + let g = u; + for (; t.text.charCodeAt(g) === 47; ) + g++; + c(g, d); + } + } + function nQe(e, t, n) { + return E.assert(n.pos <= t), t < n.end ? !0 : n.getEnd() === t ? h_(e, t).pos < n.end : !1; + } + var iQe = Ef(oc, nl); + function sQe(e) { + var t; + if (yi(e)) + return VN(e.getChildAt(0).getChildren(), iQe); + if (iS(e)) { + const [n, ...i] = e.getChildren(), s = E.checkDefined(i.pop()); + E.assertEqual( + n.kind, + 19 + /* OpenBraceToken */ + ), E.assertEqual( + s.kind, + 20 + /* CloseBraceToken */ + ); + const o = VN( + i, + (_) => _ === e.readonlyToken || _.kind === 148 || _ === e.questionToken || _.kind === 58 + /* QuestionToken */ + ), c = VN( + o, + ({ kind: _ }) => _ === 23 || _ === 168 || _ === 24 + /* CloseBracketToken */ + ); + return [ + n, + // Pivot on `:` + UN(CH( + c, + ({ kind: _ }) => _ === 59 + /* ColonToken */ + )), + s + ]; + } + if (I_(e)) { + const n = VN(e.getChildren(), (c) => c === e.name || ls(e.modifiers, c)), i = ((t = n[0]) == null ? void 0 : t.kind) === 320 ? n[0] : void 0, s = i ? n.slice(1) : n, o = CH( + s, + ({ kind: c }) => c === 59 + /* ColonToken */ + ); + return i ? [i, UN(o)] : o; + } + if (ji(e)) { + const n = VN(e.getChildren(), (s) => s === e.dotDotDotToken || s === e.name), i = VN(n, (s) => s === n[0] || s === e.questionToken); + return CH( + i, + ({ kind: s }) => s === 64 + /* EqualsToken */ + ); + } + return da(e) ? CH( + e.getChildren(), + ({ kind: n }) => n === 64 + /* EqualsToken */ + ) : e.getChildren(); + } + function VN(e, t) { + const n = []; + let i; + for (const s of e) + t(s) ? (i = i || [], i.push(s)) : (i && (n.push(UN(i)), i = void 0), n.push(s)); + return i && n.push(UN(i)), n; + } + function CH(e, t, n = !0) { + if (e.length < 2) + return e; + const i = rc(e, t); + if (i === -1) + return e; + const s = e.slice(0, i), o = e[i], c = ia(e), _ = n && c.kind === 27, u = e.slice(i + 1, _ ? e.length - 1 : void 0), d = iw([ + s.length ? UN(s) : void 0, + o, + u.length ? UN(u) : void 0 + ]); + return _ ? d.concat(c) : d; + } + function UN(e) { + return E.assertGreaterThanOrEqual(e.length, 1), om(av.createSyntaxList(e), e[0].pos, ia(e).end); + } + function aQe(e) { + const t = e && e.kind; + return t === 19 || t === 23 || t === 21 || t === 286; + } + function oQe(e) { + const t = e && e.kind; + return t === 20 || t === 24 || t === 22 || t === 287; + } + function cQe(e, t) { + switch (t.kind) { + case 341: + case 338: + case 348: + case 346: + case 343: + return e.getLineEndOfPosition(t.getStart()); + default: + return t.getEnd(); + } + } + var D0 = {}; + Qa(D0, { + getSymbolDisplayPartsDocumentationAndSymbolKind: () => uQe, + getSymbolKind: () => nPe, + getSymbolModifiers: () => lQe + }); + var rPe = 70246400; + function nPe(e, t, n) { + const i = iPe(e, t, n); + if (i !== "") + return i; + const s = TC(t); + return s & 32 ? Jo( + t, + 231 + /* ClassExpression */ + ) ? "local class" : "class" : s & 384 ? "enum" : s & 524288 ? "type" : s & 64 ? "interface" : s & 262144 ? "type parameter" : s & 8 ? "enum member" : s & 2097152 ? "alias" : s & 1536 ? "module" : i; + } + function iPe(e, t, n) { + const i = e.getRootSymbols(t); + if (i.length === 1 && fa(i).flags & 8192 && e.getTypeOfSymbolAtLocation(t, n).getNonNullableType().getCallSignatures().length !== 0) + return "method"; + if (e.isUndefinedSymbol(t)) + return "var"; + if (e.isArgumentsSymbol(t)) + return "local var"; + if (n.kind === 110 && ct(n) || Tb(n)) + return "parameter"; + const s = TC(t); + if (s & 3) + return hU(t) ? "parameter" : t.valueDeclaration && iC(t.valueDeclaration) ? "const" : t.valueDeclaration && Xw(t.valueDeclaration) ? "using" : t.valueDeclaration && $w(t.valueDeclaration) ? "await using" : rr(t.declarations, u7) ? "let" : oPe(t) ? "local var" : "var"; + if (s & 16) return oPe(t) ? "local function" : "function"; + if (s & 32768) return "getter"; + if (s & 65536) return "setter"; + if (s & 8192) return "method"; + if (s & 16384) return "constructor"; + if (s & 131072) return "index"; + if (s & 4) { + if (s & 33554432 && t.links.checkFlags & 6) { + const o = rr(e.getRootSymbols(t), (c) => { + if (c.getFlags() & 98311) + return "property"; + }); + return o || (e.getTypeOfSymbolAtLocation(t, n).getCallSignatures().length ? "method" : "property"); + } + return "property"; + } + return ""; + } + function sPe(e) { + if (e.declarations && e.declarations.length) { + const [t, ...n] = e.declarations, i = Dr(n) && y9(t) && ut(n, (o) => !y9(o)) ? 65536 : 0, s = UD(t, i); + if (s) + return s.split(","); + } + return []; + } + function lQe(e, t) { + if (!t) + return ""; + const n = new Set(sPe(t)); + if (t.flags & 2097152) { + const i = e.getAliasedSymbol(t); + i !== t && rr(sPe(i), (s) => { + n.add(s); + }); + } + return t.flags & 16777216 && n.add( + "optional" + /* optionalModifier */ + ), n.size > 0 ? ts(n.values()).join(",") : ""; + } + function aPe(e, t, n, i, s, o, c, _) { + var u; + const d = []; + let g = [], h = []; + const S = TC(t); + let T = c & 1 ? iPe(e, t, s) : "", C = !1; + const D = s.kind === 110 && S7(s) || Tb(s); + let P, O, j = !1; + if (s.kind === 110 && !D) + return { displayParts: [af( + 110 + /* ThisKeyword */ + )], documentation: [], symbolKind: "primitive type", tags: void 0 }; + if (T !== "" || S & 32 || S & 2097152) { + if (T === "getter" || T === "setter") { + const ne = Nn(t.declarations, (pe) => pe.name === s); + if (ne) + switch (ne.kind) { + case 177: + T = "getter"; + break; + case 178: + T = "setter"; + break; + case 172: + T = "accessor"; + break; + default: + E.assertNever(ne); + } + else + T = "property"; + } + let Z; + if (o ?? (o = D ? e.getTypeAtLocation(s) : e.getTypeOfSymbolAtLocation(t, s)), s.parent && s.parent.kind === 211) { + const ne = s.parent.name; + (ne === s || ne && ne.getFullWidth() === 0) && (s = s.parent); + } + let oe; + if (Qd(s) ? oe = s : (LV(s) || WD(s) || s.parent && (ru(s.parent) || Ob(s.parent)) && ps(t.valueDeclaration)) && (oe = s.parent), oe) { + Z = e.getResolvedSignature(oe); + const ne = oe.kind === 214 || Es(oe) && oe.expression.kind === 108, pe = ne ? o.getConstructSignatures() : o.getCallSignatures(); + if (Z && !ls(pe, Z.target) && !ls(pe, Z) && (Z = pe.length ? pe[0] : void 0), Z) { + switch (ne && S & 32 ? (T = "constructor", G(o.symbol, T)) : S & 2097152 ? (T = "alias", ce(T), d.push(_c()), ne && (Z.flags & 4 && (d.push(af( + 128 + /* AbstractKeyword */ + )), d.push(_c())), d.push(af( + 105 + /* NewKeyword */ + )), d.push(_c())), U(t)) : G(t, T), T) { + case "JSX attribute": + case "property": + case "var": + case "const": + case "let": + case "parameter": + case "local var": + d.push(yu( + 59 + /* ColonToken */ + )), d.push(_c()), !(wn(o) & 16) && o.symbol && (Bn(d, XD( + e, + o.symbol, + i, + /*meaning*/ + void 0, + 5 + /* WriteTypeParametersOrArguments */ + )), d.push(u6())), ne && (Z.flags & 4 && (d.push(af( + 128 + /* AbstractKeyword */ + )), d.push(_c())), d.push(af( + 105 + /* NewKeyword */ + )), d.push(_c())), K( + Z, + pe, + 262144 + /* WriteArrowStyleSignature */ + ); + break; + default: + K(Z, pe); + } + C = !0, j = pe.length > 1; + } + } else if (VV(s) && !(S & 98304) || // name of function declaration + s.kind === 137 && s.parent.kind === 176) { + const ne = s.parent; + if (t.declarations && Nn(t.declarations, (fe) => fe === (s.kind === 137 ? ne.parent : ne))) { + const fe = ne.kind === 176 ? o.getNonNullableType().getConstructSignatures() : o.getNonNullableType().getCallSignatures(); + e.isImplementationOfOverload(ne) ? Z = fe[0] : Z = e.getSignatureFromDeclaration(ne), ne.kind === 176 ? (T = "constructor", G(o.symbol, T)) : G( + ne.kind === 179 && !(o.symbol.flags & 2048 || o.symbol.flags & 4096) ? o.symbol : t, + T + ), Z && K(Z, fe), C = !0, j = fe.length > 1; + } + } + } + if (S & 32 && !C && !D && (L(), Jo( + t, + 231 + /* ClassExpression */ + ) ? ce( + "local class" + /* localClassElement */ + ) : d.push(af( + 86 + /* ClassKeyword */ + )), d.push(_c()), U(t), X(t, n)), S & 64 && c & 2 && (V(), d.push(af( + 120 + /* InterfaceKeyword */ + )), d.push(_c()), U(t), X(t, n)), S & 524288 && c & 2 && (V(), d.push(af( + 156 + /* TypeKeyword */ + )), d.push(_c()), U(t), X(t, n), d.push(_c()), d.push($D( + 64 + /* EqualsToken */ + )), d.push(_c()), Bn(d, fN( + e, + s.parent && yd(s.parent) ? e.getTypeAtLocation(s.parent) : e.getDeclaredTypeOfSymbol(t), + i, + 8388608 + /* InTypeAlias */ + ))), S & 384 && (V(), ut(t.declarations, (Z) => rv(Z) && fb(Z)) && (d.push(af( + 87 + /* ConstKeyword */ + )), d.push(_c())), d.push(af( + 94 + /* EnumKeyword */ + )), d.push(_c()), U(t)), S & 1536 && !D) { + V(); + const Z = Jo( + t, + 267 + /* ModuleDeclaration */ + ), oe = Z && Z.name && Z.name.kind === 80; + d.push(af( + oe ? 145 : 144 + /* ModuleKeyword */ + )), d.push(_c()), U(t); + } + if (S & 262144 && c & 2) + if (V(), d.push(yu( + 21 + /* OpenParenToken */ + )), d.push(jf("type parameter")), d.push(yu( + 22 + /* CloseParenToken */ + )), d.push(_c()), U(t), t.parent) + $(), U(t.parent, i), X(t.parent, i); + else { + const Z = Jo( + t, + 168 + /* TypeParameter */ + ); + if (Z === void 0) return E.fail(); + const oe = Z.parent; + if (oe) + if (ps(oe)) { + $(); + const ne = e.getSignatureFromDeclaration(oe); + oe.kind === 180 ? (d.push(af( + 105 + /* NewKeyword */ + )), d.push(_c())) : oe.kind !== 179 && oe.name && U(oe.symbol), Bn(d, bU( + e, + ne, + n, + 32 + /* WriteTypeArgumentsOfSignature */ + )); + } else Rp(oe) && ($(), d.push(af( + 156 + /* TypeKeyword */ + )), d.push(_c()), U(oe.symbol), X(oe.symbol, n)); + } + if (S & 8) { + T = "enum member", G(t, "enum member"); + const Z = (u = t.declarations) == null ? void 0 : u[0]; + if (Z?.kind === 306) { + const oe = e.getConstantValue(Z); + oe !== void 0 && (d.push(_c()), d.push($D( + 64 + /* EqualsToken */ + )), d.push(_c()), d.push(O_( + pZ(oe), + typeof oe == "number" ? 7 : 8 + /* stringLiteral */ + ))); + } + } + if (t.flags & 2097152) { + if (V(), !C || g.length === 0 && h.length === 0) { + const Z = e.getAliasedSymbol(t); + if (Z !== t && Z.declarations && Z.declarations.length > 0) { + const oe = Z.declarations[0], ne = es(oe); + if (ne && !C) { + const pe = a7(oe) && Vn( + oe, + 128 + /* Ambient */ + ), fe = t.name !== "default" && !pe, H = aPe( + e, + Z, + xr(oe), + i, + ne, + o, + c, + fe ? t : Z + ); + d.push(...H.displayParts), d.push(u6()), P = H.documentation, O = H.tags; + } else + P = Z.getContextualDocumentationComment(oe, e), O = Z.getJsDocTags(e); + } + } + if (t.declarations) + switch (t.declarations[0].kind) { + case 270: + d.push(af( + 95 + /* ExportKeyword */ + )), d.push(_c()), d.push(af( + 145 + /* NamespaceKeyword */ + )); + break; + case 277: + d.push(af( + 95 + /* ExportKeyword */ + )), d.push(_c()), d.push(af( + t.declarations[0].isExportEquals ? 64 : 90 + /* DefaultKeyword */ + )); + break; + case 281: + d.push(af( + 95 + /* ExportKeyword */ + )); + break; + default: + d.push(af( + 102 + /* ImportKeyword */ + )); + } + d.push(_c()), U(t), rr(t.declarations, (Z) => { + if (Z.kind === 271) { + const oe = Z; + if (V1(oe)) + d.push(_c()), d.push($D( + 64 + /* EqualsToken */ + )), d.push(_c()), d.push(af( + 149 + /* RequireKeyword */ + )), d.push(yu( + 21 + /* OpenParenToken */ + )), d.push(O_( + sc(o4(oe)), + 8 + /* stringLiteral */ + )), d.push(yu( + 22 + /* CloseParenToken */ + )); + else { + const ne = e.getSymbolAtLocation(oe.moduleReference); + ne && (d.push(_c()), d.push($D( + 64 + /* EqualsToken */ + )), d.push(_c()), U(ne, i)); + } + return !0; + } + }); + } + if (!C) + if (T !== "") { + if (o) { + if (D ? (V(), d.push(af( + 110 + /* ThisKeyword */ + ))) : G(t, T), T === "property" || T === "accessor" || T === "getter" || T === "setter" || T === "JSX attribute" || S & 3 || T === "local var" || T === "index" || T === "using" || T === "await using" || D) { + if (d.push(yu( + 59 + /* ColonToken */ + )), d.push(_c()), o.symbol && o.symbol.flags & 262144 && T !== "index") { + const Z = My((oe) => { + const ne = e.typeParameterToDeclaration(o, i, rPe); + F().writeNode(4, ne, xr(Ki(i)), oe); + }); + Bn(d, Z); + } else + Bn(d, fN(e, o, i)); + if (qm(t) && t.links.target && qm(t.links.target) && t.links.target.links.tupleLabelDeclaration) { + const Z = t.links.target.links.tupleLabelDeclaration; + E.assertNode(Z.name, Re), d.push(_c()), d.push(yu( + 21 + /* OpenParenToken */ + )), d.push(jf(dn(Z.name))), d.push(yu( + 22 + /* CloseParenToken */ + )); + } + } else if (S & 16 || S & 8192 || S & 16384 || S & 131072 || S & 98304 || T === "method") { + const Z = o.getNonNullableType().getCallSignatures(); + Z.length && (K(Z[0], Z), j = Z.length > 1); + } + } + } else + T = nPe(e, t, s); + if (g.length === 0 && !j && (g = t.getContextualDocumentationComment(i, e)), g.length === 0 && S & 4 && t.parent && t.declarations && rr( + t.parent.declarations, + (Z) => Z.kind === 307 + /* SourceFile */ + )) + for (const Z of t.declarations) { + if (!Z.parent || Z.parent.kind !== 226) + continue; + const oe = e.getSymbolAtLocation(Z.parent.right); + if (oe && (g = oe.getDocumentationComment(e), h = oe.getJsDocTags(e), g.length > 0)) + break; + } + if (g.length === 0 && Re(s) && t.valueDeclaration && da(t.valueDeclaration)) { + const Z = t.valueDeclaration, oe = Z.parent, ne = Z.propertyName || Z.name; + if (Re(ne) && If(oe)) { + const pe = Ip(ne), fe = e.getTypeAtLocation(oe); + g = xc(fe.isUnion() ? fe.types : [fe], (H) => { + const ae = H.getProperty(pe); + return ae ? ae.getDocumentationComment(e) : void 0; + }) || He; + } + } + return h.length === 0 && !j && (h = t.getContextualJsDocTags(i, e)), g.length === 0 && P && (g = P), h.length === 0 && O && (h = O), { displayParts: d, documentation: g, symbolKind: T, tags: h.length === 0 ? void 0 : h }; + function F() { + return gS(); + } + function V() { + d.length && d.push(u6()), L(); + } + function L() { + _ && (ce( + "alias" + /* alias */ + ), d.push(_c())); + } + function $() { + d.push(_c()), d.push(af( + 103 + /* InKeyword */ + )), d.push(_c()); + } + function U(Z, oe) { + let ne; + _ && Z === t && (Z = _), T === "index" && (ne = e.getIndexInfosOfIndexSymbol(Z)); + let pe = []; + Z.flags & 131072 && ne ? (Z.parent && (pe = XD(e, Z.parent)), pe.push(yu( + 23 + /* OpenBracketToken */ + )), ne.forEach((fe, H) => { + pe.push(...fN(e, fe.keyType)), H !== ne.length - 1 && (pe.push(_c()), pe.push(yu( + 52 + /* BarToken */ + )), pe.push(_c())); + }), pe.push(yu( + 24 + /* CloseBracketToken */ + ))) : pe = XD( + e, + Z, + oe || n, + /*meaning*/ + void 0, + 7 + /* AllowAnyNodeKind */ + ), Bn(d, pe), t.flags & 16777216 && d.push(yu( + 58 + /* QuestionToken */ + )); + } + function G(Z, oe) { + V(), oe && (ce(oe), Z && !ut(Z.declarations, (ne) => xo(ne) || (po(ne) || tl(ne)) && !ne.name) && (d.push(_c()), U(Z))); + } + function ce(Z) { + switch (Z) { + case "var": + case "function": + case "let": + case "const": + case "constructor": + case "using": + case "await using": + d.push(yU(Z)); + return; + default: + d.push(yu( + 21 + /* OpenParenToken */ + )), d.push(yU(Z)), d.push(yu( + 22 + /* CloseParenToken */ + )); + return; + } + } + function K(Z, oe, ne = 0) { + Bn(d, bU( + e, + Z, + i, + ne | 32 + /* WriteTypeArgumentsOfSignature */ + )), oe.length > 1 && (d.push(_c()), d.push(yu( + 21 + /* OpenParenToken */ + )), d.push($D( + 40 + /* PlusToken */ + )), d.push(O_( + (oe.length - 1).toString(), + 7 + /* numericLiteral */ + )), d.push(_c()), d.push(jf(oe.length === 2 ? "overload" : "overloads")), d.push(yu( + 22 + /* CloseParenToken */ + ))), g = Z.getDocumentationComment(e), h = Z.getJsDocTags(), oe.length > 1 && g.length === 0 && h.length === 0 && (g = oe[0].getDocumentationComment(e), h = oe[0].getJsDocTags().filter((pe) => pe.name !== "deprecated")); + } + function X(Z, oe) { + const ne = My((pe) => { + const fe = e.symbolToTypeParameterDeclarations(Z, oe, rPe); + F().writeList(53776, fe, xr(Ki(oe)), pe); + }); + Bn(d, ne); + } + } + function uQe(e, t, n, i, s, o = hS(s), c) { + return aPe( + e, + t, + n, + i, + s, + /*type*/ + void 0, + o, + c + ); + } + function oPe(e) { + return e.parent ? !1 : rr(e.declarations, (t) => { + if (t.kind === 218) + return !0; + if (t.kind !== 260 && t.kind !== 262) + return !1; + for (let n = t.parent; !pb(n); n = n.parent) + if (n.kind === 307 || n.kind === 268) + return !1; + return !0; + }); + } + var Yr = {}; + Qa(Yr, { + ChangeTracker: () => pQe, + LeadingTriviaOption: () => uPe, + TrailingTriviaOption: () => _Pe, + applyChanges: () => s_e, + assignPositionsToNode: () => wH, + createWriter: () => pPe, + deleteNode: () => Dh, + isThisTypeAnnotatable: () => fQe, + isValidLocationToAddComment: () => dPe + }); + function cPe(e) { + const t = e.__pos; + return E.assert(typeof t == "number"), t; + } + function t_e(e, t) { + E.assert(typeof t == "number"), e.__pos = t; + } + function lPe(e) { + const t = e.__end; + return E.assert(typeof t == "number"), t; + } + function r_e(e, t) { + E.assert(typeof t == "number"), e.__end = t; + } + var uPe = /* @__PURE__ */ ((e) => (e[e.Exclude = 0] = "Exclude", e[e.IncludeAll = 1] = "IncludeAll", e[e.JSDoc = 2] = "JSDoc", e[e.StartLine = 3] = "StartLine", e))(uPe || {}), _Pe = /* @__PURE__ */ ((e) => (e[e.Exclude = 0] = "Exclude", e[e.ExcludeWhitespace = 1] = "ExcludeWhitespace", e[e.Include = 2] = "Include", e))(_Pe || {}); + function fPe(e, t) { + return sa( + e, + t, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + } + function _Qe(e, t) { + let n = t; + for (; n < e.length; ) { + const i = e.charCodeAt(n); + if (Xd(i)) { + n++; + continue; + } + return i === 47; + } + return !1; + } + var qN = { + leadingTriviaOption: 0, + trailingTriviaOption: 0 + /* Exclude */ + }; + function HN(e, t, n, i) { + return { pos: xS(e, t, i), end: T6(e, n, i) }; + } + function xS(e, t, n, i = !1) { + var s, o; + const { leadingTriviaOption: c } = n; + if (c === 0) + return t.getStart(e); + if (c === 3) { + const T = t.getStart(e), C = Jp(T, e); + return tN(t, C) ? C : T; + } + if (c === 2) { + const T = $j(t, e.text); + if (T?.length) + return Jp(T[0].pos, e); + } + const _ = t.getFullStart(), u = t.getStart(e); + if (_ === u) + return u; + const d = Jp(_, e); + if (Jp(u, e) === d) + return c === 1 ? _ : u; + if (i) { + const T = ((s = kg(e.text, _)) == null ? void 0 : s[0]) || ((o = oy(e.text, _)) == null ? void 0 : o[0]); + if (T) + return sa( + e.text, + T.end, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + } + const h = _ > 0 ? 1 : 0; + let S = dy(S4(e, d) + h, e); + return S = fPe(e.text, S), dy(S4(e, S), e); + } + function n_e(e, t, n) { + const { end: i } = t, { trailingTriviaOption: s } = n; + if (s === 2) { + const o = oy(e.text, i); + if (o) { + const c = S4(e, t.end); + for (const _ of o) { + if (_.kind === 2 || S4(e, _.pos) > c) + break; + if (S4(e, _.end) > c) + return sa( + e.text, + _.end, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + } + } + } + } + function T6(e, t, n) { + var i; + const { end: s } = t, { trailingTriviaOption: o } = n; + if (o === 0) + return s; + if (o === 1) { + const u = Hi(oy(e.text, s), kg(e.text, s)), d = (i = u?.[u.length - 1]) == null ? void 0 : i.end; + return d || s; + } + const c = n_e(e, t, n); + if (c) + return c; + const _ = sa( + e.text, + s, + /*stopAfterLineBreak*/ + !0 + ); + return _ !== s && (o === 2 || _u(e.text.charCodeAt(_ - 1))) ? _ : s; + } + function EH(e, t) { + return !!t && !!e.parent && (t.kind === 28 || t.kind === 27 && e.parent.kind === 210); + } + function fQe(e) { + return po(e) || Ac(e); + } + var pQe = class Qme { + /** Public for tests only. Other callers should use `ChangeTracker.with`. */ + constructor(t, n) { + this.newLineCharacter = t, this.formatContext = n, this.changes = [], this.classesWithNodesInsertedAtStart = /* @__PURE__ */ new Map(), this.deletedNodes = []; + } + static fromContext(t) { + return new Qme(k0(t.host, t.formatContext.options), t.formatContext); + } + static with(t, n) { + const i = Qme.fromContext(t); + return n(i), i.getChanges(); + } + pushRaw(t, n) { + E.assertEqual(t.fileName, n.fileName); + for (const i of n.textChanges) + this.changes.push({ + kind: 3, + sourceFile: t, + text: i.newText, + range: XF(i.span) + }); + } + deleteRange(t, n) { + this.changes.push({ kind: 0, sourceFile: t, range: n }); + } + delete(t, n) { + this.deletedNodes.push({ sourceFile: t, node: n }); + } + /** Stop! Consider using `delete` instead, which has logic for deleting nodes from delimited lists. */ + deleteNode(t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + this.deleteRange(t, HN(t, n, n, i)); + } + deleteNodes(t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }, s) { + for (const o of n) { + const c = xS(t, o, i, s), _ = T6(t, o, i); + this.deleteRange(t, { pos: c, end: _ }), s = !!n_e(t, o, i); + } + } + deleteModifier(t, n) { + this.deleteRange(t, { pos: n.getStart(t), end: sa( + t.text, + n.end, + /*stopAfterLineBreak*/ + !0 + ) }); + } + deleteNodeRange(t, n, i, s = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const o = xS(t, n, s), c = T6(t, i, s); + this.deleteRange(t, { pos: o, end: c }); + } + deleteNodeRangeExcludingEnd(t, n, i, s = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const o = xS(t, n, s), c = i === void 0 ? t.text.length : xS(t, i, s); + this.deleteRange(t, { pos: o, end: c }); + } + replaceRange(t, n, i, s = {}) { + this.changes.push({ kind: 1, sourceFile: t, range: n, options: s, node: i }); + } + replaceNode(t, n, i, s = qN) { + this.replaceRange(t, HN(t, n, n, s), i, s); + } + replaceNodeRange(t, n, i, s, o = qN) { + this.replaceRange(t, HN(t, n, i, o), s, o); + } + replaceRangeWithNodes(t, n, i, s = {}) { + this.changes.push({ kind: 2, sourceFile: t, range: n, options: s, nodes: i }); + } + replaceNodeWithNodes(t, n, i, s = qN) { + this.replaceRangeWithNodes(t, HN(t, n, n, s), i, s); + } + replaceNodeWithText(t, n, i) { + this.replaceRangeWithText(t, HN(t, n, n, qN), i); + } + replaceNodeRangeWithNodes(t, n, i, s, o = qN) { + this.replaceRangeWithNodes(t, HN(t, n, i, o), s, o); + } + nodeHasTrailingComment(t, n, i = qN) { + return !!n_e(t, n, i); + } + nextCommaToken(t, n) { + const i = qb(n, n.parent, t); + return i && i.kind === 28 ? i : void 0; + } + replacePropertyAssignment(t, n, i) { + const s = this.nextCommaToken(t, n) ? "" : "," + this.newLineCharacter; + this.replaceNode(t, n, i, { suffix: s }); + } + insertNodeAt(t, n, i, s = {}) { + this.replaceRange(t, np(n), i, s); + } + insertNodesAt(t, n, i, s = {}) { + this.replaceRangeWithNodes(t, np(n), i, s); + } + insertNodeAtTopOfFile(t, n, i) { + this.insertAtTopOfFile(t, n, i); + } + insertNodesAtTopOfFile(t, n, i) { + this.insertAtTopOfFile(t, n, i); + } + insertAtTopOfFile(t, n, i) { + const s = SQe(t), o = { + prefix: s === 0 ? void 0 : this.newLineCharacter, + suffix: (_u(t.text.charCodeAt(s)) ? "" : this.newLineCharacter) + (i ? this.newLineCharacter : "") + }; + ss(n) ? this.insertNodesAt(t, s, n, o) : this.insertNodeAt(t, s, n, o); + } + insertNodesAtEndOfFile(t, n, i) { + this.insertAtEndOfFile(t, n, i); + } + insertAtEndOfFile(t, n, i) { + const s = t.end + 1, o = { + prefix: this.newLineCharacter, + suffix: this.newLineCharacter + (i ? this.newLineCharacter : "") + }; + this.insertNodesAt(t, s, n, o); + } + insertStatementsInNewFile(t, n, i) { + this.newFileChanges || (this.newFileChanges = Kf()), this.newFileChanges.add(t, { oldFile: i, statements: n }); + } + insertFirstParameter(t, n, i) { + const s = ul(n); + s ? this.insertNodeBefore(t, s, i) : this.insertNodeAt(t, n.pos, i); + } + insertNodeBefore(t, n, i, s = !1, o = {}) { + this.insertNodeAt(t, xS(t, n, o), i, this.getOptionsForInsertNodeBefore(n, i, s)); + } + insertNodesBefore(t, n, i, s = !1, o = {}) { + this.insertNodesAt(t, xS(t, n, o), i, this.getOptionsForInsertNodeBefore(n, fa(i), s)); + } + insertModifierAt(t, n, i, s = {}) { + this.insertNodeAt(t, n, N.createToken(i), s); + } + insertModifierBefore(t, n, i) { + return this.insertModifierAt(t, i.getStart(t), n, { suffix: " " }); + } + insertCommentBeforeLine(t, n, i, s) { + const o = dy(n, t), c = wae(t.text, o), _ = dPe(t, c), u = a6(t, _ ? c : i), d = t.text.slice(o, c), g = `${_ ? "" : this.newLineCharacter}//${s}${this.newLineCharacter}${d}`; + this.insertText(t, u.getStart(t), g); + } + insertJsdocCommentBefore(t, n, i) { + const s = n.getStart(t); + if (n.jsDoc) + for (const _ of n.jsDoc) + this.deleteRange(t, { + pos: Jp(_.getStart(t), t), + end: T6( + t, + _, + /*options*/ + {} + ) + }); + const o = i9(t.text, s - 1), c = t.text.slice(o, s); + this.insertNodeAt(t, s, i, { suffix: this.newLineCharacter + c }); + } + createJSDocText(t, n) { + const i = Xs(n.jsDoc, (o) => Gi(o.comment) ? N.createJSDocText(o.comment) : o.comment), s = Rm(n.jsDoc); + return s && ip(s.pos, s.end, t) && Dr(i) === 0 ? void 0 : N.createNodeArray(KM(i, N.createJSDocText(` +`))); + } + replaceJSDocComment(t, n, i) { + this.insertJsdocCommentBefore(t, dQe(n), N.createJSDocComment(this.createJSDocText(t, n), N.createNodeArray(i))); + } + addJSDocTags(t, n, i) { + const s = vE(n.jsDoc, (c) => c.tags), o = i.filter( + (c) => !s.some((_, u) => { + const d = mQe(_, c); + return d && (s[u] = d), !!d; + }) + ); + this.replaceJSDocComment(t, n, [...s, ...o]); + } + filterJSDocTags(t, n, i) { + this.replaceJSDocComment(t, n, Ln(vE(n.jsDoc, (s) => s.tags), i)); + } + replaceRangeWithText(t, n, i) { + this.changes.push({ kind: 3, sourceFile: t, range: n, text: i }); + } + insertText(t, n, i) { + this.replaceRangeWithText(t, np(n), i); + } + /** Prefer this over replacing a node with another that has a type annotation, as it avoids reformatting the other parts of the node. */ + tryInsertTypeAnnotation(t, n, i) { + let s; + if (ps(n)) { + if (s = Ya(n, 22, t), !s) { + if (!xo(n)) return !1; + s = fa(n.parameters); + } + } else + s = (n.kind === 260 ? n.exclamationToken : n.questionToken) ?? n.name; + return this.insertNodeAt(t, s.end, i, { prefix: ": " }), !0; + } + tryInsertThisTypeAnnotation(t, n, i) { + const s = Ya(n, 21, t).getStart(t) + 1, o = n.parameters.length ? ", " : ""; + this.insertNodeAt(t, s, i, { prefix: "this: ", suffix: o }); + } + insertTypeParameters(t, n, i) { + const s = (Ya(n, 21, t) || fa(n.parameters)).getStart(t); + this.insertNodesAt(t, s, i, { prefix: "<", suffix: ">", joiner: ", " }); + } + getOptionsForInsertNodeBefore(t, n, i) { + return hi(t) || fl(t) ? { suffix: i ? this.newLineCharacter + this.newLineCharacter : this.newLineCharacter } : ti(t) ? { suffix: ", " } : ji(t) ? ji(n) ? { suffix: ", " } : {} : Ks(t) && oc(t.parent) || fm(t) ? { suffix: ", " } : Yu(t) ? { suffix: "," + (i ? this.newLineCharacter : " ") } : E.failBadSyntaxKind(t); + } + insertNodeAtConstructorStart(t, n, i) { + const s = ul(n.body.statements); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [i, ...n.body.statements]) : this.insertNodeBefore(t, s, i); + } + insertNodeAtConstructorStartAfterSuperCall(t, n, i) { + const s = Nn(n.body.statements, (o) => Pl(o) && G2(o.expression)); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [...n.body.statements, i]) : this.insertNodeAfter(t, s, i); + } + insertNodeAtConstructorEnd(t, n, i) { + const s = Bo(n.body.statements); + !s || !n.body.multiLine ? this.replaceConstructorBody(t, n, [...n.body.statements, i]) : this.insertNodeAfter(t, s, i); + } + replaceConstructorBody(t, n, i) { + this.replaceNode(t, n.body, N.createBlock( + i, + /*multiLine*/ + !0 + )); + } + insertNodeAtEndOfScope(t, n, i) { + const s = xS(t, n.getLastToken(), {}); + this.insertNodeAt(t, s, i, { + prefix: _u(t.text.charCodeAt(n.getLastToken().pos)) ? this.newLineCharacter : this.newLineCharacter + this.newLineCharacter, + suffix: this.newLineCharacter + }); + } + insertMemberAtStart(t, n, i) { + this.insertNodeAtStartWorker(t, n, i); + } + insertNodeAtObjectStart(t, n, i) { + this.insertNodeAtStartWorker(t, n, i); + } + insertNodeAtStartWorker(t, n, i) { + const s = this.guessIndentationFromExistingMembers(t, n) ?? this.computeIndentationForNewMember(t, n); + this.insertNodeAt(t, DH(n).pos, i, this.getInsertNodeAtStartInsertOptions(t, n, s)); + } + /** + * Tries to guess the indentation from the existing members of a class/interface/object. All members must be on + * new lines and must share the same indentation. + */ + guessIndentationFromExistingMembers(t, n) { + let i, s = n; + for (const o of DH(n)) { + if (Q7(s, o, t)) + return; + const c = o.getStart(t), _ = Hc.SmartIndenter.findFirstNonWhitespaceColumn(Jp(c, t), c, t, this.formatContext.options); + if (i === void 0) + i = _; + else if (_ !== i) + return; + s = o; + } + return i; + } + computeIndentationForNewMember(t, n) { + const i = n.getStart(t); + return Hc.SmartIndenter.findFirstNonWhitespaceColumn(Jp(i, t), i, t, this.formatContext.options) + (this.formatContext.options.indentSize ?? 4); + } + getInsertNodeAtStartInsertOptions(t, n, i) { + const o = DH(n).length === 0, c = Kp(this.classesWithNodesInsertedAtStart, ja(n), { node: n, sourceFile: t }), _ = Gs(n) && (!Ap(t) || !o), u = Gs(n) && Ap(t) && o && !c; + return { + indentation: i, + prefix: (u ? "," : "") + this.newLineCharacter, + suffix: _ ? "," : Vl(n) && o ? ";" : "" + }; + } + insertNodeAfterComma(t, n, i) { + const s = this.insertNodeAfterWorker(t, this.nextCommaToken(t, n) || n, i); + this.insertNodeAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAfter(t, n, i) { + const s = this.insertNodeAfterWorker(t, n, i); + this.insertNodeAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAtEndOfList(t, n, i) { + this.insertNodeAt(t, n.end, i, { prefix: ", " }); + } + insertNodesAfter(t, n, i) { + const s = this.insertNodeAfterWorker(t, n, fa(i)); + this.insertNodesAt(t, s, i, this.getInsertNodeAfterOptions(t, n)); + } + insertNodeAfterWorker(t, n, i) { + return TQe(n, i) && t.text.charCodeAt(n.end - 1) !== 59 && this.replaceRange(t, np(n.end), N.createToken( + 27 + /* SemicolonToken */ + )), T6(t, n, {}); + } + getInsertNodeAfterOptions(t, n) { + const i = this.getInsertNodeAfterOptionsWorker(n); + return { + ...i, + prefix: n.end === t.end && hi(n) ? i.prefix ? ` +${i.prefix}` : ` +` : i.prefix + }; + } + getInsertNodeAfterOptionsWorker(t) { + switch (t.kind) { + case 263: + case 267: + return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; + case 260: + case 11: + case 80: + return { prefix: ", " }; + case 303: + return { suffix: "," + this.newLineCharacter }; + case 95: + return { prefix: " " }; + case 169: + return {}; + default: + return E.assert(hi(t) || WI(t)), { suffix: this.newLineCharacter }; + } + } + insertName(t, n, i) { + if (E.assert(!n.name), n.kind === 219) { + const s = Ya(n, 39, t), o = Ya(n, 21, t); + o ? (this.insertNodesAt(t, o.getStart(t), [N.createToken( + 100 + /* FunctionKeyword */ + ), N.createIdentifier(i)], { joiner: " " }), Dh(this, t, s)) : (this.insertText(t, fa(n.parameters).getStart(t), `function ${i}(`), this.replaceRange(t, s, N.createToken( + 22 + /* CloseParenToken */ + ))), n.body.kind !== 241 && (this.insertNodesAt(t, n.body.getStart(t), [N.createToken( + 19 + /* OpenBraceToken */ + ), N.createToken( + 107 + /* ReturnKeyword */ + )], { joiner: " ", suffix: " " }), this.insertNodesAt(t, n.body.end, [N.createToken( + 27 + /* SemicolonToken */ + ), N.createToken( + 20 + /* CloseBraceToken */ + )], { joiner: " " })); + } else { + const s = Ya(n, n.kind === 218 ? 100 : 86, t).end; + this.insertNodeAt(t, s, N.createIdentifier(i), { prefix: " " }); + } + } + insertExportModifier(t, n) { + this.insertText(t, n.getStart(t), "export "); + } + insertImportSpecifierAtIndex(t, n, i, s) { + const o = i.elements[s - 1]; + o ? this.insertNodeInListAfter(t, o, n) : this.insertNodeBefore( + t, + i.elements[0], + n, + !ip(i.elements[0].getStart(), i.parent.parent.getStart(), t) + ); + } + /** + * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range, + * i.e. arguments in arguments lists, parameters in parameter lists etc. + * Note that separators are part of the node in statements and class elements. + */ + insertNodeInListAfter(t, n, i, s = Hc.SmartIndenter.getContainingList(n, t)) { + if (!s) { + E.fail("node is not a list element"); + return; + } + const o = rC(s, n); + if (o < 0) + return; + const c = n.getEnd(); + if (o !== s.length - 1) { + const _ = Ei(t, n.end); + if (_ && EH(n, _)) { + const u = s[o + 1], d = fPe(t.text, u.getFullStart()), g = `${Ws(_.kind)}${t.text.substring(_.end, d)}`; + this.insertNodesAt(t, d, [i], { suffix: g }); + } + } else { + const _ = n.getStart(t), u = Jp(_, t); + let d, g = !1; + if (s.length === 1) + d = 28; + else { + const h = sl(n.pos, t); + d = EH(n, h) ? h.kind : 28, g = Jp(s[o - 1].getStart(t), t) !== u; + } + if ((_Qe(t.text, n.end) || !ip(s.pos, s.end, t)) && (g = !0), g) { + this.replaceRange(t, np(c), N.createToken(d)); + const h = Hc.SmartIndenter.findFirstNonWhitespaceColumn(u, _, t, this.formatContext.options); + let S = sa( + t.text, + c, + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !1 + ); + for (; S !== c && _u(t.text.charCodeAt(S - 1)); ) + S--; + this.replaceRange(t, np(S), i, { indentation: h, prefix: this.newLineCharacter }); + } else + this.replaceRange(t, np(c), i, { prefix: `${Ws(d)} ` }); + } + } + parenthesizeExpression(t, n) { + this.replaceRange(t, oJ(n), N.createParenthesizedExpression(n)); + } + finishClassesWithNodesInsertedAtStart() { + this.classesWithNodesInsertedAtStart.forEach(({ node: t, sourceFile: n }) => { + const [i, s] = hQe(t, n); + if (i !== void 0 && s !== void 0) { + const o = DH(t).length === 0, c = ip(i, s, n); + o && c && i !== s - 1 && this.deleteRange(n, np(i, s - 1)), c && this.insertText(n, s - 1, this.newLineCharacter); + } + }); + } + finishDeleteDeclarations() { + const t = /* @__PURE__ */ new Set(); + for (const { sourceFile: n, node: i } of this.deletedNodes) + this.deletedNodes.some((s) => s.sourceFile === n && tae(s.node, i)) || (ss(i) ? this.deleteRange(n, cJ(n, i)) : a_e.deleteDeclaration(this, t, n, i)); + t.forEach((n) => { + const i = n.getSourceFile(), s = Hc.SmartIndenter.getContainingList(n, i); + if (n !== ia(s)) return; + const o = cI(s, (c) => !t.has(c), s.length - 2); + o !== -1 && this.deleteRange(i, { pos: s[o].end, end: i_e(i, s[o + 1]) }); + }); + } + /** + * Note: after calling this, the TextChanges object must be discarded! + * @param validate only for tests + * The reason we must validate as part of this method is that `getNonFormattedText` changes the node's positions, + * so we can only call this once and can't get the non-formatted text separately. + */ + getChanges(t) { + this.finishDeleteDeclarations(), this.finishClassesWithNodesInsertedAtStart(); + const n = PH.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, t); + return this.newFileChanges && this.newFileChanges.forEach((i, s) => { + n.push(PH.newFileChanges(s, i, this.newLineCharacter, this.formatContext)); + }), n; + } + createNewFile(t, n, i) { + this.insertStatementsInNewFile(n, i, t); + } + }; + function dQe(e) { + if (e.kind !== 219) + return e; + const t = e.parent.kind === 172 ? e.parent : e.parent.parent; + return t.jsDoc = e.jsDoc, t; + } + function mQe(e, t) { + if (e.kind === t.kind) + switch (e.kind) { + case 341: { + const n = e, i = t; + return Re(n.name) && Re(i.name) && n.name.escapedText === i.name.escapedText ? N.createJSDocParameterTag( + /*tagName*/ + void 0, + i.name, + /*isBracketed*/ + !1, + i.typeExpression, + i.isNameFirst, + n.comment + ) : void 0; + } + case 342: + return N.createJSDocReturnTag( + /*tagName*/ + void 0, + t.typeExpression, + e.comment + ); + case 344: + return N.createJSDocTypeTag( + /*tagName*/ + void 0, + t.typeExpression, + e.comment + ); + } + } + function i_e(e, t) { + return sa( + e.text, + xS(e, t, { + leadingTriviaOption: 1 + /* IncludeAll */ + }), + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + } + function gQe(e, t, n, i) { + const s = i_e(e, i); + if (n === void 0 || ip(T6(e, t, {}), s, e)) + return s; + const o = sl(i.getStart(e), e); + if (EH(t, o)) { + const c = sl(t.getStart(e), e); + if (EH(n, c)) { + const _ = sa( + e.text, + o.getEnd(), + /*stopAfterLineBreak*/ + !0, + /*stopAtComments*/ + !0 + ); + if (ip(c.getStart(e), o.getStart(e), e)) + return _u(e.text.charCodeAt(_ - 1)) ? _ - 1 : _; + if (_u(e.text.charCodeAt(_))) + return _; + } + } + return s; + } + function hQe(e, t) { + const n = Ya(e, 19, t), i = Ya(e, 20, t); + return [n?.end, i?.end]; + } + function DH(e) { + return Gs(e) ? e.properties : e.members; + } + var PH; + ((e) => { + function t(_, u, d, g) { + return Ii(TE(_, (h) => h.sourceFile.path), (h) => { + const S = h[0].sourceFile, T = Sg(h, (D, P) => D.range.pos - P.range.pos || D.range.end - P.range.end); + for (let D = 0; D < T.length - 1; D++) + E.assert(T[D].range.end <= T[D + 1].range.pos, "Changes overlap", () => `${JSON.stringify(T[D].range)} and ${JSON.stringify(T[D + 1].range)}`); + const C = Ii(T, (D) => { + const P = Fy(D.range), O = D.kind === 1 ? xr(Zo(D.node)) ?? D.sourceFile : D.kind === 2 ? xr(Zo(D.nodes[0])) ?? D.sourceFile : D.sourceFile, j = s(D, O, S, u, d, g); + if (!(P.length === j.length && zae(O.text, j, P.start))) + return oN(P, j); + }); + return C.length > 0 ? { fileName: S.fileName, textChanges: C } : void 0; + }); + } + e.getTextChangesFromChanges = t; + function n(_, u, d, g) { + const h = i(g5(_), u, d, g); + return { fileName: _, textChanges: [oN(jl(0, 0), h)], isNewFile: !0 }; + } + e.newFileChanges = n; + function i(_, u, d, g) { + const h = Xs(u, (C) => C.statements.map((D) => D === 4 ? "" : c(D, C.oldFile, d).text)).join(d), S = Cx( + "any file name", + h, + { + languageVersion: 99, + jsDocParsingMode: 1 + /* ParseNone */ + }, + /*setParentNodes*/ + !0, + _ + ), T = Hc.formatDocument(S, g); + return s_e(h, T) + d; + } + e.newFileChangesWorker = i; + function s(_, u, d, g, h, S) { + var T; + if (_.kind === 0) + return ""; + if (_.kind === 3) + return _.text; + const { options: C = {}, range: { pos: D } } = _, P = (F) => o(F, u, d, D, C, g, h, S), O = _.kind === 2 ? _.nodes.map((F) => Jk(P(F), g)).join(((T = _.options) == null ? void 0 : T.joiner) || g) : P(_.node), j = C.indentation !== void 0 || Jp(D, u) === D ? O : O.replace(/^\s+/, ""); + return (C.prefix || "") + j + (!C.suffix || nc(j, C.suffix) ? "" : C.suffix); + } + function o(_, u, d, g, { indentation: h, prefix: S, delta: T }, C, D, P) { + const { node: O, text: j } = c(_, u, C); + P && P(O, j); + const F = b9(D, u), V = h !== void 0 ? h : Hc.SmartIndenter.getIndentation(g, d, F, S === C || Jp(g, u) === g); + T === void 0 && (T = Hc.SmartIndenter.shouldIndentChildNode(F, _) && F.indentSize || 0); + const L = { + text: j, + getLineAndCharacterOfPosition(U) { + return Vs(this, U); + } + }, $ = Hc.formatNodeGivenIndentation(O, L, u.languageVariant, V, T, { ...D, options: F }); + return s_e(j, $); + } + function c(_, u, d) { + const g = pPe(d), h = bN(d); + return Iy({ + newLine: h, + neverAsciiEscape: !0, + preserveSourceNewlines: !0, + terminateUnterminatedLiterals: !0 + }, g).writeNode(4, _, u, g), { text: g.getText(), node: wH(_) }; + } + e.getNonformattedText = c; + })(PH || (PH = {})); + function s_e(e, t) { + for (let n = t.length - 1; n >= 0; n--) { + const { span: i, newText: s } = t[n]; + e = `${e.substring(0, i.start)}${s}${e.substring(wc(i))}`; + } + return e; + } + function yQe(e) { + return sa(e, 0) === e.length; + } + var vQe = { + ...RA, + factory: $3( + RA.factory.flags | 1, + RA.factory.baseFactory + ) + }; + function wH(e) { + const t = gr(e, wH, vQe, bQe, wH), n = oo(t) ? t : Object.create(t); + return om(n, cPe(e), lPe(e)), n; + } + function bQe(e, t, n, i, s) { + const o = Ar(e, t, n, i, s); + if (!o) + return o; + E.assert(e); + const c = o === e ? N.createNodeArray(o.slice(0)) : o; + return om(c, cPe(e), lPe(e)), c; + } + function pPe(e) { + let t = 0; + const n = P3(e), i = (H) => { + H && t_e(H, t); + }, s = (H) => { + H && r_e(H, t); + }, o = (H) => { + H && t_e(H, t); + }, c = (H) => { + H && r_e(H, t); + }, _ = (H) => { + H && t_e(H, t); + }, u = (H) => { + H && r_e(H, t); + }; + function d(H, ae) { + if (ae || !yQe(H)) { + t = n.getTextPos(); + let le = 0; + for (; xg(H.charCodeAt(H.length - le - 1)); ) + le++; + t -= le; + } + } + function g(H) { + n.write(H), d( + H, + /*force*/ + !1 + ); + } + function h(H) { + n.writeComment(H); + } + function S(H) { + n.writeKeyword(H), d( + H, + /*force*/ + !1 + ); + } + function T(H) { + n.writeOperator(H), d( + H, + /*force*/ + !1 + ); + } + function C(H) { + n.writePunctuation(H), d( + H, + /*force*/ + !1 + ); + } + function D(H) { + n.writeTrailingSemicolon(H), d( + H, + /*force*/ + !1 + ); + } + function P(H) { + n.writeParameter(H), d( + H, + /*force*/ + !1 + ); + } + function O(H) { + n.writeProperty(H), d( + H, + /*force*/ + !1 + ); + } + function j(H) { + n.writeSpace(H), d( + H, + /*force*/ + !1 + ); + } + function F(H) { + n.writeStringLiteral(H), d( + H, + /*force*/ + !1 + ); + } + function V(H, ae) { + n.writeSymbol(H, ae), d( + H, + /*force*/ + !1 + ); + } + function L(H) { + n.writeLine(H); + } + function $() { + n.increaseIndent(); + } + function U() { + n.decreaseIndent(); + } + function G() { + return n.getText(); + } + function ce(H) { + n.rawWrite(H), d( + H, + /*force*/ + !1 + ); + } + function K(H) { + n.writeLiteral(H), d( + H, + /*force*/ + !0 + ); + } + function X() { + return n.getTextPos(); + } + function Z() { + return n.getLine(); + } + function oe() { + return n.getColumn(); + } + function ne() { + return n.getIndent(); + } + function pe() { + return n.isAtStartOfLine(); + } + function fe() { + n.clear(), t = 0; + } + return { + onBeforeEmitNode: i, + onAfterEmitNode: s, + onBeforeEmitNodeArray: o, + onAfterEmitNodeArray: c, + onBeforeEmitToken: _, + onAfterEmitToken: u, + write: g, + writeComment: h, + writeKeyword: S, + writeOperator: T, + writePunctuation: C, + writeTrailingSemicolon: D, + writeParameter: P, + writeProperty: O, + writeSpace: j, + writeStringLiteral: F, + writeSymbol: V, + writeLine: L, + increaseIndent: $, + decreaseIndent: U, + getText: G, + rawWrite: ce, + writeLiteral: K, + getTextPos: X, + getLine: Z, + getColumn: oe, + getIndent: ne, + isAtStartOfLine: pe, + hasTrailingComment: () => n.hasTrailingComment(), + hasTrailingWhitespace: () => n.hasTrailingWhitespace(), + clear: fe + }; + } + function SQe(e) { + let t; + for (const d of e.statements) + if (Kd(d)) + t = d; + else + break; + let n = 0; + const i = e.text; + if (t) + return n = t.end, u(), n; + const s = NI(i); + s !== void 0 && (n = s.length, u()); + const o = kg(i, n); + if (!o) return n; + let c, _; + for (const d of o) { + if (d.kind === 3) { + if (i7(i, d.pos)) { + c = { range: d, pinnedOrTripleSlash: !0 }; + continue; + } + } else if (Oj(i, d.pos, d.end)) { + c = { range: d, pinnedOrTripleSlash: !0 }; + continue; + } + if (c) { + if (c.pinnedOrTripleSlash) break; + const g = e.getLineAndCharacterOfPosition(d.pos).line, h = e.getLineAndCharacterOfPosition(c.range.end).line; + if (g >= h + 2) break; + } + if (e.statements.length) { + _ === void 0 && (_ = e.getLineAndCharacterOfPosition(e.statements[0].getStart()).line); + const g = e.getLineAndCharacterOfPosition(d.end).line; + if (_ < g + 2) break; + } + c = { range: d, pinnedOrTripleSlash: !1 }; + } + return c && (n = c.range.end, u()), n; + function u() { + if (n < i.length) { + const d = i.charCodeAt(n); + _u(d) && (n++, n < i.length && d === 13 && i.charCodeAt(n) === 10 && n++); + } + } + } + function dPe(e, t) { + return !T0(e, t) && !Mx(e, t) && !$V(e, t) && !oae(e, t); + } + function TQe(e, t) { + return (I_(e) || rs(e)) && WI(t) && t.name.kind === 167 || jw(e) && jw(t); + } + var a_e; + ((e) => { + function t(o, c, _, u) { + switch (u.kind) { + case 169: { + const T = u.parent; + xo(T) && T.parameters.length === 1 && !Ya(T, 21, _) ? o.replaceNodeWithText(_, u, "()") : GN(o, c, _, u); + break; + } + case 272: + case 271: + const d = _.imports.length && u === fa(_.imports).parent || u === Nn(_.statements, IT); + Dh(o, _, u, { + leadingTriviaOption: d ? 0 : gf(u) ? 2 : 3 + /* StartLine */ + }); + break; + case 208: + const g = u.parent; + g.kind === 207 && u !== ia(g.elements) ? Dh(o, _, u) : GN(o, c, _, u); + break; + case 260: + s(o, c, _, u); + break; + case 168: + GN(o, c, _, u); + break; + case 276: + const S = u.parent; + S.elements.length === 1 ? i(o, _, S) : GN(o, c, _, u); + break; + case 274: + i(o, _, u); + break; + case 27: + Dh(o, _, u, { + trailingTriviaOption: 0 + /* Exclude */ + }); + break; + case 100: + Dh(o, _, u, { + leadingTriviaOption: 0 + /* Exclude */ + }); + break; + case 263: + case 262: + Dh(o, _, u, { + leadingTriviaOption: gf(u) ? 2 : 3 + /* StartLine */ + }); + break; + default: + u.parent ? kd(u.parent) && u.parent.name === u ? n(o, _, u.parent) : Es(u.parent) && ls(u.parent.arguments, u) ? GN(o, c, _, u) : Dh(o, _, u) : Dh(o, _, u); + } + } + e.deleteDeclaration = t; + function n(o, c, _) { + if (!_.namedBindings) + Dh(o, c, _.parent); + else { + const u = _.name.getStart(c), d = Ei(c, _.name.end); + if (d && d.kind === 28) { + const g = sa( + c.text, + d.end, + /*stopAfterLineBreak*/ + !1, + /*stopAtComments*/ + !0 + ); + o.deleteRange(c, { pos: u, end: g }); + } else + Dh(o, c, _.name); + } + } + function i(o, c, _) { + if (_.parent.name) { + const u = E.checkDefined(Ei(c, _.pos - 1)); + o.deleteRange(c, { pos: u.getStart(c), end: _.end }); + } else { + const u = $1( + _, + 272 + /* ImportDeclaration */ + ); + Dh(o, c, u); + } + } + function s(o, c, _, u) { + const { parent: d } = u; + if (d.kind === 299) { + o.deleteNodeRange(_, Ya(d, 21, _), Ya(d, 22, _)); + return; + } + if (d.declarations.length !== 1) { + GN(o, c, _, u); + return; + } + const g = d.parent; + switch (g.kind) { + case 250: + case 249: + o.replaceNode(_, u, N.createObjectLiteralExpression()); + break; + case 248: + Dh(o, _, d); + break; + case 243: + Dh(o, _, g, { + leadingTriviaOption: gf(g) ? 2 : 3 + /* StartLine */ + }); + break; + default: + E.assertNever(g); + } + } + })(a_e || (a_e = {})); + function Dh(e, t, n, i = { + leadingTriviaOption: 1 + /* IncludeAll */ + }) { + const s = xS(t, n, i), o = T6(t, n, i); + e.deleteRange(t, { pos: s, end: o }); + } + function GN(e, t, n, i) { + const s = E.checkDefined(Hc.SmartIndenter.getContainingList(i, n)), o = rC(s, i); + if (E.assert(o !== -1), s.length === 1) { + Dh(e, n, i); + return; + } + E.assert(!t.has(i), "Deleting a node twice"), t.add(i), e.deleteRange(n, { + pos: i_e(n, i), + end: o === s.length - 1 ? T6(n, i, {}) : gQe(n, i, s[o - 1], s[o + 1]) + }); + } + var Hc = {}; + Qa(Hc, { + FormattingContext: () => gPe, + FormattingRequestKind: () => mPe, + RuleAction: () => hPe, + RuleFlags: () => yPe, + SmartIndenter: () => vm, + anyContext: () => AH, + createTextRangeWithKind: () => FH, + formatDocument: () => pYe, + formatNodeGivenIndentation: () => bYe, + formatOnClosingCurly: () => fYe, + formatOnEnter: () => lYe, + formatOnOpeningCurly: () => _Ye, + formatOnSemicolon: () => uYe, + formatSelection: () => dYe, + getAllRules: () => vPe, + getFormatContext: () => tYe, + getFormattingScanner: () => o_e, + getIndentationString: () => S_e, + getRangeOfEnclosingComment: () => UPe + }); + var mPe = /* @__PURE__ */ ((e) => (e[e.FormatDocument = 0] = "FormatDocument", e[e.FormatSelection = 1] = "FormatSelection", e[e.FormatOnEnter = 2] = "FormatOnEnter", e[e.FormatOnSemicolon = 3] = "FormatOnSemicolon", e[e.FormatOnOpeningCurlyBrace = 4] = "FormatOnOpeningCurlyBrace", e[e.FormatOnClosingCurlyBrace = 5] = "FormatOnClosingCurlyBrace", e))(mPe || {}), gPe = class { + constructor(e, t, n) { + this.sourceFile = e, this.formattingRequestKind = t, this.options = n; + } + updateContext(e, t, n, i, s) { + this.currentTokenSpan = E.checkDefined(e), this.currentTokenParent = E.checkDefined(t), this.nextTokenSpan = E.checkDefined(n), this.nextTokenParent = E.checkDefined(i), this.contextNode = E.checkDefined(s), this.contextNodeAllOnSameLine = void 0, this.nextNodeAllOnSameLine = void 0, this.tokensAreOnSameLine = void 0, this.contextNodeBlockIsOnOneLine = void 0, this.nextNodeBlockIsOnOneLine = void 0; + } + ContextNodeAllOnSameLine() { + return this.contextNodeAllOnSameLine === void 0 && (this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode)), this.contextNodeAllOnSameLine; + } + NextNodeAllOnSameLine() { + return this.nextNodeAllOnSameLine === void 0 && (this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent)), this.nextNodeAllOnSameLine; + } + TokensAreOnSameLine() { + if (this.tokensAreOnSameLine === void 0) { + const e = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line, t = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; + this.tokensAreOnSameLine = e === t; + } + return this.tokensAreOnSameLine; + } + ContextNodeBlockIsOnOneLine() { + return this.contextNodeBlockIsOnOneLine === void 0 && (this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode)), this.contextNodeBlockIsOnOneLine; + } + NextNodeBlockIsOnOneLine() { + return this.nextNodeBlockIsOnOneLine === void 0 && (this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent)), this.nextNodeBlockIsOnOneLine; + } + NodeIsOnOneLine(e) { + const t = this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line, n = this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line; + return t === n; + } + BlockIsOnOneLine(e) { + const t = Ya(e, 19, this.sourceFile), n = Ya(e, 20, this.sourceFile); + if (t && n) { + const i = this.sourceFile.getLineAndCharacterOfPosition(t.getEnd()).line, s = this.sourceFile.getLineAndCharacterOfPosition(n.getStart(this.sourceFile)).line; + return i === s; + } + return !1; + } + }, xQe = Eg( + 99, + /*skipTrivia*/ + !1, + 0 + /* Standard */ + ), kQe = Eg( + 99, + /*skipTrivia*/ + !1, + 1 + /* JSX */ + ); + function o_e(e, t, n, i, s) { + const o = t === 1 ? kQe : xQe; + o.setText(e), o.resetTokenState(n); + let c = !0, _, u, d, g, h; + const S = s({ + advance: T, + readTokenInfo: L, + readEOFTokenRange: U, + isOnToken: G, + isOnEOF: ce, + getCurrentLeadingTrivia: () => _, + lastTrailingTriviaWasNewLine: () => c, + skipToEndOf: X, + skipToStartOf: Z, + getTokenFullStart: () => h?.token.pos ?? o.getTokenStart(), + getStartPos: () => h?.token.pos ?? o.getTokenStart() + }); + return h = void 0, o.setText(void 0), S; + function T() { + h = void 0, o.getTokenFullStart() !== n ? c = !!u && ia(u).kind === 4 : o.scan(), _ = void 0, u = void 0; + let ne = o.getTokenFullStart(); + for (; ne < i; ) { + const pe = o.getToken(); + if (!mC(pe)) + break; + o.scan(); + const fe = { + pos: ne, + end: o.getTokenFullStart(), + kind: pe + }; + ne = o.getTokenFullStart(), _ = Tr(_, fe); + } + d = o.getTokenFullStart(); + } + function C(oe) { + switch (oe.kind) { + case 34: + case 72: + case 73: + case 50: + case 49: + return !0; + } + return !1; + } + function D(oe) { + if (oe.parent) + switch (oe.parent.kind) { + case 291: + case 286: + case 287: + case 285: + return qu(oe.kind) || oe.kind === 80; + } + return !1; + } + function P(oe) { + return cx(oe) || jg(oe) && h?.token.kind === 12; + } + function O(oe) { + return oe.kind === 14; + } + function j(oe) { + return oe.kind === 17 || oe.kind === 18; + } + function F(oe) { + return oe.parent && dm(oe.parent) && oe.parent.initializer === oe; + } + function V(oe) { + return oe === 44 || oe === 69; + } + function L(oe) { + E.assert(G()); + const ne = C(oe) ? 1 : O(oe) ? 2 : j(oe) ? 3 : D(oe) ? 4 : P(oe) ? 5 : F(oe) ? 6 : 0; + if (h && ne === g) + return K(h, oe); + o.getTokenFullStart() !== d && (E.assert(h !== void 0), o.resetTokenState(d), o.scan()); + let pe = $(oe, ne); + const fe = FH( + o.getTokenFullStart(), + o.getTokenEnd(), + pe + ); + for (u && (u = void 0); o.getTokenFullStart() < i && (pe = o.scan(), !!mC(pe)); ) { + const H = FH( + o.getTokenFullStart(), + o.getTokenEnd(), + pe + ); + if (u || (u = []), u.push(H), pe === 4) { + o.scan(); + break; + } + } + return h = { leadingTrivia: _, trailingTrivia: u, token: fe }, K(h, oe); + } + function $(oe, ne) { + const pe = o.getToken(); + switch (g = 0, ne) { + case 1: + if (pe === 32) { + g = 1; + const fe = o.reScanGreaterToken(); + return E.assert(oe.kind === fe), fe; + } + break; + case 2: + if (V(pe)) { + g = 2; + const fe = o.reScanSlashToken(); + return E.assert(oe.kind === fe), fe; + } + break; + case 3: + if (pe === 20) + return g = 3, o.reScanTemplateToken( + /*isTaggedTemplate*/ + !1 + ); + break; + case 4: + return g = 4, o.scanJsxIdentifier(); + case 5: + return g = 5, o.reScanJsxToken( + /*allowMultilineJsxText*/ + !1 + ); + case 6: + return g = 6, o.reScanJsxAttributeValue(); + case 0: + break; + default: + E.assertNever(ne); + } + return pe; + } + function U() { + return E.assert(ce()), FH( + o.getTokenFullStart(), + o.getTokenEnd(), + 1 + /* EndOfFileToken */ + ); + } + function G() { + const oe = h ? h.token.kind : o.getToken(); + return oe !== 1 && !mC(oe); + } + function ce() { + return (h ? h.token.kind : o.getToken()) === 1; + } + function K(oe, ne) { + return CT(ne) && oe.token.kind !== ne.kind && (oe.token.kind = ne.kind), oe; + } + function X(oe) { + o.resetTokenState(oe.end), d = o.getTokenFullStart(), g = void 0, h = void 0, c = !1, _ = void 0, u = void 0; + } + function Z(oe) { + o.resetTokenState(oe.pos), d = o.getTokenFullStart(), g = void 0, h = void 0, c = !1, _ = void 0, u = void 0; + } + } + var AH = He, hPe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.StopProcessingSpaceActions = 1] = "StopProcessingSpaceActions", e[e.StopProcessingTokenActions = 2] = "StopProcessingTokenActions", e[e.InsertSpace = 4] = "InsertSpace", e[e.InsertNewLine = 8] = "InsertNewLine", e[e.DeleteSpace = 16] = "DeleteSpace", e[e.DeleteToken = 32] = "DeleteToken", e[e.InsertTrailingSemicolon = 64] = "InsertTrailingSemicolon", e[e.StopAction = 3] = "StopAction", e[e.ModifySpaceAction = 28] = "ModifySpaceAction", e[e.ModifyTokenAction = 96] = "ModifyTokenAction", e))(hPe || {}), yPe = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.CanDeleteNewLines = 1] = "CanDeleteNewLines", e))(yPe || {}); + function vPe() { + const e = []; + for (let $ = 0; $ <= 165; $++) + $ !== 1 && e.push($); + function t(...$) { + return { tokens: e.filter((U) => !$.some((G) => G === U)), isSpecific: !1 }; + } + const n = { tokens: e, isSpecific: !1 }, i = pP([ + ...e, + 3 + /* MultiLineCommentTrivia */ + ]), s = pP([ + ...e, + 1 + /* EndOfFileToken */ + ]), o = SPe( + 83, + 165 + /* LastKeyword */ + ), c = SPe( + 30, + 79 + /* LastBinaryOperator */ + ), _ = [ + 103, + 104, + 165, + 130, + 142, + 152 + /* SatisfiesKeyword */ + ], u = [ + 46, + 47, + 55, + 54 + /* ExclamationToken */ + ], d = [ + 9, + 10, + 80, + 21, + 23, + 19, + 110, + 105 + /* NewKeyword */ + ], g = [ + 80, + 21, + 110, + 105 + /* NewKeyword */ + ], h = [ + 80, + 22, + 24, + 105 + /* NewKeyword */ + ], S = [ + 80, + 21, + 110, + 105 + /* NewKeyword */ + ], T = [ + 80, + 22, + 24, + 105 + /* NewKeyword */ + ], C = [ + 2, + 3 + /* MultiLineCommentTrivia */ + ], D = [80, ...nU], P = i, O = pP([ + 80, + 32, + 3, + 86, + 95, + 102 + /* ImportKeyword */ + ]), j = pP([ + 22, + 3, + 92, + 113, + 98, + 93, + 85 + /* CatchKeyword */ + ]), F = [ + // Leave comments alone + zn( + "IgnoreBeforeComment", + n, + C, + AH, + 1 + /* StopProcessingSpaceActions */ + ), + zn( + "IgnoreAfterLineComment", + 2, + n, + AH, + 1 + /* StopProcessingSpaceActions */ + ), + zn( + "NotSpaceBeforeColon", + n, + 59, + [Oi, _L, kPe], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceAfterColon", + 59, + n, + [Oi, _L, zQe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeQuestionMark", + n, + 58, + [Oi, _L, kPe], + 16 + /* DeleteSpace */ + ), + // insert space after '?' only when it is used in conditional operator + zn( + "SpaceAfterQuestionMarkInConditionalOperator", + 58, + n, + [Oi, PQe], + 4 + /* InsertSpace */ + ), + // in other cases there should be no space between '?' and next token + zn( + "NoSpaceAfterQuestionMark", + 58, + n, + [Oi, DQe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeDot", + n, + [ + 25, + 29 + /* QuestionDotToken */ + ], + [Oi, eYe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterDot", + [ + 25, + 29 + /* QuestionDotToken */ + ], + n, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBetweenImportParenInImportType", + 102, + 21, + [Oi, BQe], + 16 + /* DeleteSpace */ + ), + // Special handling of unary operators. + // Prefix operators generally shouldn't have a space between + // them and their target unary expression. + zn( + "NoSpaceAfterUnaryPrefixOperator", + u, + d, + [Oi, _L], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterUnaryPreincrementOperator", + 46, + g, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterUnaryPredecrementOperator", + 47, + S, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeUnaryPostincrementOperator", + h, + 46, + [Oi, JPe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeUnaryPostdecrementOperator", + T, + 47, + [Oi, JPe], + 16 + /* DeleteSpace */ + ), + // More unary operator special-casing. + // DevDiv 181814: Be careful when removing leading whitespace + // around unary operators. Examples: + // 1 - -2 --X--> 1--2 + // a + ++b --X--> a+++b + zn( + "SpaceAfterPostincrementWhenFollowedByAdd", + 46, + 40, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterAddWhenFollowedByUnaryPlus", + 40, + 40, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterAddWhenFollowedByPreincrement", + 40, + 46, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterPostdecrementWhenFollowedBySubtract", + 47, + 41, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterSubtractWhenFollowedByUnaryMinus", + 41, + 41, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterSubtractWhenFollowedByPredecrement", + 41, + 47, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterCloseBrace", + 20, + [ + 28, + 27 + /* SemicolonToken */ + ], + [Oi], + 16 + /* DeleteSpace */ + ), + // For functions and control block place } on a new line [multi-line rule] + zn( + "NewLineBeforeCloseBraceInBlockContext", + i, + 20, + [EPe], + 8 + /* InsertNewLine */ + ), + // Space/new line after }. + zn( + "SpaceAfterCloseBrace", + 20, + t( + 22 + /* CloseParenToken */ + ), + [Oi, NQe], + 4 + /* InsertSpace */ + ), + // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied + // Also should not apply to }) + zn( + "SpaceBetweenCloseBraceAndElse", + 20, + 93, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBetweenCloseBraceAndWhile", + 20, + 117, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Oi, IPe], + 16 + /* DeleteSpace */ + ), + // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' + zn( + "SpaceAfterConditionalClosingParen", + 22, + 23, + [fL], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenFunctionKeywordAndStar", + 100, + 42, + [wPe], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceAfterStarInGeneratorDeclaration", + 42, + 80, + [wPe], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterFunctionInFuncDecl", + 100, + n, + [kS], + 4 + /* InsertSpace */ + ), + // Insert new line after { and before } in multi-line contexts. + zn( + "NewLineAfterOpenBraceInBlockContext", + 19, + n, + [EPe], + 8 + /* InsertNewLine */ + ), + // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. + // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: + // get x() {} + // set x(val) {} + zn( + "SpaceAfterGetSetInMember", + [ + 139, + 153 + /* SetKeyword */ + ], + 80, + [kS], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenYieldKeywordAndStar", + 127, + 42, + [Oi, BPe], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceBetweenYieldOrYieldStarAndOperand", + [ + 127, + 42 + /* AsteriskToken */ + ], + n, + [Oi, BPe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenReturnAndSemicolon", + 107, + 27, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceAfterCertainKeywords", + [ + 115, + 111, + 105, + 91, + 107, + 114, + 135 + /* AwaitKeyword */ + ], + n, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterLetConstInVariableDeclaration", + [ + 121, + 87 + /* ConstKeyword */ + ], + n, + [Oi, UQe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeOpenParenInFuncCall", + n, + 21, + [Oi, FQe, LQe], + 16 + /* DeleteSpace */ + ), + // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. + zn( + "SpaceBeforeBinaryKeywordOperator", + n, + _, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterBinaryKeywordOperator", + _, + n, + [Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterVoidOperator", + 116, + n, + [Oi, XQe], + 4 + /* InsertSpace */ + ), + // Async-await + zn( + "SpaceBetweenAsyncAndOpenParen", + 134, + 21, + [jQe, Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBetweenAsyncAndFunctionKeyword", + 134, + [ + 100, + 80 + /* Identifier */ + ], + [Oi], + 4 + /* InsertSpace */ + ), + // Template string + zn( + "NoSpaceBetweenTagAndTemplateString", + [ + 80, + 22 + /* CloseParenToken */ + ], + [ + 15, + 16 + /* TemplateHead */ + ], + [Oi], + 16 + /* DeleteSpace */ + ), + // JSX opening elements + zn( + "SpaceBeforeJsxAttribute", + n, + 80, + [JQe, Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeSlashInJsxOpeningElement", + n, + 44, + [MPe, Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", + 44, + 32, + [MPe, Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeEqualInJsxAttribute", + n, + 64, + [FPe, Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterEqualInJsxAttribute", + 64, + n, + [FPe, Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeJsxNamespaceColon", + 80, + 59, + [LPe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterJsxNamespaceColon", + 59, + 80, + [LPe], + 16 + /* DeleteSpace */ + ), + // TypeScript-specific rules + // Use of module as a function call. e.g.: import m2 = module("m2"); + zn( + "NoSpaceAfterModuleImport", + [ + 144, + 149 + /* RequireKeyword */ + ], + 21, + [Oi], + 16 + /* DeleteSpace */ + ), + // Add a space around certain TypeScript keywords + zn( + "SpaceAfterCertainTypeScriptKeywords", + [ + 128, + 129, + 86, + 138, + 90, + 94, + 95, + 96, + 139, + 119, + 102, + 120, + 144, + 145, + 123, + 125, + 124, + 148, + 153, + 126, + 156, + 161, + 143, + 140 + /* InferKeyword */ + ], + n, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeCertainTypeScriptKeywords", + n, + [ + 96, + 119, + 161 + /* FromKeyword */ + ], + [Oi], + 4 + /* InsertSpace */ + ), + // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { + zn( + "SpaceAfterModuleName", + 11, + 19, + [qQe], + 4 + /* InsertSpace */ + ), + // Lambda expressions + zn( + "SpaceBeforeArrow", + n, + 39, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterArrow", + 39, + n, + [Oi], + 4 + /* InsertSpace */ + ), + // Optional parameters and let args + zn( + "NoSpaceAfterEllipsis", + 26, + 80, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterOptionalParameters", + 58, + [ + 22, + 28 + /* CommaToken */ + ], + [Oi, _L], + 16 + /* DeleteSpace */ + ), + // Remove spaces in empty interface literals. e.g.: x: {} + zn( + "NoSpaceBetweenEmptyInterfaceBraceBrackets", + 19, + 20, + [Oi, HQe], + 16 + /* DeleteSpace */ + ), + // generics and type assertions + zn( + "NoSpaceBeforeOpenAngularBracket", + D, + 30, + [Oi, pL], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBetweenCloseParenAndAngularBracket", + 22, + 30, + [Oi, pL], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterOpenAngularBracket", + 30, + n, + [Oi, pL], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeCloseAngularBracket", + n, + 32, + [Oi, pL], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterCloseAngularBracket", + 32, + [ + 21, + 23, + 32, + 28 + /* CommaToken */ + ], + [ + Oi, + pL, + AQe, + /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/ + $Qe + ], + 16 + /* DeleteSpace */ + ), + // decorators + zn( + "SpaceBeforeAt", + [ + 22, + 80 + /* Identifier */ + ], + 60, + [Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterAt", + 60, + n, + [Oi], + 16 + /* DeleteSpace */ + ), + // Insert space after @ in decorator + zn( + "SpaceAfterDecorator", + n, + [ + 128, + 80, + 95, + 90, + 86, + 126, + 125, + 123, + 124, + 139, + 153, + 23, + 42 + /* AsteriskToken */ + ], + [VQe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeNonNullAssertionOperator", + n, + 54, + [Oi, QQe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterNewKeywordOnConstructorSignature", + 105, + 21, + [Oi, GQe], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceLessThanAndNonJSXTypeAnnotation", + 30, + 30, + [Oi], + 4 + /* InsertSpace */ + ) + ], V = [ + // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses + zn( + "SpaceAfterConstructor", + 137, + 21, + [Bf("insertSpaceAfterConstructor"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterConstructor", + 137, + 21, + [ym("insertSpaceAfterConstructor"), Oi], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceAfterComma", + 28, + n, + [Bf("insertSpaceAfterCommaDelimiter"), Oi, d_e, MQe, RQe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterComma", + 28, + n, + [ym("insertSpaceAfterCommaDelimiter"), Oi, d_e], + 16 + /* DeleteSpace */ + ), + // Insert space after function keyword for anonymous functions + zn( + "SpaceAfterAnonymousFunctionKeyword", + [ + 100, + 42 + /* AsteriskToken */ + ], + 21, + [Bf("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), kS], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterAnonymousFunctionKeyword", + [ + 100, + 42 + /* AsteriskToken */ + ], + 21, + [ym("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), kS], + 16 + /* DeleteSpace */ + ), + // Insert space after keywords in control flow statements + zn( + "SpaceAfterKeywordInControl", + o, + 21, + [Bf("insertSpaceAfterKeywordsInControlFlowStatements"), fL], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterKeywordInControl", + o, + 21, + [ym("insertSpaceAfterKeywordsInControlFlowStatements"), fL], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing nonempty parenthesis + zn( + "SpaceAfterOpenParen", + 21, + n, + [Bf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeCloseParen", + n, + 22, + [Bf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBetweenOpenParens", + 21, + 21, + [Bf("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenParens", + 21, + 22, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterOpenParen", + 21, + n, + [ym("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeCloseParen", + n, + 22, + [ym("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), Oi], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing nonempty brackets + zn( + "SpaceAfterOpenBracket", + 23, + n, + [Bf("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeCloseBracket", + n, + 24, + [Bf("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenBrackets", + 23, + 24, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterOpenBracket", + 23, + n, + [ym("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeCloseBracket", + n, + 24, + [ym("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), Oi], + 16 + /* DeleteSpace */ + ), + // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. + zn( + "SpaceAfterOpenBrace", + 19, + n, + [xPe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), CPe], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeCloseBrace", + n, + 20, + [xPe("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), CPe], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Oi, IPe], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterOpenBrace", + 19, + n, + [c_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeCloseBrace", + n, + 20, + [c_e("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), Oi], + 16 + /* DeleteSpace */ + ), + // Insert a space after opening and before closing empty brace brackets + zn( + "SpaceBetweenEmptyBraceBrackets", + 19, + 20, + [Bf("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBetweenEmptyBraceBrackets", + 19, + 20, + [c_e("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"), Oi], + 16 + /* DeleteSpace */ + ), + // Insert space after opening and before closing template string braces + zn( + "SpaceAfterTemplateHeadAndMiddle", + [ + 16, + 17 + /* TemplateMiddle */ + ], + n, + [Bf("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), OPe], + 4, + 1 + /* CanDeleteNewLines */ + ), + zn( + "SpaceBeforeTemplateMiddleAndTail", + n, + [ + 17, + 18 + /* TemplateTail */ + ], + [Bf("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Oi], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterTemplateHeadAndMiddle", + [ + 16, + 17 + /* TemplateMiddle */ + ], + n, + [ym("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), OPe], + 16, + 1 + /* CanDeleteNewLines */ + ), + zn( + "NoSpaceBeforeTemplateMiddleAndTail", + n, + [ + 17, + 18 + /* TemplateTail */ + ], + [ym("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), Oi], + 16 + /* DeleteSpace */ + ), + // No space after { and before } in JSX expression + zn( + "SpaceAfterOpenBraceInJsxExpression", + 19, + n, + [Bf("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Oi, IH], + 4 + /* InsertSpace */ + ), + zn( + "SpaceBeforeCloseBraceInJsxExpression", + n, + 20, + [Bf("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Oi, IH], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterOpenBraceInJsxExpression", + 19, + n, + [ym("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Oi, IH], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceBeforeCloseBraceInJsxExpression", + n, + 20, + [ym("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), Oi, IH], + 16 + /* DeleteSpace */ + ), + // Insert space after semicolon in for statement + zn( + "SpaceAfterSemicolonInFor", + 27, + n, + [Bf("insertSpaceAfterSemicolonInForStatements"), Oi, u_e], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterSemicolonInFor", + 27, + n, + [ym("insertSpaceAfterSemicolonInForStatements"), Oi, u_e], + 16 + /* DeleteSpace */ + ), + // Insert space before and after binary operators + zn( + "SpaceBeforeBinaryOperator", + n, + c, + [Bf("insertSpaceBeforeAndAfterBinaryOperators"), Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "SpaceAfterBinaryOperator", + c, + n, + [Bf("insertSpaceBeforeAndAfterBinaryOperators"), Oi, Ry], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeBinaryOperator", + n, + c, + [ym("insertSpaceBeforeAndAfterBinaryOperators"), Oi, Ry], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterBinaryOperator", + c, + n, + [ym("insertSpaceBeforeAndAfterBinaryOperators"), Oi, Ry], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceBeforeOpenParenInFuncDecl", + n, + 21, + [Bf("insertSpaceBeforeFunctionParenthesis"), Oi, kS], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeOpenParenInFuncDecl", + n, + 21, + [ym("insertSpaceBeforeFunctionParenthesis"), Oi, kS], + 16 + /* DeleteSpace */ + ), + // Open Brace braces after control block + zn( + "NewLineBeforeOpenBraceInControl", + j, + 19, + [Bf("placeOpenBraceOnNewLineForControlBlocks"), fL, p_e], + 8, + 1 + /* CanDeleteNewLines */ + ), + // Open Brace braces after function + // TypeScript: Function can have return types, which can be made of tons of different token kinds + zn( + "NewLineBeforeOpenBraceInFunction", + P, + 19, + [Bf("placeOpenBraceOnNewLineForFunctions"), kS, p_e], + 8, + 1 + /* CanDeleteNewLines */ + ), + // Open Brace braces after TypeScript module/class/interface + zn( + "NewLineBeforeOpenBraceInTypeScriptDeclWithBlock", + O, + 19, + [Bf("placeOpenBraceOnNewLineForFunctions"), APe, p_e], + 8, + 1 + /* CanDeleteNewLines */ + ), + zn( + "SpaceAfterTypeAssertion", + 32, + n, + [Bf("insertSpaceAfterTypeAssertion"), Oi, g_e], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceAfterTypeAssertion", + 32, + n, + [ym("insertSpaceAfterTypeAssertion"), Oi, g_e], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceBeforeTypeAnnotation", + n, + [ + 58, + 59 + /* ColonToken */ + ], + [Bf("insertSpaceBeforeTypeAnnotation"), Oi, __e], + 4 + /* InsertSpace */ + ), + zn( + "NoSpaceBeforeTypeAnnotation", + n, + [ + 58, + 59 + /* ColonToken */ + ], + [ym("insertSpaceBeforeTypeAnnotation"), Oi, __e], + 16 + /* DeleteSpace */ + ), + zn( + "NoOptionalSemicolon", + 27, + s, + [TPe( + "semicolons", + "remove" + /* Remove */ + ), ZQe], + 32 + /* DeleteToken */ + ), + zn( + "OptionalSemicolon", + n, + s, + [TPe( + "semicolons", + "insert" + /* Insert */ + ), KQe], + 64 + /* InsertTrailingSemicolon */ + ) + ], L = [ + // Space after keyword but not before ; or : or ? + zn( + "NoSpaceBeforeSemicolon", + n, + 27, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceBeforeOpenBraceInControl", + j, + 19, + [l_e("placeOpenBraceOnNewLineForControlBlocks"), fL, m_e, f_e], + 4, + 1 + /* CanDeleteNewLines */ + ), + zn( + "SpaceBeforeOpenBraceInFunction", + P, + 19, + [l_e("placeOpenBraceOnNewLineForFunctions"), kS, NH, m_e, f_e], + 4, + 1 + /* CanDeleteNewLines */ + ), + zn( + "SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", + O, + 19, + [l_e("placeOpenBraceOnNewLineForFunctions"), APe, m_e, f_e], + 4, + 1 + /* CanDeleteNewLines */ + ), + zn( + "NoSpaceBeforeComma", + n, + 28, + [Oi], + 16 + /* DeleteSpace */ + ), + // No space before and after indexer `x[]` + zn( + "NoSpaceBeforeOpenBracket", + t( + 134, + 84 + /* CaseKeyword */ + ), + 23, + [Oi], + 16 + /* DeleteSpace */ + ), + zn( + "NoSpaceAfterCloseBracket", + 24, + n, + [Oi, WQe], + 16 + /* DeleteSpace */ + ), + zn( + "SpaceAfterSemicolon", + 27, + n, + [Oi], + 4 + /* InsertSpace */ + ), + // Remove extra space between for and await + zn( + "SpaceBetweenForAndAwaitKeyword", + 99, + 135, + [Oi], + 4 + /* InsertSpace */ + ), + // Remove extra spaces between ... and type name in tuple spread + zn( + "SpaceBetweenDotDotDotAndTypeName", + 26, + D, + [Oi], + 16 + /* DeleteSpace */ + ), + // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. + // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] + zn( + "SpaceBetweenStatements", + [ + 22, + 92, + 93, + 84 + /* CaseKeyword */ + ], + n, + [Oi, d_e, CQe], + 4 + /* InsertSpace */ + ), + // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. + zn( + "SpaceAfterTryCatchFinally", + [ + 113, + 85, + 98 + /* FinallyKeyword */ + ], + 19, + [Oi], + 4 + /* InsertSpace */ + ) + ]; + return [ + ...F, + ...V, + ...L + ]; + } + function zn(e, t, n, i, s, o = 0) { + return { leftTokenRange: bPe(t), rightTokenRange: bPe(n), rule: { debugName: e, context: i, action: s, flags: o } }; + } + function pP(e) { + return { tokens: e, isSpecific: !0 }; + } + function bPe(e) { + return typeof e == "number" ? pP([e]) : ss(e) ? pP(e) : e; + } + function SPe(e, t, n = []) { + const i = []; + for (let s = e; s <= t; s++) + ls(n, s) || i.push(s); + return pP(i); + } + function TPe(e, t) { + return (n) => n.options && n.options[e] === t; + } + function Bf(e) { + return (t) => t.options && io(t.options, e) && !!t.options[e]; + } + function c_e(e) { + return (t) => t.options && io(t.options, e) && !t.options[e]; + } + function ym(e) { + return (t) => !t.options || !io(t.options, e) || !t.options[e]; + } + function l_e(e) { + return (t) => !t.options || !io(t.options, e) || !t.options[e] || t.TokensAreOnSameLine(); + } + function xPe(e) { + return (t) => !t.options || !io(t.options, e) || !!t.options[e]; + } + function u_e(e) { + return e.contextNode.kind === 248; + } + function CQe(e) { + return !u_e(e); + } + function Ry(e) { + switch (e.contextNode.kind) { + case 226: + return e.contextNode.operatorToken.kind !== 28; + case 227: + case 194: + case 234: + case 281: + case 276: + case 182: + case 192: + case 193: + case 238: + return !0; + case 208: + case 265: + case 271: + case 277: + case 260: + case 169: + case 306: + case 172: + case 171: + return e.currentTokenSpan.kind === 64 || e.nextTokenSpan.kind === 64; + case 249: + case 168: + return e.currentTokenSpan.kind === 103 || e.nextTokenSpan.kind === 103 || e.currentTokenSpan.kind === 64 || e.nextTokenSpan.kind === 64; + case 250: + return e.currentTokenSpan.kind === 165 || e.nextTokenSpan.kind === 165; + } + return !1; + } + function _L(e) { + return !Ry(e); + } + function kPe(e) { + return !__e(e); + } + function __e(e) { + const t = e.contextNode.kind; + return t === 172 || t === 171 || t === 169 || t === 260 || DT(t); + } + function EQe(e) { + return rs(e.contextNode) && e.contextNode.questionToken; + } + function DQe(e) { + return !EQe(e); + } + function PQe(e) { + return e.contextNode.kind === 227 || e.contextNode.kind === 194; + } + function f_e(e) { + return e.TokensAreOnSameLine() || NH(e); + } + function CPe(e) { + return e.contextNode.kind === 206 || e.contextNode.kind === 200 || wQe(e); + } + function p_e(e) { + return NH(e) && !(e.NextNodeAllOnSameLine() || e.NextNodeBlockIsOnOneLine()); + } + function EPe(e) { + return DPe(e) && !(e.ContextNodeAllOnSameLine() || e.ContextNodeBlockIsOnOneLine()); + } + function wQe(e) { + return DPe(e) && (e.ContextNodeAllOnSameLine() || e.ContextNodeBlockIsOnOneLine()); + } + function DPe(e) { + return PPe(e.contextNode); + } + function NH(e) { + return PPe(e.nextTokenParent); + } + function PPe(e) { + if (NPe(e)) + return !0; + switch (e.kind) { + case 241: + case 269: + case 210: + case 268: + return !0; + } + return !1; + } + function kS(e) { + switch (e.contextNode.kind) { + case 262: + case 174: + case 173: + case 177: + case 178: + case 179: + case 218: + case 176: + case 219: + case 264: + return !0; + } + return !1; + } + function AQe(e) { + return !kS(e); + } + function wPe(e) { + return e.contextNode.kind === 262 || e.contextNode.kind === 218; + } + function APe(e) { + return NPe(e.contextNode); + } + function NPe(e) { + switch (e.kind) { + case 263: + case 231: + case 264: + case 266: + case 187: + case 267: + case 278: + case 279: + case 272: + case 275: + return !0; + } + return !1; + } + function NQe(e) { + switch (e.currentTokenParent.kind) { + case 263: + case 267: + case 266: + case 299: + case 268: + case 255: + return !0; + case 241: { + const t = e.currentTokenParent.parent; + if (!t || t.kind !== 219 && t.kind !== 218) + return !0; + } + } + return !1; + } + function fL(e) { + switch (e.contextNode.kind) { + case 245: + case 255: + case 248: + case 249: + case 250: + case 247: + case 258: + case 246: + case 254: + case 299: + return !0; + default: + return !1; + } + } + function IPe(e) { + return e.contextNode.kind === 210; + } + function IQe(e) { + return e.contextNode.kind === 213; + } + function OQe(e) { + return e.contextNode.kind === 214; + } + function FQe(e) { + return IQe(e) || OQe(e); + } + function LQe(e) { + return e.currentTokenSpan.kind !== 28; + } + function MQe(e) { + return e.nextTokenSpan.kind !== 24; + } + function RQe(e) { + return e.nextTokenSpan.kind !== 22; + } + function jQe(e) { + return e.contextNode.kind === 219; + } + function BQe(e) { + return e.contextNode.kind === 205; + } + function Oi(e) { + return e.TokensAreOnSameLine() && e.contextNode.kind !== 12; + } + function OPe(e) { + return e.contextNode.kind !== 12; + } + function d_e(e) { + return e.contextNode.kind !== 284 && e.contextNode.kind !== 288; + } + function IH(e) { + return e.contextNode.kind === 294 || e.contextNode.kind === 293; + } + function JQe(e) { + return e.nextTokenParent.kind === 291 || e.nextTokenParent.kind === 295 && e.nextTokenParent.parent.kind === 291; + } + function FPe(e) { + return e.contextNode.kind === 291; + } + function zQe(e) { + return e.nextTokenParent.kind !== 295; + } + function LPe(e) { + return e.nextTokenParent.kind === 295; + } + function MPe(e) { + return e.contextNode.kind === 285; + } + function WQe(e) { + return !kS(e) && !NH(e); + } + function VQe(e) { + return e.TokensAreOnSameLine() && wf(e.contextNode) && RPe(e.currentTokenParent) && !RPe(e.nextTokenParent); + } + function RPe(e) { + for (; e && ct(e); ) + e = e.parent; + return e && e.kind === 170; + } + function UQe(e) { + return e.currentTokenParent.kind === 261 && e.currentTokenParent.getStart(e.sourceFile) === e.currentTokenSpan.pos; + } + function m_e(e) { + return e.formattingRequestKind !== 2; + } + function qQe(e) { + return e.contextNode.kind === 267; + } + function HQe(e) { + return e.contextNode.kind === 187; + } + function GQe(e) { + return e.contextNode.kind === 180; + } + function jPe(e, t) { + if (e.kind !== 30 && e.kind !== 32) + return !1; + switch (t.kind) { + case 183: + case 216: + case 265: + case 263: + case 231: + case 264: + case 262: + case 218: + case 219: + case 174: + case 173: + case 179: + case 180: + case 213: + case 214: + case 233: + return !0; + default: + return !1; + } + } + function pL(e) { + return jPe(e.currentTokenSpan, e.currentTokenParent) || jPe(e.nextTokenSpan, e.nextTokenParent); + } + function g_e(e) { + return e.contextNode.kind === 216; + } + function $Qe(e) { + return !g_e(e); + } + function XQe(e) { + return e.currentTokenSpan.kind === 116 && e.currentTokenParent.kind === 222; + } + function BPe(e) { + return e.contextNode.kind === 229 && e.contextNode.expression !== void 0; + } + function QQe(e) { + return e.contextNode.kind === 235; + } + function JPe(e) { + return !YQe(e); + } + function YQe(e) { + switch (e.contextNode.kind) { + case 245: + case 248: + case 249: + case 250: + case 246: + case 247: + return !0; + default: + return !1; + } + } + function ZQe(e) { + let t = e.nextTokenSpan.kind, n = e.nextTokenSpan.pos; + if (mC(t)) { + const o = e.nextTokenParent === e.currentTokenParent ? qb( + e.currentTokenParent, + sr(e.currentTokenParent, (c) => !c.parent), + e.sourceFile + ) : e.nextTokenParent.getFirstToken(e.sourceFile); + if (!o) + return !0; + t = o.kind, n = o.getStart(e.sourceFile); + } + const i = e.sourceFile.getLineAndCharacterOfPosition(e.currentTokenSpan.pos).line, s = e.sourceFile.getLineAndCharacterOfPosition(n).line; + return i === s ? t === 20 || t === 1 : t === 240 || t === 27 ? !1 : e.contextNode.kind === 264 || e.contextNode.kind === 265 ? !I_(e.currentTokenParent) || !!e.currentTokenParent.type || t !== 21 : rs(e.currentTokenParent) ? !e.currentTokenParent.initializer : e.currentTokenParent.kind !== 248 && e.currentTokenParent.kind !== 242 && e.currentTokenParent.kind !== 240 && t !== 23 && t !== 21 && t !== 40 && t !== 41 && t !== 44 && t !== 14 && t !== 28 && t !== 228 && t !== 16 && t !== 15 && t !== 25; + } + function KQe(e) { + return l9(e.currentTokenSpan.end, e.currentTokenParent, e.sourceFile); + } + function eYe(e) { + return !Dn(e.contextNode) || !m_(e.contextNode.expression) || e.contextNode.expression.getText().includes("."); + } + function tYe(e, t) { + return { options: e, getRules: rYe(), host: t }; + } + var h_e; + function rYe() { + return h_e === void 0 && (h_e = iYe(vPe())), h_e; + } + function nYe(e) { + let t = 0; + return e & 1 && (t |= 28), e & 2 && (t |= 96), e & 28 && (t |= 28), e & 96 && (t |= 96), t; + } + function iYe(e) { + const t = sYe(e); + return (n) => { + const i = t[zPe(n.currentTokenSpan.kind, n.nextTokenSpan.kind)]; + if (i) { + const s = []; + let o = 0; + for (const c of i) { + const _ = ~nYe(o); + c.action & _ && Ri(c.context, (u) => u(n)) && (s.push(c), o |= c.action); + } + if (s.length) + return s; + } + }; + } + function sYe(e) { + const t = new Array(y_e * y_e), n = new Array(t.length); + for (const i of e) { + const s = i.leftTokenRange.isSpecific && i.rightTokenRange.isSpecific; + for (const o of i.leftTokenRange.tokens) + for (const c of i.rightTokenRange.tokens) { + const _ = zPe(o, c); + let u = t[_]; + u === void 0 && (u = t[_] = []), aYe(u, i.rule, s, n, _); + } + } + return t; + } + function zPe(e, t) { + return E.assert(e <= 165 && t <= 165, "Must compute formatting context from tokens"), e * y_e + t; + } + var dP = 5, OH = 31, y_e = 166, $N = ((e) => (e[e.StopRulesSpecific = 0] = "StopRulesSpecific", e[e.StopRulesAny = dP * 1] = "StopRulesAny", e[e.ContextRulesSpecific = dP * 2] = "ContextRulesSpecific", e[e.ContextRulesAny = dP * 3] = "ContextRulesAny", e[e.NoContextRulesSpecific = dP * 4] = "NoContextRulesSpecific", e[e.NoContextRulesAny = dP * 5] = "NoContextRulesAny", e))($N || {}); + function aYe(e, t, n, i, s) { + const o = t.action & 3 ? n ? 0 : $N.StopRulesAny : t.context !== AH ? n ? $N.ContextRulesSpecific : $N.ContextRulesAny : n ? $N.NoContextRulesSpecific : $N.NoContextRulesAny, c = i[s] || 0; + e.splice(oYe(c, o), 0, t), i[s] = cYe(c, o); + } + function oYe(e, t) { + let n = 0; + for (let i = 0; i <= t; i += dP) + n += e & OH, e >>= dP; + return n; + } + function cYe(e, t) { + const n = (e >> t & OH) + 1; + return E.assert((n & OH) === n, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."), e & ~(OH << t) | n << t; + } + function FH(e, t, n) { + const i = { pos: e, end: t, kind: n }; + return E.isDebugging && Object.defineProperty(i, "__debugKind", { + get: () => E.formatSyntaxKind(n) + }), i; + } + function lYe(e, t, n) { + const i = t.getLineAndCharacterOfPosition(e).line; + if (i === 0) + return []; + let s = zw(i, t); + for (; Xd(t.text.charCodeAt(s)); ) + s--; + _u(t.text.charCodeAt(s)) && s--; + const o = { + // get start position for the previous line + pos: dy(i - 1, t), + // end value is exclusive so add 1 to the result + end: s + 1 + }; + return dL( + o, + t, + n, + 2 + /* FormatOnEnter */ + ); + } + function uYe(e, t, n) { + const i = v_e(e, 27, t); + return WPe( + b_e(i), + t, + n, + 3 + /* FormatOnSemicolon */ + ); + } + function _Ye(e, t, n) { + const i = v_e(e, 19, t); + if (!i) + return []; + const s = i.parent, o = b_e(s), c = { + pos: Jp(o.getStart(t), t), + // TODO: GH#18217 + end: e + }; + return dL( + c, + t, + n, + 4 + /* FormatOnOpeningCurlyBrace */ + ); + } + function fYe(e, t, n) { + const i = v_e(e, 20, t); + return WPe( + b_e(i), + t, + n, + 5 + /* FormatOnClosingCurlyBrace */ + ); + } + function pYe(e, t) { + const n = { + pos: 0, + end: e.text.length + }; + return dL( + n, + e, + t, + 0 + /* FormatDocument */ + ); + } + function dYe(e, t, n, i) { + const s = { + pos: Jp(e, n), + end: t + }; + return dL( + s, + n, + i, + 1 + /* FormatSelection */ + ); + } + function v_e(e, t, n) { + const i = sl(e, n); + return i && i.kind === t && e === i.getEnd() ? i : void 0; + } + function b_e(e) { + let t = e; + for (; t && t.parent && t.parent.end === e.end && !mYe(t.parent, t); ) + t = t.parent; + return t; + } + function mYe(e, t) { + switch (e.kind) { + case 263: + case 264: + return Mf(e.members, t); + case 267: + const n = e.body; + return !!n && n.kind === 268 && Mf(n.statements, t); + case 307: + case 241: + case 268: + return Mf(e.statements, t); + case 299: + return Mf(e.block.statements, t); + } + return !1; + } + function gYe(e, t) { + return n(t); + function n(i) { + const s = gs(i, (o) => UV(o.getStart(t), o.end, e) && o); + if (s) { + const o = n(s); + if (o) + return o; + } + return i; + } + } + function hYe(e, t) { + if (!e.length) + return s; + const n = e.filter((o) => VD(t, o.start, o.start + o.length)).sort((o, c) => o.start - c.start); + if (!n.length) + return s; + let i = 0; + return (o) => { + for (; ; ) { + if (i >= n.length) + return !1; + const c = n[i]; + if (o.end <= c.start) + return !1; + if (JF(o.pos, o.end, c.start, c.start + c.length)) + return !0; + i++; + } + }; + function s() { + return !1; + } + } + function yYe(e, t, n) { + const i = e.getStart(n); + if (i === t.pos && e.end === t.end) + return i; + const s = sl(t.pos, n); + return !s || s.end >= t.pos ? e.pos : s.end; + } + function vYe(e, t, n) { + let i = -1, s; + for (; e; ) { + const o = n.getLineAndCharacterOfPosition(e.getStart(n)).line; + if (i !== -1 && o !== i) + break; + if (vm.shouldIndentChildNode(t, e, s, n)) + return t.indentSize; + i = o, s = e, e = e.parent; + } + return 0; + } + function bYe(e, t, n, i, s, o) { + const c = { pos: e.pos, end: e.end }; + return o_e(t.text, n, c.pos, c.end, (_) => VPe( + c, + e, + i, + s, + _, + o, + 1, + (u) => !1, + // assume that node does not have any errors + t + )); + } + function WPe(e, t, n, i) { + if (!e) + return []; + const s = { + pos: Jp(e.getStart(t), t), + end: e.end + }; + return dL(s, t, n, i); + } + function dL(e, t, n, i) { + const s = gYe(e, t); + return o_e( + t.text, + t.languageVariant, + yYe(s, e, t), + e.end, + (o) => VPe( + e, + s, + vm.getIndentationForNode(s, e, t, n.options), + vYe(s, n.options, t), + o, + n, + i, + hYe(t.parseDiagnostics, e), + t + ) + ); + } + function VPe(e, t, n, i, s, { options: o, getRules: c, host: _ }, u, d, g) { + var h; + const S = new gPe(g, u, o); + let T, C, D, P, O, j = -1; + const F = []; + if (s.advance(), s.isOnToken()) { + const Ie = g.getLineAndCharacterOfPosition(t.getStart(g)).line; + let ye = Ie; + wf(t) && (ye = g.getLineAndCharacterOfPosition(Fj(t, g)).line), ce(t, t, Ie, ye, n, i); + } + const V = s.getCurrentLeadingTrivia(); + if (V) { + const Ie = vm.nodeWillIndentChild( + o, + t, + /*child*/ + void 0, + g, + /*indentByDefault*/ + !1 + ) ? n + o.indentSize : n; + K( + V, + Ie, + /*indentNextTokenOrTrivia*/ + !0, + (ye) => { + Z( + ye, + g.getLineAndCharacterOfPosition(ye.pos), + t, + t, + /*dynamicIndentation*/ + void 0 + ), ne( + ye.pos, + Ie, + /*lineAdded*/ + !1 + ); + } + ), o.trimTrailingWhitespace !== !1 && Ae(V); + } + if (C && s.getTokenFullStart() >= e.end) { + const Ie = s.isOnEOF() ? s.readEOFTokenRange() : s.isOnToken() ? s.readTokenInfo(t).token : void 0; + if (Ie && Ie.pos === T) { + const ye = ((h = sl(Ie.end, g, t)) == null ? void 0 : h.parent) || D; + oe( + Ie, + g.getLineAndCharacterOfPosition(Ie.pos).line, + ye, + C, + P, + D, + ye, + /*dynamicIndentation*/ + void 0 + ); + } + } + return F; + function L(Ie, ye, Fe, Qe, Ke) { + if (VD(Qe, Ie, ye) || nN(Qe, Ie, ye)) { + if (Ke !== -1) + return Ke; + } else { + const Be = g.getLineAndCharacterOfPosition(Ie).line, at = Jp(Ie, g), Wt = vm.findFirstNonWhitespaceColumn(at, Ie, g, o); + if (Be !== Fe || Ie === Wt) { + const nr = vm.getBaseIndentation(o); + return nr > Wt ? nr : Wt; + } + } + return -1; + } + function $(Ie, ye, Fe, Qe, Ke, Be) { + const at = vm.shouldIndentChildNode(o, Ie) ? o.indentSize : 0; + return Be === ye ? { + indentation: ye === O ? j : Ke.getIndentation(), + delta: Math.min(o.indentSize, Ke.getDelta(Ie) + at) + } : Fe === -1 ? Ie.kind === 21 && ye === O ? { indentation: j, delta: Ke.getDelta(Ie) } : vm.childStartsOnTheSameLineWithElseInIfStatement(Qe, Ie, ye, g) || vm.childIsUnindentedBranchOfConditionalExpression(Qe, Ie, ye, g) || vm.argumentStartsOnSameLineAsPreviousArgument(Qe, Ie, ye, g) ? { indentation: Ke.getIndentation(), delta: at } : { indentation: Ke.getIndentation() + Ke.getDelta(Ie), delta: at } : { indentation: Fe, delta: at }; + } + function U(Ie) { + if (ed(Ie)) { + const ye = Nn(Ie.modifiers, Qs, rc(Ie.modifiers, dl)); + if (ye) return ye.kind; + } + switch (Ie.kind) { + case 263: + return 86; + case 264: + return 120; + case 262: + return 100; + case 266: + return 266; + case 177: + return 139; + case 178: + return 153; + case 174: + if (Ie.asteriskToken) + return 42; + case 172: + case 169: + const ye = es(Ie); + if (ye) + return ye.kind; + } + } + function G(Ie, ye, Fe, Qe) { + return { + getIndentationForComment: (at, Wt, nr) => { + switch (at) { + case 20: + case 24: + case 22: + return Fe + Be(nr); + } + return Wt !== -1 ? Wt : Fe; + }, + // if list end token is LessThanToken '>' then its delta should be explicitly suppressed + // so that LessThanToken as a binary operator can still be indented. + // foo.then + // < + // number, + // string, + // >(); + // vs + // var a = xValue + // > yValue; + getIndentationForToken: (at, Wt, nr, Kt) => !Kt && Ke(at, Wt, nr) ? Fe + Be(nr) : Fe, + getIndentation: () => Fe, + getDelta: Be, + recomputeIndentation: (at, Wt) => { + vm.shouldIndentChildNode(o, Wt, Ie, g) && (Fe += at ? o.indentSize : -o.indentSize, Qe = vm.shouldIndentChildNode(o, Ie) ? o.indentSize : 0); + } + }; + function Ke(at, Wt, nr) { + switch (Wt) { + case 19: + case 20: + case 22: + case 93: + case 117: + case 60: + return !1; + case 44: + case 32: + switch (nr.kind) { + case 286: + case 287: + case 285: + return !1; + } + break; + case 23: + case 24: + if (nr.kind !== 200) + return !1; + break; + } + return ye !== at && !(wf(Ie) && Wt === U(Ie)); + } + function Be(at) { + return vm.nodeWillIndentChild( + o, + Ie, + at, + g, + /*indentByDefault*/ + !0 + ) ? Qe : 0; + } + } + function ce(Ie, ye, Fe, Qe, Ke, Be) { + if (!VD(e, Ie.getStart(g), Ie.getEnd())) + return; + const at = G(Ie, Fe, Ke, Be); + let Wt = ye; + for (gs( + Ie, + (Vt) => { + nr( + Vt, + /*inheritedIndentation*/ + -1, + Ie, + at, + Fe, + Qe, + /*isListItem*/ + !1 + ); + }, + (Vt) => { + Kt(Vt, Ie, Fe, at); + } + ); s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const Vt = s.readTokenInfo(Ie); + if (Vt.token.end > Math.min(Ie.end, e.end)) + break; + Pr(Vt, Ie, at, Ie); + } + function nr(Vt, zt, jr, ci, Xt, Ai, _s, $n) { + if (E.assert(!oo(Vt)), ic(Vt) || lZ(jr, Vt)) + return zt; + const os = Vt.getStart(g), wr = g.getLineAndCharacterOfPosition(os).line; + let Ss = wr; + wf(Vt) && (Ss = g.getLineAndCharacterOfPosition(Fj(Vt, g)).line); + let Le = -1; + if (_s && Mf(e, jr) && (Le = L(os, Vt.end, Xt, e, zt), Le !== -1 && (zt = Le)), !VD(e, Vt.pos, Vt.end)) + return Vt.end < e.pos && s.skipToEndOf(Vt), zt; + if (Vt.getFullWidth() === 0) + return zt; + for (; s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const ln = s.readTokenInfo(Ie); + if (ln.token.end > e.end) + return zt; + if (ln.token.end > os) { + ln.token.pos > os && s.skipToStartOf(Vt); + break; + } + Pr(ln, Ie, ci, Ie); + } + if (!s.isOnToken() || s.getTokenFullStart() >= e.end) + return zt; + if (CT(Vt)) { + const ln = s.readTokenInfo(Vt); + if (Vt.kind !== 12) + return E.assert(ln.token.end === Vt.end, "Token end is child end"), Pr(ln, Ie, ci, Vt), zt; + } + const At = Vt.kind === 170 ? wr : Ai, vr = $(Vt, wr, Le, Ie, ci, At); + return ce(Vt, Wt, wr, Ss, vr.indentation, vr.delta), Wt = Ie, $n && jr.kind === 209 && zt === -1 && (zt = vr.indentation), zt; + } + function Kt(Vt, zt, jr, ci) { + E.assert(ab(Vt)), E.assert(!oo(Vt)); + const Xt = SYe(zt, Vt); + let Ai = ci, _s = jr; + if (!VD(e, Vt.pos, Vt.end)) { + Vt.end < e.pos && s.skipToEndOf(Vt); + return; + } + if (Xt !== 0) + for (; s.isOnToken() && s.getTokenFullStart() < e.end; ) { + const wr = s.readTokenInfo(zt); + if (wr.token.end > Vt.pos) + break; + if (wr.token.kind === Xt) { + _s = g.getLineAndCharacterOfPosition(wr.token.pos).line, Pr(wr, zt, ci, zt); + let Ss; + if (j !== -1) + Ss = j; + else { + const Le = Jp(wr.token.pos, g); + Ss = vm.findFirstNonWhitespaceColumn(Le, wr.token.pos, g, o); + } + Ai = G(zt, jr, Ss, o.indentSize); + } else + Pr(wr, zt, ci, zt); + } + let $n = -1; + for (let wr = 0; wr < Vt.length; wr++) { + const Ss = Vt[wr]; + $n = nr( + Ss, + $n, + Ie, + Ai, + _s, + _s, + /*isListItem*/ + !0, + /*isFirstListItem*/ + wr === 0 + ); + } + const os = TYe(Xt); + if (os !== 0 && s.isOnToken() && s.getTokenFullStart() < e.end) { + let wr = s.readTokenInfo(zt); + wr.token.kind === 28 && (Pr(wr, zt, Ai, zt), wr = s.isOnToken() ? s.readTokenInfo(zt) : void 0), wr && wr.token.kind === os && Mf(zt, wr.token) && Pr( + wr, + zt, + Ai, + zt, + /*isListEndToken*/ + !0 + ); + } + } + function Pr(Vt, zt, jr, ci, Xt) { + E.assert(Mf(zt, Vt.token)); + const Ai = s.lastTrailingTriviaWasNewLine(); + let _s = !1; + Vt.leadingTrivia && X(Vt.leadingTrivia, zt, Wt, jr); + let $n = 0; + const os = Mf(e, Vt.token), wr = g.getLineAndCharacterOfPosition(Vt.token.pos); + if (os) { + const Ss = d(Vt.token), Le = C; + if ($n = Z(Vt.token, wr, zt, Wt, jr), !Ss) + if ($n === 0) { + const At = Le && g.getLineAndCharacterOfPosition(Le.end).line; + _s = Ai && wr.line !== At; + } else + _s = $n === 1; + } + if (Vt.trailingTrivia && (T = ia(Vt.trailingTrivia).end, X(Vt.trailingTrivia, zt, Wt, jr)), _s) { + const Ss = os && !d(Vt.token) ? jr.getIndentationForToken(wr.line, Vt.token.kind, ci, !!Xt) : -1; + let Le = !0; + if (Vt.leadingTrivia) { + const At = jr.getIndentationForComment(Vt.token.kind, Ss, ci); + Le = K(Vt.leadingTrivia, At, Le, (vr) => ne( + vr.pos, + At, + /*lineAdded*/ + !1 + )); + } + Ss !== -1 && Le && (ne( + Vt.token.pos, + Ss, + $n === 1 + /* LineAdded */ + ), O = wr.line, j = Ss); + } + s.advance(), Wt = zt; + } + } + function K(Ie, ye, Fe, Qe) { + for (const Ke of Ie) { + const Be = Mf(e, Ke); + switch (Ke.kind) { + case 3: + Be && H( + Ke, + ye, + /*firstLineIsIndented*/ + !Fe + ), Fe = !1; + break; + case 2: + Fe && Be && Qe(Ke), Fe = !1; + break; + case 4: + Fe = !0; + break; + } + } + return Fe; + } + function X(Ie, ye, Fe, Qe) { + for (const Ke of Ie) + if ($F(Ke.kind) && Mf(e, Ke)) { + const Be = g.getLineAndCharacterOfPosition(Ke.pos); + Z(Ke, Be, ye, Fe, Qe); + } + } + function Z(Ie, ye, Fe, Qe, Ke) { + const Be = d(Ie); + let at = 0; + if (!Be) + if (C) + at = oe(Ie, ye.line, Fe, C, P, D, Qe, Ke); + else { + const Wt = g.getLineAndCharacterOfPosition(e.pos); + ae(Wt.line, ye.line); + } + return C = Ie, T = Ie.end, D = Fe, P = ye.line, at; + } + function oe(Ie, ye, Fe, Qe, Ke, Be, at, Wt) { + S.updateContext(Qe, Be, Ie, Fe, at); + const nr = c(S); + let Kt = S.options.trimTrailingWhitespace !== !1, Pr = 0; + return nr ? dX(nr, (Vt) => { + if (Pr = Xe(Vt, Qe, Ke, Ie, ye), Wt) + switch (Pr) { + case 2: + Fe.getStart(g) === Ie.pos && Wt.recomputeIndentation( + /*lineAddedByFormatting*/ + !1, + at + ); + break; + case 1: + Fe.getStart(g) === Ie.pos && Wt.recomputeIndentation( + /*lineAddedByFormatting*/ + !0, + at + ); + break; + default: + E.assert( + Pr === 0 + /* None */ + ); + } + Kt = Kt && !(Vt.action & 16) && Vt.flags !== 1; + }) : Kt = Kt && Ie.kind !== 1, ye !== Ke && Kt && ae(Ke, ye, Qe), Pr; + } + function ne(Ie, ye, Fe) { + const Qe = S_e(ye, o); + if (Fe) + ve(Ie, 0, Qe); + else { + const Ke = g.getLineAndCharacterOfPosition(Ie), Be = dy(Ke.line, g); + (ye !== pe(Be, Ke.character) || fe(Qe, Be)) && ve(Be, Ke.character, Qe); + } + } + function pe(Ie, ye) { + let Fe = 0; + for (let Qe = 0; Qe < ye; Qe++) + g.text.charCodeAt(Ie + Qe) === 9 ? Fe += o.tabSize - Fe % o.tabSize : Fe++; + return Fe; + } + function fe(Ie, ye) { + return Ie !== g.text.substr(ye, Ie.length); + } + function H(Ie, ye, Fe, Qe = !0) { + let Ke = g.getLineAndCharacterOfPosition(Ie.pos).line; + const Be = g.getLineAndCharacterOfPosition(Ie.end).line; + if (Ke === Be) { + Fe || ne( + Ie.pos, + ye, + /*lineAdded*/ + !1 + ); + return; + } + const at = []; + let Wt = Ie.pos; + for (let zt = Ke; zt < Be; zt++) { + const jr = zw(zt, g); + at.push({ pos: Wt, end: jr }), Wt = dy(zt + 1, g); + } + if (Qe && at.push({ pos: Wt, end: Ie.end }), at.length === 0) return; + const nr = dy(Ke, g), Kt = vm.findFirstNonWhitespaceCharacterAndColumn(nr, at[0].pos, g, o); + let Pr = 0; + Fe && (Pr = 1, Ke++); + const Vt = ye - Kt.column; + for (let zt = Pr; zt < at.length; zt++, Ke++) { + const jr = dy(Ke, g), ci = zt === 0 ? Kt : vm.findFirstNonWhitespaceCharacterAndColumn(at[zt].pos, at[zt].end, g, o), Xt = ci.column + Vt; + if (Xt > 0) { + const Ai = S_e(Xt, o); + ve(jr, ci.character, Ai); + } else + de(jr, ci.character); + } + } + function ae(Ie, ye, Fe) { + for (let Qe = Ie; Qe < ye; Qe++) { + const Ke = dy(Qe, g), Be = zw(Qe, g); + if (Fe && ($F(Fe.kind) || YV(Fe.kind)) && Fe.pos <= Be && Fe.end > Be) + continue; + const at = le(Ke, Be); + at !== -1 && (E.assert(at === Ke || !Xd(g.text.charCodeAt(at - 1))), de(at, Be + 1 - at)); + } + } + function le(Ie, ye) { + let Fe = ye; + for (; Fe >= Ie && Xd(g.text.charCodeAt(Fe)); ) + Fe--; + return Fe !== ye ? Fe + 1 : -1; + } + function Ae(Ie) { + let ye = C ? C.end : e.pos; + for (const Fe of Ie) + $F(Fe.kind) && (ye < Fe.pos && ge(ye, Fe.pos - 1, C), ye = Fe.end + 1); + ye < e.end && ge(ye, e.end, C); + } + function ge(Ie, ye, Fe) { + const Qe = g.getLineAndCharacterOfPosition(Ie).line, Ke = g.getLineAndCharacterOfPosition(ye).line; + ae(Qe, Ke + 1, Fe); + } + function de(Ie, ye) { + ye && F.push(QF(Ie, ye, "")); + } + function ve(Ie, ye, Fe) { + (ye || Fe) && F.push(QF(Ie, ye, Fe)); + } + function De(Ie, ye) { + ye && F.push(QF(Ie, 0, ye)); + } + function Xe(Ie, ye, Fe, Qe, Ke) { + const Be = Ke !== Fe; + switch (Ie.action) { + case 1: + return 0; + case 16: + if (ye.end !== Qe.pos) + return de(ye.end, Qe.pos - ye.end), Be ? 2 : 0; + break; + case 32: + de(ye.pos, ye.end - ye.pos); + break; + case 8: + if (Ie.flags !== 1 && Fe !== Ke) + return 0; + if (Ke - Fe !== 1) + return ve(ye.end, Qe.pos - ye.end, k0(_, o)), Be ? 0 : 1; + break; + case 4: + if (Ie.flags !== 1 && Fe !== Ke) + return 0; + if (Qe.pos - ye.end !== 1 || g.text.charCodeAt(ye.end) !== 32) + return ve(ye.end, Qe.pos - ye.end, " "), Be ? 2 : 0; + break; + case 64: + De(ye.end, ";"); + } + return 0; + } + } + function UPe(e, t, n, i = Ei(e, t)) { + const s = sr(i, Ed); + if (s && (i = s.parent), i.getStart(e) <= t && t < i.getEnd()) + return; + n = n === null ? void 0 : n === void 0 ? sl(t, e) : n; + const c = n && oy(e.text, n.end), _ = Gj(i, e), u = Hi(c, _); + return u && Nn(u, (d) => rN(d, t) || // The end marker of a single-line comment does not include the newline character. + // With caret at `^`, in the following case, we are inside a comment (^ denotes the cursor position): + // + // // asdf ^\n + // + // But for closed multi-line comments, we don't want to be inside the comment in the following case: + // + // /* asdf */^ + // + // However, unterminated multi-line comments *do* contain their end. + // + // Internally, we represent the end of the comment at the newline and closing '/', respectively. + // + t === d.end && (d.kind === 2 || t === e.getFullWidth())); + } + function SYe(e, t) { + switch (e.kind) { + case 176: + case 262: + case 218: + case 174: + case 173: + case 219: + case 179: + case 180: + case 184: + case 185: + case 177: + case 178: + if (e.typeParameters === t) + return 30; + if (e.parameters === t) + return 21; + break; + case 213: + case 214: + if (e.typeArguments === t) + return 30; + if (e.arguments === t) + return 21; + break; + case 263: + case 231: + case 264: + case 265: + if (e.typeParameters === t) + return 30; + break; + case 183: + case 215: + case 186: + case 233: + case 205: + if (e.typeArguments === t) + return 30; + break; + case 187: + return 19; + } + return 0; + } + function TYe(e) { + switch (e) { + case 21: + return 22; + case 30: + return 32; + case 19: + return 20; + } + return 0; + } + var LH, XN, QN; + function S_e(e, t) { + if ((!LH || LH.tabSize !== t.tabSize || LH.indentSize !== t.indentSize) && (LH = { tabSize: t.tabSize, indentSize: t.indentSize }, XN = QN = void 0), t.convertTabsToSpaces) { + let i; + const s = Math.floor(e / t.indentSize), o = e % t.indentSize; + return QN || (QN = []), QN[s] === void 0 ? (i = cN(" ", t.indentSize * s), QN[s] = i) : i = QN[s], o ? i + cN(" ", o) : i; + } else { + const i = Math.floor(e / t.tabSize), s = e - i * t.tabSize; + let o; + return XN || (XN = []), XN[i] === void 0 ? XN[i] = o = cN(" ", i) : o = XN[i], s ? o + cN(" ", s) : o; + } + } + var vm; + ((e) => { + let t; + ((H) => { + H[H.Unknown = -1] = "Unknown"; + })(t || (t = {})); + function n(H, ae, le, Ae = !1) { + if (H > ae.text.length) + return _(le); + if (le.indentStyle === 0) + return 0; + const ge = sl( + H, + ae, + /*startNode*/ + void 0, + /*excludeJsdoc*/ + !0 + ), de = UPe(ae, H, ge || null); + if (de && de.kind === 3) + return i(ae, H, le, de); + if (!ge) + return _(le); + if (YV(ge.kind) && ge.getStart(ae) <= H && H < ge.end) + return 0; + const De = ae.getLineAndCharacterOfPosition(H).line, Xe = Ei(ae, H), Ie = Xe.kind === 19 && Xe.parent.kind === 210; + if (le.indentStyle === 1 || Ie) + return s(ae, H, le); + if (ge.kind === 28 && ge.parent.kind !== 226) { + const Fe = g(ge, ae, le); + if (Fe !== -1) + return Fe; + } + const ye = V(H, ge.parent, ae); + if (ye && !Mf(ye, ge)) { + const Qe = [ + 218, + 219 + /* ArrowFunction */ + ].includes(Xe.parent.kind) ? 0 : le.indentSize; + return U(ye, ae, le) + Qe; + } + return o(ae, H, ge, De, Ae, le); + } + e.getIndentation = n; + function i(H, ae, le, Ae) { + const ge = Vs(H, ae).line - 1, de = Vs(H, Ae.pos).line; + if (E.assert(de >= 0), ge <= de) + return Z(dy(de, H), ae, H, le); + const ve = dy(ge, H), { column: De, character: Xe } = X(ve, ae, H, le); + return De === 0 ? De : H.text.charCodeAt(ve + Xe) === 42 ? De - 1 : De; + } + function s(H, ae, le) { + let Ae = ae; + for (; Ae > 0; ) { + const de = H.text.charCodeAt(Ae); + if (!xg(de)) + break; + Ae--; + } + const ge = Jp(Ae, H); + return Z(ge, Ae, H, le); + } + function o(H, ae, le, Ae, ge, de) { + let ve, De = le; + for (; De; ) { + if (qV(De, ae, H) && pe( + de, + De, + ve, + H, + /*isNextChild*/ + !0 + )) { + const Ie = C(De, H), ye = T(le, De, Ae, H), Fe = ye !== 0 ? ge && ye === 2 ? de.indentSize : 0 : Ae !== Ie.line ? de.indentSize : 0; + return u( + De, + Ie, + /*ignoreActualIndentationRange*/ + void 0, + Fe, + H, + /*isNextChild*/ + !0, + de + ); + } + const Xe = G( + De, + H, + de, + /*listIndentsChild*/ + !0 + ); + if (Xe !== -1) + return Xe; + ve = De, De = De.parent; + } + return _(de); + } + function c(H, ae, le, Ae) { + const ge = le.getLineAndCharacterOfPosition(H.getStart(le)); + return u( + H, + ge, + ae, + /*indentationDelta*/ + 0, + le, + /*isNextChild*/ + !1, + Ae + ); + } + e.getIndentationForNode = c; + function _(H) { + return H.baseIndentSize || 0; + } + e.getBaseIndentation = _; + function u(H, ae, le, Ae, ge, de, ve) { + var De; + let Xe = H.parent; + for (; Xe; ) { + let Ie = !0; + if (le) { + const Ke = H.getStart(ge); + Ie = Ke < le.pos || Ke > le.end; + } + const ye = d(Xe, H, ge), Fe = ye.line === ae.line || P(Xe, H, ae.line, ge); + if (Ie) { + const Ke = (De = F(H, ge)) == null ? void 0 : De[0], Be = !!Ke && C(Ke, ge).line > ye.line; + let at = G(H, ge, ve, Be); + if (at !== -1 || (at = h(H, Xe, ae, Fe, ge, ve), at !== -1)) + return at + Ae; + } + pe(ve, Xe, H, ge, de) && !Fe && (Ae += ve.indentSize); + const Qe = D(Xe, H, ae.line, ge); + H = Xe, Xe = H.parent, ae = Qe ? ge.getLineAndCharacterOfPosition(H.getStart(ge)) : ye; + } + return Ae + _(ve); + } + function d(H, ae, le) { + const Ae = F(ae, le), ge = Ae ? Ae.pos : H.getStart(le); + return le.getLineAndCharacterOfPosition(ge); + } + function g(H, ae, le) { + const Ae = rae(H); + return Ae && Ae.listItemIndex > 0 ? ce(Ae.list.getChildren(), Ae.listItemIndex - 1, ae, le) : -1; + } + function h(H, ae, le, Ae, ge, de) { + return (tu(H) || jw(H)) && (ae.kind === 307 || !Ae) ? K(le, ge, de) : -1; + } + let S; + ((H) => { + H[H.Unknown = 0] = "Unknown", H[H.OpenBrace = 1] = "OpenBrace", H[H.CloseBrace = 2] = "CloseBrace"; + })(S || (S = {})); + function T(H, ae, le, Ae) { + const ge = qb(H, ae, Ae); + if (!ge) + return 0; + if (ge.kind === 19) + return 1; + if (ge.kind === 20) { + const de = C(ge, Ae).line; + return le === de ? 2 : 0; + } + return 0; + } + function C(H, ae) { + return ae.getLineAndCharacterOfPosition(H.getStart(ae)); + } + function D(H, ae, le, Ae) { + if (!(Es(H) && ls(H.arguments, ae))) + return !1; + const ge = H.expression.getEnd(); + return Vs(Ae, ge).line === le; + } + e.isArgumentAndStartLineOverlapsExpressionBeingCalled = D; + function P(H, ae, le, Ae) { + if (H.kind === 245 && H.elseStatement === ae) { + const ge = Ya(H, 93, Ae); + return E.assert(ge !== void 0), C(ge, Ae).line === le; + } + return !1; + } + e.childStartsOnTheSameLineWithElseInIfStatement = P; + function O(H, ae, le, Ae) { + if (yx(H) && (ae === H.whenTrue || ae === H.whenFalse)) { + const ge = Vs(Ae, H.condition.end).line; + if (ae === H.whenTrue) + return le === ge; + { + const de = C(H.whenTrue, Ae).line, ve = Vs(Ae, H.whenTrue.end).line; + return ge === de && ve === le; + } + } + return !1; + } + e.childIsUnindentedBranchOfConditionalExpression = O; + function j(H, ae, le, Ae) { + if (Qd(H)) { + if (!H.arguments) return !1; + const ge = Nn(H.arguments, (Xe) => Xe.pos === ae.pos); + if (!ge) return !1; + const de = H.arguments.indexOf(ge); + if (de === 0) return !1; + const ve = H.arguments[de - 1], De = Vs(Ae, ve.getEnd()).line; + if (le === De) + return !0; + } + return !1; + } + e.argumentStartsOnSameLineAsPreviousArgument = j; + function F(H, ae) { + return H.parent && L(H.getStart(ae), H.getEnd(), H.parent, ae); + } + e.getContainingList = F; + function V(H, ae, le) { + return ae && L(H, H, ae, le); + } + function L(H, ae, le, Ae) { + switch (le.kind) { + case 183: + return ge(le.typeArguments); + case 210: + return ge(le.properties); + case 209: + return ge(le.elements); + case 187: + return ge(le.members); + case 262: + case 218: + case 219: + case 174: + case 173: + case 179: + case 176: + case 185: + case 180: + return ge(le.typeParameters) || ge(le.parameters); + case 177: + return ge(le.parameters); + case 263: + case 231: + case 264: + case 265: + case 345: + return ge(le.typeParameters); + case 214: + case 213: + return ge(le.typeArguments) || ge(le.arguments); + case 261: + return ge(le.declarations); + case 275: + case 279: + return ge(le.elements); + case 206: + case 207: + return ge(le.elements); + } + function ge(de) { + return de && nN($(le, de, Ae), H, ae) ? de : void 0; + } + } + function $(H, ae, le) { + const Ae = H.getChildren(le); + for (let ge = 1; ge < Ae.length - 1; ge++) + if (Ae[ge].pos === ae.pos && Ae[ge].end === ae.end) + return { pos: Ae[ge - 1].end, end: Ae[ge + 1].getStart(le) }; + return ae; + } + function U(H, ae, le) { + return H ? K(ae.getLineAndCharacterOfPosition(H.pos), ae, le) : -1; + } + function G(H, ae, le, Ae) { + if (H.parent && H.parent.kind === 261) + return -1; + const ge = F(H, ae); + if (ge) { + const de = ge.indexOf(H); + if (de !== -1) { + const ve = ce(ge, de, ae, le); + if (ve !== -1) + return ve; + } + return U(ge, ae, le) + (Ae ? le.indentSize : 0); + } + return -1; + } + function ce(H, ae, le, Ae) { + E.assert(ae >= 0 && ae < H.length); + const ge = H[ae]; + let de = C(ge, le); + for (let ve = ae - 1; ve >= 0; ve--) { + if (H[ve].kind === 28) + continue; + if (le.getLineAndCharacterOfPosition(H[ve].end).line !== de.line) + return K(de, le, Ae); + de = C(H[ve], le); + } + return -1; + } + function K(H, ae, le) { + const Ae = ae.getPositionOfLineAndCharacter(H.line, 0); + return Z(Ae, Ae + H.character, ae, le); + } + function X(H, ae, le, Ae) { + let ge = 0, de = 0; + for (let ve = H; ve < ae; ve++) { + const De = le.text.charCodeAt(ve); + if (!Xd(De)) + break; + De === 9 ? de += Ae.tabSize + de % Ae.tabSize : de++, ge++; + } + return { column: de, character: ge }; + } + e.findFirstNonWhitespaceCharacterAndColumn = X; + function Z(H, ae, le, Ae) { + return X(H, ae, le, Ae).column; + } + e.findFirstNonWhitespaceColumn = Z; + function oe(H, ae, le, Ae, ge) { + const de = le ? le.kind : 0; + switch (ae.kind) { + case 244: + case 263: + case 231: + case 264: + case 266: + case 265: + case 209: + case 241: + case 268: + case 210: + case 187: + case 200: + case 189: + case 217: + case 211: + case 213: + case 214: + case 243: + case 277: + case 253: + case 227: + case 207: + case 206: + case 286: + case 289: + case 285: + case 294: + case 173: + case 179: + case 180: + case 169: + case 184: + case 185: + case 196: + case 215: + case 223: + case 279: + case 275: + case 281: + case 276: + case 172: + case 296: + case 297: + return !0; + case 269: + return H.indentSwitchCase ?? !0; + case 260: + case 303: + case 226: + if (!H.indentMultiLineObjectLiteralBeginningOnBlankLine && Ae && de === 210) + return fe(Ae, le); + if (ae.kind === 226 && Ae && le && de === 284) { + const ve = Ae.getLineAndCharacterOfPosition(sa(Ae.text, ae.pos)).line, De = Ae.getLineAndCharacterOfPosition(sa(Ae.text, le.pos)).line; + return ve !== De; + } + if (ae.kind !== 226) + return !0; + break; + case 246: + case 247: + case 249: + case 250: + case 248: + case 245: + case 262: + case 218: + case 174: + case 176: + case 177: + case 178: + return de !== 241; + case 219: + return Ae && de === 217 ? fe(Ae, le) : de !== 241; + case 278: + return de !== 279; + case 272: + return de !== 273 || !!le.namedBindings && le.namedBindings.kind !== 275; + case 284: + return de !== 287; + case 288: + return de !== 290; + case 193: + case 192: + case 238: + if (de === 187 || de === 189 || de === 200) + return !1; + break; + } + return ge; + } + e.nodeWillIndentChild = oe; + function ne(H, ae) { + switch (H) { + case 253: + case 257: + case 251: + case 252: + return ae.kind !== 241; + default: + return !1; + } + } + function pe(H, ae, le, Ae, ge = !1) { + return oe( + H, + ae, + le, + Ae, + /*indentByDefault*/ + !1 + ) && !(ge && le && ne(le.kind, ae)); + } + e.shouldIndentChildNode = pe; + function fe(H, ae) { + const le = sa(H.text, ae.pos), Ae = H.getLineAndCharacterOfPosition(le).line, ge = H.getLineAndCharacterOfPosition(ae.end).line; + return Ae === ge; + } + })(vm || (vm = {})); + var MH = {}; + Qa(MH, { + pasteEditsProvider: () => kYe + }); + var xYe = "providePostPasteEdits"; + function kYe(e, t, n, i, s, o, c, _) { + return { edits: Yr.ChangeTracker.with({ host: s, formatContext: c, preferences: o }, (d) => CYe(e, t, n, i, s, o, c, _, d)), fixId: xYe }; + } + function CYe(e, t, n, i, s, o, c, _, u) { + let d; + t.length !== n.length && (d = t.length === 1 ? t : [t.join(` +`)]); + const g = []; + let h = e.text; + for (let S = n.length - 1; S >= 0; S--) { + const { pos: T, end: C } = n[S]; + h = d ? h.slice(0, T) + d[0] + h.slice(C) : h.slice(0, T) + t[S] + h.slice(C); + } + E.checkDefined(s.runWithTemporaryFileUpdate).call(s, e.fileName, h, (S, T, C) => { + const D = vu.createImportAdder(C, S, o, s); + if (i?.range) { + E.assert(i.range.length === t.length), i.range.forEach((j) => { + const F = i.file.statements, V = rc(F, ($) => $.end > j.pos); + if (V === -1) return; + let L = rc(F, ($) => $.end >= j.end, V); + L !== -1 && j.end <= F[L].getStart() && L--, g.push(...F.slice(V, L === -1 ? F.length : L + 1)); + }); + const P = w9(i.file, g, T.getTypeChecker(), Uoe(C, g, T.getTypeChecker())); + E.assertIsDefined(T); + const O = !RU(e.fileName, T, s, !!i.file.commonJsModuleIndicator); + Loe(i.file, P.targetFileImportsFromOldFile, u, O), Hoe(i.file, P.oldImportsNeededByTargetFile, P.targetFileImportsFromOldFile, T.getTypeChecker(), S, D); + } else { + const P = { + sourceFile: C, + program: T, + cancellationToken: _, + host: s, + preferences: o, + formatContext: c + }; + gs(C, function O(j) { + Re(j) && !T?.getTypeChecker().resolveName( + j.text, + j, + -1, + /*excludeGlobals*/ + !1 + ) && D.addImportForUnresolvedIdentifier( + P, + j, + /*useAutoImportProvider*/ + !0 + ), j.forEachChild(O); + }); + } + D.writeFixes(u, Rf(i ? i.file : e, o)); + }), n.forEach((S, T) => { + u.replaceRangeWithText( + e, + { pos: S.pos, end: S.end }, + d ? d[0] : t[T] + ); + }); + } + var qPe = {}; + Qa(qPe, { + ANONYMOUS: () => DU, + AccessFlags: () => yQ, + AssertionLevel: () => PX, + AssignmentDeclarationKind: () => DQ, + AssignmentKind: () => YZ, + Associativity: () => aK, + BreakpointResolver: () => Eq, + BuilderFileEmit: () => Fie, + BuilderProgramKind: () => zie, + BuilderState: () => wd, + CallHierarchy: () => Wx, + CharacterCodes: () => jQ, + CheckFlags: () => dQ, + CheckMode: () => Gz, + ClassificationType: () => FV, + ClassificationTypeNames: () => Gse, + CommentDirectiveType: () => KX, + Comparison: () => pX, + CompletionInfoFlags: () => Jse, + CompletionTriggerKind: () => IV, + Completions: () => $x, + ContainerFlags: () => lne, + ContextFlags: () => aQ, + Debug: () => E, + DiagnosticCategory: () => bI, + Diagnostics: () => p, + DocumentHighlights: () => k9, + ElementFlags: () => hQ, + EmitFlags: () => JR, + EmitHint: () => VQ, + EmitOnly: () => tQ, + EndOfLineState: () => Vse, + ExitStatus: () => rQ, + ExportKind: () => Uae, + Extension: () => BQ, + ExternalEmitHelpers: () => WQ, + FileIncludeKind: () => AR, + FilePreprocessingDiagnosticsKind: () => eQ, + FileSystemEntryKind: () => ZQ, + FileWatcherEventKind: () => XQ, + FindAllReferences: () => yo, + FlattenLevel: () => Mne, + FlowFlags: () => vI, + ForegroundColorEscapeSequences: () => Eie, + FunctionFlags: () => nK, + GeneratedIdentifierFlags: () => wR, + GetLiteralTextFlags: () => _Z, + GoToDefinition: () => b6, + HighlightSpanKind: () => jse, + IdentifierNameMap: () => XC, + IdentifierNameMultiMap: () => wne, + ImportKind: () => Vae, + ImportsNotUsedAsValues: () => OQ, + IndentStyle: () => Bse, + IndexFlags: () => vQ, + IndexKind: () => TQ, + InferenceFlags: () => CQ, + InferencePriority: () => kQ, + InlayHintKind: () => Rse, + InlayHints: () => hH, + InternalEmitFlags: () => JQ, + InternalSymbolName: () => mQ, + IntersectionFlags: () => sQ, + InvalidatedProjectKind: () => _se, + JSDocParsingMode: () => $Q, + JsDoc: () => bv, + JsTyping: () => hm, + JsxEmit: () => IQ, + JsxFlags: () => QX, + JsxReferenceKind: () => bQ, + LanguageFeatureMinimumTarget: () => zQ, + LanguageServiceMode: () => Lse, + LanguageVariant: () => MQ, + LexicalEnvironmentFlags: () => qQ, + ListFormat: () => HQ, + LogLevel: () => BX, + MapCode: () => yH, + MemberOverrideStatus: () => nQ, + ModifierFlags: () => DR, + ModuleDetectionKind: () => PQ, + ModuleInstanceState: () => one, + ModuleKind: () => _w, + ModuleResolutionKind: () => NE, + ModuleSpecifierEnding: () => see, + NavigateTo: () => foe, + NavigationBar: () => doe, + NewLineKind: () => FQ, + NodeBuilderFlags: () => oQ, + NodeCheckFlags: () => OR, + NodeFactoryFlags: () => Nee, + NodeFlags: () => ER, + NodeResolutionFeatures: () => Yre, + ObjectFlags: () => LR, + OperationCanceledException: () => AE, + OperatorPrecedence: () => oK, + OrganizeImports: () => Sv, + OrganizeImportsMode: () => NV, + OuterExpressionKinds: () => UQ, + OutliningElementsCollector: () => SH, + OutliningSpanKind: () => zse, + OutputFileType: () => Wse, + PackageJsonAutoImportPreference: () => Fse, + PackageJsonDependencyGroup: () => Ose, + PatternMatchKind: () => GU, + PollingInterval: () => zR, + PollingWatchKind: () => NQ, + PragmaKindFlags: () => GQ, + PrivateIdentifierKind: () => Wee, + ProcessLevel: () => Wne, + ProgramUpdateLevel: () => Sie, + QuotePreference: () => hae, + RegularExpressionFlags: () => YX, + RelationComparisonResult: () => PR, + Rename: () => lL, + ScriptElementKind: () => qse, + ScriptElementKindModifier: () => Hse, + ScriptKind: () => RR, + ScriptSnapshot: () => NF, + ScriptTarget: () => LQ, + SemanticClassificationFormat: () => Mse, + SemanticMeaning: () => $se, + SemicolonPreference: () => OV, + SignatureCheckMode: () => $z, + SignatureFlags: () => MR, + SignatureHelp: () => WN, + SignatureInfo: () => Oie, + SignatureKind: () => SQ, + SmartSelectionRange: () => kH, + SnippetKind: () => BR, + StatisticType: () => xse, + StructureIsReused: () => NR, + SymbolAccessibility: () => uQ, + SymbolDisplay: () => D0, + SymbolDisplayPartKind: () => OF, + SymbolFlags: () => IR, + SymbolFormatFlags: () => lQ, + SyntaxKind: () => CR, + SyntheticSymbolKind: () => _Q, + Ternary: () => EQ, + ThrottledCancellationToken: () => xce, + TokenClass: () => Use, + TokenFlags: () => ZX, + TransformFlags: () => jR, + TypeFacts: () => Hz, + TypeFlags: () => FR, + TypeFormatFlags: () => cQ, + TypeMapKind: () => xQ, + TypePredicateKind: () => fQ, + TypeReferenceSerializationKind: () => pQ, + UnionReduction: () => iQ, + UpToDateStatusType: () => ise, + VarianceFlags: () => gQ, + Version: () => gd, + VersionRange: () => hI, + WatchDirectoryFlags: () => RQ, + WatchDirectoryKind: () => AQ, + WatchFileKind: () => wQ, + WatchLogLevel: () => xie, + WatchType: () => kl, + accessPrivateIdentifier: () => Fne, + addDisposableResourceHelper: () => gte, + addEmitFlags: () => cm, + addEmitHelper: () => ox, + addEmitHelpers: () => vh, + addInternalEmitFlags: () => sx, + addNodeFactoryPatcher: () => c0e, + addObjectAllocatorPatcher: () => Ghe, + addRange: () => Bn, + addRelatedInfo: () => Fs, + addSyntheticLeadingComment: () => X4, + addSyntheticTrailingComment: () => F5, + addToSeen: () => Kp, + advancedAsyncSuperHelper: () => j5, + affectsDeclarationPathOptionDeclarations: () => yre, + affectsEmitOptionDeclarations: () => hre, + allKeysStartWithDot: () => LO, + altDirectorySeparator: () => kI, + and: () => dI, + append: () => Tr, + appendIfUnique: () => sh, + arrayFrom: () => ts, + arrayIsEqualTo: () => md, + arrayIsHomogeneous: () => dee, + arrayIsSorted: () => nge, + arrayOf: () => xX, + arrayReverseIterator: () => aR, + arrayToMap: () => jk, + arrayToMultiMap: () => sw, + arrayToNumericMap: () => CX, + arraysEqual: () => rw, + assertType: () => _ge, + assign: () => I2, + assignHelper: () => Qee, + asyncDelegator: () => Zee, + asyncGeneratorHelper: () => Yee, + asyncSuperHelper: () => R5, + asyncValues: () => Kee, + attachFileToDiagnostics: () => QT, + awaitHelper: () => Q4, + awaiterHelper: () => tte, + base64decode: () => IK, + base64encode: () => NK, + binarySearch: () => Zh, + binarySearchKey: () => hT, + bindSourceFile: () => une, + breakIntoCharacterSpans: () => ioe, + breakIntoWordSpans: () => soe, + buildLinkParts: () => Eae, + buildOpts: () => vA, + buildOverload: () => $Pe, + bundlerModuleNameResolver: () => Zre, + canBeConvertedToAsync: () => KU, + canHaveDecorators: () => jb, + canHaveExportModifier: () => U3, + canHaveFlowNode: () => g3, + canHaveIllegalDecorators: () => rz, + canHaveIllegalModifiers: () => Zte, + canHaveIllegalType: () => F0e, + canHaveIllegalTypeParameters: () => Yte, + canHaveJSDoc: () => h3, + canHaveLocals: () => Vm, + canHaveModifiers: () => ed, + canHaveSymbol: () => vd, + canIncludeBindAndCheckDiagnsotics: () => V3, + canJsonReportNoInputFiles: () => gD, + canProduceDiagnostics: () => XO, + canUsePropertyAccess: () => fJ, + canWatchAffectingLocation: () => Xie, + canWatchAtTypes: () => $ie, + canWatchDirectoryOrFile: () => pF, + cartesianProduct: () => RX, + cast: () => Is, + chainBundle: () => Pd, + chainDiagnosticMessages: () => us, + changeAnyExtension: () => dw, + changeCompilerHostLikeToUseCache: () => LD, + changeExtension: () => by, + changeFullExtension: () => rY, + changesAffectModuleResolution: () => ZI, + changesAffectingProgramStructure: () => iZ, + characterToRegularExpressionFlag: () => KR, + childIsDecorated: () => a4, + classElementOrClassElementParameterIsDecorated: () => Yj, + classHasClassThisAssignment: () => lW, + classHasDeclaredOrExplicitlyAssignedName: () => uW, + classHasExplicitlyAssignedName: () => HO, + classOrConstructorParameterIsDecorated: () => c0, + classPrivateFieldGetHelper: () => pte, + classPrivateFieldInHelper: () => mte, + classPrivateFieldSetHelper: () => dte, + classicNameResolver: () => sne, + classifier: () => Dce, + cleanExtendedConfigCache: () => nF, + clear: () => bg, + clearMap: () => N_, + clearSharedExtendedConfigFileWatcher: () => xW, + climbPastPropertyAccess: () => MF, + climbPastPropertyOrElementAccess: () => Zse, + clone: () => EX, + cloneCompilerOptions: () => KV, + closeFileWatcher: () => Zp, + closeFileWatcherOf: () => _p, + codefix: () => vu, + collapseTextChangeRangesAcrossMultipleVersions: () => hY, + collectExternalModuleInfo: () => sW, + combine: () => gT, + combinePaths: () => Mn, + commandLineOptionOfCustomType: () => xre, + commentPragmas: () => SI, + commonOptionsWithBuild: () => dO, + commonPackageFolders: () => KK, + compact: () => iw, + compareBooleans: () => I1, + compareDataObjects: () => zB, + compareDiagnostics: () => N4, + compareDiagnosticsSkipRelatedInformation: () => r5, + compareEmitHelpers: () => Uee, + compareNumberOfDirectorySeparators: () => z3, + comparePaths: () => oh, + comparePathsCaseInsensitive: () => Fge, + comparePathsCaseSensitive: () => Oge, + comparePatternKeys: () => Wz, + compareProperties: () => OX, + compareStringsCaseInsensitive: () => ow, + compareStringsCaseInsensitiveEslintCompatible: () => wX, + compareStringsCaseSensitive: () => Kl, + compareStringsCaseSensitiveUI: () => cw, + compareTextSpans: () => fI, + compareValues: () => uo, + compileOnSaveCommandLineOption: () => fO, + compilerOptionsAffectDeclarationPath: () => YK, + compilerOptionsAffectEmit: () => QK, + compilerOptionsAffectSemanticDiagnostics: () => XK, + compilerOptionsDidYouMeanDiagnostics: () => yO, + compilerOptionsIndicateEsModules: () => aU, + compose: () => lge, + computeCommonSourceDirectoryOfFilenames: () => kie, + computeLineAndCharacterOfPosition: () => Vk, + computeLineOfPosition: () => ME, + computeLineStarts: () => kT, + computePositionOfLineAndCharacter: () => wI, + computeSignature: () => Wie, + computeSignatureWithDiagnostics: () => qW, + computeSuggestionDiagnostics: () => QU, + computedOptions: () => Kc, + concatenate: () => Hi, + concatenateDiagnosticMessageChains: () => qK, + configDirTemplateSubstitutionOptions: () => Sre, + configDirTemplateSubstitutionWatchOptions: () => Tre, + consumesNodeCoreModules: () => d9, + contains: () => ls, + containsIgnoredPath: () => W4, + containsObjectRestOrSpread: () => mA, + containsParseError: () => tC, + containsPath: () => Gp, + convertCompilerOptionsForTelemetry: () => Bre, + convertCompilerOptionsFromJson: () => Uye, + convertJsonOption: () => pS, + convertToBase64: () => AK, + convertToJson: () => TA, + convertToObject: () => Ire, + convertToOptionsWithAbsolutePaths: () => TO, + convertToRelativePath: () => FE, + convertToTSConfig: () => kz, + convertTypeAcquisitionFromJson: () => qye, + copyComments: () => vS, + copyEntries: () => KI, + copyLeadingComments: () => _6, + copyProperties: () => fR, + copyTrailingAsLeadingComments: () => mN, + copyTrailingComments: () => QD, + couldStartTrivia: () => oY, + countWhere: () => ty, + createAbstractBuilder: () => Hve, + createAccessorPropertyBackingField: () => sz, + createAccessorPropertyGetRedirector: () => are, + createAccessorPropertySetRedirector: () => ore, + createBaseNodeFactory: () => Eee, + createBinaryExpressionTrampoline: () => lO, + createBindingHelper: () => M5, + createBuildInfo: () => KO, + createBuilderProgram: () => HW, + createBuilderProgramUsingProgramBuildInfo: () => Hie, + createBuilderStatusReporter: () => TF, + createCacheWithRedirects: () => Fz, + createCacheableExportInfoMap: () => jU, + createCachedDirectoryStructureHost: () => tF, + createClassNamedEvaluationHelperBlock: () => zne, + createClassThisAssignmentBlock: () => Bne, + createClassifier: () => C2e, + createCommentDirectivesMap: () => uZ, + createCompilerDiagnostic: () => zo, + createCompilerDiagnosticForInvalidCustomType: () => kre, + createCompilerDiagnosticFromMessageChain: () => t5, + createCompilerHost: () => Cie, + createCompilerHostFromProgramHost: () => fV, + createCompilerHostWorker: () => iF, + createDetachedDiagnostic: () => XT, + createDiagnosticCollection: () => b4, + createDiagnosticForFileFromMessageChain: () => Hj, + createDiagnosticForNode: () => Xr, + createDiagnosticForNodeArray: () => nC, + createDiagnosticForNodeArrayFromMessageChain: () => Hw, + createDiagnosticForNodeFromMessageChain: () => wg, + createDiagnosticForNodeInSourceFile: () => rp, + createDiagnosticForRange: () => kZ, + createDiagnosticMessageChainFromDiagnostic: () => xZ, + createDiagnosticReporter: () => Fx, + createDocumentPositionMapper: () => Dne, + createDocumentRegistry: () => Gae, + createDocumentRegistryInternal: () => UU, + createEmitAndSemanticDiagnosticsBuilderProgram: () => QW, + createEmitHelperFactory: () => Vee, + createEmptyExports: () => cA, + createEvaluator: () => xee, + createExpressionForJsxElement: () => Ute, + createExpressionForJsxFragment: () => qte, + createExpressionForObjectLiteralElementLike: () => Hte, + createExpressionForPropertyName: () => QJ, + createExpressionFromEntityName: () => lA, + createExternalHelpersImportDeclarationIfNeeded: () => KJ, + createFileDiagnostic: () => xl, + createFileDiagnosticFromMessageChain: () => l7, + createFlowNode: () => Zm, + createForOfBindingStatement: () => XJ, + createFutureSourceFile: () => T9, + createGetCanonicalFileName: () => eu, + createGetIsolatedDeclarationErrors: () => _ie, + createGetSourceFile: () => PW, + createGetSymbolAccessibilityDiagnosticForNode: () => b0, + createGetSymbolAccessibilityDiagnosticForNodeName: () => uie, + createGetSymbolWalker: () => _ne, + createIncrementalCompilerHost: () => SF, + createIncrementalProgram: () => nse, + createJsxFactoryExpression: () => $J, + createLanguageService: () => kce, + createLanguageServiceSourceFile: () => J9, + createMemberAccessForPropertyName: () => _S, + createModeAwareCache: () => UC, + createModeAwareCacheKey: () => bD, + createModuleNotFoundChain: () => e7, + createModuleResolutionCache: () => qC, + createModuleResolutionLoader: () => MW, + createModuleResolutionLoaderUsingGlobalCache: () => Kie, + createModuleSpecifierResolutionHost: () => jx, + createMultiMap: () => Kf, + createNameResolver: () => hJ, + createNodeConverters: () => wee, + createNodeFactory: () => $3, + createOptionNameMap: () => gO, + createOverload: () => RH, + createPackageJsonImportFilter: () => f6, + createPackageJsonInfo: () => AU, + createParenthesizerRules: () => Dee, + createPatternMatcher: () => Zae, + createPrinter: () => Iy, + createPrinterWithDefaults: () => vie, + createPrinterWithRemoveComments: () => gS, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => bie, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => eF, + createProgram: () => UA, + createProgramHost: () => pV, + createPropertyNameNodeForIdentifierOrLiteral: () => C5, + createQueue: () => aw, + createRange: () => np, + createRedirectedBuilderProgram: () => XW, + createResolutionCache: () => ZW, + createRuntimeTypeSerializer: () => Gne, + createScanner: () => Eg, + createSemanticDiagnosticsBuilderProgram: () => qve, + createSet: () => pR, + createSolutionBuilder: () => cse, + createSolutionBuilderHost: () => ase, + createSolutionBuilderWithWatch: () => lse, + createSolutionBuilderWithWatchHost: () => ose, + createSortedArray: () => sR, + createSourceFile: () => Cx, + createSourceMapGenerator: () => Sne, + createSourceMapSource: () => f0e, + createSuperAccessVariableStatement: () => $O, + createSymbolTable: () => Ms, + createSymlinkCache: () => ZB, + createSyntacticTypeNodeBuilder: () => Ase, + createSystemWatchFunctions: () => KQ, + createTextChange: () => oN, + createTextChangeFromStartLength: () => QF, + createTextChangeRange: () => xw, + createTextRangeFromNode: () => rU, + createTextRangeFromSpan: () => XF, + createTextSpan: () => jl, + createTextSpanFromBounds: () => Mc, + createTextSpanFromNode: () => e_, + createTextSpanFromRange: () => Fy, + createTextSpanFromStringLiteralLikeContent: () => tU, + createTextWriter: () => P3, + createTokenRange: () => RB, + createTypeChecker: () => vne, + createTypeReferenceDirectiveResolutionCache: () => NO, + createTypeReferenceResolutionLoader: () => sF, + createWatchCompilerHost: () => rbe, + createWatchCompilerHostOfConfigFile: () => dV, + createWatchCompilerHostOfFilesAndCompilerOptions: () => mV, + createWatchFactory: () => _V, + createWatchHost: () => uV, + createWatchProgram: () => gV, + createWatchStatusReporter: () => eV, + createWriteFileMeasuringIO: () => wW, + declarationNameToString: () => ao, + decodeMappings: () => rW, + decodedTextSpanIntersectsWith: () => Tw, + decorateHelper: () => qee, + deduplicate: () => tb, + defaultIncludeSpec: () => Dz, + defaultInitCompilerOptions: () => hz, + defaultMaximumTruncationLength: () => KE, + diagnosticCategoryName: () => M2, + diagnosticToString: () => Gb, + diagnosticsEqualityComparer: () => n5, + directoryProbablyExists: () => Td, + directorySeparator: () => Oo, + displayPart: () => O_, + displayPartsToString: () => PN, + disposeEmitNodes: () => bJ, + disposeResourcesHelper: () => hte, + documentSpansEqual: () => pU, + dumpTracingLegend: () => XX, + elementAt: () => ny, + elideNodes: () => sre, + emitComments: () => vK, + emitDetachedComments: () => bK, + emitFiles: () => SW, + emitFilesAndReportErrors: () => hF, + emitFilesAndReportErrorsAndGetExitStatus: () => lV, + emitModuleKindIsNonNodeESM: () => s5, + emitNewLineBeforeLeadingCommentOfPosition: () => yK, + emitNewLineBeforeLeadingComments: () => gK, + emitNewLineBeforeLeadingCommentsOfPosition: () => hK, + emitResolverSkipsTypeChecking: () => bW, + emitSkippedWithNoDiagnostics: () => WW, + emptyArray: () => He, + emptyFileSystemEntries: () => iJ, + emptyMap: () => YM, + emptyOptions: () => Bp, + emptySet: () => tge, + endsWith: () => nc, + ensurePathIsNonModuleName: () => j2, + ensureScriptKind: () => m5, + ensureTrailingDirectorySeparator: () => bl, + entityNameToString: () => Y_, + enumerateInsertsAndDeletes: () => gI, + equalOwnProperties: () => kX, + equateStringsCaseInsensitive: () => N1, + equateStringsCaseSensitive: () => O2, + equateValues: () => Kh, + esDecorateHelper: () => $ee, + escapeJsxAttributeString: () => TB, + escapeLeadingUnderscores: () => Ko, + escapeNonAsciiString: () => L7, + escapeSnippetText: () => Db, + escapeString: () => $m, + escapeTemplateSubstitution: () => bB, + evaluatorResult: () => pl, + every: () => Ri, + executeCommandLine: () => Rbe, + expandPreOrPostfixIncrementOrDecrementExpression: () => nO, + explainFiles: () => iV, + explainIfFileIsRedirectAndImpliedFormat: () => sV, + exportAssignmentIsAlias: () => pC, + exportStarHelper: () => fte, + expressionResultIsUnused: () => gee, + extend: () => _I, + extendsHelper: () => rte, + extensionFromPath: () => R4, + extensionIsTS: () => S5, + extensionsNotSupportingExtensionlessResolution: () => v5, + externalHelpersModuleNameText: () => z1, + factory: () => N, + fileExtensionIs: () => Go, + fileExtensionIsOneOf: () => Lc, + fileIncludeReasonToDiagnostics: () => cV, + fileShouldUseJavaScriptRequire: () => RU, + filter: () => Ln, + filterMutate: () => eR, + filterSemanticDiagnostics: () => lF, + find: () => Nn, + findAncestor: () => sr, + findBestPatternMatch: () => yR, + findChildOfKind: () => Ya, + findComputedPropertyNameCacheAssignment: () => uO, + findConfigFile: () => EW, + findConstructorDeclaration: () => G3, + findContainingList: () => zF, + findDiagnosticForNode: () => jae, + findFirstNonJsxWhitespaceToken: () => nae, + findIndex: () => rc, + findLast: () => eb, + findLastIndex: () => cI, + findListItemInfo: () => rae, + findMap: () => rge, + findModifier: () => c6, + findNextToken: () => qb, + findPackageJson: () => Mae, + findPackageJsons: () => wU, + findPrecedingMatchingToken: () => GF, + findPrecedingToken: () => sl, + findSuperStatementIndexPath: () => VO, + findTokenOnLeftOfPosition: () => UF, + findUseStrictPrologue: () => ZJ, + first: () => fa, + firstDefined: () => xc, + firstDefinedIterator: () => tw, + firstIterator: () => cR, + firstOrOnly: () => FU, + firstOrUndefined: () => ul, + firstOrUndefinedIterator: () => lI, + fixupCompilerOptions: () => eq, + flatMap: () => Xs, + flatMapIterator: () => tR, + flatMapToMutable: () => vE, + flatten: () => Ep, + flattenCommaList: () => cre, + flattenDestructuringAssignment: () => mS, + flattenDestructuringBinding: () => zb, + flattenDiagnosticMessageText: () => gm, + forEach: () => rr, + forEachAncestor: () => sZ, + forEachAncestorDirectory: () => $p, + forEachChild: () => gs, + forEachChildRecursively: () => kx, + forEachEmittedFile: () => gW, + forEachEnclosingBlockScopeContainer: () => bZ, + forEachEntry: () => Dl, + forEachExternalModuleToImportFrom: () => JU, + forEachImportClauseDeclaration: () => XZ, + forEachKey: () => uh, + forEachLeadingCommentRange: () => hw, + forEachNameInAccessChainWalkingLeft: () => JK, + forEachNameOfDefaultExport: () => zU, + forEachPropertyAssignment: () => aC, + forEachResolvedProjectReference: () => jW, + forEachReturnStatement: () => o0, + forEachRight: () => dX, + forEachTrailingCommentRange: () => yw, + forEachTsConfigPropArray: () => Yw, + forEachUnique: () => mU, + forEachYieldExpression: () => AZ, + forSomeAncestorDirectory: () => qhe, + formatColorAndReset: () => Wb, + formatDiagnostic: () => AW, + formatDiagnostics: () => xve, + formatDiagnosticsWithColorAndContext: () => wie, + formatGeneratedName: () => sv, + formatGeneratedNamePart: () => JC, + formatLocation: () => NW, + formatMessage: () => YT, + formatStringFromArgs: () => Og, + formatting: () => Hc, + fullTripleSlashAMDReferencePathRegEx: () => wZ, + fullTripleSlashReferencePathRegEx: () => PZ, + generateDjb2Hash: () => IE, + generateTSConfig: () => Fre, + generatorHelper: () => lte, + getAdjustedReferenceLocation: () => GV, + getAdjustedRenameLocation: () => VF, + getAliasDeclarationFromName: () => lB, + getAllAccessorDeclarations: () => gy, + getAllDecoratorsOfClass: () => oW, + getAllDecoratorsOfClassElement: () => qO, + getAllJSDocTags: () => RI, + getAllJSDocTagsOfKind: () => rhe, + getAllKeys: () => sge, + getAllProjectOutputs: () => ZO, + getAllSuperTypeNodes: () => d4, + getAllowJSCompilerOption: () => yy, + getAllowSyntheticDefaultImports: () => ZT, + getAncestor: () => $1, + getAnyExtensionFromPath: () => Wk, + getAreDeclarationMapsEnabled: () => i5, + getAssignedExpandoInitializer: () => MT, + getAssignedName: () => LI, + getAssignedNameOfIdentifier: () => AD, + getAssignmentDeclarationKind: () => mc, + getAssignmentDeclarationPropertyAccessKind: () => _3, + getAssignmentTargetKind: () => G1, + getAutomaticTypeDirectiveNames: () => wO, + getBaseFileName: () => Wc, + getBinaryOperatorPrecedence: () => E3, + getBuildInfo: () => TW, + getBuildInfoFileVersionMap: () => $W, + getBuildInfoText: () => hie, + getBuildOrderFromAnyBuildOrder: () => $A, + getBuilderCreationParameters: () => _F, + getBuilderFileEmit: () => Oy, + getCanonicalDiagnostic: () => CZ, + getCheckFlags: () => gc, + getClassExtendsHeritageElement: () => vb, + getClassLikeDeclarationOfSymbol: () => gh, + getCombinedLocalAndExportSymbolFlags: () => TC, + getCombinedModifierFlags: () => L1, + getCombinedNodeFlags: () => ch, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => sj, + getCommentRange: () => lm, + getCommonSourceDirectory: () => FD, + getCommonSourceDirectoryOfConfig: () => Ox, + getCompilerOptionValue: () => c5, + getCompilerOptionsDiffValue: () => Ore, + getConditions: () => Ay, + getConfigFileParsingDiagnostics: () => Vb, + getConstantValue: () => Lee, + getContainerFlags: () => Uz, + getContainerNode: () => yS, + getContainingClass: () => Nl, + getContainingClassExcludingClassDecorators: () => h7, + getContainingClassStaticBlock: () => JZ, + getContainingFunction: () => yf, + getContainingFunctionDeclaration: () => BZ, + getContainingFunctionOrClassStaticBlock: () => g7, + getContainingNodeArray: () => hee, + getContainingObjectLiteralElement: () => wN, + getContextualTypeFromParent: () => a9, + getContextualTypeFromParentOrAncestorTypeNode: () => WF, + getCurrentTime: () => GA, + getDeclarationDiagnostics: () => fie, + getDeclarationEmitExtensionForPath: () => j7, + getDeclarationEmitOutputFilePath: () => _K, + getDeclarationEmitOutputFilePathWorker: () => R7, + getDeclarationFileExtension: () => lz, + getDeclarationFromName: () => p4, + getDeclarationModifierFlagsFromSymbol: () => sp, + getDeclarationOfKind: () => Jo, + getDeclarationsOfKind: () => rZ, + getDeclaredExpandoInitializer: () => l4, + getDecorators: () => cy, + getDefaultCompilerOptions: () => B9, + getDefaultFormatCodeSettings: () => IF, + getDefaultLibFileName: () => bw, + getDefaultLibFilePath: () => Cce, + getDefaultLikeExportInfo: () => x9, + getDefaultLikeExportNameFromDeclaration: () => g9, + getDiagnosticText: () => g_, + getDiagnosticsWithinSpan: () => Bae, + getDirectoryPath: () => Xn, + getDirectoryToWatchFailedLookupLocation: () => YW, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => Yie, + getDocumentPositionMapper: () => XU, + getDocumentSpansEqualityComparer: () => dU, + getESModuleInterop: () => Fg, + getEditsForFileRename: () => Xae, + getEffectiveBaseTypeNode: () => tm, + getEffectiveConstraintOfTypeParameter: () => $k, + getEffectiveContainerForJSDocTemplateTag: () => A7, + getEffectiveImplementsTypeNodes: () => dC, + getEffectiveInitializer: () => o3, + getEffectiveJSDocHost: () => H1, + getEffectiveModifierFlags: () => Au, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => kK, + getEffectiveModifierFlagsNoCache: () => CK, + getEffectiveReturnTypeNode: () => K_, + getEffectiveSetAccessorTypeAnnotationNode: () => mK, + getEffectiveTypeAnnotationNode: () => Vc, + getEffectiveTypeParameterDeclarations: () => ly, + getEffectiveTypeRoots: () => vD, + getElementOrPropertyAccessArgumentExpressionOrName: () => w7, + getElementOrPropertyAccessName: () => _h, + getElementsOfBindingOrAssignmentPattern: () => BC, + getEmitDeclarations: () => op, + getEmitFlags: () => ua, + getEmitHelpers: () => L5, + getEmitModuleDetectionKind: () => HK, + getEmitModuleKind: () => Nu, + getEmitModuleResolutionKind: () => Hu, + getEmitScriptTarget: () => pa, + getEmitStandardClassFields: () => QB, + getEnclosingBlockScopeContainer: () => bd, + getEnclosingContainer: () => c7, + getEncodedSemanticClassifications: () => WU, + getEncodedSyntacticClassifications: () => VU, + getEndLinePosition: () => zw, + getEntityNameFromTypeNode: () => e3, + getEntrypointsFromPackageJsonInfo: () => Bz, + getErrorCountForSummary: () => mF, + getErrorSpanForNode: () => H2, + getErrorSummaryText: () => rV, + getEscapedTextOfIdentifierOrLiteral: () => h4, + getEscapedTextOfJsxAttributeName: () => H4, + getEscapedTextOfJsxNamespacedName: () => rx, + getExpandoInitializer: () => U1, + getExportAssignmentExpression: () => uB, + getExportInfoMap: () => SN, + getExportNeedsImportStarHelper: () => Pne, + getExpressionAssociativity: () => hB, + getExpressionPrecedence: () => v4, + getExternalHelpersModuleName: () => aO, + getExternalModuleImportEqualsDeclarationExpression: () => o4, + getExternalModuleName: () => RT, + getExternalModuleNameFromDeclaration: () => lK, + getExternalModuleNameFromPath: () => CB, + getExternalModuleNameLiteral: () => xx, + getExternalModuleRequireArgument: () => Kj, + getFallbackOptions: () => JA, + getFileEmitOutput: () => Iie, + getFileMatcherPatterns: () => d5, + getFileNamesFromConfigSpecs: () => hD, + getFileWatcherEventKind: () => UR, + getFilesInErrorForSummary: () => gF, + getFirstConstructorWithBody: () => Ng, + getFirstIdentifier: () => tf, + getFirstNonSpaceCharacterPosition: () => wae, + getFirstProjectOutput: () => vW, + getFixableErrorSpanExpression: () => IU, + getFormatCodeSettingsForWriting: () => b9, + getFullWidth: () => Jw, + getFunctionFlags: () => jc, + getHeritageClause: () => T3, + getHostSignatureFromJSDoc: () => q1, + getIdentifierAutoGenerate: () => m0e, + getIdentifierGeneratedImportReference: () => zee, + getIdentifierTypeArguments: () => tS, + getImmediatelyInvokedFunctionExpression: () => db, + getImpliedNodeFormatForFile: () => VA, + getImpliedNodeFormatForFileWorker: () => cF, + getImportNeedsImportDefaultHelper: () => iW, + getImportNeedsImportStarHelper: () => zO, + getIndentSize: () => yC, + getIndentString: () => M7, + getInferredLibraryNameResolveFrom: () => oF, + getInitializedVariables: () => P4, + getInitializerOfBinaryExpression: () => rB, + getInitializerOfBindingOrAssignmentElement: () => fA, + getInterfaceBaseTypeNodes: () => m4, + getInternalEmitFlags: () => Qp, + getInvokedExpression: () => b7, + getIsolatedModules: () => ap, + getJSDocAugmentsTag: () => DY, + getJSDocClassTag: () => cj, + getJSDocCommentRanges: () => $j, + getJSDocCommentsAndTags: () => iB, + getJSDocDeprecatedTag: () => lj, + getJSDocDeprecatedTagNoCache: () => FY, + getJSDocEnumTag: () => uj, + getJSDocHost: () => hb, + getJSDocImplementsTags: () => PY, + getJSDocOverloadTags: () => aB, + getJSDocOverrideTagNoCache: () => OY, + getJSDocParameterTags: () => Gk, + getJSDocParameterTagsNoCache: () => xY, + getJSDocPrivateTag: () => Yge, + getJSDocPrivateTagNoCache: () => AY, + getJSDocProtectedTag: () => Zge, + getJSDocProtectedTagNoCache: () => NY, + getJSDocPublicTag: () => Qge, + getJSDocPublicTagNoCache: () => wY, + getJSDocReadonlyTag: () => Kge, + getJSDocReadonlyTagNoCache: () => IY, + getJSDocReturnTag: () => LY, + getJSDocReturnType: () => Cw, + getJSDocRoot: () => fC, + getJSDocSatisfiesExpressionType: () => dJ, + getJSDocSatisfiesTag: () => _j, + getJSDocTags: () => j1, + getJSDocTagsNoCache: () => the, + getJSDocTemplateTag: () => ehe, + getJSDocThisTag: () => MI, + getJSDocType: () => R1, + getJSDocTypeAliasName: () => tz, + getJSDocTypeAssertionType: () => fD, + getJSDocTypeParameterDeclarations: () => V7, + getJSDocTypeParameterTags: () => kY, + getJSDocTypeParameterTagsNoCache: () => CY, + getJSDocTypeTag: () => M1, + getJSXImplicitImportBase: () => u5, + getJSXRuntimeImport: () => _5, + getJSXTransformEnabled: () => l5, + getKeyForCompilerOptions: () => Oz, + getLanguageVariant: () => R3, + getLastChild: () => WB, + getLeadingCommentRanges: () => kg, + getLeadingCommentRangesOfNode: () => Gj, + getLeftmostAccessExpression: () => xC, + getLeftmostExpression: () => kC, + getLibraryNameFromLibFileName: () => BW, + getLineAndCharacterOfPosition: () => Vs, + getLineInfo: () => tW, + getLineOfLocalPosition: () => S4, + getLineOfLocalPositionFromLineMap: () => K2, + getLineStartPositionForPosition: () => Jp, + getLineStarts: () => Tg, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => RK, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => MK, + getLinesBetweenPositions: () => RE, + getLinesBetweenRangeEndAndRangeStart: () => jB, + getLinesBetweenRangeEndPositions: () => Uhe, + getLiteralText: () => fZ, + getLocalNameForExternalImport: () => jC, + getLocalSymbolForExportDefault: () => C4, + getLocaleSpecificMessage: () => as, + getLocaleTimeString: () => HA, + getMappedContextSpan: () => gU, + getMappedDocumentSpan: () => r9, + getMappedLocation: () => GD, + getMatchedFileSpec: () => aV, + getMatchedIncludeSpec: () => oV, + getMeaningFromDeclaration: () => FF, + getMeaningFromLocation: () => hS, + getMembersOfDeclaration: () => NZ, + getModeForFileReference: () => zA, + getModeForResolutionAtIndex: () => Aie, + getModeForUsageLocation: () => OW, + getModifiedTime: () => TT, + getModifiers: () => sb, + getModuleInstanceState: () => Ch, + getModuleNameStringLiteralAt: () => qA, + getModuleSpecifierEndingPreference: () => oee, + getModuleSpecifierResolverHost: () => oU, + getNameForExportedSymbol: () => m9, + getNameFromImportAttribute: () => w5, + getNameFromIndexInfo: () => SZ, + getNameFromPropertyName: () => lN, + getNameOfAccessExpression: () => UB, + getNameOfCompilerOptionValue: () => Cz, + getNameOfDeclaration: () => es, + getNameOfExpando: () => eB, + getNameOfJSDocTypedef: () => TY, + getNameOfScriptTarget: () => o5, + getNameOrArgument: () => u3, + getNameTable: () => Cq, + getNamesForExportedSymbol: () => Jae, + getNamespaceDeclarationNode: () => uC, + getNewLineCharacter: () => d0, + getNewLineKind: () => bN, + getNewLineOrDefaultFromHost: () => k0, + getNewTargetContainer: () => WZ, + getNextJSDocCommentLocation: () => sB, + getNodeChildren: () => HJ, + getNodeForGeneratedName: () => dA, + getNodeId: () => ja, + getNodeKind: () => Ub, + getNodeModifiers: () => UD, + getNodeModulePathParts: () => E5, + getNonAssignedNameOfDeclaration: () => FI, + getNonAssignmentOperatorForCompoundAssignment: () => DD, + getNonAugmentationDeclaration: () => Jj, + getNonDecoratorTokenPosOfNode: () => Fj, + getNormalizedAbsolutePath: () => Xi, + getNormalizedAbsolutePathWithoutRoot: () => $R, + getNormalizedPathComponents: () => pw, + getObjectFlags: () => wn, + getOperator: () => vB, + getOperatorAssociativity: () => yB, + getOperatorPrecedence: () => C3, + getOptionFromName: () => vz, + getOptionsForLibraryResolution: () => Lz, + getOptionsNameMap: () => WC, + getOrCreateEmitNode: () => nu, + getOrCreateExternalHelpersModuleNameIfNeeded: () => Qte, + getOrUpdate: () => bE, + getOriginalNode: () => Zo, + getOriginalNodeId: () => Ku, + getOriginalSourceFile: () => Ohe, + getOutputDeclarationFileName: () => YC, + getOutputDeclarationFileNameWorker: () => hW, + getOutputExtension: () => YO, + getOutputFileNames: () => Sve, + getOutputJSFileNameWorker: () => yW, + getOutputPathsFor: () => OD, + getOutputPathsForBundle: () => QO, + getOwnEmitOutputFilePath: () => uK, + getOwnKeys: () => Gd, + getOwnValues: () => yT, + getPackageJsonInfo: () => _v, + getPackageJsonTypesVersionsPaths: () => PO, + getPackageJsonsVisibleToFile: () => Rae, + getPackageNameFromTypesPackageName: () => xD, + getPackageScopeForPath: () => TD, + getParameterSymbolFromJSDoc: () => y3, + getParameterTypeNode: () => a0e, + getParentNodeInSpan: () => _N, + getParseTreeNode: () => Ki, + getParsedCommandLineOfConfigFile: () => bA, + getPathComponents: () => vl, + getPathComponentsRelativeTo: () => YR, + getPathFromPathComponents: () => ah, + getPathUpdater: () => HU, + getPathsBasePath: () => B7, + getPatternFromSpec: () => ree, + getPendingEmitKind: () => t6, + getPositionOfLineAndCharacter: () => mw, + getPossibleGenericSignatures: () => XV, + getPossibleOriginalInputExtensionForExtension: () => fK, + getPossibleTypeArgumentsInfo: () => QV, + getPreEmitDiagnostics: () => Tve, + getPrecedingNonSpaceCharacterPosition: () => i9, + getPrivateIdentifier: () => cW, + getProperties: () => aW, + getProperty: () => uI, + getPropertyArrayElementValue: () => jZ, + getPropertyAssignmentAliasLikeExpression: () => rK, + getPropertyNameForPropertyNameNode: () => Y2, + getPropertyNameForUniqueESSymbol: () => Nhe, + getPropertyNameFromType: () => Lp, + getPropertyNameOfBindingOrAssignmentElement: () => ez, + getPropertySymbolFromBindingElement: () => t9, + getPropertySymbolsFromContextualType: () => z9, + getQuoteFromPreference: () => lU, + getQuotePreference: () => Rf, + getRangesWhere: () => iR, + getRefactorContextSpan: () => Bx, + getReferencedFileLocation: () => RD, + getRegexFromPattern: () => vy, + getRegularExpressionForWildcard: () => O4, + getRegularExpressionsForWildcards: () => f5, + getRelativePathFromDirectory: () => hd, + getRelativePathFromFile: () => LE, + getRelativePathToDirectoryOrUrl: () => xT, + getRenameLocation: () => dN, + getReplacementSpanForContextToken: () => eU, + getResolutionDiagnostic: () => UW, + getResolutionModeOverride: () => ZC, + getResolveJsonModule: () => kb, + getResolvePackageJsonExports: () => $B, + getResolvePackageJsonImports: () => XB, + getResolvedExternalModuleName: () => kB, + getRestIndicatorOfBindingOrAssignmentElement: () => oO, + getRestParameterElementType: () => Xj, + getRightMostAssignedExpression: () => c3, + getRootDeclaration: () => nm, + getRootDirectoryOfResolutionCache: () => Zie, + getRootLength: () => zm, + getRootPathSplitLength: () => Qve, + getScriptKind: () => SU, + getScriptKindFromFileName: () => g5, + getScriptTargetFeatures: () => Lj, + getSelectedEffectiveModifierFlags: () => UT, + getSelectedSyntacticModifierFlags: () => TK, + getSemanticClassifications: () => qae, + getSemanticJsxChildren: () => gC, + getSetAccessorTypeAnnotationNode: () => pK, + getSetAccessorValueParameter: () => bC, + getSetExternalModuleIndicator: () => j3, + getShebang: () => NI, + getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => nB, + getSingleVariableOfVariableStatement: () => JT, + getSnapshotText: () => Rx, + getSnippetElement: () => SJ, + getSourceFileOfModule: () => r7, + getSourceFileOfNode: () => xr, + getSourceFilePathInNewDir: () => z7, + getSourceFilePathInNewDirWorker: () => W7, + getSourceFileVersionAsHashFromText: () => yF, + getSourceFilesToEmit: () => J7, + getSourceMapRange: () => g0, + getSourceMapper: () => ooe, + getSourceTextOfNodeFromSourceFile: () => ub, + getSpanOfTokenAtPosition: () => Hm, + getSpellingSuggestion: () => F2, + getStartPositionOfLine: () => dy, + getStartPositionOfRange: () => D4, + getStartsOnNewLine: () => $4, + getStaticPropertiesAndClassStaticBlock: () => UO, + getStrictOptionValue: () => Iu, + getStringComparer: () => Bk, + getSubPatternFromSpec: () => p5, + getSuperCallFromStatement: () => WO, + getSuperContainer: () => Zw, + getSupportedCodeFixes: () => xq, + getSupportedExtensions: () => L4, + getSupportedExtensionsWithJsonIfResolveJsonModule: () => J3, + getSwitchedType: () => EU, + getSymbolId: () => $s, + getSymbolNameForPrivateIdentifier: () => x3, + getSymbolParentOrFail: () => h9, + getSymbolTarget: () => TU, + getSyntacticClassifications: () => Hae, + getSyntacticModifierFlags: () => f0, + getSyntacticModifierFlagsNoCache: () => AB, + getSynthesizedDeepClone: () => qa, + getSynthesizedDeepCloneWithReplacements: () => pN, + getSynthesizedDeepClones: () => Hb, + getSynthesizedDeepClonesWithReplacements: () => xU, + getSyntheticLeadingComments: () => PC, + getSyntheticTrailingComments: () => Z3, + getTargetLabel: () => RF, + getTargetOfBindingOrAssignmentElement: () => wy, + getTemporaryModuleResolutionState: () => SD, + getTextOfConstantValue: () => pZ, + getTextOfIdentifierOrLiteral: () => Ip, + getTextOfJSDocComment: () => Dw, + getTextOfJsxAttributeName: () => H3, + getTextOfJsxNamespacedName: () => G4, + getTextOfNode: () => sc, + getTextOfNodeFromSourceText: () => r4, + getTextOfPropertyName: () => OT, + getThisContainer: () => Uu, + getThisParameter: () => bb, + getTokenAtPosition: () => Ei, + getTokenPosOfNode: () => W1, + getTokenSourceMapRange: () => p0e, + getTouchingPropertyName: () => h_, + getTouchingToken: () => a6, + getTrailingCommentRanges: () => oy, + getTrailingSemicolonDeferringWriter: () => xB, + getTransformFlagsSubtreeExclusions: () => Iee, + getTransformers: () => mie, + getTsBuildInfoEmitOutputFilePath: () => S0, + getTsConfigObjectLiteralExpression: () => s4, + getTsConfigPropArrayElementValue: () => m7, + getTypeAnnotationNode: () => dK, + getTypeArgumentOrTypeParameterList: () => _ae, + getTypeKeywordOfTypeOnlyImport: () => fU, + getTypeNode: () => Bee, + getTypeNodeIfAccessible: () => ZD, + getTypeParameterFromJsDoc: () => QZ, + getTypeParameterOwner: () => Hge, + getTypesPackageName: () => MO, + getUILocale: () => NX, + getUniqueName: () => bS, + getUniqueSymbolId: () => Pae, + getUseDefineForClassFields: () => B3, + getWatchErrorSummaryDiagnosticMessage: () => tV, + getWatchFactory: () => CW, + group: () => TE, + groupBy: () => _R, + guessIndentation: () => eZ, + handleNoEmitOptions: () => VW, + handleWatchOptionsConfigDirTemplateSubstitution: () => xO, + hasAbstractModifier: () => xb, + hasAccessorModifier: () => im, + hasAmbientModifier: () => wB, + hasChangesInResolutions: () => Nj, + hasChildOfKind: () => iN, + hasContextSensitiveParameters: () => k5, + hasDecorators: () => wf, + hasDocComment: () => lae, + hasDynamicName: () => ph, + hasEffectiveModifier: () => ef, + hasEffectiveModifiers: () => PB, + hasEffectiveReadonlyModifier: () => T4, + hasExtension: () => zk, + hasIndexSignature: () => CU, + hasInferredType: () => Cee, + hasInitializer: () => i0, + hasInvalidEscape: () => SB, + hasJSDocNodes: () => gf, + hasJSDocParameterTags: () => EY, + hasJSFileExtension: () => Lg, + hasJsonModuleEmitEnabled: () => a5, + hasOnlyExpressionInitializer: () => U2, + hasOverrideModifier: () => U7, + hasPossibleExternalModuleReference: () => vZ, + hasProperty: () => io, + hasPropertyAccessExpressionWithName: () => KA, + hasQuestionToken: () => BT, + hasRecordedExternalHelpers: () => Xte, + hasResolutionModeOverride: () => Tee, + hasRestParameter: () => Dj, + hasScopeMarker: () => HY, + hasStaticModifier: () => Uc, + hasSyntacticModifier: () => Vn, + hasSyntacticModifiers: () => SK, + hasTSFileExtension: () => ex, + hasTabstop: () => vee, + hasTrailingDirectorySeparator: () => e0, + hasType: () => XI, + hasTypeArguments: () => Ehe, + hasZeroOrOneAsteriskCharacter: () => YB, + helperString: () => kJ, + hostGetCanonicalFileName: () => _0, + hostUsesCaseSensitiveFileNames: () => vC, + idText: () => dn, + identifierIsThisKeyword: () => DB, + identifierToKeywordKind: () => B2, + identity: () => lo, + identitySourceMapConsumer: () => nW, + ignoreSourceNewlines: () => xJ, + ignoredPaths: () => xI, + importDefaultHelper: () => _te, + importFromModuleSpecifier: () => _4, + importStarHelper: () => CJ, + indexOfAnyCharCode: () => gX, + indexOfNode: () => rC, + indicesOf: () => nw, + inferredTypesContainingFile: () => MD, + injectClassNamedEvaluationHelperBlockIfMissing: () => GO, + injectClassThisAssignmentIfMissing: () => Jne, + insertImports: () => _U, + insertLeadingStatement: () => A0e, + insertSorted: () => ry, + insertStatementAfterCustomPrologue: () => q2, + insertStatementAfterStandardPrologue: () => hhe, + insertStatementsAfterCustomPrologue: () => Ij, + insertStatementsAfterStandardPrologue: () => Pg, + intersperse: () => KM, + intrinsicTagNameToString: () => mJ, + introducesArgumentsExoticObject: () => LZ, + inverseJsxOptionMap: () => yA, + isAbstractConstructorSymbol: () => jK, + isAbstractModifier: () => xte, + isAccessExpression: () => go, + isAccessibilityModifier: () => ZV, + isAccessor: () => _y, + isAccessorModifier: () => Cte, + isAliasSymbolDeclaration: () => Phe, + isAliasableExpression: () => S3, + isAmbientModule: () => wu, + isAmbientPropertyDeclaration: () => Wj, + isAnonymousFunctionDefinition: () => y4, + isAnyDirectorySeparator: () => qR, + isAnyImportOrBareOrAccessedRequire: () => hZ, + isAnyImportOrReExport: () => Uw, + isAnyImportOrRequireStatement: () => yZ, + isAnyImportSyntax: () => IT, + isAnySupportedFileExtension: () => i0e, + isApplicableVersionedTypesKey: () => DA, + isArgumentExpressionOfElementAccess: () => zV, + isArray: () => ss, + isArrayBindingElement: () => VI, + isArrayBindingOrAssignmentElement: () => Fw, + isArrayBindingOrAssignmentPattern: () => Sj, + isArrayBindingPattern: () => v0, + isArrayLiteralExpression: () => Wl, + isArrayLiteralOrObjectLiteralDestructuringPattern: () => x0, + isArrayTypeNode: () => iA, + isArrowFunction: () => xo, + isAsExpression: () => tD, + isAssertClause: () => Nte, + isAssertEntry: () => T0e, + isAssertionExpression: () => J1, + isAssertsKeyword: () => Ste, + isAssignmentDeclaration: () => c4, + isAssignmentExpression: () => Tl, + isAssignmentOperator: () => dh, + isAssignmentPattern: () => YE, + isAssignmentTarget: () => u0, + isAsteriskToken: () => tA, + isAsyncFunction: () => g4, + isAsyncModifier: () => Z4, + isAutoAccessorPropertyDeclaration: () => u_, + isAwaitExpression: () => Cy, + isAwaitKeyword: () => AJ, + isBigIntLiteral: () => eA, + isBinaryExpression: () => cn, + isBinaryOperatorToken: () => ire, + isBindableObjectDefinePropertyCall: () => X2, + isBindableStaticAccessExpression: () => gb, + isBindableStaticElementAccessExpression: () => P7, + isBindableStaticNameExpression: () => Q2, + isBindingElement: () => da, + isBindingElementOfBareOrAccessedRequire: () => qZ, + isBindingName: () => W2, + isBindingOrAssignmentElement: () => zY, + isBindingOrAssignmentPattern: () => Iw, + isBindingPattern: () => Ts, + isBlock: () => ms, + isBlockLike: () => d6, + isBlockOrCatchScoped: () => Mj, + isBlockScope: () => Vj, + isBlockScopedContainerTopLevel: () => gZ, + isBooleanLiteral: () => QE, + isBreakOrContinueStatement: () => qE, + isBreakStatement: () => v0e, + isBuild: () => kse, + isBuildInfoFile: () => gie, + isBuilderProgram: () => tse, + isBundle: () => Fte, + isCallChain: () => J2, + isCallExpression: () => Es, + isCallExpressionTarget: () => LV, + isCallLikeExpression: () => lb, + isCallLikeOrFunctionLikeExpression: () => Tj, + isCallOrNewExpression: () => Qd, + isCallOrNewExpressionTarget: () => MV, + isCallSignatureDeclaration: () => px, + isCallToHelper: () => Y4, + isCaseBlock: () => aD, + isCaseClause: () => OC, + isCaseKeyword: () => Ete, + isCaseOrDefaultClause: () => GI, + isCatchClause: () => Rb, + isCatchClauseVariableDeclaration: () => yee, + isCatchClauseVariableDeclarationOrBindingElement: () => Rj, + isCheckJsEnabledForFile: () => j4, + isChildOfNodeWithKind: () => vhe, + isCircularBuildOrder: () => Lx, + isClassDeclaration: () => rl, + isClassElement: () => fl, + isClassExpression: () => tl, + isClassInstanceProperty: () => BY, + isClassLike: () => Qn, + isClassMemberModifier: () => yj, + isClassNamedEvaluationHelperBlock: () => Ix, + isClassOrTypeElement: () => WI, + isClassStaticBlockDeclaration: () => ac, + isClassThisAssignmentBlock: () => wD, + isCollapsedRange: () => Vhe, + isColonToken: () => vte, + isCommaExpression: () => uA, + isCommaListExpression: () => nD, + isCommaSequence: () => _D, + isCommaToken: () => yte, + isComment: () => $F, + isCommonJsExportPropertyAssignment: () => p7, + isCommonJsExportedExpression: () => OZ, + isCompoundAssignment: () => ED, + isComputedNonLiteralName: () => qw, + isComputedPropertyName: () => oa, + isConciseBody: () => qI, + isConditionalExpression: () => yx, + isConditionalTypeNode: () => Ab, + isConstAssertion: () => gJ, + isConstTypeReference: () => yd, + isConstructSignatureDeclaration: () => nA, + isConstructorDeclaration: () => ec, + isConstructorTypeNode: () => wC, + isContextualKeyword: () => I7, + isContinueStatement: () => y0e, + isCustomPrologue: () => Qw, + isDebuggerStatement: () => b0e, + isDeclaration: () => tu, + isDeclarationBindingElement: () => Nw, + isDeclarationFileName: () => Ol, + isDeclarationName: () => Gm, + isDeclarationNameOfEnumOrNamespace: () => BB, + isDeclarationReadonly: () => Gw, + isDeclarationStatement: () => QY, + isDeclarationWithTypeParameterChildren: () => qj, + isDeclarationWithTypeParameters: () => Uj, + isDecorator: () => dl, + isDecoratorTarget: () => Qse, + isDefaultClause: () => cD, + isDefaultImport: () => jT, + isDefaultModifier: () => W5, + isDefaultedExpandoInitializer: () => HZ, + isDeleteExpression: () => Pte, + isDeleteTarget: () => cB, + isDeprecatedDeclaration: () => y9, + isDestructuringAssignment: () => p0, + isDiagnosticWithLocation: () => NU, + isDiskPathRoot: () => HR, + isDoStatement: () => h0e, + isDocumentRegistryEntry: () => TN, + isDotDotDotToken: () => J5, + isDottedName: () => I3, + isDynamicName: () => F7, + isESSymbolIdentifier: () => Ihe, + isEffectiveExternalModule: () => NT, + isEffectiveModuleDeclaration: () => mZ, + isEffectiveStrictModeSourceFile: () => zj, + isElementAccessChain: () => fj, + isElementAccessExpression: () => ho, + isEmittedFileOfProgram: () => Tie, + isEmptyArrayLiteral: () => wK, + isEmptyBindingElement: () => vY, + isEmptyBindingPattern: () => yY, + isEmptyObjectLiteral: () => LB, + isEmptyStatement: () => FJ, + isEmptyStringLiteral: () => Zj, + isEntityName: () => l_, + isEntityNameExpression: () => fo, + isEnumConst: () => fb, + isEnumDeclaration: () => rv, + isEnumMember: () => Py, + isEqualityOperatorKind: () => o9, + isEqualsGreaterThanToken: () => bte, + isExclamationToken: () => rA, + isExcludedFile: () => Mre, + isExclusivelyTypeOnlyImportOrExport: () => IW, + isExpandoPropertyDeclaration: () => nx, + isExportAssignment: () => ko, + isExportDeclaration: () => Ic, + isExportModifier: () => _x, + isExportName: () => iO, + isExportNamespaceAsDefaultDeclaration: () => s7, + isExportOrDefaultModifier: () => pA, + isExportSpecifier: () => pu, + isExportsIdentifier: () => $2, + isExportsOrModuleExportsOrAlias: () => Bb, + isExpression: () => ct, + isExpressionNode: () => Sd, + isExpressionOfExternalModuleImportEqualsDeclaration: () => eae, + isExpressionOfOptionalChainRoot: () => BI, + isExpressionStatement: () => Pl, + isExpressionWithTypeArguments: () => bh, + isExpressionWithTypeArgumentsInClassExtendsClause: () => q7, + isExternalModule: () => il, + isExternalModuleAugmentation: () => _b, + isExternalModuleImportEqualsDeclaration: () => V1, + isExternalModuleIndicator: () => Mw, + isExternalModuleNameRelative: () => Sl, + isExternalModuleReference: () => Sh, + isExternalModuleSymbol: () => Kk, + isExternalOrCommonJsModule: () => A_, + isFileLevelReservedGeneratedIdentifier: () => Aw, + isFileLevelUniqueName: () => n7, + isFileProbablyExternalModule: () => gA, + isFirstDeclarationOfSymbolParameter: () => hU, + isFixablePromiseHandler: () => ZU, + isForInOrOfStatement: () => V2, + isForInStatement: () => X5, + isForInitializer: () => tp, + isForOfStatement: () => sA, + isForStatement: () => tv, + isFullSourceFile: () => l0, + isFunctionBlock: () => pb, + isFunctionBody: () => kj, + isFunctionDeclaration: () => Ac, + isFunctionExpression: () => po, + isFunctionExpressionOrArrowFunction: () => Sy, + isFunctionLike: () => ps, + isFunctionLikeDeclaration: () => so, + isFunctionLikeKind: () => DT, + isFunctionLikeOrClassStaticBlockDeclaration: () => Qk, + isFunctionOrConstructorTypeNode: () => JY, + isFunctionOrModuleBlock: () => vj, + isFunctionSymbol: () => $Z, + isFunctionTypeNode: () => Xm, + isFutureReservedKeyword: () => whe, + isGeneratedIdentifier: () => Fo, + isGeneratedPrivateIdentifier: () => z2, + isGetAccessor: () => n0, + isGetAccessorDeclaration: () => Af, + isGetOrSetAccessorDeclaration: () => Pw, + isGlobalDeclaration: () => T2e, + isGlobalScopeAugmentation: () => Zd, + isGlobalSourceFile: () => s0, + isGrammarError: () => lZ, + isHeritageClause: () => nf, + isHoistedFunction: () => _7, + isHoistedVariableStatement: () => f7, + isIdentifier: () => Re, + isIdentifierANonContextualKeyword: () => pB, + isIdentifierName: () => tK, + isIdentifierOrThisTypeNode: () => ere, + isIdentifierPart: () => t0, + isIdentifierStart: () => Cg, + isIdentifierText: () => X_, + isIdentifierTypePredicate: () => MZ, + isIdentifierTypeReference: () => pee, + isIfStatement: () => ev, + isIgnoredFileFromWildCardWatching: () => BA, + isImplicitGlob: () => eJ, + isImportAttribute: () => Ite, + isImportAttributeName: () => jY, + isImportAttributes: () => aS, + isImportCall: () => hf, + isImportClause: () => kd, + isImportDeclaration: () => oc, + isImportEqualsDeclaration: () => nl, + isImportKeyword: () => eD, + isImportMeta: () => sC, + isImportOrExportSpecifier: () => ET, + isImportOrExportSpecifierName: () => Dae, + isImportSpecifier: () => Yu, + isImportTypeAssertionContainer: () => S0e, + isImportTypeNode: () => Qm, + isImportableFile: () => BU, + isInComment: () => T0, + isInCompoundLikeAssignment: () => oB, + isInExpressionContext: () => S7, + isInJSDoc: () => n3, + isInJSFile: () => Qr, + isInJSXText: () => oae, + isInJsonFile: () => x7, + isInNonReferenceComment: () => dae, + isInReferenceComment: () => pae, + isInRightSideOfInternalImportEqualsDeclaration: () => LF, + isInString: () => Mx, + isInTemplateString: () => $V, + isInTopLevelContext: () => y7, + isInTypeQuery: () => VT, + isIncrementalCompilation: () => I4, + isIndexSignatureDeclaration: () => Pb, + isIndexedAccessTypeNode: () => Nb, + isInferTypeNode: () => rS, + isInfinityOrNaNString: () => V4, + isInitializedProperty: () => IA, + isInitializedVariable: () => M3, + isInsideJsxElement: () => HF, + isInsideJsxElementOrAttribute: () => aae, + isInsideNodeModules: () => yN, + isInsideTemplateLiteral: () => aN, + isInstanceOfExpression: () => H7, + isInstantiatedModule: () => Qz, + isInterfaceDeclaration: () => Vl, + isInternalDeclaration: () => tZ, + isInternalModuleImportEqualsDeclaration: () => LT, + isInternalName: () => YJ, + isIntersectionTypeNode: () => gx, + isIntrinsicJsxName: () => hC, + isIterationStatement: () => fy, + isJSDoc: () => Ed, + isJSDocAllType: () => Rte, + isJSDocAugmentsTag: () => Tx, + isJSDocAuthorTag: () => E0e, + isJSDocCallbackTag: () => BJ, + isJSDocClassTag: () => Bte, + isJSDocCommentContainingNode: () => $I, + isJSDocConstructSignature: () => _C, + isJSDocDeprecatedTag: () => UJ, + isJSDocEnumTag: () => oA, + isJSDocFunctionType: () => LC, + isJSDocImplementsTag: () => eO, + isJSDocImportTag: () => Jg, + isJSDocIndexSignature: () => C7, + isJSDocLikeText: () => az, + isJSDocLink: () => Lte, + isJSDocLinkCode: () => Mte, + isJSDocLinkLike: () => AT, + isJSDocLinkPlain: () => k0e, + isJSDocMemberName: () => iv, + isJSDocNameReference: () => lD, + isJSDocNamepathType: () => C0e, + isJSDocNamespaceBody: () => uhe, + isJSDocNode: () => Yk, + isJSDocNonNullableType: () => Q5, + isJSDocNullableType: () => FC, + isJSDocOptionalParameter: () => D5, + isJSDocOptionalType: () => jJ, + isJSDocOverloadTag: () => MC, + isJSDocOverrideTag: () => Z5, + isJSDocParameterTag: () => up, + isJSDocPrivateTag: () => zJ, + isJSDocPropertyLikeTag: () => HE, + isJSDocPropertyTag: () => Jte, + isJSDocProtectedTag: () => WJ, + isJSDocPublicTag: () => JJ, + isJSDocReadonlyTag: () => VJ, + isJSDocReturnTag: () => K5, + isJSDocSatisfiesExpression: () => pJ, + isJSDocSatisfiesTag: () => tO, + isJSDocSeeTag: () => D0e, + isJSDocSignature: () => Th, + isJSDocTag: () => Zk, + isJSDocTemplateTag: () => jp, + isJSDocThisTag: () => qJ, + isJSDocThrowsTag: () => w0e, + isJSDocTypeAlias: () => Np, + isJSDocTypeAssertion: () => fS, + isJSDocTypeExpression: () => nv, + isJSDocTypeLiteral: () => lS, + isJSDocTypeTag: () => uD, + isJSDocTypedefTag: () => uS, + isJSDocUnknownTag: () => P0e, + isJSDocUnknownType: () => jte, + isJSDocVariadicType: () => Y5, + isJSXTagName: () => cC, + isJsonEqual: () => T5, + isJsonSourceFile: () => Ap, + isJsxAttribute: () => dm, + isJsxAttributeLike: () => HI, + isJsxAttributeName: () => See, + isJsxAttributes: () => Mb, + isJsxChild: () => Bw, + isJsxClosingElement: () => Fb, + isJsxClosingFragment: () => Ote, + isJsxElement: () => jg, + isJsxExpression: () => oD, + isJsxFragment: () => Lb, + isJsxNamespacedName: () => Cd, + isJsxOpeningElement: () => pm, + isJsxOpeningFragment: () => cS, + isJsxOpeningLikeElement: () => ru, + isJsxOpeningLikeElementTagName: () => Yse, + isJsxSelfClosingElement: () => oS, + isJsxSpreadAttribute: () => Sx, + isJsxTagNameExpression: () => ZE, + isJsxText: () => cx, + isJumpStatementTarget: () => eN, + isKeyword: () => qu, + isKeywordOrPunctuation: () => N7, + isKnownSymbol: () => k3, + isLabelName: () => BV, + isLabelOfLabeledStatement: () => jV, + isLabeledStatement: () => Dy, + isLateVisibilityPaintedStatement: () => o7, + isLeftHandSideExpression: () => __, + isLeftHandSideOfAssignment: () => Whe, + isLet: () => u7, + isLineBreak: () => _u, + isLiteralComputedPropertyDeclarationName: () => b3, + isLiteralExpression: () => ob, + isLiteralExpressionOfObject: () => gj, + isLiteralImportTypeNode: () => a0, + isLiteralKind: () => GE, + isLiteralLikeAccess: () => D7, + isLiteralLikeElementAccess: () => l3, + isLiteralNameOfPropertyDeclarationOrIndexAccess: () => jF, + isLiteralTypeLikeExpression: () => L0e, + isLiteralTypeLiteral: () => UY, + isLiteralTypeNode: () => y0, + isLocalName: () => xh, + isLogicalOperator: () => EK, + isLogicalOrCoalescingAssignmentExpression: () => NB, + isLogicalOrCoalescingAssignmentOperator: () => x4, + isLogicalOrCoalescingBinaryExpression: () => N3, + isLogicalOrCoalescingBinaryOperator: () => A3, + isMappedTypeNode: () => iS, + isMemberName: () => Dg, + isMetaProperty: () => rD, + isMethodDeclaration: () => hc, + isMethodOrAccessor: () => PT, + isMethodSignature: () => um, + isMinusToken: () => wJ, + isMissingDeclaration: () => x0e, + isMissingPackageJsonInfo: () => $re, + isModifier: () => Qs, + isModifierKind: () => r0, + isModifierLike: () => Lo, + isModuleAugmentationExternal: () => Bj, + isModuleBlock: () => _m, + isModuleBody: () => GY, + isModuleDeclaration: () => Nc, + isModuleExportsAccessExpression: () => Ag, + isModuleIdentifier: () => tB, + isModuleName: () => nre, + isModuleOrEnumDeclaration: () => Rw, + isModuleReference: () => ZY, + isModuleSpecifierLike: () => e9, + isModuleWithStringLiteralName: () => a7, + isNameOfFunctionDeclaration: () => VV, + isNameOfModuleDeclaration: () => WV, + isNamedClassElement: () => she, + isNamedDeclaration: () => Bl, + isNamedEvaluation: () => Z_, + isNamedEvaluationSource: () => dB, + isNamedExportBindings: () => dj, + isNamedExports: () => lp, + isNamedImportBindings: () => Cj, + isNamedImports: () => fm, + isNamedImportsOrExports: () => K7, + isNamedTupleMember: () => AC, + isNamespaceBody: () => lhe, + isNamespaceExport: () => Ym, + isNamespaceExportDeclaration: () => aA, + isNamespaceImport: () => Rg, + isNamespaceReexportDeclaration: () => UZ, + isNewExpression: () => Ib, + isNewExpressionTarget: () => WD, + isNoSubstitutionTemplateLiteral: () => lx, + isNode: () => nhe, + isNodeArray: () => ab, + isNodeArrayMultiLine: () => LK, + isNodeDescendantOf: () => yb, + isNodeKind: () => ww, + isNodeLikeSystem: () => SR, + isNodeModulesDirectory: () => EI, + isNodeWithPossibleHoistedDeclaration: () => KZ, + isNonContextualKeyword: () => fB, + isNonExportDefaultModifier: () => R0e, + isNonGlobalAmbientModule: () => jj, + isNonGlobalDeclaration: () => Wae, + isNonNullAccess: () => bee, + isNonNullChain: () => JI, + isNonNullExpression: () => vx, + isNonStaticMethodOrAccessorWithPrivateName: () => Ane, + isNotEmittedOrPartiallyEmittedNode: () => che, + isNotEmittedStatement: () => RJ, + isNullishCoalesce: () => pj, + isNumber: () => iy, + isNumericLiteral: () => m_, + isNumericLiteralName: () => Mg, + isObjectBindingElementWithoutPropertyName: () => uN, + isObjectBindingOrAssignmentElement: () => Ow, + isObjectBindingOrAssignmentPattern: () => bj, + isObjectBindingPattern: () => If, + isObjectLiteralElement: () => Ej, + isObjectLiteralElementLike: () => lh, + isObjectLiteralExpression: () => Gs, + isObjectLiteralMethod: () => Yp, + isObjectLiteralOrClassExpressionMethodOrAccessor: () => d7, + isObjectTypeDeclaration: () => $T, + isOctalDigit: () => AI, + isOmittedExpression: () => ml, + isOptionalChain: () => fu, + isOptionalChainRoot: () => VE, + isOptionalDeclaration: () => q4, + isOptionalJSDocPropertyLikeTag: () => q3, + isOptionalTypeNode: () => V5, + isOuterExpression: () => sO, + isOutermostOptionalChain: () => UE, + isOverrideModifier: () => kte, + isPackageJsonInfo: () => AO, + isPackedArrayLiteral: () => _J, + isParameter: () => ji, + isParameterPropertyDeclaration: () => Q_, + isParameterPropertyModifier: () => XE, + isParenthesizedExpression: () => Qu, + isParenthesizedTypeNode: () => nS, + isParseTreeNode: () => WE, + isPartOfParameterDeclaration: () => X1, + isPartOfTypeNode: () => em, + isPartOfTypeQuery: () => T7, + isPartiallyEmittedExpression: () => $5, + isPatternMatch: () => pI, + isPinnedComment: () => i7, + isPlainJsFile: () => t4, + isPlusToken: () => PJ, + isPossiblyTypeArgumentPosition: () => sN, + isPostfixUnaryExpression: () => OJ, + isPrefixUnaryExpression: () => Ey, + isPrimitiveLiteralValue: () => A5, + isPrivateIdentifier: () => wi, + isPrivateIdentifierClassElementDeclaration: () => Pu, + isPrivateIdentifierPropertyAccessExpression: () => Xk, + isPrivateIdentifierSymbol: () => iK, + isProgramBundleEmitBuildInfo: () => Jie, + isProgramUptoDate: () => JW, + isPrologueDirective: () => Kd, + isPropertyAccessChain: () => jI, + isPropertyAccessEntityNameExpression: () => O3, + isPropertyAccessExpression: () => Dn, + isPropertyAccessOrQualifiedName: () => Lw, + isPropertyAccessOrQualifiedNameOrImportTypeNode: () => WY, + isPropertyAssignment: () => qc, + isPropertyDeclaration: () => rs, + isPropertyName: () => Rc, + isPropertyNameLiteral: () => rm, + isPropertySignature: () => I_, + isProtoSetter: () => sK, + isPrototypeAccess: () => hy, + isPrototypePropertyAssignment: () => f3, + isPunctuation: () => _B, + isPushOrUnshiftIdentifier: () => mB, + isQualifiedName: () => $u, + isQuestionDotToken: () => z5, + isQuestionOrExclamationToken: () => Kte, + isQuestionOrPlusOrMinusToken: () => rre, + isQuestionToken: () => xy, + isRawSourceMap: () => kne, + isReadonlyKeyword: () => Tte, + isReadonlyKeywordOrPlusOrMinusToken: () => tre, + isRecognizedTripleSlashComment: () => Oj, + isReferenceFileLocation: () => KC, + isReferencedFile: () => pv, + isRegularExpressionLiteral: () => EJ, + isRequireCall: () => d_, + isRequireVariableStatement: () => s3, + isRestParameter: () => Um, + isRestTypeNode: () => U5, + isReturnStatement: () => Mp, + isReturnStatementWithFixablePromiseHandler: () => C9, + isRightSideOfAccessExpression: () => FB, + isRightSideOfInstanceofExpression: () => PK, + isRightSideOfPropertyAccess: () => i6, + isRightSideOfQualifiedName: () => Kse, + isRightSideOfQualifiedNameOrPropertyAccess: () => k4, + isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => DK, + isRootedDiskPath: () => $_, + isSameEntityName: () => lC, + isSatisfiesExpression: () => G5, + isScopeMarker: () => qY, + isSemicolonClassElement: () => wte, + isSetAccessor: () => Yd, + isSetAccessorDeclaration: () => rf, + isShebangTrivia: () => tj, + isShiftOperatorOrHigher: () => nz, + isShorthandAmbientModuleSymbol: () => Vw, + isShorthandPropertyAssignment: () => du, + isSignedNumericLiteral: () => O7, + isSimpleCopiableExpression: () => Jb, + isSimpleInlineableExpression: () => mm, + isSimpleParameter: () => Lne, + isSimpleParameterList: () => OA, + isSingleOrDoubleQuote: () => a3, + isSourceFile: () => yi, + isSourceFileFromLibrary: () => p6, + isSourceFileJS: () => p_, + isSourceFileNotJS: () => She, + isSourceFileNotJson: () => k7, + isSourceMapping: () => Ene, + isSpecialPropertyDeclaration: () => GZ, + isSpreadAssignment: () => Bg, + isSpreadElement: () => cp, + isStatement: () => hi, + isStatementButNotDeclaration: () => jw, + isStatementOrBlock: () => YY, + isStatementWithLocals: () => cZ, + isStatic: () => Os, + isStaticModifier: () => fx, + isString: () => Gi, + isStringAKeyword: () => Ahe, + isStringANonContextualKeyword: () => WT, + isStringAndEmptyAnonymousObjectIntersection: () => fae, + isStringDoubleQuoted: () => E7, + isStringLiteral: () => Ks, + isStringLiteralLike: () => Ga, + isStringLiteralOrJsxExpression: () => KY, + isStringLiteralOrTemplate: () => Oae, + isStringOrNumericLiteralLike: () => Pf, + isStringOrRegularExpressionOrTemplateLiteral: () => YV, + isStringTextContainingNode: () => hj, + isSuperCall: () => G2, + isSuperKeyword: () => K4, + isSuperOrSuperProperty: () => bhe, + isSuperProperty: () => f_, + isSupportedSourceFileName: () => cee, + isSwitchStatement: () => sD, + isSyntaxList: () => RC, + isSyntheticExpression: () => g0e, + isSyntheticReference: () => bx, + isTagName: () => JV, + isTaggedTemplateExpression: () => Ob, + isTaggedTemplateTag: () => Xse, + isTemplateExpression: () => q5, + isTemplateHead: () => ux, + isTemplateLiteral: () => wT, + isTemplateLiteralKind: () => uy, + isTemplateLiteralToken: () => MY, + isTemplateLiteralTypeNode: () => Dte, + isTemplateLiteralTypeSpan: () => NJ, + isTemplateMiddle: () => DJ, + isTemplateMiddleOrTemplateTail: () => zI, + isTemplateSpan: () => iD, + isTemplateTail: () => B5, + isTextWhiteSpaceLike: () => yae, + isThis: () => s6, + isThisContainerOrFunctionBlock: () => zZ, + isThisIdentifier: () => my, + isThisInTypeQuery: () => Tb, + isThisInitializedDeclaration: () => v7, + isThisInitializedObjectBindingExpression: () => VZ, + isThisProperty: () => Kw, + isThisTypeNode: () => NC, + isThisTypeParameter: () => U4, + isThisTypePredicate: () => RZ, + isThrowStatement: () => MJ, + isToken: () => CT, + isTokenKind: () => mj, + isTraceEnabled: () => kh, + isTransientSymbol: () => qm, + isTrivia: () => mC, + isTryStatement: () => sS, + isTupleTypeNode: () => mx, + isTypeAlias: () => m3, + isTypeAliasDeclaration: () => Rp, + isTypeAssertionExpression: () => IJ, + isTypeDeclaration: () => tx, + isTypeElement: () => cb, + isTypeKeyword: () => qD, + isTypeKeywordToken: () => iU, + isTypeKeywordTokenOrIdentifier: () => YF, + isTypeLiteralNode: () => Xu, + isTypeNode: () => ai, + isTypeNodeKind: () => VB, + isTypeOfExpression: () => IC, + isTypeOnlyExportDeclaration: () => RY, + isTypeOnlyImportDeclaration: () => $E, + isTypeOnlyImportOrExportDeclaration: () => B1, + isTypeOperatorNode: () => K1, + isTypeParameterDeclaration: () => Mo, + isTypePredicateNode: () => dx, + isTypeQueryNode: () => wb, + isTypeReferenceNode: () => Nf, + isTypeReferenceType: () => QI, + isTypeUsableAsPropertyName: () => Fp, + isUMDExportSymbol: () => Z7, + isUnaryExpression: () => xj, + isUnaryExpressionWithWrite: () => VY, + isUnicodeIdentifierStart: () => PI, + isUnionTypeNode: () => ky, + isUrl: () => tY, + isValidBigIntString: () => x5, + isValidESSymbolDeclaration: () => FZ, + isValidTypeOnlyAliasUseSite: () => Y1, + isValueSignatureDeclaration: () => zT, + isVarAwaitUsing: () => $w, + isVarConst: () => iC, + isVarConstLike: () => DZ, + isVarUsing: () => Xw, + isVariableDeclaration: () => ti, + isVariableDeclarationInVariableStatement: () => i4, + isVariableDeclarationInitializedToBareOrAccessedRequire: () => mb, + isVariableDeclarationInitializedToRequire: () => i3, + isVariableDeclarationList: () => Il, + isVariableLike: () => FT, + isVariableLikeOrAccessor: () => IZ, + isVariableStatement: () => yc, + isVoidExpression: () => hx, + isWatchSet: () => JB, + isWhileStatement: () => LJ, + isWhiteSpaceLike: () => xg, + isWhiteSpaceSingleLine: () => Xd, + isWithStatement: () => Ate, + isWriteAccess: () => GT, + isWriteOnlyAccess: () => Y7, + isYieldExpression: () => H5, + jsxModeNeedsExplicitImport: () => MU, + keywordPart: () => af, + last: () => ia, + lastOrUndefined: () => Bo, + length: () => Dr, + libMap: () => fz, + libs: () => pO, + lineBreakPart: () => u6, + linkNamePart: () => Cae, + linkPart: () => vU, + linkTextPart: () => n9, + listFiles: () => nV, + loadModuleFromGlobalCache: () => ane, + loadWithModeAwareCache: () => WA, + makeIdentifierFromModuleName: () => dZ, + makeImport: () => Ly, + makeStringLiteral: () => HD, + mangleScopedPackageName: () => GC, + map: () => or, + mapAllOrFail: () => rR, + mapDefined: () => Ii, + mapDefinedEntries: () => yX, + mapDefinedIterator: () => P1, + mapEntries: () => bX, + mapIterator: () => yE, + mapOneOrMany: () => OU, + mapToDisplayParts: () => My, + matchFiles: () => tJ, + matchPatternOrExact: () => sJ, + matchedText: () => MX, + matchesExclude: () => EO, + maybeBind: () => Ns, + maybeSetLocalizedDiagnosticMessages: () => UK, + memoize: () => Wu, + memoizeCached: () => cge, + memoizeOne: () => Bm, + memoizeWeak: () => oge, + metadataHelper: () => Hee, + min: () => dR, + minAndMax: () => _ee, + missingFileModifiedTime: () => G_, + modifierToFlag: () => qT, + modifiersToFlags: () => sm, + moduleOptionDeclaration: () => dre, + moduleResolutionIsEqualTo: () => aZ, + moduleResolutionNameAndModeGetter: () => LW, + moduleResolutionOptionDeclarations: () => dz, + moduleResolutionSupportsPackageJsonExportsAndImports: () => KT, + moduleResolutionUsesNodeModules: () => ZF, + moduleSpecifierToValidIdentifier: () => vN, + moduleSpecifiers: () => fv, + moduleSymbolToValidIdentifier: () => KD, + moveEmitHelpers: () => Ree, + moveRangeEnd: () => X7, + moveRangePastDecorators: () => mh, + moveRangePastModifiers: () => am, + moveRangePos: () => Q1, + moveSyntheticComments: () => Fee, + mutateMap: () => A4, + mutateMapSkippingNewValues: () => Ig, + needsParentheses: () => s9, + needsScopeMarker: () => UI, + newCaseClauseTracker: () => S9, + newPrivateEnvironment: () => One, + noEmitNotification: () => LA, + noEmitSubstitution: () => ID, + noTransformers: () => die, + noTruncationMaximumTruncationLength: () => wj, + nodeCanBeDecorated: () => t3, + nodeHasName: () => kw, + nodeIsDecorated: () => oC, + nodeIsMissing: () => ic, + nodeIsPresent: () => wp, + nodeIsSynthesized: () => oo, + nodeModuleNameResolver: () => Kre, + nodeModulesPathPart: () => zg, + nodeNextJsonConfigResolver: () => ene, + nodeOrChildIsDecorated: () => r3, + nodeOverlapsWithStartEnd: () => BF, + nodePosToString: () => phe, + nodeSeenTracker: () => o6, + nodeStartsNewLexicalEnvironment: () => gB, + nodeToDisplayParts: () => h2e, + noop: () => ka, + noopFileWatcher: () => jD, + normalizePath: () => Cs, + normalizeSlashes: () => Rl, + not: () => mI, + notImplemented: () => Rs, + notImplementedResolver: () => yie, + nullNodeConverters: () => Aee, + nullParenthesizerRules: () => Pee, + nullTransformationContext: () => RA, + objectAllocator: () => zl, + operatorPart: () => $D, + optionDeclarations: () => Dd, + optionMapToObject: () => bO, + optionsAffectingProgramStructure: () => vre, + optionsForBuild: () => gz, + optionsForWatch: () => Dx, + optionsHaveChanges: () => eC, + optionsHaveModuleResolutionChanges: () => nZ, + or: () => Ef, + orderedRemoveItem: () => xE, + orderedRemoveItemAt: () => ay, + packageIdToPackageName: () => t7, + packageIdToString: () => py, + paramHelper: () => Gee, + parameterIsThisKeyword: () => Sb, + parameterNamePart: () => Sae, + parseBaseNodeFactory: () => lre, + parseBigInt: () => fee, + parseBuildCommand: () => wre, + parseCommandLine: () => Dre, + parseCommandLineWorker: () => yz, + parseConfigFileTextToJson: () => bz, + parseConfigFileWithSystem: () => ese, + parseConfigHostFromCompilerHostLike: () => uF, + parseCustomTypeOption: () => hO, + parseIsolatedEntityName: () => Ex, + parseIsolatedJSDocComment: () => _re, + parseJSDocTypeExpressionForTests: () => iye, + parseJsonConfigFileContent: () => Oye, + parseJsonSourceFileConfigFileContent: () => xA, + parseJsonText: () => hA, + parseListTypeOption: () => Cre, + parseNodeFactory: () => av, + parseNodeModuleFromPath: () => EA, + parsePackageName: () => FO, + parsePseudoBigInt: () => J4, + parseValidBigInt: () => lJ, + pasteEdits: () => MH, + patchWriteFileEnsuringDirectory: () => eY, + pathContainsNodeModules: () => uv, + pathIsAbsolute: () => OE, + pathIsBareSpecifier: () => GR, + pathIsRelative: () => Df, + patternText: () => LX, + perfLogger: () => Vu, + performIncrementalCompilation: () => rse, + performance: () => UX, + plainJSErrors: () => zW, + positionBelongsToNode: () => qV, + positionIsASICandidate: () => l9, + positionIsSynthesized: () => xd, + positionsAreOnSameLine: () => ip, + preProcessFile: () => B2e, + probablyUsesSemicolons: () => gN, + processCommentPragmas: () => uz, + processPragmasIntoFields: () => _z, + processTaggedTemplateExpression: () => _W, + programContainsEsModules: () => gae, + programContainsModules: () => mae, + projectReferenceIsEqualTo: () => Aj, + propKeyHelper: () => ate, + propertyNamePart: () => Tae, + pseudoBigIntToString: () => Eb, + punctuationPart: () => yu, + pushIfUnique: () => Zf, + quote: () => YD, + quotePreferenceFromString: () => cU, + rangeContainsPosition: () => tN, + rangeContainsPositionExclusive: () => rN, + rangeContainsRange: () => Mf, + rangeContainsRangeExclusive: () => tae, + rangeContainsStartEnd: () => nN, + rangeEndIsOnSameLineAsRangeStart: () => L3, + rangeEndPositionsAreOnSameLine: () => OK, + rangeEquals: () => oR, + rangeIsOnSingleLine: () => eS, + rangeOfNode: () => oJ, + rangeOfTypeParameters: () => cJ, + rangeOverlapsWithStartEnd: () => VD, + rangeStartIsOnSameLineAsRangeEnd: () => FK, + rangeStartPositionsAreOnSameLine: () => Q7, + readBuilderProgram: () => bF, + readConfigFile: () => SA, + readHelper: () => ite, + readJson: () => E4, + readJsonConfigFile: () => Are, + readJsonOrUndefined: () => MB, + reduceEachLeadingCommentRange: () => lY, + reduceEachTrailingCommentRange: () => uY, + reduceLeft: () => Eu, + reduceLeftIterator: () => mX, + reducePathComponents: () => R2, + refactor: () => zx, + regExpEscape: () => Khe, + regularExpressionFlagToCharacter: () => jge, + relativeComplement: () => SX, + removeAllComments: () => Q3, + removeEmitHelper: () => d0e, + removeExtension: () => W3, + removeFileExtension: () => Gu, + removeIgnoredPath: () => fF, + removeMinAndVersionNumbers: () => gR, + removeOptionality: () => cae, + removePrefix: () => kE, + removeSuffix: () => Jk, + removeTrailingDirectorySeparator: () => F1, + repeatString: () => cN, + replaceElement: () => uR, + replaceFirstStar: () => ix, + resolutionExtensionIsTSOrJson: () => M4, + resolveConfigFileProjectName: () => hV, + resolveJSModule: () => Qre, + resolveLibrary: () => IO, + resolveModuleName: () => Ax, + resolveModuleNameFromCache: () => o1e, + resolvePackageNameToPackageJson: () => Iz, + resolvePath: () => O1, + resolveProjectReferencePath: () => e6, + resolveTripleslashReference: () => DW, + resolveTypeReferenceDirective: () => Hre, + resolvingEmptyArray: () => Pj, + restHelper: () => ete, + returnFalse: () => $d, + returnNoopFileWatcher: () => BD, + returnTrue: () => A1, + returnUndefined: () => nb, + returnsPromise: () => YU, + runInitializersHelper: () => Xee, + sameFlatMap: () => hX, + sameMap: () => Zc, + sameMapping: () => Y1e, + scanShebangTrivia: () => rj, + scanTokenAtPosition: () => EZ, + scanner: () => Ou, + screenStartingMessageCodes: () => KW, + semanticDiagnosticsOptionDeclarations: () => gre, + serializeCompilerOptions: () => SO, + server: () => XPe, + servicesVersion: () => LTe, + setCommentRange: () => el, + setConfigFileInOptions: () => Ez, + setConstantValue: () => Mee, + setEachParent: () => s0e, + setEmitFlags: () => Kr, + setFunctionNameHelper: () => ote, + setGetSourceFileAsHashVersioned: () => vF, + setIdentifierAutoGenerate: () => K3, + setIdentifierGeneratedImportReference: () => Jee, + setIdentifierTypeArguments: () => h0, + setInternalEmitFlags: () => Y3, + setLocalizedDiagnosticMessages: () => VK, + setModuleDefaultHelper: () => ute, + setNodeChildren: () => rO, + setNodeFlags: () => mee, + setObjectAllocator: () => WK, + setOriginalNode: () => kn, + setParent: () => Da, + setParentRecursive: () => yh, + setPrivateIdentifier: () => dS, + setSnippetElement: () => TJ, + setSourceMapRange: () => aa, + setStackTraceLimit: () => xge, + setStartsOnNewLine: () => O5, + setSyntheticLeadingComments: () => Z1, + setSyntheticTrailingComments: () => ax, + setSys: () => wge, + setSysLog: () => YQ, + setTextRange: () => ot, + setTextRangeEnd: () => DC, + setTextRangePos: () => z4, + setTextRangePosEnd: () => om, + setTextRangePosWidth: () => uJ, + setTokenSourceMapRange: () => Oee, + setTypeNode: () => jee, + setUILocale: () => IX, + setValueDeclaration: () => p3, + shouldAllowImportingTsExtension: () => $C, + shouldPreserveConstEnums: () => Cb, + shouldUseUriStyleNodeCoreModules: () => v9, + showModuleSpecifier: () => BK, + signatureHasLiteralTypes: () => Yz, + signatureHasRestParameter: () => gu, + signatureToDisplayParts: () => bU, + single: () => lR, + singleElementArray: () => ST, + singleIterator: () => vX, + singleOrMany: () => jm, + singleOrUndefined: () => Rm, + skipAlias: () => Jl, + skipAssertions: () => I0e, + skipConstraint: () => sU, + skipOuterExpressions: () => Bc, + skipParentheses: () => Ja, + skipPartiallyEmittedExpressions: () => Xp, + skipTrivia: () => sa, + skipTypeChecking: () => B4, + skipTypeParentheses: () => f4, + skipWhile: () => jX, + sliceAfter: () => aJ, + some: () => ut, + sort: () => rb, + sortAndDeduplicate: () => SE, + sortAndDeduplicateDiagnostics: () => qk, + sourceFileAffectingCompilerOptions: () => mz, + sourceFileMayBeEmitted: () => Z2, + sourceMapCommentRegExp: () => Kz, + sourceMapCommentRegExpDontCareLineStart: () => Tne, + spacePart: () => _c, + spanMap: () => nR, + spreadArrayHelper: () => ste, + stableSort: () => Sg, + startEndContainsRange: () => UV, + startEndOverlapsWithStartEnd: () => JF, + startOnNewLine: () => mu, + startTracing: () => $X, + startsWith: () => zi, + startsWithDirectory: () => QR, + startsWithUnderscore: () => LU, + startsWithUseStrict: () => Gte, + stringContainsAt: () => zae, + stringToToken: () => ib, + stripQuotes: () => Op, + supportedDeclarationExtensions: () => h5, + supportedJSExtensions: () => iee, + supportedJSExtensionsFlat: () => CC, + supportedLocaleDirectories: () => SY, + supportedTSExtensions: () => F4, + supportedTSExtensionsFlat: () => rJ, + supportedTSImplementationExtensions: () => y5, + suppressLeadingAndTrailingTrivia: () => of, + suppressLeadingTrivia: () => kU, + suppressTrailingTrivia: () => Aae, + symbolEscapedNameNoDefault: () => KF, + symbolName: () => uc, + symbolNameNoDefault: () => uU, + symbolPart: () => bae, + symbolToDisplayParts: () => XD, + syntaxMayBeASICandidate: () => Lae, + syntaxRequiresTrailingSemicolonOrASI: () => c9, + sys: () => _l, + sysLog: () => fw, + tagNamesAreEquivalent: () => cv, + takeWhile: () => bR, + targetOptionDeclaration: () => pz, + templateObjectHelper: () => nte, + testFormatSettings: () => c2e, + textChangeRangeIsUnchanged: () => gY, + textChangeRangeNewSpan: () => zE, + textChanges: () => Yr, + textOrKeywordPart: () => yU, + textPart: () => jf, + textRangeContainsPositionInclusive: () => Sw, + textSpanContainsPosition: () => ij, + textSpanContainsTextSpan: () => fY, + textSpanEnd: () => wc, + textSpanIntersection: () => mY, + textSpanIntersectsWith: () => II, + textSpanIntersectsWithPosition: () => dY, + textSpanIntersectsWithTextSpan: () => qge, + textSpanIsEmpty: () => _Y, + textSpanOverlap: () => pY, + textSpanOverlapsWith: () => Uge, + textSpansEqual: () => l6, + textToKeywordObj: () => DI, + timestamp: () => Io, + toArray: () => vT, + toBuilderFileEmit: () => Uie, + toBuilderStateFileInfoForMultiEmit: () => Vie, + toEditorSettings: () => DN, + toFileNameLowerCase: () => sy, + toLowerCase: () => DX, + toPath: () => _o, + toProgramEmitPending: () => qie, + tokenIsIdentifierOrKeyword: () => Du, + tokenIsIdentifierOrKeywordOrGreaterThan: () => iY, + tokenToString: () => Ws, + trace: () => Wi, + tracing: () => rn, + tracingEnabled: () => uw, + transform: () => qTe, + transformClassFields: () => Hne, + transformDeclarations: () => mW, + transformECMAScriptModule: () => dW, + transformES2015: () => aie, + transformES2016: () => sie, + transformES2017: () => Qne, + transformES2018: () => Yne, + transformES2019: () => Zne, + transformES2020: () => Kne, + transformES2021: () => eie, + transformESDecorators: () => Xne, + transformESNext: () => tie, + transformGenerators: () => oie, + transformJsx: () => iie, + transformLegacyDecorators: () => $ne, + transformModule: () => pW, + transformNamedEvaluation: () => sf, + transformNodeModule: () => lie, + transformNodes: () => MA, + transformSystemModule: () => cie, + transformTypeScript: () => qne, + transpile: () => $2e, + transpileDeclaration: () => H2e, + transpileModule: () => loe, + transpileOptionValueCompilerOptions: () => bre, + tryAddToSet: () => ih, + tryAndIgnoreErrors: () => f9, + tryCast: () => Jn, + tryDirectoryExists: () => _9, + tryExtractTSExtension: () => G7, + tryFileExists: () => hN, + tryGetClassExtendingExpressionWithTypeArguments: () => IB, + tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => OB, + tryGetDirectories: () => u9, + tryGetExtensionFromPath: () => hh, + tryGetImportFromModuleSpecifier: () => d3, + tryGetJSDocSatisfiesTypeNode: () => P5, + tryGetModuleNameFromFile: () => _A, + tryGetModuleSpecifierFromDeclaration: () => u4, + tryGetNativePerformanceHooks: () => VX, + tryGetPropertyAccessOrIdentifierToString: () => F3, + tryGetPropertyNameOfBindingOrAssignmentElement: () => cO, + tryGetSourceMappingURL: () => xne, + tryGetTextOfPropertyName: () => n4, + tryIOAndConsumeErrors: () => p9, + tryParseJson: () => $7, + tryParsePattern: () => EC, + tryParsePatterns: () => b5, + tryParseRawSourceMap: () => Cne, + tryReadDirectory: () => PU, + tryReadFile: () => mD, + tryRemoveDirectoryPrefix: () => KB, + tryRemoveExtension: () => uee, + tryRemovePrefix: () => vR, + tryRemoveSuffix: () => FX, + typeAcquisitionDeclarations: () => mO, + typeAliasNamePart: () => xae, + typeDirectiveIsEqualTo: () => oZ, + typeKeywords: () => nU, + typeParameterNamePart: () => kae, + typeToDisplayParts: () => fN, + unchangedPollThresholds: () => TI, + unchangedTextChangeRange: () => OI, + unescapeLeadingUnderscores: () => Pi, + unmangleScopedPackageName: () => PA, + unorderedRemoveItem: () => bT, + unorderedRemoveItemAt: () => hR, + unreachableCodeIsError: () => GK, + unsetNodeChildren: () => GJ, + unusedLabelIsError: () => $K, + unwrapInnermostStatementOfLabel: () => Qj, + unwrapParenthesizedExpression: () => kee, + updateErrorForNoInputFiles: () => CO, + updateLanguageServiceSourceFile: () => kq, + updateMissingFilePathsWatch: () => kW, + updateResolutionField: () => VC, + updateSharedExtendedConfigFileWatcher: () => rF, + updateSourceFile: () => oz, + updateWatchingWildcardDirectories: () => jA, + usesExtensionsOnImports: () => aee, + usingSingleLineStringWriter: () => e4, + utf16EncodeAsString: () => JE, + validateLocaleAndSetLanguage: () => aj, + valuesHelper: () => cte, + version: () => dd, + versionMajorMinor: () => N2, + visitArray: () => AA, + visitCommaListElements: () => NA, + visitEachChild: () => gr, + visitFunctionBody: () => Lf, + visitIterationBody: () => Zu, + visitLexicalEnvironment: () => Zz, + visitNode: () => Ge, + visitNodes: () => Ar, + visitParameterList: () => cc, + walkUpBindingElementsAndPatterns: () => Hk, + walkUpLexicalEnvironments: () => Ine, + walkUpOuterExpressions: () => $te, + walkUpParenthesizedExpressions: () => fh, + walkUpParenthesizedTypes: () => v3, + walkUpParenthesizedTypesAndGetParentAndChild: () => eK, + whitespaceOrMapCommentRegExp: () => eW, + writeCommentRange: () => SC, + writeFile: () => w3, + writeFileEnsuringDirectories: () => EB, + zipWith: () => ZM + }); + var HPe; + function EYe() { + return HPe ?? (HPe = new gd(dd)); + } + function GPe(e, t, n, i, s) { + let o = t ? "DeprecationError: " : "DeprecationWarning: "; + return o += `'${e}' `, o += i ? `has been deprecated since v${i}` : "is deprecated", o += t ? " and can no longer be used." : n ? ` and will no longer be usable after v${n}.` : ".", o += s ? ` ${Og(s, [e])}` : "", o; + } + function DYe(e, t, n, i) { + const s = GPe( + e, + /*error*/ + !0, + t, + n, + i + ); + return () => { + throw new TypeError(s); + }; + } + function PYe(e, t, n, i) { + let s = !1; + return () => { + s || (E.log.warn(GPe( + e, + /*error*/ + !1, + t, + n, + i + )), s = !0); + }; + } + function wYe(e, t = {}) { + const n = typeof t.typeScriptVersion == "string" ? new gd(t.typeScriptVersion) : t.typeScriptVersion ?? EYe(), i = typeof t.errorAfter == "string" ? new gd(t.errorAfter) : t.errorAfter, s = typeof t.warnAfter == "string" ? new gd(t.warnAfter) : t.warnAfter, o = typeof t.since == "string" ? new gd(t.since) : t.since ?? s, c = t.error || i && n.compareTo(i) >= 0, _ = !s || n.compareTo(s) >= 0; + return c ? DYe(e, i, o, t.message) : _ ? PYe(e, i, o, t.message) : ka; + } + function AYe(e, t) { + return function() { + return e(), t.apply(this, arguments); + }; + } + function NYe(e, t) { + const n = wYe(t?.name ?? E.getFunctionName(e), t); + return AYe(n, e); + } + function RH(e, t, n, i) { + if (Object.defineProperty(o, "name", { ...Object.getOwnPropertyDescriptor(o, "name"), value: e }), i) + for (const c of Object.keys(i)) { + const _ = +c; + !isNaN(_) && io(t, `${_}`) && (t[_] = NYe(t[_], { ...i[_], name: e })); + } + const s = IYe(t, n); + return o; + function o(...c) { + const _ = s(c), u = _ !== void 0 ? t[_] : void 0; + if (typeof u == "function") + return u(...c); + throw new TypeError("Invalid arguments"); + } + } + function IYe(e, t) { + return (n) => { + for (let i = 0; io(e, `${i}`) && io(t, `${i}`); i++) { + const s = t[i]; + if (s(n)) + return i; + } + }; + } + function $Pe(e) { + return { + overload: (t) => ({ + bind: (n) => ({ + finish: () => RH(e, t, n), + deprecate: (i) => ({ + finish: () => RH(e, t, n, i) + }) + }) + }) + }; + } + var XPe = {}; + Qa(XPe, { + ActionInvalidate: () => wF, + ActionPackageInstalled: () => AF, + ActionSet: () => PF, + ActionWatchTypingLocations: () => YA, + Arguments: () => AV, + AutoImportProviderProject: () => q_e, + AuxiliaryProject: () => V_e, + CharRangeSection: () => dfe, + CloseFileWatcherEvent: () => YH, + CommandNames: () => Ewe, + ConfigFileDiagEvent: () => HH, + ConfiguredProject: () => H_e, + ConfiguredProjectLoadKind: () => Z_e, + CreateDirectoryWatcherEvent: () => QH, + CreateFileWatcherEvent: () => XH, + Errors: () => Ph, + EventBeginInstallTypes: () => PV, + EventEndInstallTypes: () => wV, + EventInitializationFailed: () => Nse, + EventTypesRegistry: () => DV, + ExternalProject: () => JH, + GcTimer: () => I_e, + InferredProject: () => W_e, + LargeFileReferencedEvent: () => qH, + LineIndex: () => s8, + LineLeaf: () => yL, + LineNode: () => D6, + LogLevel: () => x_e, + Msg: () => k_e, + OpenFileInfoTelemetryEvent: () => G_e, + Project: () => Yx, + ProjectInfoTelemetryEvent: () => $H, + ProjectKind: () => KN, + ProjectLanguageServiceStateEvent: () => GH, + ProjectLoadingFinishEvent: () => UH, + ProjectLoadingStartEvent: () => VH, + ProjectService: () => ife, + ProjectsUpdatedInBackgroundEvent: () => gL, + ScriptInfo: () => M_e, + ScriptVersionCache: () => lG, + Session: () => Nwe, + TextStorage: () => L_e, + ThrottledOperations: () => N_e, + TypingsCache: () => R_e, + TypingsInstallerAdapter: () => Mwe, + allFilesAreJsOrDts: () => B_e, + allRootFilesAreJsOrDts: () => j_e, + asNormalizedPath: () => KPe, + convertCompilerOptions: () => hL, + convertFormatOptions: () => k6, + convertScriptKindName: () => KH, + convertTypeAcquisition: () => X_e, + convertUserPreferences: () => Q_e, + convertWatchOptions: () => n8, + countEachFileTypes: () => e8, + createInstallTypingsRequest: () => C_e, + createModuleSpecifierCache: () => ofe, + createNormalizedPathMap: () => ewe, + createPackageJsonCache: () => cfe, + createSortedArray: () => A_e, + emptyArray: () => al, + findArgument: () => Qbe, + forEachResolvedProjectReferenceProject: () => nG, + formatDiagnosticToProtocol: () => i8, + formatMessage: () => lfe, + getBaseConfigFileName: () => jH, + getLocationInNewDocument: () => pfe, + hasArgument: () => Xbe, + hasNoTypeScriptSource: () => J_e, + indent: () => zD, + isBackgroundProject: () => r8, + isConfigFile: () => sfe, + isConfiguredProject: () => P0, + isDynamicFileName: () => ZN, + isExternalProject: () => t8, + isInferredProject: () => x6, + isInferredProjectName: () => E_e, + isProjectDeferredClose: () => mL, + makeAutoImportProviderProjectName: () => P_e, + makeAuxiliaryProjectName: () => w_e, + makeInferredProjectName: () => D_e, + maxFileSize: () => WH, + maxProgramSizeForNonTsFiles: () => zH, + normalizedPathToPath: () => YN, + nowString: () => Ybe, + nullCancellationToken: () => xwe, + nullTypingsInstaller: () => BH, + protocol: () => O_e, + removeSorted: () => twe, + stringifyIndented: () => dv, + toEvent: () => ufe, + toNormalizedPath: () => Wo, + tryConvertScriptKindName: () => ZH, + typingsInstaller: () => T_e, + updateProjectIfDirty: () => fp + }); + var T_e = {}; + Qa(T_e, { + TypingsInstaller: () => LYe, + getNpmCommandForInstallation: () => YPe, + installNpmPackages: () => FYe, + typingsName: () => ZPe + }); + var OYe = { + isEnabled: () => !1, + writeLine: ka + }; + function QPe(e, t, n, i) { + try { + const s = Ax(t, Mn(e, "index.d.ts"), { + moduleResolution: 2 + /* Node10 */ + }, n); + return s.resolvedModule && s.resolvedModule.resolvedFileName; + } catch (s) { + i.isEnabled() && i.writeLine(`Failed to resolve ${t} in folder '${e}': ${s.message}`); + return; + } + } + function FYe(e, t, n, i) { + let s = !1; + for (let o = n.length; o > 0; ) { + const c = YPe(e, t, n, o); + o = c.remaining, s = i(c.command) || s; + } + return s; + } + function YPe(e, t, n, i) { + const s = n.length - i; + let o, c = i; + for (; o = `${e} install --ignore-scripts ${(c === n.length ? n : n.slice(s, s + c)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`, !(o.length < 8e3); ) + c = c - Math.floor(c / 2); + return { command: o, remaining: i - c }; + } + var LYe = class { + constructor(e, t, n, i, s, o = OYe) { + this.installTypingHost = e, this.globalCachePath = t, this.safeListPath = n, this.typesMapLocation = i, this.throttleLimit = s, this.log = o, this.packageNameToTypingLocation = /* @__PURE__ */ new Map(), this.missingTypingsSet = /* @__PURE__ */ new Set(), this.knownCachesSet = /* @__PURE__ */ new Set(), this.projectWatchers = /* @__PURE__ */ new Map(), this.pendingRunRequests = [], this.installRunCount = 1, this.inFlightRequestCount = 0, this.latestDistTag = "latest", this.log.isEnabled() && this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${i}`), this.processCacheLocation(this.globalCachePath); + } + /** @internal */ + handleRequest(e) { + switch (e.kind) { + case "discover": + this.install(e); + break; + case "closeProject": + this.closeProject(e); + break; + case "typesRegistry": { + const t = {}; + this.typesRegistry.forEach((i, s) => { + t[s] = i; + }); + const n = { kind: DV, typesRegistry: t }; + this.sendResponse(n); + break; + } + case "installPackage": { + this.installPackage(e); + break; + } + default: + E.assertNever(e); + } + } + closeProject(e) { + this.closeWatchers(e.projectName); + } + closeWatchers(e) { + if (this.log.isEnabled() && this.log.writeLine(`Closing file watchers for project '${e}'`), !this.projectWatchers.get(e)) { + this.log.isEnabled() && this.log.writeLine(`No watchers are registered for project '${e}'`); + return; + } + this.projectWatchers.delete(e), this.sendResponse({ kind: YA, projectName: e, files: [] }), this.log.isEnabled() && this.log.writeLine(`Closing file watchers for project '${e}' - done.`); + } + install(e) { + this.log.isEnabled() && this.log.writeLine(`Got install request${dv(e)}`), e.cachePath && (this.log.isEnabled() && this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`), this.processCacheLocation(e.cachePath)), this.safeList === void 0 && this.initializeSafeList(); + const t = hm.discoverTypings( + this.installTypingHost, + this.log.isEnabled() ? (n) => this.log.writeLine(n) : void 0, + e.fileNames, + e.projectRootPath, + this.safeList, + this.packageNameToTypingLocation, + e.typeAcquisition, + e.unresolvedImports, + this.typesRegistry, + e.compilerOptions + ); + this.watchFiles(e.projectName, t.filesToWatch), t.newTypingNames.length ? this.installTypings(e, e.cachePath || this.globalCachePath, t.cachedTypingPaths, t.newTypingNames) : (this.sendResponse(this.createSetTypings(e, t.cachedTypingPaths)), this.log.isEnabled() && this.log.writeLine("No new typings were requested as a result of typings discovery")); + } + /** @internal */ + installPackage(e) { + const { fileName: t, packageName: n, projectName: i, projectRootPath: s, id: o } = e, c = $p(Xn(t), (_) => { + if (this.installTypingHost.fileExists(Mn(_, "package.json"))) + return _; + }) || s; + if (c) + this.installWorker(-1, [n], c, (_) => { + const u = _ ? `Package ${n} installed.` : `There was an error installing ${n}.`, d = { + kind: AF, + projectName: i, + id: o, + success: _, + message: u + }; + this.sendResponse(d); + }); + else { + const _ = { + kind: AF, + projectName: i, + id: o, + success: !1, + message: "Could not determine a project root path." + }; + this.sendResponse(_); + } + } + initializeSafeList() { + if (this.typesMapLocation) { + const e = hm.loadTypesMap(this.installTypingHost, this.typesMapLocation); + if (e) { + this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`), this.safeList = e; + return; + } + this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`); + } + this.safeList = hm.loadSafeList(this.installTypingHost, this.safeListPath); + } + processCacheLocation(e) { + if (this.log.isEnabled() && this.log.writeLine(`Processing cache location '${e}'`), this.knownCachesSet.has(e)) { + this.log.isEnabled() && this.log.writeLine("Cache location was already processed..."); + return; + } + const t = Mn(e, "package.json"), n = Mn(e, "package-lock.json"); + if (this.log.isEnabled() && this.log.writeLine(`Trying to find '${t}'...`), this.installTypingHost.fileExists(t) && this.installTypingHost.fileExists(n)) { + const i = JSON.parse(this.installTypingHost.readFile(t)), s = JSON.parse(this.installTypingHost.readFile(n)); + if (this.log.isEnabled() && (this.log.writeLine(`Loaded content of '${t}':${dv(i)}`), this.log.writeLine(`Loaded content of '${n}':${dv(s)}`)), i.devDependencies && s.dependencies) + for (const o in i.devDependencies) { + if (!io(s.dependencies, o)) + continue; + const c = Wc(o); + if (!c) + continue; + const _ = QPe(e, c, this.installTypingHost, this.log); + if (!_) { + this.missingTypingsSet.add(c); + continue; + } + const u = this.packageNameToTypingLocation.get(c); + if (u) { + if (u.typingLocation === _) + continue; + this.log.isEnabled() && this.log.writeLine(`New typing for package ${c} from '${_}' conflicts with existing typing file '${u}'`); + } + this.log.isEnabled() && this.log.writeLine(`Adding entry into typings cache: '${c}' => '${_}'`); + const d = uI(s.dependencies, o), g = d && d.version; + if (!g) + continue; + const h = { typingLocation: _, version: new gd(g) }; + this.packageNameToTypingLocation.set(c, h); + } + } + this.log.isEnabled() && this.log.writeLine(`Finished processing cache location '${e}'`), this.knownCachesSet.add(e); + } + filterTypings(e) { + return Ii(e, (t) => { + const n = GC(t); + if (this.missingTypingsSet.has(n)) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: '${n}' is in missingTypingsSet - skipping...`); + return; + } + const i = hm.validatePackageName(t); + if (i !== hm.NameValidationResult.Ok) { + this.missingTypingsSet.add(n), this.log.isEnabled() && this.log.writeLine(hm.renderPackageNameValidationFailure(i, t)); + return; + } + if (!this.typesRegistry.has(n)) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: Entry for package '${n}' does not exist in local types registry - skipping...`); + return; + } + if (this.packageNameToTypingLocation.get(n) && hm.isTypingUpToDate(this.packageNameToTypingLocation.get(n), this.typesRegistry.get(n))) { + this.log.isEnabled() && this.log.writeLine(`'${t}':: '${n}' already has an up-to-date typing - skipping...`); + return; + } + return n; + }); + } + ensurePackageDirectoryExists(e) { + const t = Mn(e, "package.json"); + this.log.isEnabled() && this.log.writeLine(`Npm config file: ${t}`), this.installTypingHost.fileExists(t) || (this.log.isEnabled() && this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`), this.ensureDirectoryExists(e, this.installTypingHost), this.installTypingHost.writeFile(t, '{ "private": true }')); + } + installTypings(e, t, n, i) { + this.log.isEnabled() && this.log.writeLine(`Installing typings ${JSON.stringify(i)}`); + const s = this.filterTypings(i); + if (s.length === 0) { + this.log.isEnabled() && this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"), this.sendResponse(this.createSetTypings(e, n)); + return; + } + this.ensurePackageDirectoryExists(t); + const o = this.installRunCount; + this.installRunCount++, this.sendResponse({ + kind: PV, + eventId: o, + typingsInstallerVersion: dd, + projectName: e.projectName + }); + const c = s.map(ZPe); + this.installTypingsAsync(o, c, t, (_) => { + try { + if (!_) { + this.log.isEnabled() && this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(s)}`); + for (const d of s) + this.missingTypingsSet.add(d); + return; + } + this.log.isEnabled() && this.log.writeLine(`Installed typings ${JSON.stringify(c)}`); + const u = []; + for (const d of s) { + const g = QPe(t, d, this.installTypingHost, this.log); + if (!g) { + this.missingTypingsSet.add(d); + continue; + } + const h = this.typesRegistry.get(d), S = new gd(h[`ts${N2}`] || h[this.latestDistTag]), T = { typingLocation: g, version: S }; + this.packageNameToTypingLocation.set(d, T), u.push(g); + } + this.log.isEnabled() && this.log.writeLine(`Installed typing files ${JSON.stringify(u)}`), this.sendResponse(this.createSetTypings(e, n.concat(u))); + } finally { + const u = { + kind: wV, + eventId: o, + projectName: e.projectName, + packagesToInstall: c, + installSuccess: _, + typingsInstallerVersion: dd + }; + this.sendResponse(u); + } + }); + } + ensureDirectoryExists(e, t) { + const n = Xn(e); + t.directoryExists(n) || this.ensureDirectoryExists(n, t), t.directoryExists(e) || t.createDirectory(e); + } + watchFiles(e, t) { + if (!t.length) { + this.closeWatchers(e); + return; + } + const n = this.projectWatchers.get(e), i = new Set(t); + !n || uh(i, (s) => !n.has(s)) || uh(n, (s) => !i.has(s)) ? (this.projectWatchers.set(e, i), this.sendResponse({ kind: YA, projectName: e, files: t })) : this.sendResponse({ kind: YA, projectName: e, files: void 0 }); + } + createSetTypings(e, t) { + return { + projectName: e.projectName, + typeAcquisition: e.typeAcquisition, + compilerOptions: e.compilerOptions, + typings: t, + unresolvedImports: e.unresolvedImports, + kind: PF + }; + } + installTypingsAsync(e, t, n, i) { + this.pendingRunRequests.unshift({ requestId: e, packageNames: t, cwd: n, onRequestCompleted: i }), this.executeWithThrottling(); + } + executeWithThrottling() { + for (; this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length; ) { + this.inFlightRequestCount++; + const e = this.pendingRunRequests.pop(); + this.installWorker(e.requestId, e.packageNames, e.cwd, (t) => { + this.inFlightRequestCount--, e.onRequestCompleted(t), this.executeWithThrottling(); + }); + } + } + }; + function ZPe(e) { + return `@types/${e}@ts${N2}`; + } + var x_e = /* @__PURE__ */ ((e) => (e[e.terse = 0] = "terse", e[e.normal = 1] = "normal", e[e.requestTime = 2] = "requestTime", e[e.verbose = 3] = "verbose", e))(x_e || {}), al = A_e(), k_e = /* @__PURE__ */ ((e) => (e.Err = "Err", e.Info = "Info", e.Perf = "Perf", e))(k_e || {}); + function C_e(e, t, n, i) { + return { + projectName: e.getProjectName(), + fileNames: e.getFileNames( + /*excludeFilesFromExternalLibraries*/ + !0, + /*excludeConfigFiles*/ + !0 + ).concat(e.getExcludedFiles()), + compilerOptions: e.getCompilationSettings(), + typeAcquisition: t, + unresolvedImports: n, + projectRootPath: e.getCurrentDirectory(), + cachePath: i, + kind: "discover" + }; + } + var Ph; + ((e) => { + function t() { + throw new Error("No Project."); + } + e.ThrowNoProject = t; + function n() { + throw new Error("The project's language service is disabled."); + } + e.ThrowProjectLanguageServiceDisabled = n; + function i(s, o) { + throw new Error(`Project '${o.getProjectName()}' does not contain document '${s}'`); + } + e.ThrowProjectDoesNotContainDocument = i; + })(Ph || (Ph = {})); + function Wo(e) { + return Cs(e); + } + function YN(e, t, n) { + const i = $_(e) ? e : Xi(e, t); + return n(i); + } + function KPe(e) { + return e; + } + function ewe() { + const e = /* @__PURE__ */ new Map(); + return { + get(t) { + return e.get(t); + }, + set(t, n) { + e.set(t, n); + }, + contains(t) { + return e.has(t); + }, + remove(t) { + e.delete(t); + } + }; + } + function E_e(e) { + return /dev\/null\/inferredProject\d+\*/.test(e); + } + function D_e(e) { + return `/dev/null/inferredProject${e}*`; + } + function P_e(e) { + return `/dev/null/autoImportProviderProject${e}*`; + } + function w_e(e) { + return `/dev/null/auxiliaryProject${e}*`; + } + function A_e() { + return []; + } + var N_e = class b5e { + constructor(t, n) { + this.host = t, this.pendingTimeouts = /* @__PURE__ */ new Map(), this.logger = n.hasLevel( + 3 + /* verbose */ + ) ? n : void 0; + } + /** + * Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule + * is called again with the same `operationId`, cancel this operation in favor + * of the new one. (Note that the amount of time the canceled operation had been + * waiting does not affect the amount of time that the new operation waits.) + */ + schedule(t, n, i) { + const s = this.pendingTimeouts.get(t); + s && this.host.clearTimeout(s), this.pendingTimeouts.set(t, this.host.setTimeout(b5e.run, n, t, this, i)), this.logger && this.logger.info(`Scheduled: ${t}${s ? ", Cancelled earlier one" : ""}`); + } + cancel(t) { + const n = this.pendingTimeouts.get(t); + return n ? (this.host.clearTimeout(n), this.pendingTimeouts.delete(t)) : !1; + } + static run(t, n, i) { + var s, o; + (s = Vu) == null || s.logStartScheduledOperation(t), n.pendingTimeouts.delete(t), n.logger && n.logger.info(`Running: ${t}`), i(), (o = Vu) == null || o.logStopScheduledOperation(); + } + }, I_e = class S5e { + constructor(t, n, i) { + this.host = t, this.delay = n, this.logger = i; + } + scheduleCollect() { + !this.host.gc || this.timerId !== void 0 || (this.timerId = this.host.setTimeout(S5e.run, this.delay, this)); + } + static run(t) { + var n, i; + t.timerId = void 0, (n = Vu) == null || n.logStartScheduledOperation("GC collect"); + const s = t.logger.hasLevel( + 2 + /* requestTime */ + ), o = s && t.host.getMemoryUsage(); + if (t.host.gc(), s) { + const c = t.host.getMemoryUsage(); + t.logger.perftrc(`GC::before ${o}, after ${c}`); + } + (i = Vu) == null || i.logStopScheduledOperation(); + } + }; + function jH(e) { + const t = Wc(e); + return t === "tsconfig.json" || t === "jsconfig.json" ? t : void 0; + } + function twe(e, t, n) { + if (!e || e.length === 0) + return; + if (e[0] === t) { + e.splice(0, 1); + return; + } + const i = Zh(e, t, lo, n); + i >= 0 && e.splice(i, 1); + } + var O_e = {}; + Qa(O_e, { + ClassificationType: () => FV, + CommandTypes: () => F_e, + CompletionTriggerKind: () => IV, + IndentStyle: () => swe, + JsxEmit: () => awe, + ModuleKind: () => owe, + ModuleResolutionKind: () => cwe, + NewLineKind: () => lwe, + OrganizeImportsMode: () => NV, + PollingWatchKind: () => iwe, + ScriptTarget: () => uwe, + SemicolonPreference: () => OV, + WatchDirectoryKind: () => nwe, + WatchFileKind: () => rwe + }); + var F_e = /* @__PURE__ */ ((e) => (e.JsxClosingTag = "jsxClosingTag", e.LinkedEditingRange = "linkedEditingRange", e.Brace = "brace", e.BraceFull = "brace-full", e.BraceCompletion = "braceCompletion", e.GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", e.Change = "change", e.Close = "close", e.Completions = "completions", e.CompletionInfo = "completionInfo", e.CompletionsFull = "completions-full", e.CompletionDetails = "completionEntryDetails", e.CompletionDetailsFull = "completionEntryDetails-full", e.CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", e.CompileOnSaveEmitFile = "compileOnSaveEmitFile", e.Configure = "configure", e.Definition = "definition", e.DefinitionFull = "definition-full", e.DefinitionAndBoundSpan = "definitionAndBoundSpan", e.DefinitionAndBoundSpanFull = "definitionAndBoundSpan-full", e.Implementation = "implementation", e.ImplementationFull = "implementation-full", e.EmitOutput = "emit-output", e.Exit = "exit", e.FileReferences = "fileReferences", e.FileReferencesFull = "fileReferences-full", e.Format = "format", e.Formatonkey = "formatonkey", e.FormatFull = "format-full", e.FormatonkeyFull = "formatonkey-full", e.FormatRangeFull = "formatRange-full", e.Geterr = "geterr", e.GeterrForProject = "geterrForProject", e.SemanticDiagnosticsSync = "semanticDiagnosticsSync", e.SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", e.SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", e.NavBar = "navbar", e.NavBarFull = "navbar-full", e.Navto = "navto", e.NavtoFull = "navto-full", e.NavTree = "navtree", e.NavTreeFull = "navtree-full", e.DocumentHighlights = "documentHighlights", e.DocumentHighlightsFull = "documentHighlights-full", e.Open = "open", e.Quickinfo = "quickinfo", e.QuickinfoFull = "quickinfo-full", e.References = "references", e.ReferencesFull = "references-full", e.Reload = "reload", e.Rename = "rename", e.RenameInfoFull = "rename-full", e.RenameLocationsFull = "renameLocations-full", e.Saveto = "saveto", e.SignatureHelp = "signatureHelp", e.SignatureHelpFull = "signatureHelp-full", e.FindSourceDefinition = "findSourceDefinition", e.Status = "status", e.TypeDefinition = "typeDefinition", e.ProjectInfo = "projectInfo", e.ReloadProjects = "reloadProjects", e.Unknown = "unknown", e.OpenExternalProject = "openExternalProject", e.OpenExternalProjects = "openExternalProjects", e.CloseExternalProject = "closeExternalProject", e.SynchronizeProjectList = "synchronizeProjectList", e.ApplyChangedToOpenFiles = "applyChangedToOpenFiles", e.UpdateOpen = "updateOpen", e.EncodedSyntacticClassificationsFull = "encodedSyntacticClassifications-full", e.EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full", e.Cleanup = "cleanup", e.GetOutliningSpans = "getOutliningSpans", e.GetOutliningSpansFull = "outliningSpans", e.TodoComments = "todoComments", e.Indentation = "indentation", e.DocCommentTemplate = "docCommentTemplate", e.CompilerOptionsDiagnosticsFull = "compilerOptionsDiagnostics-full", e.NameOrDottedNameSpan = "nameOrDottedNameSpan", e.BreakpointStatement = "breakpointStatement", e.CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", e.GetCodeFixes = "getCodeFixes", e.GetCodeFixesFull = "getCodeFixes-full", e.GetCombinedCodeFix = "getCombinedCodeFix", e.GetCombinedCodeFixFull = "getCombinedCodeFix-full", e.ApplyCodeActionCommand = "applyCodeActionCommand", e.GetSupportedCodeFixes = "getSupportedCodeFixes", e.GetApplicableRefactors = "getApplicableRefactors", e.GetEditsForRefactor = "getEditsForRefactor", e.GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", e.GetPasteEdits = "getPasteEdits", e.GetEditsForRefactorFull = "getEditsForRefactor-full", e.OrganizeImports = "organizeImports", e.OrganizeImportsFull = "organizeImports-full", e.GetEditsForFileRename = "getEditsForFileRename", e.GetEditsForFileRenameFull = "getEditsForFileRename-full", e.ConfigurePlugin = "configurePlugin", e.SelectionRange = "selectionRange", e.SelectionRangeFull = "selectionRange-full", e.ToggleLineComment = "toggleLineComment", e.ToggleLineCommentFull = "toggleLineComment-full", e.ToggleMultilineComment = "toggleMultilineComment", e.ToggleMultilineCommentFull = "toggleMultilineComment-full", e.CommentSelection = "commentSelection", e.CommentSelectionFull = "commentSelection-full", e.UncommentSelection = "uncommentSelection", e.UncommentSelectionFull = "uncommentSelection-full", e.PrepareCallHierarchy = "prepareCallHierarchy", e.ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", e.ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", e.ProvideInlayHints = "provideInlayHints", e.WatchChange = "watchChange", e.MapCode = "mapCode", e))(F_e || {}), rwe = /* @__PURE__ */ ((e) => (e.FixedPollingInterval = "FixedPollingInterval", e.PriorityPollingInterval = "PriorityPollingInterval", e.DynamicPriorityPolling = "DynamicPriorityPolling", e.FixedChunkSizePolling = "FixedChunkSizePolling", e.UseFsEvents = "UseFsEvents", e.UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory", e))(rwe || {}), nwe = /* @__PURE__ */ ((e) => (e.UseFsEvents = "UseFsEvents", e.FixedPollingInterval = "FixedPollingInterval", e.DynamicPriorityPolling = "DynamicPriorityPolling", e.FixedChunkSizePolling = "FixedChunkSizePolling", e))(nwe || {}), iwe = /* @__PURE__ */ ((e) => (e.FixedInterval = "FixedInterval", e.PriorityInterval = "PriorityInterval", e.DynamicPriority = "DynamicPriority", e.FixedChunkSize = "FixedChunkSize", e))(iwe || {}), swe = /* @__PURE__ */ ((e) => (e.None = "None", e.Block = "Block", e.Smart = "Smart", e))(swe || {}), awe = /* @__PURE__ */ ((e) => (e.None = "none", e.Preserve = "preserve", e.ReactNative = "react-native", e.React = "react", e.ReactJSX = "react-jsx", e.ReactJSXDev = "react-jsxdev", e))(awe || {}), owe = /* @__PURE__ */ ((e) => (e.None = "none", e.CommonJS = "commonjs", e.AMD = "amd", e.UMD = "umd", e.System = "system", e.ES6 = "es6", e.ES2015 = "es2015", e.ES2020 = "es2020", e.ES2022 = "es2022", e.ESNext = "esnext", e.Node16 = "node16", e.NodeNext = "nodenext", e.Preserve = "preserve", e))(owe || {}), cwe = /* @__PURE__ */ ((e) => (e.Classic = "classic", e.Node = "node", e.NodeJs = "node", e.Node10 = "node10", e.Node16 = "node16", e.NodeNext = "nodenext", e.Bundler = "bundler", e))(cwe || {}), lwe = /* @__PURE__ */ ((e) => (e.Crlf = "Crlf", e.Lf = "Lf", e))(lwe || {}), uwe = /* @__PURE__ */ ((e) => (e.ES3 = "es3", e.ES5 = "es5", e.ES6 = "es6", e.ES2015 = "es2015", e.ES2016 = "es2016", e.ES2017 = "es2017", e.ES2018 = "es2018", e.ES2019 = "es2019", e.ES2020 = "es2020", e.ES2021 = "es2021", e.ES2022 = "es2022", e.ES2023 = "es2023", e.ESNext = "esnext", e.JSON = "json", e.Latest = "esnext", e))(uwe || {}), L_e = class { + constructor(e, t, n) { + this.host = e, this.info = t, this.isOpen = !1, this.ownFileText = !1, this.pendingReloadFromDisk = !1, this.version = n || 0; + } + getVersion() { + return this.svc ? `SVC-${this.version}-${this.svc.getSnapshotVersion()}` : `Text-${this.version}`; + } + hasScriptVersionCache_TestOnly() { + return this.svc !== void 0; + } + resetSourceMapInfo() { + this.info.sourceFileLike = void 0, this.info.closeSourceMapFileWatcher(), this.info.sourceMapFilePath = void 0, this.info.declarationInfoPath = void 0, this.info.sourceInfos = void 0, this.info.documentPositionMapper = void 0; + } + /** Public for testing */ + useText(e) { + this.svc = void 0, this.text = e, this.textSnapshot = void 0, this.lineMap = void 0, this.fileSize = void 0, this.resetSourceMapInfo(), this.version++; + } + edit(e, t, n) { + this.switchToScriptVersionCache().edit(e, t - e, n), this.ownFileText = !1, this.text = void 0, this.textSnapshot = void 0, this.lineMap = void 0, this.fileSize = void 0, this.resetSourceMapInfo(); + } + /** + * Set the contents as newText + * returns true if text changed + */ + reload(e) { + return E.assert(e !== void 0), this.pendingReloadFromDisk = !1, !this.text && this.svc && (this.text = Rx(this.svc.getSnapshot())), this.text !== e ? (this.useText(e), this.ownFileText = !1, !0) : !1; + } + /** + * Reads the contents from tempFile(if supplied) or own file and sets it as contents + * returns true if text changed + */ + reloadWithFileText(e) { + const { text: t, fileSize: n } = e || !this.info.isDynamicOrHasMixedContent() ? this.getFileTextAndSize(e) : { text: "", fileSize: void 0 }, i = this.reload(t); + return this.fileSize = n, this.ownFileText = !e || e === this.info.fileName, this.ownFileText && this.info.mTime === G_.getTime() && (this.info.mTime = (this.host.getModifiedTime(this.info.fileName) || G_).getTime()), i; + } + /** + * Schedule reload from the disk if its not already scheduled and its not own text + * returns true when scheduling reload + */ + scheduleReloadIfNeeded() { + return !this.pendingReloadFromDisk && !this.ownFileText ? this.pendingReloadFromDisk = !0 : !1; + } + delayReloadFromFileIntoText() { + this.pendingReloadFromDisk = !0; + } + /** + * For telemetry purposes, we would like to be able to report the size of the file. + * However, we do not want telemetry to require extra file I/O so we report a size + * that may be stale (e.g. may not reflect change made on disk since the last reload). + * NB: Will read from disk if the file contents have never been loaded because + * telemetry falsely indicating size 0 would be counter-productive. + */ + getTelemetryFileSize() { + return this.fileSize ? this.fileSize : this.text ? this.text.length : this.svc ? this.svc.getSnapshot().getLength() : this.getSnapshot().getLength(); + } + getSnapshot() { + var e; + return ((e = this.tryUseScriptVersionCache()) == null ? void 0 : e.getSnapshot()) || (this.textSnapshot ?? (this.textSnapshot = NF.fromString(E.checkDefined(this.text)))); + } + getAbsolutePositionAndLineText(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.getAbsolutePositionAndLineText(e); + const n = this.getLineMap(); + return e <= n.length ? { + absolutePosition: n[e - 1], + lineText: this.text.substring(n[e - 1], n[e]) + } : { + absolutePosition: this.text.length, + lineText: void 0 + }; + } + /** + * @param line 0 based index + */ + lineToTextSpan(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.lineToTextSpan(e); + const n = this.getLineMap(), i = n[e], s = e + 1 < n.length ? n[e + 1] : this.text.length; + return Mc(i, s); + } + /** + * @param line 1 based index + * @param offset 1 based index + */ + lineOffsetToPosition(e, t, n) { + const i = this.tryUseScriptVersionCache(); + return i ? i.lineOffsetToPosition(e, t) : wI(this.getLineMap(), e - 1, t - 1, this.text, n); + } + positionToLineOffset(e) { + const t = this.tryUseScriptVersionCache(); + if (t) return t.positionToLineOffset(e); + const { line: n, character: i } = Vk(this.getLineMap(), e); + return { line: n + 1, offset: i + 1 }; + } + getFileTextAndSize(e) { + let t; + const n = e || this.info.fileName, i = () => t === void 0 ? t = this.host.readFile(n) || "" : t; + if (!ex(this.info.fileName)) { + const s = this.host.getFileSize ? this.host.getFileSize(n) : i().length; + if (s > WH) + return E.assert(!!this.info.containingProjects.length), this.info.containingProjects[0].projectService.logger.info(`Skipped loading contents of large file ${n} for info ${this.info.fileName}: fileSize: ${s}`), this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(n, s), { text: "", fileSize: s }; + } + return { text: i() }; + } + /** @internal */ + switchToScriptVersionCache() { + return (!this.svc || this.pendingReloadFromDisk) && (this.svc = lG.fromString(this.getOrLoadText()), this.textSnapshot = void 0, this.version++), this.svc; + } + tryUseScriptVersionCache() { + return (!this.svc || this.pendingReloadFromDisk) && this.getOrLoadText(), this.isOpen ? (!this.svc && !this.textSnapshot && (this.svc = lG.fromString(E.checkDefined(this.text)), this.textSnapshot = void 0), this.svc) : this.svc; + } + getOrLoadText() { + return (this.text === void 0 || this.pendingReloadFromDisk) && (E.assert(!this.svc || this.pendingReloadFromDisk, "ScriptVersionCache should not be set when reloading from disk"), this.reloadWithFileText()), this.text; + } + getLineMap() { + return E.assert(!this.svc, "ScriptVersionCache should not be set"), this.lineMap || (this.lineMap = kT(E.checkDefined(this.text))); + } + getLineInfo() { + const e = this.tryUseScriptVersionCache(); + if (e) + return { + getLineCount: () => e.getLineCount(), + getLineText: (n) => e.getAbsolutePositionAndLineText(n + 1).lineText + }; + const t = this.getLineMap(); + return tW(this.text, t); + } + }; + function ZN(e) { + return e[0] === "^" || (e.includes("walkThroughSnippet:/") || e.includes("untitled:/")) && Wc(e)[0] === "^" || e.includes(":^") && !e.includes(Oo); + } + var M_e = class { + constructor(e, t, n, i, s, o) { + this.host = e, this.fileName = t, this.scriptKind = n, this.hasMixedContent = i, this.path = s, this.containingProjects = [], this.isDynamic = ZN(t), this.textStorage = new L_e(e, this, o), (i || this.isDynamic) && (this.realpath = this.path), this.scriptKind = n || g5(t); + } + /** @internal */ + isDynamicOrHasMixedContent() { + return this.hasMixedContent || this.isDynamic; + } + isScriptOpen() { + return this.textStorage.isOpen; + } + open(e) { + this.textStorage.isOpen = !0, e !== void 0 && this.textStorage.reload(e) && this.markContainingProjectsAsDirty(); + } + close(e = !0) { + this.textStorage.isOpen = !1, e && this.textStorage.scheduleReloadIfNeeded() && this.markContainingProjectsAsDirty(); + } + getSnapshot() { + return this.textStorage.getSnapshot(); + } + ensureRealPath() { + if (this.realpath === void 0 && (this.realpath = this.path, this.host.realpath)) { + E.assert(!!this.containingProjects.length); + const e = this.containingProjects[0], t = this.host.realpath(this.path); + t && (this.realpath = e.toPath(t), this.realpath !== this.path && e.projectService.realpathToScriptInfos.add(this.realpath, this)); + } + } + /** @internal */ + getRealpathIfDifferent() { + return this.realpath && this.realpath !== this.path ? this.realpath : void 0; + } + /** + * @internal + * Does not compute realpath; uses precomputed result. Use `ensureRealPath` + * first if a definite result is needed. + */ + isSymlink() { + return this.realpath && this.realpath !== this.path; + } + getFormatCodeSettings() { + return this.formatSettings; + } + getPreferences() { + return this.preferences; + } + attachToProject(e) { + const t = !this.isAttached(e); + return t && (this.containingProjects.push(e), e.getCompilerOptions().preserveSymlinks || this.ensureRealPath(), e.onFileAddedOrRemoved(this.isSymlink())), t; + } + isAttached(e) { + switch (this.containingProjects.length) { + case 0: + return !1; + case 1: + return this.containingProjects[0] === e; + case 2: + return this.containingProjects[0] === e || this.containingProjects[1] === e; + default: + return ls(this.containingProjects, e); + } + } + detachFromProject(e) { + switch (this.containingProjects.length) { + case 0: + return; + case 1: + this.containingProjects[0] === e && (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects.pop()); + break; + case 2: + this.containingProjects[0] === e ? (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects[0] = this.containingProjects.pop()) : this.containingProjects[1] === e && (e.onFileAddedOrRemoved(this.isSymlink()), this.containingProjects.pop()); + break; + default: + xE(this.containingProjects, e) && e.onFileAddedOrRemoved(this.isSymlink()); + break; + } + } + detachAllProjects() { + for (const e of this.containingProjects) { + P0(e) && e.getCachedDirectoryStructureHost().addOrDeleteFile( + this.fileName, + this.path, + 2 + /* Deleted */ + ); + const t = e.getRootFilesMap().get(this.path); + e.removeFile( + this, + /*fileExists*/ + !1, + /*detachFromProject*/ + !1 + ), e.onFileAddedOrRemoved(this.isSymlink()), t && !x6(e) && e.addMissingFileRoot(t.fileName); + } + bg(this.containingProjects); + } + getDefaultProject() { + switch (this.containingProjects.length) { + case 0: + return Ph.ThrowNoProject(); + case 1: + return mL(this.containingProjects[0]) || r8(this.containingProjects[0]) ? Ph.ThrowNoProject() : this.containingProjects[0]; + default: + let e, t, n, i; + for (let s = 0; s < this.containingProjects.length; s++) { + const o = this.containingProjects[s]; + if (P0(o)) { + if (o.deferredClose) continue; + if (!o.isSourceOfProjectReferenceRedirect(this.fileName)) { + if (i === void 0 && s !== this.containingProjects.length - 1 && (i = o.projectService.findDefaultConfiguredProject(this) || !1), i === o) return o; + n || (n = o); + } + e || (e = o); + } else { + if (t8(o)) + return o; + !t && x6(o) && (t = o); + } + } + return (i || n || e || t) ?? Ph.ThrowNoProject(); + } + } + registerFileUpdate() { + for (const e of this.containingProjects) + e.registerFileUpdate(this.path); + } + setOptions(e, t) { + e && (this.formatSettings ? this.formatSettings = { ...this.formatSettings, ...e } : (this.formatSettings = IF(this.host.newLine), I2(this.formatSettings, e))), t && (this.preferences || (this.preferences = Bp), this.preferences = { ...this.preferences, ...t }); + } + getLatestVersion() { + return this.textStorage.getSnapshot(), this.textStorage.getVersion(); + } + saveTo(e) { + this.host.writeFile(e, Rx(this.textStorage.getSnapshot())); + } + /** @internal */ + delayReloadNonMixedContentFile() { + E.assert(!this.isDynamicOrHasMixedContent()), this.textStorage.delayReloadFromFileIntoText(), this.markContainingProjectsAsDirty(); + } + reloadFromFile(e) { + return this.textStorage.reloadWithFileText(e) ? (this.markContainingProjectsAsDirty(), !0) : !1; + } + editContent(e, t, n) { + this.textStorage.edit(e, t, n), this.markContainingProjectsAsDirty(); + } + markContainingProjectsAsDirty() { + for (const e of this.containingProjects) + e.markFileAsDirty(this.path); + } + isOrphan() { + return this.deferredDelete || !rr(this.containingProjects, (e) => !e.isOrphan()); + } + /** @internal */ + isContainedByBackgroundProject() { + return ut( + this.containingProjects, + r8 + ); + } + /** + * @param line 1 based index + */ + lineToTextSpan(e) { + return this.textStorage.lineToTextSpan(e); + } + // eslint-disable-line @typescript-eslint/unified-signatures + lineOffsetToPosition(e, t, n) { + return this.textStorage.lineOffsetToPosition(e, t, n); + } + positionToLineOffset(e) { + MYe(e); + const t = this.textStorage.positionToLineOffset(e); + return RYe(t), t; + } + isJavaScript() { + return this.scriptKind === 1 || this.scriptKind === 2; + } + /** @internal */ + closeSourceMapFileWatcher() { + this.sourceMapFilePath && !Gi(this.sourceMapFilePath) && (_p(this.sourceMapFilePath), this.sourceMapFilePath = void 0); + } + }; + function MYe(e) { + E.assert(typeof e == "number", `Expected position ${e} to be a number.`), E.assert(e >= 0, "Expected position to be non-negative."); + } + function RYe(e) { + E.assert(typeof e.line == "number", `Expected line ${e.line} to be a number.`), E.assert(typeof e.offset == "number", `Expected offset ${e.offset} to be a number.`), E.assert(e.line > 0, `Expected line to be non-${e.line === 0 ? "zero" : "negative"}`), E.assert(e.offset > 0, `Expected offset to be non-${e.offset === 0 ? "zero" : "negative"}`); + } + var BH = { + isKnownTypesPackageName: $d, + // Should never be called because we never provide a types registry. + installPackage: Rs, + enqueueInstallTypingsRequest: ka, + attach: ka, + onProjectClosed: ka, + globalTypingsCacheLocation: void 0 + // TODO: GH#18217 + }; + function _we(e, t) { + if (e === t || (e || al).length === 0 && (t || al).length === 0) + return !0; + const n = /* @__PURE__ */ new Map(); + let i = 0; + for (const s of e) + n.get(s) !== !0 && (n.set(s, !0), i++); + for (const s of t) { + const o = n.get(s); + if (o === void 0) + return !1; + o === !0 && (n.set(s, !1), i--); + } + return i === 0; + } + function jYe(e, t) { + return e.enable !== t.enable || !_we(e.include, t.include) || !_we(e.exclude, t.exclude); + } + function BYe(e, t) { + return yy(e) !== yy(t); + } + function JYe(e, t) { + return e === t ? !1 : !md(e, t); + } + var R_e = class { + constructor(e) { + this.installer = e, this.perProjectCache = /* @__PURE__ */ new Map(); + } + isKnownTypesPackageName(e) { + return this.installer.isKnownTypesPackageName(e); + } + installPackage(e) { + return this.installer.installPackage(e); + } + enqueueInstallTypingsForProject(e, t, n) { + const i = e.getTypeAcquisition(); + if (!i || !i.enable) + return; + const s = this.perProjectCache.get(e.getProjectName()); + (n || !s || jYe(i, s.typeAcquisition) || BYe(e.getCompilationSettings(), s.compilerOptions) || JYe(t, s.unresolvedImports)) && (this.perProjectCache.set(e.getProjectName(), { + compilerOptions: e.getCompilationSettings(), + typeAcquisition: i, + typings: s ? s.typings : al, + unresolvedImports: t, + poisoned: !0 + }), this.installer.enqueueInstallTypingsRequest(e, i, t)); + } + updateTypingsForProject(e, t, n, i, s) { + const o = rb(s); + return this.perProjectCache.set(e, { + compilerOptions: t, + typeAcquisition: n, + typings: o, + unresolvedImports: i, + poisoned: !1 + }), !n || !n.enable ? al : o; + } + onProjectClosed(e) { + this.perProjectCache.delete(e.getProjectName()) && this.installer.onProjectClosed(e); + } + }, KN = /* @__PURE__ */ ((e) => (e[e.Inferred = 0] = "Inferred", e[e.Configured = 1] = "Configured", e[e.External = 2] = "External", e[e.AutoImportProvider = 3] = "AutoImportProvider", e[e.Auxiliary = 4] = "Auxiliary", e))(KN || {}); + function e8(e, t = !1) { + const n = { + js: 0, + jsSize: 0, + jsx: 0, + jsxSize: 0, + ts: 0, + tsSize: 0, + tsx: 0, + tsxSize: 0, + dts: 0, + dtsSize: 0, + deferred: 0, + deferredSize: 0 + }; + for (const i of e) { + const s = t ? i.textStorage.getTelemetryFileSize() : 0; + switch (i.scriptKind) { + case 1: + n.js += 1, n.jsSize += s; + break; + case 2: + n.jsx += 1, n.jsxSize += s; + break; + case 3: + Ol(i.fileName) ? (n.dts += 1, n.dtsSize += s) : (n.ts += 1, n.tsSize += s); + break; + case 4: + n.tsx += 1, n.tsxSize += s; + break; + case 7: + n.deferred += 1, n.deferredSize += s; + break; + } + } + return n; + } + function zYe(e) { + const t = e8(e.getScriptInfos()); + return t.js > 0 && t.ts === 0 && t.tsx === 0; + } + function j_e(e) { + const t = e8(e.getRootScriptInfos()); + return t.ts === 0 && t.tsx === 0; + } + function B_e(e) { + const t = e8(e.getScriptInfos()); + return t.ts === 0 && t.tsx === 0; + } + function J_e(e) { + return !e.some((t) => Go( + t, + ".ts" + /* Ts */ + ) && !Ol(t) || Go( + t, + ".tsx" + /* Tsx */ + )); + } + function z_e(e) { + return e.generatedFilePath !== void 0; + } + var Yx = class T5e { + /** @internal */ + constructor(t, n, i, s, o, c, _, u, d, g, h) { + switch (this.projectKind = n, this.projectService = i, this.documentRegistry = s, this.compilerOptions = _, this.compileOnSaveEnabled = u, this.watchOptions = d, this.rootFilesMap = /* @__PURE__ */ new Map(), this.plugins = [], this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map(), this.hasAddedorRemovedFiles = !1, this.hasAddedOrRemovedSymlinks = !1, this.lastReportedVersion = 0, this.projectProgramVersion = 0, this.projectStateVersion = 0, this.isInitialLoadPending = $d, this.dirty = !1, this.typingFiles = al, this.moduleSpecifierCache = ofe(this), this.createHash = Ns(this.projectService.host, this.projectService.host.createHash), this.globalCacheResolutionModuleName = hm.nonRelativeModuleNameForTypingCache, this.updateFromProjectInProgress = !1, this.projectName = t, this.directoryStructureHost = g, this.currentDirectory = this.projectService.getNormalizedAbsolutePath(h), this.getCanonicalFileName = this.projectService.toCanonicalFileName, this.jsDocParsingMode = this.projectService.jsDocParsingMode, this.cancellationToken = new xce(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds), this.compilerOptions ? (o || yy(this.compilerOptions) || this.projectService.hasDeferredExtension()) && (this.compilerOptions.allowNonTsExtensions = !0) : (this.compilerOptions = B9(), this.compilerOptions.allowNonTsExtensions = !0, this.compilerOptions.allowJs = !0), i.serverMode) { + case 0: + this.languageServiceEnabled = !0; + break; + case 1: + this.languageServiceEnabled = !0, this.compilerOptions.noResolve = !0, this.compilerOptions.types = []; + break; + case 2: + this.languageServiceEnabled = !1, this.compilerOptions.noResolve = !0, this.compilerOptions.types = []; + break; + default: + E.assertNever(i.serverMode); + } + this.setInternalCompilerOptionsForEmittingJsFiles(); + const S = this.projectService.host; + this.projectService.logger.loggingEnabled() ? this.trace = (T) => this.writeLog(T) : S.trace && (this.trace = (T) => S.trace(T)), this.realpath = Ns(S, S.realpath), this.resolutionCache = ZW( + this, + this.currentDirectory, + /*logChangesWhenResolvingModule*/ + !0 + ), this.languageService = kce(this, this.documentRegistry, this.projectService.serverMode), c && this.disableLanguageService(c), this.markAsDirty(), r8(this) || (this.projectService.pendingEnsureProjectForOpenFiles = !0), this.projectService.onProjectCreation(this); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(t) { + } + isNonTsProject() { + return fp(this), B_e(this); + } + isJsOnlyProject() { + return fp(this), zYe(this); + } + static resolveModule(t, n, i, s) { + return T5e.importServicePluginSync({ name: t }, [n], i, s).resolvedModule; + } + /** @internal */ + static importServicePluginSync(t, n, i, s) { + E.assertIsDefined(i.require); + let o, c; + for (const _ of n) { + const u = Rl(i.resolvePath(Mn(_, "node_modules"))); + s(`Loading ${t.name} from ${_} (resolved to ${u})`); + const d = i.require(u, t.name); + if (!d.error) { + c = d.module; + break; + } + const g = d.error.stack || d.error.message || JSON.stringify(d.error); + (o ?? (o = [])).push(`Failed to load module '${t.name}' from ${u}: ${g}`); + } + return { pluginConfigEntry: t, resolvedModule: c, errorLogs: o }; + } + /** @internal */ + static async importServicePluginAsync(t, n, i, s) { + E.assertIsDefined(i.importPlugin); + let o, c; + for (const _ of n) { + const u = Mn(_, "node_modules"); + s(`Dynamically importing ${t.name} from ${_} (resolved to ${u})`); + let d; + try { + d = await i.importPlugin(u, t.name); + } catch (h) { + d = { module: void 0, error: h }; + } + if (!d.error) { + c = d.module; + break; + } + const g = d.error.stack || d.error.message || JSON.stringify(d.error); + (o ?? (o = [])).push(`Failed to dynamically import module '${t.name}' from ${u}: ${g}`); + } + return { pluginConfigEntry: t, resolvedModule: c, errorLogs: o }; + } + isKnownTypesPackageName(t) { + return this.typingsCache.isKnownTypesPackageName(t); + } + installPackage(t) { + return this.typingsCache.installPackage({ ...t, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); + } + /** @internal */ + getGlobalTypingsCacheLocation() { + return this.getGlobalCache(); + } + get typingsCache() { + return this.projectService.typingsCache; + } + /** @internal */ + getSymlinkCache() { + return this.symlinks || (this.symlinks = ZB(this.getCurrentDirectory(), this.getCanonicalFileName)), this.program && !this.symlinks.hasProcessedResolutions() && this.symlinks.setSymlinksFromResolutions( + this.program.forEachResolvedModule, + this.program.forEachResolvedTypeReferenceDirective, + this.program.getAutomaticTypeDirectiveResolutions() + ), this.symlinks; + } + // Method of LanguageServiceHost + getCompilationSettings() { + return this.compilerOptions; + } + // Method to support public API + getCompilerOptions() { + return this.getCompilationSettings(); + } + getNewLine() { + return this.projectService.host.newLine; + } + getProjectVersion() { + return this.projectStateVersion.toString(); + } + getProjectReferences() { + } + getScriptFileNames() { + if (!this.rootFilesMap.size) + return He; + let t; + return this.rootFilesMap.forEach((n) => { + (this.languageServiceEnabled || n.info && n.info.isScriptOpen()) && (t || (t = [])).push(n.fileName); + }), Bn(t, this.typingFiles) || He; + } + getOrCreateScriptInfoAndAttachToProject(t) { + const n = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + t, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + if (n) { + const i = this.rootFilesMap.get(n.path); + i && i.info !== n && (i.info = n), n.attachToProject(this); + } + return n; + } + getScriptKind(t) { + const n = this.projectService.getScriptInfoForPath(this.toPath(t)); + return n && n.scriptKind; + } + getScriptVersion(t) { + const n = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + t, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + return n && n.getLatestVersion(); + } + getScriptSnapshot(t) { + const n = this.getOrCreateScriptInfoAndAttachToProject(t); + if (n) + return n.getSnapshot(); + } + getCancellationToken() { + return this.cancellationToken; + } + getCurrentDirectory() { + return this.currentDirectory; + } + getDefaultLibFileName() { + const t = Xn(Cs(this.projectService.getExecutingFilePath())); + return Mn(t, bw(this.compilerOptions)); + } + useCaseSensitiveFileNames() { + return this.projectService.host.useCaseSensitiveFileNames; + } + readDirectory(t, n, i, s, o) { + return this.directoryStructureHost.readDirectory(t, n, i, s, o); + } + readFile(t) { + return this.projectService.host.readFile(t); + } + writeFile(t, n) { + return this.projectService.host.writeFile(t, n); + } + fileExists(t) { + const n = this.toPath(t); + return !this.isWatchedMissingFile(n) && this.directoryStructureHost.fileExists(t); + } + /** @internal */ + resolveModuleNameLiterals(t, n, i, s, o, c) { + return this.resolutionCache.resolveModuleNameLiterals(t, n, i, s, o, c); + } + /** @internal */ + getModuleResolutionCache() { + return this.resolutionCache.getModuleResolutionCache(); + } + /** @internal */ + resolveTypeReferenceDirectiveReferences(t, n, i, s, o, c) { + return this.resolutionCache.resolveTypeReferenceDirectiveReferences( + t, + n, + i, + s, + o, + c + ); + } + /** @internal */ + resolveLibrary(t, n, i, s) { + return this.resolutionCache.resolveLibrary(t, n, i, s); + } + directoryExists(t) { + return this.directoryStructureHost.directoryExists(t); + } + getDirectories(t) { + return this.directoryStructureHost.getDirectories(t); + } + /** @internal */ + getCachedDirectoryStructureHost() { + } + /** @internal */ + toPath(t) { + return _o(t, this.currentDirectory, this.projectService.toCanonicalFileName); + } + /** @internal */ + watchDirectoryOfFailedLookupLocation(t, n, i) { + return this.projectService.watchFactory.watchDirectory( + t, + n, + i, + this.projectService.getWatchOptions(this), + kl.FailedLookupLocations, + this + ); + } + /** @internal */ + watchAffectingFileLocation(t, n) { + return this.projectService.watchFactory.watchFile( + t, + n, + 2e3, + this.projectService.getWatchOptions(this), + kl.AffectingFileLocation, + this + ); + } + /** @internal */ + clearInvalidateResolutionOfFailedLookupTimer() { + return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`); + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + this.projectService.throttledOperations.schedule( + `${this.getProjectName()}FailedLookupInvalidation`, + /*delay*/ + 1e3, + () => { + this.resolutionCache.invalidateResolutionsOfFailedLookupLocations() && this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + ); + } + /** @internal */ + invalidateResolutionsOfFailedLookupLocations() { + this.clearInvalidateResolutionOfFailedLookupTimer() && this.resolutionCache.invalidateResolutionsOfFailedLookupLocations() && (this.markAsDirty(), this.projectService.delayEnsureProjectForOpenFiles()); + } + /** @internal */ + onInvalidatedResolution() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + watchTypeRootsDirectory(t, n, i) { + return this.projectService.watchFactory.watchDirectory( + t, + n, + i, + this.projectService.getWatchOptions(this), + kl.TypeRoots, + this + ); + } + /** @internal */ + hasChangedAutomaticTypeDirectiveNames() { + return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames(); + } + /** @internal */ + onChangedAutomaticTypeDirectiveNames() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + getGlobalCache() { + return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; + } + /** @internal */ + fileIsOpen(t) { + return this.projectService.openFiles.has(t); + } + /** @internal */ + writeLog(t) { + this.projectService.logger.info(t); + } + log(t) { + this.writeLog(t); + } + error(t) { + this.projectService.logger.msg( + t, + "Err" + /* Err */ + ); + } + setInternalCompilerOptionsForEmittingJsFiles() { + (this.projectKind === 0 || this.projectKind === 2) && (this.compilerOptions.noEmitForJsFiles = !0); + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return Ln(this.projectErrors, (t) => !t.file) || al; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || al; + } + setProjectErrors(t) { + this.projectErrors = t; + } + getLanguageService(t = !0) { + return t && fp(this), this.languageService; + } + /** @internal */ + getSourceMapper() { + return this.getLanguageService().getSourceMapper(); + } + /** @internal */ + clearSourceMapperCache() { + this.languageService.clearSourceMapperCache(); + } + /** @internal */ + getDocumentPositionMapper(t, n) { + return this.projectService.getDocumentPositionMapper(this, t, n); + } + /** @internal */ + getSourceFileLike(t) { + return this.projectService.getSourceFileLike(t, this); + } + /** @internal */ + shouldEmitFile(t) { + return t && !t.isDynamicOrHasMixedContent() && !this.program.isSourceOfProjectReferenceRedirect(t.path); + } + getCompileOnSaveAffectedFileList(t) { + return this.languageServiceEnabled ? (fp(this), this.builderState = wd.create( + this.program, + this.builderState, + /*disableUseFileVersionAsSignature*/ + !0 + ), Ii( + wd.getFilesAffectedBy( + this.builderState, + this.program, + t.path, + this.cancellationToken, + this.projectService.host + ), + (n) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(n.path)) ? n.fileName : void 0 + )) : []; + } + /** + * Returns true if emit was conducted + */ + emitFile(t, n) { + if (!this.languageServiceEnabled || !this.shouldEmitFile(t)) + return { emitSkipped: !0, diagnostics: al }; + const { emitSkipped: i, diagnostics: s, outputFiles: o } = this.getLanguageService().getEmitOutput(t.fileName); + if (!i) { + for (const c of o) { + const _ = Xi(c.name, this.currentDirectory); + n(_, c.text, c.writeByteOrderMark); + } + if (this.builderState && op(this.compilerOptions)) { + const c = o.filter((_) => Ol(_.name)); + if (c.length === 1) { + const _ = this.program.getSourceFile(t.fileName), u = this.projectService.host.createHash ? this.projectService.host.createHash(c[0].text) : IE(c[0].text); + wd.updateSignatureOfFile(this.builderState, u, _.resolvedPath); + } + } + } + return { emitSkipped: i, diagnostics: s }; + } + enableLanguageService() { + this.languageServiceEnabled || this.projectService.serverMode === 2 || (this.languageServiceEnabled = !0, this.lastFileExceededProgramSize = void 0, this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + !0 + )); + } + /** @internal */ + cleanupProgram() { + if (this.program) { + for (const t of this.program.getSourceFiles()) + this.detachScriptInfoIfNotRoot(t.fileName); + this.program.forEachResolvedProjectReference((t) => this.detachScriptInfoFromProject(t.sourceFile.fileName)), this.program = void 0; + } + } + disableLanguageService(t) { + this.languageServiceEnabled && (E.assert( + this.projectService.serverMode !== 2 + /* Syntactic */ + ), this.languageService.cleanupSemanticCache(), this.languageServiceEnabled = !1, this.cleanupProgram(), this.lastFileExceededProgramSize = t, this.builderState = void 0, this.autoImportProviderHost && this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0, this.resolutionCache.closeTypeRootsWatch(), this.clearGeneratedFileWatch(), this.projectService.verifyDocumentRegistry(), this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + !1 + )); + } + getProjectName() { + return this.projectName; + } + removeLocalTypingsFromTypeAcquisition(t) { + return !t || !t.include ? t : { ...t, include: this.removeExistingTypings(t.include) }; + } + getExternalFiles(t) { + return rb(Xs(this.plugins, (n) => { + if (typeof n.module.getExternalFiles == "function") + try { + return n.module.getExternalFiles( + this, + t || 0 + /* Update */ + ); + } catch (i) { + this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${i}`), i.stack && this.projectService.logger.info(i.stack); + } + })); + } + getSourceFile(t) { + if (this.program) + return this.program.getSourceFileByPath(t); + } + /** @internal */ + getSourceFileOrConfigFile(t) { + const n = this.program.getCompilerOptions(); + return t === n.configFilePath ? n.configFile : this.getSourceFile(t); + } + close() { + var t; + this.projectService.typingsCache.onProjectClosed(this), this.closeWatchingTypingLocations(), this.cleanupProgram(), rr(this.externalFiles, (n) => this.detachScriptInfoIfNotRoot(n)), this.rootFilesMap.forEach((n) => { + var i; + return (i = n.info) == null ? void 0 : i.detachFromProject(this); + }), this.projectService.pendingEnsureProjectForOpenFiles = !0, this.rootFilesMap = void 0, this.externalFiles = void 0, this.program = void 0, this.builderState = void 0, this.resolutionCache.clear(), this.resolutionCache = void 0, this.cachedUnresolvedImportsPerFile = void 0, (t = this.packageJsonWatches) == null || t.forEach((n) => { + n.projects.delete(this), n.close(); + }), this.packageJsonWatches = void 0, this.moduleSpecifierCache.clear(), this.moduleSpecifierCache = void 0, this.directoryStructureHost = void 0, this.exportMapCache = void 0, this.projectErrors = void 0, this.plugins.length = 0, this.missingFilesMap && (N_(this.missingFilesMap, Zp), this.missingFilesMap = void 0), this.clearGeneratedFileWatch(), this.clearInvalidateResolutionOfFailedLookupTimer(), this.autoImportProviderHost && this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0, this.noDtsResolutionProject && this.noDtsResolutionProject.close(), this.noDtsResolutionProject = void 0, this.languageService.dispose(), this.languageService = void 0; + } + detachScriptInfoIfNotRoot(t) { + const n = this.projectService.getScriptInfo(t); + n && !this.isRoot(n) && n.detachFromProject(this); + } + isClosed() { + return this.rootFilesMap === void 0; + } + hasRoots() { + var t; + return !!((t = this.rootFilesMap) != null && t.size); + } + /** @internal */ + isOrphan() { + return !1; + } + getRootFiles() { + return this.rootFilesMap && ts(P1(this.rootFilesMap.values(), (t) => { + var n; + return (n = t.info) == null ? void 0 : n.fileName; + })); + } + /** @internal */ + getRootFilesMap() { + return this.rootFilesMap; + } + getRootScriptInfos() { + return ts(P1(this.rootFilesMap.values(), (t) => t.info)); + } + getScriptInfos() { + return this.languageServiceEnabled ? or(this.program.getSourceFiles(), (t) => { + const n = this.projectService.getScriptInfoForPath(t.resolvedPath); + return E.assert(!!n, "getScriptInfo", () => `scriptInfo for a file '${t.fileName}' Path: '${t.path}' / '${t.resolvedPath}' is missing.`), n; + }) : this.getRootScriptInfos(); + } + getExcludedFiles() { + return al; + } + getFileNames(t, n) { + if (!this.program) + return []; + if (!this.languageServiceEnabled) { + let s = this.getRootFiles(); + if (this.compilerOptions) { + const o = Cce(this.compilerOptions); + o && (s || (s = [])).push(o); + } + return s; + } + const i = []; + for (const s of this.program.getSourceFiles()) + t && this.program.isSourceFileFromExternalLibrary(s) || i.push(s.fileName); + if (!n) { + const s = this.program.getCompilerOptions().configFile; + if (s && (i.push(s.fileName), s.extendedSourceFiles)) + for (const o of s.extendedSourceFiles) + i.push(o); + } + return i; + } + /** @internal */ + getFileNamesWithRedirectInfo(t) { + return this.getFileNames().map((n) => ({ + fileName: n, + isSourceOfProjectReferenceRedirect: t && this.isSourceOfProjectReferenceRedirect(n) + })); + } + hasConfigFile(t) { + if (this.program && this.languageServiceEnabled) { + const n = this.program.getCompilerOptions().configFile; + if (n) { + if (t === n.fileName) + return !0; + if (n.extendedSourceFiles) { + for (const i of n.extendedSourceFiles) + if (t === i) + return !0; + } + } + } + return !1; + } + containsScriptInfo(t) { + if (this.isRoot(t)) return !0; + if (!this.program) return !1; + const n = this.program.getSourceFileByPath(t.path); + return !!n && n.resolvedPath === t.path; + } + containsFile(t, n) { + const i = this.projectService.getScriptInfoForNormalizedPath(t); + return i && (i.isScriptOpen() || !n) ? this.containsScriptInfo(i) : !1; + } + isRoot(t) { + var n, i; + return ((i = (n = this.rootFilesMap) == null ? void 0 : n.get(t.path)) == null ? void 0 : i.info) === t; + } + // add a root file to project + addRoot(t, n) { + E.assert(!this.isRoot(t)), this.rootFilesMap.set(t.path, { fileName: n || t.fileName, info: t }), t.attachToProject(this), this.markAsDirty(); + } + // add a root file that doesnt exist on host + addMissingFileRoot(t) { + const n = this.projectService.toPath(t); + this.rootFilesMap.set(n, { fileName: t }), this.markAsDirty(); + } + removeFile(t, n, i) { + this.isRoot(t) && this.removeRoot(t), n ? this.resolutionCache.removeResolutionsOfFile(t.path) : this.resolutionCache.invalidateResolutionOfFile(t.path), this.cachedUnresolvedImportsPerFile.delete(t.path), i && t.detachFromProject(this), this.markAsDirty(); + } + registerFileUpdate(t) { + (this.updatedFileNames || (this.updatedFileNames = /* @__PURE__ */ new Set())).add(t); + } + /** @internal */ + markFileAsDirty(t) { + this.markAsDirty(), this.exportMapCache && !this.exportMapCache.isEmpty() && (this.changedFilesForExportMapCache || (this.changedFilesForExportMapCache = /* @__PURE__ */ new Set())).add(t); + } + /** @internal */ + markAsDirty() { + this.dirty || (this.projectStateVersion++, this.dirty = !0); + } + /** @internal */ + markAutoImportProviderAsDirty() { + var t; + this.autoImportProviderHost || (this.autoImportProviderHost = void 0), (t = this.autoImportProviderHost) == null || t.markAsDirty(); + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + var t; + this.autoImportProviderHost === !1 ? this.autoImportProviderHost = void 0 : (t = this.autoImportProviderHost) == null || t.markAsDirty(); + } + /** @internal */ + onPackageJsonChange() { + this.moduleSpecifierCache.clear(), this.autoImportProviderHost && this.autoImportProviderHost.markAsDirty(); + } + /** @internal */ + onFileAddedOrRemoved(t) { + this.hasAddedorRemovedFiles = !0, t && (this.hasAddedOrRemovedSymlinks = !0); + } + /** @internal */ + onDiscoveredSymlink() { + this.hasAddedOrRemovedSymlinks = !0; + } + /** @internal */ + updateFromProject() { + fp(this); + } + /** + * Updates set of files that contribute to this project + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + var t, n, i, s; + (t = rn) == null || t.push(rn.Phase.Session, "updateGraph", { name: this.projectName, kind: KN[this.projectKind] }), (n = Vu) == null || n.logStartUpdateGraph(), this.resolutionCache.startRecordingFilesWithChangedResolutions(); + const o = this.updateGraphWorker(), c = this.hasAddedorRemovedFiles; + this.hasAddedorRemovedFiles = !1, this.hasAddedOrRemovedSymlinks = !1; + const _ = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || al; + for (const d of _) + this.cachedUnresolvedImportsPerFile.delete(d); + this.languageServiceEnabled && this.projectService.serverMode === 0 && !this.isOrphan() ? ((o || _.length) && (this.lastCachedUnresolvedImportsList = WYe(this.program, this.cachedUnresolvedImportsPerFile)), this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, c)) : this.lastCachedUnresolvedImportsList = void 0; + const u = this.projectProgramVersion === 0 && o; + return o && this.projectProgramVersion++, c && this.markAutoImportProviderAsDirty(), u && this.getPackageJsonAutoImportProvider(), (i = Vu) == null || i.logStopUpdateGraph(), (s = rn) == null || s.pop(), !o; + } + /** @internal */ + updateTypingFiles(t) { + gI( + t, + this.typingFiles, + Bk(!this.useCaseSensitiveFileNames()), + /*inserted*/ + ka, + (n) => this.detachScriptInfoFromProject(n) + ) && (this.typingFiles = t, this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)); + } + /** @internal */ + closeWatchingTypingLocations() { + this.typingWatchers && N_(this.typingWatchers, Zp), this.typingWatchers = void 0; + } + /** @internal */ + onTypingInstallerWatchInvoke() { + this.typingWatchers.isInvoked = !0, this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: wF }); + } + /** @internal */ + watchTypingLocations(t) { + if (!t) { + this.typingWatchers.isInvoked = !1; + return; + } + if (!t.length) { + this.closeWatchingTypingLocations(); + return; + } + const n = new Map(this.typingWatchers); + this.typingWatchers || (this.typingWatchers = /* @__PURE__ */ new Map()), this.typingWatchers.isInvoked = !1; + const i = (s, o) => { + const c = this.toPath(s); + n.delete(c), this.typingWatchers.has(c) || this.typingWatchers.set( + c, + o === "FileWatcher" ? this.projectService.watchFactory.watchFile( + s, + () => this.typingWatchers.isInvoked ? this.writeLog("TypingWatchers already invoked") : this.onTypingInstallerWatchInvoke(), + 2e3, + this.projectService.getWatchOptions(this), + kl.TypingInstallerLocationFile, + this + ) : this.projectService.watchFactory.watchDirectory( + s, + (_) => { + if (this.typingWatchers.isInvoked) return this.writeLog("TypingWatchers already invoked"); + if (!Go( + _, + ".json" + /* Json */ + )) return this.writeLog("Ignoring files that are not *.json"); + if (oh(_, Mn(this.projectService.typingsInstaller.globalTypingsCacheLocation, "package.json"), !this.useCaseSensitiveFileNames())) return this.writeLog("Ignoring package.json change at global typings location"); + this.onTypingInstallerWatchInvoke(); + }, + 1, + this.projectService.getWatchOptions(this), + kl.TypingInstallerLocationDirectory, + this + ) + ); + }; + for (const s of t) { + const o = Wc(s); + if (o === "package.json" || o === "bower.json") { + i( + s, + "FileWatcher" + /* FileWatcher */ + ); + continue; + } + if (Gp(this.currentDirectory, s, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + const c = s.indexOf(Oo, this.currentDirectory.length + 1); + i( + c !== -1 ? s.substr(0, c) : s, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + continue; + } + if (Gp(this.projectService.typingsInstaller.globalTypingsCacheLocation, s, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + i( + this.projectService.typingsInstaller.globalTypingsCacheLocation, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + continue; + } + i( + s, + "DirectoryWatcher" + /* DirectoryWatcher */ + ); + } + n.forEach((s, o) => { + s.close(), this.typingWatchers.delete(o); + }); + } + /** @internal */ + getCurrentProgram() { + return this.program; + } + removeExistingTypings(t) { + const n = wO(this.getCompilerOptions(), this.directoryStructureHost); + return t.filter((i) => !n.includes(i)); + } + updateGraphWorker() { + var t, n; + const i = this.languageService.getCurrentProgram(); + E.assert(i === this.program), E.assert(!this.isClosed(), "Called update graph worker of closed project"), this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); + const s = Io(), { hasInvalidatedResolutions: o, hasInvalidatedLibResolutions: c } = this.resolutionCache.createHasInvalidatedResolutions($d, $d); + this.hasInvalidatedResolutions = o, this.hasInvalidatedLibResolutions = c, this.resolutionCache.startCachingPerDirectoryResolution(), this.dirty = !1, this.updateFromProjectInProgress = !0, this.program = this.languageService.getProgram(), this.updateFromProjectInProgress = !1, (t = rn) == null || t.push(rn.Phase.Session, "finishCachingPerDirectoryResolution"), this.resolutionCache.finishCachingPerDirectoryResolution(this.program, i), (n = rn) == null || n.pop(), E.assert(i === void 0 || this.program !== void 0); + let _ = !1; + if (this.program && (!i || this.program !== i && this.program.structureIsReused !== 2)) { + if (_ = !0, i) { + for (const g of i.getSourceFiles()) { + const h = this.program.getSourceFileByPath(g.resolvedPath); + (!h || g.resolvedPath === g.path && h.resolvedPath !== g.path) && this.detachScriptInfoFromProject( + g.fileName, + !!this.program.getSourceFileByPath(g.path), + /*syncDirWatcherRemove*/ + !0 + ); + } + i.forEachResolvedProjectReference((g) => { + this.program.getResolvedProjectReferenceByPath(g.sourceFile.path) || this.detachScriptInfoFromProject( + g.sourceFile.fileName, + /*noRemoveResolution*/ + void 0, + /*syncDirWatcherRemove*/ + !0 + ); + }); + } + if (this.rootFilesMap.forEach((g, h) => { + var S; + const T = this.program.getSourceFileByPath(h), C = g.info; + !T || ((S = g.info) == null ? void 0 : S.path) === T.resolvedPath || (g.info = this.projectService.getScriptInfo(T.fileName), E.assert(g.info.isAttached(this)), C?.detachFromProject(this)); + }), kW( + this.program, + this.missingFilesMap || (this.missingFilesMap = /* @__PURE__ */ new Map()), + // Watch the missing files + (g, h) => this.addMissingFileWatcher(g, h) + ), this.generatedFilesMap) { + const g = this.compilerOptions.outFile; + z_e(this.generatedFilesMap) ? (!g || !this.isValidGeneratedFileWatcher( + Gu(g) + ".d.ts", + this.generatedFilesMap + )) && this.clearGeneratedFileWatch() : g ? this.clearGeneratedFileWatch() : this.generatedFilesMap.forEach((h, S) => { + const T = this.program.getSourceFileByPath(S); + (!T || T.resolvedPath !== S || !this.isValidGeneratedFileWatcher( + R7(T.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName), + h + )) && (_p(h), this.generatedFilesMap.delete(S)); + }); + } + this.languageServiceEnabled && this.projectService.serverMode === 0 && this.resolutionCache.updateTypeRootsWatch(); + } + this.projectService.verifyProgram(this), this.exportMapCache && !this.exportMapCache.isEmpty() && (this.exportMapCache.releaseSymbols(), this.hasAddedorRemovedFiles || i && !this.program.structureIsReused ? this.exportMapCache.clear() : this.changedFilesForExportMapCache && i && this.program && uh(this.changedFilesForExportMapCache, (g) => { + const h = i.getSourceFileByPath(g), S = this.program.getSourceFileByPath(g); + return !h || !S ? (this.exportMapCache.clear(), !0) : this.exportMapCache.onFileChanged(h, S, !!this.getTypeAcquisition().enable); + })), this.changedFilesForExportMapCache && this.changedFilesForExportMapCache.clear(), (this.hasAddedOrRemovedSymlinks || this.program && !this.program.structureIsReused && this.getCompilerOptions().preserveSymlinks) && (this.symlinks = void 0, this.moduleSpecifierCache.clear()); + const u = this.externalFiles || al; + this.externalFiles = this.getExternalFiles(), gI( + this.externalFiles, + u, + Bk(!this.useCaseSensitiveFileNames()), + // Ensure a ScriptInfo is created for new external files. This is performed indirectly + // by the host for files in the program when the program is retrieved above but + // the program doesn't contain external files so this must be done explicitly. + (g) => { + const h = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + g, + this.currentDirectory, + this.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + h?.attachToProject(this); + }, + (g) => this.detachScriptInfoFromProject(g) + ); + const d = Io() - s; + return this.sendPerformanceEvent("UpdateGraph", d), this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} projectStateVersion: ${this.projectStateVersion} projectProgramVersion: ${this.projectProgramVersion} structureChanged: ${_}${this.program ? ` structureIsReused:: ${NR[this.program.structureIsReused]}` : ""} Elapsed: ${d}ms`), this.projectService.logger.isTestLogger ? this.program !== i ? this.print( + /*writeProjectFileNames*/ + !0, + this.hasAddedorRemovedFiles, + /*writeFileVersionAndText*/ + !0 + ) : this.writeLog("Same program as before") : this.hasAddedorRemovedFiles ? this.print( + /*writeProjectFileNames*/ + !0, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ) : this.program !== i && this.writeLog("Different program with same set of files"), this.projectService.verifyDocumentRegistry(), _; + } + /** @internal */ + sendPerformanceEvent(t, n) { + this.projectService.sendPerformanceEvent(t, n); + } + detachScriptInfoFromProject(t, n, i) { + const s = this.projectService.getScriptInfo(t); + s && (s.detachFromProject(this), n || this.resolutionCache.removeResolutionsOfFile(s.path, i)); + } + addMissingFileWatcher(t, n) { + var i; + if (P0(this)) { + const o = this.projectService.configFileExistenceInfoCache.get(t); + if ((i = o?.config) != null && i.projects.has(this.canonicalConfigFilePath)) return jD; + } + const s = this.projectService.watchFactory.watchFile( + Xi(n, this.currentDirectory), + (o, c) => { + P0(this) && this.getCachedDirectoryStructureHost().addOrDeleteFile(o, t, c), c === 0 && this.missingFilesMap.has(t) && (this.missingFilesMap.delete(t), s.close(), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this)); + }, + 500, + this.projectService.getWatchOptions(this), + kl.MissingFile, + this + ); + return s; + } + isWatchedMissingFile(t) { + return !!this.missingFilesMap && this.missingFilesMap.has(t); + } + /** @internal */ + addGeneratedFileWatch(t, n) { + if (this.compilerOptions.outFile) + this.generatedFilesMap || (this.generatedFilesMap = this.createGeneratedFileWatcher(t)); + else { + const i = this.toPath(n); + if (this.generatedFilesMap) { + if (z_e(this.generatedFilesMap)) { + E.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`); + return; + } + if (this.generatedFilesMap.has(i)) return; + } else + this.generatedFilesMap = /* @__PURE__ */ new Map(); + this.generatedFilesMap.set(i, this.createGeneratedFileWatcher(t)); + } + } + createGeneratedFileWatcher(t) { + return { + generatedFilePath: this.toPath(t), + watcher: this.projectService.watchFactory.watchFile( + t, + () => { + this.clearSourceMapperCache(), this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + }, + 2e3, + this.projectService.getWatchOptions(this), + kl.MissingGeneratedFile, + this + ) + }; + } + isValidGeneratedFileWatcher(t, n) { + return this.toPath(t) === n.generatedFilePath; + } + clearGeneratedFileWatch() { + this.generatedFilesMap && (z_e(this.generatedFilesMap) ? _p(this.generatedFilesMap) : N_(this.generatedFilesMap, _p), this.generatedFilesMap = void 0); + } + getScriptInfoForNormalizedPath(t) { + const n = this.projectService.getScriptInfoForPath(this.toPath(t)); + return n && !n.isAttached(this) ? Ph.ThrowProjectDoesNotContainDocument(t, this) : n; + } + getScriptInfo(t) { + return this.projectService.getScriptInfo(t); + } + filesToString(t) { + return this.filesToStringWorker( + t, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ); + } + /** @internal */ + filesToStringWorker(t, n, i) { + if (this.isInitialLoadPending()) return ` Files (0) InitialLoadPending +`; + if (!this.program) return ` Files (0) NoProgram +`; + const s = this.program.getSourceFiles(); + let o = ` Files (${s.length}) +`; + if (t) { + for (const c of s) + o += ` ${c.fileName}${i ? ` ${c.version} ${JSON.stringify(c.text)}` : ""} +`; + n && (o += ` + +`, iV(this.program, (c) => o += ` ${c} +`)); + } + return o; + } + /** @internal */ + print(t, n, i) { + var s; + this.writeLog(`Project '${this.projectName}' (${KN[this.projectKind]})`), this.writeLog(this.filesToStringWorker( + t && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ), + n && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ), + i && this.projectService.logger.hasLevel( + 3 + /* verbose */ + ) + )), this.writeLog("-----------------------------------------------"), this.autoImportProviderHost && this.autoImportProviderHost.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ), (s = this.noDtsResolutionProject) == null || s.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ); + } + setCompilerOptions(t) { + var n; + if (t) { + t.allowNonTsExtensions = !0; + const i = this.compilerOptions; + this.compilerOptions = t, this.setInternalCompilerOptionsForEmittingJsFiles(), (n = this.noDtsResolutionProject) == null || n.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()), ZI(i, t) && (this.cachedUnresolvedImportsPerFile.clear(), this.lastCachedUnresolvedImportsList = void 0, this.resolutionCache.onChangesAffectModuleResolution(), this.moduleSpecifierCache.clear()), this.markAsDirty(); + } + } + /** @internal */ + setWatchOptions(t) { + this.watchOptions = t; + } + /** @internal */ + getWatchOptions() { + return this.watchOptions; + } + setTypeAcquisition(t) { + t && (this.typeAcquisition = this.removeLocalTypingsFromTypeAcquisition(t)); + } + getTypeAcquisition() { + return this.typeAcquisition || {}; + } + /** @internal */ + getChangesSinceVersion(t, n) { + var i, s; + const o = n ? (u) => ts(u.entries(), ([d, g]) => ({ + fileName: d, + isSourceOfProjectReferenceRedirect: g + })) : (u) => ts(u.keys()); + this.isInitialLoadPending() || fp(this); + const c = { + projectName: this.getProjectName(), + version: this.projectProgramVersion, + isInferred: x6(this), + options: this.getCompilationSettings(), + languageServiceDisabled: !this.languageServiceEnabled, + lastFileExceededProgramSize: this.lastFileExceededProgramSize + }, _ = this.updatedFileNames; + if (this.updatedFileNames = void 0, this.lastReportedFileNames && t === this.lastReportedVersion) { + if (this.projectProgramVersion === this.lastReportedVersion && !_) + return { info: c, projectErrors: this.getGlobalProjectErrors() }; + const u = this.lastReportedFileNames, d = ((i = this.externalFiles) == null ? void 0 : i.map((D) => ({ + fileName: Wo(D), + isSourceOfProjectReferenceRedirect: !1 + }))) || al, g = jk( + this.getFileNamesWithRedirectInfo(!!n).concat(d), + (D) => D.fileName, + (D) => D.isSourceOfProjectReferenceRedirect + ), h = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), T = _ ? ts(_.keys()) : [], C = []; + return Dl(g, (D, P) => { + u.has(P) ? n && D !== u.get(P) && C.push({ + fileName: P, + isSourceOfProjectReferenceRedirect: D + }) : h.set(P, D); + }), Dl(u, (D, P) => { + g.has(P) || S.set(P, D); + }), this.lastReportedFileNames = g, this.lastReportedVersion = this.projectProgramVersion, { + info: c, + changes: { + added: o(h), + removed: o(S), + updated: n ? T.map((D) => ({ + fileName: D, + isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(D) + })) : T, + updatedRedirects: n ? C : void 0 + }, + projectErrors: this.getGlobalProjectErrors() + }; + } else { + const u = this.getFileNamesWithRedirectInfo(!!n), d = ((s = this.externalFiles) == null ? void 0 : s.map((h) => ({ + fileName: Wo(h), + isSourceOfProjectReferenceRedirect: !1 + }))) || al, g = u.concat(d); + return this.lastReportedFileNames = jk( + g, + (h) => h.fileName, + (h) => h.isSourceOfProjectReferenceRedirect + ), this.lastReportedVersion = this.projectProgramVersion, { + info: c, + files: n ? g : g.map((h) => h.fileName), + projectErrors: this.getGlobalProjectErrors() + }; + } + } + // remove a root file from project + removeRoot(t) { + this.rootFilesMap.delete(t.path); + } + /** @internal */ + isSourceOfProjectReferenceRedirect(t) { + return !!this.program && this.program.isSourceOfProjectReferenceRedirect(t); + } + /** @internal */ + getGlobalPluginSearchPaths() { + return [ + ...this.projectService.pluginProbeLocations, + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + Mn(this.projectService.getExecutingFilePath(), "../../..") + ]; + } + enableGlobalPlugins(t) { + if (!this.projectService.globalPlugins.length) return; + const n = this.projectService.host; + if (!n.require && !n.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const i = this.getGlobalPluginSearchPaths(); + for (const s of this.projectService.globalPlugins) + s && (t.plugins && t.plugins.some((o) => o.name === s) || (this.projectService.logger.info(`Loading global plugin ${s}`), this.enablePlugin({ name: s, global: !0 }, i))); + } + enablePlugin(t, n) { + this.projectService.requestEnablePlugin(this, t, n); + } + /** @internal */ + enableProxy(t, n) { + try { + if (typeof t != "function") { + this.projectService.logger.info(`Skipped loading plugin ${n.name} because it did not expose a proper factory function`); + return; + } + const i = { + config: n, + project: this, + languageService: this.languageService, + languageServiceHost: this, + serverHost: this.projectService.host, + session: this.projectService.session + }, s = t({ typescript: qPe }), o = s.create(i); + for (const c of Object.keys(this.languageService)) + c in o || (this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${c} in created LS. Patching.`), o[c] = this.languageService[c]); + this.projectService.logger.info("Plugin validation succeeded"), this.languageService = o, this.plugins.push({ name: n.name, module: s }); + } catch (i) { + this.projectService.logger.info(`Plugin activation failed: ${i}`); + } + } + /** @internal */ + onPluginConfigurationChanged(t, n) { + this.plugins.filter((i) => i.name === t).forEach((i) => { + i.module.onConfigurationChanged && i.module.onConfigurationChanged(n); + }); + } + /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ + refreshDiagnostics() { + this.projectService.sendProjectsUpdatedInBackgroundEvent(); + } + /** @internal */ + getPackageJsonsVisibleToFile(t, n) { + return this.projectService.serverMode !== 0 ? al : this.projectService.getPackageJsonsVisibleToFile(t, this, n); + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(t) { + return this.projectService.getNearestAncestorDirectoryWithPackageJson(t); + } + /** @internal */ + getPackageJsonsForAutoImport(t) { + return this.getPackageJsonsVisibleToFile(Mn(this.currentDirectory, MD), t); + } + /** @internal */ + getPackageJsonCache() { + return this.projectService.packageJsonCache; + } + /** @internal */ + getCachedExportInfoMap() { + return this.exportMapCache || (this.exportMapCache = jU(this)); + } + /** @internal */ + clearCachedExportInfoMap() { + var t; + (t = this.exportMapCache) == null || t.clear(); + } + /** @internal */ + getModuleSpecifierCache() { + return this.moduleSpecifierCache; + } + /** @internal */ + includePackageJsonAutoImports() { + return this.projectService.includePackageJsonAutoImports() === 0 || !this.languageServiceEnabled || yN(this.currentDirectory) || !this.isDefaultProjectForOpenFiles() ? 0 : this.projectService.includePackageJsonAutoImports(); + } + /** @internal */ + getHostForAutoImportProvider() { + var t, n; + return this.program ? { + fileExists: this.program.fileExists, + directoryExists: this.program.directoryExists, + realpath: this.program.realpath || ((t = this.projectService.host.realpath) == null ? void 0 : t.bind(this.projectService.host)), + getCurrentDirectory: this.getCurrentDirectory.bind(this), + readFile: this.projectService.host.readFile.bind(this.projectService.host), + getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), + trace: (n = this.projectService.host.trace) == null ? void 0 : n.bind(this.projectService.host), + useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) + } : this.projectService.host; + } + /** @internal */ + getPackageJsonAutoImportProvider() { + var t, n, i; + if (this.autoImportProviderHost === !1) + return; + if (this.projectService.serverMode !== 0) { + this.autoImportProviderHost = !1; + return; + } + if (this.autoImportProviderHost) { + if (fp(this.autoImportProviderHost), this.autoImportProviderHost.isEmpty()) { + this.autoImportProviderHost.close(), this.autoImportProviderHost = void 0; + return; + } + return this.autoImportProviderHost.getCurrentProgram(); + } + const s = this.includePackageJsonAutoImports(); + if (s) { + (t = rn) == null || t.push(rn.Phase.Session, "getPackageJsonAutoImportProvider"); + const o = Io(); + if (this.autoImportProviderHost = q_e.create(s, this, this.getHostForAutoImportProvider(), this.documentRegistry), this.autoImportProviderHost) + return fp(this.autoImportProviderHost), this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", Io() - o), (n = rn) == null || n.pop(), this.autoImportProviderHost.getCurrentProgram(); + (i = rn) == null || i.pop(); + } + } + /** @internal */ + isDefaultProjectForOpenFiles() { + return !!Dl( + this.projectService.openFiles, + (t, n) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(n)) === this + ); + } + /** @internal */ + watchNodeModulesForPackageJsonChanges(t) { + return this.projectService.watchPackageJsonsInNodeModules(t, this); + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.projectService.getIncompleteCompletionsCache(); + } + /** @internal */ + getNoDtsResolutionProject(t) { + return E.assert( + this.projectService.serverMode === 0 + /* Semantic */ + ), this.noDtsResolutionProject || (this.noDtsResolutionProject = new V_e(this.projectService, this.documentRegistry, this.getCompilerOptionsForNoDtsResolutionProject(), this.currentDirectory)), this.noDtsResolutionProject.rootFile !== t && (this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject, [t]), this.noDtsResolutionProject.rootFile = t), this.noDtsResolutionProject; + } + /** @internal */ + runWithTemporaryFileUpdate(t, n, i) { + var s, o, c, _; + const u = this.program, d = E.checkDefined((s = this.program) == null ? void 0 : s.getSourceFile(t), "Expected file to be part of program"), g = E.checkDefined(d.getText()); + (o = this.getScriptInfo(t)) == null || o.editContent(0, g.length, n), this.updateGraph(); + try { + i(this.program, u, (c = this.program) == null ? void 0 : c.getSourceFile(t)); + } finally { + (_ = this.getScriptInfo(t)) == null || _.editContent(0, this.program.getSourceFile(t).getText().length, g); + } + } + /** @internal */ + getCompilerOptionsForNoDtsResolutionProject() { + return { + ...this.getCompilerOptions(), + noDtsResolution: !0, + allowJs: !0, + maxNodeModuleJsDepth: 3, + diagnostics: !1, + skipLibCheck: !0, + sourceMap: !1, + types: He, + lib: He, + noLib: !0 + }; + } + }; + function WYe(e, t) { + var n, i; + const s = e.getSourceFiles(); + (n = rn) == null || n.push(rn.Phase.Session, "getUnresolvedImports", { count: s.length }); + const o = e.getTypeChecker().getAmbientModules().map((_) => Op(_.getName())), c = SE(Xs(s, (_) => VYe( + e, + _, + o, + t + ))); + return (i = rn) == null || i.pop(), c; + } + function VYe(e, t, n, i) { + return bE(i, t.path, () => { + let s; + return e.forEachResolvedModule(({ resolvedModule: o }, c) => { + (!o || !M4(o.extension)) && !Sl(c) && !n.some((_) => _ === c) && (s = Tr(s, FO(c).packageName)); + }, t), s || al; + }); + } + var W_e = class extends Yx { + /** @internal */ + constructor(e, t, n, i, s, o, c) { + super( + e.newInferredProjectName(), + 0, + e, + t, + // TODO: GH#18217 + /*files*/ + void 0, + /*lastFileExceededProgramSize*/ + void 0, + n, + /*compileOnSaveEnabled*/ + !1, + i, + e.host, + o + ), this._isJsInferredProject = !1, this.typeAcquisition = c, this.projectRootPath = s && e.toCanonicalFileName(s), !s && !e.useSingleInferredProject && (this.canonicalCurrentDirectory = e.toCanonicalFileName(this.currentDirectory)), this.enableGlobalPlugins(this.getCompilerOptions()); + } + toggleJsInferredProject(e) { + e !== this._isJsInferredProject && (this._isJsInferredProject = e, this.setCompilerOptions()); + } + setCompilerOptions(e) { + if (!e && !this.getCompilationSettings()) + return; + const t = KV(e || this.getCompilationSettings()); + this._isJsInferredProject && typeof t.maxNodeModuleJsDepth != "number" ? t.maxNodeModuleJsDepth = 2 : this._isJsInferredProject || (t.maxNodeModuleJsDepth = void 0), t.allowJs = !0, super.setCompilerOptions(t); + } + addRoot(e) { + E.assert(e.isScriptOpen()), this.projectService.startWatchingConfigFilesForInferredProjectRoot(e), !this._isJsInferredProject && e.isJavaScript() ? this.toggleJsInferredProject( + /*isJsInferredProject*/ + !0 + ) : this.isOrphan() && this._isJsInferredProject && !e.isJavaScript() && this.toggleJsInferredProject( + /*isJsInferredProject*/ + !1 + ), super.addRoot(e); + } + removeRoot(e) { + this.projectService.stopWatchingConfigFilesForScriptInfo(e), super.removeRoot(e), !this.isOrphan() && this._isJsInferredProject && e.isJavaScript() && Ri(this.getRootScriptInfos(), (t) => !t.isJavaScript()) && this.toggleJsInferredProject( + /*isJsInferredProject*/ + !1 + ); + } + /** @internal */ + isOrphan() { + return !this.hasRoots(); + } + isProjectWithSingleRoot() { + return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1; + } + close() { + rr(this.getRootScriptInfos(), (e) => this.projectService.stopWatchingConfigFilesForScriptInfo(e)), super.close(); + } + getTypeAcquisition() { + return this.typeAcquisition || { + enable: j_e(this), + include: He, + exclude: He + }; + } + }, V_e = class extends Yx { + constructor(e, t, n, i) { + super( + e.newAuxiliaryProjectName(), + 4, + e, + t, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + n, + /*compileOnSaveEnabled*/ + !1, + /*watchOptions*/ + void 0, + e.host, + i + ); + } + isOrphan() { + return !0; + } + scheduleInvalidateResolutionsOfFailedLookupLocations() { + } + }, U_e = class Yme extends Yx { + /** @internal */ + constructor(t, n, i, s) { + super( + t.projectService.newAutoImportProviderProjectName(), + 3, + t.projectService, + i, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + s, + /*compileOnSaveEnabled*/ + !1, + t.getWatchOptions(), + t.projectService.host, + t.currentDirectory + ), this.hostProject = t, this.rootFileNames = n, this.useSourceOfProjectReferenceRedirect = Ns(this.hostProject, this.hostProject.useSourceOfProjectReferenceRedirect), this.getParsedCommandLine = Ns(this.hostProject, this.hostProject.getParsedCommandLine); + } + /** @internal */ + static getRootFileNames(t, n, i, s) { + var o, c; + if (!t) + return He; + const _ = n.getCurrentProgram(); + if (!_) + return He; + const u = Io(); + let d, g; + const h = Mn(n.currentDirectory, MD), S = n.getPackageJsonsForAutoImport(Mn(n.currentDirectory, h)); + for (const V of S) + (o = V.dependencies) == null || o.forEach((L, $) => O($)), (c = V.peerDependencies) == null || c.forEach((L, $) => O($)); + let T = 0; + if (d) { + const V = n.getSymlinkCache(); + for (const L of ts(d.keys())) { + if (t === 2 && T > this.maxDependencies) + return n.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`), He; + const $ = Iz( + L, + n.currentDirectory, + s, + i, + _.getModuleResolutionCache() + ); + if ($) { + const G = j($, _, V); + if (G) { + T += P(G); + continue; + } + } + if (!rr([n.currentDirectory, n.getGlobalTypingsCacheLocation()], (G) => { + if (G) { + const ce = Iz( + `@types/${L}`, + G, + s, + i, + _.getModuleResolutionCache() + ); + if (ce) { + const K = j(ce, _, V); + return T += P(K), !0; + } + } + }) && $ && s.allowJs && s.maxNodeModuleJsDepth) { + const G = j( + $, + _, + V, + /*resolveJs*/ + !0 + ); + T += P(G); + } + } + } + const C = _.getResolvedProjectReferences(); + let D = 0; + return C?.length && n.projectService.getHostPreferences().includeCompletionsForModuleExports && C.forEach((V) => { + if (V?.commandLine.options.outFile) + D += P(F([ + by(V.commandLine.options.outFile, ".d.ts") + ])); + else if (V) { + const L = Wu( + () => Ox( + V.commandLine, + !n.useCaseSensitiveFileNames() + ) + ); + D += P(F(Ii( + V.commandLine.fileNames, + ($) => !Ol($) && !Go( + $, + ".json" + /* Json */ + ) && !_.getSourceFile($) ? YC( + $, + V.commandLine, + !n.useCaseSensitiveFileNames(), + L + ) : void 0 + ))); + } + }), g?.size && n.log(`AutoImportProviderProject: found ${g.size} root files in ${T} dependencies ${D} referenced projects in ${Io() - u} ms`), g ? ts(g.values()) : He; + function P(V) { + return V?.length ? (g ?? (g = /* @__PURE__ */ new Set()), V.forEach((L) => g.add(L)), 1) : 0; + } + function O(V) { + zi(V, "@types/") || (d || (d = /* @__PURE__ */ new Set())).add(V); + } + function j(V, L, $, U) { + var G; + const ce = Bz( + V, + s, + i, + L.getModuleResolutionCache(), + U + ); + if (ce) { + const K = (G = i.realpath) == null ? void 0 : G.call(i, V.packageDirectory), X = K ? n.toPath(K) : void 0, Z = X && X !== n.toPath(V.packageDirectory); + return Z && $.setSymlinkedDirectory(V.packageDirectory, { + real: bl(K), + realPath: bl(X) + }), F(ce, Z ? (oe) => oe.replace(V.packageDirectory, K) : void 0); + } + } + function F(V, L) { + return Ii(V, ($) => { + const U = L ? L($) : $; + if (!_.getSourceFile(U) && !(L && _.getSourceFile($))) + return U; + }); + } + } + /** @internal */ + static create(t, n, i, s) { + if (t === 0) + return; + const o = { + ...n.getCompilerOptions(), + ...this.compilerOptionsOverrides + }, c = this.getRootFileNames(t, n, i, o); + if (c.length) + return new Yme(n, c, s, o); + } + /** @internal */ + isEmpty() { + return !ut(this.rootFileNames); + } + /** @internal */ + isOrphan() { + return !0; + } + updateGraph() { + let t = this.rootFileNames; + t || (t = Yme.getRootFileNames( + this.hostProject.includePackageJsonAutoImports(), + this.hostProject, + this.hostProject.getHostForAutoImportProvider(), + this.getCompilationSettings() + )), this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this, t), this.rootFileNames = t; + const n = this.getCurrentProgram(), i = super.updateGraph(); + return n && n !== this.getCurrentProgram() && this.hostProject.clearCachedExportInfoMap(), i; + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + } + hasRoots() { + var t; + return !!((t = this.rootFileNames) != null && t.length); + } + /** @internal */ + markAsDirty() { + this.rootFileNames = void 0, super.markAsDirty(); + } + getScriptFileNames() { + return this.rootFileNames || He; + } + getLanguageService() { + throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`."); + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead."); + } + /** @internal */ + onPackageJsonChange() { + throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); + } + getHostForAutoImportProvider() { + throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); + } + getProjectReferences() { + return this.hostProject.getProjectReferences(); + } + /** @internal */ + includePackageJsonAutoImports() { + return 0; + } + /** @internal */ + getSymlinkCache() { + return this.hostProject.getSymlinkCache(); + } + /** @internal */ + getModuleResolutionCache() { + var t; + return (t = this.hostProject.getCurrentProgram()) == null ? void 0 : t.getModuleResolutionCache(); + } + }; + U_e.maxDependencies = 10, U_e.compilerOptionsOverrides = { + diagnostics: !1, + skipLibCheck: !0, + sourceMap: !1, + types: He, + lib: He, + noLib: !0 + }; + var q_e = U_e, H_e = class extends Yx { + /** @internal */ + constructor(e, t, n, i, s, o) { + super( + e, + 1, + n, + i, + /*hasExplicitListOfFiles*/ + !1, + /*lastFileExceededProgramSize*/ + void 0, + /*compilerOptions*/ + {}, + /*compileOnSaveEnabled*/ + !1, + /*watchOptions*/ + void 0, + s, + Xn(e) + ), this.canonicalConfigFilePath = t, this.openFileWatchTriggered = /* @__PURE__ */ new Map(), this.canConfigFileJsonReportNoInputFiles = !1, this.isInitialLoadPending = A1, this.sendLoadingProjectFinish = !1, this.pendingUpdateLevel = 2, this.pendingUpdateReason = o; + } + /** @internal */ + setCompilerHost(e) { + this.compilerHost = e; + } + /** @internal */ + getCompilerHost() { + return this.compilerHost; + } + /** @internal */ + useSourceOfProjectReferenceRedirect() { + return this.languageServiceEnabled; + } + /** @internal */ + getParsedCommandLine(e) { + const t = Cs(e), n = this.projectService.toCanonicalFileName(t); + let i = this.projectService.configFileExistenceInfoCache.get(n); + return i || this.projectService.configFileExistenceInfoCache.set(n, i = { exists: this.projectService.host.fileExists(t) }), this.projectService.ensureParsedConfigUptoDate(t, n, i, this), this.languageServiceEnabled && this.projectService.serverMode === 0 && this.projectService.watchWildcards(t, i, this), i.exists ? i.config.parsedCommandLine : void 0; + } + /** @internal */ + onReleaseParsedCommandLine(e) { + this.releaseParsedConfig(this.projectService.toCanonicalFileName(Cs(e))); + } + /** @internal */ + releaseParsedConfig(e) { + this.projectService.stopWatchingWildCards(e, this), this.projectService.releaseParsedConfig(e, this); + } + /** + * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + if (this.deferredClose) return !1; + const e = this.dirty; + this.isInitialLoadPending = $d; + const t = this.pendingUpdateLevel; + this.pendingUpdateLevel = 0; + let n; + switch (t) { + case 1: + this.openFileWatchTriggered.clear(), n = this.projectService.reloadFileNamesOfConfiguredProject(this); + break; + case 2: + this.openFileWatchTriggered.clear(); + const i = E.checkDefined(this.pendingUpdateReason); + this.projectService.reloadConfiguredProject(this, i), n = !0; + break; + default: + n = super.updateGraph(); + } + return this.compilerHost = void 0, this.projectService.sendProjectLoadingFinishEvent(this), this.projectService.sendProjectTelemetry(this), t === 2 || // Already sent event through reload + n && // Not new program + (!e || !this.triggerFileForConfigFileDiag || this.getCurrentProgram().structureIsReused === 2) ? this.triggerFileForConfigFileDiag = void 0 : this.triggerFileForConfigFileDiag || this.projectService.sendConfigFileDiagEvent( + this, + /*triggerFile*/ + void 0, + /*force*/ + !1 + ), n; + } + /** @internal */ + getCachedDirectoryStructureHost() { + return this.directoryStructureHost; + } + getConfigFilePath() { + return this.getProjectName(); + } + getProjectReferences() { + return this.projectReferences; + } + updateReferences(e) { + this.projectReferences = e, this.potentialProjectReferences = void 0; + } + /** @internal */ + setPotentialProjectReference(e) { + E.assert(this.isInitialLoadPending()), (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(e); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(e) { + const t = this.getCurrentProgram(); + return t && t.getResolvedProjectReferenceToRedirect(e); + } + /** @internal */ + forEachResolvedProjectReference(e) { + var t; + return (t = this.getCurrentProgram()) == null ? void 0 : t.forEachResolvedProjectReference(e); + } + /** @internal */ + enablePluginsWithOptions(e) { + var t; + if (this.plugins.length = 0, !((t = e.plugins) != null && t.length) && !this.projectService.globalPlugins.length) return; + const n = this.projectService.host; + if (!n.require && !n.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const i = this.getGlobalPluginSearchPaths(); + if (this.projectService.allowLocalPluginLoads) { + const s = Xn(this.canonicalConfigFilePath); + this.projectService.logger.info(`Local plugin loading enabled; adding ${s} to search paths`), i.unshift(s); + } + if (e.plugins) + for (const s of e.plugins) + this.enablePlugin(s, i); + return this.enableGlobalPlugins(e); + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return Ln(this.projectErrors, (e) => !e.file) || al; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || al; + } + setProjectErrors(e) { + this.projectErrors = e; + } + close() { + this.projectService.configFileExistenceInfoCache.forEach((e, t) => this.releaseParsedConfig(t)), this.projectErrors = void 0, this.openFileWatchTriggered.clear(), this.compilerHost = void 0, super.close(); + } + /** @internal */ + markAsDirty() { + this.deferredClose || super.markAsDirty(); + } + /** @internal */ + isSolution() { + return this.getRootFilesMap().size === 0 && !this.canConfigFileJsonReportNoInputFiles; + } + /** @internal */ + isOrphan() { + return !!this.deferredClose; + } + getEffectiveTypeRoots() { + return vD(this.getCompilationSettings(), this) || []; + } + /** @internal */ + updateErrorOnNoInputFiles(e) { + CO(e, this.getConfigFilePath(), this.getCompilerOptions().configFile.configFileSpecs, this.projectErrors, this.canConfigFileJsonReportNoInputFiles); + } + }, JH = class extends Yx { + /** @internal */ + constructor(e, t, n, i, s, o, c, _) { + super( + e, + 2, + t, + n, + /*hasExplicitListOfFiles*/ + !0, + s, + i, + o, + _, + t.host, + Xn(c || Rl(e)) + ), this.externalProjectName = e, this.compileOnSaveEnabled = o, this.excludedFiles = [], this.enableGlobalPlugins(this.getCompilerOptions()); + } + updateGraph() { + const e = super.updateGraph(); + return this.projectService.sendProjectTelemetry(this), e; + } + getExcludedFiles() { + return this.excludedFiles; + } + }; + function x6(e) { + return e.projectKind === 0; + } + function P0(e) { + return e.projectKind === 1; + } + function t8(e) { + return e.projectKind === 2; + } + function r8(e) { + return e.projectKind === 3 || e.projectKind === 4; + } + function mL(e) { + return P0(e) && !!e.deferredClose; + } + var zH = 20 * 1024 * 1024, WH = 4 * 1024 * 1024, gL = "projectsUpdatedInBackground", VH = "projectLoadingStart", UH = "projectLoadingFinish", qH = "largeFileReferenced", HH = "configFileDiag", GH = "projectLanguageServiceState", $H = "projectInfo", G_e = "openFileInfo", XH = "createFileWatcher", QH = "createDirectoryWatcher", YH = "closeFileWatcher", fwe = "*ensureProjectForOpenFiles*"; + function pwe(e) { + const t = /* @__PURE__ */ new Map(); + for (const n of e) + if (typeof n.type == "object") { + const i = n.type; + i.forEach((s) => { + E.assert(typeof s == "number"); + }), t.set(n.name, i); + } + return t; + } + var UYe = pwe(Dd), qYe = pwe(Dx), HYe = new Map(Object.entries({ + none: 0, + block: 1, + smart: 2 + /* Smart */ + })), $_e = { + jquery: { + // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") + match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, + types: ["jquery"] + }, + WinJS: { + // e.g. c:/temp/UWApp1/lib/winjs-4.0.1/js/base.js + match: /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i, + // If the winjs/base.js file is found.. + exclude: [["^", 1, "/.*"]], + // ..then exclude all files under the winjs folder + types: ["winjs"] + // And fetch the @types package for WinJS + }, + Kendo: { + // e.g. /Kendo3/wwwroot/lib/kendo/kendo.all.min.js + match: /^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i, + exclude: [["^", 1, "/.*"]], + types: ["kendo-ui"] + }, + "Office Nuget": { + // e.g. /scripts/Office/1/excel-15.debug.js + match: /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i, + // Office NuGet package is installed under a "1/office" folder + exclude: [["^", 1, "/.*"]], + // Exclude that whole folder if the file indicated above is found in it + types: ["office"] + // @types package to fetch instead + }, + References: { + match: /^(.*\/_references\.js)$/i, + exclude: [["^", 1, "$"]] + } + }; + function k6(e) { + return Gi(e.indentStyle) && (e.indentStyle = HYe.get(e.indentStyle.toLowerCase()), E.assert(e.indentStyle !== void 0)), e; + } + function hL(e) { + return UYe.forEach((t, n) => { + const i = e[n]; + Gi(i) && (e[n] = t.get(i.toLowerCase())); + }), e; + } + function n8(e, t) { + let n, i; + return Dx.forEach((s) => { + const o = e[s.name]; + if (o === void 0) return; + const c = qYe.get(s.name); + (n || (n = {}))[s.name] = c ? Gi(o) ? c.get(o.toLowerCase()) : o : pS(s, o, t || "", i || (i = [])); + }), n && { watchOptions: n, errors: i }; + } + function X_e(e) { + let t; + return mO.forEach((n) => { + const i = e[n.name]; + i !== void 0 && ((t || (t = {}))[n.name] = i); + }), t; + } + function ZH(e) { + return Gi(e) ? KH(e) : e; + } + function KH(e) { + switch (e) { + case "JS": + return 1; + case "JSX": + return 2; + case "TS": + return 3; + case "TSX": + return 4; + default: + return 0; + } + } + function Q_e(e) { + const { lazyConfiguredProjectsFromExternalProject: t, ...n } = e; + return n; + } + var eG = { + getFileName: (e) => e, + getScriptKind: (e, t) => { + let n; + if (t) { + const i = Wk(e); + i && ut(t, (s) => s.extension === i ? (n = s.scriptKind, !0) : !1); + } + return n; + }, + hasMixedContent: (e, t) => ut(t, (n) => n.isMixedContent && Go(e, n.extension)) + }, tG = { + getFileName: (e) => e.fileName, + getScriptKind: (e) => ZH(e.scriptKind), + // TODO: GH#18217 + hasMixedContent: (e) => !!e.hasMixedContent + }; + function dwe(e, t) { + for (const n of t) + if (n.getProjectName() === e) + return n; + } + var Y_e = { close: ka }; + function mwe(e, t) { + if (!(!t || rG(e))) + return t.get(e.path); + } + function GYe(e) { + return !!e.containingProjects; + } + function rG(e) { + return !!e.configFileInfo; + } + var Z_e = /* @__PURE__ */ ((e) => (e[e.Find = 0] = "Find", e[e.Create = 1] = "Create", e[e.Reload = 2] = "Reload", e))(Z_e || {}); + function $Ye(e, t, n, i, s, o, c, _) { + for (; ; ) { + if (!t.isInitialLoadPending() && (!t.getCompilerOptions().composite || t.getCompilerOptions().disableSolutionSearching)) return; + const u = t.projectService.getConfigFileNameForFile( + { + fileName: t.getConfigFilePath(), + path: e.path, + configFileInfo: !0 + }, + i === 0 + /* Find */ + ); + if (!u) return; + const d = t.projectService.findCreateOrReloadConfiguredProject( + u, + i, + s, + o, + /*triggerFile*/ + void 0, + c, + /*delayLoad*/ + !0, + _ + ); + if (!d) return; + d.project.isInitialLoadPending() && t.getCompilerOptions().composite && d.project.setPotentialProjectReference(t.canonicalConfigFilePath); + const g = n(d.project); + if (g) return g; + t = d.project; + } + } + function nG(e, t, n, i, s, o, c, _) { + var u; + const d = (u = e.getCurrentProgram()) == null ? void 0 : u.getResolvedProjectReferences(); + if (!d) return; + const g = t ? e.getResolvedProjectReferenceToRedirect(t) : void 0; + if (g) { + const T = Wo(g.sourceFile.fileName), C = e.projectService.findConfiguredProjectByProjectName( + T, + o + ); + if (C) { + const D = S(C); + if (D) return D; + } else if (i !== 0) { + const D = K_e( + d, + e.getCompilerOptions(), + (P, O) => g === P ? h(P, O) : void 0, + i, + e.projectService + ); + if (D) return D; + } + } + return K_e( + d, + e.getCompilerOptions(), + (T, C) => g !== T ? h(T, C) : void 0, + i, + e.projectService + ); + function h(T, C) { + const D = e.projectService.findCreateOrReloadConfiguredProject( + Wo(T.sourceFile.fileName), + C, + s, + o, + c, + _ + ); + return D && (C === i ? n(D.project, D.sentConfigFileDiag) : S(D.project)); + } + function S(T) { + let C = !1; + switch (i) { + case 1: + C = bwe(T, c); + break; + case 2: + C = T.projectService.reloadConfiguredProjectClearingSemanticCache(T, s, _); + break; + case 0: + break; + default: + E.assertNever(i); + } + const D = n(T, C); + if (D) return D; + } + } + function K_e(e, t, n, i, s, o) { + const c = t.disableReferencedProjectLoad ? 0 : i; + return rr(e, (_) => { + if (!_) return; + const u = Wo(_.sourceFile.fileName), d = s.toCanonicalFileName(u), g = o?.get(d); + if (g !== void 0 && g >= c) + return; + const h = n(_, c); + return h || ((o || (o = /* @__PURE__ */ new Map())).set(d, c), _.references && K_e(_.references, _.commandLine.options, n, c, s, o)); + }); + } + function gwe(e, t) { + return e.potentialProjectReferences && uh(e.potentialProjectReferences, t); + } + function XYe(e, t, n, i) { + return e.getCurrentProgram() ? e.forEachResolvedProjectReference(t) : e.isInitialLoadPending() ? gwe(e, i) : rr(e.getProjectReferences(), n); + } + function efe(e, t, n) { + const i = n && e.projectService.configuredProjects.get(n); + return i && t(i); + } + function hwe(e, t) { + return XYe( + e, + (n) => efe(e, t, n.sourceFile.path), + (n) => efe(e, t, e.toPath(e6(n))), + (n) => efe(e, t, n) + ); + } + function QYe(e, t) { + return `${Gi(t) ? `Config: ${t} ` : t ? `Project: ${t.getProjectName()} ` : ""}WatchType: ${e}`; + } + function ywe(e) { + return !e.isScriptOpen() && e.mTime !== void 0; + } + function fp(e) { + return e.invalidateResolutionsOfFailedLookupLocations(), e.dirty && !e.updateGraph(); + } + function vwe(e, t, n) { + if (!n && (e.invalidateResolutionsOfFailedLookupLocations(), !e.dirty)) + return !1; + e.triggerFileForConfigFileDiag = t; + const i = e.pendingUpdateLevel; + if (e.updateGraph(), !e.triggerFileForConfigFileDiag && !n) return i === 2; + const s = e.projectService.sendConfigFileDiagEvent(e, t, n); + return e.triggerFileForConfigFileDiag = void 0, s; + } + function bwe(e, t) { + if (t) { + if (vwe( + e, + t, + /*isReload*/ + !1 + )) return !0; + } else + fp(e); + return !1; + } + function Swe(e) { + return `Creating possible configured project for ${e.fileName} to open`; + } + function iG(e) { + return `User requested reload projects: ${e}`; + } + function tfe(e) { + P0(e) && (e.projectOptions = !0); + } + function rfe(e) { + let t = 1; + return () => e(t++); + } + function nfe() { + return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() }; + } + function YYe(e, t) { + if (!t || !e.eventHandler || !e.session) return; + const n = nfe(), i = nfe(), s = nfe(); + let o = 1; + return e.session.addProtocolHandler("watchChange", (T) => (d(T.arguments), { responseRequired: !1 })), { + watchFile: c, + watchDirectory: _, + getCurrentDirectory: () => e.host.getCurrentDirectory(), + useCaseSensitiveFileNames: e.host.useCaseSensitiveFileNames + }; + function c(T, C) { + return u( + n, + T, + C, + (D) => ({ eventName: XH, data: { id: D, path: T } }) + ); + } + function _(T, C, D) { + return u( + D ? s : i, + T, + C, + (P) => ({ + eventName: QH, + data: { + id: P, + path: T, + recursive: !!D, + // Special case node_modules as we watch it for changes to closed script infos as well + ignoreUpdate: T.endsWith("/node_modules") ? void 0 : !0 + } + }) + ); + } + function u({ pathToId: T, idToCallbacks: C }, D, P, O) { + const j = e.toPath(D); + let F = T.get(j); + F || T.set(j, F = o++); + let V = C.get(F); + return V || (C.set(F, V = /* @__PURE__ */ new Set()), e.eventHandler(O(F))), V.add(P), { + close() { + const L = C.get(F); + L?.delete(P) && (L.size || (C.delete(F), T.delete(j), e.eventHandler({ eventName: YH, data: { id: F } }))); + } + }; + } + function d(T) { + ss(T) ? T.forEach(g) : g(T); + } + function g({ id: T, created: C, deleted: D, updated: P }) { + h( + T, + C, + 0 + /* Created */ + ), h( + T, + D, + 2 + /* Deleted */ + ), h( + T, + P, + 1 + /* Changed */ + ); + } + function h(T, C, D) { + C?.length && (S(n, T, C, (P, O) => P(O, D)), S(i, T, C, (P, O) => P(O)), S(s, T, C, (P, O) => P(O))); + } + function S(T, C, D, P) { + var O; + (O = T.idToCallbacks.get(C)) == null || O.forEach((j) => { + D.forEach((F) => P(j, Rl(F))); + }); + } + } + var Twe = class Zme { + constructor(t) { + this.filenameToScriptInfo = /* @__PURE__ */ new Map(), this.nodeModulesWatchers = /* @__PURE__ */ new Map(), this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map(), this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Map(), this.externalProjectToConfiguredProjectMap = /* @__PURE__ */ new Map(), this.externalProjects = [], this.inferredProjects = [], this.configuredProjects = /* @__PURE__ */ new Map(), this.newInferredProjectName = rfe(D_e), this.newAutoImportProviderProjectName = rfe(P_e), this.newAuxiliaryProjectName = rfe(w_e), this.openFiles = /* @__PURE__ */ new Map(), this.configFileForOpenFiles = /* @__PURE__ */ new Map(), this.rootOfInferredProjects = /* @__PURE__ */ new Set(), this.openFilesWithNonRootedDiskPath = /* @__PURE__ */ new Map(), this.compilerOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.watchOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.typeAcquisitionForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(), this.projectToSizeMap = /* @__PURE__ */ new Map(), this.configFileExistenceInfoCache = /* @__PURE__ */ new Map(), this.safelist = $_e, this.legacySafelist = /* @__PURE__ */ new Map(), this.pendingProjectUpdates = /* @__PURE__ */ new Map(), this.pendingEnsureProjectForOpenFiles = !1, this.seenProjects = /* @__PURE__ */ new Map(), this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(), this.extendedConfigCache = /* @__PURE__ */ new Map(), this.baseline = ka, this.verifyDocumentRegistry = ka, this.verifyProgram = ka, this.onProjectCreation = ka; + var n; + this.host = t.host, this.logger = t.logger, this.cancellationToken = t.cancellationToken, this.useSingleInferredProject = t.useSingleInferredProject, this.useInferredProjectPerProjectRoot = t.useInferredProjectPerProjectRoot, this.typingsInstaller = t.typingsInstaller || BH, this.throttleWaitMilliseconds = t.throttleWaitMilliseconds, this.eventHandler = t.eventHandler, this.suppressDiagnosticEvents = t.suppressDiagnosticEvents, this.globalPlugins = t.globalPlugins || al, this.pluginProbeLocations = t.pluginProbeLocations || al, this.allowLocalPluginLoads = !!t.allowLocalPluginLoads, this.typesMapLocation = t.typesMapLocation === void 0 ? Mn(Xn(this.getExecutingFilePath()), "typesMap.json") : t.typesMapLocation, this.session = t.session, this.jsDocParsingMode = t.jsDocParsingMode, t.serverMode !== void 0 ? this.serverMode = t.serverMode : this.serverMode = 0, this.host.realpath && (this.realpathToScriptInfos = Kf()), this.currentDirectory = Wo(this.host.getCurrentDirectory()), this.toCanonicalFileName = eu(this.host.useCaseSensitiveFileNames), this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? bl(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0, this.throttledOperations = new N_e(this.host, this.logger), this.typesMapLocation ? this.loadTypesMap() : this.logger.info("No types map provided; using the default"), this.typingsInstaller.attach(this), this.typingsCache = new R_e(this.typingsInstaller), this.hostConfiguration = { + formatCodeOptions: IF(this.host.newLine), + preferences: Bp, + hostInfo: "Unknown host", + extraFileExtensions: [] + }, this.documentRegistry = UU(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this); + const i = this.logger.hasLevel( + 3 + /* verbose */ + ) ? 2 : this.logger.loggingEnabled() ? 1 : 0, s = i !== 0 ? (o) => this.logger.info(o) : ka; + this.packageJsonCache = cfe(this), this.watchFactory = this.serverMode !== 0 ? { + watchFile: BD, + watchDirectory: BD + } : CW( + YYe(this, t.canUseWatchEvents) || this.host, + i, + s, + QYe + ), (n = t.incrementalVerifier) == null || n.call(t, this); + } + toPath(t) { + return _o(t, this.currentDirectory, this.toCanonicalFileName); + } + /** @internal */ + getExecutingFilePath() { + return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath()); + } + /** @internal */ + getNormalizedAbsolutePath(t) { + return Xi(t, this.host.getCurrentDirectory()); + } + /** @internal */ + setDocument(t, n, i) { + const s = E.checkDefined(this.getScriptInfoForPath(n)); + s.cacheSourceFile = { key: t, sourceFile: i }; + } + /** @internal */ + getDocument(t, n) { + const i = this.getScriptInfoForPath(n); + return i && i.cacheSourceFile && i.cacheSourceFile.key === t ? i.cacheSourceFile.sourceFile : void 0; + } + /** @internal */ + ensureInferredProjectsUpToDate_TestOnly() { + this.ensureProjectStructuresUptoDate(); + } + /** @internal */ + getCompilerOptionsForInferredProjects() { + return this.compilerOptionsForInferredProjects; + } + /** @internal */ + onUpdateLanguageServiceStateForProject(t, n) { + if (!this.eventHandler) + return; + const i = { + eventName: GH, + data: { project: t, languageServiceEnabled: n } + }; + this.eventHandler(i); + } + loadTypesMap() { + try { + const t = this.host.readFile(this.typesMapLocation); + if (t === void 0) { + this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`); + return; + } + const n = JSON.parse(t); + for (const i of Object.keys(n.typesMap)) + n.typesMap[i].match = new RegExp(n.typesMap[i].match, "i"); + this.safelist = n.typesMap; + for (const i in n.simpleMap) + io(n.simpleMap, i) && this.legacySafelist.set(i, n.simpleMap[i].toLowerCase()); + } catch (t) { + this.logger.info(`Error loading types map: ${t}`), this.safelist = $_e, this.legacySafelist.clear(); + } + } + // eslint-disable-line @typescript-eslint/unified-signatures + updateTypingsForProject(t) { + const n = this.findProject(t.projectName); + if (n) + switch (t.kind) { + case PF: + n.updateTypingFiles(this.typingsCache.updateTypingsForProject(t.projectName, t.compilerOptions, t.typeAcquisition, t.unresolvedImports, t.typings)); + return; + case wF: + this.typingsCache.enqueueInstallTypingsForProject( + n, + n.lastCachedUnresolvedImportsList, + /*forceRefresh*/ + !0 + ); + return; + } + } + /** @internal */ + watchTypingLocations(t) { + var n; + (n = this.findProject(t.projectName)) == null || n.watchTypingLocations(t.files); + } + /** @internal */ + delayEnsureProjectForOpenFiles() { + this.openFiles.size && (this.pendingEnsureProjectForOpenFiles = !0, this.throttledOperations.schedule( + fwe, + /*delay*/ + 2500, + () => { + this.pendingProjectUpdates.size !== 0 ? this.delayEnsureProjectForOpenFiles() : this.pendingEnsureProjectForOpenFiles && (this.ensureProjectForOpenFiles(), this.sendProjectsUpdatedInBackgroundEvent()); + } + )); + } + delayUpdateProjectGraph(t) { + if (mL(t) || (t.markAsDirty(), r8(t))) return; + const n = t.getProjectName(); + this.pendingProjectUpdates.set(n, t), this.throttledOperations.schedule( + n, + /*delay*/ + 250, + () => { + this.pendingProjectUpdates.delete(n) && fp(t); + } + ); + } + /** @internal */ + hasPendingProjectUpdate(t) { + return this.pendingProjectUpdates.has(t.getProjectName()); + } + /** @internal */ + sendProjectsUpdatedInBackgroundEvent() { + if (!this.eventHandler) + return; + const t = { + eventName: gL, + data: { + openFiles: ts(this.openFiles.keys(), (n) => this.getScriptInfoForPath(n).fileName) + } + }; + this.eventHandler(t); + } + /** @internal */ + sendLargeFileReferencedEvent(t, n) { + if (!this.eventHandler) + return; + const i = { + eventName: qH, + data: { file: t, fileSize: n, maxFileSize: WH } + }; + this.eventHandler(i); + } + /** @internal */ + sendProjectLoadingStartEvent(t, n) { + if (!this.eventHandler) + return; + t.sendLoadingProjectFinish = !0; + const i = { + eventName: VH, + data: { project: t, reason: n } + }; + this.eventHandler(i); + } + /** @internal */ + sendProjectLoadingFinishEvent(t) { + if (!this.eventHandler || !t.sendLoadingProjectFinish) + return; + t.sendLoadingProjectFinish = !1; + const n = { + eventName: UH, + data: { project: t } + }; + this.eventHandler(n); + } + /** @internal */ + sendPerformanceEvent(t, n) { + this.performanceEventHandler && this.performanceEventHandler({ kind: t, durationMs: n }); + } + /** @internal */ + delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(t) { + this.delayUpdateProjectGraph(t), this.delayEnsureProjectForOpenFiles(); + } + delayUpdateProjectGraphs(t, n) { + if (t.length) { + for (const i of t) + n && i.clearSourceMapperCache(), this.delayUpdateProjectGraph(i); + this.delayEnsureProjectForOpenFiles(); + } + } + setCompilerOptionsForInferredProjects(t, n) { + E.assert(n === void 0 || this.useInferredProjectPerProjectRoot, "Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled"); + const i = hL(t), s = n8(t, n), o = X_e(t); + i.allowNonTsExtensions = !0; + const c = n && this.toCanonicalFileName(n); + c ? (this.compilerOptionsForInferredProjectsPerProjectRoot.set(c, i), this.watchOptionsForInferredProjectsPerProjectRoot.set(c, s || !1), this.typeAcquisitionForInferredProjectsPerProjectRoot.set(c, o)) : (this.compilerOptionsForInferredProjects = i, this.watchOptionsForInferredProjects = s, this.typeAcquisitionForInferredProjects = o); + for (const _ of this.inferredProjects) + (c ? _.projectRootPath === c : !_.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(_.projectRootPath)) && (_.setCompilerOptions(i), _.setTypeAcquisition(o), _.setWatchOptions(s?.watchOptions), _.setProjectErrors(s?.errors), _.compileOnSaveEnabled = i.compileOnSave, _.markAsDirty(), this.delayUpdateProjectGraph(_)); + this.delayEnsureProjectForOpenFiles(); + } + findProject(t) { + if (t !== void 0) + return E_e(t) ? dwe(t, this.inferredProjects) : this.findExternalProjectByProjectName(t) || this.findConfiguredProjectByProjectName(Wo(t)); + } + /** @internal */ + forEachProject(t) { + this.externalProjects.forEach(t), this.configuredProjects.forEach(t), this.inferredProjects.forEach(t); + } + /** @internal */ + forEachEnabledProject(t) { + this.forEachProject((n) => { + !n.isOrphan() && n.languageServiceEnabled && t(n); + }); + } + getDefaultProjectForFile(t, n) { + return n ? this.ensureDefaultProjectForFile(t) : this.tryGetDefaultProjectForFile(t); + } + /** @internal */ + tryGetDefaultProjectForFile(t) { + const n = Gi(t) ? this.getScriptInfoForNormalizedPath(t) : t; + return n && !n.isOrphan() ? n.getDefaultProject() : void 0; + } + /** + * If there is default project calculation pending for this file, + * then it completes that calculation so that correct default project is used for the project + */ + tryGetDefaultProjectForEnsuringConfiguredProjectForFile(t) { + var n; + const i = Gi(t) ? this.getScriptInfoForNormalizedPath(t) : t; + if (i) + return (n = this.pendingOpenFileProjectUpdates) != null && n.delete(i.path) && (this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + i, + 1 + /* Create */ + ), i.isOrphan() && this.assignOrphanScriptInfoToInferredProject(i, this.openFiles.get(i.path))), this.tryGetDefaultProjectForFile(i); + } + /** @internal */ + ensureDefaultProjectForFile(t) { + return this.tryGetDefaultProjectForEnsuringConfiguredProjectForFile(t) || this.doEnsureDefaultProjectForFile(t); + } + doEnsureDefaultProjectForFile(t) { + this.ensureProjectStructuresUptoDate(); + const n = Gi(t) ? this.getScriptInfoForNormalizedPath(t) : t; + return n ? n.getDefaultProject() : (this.logErrorForScriptInfoNotFound(Gi(t) ? t : t.fileName), Ph.ThrowNoProject()); + } + getScriptInfoEnsuringProjectsUptoDate(t) { + return this.ensureProjectStructuresUptoDate(), this.getScriptInfo(t); + } + /** + * Ensures the project structures are upto date + * This means, + * - we go through all the projects and update them if they are dirty + * - if updates reflect some change in structure or there was pending request to ensure projects for open files + * ensure that each open script info has project + */ + ensureProjectStructuresUptoDate() { + let t = this.pendingEnsureProjectForOpenFiles; + this.pendingProjectUpdates.clear(); + const n = (i) => { + t = fp(i) || t; + }; + this.externalProjects.forEach(n), this.configuredProjects.forEach(n), this.inferredProjects.forEach(n), t && this.ensureProjectForOpenFiles(); + } + getFormatCodeOptions(t) { + const n = this.getScriptInfoForNormalizedPath(t); + return n && n.getFormatCodeSettings() || this.hostConfiguration.formatCodeOptions; + } + getPreferences(t) { + const n = this.getScriptInfoForNormalizedPath(t); + return { ...this.hostConfiguration.preferences, ...n && n.getPreferences() }; + } + getHostFormatCodeOptions() { + return this.hostConfiguration.formatCodeOptions; + } + getHostPreferences() { + return this.hostConfiguration.preferences; + } + onSourceFileChanged(t, n) { + E.assert(!t.isScriptOpen()), n === 2 ? this.handleDeletedFile( + t, + /*deferredDelete*/ + !0 + ) : (t.deferredDelete && (t.deferredDelete = void 0), t.delayReloadNonMixedContentFile(), this.delayUpdateProjectGraphs( + t.containingProjects, + /*clearSourceMapperCache*/ + !1 + ), this.handleSourceMapProjects(t)); + } + handleSourceMapProjects(t) { + if (t.sourceMapFilePath) + if (Gi(t.sourceMapFilePath)) { + const n = this.getScriptInfoForPath(t.sourceMapFilePath); + this.delayUpdateSourceInfoProjects(n?.sourceInfos); + } else + this.delayUpdateSourceInfoProjects(t.sourceMapFilePath.sourceInfos); + this.delayUpdateSourceInfoProjects(t.sourceInfos), t.declarationInfoPath && this.delayUpdateProjectsOfScriptInfoPath(t.declarationInfoPath); + } + delayUpdateSourceInfoProjects(t) { + t && t.forEach((n, i) => this.delayUpdateProjectsOfScriptInfoPath(i)); + } + delayUpdateProjectsOfScriptInfoPath(t) { + const n = this.getScriptInfoForPath(t); + n && this.delayUpdateProjectGraphs( + n.containingProjects, + /*clearSourceMapperCache*/ + !0 + ); + } + handleDeletedFile(t, n) { + E.assert(!t.isScriptOpen()), this.delayUpdateProjectGraphs( + t.containingProjects, + /*clearSourceMapperCache*/ + !1 + ), this.handleSourceMapProjects(t), t.detachAllProjects(), n ? (t.delayReloadNonMixedContentFile(), t.deferredDelete = !0) : this.deleteScriptInfo(t); + } + /** + * This is to watch whenever files are added or removed to the wildcard directories + * + * @internal + */ + watchWildcardDirectory(t, n, i, s) { + let o = this.watchFactory.watchDirectory( + t, + (_) => { + const u = this.toPath(_), d = s.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(_, u); + if (Wc(u) === "package.json" && !yN(u) && (d && d.fileExists || !d && this.host.fileExists(_))) { + const h = this.getNormalizedAbsolutePath(_); + this.logger.info(`Config: ${i} Detected new package.json: ${h}`), this.packageJsonCache.addOrUpdate(h, u), this.watchPackageJsonFile(h, u, c); + } + const g = this.findConfiguredProjectByProjectName(i); + BA({ + watchedDirPath: this.toPath(t), + fileOrDirectory: _, + fileOrDirectoryPath: u, + configFileName: i, + extraFileExtensions: this.hostConfiguration.extraFileExtensions, + currentDirectory: this.currentDirectory, + options: s.parsedCommandLine.options, + program: g?.getCurrentProgram() || s.parsedCommandLine.fileNames, + useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, + writeLog: (h) => this.logger.info(h), + toPath: (h) => this.toPath(h), + getScriptKind: g ? (h) => g.getScriptKind(h) : void 0 + }) || (s.updateLevel !== 2 && (s.updateLevel = 1), s.projects.forEach((h, S) => { + var T; + if (!h) return; + const C = this.getConfiguredProjectByCanonicalConfigFilePath(S); + if (!C) return; + if (g !== C && this.getHostPreferences().includeCompletionsForModuleExports) { + const P = this.toPath(i); + Nn((T = C.getCurrentProgram()) == null ? void 0 : T.getResolvedProjectReferences(), (O) => O?.sourceFile.path === P) && C.markAutoImportProviderAsDirty(); + } + const D = g === C ? 1 : 0; + if (!(C.pendingUpdateLevel > D)) + if (this.openFiles.has(u)) + if (E.checkDefined(this.getScriptInfoForPath(u)).isAttached(C)) { + const O = Math.max( + D, + C.openFileWatchTriggered.get(u) || 0 + /* Update */ + ); + C.openFileWatchTriggered.set(u, O); + } else + C.pendingUpdateLevel = D, this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(C); + else + C.pendingUpdateLevel = D, this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(C); + })); + }, + n, + this.getWatchOptionsFromProjectWatchOptions(s.parsedCommandLine.watchOptions, Xn(i)), + kl.WildcardDirectory, + i + ); + const c = { + packageJsonWatches: void 0, + close() { + var _; + o && (o.close(), o = void 0, (_ = c.packageJsonWatches) == null || _.forEach((u) => { + u.projects.delete(c), u.close(); + }), c.packageJsonWatches = void 0); + } + }; + return c; + } + /** @internal */ + delayUpdateProjectsFromParsedConfigOnConfigFileChange(t, n) { + const i = this.configFileExistenceInfoCache.get(t); + if (!i?.config) return !1; + let s = !1; + return i.config.updateLevel = 2, i.config.projects.forEach((o, c) => { + var _; + const u = this.getConfiguredProjectByCanonicalConfigFilePath(c); + if (u) + if (s = !0, c === t) { + if (u.isInitialLoadPending()) return; + u.pendingUpdateLevel = 2, u.pendingUpdateReason = n, this.delayUpdateProjectGraph(u), u.markAutoImportProviderAsDirty(); + } else { + const d = this.toPath(t); + u.resolutionCache.removeResolutionsFromProjectReferenceRedirects(d), this.delayUpdateProjectGraph(u), this.getHostPreferences().includeCompletionsForModuleExports && Nn((_ = u.getCurrentProgram()) == null ? void 0 : _.getResolvedProjectReferences(), (g) => g?.sourceFile.path === d) && u.markAutoImportProviderAsDirty(); + } + }), s; + } + /** @internal */ + onConfigFileChanged(t, n, i) { + const s = this.configFileExistenceInfoCache.get(n), o = this.getConfiguredProjectByCanonicalConfigFilePath(n), c = o?.deferredClose; + i === 2 ? (s.exists = !1, o && (o.deferredClose = !0)) : (s.exists = !0, c && (o.deferredClose = void 0, o.markAsDirty())), this.delayUpdateProjectsFromParsedConfigOnConfigFileChange( + n, + "Change in config file detected" + ); + const _ = new Set(o ? [o] : void 0); + this.openFiles.forEach((u, d) => { + var g, h; + const S = this.configFileForOpenFiles.get(d); + if (!((g = s.openFilesImpactedByConfigFile) != null && g.has(d))) return; + this.configFileForOpenFiles.delete(d); + const T = this.getScriptInfoForPath(d), C = this.getConfigFileNameForFile( + T, + /*findFromCacheOnly*/ + !1 + ); + if (!C) return; + const D = this.findConfiguredProjectByProjectName(C) ?? this.createConfiguredProject( + C, + `Change in config file ${t} detected, ${Swe(T)}` + ); + (h = this.pendingOpenFileProjectUpdates) != null && h.has(d) || (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(d, S), ih(_, D) && D.isInitialLoadPending() && this.delayUpdateProjectGraph(D); + }), this.delayEnsureProjectForOpenFiles(); + } + removeProject(t) { + switch (this.logger.info("`remove Project::"), t.print( + /*writeProjectFileNames*/ + !0, + /*writeFileExplaination*/ + !0, + /*writeFileVersionAndText*/ + !1 + ), t.close(), E.shouldAssert( + 1 + /* Normal */ + ) && this.filenameToScriptInfo.forEach( + (n) => E.assert( + !n.isAttached(t), + "Found script Info still attached to project", + () => `${t.projectName}: ScriptInfos still attached: ${JSON.stringify( + ts( + P1( + this.filenameToScriptInfo.values(), + (i) => i.isAttached(t) ? { + fileName: i.fileName, + projects: i.containingProjects.map((s) => s.projectName), + hasMixedContent: i.hasMixedContent + } : void 0 + ) + ), + /*replacer*/ + void 0, + " " + )}` + ) + ), this.pendingProjectUpdates.delete(t.getProjectName()), t.projectKind) { + case 2: + bT(this.externalProjects, t), this.projectToSizeMap.delete(t.getProjectName()); + break; + case 1: + this.configuredProjects.delete(t.canonicalConfigFilePath), this.projectToSizeMap.delete(t.canonicalConfigFilePath); + break; + case 0: + bT(this.inferredProjects, t); + break; + } + } + /** @internal */ + assignOrphanScriptInfoToInferredProject(t, n) { + E.assert(t.isOrphan()); + const i = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(t, n) || this.getOrCreateSingleInferredProjectIfEnabled() || this.getOrCreateSingleInferredWithoutProjectRoot( + t.isDynamic ? n || this.currentDirectory : Xn( + $_(t.fileName) ? t.fileName : Xi( + t.fileName, + n ? this.getNormalizedAbsolutePath(n) : this.currentDirectory + ) + ) + ); + if (i.addRoot(t), t.containingProjects[0] !== i && (xE(t.containingProjects, i), t.containingProjects.unshift(i)), i.updateGraph(), !this.useSingleInferredProject && !i.projectRootPath) + for (const s of this.inferredProjects) { + if (s === i || s.isOrphan()) + continue; + const o = s.getRootScriptInfos(); + E.assert(o.length === 1 || !!s.projectRootPath), o.length === 1 && rr(o[0].containingProjects, (c) => c !== o[0].containingProjects[0] && !c.isOrphan()) && s.removeFile( + o[0], + /*fileExists*/ + !0, + /*detachFromProject*/ + !0 + ); + } + return i; + } + assignOrphanScriptInfosToInferredProject() { + this.openFiles.forEach((t, n) => { + const i = this.getScriptInfoForPath(n); + i.isOrphan() && this.assignOrphanScriptInfoToInferredProject(i, t); + }); + } + /** + * Remove this file from the set of open, non-configured files. + * @param info The file that has been closed or newly configured + */ + closeOpenFile(t, n) { + var i; + const s = t.isDynamic ? !1 : this.host.fileExists(t.fileName); + t.close(s), this.stopWatchingConfigFilesForScriptInfo(t); + const o = this.toCanonicalFileName(t.fileName); + this.openFilesWithNonRootedDiskPath.get(o) === t && this.openFilesWithNonRootedDiskPath.delete(o); + let c = !1; + for (const _ of t.containingProjects) { + if (P0(_)) { + t.hasMixedContent && t.registerFileUpdate(); + const u = _.openFileWatchTriggered.get(t.path); + u !== void 0 && (_.openFileWatchTriggered.delete(t.path), _.pendingUpdateLevel < u && (_.pendingUpdateLevel = u, _.markFileAsDirty(t.path))); + } else x6(_) && _.isRoot(t) && (_.isProjectWithSingleRoot() && (c = !0), _.removeFile( + t, + s, + /*detachFromProject*/ + !0 + )); + _.languageServiceEnabled || _.markAsDirty(); + } + return this.openFiles.delete(t.path), this.configFileForOpenFiles.delete(t.path), (i = this.pendingOpenFileProjectUpdates) == null || i.delete(t.path), E.assert(!this.rootOfInferredProjects.has(t)), !n && c && this.assignOrphanScriptInfosToInferredProject(), s ? this.watchClosedScriptInfo(t) : this.handleDeletedFile( + t, + /*deferredDelete*/ + !1 + ), c; + } + deleteScriptInfo(t) { + E.assert(!t.isScriptOpen()), this.filenameToScriptInfo.delete(t.path), this.filenameToScriptInfoVersion.set(t.path, t.textStorage.version), this.stopWatchingScriptInfo(t); + const n = t.getRealpathIfDifferent(); + n && this.realpathToScriptInfos.remove(n, t), t.closeSourceMapFileWatcher(); + } + configFileExists(t, n, i) { + const s = this.configFileExistenceInfoCache.get(n); + let o; + if (this.openFiles.has(i.path) && !rG(i) && (s ? (s.openFilesImpactedByConfigFile ?? (s.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(i.path) : (o = /* @__PURE__ */ new Set()).add(i.path)), s) return s.exists; + const c = this.host.fileExists(t); + return this.configFileExistenceInfoCache.set(n, { exists: c, openFilesImpactedByConfigFile: o }), c; + } + /** @internal */ + createConfigFileWatcherForParsedConfig(t, n, i) { + var s, o; + const c = this.configFileExistenceInfoCache.get(n); + (!c.watcher || c.watcher === Y_e) && (c.watcher = this.watchFactory.watchFile( + t, + (u, d) => this.onConfigFileChanged(t, n, d), + 2e3, + this.getWatchOptionsFromProjectWatchOptions((o = (s = c?.config) == null ? void 0 : s.parsedCommandLine) == null ? void 0 : o.watchOptions, Xn(t)), + kl.ConfigFile, + i + )); + const _ = c.config.projects; + _.set(i.canonicalConfigFilePath, _.get(i.canonicalConfigFilePath) || !1); + } + /** @internal */ + releaseParsedConfig(t, n) { + var i, s, o; + const c = this.configFileExistenceInfoCache.get(t); + (i = c.config) != null && i.projects.delete(n.canonicalConfigFilePath) && ((s = c.config) != null && s.projects.size || (c.config = void 0, xW(t, this.sharedExtendedConfigFileWatchers), E.checkDefined(c.watcher), (o = c.openFilesImpactedByConfigFile) != null && o.size ? c.inferredProjectRoots ? pF(vl(Xn(t))) || (c.watcher.close(), c.watcher = Y_e) : (c.watcher.close(), c.watcher = void 0) : (c.watcher.close(), this.configFileExistenceInfoCache.delete(t)))); + } + /** + * This is called on file close or when its removed from inferred project as root, + * so that we handle the watches and inferred project root data + * @internal + */ + stopWatchingConfigFilesForScriptInfo(t) { + if (this.serverMode !== 0) return; + const n = this.rootOfInferredProjects.delete(t), i = t.isScriptOpen(); + i && !n || this.forEachConfigFileLocation(t, (s) => { + var o, c, _; + const u = this.configFileExistenceInfoCache.get(s); + if (u) { + if (i) { + if (!((o = u?.openFilesImpactedByConfigFile) != null && o.has(t.path))) return; + } else if (!((c = u.openFilesImpactedByConfigFile) != null && c.delete(t.path))) return; + n && (u.inferredProjectRoots--, u.watcher && !u.config && !u.inferredProjectRoots && (u.watcher.close(), u.watcher = void 0)), !((_ = u.openFilesImpactedByConfigFile) != null && _.size) && !u.config && (E.assert(!u.watcher), this.configFileExistenceInfoCache.delete(s)); + } + }); + } + /** + * This is called by inferred project whenever script info is added as a root + * + * @internal + */ + startWatchingConfigFilesForInferredProjectRoot(t) { + this.serverMode === 0 && (E.assert(t.isScriptOpen()), this.rootOfInferredProjects.add(t), this.forEachConfigFileLocation(t, (n, i) => { + let s = this.configFileExistenceInfoCache.get(n); + s ? s.inferredProjectRoots = (s.inferredProjectRoots ?? 0) + 1 : (s = { exists: this.host.fileExists(i), inferredProjectRoots: 1 }, this.configFileExistenceInfoCache.set(n, s)), (s.openFilesImpactedByConfigFile ?? (s.openFilesImpactedByConfigFile = /* @__PURE__ */ new Set())).add(t.path), s.watcher || (s.watcher = pF(vl(Xn(n))) ? this.watchFactory.watchFile( + i, + (o, c) => this.onConfigFileChanged(i, n, c), + 2e3, + this.hostConfiguration.watchOptions, + kl.ConfigFileForInferredRoot + ) : Y_e); + })); + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + */ + forEachConfigFileLocation(t, n) { + if (this.serverMode !== 0) + return; + E.assert(!GYe(t) || this.openFiles.has(t.path)); + const i = this.openFiles.get(t.path); + if (E.checkDefined(this.getScriptInfo(t.path)).isDynamic) return; + let o = Xn(t.fileName); + const c = () => Gp(i, o, this.currentDirectory, !this.host.useCaseSensitiveFileNames), _ = !i || !c(); + let u = !rG(t); + do { + if (u) { + const g = YN(o, this.currentDirectory, this.toCanonicalFileName), h = Mn(o, "tsconfig.json"); + let S = n(Mn(g, "tsconfig.json"), h); + if (S) return h; + const T = Mn(o, "jsconfig.json"); + if (S = n(Mn(g, "jsconfig.json"), T), S) return T; + if (EI(g)) + break; + } + const d = Xn(o); + if (d === o) break; + o = d, u = !0; + } while (_ || c()); + } + /** @internal */ + findDefaultConfiguredProject(t) { + var n; + return t.isScriptOpen() ? (n = this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + t, + 0 + /* Find */ + )) == null ? void 0 : n.defaultProject : void 0; + } + /** Get cached configFileName for scriptInfo or ancestor of open script info */ + getConfigFileNameForFileFromCache(t, n) { + if (n) { + const i = mwe(t, this.pendingOpenFileProjectUpdates); + if (i !== void 0) return i; + } + return mwe(t, this.configFileForOpenFiles); + } + /** Caches the configFilename for script info or ancestor of open script info */ + setConfigFileNameForFileInCache(t, n) { + this.openFiles.has(t.path) && (rG(t) || this.configFileForOpenFiles.set(t.path, n || !1)); + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + * If script info is passed in, it is asserted to be open script info + * otherwise just file name + * when findFromCacheOnly is true only looked up in cache instead of hitting disk to figure things out + * @internal + */ + getConfigFileNameForFile(t, n) { + const i = this.getConfigFileNameForFileFromCache(t, n); + if (i !== void 0) return i || void 0; + if (n) return; + const s = this.forEachConfigFileLocation(t, (o, c) => this.configFileExists(c, o, t)); + return this.logger.info(`getConfigFileNameForFile:: File: ${t.fileName} ProjectRootPath: ${this.openFiles.get(t.path)}:: Result: ${s}`), this.setConfigFileNameForFileInCache(t, s), s; + } + printProjects() { + this.logger.hasLevel( + 1 + /* normal */ + ) && (this.logger.startGroup(), this.externalProjects.forEach(afe), this.configuredProjects.forEach(afe), this.inferredProjects.forEach(afe), this.logger.info("Open files: "), this.openFiles.forEach((t, n) => { + const i = this.getScriptInfoForPath(n); + this.logger.info(` FileName: ${i.fileName} ProjectRootPath: ${t}`), this.logger.info(` Projects: ${i.containingProjects.map((s) => s.getProjectName())}`); + }), this.logger.endGroup()); + } + /** @internal */ + findConfiguredProjectByProjectName(t, n) { + const i = this.toCanonicalFileName(t), s = this.getConfiguredProjectByCanonicalConfigFilePath(i); + return n ? s : s?.deferredClose ? void 0 : s; + } + getConfiguredProjectByCanonicalConfigFilePath(t) { + return this.configuredProjects.get(t); + } + findExternalProjectByProjectName(t) { + return dwe(t, this.externalProjects); + } + /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ + getFilenameForExceededTotalSizeLimitForNonTsFiles(t, n, i, s) { + if (n && n.disableSizeLimit || !this.host.getFileSize) + return; + let o = zH; + this.projectToSizeMap.set(t, 0), this.projectToSizeMap.forEach((_) => o -= _ || 0); + let c = 0; + for (const _ of i) { + const u = s.getFileName(_); + if (!ex(u) && (c += this.host.getFileSize(u), c > zH || c > o)) { + const d = i.map((g) => s.getFileName(g)).filter((g) => !ex(g)).map((g) => ({ name: g, size: this.host.getFileSize(g) })).sort((g, h) => h.size - g.size).slice(0, 5); + return this.logger.info(`Non TS file size exceeded limit (${c}). Largest files: ${d.map((g) => `${g.name}:${g.size}`).join(", ")}`), u; + } + } + this.projectToSizeMap.set(t, c); + } + createExternalProject(t, n, i, s, o) { + const c = hL(i), _ = n8(i, Xn(Rl(t))), u = new JH( + t, + this, + this.documentRegistry, + c, + /*lastFileExceededProgramSize*/ + this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t, c, n, tG), + i.compileOnSave === void 0 ? !0 : i.compileOnSave, + /*projectFilePath*/ + void 0, + _?.watchOptions + ); + return u.setProjectErrors(_?.errors), u.excludedFiles = o, this.addFilesToNonInferredProject(u, n, tG, s), this.externalProjects.push(u), u; + } + /** @internal */ + sendProjectTelemetry(t) { + if (this.seenProjects.has(t.projectName)) { + tfe(t); + return; + } + if (this.seenProjects.set(t.projectName, !0), !this.eventHandler || !this.host.createSHA256Hash) { + tfe(t); + return; + } + const n = P0(t) ? t.projectOptions : void 0; + tfe(t); + const i = { + projectId: this.host.createSHA256Hash(t.projectName), + fileStats: e8( + t.getScriptInfos(), + /*includeSizes*/ + !0 + ), + compilerOptions: Bre(t.getCompilationSettings()), + typeAcquisition: o(t.getTypeAcquisition()), + extends: n && n.configHasExtendsProperty, + files: n && n.configHasFilesProperty, + include: n && n.configHasIncludeProperty, + exclude: n && n.configHasExcludeProperty, + compileOnSave: t.compileOnSaveEnabled, + configFileName: s(), + projectType: t instanceof JH ? "external" : "configured", + languageServiceEnabled: t.languageServiceEnabled, + version: dd + }; + this.eventHandler({ eventName: $H, data: i }); + function s() { + return P0(t) && jH(t.getConfigFilePath()) || "other"; + } + function o({ enable: c, include: _, exclude: u }) { + return { + enable: c, + include: _ !== void 0 && _.length !== 0, + exclude: u !== void 0 && u.length !== 0 + }; + } + } + addFilesToNonInferredProject(t, n, i, s) { + this.updateNonInferredProjectFiles(t, n, i), t.setTypeAcquisition(s), t.markAsDirty(); + } + /** @internal */ + createConfiguredProject(t, n) { + var i; + (i = rn) == null || i.instant(rn.Phase.Session, "createConfiguredProject", { configFilePath: t }), this.logger.info(`Creating configuration project ${t}`); + const s = this.toCanonicalFileName(t); + let o = this.configFileExistenceInfoCache.get(s); + o ? o.exists = !0 : this.configFileExistenceInfoCache.set(s, o = { exists: !0 }), o.config || (o.config = { + cachedDirectoryStructureHost: tF(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), + projects: /* @__PURE__ */ new Map(), + updateLevel: 2 + /* Full */ + }); + const c = new H_e( + t, + s, + this, + this.documentRegistry, + o.config.cachedDirectoryStructureHost, + n + ); + return E.assert(!this.configuredProjects.has(s)), this.configuredProjects.set(s, c), this.createConfigFileWatcherForParsedConfig(t, s, c), c; + } + /** + * Read the config file of the project, and update the project root file names. + * + * @internal + */ + loadConfiguredProject(t, n) { + var i, s; + (i = rn) == null || i.push(rn.Phase.Session, "loadConfiguredProject", { configFilePath: t.canonicalConfigFilePath }), this.sendProjectLoadingStartEvent(t, n); + const o = Cs(t.getConfigFilePath()), c = this.ensureParsedConfigUptoDate( + o, + t.canonicalConfigFilePath, + this.configFileExistenceInfoCache.get(t.canonicalConfigFilePath), + t + ), _ = c.config.parsedCommandLine; + E.assert(!!_.fileNames); + const u = _.options; + t.projectOptions || (t.projectOptions = { + configHasExtendsProperty: _.raw.extends !== void 0, + configHasFilesProperty: _.raw.files !== void 0, + configHasIncludeProperty: _.raw.include !== void 0, + configHasExcludeProperty: _.raw.exclude !== void 0 + }), t.canConfigFileJsonReportNoInputFiles = gD(_.raw), t.setProjectErrors(_.options.configFile.parseDiagnostics), t.updateReferences(_.projectReferences); + const d = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t.canonicalConfigFilePath, u, _.fileNames, eG); + d ? (t.disableLanguageService(d), this.configFileExistenceInfoCache.forEach((h, S) => this.stopWatchingWildCards(S, t))) : (t.setCompilerOptions(u), t.setWatchOptions(_.watchOptions), t.enableLanguageService(), this.watchWildcards(o, c, t)), t.enablePluginsWithOptions(u); + const g = _.fileNames.concat(t.getExternalFiles( + 2 + /* Full */ + )); + this.updateRootAndOptionsOfNonInferredProject(t, g, eG, u, _.typeAcquisition, _.compileOnSave, _.watchOptions), (s = rn) == null || s.pop(); + } + /** @internal */ + ensureParsedConfigUptoDate(t, n, i, s) { + var o, c, _; + if (i.config) { + if (!i.config.updateLevel) return i; + if (i.config.updateLevel === 1) + return this.reloadFileNamesOfParsedConfig(t, i.config), i; + } + const u = ((o = i.config) == null ? void 0 : o.cachedDirectoryStructureHost) || tF(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), d = mD(t, (D) => this.host.readFile(D)), g = hA(t, Gi(d) ? d : ""), h = g.parseDiagnostics; + Gi(d) || h.push(d); + const S = Xn(t), T = xA( + g, + u, + S, + /*existingOptions*/ + void 0, + t, + /*resolutionStack*/ + void 0, + this.hostConfiguration.extraFileExtensions, + this.extendedConfigCache + ); + T.errors.length && h.push(...T.errors), this.logger.info(`Config: ${t} : ${JSON.stringify( + { + rootNames: T.fileNames, + options: T.options, + watchOptions: T.watchOptions, + projectReferences: T.projectReferences + }, + /*replacer*/ + void 0, + " " + )}`); + const C = (c = i.config) == null ? void 0 : c.parsedCommandLine; + return i.config ? (i.config.parsedCommandLine = T, i.config.watchedDirectoriesStale = !0, i.config.updateLevel = void 0) : i.config = { parsedCommandLine: T, cachedDirectoryStructureHost: u, projects: /* @__PURE__ */ new Map() }, !C && !T5( + // Old options + this.getWatchOptionsFromProjectWatchOptions( + /*projectOptions*/ + void 0, + S + ), + // New options + this.getWatchOptionsFromProjectWatchOptions(T.watchOptions, S) + ) && ((_ = i.watcher) == null || _.close(), i.watcher = void 0), this.createConfigFileWatcherForParsedConfig(t, n, s), rF( + n, + T.options, + this.sharedExtendedConfigFileWatchers, + (D, P) => this.watchFactory.watchFile( + D, + () => { + var O; + nF(this.extendedConfigCache, P, (F) => this.toPath(F)); + let j = !1; + (O = this.sharedExtendedConfigFileWatchers.get(P)) == null || O.projects.forEach((F) => { + j = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(F, `Change in extended config file ${D} detected`) || j; + }), j && this.delayEnsureProjectForOpenFiles(); + }, + 2e3, + this.hostConfiguration.watchOptions, + kl.ExtendedConfigFile, + t + ), + (D) => this.toPath(D) + ), i; + } + /** @internal */ + watchWildcards(t, { exists: n, config: i }, s) { + if (i.projects.set(s.canonicalConfigFilePath, !0), n) { + if (i.watchedDirectories && !i.watchedDirectoriesStale) return; + i.watchedDirectoriesStale = !1, jA( + i.watchedDirectories || (i.watchedDirectories = /* @__PURE__ */ new Map()), + i.parsedCommandLine.wildcardDirectories, + // Create new directory watcher + (o, c) => this.watchWildcardDirectory(o, c, t, i) + ); + } else { + if (i.watchedDirectoriesStale = !1, !i.watchedDirectories) return; + N_(i.watchedDirectories, _p), i.watchedDirectories = void 0; + } + } + /** @internal */ + stopWatchingWildCards(t, n) { + const i = this.configFileExistenceInfoCache.get(t); + !i.config || !i.config.projects.get(n.canonicalConfigFilePath) || (i.config.projects.set(n.canonicalConfigFilePath, !1), !Dl(i.config.projects, lo) && (i.config.watchedDirectories && (N_(i.config.watchedDirectories, _p), i.config.watchedDirectories = void 0), i.config.watchedDirectoriesStale = void 0)); + } + updateNonInferredProjectFiles(t, n, i) { + var s; + const o = t.getRootFilesMap(), c = /* @__PURE__ */ new Map(); + for (const _ of n) { + const u = i.getFileName(_), d = Wo(u), g = ZN(d); + let h; + if (!g && !t.fileExists(u)) { + h = YN(d, this.currentDirectory, this.toCanonicalFileName); + const S = o.get(h); + S ? (((s = S.info) == null ? void 0 : s.path) === h && (t.removeFile( + S.info, + /*fileExists*/ + !1, + /*detachFromProject*/ + !0 + ), S.info = void 0), S.fileName = d) : o.set(h, { fileName: d }); + } else { + const S = i.getScriptKind(_, this.hostConfiguration.extraFileExtensions), T = i.hasMixedContent(_, this.hostConfiguration.extraFileExtensions), C = E.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + d, + t.currentDirectory, + S, + T, + t.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + )); + h = C.path; + const D = o.get(h); + !D || D.info !== C ? (t.addRoot(C, d), C.isScriptOpen() && this.removeRootOfInferredProjectIfNowPartOfOtherProject(C)) : D.fileName = d; + } + c.set(h, !0); + } + o.size > c.size && o.forEach((_, u) => { + c.has(u) || (_.info ? t.removeFile( + _.info, + t.fileExists(_.info.fileName), + /*detachFromProject*/ + !0 + ) : o.delete(u)); + }); + } + updateRootAndOptionsOfNonInferredProject(t, n, i, s, o, c, _) { + t.setCompilerOptions(s), t.setWatchOptions(_), c !== void 0 && (t.compileOnSaveEnabled = c), this.addFilesToNonInferredProject(t, n, i, o); + } + /** + * Reload the file names from config file specs and update the project graph + * + * @internal + */ + reloadFileNamesOfConfiguredProject(t) { + const n = this.reloadFileNamesOfParsedConfig(t.getConfigFilePath(), this.configFileExistenceInfoCache.get(t.canonicalConfigFilePath).config); + return t.updateErrorOnNoInputFiles(n), this.updateNonInferredProjectFiles(t, n.concat(t.getExternalFiles( + 1 + /* RootNamesAndUpdate */ + )), eG), t.markAsDirty(), t.updateGraph(); + } + /** @internal */ + reloadFileNamesOfParsedConfig(t, n) { + if (n.updateLevel === void 0) return n.parsedCommandLine.fileNames; + E.assert( + n.updateLevel === 1 + /* RootNamesAndUpdate */ + ); + const i = n.parsedCommandLine.options.configFile.configFileSpecs, s = hD( + i, + Xn(t), + n.parsedCommandLine.options, + n.cachedDirectoryStructureHost, + this.hostConfiguration.extraFileExtensions + ); + return n.parsedCommandLine = { ...n.parsedCommandLine, fileNames: s }, s; + } + /** @internal */ + setFileNamesOfAutpImportProviderOrAuxillaryProject(t, n) { + this.updateNonInferredProjectFiles(t, n, eG); + } + /** @internal */ + reloadConfiguredProjectClearingSemanticCache(t, n, i) { + return ih(i, t) ? (this.clearSemanticCache(t), this.reloadConfiguredProject(t, iG(n)), !0) : !1; + } + /** + * Read the config file of the project again by clearing the cache and update the project graph + * + * @internal + */ + reloadConfiguredProject(t, n) { + t.isInitialLoadPending = $d, t.pendingUpdateReason = void 0, t.pendingUpdateLevel = 0, t.getCachedDirectoryStructureHost().clearCache(), this.loadConfiguredProject(t, n), vwe( + t, + t.triggerFileForConfigFileDiag ?? t.getConfigFilePath(), + /*isReload*/ + !0 + ); + } + /** @internal */ + clearSemanticCache(t) { + t.originalConfiguredProjects = void 0, t.resolutionCache.clear(), t.getLanguageService( + /*ensureSynchronized*/ + !1 + ).cleanupSemanticCache(), t.cleanupProgram(), t.markAsDirty(); + } + /** @internal */ + sendConfigFileDiagEvent(t, n, i) { + if (!this.eventHandler || this.suppressDiagnosticEvents) return !1; + const s = t.getLanguageService().getCompilerOptionsDiagnostics(); + return s.push(...t.getAllProjectErrors()), !i && s.length === (t.configDiagDiagnosticsReported ?? 0) ? !1 : (t.configDiagDiagnosticsReported = s.length, this.eventHandler( + { + eventName: HH, + data: { configFileName: t.getConfigFilePath(), diagnostics: s, triggerFile: n ?? t.getConfigFilePath() } + } + ), !0); + } + getOrCreateInferredProjectForProjectRootPathIfEnabled(t, n) { + if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root + t.isDynamic && n === void 0) + return; + if (n) { + const s = this.toCanonicalFileName(n); + for (const o of this.inferredProjects) + if (o.projectRootPath === s) + return o; + return this.createInferredProject( + n, + /*isSingleInferredProject*/ + !1, + n + ); + } + let i; + for (const s of this.inferredProjects) + s.projectRootPath && Gp(s.projectRootPath, t.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames) && (i && i.projectRootPath.length > s.projectRootPath.length || (i = s)); + return i; + } + getOrCreateSingleInferredProjectIfEnabled() { + if (this.useSingleInferredProject) + return this.inferredProjects.length > 0 && this.inferredProjects[0].projectRootPath === void 0 ? this.inferredProjects[0] : this.createInferredProject( + "", + /*isSingleInferredProject*/ + !0 + ); + } + getOrCreateSingleInferredWithoutProjectRoot(t) { + E.assert(!this.useSingleInferredProject); + const n = this.toCanonicalFileName(this.getNormalizedAbsolutePath(t)); + for (const i of this.inferredProjects) + if (!i.projectRootPath && i.isOrphan() && i.canonicalCurrentDirectory === n) + return i; + return this.createInferredProject(t); + } + createInferredProject(t, n, i) { + const s = i && this.compilerOptionsForInferredProjectsPerProjectRoot.get(i) || this.compilerOptionsForInferredProjects; + let o, c; + i && (o = this.watchOptionsForInferredProjectsPerProjectRoot.get(i), c = this.typeAcquisitionForInferredProjectsPerProjectRoot.get(i)), o === void 0 && (o = this.watchOptionsForInferredProjects), c === void 0 && (c = this.typeAcquisitionForInferredProjects), o = o || void 0; + const _ = new W_e(this, this.documentRegistry, s, o?.watchOptions, i, t, c); + return _.setProjectErrors(o?.errors), n ? this.inferredProjects.unshift(_) : this.inferredProjects.push(_), _; + } + /** @internal */ + getOrCreateScriptInfoNotOpenedByClient(t, n, i, s) { + return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + Wo(t), + n, + /*scriptKind*/ + void 0, + /*hasMixedContent*/ + void 0, + i, + s + ); + } + getScriptInfo(t) { + return this.getScriptInfoForNormalizedPath(Wo(t)); + } + /** @internal */ + getScriptInfoOrConfig(t) { + const n = Wo(t), i = this.getScriptInfoForNormalizedPath(n); + if (i) return i; + const s = this.configuredProjects.get(this.toPath(t)); + return s && s.getCompilerOptions().configFile; + } + /** @internal */ + logErrorForScriptInfoNotFound(t) { + const n = ts( + P1( + this.filenameToScriptInfo.entries(), + (i) => i[1].deferredDelete ? void 0 : i + ), + ([i, s]) => ({ path: i, fileName: s.fileName }) + ); + this.logger.msg( + `Could not find file ${JSON.stringify(t)}. +All files are: ${JSON.stringify(n)}`, + "Err" + /* Err */ + ); + } + /** + * Returns the projects that contain script info through SymLink + * Note that this does not return projects in info.containingProjects + * + * @internal + */ + getSymlinkedProjects(t) { + let n; + if (this.realpathToScriptInfos) { + const s = t.getRealpathIfDifferent(); + s && rr(this.realpathToScriptInfos.get(s), i), rr(this.realpathToScriptInfos.get(t.path), i); + } + return n; + function i(s) { + if (s !== t) + for (const o of s.containingProjects) + o.languageServiceEnabled && !o.isOrphan() && !o.getCompilerOptions().preserveSymlinks && !t.isAttached(o) && (n ? Dl(n, (c, _) => _ === s.path ? !1 : ls(c, o)) || n.add(s.path, o) : (n = Kf(), n.add(s.path, o))); + } + } + watchClosedScriptInfo(t) { + if (E.assert(!t.fileWatcher), !t.isDynamicOrHasMixedContent() && (!this.globalCacheLocationDirectoryPath || !zi(t.path, this.globalCacheLocationDirectoryPath))) { + const n = t.fileName.indexOf("/node_modules/"); + !this.host.getModifiedTime || n === -1 ? t.fileWatcher = this.watchFactory.watchFile( + t.fileName, + (i, s) => this.onSourceFileChanged(t, s), + 500, + this.hostConfiguration.watchOptions, + kl.ClosedScriptInfo + ) : (t.mTime = this.getModifiedTime(t), t.fileWatcher = this.watchClosedScriptInfoInNodeModules(t.fileName.substring(0, n))); + } + } + createNodeModulesWatcher(t, n) { + let i = this.watchFactory.watchDirectory( + t, + (o) => { + var c; + const _ = fF(this.toPath(o)); + if (!_) return; + const u = Wc(_); + if ((c = s.affectedModuleSpecifierCacheProjects) != null && c.size && (u === "package.json" || u === "node_modules") && s.affectedModuleSpecifierCacheProjects.forEach((d) => { + var g; + (g = d.getModuleSpecifierCache()) == null || g.clear(); + }), s.refreshScriptInfoRefCount) + if (n === _) + this.refreshScriptInfosInDirectory(n); + else { + const d = this.filenameToScriptInfo.get(_); + d ? ywe(d) && this.refreshScriptInfo(d) : zk(_) || this.refreshScriptInfosInDirectory(_); + } + }, + 1, + this.hostConfiguration.watchOptions, + kl.NodeModules + ); + const s = { + refreshScriptInfoRefCount: 0, + affectedModuleSpecifierCacheProjects: void 0, + close: () => { + var o; + i && !s.refreshScriptInfoRefCount && !((o = s.affectedModuleSpecifierCacheProjects) != null && o.size) && (i.close(), i = void 0, this.nodeModulesWatchers.delete(n)); + } + }; + return this.nodeModulesWatchers.set(n, s), s; + } + /** @internal */ + watchPackageJsonsInNodeModules(t, n) { + var i; + const s = this.toPath(t), o = this.nodeModulesWatchers.get(s) || this.createNodeModulesWatcher(t, s); + return E.assert(!((i = o.affectedModuleSpecifierCacheProjects) != null && i.has(n))), (o.affectedModuleSpecifierCacheProjects || (o.affectedModuleSpecifierCacheProjects = /* @__PURE__ */ new Set())).add(n), { + close: () => { + var c; + (c = o.affectedModuleSpecifierCacheProjects) == null || c.delete(n), o.close(); + } + }; + } + watchClosedScriptInfoInNodeModules(t) { + const n = t + "/node_modules", i = this.toPath(n), s = this.nodeModulesWatchers.get(i) || this.createNodeModulesWatcher(n, i); + return s.refreshScriptInfoRefCount++, { + close: () => { + s.refreshScriptInfoRefCount--, s.close(); + } + }; + } + getModifiedTime(t) { + return (this.host.getModifiedTime(t.fileName) || G_).getTime(); + } + refreshScriptInfo(t) { + const n = this.getModifiedTime(t); + if (n !== t.mTime) { + const i = UR(t.mTime, n); + t.mTime = n, this.onSourceFileChanged(t, i); + } + } + refreshScriptInfosInDirectory(t) { + t = t + Oo, this.filenameToScriptInfo.forEach((n) => { + ywe(n) && zi(n.path, t) && this.refreshScriptInfo(n); + }); + } + stopWatchingScriptInfo(t) { + t.fileWatcher && (t.fileWatcher.close(), t.fileWatcher = void 0); + } + getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(t, n, i, s, o, c) { + if ($_(t) || ZN(t)) + return this.getOrCreateScriptInfoWorker( + t, + n, + /*openedByClient*/ + !1, + /*fileContent*/ + void 0, + i, + !!s, + o, + c + ); + const _ = this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(t)); + if (_) + return _; + } + getOrCreateScriptInfoForNormalizedPath(t, n, i, s, o, c) { + return this.getOrCreateScriptInfoWorker( + t, + this.currentDirectory, + n, + i, + s, + !!o, + c, + /*deferredDeleteOk*/ + !1 + ); + } + getOrCreateScriptInfoWorker(t, n, i, s, o, c, _, u) { + E.assert(s === void 0 || i, "ScriptInfo needs to be opened by client to be able to set its user defined content"); + const d = YN(t, n, this.toCanonicalFileName); + let g = this.filenameToScriptInfo.get(d); + if (g) { + if (g.deferredDelete) { + if (E.assert(!g.isDynamic), !i && !(_ || this.host).fileExists(t)) + return u ? g : void 0; + g.deferredDelete = void 0; + } + } else { + const h = ZN(t); + if (E.assert($_(t) || h || i, "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: ts(this.openFilesWithNonRootedDiskPath.keys()) })} +Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`), E.assert(!$_(t) || this.currentDirectory === n || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(t)), "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: ts(this.openFilesWithNonRootedDiskPath.keys()) })} +Open script files with non rooted disk path opened with current directory context cannot have same canonical names`), E.assert(!h || this.currentDirectory === n || this.useInferredProjectPerProjectRoot, "", () => `${JSON.stringify({ fileName: t, currentDirectory: n, hostCurrentDirectory: this.currentDirectory, openKeys: ts(this.openFilesWithNonRootedDiskPath.keys()) })} +Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`), !i && !h && !(_ || this.host).fileExists(t)) + return; + g = new M_e(this.host, t, o, c, d, this.filenameToScriptInfoVersion.get(d)), this.filenameToScriptInfo.set(g.path, g), this.filenameToScriptInfoVersion.delete(g.path), i ? !$_(t) && (!h || this.currentDirectory !== n) && this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(t), g) : this.watchClosedScriptInfo(g); + } + return i && (this.stopWatchingScriptInfo(g), g.open(s), c && g.registerFileUpdate()), g; + } + /** + * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred + */ + getScriptInfoForNormalizedPath(t) { + return !$_(t) && this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(t)) || this.getScriptInfoForPath(YN(t, this.currentDirectory, this.toCanonicalFileName)); + } + getScriptInfoForPath(t) { + const n = this.filenameToScriptInfo.get(t); + return !n || !n.deferredDelete ? n : void 0; + } + /** @internal */ + getDocumentPositionMapper(t, n, i) { + const s = this.getOrCreateScriptInfoNotOpenedByClient( + n, + t.currentDirectory, + this.host, + /*deferredDeleteOk*/ + !1 + ); + if (!s) { + i && t.addGeneratedFileWatch(n, i); + return; + } + if (s.getSnapshot(), Gi(s.sourceMapFilePath)) { + const d = this.getScriptInfoForPath(s.sourceMapFilePath); + if (d && (d.getSnapshot(), d.documentPositionMapper !== void 0)) + return d.sourceInfos = this.addSourceInfoToSourceMap(i, t, d.sourceInfos), d.documentPositionMapper ? d.documentPositionMapper : void 0; + s.sourceMapFilePath = void 0; + } else if (s.sourceMapFilePath) { + s.sourceMapFilePath.sourceInfos = this.addSourceInfoToSourceMap(i, t, s.sourceMapFilePath.sourceInfos); + return; + } else if (s.sourceMapFilePath !== void 0) + return; + let o, c = (d, g) => { + const h = this.getOrCreateScriptInfoNotOpenedByClient( + d, + t.currentDirectory, + this.host, + /*deferredDeleteOk*/ + !0 + ); + if (o = h || g, !h || h.deferredDelete) return; + const S = h.getSnapshot(); + return h.documentPositionMapper !== void 0 ? h.documentPositionMapper : Rx(S); + }; + const _ = t.projectName, u = XU( + { getCanonicalFileName: this.toCanonicalFileName, log: (d) => this.logger.info(d), getSourceFileLike: (d) => this.getSourceFileLike(d, _, s) }, + s.fileName, + s.textStorage.getLineInfo(), + c + ); + return c = void 0, o ? Gi(o) ? s.sourceMapFilePath = { + watcher: this.addMissingSourceMapFile( + t.currentDirectory === this.currentDirectory ? o : Xi(o, t.currentDirectory), + s.path + ), + sourceInfos: this.addSourceInfoToSourceMap(i, t) + } : (s.sourceMapFilePath = o.path, o.declarationInfoPath = s.path, o.deferredDelete || (o.documentPositionMapper = u || !1), o.sourceInfos = this.addSourceInfoToSourceMap(i, t, o.sourceInfos)) : s.sourceMapFilePath = !1, u; + } + addSourceInfoToSourceMap(t, n, i) { + if (t) { + const s = this.getOrCreateScriptInfoNotOpenedByClient( + t, + n.currentDirectory, + n.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + (i || (i = /* @__PURE__ */ new Set())).add(s.path); + } + return i; + } + addMissingSourceMapFile(t, n) { + return this.watchFactory.watchFile( + t, + () => { + const s = this.getScriptInfoForPath(n); + s && s.sourceMapFilePath && !Gi(s.sourceMapFilePath) && (this.delayUpdateProjectGraphs( + s.containingProjects, + /*clearSourceMapperCache*/ + !0 + ), this.delayUpdateSourceInfoProjects(s.sourceMapFilePath.sourceInfos), s.closeSourceMapFileWatcher()); + }, + 2e3, + this.hostConfiguration.watchOptions, + kl.MissingSourceMapFile + ); + } + /** @internal */ + getSourceFileLike(t, n, i) { + const s = n.projectName ? n : this.findProject(n); + if (s) { + const c = s.toPath(t), _ = s.getSourceFile(c); + if (_ && _.resolvedPath === c) return _; + } + const o = this.getOrCreateScriptInfoNotOpenedByClient( + t, + (s || this).currentDirectory, + s ? s.directoryStructureHost : this.host, + /*deferredDeleteOk*/ + !1 + ); + if (o) { + if (i && Gi(i.sourceMapFilePath) && o !== i) { + const c = this.getScriptInfoForPath(i.sourceMapFilePath); + c && (c.sourceInfos ?? (c.sourceInfos = /* @__PURE__ */ new Set())).add(o.path); + } + return o.cacheSourceFile ? o.cacheSourceFile.sourceFile : (o.sourceFileLike || (o.sourceFileLike = { + get text() { + return E.fail("shouldnt need text"), ""; + }, + getLineAndCharacterOfPosition: (c) => { + const _ = o.positionToLineOffset(c); + return { line: _.line - 1, character: _.offset - 1 }; + }, + getPositionOfLineAndCharacter: (c, _, u) => o.lineOffsetToPosition(c + 1, _ + 1, u) + }), o.sourceFileLike); + } + } + /** @internal */ + setPerformanceEventHandler(t) { + this.performanceEventHandler = t; + } + setHostConfiguration(t) { + var n; + if (t.file) { + const i = this.getScriptInfoForNormalizedPath(Wo(t.file)); + i && (i.setOptions(k6(t.formatOptions), t.preferences), this.logger.info(`Host configuration update for file ${t.file}`)); + } else { + if (t.hostInfo !== void 0 && (this.hostConfiguration.hostInfo = t.hostInfo, this.logger.info(`Host information ${t.hostInfo}`)), t.formatOptions && (this.hostConfiguration.formatCodeOptions = { ...this.hostConfiguration.formatCodeOptions, ...k6(t.formatOptions) }, this.logger.info("Format host information updated")), t.preferences) { + const { + lazyConfiguredProjectsFromExternalProject: i, + includePackageJsonAutoImports: s, + includeCompletionsForModuleExports: o + } = this.hostConfiguration.preferences; + this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...t.preferences }, i && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject && this.externalProjectToConfiguredProjectMap.forEach( + (c) => c.forEach((_) => { + !_.deferredClose && !_.isClosed() && _.pendingUpdateLevel === 2 && !this.hasPendingProjectUpdate(_) && _.updateGraph(); + }) + ), (s !== t.preferences.includePackageJsonAutoImports || !!o != !!t.preferences.includeCompletionsForModuleExports) && this.forEachProject((c) => { + c.onAutoImportProviderSettingsChanged(); + }); + } + if (t.extraFileExtensions && (this.hostConfiguration.extraFileExtensions = t.extraFileExtensions, this.reloadProjects(), this.logger.info("Host file extension mappings updated")), t.watchOptions) { + const i = (n = n8(t.watchOptions)) == null ? void 0 : n.watchOptions, s = xO(i, this.currentDirectory); + this.hostConfiguration.watchOptions = s, this.hostConfiguration.beforeSubstitution = s === i ? void 0 : i, this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`); + } + } + } + /** @internal */ + getWatchOptions(t) { + return this.getWatchOptionsFromProjectWatchOptions(t.getWatchOptions(), t.getCurrentDirectory()); + } + /** @internal */ + getWatchOptionsFromProjectWatchOptions(t, n) { + const i = this.hostConfiguration.beforeSubstitution ? xO( + this.hostConfiguration.beforeSubstitution, + n + ) : this.hostConfiguration.watchOptions; + return t && i ? { ...i, ...t } : t || i; + } + closeLog() { + this.logger.close(); + } + /** + * This function rebuilds the project for every file opened by the client + * This does not reload contents of open files from disk. But we could do that if needed + */ + reloadProjects() { + this.logger.info("reload projects."), this.filenameToScriptInfo.forEach((i) => { + this.openFiles.has(i.path) || i.fileWatcher && this.onSourceFileChanged( + i, + this.host.fileExists(i.fileName) ? i.deferredDelete ? 0 : 1 : 2 + /* Deleted */ + ); + }), this.pendingProjectUpdates.forEach((i, s) => { + this.throttledOperations.cancel(s), this.pendingProjectUpdates.delete(s); + }), this.throttledOperations.cancel(fwe), this.pendingOpenFileProjectUpdates = void 0, this.pendingEnsureProjectForOpenFiles = !1, this.configFileExistenceInfoCache.forEach((i) => { + i.config && (i.config.updateLevel = 2); + }), this.configFileForOpenFiles.clear(), this.externalProjects.forEach((i) => { + this.clearSemanticCache(i), i.updateGraph(); + }); + const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(); + this.externalProjectToConfiguredProjectMap.forEach((i, s) => { + const o = `Reloading configured project in external project: ${s}`; + i.forEach((c) => { + this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ? (c.isInitialLoadPending() || (this.clearSemanticCache(c), c.pendingUpdateLevel = 2, c.pendingUpdateReason = iG(o)), n.add(c)) : this.reloadConfiguredProjectClearingSemanticCache( + c, + o, + t + ); + }); + }), this.openFiles.forEach((i, s) => { + const o = this.getScriptInfoForPath(s); + Nn(o.containingProjects, t8) || this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + o, + 2, + t, + n + ); + }), n.forEach((i) => t.add(i)), this.inferredProjects.forEach((i) => this.clearSemanticCache(i)), this.ensureProjectForOpenFiles(), this.cleanupProjectsAndScriptInfos( + t, + new Set(this.openFiles.keys()), + new Set(this.externalProjectToConfiguredProjectMap.keys()) + ), this.logger.info("After reloading projects.."), this.printProjects(); + } + /** + * Remove the root of inferred project if script info is part of another project + */ + removeRootOfInferredProjectIfNowPartOfOtherProject(t) { + E.assert(t.containingProjects.length > 0); + const n = t.containingProjects[0]; + !n.isOrphan() && x6(n) && n.isRoot(t) && rr(t.containingProjects, (i) => i !== n && !i.isOrphan()) && n.removeFile( + t, + /*fileExists*/ + !0, + /*detachFromProject*/ + !0 + ); + } + /** + * This function is to update the project structure for every inferred project. + * It is called on the premise that all the configured projects are + * up to date. + * This will go through open files and assign them to inferred project if open file is not part of any other project + * After that all the inferred project graphs are updated + */ + ensureProjectForOpenFiles() { + this.logger.info("Before ensureProjectForOpenFiles:"), this.printProjects(); + const t = this.pendingOpenFileProjectUpdates; + this.pendingOpenFileProjectUpdates = void 0, t?.forEach( + (n, i) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + this.getScriptInfoForPath(i), + 1 + /* Create */ + ) + ), this.openFiles.forEach((n, i) => { + const s = this.getScriptInfoForPath(i); + s.isOrphan() ? this.assignOrphanScriptInfoToInferredProject(s, n) : this.removeRootOfInferredProjectIfNowPartOfOtherProject(s); + }), this.pendingEnsureProjectForOpenFiles = !1, this.inferredProjects.forEach(fp), this.logger.info("After ensureProjectForOpenFiles:"), this.printProjects(); + } + /** + * Open file whose contents is managed by the client + * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk + */ + openClientFile(t, n, i, s) { + return this.openClientFileWithNormalizedPath( + Wo(t), + n, + i, + /*hasMixedContent*/ + !1, + s ? Wo(s) : void 0 + ); + } + /** @internal */ + getOriginalLocationEnsuringConfiguredProject(t, n) { + const i = t.isSourceOfProjectReferenceRedirect(n.fileName), s = i ? n : t.getSourceMapper().tryGetSourcePosition(n); + if (!s) return; + const { fileName: o } = s, c = this.getScriptInfo(o); + if (!c && !this.host.fileExists(o)) return; + const _ = { fileName: Wo(o), path: this.toPath(o) }, u = this.getConfigFileNameForFile( + _, + /*findFromCacheOnly*/ + !1 + ); + if (!u) return; + let d = this.findConfiguredProjectByProjectName(u); + if (!d) { + if (t.getCompilerOptions().disableReferencedProjectLoad) + return i ? n : c?.containingProjects.length ? s : n; + d = this.createConfiguredProject(u, `Creating project for original file: ${_.fileName}${n !== s ? " for location: " + n.fileName : ""}`); + } + fp(d); + const g = (T) => { + const C = this.getScriptInfo(o); + return C && T.containsScriptInfo(C) && !T.isSourceOfProjectReferenceRedirect(C.path); + }; + if (d.isSolution() || !g(d)) { + if (d = nG( + d, + o, + (T) => g(T) ? T : void 0, + 1, + `Creating project referenced in solution ${d.projectName} to find possible configured project for original file: ${_.fileName}${n !== s ? " for location: " + n.fileName : ""}` + ), !d) return; + if (d === t) return s; + } + S(d); + const h = this.getScriptInfo(o); + if (!h || !h.containingProjects.length) return; + return h.containingProjects.forEach((T) => { + P0(T) && S(T); + }), s; + function S(T) { + (t.originalConfiguredProjects ?? (t.originalConfiguredProjects = /* @__PURE__ */ new Set())).add(T.canonicalConfigFilePath); + } + } + /** @internal */ + fileExists(t) { + return !!this.getScriptInfoForNormalizedPath(t) || this.host.fileExists(t); + } + findExternalProjectContainingOpenScriptInfo(t) { + return Nn(this.externalProjects, (n) => (fp(n), n.containsScriptInfo(t))); + } + getOrCreateOpenScriptInfo(t, n, i, s, o) { + const c = this.getOrCreateScriptInfoWorker( + t, + o ? this.getNormalizedAbsolutePath(o) : this.currentDirectory, + /*openedByClient*/ + !0, + n, + i, + !!s, + /*hostToQueryFileExistsOn*/ + void 0, + /*deferredDeleteOk*/ + !0 + ); + return this.openFiles.set(c.path, o), c; + } + assignProjectToOpenedScriptInfo(t) { + let n, i; + const s = this.findExternalProjectContainingOpenScriptInfo(t); + let o, c; + if (!s && this.serverMode === 0) { + const _ = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + t, + 1 + /* Create */ + ); + _ && (o = _.seenProjects, c = _.sentConfigDiag, _.defaultProject && (n = _.defaultProject.getConfigFilePath(), i = _.defaultProject.getAllProjectErrors())); + } + return t.containingProjects.forEach(fp), t.isOrphan() && (o?.forEach((_) => { + c.has(_) || this.sendConfigFileDiagEvent( + _, + t.fileName, + /*force*/ + !0 + ); + }), E.assert(this.openFiles.has(t.path)), this.assignOrphanScriptInfoToInferredProject(t, this.openFiles.get(t.path))), E.assert(!t.isOrphan()), { configFileName: n, configFileErrors: i, retainProjects: o }; + } + /** + * Depending on kind + * - Find the configuedProject and return it - if allowDeferredClosed is set it will find the deferredClosed project as well + * - Create - if the project doesnt exist, it creates one as well. If not delayLoad, the project is updated (with triggerFile if passed) + * - Reload - if the project doesnt exist, it creates one. If not delayLoad, the project is reloaded clearing semantic cache + * @internal + */ + findCreateOrReloadConfiguredProject(t, n, i, s, o, c, _, u) { + let d = this.findConfiguredProjectByProjectName(t, s), g = !1; + switch (n) { + case 0: + if (!d) return; + break; + case 1: + d ?? (d = this.createConfiguredProject(t, i)), g = !_ && bwe(d, o); + break; + case 2: + d ?? (d = this.createConfiguredProject(t, iG(i))), g = !u && this.reloadConfiguredProjectClearingSemanticCache(d, i, c), u && !u.has(d) && !c.has(d) && (d.pendingUpdateLevel = 2, d.pendingUpdateReason = iG(i), u.add(d)); + break; + default: + E.assertNever(n); + } + return { project: d, sentConfigFileDiag: g }; + } + /** + * Finds the default configured project for given info + * For any tsconfig found, it looks into that project, if not then all its references, + * The search happens for all tsconfigs till projectRootPath + */ + tryFindDefaultConfiguredProjectForOpenScriptInfo(t, n, i, s) { + const o = this.getConfigFileNameForFile( + t, + n === 0 + /* Find */ + ); + if (!o) return; + const c = this.findCreateOrReloadConfiguredProject( + o, + n, + Swe(t), + i, + t.fileName, + s + ); + if (!c) return; + const _ = /* @__PURE__ */ new Set(), u = new Set(c.sentConfigFileDiag ? [c.project] : void 0); + let d, g; + return h(c.project), { + defaultProject: d ?? g, + sentConfigDiag: u, + seenProjects: _ + }; + function h(C) { + return S(C) ? d : T(C); + } + function S(C) { + if (!ih(_, C)) return; + const D = C.containsScriptInfo(t); + if (D && !C.isSourceOfProjectReferenceRedirect(t.path)) return d = C; + g ?? (g = D ? C : void 0); + } + function T(C) { + return nG( + C, + t.path, + (D, P) => (P && u.add(D), S(D)), + n, + `Creating project referenced in solution ${C.projectName} to find possible configured project for ${t.fileName} to open`, + i, + t.fileName, + s + ); + } + } + tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(t, n, i, s) { + const o = n === 0, c = this.tryFindDefaultConfiguredProjectForOpenScriptInfo( + t, + n, + o, + i + ); + if (!c) return; + const { defaultProject: _, seenProjects: u } = c; + return _ && $Ye( + t, + _, + (d) => { + u.add(d); + }, + n, + `Creating project possibly referencing default composite project ${_.getProjectName()} of open file ${t.fileName}`, + o, + i, + s + ), c; + } + /** @internal */ + loadAncestorProjectTree(t) { + t = t || yX( + this.configuredProjects, + (i, s) => s.isInitialLoadPending() ? void 0 : [i, !0] + ); + const n = /* @__PURE__ */ new Set(); + for (const i of ts(this.configuredProjects.values())) + gwe(i, (s) => t.has(s)) && fp(i), this.ensureProjectChildren(i, t, n); + } + ensureProjectChildren(t, n, i) { + var s; + if (!ih(i, t.canonicalConfigFilePath) || t.getCompilerOptions().disableReferencedProjectLoad) return; + const o = (s = t.getCurrentProgram()) == null ? void 0 : s.getResolvedProjectReferences(); + if (o) + for (const c of o) { + if (!c) continue; + const _ = jW(c.references, (g) => n.has(g.sourceFile.path) ? g : void 0); + if (!_) continue; + const u = Wo(c.sourceFile.fileName), d = this.findConfiguredProjectByProjectName(u) ?? this.createConfiguredProject( + u, + `Creating project referenced by : ${t.projectName} as it references project ${_.sourceFile.fileName}` + ); + fp(d), this.ensureProjectChildren(d, n, i); + } + } + cleanupConfiguredProjects(t, n, i) { + this.getOrphanConfiguredProjects( + t, + i, + n + ).forEach((s) => this.removeProject(s)); + } + cleanupProjectsAndScriptInfos(t, n, i) { + this.cleanupConfiguredProjects( + t, + i, + n + ); + for (const s of this.inferredProjects.slice()) + s.isOrphan() && this.removeProject(s); + this.removeOrphanScriptInfos(); + } + openClientFileWithNormalizedPath(t, n, i, s, o) { + const c = this.getOrCreateOpenScriptInfo(t, n, i, s, o), { retainProjects: _, ...u } = this.assignProjectToOpenedScriptInfo(c); + return this.cleanupProjectsAndScriptInfos( + _, + /* @__PURE__ */ new Set([c.path]), + /*externalProjectsRetainingConfiguredProjects*/ + void 0 + ), this.telemetryOnOpenFile(c), this.printProjects(), u; + } + /** @internal */ + getOrphanConfiguredProjects(t, n, i) { + const s = new Set(this.configuredProjects.values()), o = (d) => { + d.originalConfiguredProjects && (P0(d) || !d.isOrphan()) && d.originalConfiguredProjects.forEach( + (g, h) => { + const S = this.getConfiguredProjectByCanonicalConfigFilePath(h); + return S && u(S); + } + ); + }; + return t?.forEach(u), this.inferredProjects.forEach(o), this.externalProjects.forEach(o), this.externalProjectToConfiguredProjectMap.forEach((d, g) => { + i?.has(g) || d.forEach(u); + }), this.openFiles.forEach((d, g) => { + if (n?.has(g)) return; + const h = this.getScriptInfoForPath(g); + if (Nn(h.containingProjects, t8)) return; + const S = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo( + h, + 0 + /* Find */ + ); + S?.defaultProject && S?.seenProjects.forEach(u); + }), this.configuredProjects.forEach((d) => { + s.has(d) && (_(d) || hwe(d, c)) && u(d); + }), s; + function c(d) { + return !s.has(d) || _(d); + } + function _(d) { + var g, h; + return (d.deferredClose || d.projectService.hasPendingProjectUpdate(d)) && !!((h = (g = d.projectService.configFileExistenceInfoCache.get(d.canonicalConfigFilePath)) == null ? void 0 : g.openFilesImpactedByConfigFile) != null && h.size); + } + function u(d) { + s.delete(d) && (o(d), hwe(d, u)); + } + } + removeOrphanScriptInfos() { + const t = new Map(this.filenameToScriptInfo); + this.filenameToScriptInfo.forEach((n) => { + if (!n.deferredDelete) { + if (!n.isScriptOpen() && n.isOrphan() && !n.isContainedByBackgroundProject()) { + if (!n.sourceMapFilePath) return; + let i; + if (Gi(n.sourceMapFilePath)) { + const s = this.filenameToScriptInfo.get(n.sourceMapFilePath); + i = s?.sourceInfos; + } else + i = n.sourceMapFilePath.sourceInfos; + if (!i || !uh(i, (s) => { + const o = this.getScriptInfoForPath(s); + return !!o && (o.isScriptOpen() || !o.isOrphan()); + })) + return; + } + if (t.delete(n.path), n.sourceMapFilePath) { + let i; + if (Gi(n.sourceMapFilePath)) { + const s = this.filenameToScriptInfo.get(n.sourceMapFilePath); + s?.deferredDelete ? n.sourceMapFilePath = { + watcher: this.addMissingSourceMapFile(s.fileName, n.path), + sourceInfos: s.sourceInfos + } : t.delete(n.sourceMapFilePath), i = s?.sourceInfos; + } else + i = n.sourceMapFilePath.sourceInfos; + i && i.forEach((s, o) => t.delete(o)); + } + } + }), t.forEach((n) => this.deleteScriptInfo(n)); + } + telemetryOnOpenFile(t) { + if (this.serverMode !== 0 || !this.eventHandler || !t.isJavaScript() || !Kp(this.allJsFilesForOpenFileTelemetry, t.path)) + return; + const n = this.ensureDefaultProjectForFile(t); + if (!n.languageServiceEnabled) + return; + const i = n.getSourceFile(t.path), s = !!i && !!i.checkJsDirective; + this.eventHandler({ eventName: G_e, data: { info: { checkJs: s } } }); + } + closeClientFile(t, n) { + const i = this.getScriptInfoForNormalizedPath(Wo(t)), s = i ? this.closeOpenFile(i, n) : !1; + return n || this.printProjects(), s; + } + collectChanges(t, n, i, s) { + for (const o of n) { + const c = Nn(t, (_) => _.projectName === o.getProjectName()); + s.push(o.getChangesSinceVersion(c && c.version, i)); + } + } + /** @internal */ + synchronizeProjectList(t, n) { + const i = []; + return this.collectChanges(t, this.externalProjects, n, i), this.collectChanges(t, P1(this.configuredProjects.values(), (s) => s.deferredClose ? void 0 : s), n, i), this.collectChanges(t, this.inferredProjects, n, i), i; + } + /** @internal */ + applyChangesInOpenFiles(t, n, i) { + let s, o = !1; + if (t) + for (const _ of t) { + const u = this.getOrCreateOpenScriptInfo( + Wo(_.fileName), + _.content, + ZH(_.scriptKind), + _.hasMixedContent, + _.projectRootPath ? Wo(_.projectRootPath) : void 0 + ); + (s || (s = [])).push(u); + } + if (n) + for (const _ of n) { + const u = this.getScriptInfo(_.fileName); + E.assert(!!u), this.applyChangesToFile(u, _.changes); + } + if (i) + for (const _ of i) + o = this.closeClientFile( + _, + /*skipAssignOrphanScriptInfosToInferredProject*/ + !0 + ) || o; + let c; + s?.forEach((_) => { + var u; + return (u = this.assignProjectToOpenedScriptInfo(_).retainProjects) == null ? void 0 : u.forEach((d) => (c ?? (c = /* @__PURE__ */ new Set())).add(d)); + }), o && this.assignOrphanScriptInfosToInferredProject(), s ? (this.cleanupProjectsAndScriptInfos( + c, + new Set(s.map((_) => _.path)), + /*externalProjectsRetainingConfiguredProjects*/ + void 0 + ), s.forEach((_) => this.telemetryOnOpenFile(_)), this.printProjects()) : Dr(i) && this.printProjects(); + } + /** @internal */ + applyChangesToFile(t, n) { + for (const i of n) + t.editContent(i.span.start, i.span.start + i.span.length, i.newText); + } + // eslint-disable-line @typescript-eslint/unified-signatures + closeExternalProject(t, n) { + const i = Wo(t); + if (this.externalProjectToConfiguredProjectMap.get(i)) + this.externalProjectToConfiguredProjectMap.delete(i); + else { + const o = this.findExternalProjectByProjectName(t); + o && this.removeProject(o); + } + n && (this.cleanupConfiguredProjects(), this.printProjects()); + } + openExternalProjects(t) { + const n = new Set(this.externalProjects.map((i) => i.getProjectName())); + this.externalProjectToConfiguredProjectMap.forEach((i, s) => n.add(s)); + for (const i of t) + this.openExternalProject( + i, + /*cleanupAfter*/ + !1 + ), n.delete(i.projectFileName); + n.forEach((i) => this.closeExternalProject( + i, + /*cleanupAfter*/ + !1 + )), this.cleanupConfiguredProjects(), this.printProjects(); + } + static escapeFilenameForRegex(t) { + return t.replace(this.filenameEscapeRegexp, "\\$&"); + } + resetSafeList() { + this.safelist = $_e; + } + applySafeList(t) { + const n = t.typeAcquisition; + E.assert(!!n, "proj.typeAcquisition should be set by now"); + const i = this.applySafeListWorker(t, t.rootFiles, n); + return i?.excludedFiles ?? []; + } + applySafeListWorker(t, n, i) { + if (i.enable === !1 || i.disableFilenameBasedTypeAcquisition) + return; + const s = i.include || (i.include = []), o = [], c = n.map((h) => Rl(h.fileName)); + for (const h of Object.keys(this.safelist)) { + const S = this.safelist[h]; + for (const T of c) + if (S.match.test(T)) { + if (this.logger.info(`Excluding files based on rule ${h} matching file '${T}'`), S.types) + for (const C of S.types) + s.includes(C) || s.push(C); + if (S.exclude) + for (const C of S.exclude) { + const D = T.replace(S.match, (...P) => C.map((O) => typeof O == "number" ? Gi(P[O]) ? Zme.escapeFilenameForRegex(P[O]) : (this.logger.info(`Incorrect RegExp specification in safelist rule ${h} - not enough groups`), "\\*") : O).join("")); + o.includes(D) || o.push(D); + } + else { + const C = Zme.escapeFilenameForRegex(T); + o.includes(C) || o.push(C); + } + } + } + const _ = o.map((h) => new RegExp(h, "i")); + let u, d; + for (let h = 0; h < n.length; h++) + if (_.some((S) => S.test(c[h]))) + g(h); + else { + if (i.enable) { + const S = Wc(sy(c[h])); + if (Go(S, "js")) { + const T = Gu(S), C = gR(T), D = this.legacySafelist.get(C); + if (D !== void 0) { + this.logger.info(`Excluded '${c[h]}' because it matched ${C} from the legacy safelist`), g(h), s.includes(D) || s.push(D); + continue; + } + } + } + /^.+[.-]min\.js$/.test(c[h]) ? g(h) : u?.push(n[h]); + } + return d ? { + rootFiles: u, + excludedFiles: d + } : void 0; + function g(h) { + d || (E.assert(!u), u = n.slice(0, h), d = []), d.push(c[h]); + } + } + // eslint-disable-line @typescript-eslint/unified-signatures + openExternalProject(t, n) { + const i = this.findExternalProjectByProjectName(t.projectFileName); + let s, o = []; + for (const c of t.rootFiles) { + const _ = Wo(c.fileName); + if (jH(_)) { + if (this.serverMode === 0 && this.host.fileExists(_)) { + let u = this.findConfiguredProjectByProjectName(_); + u || (u = this.createConfiguredProject(_, `Creating configured project in external project: ${t.projectFileName}`), this.getHostPreferences().lazyConfiguredProjectsFromExternalProject || u.updateGraph()), (s ?? (s = /* @__PURE__ */ new Set())).add(u), E.assert(!u.isClosed()); + } + } else + o.push(c); + } + if (s) + this.externalProjectToConfiguredProjectMap.set(t.projectFileName, s), i && this.removeProject(i); + else { + this.externalProjectToConfiguredProjectMap.delete(t.projectFileName); + const c = t.typeAcquisition || {}; + c.include = c.include || [], c.exclude = c.exclude || [], c.enable === void 0 && (c.enable = J_e(o.map((d) => d.fileName))); + const _ = this.applySafeListWorker(t, o, c), u = _?.excludedFiles ?? []; + if (o = _?.rootFiles ?? o, i) { + i.excludedFiles = u; + const d = hL(t.options), g = n8(t.options, i.getCurrentDirectory()), h = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(t.projectFileName, d, o, tG); + h ? i.disableLanguageService(h) : i.enableLanguageService(), i.setProjectErrors(g?.errors), this.updateRootAndOptionsOfNonInferredProject(i, o, tG, d, c, t.options.compileOnSave, g?.watchOptions), i.updateGraph(); + } else + this.createExternalProject(t.projectFileName, o, t.options, c, u).updateGraph(); + } + n && (this.cleanupConfiguredProjects( + s, + new Set(t.projectFileName) + ), this.printProjects()); + } + hasDeferredExtension() { + for (const t of this.hostConfiguration.extraFileExtensions) + if (t.scriptKind === 7) + return !0; + return !1; + } + /** + * Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin either asynchronously or synchronously + * @internal + */ + requestEnablePlugin(t, n, i) { + if (!this.host.importPlugin && !this.host.require) { + this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + if (this.logger.info(`Enabling plugin ${n.name} from candidate paths: ${i.join(",")}`), !n.name || Sl(n.name) || /[\\/]\.\.?($|[\\/])/.test(n.name)) { + this.logger.info(`Skipped loading plugin ${n.name || JSON.stringify(n)} because only package name is allowed plugin name`); + return; + } + if (this.host.importPlugin) { + const s = Yx.importServicePluginAsync( + n, + i, + this.host, + (c) => this.logger.info(c) + ); + this.pendingPluginEnablements ?? (this.pendingPluginEnablements = /* @__PURE__ */ new Map()); + let o = this.pendingPluginEnablements.get(t); + o || this.pendingPluginEnablements.set(t, o = []), o.push(s); + return; + } + this.endEnablePlugin( + t, + Yx.importServicePluginSync( + n, + i, + this.host, + (s) => this.logger.info(s) + ) + ); + } + /** + * Performs the remaining steps of enabling a plugin after its module has been instantiated. + * @internal + */ + endEnablePlugin(t, { pluginConfigEntry: n, resolvedModule: i, errorLogs: s }) { + var o; + if (i) { + const c = (o = this.currentPluginConfigOverrides) == null ? void 0 : o.get(n.name); + if (c) { + const _ = n.name; + n = c, n.name = _; + } + t.enableProxy(i, n); + } else + rr(s, (c) => this.logger.info(c)), this.logger.info(`Couldn't find ${n.name}`); + } + /** @internal */ + hasNewPluginEnablementRequests() { + return !!this.pendingPluginEnablements; + } + /** @internal */ + hasPendingPluginEnablements() { + return !!this.currentPluginEnablementPromise; + } + /** + * Waits for any ongoing plugin enablement requests to complete. + * + * @internal + */ + async waitForPendingPlugins() { + for (; this.currentPluginEnablementPromise; ) + await this.currentPluginEnablementPromise; + } + /** + * Starts enabling any requested plugins without waiting for the result. + * + * @internal + */ + enableRequestedPlugins() { + this.pendingPluginEnablements && this.enableRequestedPluginsAsync(); + } + async enableRequestedPluginsAsync() { + if (this.currentPluginEnablementPromise && await this.waitForPendingPlugins(), !this.pendingPluginEnablements) + return; + const t = ts(this.pendingPluginEnablements.entries()); + this.pendingPluginEnablements = void 0, this.currentPluginEnablementPromise = this.enableRequestedPluginsWorker(t), await this.currentPluginEnablementPromise; + } + async enableRequestedPluginsWorker(t) { + E.assert(this.currentPluginEnablementPromise === void 0); + let n = !1; + await Promise.all(or(t, async ([i, s]) => { + const o = await Promise.all(s); + if (i.isClosed() || mL(i)) { + this.logger.info(`Cancelling plugin enabling for ${i.getProjectName()} as it is ${i.isClosed() ? "closed" : "deferred close"}`); + return; + } + n = !0; + for (const c of o) + this.endEnablePlugin(i, c); + this.delayUpdateProjectGraph(i); + })), this.currentPluginEnablementPromise = void 0, n && this.sendProjectsUpdatedInBackgroundEvent(); + } + configurePlugin(t) { + this.forEachEnabledProject((n) => n.onPluginConfigurationChanged(t.pluginName, t.configuration)), this.currentPluginConfigOverrides = this.currentPluginConfigOverrides || /* @__PURE__ */ new Map(), this.currentPluginConfigOverrides.set(t.pluginName, t.configuration); + } + /** @internal */ + getPackageJsonsVisibleToFile(t, n, i) { + const s = this.packageJsonCache, o = i && this.toPath(i), c = [], _ = (u) => { + switch (s.directoryHasPackageJson(u)) { + case 3: + return s.searchDirectoryAndAncestors(u), _(u); + case -1: + const d = Mn(u, "package.json"); + this.watchPackageJsonFile(d, this.toPath(d), n); + const g = s.getInDirectory(u); + g && c.push(g); + } + if (o && o === u) + return !0; + }; + return $p(Xn(t), _), c; + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(t) { + return $p(t, (n) => { + switch (this.packageJsonCache.directoryHasPackageJson(n)) { + case -1: + return n; + case 0: + return; + case 3: + return this.host.fileExists(Mn(n, "package.json")) ? n : void 0; + } + }); + } + /** @internal */ + watchPackageJsonFile(t, n, i) { + E.assert(i !== void 0); + let s = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(n); + if (!s) { + let o = this.watchFactory.watchFile( + t, + (c, _) => { + switch (_) { + case 0: + case 1: + this.packageJsonCache.addOrUpdate(c, n), this.onPackageJsonChange(s); + break; + case 2: + this.packageJsonCache.delete(n), this.onPackageJsonChange(s), s.projects.clear(), s.close(); + } + }, + 250, + this.hostConfiguration.watchOptions, + kl.PackageJson + ); + s = { + projects: /* @__PURE__ */ new Set(), + close: () => { + var c; + s.projects.size || !o || (o.close(), o = void 0, (c = this.packageJsonFilesMap) == null || c.delete(n), this.packageJsonCache.invalidate(n)); + } + }, this.packageJsonFilesMap.set(n, s); + } + s.projects.add(i), (i.packageJsonWatches ?? (i.packageJsonWatches = /* @__PURE__ */ new Set())).add(s); + } + /** @internal */ + onPackageJsonChange(t) { + t.projects.forEach((n) => { + var i; + return (i = n.onPackageJsonChange) == null ? void 0 : i.call(n); + }); + } + /** @internal */ + includePackageJsonAutoImports() { + switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) { + case "on": + return 1; + case "off": + return 0; + default: + return 2; + } + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = ZYe()); + } + }; + Twe.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; + var ife = Twe; + function ZYe() { + let e; + return { + get() { + return e; + }, + set(t) { + e = t; + }, + clear() { + e = void 0; + } + }; + } + function sfe(e) { + return e.kind !== void 0; + } + function afe(e) { + e.print( + /*writeProjectFileNames*/ + !1, + /*writeFileExplaination*/ + !1, + /*writeFileVersionAndText*/ + !1 + ); + } + function ofe(e) { + let t, n, i; + const s = { + get(u, d, g, h) { + if (!(!n || i !== c(u, g, h))) + return n.get(d); + }, + set(u, d, g, h, S, T, C) { + if (o(u, g, h).set(d, _( + S, + T, + C, + /*isBlockedByPackageJsonDependencies*/ + !1 + )), C) { + for (const D of T) + if (D.isInNodeModules) { + const P = D.path.substring(0, D.path.indexOf(zg) + zg.length - 1), O = e.toPath(P); + t?.has(O) || (t || (t = /* @__PURE__ */ new Map())).set( + O, + e.watchNodeModulesForPackageJsonChanges(P) + ); + } + } + }, + setModulePaths(u, d, g, h, S) { + const T = o(u, g, h), C = T.get(d); + C ? C.modulePaths = S : T.set(d, _( + /*kind*/ + void 0, + S, + /*moduleSpecifiers*/ + void 0, + /*isBlockedByPackageJsonDependencies*/ + void 0 + )); + }, + setBlockedByPackageJsonDependencies(u, d, g, h, S) { + const T = o(u, g, h), C = T.get(d); + C ? C.isBlockedByPackageJsonDependencies = S : T.set(d, _( + /*kind*/ + void 0, + /*modulePaths*/ + void 0, + /*moduleSpecifiers*/ + void 0, + S + )); + }, + clear() { + t?.forEach(Zp), n?.clear(), t?.clear(), i = void 0; + }, + count() { + return n ? n.size : 0; + } + }; + return E.isDebugging && Object.defineProperty(s, "__cache", { get: () => n }), s; + function o(u, d, g) { + const h = c(u, d, g); + return n && i !== h && s.clear(), i = h, n || (n = /* @__PURE__ */ new Map()); + } + function c(u, d, g) { + return `${u},${d.importModuleSpecifierEnding},${d.importModuleSpecifierPreference},${g.overrideImportMode}`; + } + function _(u, d, g, h) { + return { kind: u, modulePaths: d, moduleSpecifiers: g, isBlockedByPackageJsonDependencies: h }; + } + } + function cfe(e) { + const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(); + return { + addOrUpdate: i, + invalidate: s, + delete: (c) => { + t.delete(c), n.set(Xn(c), !0); + }, + getInDirectory: (c) => t.get(e.toPath(Mn(c, "package.json"))) || void 0, + directoryHasPackageJson: (c) => o(e.toPath(c)), + searchDirectoryAndAncestors: (c) => { + $p(c, (_) => { + const u = e.toPath(_); + if (o(u) !== 3) + return !0; + const d = Mn(_, "package.json"); + hN(e, d) ? i(d, Mn(u, "package.json")) : n.set(u, !0); + }); + } + }; + function i(c, _) { + const u = E.checkDefined(AU(c, e.host)); + t.set(_, u), n.delete(Xn(_)); + } + function s(c) { + t.delete(c), n.delete(Xn(c)); + } + function o(c) { + return t.has(Mn(c, "package.json")) ? -1 : n.has(c) ? 0 : 3; + } + } + var xwe = { + isCancellationRequested: () => !1, + setRequest: () => { + }, + resetRequest: () => { + } + }; + function KYe(e) { + const t = e[0], n = e[1]; + return (1e9 * t + n) / 1e6; + } + function kwe(e, t) { + if ((x6(e) || t8(e)) && e.isJsOnlyProject()) { + const n = e.getScriptInfoForNormalizedPath(t); + return n && !n.isJavaScript(); + } + return !1; + } + function eZe(e) { + return op(e) || !!e.emitDecoratorMetadata; + } + function Cwe(e, t, n) { + const i = t.getScriptInfoForNormalizedPath(e); + return { + start: i.positionToLineOffset(n.start), + end: i.positionToLineOffset(n.start + n.length), + // TODO: GH#18217 + text: gm(n.messageText, ` +`), + code: n.code, + category: M2(n), + reportsUnnecessary: n.reportsUnnecessary, + reportsDeprecated: n.reportsDeprecated, + source: n.source, + relatedInformation: or(n.relatedInformation, sG) + }; + } + function sG(e) { + return e.file ? { + span: { + start: C6(Vs(e.file, e.start)), + end: C6(Vs(e.file, e.start + e.length)), + // TODO: GH#18217 + file: e.file.fileName + }, + message: gm(e.messageText, ` +`), + category: M2(e), + code: e.code + } : { + message: gm(e.messageText, ` +`), + category: M2(e), + code: e.code + }; + } + function C6(e) { + return { line: e.line + 1, offset: e.character + 1 }; + } + function i8(e, t) { + const n = e.file && C6(Vs(e.file, e.start)), i = e.file && C6(Vs(e.file, e.start + e.length)), s = gm(e.messageText, ` +`), { code: o, source: c } = e, _ = M2(e), u = { + start: n, + end: i, + text: s, + code: o, + category: _, + reportsUnnecessary: e.reportsUnnecessary, + reportsDeprecated: e.reportsDeprecated, + source: c, + relatedInformation: or(e.relatedInformation, sG) + }; + return t ? { ...u, fileName: e.file && e.file.fileName } : u; + } + function tZe(e, t) { + return e.every((n) => wc(n.span) < t); + } + var Ewe = F_e; + function lfe(e, t, n, i) { + const s = t.hasLevel( + 3 + /* verbose */ + ), o = JSON.stringify(e); + return s && t.info(`${e.type}:${dv(e)}`), `Content-Length: ${1 + n(o, "utf8")}\r +\r +${o}${i}`; + } + var rZe = class { + constructor(e) { + this.operationHost = e; + } + startNew(e) { + this.complete(), this.requestId = this.operationHost.getCurrentRequestId(), this.executeAction(e); + } + complete() { + this.requestId !== void 0 && (this.operationHost.sendRequestCompletedEvent(this.requestId), this.requestId = void 0), this.setTimerHandle(void 0), this.setImmediateId(void 0); + } + immediate(e, t) { + const n = this.requestId; + E.assert(n === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id"), this.setImmediateId( + this.operationHost.getServerHost().setImmediate(() => { + this.immediateId = void 0, this.operationHost.executeWithRequestId(n, () => this.executeAction(t)); + }, e) + ); + } + delay(e, t, n) { + const i = this.requestId; + E.assert(i === this.operationHost.getCurrentRequestId(), "delay: incorrect request id"), this.setTimerHandle( + this.operationHost.getServerHost().setTimeout( + () => { + this.timerHandle = void 0, this.operationHost.executeWithRequestId(i, () => this.executeAction(n)); + }, + t, + e + ) + ); + } + executeAction(e) { + var t, n, i, s, o, c; + let _ = !1; + try { + this.operationHost.isCancellationRequested() ? (_ = !0, (t = rn) == null || t.instant(rn.Phase.Session, "stepCanceled", { seq: this.requestId, early: !0 })) : ((n = rn) == null || n.push(rn.Phase.Session, "stepAction", { seq: this.requestId }), e(this), (i = rn) == null || i.pop()); + } catch (u) { + (s = rn) == null || s.popAll(), _ = !0, u instanceof AE ? (o = rn) == null || o.instant(rn.Phase.Session, "stepCanceled", { seq: this.requestId }) : ((c = rn) == null || c.instant(rn.Phase.Session, "stepError", { seq: this.requestId, message: u.message }), this.operationHost.logError(u, `delayed processing of request ${this.requestId}`)); + } + (_ || !this.hasPendingWork()) && this.complete(); + } + setTimerHandle(e) { + this.timerHandle !== void 0 && this.operationHost.getServerHost().clearTimeout(this.timerHandle), this.timerHandle = e; + } + setImmediateId(e) { + this.immediateId !== void 0 && this.operationHost.getServerHost().clearImmediate(this.immediateId), this.immediateId = e; + } + hasPendingWork() { + return !!this.timerHandle || !!this.immediateId; + } + }; + function ufe(e, t) { + return { + seq: 0, + type: "event", + event: e, + body: t + }; + } + function nZe(e, t, n, i) { + const s = vE(ss(n) ? n : n.projects, (o) => i(o, e)); + return !ss(n) && n.symLinkedProjects && n.symLinkedProjects.forEach((o, c) => { + const _ = t(c); + s.push(...Xs(o, (u) => i(u, _))); + }), tb(s, Kh); + } + function aG(e) { + return pR(({ textSpan: t }) => t.start + 100003 * t.length, dU(e)); + } + function iZe(e, t, n, i, s, o, c) { + const _ = Dwe( + e, + t, + n, + /*isForRename*/ + !0, + (g, h) => g.getLanguageService().findRenameLocations(h.fileName, h.pos, i, s, o), + (g, h) => h(mP(g)) + ); + if (ss(_)) + return _; + const u = [], d = aG(c); + return _.forEach((g, h) => { + for (const S of g) + !d.has(S) && !oG(mP(S), h) && (u.push(S), d.add(S)); + }), u; + } + function sZe(e, t, n) { + const i = e.getLanguageService().getDefinitionAtPosition( + t.fileName, + t.pos, + /*searchOtherFilesOnly*/ + !1, + /*stopAtAlias*/ + n + ), s = i && ul(i); + return s && !s.isLocal ? { fileName: s.fileName, pos: s.textSpan.start } : void 0; + } + function aZe(e, t, n, i, s) { + var o, c; + const _ = Dwe( + e, + t, + n, + /*isForRename*/ + !1, + (h, S) => (s.info(`Finding references to ${S.fileName} position ${S.pos} in project ${h.getProjectName()}`), h.getLanguageService().findReferences(S.fileName, S.pos)), + (h, S) => { + S(mP(h.definition)); + for (const T of h.references) + S(mP(T)); + } + ); + if (ss(_)) + return _; + const u = _.get(t); + if (((c = (o = u?.[0]) == null ? void 0 : o.references[0]) == null ? void 0 : c.isDefinition) === void 0) + _.forEach((h) => { + for (const S of h) + for (const T of S.references) + delete T.isDefinition; + }); + else { + const h = aG(i); + for (const T of u) + for (const C of T.references) + if (C.isDefinition) { + h.add(C); + break; + } + const S = /* @__PURE__ */ new Set(); + for (; ; ) { + let T = !1; + if (_.forEach((C, D) => { + if (S.has(D)) return; + D.getLanguageService().updateIsDefinitionOfReferencedSymbols(C, h) && (S.add(D), T = !0); + }), !T) break; + } + _.forEach((T, C) => { + if (!S.has(C)) + for (const D of T) + for (const P of D.references) + P.isDefinition = !1; + }); + } + const d = [], g = aG(i); + return _.forEach((h, S) => { + for (const T of h) { + const C = oG(mP(T.definition), S), D = C === void 0 ? T.definition : { + ...T.definition, + textSpan: jl(C.pos, T.definition.textSpan.length), + // Why would the length be the same in the original? + fileName: C.fileName, + contextSpan: lZe(T.definition, S) + }; + let P = Nn(d, (O) => pU(O.definition, D, i)); + P || (P = { definition: D, references: [] }, d.push(P)); + for (const O of T.references) + !g.has(O) && !oG(mP(O), S) && (g.add(O), P.references.push(O)); + } + }), d.filter((h) => h.references.length !== 0); + } + function _fe(e, t, n) { + for (const i of ss(e) ? e : e.projects) + n(i, t); + !ss(e) && e.symLinkedProjects && e.symLinkedProjects.forEach((i, s) => { + for (const o of i) + n(o, s); + }); + } + function Dwe(e, t, n, i, s, o) { + const c = /* @__PURE__ */ new Map(), _ = aw(); + _.enqueue({ project: t, location: n }), _fe(e, n.fileName, (D, P) => { + const O = { fileName: P, pos: n.pos }; + _.enqueue({ project: D, location: O }); + }); + const u = t.projectService, d = t.getCancellationToken(), g = sZe(t, n, i), h = Wu( + () => t.isSourceOfProjectReferenceRedirect(g.fileName) ? g : t.getLanguageService().getSourceMapper().tryGetGeneratedPosition(g) + ), S = Wu( + () => t.isSourceOfProjectReferenceRedirect(g.fileName) ? g : t.getLanguageService().getSourceMapper().tryGetSourcePosition(g) + ), T = /* @__PURE__ */ new Set(); + e: + for (; !_.isEmpty(); ) { + for (; !_.isEmpty(); ) { + if (d.isCancellationRequested()) break e; + const { project: D, location: P } = _.dequeue(); + if (c.has(D) || Pwe(D, P) || (fp(D), !D.containsFile(Wo(P.fileName)))) + continue; + const O = C(D, P); + c.set(D, O ?? al), T.add(cZe(D)); + } + g && (u.loadAncestorProjectTree(T), u.forEachEnabledProject((D) => { + if (d.isCancellationRequested() || c.has(D)) return; + const P = oZe(g, D, h, S); + P && _.enqueue({ project: D, location: P }); + })); + } + if (c.size === 1) + return cR(c.values()); + return c; + function C(D, P) { + const O = s(D, P); + if (O) { + for (const j of O) + o(j, (F) => { + const V = u.getOriginalLocationEnsuringConfiguredProject(D, F); + if (!V) return; + const L = u.getScriptInfo(V.fileName); + for (const U of L.containingProjects) + !U.isOrphan() && !c.has(U) && _.enqueue({ project: U, location: V }); + const $ = u.getSymlinkedProjects(L); + $ && $.forEach((U, G) => { + for (const ce of U) + !ce.isOrphan() && !c.has(ce) && _.enqueue({ project: ce, location: { fileName: G, pos: V.pos } }); + }); + }); + return O; + } + } + } + function oZe(e, t, n, i) { + if (t.containsFile(Wo(e.fileName)) && !Pwe(t, e)) + return e; + const s = n(); + if (s && t.containsFile(Wo(s.fileName))) return s; + const o = i(); + return o && t.containsFile(Wo(o.fileName)) ? o : void 0; + } + function Pwe(e, t) { + if (!t) return !1; + const n = e.getLanguageService().getProgram(); + if (!n) return !1; + const i = n.getSourceFile(t.fileName); + return !!i && i.resolvedPath !== i.path && i.resolvedPath !== e.toPath(t.fileName); + } + function cZe(e) { + return P0(e) ? e.canonicalConfigFilePath : e.getProjectName(); + } + function mP({ fileName: e, textSpan: t }) { + return { fileName: e, pos: t.start }; + } + function oG(e, t) { + return GD(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + function wwe(e, t) { + return r9(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + function lZe(e, t) { + return gU(e, t.getSourceMapper(), (n) => t.projectService.fileExists(n)); + } + var Awe = [ + "openExternalProject", + "openExternalProjects", + "closeExternalProject", + "synchronizeProjectList", + "emit-output", + "compileOnSaveAffectedFileList", + "compileOnSaveEmitFile", + "compilerOptionsDiagnostics-full", + "encodedSemanticClassifications-full", + "semanticDiagnosticsSync", + "suggestionDiagnosticsSync", + "geterrForProject", + "reload", + "reloadProjects", + "getCodeFixes", + "getCodeFixes-full", + "getCombinedCodeFix", + "getCombinedCodeFix-full", + "applyCodeActionCommand", + "getSupportedCodeFixes", + "getApplicableRefactors", + "getMoveToRefactoringFileSuggestions", + "getEditsForRefactor", + "getEditsForRefactor-full", + "organizeImports", + "organizeImports-full", + "getEditsForFileRename", + "getEditsForFileRename-full", + "prepareCallHierarchy", + "provideCallHierarchyIncomingCalls", + "provideCallHierarchyOutgoingCalls", + "getPasteEdits" + /* GetPasteEdits */ + ], uZe = [ + ...Awe, + "definition", + "definition-full", + "definitionAndBoundSpan", + "definitionAndBoundSpan-full", + "typeDefinition", + "implementation", + "implementation-full", + "references", + "references-full", + "rename", + "renameLocations-full", + "rename-full", + "quickinfo", + "quickinfo-full", + "completionInfo", + "completions", + "completions-full", + "completionEntryDetails", + "completionEntryDetails-full", + "signatureHelp", + "signatureHelp-full", + "navto", + "navto-full", + "documentHighlights", + "documentHighlights-full" + /* DocumentHighlightsFull */ + ], Nwe = class fX { + constructor(t) { + this.changeSeq = 0, this.handlers = new Map(Object.entries({ + // TODO(jakebailey): correctly type the handlers + status: () => { + const o = { version: dd }; + return this.requiredResponse(o); + }, + openExternalProject: (o) => (this.projectService.openExternalProject( + o.arguments, + /*cleanupAfter*/ + !0 + ), this.requiredResponse( + /*response*/ + !0 + )), + openExternalProjects: (o) => (this.projectService.openExternalProjects(o.arguments.projects), this.requiredResponse( + /*response*/ + !0 + )), + closeExternalProject: (o) => (this.projectService.closeExternalProject( + o.arguments.projectFileName, + /*cleanupAfter*/ + !0 + ), this.requiredResponse( + /*response*/ + !0 + )), + synchronizeProjectList: (o) => { + const c = this.projectService.synchronizeProjectList(o.arguments.knownProjects, o.arguments.includeProjectReferenceRedirectInfo); + if (!c.some((u) => u.projectErrors && u.projectErrors.length !== 0)) + return this.requiredResponse(c); + const _ = or(c, (u) => !u.projectErrors || u.projectErrors.length === 0 ? u : { + info: u.info, + changes: u.changes, + files: u.files, + projectErrors: this.convertToDiagnosticsWithLinePosition( + u.projectErrors, + /*scriptInfo*/ + void 0 + ) + }); + return this.requiredResponse(_); + }, + updateOpen: (o) => (this.changeSeq++, this.projectService.applyChangesInOpenFiles( + o.arguments.openFiles && yE(o.arguments.openFiles, (c) => ({ + fileName: c.file, + content: c.fileContent, + scriptKind: c.scriptKindName, + projectRootPath: c.projectRootPath + })), + o.arguments.changedFiles && yE(o.arguments.changedFiles, (c) => ({ + fileName: c.fileName, + changes: P1(aR(c.textChanges), (_) => { + const u = E.checkDefined(this.projectService.getScriptInfo(c.fileName)), d = u.lineOffsetToPosition(_.start.line, _.start.offset), g = u.lineOffsetToPosition(_.end.line, _.end.offset); + return d >= 0 ? { span: { start: d, length: g - d }, newText: _.newText } : void 0; + }) + })), + o.arguments.closedFiles + ), this.requiredResponse( + /*response*/ + !0 + )), + applyChangedToOpenFiles: (o) => (this.changeSeq++, this.projectService.applyChangesInOpenFiles( + o.arguments.openFiles, + o.arguments.changedFiles && yE(o.arguments.changedFiles, (c) => ({ + fileName: c.fileName, + // apply changes in reverse order + changes: aR(c.changes) + })), + o.arguments.closedFiles + ), this.requiredResponse( + /*response*/ + !0 + )), + exit: () => (this.exit(), this.notRequired()), + definition: (o) => this.requiredResponse(this.getDefinition( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "definition-full": (o) => this.requiredResponse(this.getDefinition( + o.arguments, + /*simplifiedResult*/ + !1 + )), + definitionAndBoundSpan: (o) => this.requiredResponse(this.getDefinitionAndBoundSpan( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "definitionAndBoundSpan-full": (o) => this.requiredResponse(this.getDefinitionAndBoundSpan( + o.arguments, + /*simplifiedResult*/ + !1 + )), + findSourceDefinition: (o) => this.requiredResponse(this.findSourceDefinition(o.arguments)), + "emit-output": (o) => this.requiredResponse(this.getEmitOutput(o.arguments)), + typeDefinition: (o) => this.requiredResponse(this.getTypeDefinition(o.arguments)), + implementation: (o) => this.requiredResponse(this.getImplementation( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "implementation-full": (o) => this.requiredResponse(this.getImplementation( + o.arguments, + /*simplifiedResult*/ + !1 + )), + references: (o) => this.requiredResponse(this.getReferences( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "references-full": (o) => this.requiredResponse(this.getReferences( + o.arguments, + /*simplifiedResult*/ + !1 + )), + rename: (o) => this.requiredResponse(this.getRenameLocations( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "renameLocations-full": (o) => this.requiredResponse(this.getRenameLocations( + o.arguments, + /*simplifiedResult*/ + !1 + )), + "rename-full": (o) => this.requiredResponse(this.getRenameInfo(o.arguments)), + open: (o) => (this.openClientFile( + Wo(o.arguments.file), + o.arguments.fileContent, + KH(o.arguments.scriptKindName), + // TODO: GH#18217 + o.arguments.projectRootPath ? Wo(o.arguments.projectRootPath) : void 0 + ), this.notRequired()), + quickinfo: (o) => this.requiredResponse(this.getQuickInfoWorker( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "quickinfo-full": (o) => this.requiredResponse(this.getQuickInfoWorker( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getOutliningSpans: (o) => this.requiredResponse(this.getOutliningSpans( + o.arguments, + /*simplifiedResult*/ + !0 + )), + outliningSpans: (o) => this.requiredResponse(this.getOutliningSpans( + o.arguments, + /*simplifiedResult*/ + !1 + )), + todoComments: (o) => this.requiredResponse(this.getTodoComments(o.arguments)), + indentation: (o) => this.requiredResponse(this.getIndentation(o.arguments)), + nameOrDottedNameSpan: (o) => this.requiredResponse(this.getNameOrDottedNameSpan(o.arguments)), + breakpointStatement: (o) => this.requiredResponse(this.getBreakpointStatement(o.arguments)), + braceCompletion: (o) => this.requiredResponse(this.isValidBraceCompletion(o.arguments)), + docCommentTemplate: (o) => this.requiredResponse(this.getDocCommentTemplate(o.arguments)), + getSpanOfEnclosingComment: (o) => this.requiredResponse(this.getSpanOfEnclosingComment(o.arguments)), + fileReferences: (o) => this.requiredResponse(this.getFileReferences( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "fileReferences-full": (o) => this.requiredResponse(this.getFileReferences( + o.arguments, + /*simplifiedResult*/ + !1 + )), + format: (o) => this.requiredResponse(this.getFormattingEditsForRange(o.arguments)), + formatonkey: (o) => this.requiredResponse(this.getFormattingEditsAfterKeystroke(o.arguments)), + "format-full": (o) => this.requiredResponse(this.getFormattingEditsForDocumentFull(o.arguments)), + "formatonkey-full": (o) => this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(o.arguments)), + "formatRange-full": (o) => this.requiredResponse(this.getFormattingEditsForRangeFull(o.arguments)), + completionInfo: (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completionInfo" + /* CompletionInfo */ + )), + completions: (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completions" + /* Completions */ + )), + "completions-full": (o) => this.requiredResponse(this.getCompletions( + o.arguments, + "completions-full" + /* CompletionsFull */ + )), + completionEntryDetails: (o) => this.requiredResponse(this.getCompletionEntryDetails( + o.arguments, + /*fullResult*/ + !1 + )), + "completionEntryDetails-full": (o) => this.requiredResponse(this.getCompletionEntryDetails( + o.arguments, + /*fullResult*/ + !0 + )), + compileOnSaveAffectedFileList: (o) => this.requiredResponse(this.getCompileOnSaveAffectedFileList(o.arguments)), + compileOnSaveEmitFile: (o) => this.requiredResponse(this.emitFile(o.arguments)), + signatureHelp: (o) => this.requiredResponse(this.getSignatureHelpItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "signatureHelp-full": (o) => this.requiredResponse(this.getSignatureHelpItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + "compilerOptionsDiagnostics-full": (o) => this.requiredResponse(this.getCompilerOptionsDiagnostics(o.arguments)), + "encodedSyntacticClassifications-full": (o) => this.requiredResponse(this.getEncodedSyntacticClassifications(o.arguments)), + "encodedSemanticClassifications-full": (o) => this.requiredResponse(this.getEncodedSemanticClassifications(o.arguments)), + cleanup: () => (this.cleanup(), this.requiredResponse( + /*response*/ + !0 + )), + semanticDiagnosticsSync: (o) => this.requiredResponse(this.getSemanticDiagnosticsSync(o.arguments)), + syntacticDiagnosticsSync: (o) => this.requiredResponse(this.getSyntacticDiagnosticsSync(o.arguments)), + suggestionDiagnosticsSync: (o) => this.requiredResponse(this.getSuggestionDiagnosticsSync(o.arguments)), + geterr: (o) => (this.errorCheck.startNew((c) => this.getDiagnostics(c, o.arguments.delay, o.arguments.files)), this.notRequired()), + geterrForProject: (o) => (this.errorCheck.startNew((c) => this.getDiagnosticsForProject(c, o.arguments.delay, o.arguments.file)), this.notRequired()), + change: (o) => (this.change(o.arguments), this.notRequired()), + configure: (o) => (this.projectService.setHostConfiguration(o.arguments), this.doOutput( + /*info*/ + void 0, + "configure", + o.seq, + /*success*/ + !0 + ), this.notRequired()), + reload: (o) => (this.reload(o.arguments, o.seq), this.requiredResponse({ reloadFinished: !0 })), + saveto: (o) => { + const c = o.arguments; + return this.saveToTmp(c.file, c.tmpfile), this.notRequired(); + }, + close: (o) => { + const c = o.arguments; + return this.closeClientFile(c.file), this.notRequired(); + }, + navto: (o) => this.requiredResponse(this.getNavigateToItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navto-full": (o) => this.requiredResponse(this.getNavigateToItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + brace: (o) => this.requiredResponse(this.getBraceMatching( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "brace-full": (o) => this.requiredResponse(this.getBraceMatching( + o.arguments, + /*simplifiedResult*/ + !1 + )), + navbar: (o) => this.requiredResponse(this.getNavigationBarItems( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navbar-full": (o) => this.requiredResponse(this.getNavigationBarItems( + o.arguments, + /*simplifiedResult*/ + !1 + )), + navtree: (o) => this.requiredResponse(this.getNavigationTree( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "navtree-full": (o) => this.requiredResponse(this.getNavigationTree( + o.arguments, + /*simplifiedResult*/ + !1 + )), + documentHighlights: (o) => this.requiredResponse(this.getDocumentHighlights( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "documentHighlights-full": (o) => this.requiredResponse(this.getDocumentHighlights( + o.arguments, + /*simplifiedResult*/ + !1 + )), + compilerOptionsForInferredProjects: (o) => (this.setCompilerOptionsForInferredProjects(o.arguments), this.requiredResponse( + /*response*/ + !0 + )), + projectInfo: (o) => this.requiredResponse(this.getProjectInfo(o.arguments)), + reloadProjects: () => (this.projectService.reloadProjects(), this.notRequired()), + jsxClosingTag: (o) => this.requiredResponse(this.getJsxClosingTag(o.arguments)), + linkedEditingRange: (o) => this.requiredResponse(this.getLinkedEditingRange(o.arguments)), + getCodeFixes: (o) => this.requiredResponse(this.getCodeFixes( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getCodeFixes-full": (o) => this.requiredResponse(this.getCodeFixes( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getCombinedCodeFix: (o) => this.requiredResponse(this.getCombinedCodeFix( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getCombinedCodeFix-full": (o) => this.requiredResponse(this.getCombinedCodeFix( + o.arguments, + /*simplifiedResult*/ + !1 + )), + applyCodeActionCommand: (o) => this.requiredResponse(this.applyCodeActionCommand(o.arguments)), + getSupportedCodeFixes: (o) => this.requiredResponse(this.getSupportedCodeFixes(o.arguments)), + getApplicableRefactors: (o) => this.requiredResponse(this.getApplicableRefactors(o.arguments)), + getEditsForRefactor: (o) => this.requiredResponse(this.getEditsForRefactor( + o.arguments, + /*simplifiedResult*/ + !0 + )), + getMoveToRefactoringFileSuggestions: (o) => this.requiredResponse(this.getMoveToRefactoringFileSuggestions(o.arguments)), + getPasteEdits: (o) => this.requiredResponse(this.getPasteEdits(o.arguments)), + "getEditsForRefactor-full": (o) => this.requiredResponse(this.getEditsForRefactor( + o.arguments, + /*simplifiedResult*/ + !1 + )), + organizeImports: (o) => this.requiredResponse(this.organizeImports( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "organizeImports-full": (o) => this.requiredResponse(this.organizeImports( + o.arguments, + /*simplifiedResult*/ + !1 + )), + getEditsForFileRename: (o) => this.requiredResponse(this.getEditsForFileRename( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "getEditsForFileRename-full": (o) => this.requiredResponse(this.getEditsForFileRename( + o.arguments, + /*simplifiedResult*/ + !1 + )), + configurePlugin: (o) => (this.configurePlugin(o.arguments), this.doOutput( + /*info*/ + void 0, + "configurePlugin", + o.seq, + /*success*/ + !0 + ), this.notRequired()), + selectionRange: (o) => this.requiredResponse(this.getSmartSelectionRange( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "selectionRange-full": (o) => this.requiredResponse(this.getSmartSelectionRange( + o.arguments, + /*simplifiedResult*/ + !1 + )), + prepareCallHierarchy: (o) => this.requiredResponse(this.prepareCallHierarchy(o.arguments)), + provideCallHierarchyIncomingCalls: (o) => this.requiredResponse(this.provideCallHierarchyIncomingCalls(o.arguments)), + provideCallHierarchyOutgoingCalls: (o) => this.requiredResponse(this.provideCallHierarchyOutgoingCalls(o.arguments)), + toggleLineComment: (o) => this.requiredResponse(this.toggleLineComment( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "toggleLineComment-full": (o) => this.requiredResponse(this.toggleLineComment( + o.arguments, + /*simplifiedResult*/ + !1 + )), + toggleMultilineComment: (o) => this.requiredResponse(this.toggleMultilineComment( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "toggleMultilineComment-full": (o) => this.requiredResponse(this.toggleMultilineComment( + o.arguments, + /*simplifiedResult*/ + !1 + )), + commentSelection: (o) => this.requiredResponse(this.commentSelection( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "commentSelection-full": (o) => this.requiredResponse(this.commentSelection( + o.arguments, + /*simplifiedResult*/ + !1 + )), + uncommentSelection: (o) => this.requiredResponse(this.uncommentSelection( + o.arguments, + /*simplifiedResult*/ + !0 + )), + "uncommentSelection-full": (o) => this.requiredResponse(this.uncommentSelection( + o.arguments, + /*simplifiedResult*/ + !1 + )), + provideInlayHints: (o) => this.requiredResponse(this.provideInlayHints(o.arguments)), + mapCode: (o) => this.requiredResponse(this.mapCode(o.arguments)) + })), this.host = t.host, this.cancellationToken = t.cancellationToken, this.typingsInstaller = t.typingsInstaller || BH, this.byteLength = t.byteLength, this.hrtime = t.hrtime, this.logger = t.logger, this.canUseEvents = t.canUseEvents, this.suppressDiagnosticEvents = t.suppressDiagnosticEvents, this.noGetErrOnBackgroundUpdate = t.noGetErrOnBackgroundUpdate; + const { throttleWaitMilliseconds: n } = t; + this.eventHandler = this.canUseEvents ? t.eventHandler || ((o) => this.defaultEventHandler(o)) : void 0; + const i = { + executeWithRequestId: (o, c) => this.executeWithRequestId(o, c), + getCurrentRequestId: () => this.currentRequestId, + getServerHost: () => this.host, + logError: (o, c) => this.logError(o, c), + sendRequestCompletedEvent: (o) => this.sendRequestCompletedEvent(o), + isCancellationRequested: () => this.cancellationToken.isCancellationRequested() + }; + this.errorCheck = new rZe(i); + const s = { + host: this.host, + logger: this.logger, + cancellationToken: this.cancellationToken, + useSingleInferredProject: t.useSingleInferredProject, + useInferredProjectPerProjectRoot: t.useInferredProjectPerProjectRoot, + typingsInstaller: this.typingsInstaller, + throttleWaitMilliseconds: n, + eventHandler: this.eventHandler, + suppressDiagnosticEvents: this.suppressDiagnosticEvents, + globalPlugins: t.globalPlugins, + pluginProbeLocations: t.pluginProbeLocations, + allowLocalPluginLoads: t.allowLocalPluginLoads, + typesMapLocation: t.typesMapLocation, + serverMode: t.serverMode, + session: this, + canUseWatchEvents: t.canUseWatchEvents, + incrementalVerifier: t.incrementalVerifier + }; + switch (this.projectService = new ife(s), this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)), this.gcTimer = new I_e( + this.host, + /*delay*/ + 7e3, + this.logger + ), this.projectService.serverMode) { + case 0: + break; + case 1: + Awe.forEach( + (o) => this.handlers.set(o, (c) => { + throw new Error(`Request: ${c.command} not allowed in LanguageServiceMode.PartialSemantic`); + }) + ); + break; + case 2: + uZe.forEach( + (o) => this.handlers.set(o, (c) => { + throw new Error(`Request: ${c.command} not allowed in LanguageServiceMode.Syntactic`); + }) + ); + break; + default: + E.assertNever(this.projectService.serverMode); + } + } + sendRequestCompletedEvent(t) { + this.event({ request_seq: t }, "requestCompleted"); + } + addPerformanceData(t, n) { + this.performanceData || (this.performanceData = {}), this.performanceData[t] = (this.performanceData[t] ?? 0) + n; + } + performanceEventHandler(t) { + switch (t.kind) { + case "UpdateGraph": + this.addPerformanceData("updateGraphDurationMs", t.durationMs); + break; + case "CreatePackageJsonAutoImportProvider": + this.addPerformanceData("createAutoImportProviderProgramDurationMs", t.durationMs); + break; + } + } + defaultEventHandler(t) { + switch (t.eventName) { + case gL: + this.projectsUpdatedInBackgroundEvent(t.data.openFiles); + break; + case VH: + this.event({ + projectName: t.data.project.getProjectName(), + reason: t.data.reason + }, t.eventName); + break; + case UH: + this.event({ + projectName: t.data.project.getProjectName() + }, t.eventName); + break; + case qH: + case XH: + case QH: + case YH: + this.event(t.data, t.eventName); + break; + case HH: + this.event({ + triggerFile: t.data.triggerFile, + configFile: t.data.configFileName, + diagnostics: or(t.data.diagnostics, (n) => i8( + n, + /*includeFileName*/ + !0 + )) + }, t.eventName); + break; + case GH: { + this.event({ + projectName: t.data.project.getProjectName(), + languageServiceEnabled: t.data.languageServiceEnabled + }, t.eventName); + break; + } + case $H: { + this.event({ + telemetryEventName: t.eventName, + payload: t.data + }, "telemetry"); + break; + } + } + } + projectsUpdatedInBackgroundEvent(t) { + this.projectService.logger.info(`got projects updated in background ${t}`), t.length && (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate && (this.projectService.logger.info(`Queueing diagnostics update for ${t}`), this.errorCheck.startNew((n) => this.updateErrorCheck( + n, + t, + 100, + /*requireOpen*/ + !0 + ))), this.event({ + openFiles: t + }, gL)); + } + logError(t, n) { + this.logErrorWorker(t, n); + } + logErrorWorker(t, n, i) { + let s = "Exception on executing command " + n; + if (t.message && (s += `: +` + zD(t.message), t.stack && (s += ` +` + zD(t.stack))), this.logger.hasLevel( + 3 + /* verbose */ + )) { + if (i) + try { + const { file: o, project: c } = this.getFileAndProject(i), _ = c.getScriptInfoForNormalizedPath(o); + if (_) { + const u = Rx(_.getSnapshot()); + s += ` + +File text of ${i.file}:${zD(u)} +`; + } + } catch { + } + if (t.ProgramFiles) { + s += ` + +Program files: ${JSON.stringify(t.ProgramFiles)} +`, s += ` + +Projects:: +`; + let o = 0; + const c = (_) => { + s += ` +Project '${_.projectName}' (${KN[_.projectKind]}) ${o} +`, s += _.filesToString( + /*writeProjectFileNames*/ + !0 + ), s += ` +----------------------------------------------- +`, o++; + }; + this.projectService.externalProjects.forEach(c), this.projectService.configuredProjects.forEach(c), this.projectService.inferredProjects.forEach(c); + } + } + this.logger.msg( + s, + "Err" + /* Err */ + ); + } + send(t) { + if (t.type === "event" && !this.canUseEvents) { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`Session does not support events: ignored event: ${dv(t)}`); + return; + } + this.writeMessage(t); + } + writeMessage(t) { + var n; + const i = lfe(t, this.logger, this.byteLength, this.host.newLine); + (n = Vu) == null || n.logEvent(`Response message size: ${i.length}`), this.host.write(i); + } + event(t, n) { + this.send(ufe(n, t)); + } + /** @internal */ + doOutput(t, n, i, s, o) { + const c = { + seq: 0, + type: "response", + command: n, + request_seq: i, + success: s, + performanceData: this.performanceData + }; + if (s) { + let _; + if (ss(t)) + c.body = t, _ = t.metadata, delete t.metadata; + else if (typeof t == "object") + if (t.metadata) { + const { metadata: u, ...d } = t; + c.body = d, _ = u; + } else + c.body = t; + else + c.body = t; + _ && (c.metadata = _); + } else + E.assert(t === void 0); + o && (c.message = o), this.send(c); + } + semanticCheck(t, n) { + var i, s; + (i = rn) == null || i.push(rn.Phase.Session, "semanticCheck", { file: t, configFilePath: n.canonicalConfigFilePath }); + const o = kwe(n, t) ? al : n.getLanguageService().getSemanticDiagnostics(t).filter((c) => !!c.file); + this.sendDiagnosticsEvent(t, n, o, "semanticDiag"), (s = rn) == null || s.pop(); + } + syntacticCheck(t, n) { + var i, s; + (i = rn) == null || i.push(rn.Phase.Session, "syntacticCheck", { file: t, configFilePath: n.canonicalConfigFilePath }), this.sendDiagnosticsEvent(t, n, n.getLanguageService().getSyntacticDiagnostics(t), "syntaxDiag"), (s = rn) == null || s.pop(); + } + suggestionCheck(t, n) { + var i, s; + (i = rn) == null || i.push(rn.Phase.Session, "suggestionCheck", { file: t, configFilePath: n.canonicalConfigFilePath }), this.sendDiagnosticsEvent(t, n, n.getLanguageService().getSuggestionDiagnostics(t), "suggestionDiag"), (s = rn) == null || s.pop(); + } + sendDiagnosticsEvent(t, n, i, s) { + try { + this.event({ file: t, diagnostics: i.map((o) => Cwe(t, n, o)) }, s); + } catch (o) { + this.logError(o, s); + } + } + /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ + updateErrorCheck(t, n, i, s = !0) { + E.assert(!this.suppressDiagnosticEvents); + const o = this.changeSeq, c = Math.min(i, 200); + let _ = 0; + const u = () => { + _++, n.length > _ && t.delay("checkOne", c, d); + }, d = () => { + if (this.changeSeq !== o) + return; + let g = n[_]; + if (Gi(g) && (g = this.toPendingErrorCheck(g), !g)) { + u(); + return; + } + const { fileName: h, project: S } = g; + if (fp(S), !!S.containsFile(h, s) && (this.syntacticCheck(h, S), this.changeSeq === o)) { + if (S.projectService.serverMode !== 0) { + u(); + return; + } + t.immediate("semanticCheck", () => { + if (this.semanticCheck(h, S), this.changeSeq === o) { + if (this.getPreferences(h).disableSuggestions) { + u(); + return; + } + t.immediate("suggestionCheck", () => { + this.suggestionCheck(h, S), u(); + }); + } + }); + } + }; + n.length > _ && this.changeSeq === o && t.delay("checkOne", i, d); + } + cleanProjects(t, n) { + if (n) { + this.logger.info(`cleaning ${t}`); + for (const i of n) + i.getLanguageService( + /*ensureSynchronized*/ + !1 + ).cleanupSemanticCache(), i.cleanupProgram(); + } + } + cleanup() { + this.cleanProjects("inferred projects", this.projectService.inferredProjects), this.cleanProjects("configured projects", ts(this.projectService.configuredProjects.values())), this.cleanProjects("external projects", this.projectService.externalProjects), this.host.gc && (this.logger.info("host.gc()"), this.host.gc()); + } + getEncodedSyntacticClassifications(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t); + return i.getEncodedSyntacticClassifications(n, t); + } + getEncodedSemanticClassifications(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = t.format === "2020" ? "2020" : "original"; + return i.getLanguageService().getEncodedSemanticClassifications(n, t, s); + } + getProject(t) { + return t === void 0 ? void 0 : this.projectService.findProject(t); + } + getConfigFileAndProject(t) { + const n = this.getProject(t.projectFileName), i = Wo(t.file); + return { + configFile: n && n.hasConfigFile(i) ? i : void 0, + project: n + }; + } + getConfigFileDiagnostics(t, n, i) { + const s = n.getAllProjectErrors(), o = n.getLanguageService().getCompilerOptionsDiagnostics(), c = Ln( + Hi(s, o), + (_) => !!_.file && _.file.fileName === t + ); + return i ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(c) : or( + c, + (_) => i8( + _, + /*includeFileName*/ + !1 + ) + ); + } + convertToDiagnosticsWithLinePositionFromDiagnosticFile(t) { + return t.map((n) => ({ + message: gm(n.messageText, this.host.newLine), + start: n.start, + // TODO: GH#18217 + length: n.length, + // TODO: GH#18217 + category: M2(n), + code: n.code, + source: n.source, + startLocation: n.file && C6(Vs(n.file, n.start)), + // TODO: GH#18217 + endLocation: n.file && C6(Vs(n.file, n.start + n.length)), + // TODO: GH#18217 + reportsUnnecessary: n.reportsUnnecessary, + reportsDeprecated: n.reportsDeprecated, + relatedInformation: or(n.relatedInformation, sG) + })); + } + getCompilerOptionsDiagnostics(t) { + const n = this.getProject(t.projectFileName); + return this.convertToDiagnosticsWithLinePosition( + Ln( + n.getLanguageService().getCompilerOptionsDiagnostics(), + (i) => !i.file + ), + /*scriptInfo*/ + void 0 + ); + } + convertToDiagnosticsWithLinePosition(t, n) { + return t.map( + (i) => ({ + message: gm(i.messageText, this.host.newLine), + start: i.start, + length: i.length, + category: M2(i), + code: i.code, + source: i.source, + startLocation: n && n.positionToLineOffset(i.start), + // TODO: GH#18217 + endLocation: n && n.positionToLineOffset(i.start + i.length), + reportsUnnecessary: i.reportsUnnecessary, + reportsDeprecated: i.reportsDeprecated, + relatedInformation: or(i.relatedInformation, sG) + }) + ); + } + getDiagnosticsWorker(t, n, i, s) { + const { project: o, file: c } = this.getFileAndProject(t); + if (n && kwe(o, c)) + return al; + const _ = o.getScriptInfoForNormalizedPath(c), u = i(o, c); + return s ? this.convertToDiagnosticsWithLinePosition(u, _) : u.map((d) => Cwe(c, o, d)); + } + getDefinition(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = this.mapDefinitionInfoLocations(s.getLanguageService().getDefinitionAtPosition(i, o) || al, s); + return n ? this.mapDefinitionInfo(c, s) : c.map(fX.mapToOriginalLocation); + } + mapDefinitionInfoLocations(t, n) { + return t.map((i) => { + const s = wwe(i, n); + return s ? { + ...s, + containerKind: i.containerKind, + containerName: i.containerName, + kind: i.kind, + name: i.name, + failedAliasResolution: i.failedAliasResolution, + ...i.unverified && { unverified: i.unverified } + } : i; + }); + } + getDefinitionAndBoundSpan(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = E.checkDefined(s.getScriptInfo(i)), _ = s.getLanguageService().getDefinitionAndBoundSpan(i, o); + if (!_ || !_.definitions) + return { + definitions: al, + textSpan: void 0 + // TODO: GH#18217 + }; + const u = this.mapDefinitionInfoLocations(_.definitions, s), { textSpan: d } = _; + return n ? { + definitions: this.mapDefinitionInfo(u, s), + textSpan: eg(d, c) + } : { + definitions: u.map(fX.mapToOriginalLocation), + textSpan: d + }; + } + findSourceDefinition(t) { + var n; + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = s.getLanguageService().getDefinitionAtPosition(i, o); + let _ = this.mapDefinitionInfoLocations(c || al, s).slice(); + if (this.projectService.serverMode === 0 && (!ut(_, (T) => Wo(T.fileName) !== i && !T.isAmbient) || ut(_, (T) => !!T.failedAliasResolution))) { + const T = pR( + (O) => O.textSpan.start, + dU(this.host.useCaseSensitiveFileNames) + ); + _?.forEach((O) => T.add(O)); + const C = s.getNoDtsResolutionProject(i), D = C.getLanguageService(), P = (n = D.getDefinitionAtPosition( + i, + o, + /*searchOtherFilesOnly*/ + !0, + /*stopAtAlias*/ + !1 + )) == null ? void 0 : n.filter((O) => Wo(O.fileName) !== i); + if (ut(P)) + for (const O of P) { + if (O.unverified) { + const j = h(O, s.getLanguageService().getProgram(), D.getProgram()); + if (ut(j)) { + for (const F of j) + T.add(F); + continue; + } + } + T.add(O); + } + else { + const O = _.filter((j) => Wo(j.fileName) !== i && j.isAmbient); + for (const j of ut(O) ? O : g()) { + const F = d(j.fileName, i, C); + if (!F) continue; + const V = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + F, + C.currentDirectory, + C.directoryStructureHost, + /*deferredDeleteOk*/ + !1 + ); + if (!V) continue; + C.containsScriptInfo(V) || (C.addRoot(V), C.updateGraph()); + const L = D.getProgram(), $ = E.checkDefined(L.getSourceFile(F)); + for (const U of S(j.name, $, L)) + T.add(U); + } + } + _ = ts(T.values()); + } + return _ = _.filter((T) => !T.isAmbient && !T.failedAliasResolution), this.mapDefinitionInfo(_, s); + function d(T, C, D) { + var P, O, j; + const F = E5(T); + if (F && T.lastIndexOf(zg) === F.topLevelNodeModulesIndex) { + const V = T.substring(0, F.packageRootIndex), L = (P = s.getModuleResolutionCache()) == null ? void 0 : P.getPackageJsonInfoCache(), $ = s.getCompilationSettings(), U = TD(Xi(V + "/package.json", s.getCurrentDirectory()), SD(L, s, $)); + if (!U) return; + const G = Bz( + U, + { + moduleResolution: 2 + /* Node10 */ + }, + s, + s.getModuleResolutionCache() + ), ce = T.substring( + F.topLevelPackageNameIndex + 1, + F.packageRootIndex + ), K = xD(PA(ce)), X = s.toPath(T); + if (G && ut(G, (Z) => s.toPath(Z) === X)) + return (O = D.resolutionCache.resolveSingleModuleNameWithoutWatching(K, C).resolvedModule) == null ? void 0 : O.resolvedFileName; + { + const Z = T.substring(F.packageRootIndex + 1), oe = `${K}/${Gu(Z)}`; + return (j = D.resolutionCache.resolveSingleModuleNameWithoutWatching(oe, C).resolvedModule) == null ? void 0 : j.resolvedFileName; + } + } + } + function g() { + const T = s.getLanguageService(), C = T.getProgram(), D = h_(C.getSourceFile(i), o); + return (Ga(D) || Re(D)) && go(D.parent) && JK(D, (P) => { + var O; + if (P === D) return; + const j = (O = T.getDefinitionAtPosition( + i, + P.getStart(), + /*searchOtherFilesOnly*/ + !0, + /*stopAtAlias*/ + !1 + )) == null ? void 0 : O.filter((F) => Wo(F.fileName) !== i && F.isAmbient).map((F) => ({ + fileName: F.fileName, + name: Ip(D) + })); + if (ut(j)) + return j; + }) || al; + } + function h(T, C, D) { + var P; + const O = D.getSourceFile(T.fileName); + if (!O) + return; + const j = h_(C.getSourceFile(i), o), F = C.getTypeChecker().getSymbolAtLocation(j), V = F && Jo( + F, + 276 + /* ImportSpecifier */ + ); + if (!V) return; + const L = ((P = V.propertyName) == null ? void 0 : P.text) || V.name.text; + return S(L, O, D); + } + function S(T, C, D) { + const P = yo.Core.getTopMostDeclarationNamesInFile(T, C); + return Ii(P, (O) => { + const j = D.getTypeChecker().getSymbolAtLocation(O), F = p4(O); + if (j && F) + return b6.createDefinitionInfo( + F, + D.getTypeChecker(), + j, + F, + /*unverified*/ + !0 + ); + }); + } + } + getEmitOutput(t) { + const { file: n, project: i } = this.getFileAndProject(t); + if (!i.shouldEmitFile(i.getScriptInfo(n))) + return { emitSkipped: !0, outputFiles: [], diagnostics: [] }; + const s = i.getLanguageService().getEmitOutput(n); + return t.richResponse ? { + ...s, + diagnostics: t.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(s.diagnostics) : s.diagnostics.map((o) => i8( + o, + /*includeFileName*/ + !0 + )) + } : s; + } + mapJSDocTagInfo(t, n, i) { + return t ? t.map((s) => { + var o; + return { + ...s, + text: i ? this.mapDisplayParts(s.text, n) : (o = s.text) == null ? void 0 : o.map((c) => c.text).join("") + }; + }) : []; + } + mapDisplayParts(t, n) { + return t ? t.map( + (i) => i.kind !== "linkName" ? i : { + ...i, + target: this.toFileSpan(i.target.fileName, i.target.textSpan, n) + } + ) : []; + } + mapSignatureHelpItems(t, n, i) { + return t.map((s) => ({ + ...s, + documentation: this.mapDisplayParts(s.documentation, n), + parameters: s.parameters.map((o) => ({ ...o, documentation: this.mapDisplayParts(o.documentation, n) })), + tags: this.mapJSDocTagInfo(s.tags, n, i) + })); + } + mapDefinitionInfo(t, n) { + return t.map((i) => ({ ...this.toFileSpanWithContext(i.fileName, i.textSpan, i.contextSpan, n), ...i.unverified && { unverified: i.unverified } })); + } + /* + * When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in + * the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols. + * This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a + * set of additional fields, and does the reverse for VS (store the .d.ts location where + * it used to be and stores the .ts location in the additional fields). + */ + static mapToOriginalLocation(t) { + return t.originalFileName ? (E.assert(t.originalTextSpan !== void 0, "originalTextSpan should be present if originalFileName is"), { + ...t, + fileName: t.originalFileName, + textSpan: t.originalTextSpan, + targetFileName: t.fileName, + targetTextSpan: t.textSpan, + contextSpan: t.originalContextSpan, + targetContextSpan: t.contextSpan + }) : t; + } + toFileSpan(t, n, i) { + const s = i.getLanguageService(), o = s.toLineColumnOffset(t, n.start), c = s.toLineColumnOffset(t, wc(n)); + return { + file: t, + start: { line: o.line + 1, offset: o.character + 1 }, + end: { line: c.line + 1, offset: c.character + 1 } + }; + } + toFileSpanWithContext(t, n, i, s) { + const o = this.toFileSpan(t, n, s), c = i && this.toFileSpan(t, i, s); + return c ? { ...o, contextStart: c.start, contextEnd: c.end } : o; + } + getTypeDefinition(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getPositionInFile(t, n), o = this.mapDefinitionInfoLocations(i.getLanguageService().getTypeDefinitionAtPosition(n, s) || al, i); + return this.mapDefinitionInfo(o, i); + } + mapImplementationLocations(t, n) { + return t.map((i) => { + const s = wwe(i, n); + return s ? { + ...s, + kind: i.kind, + displayParts: i.displayParts + } : i; + }); + } + getImplementation(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = this.mapImplementationLocations(s.getLanguageService().getImplementationAtPosition(i, o) || al, s); + return n ? c.map(({ fileName: _, textSpan: u, contextSpan: d }) => this.toFileSpanWithContext(_, u, d, s)) : c.map(fX.mapToOriginalLocation); + } + getSyntacticDiagnosticsSync(t) { + const { configFile: n } = this.getConfigFileAndProject(t); + return n ? al : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !1, + (i, s) => i.getLanguageService().getSyntacticDiagnostics(s), + !!t.includeLinePosition + ); + } + getSemanticDiagnosticsSync(t) { + const { configFile: n, project: i } = this.getConfigFileAndProject(t); + return n ? this.getConfigFileDiagnostics(n, i, !!t.includeLinePosition) : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !0, + (s, o) => s.getLanguageService().getSemanticDiagnostics(o).filter((c) => !!c.file), + !!t.includeLinePosition + ); + } + getSuggestionDiagnosticsSync(t) { + const { configFile: n } = this.getConfigFileAndProject(t); + return n ? al : this.getDiagnosticsWorker( + t, + /*isSemantic*/ + !0, + (i, s) => i.getLanguageService().getSuggestionDiagnostics(s), + !!t.includeLinePosition + ); + } + getJsxClosingTag(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = i.getJsxClosingTagAtPosition(n, s); + return o === void 0 ? void 0 : { newText: o.newText, caretOffset: 0 }; + } + getLinkedEditingRange(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = i.getLinkedEditingRangeAtPosition(n, s), c = this.projectService.getScriptInfoForNormalizedPath(n); + if (!(c === void 0 || o === void 0)) + return fZe(o, c); + } + getDocumentHighlights(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.getPositionInFile(t, i), c = s.getLanguageService().getDocumentHighlights(i, o, t.filesToSearch); + return c ? n ? c.map(({ fileName: _, highlightSpans: u }) => { + const d = s.getScriptInfo(_); + return { + file: _, + highlightSpans: u.map(({ textSpan: g, kind: h, contextSpan: S }) => ({ + ...ffe(g, S, d), + kind: h + })) + }; + }) : c : al; + } + provideInlayHints(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.projectService.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().provideInlayHints(n, t, this.getPreferences(n)).map((c) => { + const { position: _, displayParts: u } = c; + return { + ...c, + position: s.positionToLineOffset(_), + displayParts: u?.map(({ text: d, span: g, file: h }) => { + if (g) { + E.assertIsDefined(h, "Target file should be defined together with its span."); + const S = this.projectService.getScriptInfo(h); + return { + text: d, + span: { + start: S.positionToLineOffset(g.start), + end: S.positionToLineOffset(g.start + g.length), + file: h + } + }; + } else + return { text: d }; + }) + }; + }); + } + mapCode(t) { + var n; + const i = this.getHostFormatOptions(), s = this.getHostPreferences(), { file: o, languageService: c } = this.getFileAndLanguageServiceForSyntacticOperation(t), _ = this.projectService.getScriptInfoForNormalizedPath(o), u = (n = t.mapping.focusLocations) == null ? void 0 : n.map((g) => g.map((h) => { + const S = _.lineOffsetToPosition(h.start.line, h.start.offset), T = _.lineOffsetToPosition(h.end.line, h.end.offset); + return { + start: S, + length: T - S + }; + })), d = c.mapCode(o, t.mapping.contents, u, i, s); + return this.mapTextChangesToCodeEdits(d); + } + setCompilerOptionsForInferredProjects(t) { + this.projectService.setCompilerOptionsForInferredProjects(t.options, t.projectRootPath); + } + getProjectInfo(t) { + return this.getProjectInfoWorker( + t.file, + t.projectFileName, + t.needFileNameList, + /*excludeConfigFiles*/ + !1 + ); + } + getProjectInfoWorker(t, n, i, s) { + const { project: o } = this.getFileAndProjectWorker(t, n); + return fp(o), { + configFileName: o.getProjectName(), + languageServiceDisabled: !o.languageServiceEnabled, + fileNames: i ? o.getFileNames( + /*excludeFilesFromExternalLibraries*/ + !1, + s + ) : void 0 + }; + } + getRenameInfo(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getPositionInFile(t, n), o = this.getPreferences(n); + return i.getLanguageService().getRenameInfo(n, s, o); + } + getProjects(t, n, i) { + let s, o; + if (t.projectFileName) { + const c = this.getProject(t.projectFileName); + c && (s = [c]); + } else { + const c = n ? this.projectService.getScriptInfoEnsuringProjectsUptoDate(t.file) : this.projectService.getScriptInfo(t.file); + if (c) + n || this.projectService.ensureDefaultProjectForFile(c); + else return i ? al : (this.projectService.logErrorForScriptInfoNotFound(t.file), Ph.ThrowNoProject()); + s = c.containingProjects, o = this.projectService.getSymlinkedProjects(c); + } + return s = Ln(s, (c) => c.languageServiceEnabled && !c.isOrphan()), !i && (!s || !s.length) && !o ? (this.projectService.logErrorForScriptInfoNotFound(t.file ?? t.projectFileName), Ph.ThrowNoProject()) : o ? { projects: s, symLinkedProjects: o } : s; + } + getDefaultProject(t) { + if (t.projectFileName) { + const i = this.getProject(t.projectFileName); + if (i) + return i; + if (!t.file) + return Ph.ThrowNoProject(); + } + return this.projectService.getScriptInfo(t.file).getDefaultProject(); + } + getRenameLocations(t, n) { + const i = Wo(t.file), s = this.getPositionInFile(t, i), o = this.getProjects(t), c = this.getDefaultProject(t), _ = this.getPreferences(i), u = this.mapRenameInfo( + c.getLanguageService().getRenameInfo(i, s, _), + E.checkDefined(this.projectService.getScriptInfo(i)) + ); + if (!u.canRename) return n ? { info: u, locs: [] } : []; + const d = iZe( + o, + c, + { fileName: t.file, pos: s }, + !!t.findInStrings, + !!t.findInComments, + _, + this.host.useCaseSensitiveFileNames + ); + return n ? { info: u, locs: this.toSpanGroups(d) } : d; + } + mapRenameInfo(t, n) { + if (t.canRename) { + const { canRename: i, fileToRename: s, displayName: o, fullDisplayName: c, kind: _, kindModifiers: u, triggerSpan: d } = t; + return { canRename: i, fileToRename: s, displayName: o, fullDisplayName: c, kind: _, kindModifiers: u, triggerSpan: eg(d, n) }; + } else + return t; + } + toSpanGroups(t) { + const n = /* @__PURE__ */ new Map(); + for (const { fileName: i, textSpan: s, contextSpan: o, originalContextSpan: c, originalTextSpan: _, originalFileName: u, ...d } of t) { + let g = n.get(i); + g || n.set(i, g = { file: i, locs: [] }); + const h = E.checkDefined(this.projectService.getScriptInfo(i)); + g.locs.push({ ...ffe(s, o, h), ...d }); + } + return ts(n.values()); + } + getReferences(t, n) { + const i = Wo(t.file), s = this.getProjects(t), o = this.getPositionInFile(t, i), c = aZe( + s, + this.getDefaultProject(t), + { fileName: t.file, pos: o }, + this.host.useCaseSensitiveFileNames, + this.logger + ); + if (!n) return c; + const _ = this.getPreferences(i), u = this.getDefaultProject(t), d = u.getScriptInfoForNormalizedPath(i), g = u.getLanguageService().getQuickInfoAtPosition(i, o), h = g ? PN(g.displayParts) : "", S = g && g.textSpan, T = S ? d.positionToLineOffset(S.start).offset : 0, C = S ? d.getSnapshot().getText(S.start, wc(S)) : ""; + return { refs: Xs(c, (P) => P.references.map((O) => Owe(this.projectService, O, _))), symbolName: C, symbolStartOffset: T, symbolDisplayString: h }; + } + getFileReferences(t, n) { + const i = this.getProjects(t), s = t.file, o = this.getPreferences(Wo(s)), c = [], _ = aG(this.host.useCaseSensitiveFileNames); + return _fe( + i, + /*path*/ + void 0, + (d) => { + if (d.getCancellationToken().isCancellationRequested()) return; + const g = d.getLanguageService().getFileReferences(s); + if (g) + for (const h of g) + _.has(h) || (c.push(h), _.add(h)); + } + ), n ? { + refs: c.map((d) => Owe(this.projectService, d, o)), + symbolName: `"${t.file}"` + } : c; + } + /** + * @param fileName is the name of the file to be opened + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + */ + openClientFile(t, n, i, s) { + this.projectService.openClientFileWithNormalizedPath( + t, + n, + i, + /*hasMixedContent*/ + !1, + s + ); + } + getPosition(t, n) { + return t.position !== void 0 ? t.position : n.lineOffsetToPosition(t.line, t.offset); + } + getPositionInFile(t, n) { + const i = this.projectService.getScriptInfoForNormalizedPath(n); + return this.getPosition(t, i); + } + getFileAndProject(t) { + return this.getFileAndProjectWorker(t.file, t.projectFileName); + } + getFileAndLanguageServiceForSyntacticOperation(t) { + const { file: n, project: i } = this.getFileAndProject(t); + return { + file: n, + languageService: i.getLanguageService( + /*ensureSynchronized*/ + !1 + ) + }; + } + getFileAndProjectWorker(t, n) { + const i = Wo(t), s = this.getProject(n) || this.projectService.ensureDefaultProjectForFile(i); + return { file: i, project: s }; + } + getOutliningSpans(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getOutliningSpans(i); + if (n) { + const c = this.projectService.getScriptInfoForNormalizedPath(i); + return o.map((_) => ({ + textSpan: eg(_.textSpan, c), + hintSpan: eg(_.hintSpan, c), + bannerText: _.bannerText, + autoCollapse: _.autoCollapse, + kind: _.kind + })); + } else + return o; + } + getTodoComments(t) { + const { file: n, project: i } = this.getFileAndProject(t); + return i.getLanguageService().getTodoComments(n, t.descriptors); + } + getDocCommentTemplate(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getDocCommentTemplateAtPosition(n, s, this.getPreferences(n), this.getFormatOptions(n)); + } + getSpanOfEnclosingComment(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.onlyMultiLine, o = this.getPositionInFile(t, n); + return i.getSpanOfEnclosingComment(n, o, s); + } + getIndentation(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n), o = t.options ? k6(t.options) : this.getFormatOptions(n), c = i.getIndentationAtPosition(n, s, o); + return { position: s, indentation: c }; + } + getBreakpointStatement(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getBreakpointStatementAtPosition(n, s); + } + getNameOrDottedNameSpan(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.getNameOrDottedNameSpan(n, s, s); + } + isValidBraceCompletion(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.getPositionInFile(t, n); + return i.isValidBraceCompletionAtPosition(n, s, t.openingBrace.charCodeAt(0)); + } + getQuickInfoWorker(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = s.getLanguageService().getQuickInfoAtPosition(i, this.getPosition(t, o)); + if (!c) + return; + const _ = !!this.getPreferences(i).displayPartsForJSDoc; + if (n) { + const u = PN(c.displayParts); + return { + kind: c.kind, + kindModifiers: c.kindModifiers, + start: o.positionToLineOffset(c.textSpan.start), + end: o.positionToLineOffset(wc(c.textSpan)), + displayString: u, + documentation: _ ? this.mapDisplayParts(c.documentation, s) : PN(c.documentation), + tags: this.mapJSDocTagInfo(c.tags, s, _) + }; + } else + return _ ? c : { + ...c, + tags: this.mapJSDocTagInfo( + c.tags, + s, + /*richResponse*/ + !1 + ) + }; + } + getFormattingEditsForRange(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.projectService.getScriptInfoForNormalizedPath(n), o = s.lineOffsetToPosition(t.line, t.offset), c = s.lineOffsetToPosition(t.endLine, t.endOffset), _ = i.getFormattingEditsForRange(n, o, c, this.getFormatOptions(n)); + if (_) + return _.map((u) => this.convertTextChangeToCodeEdit(u, s)); + } + getFormattingEditsForRangeFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? k6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsForRange(n, t.position, t.endPosition, s); + } + getFormattingEditsForDocumentFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? k6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsForDocument(n, s); + } + getFormattingEditsAfterKeystrokeFull(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = t.options ? k6(t.options) : this.getFormatOptions(n); + return i.getFormattingEditsAfterKeystroke(n, t.position, t.key, s); + } + getFormattingEditsAfterKeystroke(t) { + const { file: n, languageService: i } = this.getFileAndLanguageServiceForSyntacticOperation(t), s = this.projectService.getScriptInfoForNormalizedPath(n), o = s.lineOffsetToPosition(t.line, t.offset), c = this.getFormatOptions(n), _ = i.getFormattingEditsAfterKeystroke(n, o, t.key, c); + if (t.key === ` +` && (!_ || _.length === 0 || tZe(_, o))) { + const { lineText: u, absolutePosition: d } = s.textStorage.getAbsolutePositionAndLineText(t.line); + if (u && u.search("\\S") < 0) { + const g = i.getIndentationAtPosition(n, o, c); + let h = 0, S, T; + for (S = 0, T = u.length; S < T; S++) + if (u.charAt(S) === " ") + h++; + else if (u.charAt(S) === " ") + h += c.tabSize; + else + break; + if (g !== h) { + const C = d + S; + _.push({ + span: Mc(d, C), + newText: Hc.getIndentationString(g, c) + }); + } + } + } + if (_) + return _.map((u) => ({ + start: s.positionToLineOffset(u.span.start), + end: s.positionToLineOffset(wc(u.span)), + newText: u.newText ? u.newText : "" + })); + } + getCompletions(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getLanguageService().getCompletionsAtPosition( + i, + c, + { + ...Q_e(this.getPreferences(i)), + triggerCharacter: t.triggerCharacter, + triggerKind: t.triggerKind, + includeExternalModuleExports: t.includeExternalModuleExports, + includeInsertTextCompletions: t.includeInsertTextCompletions + }, + s.projectService.getFormatCodeOptions(i) + ); + if (_ === void 0) return; + if (n === "completions-full") return _; + const u = t.prefix || "", d = Ii(_.entries, (h) => { + if (_.isMemberCompletion || zi(h.name.toLowerCase(), u.toLowerCase())) { + const { + name: S, + kind: T, + kindModifiers: C, + sortText: D, + insertText: P, + filterText: O, + replacementSpan: j, + hasAction: F, + source: V, + sourceDisplay: L, + labelDetails: $, + isSnippet: U, + isRecommended: G, + isPackageJsonImport: ce, + isImportStatementCompletion: K, + data: X + } = h, Z = j ? eg(j, o) : void 0; + return { + name: S, + kind: T, + kindModifiers: C, + sortText: D, + insertText: P, + filterText: O, + replacementSpan: Z, + isSnippet: U, + hasAction: F || void 0, + source: V, + sourceDisplay: L, + labelDetails: $, + isRecommended: G, + isPackageJsonImport: ce, + isImportStatementCompletion: K, + data: X + }; + } + }); + return n === "completions" ? (_.metadata && (d.metadata = _.metadata), d) : { + ..._, + optionalReplacementSpan: _.optionalReplacementSpan && eg(_.optionalReplacementSpan, o), + entries: d + }; + } + getCompletionEntryDetails(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.projectService.getFormatCodeOptions(i), u = !!this.getPreferences(i).displayPartsForJSDoc, d = Ii(t.entryNames, (g) => { + const { name: h, source: S, data: T } = typeof g == "string" ? { name: g, source: void 0, data: void 0 } : g; + return s.getLanguageService().getCompletionEntryDetails(i, c, h, _, S, this.getPreferences(i), T ? Is(T, hZe) : void 0); + }); + return n ? u ? d : d.map((g) => ({ ...g, tags: this.mapJSDocTagInfo( + g.tags, + s, + /*richResponse*/ + !1 + ) })) : d.map((g) => ({ + ...g, + codeActions: or(g.codeActions, (h) => this.mapCodeAction(h)), + documentation: this.mapDisplayParts(g.documentation, s), + tags: this.mapJSDocTagInfo(g.tags, s, u) + })); + } + getCompileOnSaveAffectedFileList(t) { + const n = this.getProjects( + t, + /*getScriptInfoEnsuringProjectsUptoDate*/ + !0, + /*ignoreNoProjectError*/ + !0 + ), i = this.projectService.getScriptInfo(t.file); + return i ? nZe( + i, + (s) => this.projectService.getScriptInfoForPath(s), + n, + (s, o) => { + if (!s.compileOnSaveEnabled || !s.languageServiceEnabled || s.isOrphan()) + return; + const c = s.getCompilationSettings(); + if (!(c.noEmit || Ol(o.fileName) && !eZe(c))) + return { + projectFileName: s.getProjectName(), + fileNames: s.getCompileOnSaveAffectedFileList(o), + projectUsesOutFile: !!c.outFile + }; + } + ) : al; + } + emitFile(t) { + const { file: n, project: i } = this.getFileAndProject(t); + if (i || Ph.ThrowNoProject(), !i.languageServiceEnabled) + return t.richResponse ? { emitSkipped: !0, diagnostics: [] } : !1; + const s = i.getScriptInfo(n), { emitSkipped: o, diagnostics: c } = i.emitFile(s, (_, u, d) => this.host.writeFile(_, u, d)); + return t.richResponse ? { + emitSkipped: o, + diagnostics: t.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(c) : c.map((_) => i8( + _, + /*includeFileName*/ + !0 + )) + } : !o; + } + getSignatureHelpItems(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getLanguageService().getSignatureHelpItems(i, c, t), u = !!this.getPreferences(i).displayPartsForJSDoc; + if (_ && n) { + const d = _.applicableSpan; + return { + ..._, + applicableSpan: { + start: o.positionToLineOffset(d.start), + end: o.positionToLineOffset(d.start + d.length) + }, + items: this.mapSignatureHelpItems(_.items, s, u) + }; + } else return u || !_ ? _ : { + ..._, + items: _.items.map((d) => ({ ...d, tags: this.mapJSDocTagInfo( + d.tags, + s, + /*richResponse*/ + !1 + ) })) + }; + } + toPendingErrorCheck(t) { + const n = Wo(t), i = this.projectService.tryGetDefaultProjectForFile(n); + return i && { fileName: n, project: i }; + } + getDiagnostics(t, n, i) { + this.suppressDiagnosticEvents || i.length > 0 && this.updateErrorCheck(t, i, n); + } + change(t) { + const n = this.projectService.getScriptInfo(t.file); + E.assert(!!n), n.textStorage.switchToScriptVersionCache(); + const i = n.lineOffsetToPosition(t.line, t.offset), s = n.lineOffsetToPosition(t.endLine, t.endOffset); + i >= 0 && (this.changeSeq++, this.projectService.applyChangesToFile( + n, + vX({ + span: { start: i, length: s - i }, + newText: t.insertString + // TODO: GH#18217 + }) + )); + } + reload(t, n) { + const i = Wo(t.file), s = t.tmpfile === void 0 ? void 0 : Wo(t.tmpfile), o = this.projectService.getScriptInfoForNormalizedPath(i); + o && (this.changeSeq++, o.reloadFromFile(s) && this.doOutput( + /*info*/ + void 0, + "reload", + n, + /*success*/ + !0 + )); + } + saveToTmp(t, n) { + const i = this.projectService.getScriptInfo(t); + i && i.saveTo(n); + } + closeClientFile(t) { + if (!t) + return; + const n = Cs(t); + this.projectService.closeClientFile(n); + } + mapLocationNavigationBarItems(t, n) { + return or(t, (i) => ({ + text: i.text, + kind: i.kind, + kindModifiers: i.kindModifiers, + spans: i.spans.map((s) => eg(s, n)), + childItems: this.mapLocationNavigationBarItems(i.childItems, n), + indent: i.indent + })); + } + getNavigationBarItems(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getNavigationBarItems(i); + return o ? n ? this.mapLocationNavigationBarItems(o, this.projectService.getScriptInfoForNormalizedPath(i)) : o : void 0; + } + toLocationNavigationTree(t, n) { + return { + text: t.text, + kind: t.kind, + kindModifiers: t.kindModifiers, + spans: t.spans.map((i) => eg(i, n)), + nameSpan: t.nameSpan && eg(t.nameSpan, n), + childItems: or(t.childItems, (i) => this.toLocationNavigationTree(i, n)) + }; + } + getNavigationTree(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = s.getNavigationTree(i); + return o ? n ? this.toLocationNavigationTree(o, this.projectService.getScriptInfoForNormalizedPath(i)) : o : void 0; + } + getNavigateToItems(t, n) { + const i = this.getFullNavigateToItems(t); + return n ? Xs( + i, + ({ project: s, navigateToItems: o }) => o.map((c) => { + const _ = s.getScriptInfo(c.fileName), u = { + name: c.name, + kind: c.kind, + kindModifiers: c.kindModifiers, + isCaseSensitive: c.isCaseSensitive, + matchKind: c.matchKind, + file: c.fileName, + start: _.positionToLineOffset(c.textSpan.start), + end: _.positionToLineOffset(wc(c.textSpan)) + }; + return c.kindModifiers && c.kindModifiers !== "" && (u.kindModifiers = c.kindModifiers), c.containerName && c.containerName.length > 0 && (u.containerName = c.containerName), c.containerKind && c.containerKind.length > 0 && (u.containerKind = c.containerKind), u; + }) + ) : Xs(i, ({ navigateToItems: s }) => s); + } + getFullNavigateToItems(t) { + const { currentFileOnly: n, searchValue: i, maxResultCount: s, projectFileName: o } = t; + if (n) { + E.assertIsDefined(t.file); + const { file: S, project: T } = this.getFileAndProject(t); + return [{ project: T, navigateToItems: T.getLanguageService().getNavigateToItems(i, s, S) }]; + } + const c = this.getHostPreferences(), _ = [], u = /* @__PURE__ */ new Map(); + if (!t.file && !o) + this.projectService.loadAncestorProjectTree(), this.projectService.forEachEnabledProject((S) => d(S)); + else { + const S = this.getProjects(t); + _fe( + S, + /*path*/ + void 0, + (T) => d(T) + ); + } + return _; + function d(S) { + const T = S.getLanguageService().getNavigateToItems( + i, + s, + /*fileName*/ + void 0, + /*excludeDts*/ + S.isNonTsProject(), + /*excludeLibFiles*/ + c.excludeLibrarySymbolsInNavTo + ), C = Ln(T, (D) => g(D) && !oG(mP(D), S)); + C.length && _.push({ project: S, navigateToItems: C }); + } + function g(S) { + const T = S.name; + if (!u.has(T)) + return u.set(T, [S]), !0; + const C = u.get(T); + for (const D of C) + if (h(D, S)) + return !1; + return C.push(S), !0; + } + function h(S, T) { + return S === T ? !0 : !S || !T ? !1 : S.containerKind === T.containerKind && S.containerName === T.containerName && S.fileName === T.fileName && S.isCaseSensitive === T.isCaseSensitive && S.kind === T.kind && S.kindModifiers === T.kindModifiers && S.matchKind === T.matchKind && S.name === T.name && S.textSpan.start === T.textSpan.start && S.textSpan.length === T.textSpan.length; + } + } + getSupportedCodeFixes(t) { + if (!t) return xq(); + if (t.file) { + const { file: i, project: s } = this.getFileAndProject(t); + return s.getLanguageService().getSupportedCodeFixes(i); + } + const n = this.getProject(t.projectFileName); + return n || Ph.ThrowNoProject(), n.getLanguageService().getSupportedCodeFixes(); + } + isLocation(t) { + return t.line !== void 0; + } + extractPositionOrRange(t, n) { + let i, s; + return this.isLocation(t) ? i = o(t) : s = this.getRange(t, n), E.checkDefined(i === void 0 ? s : i); + function o(c) { + return c.position !== void 0 ? c.position : n.lineOffsetToPosition(c.line, c.offset); + } + } + getRange(t, n) { + const { startPosition: i, endPosition: s } = this.getStartAndEndPosition(t, n); + return { pos: i, end: s }; + } + getApplicableRefactors(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = i.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().getApplicableRefactors(n, this.extractPositionOrRange(t, s), this.getPreferences(n), t.triggerReason, t.kind, t.includeInteractiveActions).map((c) => ({ ...c, actions: c.actions.map((_) => ({ ..._, range: _.range ? { start: C6({ line: _.range.start.line, character: _.range.start.offset }), end: C6({ line: _.range.end.line, character: _.range.end.offset }) } : void 0 })) })); + } + getEditsForRefactor(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = s.getScriptInfoForNormalizedPath(i), c = s.getLanguageService().getEditsForRefactor( + i, + this.getFormatOptions(i), + this.extractPositionOrRange(t, o), + t.refactor, + t.action, + this.getPreferences(i), + t.interactiveRefactorArguments + ); + if (c === void 0) + return { + edits: [] + }; + if (n) { + const { renameFilename: _, renameLocation: u, edits: d } = c; + let g; + if (_ !== void 0 && u !== void 0) { + const h = s.getScriptInfoForNormalizedPath(Wo(_)); + g = pfe(Rx(h.getSnapshot()), _, u, d); + } + return { + renameLocation: g, + renameFilename: _, + edits: this.mapTextChangesToCodeEdits(d), + notApplicableReason: c.notApplicableReason + }; + } + return c; + } + getMoveToRefactoringFileSuggestions(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = i.getScriptInfoForNormalizedPath(n); + return i.getLanguageService().getMoveToRefactoringFileSuggestions(n, this.extractPositionOrRange(t, s), this.getPreferences(n)); + } + getPasteEdits(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = t.copiedFrom ? { file: t.copiedFrom.file, range: t.copiedFrom.spans.map((c) => this.getRange({ file: t.copiedFrom.file, startLine: c.start.line, startOffset: c.start.offset, endLine: c.end.line, endOffset: c.end.offset }, i.getScriptInfoForNormalizedPath(Wo(t.copiedFrom.file)))) } : void 0, o = i.getLanguageService().getPasteEdits( + { + targetFile: n, + pastedText: t.pastedText, + pasteLocations: t.pasteLocations.map((c) => this.getRange({ file: n, startLine: c.start.line, startOffset: c.start.offset, endLine: c.end.line, endOffset: c.end.offset }, i.getScriptInfoForNormalizedPath(n))), + copiedFrom: s, + preferences: this.getPreferences(n) + }, + this.getFormatOptions(n) + ); + return o && this.mapPasteEditsAction(o); + } + organizeImports(t, n) { + E.assert(t.scope.type === "file"); + const { file: i, project: s } = this.getFileAndProject(t.scope.args), o = s.getLanguageService().organizeImports( + { + fileName: i, + mode: t.mode ?? (t.skipDestructiveCodeActions ? "SortAndCombine" : void 0), + type: "file" + }, + this.getFormatOptions(i), + this.getPreferences(i) + ); + return n ? this.mapTextChangesToCodeEdits(o) : o; + } + getEditsForFileRename(t, n) { + const i = Wo(t.oldFilePath), s = Wo(t.newFilePath), o = this.getHostFormatOptions(), c = this.getHostPreferences(), _ = /* @__PURE__ */ new Set(), u = []; + return this.projectService.loadAncestorProjectTree(), this.projectService.forEachEnabledProject((d) => { + const g = d.getLanguageService().getEditsForFileRename(i, s, o, c), h = []; + for (const S of g) + _.has(S.fileName) || (u.push(S), h.push(S.fileName)); + for (const S of h) + _.add(S); + }), n ? u.map((d) => this.mapTextChangeToCodeEdit(d)) : u; + } + getCodeFixes(t, n) { + const { file: i, project: s } = this.getFileAndProject(t), o = s.getScriptInfoForNormalizedPath(i), { startPosition: c, endPosition: _ } = this.getStartAndEndPosition(t, o); + let u; + try { + u = s.getLanguageService().getCodeFixesAtPosition(i, c, _, t.errorCodes, this.getFormatOptions(i), this.getPreferences(i)); + } catch (d) { + const g = s.getLanguageService(), h = [ + ...g.getSyntacticDiagnostics(i), + ...g.getSemanticDiagnostics(i), + ...g.getSuggestionDiagnostics(i) + ].map( + (T) => Tw(c, _ - c, T.start, T.length) && T.code + ), S = t.errorCodes.find((T) => !h.includes(T)); + throw S !== void 0 && (d.message = `BADCLIENT: Bad error code, ${S} not found in range ${c}..${_} (found: ${h.join(", ")}); could have caused this error: +${d.message}`), d; + } + return n ? u.map((d) => this.mapCodeFixAction(d)) : u; + } + getCombinedCodeFix({ scope: t, fixId: n }, i) { + E.assert(t.type === "file"); + const { file: s, project: o } = this.getFileAndProject(t.args), c = o.getLanguageService().getCombinedCodeFix({ type: "file", fileName: s }, n, this.getFormatOptions(s), this.getPreferences(s)); + return i ? { changes: this.mapTextChangesToCodeEdits(c.changes), commands: c.commands } : c; + } + applyCodeActionCommand(t) { + const n = t.command; + for (const i of vT(n)) { + const { file: s, project: o } = this.getFileAndProject(i); + o.getLanguageService().applyCodeActionCommand(i, this.getFormatOptions(s)).then( + (c) => { + }, + (c) => { + } + ); + } + return {}; + } + getStartAndEndPosition(t, n) { + let i, s; + return t.startPosition !== void 0 ? i = t.startPosition : (i = n.lineOffsetToPosition(t.startLine, t.startOffset), t.startPosition = i), t.endPosition !== void 0 ? s = t.endPosition : (s = n.lineOffsetToPosition(t.endLine, t.endOffset), t.endPosition = s), { startPosition: i, endPosition: s }; + } + mapCodeAction({ description: t, changes: n, commands: i }) { + return { description: t, changes: this.mapTextChangesToCodeEdits(n), commands: i }; + } + mapCodeFixAction({ fixName: t, description: n, changes: i, commands: s, fixId: o, fixAllDescription: c }) { + return { fixName: t, description: n, changes: this.mapTextChangesToCodeEdits(i), commands: s, fixId: o, fixAllDescription: c }; + } + mapPasteEditsAction({ edits: t, fixId: n }) { + return { edits: this.mapTextChangesToCodeEdits(t), fixId: n }; + } + mapTextChangesToCodeEdits(t) { + return t.map((n) => this.mapTextChangeToCodeEdit(n)); + } + mapTextChangeToCodeEdit(t) { + const n = this.projectService.getScriptInfoOrConfig(t.fileName); + return !!t.isNewFile == !!n && (n || this.projectService.logErrorForScriptInfoNotFound(t.fileName), E.fail("Expected isNewFile for (only) new files. " + JSON.stringify({ isNewFile: !!t.isNewFile, hasScriptInfo: !!n }))), n ? { fileName: t.fileName, textChanges: t.textChanges.map((i) => _Ze(i, n)) } : dZe(t); + } + convertTextChangeToCodeEdit(t, n) { + return { + start: n.positionToLineOffset(t.span.start), + end: n.positionToLineOffset(t.span.start + t.span.length), + newText: t.newText ? t.newText : "" + }; + } + getBraceMatching(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getPosition(t, o), _ = s.getBraceMatchingAtPosition(i, c); + return _ ? n ? _.map((u) => eg(u, o)) : _ : void 0; + } + getDiagnosticsForProject(t, n, i) { + if (this.suppressDiagnosticEvents) + return; + const { fileNames: s, languageServiceDisabled: o } = this.getProjectInfoWorker( + i, + /*projectFileName*/ + void 0, + /*needFileNameList*/ + !0, + /*excludeConfigFiles*/ + !0 + ); + if (o) + return; + const c = s.filter((D) => !D.includes("lib.d.ts")); + if (c.length === 0) + return; + const _ = [], u = [], d = [], g = [], h = Wo(i), S = this.projectService.ensureDefaultProjectForFile(h); + for (const D of c) + this.getCanonicalFileName(D) === this.getCanonicalFileName(i) ? _.push(D) : this.projectService.getScriptInfo(D).isScriptOpen() ? u.push(D) : Ol(D) ? g.push(D) : d.push(D); + const C = [..._, ...u, ...d, ...g].map((D) => ({ fileName: D, project: S })); + this.updateErrorCheck( + t, + C, + n, + /*requireOpen*/ + !1 + ); + } + configurePlugin(t) { + this.projectService.configurePlugin(t); + } + getSmartSelectionRange(t, n) { + const { locations: i } = t, { file: s, languageService: o } = this.getFileAndLanguageServiceForSyntacticOperation(t), c = E.checkDefined(this.projectService.getScriptInfo(s)); + return or(i, (_) => { + const u = this.getPosition(_, c), d = o.getSmartSelectionRange(s, u); + return n ? this.mapSelectionRange(d, c) : d; + }); + } + toggleLineComment(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfo(i), c = this.getRange(t, o), _ = s.toggleLineComment(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((d) => this.convertTextChangeToCodeEdit(d, u)); + } + return _; + } + toggleMultilineComment(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.toggleMultilineComment(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((d) => this.convertTextChangeToCodeEdit(d, u)); + } + return _; + } + commentSelection(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.commentSelection(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((d) => this.convertTextChangeToCodeEdit(d, u)); + } + return _; + } + uncommentSelection(t, n) { + const { file: i, languageService: s } = this.getFileAndLanguageServiceForSyntacticOperation(t), o = this.projectService.getScriptInfoForNormalizedPath(i), c = this.getRange(t, o), _ = s.uncommentSelection(i, c); + if (n) { + const u = this.projectService.getScriptInfoForNormalizedPath(i); + return _.map((d) => this.convertTextChangeToCodeEdit(d, u)); + } + return _; + } + mapSelectionRange(t, n) { + const i = { + textSpan: eg(t.textSpan, n) + }; + return t.parent && (i.parent = this.mapSelectionRange(t.parent, n)), i; + } + getScriptInfoFromProjectService(t) { + const n = Wo(t), i = this.projectService.getScriptInfoForNormalizedPath(n); + return i || (this.projectService.logErrorForScriptInfoNotFound(n), Ph.ThrowNoProject()); + } + toProtocolCallHierarchyItem(t) { + const n = this.getScriptInfoFromProjectService(t.file); + return { + name: t.name, + kind: t.kind, + kindModifiers: t.kindModifiers, + file: t.file, + containerName: t.containerName, + span: eg(t.span, n), + selectionSpan: eg(t.selectionSpan, n) + }; + } + toProtocolCallHierarchyIncomingCall(t) { + const n = this.getScriptInfoFromProjectService(t.from.file); + return { + from: this.toProtocolCallHierarchyItem(t.from), + fromSpans: t.fromSpans.map((i) => eg(i, n)) + }; + } + toProtocolCallHierarchyOutgoingCall(t, n) { + return { + to: this.toProtocolCallHierarchyItem(t.to), + fromSpans: t.fromSpans.map((i) => eg(i, n)) + }; + } + prepareCallHierarchy(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.projectService.getScriptInfoForNormalizedPath(n); + if (s) { + const o = this.getPosition(t, s), c = i.getLanguageService().prepareCallHierarchy(n, o); + return c && OU(c, (_) => this.toProtocolCallHierarchyItem(_)); + } + } + provideCallHierarchyIncomingCalls(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getScriptInfoFromProjectService(n); + return i.getLanguageService().provideCallHierarchyIncomingCalls(n, this.getPosition(t, s)).map((c) => this.toProtocolCallHierarchyIncomingCall(c)); + } + provideCallHierarchyOutgoingCalls(t) { + const { file: n, project: i } = this.getFileAndProject(t), s = this.getScriptInfoFromProjectService(n); + return i.getLanguageService().provideCallHierarchyOutgoingCalls(n, this.getPosition(t, s)).map((c) => this.toProtocolCallHierarchyOutgoingCall(c, s)); + } + getCanonicalFileName(t) { + const n = this.host.useCaseSensitiveFileNames ? t : sy(t); + return Cs(n); + } + exit() { + } + notRequired() { + return { responseRequired: !1 }; + } + requiredResponse(t) { + return { response: t, responseRequired: !0 }; + } + addProtocolHandler(t, n) { + if (this.handlers.has(t)) + throw new Error(`Protocol handler already exists for command "${t}"`); + this.handlers.set(t, n); + } + setCurrentRequest(t) { + E.assert(this.currentRequestId === void 0), this.currentRequestId = t, this.cancellationToken.setRequest(t); + } + resetCurrentRequest(t) { + E.assert(this.currentRequestId === t), this.currentRequestId = void 0, this.cancellationToken.resetRequest(t); + } + executeWithRequestId(t, n) { + try { + return this.setCurrentRequest(t), n(); + } finally { + this.resetCurrentRequest(t); + } + } + executeCommand(t) { + const n = this.handlers.get(t.command); + if (n) { + const i = this.executeWithRequestId(t.seq, () => n(t)); + return this.projectService.enableRequestedPlugins(), i; + } else + return this.logger.msg( + `Unrecognized JSON command:${dv(t)}`, + "Err" + /* Err */ + ), this.doOutput( + /*info*/ + void 0, + "unknown", + t.seq, + /*success*/ + !1, + `Unrecognized JSON command: ${t.command}` + ), { responseRequired: !1 }; + } + onMessage(t) { + var n, i, s, o, c, _, u, d, g, h, S; + this.gcTimer.scheduleCollect(), this.performanceData = void 0; + let T; + this.logger.hasLevel( + 2 + /* requestTime */ + ) && (T = this.hrtime(), this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`request:${zD(this.toStringMessage(t))}`)); + let C, D; + try { + C = this.parseMessage(t), D = C.arguments && C.arguments.file ? C.arguments : void 0, (n = rn) == null || n.instant(rn.Phase.Session, "request", { seq: C.seq, command: C.command }), (i = Vu) == null || i.logStartCommand("" + C.command, this.toStringMessage(t).substring(0, 100)), (s = rn) == null || s.push( + rn.Phase.Session, + "executeCommand", + { seq: C.seq, command: C.command }, + /*separateBeginAndEnd*/ + !0 + ); + const { response: P, responseRequired: O } = this.executeCommand(C); + if ((o = rn) == null || o.pop(), this.logger.hasLevel( + 2 + /* requestTime */ + )) { + const j = KYe(this.hrtime(T)).toFixed(4); + O ? this.logger.perftrc(`${C.seq}::${C.command}: elapsed time (in milliseconds) ${j}`) : this.logger.perftrc(`${C.seq}::${C.command}: async elapsed time (in milliseconds) ${j}`); + } + (c = Vu) == null || c.logStopCommand("" + C.command, "Success"), (_ = rn) == null || _.instant(rn.Phase.Session, "response", { seq: C.seq, command: C.command, success: !!P }), P ? this.doOutput( + P, + C.command, + C.seq, + /*success*/ + !0 + ) : O && this.doOutput( + /*info*/ + void 0, + C.command, + C.seq, + /*success*/ + !1, + "No content available." + ); + } catch (P) { + if ((u = rn) == null || u.popAll(), P instanceof AE) { + (d = Vu) == null || d.logStopCommand("" + (C && C.command), "Canceled: " + P), (g = rn) == null || g.instant(rn.Phase.Session, "commandCanceled", { seq: C?.seq, command: C?.command }), this.doOutput( + { canceled: !0 }, + C.command, + C.seq, + /*success*/ + !0 + ); + return; + } + this.logErrorWorker(P, this.toStringMessage(t), D), (h = Vu) == null || h.logStopCommand("" + (C && C.command), "Error: " + P), (S = rn) == null || S.instant(rn.Phase.Session, "commandError", { seq: C?.seq, command: C?.command, message: P.message }), this.doOutput( + /*info*/ + void 0, + C ? C.command : "unknown", + C ? C.seq : 0, + /*success*/ + !1, + "Error processing request. " + P.message + ` +` + P.stack + ); + } + } + parseMessage(t) { + return JSON.parse(t); + } + toStringMessage(t) { + return t; + } + getFormatOptions(t) { + return this.projectService.getFormatCodeOptions(t); + } + getPreferences(t) { + return this.projectService.getPreferences(t); + } + getHostFormatOptions() { + return this.projectService.getHostFormatCodeOptions(); + } + getHostPreferences() { + return this.projectService.getHostPreferences(); + } + }; + function eg(e, t) { + return { + start: t.positionToLineOffset(e.start), + end: t.positionToLineOffset(wc(e)) + }; + } + function ffe(e, t, n) { + const i = eg(e, n), s = t && eg(t, n); + return s ? { ...i, contextStart: s.start, contextEnd: s.end } : i; + } + function _Ze(e, t) { + return { start: Iwe(t, e.span.start), end: Iwe(t, wc(e.span)), newText: e.newText }; + } + function Iwe(e, t) { + return sfe(e) ? pZe(e.getLineAndCharacterOfPosition(t)) : e.positionToLineOffset(t); + } + function fZe(e, t) { + const n = e.ranges.map( + (i) => ({ + start: t.positionToLineOffset(i.start), + end: t.positionToLineOffset(i.start + i.length) + }) + ); + return e.wordPattern ? { ranges: n, wordPattern: e.wordPattern } : { ranges: n }; + } + function pZe(e) { + return { line: e.line + 1, offset: e.character + 1 }; + } + function dZe(e) { + E.assert(e.textChanges.length === 1); + const t = fa(e.textChanges); + return E.assert(t.span.start === 0 && t.span.length === 0), { fileName: e.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: t.newText }] }; + } + function pfe(e, t, n, i) { + const s = mZe(e, t, i), { line: o, character: c } = Vk(kT(s), n); + return { line: o + 1, offset: c + 1 }; + } + function mZe(e, t, n) { + for (const { fileName: i, textChanges: s } of n) + if (i === t) + for (let o = s.length - 1; o >= 0; o--) { + const { newText: c, span: { start: _, length: u } } = s[o]; + e = e.slice(0, _) + c + e.slice(_ + u); + } + return e; + } + function Owe(e, { fileName: t, textSpan: n, contextSpan: i, isWriteAccess: s, isDefinition: o }, { disableLineTextInReferences: c }) { + const _ = E.checkDefined(e.getScriptInfo(t)), u = ffe(n, i, _), d = c ? void 0 : gZe(_, u); + return { + file: t, + ...u, + lineText: d, + isWriteAccess: s, + isDefinition: o + }; + } + function gZe(e, t) { + const n = e.lineToTextSpan(t.start.line - 1); + return e.getSnapshot().getText(n.start, wc(n)).replace(/\r|\n/g, ""); + } + function hZe(e) { + return e === void 0 || e && typeof e == "object" && typeof e.exportName == "string" && (e.fileName === void 0 || typeof e.fileName == "string") && (e.ambientModuleName === void 0 || typeof e.ambientModuleName == "string" && (e.isPackageJsonImport === void 0 || typeof e.isPackageJsonImport == "boolean")); + } + var E6 = 4, dfe = /* @__PURE__ */ ((e) => (e[e.PreStart = 0] = "PreStart", e[e.Start = 1] = "Start", e[e.Entire = 2] = "Entire", e[e.Mid = 3] = "Mid", e[e.End = 4] = "End", e[e.PostEnd = 5] = "PostEnd", e))(dfe || {}), yZe = class { + constructor() { + this.goSubtree = !0, this.lineIndex = new s8(), this.endBranch = [], this.state = 2, this.initialText = "", this.trailingText = "", this.lineIndex.root = new D6(), this.startPath = [this.lineIndex.root], this.stack = [this.lineIndex.root]; + } + get done() { + return !1; + } + insertLines(e, t) { + t && (this.trailingText = ""), e ? e = this.initialText + e + this.trailingText : e = this.initialText + this.trailingText; + const i = s8.linesFromText(e).lines; + i.length > 1 && i[i.length - 1] === "" && i.pop(); + let s, o; + for (let _ = this.endBranch.length - 1; _ >= 0; _--) + this.endBranch[_].updateCounts(), this.endBranch[_].charCount() === 0 && (o = this.endBranch[_], _ > 0 ? s = this.endBranch[_ - 1] : s = this.branchNode); + o && s.remove(o); + const c = this.startPath[this.startPath.length - 1]; + if (i.length > 0) + if (c.text = i[0], i.length > 1) { + let _ = new Array(i.length - 1), u = c; + for (let h = 1; h < i.length; h++) + _[h - 1] = new yL(i[h]); + let d = this.startPath.length - 2; + for (; d >= 0; ) { + const h = this.startPath[d]; + _ = h.insertAt(u, _), d--, u = h; + } + let g = _.length; + for (; g > 0; ) { + const h = new D6(); + h.add(this.lineIndex.root), _ = h.insertAt(this.lineIndex.root, _), g = _.length, this.lineIndex.root = h; + } + this.lineIndex.root.updateCounts(); + } else + for (let _ = this.startPath.length - 2; _ >= 0; _--) + this.startPath[_].updateCounts(); + else { + this.startPath[this.startPath.length - 2].remove(c); + for (let u = this.startPath.length - 2; u >= 0; u--) + this.startPath[u].updateCounts(); + } + return this.lineIndex; + } + post(e, t, n) { + n === this.lineCollectionAtBranch && (this.state = 4), this.stack.pop(); + } + pre(e, t, n, i, s) { + const o = this.stack[this.stack.length - 1]; + this.state === 2 && s === 1 && (this.state = 1, this.branchNode = o, this.lineCollectionAtBranch = n); + let c; + function _(u) { + return u.isLeaf() ? new yL("") : new D6(); + } + switch (s) { + case 0: + this.goSubtree = !1, this.state !== 4 && o.add(n); + break; + case 1: + this.state === 4 ? this.goSubtree = !1 : (c = _(n), o.add(c), this.startPath.push(c)); + break; + case 2: + this.state !== 4 ? (c = _(n), o.add(c), this.startPath.push(c)) : n.isLeaf() || (c = _(n), o.add(c), this.endBranch.push(c)); + break; + case 3: + this.goSubtree = !1; + break; + case 4: + this.state !== 4 ? this.goSubtree = !1 : n.isLeaf() || (c = _(n), o.add(c), this.endBranch.push(c)); + break; + case 5: + this.goSubtree = !1, this.state !== 1 && o.add(n); + break; + } + this.goSubtree && this.stack.push(c); + } + // just gather text from the leaves + leaf(e, t, n) { + this.state === 1 ? this.initialText = n.text.substring(0, e) : this.state === 2 ? (this.initialText = n.text.substring(0, e), this.trailingText = n.text.substring(e + t)) : this.trailingText = n.text.substring(e + t); + } + }, vZe = class { + constructor(e, t, n) { + this.pos = e, this.deleteLen = t, this.insertedText = n; + } + getTextChangeRange() { + return xw(jl(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0); + } + }, cG = class mT { + constructor() { + this.changes = [], this.versions = new Array(mT.maxVersions), this.minVersion = 0, this.currentVersion = 0; + } + versionToIndex(t) { + if (!(t < this.minVersion || t > this.currentVersion)) + return t % mT.maxVersions; + } + currentVersionToIndex() { + return this.currentVersion % mT.maxVersions; + } + // REVIEW: can optimize by coalescing simple edits + edit(t, n, i) { + this.changes.push(new vZe(t, n, i)), (this.changes.length > mT.changeNumberThreshold || n > mT.changeLengthThreshold || i && i.length > mT.changeLengthThreshold) && this.getSnapshot(); + } + getSnapshot() { + return this._getSnapshot(); + } + _getSnapshot() { + let t = this.versions[this.currentVersionToIndex()]; + if (this.changes.length > 0) { + let n = t.index; + for (const i of this.changes) + n = n.edit(i.pos, i.deleteLen, i.insertedText); + t = new Fwe(this.currentVersion + 1, this, n, this.changes), this.currentVersion = t.version, this.versions[this.currentVersionToIndex()] = t, this.changes = [], this.currentVersion - this.minVersion >= mT.maxVersions && (this.minVersion = this.currentVersion - mT.maxVersions + 1); + } + return t; + } + getSnapshotVersion() { + return this._getSnapshot().version; + } + getAbsolutePositionAndLineText(t) { + return this._getSnapshot().index.lineNumberToInfo(t); + } + lineOffsetToPosition(t, n) { + return this._getSnapshot().index.absolutePositionOfStartOfLine(t) + (n - 1); + } + positionToLineOffset(t) { + return this._getSnapshot().index.positionToLineOffset(t); + } + lineToTextSpan(t) { + const n = this._getSnapshot().index, { lineText: i, absolutePosition: s } = n.lineNumberToInfo(t + 1), o = i !== void 0 ? i.length : n.absolutePositionOfStartOfLine(t + 2) - s; + return jl(s, o); + } + getTextChangesBetweenVersions(t, n) { + if (t < n) + if (t >= this.minVersion) { + const i = []; + for (let s = t + 1; s <= n; s++) { + const o = this.versions[this.versionToIndex(s)]; + for (const c of o.changesSincePreviousVersion) + i.push(c.getTextChangeRange()); + } + return hY(i); + } else + return; + else + return OI; + } + getLineCount() { + return this._getSnapshot().index.getLineCount(); + } + static fromString(t) { + const n = new mT(), i = new Fwe(0, n, new s8()); + n.versions[n.currentVersion] = i; + const s = s8.linesFromText(t); + return i.index.load(s.lines), n; + } + }; + cG.changeNumberThreshold = 8, cG.changeLengthThreshold = 256, cG.maxVersions = 8; + var lG = cG, Fwe = class x5e { + constructor(t, n, i, s = al) { + this.version = t, this.cache = n, this.index = i, this.changesSincePreviousVersion = s; + } + getText(t, n) { + return this.index.getText(t, n - t); + } + getLength() { + return this.index.getLength(); + } + getChangeRange(t) { + if (t instanceof x5e && this.cache === t.cache) + return this.version <= t.version ? OI : this.cache.getTextChangesBetweenVersions(t.version, this.version); + } + }, s8 = class Kme { + constructor() { + this.checkEdits = !1; + } + absolutePositionOfStartOfLine(t) { + return this.lineNumberToInfo(t).absolutePosition; + } + positionToLineOffset(t) { + const { oneBasedLine: n, zeroBasedColumn: i } = this.root.charOffsetToLineInfo(1, t); + return { line: n, offset: i + 1 }; + } + positionToColumnAndLineText(t) { + return this.root.charOffsetToLineInfo(1, t); + } + getLineCount() { + return this.root.lineCount(); + } + lineNumberToInfo(t) { + const n = this.getLineCount(); + if (t <= n) { + const { position: i, leaf: s } = this.root.lineNumberToInfo(t, 0); + return { absolutePosition: i, lineText: s && s.text }; + } else + return { absolutePosition: this.root.charCount(), lineText: void 0 }; + } + load(t) { + if (t.length > 0) { + const n = []; + for (let i = 0; i < t.length; i++) + n[i] = new yL(t[i]); + this.root = Kme.buildTreeFromBottom(n); + } else + this.root = new D6(); + } + walk(t, n, i) { + this.root.walk(t, n, i); + } + getText(t, n) { + let i = ""; + return n > 0 && t < this.root.charCount() && this.walk(t, n, { + goSubtree: !0, + done: !1, + leaf: (s, o, c) => { + i = i.concat(c.text.substring(s, s + o)); + } + }), i; + } + getLength() { + return this.root.charCount(); + } + every(t, n, i) { + i || (i = this.root.charCount()); + const s = { + goSubtree: !0, + done: !1, + leaf(o, c, _) { + t(_, o, c) || (this.done = !0); + } + }; + return this.walk(n, i - n, s), !s.done; + } + edit(t, n, i) { + if (this.root.charCount() === 0) + return E.assert(n === 0), i !== void 0 ? (this.load(Kme.linesFromText(i).lines), this) : void 0; + { + let s; + if (this.checkEdits) { + const _ = this.getText(0, this.root.charCount()); + s = _.slice(0, t) + i + _.slice(t + n); + } + const o = new yZe(); + let c = !1; + if (t >= this.root.charCount()) { + t = this.root.charCount() - 1; + const _ = this.getText(t, 1); + i ? i = _ + i : i = _, n = 0, c = !0; + } else if (n > 0) { + const _ = t + n, { zeroBasedColumn: u, lineText: d } = this.positionToColumnAndLineText(_); + u === 0 && (n += d.length, i = i ? i + d : d); + } + if (this.root.walk(t, n, o), o.insertLines(i, c), this.checkEdits) { + const _ = o.lineIndex.getText(0, o.lineIndex.getLength()); + E.assert(s === _, "buffer edit mismatch"); + } + return o.lineIndex; + } + } + static buildTreeFromBottom(t) { + if (t.length < E6) + return new D6(t); + const n = new Array(Math.ceil(t.length / E6)); + let i = 0; + for (let s = 0; s < n.length; s++) { + const o = Math.min(i + E6, t.length); + n[s] = new D6(t.slice(i, o)), i = o; + } + return this.buildTreeFromBottom(n); + } + static linesFromText(t) { + const n = kT(t); + if (n.length === 0) + return { lines: [], lineMap: n }; + const i = new Array(n.length), s = n.length - 1; + for (let c = 0; c < s; c++) + i[c] = t.substring(n[c], n[c + 1]); + const o = t.substring(n[s]); + return o.length > 0 ? i[s] = o : i.pop(), { lines: i, lineMap: n }; + } + }, D6 = class ege { + constructor(t = []) { + this.children = t, this.totalChars = 0, this.totalLines = 0, t.length && this.updateCounts(); + } + isLeaf() { + return !1; + } + updateCounts() { + this.totalChars = 0, this.totalLines = 0; + for (const t of this.children) + this.totalChars += t.charCount(), this.totalLines += t.lineCount(); + } + execWalk(t, n, i, s, o) { + return i.pre && i.pre(t, n, this.children[s], this, o), i.goSubtree ? (this.children[s].walk(t, n, i), i.post && i.post(t, n, this.children[s], this, o)) : i.goSubtree = !0, i.done; + } + skipChild(t, n, i, s, o) { + s.pre && !s.done && (s.pre(t, n, this.children[i], this, o), s.goSubtree = !0); + } + walk(t, n, i) { + let s = 0, o = this.children[s].charCount(), c = t; + for (; c >= o; ) + this.skipChild( + c, + n, + s, + i, + 0 + /* PreStart */ + ), c -= o, s++, o = this.children[s].charCount(); + if (c + n <= o) { + if (this.execWalk( + c, + n, + i, + s, + 2 + /* Entire */ + )) + return; + } else { + if (this.execWalk( + c, + o - c, + i, + s, + 1 + /* Start */ + )) + return; + let _ = n - (o - c); + for (s++, o = this.children[s].charCount(); _ > o; ) { + if (this.execWalk( + 0, + o, + i, + s, + 3 + /* Mid */ + )) + return; + _ -= o, s++, o = this.children[s].charCount(); + } + if (_ > 0 && this.execWalk( + 0, + _, + i, + s, + 4 + /* End */ + )) + return; + } + if (i.pre) { + const _ = this.children.length; + if (s < _ - 1) + for (let u = s + 1; u < _; u++) + this.skipChild( + 0, + 0, + u, + i, + 5 + /* PostEnd */ + ); + } + } + // Input position is relative to the start of this node. + // Output line number is absolute. + charOffsetToLineInfo(t, n) { + if (this.children.length === 0) + return { oneBasedLine: t, zeroBasedColumn: n, lineText: void 0 }; + for (const o of this.children) { + if (o.charCount() > n) + return o.isLeaf() ? { oneBasedLine: t, zeroBasedColumn: n, lineText: o.text } : o.charOffsetToLineInfo(t, n); + n -= o.charCount(), t += o.lineCount(); + } + const i = this.lineCount(); + if (i === 0) + return { oneBasedLine: 1, zeroBasedColumn: 0, lineText: void 0 }; + const s = E.checkDefined(this.lineNumberToInfo(i, 0).leaf); + return { oneBasedLine: i, zeroBasedColumn: s.charCount(), lineText: void 0 }; + } + /** + * Input line number is relative to the start of this node. + * Output line number is relative to the child. + * positionAccumulator will be an absolute position once relativeLineNumber reaches 0. + */ + lineNumberToInfo(t, n) { + for (const i of this.children) { + const s = i.lineCount(); + if (s >= t) + return i.isLeaf() ? { position: n, leaf: i } : i.lineNumberToInfo(t, n); + t -= s, n += i.charCount(); + } + return { position: n, leaf: void 0 }; + } + splitAfter(t) { + let n; + const i = this.children.length; + t++; + const s = t; + if (t < i) { + for (n = new ege(); t < i; ) + n.add(this.children[t]), t++; + n.updateCounts(); + } + return this.children.length = s, n; + } + remove(t) { + const n = this.findChildIndex(t), i = this.children.length; + if (n < i - 1) + for (let s = n; s < i - 1; s++) + this.children[s] = this.children[s + 1]; + this.children.pop(); + } + findChildIndex(t) { + const n = this.children.indexOf(t); + return E.assert(n !== -1), n; + } + insertAt(t, n) { + let i = this.findChildIndex(t); + const s = this.children.length, o = n.length; + if (s < E6 && i === s - 1 && o === 1) + return this.add(n[0]), this.updateCounts(), []; + { + const c = this.splitAfter(i); + let _ = 0; + for (i++; i < E6 && _ < o; ) + this.children[i] = n[_], i++, _++; + let u = [], d = 0; + if (_ < o) { + d = Math.ceil((o - _) / E6), u = new Array(d); + let g = 0; + for (let S = 0; S < d; S++) + u[S] = new ege(); + let h = u[0]; + for (; _ < o; ) + h.add(n[_]), _++, h.children.length === E6 && (g++, h = u[g]); + for (let S = u.length - 1; S >= 0; S--) + u[S].children.length === 0 && u.pop(); + } + c && u.push(c), this.updateCounts(); + for (let g = 0; g < d; g++) + u[g].updateCounts(); + return u; + } + } + // assume there is room for the item; return true if more room + add(t) { + this.children.push(t), E.assert(this.children.length <= E6); + } + charCount() { + return this.totalChars; + } + lineCount() { + return this.totalLines; + } + }, yL = class { + constructor(e) { + this.text = e; + } + isLeaf() { + return !0; + } + walk(e, t, n) { + n.leaf(e, t, this); + } + charCount() { + return this.text.length; + } + lineCount() { + return 1; + } + }, Lwe = class k5e { + constructor(t, n, i, s, o, c) { + this.telemetryEnabled = t, this.logger = n, this.host = i, this.globalTypingsCacheLocation = s, this.event = o, this.maxActiveRequestCount = c, this.activeRequestCount = 0, this.requestQueue = aw(), this.requestMap = /* @__PURE__ */ new Map(), this.requestedRegistry = !1, this.packageInstallId = 0; + } + isKnownTypesPackageName(t) { + var n; + return hm.validatePackageName(t) !== hm.NameValidationResult.Ok ? !1 : (this.requestedRegistry || (this.requestedRegistry = !0, this.installer.send({ kind: "typesRegistry" })), !!((n = this.typesRegistryCache) != null && n.has(t))); + } + installPackage(t) { + this.packageInstallId++; + const n = { kind: "installPackage", ...t, id: this.packageInstallId }, i = new Promise((s, o) => { + (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: s, reject: o }); + }); + return this.installer.send(n), i; + } + attach(t) { + this.projectService = t, this.installer = this.createInstallerProcess(); + } + onProjectClosed(t) { + this.installer.send({ projectName: t.getProjectName(), kind: "closeProject" }); + } + enqueueInstallTypingsRequest(t, n, i) { + const s = C_e(t, n, i); + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Scheduling throttled operation:${dv(s)}`), this.activeRequestCount < this.maxActiveRequestCount ? this.scheduleRequest(s) : (this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Deferring request for: ${s.projectName}`), this.requestQueue.enqueue(s), this.requestMap.set(s.projectName, s)); + } + handleMessage(t) { + var n, i; + switch (this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Received response:${dv(t)}`), t.kind) { + case DV: + this.typesRegistryCache = new Map(Object.entries(t.typesRegistry)); + break; + case AF: { + const s = (n = this.packageInstalledPromise) == null ? void 0 : n.get(t.id); + E.assertIsDefined(s, "Should find the promise for package install"), (i = this.packageInstalledPromise) == null || i.delete(t.id), t.success ? s.resolve({ successMessage: t.message }) : s.reject(t.message), this.projectService.updateTypingsForProject(t), this.event(t, "setTypings"); + break; + } + case Nse: { + const s = { + message: t.message + }; + this.event(s, "typesInstallerInitializationFailed"); + break; + } + case PV: { + const s = { + eventId: t.eventId, + packages: t.packagesToInstall + }; + this.event(s, "beginInstallTypes"); + break; + } + case wV: { + if (this.telemetryEnabled) { + const c = { + telemetryEventName: "typingsInstalled", + payload: { + installedPackages: t.packagesToInstall.join(","), + installSuccess: t.installSuccess, + typingsInstallerVersion: t.typingsInstallerVersion + } + }; + this.event(c, "telemetry"); + } + const s = { + eventId: t.eventId, + packages: t.packagesToInstall, + success: t.installSuccess + }; + this.event(s, "endInstallTypes"); + break; + } + case wF: { + this.projectService.updateTypingsForProject(t); + break; + } + case PF: { + for (this.activeRequestCount > 0 ? this.activeRequestCount-- : E.fail("TIAdapter:: Received too many responses"); !this.requestQueue.isEmpty(); ) { + const s = this.requestQueue.dequeue(); + if (this.requestMap.get(s.projectName) === s) { + this.requestMap.delete(s.projectName), this.scheduleRequest(s); + break; + } + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Skipping defunct request for: ${s.projectName}`); + } + this.projectService.updateTypingsForProject(t), this.event(t, "setTypings"); + break; + } + case YA: + this.projectService.watchTypingLocations(t); + break; + } + } + scheduleRequest(t) { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Scheduling request for: ${t.projectName}`), this.activeRequestCount++, this.host.setTimeout( + () => { + this.logger.hasLevel( + 3 + /* verbose */ + ) && this.logger.info(`TIAdapter:: Sending request:${dv(t)}`), this.installer.send(t); + }, + k5e.requestDelayMillis, + `${t.projectName}::${t.kind}` + ); + } + }; + Lwe.requestDelayMillis = 100; + var Mwe = Lwe, Rwe = {}; + Qa(Rwe, { + ActionInvalidate: () => wF, + ActionPackageInstalled: () => AF, + ActionSet: () => PF, + ActionWatchTypingLocations: () => YA, + Arguments: () => AV, + AutoImportProviderProject: () => q_e, + AuxiliaryProject: () => V_e, + CharRangeSection: () => dfe, + CloseFileWatcherEvent: () => YH, + CommandNames: () => Ewe, + ConfigFileDiagEvent: () => HH, + ConfiguredProject: () => H_e, + ConfiguredProjectLoadKind: () => Z_e, + CreateDirectoryWatcherEvent: () => QH, + CreateFileWatcherEvent: () => XH, + Errors: () => Ph, + EventBeginInstallTypes: () => PV, + EventEndInstallTypes: () => wV, + EventInitializationFailed: () => Nse, + EventTypesRegistry: () => DV, + ExternalProject: () => JH, + GcTimer: () => I_e, + InferredProject: () => W_e, + LargeFileReferencedEvent: () => qH, + LineIndex: () => s8, + LineLeaf: () => yL, + LineNode: () => D6, + LogLevel: () => x_e, + Msg: () => k_e, + OpenFileInfoTelemetryEvent: () => G_e, + Project: () => Yx, + ProjectInfoTelemetryEvent: () => $H, + ProjectKind: () => KN, + ProjectLanguageServiceStateEvent: () => GH, + ProjectLoadingFinishEvent: () => UH, + ProjectLoadingStartEvent: () => VH, + ProjectService: () => ife, + ProjectsUpdatedInBackgroundEvent: () => gL, + ScriptInfo: () => M_e, + ScriptVersionCache: () => lG, + Session: () => Nwe, + TextStorage: () => L_e, + ThrottledOperations: () => N_e, + TypingsCache: () => R_e, + TypingsInstallerAdapter: () => Mwe, + allFilesAreJsOrDts: () => B_e, + allRootFilesAreJsOrDts: () => j_e, + asNormalizedPath: () => KPe, + convertCompilerOptions: () => hL, + convertFormatOptions: () => k6, + convertScriptKindName: () => KH, + convertTypeAcquisition: () => X_e, + convertUserPreferences: () => Q_e, + convertWatchOptions: () => n8, + countEachFileTypes: () => e8, + createInstallTypingsRequest: () => C_e, + createModuleSpecifierCache: () => ofe, + createNormalizedPathMap: () => ewe, + createPackageJsonCache: () => cfe, + createSortedArray: () => A_e, + emptyArray: () => al, + findArgument: () => Qbe, + forEachResolvedProjectReferenceProject: () => nG, + formatDiagnosticToProtocol: () => i8, + formatMessage: () => lfe, + getBaseConfigFileName: () => jH, + getLocationInNewDocument: () => pfe, + hasArgument: () => Xbe, + hasNoTypeScriptSource: () => J_e, + indent: () => zD, + isBackgroundProject: () => r8, + isConfigFile: () => sfe, + isConfiguredProject: () => P0, + isDynamicFileName: () => ZN, + isExternalProject: () => t8, + isInferredProject: () => x6, + isInferredProjectName: () => E_e, + isProjectDeferredClose: () => mL, + makeAutoImportProviderProjectName: () => P_e, + makeAuxiliaryProjectName: () => w_e, + makeInferredProjectName: () => D_e, + maxFileSize: () => WH, + maxProgramSizeForNonTsFiles: () => zH, + normalizedPathToPath: () => YN, + nowString: () => Ybe, + nullCancellationToken: () => xwe, + nullTypingsInstaller: () => BH, + protocol: () => O_e, + removeSorted: () => twe, + stringifyIndented: () => dv, + toEvent: () => ufe, + toNormalizedPath: () => Wo, + tryConvertScriptKindName: () => ZH, + typingsInstaller: () => T_e, + updateProjectIfDirty: () => fp + }), typeof console < "u" && (E.loggingHost = { + log(e, t) { + switch (e) { + case 1: + return console.error(t); + case 2: + return console.warn(t); + case 3: + return console.log(t); + case 4: + return console.log(t); + } + } + }); + })({ get exports() { + return na; + }, set exports(Ua) { + na = Ua, Cu.exports && (Cu.exports = Ua); + } }); +})(h5e); +var d_t = h5e.exports; +const m_t = /* @__PURE__ */ Qut(d_t); +function Xme(Cu) { + r_t(Cu) ? c5e(`${l5e}show-in-ide`, n_t(Cu)) : c5e(`${l5e}show-in-ide`, { + ...Cu + }); +} +ew.on("show-in-ide", (Cu) => { + const na = Cu.detail.node; + if (Cu.detail.source) { + Xme(Cu.detail.source); + return; + } + if (!na) + return; + if (na.isFlowComponent) { + Xme(na.node); + return; + } + const Ua = C5e(na); + Ua && Xme(Ua); +}); +function C5e(Cu) { + if (!Cu.isReactComponent) + return; + const na = f5e(Cu.node); + if (na) + return na; + const Ua = t_t(Cu.node); + if (Ua) + return Ua; + const H_ = Cu.children.sort((Qa, Cp) => Qa.siblingIndex - Cp.siblingIndex).find((Qa) => Qa.isReactComponent && C5e(Qa) !== void 0); + if (!H_) + throw new Error(`Could not find the source of ${Cu.nameAndIdentifier}`); + return f5e(H_.node); +} +function g_t() { + m5e("copilot-init-app-add-devtools", {}, (Cu) => { + Cu.data.error ? g5e(Cu.data.error) : document.body.innerHTML = `

The files have been created

+

Spring Boot Dev Tools added. You need to restart the server for the changes to take effect.

`; + }); +} +function h_t(Cu) { + Hme.active || Hme.setActive(!0), m5e("copilot-init-app", { framework: Cu }, async (na) => { + if (na.data.success) + await Yut() ? na.data.refresh && setTimeout(() => window.location.reload(), 2e3) : document.body.innerHTML = `

The files have been created

+

You do not have Spring Boot Dev Tools, HotswapAgent or JRebel enabled, so you need to restart the server for the changes to take effect.

+

Click here if you want to add Spring Boot Dev Tools to the project

`; + else { + const Ua = na.data.reason; + g5e(Ua); + } + }), Hme.setActive(!1); +} +class y_t { + constructor() { + this.root = null, this.flatNodes = [], this._hasFlowView = !1, this.fiberNodeUuids = /* @__PURE__ */ new WeakMap(); + } + getChildren(na) { + return this.flatNodes.find((H_) => H_.uuid === na)?.children || []; + } + get allNodesFlat() { + return this.flatNodes; + } + getNodeOfElement(na) { + if (na) + return na.__copilotTreeNode ? na.__copilotTreeNode : this.flatNodes.find((Ua) => Ua.element === na); + } + addToTree(na, Ua) { + const H_ = Kut(na); + if (!H_ && i_t(na)) { + const Yh = Gme(na); + if (Yh && Yh.nextElementSibling) { + this.addToTree(Yh.nextElementSibling, Ua); + return; + } + } + let Qa, Cp; + if (!H_) + Qa = p5e(na) ? Gme(na) : void 0, Cp = this.generateNodeFromFiber(na, Ua); + else { + const Yh = this.generateNodeFromFlow(na, Ua); + if (!Yh) + return; + this._hasFlowView = !0, Cp = Yh, Qa = na; + } + Ua ? (Cp.parent = Ua, Ua.children || (Ua.children = []), Ua.children.push(Cp)) : this.root = Cp, Qa && (Qa.__copilotTreeNode = Cp), this.flatNodes.push(Cp), ew.emit("copilot-tree-node-added", { node: Cp, parent: Ua }), H_ ? Array.from(na.children).forEach((Yh) => this.addToTree(Yh, Cp)) : s_t(na).forEach((Yh) => this.addToTree(Yh, Cp)); + } + generateNodeFromFiber(na, Ua) { + const H_ = p5e(na) ? Gme(na) : void 0, Qa = Ua?.children.length ?? 0, Cp = this; + return { + node: na, + parent: Ua, + element: H_, + depth: Ua && Ua.depth + 1 || 0, + children: [], + siblingIndex: Qa, + isFlowComponent: !1, + isReactComponent: !0, + get uuid() { + if (Cp.fiberNodeUuids.has(na)) + return Cp.fiberNodeUuids.get(na); + if (na.alternate && Cp.fiberNodeUuids.has(na.alternate)) + return Cp.fiberNodeUuids.get(na.alternate); + const N2 = Zut(); + return Cp.fiberNodeUuids.set(na, N2), N2; + }, + get name() { + return u5e(a_t(na)); + }, + get identifier() { + return _5e(H_); + }, + get nameAndIdentifier() { + return d5e(this.name, this.identifier); + }, + get previousSibling() { + if (Qa !== 0) + return Ua?.children[Qa - 1]; + }, + get nextSibling() { + if (!(Ua === void 0 || Qa === Ua.children.length - 1)) + return Ua.children[Qa + 1]; + } + }; + } + generateNodeFromFlow(na, Ua) { + const H_ = o_t(na); + if (!H_ || this.ignoreFlowNode(Ua, H_)) + return; + const Qa = Ua?.children.length ?? 0; + return { + node: H_, + parent: Ua, + element: na, + depth: Ua && Ua.depth + 1 || 0, + children: [], + siblingIndex: Qa, + get uuid() { + return `${H_.uiId}#${H_.nodeId}`; + }, + isFlowComponent: !0, + isReactComponent: !1, + get name() { + return c_t(H_) ?? u5e(H_.element.localName); + }, + get identifier() { + return _5e(na); + }, + get nameAndIdentifier() { + return d5e(this.name, this.identifier); + }, + get previousSibling() { + if (Qa !== 0) + return Ua?.children[Qa - 1]; + }, + get nextSibling() { + if (!(Ua === void 0 || Qa === Ua.children.length - 1)) + return Ua.children[Qa + 1]; + } + }; + } + clearTree() { + this.root = null, this.flatNodes = [], this._hasFlowView = !1, ew.emit("copilot-tree-cleared", {}); + } + createTree() { + this.clearTree(); + const na = l_t(); + na && (this.addToTree(na), this.addDialogContentToTree(), ew.emit("copilot-tree-created", {})); + } + ignoreFlowNode(na, Ua) { + return !!(na?.element?.localName === "vaadin-radio-button" || na?.element?.localName === "vaadin-grid" || Ua?.javaClass?.startsWith("com.vaadin.flow.data.renderer")); + } + addDialogContentToTree() { + const na = document.body.querySelector("vaadin-dialog-overlay"); + if (!na) + return; + const Ua = na.owner; + if (Ua) { + if (!this.getNodeOfElement(Ua)) { + const H_ = u_t(__t(Ua)); + this.addToTree(H_ ?? Ua, this.root); + } + Array.from(na.children).forEach((H_) => this.addToTree(H_, this.getNodeOfElement(Ua))); + } + } + hasFlowView() { + return this._hasFlowView; + } + findNodeByUuid(na) { + return this.flatNodes.find((Ua) => Ua.uuid === na); + } + getElementByNodeUuid(na) { + return this.findNodeByUuid(na)?.element; + } +} +function d5e(Cu, na) { + return na ? `${Cu} "${na}"` : Cu; +} +ew.on("location-changed", () => { + window.Vaadin.copilot.tree.createTree(); +}); +ew.on("component-tree-updated", () => { + window.Vaadin.copilot.tree.createTree(); +}); +ew.on("navigate", (Cu) => { + const na = window.history.state?.idx, Ua = {}; + na !== void 0 && (Ua.idx = na + 1), window.history.pushState(Ua, "", Cu.detail.path), window.dispatchEvent(new PopStateEvent("popstate")); +}); +window.Vaadin.copilot.comm = e_t; +window.Vaadin.copilot.ts = m_t; +window.Vaadin.copilot.tree = new y_t(); +window.Vaadin.copilot.initEmptyApp = h_t; +window.Vaadin.copilot.addSpringBootDevTools = g_t; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-info-plugin-Do8zGsEn.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-info-plugin-Do8zGsEn.js new file mode 100644 index 0000000..e380c64 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-info-plugin-Do8zGsEn.js @@ -0,0 +1,286 @@ +import { a as D, N as $, e as d, x as s, H as A, T as u, M as E, b as H, t as C, Q as J, V as P, I as S } from "./copilot-ppBO0zjz.js"; +import { r as I } from "./state-B-CMA1Q2.js"; +import { B as R } from "./base-panel-vYmwbGFU.js"; +import { showNotification as V } from "./copilot-notification-BorVW3EP.js"; +import { i as _ } from "./icons-BzskfjAz.js"; +const O = "copilot-info-panel{--dev-tools-red-color: red;--dev-tools-grey-color: gray;--dev-tools-green-color: green;position:relative}copilot-info-panel div.info-tray{display:flex;flex-direction:column;gap:10px}copilot-info-panel dl{display:grid;grid-template-columns:auto auto;gap:0;margin:var(--space-100) var(--space-50);font:var(--font-xsmall)}copilot-info-panel dl>dt,copilot-info-panel dl>dd{padding:3px 10px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}copilot-info-panel dd.live-reload-status>span{overflow:hidden;text-overflow:ellipsis;display:block;color:var(--status-color)}copilot-info-panel dd span.hidden{display:none}copilot-info-panel dd span.true{color:var(--dev-tools-green-color);font-size:large}copilot-info-panel dd span.false{color:var(--dev-tools-red-color);font-size:large}copilot-info-panel code{white-space:nowrap;-webkit-user-select:all;user-select:all}copilot-info-panel .checks{display:inline-grid;grid-template-columns:auto 1fr;gap:var(--space-50)}copilot-info-panel span.hint{font-size:var(--font-size-0);background:var(--gray-50);padding:var(--space-75);border-radius:var(--radius-2)}"; +var j = function() { + var e = document.getSelection(); + if (!e.rangeCount) + return function() { + }; + for (var t = document.activeElement, a = [], l = 0; l < e.rangeCount; l++) + a.push(e.getRangeAt(l)); + switch (t.tagName.toUpperCase()) { + case "INPUT": + case "TEXTAREA": + t.blur(); + break; + default: + t = null; + break; + } + return e.removeAllRanges(), function() { + e.type === "Caret" && e.removeAllRanges(), e.rangeCount || a.forEach(function(i) { + e.addRange(i); + }), t && t.focus(); + }; +}, U = j, v = { + "text/plain": "Text", + "text/html": "Url", + default: "Text" +}, T = "Copy to clipboard: #{key}, Enter"; +function L(e) { + var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; + return e.replace(/#{\s*key\s*}/g, t); +} +function N(e, t) { + var a, l, i, o, r, n, h = !1; + t || (t = {}), a = t.debug || !1; + try { + i = U(), o = document.createRange(), r = document.getSelection(), n = document.createElement("span"), n.textContent = e, n.ariaHidden = "true", n.style.all = "unset", n.style.position = "fixed", n.style.top = 0, n.style.clip = "rect(0, 0, 0, 0)", n.style.whiteSpace = "pre", n.style.webkitUserSelect = "text", n.style.MozUserSelect = "text", n.style.msUserSelect = "text", n.style.userSelect = "text", n.addEventListener("copy", function(c) { + if (c.stopPropagation(), t.format) + if (c.preventDefault(), typeof c.clipboardData > "u") { + a && console.warn("unable to use e.clipboardData"), a && console.warn("trying IE specific stuff"), window.clipboardData.clearData(); + var m = v[t.format] || v.default; + window.clipboardData.setData(m, e); + } else + c.clipboardData.clearData(), c.clipboardData.setData(t.format, e); + t.onCopy && (c.preventDefault(), t.onCopy(c.clipboardData)); + }), document.body.appendChild(n), o.selectNodeContents(n), r.addRange(o); + var x = document.execCommand("copy"); + if (!x) + throw new Error("copy command was unsuccessful"); + h = !0; + } catch (c) { + a && console.error("unable to copy using execCommand: ", c), a && console.warn("trying IE specific stuff"); + try { + window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), h = !0; + } catch (m) { + a && console.error("unable to copy using clipboardData: ", m), a && console.error("falling back to prompt"), l = L("message" in t ? t.message : T), window.prompt(l, e); + } + } finally { + r && (typeof r.removeRange == "function" ? r.removeRange(o) : r.removeAllRanges()), n && document.body.removeChild(n), i(); + } + return h; +} +var B = N; +const M = /* @__PURE__ */ D(B); +var F = Object.defineProperty, W = Object.getOwnPropertyDescriptor, g = (e, t, a, l) => { + for (var i = l > 1 ? void 0 : l ? W(t, a) : t, o = e.length - 1, r; o >= 0; o--) + (r = e[o]) && (i = (l ? r(t, a, i) : r(i)) || i); + return l && i && F(t, a, i), i; +}; +const w = s`Get IntelliJ plugin`, b = s`Get VS Code plugin`; +function k(e) { + return S("get-plugin", e), !1; +} +let f = class extends R { + constructor() { + super(...arguments), this.serverInfo = [], this.clientInfo = [{ name: "Browser", version: navigator.userAgent }], this.handleServerInfoEvent = (e) => { + const t = JSON.parse(e.data.info); + this.serverInfo = t.versions, this.updateJdkInfo(t.jdkInfo), this.updateIdePluginInfo(), $().then((a) => { + a && (this.clientInfo.unshift({ name: "Vaadin Employee", version: "true", more: void 0 }), this.requestUpdate("clientInfo")); + }); + }; + } + connectedCallback() { + super.connectedCallback(), this.onCommand("copilot-info", this.handleServerInfoEvent), this.onEventBus("system-info-with-callback", (e) => { + e.detail.callback(this.getInfoForClipboard(e.detail.notify)); + }), this.reaction( + () => d.idePluginState, + () => { + this.updateIdePluginInfo(), this.requestUpdate("serverInfo"); + } + ); + } + updateJdkInfo(e) { + const t = e.extendedClassDefCapable && e.runningWithExtendClassDef && e.hotswapAgentFound && e.runningWitHotswap && e.hotswapVersionOk, a = e.jrebel; + d.jdkInfo = { + ...e, + activeHotswap: a ? "jrebel" : t ? "hotswapagent" : void 0 + }; + } + updateIdePluginInfo() { + const e = this.getIndex("Copilot IDE Plugin"); + let t = "false", a; + d.idePluginState?.active ? t = `${d.idePluginState.version}-${d.idePluginState.ide}` : d.idePluginState?.ide === "vscode" ? a = b : d.idePluginState?.ide === "idea" ? a = w : a = s`${w} or ${b}`, this.serverInfo[e].version = t, this.serverInfo[e].more = a; + } + getIndex(e) { + return this.serverInfo.findIndex((t) => t.name === e); + } + render() { + return s` +
+
+ ${[...this.serverInfo, ...this.clientInfo].map( + (e) => s` +
${e.name}
+
+ ${this.renderVersion(e)} ${e.more} +
+ ` + )} +
+
`; + } + renderVersion(e) { + return e.name === "Java Hotswap" ? this.renderJavaHotswap() : this.renderValue(e.version); + } + renderValue(e) { + return e === "false" ? p(!1) : e === "true" ? p(!0) : e; + } + getInfoForClipboard(e) { + const t = this.renderRoot.querySelectorAll(".info-tray dt"), i = Array.from(t).map((o) => ({ + key: o.textContent.trim(), + value: o.nextElementSibling.textContent.trim() + })).filter((o) => o.key !== "Live reload").filter((o) => !o.key.startsWith("Vaadin Emplo")).map((o) => { + const { key: r } = o; + let { value: n } = o; + return r === "Copilot IDE Plugin" && !d.idePluginState?.active ? n = "false" : r === "Java Hotswap" && (n = String(n.includes("JRebel is in use") || n.includes("HotswapAgent is in use"))), `${r}: ${n}`; + }).join(` +`); + return e && V({ + type: A.INFORMATION, + message: "Environment information copied to clipboard", + dismissId: "versionInfoCopied" + }), i.trim(); + } + renderJavaHotswap() { + const e = d.jdkInfo; + if (!e) + return u; + const t = e.activeHotswap === "jrebel"; + return !e.extendedClassDefCapable && !t ? s`
+ ${p(!1)} No Hotswap solution in use +

To enable hotswap for Java, you can either use HotswapAgent or JRebel.

+

HotswapAgent is an open source project that utilizes the JetBrains Runtime (JDK).

+
+ If you are running IntelliJ, edit the launch configuration to use the bundled JDK.
+ Otherwise, download it from + the JetBrains release page + to get started. +
+
+

+ JRebel is a commercial solution available from + jrebel.com +

+
` : t ? s`
+ ${p(!0)} + JRebel is in use +
` : e.activeHotswap === "hotswapagent" ? s`
${p(!0)}HotswapAgent is in use
` : s`
+
${p(!1)} HotswapAgent is partially enabled
+
+ ${p(e.extendedClassDefCapable)} + JDK supports hotswapping + ${p(e.runningWithExtendClassDef)} + JDK hotswapping enabled + ${e.runningWithExtendClassDef ? u : s`Add the -XX:+AllowEnhancedClassRedefinition JVM argument when launching the + application`} + ${p(e.hotswapAgentFound)} + HotswapAgent installed + ${e.hotswapAgentFound ? u : s`Download the latest HotswapAgent + and place it in ${e.hotswapAgentLocation}`} + ${p(e.hotswapVersionOk)} + HotswapAgent is version 1.4.2 or newer + ${e.hotswapVersionOk ? u : s`HotswapAgent version ${e.hotswapVersion} is in use
+ Download the latest HotswapAgent + and place it in ${e.hotswapAgentLocation}
`} + ${p(e.runningWitHotswap)} + HotswapAgent configured + ${e.runningWitHotswap ? u : s`Add the -XX:HotswapAgent=fatjar JVM argument when launching the application`} + ${p(e.runningInJavaDebugMode)} + Application running in Java debug mode + ${e.runningInJavaDebugMode ? u : s`Start the application in debug mode in the IDE`} + Read more about Hot Deploy & Live Reload +
`; + } +}; +g([ + I() +], f.prototype, "serverInfo", 2); +g([ + I() +], f.prototype, "clientInfo", 2); +f = g([ + C("copilot-info-panel") +], f); +let y = class extends E { + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.style.display = "flex"; + } + render() { + return s``; + } +}; +y = g([ + C("copilot-info-actions") +], y); +const z = { + header: "Info", + expanded: !0, + panelOrder: 15, + panel: "right", + floating: !1, + tag: "copilot-info-panel", + actionsTag: "copilot-info-actions" +}, G = { + init(e) { + e.addPanel(z); + } +}; +window.Vaadin.copilot.plugins.push(G); +function p(e) { + return e ? s`` : s``; +} +export { + y as Actions, + f as CopilotInfoPanel +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-init-step2-BYO5YZ6c.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-init-step2-BYO5YZ6c.js new file mode 100644 index 0000000..4d3f0aa --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-init-step2-BYO5YZ6c.js @@ -0,0 +1,1826 @@ +import { t as E, M as O, C as $, l as a, b as d, m as Q, r as L, n as S, e as l, O as j, A, o as f, x as v, q as ee, u as M, w as q, y as V, T as z, z as H, B as te, D as ie, E as oe, F as ne, G as se, H as re, I as ae } from "./copilot-ppBO0zjz.js"; +import { n as R, r as W } from "./state-B-CMA1Q2.js"; +import { e as y, m as G } from "./overlay-monkeypatch-Bx2SPt1s.js"; +import { i as u } from "./icons-BzskfjAz.js"; +import { o as le, p as ce } from "./react-utils-D_MlSXfo.js"; +import { dismissNotification as de, showNotification as he } from "./copilot-notification-BorVW3EP.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function ge(e) { + return (t, o) => { + const n = typeof t == "function" ? t : t[o]; + Object.assign(n, e); + }; +} +const F = "@keyframes bounce{0%{transform:scale(.8)}50%{transform:scale(1.5)}to{transform:scale(1)}}@keyframes pulse{0%{box-shadow:0 0 calc(var(--pulse-size) * 2) 0 transparent}25%{box-shadow:0 0 calc(var(--pulse-size) * 2) 0 var(--pulse-first-color, var(--selection-color))}50%{box-shadow:0 0 calc(var(--pulse-size) * 2) 0 transparent}75%{box-shadow:0 0 calc(var(--pulse-size) * 2) 0 var(--pulse-second-color, var(--accent-color))}to{box-shadow:0 0 calc(var(--pulse-size) * 2) 0 transparent}}@keyframes around-we-go-again{0%{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5),calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5))}25%{background-position:0 0,0 0,calc(100% + calc(var(--glow-size) * .5)) calc(var(--glow-size) * -.5),calc(var(--glow-size) * -.5) calc(100% + calc(var(--glow-size) * .5))}50%{background-position:0 0,0 0,calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5)),calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5)}75%{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(100% + calc(var(--glow-size) * .5)),calc(100% + calc(var(--glow-size) * .5)) calc(var(--glow-size) * -.5)}to{background-position:0 0,0 0,calc(var(--glow-size) * -.5) calc(var(--glow-size) * -.5),calc(100% + calc(var(--glow-size) * .5)) calc(100% + calc(var(--glow-size) * .5))}}@keyframes swirl{0%{rotate:0deg;filter:hue-rotate(20deg)}50%{filter:hue-rotate(-30deg)}to{rotate:360deg;filter:hue-rotate(20deg)}}"; +var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, x = (e, t, o, n) => { + for (var i = n > 1 ? void 0 : n ? ue(t, o) : t, r = e.length - 1, s; r >= 0; r--) + (s = e[r]) && (i = (n ? s(t, o, i) : s(i)) || i); + return n && i && pe(t, o, i), i; +}; +const B = "data-drag-initial-index", D = "data-drag-final-index"; +let b = class extends O { + constructor() { + super(...arguments), this.position = "right", this.opened = !1, this.keepOpen = !1, this.resizing = !1, this.closingForcefully = !1, this.draggingSectionPanel = null, this.activationAnimationTransitionEndListener = () => { + this.style.removeProperty("--closing-delay"), this.style.removeProperty("--initial-position"), this.removeEventListener("transitionend", this.activationAnimationTransitionEndListener); + }, this.resizingMouseMoveListener = (e) => { + if (!this.resizing) + return; + const { x: t, y: o } = e; + e.stopPropagation(), e.preventDefault(), requestAnimationFrame(() => { + let n; + if (this.position === "right") { + const i = document.body.clientWidth - t; + this.style.setProperty("--size", `${i}px`), $.saveDrawerSize(this.position, i), n = { width: i }; + } else if (this.position === "left") { + const i = t; + this.style.setProperty("--size", `${i}px`), $.saveDrawerSize(this.position, i), n = { width: i }; + } else if (this.position === "bottom") { + const i = document.body.clientHeight - o; + this.style.setProperty("--size", `${i}px`), $.saveDrawerSize(this.position, i), n = { height: i }; + } + a.panels.filter((i) => !i.floating && i.panel === this.position).forEach((i) => { + a.updatePanel(i.tag, n); + }); + }); + }, this.sectionPanelDraggingStarted = (e, t) => { + this.draggingSectionPanel = e, d.emit("user-select", { allowSelection: !1 }), this.draggingSectionPointerStartY = t.clientY, e.toggleAttribute("dragging", !0), e.style.zIndex = "1000", Array.from(this.querySelectorAll("copilot-section-panel-wrapper")).forEach((o, n) => { + o.setAttribute(B, `${n}`); + }), document.addEventListener("mousemove", this.sectionPanelDragging), document.addEventListener("mouseup", this.sectionPanelDraggingFinished); + }, this.sectionPanelDragging = (e) => { + if (!this.draggingSectionPanel) + return; + const { clientX: t, clientY: o } = e; + if (!Q(this.getBoundingClientRect(), t, o)) { + this.cleanUpDragging(); + return; + } + const n = o - this.draggingSectionPointerStartY; + this.draggingSectionPanel.style.transform = `translateY(${n}px)`, this.updateSectionPanelPositionsWhileDragging(); + }, this.sectionPanelDraggingFinished = () => { + if (!this.draggingSectionPanel) + return; + d.emit("user-select", { allowSelection: !0 }); + const e = this.getAllPanels().filter( + (t) => t.hasAttribute(D) && t.panelInfo?.panelOrder !== Number.parseInt(t.getAttribute(D), 10) + ).map((t) => ({ + tag: t.panelTag, + order: Number.parseInt(t.getAttribute(D), 10) + })); + this.cleanUpDragging(), a.updateOrders(e), document.removeEventListener("mouseup", this.sectionPanelDraggingFinished), document.removeEventListener("mousemove", this.sectionPanelDragging); + }, this.updateSectionPanelPositionsWhileDragging = () => { + const e = this.draggingSectionPanel.getBoundingClientRect().height; + this.getAllPanels().sort((t, o) => { + const n = t.getBoundingClientRect(), i = o.getBoundingClientRect(), r = (n.top + n.bottom) / 2, s = (i.top + i.bottom) / 2; + return r - s; + }).forEach((t, o) => { + if (t.setAttribute(D, `${o}`), t.panelTag !== this.draggingSectionPanel?.panelTag) { + const n = Number.parseInt(t.getAttribute(B), 10); + n > o ? t.style.transform = `translateY(${-e}px)` : n < o ? t.style.transform = `translateY(${e}px)` : t.style.removeProperty("transform"); + } + }); + }; + } + static get styles() { + return [ + L(F), + S` + :host { + --size: 350px; + --min-size: 20%; + --max-size: 80%; + --default-content-height: 300px; + --transition-duration: var(--duration-2); + --opening-delay: var(--duration-2); + --closing-delay: var(--duration-3); + --hover-size: 18px; + --pulse-size: var(--hover-size); + --pulse-animation-duration: 8s; + --initial-position: 0px; + position: absolute; + z-index: var(--z-index-drawer); + transition: translate var(--transition-duration) var(--closing-delay); + } + + :host([no-transition]), + :host([no-transition]) .container { + transition: none; + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + } + + :host(:is([position='left'], [position='right'])) { + width: var(--size); + min-width: var(--min-size); + max-width: var(--max-size); + top: 0; + bottom: 0; + } + + :host([position='left']) { + left: var(--initial-position); + translate: calc(-100% + var(--hover-size)) 0%; + padding-right: var(--hover-size); + } + + :host([position='right']) { + right: var(--initial-position); + translate: calc(100% - var(--hover-size)) 0%; + padding-left: var(--hover-size); + } + + :host([position='bottom']) { + height: var(--size); + min-height: var(--min-size); + max-height: var(--max-size); + bottom: var(--initial-position); + left: 0; + right: 0; + translate: 0% calc(100% - var(--hover-size)); + padding-top: var(--hover-size); + } + + /* The visible container. Needed to have extra space for hover and resize handle outside it. */ + + .container { + display: flex; + flex-direction: column; + box-sizing: border-box; + height: 100%; + background: var(--surface); + -webkit-backdrop-filter: var(--surface-backdrop-filter); + backdrop-filter: var(--surface-backdrop-filter); + overflow-y: auto; + overflow-x: hidden; + box-shadow: var(--surface-box-shadow-2); + transition: + opacity var(--transition-duration) var(--closing-delay), + visibility calc(var(--transition-duration) * 2) var(--closing-delay); + opacity: 0; + /* For accessibility (restored when open) */ + visibility: hidden; + } + + :host([position='left']) .container { + border-right: 1px solid var(--surface-border-color); + } + + :host([position='right']) .container { + border-left: 1px solid var(--surface-border-color); + } + + :host([position='bottom']) .container { + border-top: 1px solid var(--surface-border-color); + } + + /* Opened state */ + + :host(:is([opened], [keepopen])) { + translate: 0% 0%; + transition-delay: var(--opening-delay); + z-index: var(--z-index-opened-drawer); + } + + :host(:is([opened], [keepopen])) .container { + transition-delay: var(--opening-delay); + visibility: visible; + opacity: 1; + } + + .resize { + position: absolute; + z-index: 10; + inset: 0; + } + + :host(:is([position='left'], [position='right'])) .resize { + width: var(--hover-size); + cursor: col-resize; + } + + :host([position='left']) .resize { + left: auto; + right: calc(var(--hover-size) * 0.5); + } + + :host([position='right']) .resize { + right: auto; + left: calc(var(--hover-size) * 0.5); + } + + :host([position='bottom']) .resize { + height: var(--hover-size); + bottom: auto; + top: calc(var(--hover-size) * 0.5); + cursor: row-resize; + } + + :host([resizing]) .container { + /* vaadin-grid (used in the outline) blocks the mouse events */ + pointer-events: none; + } + + /* Visual indication of the drawer */ + + :host::before { + content: ''; + position: absolute; + pointer-events: none; + z-index: -1; + inset: var(--hover-size); + transition: opacity var(--transition-duration) var(--closing-delay); + animation: pulse var(--pulse-animation-duration) infinite; + } + :host([document-hidden])::before { + animation: none; + } + + :host([attention-required]) { + --pulse-animation-duration: 2s; + --pulse-first-color: var(--red-500); + --pulse-second-color: var(--red-800); + } + + :host(:is([opened], [keepopen]))::before { + transition-delay: var(--opening-delay); + opacity: 0; + } + .hasmore { + position: absolute; + bottom: 0; + width: 100%; + + text-align: center; + padding-bottom: 0.5em; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--surface-2)); + padding-top: 2em; + display: none; + } + .hasmoreContainer { + height: 100%; + position: relative; + } + :host([position='left']) .hasmoreContainer[canscroll] .hasmore, + :host([position='right']) .hasmoreContainer[canscroll] .hasmore { + display: block; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.reaction( + () => a.panels, + () => this.requestUpdate() + ), this.reaction( + () => l.operationInProgress, + (t) => { + t === j.DragAndDrop && !this.opened && !this.keepOpen ? this.style.setProperty("pointer-events", "none") : this.style.setProperty("pointer-events", "auto"); + } + ), this.reaction( + () => a.getAttentionRequiredPanelConfiguration(), + () => { + const t = a.getAttentionRequiredPanelConfiguration(); + t && !t.floating && this.toggleAttribute(A, t.panel === this.position); + } + ), this.reaction( + () => l.active, + () => { + if (!l.active || !f.isActivationAnimation() || l.activatedFrom === "restore" || l.activatedFrom === "test") + return; + const t = a.getAttentionRequiredPanelConfiguration(); + t && !t.floating && t.panel === this.position || (this.addEventListener("transitionend", this.activationAnimationTransitionEndListener), this.toggleAttribute("no-transition", !0), this.opened = !0, this.style.setProperty("--closing-delay", "var(--duration-1)"), this.style.setProperty("--initial-position", "calc(-1 * (max(var(--size), var(--min-size)) * 1) / 3)"), requestAnimationFrame(() => { + this.toggleAttribute("no-transition", !1), this.opened = !1; + })); + } + ), document.addEventListener("mouseup", () => { + this.resizing = !1, l.setDrawerResizing(!1), this.removeAttribute("resizing"), d.emit("user-select", { allowSelection: !0 }); + }); + const e = $.getDrawerSize(this.position); + e && this.style.setProperty("--size", `${e}px`), document.addEventListener("mousemove", this.resizingMouseMoveListener), this.addEventListener("mouseenter", this.mouseEnterListener), d.on("document-activation-change", (t) => { + this.toggleAttribute("document-hidden", !t.detail.active); + }); + } + firstUpdated(e) { + super.firstUpdated(e), requestAnimationFrame(() => this.toggleAttribute("no-transition", !1)), this.resizeElement.addEventListener("mousedown", (t) => { + t.button === 0 && (this.resizing = !0, l.setDrawerResizing(!0), this.setAttribute("resizing", ""), d.emit("user-select", { allowSelection: !1 })); + }); + } + updated(e) { + super.updated(e), e.has("opened") && this.opened && this.hasAttribute(A) && (this.removeAttribute(A), a.clearAttention()), this.updateScrollable(); + } + disconnectedCallback() { + super.disconnectedCallback(), document.removeEventListener("mousemove", this.resizingMouseMoveListener), this.removeEventListener("mouseenter", this.mouseEnterListener); + } + /** + * Cleans up attributes/styles etc... for dragging operations + * @private + */ + cleanUpDragging() { + this.draggingSectionPanel && (l.setSectionPanelDragging(!1), this.draggingSectionPanel.style.zIndex = "", Array.from(this.querySelectorAll("copilot-section-panel-wrapper")).forEach((e) => { + e.style.removeProperty("transform"), e.removeAttribute(D), e.removeAttribute(B); + }), this.draggingSectionPanel.removeAttribute("dragging"), this.draggingSectionPanel = null); + } + getAllPanels() { + return Array.from(this.querySelectorAll("copilot-section-panel-wrapper")); + } + /** + * Closes the drawer and disables mouse enter event for a while. + */ + forceClose() { + this.closingForcefully = !0, this.opened = !1, setTimeout(() => { + this.closingForcefully = !1; + }, 0.5); + } + mouseEnterListener(e) { + if (this.closingForcefully || l.sectionPanelResizing) + return; + document.querySelector("copilot-main").shadowRoot.querySelector("copilot-drawer-panel[opened]") || (this.opened = !0); + } + render() { + return v` +
+
+ +
+
+
+
+ `; + } + updateScrollable() { + this.hasmoreContainer.toggleAttribute( + "canscroll", + this.container.scrollHeight - this.container.scrollTop - this.container.clientHeight > 10 + ); + } +}; +x([ + R({ reflect: !0, attribute: !0 }) +], b.prototype, "position", 2); +x([ + R({ reflect: !0, type: Boolean }) +], b.prototype, "opened", 2); +x([ + R({ reflect: !0, type: Boolean }) +], b.prototype, "keepOpen", 2); +x([ + y(".container") +], b.prototype, "container", 2); +x([ + y(".hasmoreContainer") +], b.prototype, "hasmoreContainer", 2); +x([ + y(".resize") +], b.prototype, "resizeElement", 2); +x([ + ge({ passive: !0 }) +], b.prototype, "updateScrollable", 1); +b = x([ + E("copilot-drawer-panel") +], b); +var ve = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, Z = (e, t, o, n) => { + for (var i = n > 1 ? void 0 : n ? fe(t, o) : t, r = e.length - 1, s; r >= 0; r--) + (s = e[r]) && (i = (n ? s(t, o, i) : s(i)) || i); + return n && i && ve(t, o, i), i; +}; +let N = class extends ee { + constructor() { + super(...arguments), this.checked = !1; + } + static get styles() { + return S` + .switch { + display: inline-flex; + align-items: center; + gap: var(--space-100); + } + + .switch input { + display: none; + } + + .slider { + background-color: var(--gray-300); + border-radius: 9999px; + cursor: pointer; + inset: 0; + position: absolute; + transition: 0.4s; + height: 0.75rem; + position: relative; + width: 1.5rem; + min-width: 1.5rem; + } + + .slider:before { + background-color: white; + border-radius: 50%; + bottom: 1px; + content: ''; + height: 0.625rem; + left: 1px; + position: absolute; + transition: 0.4s; + width: 0.625rem; + } + + input:checked + .slider { + background-color: var(--selection-color); + } + + input:checked + .slider:before { + transform: translateX(0.75rem); + } + + label:has(input:focus) { + outline: 2px solid var(--selection-color); + outline-offset: 2px; + } + `; + } + render() { + return v` + + `; + } + // @change=${(e: InputEvent) => this.toggleFeatureFlag(e, feature)} +}; +Z([ + R({ reflect: !0, type: Boolean }) +], N.prototype, "checked", 2); +N = Z([ + E("copilot-toggle-button") +], N); +function p(e, t) { + const o = document.createElement(e); + if (t.style && (o.className = t.style), t.icon) + if (typeof t.icon == "string") { + const n = document.createElement("vaadin-icon"); + n.setAttribute("icon", t.icon), o.append(n); + } else + o.append(me(t.icon.strings[0])); + if (t.label) { + const n = document.createElement("span"); + n.className = "label", n.innerHTML = t.label, o.append(n); + } + if (t.hint) { + const n = document.createElement("span"); + n.className = "hint", n.innerHTML = t.hint, o.append(n); + } + return o; +} +function me(e) { + if (!e) return null; + const t = document.createElement("template"); + t.innerHTML = e; + const o = t.content.children; + return o.length === 1 ? o[0] : o; +} +class be { + constructor() { + this.offsetX = 0, this.offsetY = 0; + } + draggingStarts(t, o) { + this.offsetX = o.clientX - t.getBoundingClientRect().left, this.offsetY = o.clientY - t.getBoundingClientRect().top; + } + dragging(t, o) { + const n = o.clientX, i = o.clientY, r = n - this.offsetX, s = n - this.offsetX + t.getBoundingClientRect().width, c = i - this.offsetY, h = i - this.offsetY + t.getBoundingClientRect().height; + return this.adjust(t, r, c, s, h); + } + adjust(t, o, n, i, r) { + let s, c, h, P; + const k = document.documentElement.getBoundingClientRect().width, C = document.documentElement.getBoundingClientRect().height; + return (i + o) / 2 < k / 2 ? (t.style.setProperty("--left", `${o}px`), t.style.setProperty("--right", ""), P = void 0, s = Math.max(0, o)) : (t.style.removeProperty("--left"), t.style.setProperty("--right", `${k - i}px`), s = void 0, P = Math.max(0, k - i)), (n + r) / 2 < C / 2 ? (t.style.setProperty("--top", `${n}px`), t.style.setProperty("--bottom", ""), h = void 0, c = Math.max(0, n)) : (t.style.setProperty("--top", ""), t.style.setProperty("--bottom", `${C - r}px`), c = void 0, h = Math.max(0, C - r)), { + left: s, + right: P, + top: c, + bottom: h + }; + } + anchor(t) { + const { left: o, top: n, bottom: i, right: r } = t.getBoundingClientRect(); + return this.adjust(t, o, n, r, i); + } + anchorLeftTop(t) { + const { left: o, top: n } = t.getBoundingClientRect(); + return t.style.setProperty("--left", `${o}px`), t.style.setProperty("--right", ""), t.style.setProperty("--top", `${n}px`), t.style.setProperty("--bottom", ""), { + left: o, + top: n + }; + } +} +const m = new be(); +var we = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, U = (e, t, o, n) => { + for (var i = n > 1 ? void 0 : n ? ye(t, o) : t, r = e.length - 1, s; r >= 0; r--) + (s = e[r]) && (i = (n ? s(t, o, i) : s(i)) || i); + return n && i && we(t, o, i), i; +}; +const xe = 8; +let T = class extends O { + constructor() { + super(...arguments), this.initialMouseDownPosition = null, this.dragging = !1, this.mouseDownListener = (e) => { + this.initialMouseDownPosition = { x: e.clientX, y: e.clientY }, m.draggingStarts(this, e), document.addEventListener("mousemove", this.documentDraggingMouseMoveEventListener); + }, this.documentDraggingMouseMoveEventListener = (e) => { + if (this.initialMouseDownPosition && !this.dragging) { + const { clientX: t, clientY: o } = e; + this.dragging = Math.abs(t - this.initialMouseDownPosition.x) + Math.abs(o - this.initialMouseDownPosition.y) > xe; + } + this.dragging && (this.setOverlayVisibility(!1), m.dragging(this, e)); + }, this.documentMouseUpListener = (e) => { + if (this.dragging) { + const t = m.dragging(this, e); + f.setActivationButtonPosition(t), this.setOverlayVisibility(!0); + } + this.dragging = !1, this.initialMouseDownPosition = null, document.removeEventListener("mousemove", this.documentDraggingMouseMoveEventListener), this.setMenuBarOnClick(); + }, this.dispatchSpotlightActivationEvent = (e) => { + this.dispatchEvent( + new CustomEvent("spotlight-activation-changed", { + detail: e + }) + ); + }, this.activationBtnClicked = (e) => { + if (this.dragging) { + e?.stopPropagation(), this.dragging = !1; + return; + } + if (l.active && this.handleAttentionRequiredOnClick()) { + e?.stopPropagation(), e?.preventDefault(); + return; + } + e?.stopPropagation(), this.dispatchEvent(new CustomEvent("activation-btn-clicked")); + }, this.handleAttentionRequiredOnClick = () => { + const e = a.getAttentionRequiredPanelConfiguration(); + return e ? e.panel && !e.floating ? (d.emit("open-attention-required-drawer", null), !0) : (a.clearAttention(), !0) : !1; + }, this.setMenuBarOnClick = () => { + const e = this.shadowRoot.querySelector("vaadin-menu-bar-button"); + e && (e.onclick = this.activationBtnClicked); + }; + } + static get styles() { + return [ + L(F), + S` + :host { + --space: 8px; + --height: 28px; + --width: 28px; + position: absolute; + top: clamp(var(--space), var(--top), calc(100vh - var(--height) - var(--space))); + left: clamp(var(--space), var(--left), calc(100vw - var(--width) - var(--space))); + bottom: clamp(var(--space), var(--bottom), calc(100vh - var(--height) - var(--space))); + right: clamp(var(--space), var(--right), calc(100vw - var(--width) - var(--space))); + user-select: none; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + /* Don't add a z-index or anything else that creates a stacking context */ + } + :host .menu-button { + min-width: unset; + } + :host([document-hidden]) { + -webkit-filter: grayscale(100%); /* Chrome, Safari, Opera */ + filter: grayscale(100%); + } + + .menu-button::part(container) { + overflow: visible; + } + + .menu-button vaadin-menu-bar-button { + all: initial; + display: block; + position: relative; + z-index: var(--z-index-activation-button); + width: var(--width); + height: var(--height); + overflow: hidden; + color: transparent; + background: hsl(0 0% 0% / 0.25); + border-radius: 8px; + box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.1); + cursor: default; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); + transition: + box-shadow 0.2s, + background-color 0.2s; + } + + /* pointer-events property is set when the menu is open */ + + .menu-button[style*='pointer-events'] + .monkey-patch-close-on-hover { + position: fixed; /* escapes the host positioning context */ + inset: 0; + bottom: 40px; + z-index: calc(var(--z-index-popover) - 1); + pointer-events: auto; + } + + /* visual effect when active */ + + .menu-button vaadin-menu-bar-button::before { + all: initial; + content: ''; + position: absolute; + inset: -6px; + background-image: radial-gradient(circle at 50% -10%, hsl(221 100% 55% / 0.6) 0%, transparent 60%), + radial-gradient(circle at 25% 40%, hsl(303 71% 64%) 0%, transparent 70%), + radial-gradient(circle at 80% 10%, hsla(262, 38%, 9%, 0.5) 0%, transparent 80%), + radial-gradient(circle at 110% 50%, hsla(147, 100%, 77%, 1) 20%, transparent 100%); + animation: 5s swirl linear infinite; + animation-play-state: paused; + opacity: 0; + transition: opacity 0.5s; + } + + /* vaadin symbol */ + + .menu-button vaadin-menu-bar-button::after { + all: initial; + content: ''; + position: absolute; + inset: 1px; + background: url('data:image/svg+xml;utf8,'); + background-size: 100%; + } + + .menu-button vaadin-menu-bar-button[focus-ring] { + outline: 2px solid var(--selection-color); + outline-offset: 2px; + } + + .menu-button vaadin-menu-bar-button:hover { + background: hsl(0 0% 0% / 0.8); + box-shadow: + 0 0 0 1px hsl(0 0% 100% / 0.1), + 0 2px 8px -1px hsl(0 0% 0% / 0.3); + } + + :host([active]) .menu-button vaadin-menu-bar-button { + background-color: transparent; + box-shadow: + inset 0 0 0 1px hsl(0 0% 0% / 0.2), + 0 2px 8px -1px hsl(0 0% 0% / 0.3); + } + + :host([active]) .menu-button vaadin-menu-bar-button::before { + opacity: 1; + animation-play-state: running; + } + + :host([attention-required]) { + animation: bounce 0.5s; + animation-iteration-count: 2; + } + + :host([attention-required]) [part='attention-required-indicator'] { + top: -1px; + right: -1px; + width: 6px; + height: 6px; + box-sizing: border-box; + border-radius: 100%; + position: absolute; + background: var(--red-500); + z-index: calc(var(--z-index-activation-button) + 1); + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.reaction( + () => a.attentionRequiredPanelTag, + () => { + this.toggleAttribute(A, a.attentionRequiredPanelTag !== null); + } + ), this.reaction( + () => l.active, + () => { + this.toggleAttribute("active", l.active); + }, + { fireImmediately: !0 } + ), this.addEventListener("mousedown", this.mouseDownListener), document.addEventListener("mouseup", this.documentMouseUpListener); + const e = f.getActivationButtonPosition(); + e ? (this.style.setProperty("--left", `${e.left}px`), this.style.setProperty("--bottom", `${e.bottom}px`), this.style.setProperty("--right", `${e.right}px`), this.style.setProperty("--top", `${e.top}px`)) : (this.style.setProperty("--bottom", "var(--space)"), this.style.setProperty("--right", "var(--space)")), d.on("document-activation-change", (t) => { + this.toggleAttribute("document-hidden", !t.detail.active); + }); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("mousedown", this.mouseDownListener), document.removeEventListener("mouseup", this.documentMouseUpListener); + } + /** + * To hide overlay while dragging + * @param visible + */ + setOverlayVisibility(e) { + const t = this.shadowRoot.querySelector("vaadin-menu-bar-button").__overlay; + e ? (t?.style.setProperty("display", "flex"), t?.style.setProperty("visibility", "visible")) : (t?.style.setProperty("display", "none"), t?.style.setProperty("visibility", "invisible")); + } + render() { + const e = [ + { + text: "Vaadin Copilot", + children: [ + { + component: p("vaadin-menu-bar-item", { + label: 'DeactivateActivate Copilot', + hint: f.isActivationShortcut() ? M.toggleCopilot : void 0 + }), + action: "copilot" + }, + { + component: p("vaadin-menu-bar-item", { + label: "Toggle Command Window", + hint: M.toggleCommandWindow, + style: "toggle-spotlight" + }), + action: "spotlight" + } + ] + } + ]; + return l.active && (l.idePluginState?.supportedActions?.find((t) => t === "undo") && (e[0].children = [ + { + component: p("vaadin-menu-bar-item", { + label: "Undo", + hint: M.undo + }), + action: "undo" + }, + { + component: p("vaadin-menu-bar-item", { + label: "Redo", + hint: M.redo + }), + action: "redo" + }, + ...e[0].children + ]), e[0].children = [ + { + component: p("vaadin-menu-bar-item", { + label: "Tell us what you think" + // Label used also in ScreenshotsIT.java + }), + action: "feedback" + }, + { + component: p("vaadin-menu-bar-item", { + label: "Show welcome message" + }), + action: "welcome" + }, + { + component: p("vaadin-menu-bar-item", { + label: "Show keyboard shortcuts" + }), + action: "shortcuts" + }, + { + component: "hr" + }, + ...e[0].children, + { component: "hr" }, + // Settings sub menu + { + text: "Settings", + children: [ + { + component: p("vaadin-menu-bar-item", { + label: "Activation shortcut enabled", + hint: f.isActivationShortcut() ? "✓" : void 0 + }), + action: "shortcut" + }, + { + component: p("vaadin-menu-bar-item", { + label: "Show animation when activating", + hint: f.isActivationAnimation() ? "✓" : void 0 + }), + action: "animate-on-activate" + } + ] + } + ]), v` + + +
+
+ `; + } + closeMenu() { + this.menubar._close(); + } + handleMenuItemClick(e) { + switch (e.action) { + case "copilot": + this.activationBtnClicked(); + break; + case "spotlight": + l.setSpotlightActive(!l.spotlightActive); + break; + case "shortcut": + f.setActivationShortcut(!f.isActivationShortcut()); + break; + case "animate-on-activate": + f.setActivationAnimation(!f.isActivationAnimation()); + break; + case "undo": + case "redo": + d.emit("undoRedo", { undo: e.action === "undo" }); + break; + case "feedback": + a.updatePanel("copilot-feedback-panel", { + floating: !0 + }); + break; + case "welcome": + l.setWelcomeActive(!0), l.setSpotlightActive(!0); + break; + case "shortcuts": + a.updatePanel("copilot-shortcuts-panel", { + floating: !0 + }); + break; + } + } + firstUpdated() { + this.setMenuBarOnClick(), G(this.shadowRoot); + } +}; +U([ + y("vaadin-menu-bar") +], T.prototype, "menubar", 2); +U([ + W() +], T.prototype, "dragging", 2); +T = U([ + E("copilot-activation-button") +], T); +var Pe = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, I = (e, t, o, n) => { + for (var i = n > 1 ? void 0 : n ? ze(t, o) : t, r = e.length - 1, s; r >= 0; r--) + (s = e[r]) && (i = (n ? s(t, o, i) : s(i)) || i); + return n && i && Pe(t, o, i), i; +}; +const g = "resize-dir", _ = "floating-resizing-active"; +let w = class extends O { + constructor() { + super(...arguments), this.panelTag = "", this.dockingItems = [ + { + component: p("vaadin-context-menu-item", { + icon: u.dockRight, + label: "Dock right" + }), + panel: "right" + }, + { + component: p("vaadin-context-menu-item", { + icon: u.dockLeft, + label: "Dock left" + }), + panel: "left" + }, + { + component: p("vaadin-context-menu-item", { + icon: u.dockBottom, + label: "Dock bottom" + }), + panel: "bottom" + } + ], this.floatingResizingStarted = !1, this.resizingInDrawerStarted = !1, this.toggling = !1, this.rectangleBeforeResizing = null, this.floatingResizeHandlerMouseMoveListener = (e) => { + if (!this.panelInfo?.floating || this.floatingResizingStarted || !this.panelInfo?.expanded) + return; + const t = this.getBoundingClientRect(), o = Math.abs(e.clientX - t.x), n = Math.abs(t.x + t.width - e.clientX), i = Math.abs(e.clientY - t.y), r = Math.abs(t.y + t.height - e.clientY), s = Number.parseInt( + window.getComputedStyle(this).getPropertyValue("--floating-offset-resize-threshold"), + 10 + ); + let c = ""; + if (o < s ? i < s ? (c = "nw-resize", this.setAttribute(g, "top left")) : r < s ? (c = "sw-resize", this.setAttribute(g, "bottom left")) : (c = "col-resize", this.setAttribute(g, "left")) : n < s ? i < s ? (c = "ne-resize", this.setAttribute(g, "top right")) : r < s ? (c = "se-resize", this.setAttribute(g, "bottom right")) : (c = "col-resize", this.setAttribute(g, "right")) : r < s ? (c = "row-resize", this.setAttribute(g, "bottom")) : i < s && (c = "row-resize", this.setAttribute(g, "top")), c !== "") { + const h = window.getComputedStyle(this), P = Number.parseInt(h.borderTopWidth, 10), k = Number.parseInt(h.borderTopWidth, 10), C = Number.parseInt(h.borderLeftWidth, 10), J = Number.parseInt(h.borderRightWidth, 10); + this.rectangleBeforeResizing = this.getBoundingClientRect(), this.rectangleBeforeResizing.width -= C + J, this.rectangleBeforeResizing.height -= P + k, this.style.setProperty("--resize-cursor", c); + } else + this.style.removeProperty("--resize-cursor"), this.removeAttribute(g); + this.toggleAttribute(_, c !== ""); + }, this.floatingResizingMouseDownListener = (e) => { + this.hasAttribute(_) && e.button === 0 && (e.stopPropagation(), e.preventDefault(), m.anchorLeftTop(this), this.floatingResizingStarted = !0, this.toggleAttribute("resizing", !0), q(() => { + l.sectionPanelResizing = !0; + })); + }, this.floatingResizingMouseLeaveListener = () => { + this.panelInfo?.floating && (this.floatingResizingStarted || (this.removeAttribute("resizing"), this.removeAttribute(_), this.removeAttribute("dragging"), this.style.removeProperty("--resize-cursor"), this.removeAttribute(g))); + }, this.floatingResizingMouseMoveListener = (e) => { + if (!this.panelInfo?.floating || !this.floatingResizingStarted) + return; + const t = this.getAttribute(g); + if (t === null) + return; + e.stopPropagation(), e.preventDefault(); + const { clientX: o, clientY: n } = e, i = t.split(" "), r = this.rectangleBeforeResizing; + if (i.includes("left")) { + const s = Math.max(0, o); + this.setFloatingResizeDirectionProps("left", s, r.left - s + r.width); + } + if (i.includes("right")) { + const s = Math.max(0, o); + this.setFloatingResizeDirectionProps("right", s, s - r.right + r.width); + } + if (i.includes("top")) { + const s = Math.max(0, n), c = r.top - s + r.height; + this.setFloatingResizeDirectionProps("top", s, void 0, c); + } + if (i.includes("bottom")) { + const s = Math.max(0, n), c = s - r.bottom + r.height; + this.setFloatingResizeDirectionProps("bottom", s, void 0, c); + } + }, this.setFloatingResizeDirectionProps = (e, t, o, n) => { + o && o > Number.parseFloat(window.getComputedStyle(this).getPropertyValue("--min-width")) && (this.style.setProperty(`--${e}`, `${t}px`), this.style.setProperty("width", `${o}px`)); + const i = window.getComputedStyle(this), r = Number.parseFloat(i.getPropertyValue("--header-height")), s = Number.parseFloat(i.getPropertyValue("--floating-offset-resize-threshold")) / 2; + n && n > r + s && (this.style.setProperty(`--${e}`, `${t}px`), this.style.setProperty("height", `${n}px`), this.container.style.setProperty("margin-top", "calc(var(--floating-offset-resize-threshold) / 4)"), this.container.style.height = `calc(${n}px - var(--floating-offset-resize-threshold) / 2)`); + }, this.floatingResizingMouseUpListener = (e) => { + if (!this.floatingResizingStarted || !this.panelInfo?.floating) + return; + e.stopPropagation(), e.preventDefault(), this.floatingResizingStarted = !1, q(() => { + l.sectionPanelResizing = !1; + }); + const { width: t, height: o } = this.getBoundingClientRect(), { left: n, top: i, bottom: r, right: s } = m.anchor(this), c = window.getComputedStyle(this.container), h = Number.parseInt(c.borderTopWidth, 10), P = Number.parseInt(c.borderTopWidth, 10); + a.updatePanel(this.panelInfo.tag, { + width: t, + height: o - (h + P), + floatingPosition: { + ...this.panelInfo.floatingPosition, + left: n, + top: i, + bottom: r, + right: s + } + }), this.style.removeProperty("width"), this.style.removeProperty("height"), this.container.style.removeProperty("height"), this.container.style.removeProperty("margin-top"), this.setCssSizePositionProperties(), this.toggleAttribute("dragging", !1); + }, this.transitionEndEventListener = () => { + this.toggling && (this.toggling = !1, m.anchor(this)); + }, this.resizeInDrawerMouseDownListener = (e) => { + e.button === 0 && (this.resizingInDrawerStarted = !0, this.setAttribute("resizing", ""), d.emit("user-select", { allowSelection: !1 })); + }, this.resizeInDrawerMouseMoveListener = (e) => { + if (!this.resizingInDrawerStarted) + return; + const { y: t } = e; + e.stopPropagation(), e.preventDefault(); + const o = t - this.getBoundingClientRect().top; + this.style.setProperty("--section-height", `${o}px`), a.updatePanel(this.panelInfo.tag, { + height: o + }); + }, this.resizeInDrawerMouseUpListener = () => { + this.resizingInDrawerStarted && (this.panelInfo?.floating || (this.resizingInDrawerStarted = !1, this.removeAttribute("resizing"), d.emit("user-select", { allowSelection: !0 }), this.style.setProperty("--section-height", `${this.getBoundingClientRect().height}px`))); + }, this.sectionPanelMouseEnterListener = () => { + this.hasAttribute(A) && (this.removeAttribute(A), a.clearAttention()); + }, this.contentAreaMouseDownListener = () => { + a.addFocusedFloatingPanel(this.panelInfo); + }, this.documentMouseUpEventListener = () => { + document.removeEventListener("mousemove", this.draggingEventListener), this.panelInfo?.floating && (this.toggleAttribute("dragging", !1), l.setSectionPanelDragging(!1)); + }, this.panelHeaderMouseDownEventListener = (e) => { + e.button === 0 && (a.addFocusedFloatingPanel(this.panelInfo), !this.hasAttribute(g) && (e.target instanceof HTMLButtonElement && e.target.getAttribute("part") === "title-button" ? this.startDraggingDebounce(e) : this.startDragging(e))); + }, this.panelHeaderMouseUpEventListener = (e) => { + e.button === 0 && this.startDraggingDebounce.clear(); + }, this.startDragging = (e) => { + m.draggingStarts(this, e), document.addEventListener("mousemove", this.draggingEventListener), l.setSectionPanelDragging(!0), this.panelInfo?.floating ? this.toggleAttribute("dragging", !0) : this.parentElement.sectionPanelDraggingStarted(this, e), e.preventDefault(), e.stopPropagation(); + }, this.startDraggingDebounce = V(this.startDragging, 200), this.draggingEventListener = (e) => { + const t = m.dragging(this, e); + if (this.panelInfo?.floating && this.panelInfo?.floatingPosition) { + e.preventDefault(); + const { left: o, top: n, bottom: i, right: r } = t; + a.updatePanel(this.panelInfo.tag, { + floatingPosition: { + ...this.panelInfo.floatingPosition, + left: o, + top: n, + bottom: i, + right: r + } + }); + } + }, this.setCssSizePositionProperties = () => { + const e = a.getPanelByTag(this.panelTag); + if (e && (e.height !== void 0 && (this.panelInfo?.floating || e.panel === "left" || e.panel === "right" ? this.style.setProperty("--section-height", `${e.height}px`) : this.style.removeProperty("--section-height")), e.width !== void 0 && (e.floating || e.panel === "bottom" ? this.style.setProperty("--section-width", `${e.width}px`) : this.style.removeProperty("--section-width")), e.floating && e.floatingPosition && !this.toggling)) { + const { left: t, top: o, bottom: n, right: i } = e.floatingPosition; + this.style.setProperty("--left", t !== void 0 ? `${t}px` : "auto"), this.style.setProperty("--top", o !== void 0 ? `${o}px` : "auto"), this.style.setProperty("--bottom", n !== void 0 ? `${n}px` : ""), this.style.setProperty("--right", i !== void 0 ? `${i}px` : ""); + } + }, this.renderPopupButton = () => { + if (!this.panelInfo) + return z; + let e; + return this.panelInfo.panel === void 0 ? e = "Close the popup" : e = this.panelInfo.floating ? `Dock ${this.panelInfo.header} to ${this.panelInfo.panel}` : `Open ${this.panelInfo.header} as a popup`, v` + + + + `; + }, this.changePanelFloating = (e) => { + if (this.panelInfo) + if (e.stopPropagation(), H(this), this.panelInfo?.floating) + a.updatePanel(this.panelInfo?.tag, { floating: !1 }); + else { + let t; + if (this.panelInfo.floatingPosition) + t = this.panelInfo?.floatingPosition; + else { + const { left: i, top: r } = this.getBoundingClientRect(); + t = { + left: i, + top: r + }; + } + let o = this.panelInfo?.height; + o === void 0 && this.panelInfo.expanded && (o = Number.parseInt(window.getComputedStyle(this).height, 10)), this.parentElement.forceClose(), a.updatePanel(this.panelInfo?.tag, { + floating: !0, + width: this.panelInfo?.width || Number.parseInt(window.getComputedStyle(this).width, 10), + height: o, + floatingPosition: t + }), a.addFocusedFloatingPanel(this.panelInfo); + } + }, this.toggleExpand = (e) => { + this.panelInfo && (e.stopPropagation(), m.anchorLeftTop(this), a.updatePanel(this.panelInfo.tag, { + expanded: !this.panelInfo.expanded + }), this.toggling = !0, this.toggleAttribute("expanded", this.panelInfo.expanded)); + }; + } + static get styles() { + return [ + L(F), + S` + * { + box-sizing: border-box; + } + + :host { + flex: none; + display: grid; + align-content: start; + grid-template-rows: auto 1fr; + transition: grid-template-rows var(--duration-2); + overflow: hidden; + position: relative; + --min-width: 160px; + --resize-div-size: 10px; + --header-height: 37px; + --content-height: calc(var(--section-height) - var(--header-height)); + --content-width: var(--content-width, 100%); + --floating-border-width: 1px; + --floating-offset-resize-threshold: 8px; + cursor: var(--cursor, var(--resize-cursor, default)); + } + + :host(:not([expanded])) { + grid-template-rows: auto 0fr; + --content-height: 0px !important; + } + + [part='header'] { + align-items: center; + color: var(--color-high-contrast); + display: flex; + flex: none; + font: var(--font-small-bold); + justify-content: space-between; + min-width: 100%; + user-select: none; + -webkit-user-select: none; + width: var(--min-width); + height: var(--header-height); + } + + :host([floating]:not([expanded])) [part='header'] { + --min-width: unset; + } + + [part='header'] { + border-bottom: 1px solid var(--border-color); + } + + :host([floating]) [part='header'] { + transition: border-color var(--duration-2); + } + + :host([floating]:not([expanded])) [part='header'] { + border-color: transparent; + } + + [part='title'] { + flex: auto; + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + } + + [part='content'] { + height: var(--content-height); + overflow: auto; + transition: + height var(--duration-2), + width var(--duration-2), + opacity var(--duration-2), + visibility calc(var(--duration-2) * 2); + } + + [part='drawer-resize'] { + resize: vertical; + cursor: row-resize; + position: absolute; + bottom: -5px; + left: 0; + width: 100%; + height: 10px; + } + + :host([floating]) [part='drawer-resize'] { + display: none; + } + + :host(:not([expanded])) [part='drawer-resize'] { + display: none; + } + + :host(:not([floating]):not(:last-child)) { + border-bottom: 1px solid var(--border-color); + } + + :host(:not([expanded])) [part='content'] { + opacity: 0; + visibility: hidden; + } + + :host([floating]:not([expanded])) [part='content'] { + width: 0; + height: 0; + } + + :host(:not([expanded])) [part='content'][style*='height'] { + height: 0 !important; + } + + :host(:not([expanded])) [part='content'][style*='width'] { + width: 0 !important; + } + + :host([floating]) { + position: fixed; + min-width: 0; + min-height: 0; + z-index: calc(var(--z-index-floating-panel) + var(--z-index-focus, 0)); + top: clamp(0px, var(--top), calc(100vh - var(--section-height, var(--header-height)) * 0.5)); + left: clamp(calc(var(--section-width) * -0.5), var(--left), calc(100vw - var(--section-width) * 0.5)); + bottom: clamp( + calc(var(--section-height, var(--header-height)) * -0.5), + var(--bottom), + calc(100vh - var(--section-height, var(--header-height)) * 0.5) + ); + right: clamp(calc(var(--section-width) * -0.5), var(--right), calc(100vw - var(--section-width) * 0.5)); + width: var(--section-width); + overflow: visible; + } + :host([floating]) [part='container'] { + background: var(--surface); + border: var(--floating-border-width) solid var(--surface-border-color); + -webkit-backdrop-filter: var(--surface-backdrop-filter); + backdrop-filter: var(--surface-backdrop-filter); + border-radius: var(--radius-2); + margin: auto; + box-shadow: var(--surface-box-shadow-2); + overflow: hidden; + } + :host([floating][expanded]) [part='container'] { + height: calc(100% - var(--floating-offset-resize-threshold) / 2); + width: calc(100% - var(--floating-offset-resize-threshold) / 2); + } + + :host([floating]:not([expanded])) { + width: unset; + } + + :host([floating]) .drag-handle { + cursor: var(--resize-cursor, move); + } + + :host([floating][expanded]) [part='content'] { + min-width: var(--min-width); + min-height: 0; + max-height: 85vh; + max-width: 90vw; + width: var(--content-width); + } + + /* :hover for Firefox, :active for others */ + + :host([floating][expanded]) [part='content']:is(:hover, :active) { + transition: none; + } + + [part='header'] button { + align-items: center; + appearance: none; + background: transparent; + border: 0px; + border-radius: var(--radius-1); + color: var(--color); + display: flex; + flex: 0 0 auto; + height: 2.25rem; + justify-content: center; + padding: 0px; + width: 16px; + margin-left: 10px; + margin-right: 10px; + } + + div.actions { + width: auto; + } + + :host(:not([expanded])) div.actions { + display: none; + } + + [part='title'] button { + color: var(--color-high-contrast); + font: var(--font-xsmall-strong); + width: auto; + } + + [part='header'] button:hover { + color: var(--color-high-contrast); + } + + [part='header'] button:focus-visible { + outline: 2px solid var(--blue-500); + outline-offset: -2px; + } + + [part='header'] button svg { + display: block; + } + + [part='header'] .actions:empty { + display: none; + } + + ::slotted(*) { + box-sizing: border-box; + display: block; + height: var(--content-height, var(--default-content-height, 100%)); + /* padding: var(--space-150); */ + width: 100%; + } + + :host(:not([floating])) ::slotted(*) { + /* padding-top: var(--space-50); */ + } + /*workaround for outline to have a explicit height while floating by default. + may be removed after https://github.com/vaadin/web-components/issues/7620 is solved + */ + :host([floating][expanded][paneltag='copilot-outline-panel']) { + --grid-default-height: 400px; + } + + :host([dragging]) { + opacity: 0.4; + } + + :host([dragging]) [part='content'] { + pointer-events: none; + } + + :host([attention-required]) { + --pulse-animation-duration: 2s; + --pulse-first-color: var(--red-500); + --pulse-second-color: var(--red-800); + --pulse-size: 12px; + animation: pulse 2s infinite; + } + + :host([resizing]), + :host([resizing]) [part='content'] { + transition: none; + } + :host([resizing]) [part='content'] { + height: 100%; + } + + :host([hiding-while-drag-and-drop]) { + display: none; + } + + // dragging in drawer + + :host(:not([floating])) .drag-handle { + cursor: grab; + } + + :host(:not([floating])[dragging]) .drag-handle { + cursor: grabbing; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.setAttribute("role", "region"), this.reaction( + () => a.getAttentionRequiredPanelConfiguration(), + () => { + const e = a.getAttentionRequiredPanelConfiguration(); + this.toggleAttribute(A, e?.tag === this.panelTag && e?.floating); + } + ), this.addEventListener("mouseenter", this.sectionPanelMouseEnterListener), document.addEventListener("mousemove", this.resizeInDrawerMouseMoveListener), document.addEventListener("mouseup", this.resizeInDrawerMouseUpListener), this.reaction( + () => l.operationInProgress, + () => { + requestAnimationFrame(() => { + this.toggleAttribute( + "hiding-while-drag-and-drop", + l.operationInProgress === j.DragAndDrop && this.panelInfo?.floating && !this.panelInfo.showWhileDragging + ); + }); + } + ), this.reaction( + () => a.floatingPanelsZIndexOrder, + () => { + this.style.setProperty("--z-index-focus", `${a.getFloatingPanelZIndex(this.panelTag)}`); + }, + { fireImmediately: !0 } + ), this.addEventListener("transitionend", this.transitionEndEventListener), this.addEventListener("mousemove", this.floatingResizeHandlerMouseMoveListener), this.addEventListener("mousedown", this.floatingResizingMouseDownListener), this.addEventListener("mouseleave", this.floatingResizingMouseLeaveListener), document.addEventListener("mousemove", this.floatingResizingMouseMoveListener), document.addEventListener("mouseup", this.floatingResizingMouseUpListener); + } + disconnectedCallback() { + super.disconnectedCallback(), this.removeEventListener("mouseenter", this.sectionPanelMouseEnterListener), this.drawerResizeElement.removeEventListener("mousedown", this.resizeInDrawerMouseDownListener), document.removeEventListener("mousemove", this.resizeInDrawerMouseMoveListener), document.removeEventListener("mouseup", this.resizeInDrawerMouseUpListener), this.removeEventListener("mousemove", this.floatingResizeHandlerMouseMoveListener), this.removeEventListener("mousedown", this.floatingResizingMouseDownListener), document.removeEventListener("mousemove", this.floatingResizingMouseMoveListener), document.removeEventListener("mouseup", this.floatingResizingMouseUpListener); + } + willUpdate(e) { + super.willUpdate(e), e.has("panelTag") && (this.panelInfo = a.getPanelByTag(this.panelTag), this.setAttribute("aria-labelledby", this.panelInfo.tag.concat("-title"))), this.toggleAttribute("floating", this.panelInfo?.floating); + } + updated(e) { + super.updated(e), this.setCssSizePositionProperties(); + } + firstUpdated(e) { + super.firstUpdated(e), document.addEventListener("mouseup", this.documentMouseUpEventListener), this.headerDraggableArea.addEventListener("mousedown", this.panelHeaderMouseDownEventListener), this.headerDraggableArea.addEventListener("mouseup", this.panelHeaderMouseUpEventListener), this.toggleAttribute("expanded", this.panelInfo?.expanded), te(this), this.setCssSizePositionProperties(), this.contentArea.addEventListener("mousedown", this.contentAreaMouseDownListener), this.drawerResizeElement.addEventListener("mousedown", this.resizeInDrawerMouseDownListener), G(this.shadowRoot); + } + render() { + return this.panelInfo ? v` +
+
+ ${this.panelInfo.expandable !== !1 ? v` ` : z} +

+ +

+
${this.renderActions()}
+ ${this.renderHelpButton()} ${this.renderPopupButton()} +
+
+ +
+
+
+ ` : z; + } + getPopupButtonIcon() { + return this.panelInfo ? this.panelInfo.panel === void 0 ? u.close : this.panelInfo.floating ? this.panelInfo.panel === "bottom" ? u.dockBottom : this.panelInfo.panel === "left" ? u.dockLeft : this.panelInfo.panel === "right" ? u.dockRight : z : u.popup : z; + } + renderHelpButton() { + return this.panelInfo?.helpUrl ? v` ` : z; + } + renderActions() { + if (!this.panelInfo?.actionsTag) + return z; + const e = this.panelInfo.actionsTag; + return ie(`<${e}>`); + } + changeDockingPanel(e) { + const t = e.detail.value.panel; + if (this.panelInfo?.panel !== t) { + const o = a.panels.filter((n) => n.panel === t).map((n) => n.panelOrder).sort((n, i) => i - n)[0]; + H(this), a.updatePanel(this.panelInfo.tag, { panel: t, panelOrder: o + 1 }); + } + this.panelInfo.floating && this.changePanelFloating(e); + } +}; +I([ + R() +], w.prototype, "panelTag", 2); +I([ + y(".drag-handle") +], w.prototype, "headerDraggableArea", 2); +I([ + y("#content") +], w.prototype, "contentArea", 2); +I([ + y('[part="drawer-resize"]') +], w.prototype, "drawerResizeElement", 2); +I([ + y('[part="container"]') +], w.prototype, "container", 2); +I([ + W() +], w.prototype, "dockingItems", 2); +w = I([ + E("copilot-section-panel-wrapper") +], w); +d.on("undoRedo", (e) => { + const o = { files: e.detail.files ?? le(), uiId: ce() }, n = e.detail.undo ? "copilot-plugin-undo" : "copilot-plugin-redo"; + d.send(n, o); +}); +var Ae = Object.defineProperty, Ie = Object.getOwnPropertyDescriptor, ke = (e, t, o, n) => { + for (var i = n > 1 ? void 0 : n ? Ie(t, o) : t, r = e.length - 1, s; r >= 0; r--) + (s = e[r]) && (i = (n ? s(t, o, i) : s(i)) || i); + return n && i && Ae(t, o, i), i; +}; +let Y = class extends O { + static get styles() { + return [ + L(oe), + L(ne), + S` + :host { + --lumo-secondary-text-color: var(--dev-tools-text-color); + --lumo-contrast-80pct: var(--dev-tools-text-color-emphasis); + --lumo-contrast-60pct: var(--dev-tools-text-color-secondary); + --lumo-font-size-m: 14px; + + position: fixed; + bottom: 2.5rem; + right: 0rem; + visibility: visible; /* Always show, even if copilot is off */ + user-select: none; + z-index: 10000; + + --dev-tools-text-color: rgba(255, 255, 255, 0.8); + + --dev-tools-text-color-secondary: rgba(255, 255, 255, 0.65); + --dev-tools-text-color-emphasis: rgba(255, 255, 255, 0.95); + --dev-tools-text-color-active: rgba(255, 255, 255, 1); + + --dev-tools-background-color-inactive: rgba(45, 45, 45, 0.25); + --dev-tools-background-color-active: rgba(45, 45, 45, 0.98); + --dev-tools-background-color-active-blurred: rgba(45, 45, 45, 0.85); + + --dev-tools-border-radius: 0.5rem; + --dev-tools-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.4); + + --dev-tools-blue-hsl: 206, 100%, 70%; + --dev-tools-blue-color: hsl(var(--dev-tools-blue-hsl)); + --dev-tools-green-hsl: 145, 80%, 42%; + --dev-tools-green-color: hsl(var(--dev-tools-green-hsl)); + --dev-tools-grey-hsl: 0, 0%, 50%; + --dev-tools-grey-color: hsl(var(--dev-tools-grey-hsl)); + --dev-tools-yellow-hsl: 38, 98%, 64%; + --dev-tools-yellow-color: hsl(var(--dev-tools-yellow-hsl)); + --dev-tools-red-hsl: 355, 100%, 68%; + --dev-tools-red-color: hsl(var(--dev-tools-red-hsl)); + + /* Needs to be in ms, used in JavaScript as well */ + --dev-tools-transition-duration: 180ms; + } + + .notification-tray { + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + margin: 0.5rem; + flex: none; + } + + @supports (backdrop-filter: blur(1px)) { + .notification-tray div.message { + backdrop-filter: blur(8px); + } + + .notification-tray div.message { + background-color: var(--dev-tools-background-color-active-blurred); + } + } + + .notification-tray .message { + pointer-events: auto; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + max-width: 40rem; + box-sizing: border-box; + border-radius: var(--dev-tools-border-radius); + margin-top: 0.5rem; + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + animation: slideIn var(--dev-tools-transition-duration); + box-shadow: var(--dev-tools-box-shadow); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .notification-tray .message.animate-out { + animation: slideOut forwards var(--dev-tools-transition-duration); + } + + .notification-tray .message .message-details { + word-break: break-all; + } + + .message.information { + --dev-tools-notification-color: var(--dev-tools-blue-color); + } + + .message.warning { + --dev-tools-notification-color: var(--dev-tools-yellow-color); + } + + .message.error { + --dev-tools-notification-color: var(--dev-tools-red-color); + } + + .message { + display: flex; + padding: 0.1875rem 0.75rem 0.1875rem 2rem; + background-clip: padding-box; + } + + .message.log { + padding-left: 0.75rem; + } + + .message-content { + max-width: 100%; + margin-right: 0.5rem; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + } + + .message-heading { + position: relative; + display: flex; + align-items: center; + margin: 0.125rem 0; + } + + .message .message-details { + font-weight: 400; + color: var(--dev-tools-text-color-secondary); + margin: 0.25rem 0; + display: flex; + flex-direction: column; + } + + .message .message-details[hidden] { + display: none; + } + + .message .message-details p { + display: inline; + margin: 0; + margin-right: 0.375em; + word-break: break-word; + } + + .message .persist { + color: var(--dev-tools-text-color-secondary); + white-space: nowrap; + margin: 0.375rem 0; + display: flex; + align-items: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + .message .persist::before { + content: ''; + width: 1em; + height: 1em; + border-radius: 0.2em; + margin-right: 0.375em; + background-color: rgba(255, 255, 255, 0.3); + } + + .message .persist:hover::before { + background-color: rgba(255, 255, 255, 0.4); + } + + .message .persist.on::before { + background-color: rgba(255, 255, 255, 0.9); + } + + .message .persist.on::after { + content: ''; + order: -1; + position: absolute; + width: 0.75em; + height: 0.25em; + border: 2px solid var(--dev-tools-background-color-active); + border-width: 0 0 2px 2px; + transform: translate(0.05em, -0.05em) rotate(-45deg) scale(0.8, 0.9); + } + + .message .dismiss-message { + font-weight: 600; + align-self: stretch; + display: flex; + align-items: center; + padding: 0 0.25rem; + margin-left: 0.5rem; + color: var(--dev-tools-text-color-secondary); + } + + .message .dismiss-message:hover { + color: var(--dev-tools-text-color); + } + + .message.log { + color: var(--dev-tools-text-color-secondary); + } + + .message:not(.log) .message-heading { + font-weight: 500; + } + + .message.has-details .message-heading { + color: var(--dev-tools-text-color-emphasis); + font-weight: 600; + } + + .message-heading::before { + position: absolute; + margin-left: -1.5rem; + display: inline-block; + text-align: center; + font-size: 0.875em; + font-weight: 600; + line-height: calc(1.25em - 2px); + width: 14px; + height: 14px; + box-sizing: border-box; + border: 1px solid transparent; + border-radius: 50%; + } + + .message.information .message-heading::before { + content: 'i'; + border-color: currentColor; + color: var(--dev-tools-notification-color); + } + + .message.warning .message-heading::before, + .message.error .message-heading::before { + content: '!'; + color: var(--dev-tools-background-color-active); + background-color: var(--dev-tools-notification-color); + } + + .ahreflike { + font-weight: 500; + color: var(--dev-tools-text-color-secondary); + text-decoration: underline; + cursor: pointer; + } + + @keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0%); + opacity: 1; + } + } + + @keyframes slideOut { + from { + transform: translateX(0%); + opacity: 1; + } + to { + transform: translateX(100%); + opacity: 0; + } + } + + @keyframes fade-in { + 0% { + opacity: 0; + } + } + + @keyframes bounce { + 0% { + transform: scale(0.8); + } + 50% { + transform: scale(1.5); + background-color: hsla(var(--dev-tools-red-hsl), 1); + } + 100% { + transform: scale(1); + } + } + ` + ]; + } + render() { + return v`
+ ${l.notifications.map((e) => this.renderNotification(e))} +
`; + } + renderNotification(e) { + return v` +
+
+
${e.message}
+
+ ${se(e.details)} + ${e.link ? v`Learn more` : ""} +
+ ${e.dismissId ? v`
{ + this.toggleDontShowAgain(e); + }}> + ${Ce(e)} +
` : ""} +
+
{ + de(e), t.stopPropagation(); + }}> + Dismiss +
+
+ `; + } + toggleDontShowAgain(e) { + e.dontShowAgain = !e.dontShowAgain, this.requestUpdate(); + } +}; +Y = ke([ + E("copilot-notifications-container") +], Y); +function Ce(e) { + return e.dontShowAgainMessage ? e.dontShowAgainMessage : "Do not show this again"; +} +he({ + type: re.WARNING, + message: "Development Mode", + details: "This application is running in development mode.", + dismissId: "devmode" +}); +const K = V(() => { + d.emit("component-tree-updated", {}); +}); +d.on("vite-after-update", () => { + K(); +}); +const X = window?.Vaadin?.connectionState?.stateChangeListeners; +X ? X.add((e, t) => { + e === "loading" && t === "connected" && l.active && K(); +}) : console.warn("Unable to add listener for connection state changes"); +d.on("copilot-plugin-state", (e) => { + l.setIdePluginState(e.detail), e.detail.active && ae("plugin-active", `${e.detail.version}-${e.detail.ide}`), e.preventDefault(); +}); diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-log-plugin-DZJhiSMo.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-log-plugin-DZJhiSMo.js new file mode 100644 index 0000000..ba6f6bb --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-log-plugin-DZJhiSMo.js @@ -0,0 +1,202 @@ +import { G as c, l as k, H as d, x as l, J as M, K as R, M as D, b as T, L as C, t as x } from "./copilot-ppBO0zjz.js"; +import { r as v } from "./state-B-CMA1Q2.js"; +import { B as L } from "./base-panel-vYmwbGFU.js"; +import { i as n } from "./icons-BzskfjAz.js"; +const S = "copilot-log-panel{padding:var(--space-100);font:var(--font-xsmall);display:flex;flex-direction:column;gap:var(--space-50);overflow-y:auto}copilot-log-panel .row{display:flex;align-items:flex-start;padding:var(--space-50) var(--space-100);border-radius:var(--radius-2);gap:var(--space-100)}copilot-log-panel .row.information{background-color:var(--blue-50)}copilot-log-panel .row.warning{background-color:var(--yellow-50)}copilot-log-panel .row.error{background-color:var(--red-50)}copilot-log-panel .type{margin-top:var(--space-25)}copilot-log-panel .type.error{color:var(--red)}copilot-log-panel .type.warning{color:var(--yellow)}copilot-log-panel .type.info{color:var(--color)}copilot-log-panel .message{display:flex;flex-direction:column;flex-grow:1;gap:var(--space-25);overflow:hidden}copilot-log-panel .message>*{white-space:nowrap}copilot-log-panel .firstrow{display:flex;align-items:baseline;gap:.5em;flex-direction:column}copilot-log-panel .firstrowmessage{width:100%}copilot-log-panel button{padding:0;border:0;background:transparent}copilot-log-panel svg{height:12px;width:12px}copilot-log-panel .secondrow,copilot-log-panel .timestamp{font-size:var(--font-size-0);line-height:var(--line-height-1)}copilot-log-panel .expand span{height:12px;width:12px}"; +var I = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (e, t, a, o) => { + for (var s = o > 1 ? void 0 : o ? _(t, a) : t, p = e.length - 1, i; p >= 0; p--) + (i = e[p]) && (s = (o ? i(t, a, s) : i(s)) || s); + return o && s && I(t, a, s), s; +}; +class b { + constructor() { + this.showTimestamps = !1, C(this); + } + toggleShowTimestamps() { + this.showTimestamps = !this.showTimestamps; + } +} +const g = new b(); +let r = class extends L { + constructor() { + super(), this.unreadErrors = !1, this.messages = [], this.nextMessageId = 1, this.transitionDuration = 0, this.catchErrors(); + } + connectedCallback() { + super.connectedCallback(), this.onCommand("log", (e) => { + this.handleLogEventData({ type: e.data.type, message: e.data.message }); + }), this.onEventBus("log", (e) => this.handleLogEvent(e)), this.onEventBus("update-log", (e) => this.updateLog(e.detail)), this.onEventBus("notification-shown", (e) => this.handleNotification(e)), this.onEventBus("clear-log", () => this.clear()), this.transitionDuration = parseInt( + window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"), + 10 + ); + } + clear() { + this.messages = []; + } + handleNotification(e) { + this.log(e.detail.type, e.detail.message, !0, e.detail.details, e.detail.link, void 0); + } + handleLogEvent(e) { + this.handleLogEventData(e.detail); + } + handleLogEventData(e) { + this.log( + e.type, + e.message, + !!e.internal, + e.details, + e.link, + c(e.expandedMessage), + c(e.expandedDetails), + e.id + ); + } + activate() { + this.unreadErrors = !1, this.updateComplete.then(() => { + const e = this.renderRoot.querySelector(".message:last-child"); + e && e.scrollIntoView(); + }); + } + format(e) { + return e.message ? e.message.toString() : e.toString(); + } + catchErrors() { + const e = window.Vaadin.ConsoleErrors; + window.Vaadin.ConsoleErrors = { + push: (t) => { + k.attentionRequiredPanelTag = y.tag, t[0].type !== void 0 && t[0].message !== void 0 ? this.log(t[0].type, t[0].message, !!t[0].internal, t[0].details, t[0].link) : this.log(d.ERROR, t.map((a) => this.format(a)).join(" "), !1), e.push(t); + } + }; + } + render() { + return l` + ${this.messages.map((e) => this.renderMessage(e))} `; + } + renderMessage(e) { + let t, a, o; + return e.type === d.ERROR ? (t = "error", o = n.exclamationMark, a = "Error") : e.type === d.WARNING ? (t = "warning", o = n.warning, a = "Warning") : (t = "info", o = n.info, a = "Info"), e.internal && (t += " internal"), l` + + `; + } + log(e, t, a, o, s, p, i, $) { + const E = this.nextMessageId; + this.nextMessageId += 1; + const u = M(t, 200); + u !== t && !i && (i = t); + const m = { + id: E, + type: e, + message: u, + details: o, + link: s, + dontShowAgain: !1, + deleted: !1, + expanded: !1, + expandedMessage: p, + expandedDetails: i, + timestamp: /* @__PURE__ */ new Date(), + internal: a, + userId: $ + }; + for (this.messages.push(m); this.messages.length > r.MAX_LOG_ROWS; ) + this.messages.shift(); + return this.requestUpdate(), this.updateComplete.then(() => { + const f = this.renderRoot.querySelector(".message:last-child"); + f ? (setTimeout(() => f.scrollIntoView({ behavior: "smooth" }), this.transitionDuration), this.unreadErrors = !1) : e === d.ERROR && (this.unreadErrors = !0); + }), m; + } + updateLog(e) { + let t = this.messages.find((a) => a.userId === e.id); + t || (t = this.log(d.INFORMATION, "", !1)), Object.assign(t, e), R(t.expandedDetails) && (t.expandedDetails = c(t.expandedDetails)), this.requestUpdate(); + } + toggleExpanded(e) { + e.expandedDetails && (e.expanded = !e.expanded, this.requestUpdate()); + } +}; +r.MAX_LOG_ROWS = 1e3; +h([ + v() +], r.prototype, "unreadErrors", 2); +h([ + v() +], r.prototype, "messages", 2); +r = h([ + x("copilot-log-panel") +], r); +let w = class extends D { + createRenderRoot() { + return this; + } + connectedCallback() { + super.connectedCallback(), this.style.display = "flex"; + } + render() { + return l` + + + `; + } +}; +w = h([ + x("copilot-log-panel-actions") +], w); +const y = { + header: "Log", + expanded: !0, + panelOrder: 0, + panel: "bottom", + floating: !1, + tag: "copilot-log-panel", + actionsTag: "copilot-log-panel-actions" +}, P = { + init(e) { + e.addPanel(y); + } +}; +window.Vaadin.copilot.plugins.push(P); +const B = { hour: "numeric", minute: "numeric", second: "numeric", fractionalSecondDigits: 3 }, A = new Intl.DateTimeFormat(navigator.language, B); +function q(e) { + return A.format(e); +} +export { + w as Actions, + r as CopilotLogPanel +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-notification-BorVW3EP.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-notification-BorVW3EP.js new file mode 100644 index 0000000..53f3894 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-notification-BorVW3EP.js @@ -0,0 +1,30 @@ +import { e as i, b as n, o as d } from "./copilot-ppBO0zjz.js"; +const a = 5e3; +let o = 1; +function m(s) { + i.notifications.includes(s) && (s.dontShowAgain && s.dismissId && r(s.dismissId), i.removeNotification(s), n.emit("notification-dismissed", s)); +} +function f(s) { + return d.getDismissedNotifications().includes(s); +} +function r(s) { + f(s) || d.addDismissedNotification(s); +} +function u(s) { + return !(s.dismissId && (f(s.dismissId) || i.notifications.find((t) => t.dismissId === s.dismissId))); +} +function N(s) { + u(s) && c(s); +} +function c(s) { + const t = o; + o += 1; + const e = { ...s, id: t, dontShowAgain: !1, animatingOut: !1 }; + i.setNotifications([...i.notifications, e]), !s.link && !s.dismissId && setTimeout(() => { + m(e); + }, s.delay ?? a), n.emit("notification-shown", s); +} +export { + m as dismissNotification, + N as showNotification +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-ppBO0zjz.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-ppBO0zjz.js new file mode 100644 index 0000000..f30ccec --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-ppBO0zjz.js @@ -0,0 +1,4898 @@ +class ao extends EventTarget { + constructor() { + super(...arguments), this.eventBuffer = [], this.handledTypes = []; + } + on(t, r) { + const n = r; + return this.addEventListener(t, n), this.handledTypes.push(t), this.flush(t), () => this.off(t, n); + } + once(t, r) { + this.addEventListener(t, r, { once: !0 }); + } + off(t, r) { + this.removeEventListener(t, r); + const n = this.handledTypes.indexOf(t, 0); + n > -1 && this.handledTypes.splice(n, 1); + } + emit(t, r) { + const n = new CustomEvent(t, { detail: r, cancelable: !0 }); + return this.handledTypes.includes(t) || this.eventBuffer.push(n), this.dispatchEvent(n), n.defaultPrevented; + } + emitUnsafe({ type: t, data: r }) { + return this.emit(t, r); + } + // Communication with server via eventbus + send(t, r) { + const n = new CustomEvent("copilot-send", { detail: { command: t, data: r } }); + this.dispatchEvent(n); + } + // Listeners for Copilot itself + onSend(t) { + this.on("copilot-send", t); + } + offSend(t) { + this.off("copilot-send", t); + } + flush(t) { + const r = []; + this.eventBuffer.filter((n) => n.type === t).forEach((n) => { + this.dispatchEvent(n), r.push(n); + }), this.eventBuffer = this.eventBuffer.filter((n) => !r.includes(n)); + } +} +var so = { + 0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'", + 1: function(t, r) { + return "Cannot apply '" + t + "' to '" + r.toString() + "': Field not found."; + }, + /* + 2(prop) { + return `invalid decorator for '${prop.toString()}'` + }, + 3(prop) { + return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.` + }, + 4(prop) { + return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.` + }, + */ + 5: "'keys()' can only be used on observable objects, arrays, sets and maps", + 6: "'values()' can only be used on observable objects, arrays, sets and maps", + 7: "'entries()' can only be used on observable objects, arrays and maps", + 8: "'set()' can only be used on observable objects, arrays and maps", + 9: "'remove()' can only be used on observable objects, arrays and maps", + 10: "'has()' can only be used on observable objects, arrays and maps", + 11: "'get()' can only be used on observable objects, arrays and maps", + 12: "Invalid annotation", + 13: "Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)", + 14: "Intercept handlers should return nothing or a change object", + 15: "Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)", + 16: "Modification exception: the internal structure of an observable array was changed.", + 17: function(t, r) { + return "[mobx.array] Index out of bounds, " + t + " is larger than " + r; + }, + 18: "mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js", + 19: function(t) { + return "Cannot initialize from classes that inherit from Map: " + t.constructor.name; + }, + 20: function(t) { + return "Cannot initialize map from " + t; + }, + 21: function(t) { + return "Cannot convert to map from '" + t + "'"; + }, + 22: "mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js", + 23: "It is not possible to get index atoms from arrays", + 24: function(t) { + return "Cannot obtain administration from " + t; + }, + 25: function(t, r) { + return "the entry '" + t + "' does not exist in the observable map '" + r + "'"; + }, + 26: "please specify a property", + 27: function(t, r) { + return "no observable property '" + t.toString() + "' found on the observable object '" + r + "'"; + }, + 28: function(t) { + return "Cannot obtain atom from " + t; + }, + 29: "Expecting some object", + 30: "invalid action stack. did you forget to finish an action?", + 31: "missing option for computed: get", + 32: function(t, r) { + return "Cycle detected in computation " + t + ": " + r; + }, + 33: function(t) { + return "The setter of computed value '" + t + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"; + }, + 34: function(t) { + return "[ComputedValue '" + t + "'] It is not possible to assign a new value to a computed value."; + }, + 35: "There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`", + 36: "isolateGlobalState should be called before MobX is running any reactions", + 37: function(t) { + return "[mobx] `observableArray." + t + "()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()." + t + "()` instead"; + }, + 38: "'ownKeys()' can only be used on observable objects", + 39: "'defineProperty()' can only be used on observable objects" +}, lo = process.env.NODE_ENV !== "production" ? so : {}; +function v(e) { + for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) + r[n - 1] = arguments[n]; + if (process.env.NODE_ENV !== "production") { + var i = typeof e == "string" ? e : lo[e]; + throw typeof i == "function" && (i = i.apply(null, r)), new Error("[MobX] " + i); + } + throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (r.length ? " " + r.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e); +} +var co = {}; +function $n() { + return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : co; +} +var Pn = Object.assign, Ct = Object.getOwnPropertyDescriptor, G = Object.defineProperty, Kt = Object.prototype, Tt = []; +Object.freeze(Tt); +var Ar = {}; +Object.freeze(Ar); +var uo = typeof Proxy < "u", ho = /* @__PURE__ */ Object.toString(); +function Dn() { + uo || v(process.env.NODE_ENV !== "production" ? "`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`" : "Proxy not available"); +} +function Be(e) { + process.env.NODE_ENV !== "production" && h.verifyProxies && v("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to " + e); +} +function I() { + return ++h.mobxGuid; +} +function Sr(e) { + var t = !1; + return function() { + if (!t) + return t = !0, e.apply(this, arguments); + }; +} +var Ce = function() { +}; +function E(e) { + return typeof e == "function"; +} +function _e(e) { + var t = typeof e; + switch (t) { + case "string": + case "symbol": + case "number": + return !0; + } + return !1; +} +function Ht(e) { + return e !== null && typeof e == "object"; +} +function P(e) { + if (!Ht(e)) + return !1; + var t = Object.getPrototypeOf(e); + if (t == null) + return !0; + var r = Object.hasOwnProperty.call(t, "constructor") && t.constructor; + return typeof r == "function" && r.toString() === ho; +} +function Cn(e) { + var t = e?.constructor; + return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1; +} +function qt(e, t, r) { + G(e, t, { + enumerable: !1, + writable: !0, + configurable: !0, + value: r + }); +} +function Tn(e, t, r) { + G(e, t, { + enumerable: !1, + writable: !1, + configurable: !0, + value: r + }); +} +function Se(e, t) { + var r = "isMobX" + e; + return t.prototype[r] = !0, function(n) { + return Ht(n) && n[r] === !0; + }; +} +function Le(e) { + return e != null && Object.prototype.toString.call(e) === "[object Map]"; +} +function vo(e) { + var t = Object.getPrototypeOf(e), r = Object.getPrototypeOf(t), n = Object.getPrototypeOf(r); + return n === null; +} +function st(e) { + return e != null && Object.prototype.toString.call(e) === "[object Set]"; +} +var Vn = typeof Object.getOwnPropertySymbols < "u"; +function fo(e) { + var t = Object.keys(e); + if (!Vn) + return t; + var r = Object.getOwnPropertySymbols(e); + return r.length ? [].concat(t, r.filter(function(n) { + return Kt.propertyIsEnumerable.call(e, n); + })) : t; +} +var Ze = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Vn ? function(e) { + return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)); +} : ( + /* istanbul ignore next */ + Object.getOwnPropertyNames +); +function hr(e) { + return typeof e == "string" ? e : typeof e == "symbol" ? e.toString() : new String(e).toString(); +} +function jn(e) { + return e === null ? null : typeof e == "object" ? "" + e : e; +} +function z(e, t) { + return Kt.hasOwnProperty.call(e, t); +} +var po = Object.getOwnPropertyDescriptors || function(t) { + var r = {}; + return Ze(t).forEach(function(n) { + r[n] = Ct(t, n); + }), r; +}; +function Hr(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r]; + n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _o(n.key), n); + } +} +function Ft(e, t, r) { + return t && Hr(e.prototype, t), r && Hr(e, r), Object.defineProperty(e, "prototype", { + writable: !1 + }), e; +} +function ae() { + return ae = Object.assign ? Object.assign.bind() : function(e) { + for (var t = 1; t < arguments.length; t++) { + var r = arguments[t]; + for (var n in r) + Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]); + } + return e; + }, ae.apply(this, arguments); +} +function Rn(e, t) { + e.prototype = Object.create(t.prototype), e.prototype.constructor = e, vr(e, t); +} +function vr(e, t) { + return vr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) { + return n.__proto__ = i, n; + }, vr(e, t); +} +function Nt(e) { + if (e === void 0) + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; +} +function go(e, t) { + if (e) { + if (typeof e == "string") return qr(e, t); + var r = Object.prototype.toString.call(e).slice(8, -1); + if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e); + if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return qr(e, t); + } +} +function qr(e, t) { + (t == null || t > e.length) && (t = e.length); + for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r]; + return n; +} +function Te(e, t) { + var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; + if (r) return (r = r.call(e)).next.bind(r); + if (Array.isArray(e) || (r = go(e)) || t && e && typeof e.length == "number") { + r && (e = r); + var n = 0; + return function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + }; + }; + } + throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); +} +function bo(e, t) { + if (typeof e != "object" || e === null) return e; + var r = e[Symbol.toPrimitive]; + if (r !== void 0) { + var n = r.call(e, t || "default"); + if (typeof n != "object") return n; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (t === "string" ? String : Number)(e); +} +function _o(e) { + var t = bo(e, "string"); + return typeof t == "symbol" ? t : String(t); +} +var J = /* @__PURE__ */ Symbol("mobx-stored-annotations"); +function X(e) { + function t(r, n) { + if (lt(n)) + return e.decorate_20223_(r, n); + Me(r, n, e); + } + return Object.assign(t, e); +} +function Me(e, t, r) { + if (z(e, J) || qt(e, J, ae({}, e[J])), process.env.NODE_ENV !== "production" && Vt(r) && !z(e[J], t)) { + var n = e.constructor.name + ".prototype." + t.toString(); + v("'" + n + "' is decorated with 'override', but no such decorated member was found on prototype."); + } + mo(e, r, t), Vt(r) || (e[J][t] = r); +} +function mo(e, t, r) { + if (process.env.NODE_ENV !== "production" && !Vt(t) && z(e[J], r)) { + var n = e.constructor.name + ".prototype." + r.toString(), i = e[J][r].annotationType_, o = t.annotationType_; + v("Cannot apply '@" + o + "' to '" + n + "':" + (` +The field is already decorated with '@` + i + "'.") + ` +Re-decorating fields is not allowed. +Use '@override' decorator for methods overridden by subclass.`); + } +} +function lt(e) { + return typeof e == "object" && typeof e.kind == "string"; +} +function Wt(e, t) { + process.env.NODE_ENV !== "production" && !t.includes(e.kind) && v("The decorator applied to '" + String(e.name) + "' cannot be used on a " + e.kind + " element"); +} +var g = /* @__PURE__ */ Symbol("mobx administration"), ct = /* @__PURE__ */ function() { + function e(r) { + r === void 0 && (r = process.env.NODE_ENV !== "production" ? "Atom@" + I() : "Atom"), this.name_ = void 0, this.isPendingUnobservation = !1, this.isBeingObserved = !1, this.observers_ = /* @__PURE__ */ new Set(), this.diffValue_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = _.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = r; + } + var t = e.prototype; + return t.onBO = function() { + this.onBOL && this.onBOL.forEach(function(n) { + return n(); + }); + }, t.onBUO = function() { + this.onBUOL && this.onBUOL.forEach(function(n) { + return n(); + }); + }, t.reportObserved = function() { + return Qn(this); + }, t.reportChanged = function() { + k(), ei(this), L(); + }, t.toString = function() { + return this.name_; + }, e; +}(), Nr = /* @__PURE__ */ Se("Atom", ct); +function kn(e, t, r) { + t === void 0 && (t = Ce), r === void 0 && (r = Ce); + var n = new ct(e); + return t !== Ce && Da(n, t), r !== Ce && ui(n, r), n; +} +function yo(e, t) { + return e === t; +} +function wo(e, t) { + return Vr(e, t); +} +function Eo(e, t) { + return Vr(e, t, 1); +} +function Oo(e, t) { + return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t; +} +var Ve = { + identity: yo, + structural: wo, + default: Oo, + shallow: Eo +}; +function me(e, t, r) { + return tt(e) ? e : Array.isArray(e) ? A.array(e, { + name: r + }) : P(e) ? A.object(e, void 0, { + name: r + }) : Le(e) ? A.map(e, { + name: r + }) : st(e) ? A.set(e, { + name: r + }) : typeof e == "function" && !dt(e) && !et(e) ? Cn(e) ? je(e) : Qe(r, e) : e; +} +function Ao(e, t, r) { + if (e == null || Ee(e) || ft(e) || ee(e) || Ie(e)) + return e; + if (Array.isArray(e)) + return A.array(e, { + name: r, + deep: !1 + }); + if (P(e)) + return A.object(e, void 0, { + name: r, + deep: !1 + }); + if (Le(e)) + return A.map(e, { + name: r, + deep: !1 + }); + if (st(e)) + return A.set(e, { + name: r, + deep: !1 + }); + process.env.NODE_ENV !== "production" && v("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"); +} +function Gt(e) { + return e; +} +function So(e, t) { + return process.env.NODE_ENV !== "production" && tt(e) && v("observable.struct should not be used with observable values"), Vr(e, t) ? t : e; +} +var No = "override"; +function Vt(e) { + return e.annotationType_ === No; +} +function ut(e, t) { + return { + annotationType_: e, + options_: t, + make_: xo, + extend_: $o, + decorate_20223_: Po + }; +} +function xo(e, t, r, n) { + var i; + if ((i = this.options_) != null && i.bound) + return this.extend_(e, t, r, !1) === null ? 0 : 1; + if (n === e.target_) + return this.extend_(e, t, r, !1) === null ? 0 : 2; + if (dt(r.value)) + return 1; + var o = Ln(e, this, t, r, !1); + return G(n, t, o), 2; +} +function $o(e, t, r, n) { + var i = Ln(e, this, t, r); + return e.defineProperty_(t, i, n); +} +function Po(e, t) { + process.env.NODE_ENV !== "production" && Wt(t, ["method", "field"]); + var r = t.kind, n = t.name, i = t.addInitializer, o = this, a = function(c) { + var d, u, f, p; + return ye((d = (u = o.options_) == null ? void 0 : u.name) != null ? d : n.toString(), c, (f = (p = o.options_) == null ? void 0 : p.autoAction) != null ? f : !1); + }; + if (r == "field") { + i(function() { + Me(this, n, o); + }); + return; + } + if (r == "method") { + var l; + return dt(e) || (e = a(e)), (l = this.options_) != null && l.bound && i(function() { + var s = this, c = s[n].bind(s); + c.isMobxAction = !0, s[n] = c; + }), e; + } + v("Cannot apply '" + o.annotationType_ + "' to '" + String(n) + "' (kind: " + r + "):" + (` +'` + o.annotationType_ + "' can only be used on properties with a function value.")); +} +function Do(e, t, r, n) { + var i = t.annotationType_, o = n.value; + process.env.NODE_ENV !== "production" && !E(o) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (` +'` + i + "' can only be used on properties with a function value.")); +} +function Ln(e, t, r, n, i) { + var o, a, l, s, c, d, u; + i === void 0 && (i = h.safeDescriptors), Do(e, t, r, n); + var f = n.value; + if ((o = t.options_) != null && o.bound) { + var p; + f = f.bind((p = e.proxy_) != null ? p : e.target_); + } + return { + value: ye( + (a = (l = t.options_) == null ? void 0 : l.name) != null ? a : r.toString(), + f, + (s = (c = t.options_) == null ? void 0 : c.autoAction) != null ? s : !1, + // https://github.com/mobxjs/mobx/discussions/3140 + (d = t.options_) != null && d.bound ? (u = e.proxy_) != null ? u : e.target_ : void 0 + ), + // Non-configurable for classes + // prevents accidental field redefinition in subclass + configurable: i ? e.isPlainObject_ : !0, + // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 + enumerable: !1, + // Non-obsevable, therefore non-writable + // Also prevents rewriting in subclass constructor + writable: !i + }; +} +function Mn(e, t) { + return { + annotationType_: e, + options_: t, + make_: Co, + extend_: To, + decorate_20223_: Vo + }; +} +function Co(e, t, r, n) { + var i; + if (n === e.target_) + return this.extend_(e, t, r, !1) === null ? 0 : 2; + if ((i = this.options_) != null && i.bound && (!z(e.target_, t) || !et(e.target_[t])) && this.extend_(e, t, r, !1) === null) + return 0; + if (et(r.value)) + return 1; + var o = In(e, this, t, r, !1, !1); + return G(n, t, o), 2; +} +function To(e, t, r, n) { + var i, o = In(e, this, t, r, (i = this.options_) == null ? void 0 : i.bound); + return e.defineProperty_(t, o, n); +} +function Vo(e, t) { + var r; + process.env.NODE_ENV !== "production" && Wt(t, ["method"]); + var n = t.name, i = t.addInitializer; + return et(e) || (e = je(e)), (r = this.options_) != null && r.bound && i(function() { + var o = this, a = o[n].bind(o); + a.isMobXFlow = !0, o[n] = a; + }), e; +} +function jo(e, t, r, n) { + var i = t.annotationType_, o = n.value; + process.env.NODE_ENV !== "production" && !E(o) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (` +'` + i + "' can only be used on properties with a generator function value.")); +} +function In(e, t, r, n, i, o) { + o === void 0 && (o = h.safeDescriptors), jo(e, t, r, n); + var a = n.value; + if (et(a) || (a = je(a)), i) { + var l; + a = a.bind((l = e.proxy_) != null ? l : e.target_), a.isMobXFlow = !0; + } + return { + value: a, + // Non-configurable for classes + // prevents accidental field redefinition in subclass + configurable: o ? e.isPlainObject_ : !0, + // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 + enumerable: !1, + // Non-obsevable, therefore non-writable + // Also prevents rewriting in subclass constructor + writable: !o + }; +} +function xr(e, t) { + return { + annotationType_: e, + options_: t, + make_: Ro, + extend_: ko, + decorate_20223_: Lo + }; +} +function Ro(e, t, r) { + return this.extend_(e, t, r, !1) === null ? 0 : 1; +} +function ko(e, t, r, n) { + return Mo(e, this, t, r), e.defineComputedProperty_(t, ae({}, this.options_, { + get: r.get, + set: r.set + }), n); +} +function Lo(e, t) { + process.env.NODE_ENV !== "production" && Wt(t, ["getter"]); + var r = this, n = t.name, i = t.addInitializer; + return i(function() { + var o = Ue(this)[g], a = ae({}, r.options_, { + get: e, + context: this + }); + a.name || (a.name = process.env.NODE_ENV !== "production" ? o.name_ + "." + n.toString() : "ObservableObject." + n.toString()), o.values_.set(n, new H(a)); + }), function() { + return this[g].getObservablePropValue_(n); + }; +} +function Mo(e, t, r, n) { + var i = t.annotationType_, o = n.get; + process.env.NODE_ENV !== "production" && !o && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (` +'` + i + "' can only be used on getter(+setter) properties.")); +} +function Xt(e, t) { + return { + annotationType_: e, + options_: t, + make_: Io, + extend_: Uo, + decorate_20223_: zo + }; +} +function Io(e, t, r) { + return this.extend_(e, t, r, !1) === null ? 0 : 1; +} +function Uo(e, t, r, n) { + var i, o; + return Bo(e, this, t, r), e.defineObservableProperty_(t, r.value, (i = (o = this.options_) == null ? void 0 : o.enhancer) != null ? i : me, n); +} +function zo(e, t) { + if (process.env.NODE_ENV !== "production") { + if (t.kind === "field") + throw v("Please use `@observable accessor " + String(t.name) + "` instead of `@observable " + String(t.name) + "`"); + Wt(t, ["accessor"]); + } + var r = this, n = t.kind, i = t.name, o = /* @__PURE__ */ new WeakSet(); + function a(l, s) { + var c, d, u = Ue(l)[g], f = new ge(s, (c = (d = r.options_) == null ? void 0 : d.enhancer) != null ? c : me, process.env.NODE_ENV !== "production" ? u.name_ + "." + i.toString() : "ObservableObject." + i.toString(), !1); + u.values_.set(i, f), o.add(l); + } + if (n == "accessor") + return { + get: function() { + return o.has(this) || a(this, e.get.call(this)), this[g].getObservablePropValue_(i); + }, + set: function(s) { + return o.has(this) || a(this, s), this[g].setObservablePropValue_(i, s); + }, + init: function(s) { + return o.has(this) || a(this, s), s; + } + }; +} +function Bo(e, t, r, n) { + var i = t.annotationType_; + process.env.NODE_ENV !== "production" && !("value" in n) && v("Cannot apply '" + i + "' to '" + e.name_ + "." + r.toString() + "':" + (` +'` + i + "' cannot be used on getter/setter properties")); +} +var Ko = "true", Ho = /* @__PURE__ */ Un(); +function Un(e) { + return { + annotationType_: Ko, + options_: e, + make_: qo, + extend_: Fo, + decorate_20223_: Wo + }; +} +function qo(e, t, r, n) { + var i, o; + if (r.get) + return Jt.make_(e, t, r, n); + if (r.set) { + var a = ye(t.toString(), r.set); + return n === e.target_ ? e.defineProperty_(t, { + configurable: h.safeDescriptors ? e.isPlainObject_ : !0, + set: a + }) === null ? 0 : 2 : (G(n, t, { + configurable: !0, + set: a + }), 2); + } + if (n !== e.target_ && typeof r.value == "function") { + var l; + if (Cn(r.value)) { + var s, c = (s = this.options_) != null && s.autoBind ? je.bound : je; + return c.make_(e, t, r, n); + } + var d = (l = this.options_) != null && l.autoBind ? Qe.bound : Qe; + return d.make_(e, t, r, n); + } + var u = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? A.ref : A; + if (typeof r.value == "function" && (o = this.options_) != null && o.autoBind) { + var f; + r.value = r.value.bind((f = e.proxy_) != null ? f : e.target_); + } + return u.make_(e, t, r, n); +} +function Fo(e, t, r, n) { + var i, o; + if (r.get) + return Jt.extend_(e, t, r, n); + if (r.set) + return e.defineProperty_(t, { + configurable: h.safeDescriptors ? e.isPlainObject_ : !0, + set: ye(t.toString(), r.set) + }, n); + if (typeof r.value == "function" && (i = this.options_) != null && i.autoBind) { + var a; + r.value = r.value.bind((a = e.proxy_) != null ? a : e.target_); + } + var l = ((o = this.options_) == null ? void 0 : o.deep) === !1 ? A.ref : A; + return l.extend_(e, t, r, n); +} +function Wo(e, t) { + v("'" + this.annotationType_ + "' cannot be used as a decorator"); +} +var Go = "observable", Xo = "observable.ref", Jo = "observable.shallow", Zo = "observable.struct", zn = { + deep: !0, + name: void 0, + defaultDecorator: void 0, + proxy: !0 +}; +Object.freeze(zn); +function bt(e) { + return e || zn; +} +var fr = /* @__PURE__ */ Xt(Go), Yo = /* @__PURE__ */ Xt(Xo, { + enhancer: Gt +}), Qo = /* @__PURE__ */ Xt(Jo, { + enhancer: Ao +}), ea = /* @__PURE__ */ Xt(Zo, { + enhancer: So +}), Bn = /* @__PURE__ */ X(fr); +function _t(e) { + return e.deep === !0 ? me : e.deep === !1 ? Gt : ra(e.defaultDecorator); +} +function ta(e) { + var t; + return e ? (t = e.defaultDecorator) != null ? t : Un(e) : void 0; +} +function ra(e) { + var t, r; + return e && (t = (r = e.options_) == null ? void 0 : r.enhancer) != null ? t : me; +} +function Kn(e, t, r) { + if (lt(t)) + return fr.decorate_20223_(e, t); + if (_e(t)) { + Me(e, t, fr); + return; + } + return tt(e) ? e : P(e) ? A.object(e, t, r) : Array.isArray(e) ? A.array(e, t) : Le(e) ? A.map(e, t) : st(e) ? A.set(e, t) : typeof e == "object" && e !== null ? e : A.box(e, t); +} +Pn(Kn, Bn); +var na = { + box: function(t, r) { + var n = bt(r); + return new ge(t, _t(n), n.name, !0, n.equals); + }, + array: function(t, r) { + var n = bt(r); + return (h.useProxies === !1 || n.proxy === !1 ? Ya : Ba)(t, _t(n), n.name); + }, + map: function(t, r) { + var n = bt(r); + return new _i(t, _t(n), n.name); + }, + set: function(t, r) { + var n = bt(r); + return new wi(t, _t(n), n.name); + }, + object: function(t, r, n) { + return xe(function() { + return hi(h.useProxies === !1 || n?.proxy === !1 ? Ue({}, n) : Ia({}, n), t, r); + }); + }, + ref: /* @__PURE__ */ X(Yo), + shallow: /* @__PURE__ */ X(Qo), + deep: Bn, + struct: /* @__PURE__ */ X(ea) +}, A = /* @__PURE__ */ Pn(Kn, na), Hn = "computed", ia = "computed.struct", pr = /* @__PURE__ */ xr(Hn), oa = /* @__PURE__ */ xr(ia, { + equals: Ve.structural +}), Jt = function(t, r) { + if (lt(r)) + return pr.decorate_20223_(t, r); + if (_e(r)) + return Me(t, r, pr); + if (P(t)) + return X(xr(Hn, t)); + process.env.NODE_ENV !== "production" && (E(t) || v("First argument to `computed` should be an expression."), E(r) && v("A setter as second argument is no longer supported, use `{ set: fn }` option instead")); + var n = P(r) ? r : {}; + return n.get = t, n.name || (n.name = t.name || ""), new H(n); +}; +Object.assign(Jt, pr); +Jt.struct = /* @__PURE__ */ X(oa); +var Fr, Wr, jt = 0, aa = 1, sa = (Fr = (Wr = /* @__PURE__ */ Ct(function() { +}, "name")) == null ? void 0 : Wr.configurable) != null ? Fr : !1, Gr = { + value: "action", + configurable: !0, + writable: !1, + enumerable: !1 +}; +function ye(e, t, r, n) { + r === void 0 && (r = !1), process.env.NODE_ENV !== "production" && (E(t) || v("`action` can only be invoked on functions"), (typeof e != "string" || !e) && v("actions should have valid names, got: '" + e + "'")); + function i() { + return qn(e, r, t, n || this, arguments); + } + return i.isMobxAction = !0, i.toString = function() { + return t.toString(); + }, sa && (Gr.value = e, G(i, "name", Gr)), i; +} +function qn(e, t, r, n, i) { + var o = la(e, t, n, i); + try { + return r.apply(n, i); + } catch (a) { + throw o.error_ = a, a; + } finally { + ca(o); + } +} +function la(e, t, r, n) { + var i = process.env.NODE_ENV !== "production" && $() && !!e, o = 0; + if (process.env.NODE_ENV !== "production" && i) { + o = Date.now(); + var a = n ? Array.from(n) : Tt; + C({ + type: Pr, + name: e, + object: r, + arguments: a + }); + } + var l = h.trackingDerivation, s = !t || !l; + k(); + var c = h.allowStateChanges; + s && (Ne(), c = Zt(!0)); + var d = $r(!0), u = { + runAsAction_: s, + prevDerivation_: l, + prevAllowStateChanges_: c, + prevAllowStateReads_: d, + notifySpy_: i, + startTime_: o, + actionId_: aa++, + parentActionId_: jt + }; + return jt = u.actionId_, u; +} +function ca(e) { + jt !== e.actionId_ && v(30), jt = e.parentActionId_, e.error_ !== void 0 && (h.suppressReactionErrors = !0), Yt(e.prevAllowStateChanges_), Ge(e.prevAllowStateReads_), L(), e.runAsAction_ && Q(e.prevDerivation_), process.env.NODE_ENV !== "production" && e.notifySpy_ && T({ + time: Date.now() - e.startTime_ + }), h.suppressReactionErrors = !1; +} +function ua(e, t) { + var r = Zt(e); + try { + return t(); + } finally { + Yt(r); + } +} +function Zt(e) { + var t = h.allowStateChanges; + return h.allowStateChanges = e, t; +} +function Yt(e) { + h.allowStateChanges = e; +} +var Fn, da = "create"; +Fn = Symbol.toPrimitive; +var ge = /* @__PURE__ */ function(e) { + Rn(t, e); + function t(n, i, o, a, l) { + var s; + return o === void 0 && (o = process.env.NODE_ENV !== "production" ? "ObservableValue@" + I() : "ObservableValue"), a === void 0 && (a = !0), l === void 0 && (l = Ve.default), s = e.call(this, o) || this, s.enhancer = void 0, s.name_ = void 0, s.equals = void 0, s.hasUnreportedChange_ = !1, s.interceptors_ = void 0, s.changeListeners_ = void 0, s.value_ = void 0, s.dehancer = void 0, s.enhancer = i, s.name_ = o, s.equals = l, s.value_ = i(n, void 0, o), process.env.NODE_ENV !== "production" && a && $() && we({ + type: da, + object: Nt(s), + observableKind: "value", + debugObjectName: s.name_, + newValue: "" + s.value_ + }), s; + } + var r = t.prototype; + return r.dehanceValue = function(i) { + return this.dehancer !== void 0 ? this.dehancer(i) : i; + }, r.set = function(i) { + var o = this.value_; + if (i = this.prepareNewValue_(i), i !== h.UNCHANGED) { + var a = $(); + process.env.NODE_ENV !== "production" && a && C({ + type: U, + object: this, + observableKind: "value", + debugObjectName: this.name_, + newValue: i, + oldValue: o + }), this.setNewValue_(i), process.env.NODE_ENV !== "production" && a && T(); + } + }, r.prepareNewValue_ = function(i) { + if (W(this), j(this)) { + var o = R(this, { + object: this, + type: U, + newValue: i + }); + if (!o) + return h.UNCHANGED; + i = o.newValue; + } + return i = this.enhancer(i, this.value_, this.name_), this.equals(this.value_, i) ? h.UNCHANGED : i; + }, r.setNewValue_ = function(i) { + var o = this.value_; + this.value_ = i, this.reportChanged(), B(this) && K(this, { + type: U, + object: this, + newValue: i, + oldValue: o + }); + }, r.get = function() { + return this.reportObserved(), this.dehanceValue(this.value_); + }, r.intercept_ = function(i) { + return ht(this, i); + }, r.observe_ = function(i, o) { + return o && i({ + observableKind: "value", + debugObjectName: this.name_, + object: this, + type: U, + newValue: this.value_, + oldValue: void 0 + }), vt(this, i); + }, r.raw = function() { + return this.value_; + }, r.toJSON = function() { + return this.get(); + }, r.toString = function() { + return this.name_ + "[" + this.value_ + "]"; + }, r.valueOf = function() { + return jn(this.get()); + }, r[Fn] = function() { + return this.valueOf(); + }, t; +}(ct), Wn; +function mt(e, t) { + return !!(e & t); +} +function yt(e, t, r) { + return r ? e |= t : e &= ~t, e; +} +Wn = Symbol.toPrimitive; +var H = /* @__PURE__ */ function() { + function e(r) { + this.dependenciesState_ = _.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.diffValue_ = 0, this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = _.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new Rt(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = M.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, r.get || v(31), this.derivation = r.get, this.name_ = r.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + I() : "ComputedValue"), r.set && (this.setter_ = ye(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", r.set)), this.equals_ = r.equals || (r.compareStructural || r.struct ? Ve.structural : Ve.default), this.scope_ = r.context, this.requiresReaction_ = r.requiresReaction, this.keepAlive_ = !!r.keepAlive; + } + var t = e.prototype; + return t.onBecomeStale_ = function() { + ba(this); + }, t.onBO = function() { + this.onBOL && this.onBOL.forEach(function(n) { + return n(); + }); + }, t.onBUO = function() { + this.onBUOL && this.onBUOL.forEach(function(n) { + return n(); + }); + }, t.get = function() { + if (this.isComputing && v(32, this.name_, this.derivation), h.inBatch === 0 && // !globalState.trackingDerivatpion && + this.observers_.size === 0 && !this.keepAlive_) + gr(this) && (this.warnAboutUntrackedRead_(), k(), this.value_ = this.computeValue_(!1), L()); + else if (Qn(this), gr(this)) { + var n = h.trackingContext; + this.keepAlive_ && !n && (h.trackingContext = this), this.trackAndCompute() && ga(this), h.trackingContext = n; + } + var i = this.value_; + if (xt(i)) + throw i.cause; + return i; + }, t.set = function(n) { + if (this.setter_) { + this.isRunningSetter && v(33, this.name_), this.isRunningSetter = !0; + try { + this.setter_.call(this.scope_, n); + } finally { + this.isRunningSetter = !1; + } + } else + v(34, this.name_); + }, t.trackAndCompute = function() { + var n = this.value_, i = ( + /* see #1208 */ + this.dependenciesState_ === _.NOT_TRACKING_ + ), o = this.computeValue_(!0), a = i || xt(n) || xt(o) || !this.equals_(n, o); + return a && (this.value_ = o, process.env.NODE_ENV !== "production" && $() && we({ + observableKind: "computed", + debugObjectName: this.name_, + object: this.scope_, + type: "update", + oldValue: n, + newValue: o + })), a; + }, t.computeValue_ = function(n) { + this.isComputing = !0; + var i = Zt(!1), o; + if (n) + o = Gn(this, this.derivation, this.scope_); + else if (h.disableErrorBoundaries === !0) + o = this.derivation.call(this.scope_); + else + try { + o = this.derivation.call(this.scope_); + } catch (a) { + o = new Rt(a); + } + return Yt(i), this.isComputing = !1, o; + }, t.suspend_ = function() { + this.keepAlive_ || (br(this), this.value_ = void 0, process.env.NODE_ENV !== "production" && this.isTracing_ !== M.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' was suspended and it will recompute on the next access.")); + }, t.observe_ = function(n, i) { + var o = this, a = !0, l = void 0; + return si(function() { + var s = o.get(); + if (!a || i) { + var c = Ne(); + n({ + observableKind: "computed", + debugObjectName: o.name_, + type: U, + object: o, + newValue: s, + oldValue: l + }), Q(c); + } + a = !1, l = s; + }); + }, t.warnAboutUntrackedRead_ = function() { + process.env.NODE_ENV !== "production" && (this.isTracing_ !== M.NONE && console.log("[mobx.trace] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute."), (typeof this.requiresReaction_ == "boolean" ? this.requiresReaction_ : h.computedRequiresReaction) && console.warn("[mobx] Computed value '" + this.name_ + "' is being read outside a reactive context. Doing a full recompute.")); + }, t.toString = function() { + return this.name_ + "[" + this.derivation.toString() + "]"; + }, t.valueOf = function() { + return jn(this.get()); + }, t[Wn] = function() { + return this.valueOf(); + }, Ft(e, [{ + key: "isComputing", + get: function() { + return mt(this.flags_, e.isComputingMask_); + }, + set: function(n) { + this.flags_ = yt(this.flags_, e.isComputingMask_, n); + } + }, { + key: "isRunningSetter", + get: function() { + return mt(this.flags_, e.isRunningSetterMask_); + }, + set: function(n) { + this.flags_ = yt(this.flags_, e.isRunningSetterMask_, n); + } + }, { + key: "isBeingObserved", + get: function() { + return mt(this.flags_, e.isBeingObservedMask_); + }, + set: function(n) { + this.flags_ = yt(this.flags_, e.isBeingObservedMask_, n); + } + }, { + key: "isPendingUnobservation", + get: function() { + return mt(this.flags_, e.isPendingUnobservationMask_); + }, + set: function(n) { + this.flags_ = yt(this.flags_, e.isPendingUnobservationMask_, n); + } + }]), e; +}(); +H.isComputingMask_ = 1; +H.isRunningSetterMask_ = 2; +H.isBeingObservedMask_ = 4; +H.isPendingUnobservationMask_ = 8; +var Qt = /* @__PURE__ */ Se("ComputedValue", H), _; +(function(e) { + e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_"; +})(_ || (_ = {})); +var M; +(function(e) { + e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"; +})(M || (M = {})); +var Rt = function(t) { + this.cause = void 0, this.cause = t; +}; +function xt(e) { + return e instanceof Rt; +} +function gr(e) { + switch (e.dependenciesState_) { + case _.UP_TO_DATE_: + return !1; + case _.NOT_TRACKING_: + case _.STALE_: + return !0; + case _.POSSIBLY_STALE_: { + for (var t = $r(!0), r = Ne(), n = e.observing_, i = n.length, o = 0; o < i; o++) { + var a = n[o]; + if (Qt(a)) { + if (h.disableErrorBoundaries) + a.get(); + else + try { + a.get(); + } catch { + return Q(r), Ge(t), !0; + } + if (e.dependenciesState_ === _.STALE_) + return Q(r), Ge(t), !0; + } + } + return Jn(e), Q(r), Ge(t), !1; + } + } +} +function W(e) { + if (process.env.NODE_ENV !== "production") { + var t = e.observers_.size > 0; + !h.allowStateChanges && (t || h.enforceActions === "always") && console.warn("[MobX] " + (h.enforceActions ? "Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: " : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ") + e.name_); + } +} +function ha(e) { + process.env.NODE_ENV !== "production" && !h.allowStateReads && h.observableRequiresReaction && console.warn("[mobx] Observable '" + e.name_ + "' being read outside a reactive context."); +} +function Gn(e, t, r) { + var n = $r(!0); + Jn(e), e.newObserving_ = new Array( + // Reserve constant space for initial dependencies, dynamic space otherwise. + // See https://github.com/mobxjs/mobx/pull/3833 + e.runId_ === 0 ? 100 : e.observing_.length + ), e.unboundDepsCount_ = 0, e.runId_ = ++h.runId; + var i = h.trackingDerivation; + h.trackingDerivation = e, h.inBatch++; + var o; + if (h.disableErrorBoundaries === !0) + o = t.call(r); + else + try { + o = t.call(r); + } catch (a) { + o = new Rt(a); + } + return h.inBatch--, h.trackingDerivation = i, fa(e), va(e), Ge(n), o; +} +function va(e) { + process.env.NODE_ENV !== "production" && e.observing_.length === 0 && (typeof e.requiresObservable_ == "boolean" ? e.requiresObservable_ : h.reactionRequiresObservable) && console.warn("[mobx] Derivation '" + e.name_ + "' is created/updated without reading any observable value."); +} +function fa(e) { + for (var t = e.observing_, r = e.observing_ = e.newObserving_, n = _.UP_TO_DATE_, i = 0, o = e.unboundDepsCount_, a = 0; a < o; a++) { + var l = r[a]; + l.diffValue_ === 0 && (l.diffValue_ = 1, i !== a && (r[i] = l), i++), l.dependenciesState_ > n && (n = l.dependenciesState_); + } + for (r.length = i, e.newObserving_ = null, o = t.length; o--; ) { + var s = t[o]; + s.diffValue_ === 0 && Zn(s, e), s.diffValue_ = 0; + } + for (; i--; ) { + var c = r[i]; + c.diffValue_ === 1 && (c.diffValue_ = 0, pa(c, e)); + } + n !== _.UP_TO_DATE_ && (e.dependenciesState_ = n, e.onBecomeStale_()); +} +function br(e) { + var t = e.observing_; + e.observing_ = []; + for (var r = t.length; r--; ) + Zn(t[r], e); + e.dependenciesState_ = _.NOT_TRACKING_; +} +function Xn(e) { + var t = Ne(); + try { + return e(); + } finally { + Q(t); + } +} +function Ne() { + var e = h.trackingDerivation; + return h.trackingDerivation = null, e; +} +function Q(e) { + h.trackingDerivation = e; +} +function $r(e) { + var t = h.allowStateReads; + return h.allowStateReads = e, t; +} +function Ge(e) { + h.allowStateReads = e; +} +function Jn(e) { + if (e.dependenciesState_ !== _.UP_TO_DATE_) { + e.dependenciesState_ = _.UP_TO_DATE_; + for (var t = e.observing_, r = t.length; r--; ) + t[r].lowestObserverState_ = _.UP_TO_DATE_; + } +} +var nr = function() { + this.version = 6, this.UNCHANGED = {}, this.trackingDerivation = null, this.trackingContext = null, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !1, this.allowStateReads = !0, this.enforceActions = !0, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1, this.useProxies = !0, this.verifyProxies = !1, this.safeDescriptors = !0; +}, ir = !0, h = /* @__PURE__ */ function() { + var e = /* @__PURE__ */ $n(); + return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (ir = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new nr().version && (ir = !1), ir ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new nr()) : (setTimeout(function() { + v(35); + }, 1), new nr()); +}(); +function pa(e, t) { + e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_); +} +function Zn(e, t) { + e.observers_.delete(t), e.observers_.size === 0 && Yn(e); +} +function Yn(e) { + e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, h.pendingUnobservations.push(e)); +} +function k() { + h.inBatch++; +} +function L() { + if (--h.inBatch === 0) { + ni(); + for (var e = h.pendingUnobservations, t = 0; t < e.length; t++) { + var r = e[t]; + r.isPendingUnobservation = !1, r.observers_.size === 0 && (r.isBeingObserved && (r.isBeingObserved = !1, r.onBUO()), r instanceof H && r.suspend_()); + } + h.pendingUnobservations = []; + } +} +function Qn(e) { + ha(e); + var t = h.trackingDerivation; + return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && h.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && h.inBatch > 0 && Yn(e), !1); +} +function ei(e) { + e.lowestObserverState_ !== _.STALE_ && (e.lowestObserverState_ = _.STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === _.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && t.isTracing_ !== M.NONE && ti(t, e), t.onBecomeStale_()), t.dependenciesState_ = _.STALE_; + })); +} +function ga(e) { + e.lowestObserverState_ !== _.STALE_ && (e.lowestObserverState_ = _.STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === _.POSSIBLY_STALE_ ? (t.dependenciesState_ = _.STALE_, process.env.NODE_ENV !== "production" && t.isTracing_ !== M.NONE && ti(t, e)) : t.dependenciesState_ === _.UP_TO_DATE_ && (e.lowestObserverState_ = _.UP_TO_DATE_); + })); +} +function ba(e) { + e.lowestObserverState_ === _.UP_TO_DATE_ && (e.lowestObserverState_ = _.POSSIBLY_STALE_, e.observers_.forEach(function(t) { + t.dependenciesState_ === _.UP_TO_DATE_ && (t.dependenciesState_ = _.POSSIBLY_STALE_, t.onBecomeStale_()); + })); +} +function ti(e, t) { + if (console.log("[mobx.trace] '" + e.name_ + "' is invalidated due to a change in: '" + t.name_ + "'"), e.isTracing_ === M.BREAK) { + var r = []; + ri(Ca(e), r, 1), new Function(`debugger; +/* +Tracing '` + e.name_ + `' + +You are entering this break point because derivation '` + e.name_ + "' is being traced and '" + t.name_ + `' is now forcing it to update. +Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update +The stackframe you are looking for is at least ~6-8 stack-frames up. + +` + (e instanceof H ? e.derivation.toString().replace(/[*]\//g, "/") : "") + ` + +The dependencies for this derivation are: + +` + r.join(` +`) + ` +*/ + `)(); + } +} +function ri(e, t, r) { + if (t.length >= 1e3) { + t.push("(and many more)"); + return; + } + t.push("" + " ".repeat(r - 1) + e.name), e.dependencies && e.dependencies.forEach(function(n) { + return ri(n, t, r + 1); + }); +} +var Ye = /* @__PURE__ */ function() { + function e(r, n, i, o) { + r === void 0 && (r = process.env.NODE_ENV !== "production" ? "Reaction@" + I() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = _.NOT_TRACKING_, this.diffValue_ = 0, this.runId_ = 0, this.unboundDepsCount_ = 0, this.isDisposed_ = !1, this.isScheduled_ = !1, this.isTrackPending_ = !1, this.isRunning_ = !1, this.isTracing_ = M.NONE, this.name_ = r, this.onInvalidate_ = n, this.errorHandler_ = i, this.requiresObservable_ = o; + } + var t = e.prototype; + return t.onBecomeStale_ = function() { + this.schedule_(); + }, t.schedule_ = function() { + this.isScheduled_ || (this.isScheduled_ = !0, h.pendingReactions.push(this), ni()); + }, t.isScheduled = function() { + return this.isScheduled_; + }, t.runReaction_ = function() { + if (!this.isDisposed_) { + k(), this.isScheduled_ = !1; + var n = h.trackingContext; + if (h.trackingContext = this, gr(this)) { + this.isTrackPending_ = !0; + try { + this.onInvalidate_(), process.env.NODE_ENV !== "production" && this.isTrackPending_ && $() && we({ + name: this.name_, + type: "scheduled-reaction" + }); + } catch (i) { + this.reportExceptionInDerivation_(i); + } + } + h.trackingContext = n, L(); + } + }, t.track = function(n) { + if (!this.isDisposed_) { + k(); + var i = $(), o; + process.env.NODE_ENV !== "production" && i && (o = Date.now(), C({ + name: this.name_, + type: "reaction" + })), this.isRunning_ = !0; + var a = h.trackingContext; + h.trackingContext = this; + var l = Gn(this, n, void 0); + h.trackingContext = a, this.isRunning_ = !1, this.isTrackPending_ = !1, this.isDisposed_ && br(this), xt(l) && this.reportExceptionInDerivation_(l.cause), process.env.NODE_ENV !== "production" && i && T({ + time: Date.now() - o + }), L(); + } + }, t.reportExceptionInDerivation_ = function(n) { + var i = this; + if (this.errorHandler_) { + this.errorHandler_(n, this); + return; + } + if (h.disableErrorBoundaries) + throw n; + var o = process.env.NODE_ENV !== "production" ? "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'" : "[mobx] uncaught error in '" + this + "'"; + h.suppressReactionErrors ? process.env.NODE_ENV !== "production" && console.warn("[mobx] (error in reaction '" + this.name_ + "' suppressed, fix error of causing action below)") : console.error(o, n), process.env.NODE_ENV !== "production" && $() && we({ + type: "error", + name: this.name_, + message: o, + error: "" + n + }), h.globalReactionErrorHandlers.forEach(function(a) { + return a(n, i); + }); + }, t.dispose = function() { + this.isDisposed_ || (this.isDisposed_ = !0, this.isRunning_ || (k(), br(this), L())); + }, t.getDisposer_ = function(n) { + var i = this, o = function a() { + i.dispose(), n == null || n.removeEventListener == null || n.removeEventListener("abort", a); + }; + return n == null || n.addEventListener == null || n.addEventListener("abort", o), o[g] = this, o; + }, t.toString = function() { + return "Reaction[" + this.name_ + "]"; + }, t.trace = function(n) { + n === void 0 && (n = !1), ka(this, n); + }, e; +}(), Xr = 100, _a = function(t) { + return t(); +}; +function ni() { + h.inBatch > 0 || h.isRunningReactions || _a(ma); +} +function ma() { + h.isRunningReactions = !0; + for (var e = h.pendingReactions, t = 0; e.length > 0; ) { + ++t === Xr && (console.error(process.env.NODE_ENV !== "production" ? "Reaction doesn't converge to a stable state after " + Xr + " iterations." + (" Probably there is a cycle in the reactive function: " + e[0]) : "[mobx] cycle in reaction: " + e[0]), e.splice(0)); + for (var r = e.splice(0), n = 0, i = r.length; n < i; n++) + r[n].runReaction_(); + } + h.isRunningReactions = !1; +} +var kt = /* @__PURE__ */ Se("Reaction", Ye); +function $() { + return process.env.NODE_ENV !== "production" && !!h.spyListeners.length; +} +function we(e) { + if (process.env.NODE_ENV !== "production" && h.spyListeners.length) + for (var t = h.spyListeners, r = 0, n = t.length; r < n; r++) + t[r](e); +} +function C(e) { + if (process.env.NODE_ENV !== "production") { + var t = ae({}, e, { + spyReportStart: !0 + }); + we(t); + } +} +var ya = { + type: "report-end", + spyReportEnd: !0 +}; +function T(e) { + process.env.NODE_ENV !== "production" && we(e ? ae({}, e, { + type: "report-end", + spyReportEnd: !0 + }) : ya); +} +function wa(e) { + return process.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() { + }) : (h.spyListeners.push(e), Sr(function() { + h.spyListeners = h.spyListeners.filter(function(t) { + return t !== e; + }); + })); +} +var Pr = "action", Ea = "action.bound", ii = "autoAction", Oa = "autoAction.bound", oi = "", _r = /* @__PURE__ */ ut(Pr), Aa = /* @__PURE__ */ ut(Ea, { + bound: !0 +}), mr = /* @__PURE__ */ ut(ii, { + autoAction: !0 +}), Sa = /* @__PURE__ */ ut(Oa, { + autoAction: !0, + bound: !0 +}); +function ai(e) { + var t = function(n, i) { + if (E(n)) + return ye(n.name || oi, n, e); + if (E(i)) + return ye(n, i, e); + if (lt(i)) + return (e ? mr : _r).decorate_20223_(n, i); + if (_e(i)) + return Me(n, i, e ? mr : _r); + if (_e(n)) + return X(ut(e ? ii : Pr, { + name: n, + autoAction: e + })); + process.env.NODE_ENV !== "production" && v("Invalid arguments for `action`"); + }; + return t; +} +var fe = /* @__PURE__ */ ai(!1); +Object.assign(fe, _r); +var Qe = /* @__PURE__ */ ai(!0); +Object.assign(Qe, mr); +fe.bound = /* @__PURE__ */ X(Aa); +Qe.bound = /* @__PURE__ */ X(Sa); +function Pl(e) { + return qn(e.name || oi, !1, e, this, void 0); +} +function dt(e) { + return E(e) && e.isMobxAction === !0; +} +function si(e, t) { + var r, n, i, o, a; + t === void 0 && (t = Ar), process.env.NODE_ENV !== "production" && (E(e) || v("Autorun expects a function as first argument"), dt(e) && v("Autorun does not accept actions since actions are untrackable")); + var l = (r = (n = t) == null ? void 0 : n.name) != null ? r : process.env.NODE_ENV !== "production" ? e.name || "Autorun@" + I() : "Autorun", s = !t.scheduler && !t.delay, c; + if (s) + c = new Ye(l, function() { + this.track(f); + }, t.onError, t.requiresObservable); + else { + var d = li(t), u = !1; + c = new Ye(l, function() { + u || (u = !0, d(function() { + u = !1, c.isDisposed_ || c.track(f); + })); + }, t.onError, t.requiresObservable); + } + function f() { + e(c); + } + return (i = t) != null && (o = i.signal) != null && o.aborted || c.schedule_(), c.getDisposer_((a = t) == null ? void 0 : a.signal); +} +var Na = function(t) { + return t(); +}; +function li(e) { + return e.scheduler ? e.scheduler : e.delay ? function(t) { + return setTimeout(t, e.delay); + } : Na; +} +function ci(e, t, r) { + var n, i, o, a; + r === void 0 && (r = Ar), process.env.NODE_ENV !== "production" && ((!E(e) || !E(t)) && v("First and second argument to reaction should be functions"), P(r) || v("Third argument of reactions should be an object")); + var l = (n = r.name) != null ? n : process.env.NODE_ENV !== "production" ? "Reaction@" + I() : "Reaction", s = fe(l, r.onError ? xa(r.onError, t) : t), c = !r.scheduler && !r.delay, d = li(r), u = !0, f = !1, p, y = r.compareStructural ? Ve.structural : r.equals || Ve.default, m = new Ye(l, function() { + u || c ? S() : f || (f = !0, d(S)); + }, r.onError, r.requiresObservable); + function S() { + if (f = !1, !m.isDisposed_) { + var F = !1, $e = p; + m.track(function() { + var te = ua(!1, function() { + return e(m); + }); + F = u || !y(p, te), p = te; + }), (u && r.fireImmediately || !u && F) && s(p, $e, m), u = !1; + } + } + return (i = r) != null && (o = i.signal) != null && o.aborted || m.schedule_(), m.getDisposer_((a = r) == null ? void 0 : a.signal); +} +function xa(e, t) { + return function() { + try { + return t.apply(this, arguments); + } catch (r) { + e.call(this, r); + } + }; +} +var $a = "onBO", Pa = "onBUO"; +function Da(e, t, r) { + return di($a, e, t, r); +} +function ui(e, t, r) { + return di(Pa, e, t, r); +} +function di(e, t, r, n) { + var i = typeof n == "function" ? se(t, r) : se(t), o = E(n) ? n : r, a = e + "L"; + return i[a] ? i[a].add(o) : i[a] = /* @__PURE__ */ new Set([o]), function() { + var l = i[a]; + l && (l.delete(o), l.size === 0 && delete i[a]); + }; +} +function hi(e, t, r, n) { + process.env.NODE_ENV !== "production" && (arguments.length > 4 && v("'extendObservable' expected 2-4 arguments"), typeof e != "object" && v("'extendObservable' expects an object as first argument"), ee(e) && v("'extendObservable' should not be used on maps, use map.merge instead"), P(t) || v("'extendObservable' only accepts plain objects as second argument"), (tt(t) || tt(r)) && v("Extending an object with another observable (object) is not supported")); + var i = po(t); + return xe(function() { + var o = Ue(e, n)[g]; + Ze(i).forEach(function(a) { + o.extend_( + a, + i[a], + // must pass "undefined" for { key: undefined } + r && a in r ? r[a] : !0 + ); + }); + }), e; +} +function Ca(e, t) { + return vi(se(e, t)); +} +function vi(e) { + var t = { + name: e.name_ + }; + return e.observing_ && e.observing_.length > 0 && (t.dependencies = Ta(e.observing_).map(vi)), t; +} +function Ta(e) { + return Array.from(new Set(e)); +} +var Va = 0; +function fi() { + this.message = "FLOW_CANCELLED"; +} +fi.prototype = /* @__PURE__ */ Object.create(Error.prototype); +var or = /* @__PURE__ */ Mn("flow"), ja = /* @__PURE__ */ Mn("flow.bound", { + bound: !0 +}), je = /* @__PURE__ */ Object.assign(function(t, r) { + if (lt(r)) + return or.decorate_20223_(t, r); + if (_e(r)) + return Me(t, r, or); + process.env.NODE_ENV !== "production" && arguments.length !== 1 && v("Flow expects single argument with generator function"); + var n = t, i = n.name || "", o = function() { + var l = this, s = arguments, c = ++Va, d = fe(i + " - runid: " + c + " - init", n).apply(l, s), u, f = void 0, p = new Promise(function(y, m) { + var S = 0; + u = m; + function F(D) { + f = void 0; + var re; + try { + re = fe(i + " - runid: " + c + " - yield " + S++, d.next).call(d, D); + } catch (ce) { + return m(ce); + } + te(re); + } + function $e(D) { + f = void 0; + var re; + try { + re = fe(i + " - runid: " + c + " - yield " + S++, d.throw).call(d, D); + } catch (ce) { + return m(ce); + } + te(re); + } + function te(D) { + if (E(D?.then)) { + D.then(te, m); + return; + } + return D.done ? y(D.value) : (f = Promise.resolve(D.value), f.then(F, $e)); + } + F(void 0); + }); + return p.cancel = fe(i + " - runid: " + c + " - cancel", function() { + try { + f && Jr(f); + var y = d.return(void 0), m = Promise.resolve(y.value); + m.then(Ce, Ce), Jr(m), u(new fi()); + } catch (S) { + u(S); + } + }), p; + }; + return o.isMobXFlow = !0, o; +}, or); +je.bound = /* @__PURE__ */ X(ja); +function Jr(e) { + E(e.cancel) && e.cancel(); +} +function et(e) { + return e?.isMobXFlow === !0; +} +function Ra(e, t) { + return e ? t !== void 0 ? process.env.NODE_ENV !== "production" && (ee(e) || ft(e)) ? v("isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.") : Ee(e) ? e[g].values_.has(t) : !1 : Ee(e) || !!e[g] || Nr(e) || kt(e) || Qt(e) : !1; +} +function tt(e) { + return process.env.NODE_ENV !== "production" && arguments.length !== 1 && v("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"), Ra(e); +} +function ka() { + if (process.env.NODE_ENV !== "production") { + for (var e = !1, t = arguments.length, r = new Array(t), n = 0; n < t; n++) + r[n] = arguments[n]; + typeof r[r.length - 1] == "boolean" && (e = r.pop()); + var i = La(r); + if (!i) + return v("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly"); + i.isTracing_ === M.NONE && console.log("[mobx.trace] '" + i.name_ + "' tracing enabled"), i.isTracing_ = e ? M.BREAK : M.LOG; + } +} +function La(e) { + switch (e.length) { + case 0: + return h.trackingDerivation; + case 1: + return se(e[0]); + case 2: + return se(e[0], e[1]); + } +} +function Z(e, t) { + t === void 0 && (t = void 0), k(); + try { + return e.apply(t); + } finally { + L(); + } +} +function ue(e) { + return e[g]; +} +var Ma = { + has: function(t, r) { + return process.env.NODE_ENV !== "production" && h.trackingDerivation && Be("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."), ue(t).has_(r); + }, + get: function(t, r) { + return ue(t).get_(r); + }, + set: function(t, r, n) { + var i; + return _e(r) ? (process.env.NODE_ENV !== "production" && !ue(t).values_.has(r) && Be("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."), (i = ue(t).set_(r, n, !0)) != null ? i : !0) : !1; + }, + deleteProperty: function(t, r) { + var n; + return process.env.NODE_ENV !== "production" && Be("delete properties from an observable object. Use 'remove' from 'mobx' instead."), _e(r) ? (n = ue(t).delete_(r, !0)) != null ? n : !0 : !1; + }, + defineProperty: function(t, r, n) { + var i; + return process.env.NODE_ENV !== "production" && Be("define property on an observable object. Use 'defineProperty' from 'mobx' instead."), (i = ue(t).defineProperty_(r, n)) != null ? i : !0; + }, + ownKeys: function(t) { + return process.env.NODE_ENV !== "production" && h.trackingDerivation && Be("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."), ue(t).ownKeys_(); + }, + preventExtensions: function(t) { + v(13); + } +}; +function Ia(e, t) { + var r, n; + return Dn(), e = Ue(e, t), (n = (r = e[g]).proxy_) != null ? n : r.proxy_ = new Proxy(e, Ma); +} +function j(e) { + return e.interceptors_ !== void 0 && e.interceptors_.length > 0; +} +function ht(e, t) { + var r = e.interceptors_ || (e.interceptors_ = []); + return r.push(t), Sr(function() { + var n = r.indexOf(t); + n !== -1 && r.splice(n, 1); + }); +} +function R(e, t) { + var r = Ne(); + try { + for (var n = [].concat(e.interceptors_ || []), i = 0, o = n.length; i < o && (t = n[i](t), t && !t.type && v(14), !!t); i++) + ; + return t; + } finally { + Q(r); + } +} +function B(e) { + return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0; +} +function vt(e, t) { + var r = e.changeListeners_ || (e.changeListeners_ = []); + return r.push(t), Sr(function() { + var n = r.indexOf(t); + n !== -1 && r.splice(n, 1); + }); +} +function K(e, t) { + var r = Ne(), n = e.changeListeners_; + if (n) { + n = n.slice(); + for (var i = 0, o = n.length; i < o; i++) + n[i](t); + Q(r); + } +} +var ar = /* @__PURE__ */ Symbol("mobx-keys"); +function er(e, t, r) { + return process.env.NODE_ENV !== "production" && (!P(e) && !P(Object.getPrototypeOf(e)) && v("'makeAutoObservable' can only be used for classes that don't have a superclass"), Ee(e) && v("makeAutoObservable can only be used on objects not already made observable")), P(e) ? hi(e, e, t, r) : (xe(function() { + var n = Ue(e, r)[g]; + if (!e[ar]) { + var i = Object.getPrototypeOf(e), o = new Set([].concat(Ze(e), Ze(i))); + o.delete("constructor"), o.delete(g), qt(i, ar, o); + } + e[ar].forEach(function(a) { + return n.make_( + a, + // must pass "undefined" for { key: undefined } + t && a in t ? t[a] : !0 + ); + }); + }), e); +} +var Zr = "splice", U = "update", Ua = 1e4, za = { + get: function(t, r) { + var n = t[g]; + return r === g ? n : r === "length" ? n.getArrayLength_() : typeof r == "string" && !isNaN(r) ? n.get_(parseInt(r)) : z(Lt, r) ? Lt[r] : t[r]; + }, + set: function(t, r, n) { + var i = t[g]; + return r === "length" && i.setArrayLength_(n), typeof r == "symbol" || isNaN(r) ? t[r] = n : i.set_(parseInt(r), n), !0; + }, + preventExtensions: function() { + v(15); + } +}, Dr = /* @__PURE__ */ function() { + function e(r, n, i, o) { + r === void 0 && (r = process.env.NODE_ENV !== "production" ? "ObservableArray@" + I() : "ObservableArray"), this.owned_ = void 0, this.legacyMode_ = void 0, this.atom_ = void 0, this.values_ = [], this.interceptors_ = void 0, this.changeListeners_ = void 0, this.enhancer_ = void 0, this.dehancer = void 0, this.proxy_ = void 0, this.lastKnownLength_ = 0, this.owned_ = i, this.legacyMode_ = o, this.atom_ = new ct(r), this.enhancer_ = function(a, l) { + return n(a, l, process.env.NODE_ENV !== "production" ? r + "[..]" : "ObservableArray[..]"); + }; + } + var t = e.prototype; + return t.dehanceValue_ = function(n) { + return this.dehancer !== void 0 ? this.dehancer(n) : n; + }, t.dehanceValues_ = function(n) { + return this.dehancer !== void 0 && n.length > 0 ? n.map(this.dehancer) : n; + }, t.intercept_ = function(n) { + return ht(this, n); + }, t.observe_ = function(n, i) { + return i === void 0 && (i = !1), i && n({ + observableKind: "array", + object: this.proxy_, + debugObjectName: this.atom_.name_, + type: "splice", + index: 0, + added: this.values_.slice(), + addedCount: this.values_.length, + removed: [], + removedCount: 0 + }), vt(this, n); + }, t.getArrayLength_ = function() { + return this.atom_.reportObserved(), this.values_.length; + }, t.setArrayLength_ = function(n) { + (typeof n != "number" || isNaN(n) || n < 0) && v("Out of range: " + n); + var i = this.values_.length; + if (n !== i) + if (n > i) { + for (var o = new Array(n - i), a = 0; a < n - i; a++) + o[a] = void 0; + this.spliceWithArray_(i, 0, o); + } else + this.spliceWithArray_(n, i - n); + }, t.updateArrayLength_ = function(n, i) { + n !== this.lastKnownLength_ && v(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && Ai(n + i + 1); + }, t.spliceWithArray_ = function(n, i, o) { + var a = this; + W(this.atom_); + var l = this.values_.length; + if (n === void 0 ? n = 0 : n > l ? n = l : n < 0 && (n = Math.max(0, l + n)), arguments.length === 1 ? i = l - n : i == null ? i = 0 : i = Math.max(0, Math.min(i, l - n)), o === void 0 && (o = Tt), j(this)) { + var s = R(this, { + object: this.proxy_, + type: Zr, + index: n, + removedCount: i, + added: o + }); + if (!s) + return Tt; + i = s.removedCount, o = s.added; + } + if (o = o.length === 0 ? o : o.map(function(u) { + return a.enhancer_(u, void 0); + }), this.legacyMode_ || process.env.NODE_ENV !== "production") { + var c = o.length - i; + this.updateArrayLength_(l, c); + } + var d = this.spliceItemsIntoValues_(n, i, o); + return (i !== 0 || o.length !== 0) && this.notifyArraySplice_(n, o, d), this.dehanceValues_(d); + }, t.spliceItemsIntoValues_ = function(n, i, o) { + if (o.length < Ua) { + var a; + return (a = this.values_).splice.apply(a, [n, i].concat(o)); + } else { + var l = this.values_.slice(n, n + i), s = this.values_.slice(n + i); + this.values_.length += o.length - i; + for (var c = 0; c < o.length; c++) + this.values_[n + c] = o[c]; + for (var d = 0; d < s.length; d++) + this.values_[n + o.length + d] = s[d]; + return l; + } + }, t.notifyArrayChildUpdate_ = function(n, i, o) { + var a = !this.owned_ && $(), l = B(this), s = l || a ? { + observableKind: "array", + object: this.proxy_, + type: U, + debugObjectName: this.atom_.name_, + index: n, + newValue: i, + oldValue: o + } : null; + process.env.NODE_ENV !== "production" && a && C(s), this.atom_.reportChanged(), l && K(this, s), process.env.NODE_ENV !== "production" && a && T(); + }, t.notifyArraySplice_ = function(n, i, o) { + var a = !this.owned_ && $(), l = B(this), s = l || a ? { + observableKind: "array", + object: this.proxy_, + debugObjectName: this.atom_.name_, + type: Zr, + index: n, + removed: o, + added: i, + removedCount: o.length, + addedCount: i.length + } : null; + process.env.NODE_ENV !== "production" && a && C(s), this.atom_.reportChanged(), l && K(this, s), process.env.NODE_ENV !== "production" && a && T(); + }, t.get_ = function(n) { + if (this.legacyMode_ && n >= this.values_.length) { + console.warn(process.env.NODE_ENV !== "production" ? "[mobx.array] Attempt to read an array index (" + n + ") that is out of bounds (" + this.values_.length + "). Please check length first. Out of bound indices will not be tracked by MobX" : "[mobx] Out of bounds read: " + n); + return; + } + return this.atom_.reportObserved(), this.dehanceValue_(this.values_[n]); + }, t.set_ = function(n, i) { + var o = this.values_; + if (this.legacyMode_ && n > o.length && v(17, n, o.length), n < o.length) { + W(this.atom_); + var a = o[n]; + if (j(this)) { + var l = R(this, { + type: U, + object: this.proxy_, + index: n, + newValue: i + }); + if (!l) + return; + i = l.newValue; + } + i = this.enhancer_(i, a); + var s = i !== a; + s && (o[n] = i, this.notifyArrayChildUpdate_(n, i, a)); + } else { + for (var c = new Array(n + 1 - o.length), d = 0; d < c.length - 1; d++) + c[d] = void 0; + c[c.length - 1] = i, this.spliceWithArray_(o.length, 0, c); + } + }, e; +}(); +function Ba(e, t, r, n) { + return r === void 0 && (r = process.env.NODE_ENV !== "production" ? "ObservableArray@" + I() : "ObservableArray"), n === void 0 && (n = !1), Dn(), xe(function() { + var i = new Dr(r, t, n, !1); + Tn(i.values_, g, i); + var o = new Proxy(i.values_, za); + return i.proxy_ = o, e && e.length && i.spliceWithArray_(0, 0, e), o; + }); +} +var Lt = { + clear: function() { + return this.splice(0); + }, + replace: function(t) { + var r = this[g]; + return r.spliceWithArray_(0, r.values_.length, t); + }, + // Used by JSON.stringify + toJSON: function() { + return this.slice(); + }, + /* + * functions that do alter the internal structure of the array, (based on lib.es6.d.ts) + * since these functions alter the inner structure of the array, the have side effects. + * Because the have side effects, they should not be used in computed function, + * and for that reason the do not call dependencyState.notifyObserved + */ + splice: function(t, r) { + for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++) + i[o - 2] = arguments[o]; + var a = this[g]; + switch (arguments.length) { + case 0: + return []; + case 1: + return a.spliceWithArray_(t); + case 2: + return a.spliceWithArray_(t, r); + } + return a.spliceWithArray_(t, r, i); + }, + spliceWithArray: function(t, r, n) { + return this[g].spliceWithArray_(t, r, n); + }, + push: function() { + for (var t = this[g], r = arguments.length, n = new Array(r), i = 0; i < r; i++) + n[i] = arguments[i]; + return t.spliceWithArray_(t.values_.length, 0, n), t.values_.length; + }, + pop: function() { + return this.splice(Math.max(this[g].values_.length - 1, 0), 1)[0]; + }, + shift: function() { + return this.splice(0, 1)[0]; + }, + unshift: function() { + for (var t = this[g], r = arguments.length, n = new Array(r), i = 0; i < r; i++) + n[i] = arguments[i]; + return t.spliceWithArray_(0, 0, n), t.values_.length; + }, + reverse: function() { + return h.trackingDerivation && v(37, "reverse"), this.replace(this.slice().reverse()), this; + }, + sort: function() { + h.trackingDerivation && v(37, "sort"); + var t = this.slice(); + return t.sort.apply(t, arguments), this.replace(t), this; + }, + remove: function(t) { + var r = this[g], n = r.dehanceValues_(r.values_).indexOf(t); + return n > -1 ? (this.splice(n, 1), !0) : !1; + } +}; +w("at", V); +w("concat", V); +w("flat", V); +w("includes", V); +w("indexOf", V); +w("join", V); +w("lastIndexOf", V); +w("slice", V); +w("toString", V); +w("toLocaleString", V); +w("toSorted", V); +w("toSpliced", V); +w("with", V); +w("every", q); +w("filter", q); +w("find", q); +w("findIndex", q); +w("findLast", q); +w("findLastIndex", q); +w("flatMap", q); +w("forEach", q); +w("map", q); +w("some", q); +w("toReversed", q); +w("reduce", pi); +w("reduceRight", pi); +function w(e, t) { + typeof Array.prototype[e] == "function" && (Lt[e] = t(e)); +} +function V(e) { + return function() { + var t = this[g]; + t.atom_.reportObserved(); + var r = t.dehanceValues_(t.values_); + return r[e].apply(r, arguments); + }; +} +function q(e) { + return function(t, r) { + var n = this, i = this[g]; + i.atom_.reportObserved(); + var o = i.dehanceValues_(i.values_); + return o[e](function(a, l) { + return t.call(r, a, l, n); + }); + }; +} +function pi(e) { + return function() { + var t = this, r = this[g]; + r.atom_.reportObserved(); + var n = r.dehanceValues_(r.values_), i = arguments[0]; + return arguments[0] = function(o, a, l) { + return i(o, a, l, t); + }, n[e].apply(n, arguments); + }; +} +var Ka = /* @__PURE__ */ Se("ObservableArrayAdministration", Dr); +function ft(e) { + return Ht(e) && Ka(e[g]); +} +var gi, bi, Ha = {}, oe = "add", Mt = "delete"; +gi = Symbol.iterator; +bi = Symbol.toStringTag; +var _i = /* @__PURE__ */ function() { + function e(r, n, i) { + var o = this; + n === void 0 && (n = me), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableMap@" + I() : "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[g] = Ha, this.data_ = void 0, this.hasMap_ = void 0, this.keysAtom_ = void 0, this.interceptors_ = void 0, this.changeListeners_ = void 0, this.dehancer = void 0, this.enhancer_ = n, this.name_ = i, E(Map) || v(18), xe(function() { + o.keysAtom_ = kn(process.env.NODE_ENV !== "production" ? o.name_ + ".keys()" : "ObservableMap.keys()"), o.data_ = /* @__PURE__ */ new Map(), o.hasMap_ = /* @__PURE__ */ new Map(), r && o.merge(r); + }); + } + var t = e.prototype; + return t.has_ = function(n) { + return this.data_.has(n); + }, t.has = function(n) { + var i = this; + if (!h.trackingDerivation) + return this.has_(n); + var o = this.hasMap_.get(n); + if (!o) { + var a = o = new ge(this.has_(n), Gt, process.env.NODE_ENV !== "production" ? this.name_ + "." + hr(n) + "?" : "ObservableMap.key?", !1); + this.hasMap_.set(n, a), ui(a, function() { + return i.hasMap_.delete(n); + }); + } + return o.get(); + }, t.set = function(n, i) { + var o = this.has_(n); + if (j(this)) { + var a = R(this, { + type: o ? U : oe, + object: this, + newValue: i, + name: n + }); + if (!a) + return this; + i = a.newValue; + } + return o ? this.updateValue_(n, i) : this.addValue_(n, i), this; + }, t.delete = function(n) { + var i = this; + if (W(this.keysAtom_), j(this)) { + var o = R(this, { + type: Mt, + object: this, + name: n + }); + if (!o) + return !1; + } + if (this.has_(n)) { + var a = $(), l = B(this), s = l || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: Mt, + object: this, + oldValue: this.data_.get(n).value_, + name: n + } : null; + return process.env.NODE_ENV !== "production" && a && C(s), Z(function() { + var c; + i.keysAtom_.reportChanged(), (c = i.hasMap_.get(n)) == null || c.setNewValue_(!1); + var d = i.data_.get(n); + d.setNewValue_(void 0), i.data_.delete(n); + }), l && K(this, s), process.env.NODE_ENV !== "production" && a && T(), !0; + } + return !1; + }, t.updateValue_ = function(n, i) { + var o = this.data_.get(n); + if (i = o.prepareNewValue_(i), i !== h.UNCHANGED) { + var a = $(), l = B(this), s = l || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: U, + object: this, + oldValue: o.value_, + name: n, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && a && C(s), o.setNewValue_(i), l && K(this, s), process.env.NODE_ENV !== "production" && a && T(); + } + }, t.addValue_ = function(n, i) { + var o = this; + W(this.keysAtom_), Z(function() { + var c, d = new ge(i, o.enhancer_, process.env.NODE_ENV !== "production" ? o.name_ + "." + hr(n) : "ObservableMap.key", !1); + o.data_.set(n, d), i = d.value_, (c = o.hasMap_.get(n)) == null || c.setNewValue_(!0), o.keysAtom_.reportChanged(); + }); + var a = $(), l = B(this), s = l || a ? { + observableKind: "map", + debugObjectName: this.name_, + type: oe, + object: this, + name: n, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && a && C(s), l && K(this, s), process.env.NODE_ENV !== "production" && a && T(); + }, t.get = function(n) { + return this.has(n) ? this.dehanceValue_(this.data_.get(n).get()) : this.dehanceValue_(void 0); + }, t.dehanceValue_ = function(n) { + return this.dehancer !== void 0 ? this.dehancer(n) : n; + }, t.keys = function() { + return this.keysAtom_.reportObserved(), this.data_.keys(); + }, t.values = function() { + var n = this, i = this.keys(); + return rt({ + next: function() { + var a = i.next(), l = a.done, s = a.value; + return { + done: l, + value: l ? void 0 : n.get(s) + }; + } + }); + }, t.entries = function() { + var n = this, i = this.keys(); + return rt({ + next: function() { + var a = i.next(), l = a.done, s = a.value; + return { + done: l, + value: l ? void 0 : [s, n.get(s)] + }; + } + }); + }, t[gi] = function() { + return this.entries(); + }, t.forEach = function(n, i) { + for (var o = Te(this), a; !(a = o()).done; ) { + var l = a.value, s = l[0], c = l[1]; + n.call(i, c, s, this); + } + }, t.merge = function(n) { + var i = this; + return ee(n) && (n = new Map(n)), Z(function() { + P(n) ? fo(n).forEach(function(o) { + return i.set(o, n[o]); + }) : Array.isArray(n) ? n.forEach(function(o) { + var a = o[0], l = o[1]; + return i.set(a, l); + }) : Le(n) ? (vo(n) || v(19, n), n.forEach(function(o, a) { + return i.set(a, o); + })) : n != null && v(20, n); + }), this; + }, t.clear = function() { + var n = this; + Z(function() { + Xn(function() { + for (var i = Te(n.keys()), o; !(o = i()).done; ) { + var a = o.value; + n.delete(a); + } + }); + }); + }, t.replace = function(n) { + var i = this; + return Z(function() { + for (var o = qa(n), a = /* @__PURE__ */ new Map(), l = !1, s = Te(i.data_.keys()), c; !(c = s()).done; ) { + var d = c.value; + if (!o.has(d)) { + var u = i.delete(d); + if (u) + l = !0; + else { + var f = i.data_.get(d); + a.set(d, f); + } + } + } + for (var p = Te(o.entries()), y; !(y = p()).done; ) { + var m = y.value, S = m[0], F = m[1], $e = i.data_.has(S); + if (i.set(S, F), i.data_.has(S)) { + var te = i.data_.get(S); + a.set(S, te), $e || (l = !0); + } + } + if (!l) + if (i.data_.size !== a.size) + i.keysAtom_.reportChanged(); + else + for (var D = i.data_.keys(), re = a.keys(), ce = D.next(), Kr = re.next(); !ce.done; ) { + if (ce.value !== Kr.value) { + i.keysAtom_.reportChanged(); + break; + } + ce = D.next(), Kr = re.next(); + } + i.data_ = a; + }), this; + }, t.toString = function() { + return "[object ObservableMap]"; + }, t.toJSON = function() { + return Array.from(this); + }, t.observe_ = function(n, i) { + return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support fireImmediately=true in combination with maps."), vt(this, n); + }, t.intercept_ = function(n) { + return ht(this, n); + }, Ft(e, [{ + key: "size", + get: function() { + return this.keysAtom_.reportObserved(), this.data_.size; + } + }, { + key: bi, + get: function() { + return "Map"; + } + }]), e; +}(), ee = /* @__PURE__ */ Se("ObservableMap", _i); +function qa(e) { + if (Le(e) || ee(e)) + return e; + if (Array.isArray(e)) + return new Map(e); + if (P(e)) { + var t = /* @__PURE__ */ new Map(); + for (var r in e) + t.set(r, e[r]); + return t; + } else + return v(21, e); +} +var mi, yi, Fa = {}; +mi = Symbol.iterator; +yi = Symbol.toStringTag; +var wi = /* @__PURE__ */ function() { + function e(r, n, i) { + var o = this; + n === void 0 && (n = me), i === void 0 && (i = process.env.NODE_ENV !== "production" ? "ObservableSet@" + I() : "ObservableSet"), this.name_ = void 0, this[g] = Fa, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, E(Set) || v(22), this.enhancer_ = function(a, l) { + return n(a, l, i); + }, xe(function() { + o.atom_ = kn(o.name_), r && o.replace(r); + }); + } + var t = e.prototype; + return t.dehanceValue_ = function(n) { + return this.dehancer !== void 0 ? this.dehancer(n) : n; + }, t.clear = function() { + var n = this; + Z(function() { + Xn(function() { + for (var i = Te(n.data_.values()), o; !(o = i()).done; ) { + var a = o.value; + n.delete(a); + } + }); + }); + }, t.forEach = function(n, i) { + for (var o = Te(this), a; !(a = o()).done; ) { + var l = a.value; + n.call(i, l, l, this); + } + }, t.add = function(n) { + var i = this; + if (W(this.atom_), j(this)) { + var o = R(this, { + type: oe, + object: this, + newValue: n + }); + if (!o) + return this; + } + if (!this.has(n)) { + Z(function() { + i.data_.add(i.enhancer_(n, void 0)), i.atom_.reportChanged(); + }); + var a = process.env.NODE_ENV !== "production" && $(), l = B(this), s = l || a ? { + observableKind: "set", + debugObjectName: this.name_, + type: oe, + object: this, + newValue: n + } : null; + a && process.env.NODE_ENV !== "production" && C(s), l && K(this, s), a && process.env.NODE_ENV !== "production" && T(); + } + return this; + }, t.delete = function(n) { + var i = this; + if (j(this)) { + var o = R(this, { + type: Mt, + object: this, + oldValue: n + }); + if (!o) + return !1; + } + if (this.has(n)) { + var a = process.env.NODE_ENV !== "production" && $(), l = B(this), s = l || a ? { + observableKind: "set", + debugObjectName: this.name_, + type: Mt, + object: this, + oldValue: n + } : null; + return a && process.env.NODE_ENV !== "production" && C(s), Z(function() { + i.atom_.reportChanged(), i.data_.delete(n); + }), l && K(this, s), a && process.env.NODE_ENV !== "production" && T(), !0; + } + return !1; + }, t.has = function(n) { + return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(n)); + }, t.entries = function() { + var n = 0, i = Array.from(this.keys()), o = Array.from(this.values()); + return rt({ + next: function() { + var l = n; + return n += 1, l < o.length ? { + value: [i[l], o[l]], + done: !1 + } : { + done: !0 + }; + } + }); + }, t.keys = function() { + return this.values(); + }, t.values = function() { + this.atom_.reportObserved(); + var n = this, i = 0, o = Array.from(this.data_.values()); + return rt({ + next: function() { + return i < o.length ? { + value: n.dehanceValue_(o[i++]), + done: !1 + } : { + done: !0 + }; + } + }); + }, t.replace = function(n) { + var i = this; + return Ie(n) && (n = new Set(n)), Z(function() { + Array.isArray(n) ? (i.clear(), n.forEach(function(o) { + return i.add(o); + })) : st(n) ? (i.clear(), n.forEach(function(o) { + return i.add(o); + })) : n != null && v("Cannot initialize set from " + n); + }), this; + }, t.observe_ = function(n, i) { + return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support fireImmediately=true in combination with sets."), vt(this, n); + }, t.intercept_ = function(n) { + return ht(this, n); + }, t.toJSON = function() { + return Array.from(this); + }, t.toString = function() { + return "[object ObservableSet]"; + }, t[mi] = function() { + return this.values(); + }, Ft(e, [{ + key: "size", + get: function() { + return this.atom_.reportObserved(), this.data_.size; + } + }, { + key: yi, + get: function() { + return "Set"; + } + }]), e; +}(), Ie = /* @__PURE__ */ Se("ObservableSet", wi), Yr = /* @__PURE__ */ Object.create(null), Qr = "remove", yr = /* @__PURE__ */ function() { + function e(r, n, i, o) { + n === void 0 && (n = /* @__PURE__ */ new Map()), o === void 0 && (o = Ho), this.target_ = void 0, this.values_ = void 0, this.name_ = void 0, this.defaultAnnotation_ = void 0, this.keysAtom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.proxy_ = void 0, this.isPlainObject_ = void 0, this.appliedAnnotations_ = void 0, this.pendingKeys_ = void 0, this.target_ = r, this.values_ = n, this.name_ = i, this.defaultAnnotation_ = o, this.keysAtom_ = new ct(process.env.NODE_ENV !== "production" ? this.name_ + ".keys" : "ObservableObject.keys"), this.isPlainObject_ = P(this.target_), process.env.NODE_ENV !== "production" && !Si(this.defaultAnnotation_) && v("defaultAnnotation must be valid annotation"), process.env.NODE_ENV !== "production" && (this.appliedAnnotations_ = {}); + } + var t = e.prototype; + return t.getObservablePropValue_ = function(n) { + return this.values_.get(n).get(); + }, t.setObservablePropValue_ = function(n, i) { + var o = this.values_.get(n); + if (o instanceof H) + return o.set(i), !0; + if (j(this)) { + var a = R(this, { + type: U, + object: this.proxy_ || this.target_, + name: n, + newValue: i + }); + if (!a) + return null; + i = a.newValue; + } + if (i = o.prepareNewValue_(i), i !== h.UNCHANGED) { + var l = B(this), s = process.env.NODE_ENV !== "production" && $(), c = l || s ? { + type: U, + observableKind: "object", + debugObjectName: this.name_, + object: this.proxy_ || this.target_, + oldValue: o.value_, + name: n, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && s && C(c), o.setNewValue_(i), l && K(this, c), process.env.NODE_ENV !== "production" && s && T(); + } + return !0; + }, t.get_ = function(n) { + return h.trackingDerivation && !z(this.target_, n) && this.has_(n), this.target_[n]; + }, t.set_ = function(n, i, o) { + return o === void 0 && (o = !1), z(this.target_, n) ? this.values_.has(n) ? this.setObservablePropValue_(n, i) : o ? Reflect.set(this.target_, n, i) : (this.target_[n] = i, !0) : this.extend_(n, { + value: i, + enumerable: !0, + writable: !0, + configurable: !0 + }, this.defaultAnnotation_, o); + }, t.has_ = function(n) { + if (!h.trackingDerivation) + return n in this.target_; + this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map()); + var i = this.pendingKeys_.get(n); + return i || (i = new ge(n in this.target_, Gt, process.env.NODE_ENV !== "production" ? this.name_ + "." + hr(n) + "?" : "ObservableObject.key?", !1), this.pendingKeys_.set(n, i)), i.get(); + }, t.make_ = function(n, i) { + if (i === !0 && (i = this.defaultAnnotation_), i !== !1) { + if (rn(this, i, n), !(n in this.target_)) { + var o; + if ((o = this.target_[J]) != null && o[n]) + return; + v(1, i.annotationType_, this.name_ + "." + n.toString()); + } + for (var a = this.target_; a && a !== Kt; ) { + var l = Ct(a, n); + if (l) { + var s = i.make_(this, n, l, a); + if (s === 0) + return; + if (s === 1) + break; + } + a = Object.getPrototypeOf(a); + } + tn(this, i, n); + } + }, t.extend_ = function(n, i, o, a) { + if (a === void 0 && (a = !1), o === !0 && (o = this.defaultAnnotation_), o === !1) + return this.defineProperty_(n, i, a); + rn(this, o, n); + var l = o.extend_(this, n, i, a); + return l && tn(this, o, n), l; + }, t.defineProperty_ = function(n, i, o) { + o === void 0 && (o = !1), W(this.keysAtom_); + try { + k(); + var a = this.delete_(n); + if (!a) + return a; + if (j(this)) { + var l = R(this, { + object: this.proxy_ || this.target_, + name: n, + type: oe, + newValue: i.value + }); + if (!l) + return null; + var s = l.newValue; + i.value !== s && (i = ae({}, i, { + value: s + })); + } + if (o) { + if (!Reflect.defineProperty(this.target_, n, i)) + return !1; + } else + G(this.target_, n, i); + this.notifyPropertyAddition_(n, i.value); + } finally { + L(); + } + return !0; + }, t.defineObservableProperty_ = function(n, i, o, a) { + a === void 0 && (a = !1), W(this.keysAtom_); + try { + k(); + var l = this.delete_(n); + if (!l) + return l; + if (j(this)) { + var s = R(this, { + object: this.proxy_ || this.target_, + name: n, + type: oe, + newValue: i + }); + if (!s) + return null; + i = s.newValue; + } + var c = en(n), d = { + configurable: h.safeDescriptors ? this.isPlainObject_ : !0, + enumerable: !0, + get: c.get, + set: c.set + }; + if (a) { + if (!Reflect.defineProperty(this.target_, n, d)) + return !1; + } else + G(this.target_, n, d); + var u = new ge(i, o, process.env.NODE_ENV !== "production" ? this.name_ + "." + n.toString() : "ObservableObject.key", !1); + this.values_.set(n, u), this.notifyPropertyAddition_(n, u.value_); + } finally { + L(); + } + return !0; + }, t.defineComputedProperty_ = function(n, i, o) { + o === void 0 && (o = !1), W(this.keysAtom_); + try { + k(); + var a = this.delete_(n); + if (!a) + return a; + if (j(this)) { + var l = R(this, { + object: this.proxy_ || this.target_, + name: n, + type: oe, + newValue: void 0 + }); + if (!l) + return null; + } + i.name || (i.name = process.env.NODE_ENV !== "production" ? this.name_ + "." + n.toString() : "ObservableObject.key"), i.context = this.proxy_ || this.target_; + var s = en(n), c = { + configurable: h.safeDescriptors ? this.isPlainObject_ : !0, + enumerable: !1, + get: s.get, + set: s.set + }; + if (o) { + if (!Reflect.defineProperty(this.target_, n, c)) + return !1; + } else + G(this.target_, n, c); + this.values_.set(n, new H(i)), this.notifyPropertyAddition_(n, void 0); + } finally { + L(); + } + return !0; + }, t.delete_ = function(n, i) { + if (i === void 0 && (i = !1), W(this.keysAtom_), !z(this.target_, n)) + return !0; + if (j(this)) { + var o = R(this, { + object: this.proxy_ || this.target_, + name: n, + type: Qr + }); + if (!o) + return null; + } + try { + var a, l; + k(); + var s = B(this), c = process.env.NODE_ENV !== "production" && $(), d = this.values_.get(n), u = void 0; + if (!d && (s || c)) { + var f; + u = (f = Ct(this.target_, n)) == null ? void 0 : f.value; + } + if (i) { + if (!Reflect.deleteProperty(this.target_, n)) + return !1; + } else + delete this.target_[n]; + if (process.env.NODE_ENV !== "production" && delete this.appliedAnnotations_[n], d && (this.values_.delete(n), d instanceof ge && (u = d.value_), ei(d)), this.keysAtom_.reportChanged(), (a = this.pendingKeys_) == null || (l = a.get(n)) == null || l.set(n in this.target_), s || c) { + var p = { + type: Qr, + observableKind: "object", + object: this.proxy_ || this.target_, + debugObjectName: this.name_, + oldValue: u, + name: n + }; + process.env.NODE_ENV !== "production" && c && C(p), s && K(this, p), process.env.NODE_ENV !== "production" && c && T(); + } + } finally { + L(); + } + return !0; + }, t.observe_ = function(n, i) { + return process.env.NODE_ENV !== "production" && i === !0 && v("`observe` doesn't support the fire immediately property for observable objects."), vt(this, n); + }, t.intercept_ = function(n) { + return ht(this, n); + }, t.notifyPropertyAddition_ = function(n, i) { + var o, a, l = B(this), s = process.env.NODE_ENV !== "production" && $(); + if (l || s) { + var c = l || s ? { + type: oe, + observableKind: "object", + debugObjectName: this.name_, + object: this.proxy_ || this.target_, + name: n, + newValue: i + } : null; + process.env.NODE_ENV !== "production" && s && C(c), l && K(this, c), process.env.NODE_ENV !== "production" && s && T(); + } + (o = this.pendingKeys_) == null || (a = o.get(n)) == null || a.set(!0), this.keysAtom_.reportChanged(); + }, t.ownKeys_ = function() { + return this.keysAtom_.reportObserved(), Ze(this.target_); + }, t.keys_ = function() { + return this.keysAtom_.reportObserved(), Object.keys(this.target_); + }, e; +}(); +function Ue(e, t) { + var r; + if (process.env.NODE_ENV !== "production" && t && Ee(e) && v("Options can't be provided for already observable objects."), z(e, g)) + return process.env.NODE_ENV !== "production" && !(Tr(e) instanceof yr) && v("Cannot convert '" + It(e) + `' into observable object: +The target is already observable of different type. +Extending builtins is not supported.`), e; + process.env.NODE_ENV !== "production" && !Object.isExtensible(e) && v("Cannot make the designated object observable; it is not extensible"); + var n = (r = t?.name) != null ? r : process.env.NODE_ENV !== "production" ? (P(e) ? "ObservableObject" : e.constructor.name) + "@" + I() : "ObservableObject", i = new yr(e, /* @__PURE__ */ new Map(), String(n), ta(t)); + return qt(e, g, i), e; +} +var Wa = /* @__PURE__ */ Se("ObservableObjectAdministration", yr); +function en(e) { + return Yr[e] || (Yr[e] = { + get: function() { + return this[g].getObservablePropValue_(e); + }, + set: function(r) { + return this[g].setObservablePropValue_(e, r); + } + }); +} +function Ee(e) { + return Ht(e) ? Wa(e[g]) : !1; +} +function tn(e, t, r) { + var n; + process.env.NODE_ENV !== "production" && (e.appliedAnnotations_[r] = t), (n = e.target_[J]) == null || delete n[r]; +} +function rn(e, t, r) { + if (process.env.NODE_ENV !== "production" && !Si(t) && v("Cannot annotate '" + e.name_ + "." + r.toString() + "': Invalid annotation."), process.env.NODE_ENV !== "production" && !Vt(t) && z(e.appliedAnnotations_, r)) { + var n = e.name_ + "." + r.toString(), i = e.appliedAnnotations_[r].annotationType_, o = t.annotationType_; + v("Cannot apply '" + o + "' to '" + n + "':" + (` +The field is already annotated with '` + i + "'.") + ` +Re-annotating fields is not allowed. +Use 'override' annotation for methods overridden by subclass.`); + } +} +var Ga = /* @__PURE__ */ Oi(0), Xa = /* @__PURE__ */ function() { + var e = !1, t = {}; + return Object.defineProperty(t, "0", { + set: function() { + e = !0; + } + }), Object.create(t)[0] = 1, e === !1; +}(), sr = 0, Ei = function() { +}; +function Ja(e, t) { + Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t; +} +Ja(Ei, Array.prototype); +var Cr = /* @__PURE__ */ function(e, t, r) { + Rn(n, e); + function n(o, a, l, s) { + var c; + return l === void 0 && (l = process.env.NODE_ENV !== "production" ? "ObservableArray@" + I() : "ObservableArray"), s === void 0 && (s = !1), c = e.call(this) || this, xe(function() { + var d = new Dr(l, a, s, !0); + d.proxy_ = Nt(c), Tn(Nt(c), g, d), o && o.length && c.spliceWithArray(0, 0, o), Xa && Object.defineProperty(Nt(c), "0", Ga); + }), c; + } + var i = n.prototype; + return i.concat = function() { + this[g].atom_.reportObserved(); + for (var a = arguments.length, l = new Array(a), s = 0; s < a; s++) + l[s] = arguments[s]; + return Array.prototype.concat.apply( + this.slice(), + //@ts-ignore + l.map(function(c) { + return ft(c) ? c.slice() : c; + }) + ); + }, i[r] = function() { + var o = this, a = 0; + return rt({ + next: function() { + return a < o.length ? { + value: o[a++], + done: !1 + } : { + done: !0, + value: void 0 + }; + } + }); + }, Ft(n, [{ + key: "length", + get: function() { + return this[g].getArrayLength_(); + }, + set: function(a) { + this[g].setArrayLength_(a); + } + }, { + key: t, + get: function() { + return "Array"; + } + }]), n; +}(Ei, Symbol.toStringTag, Symbol.iterator); +Object.entries(Lt).forEach(function(e) { + var t = e[0], r = e[1]; + t !== "concat" && qt(Cr.prototype, t, r); +}); +function Oi(e) { + return { + enumerable: !1, + configurable: !0, + get: function() { + return this[g].get_(e); + }, + set: function(r) { + this[g].set_(e, r); + } + }; +} +function Za(e) { + G(Cr.prototype, "" + e, Oi(e)); +} +function Ai(e) { + if (e > sr) { + for (var t = sr; t < e + 100; t++) + Za(t); + sr = e; + } +} +Ai(1e3); +function Ya(e, t, r) { + return new Cr(e, t, r); +} +function se(e, t) { + if (typeof e == "object" && e !== null) { + if (ft(e)) + return t !== void 0 && v(23), e[g].atom_; + if (Ie(e)) + return e.atom_; + if (ee(e)) { + if (t === void 0) + return e.keysAtom_; + var r = e.data_.get(t) || e.hasMap_.get(t); + return r || v(25, t, It(e)), r; + } + if (Ee(e)) { + if (!t) + return v(26); + var n = e[g].values_.get(t); + return n || v(27, t, It(e)), n; + } + if (Nr(e) || Qt(e) || kt(e)) + return e; + } else if (E(e) && kt(e[g])) + return e[g]; + v(28); +} +function Tr(e, t) { + if (e || v(29), t !== void 0) + return Tr(se(e, t)); + if (Nr(e) || Qt(e) || kt(e) || ee(e) || Ie(e)) + return e; + if (e[g]) + return e[g]; + v(24, e); +} +function It(e, t) { + var r; + if (t !== void 0) + r = se(e, t); + else { + if (dt(e)) + return e.name; + Ee(e) || ee(e) || Ie(e) ? r = Tr(e) : r = se(e); + } + return r.name_; +} +function xe(e) { + var t = Ne(), r = Zt(!0); + k(); + try { + return e(); + } finally { + L(), Yt(r), Q(t); + } +} +var nn = Kt.toString; +function Vr(e, t, r) { + return r === void 0 && (r = -1), wr(e, t, r); +} +function wr(e, t, r, n, i) { + if (e === t) + return e !== 0 || 1 / e === 1 / t; + if (e == null || t == null) + return !1; + if (e !== e) + return t !== t; + var o = typeof e; + if (o !== "function" && o !== "object" && typeof t != "object") + return !1; + var a = nn.call(e); + if (a !== nn.call(t)) + return !1; + switch (a) { + case "[object RegExp]": + case "[object String]": + return "" + e == "" + t; + case "[object Number]": + return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t; + case "[object Date]": + case "[object Boolean]": + return +e == +t; + case "[object Symbol]": + return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t); + case "[object Map]": + case "[object Set]": + r >= 0 && r++; + break; + } + e = on(e), t = on(t); + var l = a === "[object Array]"; + if (!l) { + if (typeof e != "object" || typeof t != "object") + return !1; + var s = e.constructor, c = t.constructor; + if (s !== c && !(E(s) && s instanceof s && E(c) && c instanceof c) && "constructor" in e && "constructor" in t) + return !1; + } + if (r === 0) + return !1; + r < 0 && (r = -1), n = n || [], i = i || []; + for (var d = n.length; d--; ) + if (n[d] === e) + return i[d] === t; + if (n.push(e), i.push(t), l) { + if (d = e.length, d !== t.length) + return !1; + for (; d--; ) + if (!wr(e[d], t[d], r - 1, n, i)) + return !1; + } else { + var u = Object.keys(e), f; + if (d = u.length, Object.keys(t).length !== d) + return !1; + for (; d--; ) + if (f = u[d], !(z(t, f) && wr(e[f], t[f], r - 1, n, i))) + return !1; + } + return n.pop(), i.pop(), !0; +} +function on(e) { + return ft(e) ? e.slice() : Le(e) || ee(e) || st(e) || Ie(e) ? Array.from(e.entries()) : e; +} +function rt(e) { + return e[Symbol.iterator] = Qa, e; +} +function Qa() { + return this; +} +function Si(e) { + return ( + // Can be function + e instanceof Object && typeof e.annotationType_ == "string" && E(e.make_) && E(e.extend_) + ); +} +["Symbol", "Map", "Set"].forEach(function(e) { + var t = $n(); + typeof t[e] > "u" && v("MobX requires global '" + e + "' to be available or polyfilled"); +}); +typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ + spy: wa, + extras: { + getDebugName: It + }, + $mobx: g +}); +const an = "copilot-conf"; +class be { + static get sessionConfiguration() { + const t = sessionStorage.getItem(an); + return t ? JSON.parse(t) : {}; + } + static saveCopilotActivation(t) { + const r = this.sessionConfiguration; + r.active = t, this.persist(r); + } + static getCopilotActivation() { + return this.sessionConfiguration.active; + } + static saveSpotlightActivation(t) { + const r = this.sessionConfiguration; + r.spotlightActive = t, this.persist(r); + } + static getSpotlightActivation() { + return this.sessionConfiguration.spotlightActive; + } + static saveSpotlightPosition(t, r, n, i) { + const o = this.sessionConfiguration; + o.spotlightPosition = { left: t, top: r, right: n, bottom: i }, this.persist(o); + } + static getSpotlightPosition() { + return this.sessionConfiguration.spotlightPosition; + } + static saveDrawerSize(t, r) { + const n = this.sessionConfiguration; + n.drawerSizes = n.drawerSizes ?? {}, n.drawerSizes[t] = r, this.persist(n); + } + static getDrawerSize(t) { + const r = this.sessionConfiguration; + if (r.drawerSizes) + return r.drawerSizes[t]; + } + static savePanelConfigurations(t) { + const r = this.sessionConfiguration; + r.sectionPanelState = t, this.persist(r); + } + static getPanelConfigurations() { + return this.sessionConfiguration.sectionPanelState; + } + static persist(t) { + sessionStorage.setItem(an, JSON.stringify(t)); + } + static savePrompts(t) { + const r = this.sessionConfiguration; + r.prompts = t, this.persist(r); + } + static getPrompts() { + return this.sessionConfiguration.prompts || []; + } +} +class es { + constructor() { + this.spotlightActive = !1, this.welcomeActive = !1, this.loginCheckActive = !1, this.userInfo = void 0, this.active = !1, this.activatedFrom = null, this.activatedAtLeastOnce = !1, this.operationInProgress = void 0, this.operationWaitsHmrUpdate = void 0, this.idePluginState = void 0, this.notifications = [], this.infoTooltip = null, this.sectionPanelDragging = !1, this.spotlightDragging = !1, this.sectionPanelResizing = !1, this.drawerResizing = !1, this.jdkInfo = void 0, er(this, { + notifications: A.shallow + }), this.spotlightActive = be.getSpotlightActivation() ?? !1; + } + setActive(t, r) { + this.active = t, t && (this.activatedAtLeastOnce = !0), this.activatedFrom = r ?? null; + } + setSpotlightActive(t) { + this.spotlightActive = t; + } + setWelcomeActive(t) { + this.welcomeActive = t; + } + setLoginCheckActive(t) { + this.loginCheckActive = t; + } + setUserInfo(t) { + this.userInfo = t; + } + startOperation(t) { + if (this.operationInProgress) + throw new Error(`An ${t} operation is already in progress`); + if (this.operationWaitsHmrUpdate) + throw new Error("Wait for files to be updated to start a new operation"); + this.operationInProgress = t; + } + stopOperation(t) { + if (this.operationInProgress) { + if (this.operationInProgress !== t) + return; + } else return; + this.operationInProgress = void 0; + } + setIdePluginState(t) { + this.idePluginState = t; + } + toggleActive(t) { + this.setActive(!this.active, this.active ? null : t ?? null); + } + reset() { + this.active = !1, this.activatedAtLeastOnce = !1; + } + setNotifications(t) { + this.notifications = t; + } + removeNotification(t) { + t.animatingOut = !0, setTimeout(() => { + this.reallyRemoveNotification(t); + }, 180); + } + reallyRemoveNotification(t) { + const r = this.notifications.indexOf(t); + r > -1 && this.notifications.splice(r, 1); + } + setTooltip(t, r) { + this.infoTooltip = { + text: t, + loader: r + }; + } + clearTooltip() { + this.infoTooltip = null; + } + setSectionPanelDragging(t) { + this.sectionPanelDragging = t; + } + setSpotlightDragging(t) { + this.spotlightDragging = t; + } + setSectionPanelResizing(t) { + this.sectionPanelResizing = t; + } + setDrawerResizing(t) { + this.drawerResizing = t; + } +} +const Re = "copilot-", ts = "24.4.21", Dl = "attention-required", Cl = "https://plugins.jetbrains.com/plugin/23758-vaadin", Tl = "https://marketplace.visualstudio.com/items?itemName=vaadin.vaadin-vscode", Vl = (e, t, r) => t >= e.left && t <= e.right && r >= e.top && r <= e.bottom, rs = (e) => { + const t = []; + let r = is(e); + for (; r; ) + t.push(r), r = r.parentElement; + return t; +}, ns = (e, t) => { + let r = e; + for (; !(r instanceof HTMLElement && r.localName === `${Re}main`); ) { + if (!r.isConnected) + return null; + if (r.parentNode ? r = r.parentNode : r.host && (r = r.host), r instanceof HTMLElement && r.localName === t) + return r; + } + return null; +}; +function is(e) { + return e.parentElement ?? e.parentNode?.host; +} +function nt(e) { + return !e || !(e instanceof HTMLElement) ? !1 : [...rs(e), e].map((t) => t.localName).some((t) => t.startsWith(Re)); +} +function jl(e) { + return e instanceof Element; +} +function Rl(e) { + return e.startsWith("vaadin-") ? e.substring(7).split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" ") : e; +} +function kl(e) { + if (!e) + return; + if (e.id) + return `#${e.id}`; + if (!e.children) + return; + const t = Array.from(e.children).find((n) => n.localName === "label"); + if (t) + return t.outerText.trim(); + const r = Array.from(e.childNodes).find( + (n) => n.nodeType === Node.TEXT_NODE && n.textContent && n.textContent.trim().length > 0 + ); + if (r && r.textContent) + return r.textContent.trim(); +} +var Ni = /* @__PURE__ */ ((e) => (e["vaadin-combo-box"] = "vaadin-combo-box", e["vaadin-date-picker"] = "vaadin-date-picker", e["vaadin-dialog"] = "vaadin-dialog", e["vaadin-multi-select-combo-box"] = "vaadin-multi-select-combo-box", e["vaadin-select"] = "vaadin-select", e["vaadin-time-picker"] = "vaadin-time-picker", e))(Ni || {}); +const Ke = { + "vaadin-combo-box": { + hideOnActivation: !0, + open: (e) => wt(e), + close: (e) => Et(e) + }, + "vaadin-select": { + hideOnActivation: !0, + open: (e) => { + const t = e; + $i(t, t._overlayElement), t.opened = !0; + }, + close: (e) => { + const t = e; + Pi(t, t._overlayElement), t.opened = !1; + } + }, + "vaadin-multi-select-combo-box": { + hideOnActivation: !0, + open: (e) => wt(e.$.comboBox), + close: (e) => { + Et(e.$.comboBox), e.removeAttribute("focused"); + } + }, + "vaadin-date-picker": { + hideOnActivation: !0, + open: (e) => wt(e), + close: (e) => Et(e) + }, + "vaadin-time-picker": { + hideOnActivation: !0, + open: (e) => wt(e.$.comboBox), + close: (e) => { + Et(e.$.comboBox), e.removeAttribute("focused"); + } + }, + "vaadin-dialog": { + hideOnActivation: !1 + } +}, xi = (e) => { + e.preventDefault(), e.stopImmediatePropagation(); +}, wt = (e) => { + e.addEventListener("focusout", xi, { capture: !0 }), $i(e), e.opened = !0; +}, Et = (e) => { + Pi(e), e.removeAttribute("focused"), e.removeEventListener("focusout", xi, { capture: !0 }), e.opened = !1; +}, $i = (e, t) => { + const r = t ?? e.$.overlay; + r.__oldModeless = r.modeless, r.modeless = !0; +}, Pi = (e, t) => { + const r = t ?? e.$.overlay; + r.modeless = r.__oldModeless !== void 0 ? r.__oldModeless : r.modeless, delete r.__oldModeless; +}; +class os { + constructor() { + this.openedOverlayOwners = /* @__PURE__ */ new Set(), this.overlayCloseEventListener = (t) => { + nt(t.target?.owner) || (window.Vaadin.copilot._uiState.active || nt(t.detail.sourceEvent.target)) && (t.preventDefault(), t.stopImmediatePropagation()); + }; + } + /** + * Modifies pointer-events property to auto if dialog overlay is present on body element.
+ * Overriding closeOnOutsideClick method in order to keep overlay present while copilot is active + * @private + */ + onCopilotActivation() { + const t = Array.from(document.body.children).find( + (n) => n.localName.startsWith("vaadin") && n.localName.endsWith("-overlay") + ); + if (!t) + return; + const r = this.getOwner(t); + if (r) { + const n = Ke[r.localName]; + if (!n) + return; + n.hideOnActivation && n.close ? n.close(r) : document.body.style.getPropertyValue("pointer-events") === "none" && document.body.style.removeProperty("pointer-events"); + } + } + /** + * Restores pointer-events state on deactivation.
+ * Closes opened overlays while using copilot. + * @private + */ + onCopilotDeactivation() { + this.openedOverlayOwners.forEach((r) => { + const n = Ke[r.localName]; + n && n.close && n.close(r); + }), document.body.querySelector("vaadin-dialog-overlay") && document.body.style.setProperty("pointer-events", "none"); + } + getOwner(t) { + const r = t; + return r.owner ?? r.__dataHost; + } + addOverlayOutsideClickEvent() { + document.documentElement.addEventListener("vaadin-overlay-outside-click", this.overlayCloseEventListener, { + capture: !0 + }), document.documentElement.addEventListener("vaadin-overlay-escape-press", this.overlayCloseEventListener, { + capture: !0 + }); + } + removeOverlayOutsideClickEvent() { + document.documentElement.removeEventListener("vaadin-overlay-outside-click", this.overlayCloseEventListener), document.documentElement.removeEventListener("vaadin-overlay-escape-press", this.overlayCloseEventListener); + } + toggle(t) { + const r = Ke[t.localName]; + this.isOverlayActive(t) ? (r.close(t), this.openedOverlayOwners.delete(t)) : (r.open(t), this.openedOverlayOwners.add(t)); + } + isOverlayActive(t) { + const r = Ke[t.localName]; + return r.active ? r.active(t) : t.hasAttribute("opened"); + } + overlayStatus(t) { + if (!t) + return { visible: !1 }; + const r = t.localName; + let n = Object.keys(Ni).includes(r); + if (!n) + return { visible: !1 }; + const i = Ke[t.localName]; + i.hasOverlay && (n = i.hasOverlay(t)); + const o = this.isOverlayActive(t); + return { visible: n, active: o }; + } +} +function Di(e, t) { + const r = e(); + r ? t(r) : setTimeout(() => Di(e, t), 50); +} +async function Ci(e) { + const t = e(); + if (t) + return t; + let r; + const n = new Promise((o) => { + r = o; + }), i = setInterval(() => { + const o = e(); + o && (clearInterval(i), r(o)); + }, 10); + return n; +} +function as(e) { + return A.box(e, { deep: !1 }); +} +function ss(e) { + return e && typeof e.lastAccessedBy_ == "number"; +} +function Ll(e) { + if (e) { + if (typeof e == "string") + return e; + if (!ss(e)) + throw new Error(`Expected message to be a string or an observable value but was ${JSON.stringify(e)}`); + return e.get(); + } +} +function Ml(e, t) { + return e.length > t ? `${e.substring(0, t - 3)}...` : e; +} +const ls = { + userAgent: navigator.userAgent, + locale: navigator.language, + timezone: Intl.DateTimeFormat().resolvedOptions().timeZone +}; +async function jr() { + return Ci(() => { + const e = window.Vaadin.devTools, t = e?.frontendConnection && e?.frontendConnection.status === "active"; + return e !== void 0 && t && e?.frontendConnection; + }); +} +function ke(e, t) { + jr().then((r) => r.send(e, { ...t, context: ls })); +} +async function Il() { + return await jr(), !!window.Vaadin.devTools.conf.backend; +} +class cs { + constructor() { + this.promise = new Promise((t) => { + this.resolveInit = t; + }); + } + done(t) { + this.resolveInit(t); + } +} +class us { + constructor() { + this.dismissedNotifications = [], this.termsSummaryDismissed = !1, this.activationButtonPosition = null, this.paletteState = null, this.activationShortcut = !0, this.activationAnimation = !0, er(this), this.initializer = new cs(), this.initializer.promise.then(() => { + ci( + () => JSON.stringify(this), + () => { + ke("copilot-set-machine-configuration", { conf: JSON.stringify(sn(this)) }); + } + ); + }), window.Vaadin.copilot.eventbus.on("copilot-machine-configuration", (t) => { + const r = t.detail.conf; + Object.assign(this, sn(r)), this.initializer.done(!0), t.preventDefault(); + }), this.loadData(); + } + loadData() { + ke("copilot-get-machine-configuration", {}); + } + addDismissedNotification(t) { + this.dismissedNotifications.push(t); + } + getDismissedNotifications() { + return this.dismissedNotifications; + } + setTermsSummaryDismissed(t) { + this.termsSummaryDismissed = t; + } + isTermsSummaryDismissed() { + return this.termsSummaryDismissed; + } + getActivationButtonPosition() { + return this.activationButtonPosition; + } + setActivationButtonPosition(t) { + this.activationButtonPosition = t; + } + getPaletteState() { + return this.paletteState; + } + setPaletteState(t) { + this.paletteState = t; + } + isActivationShortcut() { + return this.activationShortcut; + } + setActivationShortcut(t) { + this.activationShortcut = t; + } + isActivationAnimation() { + return this.activationAnimation; + } + setActivationAnimation(t) { + this.activationAnimation = t; + } +} +function sn(e) { + const t = { ...e }; + return delete t.initializer, t; +} +const Ti = async (e, t, r) => window.Vaadin.copilot.comm(e, t, r); +class ds { + constructor() { + this._previewActivated = !1, this._remainingTimeInMillis = -1, this._active = !1, this._configurationLoaded = !1, er(this); + } + setConfiguration(t) { + this._previewActivated = t.previewActivated, t.previewActivated ? this._remainingTimeInMillis = t.remainingTimeInMillis : this._remainingTimeInMillis = -1, this._active = t.active, this._configurationLoaded = !0; + } + get previewActivated() { + return this._previewActivated; + } + get remainingTimeInMillis() { + return this._remainingTimeInMillis; + } + get active() { + return this._active; + } + get configurationLoaded() { + return this._configurationLoaded; + } + get expired() { + return this.previewActivated && !this.active; + } + reset() { + this._previewActivated = !1, this._active = !1, this._configurationLoaded = !1, this._remainingTimeInMillis = -1; + } + loadPreviewConfiguration() { + Ti(`${Re}get-preview`, {}, (t) => { + const r = t.data; + this.setConfiguration(r); + }).catch((t) => { + Promise.resolve().then(() => Bs).then((r) => { + r.handleCopilotError("Load preview configuration failed", t); + }); + }); + } +} +class hs { + constructor() { + this._panels = [], this._attentionRequiredPanelTag = null, this._floatingPanelsZIndexOrder = [], er(this), this.restorePositions(); + } + restorePositions() { + const t = be.getPanelConfigurations(); + t && (this._panels = this._panels.map((r) => { + const n = t.find((i) => i.tag === r.tag); + return n && (r = Object.assign(r, { ...n })), r; + })); + } + /** + * Adds panelTag as last element -focused- to list. + * @param panelConfiguration + */ + addFocusedFloatingPanel(t) { + this._floatingPanelsZIndexOrder = this._floatingPanelsZIndexOrder.filter((r) => r !== t.tag), t.floating && this._floatingPanelsZIndexOrder.push(t.tag); + } + /** + * Returns the focused z-index of floating panel as following order + *
    + *
  • Returns 50 for last(focused) element
  • + *
  • Returns the index of element in list(starting from 0)
  • + *
  • Returns 0 if panel is not in the list
  • + *
+ * @param panelTag + */ + getFloatingPanelZIndex(t) { + const r = this._floatingPanelsZIndexOrder.findIndex((n) => n === t); + return r === this._floatingPanelsZIndexOrder.length - 1 ? 50 : r === -1 ? 0 : r; + } + get floatingPanelsZIndexOrder() { + return this._floatingPanelsZIndexOrder; + } + get attentionRequiredPanelTag() { + return this._attentionRequiredPanelTag; + } + set attentionRequiredPanelTag(t) { + this._attentionRequiredPanelTag = t; + } + getAttentionRequiredPanelConfiguration() { + return this._panels.find((t) => t.tag === this._attentionRequiredPanelTag); + } + clearAttention() { + this._attentionRequiredPanelTag = null; + } + get panels() { + return this._panels; + } + addPanel(t) { + this._panels.push(t), this.restorePositions(); + } + getPanelByTag(t) { + return this._panels.find((r) => r.tag === t); + } + updatePanel(t, r) { + const n = [...this._panels], i = n.find((o) => o.tag === t); + if (i) { + for (const o in r) + i[o] = r[o]; + r.floating === !1 && (this._floatingPanelsZIndexOrder = this._floatingPanelsZIndexOrder.filter((o) => o !== t)), this._panels = n, be.savePanelConfigurations(this._panels); + } + } + updateOrders(t) { + const r = [...this._panels]; + r.forEach((n) => { + const i = t.find((o) => o.tag === n.tag); + i && (n.panelOrder = i.order); + }), this._panels = r, be.savePanelConfigurations(r); + } +} +window.Vaadin ??= {}; +window.Vaadin.copilot ??= {}; +window.Vaadin.copilot.plugins = []; +window.Vaadin.copilot._uiState = new es(); +window.Vaadin.copilot.eventbus = new ao(); +window.Vaadin.copilot.overlayManager = new os(); +window.Vaadin.copilot._machineState = new us(); +window.Vaadin.copilot._previewState = new ds(); +window.Vaadin.copilot._sectionPanelUiState = new hs(); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const vs = (e) => (t, r) => { + r !== void 0 ? r.addInitializer(() => { + customElements.define(e, t); + }) : customElements.define(e, t); +}; +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const $t = globalThis, Rr = $t.ShadowRoot && ($t.ShadyCSS === void 0 || $t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, kr = Symbol(), ln = /* @__PURE__ */ new WeakMap(); +let Vi = class { + constructor(t, r, n) { + if (this._$cssResult$ = !0, n !== kr) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); + this.cssText = t, this.t = r; + } + get styleSheet() { + let t = this.o; + const r = this.t; + if (Rr && t === void 0) { + const n = r !== void 0 && r.length === 1; + n && (t = ln.get(r)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && ln.set(r, t)); + } + return t; + } + toString() { + return this.cssText; + } +}; +const ie = (e) => new Vi(typeof e == "string" ? e : e + "", void 0, kr), fs = (e, ...t) => { + const r = e.length === 1 ? e[0] : t.reduce((n, i, o) => n + ((a) => { + if (a._$cssResult$ === !0) return a.cssText; + if (typeof a == "number") return a; + throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security."); + })(i) + e[o + 1], e[0]); + return new Vi(r, e, kr); +}, ps = (e, t) => { + if (Rr) e.adoptedStyleSheets = t.map((r) => r instanceof CSSStyleSheet ? r : r.styleSheet); + else for (const r of t) { + const n = document.createElement("style"), i = $t.litNonce; + i !== void 0 && n.setAttribute("nonce", i), n.textContent = r.cssText, e.appendChild(n); + } +}, cn = Rr ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => { + let r = ""; + for (const n of t.cssRules) r += n.cssText; + return ie(r); +})(e) : e; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const { is: gs, defineProperty: bs, getOwnPropertyDescriptor: _s, getOwnPropertyNames: ms, getOwnPropertySymbols: ys, getPrototypeOf: ws } = Object, tr = globalThis, un = tr.trustedTypes, Es = un ? un.emptyScript : "", Os = tr.reactiveElementPolyfillSupport, Xe = (e, t) => e, Er = { toAttribute(e, t) { + switch (t) { + case Boolean: + e = e ? Es : null; + break; + case Object: + case Array: + e = e == null ? e : JSON.stringify(e); + } + return e; +}, fromAttribute(e, t) { + let r = e; + switch (t) { + case Boolean: + r = e !== null; + break; + case Number: + r = e === null ? null : Number(e); + break; + case Object: + case Array: + try { + r = JSON.parse(e); + } catch { + r = null; + } + } + return r; +} }, ji = (e, t) => !gs(e, t), dn = { attribute: !0, type: String, converter: Er, reflect: !1, hasChanged: ji }; +Symbol.metadata ??= Symbol("metadata"), tr.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap(); +let De = class extends HTMLElement { + static addInitializer(t) { + this._$Ei(), (this.l ??= []).push(t); + } + static get observedAttributes() { + return this.finalize(), this._$Eh && [...this._$Eh.keys()]; + } + static createProperty(t, r = dn) { + if (r.state && (r.attribute = !1), this._$Ei(), this.elementProperties.set(t, r), !r.noAccessor) { + const n = Symbol(), i = this.getPropertyDescriptor(t, n, r); + i !== void 0 && bs(this.prototype, t, i); + } + } + static getPropertyDescriptor(t, r, n) { + const { get: i, set: o } = _s(this.prototype, t) ?? { get() { + return this[r]; + }, set(a) { + this[r] = a; + } }; + return { get() { + return i?.call(this); + }, set(a) { + const l = i?.call(this); + o.call(this, a), this.requestUpdate(t, l, n); + }, configurable: !0, enumerable: !0 }; + } + static getPropertyOptions(t) { + return this.elementProperties.get(t) ?? dn; + } + static _$Ei() { + if (this.hasOwnProperty(Xe("elementProperties"))) return; + const t = ws(this); + t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties); + } + static finalize() { + if (this.hasOwnProperty(Xe("finalized"))) return; + if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Xe("properties"))) { + const r = this.properties, n = [...ms(r), ...ys(r)]; + for (const i of n) this.createProperty(i, r[i]); + } + const t = this[Symbol.metadata]; + if (t !== null) { + const r = litPropertyMetadata.get(t); + if (r !== void 0) for (const [n, i] of r) this.elementProperties.set(n, i); + } + this._$Eh = /* @__PURE__ */ new Map(); + for (const [r, n] of this.elementProperties) { + const i = this._$Eu(r, n); + i !== void 0 && this._$Eh.set(i, r); + } + this.elementStyles = this.finalizeStyles(this.styles); + } + static finalizeStyles(t) { + const r = []; + if (Array.isArray(t)) { + const n = new Set(t.flat(1 / 0).reverse()); + for (const i of n) r.unshift(cn(i)); + } else t !== void 0 && r.push(cn(t)); + return r; + } + static _$Eu(t, r) { + const n = r.attribute; + return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0; + } + constructor() { + super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev(); + } + _$Ev() { + this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this)); + } + addController(t) { + (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.(); + } + removeController(t) { + this._$EO?.delete(t); + } + _$E_() { + const t = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties; + for (const n of r.keys()) this.hasOwnProperty(n) && (t.set(n, this[n]), delete this[n]); + t.size > 0 && (this._$Ep = t); + } + createRenderRoot() { + const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions); + return ps(t, this.constructor.elementStyles), t; + } + connectedCallback() { + this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.()); + } + enableUpdating(t) { + } + disconnectedCallback() { + this._$EO?.forEach((t) => t.hostDisconnected?.()); + } + attributeChangedCallback(t, r, n) { + this._$AK(t, n); + } + _$EC(t, r) { + const n = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, n); + if (i !== void 0 && n.reflect === !0) { + const o = (n.converter?.toAttribute !== void 0 ? n.converter : Er).toAttribute(r, n.type); + this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null; + } + } + _$AK(t, r) { + const n = this.constructor, i = n._$Eh.get(t); + if (i !== void 0 && this._$Em !== i) { + const o = n.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Er; + this._$Em = i, this[i] = a.fromAttribute(r, o.type), this._$Em = null; + } + } + requestUpdate(t, r, n) { + if (t !== void 0) { + if (n ??= this.constructor.getPropertyOptions(t), !(n.hasChanged ?? ji)(this[t], r)) return; + this.P(t, r, n); + } + this.isUpdatePending === !1 && (this._$ES = this._$ET()); + } + P(t, r, n) { + this._$AL.has(t) || this._$AL.set(t, r), n.reflect === !0 && this._$Em !== t && (this._$Ej ??= /* @__PURE__ */ new Set()).add(t); + } + async _$ET() { + this.isUpdatePending = !0; + try { + await this._$ES; + } catch (r) { + Promise.reject(r); + } + const t = this.scheduleUpdate(); + return t != null && await t, !this.isUpdatePending; + } + scheduleUpdate() { + return this.performUpdate(); + } + performUpdate() { + if (!this.isUpdatePending) return; + if (!this.hasUpdated) { + if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) { + for (const [i, o] of this._$Ep) this[i] = o; + this._$Ep = void 0; + } + const n = this.constructor.elementProperties; + if (n.size > 0) for (const [i, o] of n) o.wrapped !== !0 || this._$AL.has(i) || this[i] === void 0 || this.P(i, this[i], o); + } + let t = !1; + const r = this._$AL; + try { + t = this.shouldUpdate(r), t ? (this.willUpdate(r), this._$EO?.forEach((n) => n.hostUpdate?.()), this.update(r)) : this._$EU(); + } catch (n) { + throw t = !1, this._$EU(), n; + } + t && this._$AE(r); + } + willUpdate(t) { + } + _$AE(t) { + this._$EO?.forEach((r) => r.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); + } + _$EU() { + this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; + } + get updateComplete() { + return this.getUpdateComplete(); + } + getUpdateComplete() { + return this._$ES; + } + shouldUpdate(t) { + return !0; + } + update(t) { + this._$Ej &&= this._$Ej.forEach((r) => this._$EC(r, this[r])), this._$EU(); + } + updated(t) { + } + firstUpdated(t) { + } +}; +De.elementStyles = [], De.shadowRootOptions = { mode: "open" }, De[Xe("elementProperties")] = /* @__PURE__ */ new Map(), De[Xe("finalized")] = /* @__PURE__ */ new Map(), Os?.({ ReactiveElement: De }), (tr.reactiveElementVersions ??= []).push("2.0.4"); +const Pe = Symbol("LitMobxRenderReaction"), hn = Symbol("LitMobxRequestUpdate"); +function As(e, t) { + var r, n; + return n = class extends e { + constructor() { + super(...arguments), this[r] = () => { + this.requestUpdate(); + }; + } + connectedCallback() { + super.connectedCallback(); + const o = this.constructor.name || this.nodeName; + this[Pe] = new t(`${o}.update()`, this[hn]), this.hasUpdated && this.requestUpdate(); + } + disconnectedCallback() { + super.disconnectedCallback(), this[Pe] && (this[Pe].dispose(), this[Pe] = void 0); + } + update(o) { + this[Pe] ? this[Pe].track(super.update.bind(this, o)) : super.update(o); + } + }, r = hn, n; +} +function Ss(e) { + return As(e, Ye); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Lr = globalThis, Ut = Lr.trustedTypes, vn = Ut ? Ut.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Mr = "$lit$", Y = `lit$${(Math.random() + "").slice(9)}$`, Ir = "?" + Y, Ns = `<${Ir}>`, Oe = document, it = () => Oe.createComment(""), ot = (e) => e === null || typeof e != "object" && typeof e != "function", Ri = Array.isArray, ki = (e) => Ri(e) || typeof e?.[Symbol.iterator] == "function", lr = `[ +\f\r]`, He = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, fn = /-->/g, pn = />/g, de = RegExp(`>|${lr}(?:([^\\s"'>=/]+)(${lr}*=${lr}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`, "g"), gn = /'/g, bn = /"/g, Li = /^(?:script|style|textarea|title)$/i, Mi = (e) => (t, ...r) => ({ _$litType$: e, strings: t, values: r }), zt = Mi(1), Kl = Mi(2), le = Symbol.for("lit-noChange"), O = Symbol.for("lit-nothing"), _n = /* @__PURE__ */ new WeakMap(), pe = Oe.createTreeWalker(Oe, 129); +function Ii(e, t) { + if (!Array.isArray(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array"); + return vn !== void 0 ? vn.createHTML(t) : t; +} +const Ui = (e, t) => { + const r = e.length - 1, n = []; + let i, o = t === 2 ? "" : "", a = He; + for (let l = 0; l < r; l++) { + const s = e[l]; + let c, d, u = -1, f = 0; + for (; f < s.length && (a.lastIndex = f, d = a.exec(s), d !== null); ) f = a.lastIndex, a === He ? d[1] === "!--" ? a = fn : d[1] !== void 0 ? a = pn : d[2] !== void 0 ? (Li.test(d[2]) && (i = RegExp("" ? (a = i ?? He, u = -1) : d[1] === void 0 ? u = -2 : (u = a.lastIndex - d[2].length, c = d[1], a = d[3] === void 0 ? de : d[3] === '"' ? bn : gn) : a === bn || a === gn ? a = de : a === fn || a === pn ? a = He : (a = de, i = void 0); + const p = a === de && e[l + 1].startsWith("/>") ? " " : ""; + o += a === He ? s + Ns : u >= 0 ? (n.push(c), s.slice(0, u) + Mr + s.slice(u) + Y + p) : s + Y + (u === -2 ? l : p); + } + return [Ii(e, o + (e[r] || "") + (t === 2 ? "" : "")), n]; +}; +class at { + constructor({ strings: t, _$litType$: r }, n) { + let i; + this.parts = []; + let o = 0, a = 0; + const l = t.length - 1, s = this.parts, [c, d] = Ui(t, r); + if (this.el = at.createElement(c, n), pe.currentNode = this.el.content, r === 2) { + const u = this.el.content.firstChild; + u.replaceWith(...u.childNodes); + } + for (; (i = pe.nextNode()) !== null && s.length < l; ) { + if (i.nodeType === 1) { + if (i.hasAttributes()) for (const u of i.getAttributeNames()) if (u.endsWith(Mr)) { + const f = d[a++], p = i.getAttribute(u).split(Y), y = /([.?@])?(.*)/.exec(f); + s.push({ type: 1, index: o, name: y[2], strings: p, ctor: y[1] === "." ? Bi : y[1] === "?" ? Ki : y[1] === "@" ? Hi : pt }), i.removeAttribute(u); + } else u.startsWith(Y) && (s.push({ type: 6, index: o }), i.removeAttribute(u)); + if (Li.test(i.tagName)) { + const u = i.textContent.split(Y), f = u.length - 1; + if (f > 0) { + i.textContent = Ut ? Ut.emptyScript : ""; + for (let p = 0; p < f; p++) i.append(u[p], it()), pe.nextNode(), s.push({ type: 2, index: ++o }); + i.append(u[f], it()); + } + } + } else if (i.nodeType === 8) if (i.data === Ir) s.push({ type: 2, index: o }); + else { + let u = -1; + for (; (u = i.data.indexOf(Y, u + 1)) !== -1; ) s.push({ type: 7, index: o }), u += Y.length - 1; + } + o++; + } + } + static createElement(t, r) { + const n = Oe.createElement("template"); + return n.innerHTML = t, n; + } +} +function Ae(e, t, r = e, n) { + if (t === le) return t; + let i = n !== void 0 ? r._$Co?.[n] : r._$Cl; + const o = ot(t) ? void 0 : t._$litDirective$; + return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(e), i._$AT(e, r, n)), n !== void 0 ? (r._$Co ??= [])[n] = i : r._$Cl = i), i !== void 0 && (t = Ae(e, i._$AS(e, t.values), i, n)), t; +} +class zi { + constructor(t, r) { + this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = r; + } + get parentNode() { + return this._$AM.parentNode; + } + get _$AU() { + return this._$AM._$AU; + } + u(t) { + const { el: { content: r }, parts: n } = this._$AD, i = (t?.creationScope ?? Oe).importNode(r, !0); + pe.currentNode = i; + let o = pe.nextNode(), a = 0, l = 0, s = n[0]; + for (; s !== void 0; ) { + if (a === s.index) { + let c; + s.type === 2 ? c = new ze(o, o.nextSibling, this, t) : s.type === 1 ? c = new s.ctor(o, s.name, s.strings, this, t) : s.type === 6 && (c = new qi(o, this, t)), this._$AV.push(c), s = n[++l]; + } + a !== s?.index && (o = pe.nextNode(), a++); + } + return pe.currentNode = Oe, i; + } + p(t) { + let r = 0; + for (const n of this._$AV) n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, r), r += n.strings.length - 2) : n._$AI(t[r])), r++; + } +} +class ze { + get _$AU() { + return this._$AM?._$AU ?? this._$Cv; + } + constructor(t, r, n, i) { + this.type = 2, this._$AH = O, this._$AN = void 0, this._$AA = t, this._$AB = r, this._$AM = n, this.options = i, this._$Cv = i?.isConnected ?? !0; + } + get parentNode() { + let t = this._$AA.parentNode; + const r = this._$AM; + return r !== void 0 && t?.nodeType === 11 && (t = r.parentNode), t; + } + get startNode() { + return this._$AA; + } + get endNode() { + return this._$AB; + } + _$AI(t, r = this) { + t = Ae(this, t, r), ot(t) ? t === O || t == null || t === "" ? (this._$AH !== O && this._$AR(), this._$AH = O) : t !== this._$AH && t !== le && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ki(t) ? this.k(t) : this._(t); + } + S(t) { + return this._$AA.parentNode.insertBefore(t, this._$AB); + } + T(t) { + this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); + } + _(t) { + this._$AH !== O && ot(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Oe.createTextNode(t)), this._$AH = t; + } + $(t) { + const { values: r, _$litType$: n } = t, i = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = at.createElement(Ii(n.h, n.h[0]), this.options)), n); + if (this._$AH?._$AD === i) this._$AH.p(r); + else { + const o = new zi(i, this), a = o.u(this.options); + o.p(r), this.T(a), this._$AH = o; + } + } + _$AC(t) { + let r = _n.get(t.strings); + return r === void 0 && _n.set(t.strings, r = new at(t)), r; + } + k(t) { + Ri(this._$AH) || (this._$AH = [], this._$AR()); + const r = this._$AH; + let n, i = 0; + for (const o of t) i === r.length ? r.push(n = new ze(this.S(it()), this.S(it()), this, this.options)) : n = r[i], n._$AI(o), i++; + i < r.length && (this._$AR(n && n._$AB.nextSibling, i), r.length = i); + } + _$AR(t = this._$AA.nextSibling, r) { + for (this._$AP?.(!1, !0, r); t && t !== this._$AB; ) { + const n = t.nextSibling; + t.remove(), t = n; + } + } + setConnected(t) { + this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t)); + } +} +class pt { + get tagName() { + return this.element.tagName; + } + get _$AU() { + return this._$AM._$AU; + } + constructor(t, r, n, i, o) { + this.type = 1, this._$AH = O, this._$AN = void 0, this.element = t, this.name = r, this._$AM = i, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = O; + } + _$AI(t, r = this, n, i) { + const o = this.strings; + let a = !1; + if (o === void 0) t = Ae(this, t, r, 0), a = !ot(t) || t !== this._$AH && t !== le, a && (this._$AH = t); + else { + const l = t; + let s, c; + for (t = o[0], s = 0; s < o.length - 1; s++) c = Ae(this, l[n + s], r, s), c === le && (c = this._$AH[s]), a ||= !ot(c) || c !== this._$AH[s], c === O ? t = O : t !== O && (t += (c ?? "") + o[s + 1]), this._$AH[s] = c; + } + a && !i && this.j(t); + } + j(t) { + t === O ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? ""); + } +} +class Bi extends pt { + constructor() { + super(...arguments), this.type = 3; + } + j(t) { + this.element[this.name] = t === O ? void 0 : t; + } +} +class Ki extends pt { + constructor() { + super(...arguments), this.type = 4; + } + j(t) { + this.element.toggleAttribute(this.name, !!t && t !== O); + } +} +class Hi extends pt { + constructor(t, r, n, i, o) { + super(t, r, n, i, o), this.type = 5; + } + _$AI(t, r = this) { + if ((t = Ae(this, t, r, 0) ?? O) === le) return; + const n = this._$AH, i = t === O && n !== O || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== O && (n === O || i); + i && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t; + } + handleEvent(t) { + typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t); + } +} +class qi { + constructor(t, r, n) { + this.element = t, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = n; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t) { + Ae(this, t); + } +} +const xs = { P: Mr, A: Y, C: Ir, M: 1, L: Ui, R: zi, D: ki, V: Ae, I: ze, H: pt, N: Ki, U: Hi, B: Bi, F: qi }, $s = Lr.litHtmlPolyfillSupport; +$s?.(at, ze), (Lr.litHtmlVersions ??= []).push("3.1.2"); +const Ps = (e, t, r) => { + const n = r?.renderBefore ?? t; + let i = n._$litPart$; + if (i === void 0) { + const o = r?.renderBefore ?? null; + n._$litPart$ = i = new ze(t.insertBefore(it(), o), o, void 0, r ?? {}); + } + return i._$AI(e), i; +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +let Je = class extends De { + constructor() { + super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; + } + createRenderRoot() { + const t = super.createRenderRoot(); + return this.renderOptions.renderBefore ??= t.firstChild, t; + } + update(t) { + const r = this.render(); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ps(r, this.renderRoot, this.renderOptions); + } + connectedCallback() { + super.connectedCallback(), this._$Do?.setConnected(!0); + } + disconnectedCallback() { + super.disconnectedCallback(), this._$Do?.setConnected(!1); + } + render() { + return le; + } +}; +Je._$litElement$ = !0, Je.finalized = !0, globalThis.litElementHydrateSupport?.({ LitElement: Je }); +const Ds = globalThis.litElementPolyfillSupport; +Ds?.({ LitElement: Je }); +(globalThis.litElementVersions ??= []).push("4.0.4"); +class Cs extends Ss(Je) { +} +class Ts extends Cs { + constructor() { + super(...arguments), this.disposers = []; + } + /** + * Creates a MobX reaction using the given parameters and disposes it when this element is detached. + * + * This should be called from `connectedCallback` to ensure that the reaction is active also if the element is attached again later. + */ + reaction(t, r, n) { + this.disposers.push(ci(t, r, n)); + } + /** + * Creates a MobX autorun using the given parameters and disposes it when this element is detached. + * + * This should be called from `connectedCallback` to ensure that the reaction is active also if the element is attached again later. + */ + autorun(t, r) { + this.disposers.push(si(t, r)); + } + disconnectedCallback() { + super.disconnectedCallback(), this.disposers.forEach((t) => { + t(); + }), this.disposers = []; + } +} +const gt = window.Vaadin.copilot._sectionPanelUiState; +if (!gt) + throw new Error("Tried to access copilot section panel ui state before it was initialized."); +let ve = []; +const mn = []; +function yn(e) { + e.init({ + addPanel: (t) => { + gt.addPanel(t); + }, + send(t, r) { + ke(t, r); + } + }); +} +function Vs() { + ve.push(import("./copilot-log-plugin-DZJhiSMo.js")), ve.push(import("./copilot-info-plugin-Do8zGsEn.js")), ve.push(import("./copilot-features-plugin-tc1ssT5Q.js")), ve.push(import("./copilot-feedback-plugin-BEKNiRJC.js")), ve.push(import("./copilot-shortcuts-plugin-CbDPhQ2e.js")); +} +function js() { + { + const e = `https://cdn.vaadin.com/copilot/${ts}/copilot-plugins.js`; + import( + /* @vite-ignore */ + e + ).catch((t) => { + console.warn(`Unable to load plugins from ${e}. Some Copilot features are unavailable.`, t); + }); + } +} +function Rs() { + Promise.all(ve).then(() => { + const e = window.Vaadin; + if (e.copilot.plugins) { + const t = e.copilot.plugins; + e.copilot.plugins.push = (r) => yn(r), Array.from(t).forEach((r) => { + mn.includes(r) || (yn(r), mn.push(r)); + }); + } + }), ve = []; +} +class ks { + constructor() { + this.active = !1, this.activate = () => { + this.active = !0, this.blurActiveApplicationElement(); + }, this.deactivate = () => { + this.active = !1; + }, this.focusInEventListener = (t) => { + this.active && (t.preventDefault(), t.stopPropagation(), nt(t.target) || requestAnimationFrame(() => { + t.target.blur && t.target.blur(), document.body.querySelector("copilot-main")?.focus(); + })); + }; + } + hostConnectedCallback() { + const t = this.getApplicationRootElement(); + t && t instanceof HTMLElement && t.addEventListener("focusin", this.focusInEventListener); + } + hostDisconnectedCallback() { + const t = this.getApplicationRootElement(); + t && t instanceof HTMLElement && t.removeEventListener("focusin", this.focusInEventListener); + } + getApplicationRootElement() { + return document.body.firstElementChild; + } + blurActiveApplicationElement() { + document.activeElement && document.activeElement.blur && document.activeElement.blur(); + } +} +const Ot = new ks(), x = window.Vaadin.copilot.eventbus; +if (!x) + throw new Error("Tried to access copilot eventbus before it was initialized."); +const qe = window.Vaadin.copilot.overlayManager, ql = { + AddClickListener: "Add Click Listener", + AI: "AI", + Delete: "Delete", + DragAndDrop: "Drag and Drop", + Duplicate: "Duplicate", + SetLabel: "Set label", + SetText: "Set text", + SetHelper: "Set helper text", + WrapWithTag: "Wrapping with tag", + Alignment: "Alignment", + Padding: "Padding", + ModifyComponentSource: "Modify component source", + Gap: "Gap" +}, b = window.Vaadin.copilot._uiState; +if (!b) + throw new Error("Tried to access copilot ui state before it was initialized."); +const Ur = (e, t) => { + ke("copilot-track-event", { event: e, value: t }); +}; +var zr = /* @__PURE__ */ ((e) => (e.INFORMATION = "information", e.WARNING = "warning", e.ERROR = "error", e))(zr || {}); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Fi = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Wi = (e) => (...t) => ({ _$litDirective$: e, values: t }); +let Gi = class { + constructor(t) { + } + get _$AU() { + return this._$AM._$AU; + } + _$AT(t, r, n) { + this._$Ct = t, this._$AM = r, this._$Ci = n; + } + _$AS(t, r) { + return this.update(t, r); + } + update(t, r) { + return this.render(...r); + } +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +let Or = class extends Gi { + constructor(t) { + if (super(t), this.it = O, t.type !== Fi.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); + } + render(t) { + if (t === O || t == null) return this._t = void 0, this.it = t; + if (t === le) return t; + if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); + if (t === this.it) return this._t; + this.it = t; + const r = [t]; + return r.raw = r, this._t = { _$litType$: this.constructor.resultType, strings: r, values: [] }; + } +}; +Or.directiveName = "unsafeHTML", Or.resultType = 1; +const Ls = Wi(Or); +function Xi() { + return import("./copilot-notification-BorVW3EP.js"); +} +const Ms = (e) => { + rr("Unspecified error", e); +}, Is = (e) => e.error ? (Us({ + error: e.error, + message: e.errorMessage, + stackTrace: e.errorStacktrace +}), !0) : !1, Ji = (e, t, r) => { + Xi().then(({ showNotification: n }) => { + n({ + type: zr.ERROR, + message: e, + details: as( + zt`
+ ${Ls(t)} + +
` + ), + delay: 3e4 + }); + }), Ur("error", `${e} +\`\`\`${r}\`\`\``), b.operationWaitsHmrUpdate = void 0; +}, Us = (e) => { + Ji(e.error, e.message, e.stackTrace); +}; +function zs(e, t) { + Ji(e, t.message, t.stack || ""); +} +function rr(e, t) { + Xi().then(({ showNotification: r }) => { + r({ + type: zr.ERROR, + message: "Copilot internal error", + details: e + (t ? ` +${t}` : "") + }); + }), Ur("error", `${e} +\`\`\`${t}\`\`\``); +} +const Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + handleBrowserOperationError: zs, + handleCopilotError: rr, + handleErrorDuringOperation: Ms, + handleServerOperationErrorIfNeeded: Is +}, Symbol.toStringTag, { value: "Module" })), Zi = window.Vaadin.copilot._previewState; +if (!Zi) + throw new Error("Tried to access copilot preview state before it was initialized."); +const Yi = () => { + Ks().then((e) => b.setUserInfo(e)).catch((e) => rr("Failed to load userInfo", e)); +}, Ks = async () => Ti(`${Re}get-user-info`, {}, (e) => (delete e.data.reqId, e.data)), Hs = async () => Ci(() => b.userInfo), Gl = async () => (await Hs()).vaadiner; +x.on("copilot-prokey-received", (e) => { + Yi(), e.preventDefault(); +}); +function qs() { + const e = window.navigator.userAgent; + return e.indexOf("Windows") !== -1 ? "Windows" : e.indexOf("Mac") !== -1 ? "Mac" : e.indexOf("Linux") !== -1 ? "Linux" : null; +} +function Fs() { + return qs() === "Mac"; +} +function Ws() { + return Fs() ? "⌘" : "Ctrl"; +} +const Qi = window.Vaadin.copilot._machineState; +if (!Qi) + throw new Error("Trying to use stored machine state before it was initialized"); +function Gs(e) { + return e.composed && e.composedPath().map((t) => t.localName).some((t) => t === "copilot-spotlight"); +} +function Xs(e) { + return e.composed && e.composedPath().map((t) => t.localName).some((t) => t === "copilot-drawer-panel" || t === "copilot-section-panel-wrapper"); +} +let cr = !1, At = 0; +const wn = (e) => { + if (Qi.isActivationShortcut()) + if (e.key === "Shift" && !e.ctrlKey && !e.altKey && !e.metaKey) + cr = !0; + else if (cr && e.shiftKey && (e.key === "Control" || e.key === "Meta")) { + if (At++, At === 2) { + b.toggleActive("shortcut"); + return; + } + setTimeout(() => { + At = 0; + }, 500); + } else + cr = !1, At = 0; + b.active && Js(e); +}, Js = (e) => { + const t = Gs(e); + if (e.shiftKey && e.code === "Space") + b.setSpotlightActive(!b.spotlightActive), e.stopPropagation(), e.preventDefault(); + else if (e.key === "Escape") { + if (e.stopPropagation(), b.loginCheckActive) { + b.setLoginCheckActive(!1); + return; + } + x.emit("close-drawers", {}), b.setSpotlightActive(!1); + } else !Xs(e) && !t && Zs(e) ? (x.emit("delete-selected", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "d" && !t ? (x.emit("duplicate-selected", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "b" && !t ? (x.emit("show-selected-in-ide", {}), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "z" ? b.idePluginState?.supportedActions?.find((r) => r === "undo") && (x.emit("undoRedo", { undo: !e.shiftKey }), e.preventDefault(), e.stopPropagation()) : (e.ctrlKey || e.metaKey) && e.key === "c" && !t && e.composed && e.composedPath().map((r) => r.localName).some((r) => r === "copilot-component-overlay") && (x.emit("copy-selected", {}), e.preventDefault(), e.stopPropagation()); +}, Zs = (e) => (e.key === "Backspace" || e.key === "Delete") && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey, ne = Ws(), Xl = { + toggleCopilot: ` + ${ne} ${ne}`, + toggleCommandWindow: " + Space", + undo: `${ne} + Z`, + redo: `${ne} + + Z`, + duplicate: `${ne} + D`, + goToSource: `${ne} + B`, + selectParent: "", + selectPreviousSibling: "", + selectNextSibling: "", + delete: "DEL", + copy: `${ne} + C`, + paste: `${ne} + V` +}; +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const eo = Symbol.for(""), Ys = (e) => { + if (e?.r === eo) return e?._$litStatic$; +}, to = (e) => ({ _$litStatic$: e, r: eo }), En = /* @__PURE__ */ new Map(), Qs = (e) => (t, ...r) => { + const n = r.length; + let i, o; + const a = [], l = []; + let s, c = 0, d = !1; + for (; c < n; ) { + for (s = t[c]; c < n && (o = r[c], (i = Ys(o)) !== void 0); ) s += i + t[++c], d = !0; + c !== n && l.push(o), a.push(s), c++; + } + if (c === n && a.push(t[n]), d) { + const u = a.join("$$lit$$"); + (t = En.get(u)) === void 0 && (a.raw = a, En.set(u, t = a)), r = l; + } + return e(t, ...r); +}, Bt = Qs(zt); +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const { I: el } = xs, On = () => document.createComment(""), Fe = (e, t, r) => { + const n = e._$AA.parentNode, i = t === void 0 ? e._$AB : t._$AA; + if (r === void 0) { + const o = n.insertBefore(On(), i), a = n.insertBefore(On(), i); + r = new el(o, a, e, e.options); + } else { + const o = r._$AB.nextSibling, a = r._$AM, l = a !== e; + if (l) { + let s; + r._$AQ?.(e), r._$AM = e, r._$AP !== void 0 && (s = e._$AU) !== a._$AU && r._$AP(s); + } + if (o !== i || l) { + let s = r._$AA; + for (; s !== o; ) { + const c = s.nextSibling; + n.insertBefore(s, i), s = c; + } + } + } + return r; +}, he = (e, t, r = e) => (e._$AI(t, r), e), tl = {}, rl = (e, t = tl) => e._$AH = t, nl = (e) => e._$AH, ur = (e) => { + e._$AP?.(!1, !0); + let t = e._$AA; + const r = e._$AB.nextSibling; + for (; t !== r; ) { + const n = t.nextSibling; + t.remove(), t = n; + } +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const An = (e, t, r) => { + const n = /* @__PURE__ */ new Map(); + for (let i = t; i <= r; i++) n.set(e[i], i); + return n; +}, ro = Wi(class extends Gi { + constructor(e) { + if (super(e), e.type !== Fi.CHILD) throw Error("repeat() can only be used in text expressions"); + } + dt(e, t, r) { + let n; + r === void 0 ? r = t : t !== void 0 && (n = t); + const i = [], o = []; + let a = 0; + for (const l of e) i[a] = n ? n(l, a) : a, o[a] = r(l, a), a++; + return { values: o, keys: i }; + } + render(e, t, r) { + return this.dt(e, t, r).values; + } + update(e, [t, r, n]) { + const i = nl(e), { values: o, keys: a } = this.dt(t, r, n); + if (!Array.isArray(i)) return this.ut = a, o; + const l = this.ut ??= [], s = []; + let c, d, u = 0, f = i.length - 1, p = 0, y = o.length - 1; + for (; u <= f && p <= y; ) if (i[u] === null) u++; + else if (i[f] === null) f--; + else if (l[u] === a[p]) s[p] = he(i[u], o[p]), u++, p++; + else if (l[f] === a[y]) s[y] = he(i[f], o[y]), f--, y--; + else if (l[u] === a[y]) s[y] = he(i[u], o[y]), Fe(e, s[y + 1], i[u]), u++, y--; + else if (l[f] === a[p]) s[p] = he(i[f], o[p]), Fe(e, i[u], i[f]), f--, p++; + else if (c === void 0 && (c = An(a, p, y), d = An(l, u, f)), c.has(l[u])) if (c.has(l[f])) { + const m = d.get(a[p]), S = m !== void 0 ? i[m] : null; + if (S === null) { + const F = Fe(e, i[u]); + he(F, o[p]), s[p] = F; + } else s[p] = he(S, o[p]), Fe(e, i[u], S), i[m] = null; + p++; + } else ur(i[f]), f--; + else ur(i[u]), u++; + for (; p <= y; ) { + const m = Fe(e, s[y + 1]); + he(m, o[p]), s[p++] = m; + } + for (; u <= f; ) { + const m = i[u++]; + m !== null && ur(m); + } + return this.ut = a, rl(e, s), le; + } +}), Pt = /* @__PURE__ */ new Map(), il = (e) => { + const r = gt.panels.filter((n) => !n.floating && n.panel === e).sort((n, i) => n.panelOrder - i.panelOrder); + return Bt` + ${ro( + r, + (n) => n.tag, + (n) => { + const i = to(n.tag); + return Bt` + + <${i} slot="content"> + `; + } + )} + `; +}, ol = () => { + const e = gt.panels; + return Bt` + ${ro( + e.filter((t) => t.floating), + (t) => t.tag, + (t) => { + const r = to(t.tag); + return Bt` + + <${r} slot="content"> + `; + } + )} + `; +}, Jl = (e) => { + const t = e.panelTag, r = e.querySelector('[slot="content"]'); + r && Pt.set(t, r); +}, Zl = (e) => { + if (Pt.has(e.panelTag)) { + const t = Pt.get(e.panelTag); + e.querySelector('[slot="content"]').replaceWith(t); + } + Pt.delete(e.panelTag); +}; +var N = []; +for (var dr = 0; dr < 256; ++dr) + N.push((dr + 256).toString(16).slice(1)); +function al(e, t = 0) { + return (N[e[t + 0]] + N[e[t + 1]] + N[e[t + 2]] + N[e[t + 3]] + "-" + N[e[t + 4]] + N[e[t + 5]] + "-" + N[e[t + 6]] + N[e[t + 7]] + "-" + N[e[t + 8]] + N[e[t + 9]] + "-" + N[e[t + 10]] + N[e[t + 11]] + N[e[t + 12]] + N[e[t + 13]] + N[e[t + 14]] + N[e[t + 15]]).toLowerCase(); +} +var St, sl = new Uint8Array(16); +function ll() { + if (!St && (St = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !St)) + throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"); + return St(sl); +} +var cl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto); +const Sn = { + randomUUID: cl +}; +function ul(e, t, r) { + if (Sn.randomUUID && !t && !e) + return Sn.randomUUID(); + e = e || {}; + var n = e.random || (e.rng || ll)(); + if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, t) { + r = r || 0; + for (var i = 0; i < 16; ++i) + t[r + i] = n[i]; + return t; + } + return al(n); +} +const Dt = [], We = [], Yl = async (e, t, r) => { + let n, i; + t.reqId = ul(); + const o = new Promise((a, l) => { + n = a, i = l; + }); + return Dt.push({ + handleMessage(a) { + if (a?.data?.reqId !== t.reqId) + return !1; + try { + n(r(a)); + } catch (l) { + i(l.toString()); + } + return !0; + } + }), ke(e, t), o; +}; +function dl(e) { + for (const t of Dt) + if (t.handleMessage(e)) + return Dt.splice(Dt.indexOf(t), 1), !0; + if (x.emitUnsafe({ type: e.command, data: e.data })) + return !0; + for (const t of io()) + if (no(t, e)) + return !0; + return We.push(e), !1; +} +function no(e, t) { + return e.handleMessage?.call(e, t); +} +function hl() { + if (We.length) + for (const e of io()) + for (let t = 0; t < We.length; t++) + no(e, We[t]) && (We.splice(t, 1), t--); +} +function io() { + const e = document.querySelector("copilot-main"); + return e ? e.renderRoot.querySelectorAll("copilot-section-panel-wrapper *") : []; +} +const vl = ":host{--gray-h: 220;--gray-s: 30%;--gray-l: 30%;--gray-hsl: var(--gray-h) var(--gray-s) var(--gray-l);--gray: hsl(var(--gray-hsl));--gray-50: hsl(var(--gray-hsl) / .05);--gray-100: hsl(var(--gray-hsl) / .1);--gray-150: hsl(var(--gray-hsl) / .16);--gray-200: hsl(var(--gray-hsl) / .24);--gray-250: hsl(var(--gray-hsl) / .34);--gray-300: hsl(var(--gray-hsl) / .46);--gray-350: hsl(var(--gray-hsl) / .6);--gray-400: hsl(var(--gray-hsl) / .7);--gray-450: hsl(var(--gray-hsl) / .8);--gray-500: hsl(var(--gray-hsl) / .9);--gray-550: hsl(var(--gray-hsl));--gray-600: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 2%));--gray-650: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 4%));--gray-700: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 8%));--gray-750: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 12%));--gray-800: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 20%));--gray-850: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 23%));--gray-900: hsl(var(--gray-h) var(--gray-s) calc(var(--gray-l) - 30%));--blue-h: 220;--blue-s: 90%;--blue-l: 53%;--blue-hsl: var(--blue-h) var(--blue-s) var(--blue-l);--blue: hsl(var(--blue-hsl));--blue-50: hsl(var(--blue-hsl) / .05);--blue-100: hsl(var(--blue-hsl) / .1);--blue-150: hsl(var(--blue-hsl) / .2);--blue-200: hsl(var(--blue-hsl) / .3);--blue-250: hsl(var(--blue-hsl) / .4);--blue-300: hsl(var(--blue-hsl) / .5);--blue-350: hsl(var(--blue-hsl) / .6);--blue-400: hsl(var(--blue-hsl) / .7);--blue-450: hsl(var(--blue-hsl) / .8);--blue-500: hsl(var(--blue-hsl) / .9);--blue-550: hsl(var(--blue-hsl));--blue-600: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 4%));--blue-650: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 8%));--blue-700: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 12%));--blue-750: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 15%));--blue-800: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 18%));--blue-850: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 24%));--blue-900: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) - 27%));--purple-h: 246;--purple-s: 90%;--purple-l: 60%;--purple-hsl: var(--purple-h) var(--purple-s) var(--purple-l);--purple: hsl(var(--purple-hsl));--purple-50: hsl(var(--purple-hsl) / .05);--purple-100: hsl(var(--purple-hsl) / .1);--purple-150: hsl(var(--purple-hsl) / .2);--purple-200: hsl(var(--purple-hsl) / .3);--purple-250: hsl(var(--purple-hsl) / .4);--purple-300: hsl(var(--purple-hsl) / .5);--purple-350: hsl(var(--purple-hsl) / .6);--purple-400: hsl(var(--purple-hsl) / .7);--purple-450: hsl(var(--purple-hsl) / .8);--purple-500: hsl(var(--purple-hsl) / .9);--purple-550: hsl(var(--purple-hsl));--purple-600: hsl(var(--purple-h) calc(var(--purple-s) - 4%) calc(var(--purple-l) - 2%));--purple-650: hsl(var(--purple-h) calc(var(--purple-s) - 8%) calc(var(--purple-l) - 4%));--purple-700: hsl(var(--purple-h) calc(var(--purple-s) - 15%) calc(var(--purple-l) - 7%));--purple-750: hsl(var(--purple-h) calc(var(--purple-s) - 23%) calc(var(--purple-l) - 11%));--purple-800: hsl(var(--purple-h) calc(var(--purple-s) - 24%) calc(var(--purple-l) - 15%));--purple-850: hsl(var(--purple-h) calc(var(--purple-s) - 24%) calc(var(--purple-l) - 19%));--purple-900: hsl(var(--purple-h) calc(var(--purple-s) - 27%) calc(var(--purple-l) - 23%));--green-h: 150;--green-s: 80%;--green-l: 42%;--green-hsl: var(--green-h) var(--green-s) var(--green-l);--green: hsl(var(--green-hsl));--green-50: hsl(var(--green-hsl) / .05);--green-100: hsl(var(--green-hsl) / .1);--green-150: hsl(var(--green-hsl) / .2);--green-200: hsl(var(--green-hsl) / .3);--green-250: hsl(var(--green-hsl) / .4);--green-300: hsl(var(--green-hsl) / .5);--green-350: hsl(var(--green-hsl) / .6);--green-400: hsl(var(--green-hsl) / .7);--green-450: hsl(var(--green-hsl) / .8);--green-500: hsl(var(--green-hsl) / .9);--green-550: hsl(var(--green-hsl));--green-600: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 2%));--green-650: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 4%));--green-700: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 8%));--green-750: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 12%));--green-800: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 15%));--green-850: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 19%));--green-900: hsl(var(--green-h) var(--green-s) calc(var(--green-l) - 23%));--yellow-h: 38;--yellow-s: 98%;--yellow-l: 64%;--yellow-hsl: var(--yellow-h) var(--yellow-s) var(--yellow-l);--yellow: hsl(var(--yellow-hsl));--yellow-50: hsl(var(--yellow-hsl) / .07);--yellow-100: hsl(var(--yellow-hsl) / .12);--yellow-150: hsl(var(--yellow-hsl) / .2);--yellow-200: hsl(var(--yellow-hsl) / .3);--yellow-250: hsl(var(--yellow-hsl) / .4);--yellow-300: hsl(var(--yellow-hsl) / .5);--yellow-350: hsl(var(--yellow-hsl) / .6);--yellow-400: hsl(var(--yellow-hsl) / .7);--yellow-450: hsl(var(--yellow-hsl) / .8);--yellow-500: hsl(var(--yellow-hsl) / .9);--yellow-550: hsl(var(--yellow-hsl));--yellow-600: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 5%));--yellow-650: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 10%));--yellow-700: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 15%));--yellow-750: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 20%));--yellow-800: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 25%));--yellow-850: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 30%));--yellow-900: hsl(var(--yellow-h) var(--yellow-s) calc(var(--yellow-l) - 35%));--red-h: 355;--red-s: 75%;--red-l: 55%;--red-hsl: var(--red-h) var(--red-s) var(--red-l);--red: hsl(var(--red-hsl));--red-50: hsl(var(--red-hsl) / .05);--red-100: hsl(var(--red-hsl) / .1);--red-150: hsl(var(--red-hsl) / .2);--red-200: hsl(var(--red-hsl) / .3);--red-250: hsl(var(--red-hsl) / .4);--red-300: hsl(var(--red-hsl) / .5);--red-350: hsl(var(--red-hsl) / .6);--red-400: hsl(var(--red-hsl) / .7);--red-450: hsl(var(--red-hsl) / .8);--red-500: hsl(var(--red-hsl) / .9);--red-550: hsl(var(--red-hsl));--red-600: hsl(var(--red-h) calc(var(--red-s) - 5%) calc(var(--red-l) - 2%));--red-650: hsl(var(--red-h) calc(var(--red-s) - 10%) calc(var(--red-l) - 4%));--red-700: hsl(var(--red-h) calc(var(--red-s) - 15%) calc(var(--red-l) - 8%));--red-750: hsl(var(--red-h) calc(var(--red-s) - 20%) calc(var(--red-l) - 12%));--red-800: hsl(var(--red-h) calc(var(--red-s) - 25%) calc(var(--red-l) - 15%));--red-850: hsl(var(--red-h) calc(var(--red-s) - 30%) calc(var(--red-l) - 19%));--red-900: hsl(var(--red-h) calc(var(--red-s) - 35%) calc(var(--red-l) - 23%));--codeblock-bg: #f4f4f4;--vaadin-logo-blue: #00b4f0}:host(.dark){--gray-s: 15%;--gray-l: 70%;--gray-600: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 6%));--gray-650: hsl(var(--gray-h) calc(var(--gray-s) - 5%) calc(var(--gray-l) + 14%));--gray-700: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 26%));--gray-750: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 36%));--gray-800: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 48%));--gray-850: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 62%));--gray-900: hsl(var(--gray-h) calc(var(--gray-s) - 2%) calc(var(--gray-l) + 70%));--blue-s: 90%;--blue-l: 58%;--blue-600: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 6%));--blue-650: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 12%));--blue-700: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 17%));--blue-750: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 22%));--blue-800: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 28%));--blue-850: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 35%));--blue-900: hsl(var(--blue-h) var(--blue-s) calc(var(--blue-l) + 43%));--purple-600: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 4%));--purple-650: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 9%));--purple-700: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 12%));--purple-750: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 18%));--purple-800: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 24%));--purple-850: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 29%));--purple-900: hsl(var(--purple-h) var(--purple-s) calc(var(--purple-l) + 33%));--green-600: hsl(calc(var(--green-h) - 1) calc(var(--green-s) - 5%) calc(var(--green-l) + 5%));--green-650: hsl(calc(var(--green-h) - 2) calc(var(--green-s) - 10%) calc(var(--green-l) + 12%));--green-700: hsl(calc(var(--green-h) - 4) calc(var(--green-s) - 15%) calc(var(--green-l) + 20%));--green-750: hsl(calc(var(--green-h) - 6) calc(var(--green-s) - 20%) calc(var(--green-l) + 29%));--green-800: hsl(calc(var(--green-h) - 8) calc(var(--green-s) - 25%) calc(var(--green-l) + 37%));--green-850: hsl(calc(var(--green-h) - 10) calc(var(--green-s) - 30%) calc(var(--green-l) + 42%));--green-900: hsl(calc(var(--green-h) - 12) calc(var(--green-s) - 35%) calc(var(--green-l) + 48%));--yellow-600: hsl(calc(var(--yellow-h) + 1) var(--yellow-s) calc(var(--yellow-l) + 4%));--yellow-650: hsl(calc(var(--yellow-h) + 2) var(--yellow-s) calc(var(--yellow-l) + 7%));--yellow-700: hsl(calc(var(--yellow-h) + 4) var(--yellow-s) calc(var(--yellow-l) + 11%));--yellow-750: hsl(calc(var(--yellow-h) + 6) var(--yellow-s) calc(var(--yellow-l) + 16%));--yellow-800: hsl(calc(var(--yellow-h) + 8) var(--yellow-s) calc(var(--yellow-l) + 20%));--yellow-850: hsl(calc(var(--yellow-h) + 10) var(--yellow-s) calc(var(--yellow-l) + 24%));--yellow-900: hsl(calc(var(--yellow-h) + 12) var(--yellow-s) calc(var(--yellow-l) + 29%));--red-600: hsl(calc(var(--red-h) - 1) calc(var(--red-s) - 5%) calc(var(--red-l) + 3%));--red-650: hsl(calc(var(--red-h) - 2) calc(var(--red-s) - 10%) calc(var(--red-l) + 7%));--red-700: hsl(calc(var(--red-h) - 4) calc(var(--red-s) - 15%) calc(var(--red-l) + 14%));--red-750: hsl(calc(var(--red-h) - 6) calc(var(--red-s) - 20%) calc(var(--red-l) + 19%));--red-800: hsl(calc(var(--red-h) - 8) calc(var(--red-s) - 25%) calc(var(--red-l) + 24%));--red-850: hsl(calc(var(--red-h) - 10) calc(var(--red-s) - 30%) calc(var(--red-l) + 30%));--red-900: hsl(calc(var(--red-h) - 12) calc(var(--red-s) - 35%) calc(var(--red-l) + 36%));--codeblock-bg: var(--gray-100)}", fl = ":host{--font-family: Inter, system-ui, ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;--monospace-font-family: Inconsolata, Monaco, Consolas, Courier New, Courier, monospace;--font-size-0: .6875rem;--font-size-1: .75rem;--font-size-2: .875rem;--font-size-3: 1rem;--font-size-4: 1.125rem;--font-size-5: 1.25rem;--font-size-6: 1.375rem;--font-size-7: 1.5rem;--line-height-1: 1.125rem;--line-height-2: 1.25rem;--line-height-3: 1.5rem;--line-height-4: 1.75rem;--line-height-5: 2rem;--line-height-6: 2.25rem;--line-height-7: 2.5rem;--font-weight-bold: 500;--font-weight-strong: 600;--font: normal 400 var(--font-size-3) / var(--line-height-3) var(--font-family);--font-bold: normal var(--font-weight-bold) var(--font-size-3) / var(--line-height-3) var(--font-family);--font-strong: normal var(--font-weight-strong) var(--font-size-3) / var(--line-height-3) var(--font-family);--font-small: normal 400 var(--font-size-2) / var(--line-height-2) var(--font-family);--font-small-bold: normal var(--font-weight-bold) var(--font-size-2) / var(--line-height-2) var(--font-family);--font-small-strong: normal var(--font-weight-strong) var(--font-size-2) / var(--line-height-2) var(--font-family);--font-xsmall: normal 400 var(--font-size-1) / var(--line-height-1) var(--font-family);--font-xsmall-bold: normal var(--font-weight-bold) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-xsmall-strong: normal var(--font-weight-strong) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-button: normal var(--font-weight-bold) var(--font-size-1) / var(--line-height-1) var(--font-family);--font-tooltip: normal var(--font-weight-bold) var(--font-size-1) / var(--line-height-2) var(--font-family);--radius-1: .1875rem;--radius-2: .375rem;--radius-3: .75rem;--space-25: 2px;--space-50: 4px;--space-75: 6px;--space-100: 8px;--space-150: 12px;--space-200: 16px;--space-300: 24px;--space-400: 32px;--space-500: 40px;--space-600: 48px;--space-700: 56px;--space-800: 64px;--space-900: 72px;--z-index-component-selector: 100;--z-index-floating-panel: 101;--z-index-drawer: 150;--z-index-opened-drawer: 151;--z-index-spotlight: 200;--z-index-popover: 300;--z-index-activation-button: 1000;--duration-1: .1s;--duration-2: .2s;--duration-3: .3s;--duration-4: .4s;--button-background: var(--gray-100);--button-background-hover: var(--gray-150)}:host{--lumo-font-family: var(--font-family);--lumo-font-size-xs: var(--font-size-1);--lumo-font-size-s: var(--font-size-2);--lumo-font-size-m: var(--font-size-3);--lumo-font-size-l: var(--font-size-4);--lumo-font-size-xl: var(--font-size-5);--lumo-font-size-xxl: var(--font-size-6);--lumo-font-size-xxxl: var(--font-size-7);--lumo-line-height-s: var(--line-height-2);--lumo-line-height-m: var(--line-height-3);--lumo-line-height-l: var(--line-height-4);--lumo-border-radius-s: var(--radius-1);--lumo-border-radius-m: var(--radius-2);--lumo-border-radius-l: var(--radius-3);--lumo-base-color: var(--surface-0);--lumo-body-text-color: var(--color-high-contrast);--lumo-header-text-color: var(--color-high-contrast);--lumo-secondary-text-color: var(--color);--lumo-tertiary-text-color: var(--color);--lumo-error-text-color: var(--color-danger);--lumo-primary-text-color: var(--color-high-contrast);--lumo-primary-color: var(--background-button-primary);--lumo-primary-color-50pct: var(--color-accent);--lumo-primary-contrast-color: var(--lumo-secondary-text-color);--lumo-space-xs: var(--space-50);--lumo-space-s: var(--space-100);--lumo-space-m: var(--space-200);--lumo-space-l: var(--space-300);--lumo-space-xl: var(--space-500);--lumo-icon-size-xs: var(--font-size-1);--lumo-icon-size-s: var(--font-size-2);--lumo-icon-size-m: var(--font-size-3);--lumo-icon-size-l: var(--font-size-4);--lumo-icon-size-xl: var(--font-size-5)}:host{color-scheme:light;--surface-0: hsl(var(--gray-h) var(--gray-s) 90% / .8);--surface-1: hsl(var(--gray-h) var(--gray-s) 95% / .8);--surface-2: hsl(var(--gray-h) var(--gray-s) 100% / .8);--surface-background: linear-gradient( hsl(var(--gray-h) var(--gray-s) 95% / .7), hsl(var(--gray-h) var(--gray-s) 95% / .65) );--surface-glow: radial-gradient(circle at 30% 0%, hsl(var(--gray-h) var(--gray-s) 98% / .7), transparent 50%);--surface-border-glow: radial-gradient(at 50% 50%, hsl(var(--purple-h) 90% 90% / .8) 0, transparent 50%);--surface: var(--surface-glow) no-repeat border-box, var(--surface-background) no-repeat padding-box, hsl(var(--gray-h) var(--gray-s) 98% / .2);--surface-with-border-glow: var(--surface-glow) no-repeat border-box, var(--surface-background) no-repeat padding-box, var(--surface-border-glow) no-repeat border-box 0 0 / var(--glow-size, 600px) var(--glow-size, 600px);--surface-border-color: hsl(var(--gray-h) var(--gray-s) 100% / .7);--surface-backdrop-filter: blur(10px);--surface-box-shadow-1: 0 0 0 .5px hsl(var(--gray-h) var(--gray-s) 5% / .15), 0 6px 12px -1px hsl(var(--shadow-hsl) / .3);--surface-box-shadow-2: 0 0 0 .5px hsl(var(--gray-h) var(--gray-s) 5% / .15), 0 24px 40px -4px hsl(var(--shadow-hsl) / .4);--background-button: linear-gradient( hsl(var(--gray-h) var(--gray-s) 98% / .4), hsl(var(--gray-h) var(--gray-s) 90% / .2) );--background-button-active: hsl(var(--gray-h) var(--gray-s) 80% / .2);--color: var(--gray-500);--color-high-contrast: var(--gray-900);--color-accent: var(--purple-700);--color-danger: var(--red-700);--border-color: var(--gray-150);--border-color-high-contrast: var(--gray-300);--border-color-button: var(--gray-350);--border-color-popover: hsl(var(--gray-hsl) / .08);--border-color-dialog: hsl(var(--gray-hsl) / .08);--accent-color: var(--purple-600);--selection-color: hsl(var(--blue-hsl));--shadow-hsl: var(--gray-h) var(--gray-s) 20%;--lumo-contrast-5pct: var(--gray-100);--lumo-contrast-10pct: var(--gray-200);--lumo-contrast-60pct: var(--gray-400);--lumo-contrast-80pct: var(--gray-600);--lumo-contrast-90pct: var(--gray-800);--card-bg: rgba(255, 255, 255, .5);--card-hover-bg: rgba(255, 255, 255, .65);--card-open-bg: rgba(255, 255, 255, .8);--card-border: 1px solid rgba(0, 50, 100, .15);--card-open-shadow: 0px 1px 4px -1px rgba(28, 52, 84, .26);--card-section-border: var(--card-border);--card-field-bg: var(--lumo-contrast-5pct)}:host(.dark){color-scheme:dark;--surface-0: hsl(var(--gray-h) var(--gray-s) 10% / .85);--surface-1: hsl(var(--gray-h) var(--gray-s) 14% / .85);--surface-2: hsl(var(--gray-h) var(--gray-s) 18% / .85);--surface-background: linear-gradient( hsl(var(--gray-h) var(--gray-s) 8% / .65), hsl(var(--gray-h) var(--gray-s) 8% / .7) );--surface-glow: radial-gradient( circle at 30% 0%, hsl(var(--gray-h) calc(var(--gray-s) * 2) 90% / .12), transparent 50% );--surface: var(--surface-glow) no-repeat border-box, var(--surface-background) no-repeat padding-box, hsl(var(--gray-h) var(--gray-s) 20% / .4);--surface-border-glow: hsl(var(--gray-h) var(--gray-s) 20% / .4) radial-gradient(at 50% 50%, hsl(250 40% 80% / .4) 0, transparent 50%);--surface-border-color: hsl(var(--gray-h) var(--gray-s) 50% / .2);--surface-box-shadow-1: 0 0 0 .5px hsl(var(--purple-h) 40% 5% / .4), 0 6px 12px -1px hsl(var(--shadow-hsl) / .4);--surface-box-shadow-2: 0 0 0 .5px hsl(var(--purple-h) 40% 5% / .4), 0 24px 40px -4px hsl(var(--shadow-hsl) / .5);--color: var(--gray-650);--background-button: linear-gradient( hsl(var(--gray-h) calc(var(--gray-s) * 2) 80% / .1), hsl(var(--gray-h) calc(var(--gray-s) * 2) 80% / 0) );--background-button-active: hsl(var(--gray-h) var(--gray-s) 10% / .1);--border-color-popover: hsl(var(--gray-h) var(--gray-s) 90% / .1);--border-color-dialog: hsl(var(--gray-h) var(--gray-s) 90% / .1);--shadow-hsl: 0 0% 0%;--lumo-disabled-text-color: var(--lumo-contrast-60pct);--card-bg: rgba(255, 255, 255, .05);--card-hover-bg: rgba(255, 255, 255, .065);--card-open-bg: rgba(255, 255, 255, .1);--card-border: 1px solid rgba(255, 255, 255, .11);--card-open-shadow: 0px 1px 4px -1px rgba(0, 0, 0, .26);--card-section-border: var(--card-border);--card-field-bg: var(--lumo-contrast-10pct)}", pl = "button{-webkit-appearance:none;appearance:none;background:var(--background-button);background-origin:border-box;font:var(--font-button);color:var(--color-high-contrast);border:1px solid var(--border-color);border-radius:var(--radius-2);padding:var(--space-25) var(--space-100)}button:focus-visible{outline:2px solid var(--blue-500);outline-offset:2px}button:active:not(:disabled){background:var(--background-button-active)}button:disabled{color:var(--gray-400);background:transparent}", gl = ":is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay){z-index:var(--z-index-popover)}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay):first-of-type{padding-top:0}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay)::part(overlay){color:inherit;font:inherit;background:var(--surface);-webkit-backdrop-filter:var(--surface-backdrop-filter);backdrop-filter:var(--surface-backdrop-filter);border-radius:var(--radius-2);border:1px solid var(--surface-border-color);box-shadow:var(--surface-box-shadow-1)}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay)::part(content){padding:var(--space-50)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item){color:var(--color-high-contrast);font:var(--font-small);display:flex;align-items:center;cursor:default;padding:var(--space-75) var(--space-100);min-height:0;border-radius:var(--radius-1);--_lumo-item-selected-icon-display: none}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item)[disabled],:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item)[disabled] .hint,:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item)[disabled] vaadin-icon{color:var(--lumo-disabled-text-color)}:is(vaadin-context-menu-item,vaadin-menu-bar-item)[expanded]{background:var(--gray-200)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item):not([disabled]):hover{background:var(--color-high-contrast);color:var(--surface-2);--lumo-tertiary-text-color: var(--surface-2);--color: currentColor;--border-color: var(--surface-0)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item)[focus-ring]{outline:2px solid var(--selection-color);outline-offset:-2px}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item):is([aria-haspopup=true]):after{margin-inline-end:calc(var(--space-200) * -1);margin-right:unset}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item).danger{color:var(--color-danger);--color: currentColor}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item).danger:not([disabled]):hover{background-color:var(--color-danger)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item)::part(content){display:flex;align-items:center;gap:var(--space-100)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item,vaadin-combo-box-item) vaadin-icon{width:1em;height:1em;padding:0;color:var(--color)}:is(vaadin-context-menu-overlay,vaadin-select-overlay,vaadin-menu-bar-overlay) hr{margin:var(--space-50)}:is(vaadin-context-menu-item,vaadin-select-item,vaadin-menu-bar-item) .label{padding-inline-end:var(--space-300)}:is(vaadin-context-menu-item,vaadin-select-item,vaadin-menu-bar-item) .hint{margin-inline-start:auto;color:var(--color)}:is(vaadin-context-menu-item,vaadin-menu-bar-item,vaadin-select-item) kbd{display:inline-block;border-radius:var(--radius-1);border:1px solid var(--border-color);min-width:1em;min-height:1em;text-align:center;margin:0 .1em;padding:.1em .25em;box-sizing:border-box;font-size:var(--font-size-1);font-family:var(--font-family);line-height:1}:is(copilot-alignment-overlay)::part(content){padding:0}:is(.padding-values-overlay){--lumo-base-color: var(--selection-color);--color-high-contrast: white}:is(.padding-values-overlay) vaadin-combo-box-item:hover{color:#272c35d9}", bl = "code.codeblock{background:var(--codeblock-bg);border-radius:var(--radius-2);display:block;font-family:var(--monospace-font-family);font-size:var(--font-size-1);line-height:var(--line-height-1);overflow:hidden;padding:.3125rem 1.75rem .3125rem var(--space-100);position:relative;text-overflow:ellipsis;white-space:pre}copilot-copy{position:absolute;right:0;top:0}copilot-copy button{align-items:center;background:none;border:1px solid transparent;border-radius:var(--radius-2);color:var(--color);display:flex;font:var(--font-button);height:1.75rem;justify-content:center;padding:0;width:1.75rem}copilot-copy button:hover{color:var(--color-high-contrast)}", _l = "vaadin-dialog-overlay::part(overlay){background:#fff}vaadin-dialog-overlay::part(content){background:var(--surface);font:var(--font-xsmall);padding:var(--space-300)}vaadin-dialog-overlay::part(header){background:var(--surface);font:var(--font-xsmall-strong);border-bottom:1px solid var(--border-color);padding:var(--space-100) var(--space-150)}vaadin-dialog-overlay::part(footer){background:var(--surface);padding:var(--space-150)}vaadin-dialog-overlay::part(header-content){display:flex;line-height:normal;justify-content:space-between;width:100%;align-items:center}vaadin-dialog-overlay [slot=header-content] h2{margin:0;padding:0;font:var(--font-small-bold)}vaadin-dialog-overlay [slot=header-content] .close{line-height:0}vaadin-dialog-overlay{--vaadin-button-font-size: var(--font-size-1);--vaadin-button-height: var(--line-height-4)}vaadin-dialog-overlay vaadin-button[theme~=primary]{background-color:hsl(var(--blue-hsl))}vaadin-dialog-overlay a svg{height:12px;width:12px}.dialog-footer vaadin-button{--vaadin-button-primary-background: var(--button-background);--vaadin-button-border-radius: var(--radius-1);--vaadin-button-primary-text-color: var(--color-high-contrast);--vaadin-button-height: var(--line-height-5);font:var(--font-small-bold)}.dialog-footer vaadin-button span[slot=suffix]{display:flex}.dialog-footer vaadin-button span[slot=suffix] svg{height:14px;width:14px}", ml = ":host{--vaadin-input-field-label-font-size: var(--font-size-1);--vaadin-select-label-font-size: var(--font-size-1);--vaadin-input-field-helper-font-size: var(--font-size-0);--vaadin-button-font-size: var(--font-size-2);--vaadin-checkbox-label-font-size: var(--font-size-1);--vaadin-input-field-background: var(--lumo-contrast-10pct);--vaadin-input-field-height: 26px;--vaadin-input-field-value-font-size: var(--font-xsmall)}"; +var Ql = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function yl(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +function ec(e) { + if (e.__esModule) return e; + var t = e.default; + if (typeof t == "function") { + var r = function n() { + return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); + }; + r.prototype = t.prototype; + } else r = {}; + return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) { + var i = Object.getOwnPropertyDescriptor(e, n); + Object.defineProperty(r, n, i.get ? i : { + enumerable: !0, + get: function() { + return e[n]; + } + }); + }), r; +} +var Br = { exports: {} }; +function oo(e, t = 100, r = {}) { + if (typeof e != "function") + throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`); + if (t < 0) + throw new RangeError("`wait` must not be negative."); + const { immediate: n } = typeof r == "boolean" ? { immediate: r } : r; + let i, o, a, l, s; + function c() { + const f = i, p = o; + return i = void 0, o = void 0, s = e.apply(f, p), s; + } + function d() { + const f = Date.now() - l; + f < t && f >= 0 ? a = setTimeout(d, t - f) : (a = void 0, n || (s = c())); + } + const u = function(...f) { + if (i && this !== i) + throw new Error("Debounced method called with different contexts."); + i = this, o = f, l = Date.now(); + const p = n && !a; + return a || (a = setTimeout(d, t)), p && (s = c()), s; + }; + return u.clear = () => { + a && (clearTimeout(a), a = void 0); + }, u.flush = () => { + a && u.trigger(); + }, u.trigger = () => { + s = c(), u.clear(); + }, u; +} +Br.exports.debounce = oo; +Br.exports = oo; +var wl = Br.exports; +const El = /* @__PURE__ */ yl(wl); +class Ol { + constructor() { + this.documentActive = !0, this.addListeners = () => { + window.addEventListener("pageshow", this.handleWindowVisibilityChange), window.addEventListener("pagehide", this.handleWindowVisibilityChange), window.addEventListener("focus", this.handleWindowFocusChange), window.addEventListener("blur", this.handleWindowFocusChange), document.addEventListener("visibilitychange", this.handleDocumentVisibilityChange); + }, this.removeListeners = () => { + window.removeEventListener("pageshow", this.handleWindowVisibilityChange), window.removeEventListener("pagehide", this.handleWindowVisibilityChange), window.removeEventListener("focus", this.handleWindowFocusChange), window.removeEventListener("blur", this.handleWindowFocusChange), document.removeEventListener("visibilitychange", this.handleDocumentVisibilityChange); + }, this.handleWindowVisibilityChange = (t) => { + t.type === "pageshow" ? this.dispatch(!0) : this.dispatch(!1); + }, this.handleWindowFocusChange = (t) => { + t.type === "focus" ? this.dispatch(!0) : this.dispatch(!1); + }, this.handleDocumentVisibilityChange = () => { + this.dispatch(!document.hidden); + }, this.dispatch = (t) => { + if (t !== this.documentActive) { + const r = window.Vaadin.copilot.eventbus; + this.documentActive = t, r.emit("document-activation-change", { active: this.documentActive }); + } + }; + } + copilotActivated() { + this.addListeners(); + } + copilotDeactivated() { + this.removeListeners(); + } +} +const Nn = new Ol(); +var Al = Object.defineProperty, Sl = Object.getOwnPropertyDescriptor, Nl = (e, t, r, n) => { + for (var i = n > 1 ? void 0 : n ? Sl(t, r) : t, o = e.length - 1, a; o >= 0; o--) + (a = e[o]) && (i = (n ? a(t, r, i) : a(i)) || i); + return n && i && Al(t, r, i), i; +}; +let xn = class extends Ts { + constructor() { + super(...arguments), this.removers = [], this.initialized = !1, this.toggleOperationInProgressAttr = () => { + this.toggleAttribute("operation-in-progress", b.operationWaitsHmrUpdate !== void 0); + }, this.operationInProgressCursorUpdateDebounceFunc = El(this.toggleOperationInProgressAttr, 500), this.overlayOutsideClickListener = (e) => { + nt(e.target?.owner) || (b.active || nt(e.detail.sourceEvent.target)) && e.preventDefault(); + }; + } + static get styles() { + return [ + ie(vl), + ie(fl), + ie(pl), + ie(gl), + ie(bl), + ie(_l), + ie(ml), + fs` + :host { + position: fixed; + inset: 0; + z-index: 9999; + contain: strict; + font: var(--font-small); + color: var(--color); + pointer-events: all; + cursor: var(--cursor, default); + } + + :host([operation-in-progress]) { + --cursor: wait; + --lumo-clickable-cursor: wait; + } + + :host(:not([active])) { + visibility: hidden !important; + pointer-events: none; + } + + /* Hide floating panels when not active */ + + :host(:not([active])) > copilot-section-panel-wrapper { + display: none !important; + } + + /* Keep activation button and menu visible */ + + copilot-activation-button, + .activation-button-menu { + visibility: visible; + } + + copilot-activation-button { + pointer-events: auto; + } + + a { + color: var(--blue-600); + text-decoration-color: var(--blue-200); + } + + :host([user-select-none]) { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + /* Needed to prevent a JS error because of monkey patched '_attachOverlay'. It is some scope issue, */ + /* where 'this._placeholder.parentNode' is undefined - the scope if 'this' gets messed up at some point. */ + /* We also don't want animations on the overlays to make the feel faster, so this is fine. */ + + :is( + vaadin-context-menu-overlay, + vaadin-menu-bar-overlay, + vaadin-select-overlay, + vaadin-combo-box-overlay, + vaadin-tooltip-overlay + ):is([opening], [closing]), + :is( + vaadin-context-menu-overlay, + vaadin-menu-bar-overlay, + vaadin-select-overlay, + vaadin-combo-box-overlay, + vaadin-tooltip-overlay + )::part(overlay) { + animation: none !important; + } + + :host(:not([active])) copilot-drawer-panel::before { + animation: none; + } + + /* Workaround for https://github.com/vaadin/web-components/issues/5400 */ + + :host([active]) .activation-button-menu .activate, + :host(:not([active])) .activation-button-menu .deactivate, + :host(:not([active])) .activation-button-menu .toggle-spotlight { + display: none; + } + ` + ]; + } + connectedCallback() { + super.connectedCallback(), this.init().catch((e) => rr("Unable to initialize copilot", e)); + } + async init() { + if (this.initialized) + return; + await window.Vaadin.copilot._machineState.initializer.promise, document.body.style.setProperty("--dev-tools-button-display", "none"), await import("./copilot-global-vars-later-DnZWjL_G.js"), await import("./copilot-init-step2-BYO5YZ6c.js"), Vs(), this.tabIndex = 0, Ot.hostConnectedCallback(), window.addEventListener("keydown", wn), x.onSend(this.handleSendEvent), this.removers.push(x.on("close-drawers", this.closeDrawers.bind(this))), this.removers.push( + x.on("open-attention-required-drawer", this.openDrawerIfPanelRequiresAttention.bind(this)) + ), this.removers.push( + x.on("set-pointer-events", (t) => { + this.style.pointerEvents = t.detail.enable ? "" : "none"; + }) + ), this.addEventListener("mousemove", this.mouseMoveListener), this.addEventListener("dragover", this.mouseMoveListener), qe.addOverlayOutsideClickEvent(); + const e = window.matchMedia("(prefers-color-scheme: dark)"); + this.classList.toggle("dark", e.matches), e.addEventListener("change", (t) => { + this.classList.toggle("dark", e.matches); + }), this.reaction( + () => b.spotlightActive, + () => { + be.saveSpotlightActivation(b.spotlightActive), Array.from(this.shadowRoot.querySelectorAll("copilot-section-panel-wrapper")).filter((t) => t.panelInfo?.floating === !0).forEach((t) => { + b.spotlightActive ? t.style.setProperty("display", "none") : t.style.removeProperty("display"); + }); + } + ), this.reaction( + () => b.active, + () => { + this.toggleAttribute("active", b.active), b.active ? this.activate() : this.deactivate(), be.saveCopilotActivation(b.active); + } + ), this.reaction( + () => b.activatedAtLeastOnce, + () => { + Yi(), js(); + } + ), this.reaction( + () => b.sectionPanelDragging, + () => { + b.sectionPanelDragging && Array.from(this.shadowRoot.children).filter((r) => r.localName.endsWith("-overlay")).forEach((r) => { + r.close && r.close(); + }); + } + ), this.reaction( + () => b.operationWaitsHmrUpdate, + () => { + b.operationWaitsHmrUpdate ? this.operationInProgressCursorUpdateDebounceFunc() : (this.operationInProgressCursorUpdateDebounceFunc.clear(), this.toggleOperationInProgressAttr()); + } + ), be.getCopilotActivation() && jr().then(() => { + b.setActive(!0, "restore"); + }), this.removers.push( + x.on("user-select", (t) => { + const { allowSelection: r } = t.detail; + this.toggleAttribute("user-select-none", !r); + }) + ), this.initialized = !0; + } + /** + * Called when Copilot is activated. Good place to start attach listeners etc. + */ + activate() { + Ur("activate"), Ot.activate(), Nn.copilotActivated(), Rs(), this.openDrawerIfPanelRequiresAttention(), document.documentElement.addEventListener("mouseleave", this.mouseLeaveListener), qe.onCopilotActivation(), x.emit("component-tree-updated", {}), Zi.loadPreviewConfiguration(); + } + /** + * Called when Copilot is deactivated. Good place to remove listeners etc. + */ + deactivate() { + this.closeDrawers(), Ot.deactivate(), Nn.copilotDeactivated(), document.documentElement.removeEventListener("mouseleave", this.mouseLeaveListener), qe.onCopilotDeactivation(); + } + disconnectedCallback() { + super.disconnectedCallback(), Ot.hostDisconnectedCallback(), window.removeEventListener("keydown", wn), x.offSend(this.handleSendEvent), this.removers.forEach((e) => e()), this.removeEventListener("mousemove", this.mouseMoveListener), this.removeEventListener("dragover", this.mouseMoveListener), qe.removeOverlayOutsideClickEvent(), document.documentElement.removeEventListener("vaadin-overlay-outside-click", this.overlayOutsideClickListener); + } + handleSendEvent(e) { + const t = e.detail.command, r = e.detail.data; + ke(t, r); + } + /** + * Opens the attention required drawer if there is any. + */ + openDrawerIfPanelRequiresAttention() { + const e = gt.getAttentionRequiredPanelConfiguration(); + if (!e) + return; + const t = e.panel; + if (!t || e.floating) + return; + const r = this.shadowRoot.querySelector(`copilot-drawer-panel[position="${t}"]`); + r.opened = !0; + } + render() { + return zt` + + + + + + ${this.renderDrawer("left")} ${this.renderDrawer("right")} ${this.renderDrawer("bottom")} ${ol()} + + + + `; + } + renderDrawer(e) { + return zt` + ${il(e)} + `; + } + /** + * Closes the open drawers if any opened unless an overlay is opened from drawer. + */ + closeDrawers() { + const e = this.shadowRoot.querySelectorAll(`${Re}drawer-panel`); + if (!Array.from(e).some((o) => o.opened)) + return; + const r = Array.from(this.shadowRoot.children).find( + (o) => o.localName.endsWith("overlay") + ), n = r && qe.getOwner(r); + if (!n) { + e.forEach((o) => { + o.opened = !1; + }); + return; + } + const i = ns(n, "copilot-drawer-panel"); + if (!i) { + e.forEach((o) => { + o.opened = !1; + }); + return; + } + Array.from(e).filter((o) => o.position !== i.position).forEach((o) => { + o.opened = !1; + }); + } + updated(e) { + super.updated(e), this.attachActivationButtonToBody(), hl(); + } + attachActivationButtonToBody() { + const e = document.body.querySelectorAll("copilot-activation-button"); + e.length > 1 && e[0].remove(); + } + mouseMoveListener(e) { + e.composedPath().find((t) => t.localName === `${Re}drawer-panel`) || this.closeDrawers(); + } + mouseLeaveListener() { + x.emit("close-drawers", {}); + } +}; +xn = Nl([ + vs("copilot-main") +], xn); +const xl = window.Vaadin, $l = { + init(e) { + Di( + () => window.Vaadin.devTools, + (t) => { + const r = t.handleFrontendMessage; + t.handleFrontendMessage = (n) => { + dl(n) || r.call(t, n); + }; + } + ); + } +}; +xl.devToolsPlugins.push($l); +customElements.whenDefined("vaadin-dev-tools").then(() => { + const e = window, t = e.Vaadin.devTools.frontendConnection.onReload; + e.Vaadin.devTools.frontendConnection.onReload = () => { + t(), e.Vaadin.copilot.eventbus.emit("java-after-update", {}); + }; +}); +export { + Dl as A, + Zl as B, + be as C, + Ls as D, + bl as E, + pl as F, + Ll as G, + zr as H, + Ur as I, + Ml as J, + ss as K, + er as L, + Ts as M, + Gl as N, + ql as O, + Re as P, + Cl as Q, + Er as R, + ji as S, + O as T, + Kl as U, + Tl as V, + yl as a, + x as b, + Ql as c, + Ti as d, + b as e, + kl as f, + ec as g, + rr as h, + jl as i, + Il as j, + Yl as k, + gt as l, + Vl as m, + fs as n, + Qi as o, + Rl as p, + Je as q, + ie as r, + ke as s, + vs as t, + Xl as u, + ul as v, + Pl as w, + zt as x, + El as y, + Jl as z +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-CbDPhQ2e.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-CbDPhQ2e.js new file mode 100644 index 0000000..b3f7fb5 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot-shortcuts-plugin-CbDPhQ2e.js @@ -0,0 +1,59 @@ +import { t as u, x as d, D as g, u as e } from "./copilot-ppBO0zjz.js"; +import { B as h } from "./base-panel-vYmwbGFU.js"; +import { i as l } from "./icons-BzskfjAz.js"; +const f = "copilot-shortcuts-panel{font:var(--font-xsmall);padding:var(--space-200);display:flex;flex-direction:column;gap:var(--space-50)}copilot-shortcuts-panel h3{font:var(--font-xsmall-strong);margin:0;padding:0}copilot-shortcuts-panel h3:not(:first-of-type){margin-top:var(--space-200)}copilot-shortcuts-panel ul{list-style:none;margin:0;padding:0 var(--space-50);display:flex;flex-direction:column}copilot-shortcuts-panel ul li{display:flex;align-items:center;gap:var(--space-150);padding:var(--space-75) 0}copilot-shortcuts-panel ul li:not(:last-of-type){border-bottom:1px dashed var(--border-color)}copilot-shortcuts-panel ul li svg{height:16px;width:16px}copilot-shortcuts-panel ul li .kbds{flex:1;text-align:right}copilot-shortcuts-panel kbd{display:inline-block;border-radius:var(--radius-1);border:1px solid var(--border-color);min-width:1em;min-height:1em;text-align:center;margin:0 .1em;padding:.25em;box-sizing:border-box;font-size:var(--font-size-1);font-family:var(--font-family);line-height:1}"; +var m = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, b = (i, a, n, s) => { + for (var o = s > 1 ? void 0 : s ? $(a, n) : a, r = i.length - 1, p; r >= 0; r--) + (p = i[r]) && (o = (s ? p(a, n, o) : p(o)) || o); + return s && o && m(a, n, o), o; +}; +let c = class extends h { + render() { + return d` +

Global

+
    +
  • ${l.vaadinLogo} Copilot ${t(e.toggleCopilot)}
  • +
  • ${l.terminal} Command window ${t(e.toggleCommandWindow)}
  • +
  • ${l.undo} Undo ${t(e.undo)}
  • +
  • ${l.redo} Redo ${t(e.redo)}
  • +
+

Selected component

+
    +
  • ${l.code} Go to source ${t(e.goToSource)}
  • +
  • ${l.copy} Copy ${t(e.copy)}
  • +
  • ${l.paste} Paste ${t(e.paste)}
  • +
  • ${l.duplicate} Duplicate ${t(e.duplicate)}
  • +
  • ${l.userUp} Select parent ${t(e.selectParent)}
  • +
  • ${l.userLeft} Select previous sibling ${t(e.selectPreviousSibling)}
  • +
  • ${l.userRight} Select first child / next sibling ${t(e.selectNextSibling)}
  • +
  • ${l.trash} Delete ${t(e.delete)}
  • +
`; + } +}; +c = b([ + u("copilot-shortcuts-panel") +], c); +function t(i) { + return d`${g(i)}`; +} +const v = { + header: "Keyboard Shortcuts", + expanded: !0, + expandable: !1, + panelOrder: 0, + floating: !1, + tag: "copilot-shortcuts-panel", + width: 400, + height: 475, + floatingPosition: { + top: 50, + left: 50 + } +}, x = { + init(i) { + i.addPanel(v); + } +}; +window.Vaadin.copilot.plugins.push(x); diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot.js new file mode 100644 index 0000000..4f34d69 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/copilot.js @@ -0,0 +1 @@ +import "./copilot-ppBO0zjz.js"; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/icons-BzskfjAz.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/icons-BzskfjAz.js new file mode 100644 index 0000000..b559471 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/icons-BzskfjAz.js @@ -0,0 +1,368 @@ +import { U as o } from "./copilot-ppBO0zjz.js"; +const r = { + popup: o` + + + + `, + dock: o` + + + + `, + close: o` + + `, + minus: o` + + + + `, + plus: o` + + + + `, + arrowLeft: o` + + + + `, + chevronLeft: o` + + + + `, + chevronRight: o` + + + + `, + chevronDown: o` + + + + `, + chevronUp: o` + + + + `, + edit: o` + + + + `, + editAlt: o` + + + + + + + + + + + `, + code: o` + + + `, + codeAlt: o` + + + `, + trash: o` + + `, + clock: o` + + `, + exclamationMark: o` + + `, + warning: o` + + `, + refresh: o` + + + + `, + save: o` + + + + `, + info: o` + + `, + github: o` + + + + + + + + + + + `, + play: o` + + + + `, + loading: o` + + + + `, + error: o` + + + + + + + + + + + + `, + help: o` + + + + + + + + + + + + `, + copy: o` + + `, + paste: o` + + `, + duplicate: o` + + `, + overlay: o` + + + + + + + + + + + + `, + linkExternal: o` + + `, + locked: o` + + +`, + unlocked: o` + +`, + rhombus: o` + +`, + atom: o` + + `, + codeSnippet: o` + +`, + thumbsUp: o` + +`, + thumbsUpFilled: o` + + +`, + thumbsDown: o` + +`, + thumbsDownFilled: o` + + +`, + check: o` + + `, + vaadinLogo: o` + + + + `, + cancel: o` + + + + + `, + x: o` + + + + `, + rotatingSpinner: o` + + + + + + + `, + dockLeft: o` + + + + `, + dockBottom: o` + + + + `, + dockRight: o` + + + + + `, + tabOrder: o` + +`, + terminal: o` + + `, + undo: o` + +`, + redo: o` + +`, + userUp: o` + + `, + userLeft: o` + + `, + userRight: o` + + `, + padding: o` + + + + + `, + paddingTop: o` + + + + + `, + paddingRight: o` + + + + + `, + paddingBottom: o` + + + + + `, + paddingLeft: o` + + + + + `, + paddingVertical: o` + + + + + `, + paddingHorizontal: o` + + + + + `, + maximize: o` + + + + `, + gapHorizontal: o` + + + + `, + gapVertical: o` + + + + `, + select: o` + + `, + click: o` + + `, + wrap: o` + + `, + link: o` + + + + ` +}; +export { + r as i +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/overlay-monkeypatch-Bx2SPt1s.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/overlay-monkeypatch-Bx2SPt1s.js new file mode 100644 index 0000000..55e59b1 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/overlay-monkeypatch-Bx2SPt1s.js @@ -0,0 +1,62 @@ +import { P as h } from "./copilot-ppBO0zjz.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const i = (t, e, a) => (a.configurable = !0, a.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, a), a); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function p(t, e) { + return (a, r, d) => { + const l = (o) => o.renderRoot?.querySelector(t) ?? null; + if (e) { + const { get: o, set: s } = typeof r == "object" ? a : d ?? (() => { + const n = Symbol(); + return { get() { + return this[n]; + }, set(m) { + this[n] = m; + } }; + })(); + return i(a, r, { get() { + let n = o.call(this); + return n === void 0 && (n = l(this), (n !== null || this.hasUpdated) && s.call(this, n)), n; + } }); + } + return i(a, r, { get() { + return l(this); + } }); + }; +} +function b(t) { + t.querySelectorAll( + "vaadin-context-menu, vaadin-menu-bar, vaadin-menu-bar-submenu, vaadin-select, vaadin-combo-box, vaadin-tooltip, vaadin-dialog, vaadin-multi-select-combo-box" + ).forEach((e) => { + e?.$?.comboBox && (e = e.$.comboBox); + let a = e.shadowRoot?.querySelector( + `${e.localName}-overlay, ${e.localName}-submenu, vaadin-menu-bar-overlay` + ); + a?.localName === "vaadin-menu-bar-submenu" && (a = a.shadowRoot.querySelector("vaadin-menu-bar-overlay")), a ? a._attachOverlay = c.bind(a) : e.$?.overlay && (e.$.overlay._attachOverlay = c.bind(e.$.overlay)); + }); +} +function u() { + return document.querySelector(`${h}main`).shadowRoot; +} +const v = () => Array.from(u().children).filter((e) => e._hasOverlayStackMixin && !e.hasAttribute("closing")).sort((e, a) => e.__zIndex - a.__zIndex || 0), y = (t) => t === v().pop(); +function c() { + const t = this; + t._placeholder = document.createComment("vaadin-overlay-placeholder"), t.parentNode.insertBefore(t._placeholder, t), u().appendChild(t), t.hasOwnProperty("_last") || Object.defineProperty(t, "_last", { + // Only returns odd die sides + get() { + return y(this); + } + }), t.bringToFront(), requestAnimationFrame(() => b(t)); +} +export { + p as e, + b as m +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/react-utils-D_MlSXfo.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/react-utils-D_MlSXfo.js new file mode 100644 index 0000000..0640c97 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/react-utils-D_MlSXfo.js @@ -0,0 +1,205 @@ +function K(e) { + return e === void 0 ? !1 : e.nodeId >= 0; +} +function L(e) { + if (e.javaClass) + return e.javaClass.substring(e.javaClass.lastIndexOf(".") + 1); +} +function k(e) { + const t = window.Vaadin; + if (t && t.Flow) { + const { clients: n } = t.Flow, r = Object.keys(n); + for (const o of r) { + const a = n[o]; + if (a.getNodeId) { + const u = a.getNodeId(e); + if (u >= 0) { + const l = a.getNodeInfo(u); + return { nodeId: u, uiId: a.getUIId(), element: e, javaClass: l.javaClass, styles: l.styles }; + } + } + } + } +} +function V() { + const e = window.Vaadin; + let t; + if (e && e.Flow) { + const { clients: n } = e.Flow, r = Object.keys(n); + for (const o of r) { + const a = n[o]; + a.getUIId && (t = a.getUIId()); + } + } + return t; +} +function W(e) { + return { + uiId: e.uiId, + nodeId: e.nodeId + }; +} +function q(e) { + return e ? e.type?.type === "FlowContainer" : !1; +} +const _ = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), C = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), R = Symbol.for("react.lazy"); +function P(e, t, n) { + const r = e.displayName; + if (r) + return r; + const o = t.displayName || t.name || ""; + return o !== "" ? `${n}(${o})` : n; +} +function f(e) { + return e.displayName || "Context"; +} +function i(e) { + if (e == null) + return null; + if (typeof e == "function") + return e.displayName || e.name || null; + if (typeof e == "string") + return e; + switch (e) { + case g: + return "Fragment"; + case _: + return "Portal"; + case I: + return "Profiler"; + case S: + return "StrictMode"; + case T: + return "Suspense"; + case N: + return "SuspenseList"; + } + if (typeof e == "object") + switch (e.$$typeof) { + case C: + return `${f(e)}.Consumer`; + case E: + return `${f(e._context)}.Provider`; + case d: + return P(e, e.render, "ForwardRef"); + case F: + const t = e.displayName || null; + return t !== null ? t : i(e.type) || "Memo"; + case R: { + const n = e, r = n._payload, o = n._init; + try { + return i(o(r)); + } catch { + return null; + } + } + } + return null; +} +let s; +function z() { + const e = /* @__PURE__ */ new Set(); + return Array.from(document.body.querySelectorAll("*")).flatMap(A).filter(h).filter((n) => !n.fileName.endsWith("frontend/generated/flow/Flow.tsx")).forEach((n) => e.add(n.fileName)), Array.from(e); +} +function h(e) { + return !!e && e.fileName; +} +function v(e) { + return e?._debugSource || void 0; +} +function w(e) { + if (e && e.type?.__debugSourceDefine) + return e.type.__debugSourceDefine; +} +function A(e) { + return v(p(e)); +} +function b() { + return `__reactFiber$${m()}`; +} +function O() { + return `__reactContainer$${m()}`; +} +function m() { + if (!(!s && (s = Array.from(document.querySelectorAll("*")).flatMap((e) => Object.keys(e)).filter((e) => e.startsWith("__reactFiber$")).map((e) => e.replace("__reactFiber$", "")).find((e) => e), !s))) + return s; +} +function $(e) { + const t = e.type; + return t?.$$typeof === d && !t.displayName && e.child ? $(e.child) : i(e.type) ?? i(e.elementType) ?? "???"; +} +function G() { + const e = Array.from(document.querySelectorAll("body > *")).flatMap((n) => n[O()]).find((n) => n), t = c(e); + return c(t?.child); +} +function Y(e) { + const t = []; + let n = c(e.child); + for (; n; ) + t.push(n), n = c(n.sibling); + return t; +} +const j = (e) => { + const t = Y(e); + if (t.length === 0) + return []; + const n = t.filter((r) => D(r) || U(r)); + return n.length === t.length ? t : t.flatMap((r) => n.includes(r) ? r : j(r)); +}; +function M(e) { + return e.hasOwnProperty("entanglements") && e.hasOwnProperty("containerInfo"); +} +function x(e) { + return e.hasOwnProperty("stateNode") && e.hasOwnProperty("pendingProps"); +} +function c(e) { + const t = e?.stateNode; + if (t?.current && (M(t) || x(t))) + return t?.current; + if (!e) + return; + if (!e.alternate) + return e; + const n = e.alternate, r = e?.actualStartTime, o = n?.actualStartTime; + return o !== r && o > r ? n : e; +} +function p(e) { + const t = b(), n = c(e[t]); + if (n?._debugSource) + return n; + let r = n?.return || void 0; + for (; r && !r._debugSource; ) + r = r.return || void 0; + return r; +} +function y(e) { + if (e.stateNode?.isConnected === !0) + return e.stateNode; + if (e.child) + return y(e.child); +} +function D(e) { + const t = y(e); + return t && c(p(t)) === e; +} +function U(e) { + return typeof e.type != "function" ? !1 : !!(e._debugSource || w(e)); +} +export { + w as a, + W as b, + q as c, + y as d, + D as e, + j as f, + v as g, + $ as h, + K as i, + k as j, + L as k, + G as l, + c as m, + p as n, + z as o, + V as p +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/copilot/state-B-CMA1Q2.js b/kontor-spring/application/frontend/generated/jar-resources/copilot/state-B-CMA1Q2.js new file mode 100644 index 0000000..9396fe1 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/copilot/state-B-CMA1Q2.js @@ -0,0 +1,45 @@ +import { R as p, S as u } from "./copilot-ppBO0zjz.js"; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const l = { attribute: !0, type: String, converter: p, reflect: !1, hasChanged: u }, d = (t = l, o, e) => { + const { kind: s, metadata: a } = e; + let n = globalThis.litPropertyMetadata.get(a); + if (n === void 0 && globalThis.litPropertyMetadata.set(a, n = /* @__PURE__ */ new Map()), n.set(e.name, t), s === "accessor") { + const { name: r } = e; + return { set(i) { + const c = o.get.call(this); + o.set.call(this, i), this.requestUpdate(r, c, t); + }, init(i) { + return i !== void 0 && this.P(r, void 0, t), i; + } }; + } + if (s === "setter") { + const { name: r } = e; + return function(i) { + const c = this[r]; + o.call(this, i), this.requestUpdate(r, c, t); + }; + } + throw Error("Unsupported decorator location: " + s); +}; +function h(t) { + return (o, e) => typeof e == "object" ? d(t, o, e) : ((s, a, n) => { + const r = a.hasOwnProperty(n); + return a.constructor.createProperty(n, r ? { ...s, wrapped: !0 } : s), r ? Object.getOwnPropertyDescriptor(a, n) : void 0; + })(t, o, e); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function g(t) { + return h({ ...t, state: !0, attribute: !1 }); +} +export { + h as n, + g as r +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/datepickerConnector.js b/kontor-spring/application/frontend/generated/jar-resources/datepickerConnector.js new file mode 100644 index 0000000..cde1317 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/datepickerConnector.js @@ -0,0 +1,179 @@ +import dateFnsFormat from 'date-fns/format'; +import dateFnsParse from 'date-fns/parse'; +import dateFnsIsValid from 'date-fns/isValid'; +import { extractDateParts, parseDate as _parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js'; + +window.Vaadin.Flow.datepickerConnector = {}; +window.Vaadin.Flow.datepickerConnector.initLazy = (datepicker) => { + // Check whether the connector was already initialized for the datepicker + if (datepicker.$connector) { + return; + } + + datepicker.$connector = {}; + + const createLocaleBasedDateFormat = function (locale) { + try { + // Check whether the locale is supported or not + new Date().toLocaleDateString(locale); + } catch (e) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + // format test date and convert to date-fns pattern + const testDate = new Date(Date.UTC(1234, 4, 6)); + let pattern = testDate.toLocaleDateString(locale, { timeZone: 'UTC' }); + pattern = pattern + // escape date-fns pattern letters by enclosing them in single quotes + .replace(/([a-zA-Z]+)/g, "'$1'") + // insert date placeholder + .replace('06', 'dd') + .replace('6', 'd') + // insert month placeholder + .replace('05', 'MM') + .replace('5', 'M') + // insert year placeholder + .replace('1234', 'yyyy'); + const isValidPattern = pattern.includes('d') && pattern.includes('M') && pattern.includes('y'); + if (!isValidPattern) { + console.warn('The locale is not supported, using default format setting (ISO 8601).'); + return 'yyyy-MM-dd'; + } + + return pattern; + }; + + function createFormatterAndParser(formats) { + if (!formats || formats.length === 0) { + throw new Error('Array of custom date formats is null or empty'); + } + + function getShortYearFormat(format) { + if (format.includes('yyyy') && !format.includes('yyyyy')) { + return format.replace('yyyy', 'yy'); + } + if (format.includes('YYYY') && !format.includes('YYYYY')) { + return format.replace('YYYY', 'YY'); + } + return undefined; + } + + function isFormatWithYear(format) { + return format.includes('y') || format.includes('Y'); + } + + function isShortYearFormat(format) { + // Format is long if it includes a four-digit year. + return !format.includes('yyyy') && !format.includes('YYYY'); + } + + function getExtendedFormats(formats) { + return formats.reduce((acc, format) => { + // We first try to match the date with the shorter version, + // as short years are supported with the long date format. + if (isFormatWithYear(format) && !isShortYearFormat(format)) { + acc.push(getShortYearFormat(format)); + } + acc.push(format); + return acc; + }, []); + } + + function correctFullYear(date) { + // The last parsed date check handles the case where a four-digit year is parsed, then formatted + // as a two-digit year, and then parsed again. In this case we want to keep the century of the + // originally parsed year, instead of using the century of the reference date. + + // Do not apply any correction if the previous parse attempt was failed. + if (datepicker.$connector._lastParseStatus === 'error') { + return; + } + + // Update century if the last parsed date is the same except the century. + if (datepicker.$connector._lastParseStatus === 'successful') { + if ( + datepicker.$connector._lastParsedDate.day === date.getDate() && + datepicker.$connector._lastParsedDate.month === date.getMonth() && + datepicker.$connector._lastParsedDate.year % 100 === date.getFullYear() % 100 + ) { + date.setFullYear(datepicker.$connector._lastParsedDate.year); + } + return; + } + + // Update century if this is the first parse after overlay open. + const currentValue = _parseDate(datepicker.value); + if ( + dateFnsIsValid(currentValue) && + currentValue.getDate() === date.getDate() && + currentValue.getMonth() === date.getMonth() && + currentValue.getFullYear() % 100 === date.getFullYear() % 100 + ) { + date.setFullYear(currentValue.getFullYear()); + } + } + + function formatDate(dateParts) { + const format = formats[0]; + const date = _parseDate(`${dateParts.year}-${dateParts.month + 1}-${dateParts.day}`); + + return dateFnsFormat(date, format); + } + + function doParseDate(dateString, format, referenceDate) { + // When format does not contain a year, then current year should be used. + const refDate = isFormatWithYear(format) ? referenceDate : new Date(); + const date = dateFnsParse(dateString, format, refDate); + if (dateFnsIsValid(date)) { + if (isFormatWithYear(format) && isShortYearFormat(format)) { + correctFullYear(date); + } + return { + day: date.getDate(), + month: date.getMonth(), + year: date.getFullYear() + }; + } + } + + function parseDate(dateString) { + const referenceDate = _getReferenceDate(); + for (let format of getExtendedFormats(formats)) { + const parsedDate = doParseDate(dateString, format, referenceDate); + if (parsedDate) { + datepicker.$connector._lastParseStatus = 'successful'; + datepicker.$connector._lastParsedDate = parsedDate; + return parsedDate; + } + } + datepicker.$connector._lastParseStatus = 'error'; + return false; + } + + return { + formatDate: formatDate, + parseDate: parseDate + }; + } + + function _getReferenceDate() { + const { referenceDate } = datepicker.i18n; + return referenceDate ? new Date(referenceDate.year, referenceDate.month, referenceDate.day) : new Date(); + } + + datepicker.$connector.updateI18n = (locale, i18n) => { + // Either use custom formats specified in I18N, or create format from locale + const hasCustomFormats = i18n && i18n.dateFormats && i18n.dateFormats.length > 0; + if (i18n && i18n.referenceDate) { + i18n.referenceDate = extractDateParts(new Date(i18n.referenceDate)); + } + const usedFormats = hasCustomFormats ? i18n.dateFormats : [createLocaleBasedDateFormat(locale)]; + const formatterAndParser = createFormatterAndParser(usedFormats); + + // Merge current web component I18N settings with new I18N settings and the formatting and parsing functions + datepicker.i18n = Object.assign({}, datepicker.i18n, i18n, formatterAndParser); + }; + + datepicker.addEventListener('opened-changed', () => (datepicker.$connector._lastParseStatus = undefined)); +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/dndConnector.js b/kontor-spring/application/frontend/generated/jar-resources/dndConnector.js new file mode 100644 index 0000000..7dcb975 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/dndConnector.js @@ -0,0 +1,110 @@ +window.Vaadin = window.Vaadin || {}; +window.Vaadin.Flow = window.Vaadin.Flow || {}; +window.Vaadin.Flow.dndConnector = { + __ondragenterListener: function (event) { + // TODO filter by data type + // TODO prevent dropping on itself (by default) + const effect = event.currentTarget['__dropEffect']; + if (!event.currentTarget.hasAttribute('disabled')) { + if (effect) { + event.dataTransfer.dropEffect = effect; + } + + if (effect !== 'none') { + /* #7108: if drag moves on top of drop target's children, first another ondragenter event + * is fired and then a ondragleave event. This happens again once the drag + * moves on top of another children, or back on top of the drop target element. + * Thus need to "cancel" the following ondragleave, to not remove class name. + * Drop event will happen even when dropped to a child element. */ + if (event.currentTarget.classList.contains('v-drag-over-target')) { + event.currentTarget['__skip-leave'] = true; + } else { + event.currentTarget.classList.add('v-drag-over-target'); + } + // enables browser specific pseudo classes (at least FF) + event.preventDefault(); + event.stopPropagation(); // don't let parents know + } + } + }, + + __ondragoverListener: function (event) { + // TODO filter by data type + // TODO filter by effectAllowed != dropEffect due to Safari & IE11 ? + if (!event.currentTarget.hasAttribute('disabled')) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + // allows the drop && don't let parents know + event.preventDefault(); + event.stopPropagation(); + } + }, + + __ondragleaveListener: function (event) { + if (event.currentTarget['__skip-leave']) { + event.currentTarget['__skip-leave'] = false; + } else { + event.currentTarget.classList.remove('v-drag-over-target'); + } + // #7109 need to stop or any parent drop target might not get highlighted, + // as ondragenter for it is fired before the child gets dragleave. + event.stopPropagation(); + }, + + __ondropListener: function (event) { + const effect = event.currentTarget['__dropEffect']; + if (effect) { + event.dataTransfer.dropEffect = effect; + } + event.currentTarget.classList.remove('v-drag-over-target'); + // prevent browser handling && don't let parents know + event.preventDefault(); + event.stopPropagation(); + }, + + updateDropTarget: function (element) { + if (element['__active']) { + element.addEventListener('dragenter', this.__ondragenterListener, false); + element.addEventListener('dragover', this.__ondragoverListener, false); + element.addEventListener('dragleave', this.__ondragleaveListener, false); + element.addEventListener('drop', this.__ondropListener, false); + } else { + element.removeEventListener('dragenter', this.__ondragenterListener, false); + element.removeEventListener('dragover', this.__ondragoverListener, false); + element.removeEventListener('dragleave', this.__ondragleaveListener, false); + element.removeEventListener('drop', this.__ondropListener, false); + element.classList.remove('v-drag-over-target'); + } + }, + + /** DRAG SOURCE METHODS: */ + + __dragstartListener: function (event) { + event.stopPropagation(); + event.dataTransfer.setData('text/plain', ''); + if (event.currentTarget.hasAttribute('disabled')) { + event.preventDefault(); + } else { + if (event.currentTarget['__effectAllowed']) { + event.dataTransfer.effectAllowed = event.currentTarget['__effectAllowed']; + } + event.currentTarget.classList.add('v-dragged'); + } + }, + + __dragendListener: function (event) { + event.currentTarget.classList.remove('v-dragged'); + }, + + updateDragSource: function (element) { + if (element['draggable']) { + element.addEventListener('dragstart', this.__dragstartListener, false); + element.addEventListener('dragend', this.__dragendListener, false); + } else { + element.removeEventListener('dragstart', this.__dragstartListener, false); + element.removeEventListener('dragend', this.__dragendListener, false); + } + } +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/flow-component-directive.js b/kontor-spring/application/frontend/generated/jar-resources/flow-component-directive.js new file mode 100644 index 0000000..9727016 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/flow-component-directive.js @@ -0,0 +1,68 @@ +import { noChange } from 'lit'; +import { directive, PartType } from 'lit/directive.js'; +import { AsyncDirective } from 'lit/async-directive.js'; + +class FlowComponentDirective extends AsyncDirective { + constructor(partInfo) { + super(partInfo); + if (partInfo.type !== PartType.CHILD) { + throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`); + } + } + + update(part, [appid, nodeid]) { + this.updateContent(part, appid, nodeid); + return noChange; + } + + updateContent(part, appid, nodeid) { + const { parentNode, startNode } = part; + this.__parentNode = parentNode; + + const hasNewNodeId = nodeid !== undefined && nodeid !== null; + const newNode = hasNewNodeId ? this.getNewNode(appid, nodeid) : null; + const oldNode = this.getOldNode(part); + + clearTimeout(this.__parentNode.__nodeRetryTimeout); + + if (hasNewNodeId && !newNode) { + // If the node is not found, try again later. + this.__parentNode.__nodeRetryTimeout = setTimeout(() => this.updateContent(part, appid, nodeid)); + } else if (oldNode === newNode) { + return; + } else if (oldNode && newNode) { + parentNode.replaceChild(newNode, oldNode); + } else if (oldNode) { + parentNode.removeChild(oldNode); + } else if (newNode) { + startNode.after(newNode); + } + } + + getNewNode(appid, nodeid) { + return window.Vaadin.Flow.clients[appid].getByNodeId(nodeid); + } + + getOldNode(part) { + const { startNode, endNode } = part; + if (startNode.nextSibling === endNode) { + return; + } + return startNode.nextSibling; + } + + disconnected() { + clearTimeout(this.__parentNode.__nodeRetryTimeout); + } +} + +/** + * Renders the given flow component node. + * + * WARNING: This directive is not intended for public use. + * + * @param {string} appid + * @param {number} nodeid + * @private + */ +export const flowComponentDirective = directive(FlowComponentDirective); diff --git a/kontor-spring/application/frontend/generated/jar-resources/flow-component-renderer.js b/kontor-spring/application/frontend/generated/jar-resources/flow-component-renderer.js new file mode 100644 index 0000000..3f146a7 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/flow-component-renderer.js @@ -0,0 +1,208 @@ +import '@polymer/polymer/lib/elements/dom-if.js'; +import { html } from '@polymer/polymer/lib/utils/html-tag.js'; +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { idlePeriod } from '@polymer/polymer/lib/utils/async.js'; +import { PolymerElement } from '@polymer/polymer/polymer-element.js'; +import { flowComponentDirective } from './flow-component-directive.js'; +import { render, html as litHtml } from 'lit'; + +/** + * Returns the requested node in a form suitable for Lit template interpolation. + * @param {string} appid + * @param {number} nodeid + * @returns {any} a Lit directive + */ +function getNode(appid, nodeid) { + return flowComponentDirective(appid, nodeid); +} + +/** + * Sets the nodes defined by the given node ids as the child nodes of the + * given root element. + * @param {string} appid + * @param {number[]} nodeIds + * @param {Element} root + */ +function setChildNodes(appid, nodeIds, root) { + render(litHtml`${nodeIds.map(id => flowComponentDirective(appid, id))}`, root); +} + +/** + * SimpleElementBindingStrategy::addChildren uses insertBefore to add child + * elements to the container. When the children are manually placed under + * another element, the call to insertBefore can occasionally fail due to + * an invalid reference node. + * + * This is a temporary workaround which patches the container's native API + * to not fail when called with invalid arguments. + */ +function patchVirtualContainer(container) { + const originalInsertBefore = container.insertBefore; + + container.insertBefore = function (newNode, referenceNode) { + if (referenceNode && referenceNode.parentNode === this) { + return originalInsertBefore.call(this, newNode, referenceNode); + } else { + return originalInsertBefore.call(this, newNode, null); + } + }; +} + +window.Vaadin ||= {}; +window.Vaadin.FlowComponentHost ||= { patchVirtualContainer, getNode, setChildNodes }; + +class FlowComponentRenderer extends PolymerElement { + static get template() { + return html` + + + `; + } + + static get is() { + return 'flow-component-renderer'; + } + static get properties() { + return { + nodeid: Number, + appid: String, + }; + } + static get observers() { + return ['_attachRenderedComponentIfAble(appid, nodeid)']; + } + + ready() { + super.ready(); + this.addEventListener('click', function (event) { + if ( + this.firstChild && + typeof this.firstChild.click === 'function' && + event.target === this + ) { + event.stopPropagation(); + this.firstChild.click(); + } + }); + this.addEventListener('animationend', this._onAnimationEnd); + } + + _asyncAttachRenderedComponentIfAble() { + this._debouncer = Debouncer.debounce(this._debouncer, idlePeriod, () => + this._attachRenderedComponentIfAble() + ); + } + + _attachRenderedComponentIfAble() { + if (this.appid == null) { + return; + } + if (this.nodeid == null) { + if (this.firstChild) { + this.removeChild(this.firstChild); + } + return; + } + const renderedComponent = this._getRenderedComponent(); + if (this.firstChild) { + if (!renderedComponent) { + this._asyncAttachRenderedComponentIfAble(); + } else if (this.firstChild !== renderedComponent) { + this.replaceChild(renderedComponent, this.firstChild); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._defineFocusTarget(); + this.onComponentRendered(); + } + } else { + if (renderedComponent) { + this.appendChild(renderedComponent); + this._defineFocusTarget(); + this.onComponentRendered(); + } else { + this._asyncAttachRenderedComponentIfAble(); + } + } + } + + _getRenderedComponent() { + try { + return window.Vaadin.Flow.clients[this.appid].getByNodeId(this.nodeid); + } catch (error) { + console.error( + 'Could not get node %s from app %s', + this.nodeid, + this.appid + ); + console.error(error); + } + return null; + } + + onComponentRendered() { + // subclasses can override this method to execute custom logic on resize + } + + /* Setting the `focus-target` attribute to the first focusable descendant + starting from the firstChild necessary for the focus to be delegated + within the flow-component-renderer when used inside a vaadin-grid cell */ + _defineFocusTarget() { + var focusable = this._getFirstFocusableDescendant(this.firstChild); + if (focusable !== null) { + focusable.setAttribute('focus-target', 'true'); + } + } + + _getFirstFocusableDescendant(node) { + if (this._isFocusable(node)) { + return node; + } + if (node.hasAttribute && (node.hasAttribute('disabled') || node.hasAttribute('hidden'))) { + return null; + } + if (!node.children) { + return null; + } + for (var i = 0; i < node.children.length; i++) { + var focusable = this._getFirstFocusableDescendant(node.children[i]); + if (focusable !== null) { + return focusable; + } + } + return null; + } + + _isFocusable(node) { + if ( + node.hasAttribute && + typeof node.hasAttribute === 'function' && + (node.hasAttribute('disabled') || node.hasAttribute('hidden')) + ) { + return false; + } + + return node.tabIndex === 0; + } + + _onAnimationEnd(e) { + // ShadyCSS applies scoping suffixes to animation names + // To ensure that child is attached once element is unhidden + // for when it was filtered out from, eg, ComboBox + // https://github.com/vaadin/vaadin-flow-components/issues/437 + if (e.animationName.indexOf('flow-component-renderer-appear') === 0) { + this._attachRenderedComponentIfAble(); + } + } +} +window.customElements.define(FlowComponentRenderer.is, FlowComponentRenderer); diff --git a/kontor-spring/application/frontend/generated/jar-resources/gridConnector.ts b/kontor-spring/application/frontend/generated/jar-resources/gridConnector.ts new file mode 100644 index 0000000..d6f9e5a --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/gridConnector.ts @@ -0,0 +1,1196 @@ +// @ts-nocheck +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut, animationFrame } from '@polymer/polymer/lib/utils/async.js'; +import { Grid } from '@vaadin/grid/src/vaadin-grid.js'; +import { isFocusable } from '@vaadin/grid/src/vaadin-grid-active-item-mixin.js'; +import { GridFlowSelectionColumn } from "./vaadin-grid-flow-selection-column.js"; + +window.Vaadin.Flow.gridConnector = {}; +window.Vaadin.Flow.gridConnector.initLazy = (grid) => { + // Check whether the connector was already initialized for the grid + if (grid.$connector) { + return; + } + + const dataProviderController = grid._dataProviderController; + + dataProviderController.ensureFlatIndexHierarchyOriginal = dataProviderController.ensureFlatIndexHierarchy; + dataProviderController.ensureFlatIndexHierarchy = function (flatIndex) { + const { item } = this.getFlatIndexContext(flatIndex); + if (!item || !this.isExpanded(item)) { + return; + } + + const isCached = grid.$connector.hasCacheForParentKey(grid.getItemId(item)); + if (isCached) { + // The sub-cache items are already in the connector's cache. Skip the debouncing process. + this.ensureFlatIndexHierarchyOriginal(flatIndex); + } else { + grid.$connector.beforeEnsureFlatIndexHierarchy(flatIndex, item); + } + }; + + dataProviderController.isLoadingOriginal = dataProviderController.isLoading; + dataProviderController.isLoading = function () { + return grid.$connector.hasEnsureSubCacheQueue() || this.isLoadingOriginal(); + }; + + dataProviderController.getItemSubCache = function (item) { + return this.getItemContext(item)?.subCache; + }; + + let cache = {}; + + /* parentRequestDelay - optimizes parent requests by batching several requests + * into one request. Delay in milliseconds. Disable by setting to 0. + * parentRequestBatchMaxSize - maximum size of the batch. + */ + const parentRequestDelay = 50; + const parentRequestBatchMaxSize = 20; + + let parentRequestQueue = []; + let parentRequestDebouncer; + let ensureSubCacheQueue = []; + let ensureSubCacheDebouncer; + + const rootRequestDelay = 150; + let rootRequestDebouncer; + + let lastRequestedRanges = {}; + const root = 'null'; + lastRequestedRanges[root] = [0, 0]; + + let currentUpdateClearRange = null; + let currentUpdateSetRange = null; + + const validSelectionModes = ['SINGLE', 'NONE', 'MULTI']; + let selectedKeys = {}; + let selectionMode = 'SINGLE'; + + let sorterDirectionsSetFromServer = false; + + grid.size = 0; // To avoid NaN here and there before we get proper data + grid.itemIdPath = 'key'; + + function createEmptyItemFromKey(key) { + return { [grid.itemIdPath]: key }; + } + + grid.$connector = {}; + + grid.$connector.hasCacheForParentKey = (parentKey) => cache[parentKey]?.size !== undefined; + + grid.$connector.hasEnsureSubCacheQueue = () => ensureSubCacheQueue.length > 0; + + grid.$connector.hasParentRequestQueue = () => parentRequestQueue.length > 0; + + grid.$connector.hasRootRequestQueue = () => { + const { pendingRequests } = dataProviderController.rootCache; + return Object.keys(pendingRequests).length > 0 || !!rootRequestDebouncer?.isActive(); + }; + + grid.$connector.beforeEnsureFlatIndexHierarchy = function (flatIndex, item) { + // add call to queue + ensureSubCacheQueue.push({ + flatIndex, + itemkey: grid.getItemId(item) + }); + + ensureSubCacheDebouncer = Debouncer.debounce(ensureSubCacheDebouncer, animationFrame, () => { + while (ensureSubCacheQueue.length) { + grid.$connector.flushEnsureSubCache(); + } + }); + }; + + grid.$connector.doSelection = function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + if (selectionMode === 'SINGLE') { + selectedKeys = {}; + } + + items.forEach((item) => { + if (item) { + selectedKeys[item.key] = item; + item.selected = true; + if (userOriginated) { + grid.$server.select(item.key); + } + } + + // FYI: In single selection mode, the server can send items = [null] + // which means a "Deselect All" command. + const isSelectedItemDifferentOrNull = !grid.activeItem || !item || item.key != grid.activeItem.key; + if (!userOriginated && selectionMode === 'SINGLE' && isSelectedItemDifferentOrNull) { + grid.activeItem = item; + } + }); + + grid.selectedItems = Object.values(selectedKeys); + }; + + grid.$connector.doDeselection = function (items, userOriginated) { + if (selectionMode === 'NONE' || !items.length || (userOriginated && grid.hasAttribute('disabled'))) { + return; + } + + const updatedSelectedItems = grid.selectedItems.slice(); + while (items.length) { + const itemToDeselect = items.shift(); + for (let i = 0; i < updatedSelectedItems.length; i++) { + const selectedItem = updatedSelectedItems[i]; + if (itemToDeselect?.key === selectedItem.key) { + updatedSelectedItems.splice(i, 1); + break; + } + } + if (itemToDeselect) { + delete selectedKeys[itemToDeselect.key]; + delete itemToDeselect.selected; + if (userOriginated) { + grid.$server.deselect(itemToDeselect.key); + } + } + } + grid.selectedItems = updatedSelectedItems; + }; + + grid.__activeItemChanged = function (newVal, oldVal) { + if (selectionMode != 'SINGLE') { + return; + } + if (!newVal) { + if (oldVal && selectedKeys[oldVal.key]) { + if (grid.__deselectDisallowed) { + grid.activeItem = oldVal; + } else { + grid.$connector.doDeselection([oldVal], true); + } + } + } else if (!selectedKeys[newVal.key]) { + grid.$connector.doSelection([newVal], true); + } + }; + grid._createPropertyObserver('activeItem', '__activeItemChanged', true); + + grid.__activeItemChangedDetails = function (newVal, oldVal) { + if (grid.__disallowDetailsOnClick) { + return; + } + // when grid is attached, newVal is not set and oldVal is undefined + // do nothing + if (newVal == null && oldVal === undefined) { + return; + } + if (newVal && !newVal.detailsOpened) { + grid.$server.setDetailsVisible(newVal.key); + } else { + grid.$server.setDetailsVisible(null); + } + }; + grid._createPropertyObserver('activeItem', '__activeItemChangedDetails', true); + + grid.$connector._getSameLevelPage = function (parentKey, currentCache, currentCacheItemIndex) { + const currentParentKey = currentCache.parentItem ? grid.getItemId(currentCache.parentItem) : root; + if (currentParentKey === parentKey) { + // Level match found, return the page number. + return Math.floor(currentCacheItemIndex / grid.pageSize); + } + const { parentCache, parentCacheIndex } = currentCache; + if (!parentCache) { + // There is no parent cache to match level + return null; + } + // Traverse the tree upwards until a match is found or the end is reached + return this._getSameLevelPage(parentKey, parentCache, parentCacheIndex); + }; + + grid.$connector.flushEnsureSubCache = function () { + const pendingFetch = ensureSubCacheQueue.shift(); + if (pendingFetch) { + dataProviderController.ensureFlatIndexHierarchyOriginal(pendingFetch.flatIndex); + return true; + } + return false; + }; + + grid.$connector.debounceRootRequest = function (page) { + const delay = grid._hasData ? rootRequestDelay : 0; + + rootRequestDebouncer = Debouncer.debounce(rootRequestDebouncer, timeOut.after(delay), () => { + grid.$connector.fetchPage( + (firstIndex, size) => grid.$server.setRequestedRange(firstIndex, size), + page, + root + ); + }); + }; + + grid.$connector.flushParentRequests = function () { + const pendingFetches = []; + + parentRequestQueue.splice(0, parentRequestBatchMaxSize).forEach(({ parentKey, page }) => { + grid.$connector.fetchPage( + (firstIndex, size) => pendingFetches.push({ parentKey, firstIndex, size }), + page, + parentKey + ); + }); + + if (pendingFetches.length) { + grid.$server.setParentRequestedRanges(pendingFetches); + } + }; + + grid.$connector.debounceParentRequest = function (parentKey, page) { + // Remove any pending requests for the same parentKey. + parentRequestQueue = parentRequestQueue.filter((request) => request.parentKey !== parentKey); + // Add the new request to the queue. + parentRequestQueue.push({ parentKey, page }); + // Debounce the request to avoid sending multiple requests for the same parentKey. + parentRequestDebouncer = Debouncer.debounce(parentRequestDebouncer, timeOut.after(parentRequestDelay), () => { + while (parentRequestQueue.length) { + grid.$connector.flushParentRequests(); + } + }); + }; + + grid.$connector.fetchPage = function (fetch, page, parentKey) { + // Adjust the requested page to be within the valid range in case + // the grid size has changed while fetchPage was debounced. + if (parentKey === root) { + page = Math.min(page, Math.floor((grid.size - 1) / grid.pageSize)); + } + + // Determine what to fetch based on scroll position and not only + // what grid asked for + const visibleRows = grid._getRenderedRows(); + let start = visibleRows.length > 0 ? visibleRows[0].index : 0; + let end = visibleRows.length > 0 ? visibleRows[visibleRows.length - 1].index : 0; + + // The buffer size could be multiplied by some constant defined by the user, + // if he needs to reduce the number of items sent to the Grid to improve performance + // or to increase it to make Grid smoother when scrolling + let buffer = end - start; + let firstNeededIndex = Math.max(0, start - buffer); + let lastNeededIndex = Math.min(end + buffer, grid._flatSize); + + let pageRange = [null, null]; + for (let idx = firstNeededIndex; idx <= lastNeededIndex; idx++) { + const { cache, index } = dataProviderController.getFlatIndexContext(idx); + // Try to match level by going up in hierarchy. The page range should include + // pages that contain either of the following: + // - visible items of the current cache + // - same level parents of visible descendant items + // If the parent items are not considered, Flow would remove the hidden parent + // items from the current level cache. This can lead to an infinite loop when using + // scrollToIndex feature. + const sameLevelPage = grid.$connector._getSameLevelPage(parentKey, cache, index); + if (sameLevelPage === null) { + continue; + } + pageRange[0] = Math.min(pageRange[0] ?? sameLevelPage, sameLevelPage); + pageRange[1] = Math.max(pageRange[1] ?? sameLevelPage, sameLevelPage); + } + + // When the viewport doesn't contain the requested page or it doesn't contain any items from + // the requested level at all, it means that the scroll position has changed while fetchPage + // was debounced. For example, it can happen if the user scrolls the grid to the bottom and + // then immediately back to the top. In this case, the request for the last page will be left + // hanging. To avoid this, as a workaround, we reset the range to only include the requested page + // to make sure all hanging requests are resolved. After that, the grid requests the first page + // or whatever in the viewport again. + if (pageRange.some((p) => p === null) || page < pageRange[0] || page > pageRange[1]) { + pageRange = [page, page]; + } + + let lastRequestedRange = lastRequestedRanges[parentKey] || [-1, -1]; + if (lastRequestedRange[0] != pageRange[0] || lastRequestedRange[1] != pageRange[1]) { + lastRequestedRanges[parentKey] = pageRange; + let pageCount = pageRange[1] - pageRange[0] + 1; + fetch(pageRange[0] * grid.pageSize, pageCount * grid.pageSize); + } + }; + + grid.dataProvider = function (params, callback) { + if (params.pageSize != grid.pageSize) { + throw 'Invalid pageSize'; + } + + let page = params.page; + + if (params.parentItem) { + let parentUniqueKey = grid.getItemId(params.parentItem); + + const parentItemSubCache = dataProviderController.getItemSubCache(params.parentItem); + if (cache[parentUniqueKey]?.[page] && parentItemSubCache) { + // Ensure grid isn't in loading state when the callback executes + ensureSubCacheQueue = []; + // Resolve the callback from cache + callback(cache[parentUniqueKey][page], cache[parentUniqueKey].size); + } else { + grid.$connector.debounceParentRequest(parentUniqueKey, page); + } + } else { + // size is controlled by the server (data communicator), so if the + // size is zero, we know that there is no data to fetch. + // This also prevents an empty grid getting stuck in a loading state. + // The connector does not cache empty pages, so if the grid requests + // data again, there would be no cache entry, causing a request to + // the server. However, the data communicator will never respond, + // as it assumes that the data is already cached. + if (grid.size === 0) { + callback([], 0); + return; + } + + if (cache[root]?.[page]) { + callback(cache[root][page]); + } else { + grid.$connector.debounceRootRequest(page); + } + } + }; + + grid.$connector.setSorterDirections = function (directions) { + sorterDirectionsSetFromServer = true; + setTimeout(() => { + try { + const sorters = Array.from(grid.querySelectorAll('vaadin-grid-sorter')); + + // Sorters for hidden columns are removed from DOM but stored in the web component. + // We need to ensure that all the sorters are reset when using `grid.sort(null)`. + grid._sorters.forEach((sorter) => { + if (!sorters.includes(sorter)) { + sorters.push(sorter); + } + }); + + sorters.forEach((sorter) => { + sorter.direction = null; + }); + + // Apply directions in correct order, depending on configured multi-sort priority. + // For the default "prepend" mode, directions need to be applied in reverse, in + // order for the sort indicators to match the order on the server. For "append" + // just keep the order passed from the server. + if (grid.multiSortPriority !== 'append') { + directions = directions.reverse(); + } + directions.forEach(({ column, direction }) => { + sorters.forEach((sorter) => { + if (sorter.getAttribute('path') === column) { + sorter.direction = direction; + } + }); + }); + + // Manually trigger a re-render of the sorter priority indicators + // in case some of the sorters were hidden while being updated above + // and therefore didn't notify the grid about their direction change. + grid.__applySorters(); + } finally { + sorterDirectionsSetFromServer = false; + } + }); + }; + + grid._updateItem = function (row, item) { + Grid.prototype._updateItem.call(grid, row, item); + + // There might be inactive component renderers on hidden rows that still refer to the + // same component instance as one of the renderers on a visible row. Making the + // inactive/hidden renderer attach the component might steal it from a visible/active one. + if (!row.hidden) { + // make sure that component renderers are updated + Array.from(row.children).forEach((cell) => { + Array.from(cell?._content?.__templateInstance?.children || []).forEach((content) => { + if (content._attachRenderedComponentIfAble) { + content._attachRenderedComponentIfAble(); + } + // In hierarchy column of tree grid, the component renderer is inside its content, + // this updates it renderer from innerContent + Array.from(content?.children || []).forEach((innerContent) => { + if (innerContent._attachRenderedComponentIfAble) { + innerContent._attachRenderedComponentIfAble(); + } + }); + }); + }); + } + // since no row can be selected when selection mode is NONE + // if selectionMode is set to NONE, remove aria-selected attribute from the row + if (selectionMode === validSelectionModes[1]) { + // selectionMode === NONE + row.removeAttribute('aria-selected'); + Array.from(row.children).forEach((cell) => cell.removeAttribute('aria-selected')); + } + }; + + const itemExpandedChanged = function (item, expanded) { + // method available only for the TreeGrid server-side component + if (item == undefined || grid.$server.updateExpandedState == undefined) { + return; + } + let parentKey = grid.getItemId(item); + grid.$server.updateExpandedState(parentKey, expanded); + }; + + // Patch grid.expandItem and grid.collapseItem to have + // itemExpandedChanged run when either happens. + grid.expandItem = function (item) { + itemExpandedChanged(item, true); + Grid.prototype.expandItem.call(grid, item); + }; + + grid.collapseItem = function (item) { + itemExpandedChanged(item, false); + Grid.prototype.collapseItem.call(grid, item); + }; + + const itemsUpdated = function (items) { + if (!items || !Array.isArray(items)) { + throw 'Attempted to call itemsUpdated with an invalid value: ' + JSON.stringify(items); + } + let detailsOpenedItems = Array.from(grid.detailsOpenedItems); + let updatedSelectedItem = false; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + if (!item) { + continue; + } + if (item.detailsOpened) { + if (grid._getItemIndexInArray(item, detailsOpenedItems) < 0) { + detailsOpenedItems.push(item); + } + } else if (grid._getItemIndexInArray(item, detailsOpenedItems) >= 0) { + detailsOpenedItems.splice(grid._getItemIndexInArray(item, detailsOpenedItems), 1); + } + if (selectedKeys[item.key]) { + selectedKeys[item.key] = item; + item.selected = true; + updatedSelectedItem = true; + } + } + grid.detailsOpenedItems = detailsOpenedItems; + if (updatedSelectedItem) { + // Replace the objects in the grid.selectedItems array without replacing the array + // itself in order to avoid an unnecessary re-render of the grid. + grid.selectedItems.splice(0, grid.selectedItems.length, ...Object.values(selectedKeys)); + } + }; + + /** + * Updates the cache for the given page for grid or tree-grid. + * + * @param page index of the page to update + * @param parentKey the key of the parent item for the page + * @returns an array of the updated items for the page, or undefined if no items were cached for the page + */ + const updateGridCache = function (page, parentKey = root) { + const items = cache[parentKey][page]; + const parentItem = createEmptyItemFromKey(parentKey); + + let gridCache = parentKey === root + ? dataProviderController.rootCache + : dataProviderController.getItemSubCache(parentItem); + + // Force update unless there's a callback waiting + if (gridCache && !gridCache.pendingRequests[page]) { + // Update the items in the grid cache or set an array of undefined items + // to remove the page from the grid cache if there are no corresponding items + // in the connector cache. + gridCache.setPage(page, items || Array.from({ length: grid.pageSize })); + } + + return items; + }; + + /** + * Updates all visible grid rows in DOM. + */ + const updateAllGridRowsInDomBasedOnCache = function () { + updateGridFlatSize(); + grid.__updateVisibleRows(); + }; + + /** + * Updates the 's internal cache size and flat size. + */ + const updateGridFlatSize = function () { + dataProviderController.recalculateFlatSize(); + grid._flatSize = dataProviderController.flatSize; + }; + + /** + * Update the given items in DOM if currently visible. + * + * @param array items the items to update in DOM + */ + const updateGridItemsInDomBasedOnCache = function (items) { + if (!items || !grid.$ || grid.$.items.childElementCount === 0) { + return; + } + + const itemKeys = items.map((item) => item.key); + const indexes = grid + ._getRenderedRows() + .filter((row) => row._item && itemKeys.includes(row._item.key)) + .map((row) => row.index); + if (indexes.length > 0) { + grid.__updateVisibleRows(indexes[0], indexes[indexes.length - 1]); + } + }; + + grid.$connector.set = function (index, items, parentKey) { + if (index % grid.pageSize != 0) { + throw 'Got new data to index ' + index + ' which is not aligned with the page size of ' + grid.pageSize; + } + let pkey = parentKey || root; + + const firstPage = index / grid.pageSize; + const updatedPageCount = Math.ceil(items.length / grid.pageSize); + + // For root cache, remember the range of pages that were set during an update + if (pkey === root) { + currentUpdateSetRange = [firstPage, firstPage + updatedPageCount - 1]; + } + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let slice = items.slice(i * grid.pageSize, (i + 1) * grid.pageSize); + if (!cache[pkey]) { + cache[pkey] = {}; + } + cache[pkey][page] = slice; + + grid.$connector.doSelection(slice.filter((item) => item.selected)); + grid.$connector.doDeselection(slice.filter((item) => !item.selected && selectedKeys[item.key])); + + const updatedItems = updateGridCache(page, pkey); + if (updatedItems) { + itemsUpdated(updatedItems); + updateGridItemsInDomBasedOnCache(updatedItems); + } + } + }; + + const itemToCacheLocation = function (item) { + let parent = item.parentUniqueKey || root; + if (cache[parent]) { + for (let page in cache[parent]) { + for (let index in cache[parent][page]) { + if (grid.getItemId(cache[parent][page][index]) === grid.getItemId(item)) { + return { page: page, index: index, parentKey: parent }; + } + } + } + } + return null; + }; + + /** + * Updates the given items for a hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateHierarchicalData = function (updatedItems) { + let pagesToUpdate = []; + // locate and update the items in cache + // find pages that need updating + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + let key = cacheLocation.parentKey + ':' + cacheLocation.page; + if (!pagesToUpdate[key]) { + pagesToUpdate[key] = { + parentKey: cacheLocation.parentKey, + page: cacheLocation.page + }; + } + } + } + // IE11 doesn't work with the transpiled version of the forEach. + let keys = Object.keys(pagesToUpdate); + for (let i = 0; i < keys.length; i++) { + let pageToUpdate = pagesToUpdate[keys[i]]; + const affectedUpdatedItems = updateGridCache(pageToUpdate.page, pageToUpdate.parentKey); + if (affectedUpdatedItems) { + itemsUpdated(affectedUpdatedItems); + updateGridItemsInDomBasedOnCache(affectedUpdatedItems); + } + } + }; + + /** + * Updates the given items for a non-hierarchical grid. + * + * @param updatedItems the updated items array + */ + grid.$connector.updateFlatData = function (updatedItems) { + // update (flat) caches + for (let i = 0; i < updatedItems.length; i++) { + let cacheLocation = itemToCacheLocation(updatedItems[i]); + if (cacheLocation) { + // update connector cache + cache[cacheLocation.parentKey][cacheLocation.page][cacheLocation.index] = updatedItems[i]; + + // update grid's cache + const index = parseInt(cacheLocation.page) * grid.pageSize + parseInt(cacheLocation.index); + const { rootCache } = dataProviderController; + if (rootCache.items[index]) { + rootCache.items[index] = updatedItems[i]; + } + } + } + itemsUpdated(updatedItems); + + updateGridItemsInDomBasedOnCache(updatedItems); + }; + + grid.$connector.clearExpanded = function () { + grid.expandedItems = []; + ensureSubCacheQueue = []; + parentRequestQueue = []; + }; + + /** + * Ensures that the last requested page range does not include pages for data that has been cleared. + * The last requested range is used in `fetchPage` to skip requests to the server if the page range didn't + * change. However, if some pages of that range have been cleared by data communicator, we need to clear the + * range to ensure the pages get loaded again. This can happen for example when changing the requested range + * on the server (e.g. preload of items on scroll to index), which can cause data communicator to clear pages + * that the connector assumes are already loaded. + */ + const sanitizeLastRequestedRange = function () { + // Only relevant for the root cache + const range = lastRequestedRanges[root]; + // Range may not be set yet, or nothing was cleared + if (!range || !currentUpdateClearRange) { + return; + } + + // Determine all pages that were cleared + const numClearedPages = currentUpdateClearRange[1] - currentUpdateClearRange[0] + 1; + const clearedPages = Array.from({ length: numClearedPages }, (_, i) => currentUpdateClearRange[0] + i); + + // Remove pages that have been set in same update + if (currentUpdateSetRange) { + const [first, last] = currentUpdateSetRange; + for (let page = first; page <= last; page++) { + const index = clearedPages.indexOf(page); + if (index >= 0) { + clearedPages.splice(index, 1); + } + } + } + + // Clear the last requested range if it includes any of the cleared pages + if (clearedPages.some((page) => page >= range[0] && page <= range[1])) { + range[0] = -1; + range[1] = -1; + } + }; + + grid.$connector.clear = function (index, length, parentKey) { + let pkey = parentKey || root; + if (!cache[pkey] || Object.keys(cache[pkey]).length === 0) { + return; + } + if (index % grid.pageSize != 0) { + throw ( + 'Got cleared data for index ' + index + ' which is not aligned with the page size of ' + grid.pageSize + ); + } + + let firstPage = Math.floor(index / grid.pageSize); + let updatedPageCount = Math.ceil(length / grid.pageSize); + + // For root cache, remember the range of pages that were cleared during an update + if (pkey === root) { + currentUpdateClearRange = [firstPage, firstPage + updatedPageCount - 1]; + } + + for (let i = 0; i < updatedPageCount; i++) { + let page = firstPage + i; + let items = cache[pkey][page]; + grid.$connector.doDeselection(items.filter((item) => selectedKeys[item.key])); + items.forEach((item) => grid.closeItemDetails(item)); + delete cache[pkey][page]; + updateGridCache(page, parentKey); + updateGridItemsInDomBasedOnCache(items); + } + let cacheToClear = dataProviderController.rootCache; + if (parentKey) { + const parentItem = createEmptyItemFromKey(pkey); + cacheToClear = dataProviderController.getItemSubCache(parentItem); + } + const endIndex = index + updatedPageCount * grid.pageSize; + for (let itemIndex = index; itemIndex < endIndex; itemIndex++) { + delete cacheToClear.items[itemIndex]; + cacheToClear.removeSubCache(itemIndex); + } + updateGridFlatSize(); + }; + + grid.$connector.reset = function () { + grid.size = 0; + cache = {}; + dataProviderController.rootCache.items = []; + lastRequestedRanges = {}; + if (ensureSubCacheDebouncer) { + ensureSubCacheDebouncer.cancel(); + } + if (parentRequestDebouncer) { + parentRequestDebouncer.cancel(); + } + if (rootRequestDebouncer) { + rootRequestDebouncer.cancel(); + } + ensureSubCacheDebouncer = undefined; + parentRequestDebouncer = undefined; + ensureSubCacheQueue = []; + parentRequestQueue = []; + updateAllGridRowsInDomBasedOnCache(); + }; + + grid.$connector.updateSize = (newSize) => (grid.size = newSize); + + grid.$connector.updateUniqueItemIdPath = (path) => (grid.itemIdPath = path); + + grid.$connector.expandItems = function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.filter((item) => !grid._isExpanded(item)).forEach((item) => newExpandedItems.push(item)); + grid.expandedItems = newExpandedItems; + }; + + grid.$connector.collapseItems = function (items) { + let newExpandedItems = Array.from(grid.expandedItems); + items.forEach((item) => { + let index = grid._getItemIndexInArray(item, newExpandedItems); + if (index >= 0) { + newExpandedItems.splice(index, 1); + } + }); + grid.expandedItems = newExpandedItems; + items.forEach((item) => grid.$connector.removeFromQueue(item)); + }; + + grid.$connector.removeFromQueue = function (item) { + // The page callbacks for the given item are about to be discarded -> + // Resolve the callbacks with an empty array to not leave grid in loading state + const itemSubCache = dataProviderController.getItemSubCache(item); + Object.values(itemSubCache?.pendingRequests || {}).forEach((callback) => callback([])); + + const itemId = grid.getItemId(item); + ensureSubCacheQueue = ensureSubCacheQueue.filter((item) => item.itemkey !== itemId); + parentRequestQueue = parentRequestQueue.filter((item) => item.parentKey !== itemId); + }; + + grid.$connector.confirmParent = function (id, parentKey, levelSize) { + // Create connector cache if it doesn't exist + if (!cache[parentKey]) { + cache[parentKey] = {}; + } + // Update connector cache size + const hasSizeChanged = cache[parentKey].size !== levelSize; + cache[parentKey].size = levelSize; + if (levelSize === 0) { + cache[parentKey][0] = []; + } + + const parentItem = createEmptyItemFromKey(parentKey); + const parentItemSubCache = dataProviderController.getItemSubCache(parentItem); + if (parentItemSubCache) { + // If grid has pending requests for this parent, then resolve them + // and let grid update the flat size and re-render. + const { pendingRequests } = parentItemSubCache; + Object.entries(pendingRequests).forEach(([page, callback]) => { + let lastRequestedRange = lastRequestedRanges[parentKey] || [0, 0]; + + if ( + (cache[parentKey] && cache[parentKey][page]) || + page < lastRequestedRange[0] || + page > lastRequestedRange[1] + ) { + let items = cache[parentKey][page] || new Array(levelSize); + callback(items, levelSize); + } else if (callback && levelSize === 0) { + // The parent item has 0 child items => resolve the callback with an empty array + callback([], levelSize); + } + }); + + // If size has changed, and there are no pending requests, then + // manually update the size of the grid cache and update the effective + // size, effectively re-rendering the grid. This is necessary when + // individual items are refreshed on the server, in which case there + // is no loading request from the grid itself. In that case, if + // children were added or removed, the grid will not be aware of it + // unless we manually update the size. + if (hasSizeChanged && Object.keys(pendingRequests).length === 0) { + parentItemSubCache.size = levelSize; + updateGridFlatSize(); + } + } + + // Let server know we're done + grid.$server.confirmParentUpdate(id, parentKey); + }; + + grid.$connector.confirm = function (id) { + // We're done applying changes from this batch, resolve pending + // callbacks + const { pendingRequests } = dataProviderController.rootCache; + Object.entries(pendingRequests).forEach(([page, callback]) => { + const lastRequestedRange = lastRequestedRanges[root] || [0, 0]; + const lastAvailablePage = grid.size ? Math.ceil(grid.size / grid.pageSize) - 1 : 0; + // It's possible that the lastRequestedRange includes a page that's beyond lastAvailablePage if the grid's size got reduced during an ongoing data request + const lastRequestedRangeEnd = Math.min(lastRequestedRange[1], lastAvailablePage); + // Resolve if we have data or if we don't expect to get data + if (cache[root]?.[page]) { + // Cached data is available, resolve the callback + callback(cache[root][page]); + } else if (page < lastRequestedRange[0] || +page > lastRequestedRangeEnd) { + // No cached data, resolve the callback with an empty array + callback(new Array(grid.pageSize)); + // Request grid for content update + grid.requestContentUpdate(); + } else if (callback && grid.size === 0) { + // The grid has 0 items => resolve the callback with an empty array + callback([]); + } + }); + + // Sanitize last requested range for the root level + sanitizeLastRequestedRange(); + // Clear current update state + currentUpdateSetRange = null; + currentUpdateClearRange = null; + + // Let server know we're done + grid.$server.confirmUpdate(id); + }; + + grid.$connector.ensureHierarchy = function () { + for (let parentKey in cache) { + if (parentKey !== root) { + delete cache[parentKey]; + } + } + + lastRequestedRanges = {}; + + dataProviderController.rootCache.removeSubCaches(); + + updateAllGridRowsInDomBasedOnCache(); + }; + + grid.$connector.setSelectionMode = function (mode) { + if ((typeof mode === 'string' || mode instanceof String) && validSelectionModes.indexOf(mode) >= 0) { + selectionMode = mode; + selectedKeys = {}; + grid.selectedItems = []; + grid.$connector.updateMultiSelectable(); + } else { + throw 'Attempted to set an invalid selection mode'; + } + }; + + /* + * Manage aria-multiselectable attribute depending on the selection mode. + * see more: https://github.com/vaadin/web-components/issues/1536 + * or: https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable + * For selection mode SINGLE, set the aria-multiselectable attribute to false + */ + grid.$connector.updateMultiSelectable = function () { + if (!grid.$) { + return; + } + + if (selectionMode === validSelectionModes[0]) { + grid.$.table.setAttribute('aria-multiselectable', false); + // For selection mode NONE, remove the aria-multiselectable attribute + } else if (selectionMode === validSelectionModes[1]) { + grid.$.table.removeAttribute('aria-multiselectable'); + // For selection mode MULTI, set aria-multiselectable to true + } else { + grid.$.table.setAttribute('aria-multiselectable', true); + } + }; + + // Have the multi-selectable state updated on attach + grid._createPropertyObserver('isAttached', () => grid.$connector.updateMultiSelectable()); + + const singleTimeRenderer = (renderer) => { + return (root) => { + if (renderer) { + renderer(root); + renderer = null; + } + }; + }; + + grid.$connector.setHeaderRenderer = function (column, options) { + const { content, showSorter, sorterPath } = options; + + if (content === null) { + column.headerRenderer = null; + return; + } + + column.headerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Render sorter + let contentRoot = root; + if (showSorter) { + const sorter = document.createElement('vaadin-grid-sorter'); + sorter.setAttribute('path', sorterPath); + const ariaLabel = content instanceof Node ? content.textContent : content; + if (ariaLabel) { + sorter.setAttribute('aria-label', `Sort by ${ariaLabel}`); + } + root.appendChild(sorter); + + // Use sorter as content root + contentRoot = sorter; + } + // Add content + if (content instanceof Node) { + contentRoot.appendChild(content); + } else { + contentRoot.textContent = content; + } + }); + }; + + // This method is overridden to prevent the grid web component from + // automatically excluding columns from sorting when they get hidden. + // In Flow, it's the developer's responsibility to remove the column + // from the backend sort order when the column gets hidden. + grid._getActiveSorters = function() { + return this._sorters.filter((sorter) => sorter.direction); + } + + grid.__applySorters = () => { + const sorters = grid._mapSorters(); + const sortersChanged = JSON.stringify(grid._previousSorters) !== JSON.stringify(sorters); + + // Update the _previousSorters in vaadin-grid-sort-mixin so that the __applySorters + // method in the mixin will skip calling clearCache(). + // + // In Flow Grid's case, we never want to clear the cache eagerly when the sorter elements + // change due to one of the following reasons: + // + // 1. Sorted by user: The items in the new sort order need to be fetched from the server, + // and we want to avoid a heavy re-render before the updated items have actually been fetched. + // + // 2. Sorted programmatically on the server: The items in the new sort order have already + // been fetched and applied to the grid. The sorter element states are updated programmatically + // to reflect the new sort order, but there's no need to re-render the grid rows. + grid._previousSorters = sorters; + + // Call the original __applySorters method in vaadin-grid-sort-mixin + Grid.prototype.__applySorters.call(grid); + + if (sortersChanged && !sorterDirectionsSetFromServer) { + grid.$server.sortersChanged(sorters); + } + }; + + grid.$connector.setFooterRenderer = function (column, options) { + const { content } = options; + + if (content === null) { + column.footerRenderer = null; + return; + } + + column.footerRenderer = singleTimeRenderer((root) => { + // Clear previous contents + root.innerHTML = ''; + // Add content + if (content instanceof Node) { + root.appendChild(content); + } else { + root.textContent = content; + } + }); + }; + + grid.addEventListener( + 'vaadin-context-menu-before-open', + function (e) { + const { key, columnId } = e.detail; + grid.$server.updateContextMenuTargetItem(key, columnId); + } + ); + + grid.getContextMenuBeforeOpenDetail = function (event) { + // For `contextmenu` events, we need to access the source event, + // when using open on click we just use the click event itself + const sourceEvent = event.detail.sourceEvent || event; + const eventContext = grid.getEventContext(sourceEvent); + const key = eventContext.item?.key || ''; + const columnId = eventContext.column?.id || ''; + return { key, columnId }; + }; + + grid.preventContextMenu = function (event) { + const isLeftClick = event.type === 'click'; + const { column } = grid.getEventContext(event); + + return isLeftClick && column instanceof GridFlowSelectionColumn; + }; + + grid.addEventListener( + 'click', + (e) => _fireClickEvent(e, 'item-click') + ); + grid.addEventListener( + 'dblclick', + (e) => _fireClickEvent(e, 'item-double-click') + ); + + grid.addEventListener( + 'column-resize', + (e) => { + const cols = grid._getColumnsInOrder().filter((col) => !col.hidden); + + cols.forEach((col) => { + col.dispatchEvent(new CustomEvent('column-drag-resize')); + }); + + grid.dispatchEvent( + new CustomEvent('column-drag-resize', { + detail: { + resizedColumnKey: e.detail.resizedColumn._flowId + } + }) + ); + } + ); + + grid.addEventListener( + 'column-reorder', + (e) => { + const columns = grid._columnTree + .slice(0) + .pop() + .filter((c) => c._flowId) + .sort((b, a) => b._order - a._order) + .map((c) => c._flowId); + + grid.dispatchEvent( + new CustomEvent('column-reorder-all-columns', { + detail: { columns } + }) + ); + } + ); + + grid.addEventListener( + 'cell-focus', + (e) => { + const eventContext = grid.getEventContext(e); + const expectedSectionValues = ['header', 'body', 'footer']; + + if (expectedSectionValues.indexOf(eventContext.section) === -1) { + return; + } + + grid.dispatchEvent( + new CustomEvent('grid-cell-focus', { + detail: { + itemKey: eventContext.item ? eventContext.item.key : null, + + internalColumnId: eventContext.column ? eventContext.column._flowId : null, + + section: eventContext.section + } + }) + ); + } + ); + + function _fireClickEvent(event, eventName) { + // Click event was handled by the component inside grid, do nothing. + if (event.defaultPrevented) { + return; + } + + const path = event.composedPath(); + const idx = path.findIndex((node) => node.localName === 'td' || node.localName === 'th'); + const content = path.slice(0, idx); + + // Do not fire item click event if cell content contains focusable elements. + // Use this instead of event.target to detect cases like icon inside button. + // See https://github.com/vaadin/flow-components/issues/4065 + if (content.some((node) => isFocusable(node) || node instanceof HTMLLabelElement)) { + return; + } + + const eventContext = grid.getEventContext(event); + const section = eventContext.section; + + if (eventContext.item && section !== 'details') { + event.itemKey = eventContext.item.key; + // if you have a details-renderer, getEventContext().column is undefined + if (eventContext.column) { + event.internalColumnId = eventContext.column._flowId; + } + grid.dispatchEvent(new CustomEvent(eventName, { detail: event })); + } + } + + grid.cellClassNameGenerator = function (column, rowData) { + const style = rowData.item.style; + if (!style) { + return; + } + return (style.row || '') + ' ' + ((column && style[column._flowId]) || ''); + }; + + grid.cellPartNameGenerator = function (column, rowData) { + const part = rowData.item.part; + if (!part) { + return; + } + return (part.row || '') + ' ' + ((column && part[column._flowId]) || ''); + }; + + grid.dropFilter = (rowData) => rowData.item && !rowData.item.dropDisabled; + + grid.dragFilter = (rowData) => rowData.item && !rowData.item.dragDisabled; + + grid.addEventListener( + 'grid-dragstart', + (e) => { + if (grid._isSelected(e.detail.draggedItems[0])) { + // Dragging selected (possibly multiple) items + if (grid.__selectionDragData) { + Object.keys(grid.__selectionDragData).forEach((type) => { + e.detail.setDragData(type, grid.__selectionDragData[type]); + }); + } else { + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems.map((item) => item.dragData[type]).join('\n')); + }); + } + + if (grid.__selectionDraggedItemsCount > 1) { + e.detail.setDraggedItemsCount(grid.__selectionDraggedItemsCount); + } + } else { + // Dragging just one (non-selected) item + (grid.__dragDataTypes || []).forEach((type) => { + e.detail.setDragData(type, e.detail.draggedItems[0].dragData[type]); + }); + } + } + ); +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/index.d.ts b/kontor-spring/application/frontend/generated/jar-resources/index.d.ts new file mode 100644 index 0000000..d4e6e0d --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/index.d.ts @@ -0,0 +1 @@ +export * from './Flow'; diff --git a/kontor-spring/application/frontend/generated/jar-resources/index.js b/kontor-spring/application/frontend/generated/jar-resources/index.js new file mode 100644 index 0000000..6c14827 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/index.js @@ -0,0 +1,2 @@ +export * from './Flow'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/jar-resources/index.js.map b/kontor-spring/application/frontend/generated/jar-resources/index.js.map new file mode 100644 index 0000000..c662ab4 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/frontend/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC","sourcesContent":["export * from './Flow';\n"]} \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/jar-resources/lit-renderer.ts b/kontor-spring/application/frontend/generated/jar-resources/lit-renderer.ts new file mode 100644 index 0000000..7875f5c --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/lit-renderer.ts @@ -0,0 +1,112 @@ +/* eslint-disable no-restricted-syntax */ +/* eslint-disable max-params */ +import { html, render } from 'lit'; +import { live } from 'lit/directives/live.js'; + +type RenderRoot = HTMLElement & { __litRenderer?: Renderer; _$litPart$?: any }; + +type ItemModel = { item: any; index: number }; + +type Renderer = ((root: RenderRoot, rendererOwner: HTMLElement, model: ItemModel) => void) & { __rendererId?: string }; + +type Component = HTMLElement & { [key: string]: Renderer | undefined }; + +const _window = window as any; +_window.Vaadin = _window.Vaadin || {}; + +/** + * Assigns the component a renderer function which uses Lit to render + * the given template expression inside the render root element. + * + * @param component The host component to which the renderer runction is to be set + * @param rendererName The name of the renderer function + * @param templateExpression The content of the template literal passed to Lit for rendering. + * @param returnChannel A channel to the server. + * Calling it will end up invoking a handler in the server-side LitRenderer. + * @param clientCallables A list of function names that can be called from within the template literal. + * @param propertyNamespace LitRenderer-specific namespace for properties. + * Needed to avoid property name collisions between renderers. + */ +_window.Vaadin.setLitRenderer = ( + component: Component, + rendererName: string, + templateExpression: string, + returnChannel: (name: string, itemKey: string, args: any[]) => void, + clientCallables: string[], + propertyNamespace: string, + appId: string +) => { + // Dynamically created function that renders the templateExpression + // inside the given root element using Lit + const renderFunction = Function(` + "use strict"; + + const [render, html, live, appId, returnChannel] = arguments; + + return (root, model, itemKey) => { + const { item, index } = model; + ${clientCallables + .map((clientCallable) => { + // Map all the client-callables as inline functions so they can be accessed from the template literal + return ` + const ${clientCallable} = (...args) => { + if (itemKey !== undefined) { + returnChannel('${clientCallable}', itemKey, args[0] instanceof Event ? [] : [...args]); + } + }`; + }) + .join('')} + + render(html\`${templateExpression}\`, root) + } + `)(render, html, live, appId, returnChannel); + + const renderer: Renderer = (root, _, model) => { + const { item } = model; + // Clean up the root element of any existing content + // (and Lit's _$litPart$ property) from other renderers + // TODO: Remove once https://github.com/vaadin/web-components/issues/2235 is done + if (root.__litRenderer !== renderer) { + root.innerHTML = ''; + delete root._$litPart$; + root.__litRenderer = renderer; + } + + // Map a new item that only includes the properties defined by + // this specific LitRenderer instance. The renderer instance specific + // "propertyNamespace" prefix is stripped from the property name at this point: + // + // item: { key: "2", lr_3769df5394a74ef3_lastName: "Tyler"} + // -> + // mappedItem: { lastName: "Tyler" } + const mappedItem: { [key: string]: any } = {}; + for (const key in item) { + if (key.startsWith(propertyNamespace)) { + mappedItem[key.replace(propertyNamespace, '')] = item[key]; + } + } + + renderFunction(root, { ...model, item: mappedItem }, item.key); + }; + + renderer.__rendererId = propertyNamespace; + component[rendererName] = renderer; +}; + +/** + * Removes the renderer function with the given name from the component + * if the propertyNamespace matches the renderer's id. + * + * @param component The host component whose renderer function is to be removed + * @param rendererName The name of the renderer function + * @param rendererId The rendererId of the function to be removed + */ +_window.Vaadin.unsetLitRenderer = (component: Component, rendererName: string, rendererId: string) => { + // The check for __rendererId property is necessary since the renderer function + // may get overridden by another renderer, for example, by one coming from + // vaadin-template-renderer. We don't want LitRenderer registration cleanup to + // unintentionally remove the new renderer. + if (component[rendererName]?.__rendererId === rendererId) { + component[rendererName] = undefined; + } +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/menubarConnector.js b/kontor-spring/application/frontend/generated/jar-resources/menubarConnector.js new file mode 100644 index 0000000..30aa81a --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/menubarConnector.js @@ -0,0 +1,122 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +import './contextMenuConnector.js'; + + /** + * Initializes the connector for a menu bar element. + * + * @param {HTMLElement} menubar + * @param {string} appId + */ + function initLazy(menubar, appId) { + if (menubar.$connector) { + return; + } + + const observer = new MutationObserver((records) => { + const hasChangedAttributes = records.some((entry) => { + const oldValue = entry.oldValue; + const newValue = entry.target.getAttribute(entry.attributeName); + return oldValue !== newValue; + }); + + if (hasChangedAttributes) { + menubar.$connector.generateItems(); + } + }); + + menubar.$connector = { + /** + * Generates and assigns the items to the menu bar. + * + * When the method is called without providing a node id, + * the previously generated items tree will be used. + * That can be useful if you only want to sync the disabled and hidden properties of root items. + * + * @param {number | undefined} nodeId + */ + generateItems(nodeId) { + if (!menubar.shadowRoot) { + // workaround for https://github.com/vaadin/flow/issues/5722 + setTimeout(() => menubar.$connector.generateItems(nodeId)); + return; + } + + if (!menubar._container) { + // Menu-bar defers first buttons render to avoid re-layout + // See https://github.com/vaadin/web-components/issues/7271 + queueMicrotask(() => menubar.$connector.generateItems(nodeId)); + return; + } + + if (nodeId) { + menubar.__generatedItems = window.Vaadin.Flow.contextMenuConnector.generateItemsTree(appId, nodeId); + } + + let items = menubar.__generatedItems || []; + + items.forEach((item) => { + // Propagate disabled state from items to parent buttons + item.disabled = item.component.disabled; + + // Saving item to component because `_item` can be reassigned to a new value + // when the component goes to the overflow menu + item.component._rootItem = item; + }); + + // Observe for hidden and disabled attributes in case they are changed by Flow. + // When a change occurs, the observer will re-generate items on top of the existing tree + // to sync the new attribute values with the corresponding properties in the items array. + items.forEach((item) => { + observer.observe(item.component, { + attributeFilter: ['hidden', 'disabled'], + attributeOldValue: true + }); + }); + + // Remove hidden items entirely from the array. Just hiding them + // could cause the overflow button to be rendered without items. + // + // The items-prop needs to be set even when all items are visible + // to update the disabled state and re-render buttons. + items = items.filter((item) => !item.component.hidden); + + menubar.items = items; + + // Propagate click events from the menu buttons to the item components + menubar._buttons.forEach((button) => { + if (button.item && button.item.component) { + button.addEventListener('click', (e) => { + if (e.composedPath().indexOf(button.item.component) === -1) { + button.item.component.click(); + e.stopPropagation(); + } + }); + } + }); + } + }; +} + + function setClassName(component) { + const item = component._rootItem || component._item; + + if (item) { + item.className = component.className; + } + } + +window.Vaadin.Flow.menubarConnector = { initLazy, setClassName }; diff --git a/kontor-spring/application/frontend/generated/jar-resources/messageListConnector.js b/kontor-spring/application/frontend/generated/jar-resources/messageListConnector.js new file mode 100644 index 0000000..260b1af --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/messageListConnector.js @@ -0,0 +1,33 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +window.Vaadin.Flow.messageListConnector = { + setItems(list, items, locale) { + const formatter = new Intl.DateTimeFormat(locale, { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: 'numeric' + }); + list.items = items.map((item) => + item.time + ? Object.assign(item, { + time: formatter.format(new Date(item.time)) + }) + : item + ); + } +}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/selectConnector.js b/kontor-spring/application/frontend/generated/jar-resources/selectConnector.js new file mode 100644 index 0000000..1f40564 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/selectConnector.js @@ -0,0 +1,19 @@ +window.Vaadin.Flow.selectConnector = {} +window.Vaadin.Flow.selectConnector.initLazy = (select) => { + // do not init this connector twice for the given select + if (select.$connector) { + return; + } + + select.$connector = {}; + + select.renderer = (root) => { + const listBox = select.querySelector('vaadin-select-list-box'); + if (listBox) { + if (root.firstChild) { + root.removeChild(root.firstChild); + } + root.appendChild(listBox); + } + }; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/theme-util.js b/kontor-spring/application/frontend/generated/jar-resources/theme-util.js new file mode 100644 index 0000000..31506c1 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/theme-util.js @@ -0,0 +1,175 @@ +import stripCssComments from 'strip-css-comments'; + +// Safari 15 - 16.3, polyfilled +const polyfilledSafari = CSSStyleSheet.toString().includes('document.createElement'); + +const createLinkReferences = (css, target) => { + // Unresolved urls are written as '@import url(text);' or '@import "text";' to the css + // media query can be present on @media tag or on @import directive after url + // Note that with Vite production build there is no space between @import and "text" + // [0] is the full match + // [1] matches the media query + // [2] matches the url + // [3] matches the quote char surrounding in '@import "..."' + // [4] matches the url in '@import "..."' + // [5] matches media query on @import statement + const importMatcher = + /(?:@media\s(.+?))?(?:\s{)?\@import\s*(?:url\(\s*['"]?(.+?)['"]?\s*\)|(["'])((?:\\.|[^\\])*?)\3)([^;]*);(?:})?/g; + + // Only cleanup if comment exist + if (/\/\*(.|[\r\n])*?\*\//gm.exec(css) != null) { + // clean up comments + css = stripCssComments(css); + } + + var match; + var styleCss = css; + + // For each external url import add a link reference + while ((match = importMatcher.exec(css)) !== null) { + styleCss = styleCss.replace(match[0], ''); + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = match[2] || match[4]; + const media = match[1] || match[5]; + if (media) { + link.media = media; + } + // For target document append to head else append to target + if (target === document) { + document.head.appendChild(link); + } else { + target.appendChild(link); + } + } + return styleCss; +}; + +const addAdoptedStyleSafariPolyfill = (sheet, target, first) => { + if (first) { + target.adoptedStyleSheets = [sheet, ...target.adoptedStyleSheets]; + } else { + target.adoptedStyleSheets = [...target.adoptedStyleSheets, sheet]; + } + return () => { + target.adoptedStyleSheets = target.adoptedStyleSheets.filter((ss) => ss !== sheet); + }; +}; + +const addAdoptedStyle = (cssText, target, first) => { + const sheet = new CSSStyleSheet(); + sheet.replaceSync(cssText); + if (polyfilledSafari) { + return addAdoptedStyleSafariPolyfill(sheet, target, first); + } + if (first) { + target.adoptedStyleSheets.splice(0, 0, sheet); + } else { + target.adoptedStyleSheets.push(sheet); + } + return () => { + target.adoptedStyleSheets.splice(target.adoptedStyleSheets.indexOf(sheet), 1); + }; +}; + +const addStyleTag = (cssText, referenceComment) => { + const styleTag = document.createElement('style'); + styleTag.type = 'text/css'; + styleTag.textContent = cssText; + + let beforeThis = undefined; + if (referenceComment) { + const comments = Array.from(document.head.childNodes).filter(elem => elem.nodeType === Node.COMMENT_NODE); + const container = comments.find(comment => comment.data.trim() === referenceComment); + if (container) { + beforeThis = container; + } + } + document.head.insertBefore(styleTag, beforeThis); + return () => { + styleTag.remove(); + }; +}; + +// target: Document | ShadowRoot +export const injectGlobalCss = (css, referenceComment, target, first) => { + if (target === document) { + const hash = getHash(css); + if (window.Vaadin.theme.injectedGlobalCss.indexOf(hash) !== -1) { + return; + } + window.Vaadin.theme.injectedGlobalCss.push(hash); + } + const cssText = createLinkReferences(css, target); + + // We avoid mixing style tags and adoptedStyleSheets to make override order clear + if (target === document) { + return addStyleTag(cssText, referenceComment); + } + + return addAdoptedStyle(cssText, target, first); +}; + +window.Vaadin = window.Vaadin || {}; +window.Vaadin.theme = window.Vaadin.theme || {}; +window.Vaadin.theme.injectedGlobalCss = []; + +const webcomponentGlobalCss = { + css: [], + importers: [] +}; + +export const injectGlobalWebcomponentCss = (css) => { + webcomponentGlobalCss.css.push(css); + webcomponentGlobalCss.importers.forEach(registrar => { + registrar(css); + }); +}; + +export const webcomponentGlobalCssInjector = (registrar) => { + const registeredCss = []; + const wrapper = (css) => { + const hash = getHash(css); + if (!registeredCss.includes(hash)) { + registeredCss.push(hash); + registrar(css); + } + }; + webcomponentGlobalCss.importers.push(wrapper); + webcomponentGlobalCss.css.forEach(wrapper); +}; + +/** + * Calculate a 32 bit FNV-1a hash + * Found here: https://gist.github.com/vaiorabbit/5657561 + * Ref.: http://isthe.com/chongo/tech/comp/fnv/ + * + * @param {string} str the input value + * @returns {string} 32 bit (as 8 byte hex string) + */ +function hashFnv32a(str) { + /*jshint bitwise:false */ + let i, + l, + hval = 0x811c9dc5; + + for (i = 0, l = str.length; i < l; i++) { + hval ^= str.charCodeAt(i); + hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24); + } + + // Convert to 8 digit hex string + return ('0000000' + (hval >>> 0).toString(16)).substr(-8); +} + +/** + * Calculate a 64 bit hash for the given input. + * Double hash is used to significantly lower the collision probability. + * + * @param {string} input value to get hash for + * @returns {string} 64 bit (as 16 byte hex string) + */ +function getHash(input) { + let h1 = hashFnv32a(input); // returns 32 bit (as 8 byte hex string) + return h1 + hashFnv32a(h1 + input); +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/tooltip.ts b/kontor-spring/application/frontend/generated/jar-resources/tooltip.ts new file mode 100644 index 0000000..351527c --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/tooltip.ts @@ -0,0 +1,23 @@ +import { Tooltip } from '@vaadin/tooltip/src/vaadin-tooltip.js'; + +const _window = window as any; +_window.Vaadin ||= {}; +_window.Vaadin.Flow ||= {}; +_window.Vaadin.Flow.tooltip ||= {}; + +Object.assign(_window.Vaadin.Flow.tooltip, { + setDefaultHideDelay: (hideDelay: number) => Tooltip.setDefaultHideDelay(hideDelay), + setDefaultFocusDelay: (focusDelay: number) => Tooltip.setDefaultFocusDelay(focusDelay), + setDefaultHoverDelay: (hoverDelay: number) => Tooltip.setDefaultHoverDelay(hoverDelay) +}); + +const { defaultHideDelay, defaultFocusDelay, defaultHoverDelay } = _window.Vaadin.Flow.tooltip; +if (defaultHideDelay) { + Tooltip.setDefaultHideDelay(defaultHideDelay); +} +if (defaultFocusDelay) { + Tooltip.setDefaultFocusDelay(defaultFocusDelay); +} +if (defaultHoverDelay) { + Tooltip.setDefaultHoverDelay(defaultHoverDelay); +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-big-decimal-field.js b/kontor-spring/application/frontend/generated/jar-resources/vaadin-big-decimal-field.js new file mode 100644 index 0000000..f57bab7 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-big-decimal-field.js @@ -0,0 +1,71 @@ +/* + * Copyright 2000-2024 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +(function () { + let memoizedTemplate; + + customElements.whenDefined('vaadin-text-field').then(() => { + class BigDecimalFieldElement extends customElements.get('vaadin-text-field') { + static get template() { + if (!memoizedTemplate) { + memoizedTemplate = super.template.cloneNode(true); + memoizedTemplate.innerHTML += ``; + } + return memoizedTemplate; + } + + static get is() { + return 'vaadin-big-decimal-field'; + } + + static get properties() { + return { + _decimalSeparator: { + type: String, + value: '.', + observer: '__decimalSeparatorChanged' + } + }; + } + + ready() { + super.ready(); + this.inputElement.setAttribute('inputmode', 'decimal'); + } + + __decimalSeparatorChanged(separator, oldSeparator) { + this.allowedCharPattern = '[-+\\d' + separator + ']'; + + if (this.value && oldSeparator) { + this.value = this.value.split(oldSeparator).join(separator); + } + } + } + + customElements.define(BigDecimalFieldElement.is, BigDecimalFieldElement); + }); +})(); diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts new file mode 100644 index 0000000..ffcbc11 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/License.d.ts @@ -0,0 +1,16 @@ +import { ServerMessage } from "./vaadin-dev-tools"; +export interface Product { + name: string; + version: string; +} +export interface ProductAndMessage { + message: string; + messageHtml?: string; + product: Product; +} +export declare const findAll: (element: Element | ShadowRoot | Document, tags: string[]) => Element[]; +export declare const licenseCheckOk: (data: Product) => void; +export declare const licenseCheckFailed: (data: ProductAndMessage) => void; +export declare const licenseCheckNoKey: (data: ProductAndMessage) => void; +export declare const handleLicenseMessage: (message: ServerMessage) => boolean; +export declare const licenseInit: () => void; diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts new file mode 100644 index 0000000..805a724 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/connection.d.ts @@ -0,0 +1,15 @@ +export declare enum ConnectionStatus { + ACTIVE = "active", + INACTIVE = "inactive", + UNAVAILABLE = "unavailable", + ERROR = "error" +} +export declare abstract class Connection { + static HEARTBEAT_INTERVAL: number; + status: ConnectionStatus; + onHandshake(): void; + onConnectionError(_: string): void; + onStatusChange(_: ConnectionStatus): void; + setActive(yes: boolean): void; + setStatus(status: ConnectionStatus): void; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts new file mode 100644 index 0000000..6d35532 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/live-reload-connection.d.ts @@ -0,0 +1,8 @@ +import { Connection } from './connection.js'; +export declare class LiveReloadConnection extends Connection { + webSocket?: WebSocket; + constructor(url: string); + onReload(): void; + handleMessage(msg: any): void; + handleError(msg: any): void; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts new file mode 100644 index 0000000..35ef46f --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.d.ts @@ -0,0 +1,121 @@ +import { LitElement } from 'lit'; +import { Product } from './License'; +import { ConnectionStatus } from './connection'; +/** + * Plugin API for the dev tools window. + */ +export interface DevToolsInterface { + send(command: string, data: any): void; +} +export interface MessageHandler { + handleMessage(message: ServerMessage): boolean; +} +export interface ServerMessage { + /** + * The command + */ + command: string; + /** + * the data for the command + */ + data: any; +} +/** + * To create and register a plugin, use e.g. + * @example + * export class MyTab extends LitElement implements MessageHandler { + * render() { + * return html`
Here I am
`; + * } + * } + * customElements.define('my-tab', MyTab); + * + * const plugin: DevToolsPlugin = { + * init: function (devToolsInterface: DevToolsInterface): void { + * devToolsInterface.addTab('Tab title', 'my-tab') + * } + * }; + * + * (window as any).Vaadin.devToolsPlugins.push(plugin); + */ +export interface DevToolsPlugin { + /** + * Called once to initialize the plugin. + * + * @param devToolsInterface provides methods to interact with the dev tools + */ + init(devToolsInterface: DevToolsInterface): void; +} +export declare enum MessageType { + LOG = "log", + INFORMATION = "information", + WARNING = "warning", + ERROR = "error" +} +interface Message { + id: number; + type: MessageType; + message: string; + details?: string; + link?: string; + persistentId?: string; + dontShowAgain: boolean; + dontShowAgainMessage?: string; + deleted: boolean; +} +type DevToolsConf = { + enable: boolean; + url: string; + backend?: string; + liveReloadPort: number; + token?: string; +}; +export declare class VaadinDevTools extends LitElement { + unhandledMessages: ServerMessage[]; + conf: DevToolsConf; + static get styles(): import("lit").CSSResult[]; + static DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE: string; + static ACTIVE_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_KEY_IN_SESSION_STORAGE: string; + static TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE: string; + static AUTO_DEMOTE_NOTIFICATION_DELAY: number; + static HOTSWAP_AGENT: string; + static JREBEL: string; + static SPRING_BOOT_DEVTOOLS: string; + static BACKEND_DISPLAY_NAME: Record; + static get isActive(): boolean; + static notificationDismissed(persistentId: string): boolean; + splashMessage?: string; + notifications: Message[]; + frontendStatus: ConnectionStatus; + javaStatus: ConnectionStatus; + private root; + componentPickActive: boolean; + private javaConnection?; + private frontendConnection?; + private nextMessageId; + private disableEventListener?; + private transitionDuration; + elementTelemetry(): void; + openWebSocketConnection(): void; + tabHandleMessage(tabElement: HTMLElement, message: ServerMessage): boolean; + handleFrontendMessage(message: ServerMessage): void; + getDedicatedWebSocketUrl(): string | undefined; + getSpringBootWebSocketUrl(location: any): string; + connectedCallback(): void; + initPlugin(plugin: DevToolsPlugin): Promise; + format(o: any): string; + disconnectedCallback(): void; + showSplashMessage(msg: string | undefined): void; + demoteSplashMessage(): void; + checkLicense(productInfo: Product): void; + showNotification(type: MessageType, message: string, details?: string, link?: string, persistentId?: string, dontShowAgainMessage?: string): void; + dismissNotification(id: number): void; + findNotificationIndex(id: number): number; + toggleDontShowAgain(id: number): void; + setActive(yes: boolean): void; + renderMessage(messageObject: Message): import("lit-html").TemplateResult<1>; + render(): import("lit-html").TemplateResult<1>; + setJavaLiveReloadActive(active: boolean): void; +} +export {}; diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js new file mode 100644 index 0000000..8445aa7 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/vaadin-dev-tools.js @@ -0,0 +1,507 @@ +import{LitElement as O,css as L,html as v,nothing as $}from"lit";import{property as w,query as D,state as M,customElement as V}from"lit/decorators.js";function m(s,e,o,t){var n=arguments.length,i=n<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,o):t,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(s,e,o,t);else for(var h=s.length-1;h>=0;h--)(d=s[h])&&(i=(n<3?d(i):n>3?d(e,o,i):d(e,o))||i);return n>3&&i&&Object.defineProperty(e,o,i),i}const E=1e3,I=(s,e)=>{const o=Array.from(s.querySelectorAll(e.join(", "))),t=Array.from(s.querySelectorAll("*")).filter(n=>n.shadowRoot).flatMap(n=>I(n.shadowRoot,e));return[...o,...t]};let A=!1;const u=(s,e)=>{A||(window.addEventListener("message",n=>{n.data==="validate-license"&&window.location.reload()},!1),A=!0);const o=s._overlayElement;if(o){if(o.shadowRoot){const n=o.shadowRoot.querySelector("slot:not([name])");if(n&&n.assignedElements().length>0){u(n.assignedElements()[0],e);return}}u(o,e);return}const t=e.messageHtml?e.messageHtml:`${e.message}

Component: ${e.product.name} ${e.product.version}

`.replace(/https:([^ ]*)/g,"https:$1");s.isConnected&&(s.outerHTML=`
${t}
`)},f={},T={},g={},N={},c=s=>`${s.name}_${s.version}`,x=s=>{const{cvdlName:e,version:o}=s.constructor,t={name:e,version:o},n=s.tagName.toLowerCase();f[e]=f[e]??[],f[e].push(n);const i=g[c(t)];i&&setTimeout(()=>u(s,i),E),g[c(t)]||N[c(t)]||T[c(t)]||(T[c(t)]=!0,window.Vaadin.devTools.checkLicense(t))},G=s=>{N[c(s)]=!0,console.debug("License check ok for",s)},R=s=>{const e=s.product.name;g[c(s.product)]=s,console.error("License check failed for",e);const o=f[e];(o==null?void 0:o.length)>0&&I(document,o).forEach(t=>{setTimeout(()=>u(t,g[c(s.product)]),E)})},U=s=>{const e=s.message,o=s.product.name;s.messageHtml=`No license found. Go here to start a trial or retrieve your license.`,g[c(s.product)]=s,console.error("No license found when checking",o);const t=f[o];(t==null?void 0:t.length)>0&&I(document,t).forEach(n=>{setTimeout(()=>u(n,g[c(s.product)]),E)})},P=s=>s.command==="license-check-ok"?(G(s.data),!0):s.command==="license-check-failed"?(R(s.data),!0):s.command==="license-check-nokey"?(U(s.data),!0):!1,B=()=>{window.Vaadin.devTools.createdCvdlElements.forEach(s=>{x(s)}),window.Vaadin.devTools.createdCvdlElements={push:s=>{x(s)}}};var a;(function(s){s.ACTIVE="active",s.INACTIVE="inactive",s.UNAVAILABLE="unavailable",s.ERROR="error"})(a||(a={}));class p{constructor(){this.status=a.UNAVAILABLE}onHandshake(){}onConnectionError(e){}onStatusChange(e){}setActive(e){!e&&this.status===a.ACTIVE?this.setStatus(a.INACTIVE):e&&this.status===a.INACTIVE&&this.setStatus(a.ACTIVE)}setStatus(e){this.status!==e&&(this.status=e,this.onStatusChange(e))}}p.HEARTBEAT_INTERVAL=18e4;class F extends p{constructor(e){super(),this.webSocket=new WebSocket(e),this.webSocket.onmessage=o=>this.handleMessage(o),this.webSocket.onerror=o=>this.handleError(o),this.webSocket.onclose=o=>{this.status!==a.ERROR&&this.setStatus(a.UNAVAILABLE),this.webSocket=void 0},setInterval(()=>{this.webSocket&&self.status!==a.ERROR&&this.status!==a.UNAVAILABLE&&this.webSocket.send("")},p.HEARTBEAT_INTERVAL)}onReload(){}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(t){this.handleError(`[${t.name}: ${t.message}`);return}o.command==="hello"?(this.setStatus(a.ACTIVE),this.onHandshake()):o.command==="reload"?this.status===a.ACTIVE&&this.onReload():this.handleError(`Unknown message from the livereload server: ${e}`)}handleError(e){console.error(e),this.setStatus(a.ERROR),e instanceof Event&&this.webSocket?this.onConnectionError(`Error in WebSocket connection to ${this.webSocket.url}`):this.onConnectionError(e)}}const _=16384;class C extends p{constructor(e){if(super(),this.canSend=!1,!e)return;const o={transport:"websocket",fallbackTransport:"websocket",url:e,contentType:"application/json; charset=UTF-8",reconnectInterval:5e3,timeout:-1,maxReconnectOnClose:1e7,trackMessageLength:!0,enableProtocol:!0,handleOnlineOffline:!1,executeCallbackBeforeReconnect:!0,messageDelimiter:"|",onMessage:t=>{const n={data:t.responseBody};this.handleMessage(n)},onError:t=>{this.canSend=!1,this.handleError(t)},onOpen:()=>{this.canSend=!0},onClose:()=>{this.canSend=!1},onClientTimeout:()=>{this.canSend=!1},onReconnect:()=>{this.canSend=!1},onReopen:()=>{this.canSend=!0}};H().then(t=>{this.socket=t.subscribe(o)})}onReload(){}onUpdate(e,o){}onMessage(e){}handleMessage(e){let o;try{o=JSON.parse(e.data)}catch(t){this.handleError(`[${t.name}: ${t.message}`);return}o.command==="hello"?(this.setStatus(a.ACTIVE),this.onHandshake()):o.command==="reload"?this.status===a.ACTIVE&&this.onReload():o.command==="update"?this.status===a.ACTIVE&&this.onUpdate(o.path,o.content):this.onMessage(o)}handleError(e){console.error(e),this.setStatus(a.ERROR),this.onConnectionError(e)}send(e,o){if(!this.socket||!this.canSend){y(()=>this.socket&&this.canSend,d=>this.send(e,o));return}const t=JSON.stringify({command:e,data:o});let i=t.length+"|"+t;for(;i.length;)this.socket.push(i.substring(0,_)),i=i.substring(_)}}C.HEARTBEAT_INTERVAL=18e4;function y(s,e){const o=s();o?e(o):setTimeout(()=>y(s,e),50)}function H(){return new Promise((s,e)=>{y(()=>{var o;return(o=window==null?void 0:window.vaadinPush)==null?void 0:o.atmosphere},s)})}var r,b;(function(s){s.LOG="log",s.INFORMATION="information",s.WARNING="warning",s.ERROR="error"})(b||(b={}));let l=r=class extends O{constructor(){super(...arguments),this.unhandledMessages=[],this.conf={enable:!1,url:"",liveReloadPort:-1},this.notifications=[],this.frontendStatus=a.UNAVAILABLE,this.javaStatus=a.UNAVAILABLE,this.componentPickActive=!1,this.nextMessageId=1,this.transitionDuration=0}static get styles(){return[L` + :host { + --dev-tools-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, + 'Helvetica Neue', sans-serif; + --dev-tools-font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', + monospace; + + --dev-tools-font-size: 0.8125rem; + --dev-tools-font-size-small: 0.75rem; + + --dev-tools-text-color: rgba(255, 255, 255, 0.8); + --dev-tools-text-color-secondary: rgba(255, 255, 255, 0.65); + --dev-tools-text-color-emphasis: rgba(255, 255, 255, 0.95); + --dev-tools-text-color-active: rgba(255, 255, 255, 1); + + --dev-tools-background-color-inactive: rgba(45, 45, 45, 0.25); + --dev-tools-background-color-active: rgba(45, 45, 45, 0.98); + --dev-tools-background-color-active-blurred: rgba(45, 45, 45, 0.85); + + --dev-tools-border-radius: 0.5rem; + --dev-tools-box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 12px -2px rgba(0, 0, 0, 0.4); + + --dev-tools-blue-hsl: 206, 100%, 70%; + --dev-tools-blue-color: hsl(var(--dev-tools-blue-hsl)); + --dev-tools-green-hsl: 145, 80%, 42%; + --dev-tools-green-color: hsl(var(--dev-tools-green-hsl)); + --dev-tools-grey-hsl: 0, 0%, 50%; + --dev-tools-grey-color: hsl(var(--dev-tools-grey-hsl)); + --dev-tools-yellow-hsl: 38, 98%, 64%; + --dev-tools-yellow-color: hsl(var(--dev-tools-yellow-hsl)); + --dev-tools-red-hsl: 355, 100%, 68%; + --dev-tools-red-color: hsl(var(--dev-tools-red-hsl)); + + /* Needs to be in ms, used in JavaScript as well */ + --dev-tools-transition-duration: 180ms; + + all: initial; + + direction: ltr; + cursor: default; + font: normal 400 var(--dev-tools-font-size) / 1.125rem var(--dev-tools-font-family); + color: var(--dev-tools-text-color); + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + color-scheme: dark; + + position: fixed; + z-index: 20000; + pointer-events: none; + bottom: 0; + right: 0; + width: 100%; + height: 100%; + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + } + + .dev-tools { + pointer-events: auto; + display: flex; + align-items: center; + position: fixed; + z-index: inherit; + right: 0.5rem; + bottom: 0.5rem; + min-width: 1.75rem; + height: 1.75rem; + max-width: 1.75rem; + border-radius: 0.5rem; + padding: 0.375rem; + box-sizing: border-box; + background-color: var(--dev-tools-background-color-inactive); + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + white-space: nowrap; + line-height: 1rem; + } + + .dev-tools:hover, + .dev-tools.active { + background-color: var(--dev-tools-background-color-active); + box-shadow: var(--dev-tools-box-shadow); + } + + .dev-tools.active { + max-width: calc(100% - 1rem); + } + + .dev-tools .status-description { + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0.25rem; + } + + .dev-tools.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.15); + animation: bounce 0.5s; + animation-iteration-count: 2; + } + + .window.hidden { + opacity: 0; + transform: scale(0); + position: absolute; + } + + .window.visible { + transform: none; + opacity: 1; + pointer-events: auto; + } + + .window.visible ~ .dev-tools { + opacity: 0; + pointer-events: none; + } + + .window.visible ~ .dev-tools .dev-tools-icon, + .window.visible ~ .dev-tools .status-blip { + transition: none; + opacity: 0; + } + + .window { + border-radius: var(--dev-tools-border-radius); + overflow: auto; + margin: 0.5rem; + min-width: 30rem; + max-width: calc(100% - 1rem); + max-height: calc(100vh - 1rem); + flex-shrink: 1; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + display: flex; + flex-direction: column; + box-shadow: var(--dev-tools-box-shadow); + outline: none; + } + + .window-toolbar { + display: flex; + flex: none; + align-items: center; + padding: 0.375rem; + white-space: nowrap; + order: 1; + background-color: rgba(0, 0, 0, 0.2); + gap: 0.5rem; + } + + .ahreflike { + font-weight: 500; + color: var(--dev-tools-text-color-secondary); + text-decoration: underline; + cursor: pointer; + } + + .ahreflike:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .button { + all: initial; + font-family: inherit; + font-size: var(--dev-tools-font-size-small); + line-height: 1; + white-space: nowrap; + background-color: rgba(0, 0, 0, 0.2); + color: inherit; + font-weight: 600; + padding: 0.25rem 0.375rem; + border-radius: 0.25rem; + } + + .button:focus, + .button:hover { + color: var(--dev-tools-text-color-emphasis); + } + + .message.information { + --dev-tools-notification-color: var(--dev-tools-blue-color); + } + + .message.warning { + --dev-tools-notification-color: var(--dev-tools-yellow-color); + } + + .message.error { + --dev-tools-notification-color: var(--dev-tools-red-color); + } + + .message { + display: flex; + padding: 0.1875rem 0.75rem 0.1875rem 2rem; + background-clip: padding-box; + } + + .message.log { + padding-left: 0.75rem; + } + + .message-content { + margin-right: 0.5rem; + -webkit-user-select: text; + -moz-user-select: text; + user-select: text; + } + + .message-heading { + position: relative; + display: flex; + align-items: center; + margin: 0.125rem 0; + } + + .message.log { + color: var(--dev-tools-text-color-secondary); + } + + .message:not(.log) .message-heading { + font-weight: 500; + } + + .message.has-details .message-heading { + color: var(--dev-tools-text-color-emphasis); + font-weight: 600; + } + + .message-heading::before { + position: absolute; + margin-left: -1.5rem; + display: inline-block; + text-align: center; + font-size: 0.875em; + font-weight: 600; + line-height: calc(1.25em - 2px); + width: 14px; + height: 14px; + box-sizing: border-box; + border: 1px solid transparent; + border-radius: 50%; + } + + .message.information .message-heading::before { + content: 'i'; + border-color: currentColor; + color: var(--dev-tools-notification-color); + } + + .message.warning .message-heading::before, + .message.error .message-heading::before { + content: '!'; + color: var(--dev-tools-background-color-active); + background-color: var(--dev-tools-notification-color); + } + + .features-tray { + padding: 0.75rem; + flex: auto; + overflow: auto; + animation: fade-in var(--dev-tools-transition-duration) ease-in; + user-select: text; + } + + .features-tray p { + margin-top: 0; + color: var(--dev-tools-text-color-secondary); + } + + .features-tray .feature { + display: flex; + align-items: center; + gap: 1rem; + padding-bottom: 0.5em; + } + + .message .message-details { + font-weight: 400; + color: var(--dev-tools-text-color-secondary); + margin: 0.25rem 0; + } + + .message .message-details[hidden] { + display: none; + } + + .message .message-details p { + display: inline; + margin: 0; + margin-right: 0.375em; + word-break: break-word; + } + + .message .persist { + color: var(--dev-tools-text-color-secondary); + white-space: nowrap; + margin: 0.375rem 0; + display: flex; + align-items: center; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + } + + .message .persist::before { + content: ''; + width: 1em; + height: 1em; + border-radius: 0.2em; + margin-right: 0.375em; + background-color: rgba(255, 255, 255, 0.3); + } + + .message .persist:hover::before { + background-color: rgba(255, 255, 255, 0.4); + } + + .message .persist.on::before { + background-color: rgba(255, 255, 255, 0.9); + } + + .message .persist.on::after { + content: ''; + order: -1; + position: absolute; + width: 0.75em; + height: 0.25em; + border: 2px solid var(--dev-tools-background-color-active); + border-width: 0 0 2px 2px; + transform: translate(0.05em, -0.05em) rotate(-45deg) scale(0.8, 0.9); + } + + .message .dismiss-message { + font-weight: 600; + align-self: stretch; + display: flex; + align-items: center; + padding: 0 0.25rem; + margin-left: 0.5rem; + color: var(--dev-tools-text-color-secondary); + } + + .message .dismiss-message:hover { + color: var(--dev-tools-text-color); + } + + .notification-tray { + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + margin: 0.5rem; + flex: none; + } + + .window.hidden + .notification-tray { + margin-bottom: 3rem; + } + + .notification-tray .message { + pointer-events: auto; + background-color: var(--dev-tools-background-color-active); + color: var(--dev-tools-text-color); + max-width: 30rem; + box-sizing: border-box; + border-radius: var(--dev-tools-border-radius); + margin-top: 0.5rem; + transition: var(--dev-tools-transition-duration); + transform-origin: bottom right; + animation: slideIn var(--dev-tools-transition-duration); + box-shadow: var(--dev-tools-box-shadow); + padding-top: 0.25rem; + padding-bottom: 0.25rem; + } + + .notification-tray .message.animate-out { + animation: slideOut forwards var(--dev-tools-transition-duration); + } + + .notification-tray .message .message-details { + max-height: 10em; + overflow: hidden; + } + + .message-tray { + flex: auto; + overflow: auto; + max-height: 20rem; + user-select: text; + } + + .message-tray .message { + animation: fade-in var(--dev-tools-transition-duration) ease-in; + padding-left: 2.25rem; + } + + .message-tray .message.warning { + background-color: hsla(var(--dev-tools-yellow-hsl), 0.09); + } + + .message-tray .message.error { + background-color: hsla(var(--dev-tools-red-hsl), 0.09); + } + + .message-tray .message.error .message-heading { + color: hsl(var(--dev-tools-red-hsl)); + } + + .message-tray .message.warning .message-heading { + color: hsl(var(--dev-tools-yellow-hsl)); + } + + .message-tray .message + .message { + border-top: 1px solid rgba(255, 255, 255, 0.07); + } + + .message-tray .dismiss-message, + .message-tray .persist { + display: none; + } + + @keyframes slideIn { + from { + transform: translateX(100%); + opacity: 0; + } + to { + transform: translateX(0%); + opacity: 1; + } + } + + @keyframes slideOut { + from { + transform: translateX(0%); + opacity: 1; + } + to { + transform: translateX(100%); + opacity: 0; + } + } + + @keyframes fade-in { + 0% { + opacity: 0; + } + } + + @keyframes bounce { + 0% { + transform: scale(0.8); + } + 50% { + transform: scale(1.5); + background-color: hsla(var(--dev-tools-red-hsl), 1); + } + 100% { + transform: scale(1); + } + } + + @supports (backdrop-filter: blur(1px)) { + .dev-tools, + .window, + .notification-tray .message { + backdrop-filter: blur(8px); + } + .dev-tools:hover, + .dev-tools.active, + .window, + .notification-tray .message { + background-color: var(--dev-tools-background-color-active-blurred); + } + } + `]}static get isActive(){const e=window.sessionStorage.getItem(r.ACTIVE_KEY_IN_SESSION_STORAGE);return e===null||e!=="false"}static notificationDismissed(e){const o=window.localStorage.getItem(r.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);return o!==null&&o.includes(e)}elementTelemetry(){let e={};try{const o=localStorage.getItem("vaadin.statistics.basket");if(!o)return;e=JSON.parse(o)}catch{return}this.frontendConnection&&this.frontendConnection.send("reportTelemetry",{browserData:e})}openWebSocketConnection(){if(this.frontendStatus=a.UNAVAILABLE,this.javaStatus=a.UNAVAILABLE,!this.conf.token){console.error("Dev tools functionality denied for this host."),this.log(b.LOG,"See Vaadin documentation on how to configure devmode.hostsAllowed property.",void 0,"https://vaadin.com/docs/latest/configuration/properties#properties",void 0);return}const e=i=>console.error(i),o=()=>{this.showSplashMessage("Reloading…");const i=window.sessionStorage.getItem(r.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE),d=i?parseInt(i,10)+1:1;window.sessionStorage.setItem(r.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE,d.toString()),window.sessionStorage.setItem(r.TRIGGERED_KEY_IN_SESSION_STORAGE,"true"),window.location.reload()},t=(i,d)=>{let h=document.head.querySelector(`style[data-file-path='${i}']`);h?(h.textContent=d,document.dispatchEvent(new CustomEvent("vaadin-theme-updated"))):o()},n=new C(this.getDedicatedWebSocketUrl());n.onHandshake=()=>{r.isActive||n.setActive(!1),this.elementTelemetry()},n.onConnectionError=e,n.onReload=o,n.onUpdate=t,n.onStatusChange=i=>{this.frontendStatus=i},n.onMessage=i=>this.handleFrontendMessage(i),this.frontendConnection=n,this.conf.backend===r.SPRING_BOOT_DEVTOOLS&&(this.javaConnection=new F(this.getSpringBootWebSocketUrl(window.location)),this.javaConnection.onHandshake=()=>{r.isActive||this.javaConnection.setActive(!1)},this.javaConnection.onReload=o,this.javaConnection.onConnectionError=e,this.javaConnection.onStatusChange=i=>{this.javaStatus=i})}tabHandleMessage(e,o){const t=e;return t.handleMessage&&t.handleMessage.call(e,o)}handleFrontendMessage(e){e.command==="featureFlags"||P(e)||this.unhandledMessages.push(e)}getDedicatedWebSocketUrl(){function e(t){const n=document.createElement("div");return n.innerHTML=``,n.firstChild.href}if(this.conf.url===void 0)return;const o=e(this.conf.url);if(!o.startsWith("http://")&&!o.startsWith("https://")){console.error("The protocol of the url should be http or https for live reload to work.");return}return`${o}?v-r=push&debug_window&token=${this.conf.token}`}getSpringBootWebSocketUrl(e){const{hostname:o}=e,t=e.protocol==="https:"?"wss":"ws";if(o.endsWith("gitpod.io")){const n=o.replace(/.*?-/,"");return`${t}://${this.conf.liveReloadPort}-${n}`}else return`${t}://${o}:${this.conf.liveReloadPort}`}connectedCallback(){if(super.connectedCallback(),this.conf=window.Vaadin.devToolsConf||this.conf,this.disableEventListener=n=>this.demoteSplashMessage(),document.body.addEventListener("focus",this.disableEventListener),document.body.addEventListener("click",this.disableEventListener),window.sessionStorage.getItem(r.TRIGGERED_KEY_IN_SESSION_STORAGE)){const n=new Date,i=`${`0${n.getHours()}`.slice(-2)}:${`0${n.getMinutes()}`.slice(-2)}:${`0${n.getSeconds()}`.slice(-2)}`;this.showSplashMessage(`Page reloaded at ${i}`),window.sessionStorage.removeItem(r.TRIGGERED_KEY_IN_SESSION_STORAGE)}this.transitionDuration=parseInt(window.getComputedStyle(this).getPropertyValue("--dev-tools-transition-duration"),10);const o=window;o.Vaadin=o.Vaadin||{},o.Vaadin.devTools=Object.assign(this,o.Vaadin.devTools);const t=window.Vaadin;t.devToolsPlugins&&(Array.from(t.devToolsPlugins).forEach(n=>this.initPlugin(n)),t.devToolsPlugins={push:n=>this.initPlugin(n)}),this.openWebSocketConnection(),B()}async initPlugin(e){const o=this;e.init({send:function(t,n){o.frontendConnection.send(t,n)}})}format(e){return e.toString()}disconnectedCallback(){this.disableEventListener&&(document.body.removeEventListener("focus",this.disableEventListener),document.body.removeEventListener("click",this.disableEventListener)),super.disconnectedCallback()}showSplashMessage(e){this.splashMessage=e,this.splashMessage&&setTimeout(()=>{this.demoteSplashMessage()},r.AUTO_DEMOTE_NOTIFICATION_DELAY)}demoteSplashMessage(){this.showSplashMessage(void 0)}checkLicense(e){this.frontendConnection?this.frontendConnection.send("checkLicense",e):R({message:"Internal error: no connection",product:e})}showNotification(e,o,t,n,i,d){if(i===void 0||!r.notificationDismissed(i)){if(this.notifications.filter(S=>S.persistentId===i).filter(S=>!S.deleted).length>0)return;const k=this.nextMessageId;this.nextMessageId+=1,this.notifications.push({id:k,type:e,message:o,details:t,link:n,persistentId:i,dontShowAgain:!1,dontShowAgainMessage:d,deleted:!1}),n===void 0&&setTimeout(()=>{this.dismissNotification(k)},r.AUTO_DEMOTE_NOTIFICATION_DELAY),this.requestUpdate()}}dismissNotification(e){const o=this.findNotificationIndex(e);if(o!==-1&&!this.notifications[o].deleted){const t=this.notifications[o];if(t.dontShowAgain&&t.persistentId&&!r.notificationDismissed(t.persistentId)){let n=window.localStorage.getItem(r.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE);n=n===null?t.persistentId:`${n},${t.persistentId}`,window.localStorage.setItem(r.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE,n)}t.deleted=!0,setTimeout(()=>{const n=this.findNotificationIndex(e);n!==-1&&(this.notifications.splice(n,1),this.requestUpdate())},this.transitionDuration)}}findNotificationIndex(e){let o=-1;return this.notifications.some((t,n)=>t.id===e?(o=n,!0):!1),o}toggleDontShowAgain(e){const o=this.findNotificationIndex(e);if(o!==-1&&!this.notifications[o].deleted){const t=this.notifications[o];t.dontShowAgain=!t.dontShowAgain,this.requestUpdate()}}setActive(e){var o,t;(o=this.frontendConnection)==null||o.setActive(e),(t=this.javaConnection)==null||t.setActive(e),window.sessionStorage.setItem(r.ACTIVE_KEY_IN_SESSION_STORAGE,e?"true":"false")}renderMessage(e){return v` +
+
+
${e.message}
+
+ ${e.persistentId?v`
this.toggleDontShowAgain(e.id)} + > + ${e.dontShowAgainMessage||"Don’t show again"} +
`:""} +
+
this.dismissNotification(e.id)}>Dismiss
+
+ `}render(){return v` +
${this.notifications.map(e=>this.renderMessage(e))}
+ `:$} + `}setJavaLiveReloadActive(e){var o;this.javaConnection?this.javaConnection.setActive(e):(o=this.frontendConnection)==null||o.setActive(e)}};l.DISMISSED_NOTIFICATIONS_IN_LOCAL_STORAGE="vaadin.live-reload.dismissedNotifications";l.ACTIVE_KEY_IN_SESSION_STORAGE="vaadin.live-reload.active";l.TRIGGERED_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggered";l.TRIGGERED_COUNT_KEY_IN_SESSION_STORAGE="vaadin.live-reload.triggeredCount";l.AUTO_DEMOTE_NOTIFICATION_DELAY=5e3;l.HOTSWAP_AGENT="HOTSWAP_AGENT";l.JREBEL="JREBEL";l.SPRING_BOOT_DEVTOOLS="SPRING_BOOT_DEVTOOLS";l.BACKEND_DISPLAY_NAME={HOTSWAP_AGENT:"HotswapAgent",JREBEL:"JRebel",SPRING_BOOT_DEVTOOLS:"Spring Boot Devtools"};m([w({type:String,attribute:!1})],l.prototype,"splashMessage",void 0);m([w({type:Array,attribute:!1})],l.prototype,"notifications",void 0);m([w({type:String,attribute:!1})],l.prototype,"frontendStatus",void 0);m([w({type:String,attribute:!1})],l.prototype,"javaStatus",void 0);m([D(".window")],l.prototype,"root",void 0);m([M()],l.prototype,"componentPickActive",void 0);l=r=m([V("vaadin-dev-tools")],l); diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts new file mode 100644 index 0000000..5e6398e --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-dev-tools/websocket-connection.d.ts @@ -0,0 +1,13 @@ +import { Connection } from './connection'; +export declare class WebSocketConnection extends Connection { + static HEARTBEAT_INTERVAL: number; + socket?: any; + canSend: boolean; + constructor(url: string); + onReload(): void; + onUpdate(_path: string, _content: string): void; + onMessage(_message: any): void; + handleMessage(msg: any): void; + handleError(msg: any): void; + send(command: string, data: any): void; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js b/kontor-spring/application/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js new file mode 100644 index 0000000..c2b821b --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-grid-flow-selection-column.js @@ -0,0 +1,97 @@ +import '@vaadin/grid/vaadin-grid-column.js'; +import { GridColumn } from '@vaadin/grid/src/vaadin-grid-column.js'; +import { GridSelectionColumnBaseMixin } from '@vaadin/grid/src/vaadin-grid-selection-column-base-mixin.js'; + +export class GridFlowSelectionColumn extends GridSelectionColumnBaseMixin(GridColumn) { + + static get is() { + return 'vaadin-grid-flow-selection-column'; + } + + static get properties() { + return { + /** + * Override property to enable auto-width + */ + autoWidth: { + type: Boolean, + value: true + }, + + /** + * Override property to set custom width + */ + width: { + type: String, + value: '56px' + } + }; + } + + /** + * Override method from `GridSelectionColumnBaseMixin` to add ID to select all + * checkbox + * + * @override + */ + _defaultHeaderRenderer(root, _column) { + super._defaultHeaderRenderer(root, _column); + const checkbox = root.firstElementChild; + if (checkbox) { + checkbox.id = 'selectAllCheckbox'; + } + } + + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting all items. + * + * @protected + * @override + */ + _selectAll() { + this.selectAll = true; + this.$server.selectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting all items. + * + * @protected + * @override + */ + _deselectAll() { + this.selectAll = false; + this.$server.deselectAll(); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * selecting an item. + * + * @param {Object} item the item to select + * @protected + * @override + */ + _selectItem(item) { + this._grid.$connector.doSelection([item], true); + } + + /** + * Override a method from `GridSelectionColumnBaseMixin` to handle the user + * deselecting an item. + * + * @param {Object} item the item to deselect + * @protected + * @override + */ + _deselectItem(item) { + this._grid.$connector.doDeselection([item], true); + // Optimistically update select all state + this.selectAll = false; + } +} + +customElements.define(GridFlowSelectionColumn.is, GridFlowSelectionColumn); diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/helpers.js b/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/helpers.js new file mode 100644 index 0000000..dd3c328 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/helpers.js @@ -0,0 +1,183 @@ +// map from unicode eastern arabic number characters to arabic numbers +const EASTERN_ARABIC_DIGIT_MAP = { + '\\u0660': '0', + '\\u0661': '1', + '\\u0662': '2', + '\\u0663': '3', + '\\u0664': '4', + '\\u0665': '5', + '\\u0666': '6', + '\\u0667': '7', + '\\u0668': '8', + '\\u0669': '9' +}; + +/** + * Escapes the given string so it can be safely used in a regexp. + * + * @param {string} string + * @return {string} + */ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +} + +/** + * Parses eastern arabic number characters to arabic numbers (0-9) + * + * @param {string} digits + * @return {string} + */ +function parseEasternArabicDigits(digits) { + return digits.replace(/[\u0660-\u0669]/g, function (char) { + const unicode = '\\u0' + char.charCodeAt(0).toString(16); + return EASTERN_ARABIC_DIGIT_MAP[unicode]; + }); +} + +/** + * @param {string} locale + * @param {Date} testTime + * @return {string | null} + */ +function getAmOrPmString(locale, testTime) { + const testTimeString = testTime.toLocaleTimeString(locale); + + // AM/PM string is anything from one letter in eastern arabic to standard two letters, + // to having space in between, dots ... + // cannot disqualify whitespace since some locales use a. m. / p. m. + // TODO when more scripts support is added (than Arabic), need to exclude those numbers too + const amOrPmRegExp = /[^\d\u0660-\u0669]/; + + const matches = + // In most locales, the time ends with AM/PM: + testTimeString.match(new RegExp(`${amOrPmRegExp.source}+$`, 'g')) || + // In some locales, the time starts with AM/PM e.g in Chinese: + testTimeString.match(new RegExp(`^${amOrPmRegExp.source}+`, 'g')); + + return matches && matches[0].trim(); +} + +/** + * @param {string} locale + * @return {string | null} + */ +export function getSeparator(locale) { + let timeString = TEST_PM_TIME.toLocaleTimeString(locale); + + // Since the next regex picks first non-number-whitespace, + // need to discard possible PM from beginning (eg. chinese locale) + const pmString = getPmString(locale); + if (pmString && timeString.startsWith(pmString)) { + timeString = timeString.replace(pmString, ''); + } + + const matches = timeString.match(/[^\u0660-\u0669\s\d]/); + return matches && matches[0]; +} + +/** + * Searches for either an AM or PM token in the given time string + * depending on what is provided in `amOrPmString`. + * + * The search is case and space insensitive. + * + * @example + * `searchAmOrPmToken('1 P M', 'PM')` => `'P M'` + * + * @example + * `searchAmOrPmToken('1 a.m.', 'A. M.')` => `a.m.` + * + * @param {string} timeString + * @param {string} amOrPmString + * @return {string | null} + */ +export function searchAmOrPmToken(timeString, amOrPmString) { + if (!amOrPmString) return null; + + // Create a regexp string for searching for AM/PM without space-sensitivity. + const tokenRegExpString = amOrPmString.split(/\s*/).map(escapeRegExp).join('\\s*'); + + // Create a regexp without case-sensitivity. + const tokenRegExp = new RegExp(tokenRegExpString, 'i'); + + // Match the regexp against the time string. + const tokenMatches = timeString.match(tokenRegExp); + if (tokenMatches) { + return tokenMatches[0]; + } +} + +export const TEST_PM_TIME = new Date('August 19, 1975 23:15:30'); + +export const TEST_AM_TIME = new Date('August 19, 1975 05:15:30'); + +/** + * @param {string} locale + * @return {string} + */ +export function getPmString(locale) { + return getAmOrPmString(locale, TEST_PM_TIME); +} + +/** + * @param {string} locale + * @return {string} + */ +export function getAmString(locale) { + return getAmOrPmString(locale, TEST_AM_TIME); +} + +/** + * @param {string} digits + * @return {number} + */ +export function parseDigitsIntoInteger(digits) { + return parseInt(parseEasternArabicDigits(digits)); +} + +/** + * @param {string} milliseconds + * @return {number} + */ +export function parseMillisecondsIntoInteger(milliseconds) { + milliseconds = parseEasternArabicDigits(milliseconds); + // digits are either .1 .01 or .001 so need to "shift" + if (milliseconds.length === 1) { + milliseconds += '00'; + } else if (milliseconds.length === 2) { + milliseconds += '0'; + } + return parseInt(milliseconds); +} + +/** + * @param {string} timeString + * @param {number} milliseconds + * @param {string} amString + * @param {string} pmString + * @return {string} + */ +export function formatMilliseconds(timeString, milliseconds, amString, pmString) { + // might need to inject milliseconds between seconds and AM/PM + let cleanedTimeString = timeString; + if (timeString.endsWith(amString)) { + cleanedTimeString = timeString.replace(' ' + amString, ''); + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = timeString.replace(' ' + pmString, ''); + } + if (milliseconds) { + let millisecondsString = milliseconds < 10 ? '0' : ''; + millisecondsString += milliseconds < 100 ? '0' : ''; + millisecondsString += milliseconds; + cleanedTimeString += '.' + millisecondsString; + } else { + cleanedTimeString += '.000'; + } + if (timeString.endsWith(amString)) { + cleanedTimeString = cleanedTimeString + ' ' + amString; + } else if (timeString.endsWith(pmString)) { + cleanedTimeString = cleanedTimeString + ' ' + pmString; + } + return cleanedTimeString; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js b/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js new file mode 100644 index 0000000..fc905cc --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/vaadin-time-picker/timepickerConnector.js @@ -0,0 +1,185 @@ +import { + TEST_PM_TIME, + formatMilliseconds, + parseMillisecondsIntoInteger, + parseDigitsIntoInteger, + getAmString, + getPmString, + getSeparator, + searchAmOrPmToken +} from './helpers.js'; +import { TimePicker } from '@vaadin/time-picker/src/vaadin-time-picker.js'; + + // Execute callback when predicate returns true. + // Try again later if predicate returns false. + function when(predicate, callback, timeout = 0) { + if (predicate()) { + callback(); + } else { + setTimeout(() => when(predicate, callback, 200), timeout); + } + } + + function parseISO(text) { + // The default i18n parser of the web component is ISO 8601 compliant. + const timeObject = TimePicker.properties.i18n.value().parseTime(text); + + // The web component returns an object with string values + // while the connector expects number values. + return { + hours: parseInt(timeObject.hours || 0), + minutes: parseInt(timeObject.minutes || 0), + seconds: parseInt(timeObject.seconds || 0), + milliseconds: parseInt(timeObject.milliseconds || 0) + } + }; + +window.Vaadin.Flow.timepickerConnector = {}; +window.Vaadin.Flow.timepickerConnector.initLazy = (timepicker) => { + // Check whether the connector was already initialized for the timepicker + if (timepicker.$connector) { + return; + } + + timepicker.$connector = {}; + + timepicker.$connector.setLocale = (locale) => { + // capture previous value if any + let previousValueObject; + if (timepicker.value && timepicker.value !== '') { + previousValueObject = parseISO(timepicker.value); + } + + try { + // Check whether the locale is supported by the browser or not + TEST_PM_TIME.toLocaleTimeString(locale); + } catch (e) { + locale = 'en-US'; + // FIXME should do a callback for server to throw an exception ? + throw new Error( + 'vaadin-time-picker: The locale ' + + locale + + ' is not supported, falling back to default locale setting(en-US).' + ); + } + + // 1. 24 or 12 hour clock, if latter then what are the am/pm strings ? + const pmString = getPmString(locale); + const amString = getAmString(locale); + + // 2. What is the separator ? + const separator = getSeparator(locale); + + const includeSeconds = function () { + return timepicker.step && timepicker.step < 60; + }; + + const includeMilliSeconds = function () { + return timepicker.step && timepicker.step < 1; + }; + + let cachedTimeString; + let cachedTimeObject; + + timepicker.i18n = { + formatTime(timeObject) { + if (!timeObject) return; + + const timeToBeFormatted = new Date(); + timeToBeFormatted.setHours(timeObject.hours); + timeToBeFormatted.setMinutes(timeObject.minutes); + timeToBeFormatted.setSeconds(timeObject.seconds !== undefined ? timeObject.seconds : 0); + + // the web component expects the correct granularity used for the time string, + // thus need to format the time object in correct granularity by passing the format options + let localeTimeString = timeToBeFormatted.toLocaleTimeString(locale, { + hour: 'numeric', + minute: 'numeric', + second: includeSeconds() ? 'numeric' : undefined + }); + + // milliseconds not part of the time format API + if (includeMilliSeconds()) { + localeTimeString = formatMilliseconds(localeTimeString, timeObject.milliseconds, amString, pmString); + } + + return localeTimeString; + }, + + parseTime(timeString) { + if (timeString && timeString === cachedTimeString && cachedTimeObject) { + return cachedTimeObject; + } + + if (!timeString) { + // when nothing is returned, the component shows the invalid state for the input + return; + } + + const amToken = searchAmOrPmToken(timeString, amString); + const pmToken = searchAmOrPmToken(timeString, pmString); + + const numbersOnlyTimeString = timeString + .replace(amToken || '', '') + .replace(pmToken || '', '') + .trim(); + + // A regexp that allows to find the numbers with optional separator and continuing searching after it. + const numbersRegExp = new RegExp('([\\d\\u0660-\\u0669]){1,2}(?:' + separator + ')?', 'g'); + + let hours = numbersRegExp.exec(numbersOnlyTimeString); + if (hours) { + hours = parseDigitsIntoInteger(hours[0].replace(separator, '')); + // handle 12 am -> 0 + // do not do anything if am & pm are not used or if those are the same, + // as with locale bg-BG there is always ч. at the end of the time + if (amToken !== pmToken) { + if (hours === 12 && amToken) { + hours = 0; + } + if (hours !== 12 && pmToken) { + hours += 12; + } + } + const minutes = numbersRegExp.exec(numbersOnlyTimeString); + const seconds = minutes && numbersRegExp.exec(numbersOnlyTimeString); + // detecting milliseconds from input, expects am/pm removed from end, eg. .0 or .00 or .000 + const millisecondRegExp = /[[\.][\d\u0660-\u0669]{1,3}$/; + // reset to end or things can explode + let milliseconds = seconds && includeMilliSeconds() && millisecondRegExp.exec(numbersOnlyTimeString); + // handle case where last numbers are seconds and . is the separator (invalid regexp match) + if (milliseconds && milliseconds['index'] <= seconds['index']) { + milliseconds = undefined; + } + // hours is a number at this point, others are either arrays or null + // the string in [0] from the arrays includes the separator too + cachedTimeObject = hours !== undefined && { + hours: hours, + minutes: minutes ? parseDigitsIntoInteger(minutes[0].replace(separator, '')) : 0, + seconds: seconds ? parseDigitsIntoInteger(seconds[0].replace(separator, '')) : 0, + milliseconds: + minutes && seconds && milliseconds + ? parseMillisecondsIntoInteger(milliseconds[0].replace('.', '')) + : 0 + }; + cachedTimeString = timeString; + return cachedTimeObject; + } + } + }; + + if (previousValueObject) { + when( + () => timepicker.$, + () => { + const newValue = timepicker.i18n.formatTime(previousValueObject); + // FIXME works but uses private API, needs fixes in web component + if (timepicker.inputElement.value !== newValue) { + timepicker.inputElement.value = newValue; + timepicker.$.comboBox.value = newValue; + } + } + ); + } + }; +} diff --git a/kontor-spring/application/frontend/generated/jar-resources/virtualListConnector.js b/kontor-spring/application/frontend/generated/jar-resources/virtualListConnector.js new file mode 100644 index 0000000..9089923 --- /dev/null +++ b/kontor-spring/application/frontend/generated/jar-resources/virtualListConnector.js @@ -0,0 +1,150 @@ +import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; +import { timeOut } from '@polymer/polymer/lib/utils/async.js'; + +window.Vaadin.Flow.virtualListConnector = { + initLazy: function (list) { + // Check whether the connector was already initialized for the virtual list + if (list.$connector) { + return; + } + + const extraItemsBuffer = 20; + + let lastRequestedRange = [0, 0]; + + list.$connector = {}; + list.$connector.placeholderItem = { __placeholder: true }; + + const updateRequestedItem = function () { + /* + * TODO virtual list seems to do a small index adjustment after scrolling + * has stopped. This causes a redundant request to be sent to make a + * corresponding minimal change to the buffer. We should avoid these + * requests by making the logic skip doing a request if the available + * buffer is within some tolerance compared to the requested buffer. + */ + const visibleIndexes = [...list.children] + .filter((el) => '__virtualListIndex' in el) + .map((el) => el.__virtualListIndex); + const firstNeededItem = Math.min(...visibleIndexes); + const lastNeededItem = Math.max(...visibleIndexes); + + let first = Math.max(0, firstNeededItem - extraItemsBuffer); + let last = Math.min(lastNeededItem + extraItemsBuffer, list.items.length); + + if (lastRequestedRange[0] != first || lastRequestedRange[1] != last) { + lastRequestedRange = [first, last]; + const count = 1 + last - first; + list.$server.setRequestedRange(first, count); + } + }; + + const scheduleUpdateRequest = function () { + list.__requestDebounce = Debouncer.debounce(list.__requestDebounce, timeOut.after(50), updateRequestedItem); + }; + + requestAnimationFrame(() => updateRequestedItem); + + // Add an observer function that will invoke on virtualList.renderer property + // change and then patches it with a wrapper renderer + list.patchVirtualListRenderer = function () { + if (!list.renderer || list.renderer.__virtualListConnectorPatched) { + // The list either doesn't have a renderer yet or it's already been patched + return; + } + + const originalRenderer = list.renderer; + + const renderer = (root, list, model) => { + root.__virtualListIndex = model.index; + + if (model.item === undefined) { + if (list.$connector.placeholderElement) { + // ComponentRenderer + if (!root.__hasComponentRendererPlaceholder) { + // The root was previously rendered by the ComponentRenderer. Clear and add a placeholder. + root.innerHTML = ''; + delete root._$litPart$; + root.appendChild(list.$connector.placeholderElement.cloneNode(true)); + root.__hasComponentRendererPlaceholder = true; + } + } else { + // LitRenderer + originalRenderer.call(list, root, list, { + ...model, + item: list.$connector.placeholderItem + }); + } + } else { + if (root.__hasComponentRendererPlaceholder) { + // The root was previously populated with a placeholder. Clear it. + root.innerHTML = ''; + root.__hasComponentRendererPlaceholder = false; + } + + originalRenderer.call(list, root, list, model); + } + + /* + * Check if we need to do anything once things have settled down. + * This method is called multiple times in sequence for the same user + * action, but we only want to do the check once. + */ + scheduleUpdateRequest(); + }; + renderer.__virtualListConnectorPatched = true; + renderer.__rendererId = originalRenderer.__rendererId; + + list.renderer = renderer; + }; + + list._createPropertyObserver('renderer', 'patchVirtualListRenderer', true); + list.patchVirtualListRenderer(); + + list.items = []; + + list.$connector.set = function (index, items) { + list.items.splice(index, items.length, ...items); + list.items = [...list.items]; + }; + + list.$connector.clear = function (index, length) { + // How many items, starting from "index", should be set as undefined + const clearCount = Math.min(length, list.items.length - index); + list.$connector.set(index, [...Array(clearCount)]); + }; + + list.$connector.updateData = function (items) { + const updatedItemsMap = items.reduce((map, item) => { + map[item.key] = item; + return map; + }, {}); + + list.items = list.items.map((item) => { + // Items can be undefined if they are outside the viewport + if (!item) { + return item; + } + // Replace existing item with updated item, + // return existing item as fallback if it was not updated + return updatedItemsMap[item.key] || item; + }); + }; + + list.$connector.updateSize = function (newSize) { + const delta = newSize - list.items.length; + if (delta > 0) { + list.items = [...list.items, ...Array(delta)]; + } else if (delta < 0) { + list.items = list.items.slice(0, newSize); + } + }; + + list.$connector.setPlaceholderItem = function (placeholderItem = {}, appId) { + placeholderItem.__placeholder = true; + list.$connector.placeholderItem = placeholderItem; + const nodeId = Object.entries(placeholderItem).find(([key]) => key.endsWith('_nodeid')); + list.$connector.placeholderElement = nodeId ? Vaadin.Flow.clients[appId].getByNodeId(nodeId[1]) : null; + }; + } +}; diff --git a/kontor-spring/application/frontend/generated/routes.tsx b/kontor-spring/application/frontend/generated/routes.tsx new file mode 100644 index 0000000..6353abf --- /dev/null +++ b/kontor-spring/application/frontend/generated/routes.tsx @@ -0,0 +1,19 @@ +/****************************************************************************** + * This file is auto-generated by Vaadin. + * It configures React Router automatically by adding server-side (Flow) routes, + * which is enough for Vaadin Flow applications. + * Once any `.tsx` or `.jsx` React routes are added into + * `src/main/frontend/views/` directory, this route configuration is + * re-generated automatically by Vaadin. + ******************************************************************************/ +import { createBrowserRouter, RouteObject } from 'react-router-dom'; +import { serverSideRoutes } from 'Frontend/generated/flow/Flow'; + +function build() { + const routes = [...serverSideRoutes] as RouteObject[]; + return { + router: createBrowserRouter([...routes], { basename: new URL(document.baseURI).pathname }), + routes + }; +} +export const { router, routes } = build() diff --git a/kontor-spring/application/frontend/generated/theme.d.ts b/kontor-spring/application/frontend/generated/theme.d.ts new file mode 100644 index 0000000..94ce92d --- /dev/null +++ b/kontor-spring/application/frontend/generated/theme.d.ts @@ -0,0 +1 @@ +export declare const applyTheme: (target: Node) => void; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/theme.js b/kontor-spring/application/frontend/generated/theme.js new file mode 100644 index 0000000..126c729 --- /dev/null +++ b/kontor-spring/application/frontend/generated/theme.js @@ -0,0 +1,2 @@ +import {applyTheme as _applyTheme} from './theme-kontor.generated.js'; +export const applyTheme = _applyTheme; diff --git a/kontor-spring/application/frontend/generated/vaadin-featureflags.js b/kontor-spring/application/frontend/generated/vaadin-featureflags.js new file mode 100644 index 0000000..a171710 --- /dev/null +++ b/kontor-spring/application/frontend/generated/vaadin-featureflags.js @@ -0,0 +1,12 @@ +// @ts-nocheck +window.Vaadin = window.Vaadin || {}; +window.Vaadin.featureFlags = window.Vaadin.featureFlags || {}; +window.Vaadin.featureFlags.exampleFeatureFlag = false; +window.Vaadin.featureFlags.collaborationEngineBackend = false; +window.Vaadin.featureFlags.webPush = false; +window.Vaadin.featureFlags.formFillerAddon = false; +window.Vaadin.featureFlags.hillaI18n = false; +window.Vaadin.featureFlags.copilotFlow = false; +window.Vaadin.featureFlags.copilotI18n = false; +window.Vaadin.featureFlags.copilotExperimentalFeatures = false; +export {}; \ No newline at end of file diff --git a/kontor-spring/application/frontend/generated/vaadin-react.tsx b/kontor-spring/application/frontend/generated/vaadin-react.tsx new file mode 100644 index 0000000..9563756 --- /dev/null +++ b/kontor-spring/application/frontend/generated/vaadin-react.tsx @@ -0,0 +1,4 @@ +import { routes } from "Frontend/generated/routes.js"; + +(window as any).Vaadin ??= {}; +(window as any).Vaadin.routesConfig = routes; diff --git a/kontor-spring/application/frontend/generated/vaadin.ts b/kontor-spring/application/frontend/generated/vaadin.ts new file mode 100644 index 0000000..a850404 --- /dev/null +++ b/kontor-spring/application/frontend/generated/vaadin.ts @@ -0,0 +1,8 @@ +import './vaadin-featureflags.js'; + +import './index'; + +import './vaadin-react.js'; +import './theme-kontor.global.generated.js'; +import { applyTheme } from './theme.js'; +applyTheme(document); diff --git a/kontor-spring/application/frontend/index.html b/kontor-spring/application/frontend/index.html new file mode 100644 index 0000000..d36e593 --- /dev/null +++ b/kontor-spring/application/frontend/index.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + +
+ + diff --git a/kontor-spring/frontend/themes/kontor/styles.css b/kontor-spring/application/frontend/themes/kontor/styles.css similarity index 100% rename from kontor-spring/frontend/themes/kontor/styles.css rename to kontor-spring/application/frontend/themes/kontor/styles.css diff --git a/kontor-spring/frontend/themes/kontor/theme.json b/kontor-spring/application/frontend/themes/kontor/theme.json similarity index 100% rename from kontor-spring/frontend/themes/kontor/theme.json rename to kontor-spring/application/frontend/themes/kontor/theme.json diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistformTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistformTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistformTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ArtistformTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicWorkViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicWorkViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicWorkViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/ComicWorkViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/IssueViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/IssueViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/IssueViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/IssueViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/PublisherViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/PublisherViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/PublisherViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/PublisherViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/StoryArcViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/StoryArcViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/StoryArcViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/StoryArcViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/TradePaperbackViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/TradePaperbackViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/TradePaperbackViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/TradePaperbackViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/VolumeViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/VolumeViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/VolumeViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/VolumeViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/WorktypeViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/WorktypeViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/comics/views/WorktypeViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/comics/views/WorktypeViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardSetViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardSetViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardSetViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardSetViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/CardViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/FieldPositionViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/FieldPositionViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/FieldPositionViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/FieldPositionViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/PlayerViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/PlayerViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/PlayerViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/PlayerViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/RoosterViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/RoosterViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/RoosterViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/RoosterViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/SportViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/SportViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/SportViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/SportViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/TeamViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/TeamViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/TeamViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/TeamViewTest.java diff --git a/kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/VendorViewTest.java b/kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/VendorViewTest.java similarity index 100% rename from kontor-spring/src/integrationTest/java/de/thpeetz/kontor/tysc/views/VendorViewTest.java rename to kontor-spring/application/src/integrationTest/java/de/thpeetz/kontor/tysc/views/VendorViewTest.java diff --git a/kontor-spring/src/integrationTest/resources/application.properties b/kontor-spring/application/src/integrationTest/resources/application.properties similarity index 100% rename from kontor-spring/src/integrationTest/resources/application.properties rename to kontor-spring/application/src/integrationTest/resources/application.properties diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/Application.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/Application.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/Application.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/Application.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/AdminConstants.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/AdminConstants.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/AdminConstants.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/AdminConstants.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/MailProperties.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/MailProperties.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/MailProperties.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/MailProperties.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/SetupModuleAdmin.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/SetupModuleAdmin.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/SetupModuleAdmin.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/SetupModuleAdmin.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Assignment.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Assignment.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Assignment.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Assignment.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Permission.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Permission.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Permission.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Permission.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Profile.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Profile.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Profile.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Profile.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Token.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Token.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/data/Token.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/data/Token.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/AssignmentRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/AssignmentRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/AssignmentRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/AssignmentRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/MailAccountRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/MailAccountRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/MailAccountRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/MailAccountRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/PermissionRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/PermissionRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/PermissionRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/PermissionRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/ProfileRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/ProfileRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/admin/repository/ProfileRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/repository/ProfileRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/AdminService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/AdminService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/AdminService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/AdminService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/KontorUserDetailsService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/KontorUserDetailsService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/KontorUserDetailsService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/KontorUserDetailsService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/MailService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/MailService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/services/MailService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/services/MailService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AdminLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AdminLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AdminLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AdminLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AssignmentForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AssignmentForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AssignmentForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AssignmentForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AssignmentView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AssignmentView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/AssignmentView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/AssignmentView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/LoginView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/LoginView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/LoginView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/LoginView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/PermissionForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/PermissionForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/PermissionForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/PermissionForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/PermissionView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/PermissionView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/PermissionView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/PermissionView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/ProfileForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/ProfileForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/ProfileForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/ProfileForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/ProfileView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/ProfileView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/ProfileView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/ProfileView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/UserProfileView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/UserProfileView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/views/UserProfileView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/admin/views/UserProfileView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/BookshelfConstants.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/BookshelfConstants.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/BookshelfConstants.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/BookshelfConstants.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/SetupModuleBookshelf.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/SetupModuleBookshelf.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/SetupModuleBookshelf.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/SetupModuleBookshelf.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Article.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Article.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Article.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Article.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthor.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthor.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthor.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthor.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthorRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthorRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Author.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Author.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Author.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Author.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/AuthorRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/AuthorRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/AuthorRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/AuthorRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Book.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Book.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Book.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/Book.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthor.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthor.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthor.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthor.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthorRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthorRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisher.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisher.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisher.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisher.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisherRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisherRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/services/BookshelfService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/services/BookshelfService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/services/BookshelfService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/services/BookshelfService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/ArticleView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/AuthorView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfPublisherView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfPublisherView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfPublisherView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/BookshelfPublisherView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/PublisherForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/PublisherForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/views/PublisherForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/bookshelf/views/PublisherForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/ComicConstants.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/ComicConstants.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/ComicConstants.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/ComicConstants.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/SetupModuleComics.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/SetupModuleComics.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/SetupModuleComics.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/SetupModuleComics.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Artist.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Artist.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Artist.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Artist.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Comic.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Comic.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Comic.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Comic.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/ComicWork.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/ComicWork.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/ComicWork.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/ComicWork.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Issue.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Issue.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Issue.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Issue.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/IssueWork.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/IssueWork.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/IssueWork.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/IssueWork.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Publisher.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Publisher.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Publisher.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Publisher.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/StoryArc.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/StoryArc.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/StoryArc.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/StoryArc.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/TradePaperback.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/TradePaperback.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/TradePaperback.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/TradePaperback.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Volume.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Volume.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Volume.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Volume.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Worktype.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Worktype.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/data/Worktype.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/data/Worktype.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ArtistRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ArtistRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ArtistRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ArtistRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ComicRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ComicRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicWorkRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ComicWorkRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicWorkRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/ComicWorkRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/IssueRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/IssueRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueWorkRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/IssueWorkRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueWorkRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/IssueWorkRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/PublisherRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/PublisherRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/PublisherRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/PublisherRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/StoryArcRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/StoryArcRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/StoryArcRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/StoryArcRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/TradePaperbackRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/TradePaperbackRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/VolumeRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/VolumeRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/VolumeRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/VolumeRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/WorktypeRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/WorktypeRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/comics/repository/WorktypeRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/repository/WorktypeRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/services/ComicService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/services/ComicService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/services/ComicService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/services/ComicService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ArtistForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ArtistForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ArtistForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ArtistForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ArtistView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ArtistView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ArtistView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ArtistView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/ComicWorkView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/IssueWorkView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/PublisherForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/PublisherForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/PublisherForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/PublisherForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/PublisherView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/PublisherView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/PublisherView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/PublisherView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/StoryArcForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/StoryArcForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/StoryArcForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/StoryArcForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/StoryArcView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/StoryArcView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/StoryArcView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/StoryArcView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/TradePaperBackForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/TradePaperBackForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/TradePaperBackForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/TradePaperBackForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/TradePaperbackView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/TradePaperbackView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/TradePaperbackView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/TradePaperbackView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/VolumeForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/VolumeForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/VolumeForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/VolumeForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/VolumeView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/VolumeView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/VolumeView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/VolumeView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/WorktypeForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/WorktypeForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/WorktypeForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/WorktypeForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/WorktypeView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/WorktypeView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/views/WorktypeView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/comics/views/WorktypeView.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/common/data/AbstractEntity.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/data/AbstractEntity.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/common/data/AbstractEntity.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/data/AbstractEntity.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/common/data/AbstractLinkEntity.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/data/AbstractLinkEntity.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/common/data/AbstractLinkEntity.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/data/AbstractLinkEntity.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/AvatarMenuBar.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/AvatarMenuBar.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/AvatarMenuBar.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/AvatarMenuBar.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/ColumnToggleContextMenu.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/ColumnToggleContextMenu.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/ColumnToggleContextMenu.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/ColumnToggleContextMenu.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/ComicIssueField.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/ComicIssueField.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/ComicIssueField.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/ComicIssueField.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/FilterOption.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/FilterOption.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/FilterOption.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/FilterOption.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/KontorLayoutUtil.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/KontorLayoutUtil.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/KontorLayoutUtil.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/KontorLayoutUtil.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/MainLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/MainLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/MainLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/MainLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/MainView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/MainView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/MainView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/MainView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SearchFilter.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SearchFilter.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SearchFilter.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SearchFilter.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SearchFilterField.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SearchFilterField.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SearchFilterField.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SearchFilterField.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SeparateMainLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SeparateMainLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/SeparateMainLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/SeparateMainLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/StatusIcon.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/StatusIcon.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/StatusIcon.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/StatusIcon.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/views/YearMonthField.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/YearMonthField.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/views/YearMonthField.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/common/views/YearMonthField.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/data/services/DataManagementService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/data/services/DataManagementService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/data/services/DataManagementService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/data/services/DataManagementService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/data/views/DataManagementView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/DataManagementView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/data/views/DataManagementView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/DataManagementView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/data/views/ImportArea.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/ImportArea.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/data/views/ImportArea.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/ImportArea.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/data/views/UploadArea.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/UploadArea.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/data/views/UploadArea.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/data/views/UploadArea.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/mailclient/data/Mail.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/data/Mail.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/mailclient/data/Mail.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/data/Mail.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/mailclient/data/MailAccount.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/data/MailAccount.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/mailclient/data/MailAccount.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/data/MailAccount.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/views/EmailView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/views/EmailView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/views/EmailView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/mailclient/views/EmailView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/MediaConstants.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/MediaConstants.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/MediaConstants.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/MediaConstants.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/SetupModuleMedia.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/SetupModuleMedia.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/SetupModuleMedia.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/SetupModuleMedia.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaActor.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaActor.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaActor.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaActor.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaActorFile.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaActorFile.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaActorFile.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaActorFile.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaArticle.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaArticle.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaArticle.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaArticle.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaFile.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaFile.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaFile.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaFile.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaVideo.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaVideo.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/data/MediaVideo.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/data/MediaVideo.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorFileRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaActorFileRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorFileRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaActorFileRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaActorRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaActorRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaArticleRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaArticleRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaArticleRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaArticleRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaFileRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaFileRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaFileRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaFileRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaVideoRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaVideoRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/media/repository/MediaVideoRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/repository/MediaVideoRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaArticleService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaArticleService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaArticleService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaArticleService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaFileService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaFileService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaFileService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaFileService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaVideoService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaVideoService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/services/MediaVideoService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/services/MediaVideoService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorFileView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaActorView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaActorView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaArticleForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaArticleForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaArticleForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaArticleForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaArticleView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaArticleView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaArticleView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaArticleView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaFileForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaFileForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaFileForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaFileForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaFileView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaFileView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaFileView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaFileView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaVideoForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaVideoForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaVideoForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaVideoForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaVideoView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaVideoView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/views/MediaVideoView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/media/views/MediaVideoView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/security/SecurityConfig.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/security/SecurityConfig.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/security/SecurityConfig.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/security/SecurityConfig.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/security/SecurityService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/security/SecurityService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/security/SecurityService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/security/SecurityService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/SetupModuleTysc.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/SetupModuleTysc.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/SetupModuleTysc.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/SetupModuleTysc.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/TyscConstants.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/TyscConstants.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/TyscConstants.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/TyscConstants.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Card.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Card.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Card.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Card.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/CardSet.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/CardSet.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/CardSet.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/CardSet.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/FieldPosition.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/FieldPosition.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/FieldPosition.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/FieldPosition.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Player.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Player.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Player.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Player.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Rooster.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Rooster.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Rooster.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Rooster.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Sport.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Sport.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Sport.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Sport.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Team.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Team.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Team.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Team.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Vendor.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Vendor.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/data/Vendor.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/data/Vendor.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/CardRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/CardRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardSetRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/CardSetRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardSetRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/CardSetRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/FieldPositionRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/FieldPositionRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/PlayerRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/PlayerRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/PlayerRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/PlayerRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/RoosterRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/RoosterRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/RoosterRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/RoosterRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/SportRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/SportRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/SportRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/SportRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/TeamRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/TeamRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/TeamRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/TeamRepository.java diff --git a/kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/VendorRepository.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/VendorRepository.java similarity index 100% rename from kontor-data/src/main/java/de/thpeetz/kontor/data/tysc/repository/VendorRepository.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/repository/VendorRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/services/CardService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/services/CardService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/services/CardService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/services/CardService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/services/SportService.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/services/SportService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/services/SportService.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/services/SportService.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardSetForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardSetForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardSetForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardSetForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardSetView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardSetView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardSetView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardSetView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/CardView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/CardView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PlayerForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PlayerForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PlayerForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PlayerForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PlayerView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PlayerView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PlayerView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PlayerView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PositionForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PositionForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PositionForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PositionForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PositionView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PositionView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/PositionView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/PositionView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/RoosterForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/RoosterForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/RoosterForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/RoosterForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/RoosterView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/RoosterView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/RoosterView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/RoosterView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/SportForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/SportForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/SportForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/SportForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/SportView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/SportView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/SportView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/SportView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TeamForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TeamForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TeamForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TeamForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TeamView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TeamView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TeamView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TeamView.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TyscLayout.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TyscLayout.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/TyscLayout.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/TyscLayout.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/VendorForm.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/VendorForm.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/VendorForm.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/VendorForm.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/VendorView.java b/kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/VendorView.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/views/VendorView.java rename to kontor-spring/application/src/main/java/de/thpeetz/kontor/tysc/views/VendorView.java diff --git a/kontor-spring/src/main/resources/META-INF/resources/images/offline.png b/kontor-spring/application/src/main/resources/META-INF/resources/images/offline.png similarity index 100% rename from kontor-spring/src/main/resources/META-INF/resources/images/offline.png rename to kontor-spring/application/src/main/resources/META-INF/resources/images/offline.png diff --git a/kontor-spring/src/main/resources/META-INF/resources/offline.html b/kontor-spring/application/src/main/resources/META-INF/resources/offline.html similarity index 100% rename from kontor-spring/src/main/resources/META-INF/resources/offline.html rename to kontor-spring/application/src/main/resources/META-INF/resources/offline.html diff --git a/kontor-spring/src/main/resources/application.yml b/kontor-spring/application/src/main/resources/application.yml similarity index 100% rename from kontor-spring/src/main/resources/application.yml rename to kontor-spring/application/src/main/resources/application.yml diff --git a/kontor-spring/src/main/resources/banner.txt b/kontor-spring/application/src/main/resources/banner.txt similarity index 100% rename from kontor-spring/src/main/resources/banner.txt rename to kontor-spring/application/src/main/resources/banner.txt diff --git a/kontor-spring/src/main/resources/logback-spring.xml b/kontor-spring/application/src/main/resources/logback-spring.xml similarity index 100% rename from kontor-spring/src/main/resources/logback-spring.xml rename to kontor-spring/application/src/main/resources/logback-spring.xml diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/ApplicationTests.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/ApplicationTests.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/ApplicationTests.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/ApplicationTests.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/TestConstants.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/TestConstants.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/TestConstants.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/TestConstants.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/ArticleTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/AuthorTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookAuthorTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/services/BookshelfServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/services/BookshelfServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/bookshelf/services/BookshelfServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/bookshelf/services/BookshelfServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/ComicConstantsTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/ComicConstantsTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/ComicConstantsTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/ComicConstantsTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/TestConstants.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/TestConstants.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/TestConstants.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/TestConstants.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ArtistTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ArtistTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ArtistTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ArtistTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ComicTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ComicTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ComicTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ComicTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ComicWorkTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ComicWorkTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/ComicWorkTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/ComicWorkTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/IssueTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/IssueTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/IssueTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/IssueTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/PublisherTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/PublisherTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/PublisherTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/PublisherTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/StoryArcTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/StoryArcTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/StoryArcTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/StoryArcTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/TradePaperbackTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/TradePaperbackTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/TradePaperbackTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/TradePaperbackTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/VolumeTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/VolumeTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/VolumeTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/VolumeTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/WorktypeTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/WorktypeTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/data/WorktypeTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/data/WorktypeTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ArtistRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ArtistRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ArtistRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ArtistRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ComicRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ComicRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ComicRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ComicRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ComicWorkRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ComicWorkRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/ComicWorkRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/ComicWorkRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/IssueRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/IssueRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/IssueRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/IssueRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/PublisherRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/PublisherRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/PublisherRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/PublisherRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/StoryArcRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/StoryArcRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/StoryArcRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/StoryArcRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/VolumeRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/VolumeRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/VolumeRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/VolumeRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/WorktypeRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/WorktypeRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/repository/WorktypeRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/repository/WorktypeRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/comics/services/ComicServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/services/ComicServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/comics/services/ComicServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/comics/services/ComicServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/TestConstants.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/TestConstants.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/TestConstants.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/TestConstants.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaArticleTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaArticleTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaArticleTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaArticleTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaFileTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaFileTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaFileTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaFileTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaVideoTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaVideoTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/data/MediaVideoTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/data/MediaVideoTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaArticleServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaArticleServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaArticleServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaArticleServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaFileServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaFileServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaFileServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaFileServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaVideoServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaVideoServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/media/services/MediaVideoServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/media/services/MediaVideoServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/TestConstants.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/TestConstants.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/TestConstants.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/TestConstants.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/CardSetTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/CardSetTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/CardSetTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/CardSetTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/CardTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/CardTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/CardTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/CardTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/FieldPositionTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/FieldPositionTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/FieldPositionTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/FieldPositionTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/PlayerTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/PlayerTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/PlayerTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/PlayerTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/RoosterTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/RoosterTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/RoosterTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/RoosterTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/SportTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/SportTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/SportTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/SportTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/TeamTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/TeamTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/TeamTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/TeamTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/VendorTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/VendorTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/data/VendorTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/data/VendorTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/CardRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/CardRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/CardRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/CardRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/CardSetRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/CardSetRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/CardSetRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/CardSetRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/PlayerRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/PlayerRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/PlayerRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/PlayerRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/RoosterRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/RoosterRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/RoosterRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/RoosterRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/SportRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/SportRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/SportRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/SportRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/TeamRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/TeamRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/TeamRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/TeamRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/VendorRepositoryTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/VendorRepositoryTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/repository/VendorRepositoryTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/repository/VendorRepositoryTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/services/CardServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/services/CardServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/services/CardServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/services/CardServiceTest.java diff --git a/kontor-spring/src/test/java/de/thpeetz/kontor/tysc/services/SportServiceTest.java b/kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/services/SportServiceTest.java similarity index 100% rename from kontor-spring/src/test/java/de/thpeetz/kontor/tysc/services/SportServiceTest.java rename to kontor-spring/application/src/test/java/de/thpeetz/kontor/tysc/services/SportServiceTest.java diff --git a/kontor-spring/src/test/resources/application.properties b/kontor-spring/application/src/test/resources/application.properties similarity index 100% rename from kontor-spring/src/test/resources/application.properties rename to kontor-spring/application/src/test/resources/application.properties diff --git a/kontor-spring/build.gradle b/kontor-spring/build.gradle index e49cbac..b168241 100644 --- a/kontor-spring/build.gradle +++ b/kontor-spring/build.gradle @@ -16,36 +16,35 @@ buildscript { } plugins { - id 'java' - id 'application' - id 'maven-publish' - id "com.google.cloud.artifactregistry.gradle-plugin" version "2.2.0" - id 'jvm-test-suite' - id 'jacoco' - id 'test-report-aggregation' - id 'jacoco-report-aggregation' - alias(libs.plugins.spring.boot) alias(libs.plugins.spring.dependencies) - alias(libs.plugins.vaadin) - alias(libs.plugins.lombok) - //alias(libs.plugins.asciidoctorPdf) - //alias(libs.plugins.asciidoctorConvert) - //alias(libs.plugins.asciidoctorGems) - //id "de.infolektuell.typst" version "0.8.0" } -repositories { - maven { setUrl("https://nexus.thpeetz.de/repository/maven-central") } - mavenCentral() - //ruby.gems() - maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") } - maven { setUrl("https://repo.spring.io/milestone") } - maven { setUrl("https://maven.vaadin.com/vaadin-addons") } +subprojects { + apply plugin: 'java' + apply plugin: 'io.spring.dependency-management' + apply plugin: 'java-library' + apply plugin: 'maven-publish' + // apply plugin: 'com.google.cloud.artifactregistry.gradle-plugin' version '2.2.0' + + + repositories { + maven { setUrl("https://nexus.thpeetz.de/repository/maven-central") } + mavenCentral() + maven { setUrl("https://maven.vaadin.com/vaadin-prereleases") } + maven { setUrl("https://repo.spring.io/milestone") } + maven { setUrl("https://maven.vaadin.com/vaadin-addons") } + } + dependencyManagement { + imports { + mavenBom libs.spring.boot.dependencies.get().toString() + } + } + + java { + sourceCompatibility = JavaVersion.VERSION_21 + } } -java { - sourceCompatibility = JavaVersion.VERSION_21 -} configurations { developmentOnly @@ -54,177 +53,6 @@ configurations { } } -dependencies { - implementation 'com.vaadin:vaadin-core' - implementation 'com.vaadin:vaadin-spring-boot-starter' - implementation 'org.springframework.boot:spring-boot-starter-artemis' - implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'org.apache.camel.springboot:camel-spring-boot-starter' - implementation 'org.apache.camel.springboot:camel-jms-starter' - implementation 'org.apache.activemq:artemis-jakarta-client' - //implementation libs.artemis - implementation 'org.springframework.boot:spring-boot-starter-actuator' - developmentOnly 'org.springframework.boot:spring-boot-devtools' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springframework.security:spring-security-oauth2-jose' - implementation 'org.springframework.security:spring-security-oauth2-resource-server' - implementation 'com.h2database:h2' - implementation libs.hsqldb - implementation 'org.postgresql:postgresql' - //runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' - implementation libs.hypersistence - implementation libs.mail - implementation libs.jackson - implementation libs.gson - implementation libs.json - implementation 'org.hibernate.orm:hibernate-community-dialects' - testImplementation('org.springframework.boot:spring-boot-starter-test') { - exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' - } - testImplementation 'org.springframework.security:spring-security-test' - testImplementation 'com.vaadin:vaadin-testbench-junit5' - testImplementation 'io.projectreactor:reactor-test' - testImplementation 'org.apache.camel:camel-test-spring-junit5' - testRuntimeOnly 'org.junit.platform:junit-platform-launcher' - compileOnly 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - //asciidoctorGems libs.rouge - //asciidoctorGems libs.diagram -} - -dependencyManagement { - imports { - mavenBom libs.vaadin.bom.get().toString() - mavenBom libs.camel.bom.get().toString() - } -} - -publishing { - publications { - bootJava(MavenPublication) { - artifact tasks.named("bootJar") - } - } - repositories { - maven { - url = version.endsWith('SNAPSHOT') ? - 'https://nexus.thpeetz.de/repository/maven-snapshots' : - 'https://nexus.thpeetz.de/repository/maven-releases' - credentials { - username = project.findProperty('nexusUser') - password = project.findProperty('nexusPassword') - } - } -// maven { -// name = "gitlabPackageRegistry" -// url = uri("https://gitlab.com/api/v4/projects/64726715/packages/maven") -// credentials(PasswordCredentials) -// } - } -} - -application { - mainClass = 'de.thpeetz.kontor.Application' -} - -bootRun { - args = ["--spring.profiles.active=${project.properties['profile'] ?: 'prod'}"] -} - -task dockerImage(type: Exec) { - dependsOn(bootJar) - commandLine "docker", "build", ".", "-t", "kontor:${project.version}" -} - -vaadin { - productionMode = true -} - -testing { - suites { - configureEach { - useJUnitJupiter() - dependencies { - implementation project() - implementation 'com.vaadin:vaadin-core' - implementation 'com.vaadin:vaadin-spring-boot-starter' - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'com.h2database:h2' - implementation libs.hsqldb - implementation libs.sqlite.jdbc - //runtimeOnly 'com.mysql:mysql-connector-j' - runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' - implementation('org.springframework.boot:spring-boot-starter-test') { - exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' - } - implementation 'org.springframework.security:spring-security-test' - implementation 'com.vaadin:vaadin-testbench-junit5' - implementation 'io.projectreactor:reactor-test' - runtimeOnly 'org.junit.platform:junit-platform-launcher' - } - } - test(JvmTestSuite) { - testType = TestSuiteType.UNIT_TEST - targets { - all { - testTask.configure { - reports { - junitXml { - outputPerTestCase = true // defaults to false - mergeReruns = true // defaults to false - } - } - finalizedBy(jacocoTestReport) - } - } - } - } - integrationTest(JvmTestSuite) { - testType = "view-test" - targets { - all { - testTask.configure { - shouldRunAfter(test) - finalizedBy(jacocoTestReport) - } - } - } - } - } -} - -tasks.named('check') { - dependsOn(testing.suites.integrationTest) - dependsOn(testing.suites.test) - dependsOn tasks.named('testAggregateTestReport', TestReport) - dependsOn tasks.named('integrationTestAggregateTestReport', TestReport) -} - - -jacocoTestReport { - dependsOn test, integrationTest - reports { - xml.required = true - csv.required = false - } -} - -reporting { - reports { - testAggregateTestReport(AggregateTestReport) { - testType = TestSuiteType.UNIT_TEST - } - integrationTestAggregateTestReport(AggregateTestReport) { - testType = "view-test" - } - integrationTestCodeCoverageReport(JacocoCoverageReport) { - testType = "view-test" - } - } -} - wrapper { gradleVersion = libs.versions.gradle.get().toString() } diff --git a/kontor-spring/gradle/libs.versions.toml b/kontor-spring/gradle/libs.versions.toml index c6b06d2..aaf583b 100644 --- a/kontor-spring/gradle/libs.versions.toml +++ b/kontor-spring/gradle/libs.versions.toml @@ -47,11 +47,7 @@ hypersistence = { module = "io.hypersistence:hypersistence-utils-hibernate-63", vaadin-bom = { module = "com.vaadin:vaadin-bom", version.ref = "vaadin" } camel-bom = { module = "org.apache.camel.springboot:camel-spring-boot-bom", version.ref = "camel"} artemis = { module = "org.apache.activemq:artemis-jms-server", version.ref = "artemis" } -#asciidoctorGradleJvmGems = { module = "org.asciidoctor:asciidoctor-gradle-jvm-gems", version.ref= "asciidoctor" } -#asciidoctorGradleJvm = { module = "org.asciidoctor:asciidoctor-gradle-jvm", version.ref= "asciidoctor" } -#asciidoctorGradleJvmPdf = { module = "org.asciidoctor:asciidoctor-gradle-jvm-pdf", version.ref= "asciidoctor" } -#rouge = { module = "rubygems:rouge", version.ref = "rouge" } -#diagram = { module = "rubygems:asciidoctor-diagram", version.ref = "diagram" } +spring-boot-dependencies = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "springboot" } [bundles] logback = ["logbackCore", "logbackClassic"] @@ -59,13 +55,6 @@ logback = ["logbackCore", "logbackClassic"] [plugins] spotbugs = { id = "com.github.spotbugs", version.ref = "spotbugs" } sonarqube = { id = "org.sonarqube", version.ref = "sonarqube" } -#asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version.ref = "asciidoctor" } -#asciidoctorConvert = { id = "org.asciidoctor.jvm.convert", version.ref = "asciidoctor" } -#asciidoctorGems = { id = "org.asciidoctor.jvm.gems", version.ref = "asciidoctor" } -javaConvention = { id = "de.cimt.java-conventions", version.ref = "cimtConventions" } -applicationConvention = { id = "de.cimt.application-conventions", version.ref = "cimtConventions" } -libraryConvention = { id = "de.cimt.library-conventions", version.ref = "cimtConventions" } -#asciidoctorConvention = { id = "de.cimt.asciidoctor-conventions", version.ref = "cimtConventions" } spring-boot = { id = "org.springframework.boot", version.ref = "springboot"} spring-dependencies = { id = "io.spring.dependency-management", version.ref = "springdependencies" } vaadin = { id = "com.vaadin", version.ref = "vaadin" } diff --git a/integration/.gitattributes b/kontor-spring/integration/.gitattributes similarity index 100% rename from integration/.gitattributes rename to kontor-spring/integration/.gitattributes diff --git a/integration/.gitignore b/kontor-spring/integration/.gitignore similarity index 100% rename from integration/.gitignore rename to kontor-spring/integration/.gitignore diff --git a/integration/build.gradle b/kontor-spring/integration/build.gradle similarity index 80% rename from integration/build.gradle rename to kontor-spring/integration/build.gradle index 2c4f20c..262b81f 100755 --- a/integration/build.gradle +++ b/kontor-spring/integration/build.gradle @@ -1,24 +1,9 @@ plugins { - id 'java' - id 'org.springframework.boot' version '4.0.7' - id 'io.spring.dependency-management' version '1.1.7' + id 'application' + alias(libs.plugins.spring.boot) alias(libs.plugins.lombok) } -group = 'de.thpeetz.kontor' -version = '0.3.0-SNAPSHOT' - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenCentral() - maven { setUrl("https://repo.spring.io/milestone") } -} - dependencyManagement { imports { mavenBom libs.camel.bom.get().toString() @@ -46,6 +31,14 @@ dependencies { testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } +application { + mainClass = 'de.thpeetz.kontor.integration.IntegrationApplication' +} + +bootRun { + args = ["--spring.profiles.active=${project.properties['profile'] ?: 'prod'}"] +} + tasks.named('test') { useJUnitPlatform() } diff --git a/integration/gradle/libs.versions.toml b/kontor-spring/integration/gradle/libs.versions.toml similarity index 100% rename from integration/gradle/libs.versions.toml rename to kontor-spring/integration/gradle/libs.versions.toml diff --git a/integration/gradle/wrapper/gradle-wrapper.jar b/kontor-spring/integration/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from integration/gradle/wrapper/gradle-wrapper.jar rename to kontor-spring/integration/gradle/wrapper/gradle-wrapper.jar diff --git a/integration/gradle/wrapper/gradle-wrapper.properties b/kontor-spring/integration/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from integration/gradle/wrapper/gradle-wrapper.properties rename to kontor-spring/integration/gradle/wrapper/gradle-wrapper.properties diff --git a/integration/gradlew b/kontor-spring/integration/gradlew similarity index 100% rename from integration/gradlew rename to kontor-spring/integration/gradlew diff --git a/integration/gradlew.bat b/kontor-spring/integration/gradlew.bat similarity index 100% rename from integration/gradlew.bat rename to kontor-spring/integration/gradlew.bat diff --git a/integration/settings.gradle b/kontor-spring/integration/settings.gradle similarity index 100% rename from integration/settings.gradle rename to kontor-spring/integration/settings.gradle diff --git a/integration/src/main/java/de/thpeetz/kontor/integration/IntegrationApplication.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/IntegrationApplication.java similarity index 100% rename from integration/src/main/java/de/thpeetz/kontor/integration/IntegrationApplication.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/IntegrationApplication.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/AddLinkFromQueue.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLinkAdd.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaLoFiAdd.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/QueueMediaVideoAdd.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/routes/ReadQueueRoute.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkProcessor.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java b/kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java rename to kontor-spring/integration/src/main/java/de/thpeetz/kontor/integration/services/AddLinkService.java diff --git a/integration/src/main/resources/application.yaml b/kontor-spring/integration/src/main/resources/application.yaml similarity index 100% rename from integration/src/main/resources/application.yaml rename to kontor-spring/integration/src/main/resources/application.yaml diff --git a/integration/src/test/java/de/thpeetz/kontor/integration/IntegrationApplicationTests.java b/kontor-spring/integration/src/test/java/de/thpeetz/kontor/integration/IntegrationApplicationTests.java similarity index 100% rename from integration/src/test/java/de/thpeetz/kontor/integration/IntegrationApplicationTests.java rename to kontor-spring/integration/src/test/java/de/thpeetz/kontor/integration/IntegrationApplicationTests.java diff --git a/kontor-spring/persistence/build.gradle b/kontor-spring/persistence/build.gradle new file mode 100644 index 0000000..5ec721e --- /dev/null +++ b/kontor-spring/persistence/build.gradle @@ -0,0 +1,14 @@ +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-validation' + //implementation 'org.postgresql:postgresql' + // compileOnly libs.spring.data + implementation 'org.hibernate.orm:hibernate-community-dialects' + implementation libs.hypersistence + implementation libs.mail + implementation libs.jackson + implementation libs.gson + implementation libs.json + compileOnly 'org.projectlombok:lombok' + annotationProcessor 'org.projectlombok:lombok' +} diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Assignment.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Assignment.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Assignment.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Assignment.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Permission.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Permission.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Permission.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Permission.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Profile.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Profile.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Profile.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Profile.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Token.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Token.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/data/Token.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/data/Token.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/AssignmentRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/AssignmentRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/AssignmentRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/AssignmentRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/MailAccountRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/MailAccountRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/MailAccountRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/MailAccountRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/PermissionRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/PermissionRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/PermissionRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/PermissionRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/ProfileRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/ProfileRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/admin/repository/ProfileRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/admin/repository/ProfileRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Article.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Article.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Article.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Article.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthor.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthor.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthor.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthor.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthorRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleAuthorRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleAuthorRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/ArticleRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/ArticleRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Author.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Author.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Author.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Author.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/AuthorRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/AuthorRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/AuthorRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/AuthorRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Book.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Book.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/Book.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/Book.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthor.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthor.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthor.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthor.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthorRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookAuthorRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookAuthorRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisher.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisher.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisher.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisher.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisherRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/bookshelf/data/BookshelfPublisherRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/bookshelf/data/BookshelfPublisherRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Artist.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Artist.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Artist.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Artist.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Comic.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Comic.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Comic.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Comic.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/ComicWork.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/ComicWork.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/ComicWork.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/ComicWork.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Issue.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Issue.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Issue.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Issue.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/IssueWork.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/IssueWork.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/IssueWork.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/IssueWork.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Publisher.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Publisher.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Publisher.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Publisher.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/StoryArc.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/StoryArc.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/StoryArc.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/StoryArc.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/TradePaperback.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/TradePaperback.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/TradePaperback.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/TradePaperback.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Volume.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Volume.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Volume.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Volume.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Worktype.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Worktype.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/data/Worktype.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/data/Worktype.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ArtistRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ArtistRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ArtistRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ArtistRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ComicRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ComicRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ComicWorkRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicWorkRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/ComicWorkRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/ComicWorkRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/IssueRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/IssueRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/IssueWorkRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueWorkRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/IssueWorkRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/IssueWorkRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/PublisherRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/PublisherRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/PublisherRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/PublisherRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/StoryArcRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/StoryArcRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/StoryArcRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/StoryArcRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/TradePaperbackRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/TradePaperbackRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/TradePaperbackRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/VolumeRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/VolumeRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/VolumeRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/VolumeRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/WorktypeRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/WorktypeRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/comics/repository/WorktypeRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/comics/repository/WorktypeRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/data/AbstractEntity.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/common/data/AbstractEntity.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/data/AbstractEntity.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/common/data/AbstractEntity.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/common/data/AbstractLinkEntity.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/common/data/AbstractLinkEntity.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/common/data/AbstractLinkEntity.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/common/data/AbstractLinkEntity.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/data/Mail.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/mailclient/data/Mail.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/data/Mail.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/mailclient/data/Mail.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/data/MailAccount.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/mailclient/data/MailAccount.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/mailclient/data/MailAccount.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/mailclient/data/MailAccount.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaActor.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaActor.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaActor.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaActor.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaActorFile.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaActorFile.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaActorFile.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaActorFile.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaArticle.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaArticle.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaArticle.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaArticle.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaFile.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaFile.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaFile.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaFile.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaVideo.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaVideo.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/data/MediaVideo.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/data/MediaVideo.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaActorFileRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorFileRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaActorFileRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorFileRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaActorRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaActorRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaActorRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaArticleRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaArticleRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaArticleRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaArticleRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaFileRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaFileRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaFileRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaFileRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaVideoRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaVideoRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/media/repository/MediaVideoRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/media/repository/MediaVideoRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Card.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Card.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Card.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Card.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/CardSet.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/CardSet.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/CardSet.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/CardSet.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/FieldPosition.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/FieldPosition.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/FieldPosition.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/FieldPosition.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Player.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Player.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Player.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Player.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Rooster.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Rooster.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Rooster.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Rooster.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Sport.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Sport.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Sport.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Sport.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Team.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Team.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Team.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Team.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Vendor.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Vendor.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/data/Vendor.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/data/Vendor.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/CardRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/CardRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/CardSetRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardSetRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/CardSetRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/CardSetRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/FieldPositionRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/FieldPositionRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/FieldPositionRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/PlayerRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/PlayerRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/PlayerRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/PlayerRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/RoosterRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/RoosterRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/RoosterRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/RoosterRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/SportRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/SportRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/SportRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/SportRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/TeamRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/TeamRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/TeamRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/TeamRepository.java diff --git a/kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/VendorRepository.java b/kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/VendorRepository.java similarity index 100% rename from kontor-spring/src/main/java/de/thpeetz/kontor/tysc/repository/VendorRepository.java rename to kontor-spring/persistence/src/main/java/de/thpeetz/kontor/data/tysc/repository/VendorRepository.java diff --git a/kontor-spring/settings.gradle b/kontor-spring/settings.gradle index 226b285..a35cad6 100644 --- a/kontor-spring/settings.gradle +++ b/kontor-spring/settings.gradle @@ -17,9 +17,9 @@ pluginManagement { maven { setUrl("https://repo.spring.io/milestone") } maven { url 'https://plugins.gradle.org/m2/' } } -// plugins { -// id 'com.vaadin' version "${vaadinVersion}" -// } } rootProject.name = 'kontor-spring' +include 'persistence' +include 'integration' +include 'application'