diff --git a/.env b/.env index da41f78d5c..ad887513cd 100644 --- a/.env +++ b/.env @@ -10,4 +10,4 @@ WM_IMAGE=ghcr.io/windmill-labs/windmill:main # To rotate logs, set the following variables: #LOG_MAX_SIZE=10m -#LOG_MAX_FILE=3 +#LOG_MAX_FILE=3 \ No newline at end of file diff --git a/.github/change-versions.sh b/.github/change-versions.sh index 699b87b0d7..454f373038 100755 --- a/.github/change-versions.sh +++ b/.github/change-versions.sh @@ -24,4 +24,4 @@ sed -i -e "/^wmill_pg =/s/= .*/= \">=$VERSION\"/" ${root_dirpath}/lsp/Pipfile sed -i -zE "s/name = \"windmill\"\nversion = \"[^\"]*\"\\n(.*)/name = \"windmill\"\nversion = \"$VERSION\"\\n\\1/" ${root_dirpath}/backend/Cargo.lock -cd ${root_dirpath}/frontend && npm i --package-lock-only +cd ${root_dirpath}/frontend && npm i --package-lock-only --ignore-scripts diff --git a/.github/workflows/build-publish-rh-image.yml b/.github/workflows/build-publish-rh-image.yml index 10d2fe43d9..030c617777 100644 --- a/.github/workflows/build-publish-rh-image.yml +++ b/.github/workflows/build-publish-rh-image.yml @@ -64,7 +64,7 @@ jobs: platforms: linux/amd64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core secrets: | rh_username=${{ secrets.RH_USERNAME }} rh_password=${{ secrets.RH_PASSWORD }} @@ -81,7 +81,7 @@ jobs: platforms: linux/arm64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,license,otel,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,postgres_trigger,gcp_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core secrets: | rh_username=${{ secrets.RH_USERNAME }} rh_password=${{ secrets.RH_PASSWORD }} @@ -111,8 +111,7 @@ jobs: - uses: actions/upload-artifact@v4 with: name: RHEL9-amd64 build - path: - ${{ steps.extract-ee-amd64.outputs.destination + path: ${{ steps.extract-ee-amd64.outputs.destination }}/windmill-ee-amd64-rhel9 # - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/docker-image-rpi4.yml b/.github/workflows/docker-image-rpi4.yml index ed4fd7810b..b275ad2154 100644 --- a/.github/workflows/docker-image-rpi4.yml +++ b/.github/workflows/docker-image-rpi4.yml @@ -67,7 +67,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - features=embedding,parquet,openidconnect,license,http_trigger,zip,oauth2,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages + features=embedding,parquet,openidconnect,license,http_trigger,zip,oauth2,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,all_languages,deno_core tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:dev ${{ steps.meta-public.outputs.tags }} diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 4b5b19c74a..06f8003c96 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,8 @@ env: REGISTRY: ghcr.io - IMAGE_NAME: - ${{ github.event_name != 'pull_request' && github.event_name != + IMAGE_NAME: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && github.repository || 'windmill-labs/windmill-test' }} - DEV_SHA: - ${{ github.event_name != 'pull_request' && github.event_name != + DEV_SHA: ${{ github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && 'dev' || github.event.inputs.tag || github.sha }} name: Build windmill:main on: @@ -40,8 +38,7 @@ permissions: write-all jobs: build: runs-on: ubicloud - if: - (github.event_name != 'workflow_dispatch') || (github.event.inputs && + if: (github.event_name != 'workflow_dispatch') || (github.event.inputs && !github.event.inputs.ee) steps: - uses: actions/checkout@v4 @@ -95,7 +92,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - features=embedding,parquet,openidconnect,jemalloc,license,http_trigger,zip,oauth2,dind,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,agent_worker_server,all_languages + features=embedding,parquet,openidconnect,jemalloc,license,http_trigger,zip,oauth2,dind,postgres_trigger,mqtt_trigger,websocket,smtp,static_frontend,agent_worker_server,all_languages,deno_core tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.DEV_SHA }} ${{ steps.meta-public.outputs.tags }} @@ -157,7 +154,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true build-args: | - features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,agent_worker_server,tantivy,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,otel,dind,postgres_trigger,mqtt_trigger,gcp_trigger,websocket,smtp,static_frontend,all_languages + features=enterprise,enterprise_saml,stripe,embedding,parquet,prometheus,openidconnect,cloud,jemalloc,agent_worker_server,tantivy,license,http_trigger,zip,oauth2,kafka,sqs_trigger,nats,otel,dind,postgres_trigger,mqtt_trigger,gcp_trigger,websocket,smtp,static_frontend,all_languages,deno_core tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }} ${{ steps.meta-ee-public.outputs.tags }} @@ -315,7 +312,7 @@ jobs: needs: [run_integration_test, build] if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || - startsWith(github.ref, 'refs/tags/v')) && (github.event_name != 'workflow_dispatch') + startsWith(github.ref, 'refs/tags/v')) && (github.event_name != 'workflow_dispatch') steps: - uses: actions/checkout@v4 with: @@ -355,7 +352,7 @@ jobs: verify_ee_image_vulnerabilities: runs-on: ubicloud needs: [tag_latest_ee] - if: startsWith(github.ref, 'refs/tags/v') && (github.event_name != 'workflow_dispatch') + if: startsWith(github.ref, 'refs/tags/v') && (github.event_name != 'workflow_dispatch') steps: - name: Checkout code uses: actions/checkout@v4 @@ -397,8 +394,7 @@ jobs: build_ee_nsjail: needs: [build_ee] runs-on: ubicloud - if: - (github.event_name != 'pull_request') && ((github.event_name != 'workflow_dispatch') || (github.event.inputs.ee || github.event.inputs.nsjail)) + if: (github.event_name != 'pull_request') && ((github.event_name != 'workflow_dispatch') || (github.event.inputs.ee || github.event.inputs.nsjail)) steps: - uses: actions/checkout@v4 @@ -437,7 +433,7 @@ jobs: run: | sed -i 's|FROM ghcr.io/windmill-labs/windmill-ee:dev|FROM ghcr.io/${{ env.IMAGE_NAME }}-ee:${{ env.DEV_SHA }}|' ./docker/DockerfileNsjail cat ./docker/DockerfileNsjail | grep "FROM" - + - name: Build and push publicly ee uses: depot/build-push-action@v1 with: @@ -451,12 +447,10 @@ jobs: ${{ steps.meta-ee-public.outputs.labels }} org.opencontainers.image.licenses=Windmill-Enterprise-License - publish_ecr_s3: needs: [build_ee_nsjail] runs-on: ubicloud-standard-2-arm - if: - (github.event_name != 'pull_request') && (github.event_name != + if: (github.event_name != 'pull_request') && (github.event_name != 'workflow_dispatch') env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a133b737a..12c7a5399f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,93 @@ # Changelog +## [1.483.2](https://github.com/windmill-labs/windmill/compare/v1.483.1...v1.483.2) (2025-04-23) + + +### Bug Fixes + +* batch reruns query missing workspace_id check in subquery ([#5652](https://github.com/windmill-labs/windmill/issues/5652)) ([444a6ab](https://github.com/windmill-labs/windmill/commit/444a6abad670114c52e44f3606bf6fefc5d3fd98)) +* **frontend:** fix validity check ([#5654](https://github.com/windmill-labs/windmill/issues/5654)) ([c41c1eb](https://github.com/windmill-labs/windmill/commit/c41c1eb587bf22364f1202310a0c64b6040ab968)) +* improve MySQL datetime parser timezone handling (WIN-1155) ([#5645](https://github.com/windmill-labs/windmill/issues/5645)) ([5bca8f6](https://github.com/windmill-labs/windmill/commit/5bca8f60e970cc67839edb5dc491685f36cf0499)) +* track relative imports in python and ts even if lockfile is provided ([e316dbd](https://github.com/windmill-labs/windmill/commit/e316dbd9bdd5c59e9aaba6a4472bb7d832834e84)) + +## [1.483.1](https://github.com/windmill-labs/windmill/compare/v1.483.0...v1.483.1) (2025-04-19) + + +### Bug Fixes + +* pin libxml to 0.3.3 ([e5595e4](https://github.com/windmill-labs/windmill/commit/e5595e41b5c87704d814eff95bc00b82195728ba)) + +## [1.483.0](https://github.com/windmill-labs/windmill/compare/v1.482.1...v1.483.0) (2025-04-19) + + +### Features + +* handle different aws auth resource type ([#5637](https://github.com/windmill-labs/windmill/issues/5637)) ([5b123b0](https://github.com/windmill-labs/windmill/commit/5b123b01a1318208450789b5bcade447a0b331c7)) +* oidc support for sqs trigger ([#5614](https://github.com/windmill-labs/windmill/issues/5614)) ([34b307b](https://github.com/windmill-labs/windmill/commit/34b307b2be1f6cf92a81694325f4c333bdd7b055)) + + +### Bug Fixes + +* fix click outside popover fullscreen ([#5631](https://github.com/windmill-labs/windmill/issues/5631)) ([0811457](https://github.com/windmill-labs/windmill/commit/081145726a5d4ab81510a7637126a036823a1565)) +* improve flow editor step switch performance ([58fa4c8](https://github.com/windmill-labs/windmill/commit/58fa4c80062a5704bbd13ddda1b2f00c7c9e40dd)) +* linter in early stop doesn't include flow_input ([#5638](https://github.com/windmill-labs/windmill/issues/5638)) ([6a9bdfd](https://github.com/windmill-labs/windmill/commit/6a9bdfd3bd52ff802b6a71c3ae9504bfe7d0421f)) +* output picker output opening doesn't change id ([#5641](https://github.com/windmill-labs/windmill/issues/5641)) ([64c72b6](https://github.com/windmill-labs/windmill/commit/64c72b6fce669e47f04dc620750840857cbe66cf)) + +## [1.482.1](https://github.com/windmill-labs/windmill/compare/v1.482.0...v1.482.1) (2025-04-16) + + +### Bug Fixes + +* flow editor workspace script test use actual workspace script hash ([24e893b](https://github.com/windmill-labs/windmill/commit/24e893b8c50fafdb41f4b6e1777cb34aceafc466)) +* **frontend:** postgres remove selectedTable ([#5386](https://github.com/windmill-labs/windmill/issues/5386)) ([bd7c6a2](https://github.com/windmill-labs/windmill/commit/bd7c6a2a46047de5fe89753decdfdf1f4851ee3f)) +* **openapi:** fix openapi def of batch re-run jobs ([cb8731e](https://github.com/windmill-labs/windmill/commit/cb8731e7e37fb6cd052f5dae6fdce46e6ca2409c)) +* show workspace color if superadmin and not in workspace + change workspace name when switching workspace ([#5625](https://github.com/windmill-labs/windmill/issues/5625)) ([cc4384f](https://github.com/windmill-labs/windmill/commit/cc4384f48cc89f883237a2082d854d69a7b5dc56)) + +## [1.482.0](https://github.com/windmill-labs/windmill/compare/v1.481.0...v1.482.0) (2025-04-15) + + +### Features + +* add diff toggle to flow inline scripts ([#5550](https://github.com/windmill-labs/windmill/issues/5550)) ([b3ecde3](https://github.com/windmill-labs/windmill/commit/b3ecde3316252bcd7323de98149786349019ba7e)) +* add gcp trigger ([#5501](https://github.com/windmill-labs/windmill/issues/5501)) ([6339775](https://github.com/windmill-labs/windmill/commit/63397754046eed41d32e28d4698db37b4c9b9710)) +* add wildcards filter for worker/label/tags ([62f14d1](https://github.com/windmill-labs/windmill/commit/62f14d1cb95e3f1c7de85c46e1c6bb092247656c)) +* add windmill context to autocomplete ([#5548](https://github.com/windmill-labs/windmill/issues/5548)) ([b47c151](https://github.com/windmill-labs/windmill/commit/b47c15165f93ca68a58f81cf2b86fc9467155482)) +* agent workers v2 using http ([#5588](https://github.com/windmill-labs/windmill/issues/5588)) ([63fa499](https://github.com/windmill-labs/windmill/commit/63fa4990153f33434b49269922f7803d04e407cd)) +* Batch re-run ([#5553](https://github.com/windmill-labs/windmill/issues/5553)) ([26b5ea5](https://github.com/windmill-labs/windmill/commit/26b5ea5023a100c57d077910c99a5e5703edf1c1)) +* **frontend:** app editor code input component (monaco) ([#5566](https://github.com/windmill-labs/windmill/issues/5566)) ([177e16b](https://github.com/windmill-labs/windmill/commit/177e16bb18eed0d1c454b967aaa59547f61e8d26)) +* handle sending selected lines to ai context ([#5527](https://github.com/windmill-labs/windmill/issues/5527)) ([5abdc3e](https://github.com/windmill-labs/windmill/commit/5abdc3e4403b5c604309bd99a24d7a2847a17b9b)) +* Implement sending diff to ai ([#5510](https://github.com/windmill-labs/windmill/issues/5510)) ([e118d2c](https://github.com/windmill-labs/windmill/commit/e118d2cd5f9c641884a76229802a5228ef41f1a5)) +* make azure a standalone AI provider ([#5558](https://github.com/windmill-labs/windmill/issues/5558)) ([2c5e58c](https://github.com/windmill-labs/windmill/commit/2c5e58cf1ab9225d516540b38d9e4dde482a3a7f)) +* migrate to svelte5 + vite6 ([#4813](https://github.com/windmill-labs/windmill/issues/4813)) ([3c99b3f](https://github.com/windmill-labs/windmill/commit/3c99b3fdc7b78b1cdc7d8fb21d999296695f7889)) +* **postgres-trigger:** postgres trigger fix circular dependencies and add remove associate resource ([#5606](https://github.com/windmill-labs/windmill/issues/5606)) ([1daeb2f](https://github.com/windmill-labs/windmill/commit/1daeb2f48f3026621b3ffc58e10f048d5911906c)) +* **python:** per import requirement pin ([#5520](https://github.com/windmill-labs/windmill/issues/5520)) ([0b6d017](https://github.com/windmill-labs/windmill/commit/0b6d017fedc31e790a76cf29a1adaaf2a72acc61)) +* signed s3 objects ([#5593](https://github.com/windmill-labs/windmill/issues/5593)) ([b9e8796](https://github.com/windmill-labs/windmill/commit/b9e879618bc223ce17effde8bb4c5d1df2ad6df5)) + + +### Bug Fixes + +* add support for ${} syntax without default in bash ([#5594](https://github.com/windmill-labs/windmill/issues/5594)) ([3950cfd](https://github.com/windmill-labs/windmill/commit/3950cfd7e3297d7f8ec56430d6462f6b67ecd3c2)) +* app editor svelte 5 fixes ([#5570](https://github.com/windmill-labs/windmill/issues/5570)) ([b926076](https://github.com/windmill-labs/windmill/commit/b9260769883348ecd5aeb5684f527a8bf0073928)) +* binding not working in nested array script arg ([#5585](https://github.com/windmill-labs/windmill/issues/5585)) ([f5d46d5](https://github.com/windmill-labs/windmill/commit/f5d46d5751bc875b7f4da1db06be40571ac55ab8)) +* **cli:** properly handle enabled/disabled updates of schedules ([2629458](https://github.com/windmill-labs/windmill/commit/26294584d6c2ca02bbc4fc5f28cb8df6a5fb3790)) +* **cli:** wmill-locks improvement ([8d062c4](https://github.com/windmill-labs/windmill/commit/8d062c47ecd9e84a81140d5c59814da9217dd434)) +* Dynamic select does not work with tag //native ([#5576](https://github.com/windmill-labs/windmill/issues/5576)) ([1f3e7d9](https://github.com/windmill-labs/windmill/commit/1f3e7d9029051832db6ab1755b3cad38176a9e96)), closes [#5490](https://github.com/windmill-labs/windmill/issues/5490) +* fix list jobs by tag ([0c3cb37](https://github.com/windmill-labs/windmill/commit/0c3cb3700a3fb9b69e396487bd7491dbbd8861c0)) +* flow editor svelte 5 issues ([#5567](https://github.com/windmill-labs/windmill/issues/5567)) ([4f6be6e](https://github.com/windmill-labs/windmill/commit/4f6be6ed340e26bf1ed95398a9dc9f1eb41b33dd)) +* freeze when clicking script history diff button ([#5581](https://github.com/windmill-labs/windmill/issues/5581)) ([07094b6](https://github.com/windmill-labs/windmill/commit/07094b6aa21f10688b138d2a81d4fd5833f003fc)) +* **frontend:** app builder - force json configuration in rich result ([#5565](https://github.com/windmill-labs/windmill/issues/5565)) ([6fae3a5](https://github.com/windmill-labs/windmill/commit/6fae3a566be06dae88ece8ec23f5723cd8f3f2b9)) +* **frontend:** load all step jobs ([#5617](https://github.com/windmill-labs/windmill/issues/5617)) ([16bed59](https://github.com/windmill-labs/windmill/commit/16bed593dfd0b735a92d0928df5091547b98ae79)) +* **frontend:** prevent deploy popover to show if deploy dropdown is open ([#5542](https://github.com/windmill-labs/windmill/issues/5542)) ([c2180c6](https://github.com/windmill-labs/windmill/commit/c2180c6eb34e14fe2292ff40aa6a99c627698d5e)) +* **frontend:** proper each block binding + better app settings reactivity ([#5568](https://github.com/windmill-labs/windmill/issues/5568)) ([4c71af8](https://github.com/windmill-labs/windmill/commit/4c71af8a74627d0ba76917e0dac0ac9e5e984cca)) +* improve app image picker UX ([#5589](https://github.com/windmill-labs/windmill/issues/5589)) ([f497a4b](https://github.com/windmill-labs/windmill/commit/f497a4bfae8d1bff097e0c2c9df8381a531dfeb9)) +* legacy script gen model selection ([#5574](https://github.com/windmill-labs/windmill/issues/5574)) ([3507925](https://github.com/windmill-labs/windmill/commit/3507925624a43804a3be463b6f7913cea5821384)) +* mssql ca_cert deserializing ([#5587](https://github.com/windmill-labs/windmill/issues/5587)) ([b4f8c88](https://github.com/windmill-labs/windmill/commit/b4f8c88c19bd4f844c3ecb53ececc340ee326b0e)) +* number input in app multiselect yields NOT_NUMBER ([#5616](https://github.com/windmill-labs/windmill/issues/5616)) ([4aae6ab](https://github.com/windmill-labs/windmill/commit/4aae6ab634280adc1de9abd890100b7c12c89158)) +* prevent invalid returned ai completion object errors ([#5564](https://github.com/windmill-labs/windmill/issues/5564)) ([9276c71](https://github.com/windmill-labs/windmill/commit/9276c717a21aaee3241845a9cc00d3fb6bce9eb9)) +* Remaining svelte 5 bugs ([#5563](https://github.com/windmill-labs/windmill/issues/5563)) ([6e9ec63](https://github.com/windmill-labs/windmill/commit/6e9ec6323c265a747ef8696865297e6d47abb016)) +* tenant id to never be undefined on teams ([#5572](https://github.com/windmill-labs/windmill/issues/5572)) ([102b58a](https://github.com/windmill-labs/windmill/commit/102b58a5f40dde22f15700d4b6c11eb7f3fbf4bb)) +* validate saved module before passing to flow module editor ([#5580](https://github.com/windmill-labs/windmill/issues/5580)) ([2eb1a16](https://github.com/windmill-labs/windmill/commit/2eb1a161d15627b440195b65eec54998561f4ef6)) + ## [1.481.0](https://github.com/windmill-labs/windmill/compare/v1.480.1...v1.481.0) (2025-04-02) diff --git a/Dockerfile b/Dockerfile index d00275f925..0c824dbb83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,7 @@ FROM node:20-alpine as frontend # install dependencies WORKDIR /frontend COPY ./frontend/package.json ./frontend/package-lock.json ./ +COPY ./frontend/scripts/ ./scripts/ RUN npm ci # Copy all local files into the image. diff --git a/backend/.sqlx/query-f4f6336fc671b00bed7835124892f7a4d3bbe673f7c48153819dab385a5cb357.json b/backend/.sqlx/query-1312b7fd622cc814a406c85dbbff61f003c29185c267642cfd898075ebda855d.json similarity index 74% rename from backend/.sqlx/query-f4f6336fc671b00bed7835124892f7a4d3bbe673f7c48153819dab385a5cb357.json rename to backend/.sqlx/query-1312b7fd622cc814a406c85dbbff61f003c29185c267642cfd898075ebda855d.json index b20ae56e30..582896cc65 100644 --- a/backend/.sqlx/query-f4f6336fc671b00bed7835124892f7a4d3bbe673f7c48153819dab385a5cb357.json +++ b/backend/.sqlx/query-1312b7fd622cc814a406c85dbbff61f003c29185c267642cfd898075ebda855d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n gcp_trigger\n WHERE \n workspace_id = $1 AND \n path = $2\n ", + "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n subscription_mode AS \"subscription_mode: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n gcp_trigger\n WHERE \n workspace_id = $1 AND \n path = $2\n ", "describe": { "columns": [ { @@ -45,56 +45,71 @@ }, { "ordinal": 6, + "name": "subscription_mode: _", + "type_info": { + "Custom": { + "name": "gcp_subscription_mode", + "kind": { + "Enum": [ + "create_update", + "existing" + ] + } + } + } + }, + { + "ordinal": 7, "name": "path", "type_info": "Varchar" }, { - "ordinal": 7, + "ordinal": 8, "name": "script_path", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "is_flow", "type_info": "Bool" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 10, + "ordinal": 11, "name": "email", "type_info": "Varchar" }, { - "ordinal": 11, + "ordinal": 12, "name": "edited_at", "type_info": "Timestamptz" }, { - "ordinal": 12, + "ordinal": 13, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 13, + "ordinal": 14, "name": "last_server_ping", "type_info": "Timestamptz" }, { - "ordinal": 14, + "ordinal": 15, "name": "extra_perms", "type_info": "Jsonb" }, { - "ordinal": 15, + "ordinal": 16, "name": "error", "type_info": "Text" }, { - "ordinal": 16, + "ordinal": 17, "name": "enabled", "type_info": "Bool" } @@ -118,6 +133,7 @@ false, false, false, + false, true, true, false, @@ -125,5 +141,5 @@ false ] }, - "hash": "f4f6336fc671b00bed7835124892f7a4d3bbe673f7c48153819dab385a5cb357" + "hash": "1312b7fd622cc814a406c85dbbff61f003c29185c267642cfd898075ebda855d" } diff --git a/backend/.sqlx/query-26761fbd7953416eb391de47b1694e0f4ab2bb96a6d838f1b1fdce4b58a8f5d4.json b/backend/.sqlx/query-26761fbd7953416eb391de47b1694e0f4ab2bb96a6d838f1b1fdce4b58a8f5d4.json new file mode 100644 index 0000000000..b14dab2503 --- /dev/null +++ b/backend/.sqlx/query-26761fbd7953416eb391de47b1694e0f4ab2bb96a6d838f1b1fdce4b58a8f5d4.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "SELECT jsonb_build_object(\n 'kind', jb.kind,\n 'script_path', jb.runnable_path,\n 'latest_schema', COALESCE(\n (SELECT DISTINCT ON (s.path) s.schema FROM script s WHERE s.workspace_id = $1 AND s.path = jb.runnable_path AND jb.kind = 'script' ORDER BY s.path, s.created_at DESC),\n (SELECT flow_version.schema FROM flow LEFT JOIN flow_version ON flow_version.id = flow.versions[array_upper(flow.versions, 1)] WHERE flow.workspace_id = $1 AND flow.path = jb.runnable_path AND jb.kind = 'flow')\n ),\n 'schemas', ARRAY(\n SELECT jsonb_build_object(\n 'script_hash', LPAD(TO_HEX(COALESCE(s.hash, f.id)), 16, '0'),\n 'job_ids', ARRAY_AGG(DISTINCT j.id),\n 'schema', (ARRAY_AGG(COALESCE(s.schema, f.schema)))[1]\n ) FROM v2_job j\n LEFT JOIN script s ON s.hash = j.runnable_id AND j.kind = 'script'\n LEFT JOIN flow_version f ON f.id = j.runnable_id AND j.kind = 'flow'\n WHERE j.id = ANY(ARRAY_AGG(jb.id))\n GROUP BY COALESCE(s.hash, f.id)\n )\n ) FROM v2_job jb\n WHERE (jb.kind = 'flow' OR jb.kind = 'script')\n AND jb.workspace_id = $1 AND jb.id = ANY($2)\n GROUP BY jb.kind, jb.runnable_path", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "jsonb_build_object", + "type_info": "Jsonb" + } + ], + "parameters": { + "Left": [ + "Text", + "UuidArray" + ] + }, + "nullable": [ + null + ] + }, + "hash": "26761fbd7953416eb391de47b1694e0f4ab2bb96a6d838f1b1fdce4b58a8f5d4" +} diff --git a/backend/.sqlx/query-15fbe481789a7817bf37415fb935f9ed537fd7d3b266d928af4d5d3dd8bb5c18.json b/backend/.sqlx/query-2dcff8b16da75740c362015b2293f578a21813f038d75184a5034c37d4daf36e.json similarity index 85% rename from backend/.sqlx/query-15fbe481789a7817bf37415fb935f9ed537fd7d3b266d928af4d5d3dd8bb5c18.json rename to backend/.sqlx/query-2dcff8b16da75740c362015b2293f578a21813f038d75184a5034c37d4daf36e.json index 5f76c31d8b..5622b3691e 100644 --- a/backend/.sqlx/query-15fbe481789a7817bf37415fb935f9ed537fd7d3b266d928af4d5d3dd8bb5c18.json +++ b/backend/.sqlx/query-2dcff8b16da75740c362015b2293f578a21813f038d75184a5034c37d4daf36e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM\n gcp_trigger\n WHERE\n delivery_type != 'push'::DELIVERY_MODE AND\n enabled IS TRUE\n AND (last_server_ping IS NULL OR\n last_server_ping < now() - interval '15 seconds'\n )\n ", + "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n subscription_mode AS \"subscription_mode: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM\n gcp_trigger\n WHERE\n delivery_type != 'push'::DELIVERY_MODE AND\n enabled IS TRUE\n AND (last_server_ping IS NULL OR\n last_server_ping < now() - interval '15 seconds'\n )\n ", "describe": { "columns": [ { @@ -45,56 +45,71 @@ }, { "ordinal": 6, + "name": "subscription_mode: _", + "type_info": { + "Custom": { + "name": "gcp_subscription_mode", + "kind": { + "Enum": [ + "create_update", + "existing" + ] + } + } + } + }, + { + "ordinal": 7, "name": "path", "type_info": "Varchar" }, { - "ordinal": 7, + "ordinal": 8, "name": "script_path", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "is_flow", "type_info": "Bool" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 10, + "ordinal": 11, "name": "email", "type_info": "Varchar" }, { - "ordinal": 11, + "ordinal": 12, "name": "edited_at", "type_info": "Timestamptz" }, { - "ordinal": 12, + "ordinal": 13, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 13, + "ordinal": 14, "name": "last_server_ping", "type_info": "Timestamptz" }, { - "ordinal": 14, + "ordinal": 15, "name": "extra_perms", "type_info": "Jsonb" }, { - "ordinal": 15, + "ordinal": 16, "name": "error", "type_info": "Text" }, { - "ordinal": 16, + "ordinal": 17, "name": "enabled", "type_info": "Bool" } @@ -115,6 +130,7 @@ false, false, false, + false, true, true, false, @@ -122,5 +138,5 @@ false ] }, - "hash": "15fbe481789a7817bf37415fb935f9ed537fd7d3b266d928af4d5d3dd8bb5c18" + "hash": "2dcff8b16da75740c362015b2293f578a21813f038d75184a5034c37d4daf36e" } diff --git a/backend/.sqlx/query-3376b42d273c2499f3517c7754f4cdb6eae2e71e56bc8e5215559af967c81bd8.json b/backend/.sqlx/query-3376b42d273c2499f3517c7754f4cdb6eae2e71e56bc8e5215559af967c81bd8.json deleted file mode 100644 index 7229d4053f..0000000000 --- a/backend/.sqlx/query-3376b42d273c2499f3517c7754f4cdb6eae2e71e56bc8e5215559af967c81bd8.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT \n j.id,\n j.kind AS \"kind: _\",\n COALESCE(s.path, f.path) AS \"script_path!\",\n COALESCE(s.hash, f.id) AS \"script_hash!: _\",\n COALESCE(jc.started_at, jq.scheduled_for, make_date(1970, 1, 1)) AS \"scheduled_for!: _\",\n args AS input\n FROM v2_job j\n LEFT JOIN script s ON j.runnable_id = s.hash AND j.kind = 'script'\n LEFT JOIN flow_version f ON j.runnable_id = f.id AND j.runnable_path = f.path AND j.kind = 'flow'\n LEFT JOIN v2_job_completed jc ON jc.id = j.id\n LEFT JOIN v2_job_queue jq ON jq.id = j.id\n WHERE j.id = ANY($1)\n AND j.workspace_id = $2\n AND COALESCE(s.hash, f.id) IS NOT NULL\n AND COALESCE(s.path, f.path) IS NOT NULL", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Uuid" - }, - { - "ordinal": 1, - "name": "kind: _", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 2, - "name": "script_path!", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "script_hash!: _", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "scheduled_for!: _", - "type_info": "Timestamptz" - }, - { - "ordinal": 5, - "name": "input", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "UuidArray", - "Text" - ] - }, - "nullable": [ - false, - false, - null, - null, - null, - true - ] - }, - "hash": "3376b42d273c2499f3517c7754f4cdb6eae2e71e56bc8e5215559af967c81bd8" -} diff --git a/backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json b/backend/.sqlx/query-5237f9d3f57f4e799968a4a9630c984775d23c7a4dc1a7ad37528a46ab89d6bd.json similarity index 64% rename from backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json rename to backend/.sqlx/query-5237f9d3f57f4e799968a4a9630c984775d23c7a4dc1a7ad37528a46ab89d6bd.json index 5d1af3380d..f9c6646e3a 100644 --- a/backend/.sqlx/query-2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867.json +++ b/backend/.sqlx/query-5237f9d3f57f4e799968a4a9630c984775d23c7a4dc1a7ad37528a46ab89d6bd.json @@ -1,80 +1,95 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n aws_resource_path,\n message_attributes,\n queue_url,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n sqs_trigger\n WHERE \n workspace_id = $1 AND \n path = $2\n ", + "query": "\n SELECT\n aws_auth_resource_type AS \"aws_auth_resource_type: _\",\n aws_resource_path,\n message_attributes,\n queue_url,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n sqs_trigger\n WHERE \n workspace_id = $1 AND \n path = $2\n ", "describe": { "columns": [ { "ordinal": 0, + "name": "aws_auth_resource_type: _", + "type_info": { + "Custom": { + "name": "aws_auth_resource_type", + "kind": { + "Enum": [ + "oidc", + "credentials" + ] + } + } + } + }, + { + "ordinal": 1, "name": "aws_resource_path", "type_info": "Varchar" }, { - "ordinal": 1, + "ordinal": 2, "name": "message_attributes", "type_info": "TextArray" }, { - "ordinal": 2, + "ordinal": 3, "name": "queue_url", "type_info": "Varchar" }, { - "ordinal": 3, + "ordinal": 4, "name": "workspace_id", "type_info": "Varchar" }, { - "ordinal": 4, + "ordinal": 5, "name": "path", "type_info": "Varchar" }, { - "ordinal": 5, + "ordinal": 6, "name": "script_path", "type_info": "Varchar" }, { - "ordinal": 6, + "ordinal": 7, "name": "is_flow", "type_info": "Bool" }, { - "ordinal": 7, + "ordinal": 8, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "email", "type_info": "Varchar" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_at", "type_info": "Timestamptz" }, { - "ordinal": 10, + "ordinal": 11, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 11, + "ordinal": 12, "name": "last_server_ping", "type_info": "Timestamptz" }, { - "ordinal": 12, + "ordinal": 13, "name": "extra_perms", "type_info": "Jsonb" }, { - "ordinal": 13, + "ordinal": 14, "name": "error", "type_info": "Text" }, { - "ordinal": 14, + "ordinal": 15, "name": "enabled", "type_info": "Bool" } @@ -86,6 +101,7 @@ ] }, "nullable": [ + false, false, true, false, @@ -103,5 +119,5 @@ false ] }, - "hash": "2ef82fad8a6ccdc66228cfbce5393de351653ab9ac171fa0eea447c905440867" + "hash": "5237f9d3f57f4e799968a4a9630c984775d23c7a4dc1a7ad37528a46ab89d6bd" } diff --git a/backend/.sqlx/query-2a3992b5e9abcfbb032d10e142d98efa969dae26a7242eb7ac12593ed5421ef3.json b/backend/.sqlx/query-56264b88a9f428e79c6e531a0011e0dbed634f3b12dedaa5fee0362d670887f6.json similarity index 62% rename from backend/.sqlx/query-2a3992b5e9abcfbb032d10e142d98efa969dae26a7242eb7ac12593ed5421ef3.json rename to backend/.sqlx/query-56264b88a9f428e79c6e531a0011e0dbed634f3b12dedaa5fee0362d670887f6.json index 326e45bf24..e5e1ecd5de 100644 --- a/backend/.sqlx/query-2a3992b5e9abcfbb032d10e142d98efa969dae26a7242eb7ac12593ed5421ef3.json +++ b/backend/.sqlx/query-56264b88a9f428e79c6e531a0011e0dbed634f3b12dedaa5fee0362d670887f6.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "INSERT INTO app_version\n (app_id, value, created_by)\n VALUES ($1, $2::text::json, $3) RETURNING id", + "query": "INSERT INTO app_version\n (app_id, value, created_by, raw_app)\n VALUES ($1, $2::text::json, $3, $4) RETURNING id", "describe": { "columns": [ { @@ -13,12 +13,13 @@ "Left": [ "Int8", "Text", - "Varchar" + "Varchar", + "Bool" ] }, "nullable": [ false ] }, - "hash": "2a3992b5e9abcfbb032d10e142d98efa969dae26a7242eb7ac12593ed5421ef3" + "hash": "56264b88a9f428e79c6e531a0011e0dbed634f3b12dedaa5fee0362d670887f6" } diff --git a/backend/.sqlx/query-5ea1d8c87a17690942ca9e70e0b953e3b32a9a7a73784219d48f8e8932cdb0c8.json b/backend/.sqlx/query-5ea1d8c87a17690942ca9e70e0b953e3b32a9a7a73784219d48f8e8932cdb0c8.json deleted file mode 100644 index 304814543b..0000000000 --- a/backend/.sqlx/query-5ea1d8c87a17690942ca9e70e0b953e3b32a9a7a73784219d48f8e8932cdb0c8.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT jsonb_build_object(\n 'kind', jb.kind,\n 'script_path', jb.runnable_path,\n 'latest_schema', COALESCE(\n (SELECT DISTINCT ON (s.path) s.schema FROM script s WHERE s.path = jb.runnable_path AND jb.kind = 'script' ORDER BY s.path, s.created_at DESC),\n (SELECT flow_version.schema FROM flow LEFT JOIN flow_version ON flow_version.id = flow.versions[array_upper(flow.versions, 1)] WHERE flow.path = jb.runnable_path AND jb.kind = 'flow')\n ),\n 'schemas', ARRAY(\n SELECT jsonb_build_object(\n 'script_hash', LPAD(TO_HEX(COALESCE(s.hash, f.id)), 16, '0'),\n 'job_ids', ARRAY_AGG(DISTINCT j.id),\n 'schema', ANY_VALUE(COALESCE(s.schema, f.schema))\n ) FROM v2_job j\n LEFT JOIN script s ON s.hash = j.runnable_id AND j.kind = 'script'\n LEFT JOIN flow_version f ON f.id = j.runnable_id AND j.kind = 'flow'\n WHERE j.id = ANY(ARRAY_AGG(jb.id))\n GROUP BY COALESCE(s.hash, f.id)\n )\n ) FROM v2_job jb\n WHERE (jb.kind = 'flow' OR jb.kind = 'script')\n AND jb.workspace_id = $1 AND jb.id = ANY($2)\n GROUP BY jb.kind, jb.runnable_path", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "jsonb_build_object", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "Text", - "UuidArray" - ] - }, - "nullable": [ - null - ] - }, - "hash": "5ea1d8c87a17690942ca9e70e0b953e3b32a9a7a73784219d48f8e8932cdb0c8" -} diff --git a/backend/.sqlx/query-776909d3452aaf9e0ed41a5ec314b7bfc5bc8b6a76c98bf4daf7d715d18c52e6.json b/backend/.sqlx/query-776909d3452aaf9e0ed41a5ec314b7bfc5bc8b6a76c98bf4daf7d715d18c52e6.json new file mode 100644 index 0000000000..5c7405cec6 --- /dev/null +++ b/backend/.sqlx/query-776909d3452aaf9e0ed41a5ec314b7bfc5bc8b6a76c98bf4daf7d715d18c52e6.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO sqs_trigger (\n aws_auth_resource_type,\n aws_resource_path,\n queue_url,\n message_attributes,\n workspace_id, \n path, \n script_path, \n is_flow, \n email, \n enabled, \n edited_by\n ) \n VALUES (\n $1, \n $2, \n $3, \n $4, \n $5, \n $6, \n $7,\n $8,\n $9,\n $10,\n $11\n )", + "describe": { + "columns": [], + "parameters": { + "Left": [ + { + "Custom": { + "name": "aws_auth_resource_type", + "kind": { + "Enum": [ + "oidc", + "credentials" + ] + } + } + }, + "Varchar", + "Varchar", + "TextArray", + "Varchar", + "Varchar", + "Varchar", + "Bool", + "Varchar", + "Bool", + "Varchar" + ] + }, + "nullable": [] + }, + "hash": "776909d3452aaf9e0ed41a5ec314b7bfc5bc8b6a76c98bf4daf7d715d18c52e6" +} diff --git a/backend/.sqlx/query-8490024b96aa689d3c1bc5cbf94fcd8c5491732818404fee2397f00cccee0ad3.json b/backend/.sqlx/query-8490024b96aa689d3c1bc5cbf94fcd8c5491732818404fee2397f00cccee0ad3.json new file mode 100644 index 0000000000..9700ab141f --- /dev/null +++ b/backend/.sqlx/query-8490024b96aa689d3c1bc5cbf94fcd8c5491732818404fee2397f00cccee0ad3.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE \n sqs_trigger \n SET \n aws_auth_resource_type = $1,\n aws_resource_path = $2,\n queue_url = $3,\n message_attributes = $4, \n is_flow = $5, \n edited_by = $6, \n email = $7,\n script_path = $8,\n path = $9,\n edited_at = now(), \n error = NULL,\n server_id = NULL\n WHERE \n workspace_id = $10 AND \n path = $11\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + { + "Custom": { + "name": "aws_auth_resource_type", + "kind": { + "Enum": [ + "oidc", + "credentials" + ] + } + } + }, + "Varchar", + "Varchar", + "TextArray", + "Bool", + "Varchar", + "Varchar", + "Varchar", + "Varchar", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "8490024b96aa689d3c1bc5cbf94fcd8c5491732818404fee2397f00cccee0ad3" +} diff --git a/backend/.sqlx/query-1aa8ead10f8d994f6685d266fcbd409b0fff43111d9600e64b2348401ed8929d.json b/backend/.sqlx/query-8eabeee5527da4aad3f46ad185015262b4304667449f3e1a71efd7477a39f7fc.json similarity index 70% rename from backend/.sqlx/query-1aa8ead10f8d994f6685d266fcbd409b0fff43111d9600e64b2348401ed8929d.json rename to backend/.sqlx/query-8eabeee5527da4aad3f46ad185015262b4304667449f3e1a71efd7477a39f7fc.json index a73c4cf681..9302c273c3 100644 --- a/backend/.sqlx/query-1aa8ead10f8d994f6685d266fcbd409b0fff43111d9600e64b2348401ed8929d.json +++ b/backend/.sqlx/query-8eabeee5527da4aad3f46ad185015262b4304667449f3e1a71efd7477a39f7fc.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT workspace_id, path, url, script_path, is_flow, edited_by, email, edited_at, server_id, last_server_ping, extra_perms, error, enabled, filters as \"filters: _\", initial_messages as \"initial_messages: _\", url_runnable_args as \"url_runnable_args: _\", can_return_message FROM websocket_trigger\n WHERE workspace_id = $1", + "query": "\n SELECT \n workspace_id,\n path,\n url,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled,\n filters AS \"filters: _\",\n initial_messages AS \"initial_messages: _\",\n url_runnable_args AS \"url_runnable_args: _\",\n can_return_message\n FROM \n websocket_trigger\n WHERE \n workspace_id = $1\n ", "describe": { "columns": [ { @@ -114,5 +114,5 @@ false ] }, - "hash": "1aa8ead10f8d994f6685d266fcbd409b0fff43111d9600e64b2348401ed8929d" + "hash": "8eabeee5527da4aad3f46ad185015262b4304667449f3e1a71efd7477a39f7fc" } diff --git a/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json b/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json deleted file mode 100644 index de9b6ea295..0000000000 --- a/backend/.sqlx/query-9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO sqs_trigger (\n aws_resource_path,\n queue_url,\n message_attributes,\n workspace_id, \n path, \n script_path, \n is_flow, \n email, \n enabled, \n edited_by\n ) \n VALUES (\n $1, \n $2, \n $3, \n $4, \n $5, \n $6, \n $7,\n $8,\n $9,\n $10\n )", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Varchar", - "TextArray", - "Varchar", - "Varchar", - "Varchar", - "Bool", - "Varchar", - "Bool", - "Varchar" - ] - }, - "nullable": [] - }, - "hash": "9b9bc21023f10a0b4bb45879c7da8e119bffd2982b97fc900358506a0a14bbb8" -} diff --git a/backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json b/backend/.sqlx/query-a7df493316f632fc636e4c3c90bef4c98035b5dc808bb8379251c0b35d945ba0.json similarity index 61% rename from backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json rename to backend/.sqlx/query-a7df493316f632fc636e4c3c90bef4c98035b5dc808bb8379251c0b35d945ba0.json index be9f392048..39ba075077 100644 --- a/backend/.sqlx/query-2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7.json +++ b/backend/.sqlx/query-a7df493316f632fc636e4c3c90bef4c98035b5dc808bb8379251c0b35d945ba0.json @@ -1,80 +1,95 @@ { "db_name": "PostgreSQL", - "query": "SELECT * FROM sqs_trigger\n WHERE workspace_id = $1", + "query": "\n SELECT\n aws_auth_resource_type AS \"aws_auth_resource_type: _\",\n aws_resource_path,\n message_attributes,\n queue_url,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n sqs_trigger\n WHERE \n workspace_id = $1\n ", "describe": { "columns": [ { "ordinal": 0, - "name": "path", - "type_info": "Varchar" + "name": "aws_auth_resource_type: _", + "type_info": { + "Custom": { + "name": "aws_auth_resource_type", + "kind": { + "Enum": [ + "oidc", + "credentials" + ] + } + } + } }, { "ordinal": 1, - "name": "queue_url", - "type_info": "Varchar" - }, - { - "ordinal": 2, "name": "aws_resource_path", "type_info": "Varchar" }, { - "ordinal": 3, + "ordinal": 2, "name": "message_attributes", "type_info": "TextArray" }, { - "ordinal": 4, - "name": "script_path", + "ordinal": 3, + "name": "queue_url", "type_info": "Varchar" }, { - "ordinal": 5, - "name": "is_flow", - "type_info": "Bool" - }, - { - "ordinal": 6, + "ordinal": 4, "name": "workspace_id", "type_info": "Varchar" }, + { + "ordinal": 5, + "name": "path", + "type_info": "Varchar" + }, + { + "ordinal": 6, + "name": "script_path", + "type_info": "Varchar" + }, { "ordinal": 7, + "name": "is_flow", + "type_info": "Bool" + }, + { + "ordinal": 8, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "email", "type_info": "Varchar" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_at", "type_info": "Timestamptz" }, - { - "ordinal": 10, - "name": "extra_perms", - "type_info": "Jsonb" - }, { "ordinal": 11, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 12, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 13, + "ordinal": 12, "name": "last_server_ping", "type_info": "Timestamptz" }, + { + "ordinal": 13, + "name": "extra_perms", + "type_info": "Jsonb" + }, { "ordinal": 14, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 15, "name": "enabled", "type_info": "Bool" } @@ -85,7 +100,6 @@ ] }, "nullable": [ - false, false, false, true, @@ -95,6 +109,8 @@ false, false, false, + false, + false, true, true, true, @@ -102,5 +118,5 @@ false ] }, - "hash": "2b6c13191484b0c664f35e2c811082b00c44fd4a7e98a11b714133674a7b6da7" + "hash": "a7df493316f632fc636e4c3c90bef4c98035b5dc808bb8379251c0b35d945ba0" } diff --git a/backend/.sqlx/query-83d18f4e1cda2c1867168551d855d5626e766b5469c6976c986bdafc8b9407c5.json b/backend/.sqlx/query-a9f6e5720f748418ae52cf0e31778b9bbef26008803f2dd2a043bdb091b2ff20.json similarity index 63% rename from backend/.sqlx/query-83d18f4e1cda2c1867168551d855d5626e766b5469c6976c986bdafc8b9407c5.json rename to backend/.sqlx/query-a9f6e5720f748418ae52cf0e31778b9bbef26008803f2dd2a043bdb091b2ff20.json index 24cabff562..0310f2197b 100644 --- a/backend/.sqlx/query-83d18f4e1cda2c1867168551d855d5626e766b5469c6976c986bdafc8b9407c5.json +++ b/backend/.sqlx/query-a9f6e5720f748418ae52cf0e31778b9bbef26008803f2dd2a043bdb091b2ff20.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "INSERT INTO app_version\n (app_id, value, created_by)\n VALUES ($1, $2::text::json, $3) RETURNING id", + "query": "INSERT INTO app_version\n (app_id, value, created_by, raw_app)\n VALUES ($1, $2::text::json, $3, $4) RETURNING id", "describe": { "columns": [ { @@ -13,12 +13,13 @@ "Left": [ "Int8", "Text", - "Varchar" + "Varchar", + "Bool" ] }, "nullable": [ false ] }, - "hash": "83d18f4e1cda2c1867168551d855d5626e766b5469c6976c986bdafc8b9407c5" + "hash": "a9f6e5720f748418ae52cf0e31778b9bbef26008803f2dd2a043bdb091b2ff20" } diff --git a/backend/.sqlx/query-b61a00e6a8ca0a1d24e64fdc9223b077c957da8455ea747b0680923d8282425b.json b/backend/.sqlx/query-b61a00e6a8ca0a1d24e64fdc9223b077c957da8455ea747b0680923d8282425b.json deleted file mode 100644 index 80f0549739..0000000000 --- a/backend/.sqlx/query-b61a00e6a8ca0a1d24e64fdc9223b077c957da8455ea747b0680923d8282425b.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT\n j.kind AS \"kind!: JobKind\",\n j.runnable_id AS \"script_hash: _\",\n j.runnable_path AS script_path,\n COUNT(*) AS \"count!\",\n ANY_VALUE(COALESCE(f.schema, s.schema)) AS schema\n FROM v2_job j\n LEFT JOIN script s ON s.hash = j.runnable_id AND j.kind = 'script'\n LEFT JOIN flow_version f ON f.id = j.runnable_id AND f.path = j.runnable_path AND j.kind = 'flow'\n WHERE COALESCE(s.hash, f.id) IS NOT NULL\n AND COALESCE(s.path, f.path) IS NOT NULL\n AND j.workspace_id = $1 AND j.id = ANY($2)\n GROUP BY j.runnable_id, j.runnable_path, j.kind", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "kind!: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_hash: _", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 3, - "name": "count!", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "schema", - "type_info": "Json" - } - ], - "parameters": { - "Left": [ - "Text", - "UuidArray" - ] - }, - "nullable": [ - false, - true, - true, - null, - null - ] - }, - "hash": "b61a00e6a8ca0a1d24e64fdc9223b077c957da8455ea747b0680923d8282425b" -} diff --git a/backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json b/backend/.sqlx/query-bc0bedddcafad216c30c5061eef3f4ed8573cda89f655d6490d22f182e3f2f36.json similarity index 60% rename from backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json rename to backend/.sqlx/query-bc0bedddcafad216c30c5061eef3f4ed8573cda89f655d6490d22f182e3f2f36.json index 9715083ee6..2ccfd91e32 100644 --- a/backend/.sqlx/query-e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a.json +++ b/backend/.sqlx/query-bc0bedddcafad216c30c5061eef3f4ed8573cda89f655d6490d22f182e3f2f36.json @@ -1,80 +1,95 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n queue_url,\n aws_resource_path,\n message_attributes,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM\n sqs_trigger\n WHERE\n enabled IS TRUE\n AND (last_server_ping IS NULL OR\n last_server_ping < now() - interval '15 seconds'\n )\n ", + "query": "\n SELECT\n aws_auth_resource_type AS \"aws_auth_resource_type: _\",\n queue_url,\n aws_resource_path,\n message_attributes,\n workspace_id,\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM\n sqs_trigger\n WHERE\n enabled IS TRUE\n AND (last_server_ping IS NULL OR\n last_server_ping < now() - interval '15 seconds'\n )\n ", "describe": { "columns": [ { "ordinal": 0, + "name": "aws_auth_resource_type: _", + "type_info": { + "Custom": { + "name": "aws_auth_resource_type", + "kind": { + "Enum": [ + "oidc", + "credentials" + ] + } + } + } + }, + { + "ordinal": 1, "name": "queue_url", "type_info": "Varchar" }, { - "ordinal": 1, + "ordinal": 2, "name": "aws_resource_path", "type_info": "Varchar" }, { - "ordinal": 2, + "ordinal": 3, "name": "message_attributes", "type_info": "TextArray" }, { - "ordinal": 3, + "ordinal": 4, "name": "workspace_id", "type_info": "Varchar" }, { - "ordinal": 4, + "ordinal": 5, "name": "path", "type_info": "Varchar" }, { - "ordinal": 5, + "ordinal": 6, "name": "script_path", "type_info": "Varchar" }, { - "ordinal": 6, + "ordinal": 7, "name": "is_flow", "type_info": "Bool" }, { - "ordinal": 7, + "ordinal": 8, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "email", "type_info": "Varchar" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_at", "type_info": "Timestamptz" }, { - "ordinal": 10, + "ordinal": 11, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 11, + "ordinal": 12, "name": "last_server_ping", "type_info": "Timestamptz" }, { - "ordinal": 12, + "ordinal": 13, "name": "extra_perms", "type_info": "Jsonb" }, { - "ordinal": 13, + "ordinal": 14, "name": "error", "type_info": "Text" }, { - "ordinal": 14, + "ordinal": 15, "name": "enabled", "type_info": "Bool" } @@ -83,6 +98,7 @@ "Left": [] }, "nullable": [ + false, false, false, true, @@ -100,5 +116,5 @@ false ] }, - "hash": "e6adaebcade2e25be800e8b888b23c94caae2421f3cae7c06d6346bd6de1d94a" + "hash": "bc0bedddcafad216c30c5061eef3f4ed8573cda89f655d6490d22f182e3f2f36" } diff --git a/backend/.sqlx/query-0102308ffa1c0dbfba54d29246535bb81146a4cfae0ec408435570e0813a3bef.json b/backend/.sqlx/query-c2925a28212265bd9ac8e2d498b3588fc040c7a29ae6d9bab1f05af0b535e2ac.json similarity index 73% rename from backend/.sqlx/query-0102308ffa1c0dbfba54d29246535bb81146a4cfae0ec408435570e0813a3bef.json rename to backend/.sqlx/query-c2925a28212265bd9ac8e2d498b3588fc040c7a29ae6d9bab1f05af0b535e2ac.json index 06390d0ce9..eec208dbbb 100644 --- a/backend/.sqlx/query-0102308ffa1c0dbfba54d29246535bb81146a4cfae0ec408435570e0813a3bef.json +++ b/backend/.sqlx/query-c2925a28212265bd9ac8e2d498b3588fc040c7a29ae6d9bab1f05af0b535e2ac.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n gcp_trigger\n WHERE \n workspace_id = $1\n ", + "query": "\n SELECT\n gcp_resource_path,\n subscription_id,\n topic_id,\n workspace_id,\n delivery_type AS \"delivery_type: _\",\n delivery_config AS \"delivery_config: _\",\n subscription_mode AS \"subscription_mode: _\",\n path,\n script_path,\n is_flow,\n edited_by,\n email,\n edited_at,\n server_id,\n last_server_ping,\n extra_perms,\n error,\n enabled\n FROM \n gcp_trigger\n WHERE \n workspace_id = $1\n ", "describe": { "columns": [ { @@ -45,56 +45,71 @@ }, { "ordinal": 6, + "name": "subscription_mode: _", + "type_info": { + "Custom": { + "name": "gcp_subscription_mode", + "kind": { + "Enum": [ + "create_update", + "existing" + ] + } + } + } + }, + { + "ordinal": 7, "name": "path", "type_info": "Varchar" }, { - "ordinal": 7, + "ordinal": 8, "name": "script_path", "type_info": "Varchar" }, { - "ordinal": 8, + "ordinal": 9, "name": "is_flow", "type_info": "Bool" }, { - "ordinal": 9, + "ordinal": 10, "name": "edited_by", "type_info": "Varchar" }, { - "ordinal": 10, + "ordinal": 11, "name": "email", "type_info": "Varchar" }, { - "ordinal": 11, + "ordinal": 12, "name": "edited_at", "type_info": "Timestamptz" }, { - "ordinal": 12, + "ordinal": 13, "name": "server_id", "type_info": "Varchar" }, { - "ordinal": 13, + "ordinal": 14, "name": "last_server_ping", "type_info": "Timestamptz" }, { - "ordinal": 14, + "ordinal": 15, "name": "extra_perms", "type_info": "Jsonb" }, { - "ordinal": 15, + "ordinal": 16, "name": "error", "type_info": "Text" }, { - "ordinal": 16, + "ordinal": 17, "name": "enabled", "type_info": "Bool" } @@ -117,6 +132,7 @@ false, false, false, + false, true, true, false, @@ -124,5 +140,5 @@ false ] }, - "hash": "0102308ffa1c0dbfba54d29246535bb81146a4cfae0ec408435570e0813a3bef" + "hash": "c2925a28212265bd9ac8e2d498b3588fc040c7a29ae6d9bab1f05af0b535e2ac" } diff --git a/backend/.sqlx/query-c4f382045e5c47986e02f1e57667e6b3cb1d60f15fed9a24e3f05b1bd60c0fc8.json b/backend/.sqlx/query-c4f382045e5c47986e02f1e57667e6b3cb1d60f15fed9a24e3f05b1bd60c0fc8.json deleted file mode 100644 index e976cd0dd9..0000000000 --- a/backend/.sqlx/query-c4f382045e5c47986e02f1e57667e6b3cb1d60f15fed9a24e3f05b1bd60c0fc8.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT DISTINCT ON (j.runnable_path, j.kind) \n j.kind AS \"kind!: JobKind\",\n j.runnable_path AS script_path,\n NULL as \"script_hash: _\",\n -1::bigint as \"count!: _\",\n COALESCE(f.schema, s.schema) AS schema\n FROM v2_job j\n LEFT JOIN script s ON s.path = j.runnable_path AND j.kind = 'script'\n LEFT JOIN flow_version f ON f.path = j.runnable_path AND j.kind = 'flow'\n WHERE COALESCE(s.hash, f.id) IS NOT NULL\n AND j.workspace_id = $1 AND j.id = ANY($2)\n ORDER BY j.runnable_path, j.kind, COALESCE(f.created_at, s.created_at) DESC", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "kind!: JobKind", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_path", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "script_hash: _", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "count!: _", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "schema", - "type_info": "Json" - } - ], - "parameters": { - "Left": [ - "Text", - "UuidArray" - ] - }, - "nullable": [ - false, - true, - null, - null, - null - ] - }, - "hash": "c4f382045e5c47986e02f1e57667e6b3cb1d60f15fed9a24e3f05b1bd60c0fc8" -} diff --git a/backend/.sqlx/query-ccd4c7fe5fbdf1ab4bbbbd7d2a9b1ec3fc844ed286ff563f0c9a5c4778cfb718.json b/backend/.sqlx/query-ccd4c7fe5fbdf1ab4bbbbd7d2a9b1ec3fc844ed286ff563f0c9a5c4778cfb718.json deleted file mode 100644 index a457b8b2bf..0000000000 --- a/backend/.sqlx/query-ccd4c7fe5fbdf1ab4bbbbd7d2a9b1ec3fc844ed286ff563f0c9a5c4778cfb718.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "SELECT j.kind AS \"kind: _\", COALESCE(s.path, f.path) AS \"script_path!\", COALESCE(s.hash, f.id) AS \"script_hash!: _\", args\n FROM v2_job j\n LEFT JOIN script s ON j.runnable_id = s.hash AND j.kind = 'script'\n LEFT JOIN flow_version f ON j.runnable_id = f.id AND j.runnable_path = f.path AND j.kind = 'flow'\n WHERE j.id = ANY($1)\n AND j.workspace_id = $2\n AND COALESCE(s.hash, f.id) IS NOT NULL\n AND COALESCE(s.path, f.path) IS NOT NULL", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "kind: _", - "type_info": { - "Custom": { - "name": "job_kind", - "kind": { - "Enum": [ - "script", - "preview", - "flow", - "dependencies", - "flowpreview", - "script_hub", - "identity", - "flowdependencies", - "http", - "graphql", - "postgresql", - "noop", - "appdependencies", - "deploymentcallback", - "singlescriptflow", - "flowscript", - "flownode", - "appscript" - ] - } - } - } - }, - { - "ordinal": 1, - "name": "script_path!", - "type_info": "Varchar" - }, - { - "ordinal": 2, - "name": "script_hash!: _", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "args", - "type_info": "Jsonb" - } - ], - "parameters": { - "Left": [ - "UuidArray", - "Text" - ] - }, - "nullable": [ - false, - null, - null, - true - ] - }, - "hash": "ccd4c7fe5fbdf1ab4bbbbd7d2a9b1ec3fc844ed286ff563f0c9a5c4778cfb718" -} diff --git a/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json b/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json deleted file mode 100644 index aa29c1b4dd..0000000000 --- a/backend/.sqlx/query-f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE \n sqs_trigger \n SET \n aws_resource_path = $1,\n queue_url = $2,\n message_attributes = $3, \n is_flow = $4, \n edited_by = $5, \n email = $6,\n script_path = $7,\n path = $8,\n edited_at = now(), \n error = NULL,\n server_id = NULL\n WHERE \n workspace_id = $9 AND \n path = $10\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Varchar", - "TextArray", - "Bool", - "Varchar", - "Varchar", - "Varchar", - "Varchar", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "f68d23841e0e31cdf8633aaf0f32777e04e4965682e5b37afbe84194b756d5f5" -} diff --git a/backend/.vscode/settings.json b/backend/.vscode/settings.json index ab8340f5c8..6ebd36cf07 100644 --- a/backend/.vscode/settings.json +++ b/backend/.vscode/settings.json @@ -11,5 +11,5 @@ "remote.autoForwardPorts": true, "conventionalCommits.scopes": [ "restructring triggers, decoding trigger message on work" - ], + ] } diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 0f9558966f..c0256d1816 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -109,7 +109,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "once_cell", "version_check", ] @@ -122,7 +122,7 @@ checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", - "getrandom 0.2.15", + "getrandom 0.2.16", "once_cell", "version_check", "zerocopy 0.7.35", @@ -225,9 +225,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arc-swap" @@ -421,7 +421,7 @@ dependencies = [ "arrow-schema", "chrono", "half", - "indexmap 2.8.0", + "indexmap 2.9.0", "lexical-core", "num", "serde", @@ -793,9 +793,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.28.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f7720b74ed28ca77f90769a71fd8c637a0137f6fae4ae947e1050229cff57f" +checksum = "bfa9b6986f250236c27e5a204062434a773a13243d2ffc2955f37bdba4c5c6a1" dependencies = [ "bindgen 0.69.5", "cc", @@ -986,7 +986,7 @@ dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", - "h2 0.4.8", + "h2 0.4.9", "http 0.2.12", "http 1.3.1", "http-body 0.4.6", @@ -997,7 +997,7 @@ dependencies = [ "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -1189,9 +1189,9 @@ checksum = "7b7e4c2464d97fe331d41de9d5db0def0a96f4d823b8b32a2efd503578988973" [[package]] name = "backon" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d91570c01a8a5959b36ad7dd1c30642df24b6b3068710066f6809f7033bb7" +checksum = "fd0b50b1b78dbadd44ab18b3c794e496f3a139abb9fbc27d9c94c4eebbb96496" dependencies = [ "fastrand", "gloo-timers", @@ -1207,7 +1207,7 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.8.5", + "miniz_oxide 0.8.8", "object", "rustc-demangle", "windows-targets 0.52.6", @@ -1419,9 +1419,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a796731680be7931955498a16a10b2270c7762963d5d570fdbfe02dcbf314f" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" dependencies = [ "arrayref", "arrayvec", @@ -1581,9 +1581,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" +checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -1591,9 +1591,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.3" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" dependencies = [ "memchr", "serde", @@ -1833,9 +1833,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.17" +version = "1.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" dependencies = [ "jobserver", "libc", @@ -1975,9 +1975,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.35" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", "clap_derive", @@ -1985,9 +1985,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.35" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -2133,7 +2133,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "once_cell", "tiny-keccak", ] @@ -2321,9 +2321,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" dependencies = [ "crossbeam-utils", ] @@ -2588,9 +2588,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "data-url" @@ -2632,7 +2632,7 @@ dependencies = [ "glob", "half", "hashbrown 0.14.5", - "indexmap 2.8.0", + "indexmap 2.9.0", "itertools 0.12.1", "log", "num_cpus", @@ -2801,7 +2801,7 @@ dependencies = [ "datafusion-expr", "datafusion-physical-expr", "hashbrown 0.14.5", - "indexmap 2.8.0", + "indexmap 2.9.0", "itertools 0.12.1", "log", "regex-syntax 0.8.5", @@ -2830,7 +2830,7 @@ dependencies = [ "half", "hashbrown 0.14.5", "hex", - "indexmap 2.8.0", + "indexmap 2.9.0", "itertools 0.12.1", "log", "paste", @@ -2874,7 +2874,7 @@ dependencies = [ "futures", "half", "hashbrown 0.14.5", - "indexmap 2.8.0", + "indexmap 2.9.0", "itertools 0.12.1", "log", "once_cell", @@ -3006,7 +3006,7 @@ dependencies = [ "deno_media_type", "deno_path_util", "http 1.3.1", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "once_cell", "parking_lot 0.12.3", @@ -3047,7 +3047,7 @@ dependencies = [ "glob", "ignore", "import_map", - "indexmap 2.8.0", + "indexmap 2.9.0", "jsonc-parser", "log", "percent-encoding", @@ -3088,7 +3088,7 @@ dependencies = [ "deno_path_util", "deno_unsync", "futures", - "indexmap 2.8.0", + "indexmap 2.9.0", "libc", "memoffset", "parking_lot 0.12.3", @@ -3211,7 +3211,7 @@ dependencies = [ "deno_tls", "dyn-clone", "error_reporter", - "h2 0.4.8", + "h2 0.4.9", "hickory-resolver", "http 1.3.1", "http-body-util", @@ -3492,14 +3492,14 @@ dependencies = [ "elliptic-curve", "errno", "faster-hex", - "h2 0.4.8", + "h2 0.4.9", "hkdf", "http 1.3.1", "http-body-util", "hyper 1.6.0", "hyper-util", "idna", - "indexmap 2.8.0", + "indexmap 2.9.0", "ipnetwork", "k256", "lazy-regex", @@ -3575,7 +3575,7 @@ version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2d328067139909aa81522a5d90f119368b541fbddd73ab630e4d9f777865f0d" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "proc-macro-rules", "proc-macro2", "quote", @@ -3619,7 +3619,7 @@ dependencies = [ "deno_error", "deno_path_util", "deno_semver", - "indexmap 2.8.0", + "indexmap 2.9.0", "serde", "serde_json", "sys_traits", @@ -3856,7 +3856,7 @@ dependencies = [ "deno_core", "deno_error", "deno_native_certs", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-pemfile 2.2.0", "rustls-tokio-stream", "rustls-webpki 0.102.8", @@ -3948,7 +3948,7 @@ dependencies = [ "deno_permissions", "deno_tls", "fastwebsockets", - "h2 0.4.8", + "h2 0.4.9", "http 1.3.1", "http-body-util", "hyper 1.6.0", @@ -4052,9 +4052,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid", "der_derive", @@ -4089,9 +4089,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" +checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" dependencies = [ "powerfmt", "serde", @@ -4424,9 +4424,9 @@ dependencies = [ [[package]] name = "ecow" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42fc0a93992b20c58b99e59d61eaf1635a25bfbe49e4275c34ba0aee98119ba" +checksum = "ef5eeffa816451f3a6a4cce9cd796e3e5ba6018638d3ce5cc7f87b73bababf60" dependencies = [ "serde", ] @@ -4573,9 +4573,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" dependencies = [ "libc", "windows-sys 0.59.0", @@ -4784,7 +4784,7 @@ checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.8.5", + "miniz_oxide 0.8.8", ] [[package]] @@ -5241,9 +5241,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", @@ -5536,7 +5536,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.8.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -5545,9 +5545,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" dependencies = [ "atomic-waker", "bytes", @@ -5555,7 +5555,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.3.1", - "indexmap 2.8.0", + "indexmap 2.9.0", "slab", "tokio", "tokio-util", @@ -5794,13 +5794,13 @@ dependencies = [ [[package]] name = "hostname" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" +checksum = "a56f203cd1c76362b69e3863fd987520ac36cf70a8c92627449b2f64a8cf7d65" dependencies = [ "cfg-if", "libc", - "windows 0.52.0", + "windows-link", ] [[package]] @@ -5930,7 +5930,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.8", + "h2 0.4.9", "http 1.3.1", "http-body 1.0.1", "httparse", @@ -5983,7 +5983,7 @@ dependencies = [ "http 1.3.1", "hyper 1.6.0", "hyper-util", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -6281,7 +6281,7 @@ checksum = "1215d4d92511fbbdaea50e750e91f2429598ef817f02b579158e92803b52c00a" dependencies = [ "boxed_error", "deno_error", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "percent-encoding", "serde", @@ -6303,9 +6303,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -6587,7 +6587,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee7893dab2e44ae5f9d0173f26ff4aa327c10b01b06a72b52dd9405b628640d" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", ] [[package]] @@ -6758,9 +6758,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libffi" @@ -6803,9 +6803,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "c9627da5196e5d8ed0b0495e61e518847578da83483c37288316d9b2e03a7f72" [[package]] name = "libproc" @@ -6826,7 +6826,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.9.0", "libc", - "redox_syscall 0.5.10", + "redox_syscall 0.5.11", ] [[package]] @@ -6877,9 +6877,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" [[package]] name = "litemap" @@ -7041,7 +7041,7 @@ dependencies = [ "base64 0.22.1", "gethostname", "mail-builder", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-pki-types", "smtp-proto", "tokio", @@ -7310,9 +7310,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" +checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" dependencies = [ "adler2", "simd-adler32", @@ -7509,7 +7509,7 @@ dependencies = [ "bitflags 2.9.0", "codespan-reporting", "hexf-parse", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "num-traits", "rustc-hash 1.1.0", @@ -7526,7 +7526,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -7624,7 +7624,7 @@ dependencies = [ "data-encoding", "ed25519", "ed25519-dalek", - "getrandom 0.2.15", + "getrandom 0.2.16", "log", "rand 0.8.5", "signatory", @@ -7798,7 +7798,7 @@ dependencies = [ "dirs-sys 0.4.1", "fancy-regex", "heck 0.5.0", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "lru", "miette", @@ -8018,7 +8018,7 @@ checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" dependencies = [ "base64 0.22.1", "chrono", - "getrandom 0.2.15", + "getrandom 0.2.16", "http 1.3.1", "rand 0.8.5", "reqwest 0.12.15", @@ -8186,9 +8186,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.71" +version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" +checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ "bitflags 2.9.0", "cfg-if", @@ -8218,18 +8218,18 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-src" -version = "300.4.2+3.4.1" +version = "300.5.0+3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.106" +version = "0.9.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" +checksum = "8288979acd84749c744a9014b4382d42b8f7b2592847b5afb2ed29e5d16ede07" dependencies = [ "cc", "libc", @@ -8522,7 +8522,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.10", + "redox_syscall 0.5.11", "smallvec", "windows-targets 0.52.6", ] @@ -8652,7 +8652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.8.0", + "indexmap 2.9.0", ] [[package]] @@ -8662,7 +8662,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" dependencies = [ "fixedbitset 0.5.7", - "indexmap 2.8.0", + "indexmap 2.9.0", ] [[package]] @@ -8824,7 +8824,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.8.5", + "miniz_oxide 0.8.8", ] [[package]] @@ -8953,9 +8953,9 @@ checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" [[package]] name = "prettyplease" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5316f57387668042f561aae71480de936257848f9c43ce528e311d89a07cadeb" +checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" dependencies = [ "proc-macro2", "syn 2.0.100", @@ -9050,9 +9050,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -9259,9 +9259,9 @@ dependencies = [ [[package]] name = "quick_cache" -version = "0.6.12" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8ed0655cbaf18a26966142ad23b95d8ab47221c50c4f73a1db7d0d2d6e3da8" +checksum = "287e56aac5a2b4fb25a6fb050961d157635924c8696305a5c937a76f29841a0f" dependencies = [ "ahash 0.8.11", "equivalent", @@ -9281,7 +9281,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", - "rustls 0.23.25", + "rustls 0.23.26", "socket2", "thiserror 2.0.12", "tokio", @@ -9291,16 +9291,16 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.10" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b820744eb4dc9b57a3398183639c511b5a26d2ed702cedd3febaa1393caa22cc" +checksum = "bcbafbbdbb0f638fe3f35f3c56739f77a8a1d070cb25603226c83339b391472b" dependencies = [ "bytes", "getrandom 0.3.2", "rand 0.9.0", "ring 0.17.14", "rustc-hash 2.1.1", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-pki-types", "slab", "thiserror 2.0.12", @@ -9402,7 +9402,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -9534,9 +9534,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags 2.9.0", ] @@ -9547,7 +9547,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "libredox", "thiserror 1.0.69", ] @@ -9691,7 +9691,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.4.8", + "h2 0.4.9", "http 1.3.1", "http-body 1.0.1", "http-body-util", @@ -9708,7 +9708,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -9734,9 +9734,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e8975513bd9a7a43aad01030e79b3498e05db14e9d945df6483e8cf9b8c4c4" +checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e" dependencies = [ "anyhow", "async-trait", @@ -9756,7 +9756,7 @@ dependencies = [ "anyhow", "async-trait", "futures", - "getrandom 0.2.15", + "getrandom 0.2.16", "http 1.3.1", "hyper 1.6.0", "parking_lot 0.11.2", @@ -9826,7 +9826,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.15", + "getrandom 0.2.16", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", @@ -10065,7 +10065,7 @@ dependencies = [ "bitflags 2.9.0", "errno", "libc", - "linux-raw-sys 0.9.3", + "linux-raw-sys 0.9.4", "windows-sys 0.59.0", ] @@ -10097,9 +10097,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.25" +version = "0.23.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822ee9188ac4ec04a2f0531e55d035fb2de73f18b41a63c70c2712503b6fb13c" +checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" dependencies = [ "aws-lc-rs", "log", @@ -10182,7 +10182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22557157d7395bc30727745b365d923f1ecc230c4c80b176545f3f4f08c46e33" dependencies = [ "futures", - "rustls 0.23.25", + "rustls 0.23.26", "socket2", "tokio", ] @@ -10550,9 +10550,9 @@ dependencies = [ [[package]] name = "serde-aux" -version = "4.6.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5290c39c5f6992b9dddbda28541d965dba46468294e6018a408fa297e6c602de" +checksum = "207f67b28fe90fb596503a9bf0bf1ea5e831e21307658e177c5dfcdfc3ab8a0a" dependencies = [ "chrono", "serde", @@ -10618,7 +10618,7 @@ version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "itoa", "memchr", "ryu", @@ -10709,7 +10709,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.8.0", + "indexmap 2.9.0", "serde", "serde_derive", "serde_json", @@ -10820,9 +10820,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" dependencies = [ "libc", ] @@ -10870,7 +10870,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa2bcf6c6e164e81bc7a5d49fc6988b3d515d9e8c07457d7b74ffb9324b9cd40" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "halfbrown", "ref-cast", "serde", @@ -10947,9 +10947,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" dependencies = [ "serde", ] @@ -11132,9 +11132,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" +checksum = "f3c3a85280daca669cfd3bcb68a337882a8bc57ec882f72c5d13a430613a738e" dependencies = [ "sqlx-core", "sqlx-macros", @@ -11145,10 +11145,11 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" +checksum = "f743f2a3cea30a58cd479013f75550e879009e3a02f616f18ca699335aa248c3" dependencies = [ + "base64 0.22.1", "bigdecimal", "bytes", "chrono", @@ -11162,13 +11163,12 @@ dependencies = [ "futures-util", "hashbrown 0.15.2", "hashlink 0.10.0", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "memchr", "once_cell", "percent-encoding", - "rustls 0.23.25", - "rustls-pemfile 2.2.0", + "rustls 0.23.26", "serde", "serde_json", "sha2 0.10.8", @@ -11184,9 +11184,9 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" +checksum = "7f4200e0fde19834956d4252347c12a083bdcb237d7a1a1446bffd8768417dce" dependencies = [ "proc-macro2", "quote", @@ -11197,9 +11197,9 @@ dependencies = [ [[package]] name = "sqlx-macros-core" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" +checksum = "882ceaa29cade31beca7129b6beeb05737f44f82dbe2a9806ecea5a7093d00b7" dependencies = [ "dotenvy", "either", @@ -11223,9 +11223,9 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" +checksum = "0afdd3aa7a629683c2d750c2df343025545087081ab5942593a5288855b1b7a7" dependencies = [ "atoi", "base64 0.22.1", @@ -11268,9 +11268,9 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" +checksum = "a0bedbe1bbb5e2615ef347a5e9d8cd7680fb63e77d9dafc0f29be15e53f1ebe6" dependencies = [ "atoi", "base64 0.22.1", @@ -11309,9 +11309,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" +checksum = "c26083e9a520e8eb87a06b12347679b142dc2ea29e6e409f805644a7a979a5bc" dependencies = [ "atoi", "chrono", @@ -11327,6 +11327,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", + "thiserror 2.0.12", "tracing", "url", "uuid", @@ -11561,7 +11562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4740e53eaf68b101203c1df0937d5161a29f3c13bceed0836ddfe245b72dd000" dependencies = [ "anyhow", - "indexmap 2.8.0", + "indexmap 2.9.0", "serde", "serde_json", "swc_cached", @@ -11673,7 +11674,7 @@ checksum = "65f21494e75d0bd8ef42010b47cabab9caaed8f2207570e809f6f4eb51a710d1" dependencies = [ "better_scoped_tls", "bitflags 2.9.0", - "indexmap 2.8.0", + "indexmap 2.9.0", "once_cell", "phf", "rustc-hash 1.1.0", @@ -11742,7 +11743,7 @@ checksum = "76c76d8b9792ce51401d38da0fa62158d61f6d80d16d68fe5b03ce4bf5fba383" dependencies = [ "base64 0.21.7", "dashmap", - "indexmap 2.8.0", + "indexmap 2.9.0", "once_cell", "serde", "sha1", @@ -11782,7 +11783,7 @@ version = "0.134.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029eec7dd485923a75b5a45befd04510288870250270292fc2c1b3a9e7547408" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "num_cpus", "once_cell", "rustc-hash 1.1.0", @@ -12441,7 +12442,7 @@ dependencies = [ "clap", "derive_builder", "esaxx-rs", - "getrandom 0.2.15", + "getrandom 0.2.16", "indicatif", "itertools 0.11.0", "lazy_static", @@ -12466,9 +12467,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.44.1" +version = "1.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" dependencies = [ "backtrace", "bytes", @@ -12614,7 +12615,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" dependencies = [ - "rustls 0.23.25", + "rustls 0.23.26", "tokio", ] @@ -12672,16 +12673,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" dependencies = [ "bytes", "futures-core", "futures-io", "futures-sink", "futures-util", - "hashbrown 0.14.5", + "hashbrown 0.15.2", "pin-project-lite", "slab", "tokio", @@ -12735,7 +12736,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "serde", "serde_spanned", "toml_datetime", @@ -12748,9 +12749,9 @@ version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.8.0", + "indexmap 2.9.0", "toml_datetime", - "winnow 0.7.4", + "winnow 0.7.6", ] [[package]] @@ -12765,7 +12766,7 @@ dependencies = [ "base64 0.22.1", "bytes", "flate2", - "h2 0.4.8", + "h2 0.4.9", "http 1.3.1", "http-body 1.0.1", "http-body-util", @@ -13373,7 +13374,7 @@ dependencies = [ "log", "native-tls", "once_cell", - "rustls 0.23.25", + "rustls 0.23.26", "rustls-pki-types", "serde", "serde_json", @@ -13482,7 +13483,7 @@ checksum = "97599c400fc79925922b58303e98fcb8fa88f573379a08ddb652e72cbd2e70f6" dependencies = [ "bitflags 2.9.0", "encoding_rs", - "indexmap 2.8.0", + "indexmap 2.9.0", "num-bigint", "serde", "thiserror 1.0.69", @@ -13766,7 +13767,7 @@ dependencies = [ "cfg_aliases 0.1.1", "codespan-reporting", "document-features", - "indexmap 2.8.0", + "indexmap 2.9.0", "log", "naga", "once_cell", @@ -13867,7 +13868,7 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" dependencies = [ - "redox_syscall 0.5.10", + "redox_syscall 0.5.11", "wasite", "web-sys", ] @@ -13911,7 +13912,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windmill" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "axum", @@ -13931,7 +13932,7 @@ dependencies = [ "quote", "rand 0.9.0", "reqwest 0.12.15", - "rustls 0.23.25", + "rustls 0.23.26", "serde", "serde_json", "sha1", @@ -13958,7 +13959,7 @@ dependencies = [ [[package]] name = "windmill-api" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "argon2", @@ -13969,6 +13970,7 @@ dependencies = [ "async_zip", "aws-config", "aws-sdk-sqs", + "aws-sdk-sts", "axum", "base32", "base64 0.22.1", @@ -13999,6 +14001,7 @@ dependencies = [ "itertools 0.14.0", "jsonwebtoken 8.3.0", "lazy_static", + "libxml", "magic-crypt", "mail-parser", "matchit", @@ -14065,7 +14068,7 @@ dependencies = [ [[package]] name = "windmill-api-client" -version = "1.481.0" +version = "1.483.2" dependencies = [ "base64 0.22.1", "chrono", @@ -14080,7 +14083,7 @@ dependencies = [ [[package]] name = "windmill-audit" -version = "1.481.0" +version = "1.483.2" dependencies = [ "chrono", "serde", @@ -14093,7 +14096,7 @@ dependencies = [ [[package]] name = "windmill-autoscaling" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "serde", @@ -14107,7 +14110,7 @@ dependencies = [ [[package]] name = "windmill-common" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "async-stream", @@ -14129,7 +14132,7 @@ dependencies = [ "hex", "hmac", "hyper 1.6.0", - "indexmap 2.8.0", + "indexmap 2.9.0", "itertools 0.14.0", "jsonwebtoken 8.3.0", "lazy_static", @@ -14171,7 +14174,7 @@ dependencies = [ [[package]] name = "windmill-git-sync" -version = "1.481.0" +version = "1.483.2" dependencies = [ "regex", "serde", @@ -14185,7 +14188,7 @@ dependencies = [ [[package]] name = "windmill-indexer" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "bytes", @@ -14208,7 +14211,7 @@ dependencies = [ [[package]] name = "windmill-macros" -version = "1.481.0" +version = "1.483.2" dependencies = [ "itertools 0.14.0", "lazy_static", @@ -14220,7 +14223,7 @@ dependencies = [ [[package]] name = "windmill-parser" -version = "1.481.0" +version = "1.483.2" dependencies = [ "convert_case 0.6.0", "serde", @@ -14229,7 +14232,7 @@ dependencies = [ [[package]] name = "windmill-parser-bash" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "lazy_static", @@ -14241,7 +14244,7 @@ dependencies = [ [[package]] name = "windmill-parser-csharp" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "serde_json", @@ -14253,7 +14256,7 @@ dependencies = [ [[package]] name = "windmill-parser-go" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "gosyn", @@ -14265,7 +14268,7 @@ dependencies = [ [[package]] name = "windmill-parser-graphql" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "lazy_static", @@ -14277,7 +14280,7 @@ dependencies = [ [[package]] name = "windmill-parser-java" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "serde_json", @@ -14289,7 +14292,7 @@ dependencies = [ [[package]] name = "windmill-parser-nu" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "nu-parser", @@ -14300,7 +14303,7 @@ dependencies = [ [[package]] name = "windmill-parser-php" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -14311,7 +14314,7 @@ dependencies = [ [[package]] name = "windmill-parser-py" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "itertools 0.14.0", @@ -14322,7 +14325,7 @@ dependencies = [ [[package]] name = "windmill-parser-py-imports" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "async-recursion", @@ -14342,7 +14345,7 @@ dependencies = [ [[package]] name = "windmill-parser-rust" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "convert_case 0.6.0", @@ -14359,7 +14362,7 @@ dependencies = [ [[package]] name = "windmill-parser-sql" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "lazy_static", @@ -14371,7 +14374,7 @@ dependencies = [ [[package]] name = "windmill-parser-ts" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "lazy_static", @@ -14389,10 +14392,10 @@ dependencies = [ [[package]] name = "windmill-parser-wasm" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", - "getrandom 0.2.15", + "getrandom 0.2.16", "serde_json", "wasm-bindgen", "wasm-bindgen-test", @@ -14413,7 +14416,7 @@ dependencies = [ [[package]] name = "windmill-parser-yaml" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "serde_json", @@ -14423,7 +14426,7 @@ dependencies = [ [[package]] name = "windmill-queue" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "async-recursion", @@ -14456,7 +14459,7 @@ dependencies = [ [[package]] name = "windmill-sql-datatype-parser-wasm" -version = "1.481.0" +version = "1.483.2" dependencies = [ "wasm-bindgen", "wasm-bindgen-test", @@ -14466,7 +14469,7 @@ dependencies = [ [[package]] name = "windmill-worker" -version = "1.481.0" +version = "1.483.2" dependencies = [ "anyhow", "async-recursion", @@ -14554,16 +14557,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "windows" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" -dependencies = [ - "windows-core 0.52.0", - "windows-targets 0.52.6", -] - [[package]] name = "windows" version = "0.56.0" @@ -14594,15 +14587,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-core" version = "0.56.0" @@ -15045,9 +15029,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" dependencies = [ "memchr", ] @@ -15145,9 +15129,9 @@ dependencies = [ [[package]] name = "xml-rs" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5b940ebc25896e71dd073bad2dbaa2abfe97b0a391415e22ad1326d9c54e3c4" +checksum = "a62ce76d9b56901b19a74f19431b0d8b3bc7ca4ad685a746dfd78ca8f4fc6bda" [[package]] name = "xmlparser" diff --git a/backend/Cargo.toml b/backend/Cargo.toml index ed4155f495..e1f4403506 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "windmill" -version = "1.481.0" +version = "1.483.2" authors.workspace = true edition.workspace = true @@ -32,7 +32,7 @@ members = [ ] [workspace.package] -version = "1.481.0" +version = "1.483.2" authors = ["Ruben Fiszel "] edition = "2021" @@ -73,7 +73,7 @@ websocket = ["windmill-api/websocket"] http_trigger = ["windmill-api/http_trigger"] postgres_trigger = ["windmill-api/postgres_trigger"] mqtt_trigger = ["windmill-api/mqtt_trigger"] -sqs_trigger = ["windmill-api/sqs_trigger"] +sqs_trigger = ["windmill-api/sqs_trigger", "windmill-common/aws_auth", "windmill-api/openidconnect"] gcp_trigger = ["windmill-api/gcp_trigger"] smtp = ["windmill-api/smtp", "windmill-common/smtp"] license = ["windmill-api/license"] @@ -304,6 +304,7 @@ postgres-native-tls = "^0" native-tls = "^0" # samael will break compilation on MacOS. Use this fork instead to make it work # samael = { git="https://github.com/njaremko/samael", rev="464d015e3ae393e4b5dd00b4d6baa1b617de0dd6", features = ["xmlsec"] } +libxml = { version = "=0.3.3" } samael = { version="0.0.14", features = ["xmlsec"] } gcp_auth = "0.9.0" rust_decimal = { version = "^1", features = ["db-postgres", "serde-float"]} diff --git a/backend/ee-repo-ref.txt b/backend/ee-repo-ref.txt index 91f337034b..cd49b42813 100644 --- a/backend/ee-repo-ref.txt +++ b/backend/ee-repo-ref.txt @@ -1 +1 @@ -1475a504133766e005ec551004c2af2283663352 \ No newline at end of file +b9ca3ccdd188683c81832fd3ed41c8dd632a0c9c \ No newline at end of file diff --git a/backend/migrations/20241223155748_raw_apps_v2.down.sql b/backend/migrations/20241223155748_raw_apps_v2.down.sql new file mode 100644 index 0000000000..7e7dbecf84 --- /dev/null +++ b/backend/migrations/20241223155748_raw_apps_v2.down.sql @@ -0,0 +1,2 @@ +-- Add down migration script here +ALTER TABLE app_version DROP COLUMN IF EXISTS raw_app; \ No newline at end of file diff --git a/backend/migrations/20241223155748_raw_apps_v2.up.sql b/backend/migrations/20241223155748_raw_apps_v2.up.sql new file mode 100644 index 0000000000..02b1124957 --- /dev/null +++ b/backend/migrations/20241223155748_raw_apps_v2.up.sql @@ -0,0 +1,2 @@ +-- Add up migration script here +ALTER TABLE app_version ADD COLUMN IF NOT EXISTS raw_app BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/backend/migrations/20250417132646_add-resource-type-column-to-sqs.down.sql b/backend/migrations/20250417132646_add-resource-type-column-to-sqs.down.sql new file mode 100644 index 0000000000..8a5cb640cc --- /dev/null +++ b/backend/migrations/20250417132646_add-resource-type-column-to-sqs.down.sql @@ -0,0 +1,3 @@ +-- Add down migration script here +ALTER TABLE sqs_trigger DROP COLUMN aws_auth_resource_type; +DROP TYPE IF EXISTS AWS_AUTH_RESOURCE_TYPE; \ No newline at end of file diff --git a/backend/migrations/20250417132646_add-resource-type-column-to-sqs.up.sql b/backend/migrations/20250417132646_add-resource-type-column-to-sqs.up.sql new file mode 100644 index 0000000000..50b3a367d8 --- /dev/null +++ b/backend/migrations/20250417132646_add-resource-type-column-to-sqs.up.sql @@ -0,0 +1,4 @@ +-- Add up migration script here +CREATE TYPE AWS_AUTH_RESOURCE_TYPE AS ENUM ('oidc', 'credentials'); +ALTER TABLE sqs_trigger + ADD COLUMN aws_auth_resource_type AWS_AUTH_RESOURCE_TYPE DEFAULT 'credentials'::AWS_AUTH_RESOURCE_TYPE NOT NULL; \ No newline at end of file diff --git a/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.down.sql b/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.down.sql new file mode 100644 index 0000000000..076f1891b6 --- /dev/null +++ b/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.down.sql @@ -0,0 +1,3 @@ +-- Add down migration script here +ALTER TABLE gcp_trigger DROP COLUMN subscription_mode; +DROP TYPE GCP_SUBSCRIPTION_MODE; \ No newline at end of file diff --git a/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.up.sql b/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.up.sql new file mode 100644 index 0000000000..529d9580db --- /dev/null +++ b/backend/migrations/20250420144035_add-new-column-to-gcp-trigger.up.sql @@ -0,0 +1,3 @@ +-- Add up migration script here +CREATE TYPE GCP_SUBSCRIPTION_MODE AS ENUM ('create_update', 'existing'); +ALTER TABLE gcp_trigger ADD COLUMN subscription_mode GCP_SUBSCRIPTION_MODE NOT NULL DEFAULT 'create_update'::GCP_SUBSCRIPTION_MODE; \ No newline at end of file diff --git a/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.down.sql b/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.down.sql new file mode 100644 index 0000000000..18b1b65140 --- /dev/null +++ b/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.down.sql @@ -0,0 +1,3 @@ +-- Add down migration script here +ALTER TABLE websocket_trigger +ALTER COLUMN url TYPE VARCHAR(255); \ No newline at end of file diff --git a/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.up.sql b/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.up.sql new file mode 100644 index 0000000000..51da384e02 --- /dev/null +++ b/backend/migrations/20250421120705_alter_url_column_length_on_websocket_triggers.up.sql @@ -0,0 +1,3 @@ +-- Add up migration script here +ALTER TABLE websocket_trigger +ALTER COLUMN url TYPE VARCHAR(1000); \ No newline at end of file diff --git a/backend/parsers/windmill-parser-ts/src/lib.rs b/backend/parsers/windmill-parser-ts/src/lib.rs index 24c9eefab3..d4d34cecd6 100644 --- a/backend/parsers/windmill-parser-ts/src/lib.rs +++ b/backend/parsers/windmill-parser-ts/src/lib.rs @@ -49,8 +49,12 @@ impl Visit for ImportsFinder { pub fn parse_expr_for_imports(code: &str) -> anyhow::Result> { let cm: Lrc = Default::default(); let fm = cm.new_source_file(FileName::Custom("main.d.ts".into()).into(), code.into()); + let mut tss = TsSyntax::default(); + tss.disallow_ambiguous_jsx_like; + tss.tsx = true; + tss.no_early_errors = true; let lexer = Lexer::new( - Syntax::Typescript(TsSyntax::default()), + Syntax::Typescript(tss), // EsVersion defaults to es5 Default::default(), StringInput::from(&*fm), diff --git a/backend/windmill-api/Cargo.toml b/backend/windmill-api/Cargo.toml index 0996b5956d..c6702b8ac3 100644 --- a/backend/windmill-api/Cargo.toml +++ b/backend/windmill-api/Cargo.toml @@ -13,7 +13,7 @@ default = [] enterprise = ["windmill-queue/enterprise", "windmill-audit/enterprise", "windmill-git-sync/enterprise", "windmill-common/enterprise", "windmill-worker/enterprise"] stripe = [] agent_worker_server = [] -enterprise_saml = ["dep:samael"] +enterprise_saml = ["dep:samael", "dep:libxml"] benchmark = [] embedding = ["dep:tinyvector", "dep:hf-hub", "dep:tokenizers", "dep:candle-core", "dep:candle-transformers", "dep:candle-nn", "dep:half"] parquet = ["dep:datafusion", "dep:object_store", "dep:url", "windmill-common/parquet", "windmill-worker/parquet"] @@ -100,6 +100,7 @@ async_zip = { workspace = true, optional = true } regex.workspace = true bytes.workspace = true samael = { workspace = true, optional = true } +libxml = { workspace = true, optional = true } async-recursion.workspace = true rsa = { workspace = true, optional = true} uuid.workspace = true @@ -133,6 +134,7 @@ rust-postgres-native-tls = { workspace = true, optional = true} rumqttc = { workspace = true, optional = true } aws-sdk-sqs = { workspace = true, optional = true } aws-config = { workspace = true, optional = true } +aws-sdk-sts = { workspace = true, optional = true } google-cloud-pubsub = { workspace = true, optional = true } google-cloud-googleapis = { workspace = true , optional = true } tonic = { workspace = true, optional = true } diff --git a/backend/windmill-api/openapi.yaml b/backend/windmill-api/openapi.yaml index 5ed6537931..0dae5e223a 100644 --- a/backend/windmill-api/openapi.yaml +++ b/backend/windmill-api/openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.481.0 + version: 1.483.2 title: Windmill API contact: @@ -5985,6 +5985,55 @@ paths: schema: type: string + /w/{workspace}/apps/create_raw: + post: + summary: create app raw + operationId: createAppRaw + tags: + - app + parameters: + - $ref: "#/components/parameters/WorkspaceId" + requestBody: + description: new app + required: true + content: + multipart/form-data: + schema: + type: object + properties: + app: + type: object + properties: + path: + type: string + value: {} + summary: + type: string + policy: + $ref: "#/components/schemas/Policy" + draft_only: + type: boolean + deployment_message: + type: string + custom_path: + type: string + required: + - path + - value + - summary + - policy + js: + type: string + css: + type: string + responses: + "201": + description: app created + content: + text/plain: + schema: + type: string + /w/{workspace}/apps/exists/{path}: get: summary: does an app exisst at path @@ -6344,6 +6393,49 @@ paths: schema: type: string + /w/{workspace}/apps/update_raw/{path}: + post: + summary: update app + operationId: updateAppRaw + tags: + - app + parameters: + - $ref: "#/components/parameters/WorkspaceId" + - $ref: "#/components/parameters/ScriptPath" + requestBody: + description: update app + required: true + content: + multipart/form-data: + schema: + type: object + properties: + app: + type: object + properties: + path: + type: string + summary: + type: string + value: {} + policy: + $ref: "#/components/schemas/Policy" + deployment_message: + type: string + custom_path: + type: string + js: + type: string + css: + type: string + responses: + "200": + description: app updated + content: + text/plain: + schema: + type: string + /w/{workspace}/apps/custom_path_exists/{custom_path}: get: summary: check if custom path exists @@ -6623,7 +6715,8 @@ paths: type: object additionalProperties: $ref: "#/components/schemas/InputTransform" - use_latest_version: boolean + use_latest_version: + type: boolean flow_options_by_path: type: object additionalProperties: @@ -6633,7 +6726,8 @@ paths: type: object additionalProperties: $ref: "#/components/schemas/InputTransform" - use_latest_version: boolean + use_latest_version: + type: boolean responses: "201": description: stream of created job uuids separated by \n. Lines may start with 'Error:' @@ -9445,7 +9539,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/NewGcpTrigger" + $ref: "#/components/schemas/GcpTriggerData" responses: "201": description: gcp trigger created @@ -9469,7 +9563,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/EditGcpTrigger" + $ref: "#/components/schemas/GcpTriggerData" responses: "200": description: gcp trigger updated @@ -14048,6 +14142,8 @@ components: type: string path: type: string + script_hash: + type: string args: $ref: "#/components/schemas/ScriptArgs" language: @@ -14949,8 +15045,6 @@ components: type: string authenticate: type: boolean - base_endpoint: - type: string required: - authenticate - base_endpoint @@ -14972,6 +15066,8 @@ components: $ref: "#/components/schemas/DeliveryType" delivery_config: $ref: "#/components/schemas/PushConfig" + subscription_mode: + $ref: "#/components/schemas/SubscriptionMode" last_server_ping: type: string format: date-time @@ -14985,6 +15081,8 @@ components: - subscription_id - enabled - delivery_type + - subscription_mode + SubscriptionMode: type: string @@ -14993,55 +15091,24 @@ components: - create_update description: "The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription." - GcpExistingSubscription: + + GcpTriggerData: type: object properties: + gcp_resource_path: + type: string + subscription_mode: + $ref: "#/components/schemas/SubscriptionMode" + topic_id: + type: string subscription_id: type: string base_endpoint: type: string - required: - - subscription_id - - base_endpoint - - GcpCreateUpdateSubscription: - type: object - properties: - subscription_id: - type: string delivery_type: $ref: "#/components/schemas/DeliveryType" delivery_config: $ref: "#/components/schemas/PushConfig" - required: - - delivery_type - - - GcpSubscriptionModeConfig: - type: object - properties: - subscription_mode: - $ref: "#/components/schemas/SubscriptionMode" - required: - - subscription_mode - allOf: - - oneOf: - - $ref: "#/components/schemas/GcpExistingSubscription" - - $ref: "#/components/schemas/GcpCreateUpdateSubscription" - description: | - "This is a union type representing the subscription mode. - - 'existing': Represents an existing GCP subscription, and should be accompanied by an 'ExistingGcpSubscription' object. - - 'create_update': Represents a new or updated GCP subscription, and should be accompanied by a 'CreateUpdateConfig' object." - - NewGcpTrigger: - type: object - properties: - gcp_resource_path: - type: string - topic_id: - type: string - subscription_mode: - $ref: "#/components/schemas/GcpSubscriptionModeConfig" path: type: string script_path: @@ -15058,34 +15125,6 @@ components: - topic_id - subscription_mode - EditGcpTrigger: - type: object - properties: - gcp_resource_path: - type: string - topic_id: - type: string - subscription_mode: - $ref: "#/components/schemas/GcpSubscriptionModeConfig" - path: - type: string - script_path: - type: string - is_flow: - type: boolean - enabled: - type: boolean - required: - - path - - script_path - - is_flow - - enabled - - mqtt_resource_path - - subscription_id - - delivery_type - - topic_id - - subscription_mode - GetAllTopicSubscription: type: object properties: @@ -15102,6 +15141,12 @@ components: type: string required: - subscription_id + + AwsAuthResourceType: + type: string + enum: + - oidc + - credentials SqsTrigger: allOf: @@ -15110,6 +15155,8 @@ components: properties: queue_url: type: string + aws_auth_resource_type: + $ref: "#/components/schemas/AwsAuthResourceType" aws_resource_path: type: string message_attributes: @@ -15130,12 +15177,15 @@ components: - queue_url - aws_resource_path - enabled + - aws_auth_resource_type NewSqsTrigger: type: object properties: queue_url: type: string + aws_auth_resource_type: + $ref: "#/components/schemas/AwsAuthResourceType" aws_resource_path: type: string message_attributes: @@ -15156,12 +15206,15 @@ components: - path - script_path - is_flow + - aws_auth_resource_type EditSqsTrigger: type: object properties: queue_url: type: string + aws_auth_resource_type: + $ref: "#/components/schemas/AwsAuthResourceType" aws_resource_path: type: string message_attributes: @@ -15183,6 +15236,7 @@ components: - script_path - is_flow - enabled + - aws_auth_resource_type Slot: type: object @@ -15902,6 +15956,8 @@ components: execution_mode: type: string enum: [viewer, publisher, anonymous] + raw_app: + type: boolean required: - id - workspace_id diff --git a/backend/windmill-api/src/apps.rs b/backend/windmill-api/src/apps.rs index b3ffdb896b..533da11d1c 100644 --- a/backend/windmill-api/src/apps.rs +++ b/backend/windmill-api/src/apps.rs @@ -24,10 +24,10 @@ use crate::{ }, users::fetch_api_authed_from_permissioned_as, }; -#[cfg(feature = "parquet")] use axum::response::Response; use axum::{ - extract::{Extension, Json, Path, Query}, + body::Body, + extract::{Extension, Json, Multipart, Path, Query}, response::IntoResponse, routing::{delete, get, post}, Router, @@ -88,10 +88,13 @@ pub fn workspaced_service() -> Router { .route("/get/draft/*path", get(get_app_w_draft)) .route("/secret_of/*path", get(get_secret_id)) .route("/get/v/*id", get(get_app_by_id)) + .route("/get_data/v/*id", get(get_raw_app_data)) .route("/exists/*path", get(exists_app)) .route("/update/*path", post(update_app)) + .route("/update_raw/*path", post(update_app_raw)) .route("/delete/*path", delete(delete_app)) .route("/create", post(create_app)) + .route("/create_raw", post(create_app_raw)) .route("/history/p/*path", get(get_app_history)) .route("/get_latest_version/*path", get(get_latest_version)) .route("/history_update/a/:id/v/:version", post(update_app_history)) @@ -135,6 +138,12 @@ pub struct ListableApp { #[sqlx(default)] #[serde(skip_serializing_if = "Option::is_none")] pub deployment_msg: Option, + #[serde(skip_serializing_if = "is_false")] + pub raw_app: bool, +} + +fn is_false(b: &bool) -> bool { + !b } #[derive(FromRow, Serialize, Deserialize)] @@ -328,7 +337,8 @@ async fn list_apps( "app.extra_perms", "favorite.path IS NOT NULL as starred", "draft.path IS NOT NULL as has_draft", - "draft_only" + "draft_only", + "app_version.raw_app", ]) .left() .join("favorite") @@ -387,6 +397,44 @@ async fn list_apps( Ok(Json(rows)) } +async fn get_raw_app_data(Path((w_id, version_id)): Path<(String, String)>) -> Result { + let file_path = format!("/tmp/wmill/{}/{}", w_id, version_id); + let file = tokio::fs::File::open(file_path).await?; + let stream = tokio_util::io::ReaderStream::new(file); + let res = Response::builder().header( + http::header::CONTENT_TYPE, + if version_id.ends_with(".css") { + "text/css" + } else { + "text/javascript" + }, + ); + Ok(res.body(Body::from_stream(stream)).unwrap()) +} + +// async fn get_app_version( +// authed: ApiAuthed, +// Extension(user_db): Extension, +// Path((w_id, path)): Path<(String, StripPath)>, +// ) -> JsonResult { +// let path = path.to_path(); +// let mut tx = user_db.begin(&authed).await?; + +// let version_o = sqlx::query_scalar!( +// "SELECT app.versions[array_upper(app.versions, 1)] as version FROM app +// WHERE app.path = $1 AND app.workspace_id = $2", +// path, +// &w_id, +// ) +// .fetch_optional(&mut *tx) +// .await? +// .flatten(); +// tx.commit().await?; + +// let version = not_found_if_none(version_o, "App", path)?; +// Ok(Json(version)) +// } + async fn get_app( authed: ApiAuthed, Extension(user_db): Extension, @@ -727,6 +775,97 @@ async fn get_secret_id( Ok(hx) } +macro_rules! process_app_multipart { + ($authed:expr, $user_db:expr, $db:expr, $w_id:expr, $path:expr, $multipart:expr, $internal_fn:expr) => { + async { + let mut saved_app = None; + let mut uploaded_js = false; + + //todo: use s3 instead + let file_path = format!("/tmp/wmill/{}", $w_id); + std::fs::create_dir_all(&file_path).unwrap(); + + let mut multipart = $multipart; + while let Some(field) = multipart.next_field().await.unwrap() { + let name = field.name().unwrap().to_string(); + let data = field.bytes().await.unwrap(); + if name == "app" { + let app = serde_json::from_slice(&data).map_err(to_anyhow)?; + let (ntx, npath, nid) = $internal_fn( + $authed.clone(), + $db.clone(), + $user_db.clone(), + $w_id, + $path, + true, + app, + ) + .await?; + saved_app = Some((npath, nid, ntx)); + } else if name == "js" { + if let Some((_npath, id, _tx)) = saved_app.as_ref() { + let file_path = format!("{}/{}.js", file_path, id); + std::fs::write(file_path, data).unwrap(); + uploaded_js = true; + } else { + return Err(Error::BadRequest( + "App payload need to be created first".to_string(), + )); + } + } else if name == "css" { + if let Some((_npath, id, _tx)) = saved_app.as_ref() { + let file_path = format!("{}/{}.css", file_path, id); + std::fs::write(file_path, data).unwrap(); + } else { + return Err(Error::BadRequest( + "App payload need to be created first".to_string(), + )); + } + } else { + return Err(Error::BadRequest(format!("Unsupported field: {}", name))); + } + } + if !uploaded_js { + return Err(Error::BadRequest("js or css file not uploaded".to_string())); + } + if let Some((npath, id, tx)) = saved_app { + tx.commit().await?; + Ok((npath, id)) + } else { + Err(Error::BadRequest("App not created".to_string())) + } + } + }; +} + +async fn create_app_raw<'a>( + authed: ApiAuthed, + Extension(user_db): Extension, + Extension(db): Extension, + Extension(webhook): Extension, + Path(w_id): Path, + multipart: Multipart, +) -> Result<(StatusCode, String)> { + let (path, _id) = process_app_multipart!( + authed, + user_db, + db, + &w_id, + "", + multipart, + |authed, db, user_db, w_id, _path, raw_app, app| create_app_internal( + authed, db, user_db, w_id, raw_app, app + ) + ) + .await?; + + webhook.send_message( + w_id.clone(), + WebhookMessage::CreateApp { workspace: w_id, path: path.clone() }, + ); + Ok((StatusCode::CREATED, path)) +} + async fn list_paths_from_workspace_runnable( authed: ApiAuthed, Extension(user_db): Extension, @@ -755,17 +894,36 @@ async fn create_app( Extension(db): Extension, Extension(webhook): Extension, Path(w_id): Path, - Json(mut app): Json, + Json(app): Json, ) -> Result<(StatusCode, String)> { - let mut tx = user_db.clone().begin(&authed).await?; + let path = app.path.clone(); + let (new_tx, _path, _id) = create_app_internal(authed, db, user_db, &w_id, false, app).await?; + new_tx.commit().await?; + + webhook.send_message( + w_id.clone(), + WebhookMessage::CreateApp { workspace: w_id, path: path.clone() }, + ); + + Ok((StatusCode::CREATED, path)) +} + +async fn create_app_internal<'a>( + authed: ApiAuthed, + db: sqlx::Pool, + user_db: UserDB, + w_id: &String, + raw_app: bool, + mut app: CreateApp, +) -> Result<(sqlx::Transaction<'a, sqlx::Postgres>, String, i64)> { + let mut tx = user_db.clone().begin(&authed).await?; app.policy.on_behalf_of = Some(username_to_permissioned_as(&authed.username)); app.policy.on_behalf_of_email = Some(authed.email.clone()); - + let path = app.path.clone(); if &app.path == "" { return Err(Error::BadRequest("App path cannot be empty".to_string())); } - let exists = sqlx::query_scalar!( "SELECT EXISTS(SELECT 1 FROM app WHERE path = $1 AND workspace_id = $2)", &app.path, @@ -774,21 +932,19 @@ async fn create_app( .fetch_one(&mut *tx) .await? .unwrap_or(false); - if exists { return Err(Error::BadRequest(format!( "App with path {} already exists", &app.path ))); } - if let Some(custom_path) = &app.custom_path { require_admin(authed.is_admin, &authed.username)?; let exists = sqlx::query_scalar!( "SELECT EXISTS(SELECT 1 FROM app WHERE custom_path = $1 AND ($2::TEXT IS NULL OR workspace_id = $2))", custom_path, - if *CLOUD_HOSTED { Some(&w_id) } else { None } + if *CLOUD_HOSTED { Some(w_id) } else { None } ) .fetch_one(&mut *tx) .await?.unwrap_or(false); @@ -800,7 +956,6 @@ async fn create_app( ))); } } - sqlx::query!( "DELETE FROM draft WHERE path = $1 AND workspace_id = $2 AND typ = 'app'", &app.path, @@ -808,7 +963,6 @@ async fn create_app( ) .execute(&mut *tx) .await?; - let id = sqlx::query_scalar!( "INSERT INTO app (workspace_id, path, summary, policy, versions, draft_only, custom_path) @@ -819,24 +973,24 @@ async fn create_app( json!(app.policy), app.draft_only, app.custom_path + .as_ref() .map(|s| if s.is_empty() { None } else { Some(s) }) .flatten() ) .fetch_one(&mut *tx) .await?; - let v_id = sqlx::query_scalar!( "INSERT INTO app_version - (app_id, value, created_by) - VALUES ($1, $2::text::json, $3) RETURNING id", + (app_id, value, created_by, raw_app) + VALUES ($1, $2::text::json, $3, $4) RETURNING id", id, //to preserve key orders serde_json::to_string(&app.value).unwrap(), authed.username, + raw_app ) .fetch_one(&mut *tx) .await?; - sqlx::query!( "UPDATE app SET versions = array_append(versions, $1::bigint) WHERE id = $2", v_id, @@ -850,22 +1004,20 @@ async fn create_app( &authed, "apps.create", ActionKind::Create, - &w_id, + w_id, Some(&app.path), None, ) .await?; - let mut args: HashMap> = HashMap::new(); - if let Some(dm) = app.deployment_message { + if let Some(dm) = &app.deployment_message { args.insert("deployment_message".to_string(), to_raw_value(&dm)); } - let tx = PushIsolationLevel::Transaction(tx); let (dependency_job_uuid, new_tx) = push( &db, tx, - &w_id, + w_id, JobPayload::AppDependencies { path: app.path.clone(), version: v_id }, PushArgs { args: &args, extra: None }, &authed.username, @@ -889,14 +1041,7 @@ async fn create_app( .await?; tracing::info!("Pushed app dependency job {}", dependency_job_uuid); - new_tx.commit().await?; - - webhook.send_message( - w_id.clone(), - WebhookMessage::CreateApp { workspace: w_id, path: app.path.clone() }, - ); - - Ok((StatusCode::CREATED, app.path)) + Ok((new_tx, path, v_id)) } async fn list_hub_apps(Extension(db): Extension) -> impl IntoResponse { @@ -1017,12 +1162,76 @@ async fn update_app( Path((w_id, path)): Path<(String, StripPath)>, Json(ns): Json, ) -> Result { - use sql_builder::prelude::*; - + // create_app_internal(authed, user_db, db, &w_id, &mut app).await?; let path = path.to_path(); + let opath = path.to_string(); + let (new_tx, npath, _v_id) = + update_app_internal(authed, db, user_db, &w_id, path, false, ns).await?; + new_tx.commit().await?; + webhook.send_message( + w_id.clone(), + WebhookMessage::UpdateApp { + workspace: w_id.clone(), + old_path: opath.clone(), + new_path: npath.clone(), + }, + ); + + Ok(format!("app {} updated (npath: {:?})", opath, npath)) +} + +async fn update_app_raw<'a>( + authed: ApiAuthed, + Extension(user_db): Extension, + Extension(db): Extension, + Extension(webhook): Extension, + Path((w_id, path)): Path<(String, StripPath)>, + multipart: Multipart, +) -> Result { + let path = path.to_path(); + let opath = path.to_string(); + let (npath, _id) = process_app_multipart!( + authed, + user_db, + db, + &w_id, + path, + multipart, + update_app_internal + ) + .await?; + + webhook.send_message( + w_id.clone(), + WebhookMessage::UpdateApp { + workspace: w_id.clone(), + old_path: opath.to_owned(), + new_path: npath.clone(), + }, + ); + + Ok(format!("app {} updated (npath: {:?})", opath, npath)) +} +// async fn create_app_internal<'a>( +// authed: ApiAuthed, +// db: sqlx::Pool, +// user_db: UserDB, +// w_id: &String, +// app: &mut CreateApp, +// ) + +async fn update_app_internal<'a>( + authed: ApiAuthed, + db: sqlx::Pool, + user_db: UserDB, + w_id: &str, + path: &str, + raw_app: bool, + ns: EditApp, +) -> Result<(sqlx::Transaction<'a, sqlx::Postgres>, String, i64)> { + use sql_builder::prelude::*; let mut tx = user_db.clone().begin(&authed).await?; - let npath = if ns.policy.is_some() || ns.path.is_some() || ns.summary.is_some() @@ -1069,7 +1278,7 @@ async fn update_app( let exists = sqlx::query_scalar!( "SELECT EXISTS(SELECT 1 FROM app WHERE custom_path = $1 AND ($2::TEXT IS NULL OR workspace_id = $2) AND NOT (path = $3 AND workspace_id = $4))", ncustom_path, - if *CLOUD_HOSTED { Some(&w_id) } else { None }, + if *CLOUD_HOSTED { Some(w_id) } else { None }, path, w_id ) @@ -1116,12 +1325,13 @@ async fn update_app( let v_id = sqlx::query_scalar!( "INSERT INTO app_version - (app_id, value, created_by) - VALUES ($1, $2::text::json, $3) RETURNING id", + (app_id, value, created_by, raw_app) + VALUES ($1, $2::text::json, $3, $4) RETURNING id", app_id, //to preserve key orders serde_json::to_string(&nvalue).unwrap(), authed.username, + raw_app ) .fetch_one(&mut *tx) .await?; @@ -1152,7 +1362,6 @@ async fn update_app( ))); } }; - sqlx::query!( "DELETE FROM draft WHERE path = $1 AND workspace_id = $2 AND typ = 'app'", path, @@ -1160,29 +1369,26 @@ async fn update_app( ) .execute(&mut *tx) .await?; - audit_log( &mut *tx, &authed, "apps.update", ActionKind::Update, - &w_id, + w_id, Some(&npath), None, ) .await?; - let tx = PushIsolationLevel::Transaction(tx); let mut args: HashMap> = HashMap::new(); if let Some(dm) = ns.deployment_message { args.insert("deployment_message".to_string(), to_raw_value(&dm)); } args.insert("parent_path".to_string(), to_raw_value(&path)); - let (dependency_job_uuid, new_tx) = push( &db, tx, - &w_id, + w_id, JobPayload::AppDependencies { path: npath.clone(), version: v_id }, PushArgs { args: &args, extra: None }, &authed.username, @@ -1205,18 +1411,7 @@ async fn update_app( ) .await?; tracing::info!("Pushed app dependency job {}", dependency_job_uuid); - new_tx.commit().await?; - - webhook.send_message( - w_id.clone(), - WebhookMessage::UpdateApp { - workspace: w_id, - old_path: path.to_owned(), - new_path: npath.clone(), - }, - ); - - Ok(format!("app {} updated (npath: {:?})", path, npath)) + Ok((new_tx, npath, v_id)) } #[derive(Debug, Deserialize, Clone)] diff --git a/backend/windmill-api/src/capture.rs b/backend/windmill-api/src/capture.rs index 93a11752d7..547b56954b 100644 --- a/backend/windmill-api/src/capture.rs +++ b/backend/windmill-api/src/capture.rs @@ -18,16 +18,22 @@ use { #[cfg(all(feature = "enterprise", feature = "gcp_trigger"))] use crate::gcp_triggers_ee::{ - manage_google_subscription, process_google_push_request, validate_jwt_token, SubscriptionMode, + manage_google_subscription, process_google_push_request, validate_jwt_token, + CreateUpdateConfig, SubscriptionMode, }; +#[cfg(all(feature = "enterprise", feature = "sqs_trigger"))] +use windmill_common::auth::aws::AwsAuthResourceType; + #[cfg(any( feature = "http_trigger", all(feature = "enterprise", feature = "gcp_trigger") ))] use { - axum::extract::Request, http::HeaderMap, serde::de::DeserializeOwned, - windmill_common::error::Error, + axum::extract::Request, + http::HeaderMap, + serde::de::DeserializeOwned, + windmill_common::{error::Error, utils::empty_string_as_none}, }; #[cfg(all(feature = "enterprise", feature = "kafka"))] @@ -150,14 +156,20 @@ pub struct SqsTriggerConfig { pub queue_url: String, pub aws_resource_path: String, pub message_attributes: Option>, + pub aws_auth_resource_type: AwsAuthResourceType, } #[cfg(all(feature = "enterprise", feature = "gcp_trigger"))] #[derive(Debug, Serialize, Deserialize)] pub struct GcpTriggerConfig { pub gcp_resource_path: String, - #[serde(flatten)] pub subscription_mode: SubscriptionMode, + #[serde(default, deserialize_with = "empty_string_as_none")] + pub subscription_id: Option, + #[serde(default, deserialize_with = "empty_string_as_none")] + pub base_endpoint: Option, + #[serde(flatten)] + pub create_update: Option, pub topic_id: String, } @@ -366,11 +378,15 @@ async fn set_gcp_trigger_config( &gcp_config.gcp_resource_path, &capture_config.path, &gcp_config.topic_id, + &mut gcp_config.subscription_id, + &mut gcp_config.base_endpoint, gcp_config.subscription_mode, + gcp_config.create_update, + false, ) .await?; - - gcp_config.subscription_mode = SubscriptionMode::CreateUpdate(config); + gcp_config.create_update = Some(config); + gcp_config.subscription_mode = SubscriptionMode::CreateUpdate; capture_config.trigger_config = Some(TriggerConfig::Gcp(gcp_config)); Ok(capture_config) @@ -887,7 +903,7 @@ async fn gcp_payload( let authed = fetch_api_authed(owner.clone(), email, &w_id, &db, None).await?; - let SubscriptionMode::CreateUpdate(config) = &gcp_trigger_config.subscription_mode else { + let Some(config) = &gcp_trigger_config.create_update else { return Err(Error::BadConfig("Bad config".to_string())); }; diff --git a/backend/windmill-api/src/gcp_triggers_ee.rs b/backend/windmill-api/src/gcp_triggers_ee.rs index ec0a6ec115..4c8c72a4e4 100644 --- a/backend/windmill-api/src/gcp_triggers_ee.rs +++ b/backend/windmill-api/src/gcp_triggers_ee.rs @@ -52,11 +52,12 @@ pub struct ExistingGcpSubscription { pub base_endpoint: String, } -#[derive(Debug, Deserialize, Serialize)] -#[serde(tag = "subscription_mode", rename_all = "snake_case")] +#[derive(Debug, Deserialize, Serialize, sqlx::Type)] +#[serde(rename_all = "snake_case")] +#[sqlx(type_name = "GCP_SUBSCRIPTION_MODE", rename_all = "snake_case")] pub enum SubscriptionMode { - Existing(ExistingGcpSubscription), - CreateUpdate(CreateUpdateConfig), + Existing, + CreateUpdate, } pub fn workspaced_service() -> Router { @@ -77,7 +78,11 @@ pub async fn manage_google_subscription( _gcp_resource_path: &str, _path: &str, _topic_id: &str, + _subscription_id: &mut Option, + _base_endpoint: &mut Option, _subscription_mode: SubscriptionMode, + _create_update_config: Option, + _trigger_mode: bool, ) -> WindmillResult { Ok(CreateUpdateConfig::default()) } @@ -117,6 +122,7 @@ pub struct GcpTrigger { pub subscription_id: String, pub delivery_type: DeliveryType, pub delivery_config: Option>, + pub subscription_mode: SubscriptionMode, pub topic_id: String, pub path: String, pub script_path: String, diff --git a/backend/windmill-api/src/http_trigger_auth.rs b/backend/windmill-api/src/http_trigger_auth.rs index fd15927b69..b4fac32925 100644 --- a/backend/windmill-api/src/http_trigger_auth.rs +++ b/backend/windmill-api/src/http_trigger_auth.rs @@ -253,8 +253,8 @@ mod zoom { use super::*; #[derive(Debug, Deserialize)] - #[serde(rename_all = "snake_case")] struct ZoomPayload { + #[serde(rename = "plainToken")] plain_token: String, } diff --git a/backend/windmill-api/src/jobs.rs b/backend/windmill-api/src/jobs.rs index be015f5929..1ed0871a7c 100644 --- a/backend/windmill-api/src/jobs.rs +++ b/backend/windmill-api/src/jobs.rs @@ -674,14 +674,14 @@ async fn list_selected_job_groups( 'kind', jb.kind, 'script_path', jb.runnable_path, 'latest_schema', COALESCE( - (SELECT DISTINCT ON (s.path) s.schema FROM script s WHERE s.path = jb.runnable_path AND jb.kind = 'script' ORDER BY s.path, s.created_at DESC), - (SELECT flow_version.schema FROM flow LEFT JOIN flow_version ON flow_version.id = flow.versions[array_upper(flow.versions, 1)] WHERE flow.path = jb.runnable_path AND jb.kind = 'flow') + (SELECT DISTINCT ON (s.path) s.schema FROM script s WHERE s.workspace_id = $1 AND s.path = jb.runnable_path AND jb.kind = 'script' ORDER BY s.path, s.created_at DESC), + (SELECT flow_version.schema FROM flow LEFT JOIN flow_version ON flow_version.id = flow.versions[array_upper(flow.versions, 1)] WHERE flow.workspace_id = $1 AND flow.path = jb.runnable_path AND jb.kind = 'flow') ), 'schemas', ARRAY( SELECT jsonb_build_object( 'script_hash', LPAD(TO_HEX(COALESCE(s.hash, f.id)), 16, '0'), 'job_ids', ARRAY_AGG(DISTINCT j.id), - 'schema', ANY_VALUE(COALESCE(s.schema, f.schema)) + 'schema', (ARRAY_AGG(COALESCE(s.schema, f.schema)))[1] ) FROM v2_job j LEFT JOIN script s ON s.hash = j.runnable_id AND j.kind = 'script' LEFT JOIN flow_version f ON f.id = j.runnable_id AND j.kind = 'flow' @@ -3095,16 +3095,17 @@ struct CancelJob { enum PreviewKind { Code, Identity, - Http, Noop, Bundle, Tarbundle, + ScriptHash, } #[derive(Deserialize)] struct Preview { content: Option, kind: Option, + script_hash: Option, path: Option, args: Option>>, language: Option, @@ -3440,7 +3441,11 @@ async fn batch_rerun_handle_job( } InputTransform::Javascript { expr } => { #[cfg(not(feature = "deno_core"))] - tracing::error!("deno_core feature is not activated, cannot evaluate: {expr}"); + Err(error::Error::ExecutionErr( + format!("deno_core feature is not activated, cannot evaluate: {expr}") + .to_string(), + ))?; + #[cfg(feature = "deno_core")] args.insert( property_name.clone(), @@ -4851,7 +4856,10 @@ async fn run_preview_script( Some(PreviewKind::Identity) => JobPayload::Identity, Some(PreviewKind::Noop) => JobPayload::Noop, _ => JobPayload::Code(RawCode { - hash: None, + hash: preview + .script_hash + .as_ref() + .and_then(|s| windmill_common::scripts::to_i64(s).ok()), content: preview.content.unwrap_or_default(), path: preview.path, language: preview.language.unwrap_or(ScriptLang::Deno), @@ -5831,7 +5839,7 @@ pub fn filter_list_completed_query( if let Some(label) = &lq.label { if lq.allow_wildcards.unwrap_or(false) { let wh = format!( - "EXISTS (SELECT 1 FROM jsonb_array_elements_text(result->'wm_labels') label WHERE label LIKE '{}')", + "EXISTS (SELECT 1 FROM jsonb_array_elements_text(result->'wm_labels') label WHERE jsonb_typeof(result->'wm_labels') = 'array' AND label LIKE '{}')", &label.replace("*", "%").replace("'", "''") ); sqlb.and_where("result ? 'wm_labels'"); diff --git a/backend/windmill-api/src/postgres_triggers/handler.rs b/backend/windmill-api/src/postgres_triggers/handler.rs index 69fe8604f2..d1cd92e8c3 100644 --- a/backend/windmill-api/src/postgres_triggers/handler.rs +++ b/backend/windmill-api/src/postgres_triggers/handler.rs @@ -395,7 +395,7 @@ pub async fn create_postgres_trigger( "Missing replication slot name".to_string(), )); } - (publication_name.unwrap(), replication_slot_name.unwrap(), ) + (publication_name.unwrap(), replication_slot_name.unwrap()) }; let mut tx = user_db.begin(&authed).await?; diff --git a/backend/windmill-api/src/postgres_triggers/mapper.rs b/backend/windmill-api/src/postgres_triggers/mapper.rs index 817a2e8cf6..bbc7b9c011 100644 --- a/backend/windmill-api/src/postgres_triggers/mapper.rs +++ b/backend/windmill-api/src/postgres_triggers/mapper.rs @@ -124,11 +124,13 @@ export async function main( transaction_type: "insert" | "update" | "delete", schema_name: string, table_name: string, - row: {} + row: {}, + old_row?: {} ) {{ }} "#, - struct_definition + &struct_definition, + &struct_definition ) } } diff --git a/backend/windmill-api/src/postgres_triggers/relation.rs b/backend/windmill-api/src/postgres_triggers/relation.rs index f893f0ed5b..f313efb893 100644 --- a/backend/windmill-api/src/postgres_triggers/relation.rs +++ b/backend/windmill-api/src/postgres_triggers/relation.rs @@ -47,7 +47,7 @@ impl RelationConverter { .ok_or(RelationConversionError::FailToFindMatchingTable) } - pub fn body_to_json( + pub fn row_to_json( &self, to_decode: (Oid, Vec), ) -> Result, RelationConversionError> { diff --git a/backend/windmill-api/src/postgres_triggers/trigger.rs b/backend/windmill-api/src/postgres_triggers/trigger.rs index 2ba161b268..746dca99eb 100644 --- a/backend/windmill-api/src/postgres_triggers/trigger.rs +++ b/backend/windmill-api/src/postgres_triggers/trigger.rs @@ -650,37 +650,79 @@ async fn listen_to_transactions( None } Insert(insert) => { - Some((insert.o_id, relations.body_to_json((insert.o_id, insert.tuple)), "insert")) + Some((insert.o_id, Ok(None), relations.row_to_json((insert.o_id, insert.tuple)), "insert")) } Update(update) => { - Some((update.o_id, relations.body_to_json((update.o_id, update.new_tuple)), "update")) + let old_row = update.old_tuple.map(|old_tuple| relations.row_to_json((update.o_id, old_tuple))).transpose(); + let row = relations.row_to_json((update.o_id, update.new_tuple)); + Some((update.o_id, old_row, row, "update")) } Delete(delete) => { - let body = delete.old_tuple.unwrap_or_else(|| delete.key_tuple.unwrap()); - Some((delete.o_id, relations.body_to_json((delete.o_id, body)), "delete")) + let row = delete.old_tuple.unwrap_or_else(|| delete.key_tuple.unwrap()); + Some((delete.o_id, Ok(None), relations.row_to_json((delete.o_id, row)), "delete")) } }; - if let Some((o_id, Ok(body), transaction_type)) = json { - let relation = match relations.get_relation(o_id) { - Ok(relation) => relation, - Err(err) => { - tracing::error!("Postgres trigger named: {}, error: {}", pg.get_path(), err.to_string()); - continue; + match json { + Some((o_id, Ok(old_row), Ok(row), transaction_type)) => { + let relation = match relations.get_relation(o_id) { + Ok(relation) => relation, + Err(err) => { + tracing::error!("Postgres trigger named: {}, error: {}", pg.get_path(), err.to_string()); + continue; + } + }; + let database_info = HashMap::from([ + ("schema_name".to_string(), to_raw_value(&relation.namespace)), + ("table_name".to_string(), to_raw_value(&relation.name)), + ("transaction_type".to_string(), to_raw_value(&transaction_type)), + ("old_row".to_string(), to_raw_value(&old_row)), + ("row".to_string(), to_raw_value(&row)), + ]); + let extra = Some(HashMap::from([( + "wm_trigger".to_string(), + to_raw_value(&serde_json::json!({"kind": "postgres", })), + )])); + + + let _ = pg.handle(&db, Some(database_info), extra).await; + } + Some((o_id, old_row, row, transaction_type)) => { + let relation = match relations.get_relation(o_id) { + Ok(relation) => relation, + Err(err) => { + tracing::error!("Postgres trigger named: {}, error: {}", pg.get_path(), err.to_string()); + continue; + } + }; + + if let Err(err) = old_row { + tracing::error!( + transaction_type = ?transaction_type, + schema = %relation.namespace, + table = %relation.name, + error = %err, + "Failed to decode OLD row for {} transaction on {}.{}", + transaction_type, + relation.namespace, + relation.name, + ); } - }; - let database_info = HashMap::from([ - ("schema_name".to_string(), to_raw_value(&relation.namespace)), - ("table_name".to_string(), to_raw_value(&relation.name)), - ("transaction_type".to_string(), to_raw_value(&transaction_type)), - ("row".to_string(), to_raw_value(&body)), - ]); - let extra = Some(HashMap::from([( - "wm_trigger".to_string(), - to_raw_value(&serde_json::json!({"kind": "postgres", })), - )])); - - - let _ = pg.handle(&db, Some(database_info), extra).await; + + if let Err(err) = row { + tracing::error!( + transaction_type = ?transaction_type, + schema = %relation.namespace, + table = %relation.name, + error = %err, + "Failed to decode NEW row for {} transaction on {}.{}", + transaction_type, + relation.namespace, + relation.name, + ); + } + + } + _ => {} } } diff --git a/backend/windmill-api/src/scripts.rs b/backend/windmill-api/src/scripts.rs index 8e707a15d2..a1ca9c3322 100644 --- a/backend/windmill-api/src/scripts.rs +++ b/backend/windmill-api/src/scripts.rs @@ -40,6 +40,7 @@ use std::{ }; use windmill_audit::audit_ee::audit_log; use windmill_audit::ActionKind; +use windmill_worker::process_relative_imports; use windmill_common::error::to_anyhow; @@ -894,6 +895,38 @@ async fn create_script_internal<'c>( .await?; Ok((hash, new_tx)) } else { + let db2 = db.clone(); + let w_id2 = w_id.clone(); + let authed2 = authed.clone(); + let permissioned_as2 = permissioned_as.clone(); + let script_path2 = script_path.clone(); + let parent_path = p_path_opt.clone(); + let deployment_message = ns.deployment_message.clone(); + let content = ns.content.clone(); + let language = ns.language.clone(); + tokio::spawn(async move { + // wait for 10 seconds to make sure the script is deployed and that the CLI sync that pushed it (f one) is complete + tokio::time::sleep(std::time::Duration::from_secs(10)).await; + if let Err(e) = process_relative_imports( + &db2, + None, + None, + &w_id2, + &script_path2, + parent_path, + deployment_message, + &content, + &Some(language), + &authed2.email, + &authed2.username, + &permissioned_as2, + ) + .await + { + tracing::error!(%e, "error processing relative imports"); + } + }); + handle_deployment_metadata( &authed.email, &authed.username, diff --git a/backend/windmill-api/src/sqs_triggers_ee.rs b/backend/windmill-api/src/sqs_triggers_ee.rs index 4f7eb6e254..da9b288f6b 100644 --- a/backend/windmill-api/src/sqs_triggers_ee.rs +++ b/backend/windmill-api/src/sqs_triggers_ee.rs @@ -1,6 +1,7 @@ use crate::db::DB; use axum::Router; use serde::{Deserialize, Serialize}; +use windmill_common::auth::aws::AwsAuthResourceType; pub fn workspaced_service() -> Router { @@ -14,6 +15,7 @@ pub fn start_sqs(_db: DB, mut _killpill_rx: tokio::sync::broadcast::Receiver<()> #[derive(Debug, Clone, Deserialize, Serialize)] pub struct SqsTrigger { pub queue_url: String, + pub aws_auth_resource_type: AwsAuthResourceType, pub aws_resource_path: String, pub message_attributes: Option>, pub path: String, diff --git a/backend/windmill-api/src/workspaces_export.rs b/backend/windmill-api/src/workspaces_export.rs index ac98ae12ec..fea688c78a 100644 --- a/backend/windmill-api/src/workspaces_export.rs +++ b/backend/windmill-api/src/workspaces_export.rs @@ -501,7 +501,7 @@ pub(crate) async fn tarball_workspace( "SELECT app.id, app.path, app.summary, app.versions, app.policy, app.custom_path, app.extra_perms, app_version.value, app_version.created_at, app_version.created_by from app, app_version - WHERE app.workspace_id = $1 AND app_version.id = app.versions[array_upper(app.versions, 1)]", + WHERE app.workspace_id = $1 AND app_version.id = app.versions[array_upper(app.versions, 1)] AND app_version.raw_app IS false", ) .bind(&w_id) .fetch_all(&mut *tx) @@ -577,13 +577,35 @@ pub(crate) async fn tarball_workspace( #[cfg(feature = "websocket")] { let websocket_triggers = sqlx::query_as!( - crate::websocket_triggers::WebsocketTrigger, - "SELECT workspace_id, path, url, script_path, is_flow, edited_by, email, edited_at, server_id, last_server_ping, extra_perms, error, enabled, filters as \"filters: _\", initial_messages as \"initial_messages: _\", url_runnable_args as \"url_runnable_args: _\", can_return_message FROM websocket_trigger - WHERE workspace_id = $1", - &w_id - ) - .fetch_all(&mut *tx) - .await?; + crate::websocket_triggers::WebsocketTrigger, + r#" + SELECT + workspace_id, + path, + url, + script_path, + is_flow, + edited_by, + email, + edited_at, + server_id, + last_server_ping, + extra_perms, + error, + enabled, + filters AS "filters: _", + initial_messages AS "initial_messages: _", + url_runnable_args AS "url_runnable_args: _", + can_return_message + FROM + websocket_trigger + WHERE + workspace_id = $1 + "#, + &w_id + ) + .fetch_all(&mut *tx) + .await?; for trigger in websocket_triggers { let trigger_str = &to_string_without_metadata(&trigger, false, None).unwrap(); @@ -622,8 +644,29 @@ pub(crate) async fn tarball_workspace( { let sqs_triggers = sqlx::query_as!( crate::sqs_triggers_ee::SqsTrigger, - "SELECT * FROM sqs_trigger - WHERE workspace_id = $1", + r#" + SELECT + aws_auth_resource_type AS "aws_auth_resource_type: _", + aws_resource_path, + message_attributes, + queue_url, + workspace_id, + path, + script_path, + is_flow, + edited_by, + email, + edited_at, + server_id, + last_server_ping, + extra_perms, + error, + enabled + FROM + sqs_trigger + WHERE + workspace_id = $1 + "#, &w_id ) .fetch_all(&mut *tx) @@ -649,6 +692,7 @@ pub(crate) async fn tarball_workspace( workspace_id, delivery_type AS "delivery_type: _", delivery_config AS "delivery_config: _", + subscription_mode AS "subscription_mode: _", path, script_path, is_flow, diff --git a/backend/windmill-common/Cargo.toml b/backend/windmill-common/Cargo.toml index 140d3e2b74..a0278a4c2e 100644 --- a/backend/windmill-common/Cargo.toml +++ b/backend/windmill-common/Cargo.toml @@ -13,6 +13,7 @@ prometheus = ["dep:prometheus"] loki = ["dep:tracing-loki"] benchmark = [] parquet = ["dep:object_store", "dep:aws-config", "dep:aws-sdk-sts"] +aws_auth = ["dep:aws-sdk-sts", "dep:aws-config"] otel = ["dep:opentelemetry-semantic-conventions", "dep:opentelemetry-otlp", "dep:opentelemetry_sdk", "dep:opentelemetry", "dep:tracing-opentelemetry", "dep:opentelemetry-appender-tracing", "dep:tonic"] smtp = ["dep:mail-send"] diff --git a/backend/windmill-common/src/apps.rs b/backend/windmill-common/src/apps.rs index bc8429c279..c5b22d434c 100644 --- a/backend/windmill-common/src/apps.rs +++ b/backend/windmill-common/src/apps.rs @@ -6,6 +6,8 @@ * LICENSE-AGPL for a copy of the license. */ +use std::collections::HashMap; + use serde::{Deserialize, Serialize}; /// Id in the `app_script` table. @@ -21,3 +23,8 @@ pub struct ListAppQuery { pub include_draft_only: Option, pub with_deployment_msg: Option, } + +#[derive(Deserialize)] +pub struct RawAppValue { + pub files: HashMap, +} diff --git a/backend/windmill-common/src/auth.rs b/backend/windmill-common/src/auth.rs index 0266498773..9d1ee74675 100644 --- a/backend/windmill-common/src/auth.rs +++ b/backend/windmill-common/src/auth.rs @@ -1,4 +1,5 @@ use anyhow::Context; +use chrono::{DateTime, Duration, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; @@ -10,6 +11,48 @@ use crate::{ DB, }; +#[derive(Debug)] +pub struct IdToken { + token: String, + expiration: DateTime, +} + +pub fn has_expired(expiration_time: DateTime, take: Option) -> bool { + let now = Utc::now(); + + let expiration = match take { + Some(duration) => expiration_time - duration, + None => expiration_time, + }; + + now > expiration +} + +impl From for String { + fn from(value: IdToken) -> Self { + value.token + } +} + +impl ToString for IdToken { + fn to_string(&self) -> String { + self.token.clone() + } +} + +impl IdToken { + pub fn new(token: String, expiration: DateTime) -> Self { + Self { token, expiration } + } + + pub fn token(&self) -> &str { + &self.token + } + pub fn expiration(&self) -> &DateTime { + &self.expiration + } +} + #[derive(Deserialize, Serialize)] pub struct JWTAuthClaims { pub email: String, @@ -267,3 +310,110 @@ pub async fn create_token_for_owner( Ok(format!("jwt_{}", token)) } + +#[cfg(feature = "aws_auth")] +pub mod aws { + + use crate::error::to_anyhow; + + use super::*; + use crate::utils::empty_string_as_none; + use aws_config::{BehaviorVersion, Region}; + use aws_sdk_sts::{ + config::Credentials as AwsCredentials, + operation::{ + assume_role_with_saml::AssumeRoleWithSamlOutput, + assume_role_with_web_identity::AssumeRoleWithWebIdentityOutput, + }, + types::Credentials, + Client, + }; + + pub const AWS_OIDC_AUDIENCE: &'static str = "sts.amazonaws.com"; + + pub trait GetAuthenticationOutput { + fn get_credentials(&self) -> Result<&Credentials>; + } + + impl GetAuthenticationOutput for AssumeRoleWithSamlOutput { + fn get_credentials(&self) -> Result<&Credentials> { + let credentials = self.credentials.as_ref().ok_or(Error::BadGateway( + "Error fetching credentials from AWS STS".to_string(), + ))?; + Ok(credentials) + } + } + + impl GetAuthenticationOutput for AssumeRoleWithWebIdentityOutput { + fn get_credentials(&self) -> Result<&Credentials> { + let credentials = self.credentials.as_ref().ok_or(Error::BadGateway( + "Error fetching credentials from AWS STS".to_string(), + ))?; + Ok(credentials) + } + } + + #[derive(Debug, Clone, Serialize, Deserialize, sqlx::Type)] + #[sqlx(type_name = "AWS_AUTH_RESOURCE_TYPE", rename_all = "lowercase")] + #[serde(rename_all = "lowercase")] + pub enum AwsAuthResourceType { + Credentials, + Oidc, + } + + #[derive(Debug, Deserialize)] + pub struct CredentialsAuth { + #[serde(deserialize_with = "empty_string_as_none")] + pub region: Option, + #[serde(rename = "awsAccessKeyId")] + pub aws_access_key_id: String, + #[serde(rename = "awsSecretAccessKey")] + pub aws_secret_access_key: String, + } + + #[derive(Clone, Debug, Deserialize)] + #[serde(rename_all = "snake_case")] + pub struct OidcAuth { + #[serde(deserialize_with = "empty_string_as_none")] + pub region: Option, + #[serde(rename = "roleArn")] + pub role_arn: String, + } + + #[derive(Debug, Deserialize)] + #[serde(untagged)] + pub enum AWSAuthConfig { + Credentials(CredentialsAuth), + Oidc(OidcAuth), + } + + pub async fn get_oidc_authentication_data( + oidc_auth: OidcAuth, + role_session_name: Option, + token: String, + ) -> Result { + let region = oidc_auth.region.unwrap_or_else(|| "us-east-1".to_string()); + + let credentials = AwsCredentials::new("", "", None, None, "UserInput"); + + let config = aws_config::defaults(BehaviorVersion::latest()) + .credentials_provider(credentials) + .region(Region::new(region.clone())) + .load() + .await; + + let assume_role_with_web_identity_fluent_builder = Client::new(&config) + .assume_role_with_web_identity() + .set_role_arn(Some(oidc_auth.role_arn)) + .set_role_session_name(role_session_name.map(|str| str.to_string())) + .set_web_identity_token(Some(token)); + + let resp = assume_role_with_web_identity_fluent_builder + .clone() + .send() + .await + .map_err(to_anyhow)?; + + Ok(resp) + } +} diff --git a/backend/windmill-common/src/s3_helpers.rs b/backend/windmill-common/src/s3_helpers.rs index e3dff5350c..495f45912e 100644 --- a/backend/windmill-common/src/s3_helpers.rs +++ b/backend/windmill-common/src/s3_helpers.rs @@ -476,3 +476,7 @@ impl CredentialProvider for AwsCredentialAdapter { pub fn bundle(w_id: &str, hash: &str) -> String { format!("script_bundle/{}/{}", w_id, hash) } + +pub fn raw_app(w_id: &str, version: &i64) -> String { + format!("/home/rfiszel/raw_app/{}/{}", w_id, version) +} diff --git a/backend/windmill-common/src/utils.rs b/backend/windmill-common/src/utils.rs index 5018591072..62c193031a 100644 --- a/backend/windmill-common/src/utils.rs +++ b/backend/windmill-common/src/utils.rs @@ -19,8 +19,7 @@ use git_version::git_version; use chrono::Utc; use croner::Cron; -use rand::distr::Alphanumeric; -use rand::{rng, Rng}; +use rand::{distr::Alphanumeric, rng, Rng}; use reqwest::Client; use semver::Version; use serde::{Deserialize, Deserializer, Serialize}; diff --git a/backend/windmill-queue/src/jobs.rs b/backend/windmill-queue/src/jobs.rs index 9c7dd8a4fc..c92933ef92 100644 --- a/backend/windmill-queue/src/jobs.rs +++ b/backend/windmill-queue/src/jobs.rs @@ -4101,6 +4101,7 @@ pub async fn push<'c, 'd>( } else if job_kind == JobKind::Dependencies || job_kind == JobKind::FlowDependencies || job_kind == JobKind::DeploymentCallback + || job_kind == JobKind::AppDependencies { // using the dependency tag for deployment callback for now. We can create a separate tag when we need "dependency".to_string() diff --git a/backend/windmill-worker/src/lib.rs b/backend/windmill-worker/src/lib.rs index 2b0a5d6f4a..64a9cf2c88 100644 --- a/backend/windmill-worker/src/lib.rs +++ b/backend/windmill-worker/src/lib.rs @@ -49,6 +49,8 @@ mod worker_flow; mod worker_lockfiles; mod worker_utils; +pub use worker_lockfiles::process_relative_imports; + pub use worker::*; pub use result_processor::handle_job_error; diff --git a/backend/windmill-worker/src/mysql_executor.rs b/backend/windmill-worker/src/mysql_executor.rs index a1309395a7..7148e7b961 100644 --- a/backend/windmill-worker/src/mysql_executor.rs +++ b/backend/windmill-worker/src/mysql_executor.rs @@ -6,8 +6,10 @@ use itertools::Itertools; use mysql_async::{ consts::ColumnType, prelude::*, FromValueError, OptsBuilder, Params, Row, SslOpts, }; +use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; use serde_json::{json, value::RawValue, Value}; +use std::str::FromStr; use tokio::sync::Mutex; use windmill_common::{ error::{to_anyhow, Error}, @@ -303,26 +305,38 @@ pub async fn do_mysql( return Ok(raw_result); } +// 2023-12-01T16:18:00.000Z +static DATE_REGEX_TZ: Lazy = Lazy::new(|| { + regex::Regex::new(r"(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d+)Z").unwrap() +}); +// 2025-04-21 10:08:00 +static DATE_REGEX: Lazy = + Lazy::new(|| regex::Regex::new(r"(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})").unwrap()); + fn string_date_to_mysql_date(s: &str) -> mysql_async::Value { - // 2023-12-01T16:18:00.000Z - let re = regex::Regex::new(r"(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d+)Z").unwrap(); - let caps = re.captures(s); + let caps = DATE_REGEX_TZ.captures(s).or_else(|| DATE_REGEX.captures(s)); if let Some(caps) = caps { mysql_async::Value::Date( - caps.get(1).unwrap().as_str().parse().unwrap_or_default(), - caps.get(2).unwrap().as_str().parse().unwrap_or_default(), - caps.get(3).unwrap().as_str().parse().unwrap_or_default(), - caps.get(4).unwrap().as_str().parse().unwrap_or_default(), - caps.get(5).unwrap().as_str().parse().unwrap_or_default(), - caps.get(6).unwrap().as_str().parse().unwrap_or_default(), - caps.get(7).unwrap().as_str().parse().unwrap_or_default(), + get_capture_by_index(&caps, 1), + get_capture_by_index(&caps, 2), + get_capture_by_index(&caps, 3), + get_capture_by_index(&caps, 4), + get_capture_by_index(&caps, 5), + get_capture_by_index(&caps, 6), + get_capture_by_index(&caps, 7), ) } else { mysql_async::Value::Date(0, 0, 0, 0, 0, 0, 0) } } +fn get_capture_by_index(caps: ®ex::Captures, n: usize) -> T { + caps.get(n) + .and_then(|s| s.as_str().parse::().ok()) + .unwrap_or_default() +} + fn convert_row_to_value(row: Row) -> serde_json::Value { let mut map = serde_json::Map::new(); diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 34193803f6..df80b2cb36 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -284,6 +284,8 @@ lazy_static::lazy_static! { let mut proxy_env = Vec::new(); if let Some(no_proxy) = NO_PROXY.as_ref() { proxy_env.push(("NO_PROXY", no_proxy.to_string())); + } else if HTTPS_PROXY.is_some() || HTTP_PROXY.is_some() { + proxy_env.push(("NO_PROXY", "localhost,127.0.0.1".to_string())); } if let Some(http_proxy) = HTTP_PROXY.as_ref() { proxy_env.push(("HTTP_PROXY", http_proxy.to_string())); @@ -2457,16 +2459,22 @@ async fn handle_code_execution_job( _ => None, }; - arc_data = - preview.ok_or_else(|| Error::internal_err("expected preview".to_string()))?; - metadata = ScriptMetadata { - language: job.script_lang, - codebase, - envs: None, - schema: None, - schema_validator: None, - }; - (arc_data.as_ref(), &metadata) + if codebase.is_none() && job.runnable_id.is_some() { + (arc_data, arc_metadata) = + cache::script::fetch(conn, job.runnable_id.unwrap()).await?; + (arc_data.as_ref(), arc_metadata.as_ref()) + } else { + arc_data = + preview.ok_or_else(|| Error::internal_err("expected preview".to_string()))?; + metadata = ScriptMetadata { + language: job.script_lang, + codebase, + envs: None, + schema: None, + schema_validator: None, + }; + (arc_data.as_ref(), &metadata) + } } JobKind::Script_Hub => { let ContentReqLangEnvs { content, lockfile, language, envs, codebase, schema } = diff --git a/backend/windmill-worker/src/worker_lockfiles.rs b/backend/windmill-worker/src/worker_lockfiles.rs index 50773b4266..a38e7ff2c4 100644 --- a/backend/windmill-worker/src/worker_lockfiles.rs +++ b/backend/windmill-worker/src/worker_lockfiles.rs @@ -368,44 +368,21 @@ pub async fn handle_dependency_job( tracing::error!(%e, "error handling deployment metadata"); } - let relative_imports = - extract_relative_imports(&script_data.code, script_path, &job.script_lang); - if let Some(relative_imports) = relative_imports { - update_script_dependency_map( - &job.id, - db, - w_id, - &parent_path, - script_path, - relative_imports, - ) - .await?; - let already_visited = job - .args - .as_ref() - .map(|x| { - x.get("already_visited") - .map(|v| serde_json::from_str::>(v.get()).ok()) - .flatten() - }) - .flatten() - .unwrap_or_default(); - if let Err(e) = trigger_dependents_to_recompute_dependencies( - w_id, - script_path, - deployment_message, - parent_path, - &job.permissioned_as_email, - &job.created_by, - &job.permissioned_as, - db, - already_visited, - ) - .await - { - tracing::error!(%e, "error triggering dependents to recompute dependencies"); - } - } + process_relative_imports( + db, + Some(job.id), + job.args.as_ref(), + &job.workspace_id, + script_path, + parent_path, + deployment_message, + &script_data.code, + &job.script_lang, + &job.permissioned_as_email, + &job.created_by, + &job.permissioned_as, + ) + .await?; Ok(to_raw_value_owned( json!({ "status": "Successful lock file generation", "lock": content }), @@ -443,6 +420,58 @@ fn remove_ansi_codes(s: &str) -> String { ANSI_REGEX.replace_all(s, "").to_string() } +pub async fn process_relative_imports( + db: &sqlx::Pool, + job_id: Option, + args: Option<&Json>>>, + w_id: &str, + script_path: &str, + parent_path: Option, + deployment_message: Option, + code: &str, + script_lang: &Option, + permissioned_as_email: &str, + created_by: &str, + permissioned_as: &str, +) -> error::Result<()> { + let relative_imports = extract_relative_imports(&code, script_path, script_lang); + if let Some(relative_imports) = relative_imports { + update_script_dependency_map( + &job_id.unwrap_or_else(|| Uuid::nil()), + db, + w_id, + &parent_path, + script_path, + relative_imports, + ) + .await?; + let already_visited = args + .map(|x| { + x.get("already_visited") + .map(|v| serde_json::from_str::>(v.get()).ok()) + .flatten() + }) + .flatten() + .unwrap_or_default(); + if let Err(e) = trigger_dependents_to_recompute_dependencies( + w_id, + script_path, + deployment_message, + parent_path, + permissioned_as_email, + created_by, + permissioned_as, + db, + already_visited, + ) + .await + { + tracing::error!(%e, "error triggering dependents to recompute dependencies"); + } + } + Ok(()) +} + async fn trigger_dependents_to_recompute_dependencies( w_id: &str, script_path: &str, @@ -1735,6 +1764,90 @@ pub async fn handle_app_dependency_job( } } +// async fn upload_raw_app( +// app_value: &RawAppValue, +// job: &QueuedJob, +// mem_peak: &mut i32, +// canceled_by: &mut Option, +// job_dir: &str, +// db: &sqlx::Pool, +// worker_name: &str, +// occupancy_metrics: &mut Option<&mut OccupancyMetrics>, +// version: i64, +// ) -> Result<()> { +// let mut entrypoint = "index.ts"; +// for file in app_value.files.iter() { +// if file.0 == "/index.tsx" { +// entrypoint = "index.tsx"; +// } else if file.0 == "/index.js" { +// entrypoint = "index.js"; +// } +// write_file(&job_dir, file.0, &file.1)?; +// } +// let common_bun_proc_envs: HashMap = get_common_bun_proc_envs(None).await; + +// install_bun_lockfile( +// mem_peak, +// canceled_by, +// &job.id, +// &job.workspace_id, +// Some(db), +// job_dir, +// worker_name, +// common_bun_proc_envs, +// false, +// occupancy_metrics, +// ) +// .await?; +// let mut cmd = tokio::process::Command::new("esbuild"); +// let mut args = "--bundle --minify --outdir=dist/" +// .split(' ') +// .collect::>(); +// args.push(entrypoint); +// cmd.current_dir(job_dir) +// .env_clear() +// .args(args) +// .stdout(Stdio::piped()) +// .stderr(Stdio::piped()); +// let child = start_child_process(cmd, "esbuild").await?; + +// crate::handle_child::handle_child( +// &job.id, +// db, +// mem_peak, +// canceled_by, +// child, +// false, +// worker_name, +// &job.workspace_id, +// "esbuild", +// Some(30), +// false, +// occupancy_metrics, +// ) +// .await?; +// let output_dir = format!("{}/dist", job_dir); +// let target_dir = format!("/home/rfiszel/wmill/{}/{}", job.workspace_id, version); + +// tokio::fs::create_dir_all(&target_dir).await?; + +// tracing::info!("Copying files from {} to {}", output_dir, target_dir); + +// let index_ts = format!("{}/index.js", output_dir); +// let index_css = format!("{}/index.css", output_dir); + +// if tokio::fs::metadata(&index_ts).await.is_ok() { +// tokio::fs::copy(&index_ts, format!("{}/index.js", target_dir)).await?; +// } + +// if tokio::fs::metadata(&index_css).await.is_ok() { +// tokio::fs::copy(&index_css, format!("{}/index.css", target_dir)).await?; +// } +// // let file_path = format!("/home/rfiszel/wmill/{}/{}", job.workspace_id, version); + +// Ok(()) +// } + #[cfg(feature = "python")] async fn python_dep( reqs: String, diff --git a/benchmarks/lib.ts b/benchmarks/lib.ts index a4fc35045b..96c5771001 100644 --- a/benchmarks/lib.ts +++ b/benchmarks/lib.ts @@ -2,7 +2,7 @@ import { sleep } from "https://deno.land/x/sleep@v1.2.1/mod.ts"; import * as windmill from "https://deno.land/x/windmill@v1.174.0/mod.ts"; import * as api from "https://deno.land/x/windmill@v1.174.0/windmill-api/index.ts"; -export const VERSION = "v1.481.0"; +export const VERSION = "v1.483.2"; export async function login(email: string, password: string): Promise { return await windmill.UserService.login({ diff --git a/cli/.gitignore b/cli/.gitignore index 409ee189ef..d0b1f2c514 100644 --- a/cli/.gitignore +++ b/cli/.gitignore @@ -1 +1,2 @@ npm/ +gen/ \ No newline at end of file diff --git a/cli/gen/core/ApiError.ts b/cli/gen/core/ApiError.ts deleted file mode 100644 index 81aa78a668..0000000000 --- a/cli/gen/core/ApiError.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; -import type { ApiResult } from './ApiResult.ts'; - -export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: unknown; - public readonly request: ApiRequestOptions; - - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); - - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } -} \ No newline at end of file diff --git a/cli/gen/core/ApiRequestOptions.ts b/cli/gen/core/ApiRequestOptions.ts deleted file mode 100644 index 939a0aa4c8..0000000000 --- a/cli/gen/core/ApiRequestOptions.ts +++ /dev/null @@ -1,21 +0,0 @@ -export type ApiRequestOptions = { - readonly body?: any; - readonly cookies?: Record; - readonly errors?: Record; - readonly formData?: Record | any[] | Blob | File; - readonly headers?: Record; - readonly mediaType?: string; - readonly method: - | 'DELETE' - | 'GET' - | 'HEAD' - | 'OPTIONS' - | 'PATCH' - | 'POST' - | 'PUT'; - readonly path?: Record; - readonly query?: Record; - readonly responseHeader?: string; - readonly responseTransformer?: (data: unknown) => Promise; - readonly url: string; -}; \ No newline at end of file diff --git a/cli/gen/core/ApiResult.ts b/cli/gen/core/ApiResult.ts deleted file mode 100644 index 4c58e39138..0000000000 --- a/cli/gen/core/ApiResult.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type ApiResult = { - readonly body: TData; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly url: string; -}; \ No newline at end of file diff --git a/cli/gen/core/CancelablePromise.ts b/cli/gen/core/CancelablePromise.ts deleted file mode 100644 index ccc082e8f2..0000000000 --- a/cli/gen/core/CancelablePromise.ts +++ /dev/null @@ -1,126 +0,0 @@ -export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } -} - -export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; - - (cancelHandler: () => void): void; -} - -export class CancelablePromise implements Promise { - private _isResolved: boolean; - private _isRejected: boolean; - private _isCancelled: boolean; - readonly cancelHandlers: (() => void)[]; - readonly promise: Promise; - private _resolve?: (value: T | PromiseLike) => void; - private _reject?: (reason?: unknown) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: unknown) => void, - onCancel: OnCancel - ) => void - ) { - this._isResolved = false; - this._isRejected = false; - this._isCancelled = false; - this.cancelHandlers = []; - this.promise = new Promise((resolve, reject) => { - this._resolve = resolve; - this._reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isResolved = true; - if (this._resolve) this._resolve(value); - }; - - const onReject = (reason?: unknown): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isRejected = true; - if (this._reject) this._reject(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this.cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, 'isResolved', { - get: (): boolean => this._isResolved, - }); - - Object.defineProperty(onCancel, 'isRejected', { - get: (): boolean => this._isRejected, - }); - - Object.defineProperty(onCancel, 'isCancelled', { - get: (): boolean => this._isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: unknown) => TResult2 | PromiseLike) | null - ): Promise { - return this.promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: unknown) => TResult | PromiseLike) | null - ): Promise { - return this.promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.promise.finally(onFinally); - } - - public cancel(): void { - if (this._isResolved || this._isRejected || this._isCancelled) { - return; - } - this._isCancelled = true; - if (this.cancelHandlers.length) { - try { - for (const cancelHandler of this.cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn('Cancellation threw an error', error); - return; - } - } - this.cancelHandlers.length = 0; - if (this._reject) this._reject(new CancelError('Request aborted')); - } - - public get isCancelled(): boolean { - return this._isCancelled; - } -} \ No newline at end of file diff --git a/cli/gen/core/OpenAPI.ts b/cli/gen/core/OpenAPI.ts deleted file mode 100644 index 2938820ca7..0000000000 --- a/cli/gen/core/OpenAPI.ts +++ /dev/null @@ -1,63 +0,0 @@ -const getEnv = (key: string) => { - return Deno.env.get(key) -}; - -const baseUrl = getEnv("BASE_INTERNAL_URL") ?? getEnv("BASE_URL") ?? "http://localhost:8000"; -const baseUrlApi = (baseUrl ?? '') + "/api"; - -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; - -type Headers = Record; -type Middleware = (value: T) => T | Promise; -type Resolver = (options: ApiRequestOptions) => Promise; - -export class Interceptors { - _fns: Middleware[]; - - constructor() { - this._fns = []; - } - - eject(fn: Middleware): void { - const index = this._fns.indexOf(fn); - if (index !== -1) { - this._fns = [...this._fns.slice(0, index), ...this._fns.slice(index + 1)]; - } - } - - use(fn: Middleware): void { - this._fns = [...this._fns, fn]; - } -} - -export type OpenAPIConfig = { - BASE: string; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - ENCODE_PATH?: ((path: string) => string) | undefined; - HEADERS?: Headers | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - VERSION: string; - WITH_CREDENTIALS: boolean; - interceptors: { - request: Interceptors; - response: Interceptors; - }; -}; - -export const OpenAPI: OpenAPIConfig = { - BASE: baseUrlApi, - CREDENTIALS: 'include', - ENCODE_PATH: undefined, - HEADERS: undefined, - PASSWORD: undefined, - TOKEN: getEnv("WM_TOKEN"), - USERNAME: undefined, - VERSION: '1.481.0', - WITH_CREDENTIALS: true, - interceptors: { - request: new Interceptors(), - response: new Interceptors(), - }, -}; \ No newline at end of file diff --git a/cli/gen/core/request.ts b/cli/gen/core/request.ts deleted file mode 100644 index ed11eb4482..0000000000 --- a/cli/gen/core/request.ts +++ /dev/null @@ -1,350 +0,0 @@ -import { ApiError } from './ApiError.ts'; -import type { ApiRequestOptions } from './ApiRequestOptions.ts'; -import type { ApiResult } from './ApiResult.ts'; -import { CancelablePromise } from './CancelablePromise.ts'; -import type { OnCancel } from './CancelablePromise.ts'; -import type { OpenAPIConfig } from './OpenAPI.ts'; - -export const isString = (value: unknown): value is string => { - return typeof value === 'string'; -}; - -export const isStringWithValue = (value: unknown): value is string => { - return isString(value) && value !== ''; -}; - -export const isBlob = (value: any): value is Blob => { - return value instanceof Blob; -}; - -export const isFormData = (value: unknown): value is FormData => { - return value instanceof FormData; -}; - -export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } -}; - -export const getQueryString = (params: Record): string => { - const qs: string[] = []; - - const append = (key: string, value: unknown) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; - - const encodePair = (key: string, value: unknown) => { - if (value === undefined || value === null) { - return; - } - - if (value instanceof Date) { - append(key, value.toISOString()); - } else if (Array.isArray(value)) { - value.forEach(v => encodePair(key, v)); - } else if (typeof value === 'object') { - Object.entries(value).forEach(([k, v]) => encodePair(`${key}[${k}]`, v)); - } else { - append(key, value); - } - }; - - Object.entries(params).forEach(([key, value]) => encodePair(key, value)); - - return qs.length ? `?${qs.join('&')}` : ''; -}; - -const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); - - const url = config.BASE + path; - return options.query ? url + getQueryString(options.query) : url; -}; - -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: unknown) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; - - Object.entries(options.formData) - .filter(([, value]) => value !== undefined && value !== null) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; -}; - -type Resolver = (options: ApiRequestOptions) => Promise; - -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; -}; - -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - const [token, username, password, additionalHeaders] = await Promise.all([ - // @ts-ignore - resolve(options, config.TOKEN), - // @ts-ignore - resolve(options, config.USERNAME), - // @ts-ignore - resolve(options, config.PASSWORD), - // @ts-ignore - resolve(options, config.HEADERS), - ]); - - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - }) - .filter(([, value]) => value !== undefined && value !== null) - .reduce((headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), {} as Record); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; - } - - if (options.body !== undefined) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } - } - - return new Headers(headers); -}; - -export const getRequestBody = (options: ApiRequestOptions): unknown => { - if (options.body !== undefined) { - if (options.mediaType?.includes('application/json') || options.mediaType?.includes('+json')) { - return JSON.stringify(options.body); - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } - } - return undefined; -}; - -export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel -): Promise => { - const controller = new AbortController(); - - let request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; - - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } - - for (const fn of config.interceptors.request._fns) { - request = await fn(request); - } - - onCancel(() => controller.abort()); - - return await fetch(url, request); -}; - -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } - } - return undefined; -}; - -export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const binaryTypes = ['application/octet-stream', 'application/pdf', 'application/zip', 'audio/', 'image/', 'video/']; - if (contentType.includes('application/json') || contentType.includes('+json')) { - return await response.json(); - } else if (binaryTypes.some(type => contentType.includes(type))) { - return await response.blob(); - } else if (contentType.includes('multipart/form-data')) { - return await response.formData(); - } else if (contentType.includes('text/')) { - return await response.text(); - } - } - } catch (error) { - console.error(error); - } - } - return undefined; -}; - -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 402: 'Payment Required', - 403: 'Forbidden', - 404: 'Not Found', - 405: 'Method Not Allowed', - 406: 'Not Acceptable', - 407: 'Proxy Authentication Required', - 408: 'Request Timeout', - 409: 'Conflict', - 410: 'Gone', - 411: 'Length Required', - 412: 'Precondition Failed', - 413: 'Payload Too Large', - 414: 'URI Too Long', - 415: 'Unsupported Media Type', - 416: 'Range Not Satisfiable', - 417: 'Expectation Failed', - 418: 'Im a teapot', - 421: 'Misdirected Request', - 422: 'Unprocessable Content', - 423: 'Locked', - 424: 'Failed Dependency', - 425: 'Too Early', - 426: 'Upgrade Required', - 428: 'Precondition Required', - 429: 'Too Many Requests', - 431: 'Request Header Fields Too Large', - 451: 'Unavailable For Legal Reasons', - 500: 'Internal Server Error', - 501: 'Not Implemented', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - 504: 'Gateway Timeout', - 505: 'HTTP Version Not Supported', - 506: 'Variant Also Negotiates', - 507: 'Insufficient Storage', - 508: 'Loop Detected', - 510: 'Not Extended', - 511: 'Network Authentication Required', - ...options.errors, - } - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? 'unknown'; - const errorStatusText = result.statusText ?? 'unknown'; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError(options, result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` - ); - } -}; - -/** - * Request method - * @param config The OpenAPI configuration object - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - let response = await sendRequest(config, options, url, body, formData, headers, onCancel); - - for (const fn of config.interceptors.response._fns) { - response = await fn(response); - } - - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - let transformedBody = responseBody; - if (options.responseTransformer && response.ok) { - transformedBody = await options.responseTransformer(responseBody) - } - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? transformedBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); -}; \ No newline at end of file diff --git a/cli/gen/index.ts b/cli/gen/index.ts deleted file mode 100644 index 77b08aeebb..0000000000 --- a/cli/gen/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts -export { ApiError } from './core/ApiError.ts'; -export { CancelablePromise, CancelError } from './core/CancelablePromise.ts'; -export { OpenAPI, type OpenAPIConfig } from './core/OpenAPI.ts'; -export * from './services.gen.ts'; -export * from './types.gen.ts'; \ No newline at end of file diff --git a/cli/gen/services.gen.ts b/cli/gen/services.gen.ts deleted file mode 100644 index a94a3a544d..0000000000 --- a/cli/gen/services.gen.ts +++ /dev/null @@ -1,8995 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { CancelablePromise } from './core/CancelablePromise.ts'; -import { OpenAPI } from './core/OpenAPI.ts'; -import { request as __request } from './core/request.ts'; -import type { BackendVersionResponse, BackendUptodateResponse, GetLicenseIdResponse, GetOpenApiYamlResponse, GetAuditLogData, GetAuditLogResponse, ListAuditLogsData, ListAuditLogsResponse, LoginData, LoginResponse, LogoutResponse, GetUserData, GetUserResponse, UpdateUserData, UpdateUserResponse, IsOwnerOfPathData, IsOwnerOfPathResponse, SetPasswordData, SetPasswordResponse, SetPasswordForUserData, SetPasswordForUserResponse, SetLoginTypeForUserData, SetLoginTypeForUserResponse, CreateUserGloballyData, CreateUserGloballyResponse, GlobalUserUpdateData, GlobalUserUpdateResponse, GlobalUsernameInfoData, GlobalUsernameInfoResponse, GlobalUserRenameData, GlobalUserRenameResponse, GlobalUserDeleteData, GlobalUserDeleteResponse, GlobalUsersOverwriteData, GlobalUsersOverwriteResponse, GlobalUsersExportResponse, DeleteUserData, DeleteUserResponse, GetGlobalConnectedRepositoriesResponse, ListWorkspacesResponse, IsDomainAllowedResponse, ListUserWorkspacesResponse, ListWorkspacesAsSuperAdminData, ListWorkspacesAsSuperAdminResponse, CreateWorkspaceData, CreateWorkspaceResponse, ExistsWorkspaceData, ExistsWorkspaceResponse, ExistsUsernameData, ExistsUsernameResponse, GetGlobalData, GetGlobalResponse, SetGlobalData, SetGlobalResponse, GetLocalResponse, TestSmtpData, TestSmtpResponse, TestCriticalChannelsData, TestCriticalChannelsResponse, GetCriticalAlertsData, GetCriticalAlertsResponse, AcknowledgeCriticalAlertData, AcknowledgeCriticalAlertResponse, AcknowledgeAllCriticalAlertsResponse, TestLicenseKeyData, TestLicenseKeyResponse, TestObjectStorageConfigData, TestObjectStorageConfigResponse, SendStatsResponse, GetLatestKeyRenewalAttemptResponse, RenewLicenseKeyData, RenewLicenseKeyResponse, CreateCustomerPortalSessionData, CreateCustomerPortalSessionResponse, TestMetadataData, TestMetadataResponse, ListGlobalSettingsResponse, GetCurrentEmailResponse, RefreshUserTokenData, RefreshUserTokenResponse, GetTutorialProgressResponse, UpdateTutorialProgressData, UpdateTutorialProgressResponse, LeaveInstanceResponse, GetUsageResponse, GetRunnableResponse, GlobalWhoamiResponse, ListWorkspaceInvitesResponse, WhoamiData, WhoamiResponse, GetGithubAppTokenData, GetGithubAppTokenResponse, InstallFromWorkspaceData, InstallFromWorkspaceResponse, DeleteFromWorkspaceData, DeleteFromWorkspaceResponse, ExportInstallationData, ExportInstallationResponse, ImportInstallationData, ImportInstallationResponse, AcceptInviteData, AcceptInviteResponse, DeclineInviteData, DeclineInviteResponse, InviteUserData, InviteUserResponse, AddUserData, AddUserResponse, DeleteInviteData, DeleteInviteResponse, ArchiveWorkspaceData, ArchiveWorkspaceResponse, UnarchiveWorkspaceData, UnarchiveWorkspaceResponse, DeleteWorkspaceData, DeleteWorkspaceResponse, LeaveWorkspaceData, LeaveWorkspaceResponse, GetWorkspaceNameData, GetWorkspaceNameResponse, ChangeWorkspaceNameData, ChangeWorkspaceNameResponse, ChangeWorkspaceIdData, ChangeWorkspaceIdResponse, ChangeWorkspaceColorData, ChangeWorkspaceColorResponse, WhoisData, WhoisResponse, UpdateOperatorSettingsData, UpdateOperatorSettingsResponse, ExistsEmailData, ExistsEmailResponse, ListUsersAsSuperAdminData, ListUsersAsSuperAdminResponse, ListPendingInvitesData, ListPendingInvitesResponse, GetSettingsData, GetSettingsResponse, GetDeployToData, GetDeployToResponse, GetIsPremiumData, GetIsPremiumResponse, GetPremiumInfoData, GetPremiumInfoResponse, GetThresholdAlertData, GetThresholdAlertResponse, SetThresholdAlertData, SetThresholdAlertResponse, EditSlackCommandData, EditSlackCommandResponse, EditTeamsCommandData, EditTeamsCommandResponse, ListAvailableTeamsIdsData, ListAvailableTeamsIdsResponse, ListAvailableTeamsChannelsData, ListAvailableTeamsChannelsResponse, ConnectTeamsData, ConnectTeamsResponse, RunSlackMessageTestJobData, RunSlackMessageTestJobResponse, RunTeamsMessageTestJobData, RunTeamsMessageTestJobResponse, EditDeployToData, EditDeployToResponse, EditAutoInviteData, EditAutoInviteResponse, EditWebhookData, EditWebhookResponse, EditCopilotConfigData, EditCopilotConfigResponse, GetCopilotInfoData, GetCopilotInfoResponse, EditErrorHandlerData, EditErrorHandlerResponse, EditLargeFileStorageConfigData, EditLargeFileStorageConfigResponse, EditWorkspaceGitSyncConfigData, EditWorkspaceGitSyncConfigResponse, EditWorkspaceDeployUiSettingsData, EditWorkspaceDeployUiSettingsResponse, EditWorkspaceDefaultAppData, EditWorkspaceDefaultAppResponse, EditDefaultScriptsData, EditDefaultScriptsResponse, GetDefaultScriptsData, GetDefaultScriptsResponse, SetEnvironmentVariableData, SetEnvironmentVariableResponse, GetWorkspaceEncryptionKeyData, GetWorkspaceEncryptionKeyResponse, SetWorkspaceEncryptionKeyData, SetWorkspaceEncryptionKeyResponse, GetWorkspaceDefaultAppData, GetWorkspaceDefaultAppResponse, GetLargeFileStorageConfigData, GetLargeFileStorageConfigResponse, GetWorkspaceUsageData, GetWorkspaceUsageResponse, GetUsedTriggersData, GetUsedTriggersResponse, ListUsersData, ListUsersResponse, ListUsersUsageData, ListUsersUsageResponse, ListUsernamesData, ListUsernamesResponse, UsernameToEmailData, UsernameToEmailResponse, CreateTokenData, CreateTokenResponse, CreateTokenImpersonateData, CreateTokenImpersonateResponse, DeleteTokenData, DeleteTokenResponse, ListTokensData, ListTokensResponse, GetOidcTokenData, GetOidcTokenResponse, CreateVariableData, CreateVariableResponse, EncryptValueData, EncryptValueResponse, DeleteVariableData, DeleteVariableResponse, UpdateVariableData, UpdateVariableResponse, GetVariableData, GetVariableResponse, GetVariableValueData, GetVariableValueResponse, ExistsVariableData, ExistsVariableResponse, ListVariableData, ListVariableResponse, ListContextualVariablesData, ListContextualVariablesResponse, WorkspaceGetCriticalAlertsData, WorkspaceGetCriticalAlertsResponse, WorkspaceAcknowledgeCriticalAlertData, WorkspaceAcknowledgeCriticalAlertResponse, WorkspaceAcknowledgeAllCriticalAlertsData, WorkspaceAcknowledgeAllCriticalAlertsResponse, WorkspaceMuteCriticalAlertsUiData, WorkspaceMuteCriticalAlertsUiResponse, LoginWithOauthData, LoginWithOauthResponse, ConnectSlackCallbackData, ConnectSlackCallbackResponse, ConnectSlackCallbackInstanceData, ConnectSlackCallbackInstanceResponse, ConnectCallbackData, ConnectCallbackResponse, CreateAccountData, CreateAccountResponse, RefreshTokenData, RefreshTokenResponse, DisconnectAccountData, DisconnectAccountResponse, DisconnectSlackData, DisconnectSlackResponse, DisconnectTeamsData, DisconnectTeamsResponse, ListOauthLoginsResponse, ListOauthConnectsResponse, GetOauthConnectData, GetOauthConnectResponse, SyncTeamsResponse, SendMessageToConversationData, SendMessageToConversationResponse, CreateResourceData, CreateResourceResponse, DeleteResourceData, DeleteResourceResponse, UpdateResourceData, UpdateResourceResponse, UpdateResourceValueData, UpdateResourceValueResponse, GetResourceData, GetResourceResponse, GetResourceValueInterpolatedData, GetResourceValueInterpolatedResponse, GetResourceValueData, GetResourceValueResponse, ExistsResourceData, ExistsResourceResponse, ListResourceData, ListResourceResponse, ListSearchResourceData, ListSearchResourceResponse, ListResourceNamesData, ListResourceNamesResponse, CreateResourceTypeData, CreateResourceTypeResponse, FileResourceTypeToFileExtMapData, FileResourceTypeToFileExtMapResponse, DeleteResourceTypeData, DeleteResourceTypeResponse, UpdateResourceTypeData, UpdateResourceTypeResponse, GetResourceTypeData, GetResourceTypeResponse, ExistsResourceTypeData, ExistsResourceTypeResponse, ListResourceTypeData, ListResourceTypeResponse, ListResourceTypeNamesData, ListResourceTypeNamesResponse, QueryResourceTypesData, QueryResourceTypesResponse, ListHubIntegrationsData, ListHubIntegrationsResponse, ListHubFlowsResponse, GetHubFlowByIdData, GetHubFlowByIdResponse, ListHubAppsResponse, GetHubAppByIdData, GetHubAppByIdResponse, GetPublicAppByCustomPathData, GetPublicAppByCustomPathResponse, GetHubScriptContentByPathData, GetHubScriptContentByPathResponse, GetHubScriptByPathData, GetHubScriptByPathResponse, GetTopHubScriptsData, GetTopHubScriptsResponse, QueryHubScriptsData, QueryHubScriptsResponse, ListSearchScriptData, ListSearchScriptResponse, ListScriptsData, ListScriptsResponse, ListScriptPathsData, ListScriptPathsResponse, CreateDraftData, CreateDraftResponse, DeleteDraftData, DeleteDraftResponse, CreateScriptData, CreateScriptResponse, ToggleWorkspaceErrorHandlerForScriptData, ToggleWorkspaceErrorHandlerForScriptResponse, GetCustomTagsData, GetCustomTagsResponse, GeDefaultTagsResponse, IsDefaultTagsPerWorkspaceResponse, ArchiveScriptByPathData, ArchiveScriptByPathResponse, ArchiveScriptByHashData, ArchiveScriptByHashResponse, DeleteScriptByHashData, DeleteScriptByHashResponse, DeleteScriptByPathData, DeleteScriptByPathResponse, GetScriptByPathData, GetScriptByPathResponse, GetTriggersCountOfScriptData, GetTriggersCountOfScriptResponse, ListTokensOfScriptData, ListTokensOfScriptResponse, GetScriptByPathWithDraftData, GetScriptByPathWithDraftResponse, GetScriptHistoryByPathData, GetScriptHistoryByPathResponse, ListScriptPathsFromWorkspaceRunnableData, ListScriptPathsFromWorkspaceRunnableResponse, GetScriptLatestVersionData, GetScriptLatestVersionResponse, UpdateScriptHistoryData, UpdateScriptHistoryResponse, RawScriptByPathData, RawScriptByPathResponse, RawScriptByPathTokenedData, RawScriptByPathTokenedResponse, ExistsScriptByPathData, ExistsScriptByPathResponse, GetScriptByHashData, GetScriptByHashResponse, RawScriptByHashData, RawScriptByHashResponse, GetScriptDeploymentStatusData, GetScriptDeploymentStatusResponse, RunScriptByPathData, RunScriptByPathResponse, OpenaiSyncScriptByPathData, OpenaiSyncScriptByPathResponse, RunWaitResultScriptByPathData, RunWaitResultScriptByPathResponse, RunWaitResultScriptByPathGetData, RunWaitResultScriptByPathGetResponse, OpenaiSyncFlowByPathData, OpenaiSyncFlowByPathResponse, RunWaitResultFlowByPathData, RunWaitResultFlowByPathResponse, ResultByIdData, ResultByIdResponse, ListFlowPathsData, ListFlowPathsResponse, ListSearchFlowData, ListSearchFlowResponse, ListFlowsData, ListFlowsResponse, GetFlowHistoryData, GetFlowHistoryResponse, GetFlowLatestVersionData, GetFlowLatestVersionResponse, ListFlowPathsFromWorkspaceRunnableData, ListFlowPathsFromWorkspaceRunnableResponse, GetFlowVersionData, GetFlowVersionResponse, UpdateFlowHistoryData, UpdateFlowHistoryResponse, GetFlowByPathData, GetFlowByPathResponse, GetFlowDeploymentStatusData, GetFlowDeploymentStatusResponse, GetTriggersCountOfFlowData, GetTriggersCountOfFlowResponse, ListTokensOfFlowData, ListTokensOfFlowResponse, ToggleWorkspaceErrorHandlerForFlowData, ToggleWorkspaceErrorHandlerForFlowResponse, GetFlowByPathWithDraftData, GetFlowByPathWithDraftResponse, ExistsFlowByPathData, ExistsFlowByPathResponse, CreateFlowData, CreateFlowResponse, UpdateFlowData, UpdateFlowResponse, ArchiveFlowByPathData, ArchiveFlowByPathResponse, DeleteFlowByPathData, DeleteFlowByPathResponse, ListRawAppsData, ListRawAppsResponse, ExistsRawAppData, ExistsRawAppResponse, GetRawAppDataData, GetRawAppDataResponse, ListSearchAppData, ListSearchAppResponse, ListAppsData, ListAppsResponse, CreateAppData, CreateAppResponse, ExistsAppData, ExistsAppResponse, GetAppByPathData, GetAppByPathResponse, GetAppLiteByPathData, GetAppLiteByPathResponse, GetAppByPathWithDraftData, GetAppByPathWithDraftResponse, GetAppHistoryByPathData, GetAppHistoryByPathResponse, GetAppLatestVersionData, GetAppLatestVersionResponse, ListAppPathsFromWorkspaceRunnableData, ListAppPathsFromWorkspaceRunnableResponse, UpdateAppHistoryData, UpdateAppHistoryResponse, GetPublicAppBySecretData, GetPublicAppBySecretResponse, GetPublicResourceData, GetPublicResourceResponse, GetPublicSecretOfAppData, GetPublicSecretOfAppResponse, GetAppByVersionData, GetAppByVersionResponse, CreateRawAppData, CreateRawAppResponse, UpdateRawAppData, UpdateRawAppResponse, DeleteRawAppData, DeleteRawAppResponse, DeleteAppData, DeleteAppResponse, UpdateAppData, UpdateAppResponse, CustomPathExistsData, CustomPathExistsResponse, ExecuteComponentData, ExecuteComponentResponse, UploadS3FileFromAppData, UploadS3FileFromAppResponse, DeleteS3FileFromAppData, DeleteS3FileFromAppResponse, RunFlowByPathData, RunFlowByPathResponse, RestartFlowAtStepData, RestartFlowAtStepResponse, RunScriptByHashData, RunScriptByHashResponse, RunScriptPreviewData, RunScriptPreviewResponse, RunCodeWorkflowTaskData, RunCodeWorkflowTaskResponse, RunRawScriptDependenciesData, RunRawScriptDependenciesResponse, RunFlowPreviewData, RunFlowPreviewResponse, ListQueueData, ListQueueResponse, GetQueueCountData, GetQueueCountResponse, GetCompletedCountData, GetCompletedCountResponse, CountCompletedJobsData, CountCompletedJobsResponse, ListFilteredUuidsData, ListFilteredUuidsResponse, CancelSelectionData, CancelSelectionResponse, ListCompletedJobsData, ListCompletedJobsResponse, ListJobsData, ListJobsResponse, GetDbClockResponse, CountJobsByTagData, CountJobsByTagResponse, GetJobData, GetJobResponse, GetRootJobIdData, GetRootJobIdResponse, GetJobLogsData, GetJobLogsResponse, GetJobArgsData, GetJobArgsResponse, GetJobUpdatesData, GetJobUpdatesResponse, GetLogFileFromStoreData, GetLogFileFromStoreResponse, GetFlowDebugInfoData, GetFlowDebugInfoResponse, GetCompletedJobData, GetCompletedJobResponse, GetCompletedJobResultData, GetCompletedJobResultResponse, GetCompletedJobResultMaybeData, GetCompletedJobResultMaybeResponse, DeleteCompletedJobData, DeleteCompletedJobResponse, CancelQueuedJobData, CancelQueuedJobResponse, CancelPersistentQueuedJobsData, CancelPersistentQueuedJobsResponse, ForceCancelQueuedJobData, ForceCancelQueuedJobResponse, CreateJobSignatureData, CreateJobSignatureResponse, GetResumeUrlsData, GetResumeUrlsResponse, GetSlackApprovalPayloadData, GetSlackApprovalPayloadResponse, ResumeSuspendedJobGetData, ResumeSuspendedJobGetResponse, ResumeSuspendedJobPostData, ResumeSuspendedJobPostResponse, SetFlowUserStateData, SetFlowUserStateResponse, GetFlowUserStateData, GetFlowUserStateResponse, ResumeSuspendedFlowAsOwnerData, ResumeSuspendedFlowAsOwnerResponse, CancelSuspendedJobGetData, CancelSuspendedJobGetResponse, CancelSuspendedJobPostData, CancelSuspendedJobPostResponse, GetSuspendedJobFlowData, GetSuspendedJobFlowResponse, PreviewScheduleData, PreviewScheduleResponse, CreateScheduleData, CreateScheduleResponse, UpdateScheduleData, UpdateScheduleResponse, SetScheduleEnabledData, SetScheduleEnabledResponse, DeleteScheduleData, DeleteScheduleResponse, GetScheduleData, GetScheduleResponse, ExistsScheduleData, ExistsScheduleResponse, ListSchedulesData, ListSchedulesResponse, ListSchedulesWithJobsData, ListSchedulesWithJobsResponse, SetDefaultErrorOrRecoveryHandlerData, SetDefaultErrorOrRecoveryHandlerResponse, CreateHttpTriggerData, CreateHttpTriggerResponse, UpdateHttpTriggerData, UpdateHttpTriggerResponse, DeleteHttpTriggerData, DeleteHttpTriggerResponse, GetHttpTriggerData, GetHttpTriggerResponse, ListHttpTriggersData, ListHttpTriggersResponse, ExistsHttpTriggerData, ExistsHttpTriggerResponse, ExistsRouteData, ExistsRouteResponse, CreateWebsocketTriggerData, CreateWebsocketTriggerResponse, UpdateWebsocketTriggerData, UpdateWebsocketTriggerResponse, DeleteWebsocketTriggerData, DeleteWebsocketTriggerResponse, GetWebsocketTriggerData, GetWebsocketTriggerResponse, ListWebsocketTriggersData, ListWebsocketTriggersResponse, ExistsWebsocketTriggerData, ExistsWebsocketTriggerResponse, SetWebsocketTriggerEnabledData, SetWebsocketTriggerEnabledResponse, TestWebsocketConnectionData, TestWebsocketConnectionResponse, CreateKafkaTriggerData, CreateKafkaTriggerResponse, UpdateKafkaTriggerData, UpdateKafkaTriggerResponse, DeleteKafkaTriggerData, DeleteKafkaTriggerResponse, GetKafkaTriggerData, GetKafkaTriggerResponse, ListKafkaTriggersData, ListKafkaTriggersResponse, ExistsKafkaTriggerData, ExistsKafkaTriggerResponse, SetKafkaTriggerEnabledData, SetKafkaTriggerEnabledResponse, TestKafkaConnectionData, TestKafkaConnectionResponse, CreateNatsTriggerData, CreateNatsTriggerResponse, UpdateNatsTriggerData, UpdateNatsTriggerResponse, DeleteNatsTriggerData, DeleteNatsTriggerResponse, GetNatsTriggerData, GetNatsTriggerResponse, ListNatsTriggersData, ListNatsTriggersResponse, ExistsNatsTriggerData, ExistsNatsTriggerResponse, SetNatsTriggerEnabledData, SetNatsTriggerEnabledResponse, TestNatsConnectionData, TestNatsConnectionResponse, CreateSqsTriggerData, CreateSqsTriggerResponse, UpdateSqsTriggerData, UpdateSqsTriggerResponse, DeleteSqsTriggerData, DeleteSqsTriggerResponse, GetSqsTriggerData, GetSqsTriggerResponse, ListSqsTriggersData, ListSqsTriggersResponse, ExistsSqsTriggerData, ExistsSqsTriggerResponse, SetSqsTriggerEnabledData, SetSqsTriggerEnabledResponse, TestSqsConnectionData, TestSqsConnectionResponse, CreateMqttTriggerData, CreateMqttTriggerResponse, UpdateMqttTriggerData, UpdateMqttTriggerResponse, DeleteMqttTriggerData, DeleteMqttTriggerResponse, GetMqttTriggerData, GetMqttTriggerResponse, ListMqttTriggersData, ListMqttTriggersResponse, ExistsMqttTriggerData, ExistsMqttTriggerResponse, SetMqttTriggerEnabledData, SetMqttTriggerEnabledResponse, TestMqttConnectionData, TestMqttConnectionResponse, CreateGcpTriggerData, CreateGcpTriggerResponse, UpdateGcpTriggerData, UpdateGcpTriggerResponse, DeleteGcpTriggerData, DeleteGcpTriggerResponse, GetGcpTriggerData, GetGcpTriggerResponse, ListGcpTriggersData, ListGcpTriggersResponse, ExistsGcpTriggerData, ExistsGcpTriggerResponse, SetGcpTriggerEnabledData, SetGcpTriggerEnabledResponse, TestGcpConnectionData, TestGcpConnectionResponse, DeleteGcpSubscriptionData, DeleteGcpSubscriptionResponse, ListGoogleTopicsData, ListGoogleTopicsResponse, ListAllTgoogleTopicSubscriptionsData, ListAllTgoogleTopicSubscriptionsResponse, IsValidPostgresConfigurationData, IsValidPostgresConfigurationResponse, CreateTemplateScriptData, CreateTemplateScriptResponse, GetTemplateScriptData, GetTemplateScriptResponse, ListPostgresReplicationSlotData, ListPostgresReplicationSlotResponse, CreatePostgresReplicationSlotData, CreatePostgresReplicationSlotResponse, DeletePostgresReplicationSlotData, DeletePostgresReplicationSlotResponse, ListPostgresPublicationData, ListPostgresPublicationResponse, GetPostgresPublicationData, GetPostgresPublicationResponse, CreatePostgresPublicationData, CreatePostgresPublicationResponse, UpdatePostgresPublicationData, UpdatePostgresPublicationResponse, DeletePostgresPublicationData, DeletePostgresPublicationResponse, CreatePostgresTriggerData, CreatePostgresTriggerResponse, UpdatePostgresTriggerData, UpdatePostgresTriggerResponse, DeletePostgresTriggerData, DeletePostgresTriggerResponse, GetPostgresTriggerData, GetPostgresTriggerResponse, ListPostgresTriggersData, ListPostgresTriggersResponse, ExistsPostgresTriggerData, ExistsPostgresTriggerResponse, SetPostgresTriggerEnabledData, SetPostgresTriggerEnabledResponse, TestPostgresConnectionData, TestPostgresConnectionResponse, ListInstanceGroupsResponse, GetInstanceGroupData, GetInstanceGroupResponse, CreateInstanceGroupData, CreateInstanceGroupResponse, UpdateInstanceGroupData, UpdateInstanceGroupResponse, DeleteInstanceGroupData, DeleteInstanceGroupResponse, AddUserToInstanceGroupData, AddUserToInstanceGroupResponse, RemoveUserFromInstanceGroupData, RemoveUserFromInstanceGroupResponse, ExportInstanceGroupsResponse, OverwriteInstanceGroupsData, OverwriteInstanceGroupsResponse, ListGroupsData, ListGroupsResponse, ListGroupNamesData, ListGroupNamesResponse, CreateGroupData, CreateGroupResponse, UpdateGroupData, UpdateGroupResponse, DeleteGroupData, DeleteGroupResponse, GetGroupData, GetGroupResponse, AddUserToGroupData, AddUserToGroupResponse, RemoveUserToGroupData, RemoveUserToGroupResponse, ListFoldersData, ListFoldersResponse, ListFolderNamesData, ListFolderNamesResponse, CreateFolderData, CreateFolderResponse, UpdateFolderData, UpdateFolderResponse, DeleteFolderData, DeleteFolderResponse, GetFolderData, GetFolderResponse, ExistsFolderData, ExistsFolderResponse, GetFolderUsageData, GetFolderUsageResponse, AddOwnerToFolderData, AddOwnerToFolderResponse, RemoveOwnerToFolderData, RemoveOwnerToFolderResponse, ListWorkersData, ListWorkersResponse, ExistsWorkerWithTagData, ExistsWorkerWithTagResponse, GetQueueMetricsResponse, GetCountsOfJobsWaitingPerTagResponse, ListWorkerGroupsResponse, GetConfigData, GetConfigResponse, UpdateConfigData, UpdateConfigResponse, DeleteConfigData, DeleteConfigResponse, ListConfigsResponse, ListAutoscalingEventsData, ListAutoscalingEventsResponse, GetGranularAclsData, GetGranularAclsResponse, AddGranularAclsData, AddGranularAclsResponse, RemoveGranularAclsData, RemoveGranularAclsResponse, SetCaptureConfigData, SetCaptureConfigResponse, PingCaptureConfigData, PingCaptureConfigResponse, GetCaptureConfigsData, GetCaptureConfigsResponse, ListCapturesData, ListCapturesResponse, MoveCapturesAndConfigsData, MoveCapturesAndConfigsResponse, GetCaptureData, GetCaptureResponse, DeleteCaptureData, DeleteCaptureResponse, StarData, StarResponse, UnstarData, UnstarResponse, GetInputHistoryData, GetInputHistoryResponse, GetArgsFromHistoryOrSavedInputData, GetArgsFromHistoryOrSavedInputResponse, ListInputsData, ListInputsResponse, CreateInputData, CreateInputResponse, UpdateInputData, UpdateInputResponse, DeleteInputData, DeleteInputResponse, DuckdbConnectionSettingsData, DuckdbConnectionSettingsResponse, DuckdbConnectionSettingsV2Data, DuckdbConnectionSettingsV2Response, PolarsConnectionSettingsData, PolarsConnectionSettingsResponse, PolarsConnectionSettingsV2Data, PolarsConnectionSettingsV2Response, S3ResourceInfoData, S3ResourceInfoResponse, DatasetStorageTestConnectionData, DatasetStorageTestConnectionResponse, ListStoredFilesData, ListStoredFilesResponse, LoadFileMetadataData, LoadFileMetadataResponse, LoadFilePreviewData, LoadFilePreviewResponse, LoadParquetPreviewData, LoadParquetPreviewResponse, LoadTableRowCountData, LoadTableRowCountResponse, LoadCsvPreviewData, LoadCsvPreviewResponse, DeleteS3FileData, DeleteS3FileResponse, MoveS3FileData, MoveS3FileResponse, FileUploadData, FileUploadResponse, FileDownloadData, FileDownloadResponse, FileDownloadParquetAsCsvData, FileDownloadParquetAsCsvResponse, GetJobMetricsData, GetJobMetricsResponse, SetJobProgressData, SetJobProgressResponse, GetJobProgressData, GetJobProgressResponse, ListLogFilesData, ListLogFilesResponse, GetLogFileData, GetLogFileResponse, ListConcurrencyGroupsResponse, DeleteConcurrencyGroupData, DeleteConcurrencyGroupResponse, GetConcurrencyKeyData, GetConcurrencyKeyResponse, ListExtendedJobsData, ListExtendedJobsResponse, SearchJobsIndexData, SearchJobsIndexResponse, SearchLogsIndexData, SearchLogsIndexResponse, CountSearchLogsIndexData, CountSearchLogsIndexResponse, ClearIndexData, ClearIndexResponse } from './types.gen.ts'; - -/** - * get backend version - * @returns string git version of backend - * @throws ApiError - */ -export const backendVersion = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/version' -}); }; - -/** - * is backend up to date - * @returns string is backend up to date - * @throws ApiError - */ -export const backendUptodate = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/uptodate' -}); }; - -/** - * get license id - * @returns string get license id (empty if not ee) - * @throws ApiError - */ -export const getLicenseId = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/ee_license' -}); }; - -/** - * get openapi yaml spec - * @returns string openapi yaml file content - * @throws ApiError - */ -export const getOpenApiYaml = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/openapi.yaml' -}); }; - -/** - * get audit log (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AuditLog an audit log - * @throws ApiError - */ -export const getAuditLog = (data: GetAuditLogData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list audit logs (requires admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.username filter on exact username of user - * @param data.operation filter on exact or prefix name of operation - * @param data.operations comma separated list of exact operations to include - * @param data.excludeOperations comma separated list of operations to exclude - * @param data.resource filter on exact or prefix name of resource - * @param data.actionKind filter on type of operation - * @param data.allWorkspaces get audit logs for all workspaces - * @returns AuditLog a list of audit logs - * @throws ApiError - */ -export const listAuditLogs = (data: ListAuditLogsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/audit/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - before: data.before, - after: data.after, - username: data.username, - operation: data.operation, - operations: data.operations, - exclude_operations: data.excludeOperations, - resource: data.resource, - action_kind: data.actionKind, - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * login with password - * @param data The data for the request. - * @param data.requestBody credentials - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ -export const login = (data: LoginData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/auth/login', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * logout - * @returns string clear cookies and clear token (if applicable) - * @throws ApiError - */ -export const logout = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/auth/logout' -}); }; - -/** - * get user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user created - * @throws ApiError - */ -export const getUser = (data: GetUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/get/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * update user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @param data.requestBody new user - * @returns string edited user - * @throws ApiError - */ -export const updateUser = (data: UpdateUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/users/update/{username}', - path: { - workspace: data.workspace, - username: data.username - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * is owner of path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean is owner - * @throws ApiError - */ -export const isOwnerOfPath = (data: IsOwnerOfPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/is_owner/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set password - * @param data The data for the request. - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ -export const setPassword = (data: SetPasswordData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/setpassword', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set password for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set password - * @returns string password set - * @throws ApiError - */ -export const setPasswordForUser = (data: SetPasswordForUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/set_password_of/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set login type for a specific user (require super admin) - * @param data The data for the request. - * @param data.user - * @param data.requestBody set login type - * @returns string login type set - * @throws ApiError - */ -export const setLoginTypeForUser = (data: SetLoginTypeForUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/set_login_type/{user}', - path: { - user: data.user - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create user - * @param data The data for the request. - * @param data.requestBody user info - * @returns string user created - * @throws ApiError - */ -export const createUserGlobally = (data: CreateUserGloballyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global update user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new user info - * @returns string user updated - * @throws ApiError - */ -export const globalUserUpdate = (data: GlobalUserUpdateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/update/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global username info (require super admin) - * @param data The data for the request. - * @param data.email - * @returns unknown user renamed - * @throws ApiError - */ -export const globalUsernameInfo = (data: GlobalUsernameInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/username_info/{email}', - path: { - email: data.email - } -}); }; - -/** - * global rename user (require super admin) - * @param data The data for the request. - * @param data.email - * @param data.requestBody new username - * @returns string user renamed - * @throws ApiError - */ -export const globalUserRename = (data: GlobalUserRenameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/rename/{email}', - path: { - email: data.email - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global delete user (require super admin) - * @param data The data for the request. - * @param data.email - * @returns string user deleted - * @throws ApiError - */ -export const globalUserDelete = (data: GlobalUserDeleteData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/users/delete/{email}', - path: { - email: data.email - } -}); }; - -/** - * global overwrite users (require super admin and EE) - * @param data The data for the request. - * @param data.requestBody List of users - * @returns string Success message - * @throws ApiError - */ -export const globalUsersOverwrite = (data: GlobalUsersOverwriteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/overwrite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * global export users (require super admin and EE) - * @returns ExportedUser exported users - * @throws ApiError - */ -export const globalUsersExport = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/export' -}); }; - -/** - * delete user (require admin privilege) - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string delete user - * @throws ApiError - */ -export const deleteUser = (data: DeleteUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/users/delete/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * get connected repositories - * @returns GithubInstallations connected repositories - * @throws ApiError - */ -export const getGlobalConnectedRepositories = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/github_app/connected_repositories' -}); }; - -/** - * list all workspaces visible to me - * @returns Workspace all workspaces - * @throws ApiError - */ -export const listWorkspaces = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list' -}); }; - -/** - * is domain allowed for auto invi - * @returns boolean domain allowed or not - * @throws ApiError - */ -export const isDomainAllowed = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/allowed_domain_auto_invite' -}); }; - -/** - * list all workspaces visible to me with user info - * @returns UserWorkspaceList workspace with associated username - * @throws ApiError - */ -export const listUserWorkspaces = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/users' -}); }; - -/** - * list all workspaces as super admin (require to be super admin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Workspace workspaces - * @throws ApiError - */ -export const listWorkspacesAsSuperAdmin = (data: ListWorkspacesAsSuperAdminData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workspaces/list_as_superadmin', - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * create workspace - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createWorkspace = (data: CreateWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists workspace - * @param data The data for the request. - * @param data.requestBody id of workspace - * @returns boolean status - * @throws ApiError - */ -export const existsWorkspace = (data: ExistsWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists username - * @param data The data for the request. - * @param data.requestBody - * @returns boolean status - * @throws ApiError - */ -export const existsUsername = (data: ExistsUsernameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/exists_username', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get global settings - * @param data The data for the request. - * @param data.key - * @returns unknown status - * @throws ApiError - */ -export const getGlobal = (data: GetGlobalData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/global/{key}', - path: { - key: data.key - } -}); }; - -/** - * post global settings - * @param data The data for the request. - * @param data.key - * @param data.requestBody value set - * @returns string status - * @throws ApiError - */ -export const setGlobal = (data: SetGlobalData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/global/{key}', - path: { - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get local settings - * @returns unknown status - * @throws ApiError - */ -export const getLocal = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/local' -}); }; - -/** - * test smtp - * @param data The data for the request. - * @param data.requestBody test smtp payload - * @returns string status - * @throws ApiError - */ -export const testSmtp = (data: TestSmtpData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_smtp', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test critical channels - * @param data The data for the request. - * @param data.requestBody test critical channel payload - * @returns string status - * @throws ApiError - */ -export const testCriticalChannels = (data: TestCriticalChannelsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_critical_channels', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Get all critical alerts - * @param data The data for the request. - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ -export const getCriticalAlerts = (data: GetCriticalAlertsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/critical_alerts', - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } -}); }; - -/** - * Acknowledge a critical alert - * @param data The data for the request. - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ -export const acknowledgeCriticalAlert = (data: AcknowledgeCriticalAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/{id}/acknowledge', - path: { - id: data.id - } -}); }; - -/** - * Acknowledge all unacknowledged critical alerts - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ -export const acknowledgeAllCriticalAlerts = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/critical_alerts/acknowledge_all' -}); }; - -/** - * test license key - * @param data The data for the request. - * @param data.requestBody test license key - * @returns string status - * @throws ApiError - */ -export const testLicenseKey = (data: TestLicenseKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_license_key', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test object storage config - * @param data The data for the request. - * @param data.requestBody test object storage config - * @returns string status - * @throws ApiError - */ -export const testObjectStorageConfig = (data: TestObjectStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/test_object_storage_config', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * send stats - * @returns string status - * @throws ApiError - */ -export const sendStats = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/send_stats' -}); }; - -/** - * get latest key renewal attempt - * @returns unknown status - * @throws ApiError - */ -export const getLatestKeyRenewalAttempt = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/latest_key_renewal_attempt' -}); }; - -/** - * renew license key - * @param data The data for the request. - * @param data.licenseKey - * @returns string status - * @throws ApiError - */ -export const renewLicenseKey = (data: RenewLicenseKeyData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/renew_license_key', - query: { - license_key: data.licenseKey - } -}); }; - -/** - * create customer portal session - * @param data The data for the request. - * @param data.licenseKey - * @returns string url to portal - * @throws ApiError - */ -export const createCustomerPortalSession = (data: CreateCustomerPortalSessionData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/settings/customer_portal', - query: { - license_key: data.licenseKey - } -}); }; - -/** - * test metadata - * @param data The data for the request. - * @param data.requestBody test metadata - * @returns string status - * @throws ApiError - */ -export const testMetadata = (data: TestMetadataData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/saml/test_metadata', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list global settings - * @returns GlobalSetting list of settings - * @throws ApiError - */ -export const listGlobalSettings = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/settings/list_global' -}); }; - -/** - * get current user email (if logged in) - * @returns string user email - * @throws ApiError - */ -export const getCurrentEmail = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/email' -}); }; - -/** - * refresh the current token - * @param data The data for the request. - * @param data.ifExpiringInLessThanS - * @returns string new token - * @throws ApiError - */ -export const refreshUserToken = (data: RefreshUserTokenData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/refresh_token', - query: { - if_expiring_in_less_than_s: data.ifExpiringInLessThanS - } -}); }; - -/** - * get tutorial progress - * @returns unknown tutorial progress - * @throws ApiError - */ -export const getTutorialProgress = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/tutorial_progress' -}); }; - -/** - * update tutorial progress - * @param data The data for the request. - * @param data.requestBody progress update - * @returns string tutorial progress - * @throws ApiError - */ -export const updateTutorialProgress = (data: UpdateTutorialProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tutorial_progress', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * leave instance - * @returns string status - * @throws ApiError - */ -export const leaveInstance = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/leave_instance' -}); }; - -/** - * get current usage outside of premium workspaces - * @returns number free usage - * @throws ApiError - */ -export const getUsage = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/usage' -}); }; - -/** - * get all runnables in every workspace - * @returns unknown free all runnables - * @throws ApiError - */ -export const getRunnable = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/all_runnables' -}); }; - -/** - * get current global whoami (if logged in) - * @returns GlobalUserInfo user email - * @throws ApiError - */ -export const globalWhoami = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/whoami' -}); }; - -/** - * list all workspace invites - * @returns WorkspaceInvite list all workspace invites - * @throws ApiError - */ -export const listWorkspaceInvites = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/list_invites' -}); }; - -/** - * whoami - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ -export const whoami = (data: WhoamiData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whoami', - path: { - workspace: data.workspace - } -}); }; - -/** - * get github app token - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody jwt job token - * @returns unknown github app token - * @throws ApiError - */ -export const getGithubAppToken = (data: GetGithubAppTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/token', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Install a GitHub installation from another workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Installation successfully copied - * @throws ApiError - */ -export const installFromWorkspace = (data: InstallFromWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/install_from_workspace', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete a GitHub installation from a workspace - * Removes a GitHub installation from the specified workspace. Requires admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.installationId The ID of the GitHub installation to delete - * @returns unknown Installation successfully deleted - * @throws ApiError - */ -export const deleteFromWorkspace = (data: DeleteFromWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/github_app/installation/{installation_id}', - path: { - workspace: data.workspace, - installation_id: data.installationId - } -}); }; - -/** - * Export GitHub installation JWT token - * Exports the JWT token for a specific GitHub installation in the workspace - * @param data The data for the request. - * @param data.workspace - * @param data.installationId - * @returns unknown Successfully exported the JWT token - * @throws ApiError - */ -export const exportInstallation = (data: ExportInstallationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/github_app/export/{installationId}', - path: { - workspace: data.workspace, - installationId: data.installationId - } -}); }; - -/** - * Import GitHub installation from JWT token - * Imports a GitHub installation from a JWT token exported from another instance - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown Successfully imported the installation - * @throws ApiError - */ -export const importInstallation = (data: ImportInstallationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/github_app/import', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * accept invite to workspace - * @param data The data for the request. - * @param data.requestBody accept invite - * @returns string status - * @throws ApiError - */ -export const acceptInvite = (data: AcceptInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/accept_invite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * decline invite to workspace - * @param data The data for the request. - * @param data.requestBody decline invite - * @returns string status - * @throws ApiError - */ -export const declineInvite = (data: DeclineInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/decline_invite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * invite user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const inviteUser = (data: InviteUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/invite_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * add user to workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const addUser = (data: AddUserData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/add_user', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete user invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const deleteInvite = (data: DeleteInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/delete_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * archive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const archiveWorkspace = (data: ArchiveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/archive', - path: { - workspace: data.workspace - } -}); }; - -/** - * unarchive workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const unarchiveWorkspace = (data: UnarchiveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/workspaces/unarchive/{workspace}', - path: { - workspace: data.workspace - } -}); }; - -/** - * delete workspace (require super admin) - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const deleteWorkspace = (data: DeleteWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/workspaces/delete/{workspace}', - path: { - workspace: data.workspace - } -}); }; - -/** - * leave workspace - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const leaveWorkspace = (data: LeaveWorkspaceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/leave', - path: { - workspace: data.workspace - } -}); }; - -/** - * get workspace name - * @param data The data for the request. - * @param data.workspace - * @returns string status - * @throws ApiError - */ -export const getWorkspaceName = (data: GetWorkspaceNameData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_workspace_name', - path: { - workspace: data.workspace - } -}); }; - -/** - * change workspace name - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceName = (data: ChangeWorkspaceNameData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_name', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceId = (data: ChangeWorkspaceIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_id', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * change workspace id - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const changeWorkspaceColor = (data: ChangeWorkspaceColorData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/change_workspace_color', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * whois - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns User user - * @throws ApiError - */ -export const whois = (data: WhoisData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/whois/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * Update operator settings for a workspace - * Updates the operator settings for a specific workspace. Requires workspace admin privileges. - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string Operator settings updated successfully - * @throws ApiError - */ -export const updateOperatorSettings = (data: UpdateOperatorSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/operator_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * exists email - * @param data The data for the request. - * @param data.email - * @returns boolean user - * @throws ApiError - */ -export const existsEmail = (data: ExistsEmailData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/exists/{email}', - path: { - email: data.email - } -}); }; - -/** - * list all users as super admin (require to be super amdin) - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.activeOnly filter only active users - * @returns GlobalUserInfo user - * @throws ApiError - */ -export const listUsersAsSuperAdmin = (data: ListUsersAsSuperAdminData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/list_as_super_admin', - query: { - page: data.page, - per_page: data.perPage, - active_only: data.activeOnly - } -}); }; - -/** - * list pending invites for a workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceInvite user - * @throws ApiError - */ -export const listPendingInvites = (data: ListPendingInvitesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/list_pending_invites', - path: { - workspace: data.workspace - } -}); }; - -/** - * get settings - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getSettings = (data: GetSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_settings', - path: { - workspace: data.workspace - } -}); }; - -/** - * get deploy to - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getDeployTo = (data: GetDeployToData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_deploy_to', - path: { - workspace: data.workspace - } -}); }; - -/** - * get if workspace is premium - * @param data The data for the request. - * @param data.workspace - * @returns boolean status - * @throws ApiError - */ -export const getIsPremium = (data: GetIsPremiumData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/is_premium', - path: { - workspace: data.workspace - } -}); }; - -/** - * get premium info - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getPremiumInfo = (data: GetPremiumInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/premium_info', - path: { - workspace: data.workspace - } -}); }; - -/** - * get threshold alert info - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getThresholdAlert = (data: GetThresholdAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - } -}); }; - -/** - * set threshold alert info - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody threshold alert info - * @returns string status - * @throws ApiError - */ -export const setThresholdAlert = (data: SetThresholdAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/threshold_alert', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit slack command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editSlackCommand = (data: EditSlackCommandData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_slack_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit teams command - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editTeamsCommand = (data: EditTeamsCommandData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_teams_command', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list available teams ids - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const listAvailableTeamsIds = (data: ListAvailableTeamsIdsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_ids', - path: { - workspace: data.workspace - } -}); }; - -/** - * list available teams channels - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const listAvailableTeamsChannels = (data: ListAvailableTeamsChannelsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/available_teams_channels', - path: { - workspace: data.workspace - } -}); }; - -/** - * connect teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody connect teams - * @returns string status - * @throws ApiError - */ -export const connectTeams = (data: ConnectTeamsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/connect_teams', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a job that sends a message to Slack - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ -export const runSlackMessageTestJob = (data: RunSlackMessageTestJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_slack_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a job that sends a message to Teams - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody path to hub script to run and its corresponding args - * @returns unknown status - * @throws ApiError - */ -export const runTeamsMessageTestJob = (data: RunTeamsMessageTestJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/run_teams_message_test_job', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit deploy to - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string status - * @throws ApiError - */ -export const editDeployTo = (data: EditDeployToData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_to', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit auto invite - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceInvite - * @returns string status - * @throws ApiError - */ -export const editAutoInvite = (data: EditAutoInviteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_auto_invite', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit webhook - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceWebhook - * @returns string status - * @throws ApiError - */ -export const editWebhook = (data: EditWebhookData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_webhook', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit copilot config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceCopilotConfig - * @returns string status - * @throws ApiError - */ -export const editCopilotConfig = (data: EditCopilotConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_copilot_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get copilot info - * @param data The data for the request. - * @param data.workspace - * @returns AIConfig status - * @throws ApiError - */ -export const getCopilotInfo = (data: GetCopilotInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_copilot_info', - path: { - workspace: data.workspace - } -}); }; - -/** - * edit error handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody WorkspaceErrorHandler - * @returns string status - * @throws ApiError - */ -export const editErrorHandler = (data: EditErrorHandlerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_error_handler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit large file storage settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody LargeFileStorage info - * @returns unknown status - * @throws ApiError - */ -export const editLargeFileStorageConfig = (data: EditLargeFileStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_large_file_storage_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit workspace git sync settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace Git sync settings - * @returns unknown status - * @throws ApiError - */ -export const editWorkspaceGitSyncConfig = (data: EditWorkspaceGitSyncConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_git_sync_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit workspace deploy ui settings - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace deploy UI settings - * @returns unknown status - * @throws ApiError - */ -export const editWorkspaceDeployUiSettings = (data: EditWorkspaceDeployUiSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_deploy_ui_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit default app for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const editWorkspaceDefaultApp = (data: EditWorkspaceDefaultAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/edit_default_app', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * edit default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const editDefaultScripts = (data: EditDefaultScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get default scripts for workspace - * @param data The data for the request. - * @param data.workspace - * @returns WorkspaceDefaultScripts status - * @throws ApiError - */ -export const getDefaultScripts = (data: GetDefaultScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_scripts', - path: { - workspace: data.workspace - } -}); }; - -/** - * set environment variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Workspace default app - * @returns string status - * @throws ApiError - */ -export const setEnvironmentVariable = (data: SetEnvironmentVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/set_environment_variable', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * retrieves the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getWorkspaceEncryptionKey = (data: GetWorkspaceEncryptionKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - } -}); }; - -/** - * update the encryption key for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody New encryption key - * @returns string status - * @throws ApiError - */ -export const setWorkspaceEncryptionKey = (data: SetWorkspaceEncryptionKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/encryption_key', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get default app for workspace - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getWorkspaceDefaultApp = (data: GetWorkspaceDefaultAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/default_app', - path: { - workspace: data.workspace - } -}); }; - -/** - * get large file storage config - * @param data The data for the request. - * @param data.workspace - * @returns LargeFileStorage status - * @throws ApiError - */ -export const getLargeFileStorageConfig = (data: GetLargeFileStorageConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/get_large_file_storage_config', - path: { - workspace: data.workspace - } -}); }; - -/** - * get usage - * @param data The data for the request. - * @param data.workspace - * @returns number usage - * @throws ApiError - */ -export const getWorkspaceUsage = (data: GetWorkspaceUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/usage', - path: { - workspace: data.workspace - } -}); }; - -/** - * get used triggers - * @param data The data for the request. - * @param data.workspace - * @returns unknown status - * @throws ApiError - */ -export const getUsedTriggers = (data: GetUsedTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/used_triggers', - path: { - workspace: data.workspace - } -}); }; - -/** - * list users - * @param data The data for the request. - * @param data.workspace - * @returns User user - * @throws ApiError - */ -export const listUsers = (data: ListUsersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list', - path: { - workspace: data.workspace - } -}); }; - -/** - * list users usage - * @param data The data for the request. - * @param data.workspace - * @returns UserUsage user - * @throws ApiError - */ -export const listUsersUsage = (data: ListUsersUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usage', - path: { - workspace: data.workspace - } -}); }; - -/** - * list usernames - * @param data The data for the request. - * @param data.workspace - * @returns string user - * @throws ApiError - */ -export const listUsernames = (data: ListUsernamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/list_usernames', - path: { - workspace: data.workspace - } -}); }; - -/** - * get email from username - * @param data The data for the request. - * @param data.workspace - * @param data.username - * @returns string email - * @throws ApiError - */ -export const usernameToEmail = (data: UsernameToEmailData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/users/username_to_email/{username}', - path: { - workspace: data.workspace, - username: data.username - } -}); }; - -/** - * create token - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createToken = (data: CreateTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create token to impersonate a user (require superadmin) - * @param data The data for the request. - * @param data.requestBody new token - * @returns string token created - * @throws ApiError - */ -export const createTokenImpersonate = (data: CreateTokenImpersonateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/users/tokens/impersonate', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete token - * @param data The data for the request. - * @param data.tokenPrefix - * @returns string delete token - * @throws ApiError - */ -export const deleteToken = (data: DeleteTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/users/tokens/delete/{token_prefix}', - path: { - token_prefix: data.tokenPrefix - } -}); }; - -/** - * list token - * @param data The data for the request. - * @param data.excludeEphemeral - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns TruncatedToken truncated token - * @throws ApiError - */ -export const listTokens = (data: ListTokensData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/users/tokens/list', - query: { - exclude_ephemeral: data.excludeEphemeral, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * get OIDC token (ee only) - * @param data The data for the request. - * @param data.workspace - * @param data.audience - * @returns string new oidc token - * @throws ApiError - */ -export const getOidcToken = (data: GetOidcTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oidc/token/{audience}', - path: { - workspace: data.workspace, - audience: data.audience - } -}); }; - -/** - * create variable - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @param data.alreadyEncrypted - * @returns string variable created - * @throws ApiError - */ -export const createVariable = (data: CreateVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/create', - path: { - workspace: data.workspace - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * encrypt value - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new variable - * @returns string encrypted value - * @throws ApiError - */ -export const encryptValue = (data: EncryptValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/encrypt', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string variable deleted - * @throws ApiError - */ -export const deleteVariable = (data: DeleteVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/variables/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated variable - * @param data.alreadyEncrypted - * @returns string variable updated - * @throws ApiError - */ -export const updateVariable = (data: UpdateVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/variables/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - already_encrypted: data.alreadyEncrypted - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get variable - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.decryptSecret ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - * @param data.includeEncrypted ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - * @returns ListableVariable variable - * @throws ApiError - */ -export const getVariable = (data: GetVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - decrypt_secret: data.decryptSecret, - include_encrypted: data.includeEncrypted - } -}); }; - -/** - * get variable value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string variable - * @throws ApiError - */ -export const getVariableValue = (data: GetVariableValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does variable exists at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean variable - * @throws ApiError - */ -export const existsVariable = (data: ExistsVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list variables - * @param data The data for the request. - * @param data.workspace - * @param data.pathStart - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ListableVariable variable list - * @throws ApiError - */ -export const listVariable = (data: ListVariableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list', - path: { - workspace: data.workspace - }, - query: { - path_start: data.pathStart, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list contextual variables - * @param data The data for the request. - * @param data.workspace - * @returns ContextualVariable contextual variable list - * @throws ApiError - */ -export const listContextualVariables = (data: ListContextualVariablesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/variables/list_contextual', - path: { - workspace: data.workspace - } -}); }; - -/** - * Get all critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.page - * @param data.pageSize - * @param data.acknowledged - * @returns unknown Successfully retrieved all critical alerts - * @throws ApiError - */ -export const workspaceGetCriticalAlerts = (data: WorkspaceGetCriticalAlertsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/workspaces/critical_alerts', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - page_size: data.pageSize, - acknowledged: data.acknowledged - } -}); }; - -/** - * Acknowledge a critical alert for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.id The ID of the critical alert to acknowledge - * @returns string Successfully acknowledged the critical alert - * @throws ApiError - */ -export const workspaceAcknowledgeCriticalAlert = (data: WorkspaceAcknowledgeCriticalAlertData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/{id}/acknowledge', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * Acknowledge all unacknowledged critical alerts for this workspace - * @param data The data for the request. - * @param data.workspace - * @returns string Successfully acknowledged all unacknowledged critical alerts. - * @throws ApiError - */ -export const workspaceAcknowledgeAllCriticalAlerts = (data: WorkspaceAcknowledgeAllCriticalAlertsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/acknowledge_all', - path: { - workspace: data.workspace - } -}); }; - -/** - * Mute critical alert UI for this workspace - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Boolean flag to mute critical alerts. - * @returns string Successfully updated mute critical alert settings. - * @throws ApiError - */ -export const workspaceMuteCriticalAlertsUi = (data: WorkspaceMuteCriticalAlertsUiData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/workspaces/critical_alerts/mute', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * login with oauth authorization flow - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody Partially filled script - * @returns string Successfully authenticated. The session ID is returned in a cookie named `token` and as plaintext response. Preferred method of authorization is through the bearer token. The cookie is only for browser convenience. - * - * @throws ApiError - */ -export const loginWithOauth = (data: LoginWithOauthData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/login_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect slack callback - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string slack token - * @throws ApiError - */ -export const connectSlackCallback = (data: ConnectSlackCallbackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/connect_slack_callback', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect slack callback instance - * @param data The data for the request. - * @param data.requestBody code endpoint - * @returns string success message - * @throws ApiError - */ -export const connectSlackCallbackInstance = (data: ConnectSlackCallbackInstanceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_slack_callback', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * connect callback - * @param data The data for the request. - * @param data.clientName - * @param data.requestBody code endpoint - * @returns TokenResponse oauth token - * @throws ApiError - */ -export const connectCallback = (data: ConnectCallbackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/oauth/connect_callback/{client_name}', - path: { - client_name: data.clientName - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create OAuth account - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody code endpoint - * @returns string account set - * @throws ApiError - */ -export const createAccount = (data: CreateAccountData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/create_account', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * refresh token - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody variable path - * @returns string token refreshed - * @throws ApiError - */ -export const refreshToken = (data: RefreshTokenData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/refresh_token/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * disconnect account - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string disconnected client - * @throws ApiError - */ -export const disconnectAccount = (data: DisconnectAccountData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * disconnect slack - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected slack - * @throws ApiError - */ -export const disconnectSlack = (data: DisconnectSlackData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_slack', - path: { - workspace: data.workspace - } -}); }; - -/** - * disconnect teams - * @param data The data for the request. - * @param data.workspace - * @returns string disconnected teams - * @throws ApiError - */ -export const disconnectTeams = (data: DisconnectTeamsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/oauth/disconnect_teams', - path: { - workspace: data.workspace - } -}); }; - -/** - * list oauth logins - * @returns unknown list of oauth and saml login clients - * @throws ApiError - */ -export const listOauthLogins = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_logins' -}); }; - -/** - * list oauth connects - * @returns string list of oauth connects clients - * @throws ApiError - */ -export const listOauthConnects = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/list_connects' -}); }; - -/** - * get oauth connect - * @param data The data for the request. - * @param data.client client name - * @returns unknown get - * @throws ApiError - */ -export const getOauthConnect = (data: GetOauthConnectData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/oauth/get_connect/{client}', - path: { - client: data.client - } -}); }; - -/** - * synchronize Microsoft Teams information (teams/channels) - * @returns TeamInfo Teams information successfully synchronized - * @throws ApiError - */ -export const syncTeams = (): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/teams/sync' -}); }; - -/** - * send update to Microsoft Teams activity - * Respond to a Microsoft Teams activity after a workspace command is run - * @param data The data for the request. - * @param data.requestBody - * @returns unknown Activity processed successfully - * @throws ApiError - */ -export const sendMessageToConversation = (data: SendMessageToConversationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/teams/activities', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource - * @param data.updateIfExists - * @returns string resource created - * @throws ApiError - */ -export const createResource = (data: CreateResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/create', - path: { - workspace: data.workspace - }, - query: { - update_if_exists: data.updateIfExists - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource deleted - * @throws ApiError - */ -export const deleteResource = (data: DeleteResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource updated - * @throws ApiError - */ -export const updateResource = (data: UpdateResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource - * @returns string resource value updated - * @throws ApiError - */ -export const updateResourceValue = (data: UpdateResourceValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/update_value/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Resource resource - * @throws ApiError - */ -export const getResource = (data: GetResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get resource interpolated (variables and resources are fully unrolled) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.jobId job id - * @returns unknown resource value - * @throws ApiError - */ -export const getResourceValueInterpolated = (data: GetResourceValueInterpolatedData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value_interpolated/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - job_id: data.jobId - } -}); }; - -/** - * get resource value - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ -export const getResourceValue = (data: GetResourceValueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/get_value/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does resource exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource exists - * @throws ApiError - */ -export const existsResource = (data: ExistsResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list resources - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.resourceType resource_types to list from, separated by ',', - * @param data.resourceTypeExclude resource_types to not list from, separated by ',', - * @param data.pathStart - * @returns ListableResource resource list - * @throws ApiError - */ -export const listResource = (data: ListResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - resource_type: data.resourceType, - resource_type_exclude: data.resourceTypeExclude, - path_start: data.pathStart - } -}); }; - -/** - * list resources for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown resource list - * @throws ApiError - */ -export const listSearchResource = (data: ListSearchResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list resource names - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown resource list names - * @throws ApiError - */ -export const listResourceNames = (data: ListResourceNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/list_names/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * create resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new resource_type - * @returns string resource_type created - * @throws ApiError - */ -export const createResourceType = (data: CreateResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get map from resource type to format extension - * @param data The data for the request. - * @param data.workspace - * @returns unknown map from resource type to file ext - * @throws ApiError - */ -export const fileResourceTypeToFileExtMap = (data: FileResourceTypeToFileExtMapData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/file_resource_type_to_file_ext_map', - path: { - workspace: data.workspace - } -}); }; - -/** - * delete resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string resource_type deleted - * @throws ApiError - */ -export const deleteResourceType = (data: DeleteResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/resources/type/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated resource_type - * @returns string resource_type updated - * @throws ApiError - */ -export const updateResourceType = (data: UpdateResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/resources/type/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get resource_type - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ResourceType resource_type deleted - * @throws ApiError - */ -export const getResourceType = (data: GetResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does resource_type exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does resource_type exist - * @throws ApiError - */ -export const existsResourceType = (data: ExistsResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list resource_types - * @param data The data for the request. - * @param data.workspace - * @returns ResourceType resource_type list - * @throws ApiError - */ -export const listResourceType = (data: ListResourceTypeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/list', - path: { - workspace: data.workspace - } -}); }; - -/** - * list resource_types names - * @param data The data for the request. - * @param data.workspace - * @returns string resource_type list - * @throws ApiError - */ -export const listResourceTypeNames = (data: ListResourceTypeNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/resources/type/listnames', - path: { - workspace: data.workspace - } -}); }; - -/** - * query resource types by similarity - * @param data The data for the request. - * @param data.workspace - * @param data.text query text - * @param data.limit query limit - * @returns unknown resource type details - * @throws ApiError - */ -export const queryResourceTypes = (data: QueryResourceTypesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/embeddings/query_resource_types', - path: { - workspace: data.workspace - }, - query: { - text: data.text, - limit: data.limit - } -}); }; - -/** - * list hub integrations - * @param data The data for the request. - * @param data.kind query integrations kind - * @returns unknown integrations details - * @throws ApiError - */ -export const listHubIntegrations = (data: ListHubIntegrationsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/integrations/hub/list', - query: { - kind: data.kind - } -}); }; - -/** - * list all hub flows - * @returns unknown hub flows list - * @throws ApiError - */ -export const listHubFlows = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/list' -}); }; - -/** - * get hub flow by id - * @param data The data for the request. - * @param data.id - * @returns unknown flow - * @throws ApiError - */ -export const getHubFlowById = (data: GetHubFlowByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/flows/hub/get/{id}', - path: { - id: data.id - } -}); }; - -/** - * list all hub apps - * @returns unknown hub apps list - * @throws ApiError - */ -export const listHubApps = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/list' -}); }; - -/** - * get hub app by id - * @param data The data for the request. - * @param data.id - * @returns unknown app - * @throws ApiError - */ -export const getHubAppById = (data: GetHubAppByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps/hub/get/{id}', - path: { - id: data.id - } -}); }; - -/** - * get public app by custom path - * @param data The data for the request. - * @param data.customPath - * @returns unknown app details - * @throws ApiError - */ -export const getPublicAppByCustomPath = (data: GetPublicAppByCustomPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/apps_u/public_app_by_custom_path/{custom_path}', - path: { - custom_path: data.customPath - } -}); }; - -/** - * get hub script content by path - * @param data The data for the request. - * @param data.path - * @returns string script details - * @throws ApiError - */ -export const getHubScriptContentByPath = (data: GetHubScriptContentByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get/{path}', - path: { - path: data.path - } -}); }; - -/** - * get full hub script by path - * @param data The data for the request. - * @param data.path - * @returns unknown script details - * @throws ApiError - */ -export const getHubScriptByPath = (data: GetHubScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/get_full/{path}', - path: { - path: data.path - } -}); }; - -/** - * get top hub scripts - * @param data The data for the request. - * @param data.limit query limit - * @param data.app query scripts app - * @param data.kind query scripts kind - * @returns unknown hub scripts list - * @throws ApiError - */ -export const getTopHubScripts = (data: GetTopHubScriptsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts/hub/top', - query: { - limit: data.limit, - app: data.app, - kind: data.kind - } -}); }; - -/** - * query hub scripts by similarity - * @param data The data for the request. - * @param data.text query text - * @param data.kind query scripts kind - * @param data.limit query limit - * @param data.app query scripts app - * @returns unknown script details - * @throws ApiError - */ -export const queryHubScripts = (data: QueryHubScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/embeddings/query_hub_scripts', - query: { - text: data.text, - kind: data.kind, - limit: data.limit, - app: data.app - } -}); }; - -/** - * list scripts for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown script list - * @throws ApiError - */ -export const listSearchScript = (data: ListSearchScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all scripts - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.firstParentHash mask to filter scripts whom first direct parent has exact hash - * @param data.lastParentHash mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - * @param data.parentHash is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - * @param data.includeWithoutMain (default false) - * include scripts without an exported main function - * - * @param data.includeDraftOnly (default false) - * include scripts that have no deployed version - * - * @param data.isTemplate (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - * @param data.kinds (default regardless) - * script kinds to filter, split by comma - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns Script All scripts - * @throws ApiError - */ -export const listScripts = (data: ListScriptsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - first_parent_hash: data.firstParentHash, - last_parent_hash: data.lastParentHash, - parent_hash: data.parentHash, - show_archived: data.showArchived, - include_without_main: data.includeWithoutMain, - include_draft_only: data.includeDraftOnly, - is_template: data.isTemplate, - kinds: data.kinds, - starred_only: data.starredOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * list all scripts paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of script paths - * @throws ApiError - */ -export const listScriptPaths = (data: ListScriptPathsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths', - path: { - workspace: data.workspace - } -}); }; - -/** - * create draft - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns string draft created - * @throws ApiError - */ -export const createDraft = (data: CreateDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/drafts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete draft - * @param data The data for the request. - * @param data.workspace - * @param data.kind - * @param data.path - * @returns string draft deleted - * @throws ApiError - */ -export const deleteDraft = (data: DeleteDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/drafts/delete/{kind}/{path}', - path: { - workspace: data.workspace, - kind: data.kind, - path: data.path - } -}); }; - -/** - * create script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled script - * @returns string script created - * @throws ApiError - */ -export const createScript = (data: CreateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Toggle ON and OFF the workspace error handler for a given script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ -export const toggleWorkspaceErrorHandlerForScript = (data: ToggleWorkspaceErrorHandlerForScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/toggle_workspace_error_handler/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get all instance custom tags (tags are used to dispatch jobs to different worker groups) - * @param data The data for the request. - * @param data.workspace - * @param data.showWorkspaceRestriction - * @returns string list of custom tags - * @throws ApiError - */ -export const getCustomTags = (data: GetCustomTagsData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/custom_tags', - query: { - workspace: data.workspace, - show_workspace_restriction: data.showWorkspaceRestriction - } -}); }; - -/** - * get all instance default tags - * @returns string list of default tags - * @throws ApiError - */ -export const geDefaultTags = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/get_default_tags' -}); }; - -/** - * is default tags per workspace - * @returns boolean is the default tags per workspace - * @throws ApiError - */ -export const isDefaultTagsPerWorkspace = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/is_default_tags_per_workspace' -}); }; - -/** - * archive script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script archived - * @throws ApiError - */ -export const archiveScriptByPath = (data: ArchiveScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * archive script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ -export const archiveScriptByHash = (data: ArchiveScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/archive/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * delete script by hash (erase content but keep hash, require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns Script script details - * @throws ApiError - */ -export const deleteScriptByHash = (data: DeleteScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * delete script at a given path (require admin) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string script path - * @throws ApiError - */ -export const deleteScriptByPath = (data: DeleteScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/delete/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } -}); }; - -/** - * get script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Script script details - * @throws ApiError - */ -export const getScriptByPath = (data: GetScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get triggers count of script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ -export const getTriggersCountOfScript = (data: GetTriggersCountOfScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get tokens with script scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ -export const listTokensOfScript = (data: ListTokensOfScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NewScriptWithDraft script details - * @throws ApiError - */ -export const getScriptByPathWithDraft = (data: GetScriptByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get history of a script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory script history - * @throws ApiError - */ -export const getScriptHistoryByPath = (data: GetScriptHistoryByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list script paths using provided script as a relative import - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string list of script paths - * @throws ApiError - */ -export const listScriptPathsFromWorkspaceRunnable = (data: ListScriptPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get scripts's latest version (hash) - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns ScriptHistory Script version/hash - * @throws ApiError - */ -export const getScriptLatestVersion = (data: GetScriptLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update history of a script - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.path - * @param data.requestBody Script deployment message - * @returns string success - * @throws ApiError - */ -export const updateScriptHistory = (data: UpdateScriptHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/scripts/history_update/h/{hash}/p/{path}', - path: { - workspace: data.workspace, - hash: data.hash, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * raw script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByPath = (data: RawScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * raw script by path with a token (mostly used by lsp to be used with import maps to resolve scripts) - * @param data The data for the request. - * @param data.workspace - * @param data.token - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByPathTokened = (data: RawScriptByPathTokenedData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/scripts_u/tokened_raw/{workspace}/{token}/{path}', - path: { - workspace: data.workspace, - token: data.token, - path: data.path - } -}); }; - -/** - * exists script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean does it exists - * @throws ApiError - */ -export const existsScriptByPath = (data: ExistsScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/exists/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.withStarredInfo - * @returns Script script details - * @throws ApiError - */ -export const getScriptByHash = (data: GetScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/get/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * raw script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string script content - * @throws ApiError - */ -export const rawScriptByHash = (data: RawScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/raw/h/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get script deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @returns unknown script details - * @throws ApiError - */ -export const getScriptDeploymentStatus = (data: GetScriptDeploymentStatusData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/scripts/deployment_status/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - } -}); }; - -/** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runScriptByPath = (data: RunScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path in openai format - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @returns unknown job result - * @throws ApiError - */ -export const openaiSyncScriptByPath = (data: OpenaiSyncScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/openai_sync/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultScriptByPath = (data: RunWaitResultScriptByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by path with get - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultScriptByPathGet = (data: RunWaitResultScriptByPathGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/run_wait_result/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - queue_limit: data.queueLimit, - payload: data.payload - } -}); }; - -/** - * run flow by path and wait until completion in openai format - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns unknown job result - * @throws ApiError - */ -export const openaiSyncFlowByPath = (data: OpenaiSyncFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/openai_sync/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run flow by path and wait until completion - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody script args - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.queueLimit The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns unknown job result - * @throws ApiError - */ -export const runWaitResultFlowByPath = (data: RunWaitResultFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run_wait_result/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - include_header: data.includeHeader, - queue_limit: data.queueLimit, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get job result by id - * @param data The data for the request. - * @param data.workspace - * @param data.flowJobId - * @param data.nodeId - * @returns unknown job result - * @throws ApiError - */ -export const resultById = (data: ResultByIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}', - path: { - workspace: data.workspace, - flow_job_id: data.flowJobId, - node_id: data.nodeId - } -}); }; - -/** - * list all flow paths - * @param data The data for the request. - * @param data.workspace - * @returns string list of flow paths - * @throws ApiError - */ -export const listFlowPaths = (data: ListFlowPathsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths', - path: { - workspace: data.workspace - } -}); }; - -/** - * list flows for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown flow list - * @throws ApiError - */ -export const listSearchFlow = (data: ListSearchFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all flows - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.showArchived (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are displayed. - * - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns unknown All flow - * @throws ApiError - */ -export const listFlows = (data: ListFlowsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - show_archived: data.showArchived, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * get flow history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow history - * @throws ApiError - */ -export const getFlowHistory = (data: GetFlowHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get flow's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns FlowVersion Flow version - * @throws ApiError - */ -export const getFlowLatestVersion = (data: GetFlowLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list flow paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns string list of flow paths - * @throws ApiError - */ -export const listFlowPathsFromWorkspaceRunnable = (data: ListFlowPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * get flow version - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @returns Flow flow details - * @throws ApiError - */ -export const getFlowVersion = (data: GetFlowVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/v/{version}/p/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - } -}); }; - -/** - * update flow history - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @param data.requestBody Flow deployment message - * @returns string success - * @throws ApiError - */ -export const updateFlowHistory = (data: UpdateFlowHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/history_update/v/{version}/p/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns Flow flow details - * @throws ApiError - */ -export const getFlowByPath = (data: GetFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get flow deployment status - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow status - * @throws ApiError - */ -export const getFlowDeploymentStatus = (data: GetFlowDeploymentStatusData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/deployment_status/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get triggers count of flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TriggersCount triggers count - * @throws ApiError - */ -export const getTriggersCountOfFlow = (data: GetTriggersCountOfFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get_triggers_count/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get tokens with flow scope - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns TruncatedToken tokens list - * @throws ApiError - */ -export const listTokensOfFlow = (data: ListTokensOfFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/list_tokens/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * Toggle ON and OFF the workspace error handler for a given flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Workspace error handler enabled - * @returns string error handler toggled - * @throws ApiError - */ -export const toggleWorkspaceErrorHandlerForFlow = (data: ToggleWorkspaceErrorHandlerForFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/toggle_workspace_error_handler/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown flow details with draft - * @throws ApiError - */ -export const getFlowByPathWithDraft = (data: GetFlowByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * exists flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean flow details - * @throws ApiError - */ -export const existsFlowByPath = (data: ExistsFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/flows/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Partially filled flow - * @returns string flow created - * @throws ApiError - */ -export const createFlow = (data: CreateFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update flow - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody Partially filled flow - * @returns string flow updated - * @throws ApiError - */ -export const updateFlow = (data: UpdateFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * archive flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody archiveFlow - * @returns string flow archived - * @throws ApiError - */ -export const archiveFlowByPath = (data: ArchiveFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/flows/archive/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.keepCaptures keep captures - * @returns string flow delete - * @throws ApiError - */ -export const deleteFlowByPath = (data: DeleteFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/flows/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - keep_captures: data.keepCaptures - } -}); }; - -/** - * list all raw apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @returns ListableRawApp All raw apps - * @throws ApiError - */ -export const listRawApps = (data: ListRawAppsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/raw_apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly - } -}); }; - -/** - * does an app exisst at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean app exists - * @throws ApiError - */ -export const existsRawApp = (data: ExistsRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/raw_apps/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path - * @param data The data for the request. - * @param data.workspace - * @param data.version - * @param data.path - * @returns string app details - * @throws ApiError - */ -export const getRawAppData = (data: GetRawAppDataData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_data/{version}/{path}', - path: { - workspace: data.workspace, - version: data.version, - path: data.path - } -}); }; - -/** - * list apps for search - * @param data The data for the request. - * @param data.workspace - * @returns unknown app list - * @throws ApiError - */ -export const listSearchApp = (data: ListSearchAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_search', - path: { - workspace: data.workspace - } -}); }; - -/** - * list all apps - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.pathStart mask to filter matching starting path - * @param data.pathExact mask to filter exact matching path - * @param data.starredOnly (default false) - * show only the starred items - * - * @param data.includeDraftOnly (default false) - * include items that have no deployed version - * - * @param data.withDeploymentMsg (default false) - * include deployment message - * - * @returns ListableApp All apps - * @throws ApiError - */ -export const listApps = (data: ListAppsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - order_desc: data.orderDesc, - created_by: data.createdBy, - path_start: data.pathStart, - path_exact: data.pathExact, - starred_only: data.starredOnly, - include_draft_only: data.includeDraftOnly, - with_deployment_msg: data.withDeploymentMsg - } -}); }; - -/** - * create app - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new app - * @returns string app created - * @throws ApiError - */ -export const createApp = (data: CreateAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * does an app exisst at path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean app exists - * @throws ApiError - */ -export const existsApp = (data: ExistsAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.withStarredInfo - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getAppByPath = (data: GetAppByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/p/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - with_starred_info: data.withStarredInfo - } -}); }; - -/** - * get app lite by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app lite details - * @throws ApiError - */ -export const getAppLiteByPath = (data: GetAppLiteByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/lite/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by path with draft - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersionWDraft app details with draft - * @throws ApiError - */ -export const getAppByPathWithDraft = (data: GetAppByPathWithDraftData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/draft/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app history by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory app history - * @throws ApiError - */ -export const getAppHistoryByPath = (data: GetAppHistoryByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/history/p/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get apps's latest version - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppHistory App version - * @throws ApiError - */ -export const getAppLatestVersion = (data: GetAppLatestVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get_latest_version/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list app paths from workspace runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns string list of app paths - * @throws ApiError - */ -export const listAppPathsFromWorkspaceRunnable = (data: ListAppPathsFromWorkspaceRunnableData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/list_paths_from_workspace_runnable/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * update app history - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.version - * @param data.requestBody App deployment message - * @returns string success - * @throws ApiError - */ -export const updateAppHistory = (data: UpdateAppHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/history_update/a/{id}/v/{version}', - path: { - workspace: data.workspace, - id: data.id, - version: data.version - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get public app by secret - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getPublicAppBySecret = (data: GetPublicAppBySecretData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_app/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get public resource - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown resource value - * @throws ApiError - */ -export const getPublicResource = (data: GetPublicResourceData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps_u/public_resource/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get public secret of app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app secret - * @throws ApiError - */ -export const getPublicSecretOfApp = (data: GetPublicSecretOfAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/secret_of/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get app by version - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns AppWithLastVersion app details - * @throws ApiError - */ -export const getAppByVersion = (data: GetAppByVersionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/get/v/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * create raw app - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new raw app - * @returns string raw app created - * @throws ApiError - */ -export const createRawApp = (data: CreateRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/raw_apps/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updateraw app - * @returns string app updated - * @throws ApiError - */ -export const updateRawApp = (data: UpdateRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/raw_apps/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete raw app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app deleted - * @throws ApiError - */ -export const deleteRawApp = (data: DeleteRawAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/raw_apps/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * delete app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string app deleted - * @throws ApiError - */ -export const deleteApp = (data: DeleteAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * update app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string app updated - * @throws ApiError - */ -export const updateApp = (data: UpdateAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * check if custom path exists - * @param data The data for the request. - * @param data.workspace - * @param data.customPath - * @returns boolean custom path exists - * @throws ApiError - */ -export const customPathExists = (data: CustomPathExistsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/apps/custom_path_exists/{custom_path}', - path: { - workspace: data.workspace, - custom_path: data.customPath - } -}); }; - -/** - * executeComponent - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody update app - * @returns string job uuid - * @throws ApiError - */ -export const executeComponent = (data: ExecuteComponentData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/execute_component/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * upload s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown file uploaded - * @throws ApiError - */ -export const uploadS3FileFromApp = (data: UploadS3FileFromAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/apps_u/upload_s3_file/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' -}); }; - -/** - * delete s3 file from app - * @param data The data for the request. - * @param data.workspace - * @param data.deleteToken - * @returns string file deleted - * @throws ApiError - */ -export const deleteS3FileFromApp = (data: DeleteS3FileFromAppData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/apps_u/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - delete_token: data.deleteToken - } -}); }; - -/** - * run flow by path - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runFlowByPath = (data: RunFlowByPathData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/f/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * restart a completed flow at a given step - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.stepId step id to restart the flow from - * @param data.branchOrIterationN for branchall or loop, the iteration at which the flow should restart - * @param data.requestBody flow args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the flow owner (default false) - * @returns string job created - * @throws ApiError - */ -export const restartFlowAtStep = (data: RestartFlowAtStepData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/restart/f/{id}/from/{step_id}/{branch_or_iteration_n}', - path: { - workspace: data.workspace, - id: data.id, - step_id: data.stepId, - branch_or_iteration_n: data.branchOrIterationN - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - parent_job: data.parentJob, - tag: data.tag, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script by hash - * @param data The data for the request. - * @param data.workspace - * @param data.hash - * @param data.requestBody Partially filled args - * @param data.scheduledFor when to schedule this job (leave empty for immediate run) - * @param data.scheduledInSecs schedule the script to execute in the number of seconds starting now - * @param data.skipPreprocessor skip the preprocessor - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.tag Override the tag to use - * @param data.cacheTtl Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @returns string job created - * @throws ApiError - */ -export const runScriptByHash = (data: RunScriptByHashData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/h/{hash}', - path: { - workspace: data.workspace, - hash: data.hash - }, - query: { - scheduled_for: data.scheduledFor, - scheduled_in_secs: data.scheduledInSecs, - skip_preprocessor: data.skipPreprocessor, - parent_job: data.parentJob, - tag: data.tag, - cache_ttl: data.cacheTtl, - job_id: data.jobId, - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run script preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns string job created - * @throws ApiError - */ -export const runScriptPreview = (data: RunScriptPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run code-workflow task - * @param data The data for the request. - * @param data.workspace - * @param data.jobId - * @param data.entrypoint - * @param data.requestBody preview - * @returns string job created - * @throws ApiError - */ -export const runCodeWorkflowTask = (data: RunCodeWorkflowTaskData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/workflow_as_code/{job_id}/{entrypoint}', - path: { - workspace: data.workspace, - job_id: data.jobId, - entrypoint: data.entrypoint - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run a one-off dependencies job - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody raw script content - * @returns unknown dependency job result - * @throws ApiError - */ -export const runRawScriptDependencies = (data: RunRawScriptDependenciesData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/dependencies', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * run flow preview - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody preview - * @param data.includeHeader List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - * @param data.invisibleToOwner make the run invisible to the the script owner (default false) - * @param data.jobId The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - * @returns string job created - * @throws ApiError - */ -export const runFlowPreview = (data: RunFlowPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/run/preview_flow', - path: { - workspace: data.workspace - }, - query: { - include_header: data.includeHeader, - invisible_to_owner: data.invisibleToOwner, - job_id: data.jobId - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all queued jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.worker worker this job was ran on - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns QueuedJob All queued jobs - * @throws ApiError - */ -export const listQueue = (data: ListQueueData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - worker: data.worker, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * get queue count - * @param data The data for the request. - * @param data.workspace - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @returns unknown queue count - * @throws ApiError - */ -export const getQueueCount = (data: GetQueueCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/count', - path: { - workspace: data.workspace - }, - query: { - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * get completed count - * @param data The data for the request. - * @param data.workspace - * @returns unknown completed count - * @throws ApiError - */ -export const getCompletedCount = (data: GetCompletedCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count', - path: { - workspace: data.workspace - } -}); }; - -/** - * count number of completed jobs with filter - * @param data The data for the request. - * @param data.workspace - * @param data.completedAfterSAgo - * @param data.success - * @param data.tags - * @param data.allWorkspaces - * @returns number Count of completed jobs - * @throws ApiError - */ -export const countCompletedJobs = (data: CountCompletedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/count_jobs', - path: { - workspace: data.workspace - }, - query: { - completed_after_s_ago: data.completedAfterSAgo, - success: data.success, - tags: data.tags, - all_workspaces: data.allWorkspaces - } -}); }; - -/** - * get the ids of all jobs matching the given filters - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.running filter on running jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.concurrencyKey - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns string uuids of jobs - * @throws ApiError - */ -export const listFilteredUuids = (data: ListFilteredUuidsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/queue/list_filtered_uuids', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - scheduled_for_before_now: data.scheduledForBeforeNow, - job_kinds: data.jobKinds, - suspended: data.suspended, - running: data.running, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - concurrency_key: data.concurrencyKey, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * cancel jobs based on the given uuids - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody uuids of the jobs to cancel - * @returns string uuids of canceled jobs - * @throws ApiError - */ -export const cancelSelection = (data: CancelSelectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/queue/cancel_selection', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.orderDesc order by desc order (default true) - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.worker worker this job was ran on - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.success filter on successful jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.tag filter on jobs with a given tag/worker group - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.isNotSchedule is not a scheduled job - * @returns CompletedJob All completed jobs - * @throws ApiError - */ -export const listCompletedJobs = (data: ListCompletedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/completed/list', - path: { - workspace: data.workspace - }, - query: { - order_desc: data.orderDesc, - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - success: data.success, - job_kinds: data.jobKinds, - args: data.args, - result: data.result, - allow_wildcards: data.allowWildcards, - tag: data.tag, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * list all jobs - * @param data The data for the request. - * @param data.workspace - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.worker worker this job was ran on - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdBefore filter on created before (inclusive) timestamp - * @param data.createdAfter filter on created after (exclusive) timestamp - * @param data.createdOrStartedBefore filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.createdOrStartedAfter filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - * @param data.createdOrStartedAfterCompletedJobs filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.suspended filter on suspended jobs - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter on jobs with a given tag/worker group - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns Job All jobs - * @throws ApiError - */ -export const listJobs = (data: ListJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/list', - path: { - workspace: data.workspace - }, - query: { - created_by: data.createdBy, - label: data.label, - worker: data.worker, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_before: data.createdBefore, - created_after: data.createdAfter, - created_or_started_before: data.createdOrStartedBefore, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - created_or_started_after: data.createdOrStartedAfter, - created_or_started_after_completed_jobs: data.createdOrStartedAfterCompletedJobs, - job_kinds: data.jobKinds, - suspended: data.suspended, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * get db clock - * @returns number the timestamp of the db that can be used to compute the drift - * @throws ApiError - */ -export const getDbClock = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/jobs/db_clock' -}); }; - -/** - * Count jobs by tag - * @param data The data for the request. - * @param data.horizonSecs Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600) - * @param data.workspaceId Specific workspace ID to filter results (optional) - * @returns unknown Job counts by tag - * @throws ApiError - */ -export const countJobsByTag = (data: CountJobsByTagData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/jobs/completed/count_by_tag', - query: { - horizon_secs: data.horizonSecs, - workspace_id: data.workspaceId - } -}); }; - -/** - * get job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.noLogs - * @returns Job job details - * @throws ApiError - */ -export const getJob = (data: GetJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - no_logs: data.noLogs - } -}); }; - -/** - * get root job id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string get root job id - * @throws ApiError - */ -export const getRootJobId = (data: GetRootJobIdData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_root_job_id/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job logs - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string job details - * @throws ApiError - */ -export const getJobLogs = (data: GetJobLogsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_logs/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job args - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown job args - * @throws ApiError - */ -export const getJobArgs = (data: GetJobArgsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_args/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get job updates - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.running - * @param data.logOffset - * @param data.getProgress - * @returns unknown job details - * @throws ApiError - */ -export const getJobUpdates = (data: GetJobUpdatesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/getupdate/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - running: data.running, - log_offset: data.logOffset, - get_progress: data.getProgress - } -}); }; - -/** - * get log file from object store - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns unknown job log - * @throws ApiError - */ -export const getLogFileFromStore = (data: GetLogFileFromStoreData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_log_file/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get flow debug info - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown flow debug info details - * @throws ApiError - */ -export const getFlowDebugInfo = (data: GetFlowDebugInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow_debug_info/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get completed job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ -export const getCompletedJob = (data: GetCompletedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * get completed job result - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.suspendedJob - * @param data.resumeId - * @param data.secret - * @param data.approver - * @returns unknown result - * @throws ApiError - */ -export const getCompletedJobResult = (data: GetCompletedJobResultData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - suspended_job: data.suspendedJob, - resume_id: data.resumeId, - secret: data.secret, - approver: data.approver - } -}); }; - -/** - * get completed job result if job is completed - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.getStarted - * @returns unknown result - * @throws ApiError - */ -export const getCompletedJobResultMaybe = (data: GetCompletedJobResultMaybeData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/completed/get_result_maybe/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - get_started: data.getStarted - } -}); }; - -/** - * delete completed job (erase content but keep run id) - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns CompletedJob job details - * @throws ApiError - */ -export const deleteCompletedJob = (data: DeleteCompletedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/completed/delete/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * cancel queued or running job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ -export const cancelQueuedJob = (data: CancelQueuedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * cancel all queued jobs for persistent script - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody reason - * @returns string persistent job scaled down to zero - * @throws ApiError - */ -export const cancelPersistentQueuedJobs = (data: CancelPersistentQueuedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/cancel_persistent/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * force cancel queued job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody reason - * @returns string job canceled - * @throws ApiError - */ -export const forceCancelQueuedJob = (data: ForceCancelQueuedJobData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/queue/force_cancel/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create an HMac signature given a job id and a resume id - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @returns string job signature - * @throws ApiError - */ -export const createJobSignature = (data: CreateJobSignatureData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/job_signature/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver - } -}); }; - -/** - * get resume urls given a job_id, resume_id and a nonce to resume a flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.approver - * @returns unknown url endpoints - * @throws ApiError - */ -export const getResumeUrls = (data: GetResumeUrlsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/resume_urls/{id}/{resume_id}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId - }, - query: { - approver: data.approver - } -}); }; - -/** - * generate interactive slack approval for suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.slackResourcePath - * @param data.channelId - * @param data.flowStepId - * @param data.approver - * @param data.message - * @param data.defaultArgsJson - * @param data.dynamicEnumsJson - * @returns unknown Interactive slack approval message sent successfully - * @throws ApiError - */ -export const getSlackApprovalPayload = (data: GetSlackApprovalPayloadData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/slack_approval/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - query: { - approver: data.approver, - message: data.message, - slack_resource_path: data.slackResourcePath, - channel_id: data.channelId, - flow_step_id: data.flowStepId, - default_args_json: data.defaultArgsJson, - dynamic_enums_json: data.dynamicEnumsJson - } -}); }; - -/** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.payload The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedJobGet = (data: ResumeSuspendedJobGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - payload: data.payload, - approver: data.approver - } -}); }; - -/** - * resume a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedJobPost = (data: ResumeSuspendedJobPostData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @param data.requestBody new value - * @returns string flow user state updated - * @throws ApiError - */ -export const setFlowUserState = (data: SetFlowUserStateData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get flow user state at a given key - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.key - * @returns unknown flow user state updated - * @throws ApiError - */ -export const getFlowUserState = (data: GetFlowUserStateData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs/flow/user_states/{id}/{key}', - path: { - workspace: data.workspace, - id: data.id, - key: data.key - } -}); }; - -/** - * resume a job for a suspended flow as an owner - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody - * @returns string job resumed - * @throws ApiError - */ -export const resumeSuspendedFlowAsOwner = (data: ResumeSuspendedFlowAsOwnerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs/flow/resume/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ -export const cancelSuspendedJobGet = (data: CancelSuspendedJobGetData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } -}); }; - -/** - * cancel a job for a suspended flow - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.requestBody - * @param data.approver - * @returns string job canceled - * @throws ApiError - */ -export const cancelSuspendedJobPost = (data: CancelSuspendedJobPostData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get parent flow job of suspended job - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.resumeId - * @param data.signature - * @param data.approver - * @returns unknown parent flow details - * @throws ApiError - */ -export const getSuspendedJobFlow = (data: GetSuspendedJobFlowData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}', - path: { - workspace: data.workspace, - id: data.id, - resume_id: data.resumeId, - signature: data.signature - }, - query: { - approver: data.approver - } -}); }; - -/** - * preview schedule - * @param data The data for the request. - * @param data.requestBody schedule - * @returns string List of 5 estimated upcoming execution events (in UTC) - * @throws ApiError - */ -export const previewSchedule = (data: PreviewScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/schedules/preview', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create schedule - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new schedule - * @returns string schedule created - * @throws ApiError - */ -export const createSchedule = (data: CreateScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule - * @returns string schedule updated - * @throws ApiError - */ -export const updateSchedule = (data: UpdateScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set enabled schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated schedule enable - * @returns string schedule enabled set - * @throws ApiError - */ -export const setScheduleEnabled = (data: SetScheduleEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string schedule deleted - * @throws ApiError - */ -export const deleteSchedule = (data: DeleteScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/schedules/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get schedule - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns Schedule schedule deleted - * @throws ApiError - */ -export const getSchedule = (data: GetScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does schedule exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean schedule exists - * @throws ApiError - */ -export const existsSchedule = (data: ExistsScheduleData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list schedules - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns Schedule schedule list - * @throws ApiError - */ -export const listSchedules = (data: ListSchedulesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - args: data.args, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * list schedules with last 20 jobs - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns ScheduleWJobs schedule list - * @throws ApiError - */ -export const listSchedulesWithJobs = (data: ListSchedulesWithJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/schedules/list_with_jobs', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * Set default error or recoevery handler - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Handler description - * @returns unknown default error handler set - * @throws ApiError - */ -export const setDefaultErrorOrRecoveryHandler = (data: SetDefaultErrorOrRecoveryHandlerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/schedules/setdefaulthandler', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new http trigger - * @returns string http trigger created - * @throws ApiError - */ -export const createHttpTrigger = (data: CreateHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string http trigger updated - * @throws ApiError - */ -export const updateHttpTrigger = (data: UpdateHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string http trigger deleted - * @throws ApiError - */ -export const deleteHttpTrigger = (data: DeleteHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/http_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get http trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns HttpTrigger http trigger deleted - * @throws ApiError - */ -export const getHttpTrigger = (data: GetHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list http triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns HttpTrigger http trigger list - * @throws ApiError - */ -export const listHttpTriggers = (data: ListHttpTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does http trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean http trigger exists - * @throws ApiError - */ -export const existsHttpTrigger = (data: ExistsHttpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/http_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * does route exists - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody route exists request - * @returns boolean route exists - * @throws ApiError - */ -export const existsRoute = (data: ExistsRouteData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/http_triggers/route_exists', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new websocket trigger - * @returns string websocket trigger created - * @throws ApiError - */ -export const createWebsocketTrigger = (data: CreateWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string websocket trigger updated - * @throws ApiError - */ -export const updateWebsocketTrigger = (data: UpdateWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string websocket trigger deleted - * @throws ApiError - */ -export const deleteWebsocketTrigger = (data: DeleteWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/websocket_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns WebsocketTrigger websocket trigger deleted - * @throws ApiError - */ -export const getWebsocketTrigger = (data: GetWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list websocket triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns WebsocketTrigger websocket trigger list - * @throws ApiError - */ -export const listWebsocketTriggers = (data: ListWebsocketTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does websocket trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean websocket trigger exists - * @throws ApiError - */ -export const existsWebsocketTrigger = (data: ExistsWebsocketTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/websocket_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled websocket trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated websocket trigger enable - * @returns string websocket trigger enabled set - * @throws ApiError - */ -export const setWebsocketTriggerEnabled = (data: SetWebsocketTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test websocket connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test websocket connection - * @returns string successfuly connected to websocket - * @throws ApiError - */ -export const testWebsocketConnection = (data: TestWebsocketConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/websocket_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new kafka trigger - * @returns string kafka trigger created - * @throws ApiError - */ -export const createKafkaTrigger = (data: CreateKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string kafka trigger updated - * @throws ApiError - */ -export const updateKafkaTrigger = (data: UpdateKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string kafka trigger deleted - * @throws ApiError - */ -export const deleteKafkaTrigger = (data: DeleteKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/kafka_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns KafkaTrigger kafka trigger deleted - * @throws ApiError - */ -export const getKafkaTrigger = (data: GetKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list kafka triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns KafkaTrigger kafka trigger list - * @throws ApiError - */ -export const listKafkaTriggers = (data: ListKafkaTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does kafka trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean kafka trigger exists - * @throws ApiError - */ -export const existsKafkaTrigger = (data: ExistsKafkaTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/kafka_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled kafka trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated kafka trigger enable - * @returns string kafka trigger enabled set - * @throws ApiError - */ -export const setKafkaTriggerEnabled = (data: SetKafkaTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test kafka connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test kafka connection - * @returns string successfuly connected to kafka brokers - * @throws ApiError - */ -export const testKafkaConnection = (data: TestKafkaConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/kafka_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new nats trigger - * @returns string nats trigger created - * @throws ApiError - */ -export const createNatsTrigger = (data: CreateNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string nats trigger updated - * @throws ApiError - */ -export const updateNatsTrigger = (data: UpdateNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string nats trigger deleted - * @throws ApiError - */ -export const deleteNatsTrigger = (data: DeleteNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/nats_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns NatsTrigger nats trigger deleted - * @throws ApiError - */ -export const getNatsTrigger = (data: GetNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list nats triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns NatsTrigger nats trigger list - * @throws ApiError - */ -export const listNatsTriggers = (data: ListNatsTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does nats trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean nats trigger exists - * @throws ApiError - */ -export const existsNatsTrigger = (data: ExistsNatsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/nats_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled nats trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated nats trigger enable - * @returns string nats trigger enabled set - * @throws ApiError - */ -export const setNatsTriggerEnabled = (data: SetNatsTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test NATS connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test nats connection - * @returns string successfuly connected to NATS servers - * @throws ApiError - */ -export const testNatsConnection = (data: TestNatsConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/nats_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new sqs trigger - * @returns string sqs trigger created - * @throws ApiError - */ -export const createSqsTrigger = (data: CreateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string sqs trigger updated - * @throws ApiError - */ -export const updateSqsTrigger = (data: UpdateSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string sqs trigger deleted - * @throws ApiError - */ -export const deleteSqsTrigger = (data: DeleteSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/sqs_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SqsTrigger sqs trigger deleted - * @throws ApiError - */ -export const getSqsTrigger = (data: GetSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list sqs triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns SqsTrigger sqs trigger list - * @throws ApiError - */ -export const listSqsTriggers = (data: ListSqsTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does sqs trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean sqs trigger exists - * @throws ApiError - */ -export const existsSqsTrigger = (data: ExistsSqsTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/sqs_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled sqs trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated sqs trigger enable - * @returns string sqs trigger enabled set - * @throws ApiError - */ -export const setSqsTriggerEnabled = (data: SetSqsTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test sqs connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test sqs connection - * @returns string successfuly connected to sqs - * @throws ApiError - */ -export const testSqsConnection = (data: TestSqsConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/sqs_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new mqtt trigger - * @returns string mqtt trigger created - * @throws ApiError - */ -export const createMqttTrigger = (data: CreateMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string mqtt trigger updated - * @throws ApiError - */ -export const updateMqttTrigger = (data: UpdateMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string mqtt trigger deleted - * @throws ApiError - */ -export const deleteMqttTrigger = (data: DeleteMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/mqtt_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns MqttTrigger mqtt trigger deleted - * @throws ApiError - */ -export const getMqttTrigger = (data: GetMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list mqtt triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns MqttTrigger mqtt trigger list - * @throws ApiError - */ -export const listMqttTriggers = (data: ListMqttTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does mqtt trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean mqtt trigger exists - * @throws ApiError - */ -export const existsMqttTrigger = (data: ExistsMqttTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/mqtt_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled mqtt trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated mqtt trigger enable - * @returns string mqtt trigger enabled set - * @throws ApiError - */ -export const setMqttTriggerEnabled = (data: SetMqttTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test mqtt connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test mqtt connection - * @returns string successfully connected to mqtt - * @throws ApiError - */ -export const testMqttConnection = (data: TestMqttConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/mqtt_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * create gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new gcp trigger - * @returns string gcp trigger created - * @throws ApiError - */ -export const createGcpTrigger = (data: CreateGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string gcp trigger updated - * @throws ApiError - */ -export const updateGcpTrigger = (data: UpdateGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string gcp trigger deleted - * @throws ApiError - */ -export const deleteGcpTrigger = (data: DeleteGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns GcpTrigger gcp trigger deleted - * @throws ApiError - */ -export const getGcpTrigger = (data: GetGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list gcp triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns GcpTrigger gcp trigger list - * @throws ApiError - */ -export const listGcpTriggers = (data: ListGcpTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does gcp trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean gcp trigger exists - * @throws ApiError - */ -export const existsGcpTrigger = (data: ExistsGcpTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated gcp trigger enable - * @returns string gcp trigger enabled set - * @throws ApiError - */ -export const setGcpTriggerEnabled = (data: SetGcpTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test gcp connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test gcp connection - * @returns string try to connect to a gcp broker - * @throws ApiError - */ -export const testGcpConnection = (data: TestGcpConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete gcp trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to delete subscription from google cloud - * @returns string gcp trigger deleted - * @throws ApiError - */ -export const deleteGcpSubscription = (data: DeleteGcpSubscriptionData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/gcp_triggers/subscriptions/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list all topics of google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string get all google topics - * @throws ApiError - */ -export const listGoogleTopics = (data: ListGoogleTopicsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/gcp_triggers/topics/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list all subscription of a give topic from google cloud service - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody args to get subscription's topic from google cloud - * @returns string get all google topic subscriptions name - * @throws ApiError - */ -export const listAllTgoogleTopicSubscriptions = (data: ListAllTgoogleTopicSubscriptionsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/gcp_triggers/subscriptions/list/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * check if postgres configuration is set to logical - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean boolean that indicates if postgres is set to logical level or not - * @throws ApiError - */ -export const isValidPostgresConfiguration = (data: IsValidPostgresConfigurationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/is_valid_postgres_configuration/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create template script - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody template script - * @returns string custom id to retrieve template script - * @throws ApiError - */ -export const createTemplateScript = (data: CreateTemplateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create_template_script', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get template script - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns string template script - * @throws ApiError - */ -export const getTemplateScript = (data: GetTemplateScriptData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get_template_script/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns SlotList list postgres slot - * @throws ApiError - */ -export const listPostgresReplicationSlot = (data: ListPostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/slot/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * create replication slot for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody new slot for postgres - * @returns string slot created - * @throws ApiError - */ -export const createPostgresReplicationSlot = (data: CreatePostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/slot/create/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres replication slot - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody replication slot of postgres - * @returns string postgres replication slot deleted - * @throws ApiError - */ -export const deletePostgresReplicationSlot = (data: DeletePostgresReplicationSlotData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/slot/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string database publication list - * @throws ApiError - */ -export const listPostgresPublication = (data: ListPostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/list/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @returns PublicationData postgres publication get - * @throws ApiError - */ -export const getPostgresPublication = (data: GetPostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/publication/get/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } -}); }; - -/** - * create publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @param data.requestBody new publication for postgres - * @returns string publication created - * @throws ApiError - */ -export const createPostgresPublication = (data: CreatePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/create/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update publication for postgres - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @param data.requestBody update publication for postgres - * @returns string publication updated - * @throws ApiError - */ -export const updatePostgresPublication = (data: UpdatePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/publication/update/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres publication - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.publication - * @returns string postgres publication deleted - * @throws ApiError - */ -export const deletePostgresPublication = (data: DeletePostgresPublicationData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/publication/delete/{publication}/{path}', - path: { - workspace: data.workspace, - path: data.path, - publication: data.publication - } -}); }; - -/** - * create postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody new postgres trigger - * @returns string postgres trigger created - * @throws ApiError - */ -export const createPostgresTrigger = (data: CreatePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated trigger - * @returns string postgres trigger updated - * @throws ApiError - */ -export const updatePostgresTrigger = (data: UpdatePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/update/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns string postgres trigger deleted - * @throws ApiError - */ -export const deletePostgresTrigger = (data: DeletePostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/postgres_triggers/delete/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * get postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns PostgresTrigger get postgres trigger - * @throws ApiError - */ -export const getPostgresTrigger = (data: GetPostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/get/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * list postgres triggers - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.path filter by path - * @param data.isFlow - * @param data.pathStart - * @returns PostgresTrigger postgres trigger list - * @throws ApiError - */ -export const listPostgresTriggers = (data: ListPostgresTriggersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage, - path: data.path, - is_flow: data.isFlow, - path_start: data.pathStart - } -}); }; - -/** - * does postgres trigger exists - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @returns boolean postgres trigger exists - * @throws ApiError - */ -export const existsPostgresTrigger = (data: ExistsPostgresTriggerData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/postgres_triggers/exists/{path}', - path: { - workspace: data.workspace, - path: data.path - } -}); }; - -/** - * set enabled postgres trigger - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.requestBody updated postgres trigger enable - * @returns string postgres trigger enabled set - * @throws ApiError - */ -export const setPostgresTriggerEnabled = (data: SetPostgresTriggerEnabledData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/setenabled/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * test postgres connection - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody test postgres connection - * @returns string successfuly connected to postgres - * @throws ApiError - */ -export const testPostgresConnection = (data: TestPostgresConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/postgres_triggers/test', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list instance groups - * @returns InstanceGroup instance group list - * @throws ApiError - */ -export const listInstanceGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/list' -}); }; - -/** - * get instance group - * @param data The data for the request. - * @param data.name - * @returns InstanceGroup instance group - * @throws ApiError - */ -export const getInstanceGroup = (data: GetInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/get/{name}', - path: { - name: data.name - } -}); }; - -/** - * create instance group - * @param data The data for the request. - * @param data.requestBody create instance group - * @returns string instance group created - * @throws ApiError - */ -export const createInstanceGroup = (data: CreateInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/create', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody update instance group - * @returns string instance group updated - * @throws ApiError - */ -export const updateInstanceGroup = (data: UpdateInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete instance group - * @param data The data for the request. - * @param data.name - * @returns string instance group deleted - * @throws ApiError - */ -export const deleteInstanceGroup = (data: DeleteInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/groups/delete/{name}', - path: { - name: data.name - } -}); }; - -/** - * add user to instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to add to instance group - * @returns string user added to instance group - * @throws ApiError - */ -export const addUserToInstanceGroup = (data: AddUserToInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/adduser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove user from instance group - * @param data The data for the request. - * @param data.name - * @param data.requestBody user to remove from instance group - * @returns string user removed from instance group - * @throws ApiError - */ -export const removeUserFromInstanceGroup = (data: RemoveUserFromInstanceGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/removeuser/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * export instance groups - * @returns ExportedInstanceGroup exported instance groups - * @throws ApiError - */ -export const exportInstanceGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/groups/export' -}); }; - -/** - * overwrite instance groups - * @param data The data for the request. - * @param data.requestBody overwrite instance groups - * @returns string success message - * @throws ApiError - */ -export const overwriteInstanceGroups = (data: OverwriteInstanceGroupsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/groups/overwrite', - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list groups - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Group group list - * @throws ApiError - */ -export const listGroups = (data: ListGroupsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list group names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the groups the user is member of (default false) - * @returns string group list - * @throws ApiError - */ -export const listGroupNames = (data: ListGroupNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } -}); }; - -/** - * create group - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create group - * @returns string group created - * @throws ApiError - */ -export const createGroup = (data: CreateGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody updated group - * @returns string group updated - * @throws ApiError - */ -export const updateGroup = (data: UpdateGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string group deleted - * @throws ApiError - */ -export const deleteGroup = (data: DeleteGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/groups/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Group group - * @throws ApiError - */ -export const getGroup = (data: GetGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/groups/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * add user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user added to group - * @throws ApiError - */ -export const addUserToGroup = (data: AddUserToGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/adduser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove user to group - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added user to group - * @returns string user removed from group - * @throws ApiError - */ -export const removeUserToGroup = (data: RemoveUserToGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/groups/removeuser/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list folders - * @param data The data for the request. - * @param data.workspace - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Folder folder list - * @throws ApiError - */ -export const listFolders = (data: ListFoldersData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/list', - path: { - workspace: data.workspace - }, - query: { - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * list folder names - * @param data The data for the request. - * @param data.workspace - * @param data.onlyMemberOf only list the folders the user is member of (default false) - * @returns string folder list - * @throws ApiError - */ -export const listFolderNames = (data: ListFolderNamesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/listnames', - path: { - workspace: data.workspace - }, - query: { - only_member_of: data.onlyMemberOf - } -}); }; - -/** - * create folder - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody create folder - * @returns string folder created - * @throws ApiError - */ -export const createFolder = (data: CreateFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/create', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * update folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody update folder - * @returns string folder updated - * @throws ApiError - */ -export const updateFolder = (data: UpdateFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/update/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * delete folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns string folder deleted - * @throws ApiError - */ -export const deleteFolder = (data: DeleteFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/folders/delete/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns Folder folder - * @throws ApiError - */ -export const getFolder = (data: GetFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/get/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * exists folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns boolean folder exists - * @throws ApiError - */ -export const existsFolder = (data: ExistsFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/exists/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * get folder usage - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @returns unknown folder - * @throws ApiError - */ -export const getFolderUsage = (data: GetFolderUsageData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/folders/getusage/{name}', - path: { - workspace: data.workspace, - name: data.name - } -}); }; - -/** - * add owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody owner user to folder - * @returns string owner added to folder - * @throws ApiError - */ -export const addOwnerToFolder = (data: AddOwnerToFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/addowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove owner to folder - * @param data The data for the request. - * @param data.workspace - * @param data.name - * @param data.requestBody added owner to folder - * @returns string owner removed from folder - * @throws ApiError - */ -export const removeOwnerToFolder = (data: RemoveOwnerToFolderData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/folders/removeowner/{name}', - path: { - workspace: data.workspace, - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * list workers - * @param data The data for the request. - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.pingSince number of seconds the worker must have had a last ping more recent of (default to 300) - * @returns WorkerPing a list of workers - * @throws ApiError - */ -export const listWorkers = (data: ListWorkersData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/list', - query: { - page: data.page, - per_page: data.perPage, - ping_since: data.pingSince - } -}); }; - -/** - * exists worker with tag - * @param data The data for the request. - * @param data.tag - * @returns boolean whether a worker with the tag exists - * @throws ApiError - */ -export const existsWorkerWithTag = (data: ExistsWorkerWithTagData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/exists_worker_with_tag', - query: { - tag: data.tag - } -}); }; - -/** - * get queue metrics - * @returns unknown metrics - * @throws ApiError - */ -export const getQueueMetrics = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_metrics' -}); }; - -/** - * get counts of jobs waiting for an executor per tag - * @returns number queue counts - * @throws ApiError - */ -export const getCountsOfJobsWaitingPerTag = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/workers/queue_counts' -}); }; - -/** - * list worker groups - * @returns unknown a list of worker group configs - * @throws ApiError - */ -export const listWorkerGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_worker_groups' -}); }; - -/** - * get config - * @param data The data for the request. - * @param data.name - * @returns unknown a config - * @throws ApiError - */ -export const getConfig = (data: GetConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/get/{name}', - path: { - name: data.name - } -}); }; - -/** - * Update config - * @param data The data for the request. - * @param data.name - * @param data.requestBody worker group - * @returns string Update a worker group - * @throws ApiError - */ -export const updateConfig = (data: UpdateConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/configs/update/{name}', - path: { - name: data.name - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete Config - * @param data The data for the request. - * @param data.name - * @returns string Delete config - * @throws ApiError - */ -export const deleteConfig = (data: DeleteConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/configs/update/{name}', - path: { - name: data.name - } -}); }; - -/** - * list configs - * @returns Config list of configs - * @throws ApiError - */ -export const listConfigs = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list' -}); }; - -/** - * List autoscaling events - * @param data The data for the request. - * @param data.workerGroup - * @returns AutoscalingEvent List of autoscaling events - * @throws ApiError - */ -export const listAutoscalingEvents = (data: ListAutoscalingEventsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/configs/list_autoscaling_events/{worker_group}', - path: { - worker_group: data.workerGroup - } -}); }; - -/** - * get granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @returns boolean acls - * @throws ApiError - */ -export const getGranularAcls = (data: GetGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/acls/get/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - } -}); }; - -/** - * add granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl added - * @throws ApiError - */ -export const addGranularAcls = (data: AddGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/add/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * remove granular acls - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.kind - * @param data.requestBody acl to add - * @returns string granular acl removed - * @throws ApiError - */ -export const removeGranularAcls = (data: RemoveGranularAclsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/acls/remove/{kind}/{path}', - path: { - workspace: data.workspace, - path: data.path, - kind: data.kind - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set capture config - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody capture config - * @returns unknown capture config set - * @throws ApiError - */ -export const setCaptureConfig = (data: SetCaptureConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/set_config', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * ping capture config - * @param data The data for the request. - * @param data.workspace - * @param data.triggerKind - * @param data.runnableKind - * @param data.path - * @returns unknown capture config pinged - * @throws ApiError - */ -export const pingCaptureConfig = (data: PingCaptureConfigData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/ping_config/{trigger_kind}/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - trigger_kind: data.triggerKind, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * get capture configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @returns CaptureConfig capture configs for a script or flow - * @throws ApiError - */ -export const getCaptureConfigs = (data: GetCaptureConfigsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/get_configs/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - } -}); }; - -/** - * list captures for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.triggerKind - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Capture list of captures for a script or flow - * @throws ApiError - */ -export const listCaptures = (data: ListCapturesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/list/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - query: { - trigger_kind: data.triggerKind, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * move captures and configs for a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.runnableKind - * @param data.path - * @param data.requestBody move captures and configs to a new path - * @returns string captures and configs moved - * @throws ApiError - */ -export const moveCapturesAndConfigs = (data: MoveCapturesAndConfigsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/capture/move/{runnable_kind}/{path}', - path: { - workspace: data.workspace, - runnable_kind: data.runnableKind, - path: data.path - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns Capture capture - * @throws ApiError - */ -export const getCapture = (data: GetCaptureData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * delete a capture - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns unknown capture deleted - * @throws ApiError - */ -export const deleteCapture = (data: DeleteCaptureData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/capture/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * star item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown star item - * @throws ApiError - */ -export const star = (data: StarData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/star', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * unstar item - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody - * @returns unknown unstar item - * @throws ApiError - */ -export const unstar = (data: UnstarData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/favorites/unstar', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * List Inputs used in previously completed jobs - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.includePreview - * @returns Input Input history for completed jobs - * @throws ApiError - */ -export const getInputHistory = (data: GetInputHistoryData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/history', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage, - args: data.args, - include_preview: data.includePreview - } -}); }; - -/** - * Get args from history or saved input - * @param data The data for the request. - * @param data.workspace - * @param data.jobOrInputId - * @param data.input - * @param data.allowLarge - * @returns unknown args - * @throws ApiError - */ -export const getArgsFromHistoryOrSavedInput = (data: GetArgsFromHistoryOrSavedInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/{jobOrInputId}/args', - path: { - workspace: data.workspace, - jobOrInputId: data.jobOrInputId - }, - query: { - input: data.input, - allow_large: data.allowLarge - } -}); }; - -/** - * List saved Inputs for a Runnable - * @param data The data for the request. - * @param data.workspace - * @param data.runnableId - * @param data.runnableType - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @returns Input Saved Inputs for a Runnable - * @throws ApiError - */ -export const listInputs = (data: ListInputsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/inputs/list', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType, - page: data.page, - per_page: data.perPage - } -}); }; - -/** - * Create an Input for future use in a script or flow - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody Input - * @param data.runnableId - * @param data.runnableType - * @returns string Input created - * @throws ApiError - */ -export const createInput = (data: CreateInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/create', - path: { - workspace: data.workspace - }, - query: { - runnable_id: data.runnableId, - runnable_type: data.runnableType - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Update an Input - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody UpdateInput - * @returns string Input updated - * @throws ApiError - */ -export const updateInput = (data: UpdateInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/update', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Delete a Saved Input - * @param data The data for the request. - * @param data.workspace - * @param data.input - * @returns string Input deleted - * @throws ApiError - */ -export const deleteInput = (data: DeleteInputData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/inputs/delete/{input}', - path: { - workspace: data.workspace, - input: data.input - } -}); }; - -/** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ -export const duckdbConnectionSettings = (data: DuckdbConnectionSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of instructions necessary to connect DuckDB to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ -export const duckdbConnectionSettingsV2 = (data: DuckdbConnectionSettingsV2Data): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/duckdb_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource to connect to - * @returns unknown Connection settings - * @throws ApiError - */ -export const polarsConnectionSettings = (data: PolarsConnectionSettingsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Converts an S3 resource to the set of arguments necessary to connect Polars to an S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use to generate the connection settings. If empty, the S3 resource defined in the workspace settings will be used - * @returns unknown Connection settings - * @throws ApiError - */ -export const polarsConnectionSettingsV2 = (data: PolarsConnectionSettingsV2Data): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/polars_connection_settings', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Returns the s3 resource associated to the provided path, or the workspace default S3 resource - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody S3 resource path to use. If empty, the S3 resource defined in the workspace settings will be used - * @returns S3Resource Connection settings - * @throws ApiError - */ -export const s3ResourceInfo = (data: S3ResourceInfoData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/v2/s3_resource_info', - path: { - workspace: data.workspace - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * Test connection to the workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.storage - * @returns unknown Connection settings - * @throws ApiError - */ -export const datasetStorageTestConnection = (data: DatasetStorageTestConnectionData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/test_connection', - path: { - workspace: data.workspace - }, - query: { - storage: data.storage - } -}); }; - -/** - * List the file keys available in a workspace object storage - * @param data The data for the request. - * @param data.workspace - * @param data.maxKeys - * @param data.marker - * @param data.prefix - * @param data.storage - * @returns unknown List of file keys - * @throws ApiError - */ -export const listStoredFiles = (data: ListStoredFilesData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/list_stored_files', - path: { - workspace: data.workspace - }, - query: { - max_keys: data.maxKeys, - marker: data.marker, - prefix: data.prefix, - storage: data.storage - } -}); }; - -/** - * Load metadata of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns WindmillFileMetadata FileMetadata - * @throws ApiError - */ -export const loadFileMetadata = (data: LoadFileMetadataData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_metadata', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } -}); }; - -/** - * Load a preview of the file - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.fileSizeInBytes - * @param data.fileMimeType - * @param data.csvSeparator - * @param data.csvHasHeader - * @param data.readBytesFrom - * @param data.readBytesLength - * @param data.storage - * @returns WindmillFilePreview FilePreview - * @throws ApiError - */ -export const loadFilePreview = (data: LoadFilePreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_file_preview', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_size_in_bytes: data.fileSizeInBytes, - file_mime_type: data.fileMimeType, - csv_separator: data.csvSeparator, - csv_has_header: data.csvHasHeader, - read_bytes_from: data.readBytesFrom, - read_bytes_length: data.readBytesLength, - storage: data.storage - } -}); }; - -/** - * Load a preview of a parquet file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Parquet Preview - * @throws ApiError - */ -export const loadParquetPreview = (data: LoadParquetPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_parquet_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } -}); }; - -/** - * Load the table row count - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @returns unknown Table count - * @throws ApiError - */ -export const loadTableRowCount = (data: LoadTableRowCountData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_table_count/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage - } -}); }; - -/** - * Load a preview of a csv file - * @param data The data for the request. - * @param data.workspace - * @param data.path - * @param data.offset - * @param data.limit - * @param data.sortCol - * @param data.sortDesc - * @param data.searchCol - * @param data.searchTerm - * @param data.storage - * @param data.csvSeparator - * @returns unknown Csv Preview - * @throws ApiError - */ -export const loadCsvPreview = (data: LoadCsvPreviewData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/load_csv_preview/{path}', - path: { - workspace: data.workspace, - path: data.path - }, - query: { - offset: data.offset, - limit: data.limit, - sort_col: data.sortCol, - sort_desc: data.sortDesc, - search_col: data.searchCol, - search_term: data.searchTerm, - storage: data.storage, - csv_separator: data.csvSeparator - } -}); }; - -/** - * Permanently delete file from S3 - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ -export const deleteS3File = (data: DeleteS3FileData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/w/{workspace}/job_helpers/delete_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - storage: data.storage - } -}); }; - -/** - * Move a S3 file from one path to the other within the same bucket - * @param data The data for the request. - * @param data.workspace - * @param data.srcFileKey - * @param data.destFileKey - * @param data.storage - * @returns unknown Confirmation - * @throws ApiError - */ -export const moveS3File = (data: MoveS3FileData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/move_s3_file', - path: { - workspace: data.workspace - }, - query: { - src_file_key: data.srcFileKey, - dest_file_key: data.destFileKey, - storage: data.storage - } -}); }; - -/** - * Upload file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.requestBody File content - * @param data.fileKey - * @param data.fileExtension - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @param data.contentType - * @param data.contentDisposition - * @returns unknown File upload status - * @throws ApiError - */ -export const fileUpload = (data: FileUploadData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_helpers/upload_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - file_extension: data.fileExtension, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage, - content_type: data.contentType, - content_disposition: data.contentDisposition - }, - body: data.requestBody, - mediaType: 'application/octet-stream' -}); }; - -/** - * Download file from S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @param data.storage - * @returns binary Chunk of the downloaded file - * @throws ApiError - */ -export const fileDownload = (data: FileDownloadData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_file', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType, - storage: data.storage - } -}); }; - -/** - * Download file to S3 bucket - * @param data The data for the request. - * @param data.workspace - * @param data.fileKey - * @param data.s3ResourcePath - * @param data.resourceType - * @returns string The downloaded file - * @throws ApiError - */ -export const fileDownloadParquetAsCsv = (data: FileDownloadParquetAsCsvData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_helpers/download_s3_parquet_file_as_csv', - path: { - workspace: data.workspace - }, - query: { - file_key: data.fileKey, - s3_resource_path: data.s3ResourcePath, - resource_type: data.resourceType - } -}); }; - -/** - * get job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown job details - * @throws ApiError - */ -export const getJobMetrics = (data: GetJobMetricsData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/get/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * set job metrics - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @param data.requestBody parameters for statistics retrieval - * @returns unknown Job progress updated - * @throws ApiError - */ -export const setJobProgress = (data: SetJobProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'POST', - url: '/w/{workspace}/job_metrics/set_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - }, - body: data.requestBody, - mediaType: 'application/json' -}); }; - -/** - * get job progress - * @param data The data for the request. - * @param data.workspace - * @param data.id - * @returns number job progress between 0 and 99 - * @throws ApiError - */ -export const getJobProgress = (data: GetJobProgressData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/job_metrics/get_progress/{id}', - path: { - workspace: data.workspace, - id: data.id - } -}); }; - -/** - * list log files ordered by timestamp - * @param data The data for the request. - * @param data.before filter on started before (inclusive) timestamp - * @param data.after filter on created after (exclusive) timestamp - * @param data.withError - * @returns unknown time - * @throws ApiError - */ -export const listLogFiles = (data: ListLogFilesData = {}): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/list_files', - query: { - before: data.before, - after: data.after, - with_error: data.withError - } -}); }; - -/** - * get log file by path - * @param data The data for the request. - * @param data.path - * @returns string log stream - * @throws ApiError - */ -export const getLogFile = (data: GetLogFileData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/service_logs/get_log_file/{path}', - path: { - path: data.path - } -}); }; - -/** - * List all concurrency groups - * @returns ConcurrencyGroup all concurrency groups - * @throws ApiError - */ -export const listConcurrencyGroups = (): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/list' -}); }; - -/** - * Delete concurrency group - * @param data The data for the request. - * @param data.concurrencyId - * @returns unknown concurrency group removed - * @throws ApiError - */ -export const deleteConcurrencyGroup = (data: DeleteConcurrencyGroupData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/concurrency_groups/prune/{concurrency_id}', - path: { - concurrency_id: data.concurrencyId - } -}); }; - -/** - * Get the concurrency key for a job that has concurrency limits enabled - * @param data The data for the request. - * @param data.id - * @returns string concurrency key for given job - * @throws ApiError - */ -export const getConcurrencyKey = (data: GetConcurrencyKeyData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/concurrency_groups/{id}/key', - path: { - id: data.id - } -}); }; - -/** - * Get intervals of job runtime concurrency - * @param data The data for the request. - * @param data.workspace - * @param data.concurrencyKey - * @param data.rowLimit - * @param data.createdBy mask to filter exact matching user creator - * @param data.label mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - * @param data.parentJob The parent job that is at the origin and responsible for the execution of this script if any - * @param data.scriptPathExact mask to filter exact matching path - * @param data.scriptPathStart mask to filter matching starting path - * @param data.schedulePath mask to filter by schedule path - * @param data.scriptHash mask to filter exact matching path - * @param data.startedBefore filter on started before (inclusive) timestamp - * @param data.startedAfter filter on started after (exclusive) timestamp - * @param data.createdOrStartedBefore filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - * @param data.running filter on running jobs - * @param data.scheduledForBeforeNow filter on jobs scheduled_for before now (hence waitinf for a worker) - * @param data.createdOrStartedAfter filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - * @param data.createdOrStartedAfterCompletedJobs filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - * @param data.jobKinds filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - * @param data.args filter on jobs containing those args as a json subset (@> in postgres) - * @param data.tag filter on jobs with a given tag/worker group - * @param data.result filter on jobs containing those result as a json subset (@> in postgres) - * @param data.allowWildcards allow wildcards (*) in the filter of label, tag, worker - * @param data.page which page to return (start at 1, default 1) - * @param data.perPage number of items to return for a given page (default 30, max 100) - * @param data.isSkipped is the job skipped - * @param data.isFlowStep is the job a flow step - * @param data.hasNullParent has null parent - * @param data.success filter on successful jobs - * @param data.allWorkspaces get jobs from all workspaces (only valid if request come from the `admins` workspace) - * @param data.isNotSchedule is not a scheduled job - * @returns ExtendedJobs time - * @throws ApiError - */ -export const listExtendedJobs = (data: ListExtendedJobsData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/w/{workspace}/concurrency_groups/list_jobs', - path: { - workspace: data.workspace - }, - query: { - concurrency_key: data.concurrencyKey, - row_limit: data.rowLimit, - created_by: data.createdBy, - label: data.label, - parent_job: data.parentJob, - script_path_exact: data.scriptPathExact, - script_path_start: data.scriptPathStart, - schedule_path: data.schedulePath, - script_hash: data.scriptHash, - started_before: data.startedBefore, - started_after: data.startedAfter, - created_or_started_before: data.createdOrStartedBefore, - running: data.running, - scheduled_for_before_now: data.scheduledForBeforeNow, - created_or_started_after: data.createdOrStartedAfter, - created_or_started_after_completed_jobs: data.createdOrStartedAfterCompletedJobs, - job_kinds: data.jobKinds, - args: data.args, - tag: data.tag, - result: data.result, - allow_wildcards: data.allowWildcards, - page: data.page, - per_page: data.perPage, - is_skipped: data.isSkipped, - is_flow_step: data.isFlowStep, - has_null_parent: data.hasNullParent, - success: data.success, - all_workspaces: data.allWorkspaces, - is_not_schedule: data.isNotSchedule - } -}); }; - -/** - * Search through jobs with a string query - * @param data The data for the request. - * @param data.workspace - * @param data.searchQuery - * @returns unknown search results - * @throws ApiError - */ -export const searchJobsIndex = (data: SearchJobsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/w/{workspace}/index/search/job', - path: { - workspace: data.workspace - }, - query: { - search_query: data.searchQuery - } -}); }; - -/** - * Search through service logs with a string query - * @param data The data for the request. - * @param data.searchQuery - * @param data.mode - * @param data.hostname - * @param data.workerGroup - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ -export const searchLogsIndex = (data: SearchLogsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/service_logs', - query: { - search_query: data.searchQuery, - mode: data.mode, - worker_group: data.workerGroup, - hostname: data.hostname, - min_ts: data.minTs, - max_ts: data.maxTs - } -}); }; - -/** - * Search and count the log line hits on every provided host - * @param data The data for the request. - * @param data.searchQuery - * @param data.minTs - * @param data.maxTs - * @returns unknown search results - * @throws ApiError - */ -export const countSearchLogsIndex = (data: CountSearchLogsIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'GET', - url: '/srch/index/search/count_service_logs', - query: { - search_query: data.searchQuery, - min_ts: data.minTs, - max_ts: data.maxTs - } -}); }; - -/** - * Restart container and delete the index to recreate it. - * @param data The data for the request. - * @param data.idxName - * @returns string idx to be deleted and container restarting - * @throws ApiError - */ -export const clearIndex = (data: ClearIndexData): CancelablePromise => { return __request(OpenAPI, { - method: 'DELETE', - url: '/srch/index/delete/{idx_name}', - path: { - idx_name: data.idxName - } -}); }; \ No newline at end of file diff --git a/cli/gen/types.gen.ts b/cli/gen/types.gen.ts deleted file mode 100644 index a7924d0b90..0000000000 --- a/cli/gen/types.gen.ts +++ /dev/null @@ -1,7828 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -export type AIProvider = 'openai' | 'azure_openai' | 'anthropic' | 'mistral' | 'deepseek' | 'googleai' | 'groq' | 'openrouter' | 'togetherai' | 'customai'; - -export type AIProviderModel = { - model: string; - provider: AIProvider; -}; - -export type AIProviderConfig = { - resource_path: string; - models: Array<(string)>; -}; - -export type AIConfig = { - providers?: { - [key: string]: AIProviderConfig; - }; - default_model?: AIProviderModel; - code_completion_model?: AIProviderModel; -}; - -export type Script = { - workspace_id?: string; - hash: string; - path: string; - /** - * The first element is the direct parent of the script, the second is the parent of the first, etc - * - */ - parent_hashes?: Array<(string)>; - summary: string; - description: string; - content: string; - created_by: string; - created_at: string; - archived: boolean; - schema?: { - [key: string]: unknown; - }; - deleted: boolean; - is_template: boolean; - extra_perms: { - [key: string]: (boolean); - }; - lock?: string; - lock_error_logs?: string; - language: ScriptLang; - kind: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - starred: boolean; - tag?: string; - has_draft?: boolean; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - concurrency_key?: string; - cache_ttl?: number; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - visible_to_runner_only?: boolean; - no_main_func: boolean; - codebase?: string; - has_preprocessor: boolean; - on_behalf_of_email?: string; -}; - -export type kind = 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - -export type NewScript = { - path: string; - parent_hash?: string; - summary: string; - description: string; - content: string; - schema?: { - [key: string]: unknown; - }; - is_template?: boolean; - lock?: string; - language: ScriptLang; - kind?: 'script' | 'failure' | 'trigger' | 'command' | 'approval' | 'preprocessor'; - tag?: string; - draft_only?: boolean; - envs?: Array<(string)>; - concurrent_limit?: number; - concurrency_time_window_s?: number; - cache_ttl?: number; - dedicated_worker?: boolean; - ws_error_handler_muted?: boolean; - priority?: number; - restart_unless_cancelled?: boolean; - timeout?: number; - delete_after_use?: boolean; - deployment_message?: string; - concurrency_key?: string; - visible_to_runner_only?: boolean; - no_main_func?: boolean; - codebase?: string; - has_preprocessor?: boolean; - on_behalf_of_email?: string; -}; - -export type NewScriptWithDraft = NewScript & { - draft?: NewScript; - hash: string; -}; - -export type ScriptHistory = { - script_hash: string; - deployment_msg?: string; -}; - -export type ScriptArgs = { - [key: string]: unknown; -}; - -export type Input = { - id: string; - name: string; - created_by: string; - created_at: string; - is_public: boolean; - success?: boolean; -}; - -export type CreateInput = { - name: string; - args: { - [key: string]: unknown; - }; -}; - -export type UpdateInput = { - id: string; - name: string; - is_public: boolean; -}; - -export type RunnableType = 'ScriptHash' | 'ScriptPath' | 'FlowPath'; - -export type QueuedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by?: string; - created_at?: string; - started_at?: string; - scheduled_for?: string; - running: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - logs?: string; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - last_ping?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - suspend?: number; - preprocessed?: boolean; - worker?: string; -}; - -export type job_kind = 'script' | 'preview' | 'dependencies' | 'flowdependencies' | 'appdependencies' | 'flow' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - -export type CompletedJob = { - workspace_id?: string; - id: string; - parent_job?: string; - created_by: string; - created_at: string; - started_at: string; - duration_ms: number; - success: boolean; - script_path?: string; - script_hash?: string; - args?: ScriptArgs; - result?: unknown; - logs?: string; - deleted?: boolean; - raw_code?: string; - canceled: boolean; - canceled_by?: string; - canceled_reason?: string; - job_kind: 'script' | 'preview' | 'dependencies' | 'flow' | 'flowdependencies' | 'appdependencies' | 'flowpreview' | 'script_hub' | 'identity' | 'deploymentcallback' | 'singlescriptflow' | 'flowscript' | 'flownode' | 'appscript'; - schedule_path?: string; - /** - * The user (u/userfoo) or group (g/groupfoo) whom - * the execution of this script will be permissioned_as and by extension its DT_TOKEN. - * - */ - permissioned_as: string; - flow_status?: FlowStatus; - raw_flow?: FlowValue; - is_flow_step: boolean; - language?: ScriptLang; - is_skipped: boolean; - email: string; - visible_to_owner: boolean; - mem_peak?: number; - tag: string; - priority?: number; - labels?: Array<(string)>; - self_wait_time_ms?: number; - aggregate_wait_time_ms?: number; - preprocessed?: boolean; - worker?: string; -}; - -export type ObscuredJob = { - typ?: string; - started_at?: string; - duration_ms?: number; -}; - -export type Job = (CompletedJob & { - type?: 'CompletedJob'; -}) | (QueuedJob & { - type?: 'QueuedJob'; -}); - -export type type = 'CompletedJob'; - -export type User = { - email: string; - username: string; - is_admin: boolean; - name?: string; - is_super_admin: boolean; - created_at: string; - operator: boolean; - disabled: boolean; - groups?: Array<(string)>; - folders: Array<(string)>; - folders_owners: Array<(string)>; -}; - -export type UserUsage = { - email?: string; - executions?: number; -}; - -export type Login = { - email: string; - password: string; -}; - -export type EditWorkspaceUser = { - is_admin?: boolean; - operator?: boolean; - disabled?: boolean; -}; - -export type TruncatedToken = { - label?: string; - expiration?: string; - token_prefix: string; - created_at: string; - last_used_at: string; - scopes?: Array<(string)>; - email?: string; -}; - -export type NewToken = { - label?: string; - expiration?: string; - scopes?: Array<(string)>; - workspace_id?: string; -}; - -export type NewTokenImpersonate = { - label?: string; - expiration?: string; - impersonate_email: string; - workspace_id?: string; -}; - -export type ListableVariable = { - workspace_id: string; - path: string; - value?: string; - is_secret: boolean; - description?: string; - account?: number; - is_oauth?: boolean; - extra_perms: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked?: boolean; - is_refreshed?: boolean; - expires_at?: string; -}; - -export type ContextualVariable = { - name: string; - value: string; - description: string; - is_custom: boolean; -}; - -export type CreateVariable = { - path: string; - value: string; - is_secret: boolean; - description: string; - account?: number; - is_oauth?: boolean; - expires_at?: string; -}; - -export type EditVariable = { - path?: string; - value?: string; - is_secret?: boolean; - description?: string; -}; - -export type AuditLog = { - id: number; - timestamp: string; - username: string; - operation: 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'variables.decrypt_secret' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; - action_kind: 'Created' | 'Updated' | 'Delete' | 'Execute'; - resource?: string; - parameters?: { - [key: string]: unknown; - }; -}; - -export type operation = 'jobs.run' | 'jobs.run.script' | 'jobs.run.preview' | 'jobs.run.flow' | 'jobs.run.flow_preview' | 'jobs.run.script_hub' | 'jobs.run.dependencies' | 'jobs.run.identity' | 'jobs.run.noop' | 'jobs.flow_dependencies' | 'jobs' | 'jobs.cancel' | 'jobs.force_cancel' | 'jobs.disapproval' | 'jobs.delete' | 'account.delete' | 'ai.request' | 'resources.create' | 'resources.update' | 'resources.delete' | 'resource_types.create' | 'resource_types.update' | 'resource_types.delete' | 'schedule.create' | 'schedule.setenabled' | 'schedule.edit' | 'schedule.delete' | 'scripts.create' | 'scripts.update' | 'scripts.archive' | 'scripts.delete' | 'users.create' | 'users.delete' | 'users.update' | 'users.login' | 'users.login_failure' | 'users.logout' | 'users.accept_invite' | 'users.decline_invite' | 'users.token.create' | 'users.token.delete' | 'users.add_to_workspace' | 'users.add_global' | 'users.setpassword' | 'users.impersonate' | 'users.leave_workspace' | 'oauth.login' | 'oauth.login_failure' | 'oauth.signup' | 'variables.create' | 'variables.delete' | 'variables.update' | 'flows.create' | 'flows.update' | 'flows.delete' | 'flows.archive' | 'apps.create' | 'apps.update' | 'apps.delete' | 'folder.create' | 'folder.update' | 'folder.delete' | 'folder.add_owner' | 'folder.remove_owner' | 'group.create' | 'group.delete' | 'group.edit' | 'group.adduser' | 'group.removeuser' | 'igroup.create' | 'igroup.delete' | 'igroup.adduser' | 'igroup.removeuser' | 'variables.decrypt_secret' | 'workspaces.edit_command_script' | 'workspaces.edit_deploy_to' | 'workspaces.edit_auto_invite_domain' | 'workspaces.edit_webhook' | 'workspaces.edit_copilot_config' | 'workspaces.edit_error_handler' | 'workspaces.create' | 'workspaces.update' | 'workspaces.archive' | 'workspaces.unarchive' | 'workspaces.delete'; - -export type action_kind = 'Created' | 'Updated' | 'Delete' | 'Execute'; - -export type MainArgSignature = { - type: 'Valid' | 'Invalid'; - error: string; - star_args: boolean; - star_kwargs?: boolean; - args: Array<{ - name: string; - typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - resource: (string) | null; -} | { - str: Array<(string)> | null; -} | { - object: Array<{ - key: string; - typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -}); - }>; -} | { - list: (('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | { - str: unknown; -}) | null); -}); - has_default?: boolean; - default?: unknown; - }>; - no_main_func: (boolean) | null; - has_preprocessor: (boolean) | null; -}; - -export type type2 = 'Valid' | 'Invalid'; - -export type ScriptLang = 'python3' | 'deno' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'bun' | 'php' | 'rust' | 'ansible' | 'csharp' | 'nu' | 'java'; - -export type Preview = { - content?: string; - path?: string; - args: ScriptArgs; - language?: ScriptLang; - tag?: string; - kind?: 'code' | 'identity' | 'http'; - dedicated_worker?: boolean; - lock?: string; -}; - -export type kind2 = 'code' | 'identity' | 'http'; - -export type WorkflowTask = { - args: ScriptArgs; -}; - -export type WorkflowStatusRecord = { - [key: string]: WorkflowStatus; -}; - -export type WorkflowStatus = { - scheduled_for?: string; - started_at?: string; - duration_ms?: number; - name?: string; -}; - -export type CreateResource = { - path: string; - value: unknown; - description?: string; - resource_type: string; -}; - -export type EditResource = { - path?: string; - description?: string; - value?: unknown; -}; - -export type Resource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - created_by?: string; - edited_at?: string; -}; - -export type ListableResource = { - workspace_id?: string; - path: string; - description?: string; - resource_type: string; - value?: unknown; - is_oauth: boolean; - extra_perms?: { - [key: string]: (boolean); - }; - is_expired?: boolean; - refresh_error?: string; - is_linked: boolean; - is_refreshed: boolean; - account?: number; - created_by?: string; - edited_at?: string; -}; - -export type ResourceType = { - workspace_id?: string; - name: string; - schema?: unknown; - description?: string; - created_by?: string; - edited_at?: string; - format_extension?: string; -}; - -export type EditResourceType = { - schema?: unknown; - description?: string; -}; - -export type Schedule = { - path: string; - edited_by: string; - edited_at: string; - schedule: string; - timezone: string; - enabled: boolean; - script_path: string; - is_flow: boolean; - args?: ScriptArgs; - extra_perms: { - [key: string]: (boolean); - }; - email: string; - error?: string; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - summary?: string; - description?: string; - no_flow_overlap?: boolean; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type ScheduleWJobs = Schedule & { - jobs?: Array<{ - id: string; - success: boolean; - duration_ms: number; - }>; -}; - -export type NewSchedule = { - path: string; - schedule: string; - timezone: string; - script_path: string; - is_flow: boolean; - args: ScriptArgs; - enabled?: boolean; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - no_flow_overlap?: boolean; - summary?: string; - description?: string; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type EditSchedule = { - schedule: string; - timezone: string; - args: ScriptArgs; - on_failure?: string; - on_failure_times?: number; - on_failure_exact?: boolean; - on_failure_extra_args?: ScriptArgs; - on_recovery?: string; - on_recovery_times?: number; - on_recovery_extra_args?: ScriptArgs; - on_success?: string; - on_success_extra_args?: ScriptArgs; - ws_error_handler_muted?: boolean; - retry?: Retry; - no_flow_overlap?: boolean; - summary?: string; - description?: string; - tag?: string; - paused_until?: string; - cron_version?: string; -}; - -export type TriggerExtraProperty = { - path: string; - script_path: string; - email: string; - extra_perms: { - [key: string]: (boolean); - }; - workspace_id: string; - edited_by: string; - edited_at: string; - is_flow: boolean; -}; - -export type AuthenticationMethod = 'none' | 'windmill' | 'api_key' | 'basic_http' | 'custom_script' | 'signature'; - -export type HttpTrigger = TriggerExtraProperty & { - route_path: string; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - authentication_resource_path?: string; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - workspaced_route: boolean; - wrap_body: boolean; - raw_string: boolean; -}; - -export type http_method = 'get' | 'post' | 'put' | 'delete' | 'patch'; - -export type NewHttpTrigger = { - path: string; - script_path: string; - route_path: string; - workspaced_route?: boolean; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - is_flow: boolean; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - authentication_resource_path?: string; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - wrap_body?: boolean; - raw_string?: boolean; -}; - -export type EditHttpTrigger = { - path: string; - script_path: string; - route_path?: string; - workspaced_route?: boolean; - static_asset_config?: { - s3: string; - storage?: string; - filename?: string; - }; - authentication_resource_path?: string; - is_flow: boolean; - http_method: 'get' | 'post' | 'put' | 'delete' | 'patch'; - is_async: boolean; - authentication_method: AuthenticationMethod; - is_static_website: boolean; - wrap_body?: boolean; - raw_string?: boolean; -}; - -export type TriggersCount = { - primary_schedule?: { - schedule?: string; - }; - schedule_count?: number; - http_routes_count?: number; - webhook_count?: number; - email_count?: number; - websocket_count?: number; - postgres_count?: number; - kafka_count?: number; - nats_count?: number; - mqtt_count?: number; - gcp_count?: number; - sqs_count?: number; -}; - -export type WebsocketTrigger = TriggerExtraProperty & { - url: string; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type NewWebsocketTrigger = { - path: string; - script_path: string; - is_flow: boolean; - url: string; - enabled?: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type EditWebsocketTrigger = { - url: string; - path: string; - script_path: string; - is_flow: boolean; - filters: Array<{ - key: string; - value: unknown; - }>; - initial_messages?: Array; - url_runnable_args?: ScriptArgs; - can_return_message: boolean; -}; - -export type WebsocketTriggerInitialMessage = { - raw_message: string; -} | { - runnable_result: { - path: string; - args: ScriptArgs; - is_flow: boolean; - }; -}; - -export type MqttQoS = 'qos0' | 'qos1' | 'qos2'; - -export type MqttV3Config = { - clean_session?: boolean; -}; - -export type MqttV5Config = { - clean_start?: boolean; - topic_alias?: number; - session_expiry_interval?: number; -}; - -export type MqttSubscribeTopic = { - qos: MqttQoS; - topic: string; -}; - -export type MqttClientVersion = 'v3' | 'v5'; - -export type MqttTrigger = TriggerExtraProperty & { - mqtt_resource_path: string; - subscribe_topics: Array; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_id?: string; - client_version?: MqttClientVersion; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewMqttTrigger = { - mqtt_resource_path: string; - subscribe_topics: Array; - client_id?: string; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_version?: MqttClientVersion; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditMqttTrigger = { - mqtt_resource_path: string; - subscribe_topics: Array; - client_id?: string; - v3_config?: MqttV3Config; - v5_config?: MqttV5Config; - client_version?: MqttClientVersion; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type DeliveryType = 'push' | 'pull'; - -export type PushConfig = { - audience?: string; - authenticate: boolean; - base_endpoint: string; -}; - -export type GcpTrigger = TriggerExtraProperty & { - gcp_resource_path: string; - topic_id: string; - subscription_id: string; - server_id?: string; - delivery_type: DeliveryType; - delivery_config?: PushConfig; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -/** - * The mode of subscription. 'existing' means using an existing GCP subscription, while 'create_update' involves creating or updating a new subscription. - */ -export type SubscriptionMode = 'existing' | 'create_update'; - -export type GcpExistingSubscription = { - subscription_id: string; - base_endpoint: string; -}; - -export type GcpCreateUpdateSubscription = { - subscription_id?: string; - delivery_type: DeliveryType; - delivery_config?: PushConfig; -}; - -/** - * "This is a union type representing the subscription mode. - * - 'existing': Represents an existing GCP subscription, and should be accompanied by an 'ExistingGcpSubscription' object. - * - 'create_update': Represents a new or updated GCP subscription, and should be accompanied by a 'CreateUpdateConfig' object." - * - */ -export type GcpSubscriptionModeConfig = (GcpExistingSubscription | GcpCreateUpdateSubscription) & { - subscription_mode: SubscriptionMode; -}; - -export type NewGcpTrigger = { - gcp_resource_path: string; - topic_id: string; - subscription_mode: GcpSubscriptionModeConfig; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditGcpTrigger = { - gcp_resource_path?: string; - topic_id: string; - subscription_mode: GcpSubscriptionModeConfig; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type GetAllTopicSubscription = { - topic_id: string; -}; - -export type DeleteGcpSubscription = { - subscription_id: string; -}; - -export type SqsTrigger = TriggerExtraProperty & { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewSqsTrigger = { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; - enabled?: boolean; -}; - -export type EditSqsTrigger = { - queue_url: string; - aws_resource_path: string; - message_attributes?: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; -}; - -export type Slot = { - name?: string; -}; - -export type SlotList = { - slot_name?: string; - active?: boolean; -}; - -export type PublicationData = { - table_to_track?: Array; - transaction_to_track: Array<(string)>; -}; - -export type TableToTrack = Array<{ - table_name: string; - columns_name?: Array<(string)>; - where_clause?: string; -}>; - -export type Relations = { - schema_name: string; - table_to_track: TableToTrack; -}; - -export type Language = 'Typescript'; - -export type TemplateScript = { - postgres_resource_path: string; - relations: Array; - language: Language; -}; - -export type PostgresTrigger = TriggerExtraProperty & { - enabled: boolean; - postgres_resource_path: string; - publication_name: string; - server_id?: string; - replication_slot_name: string; - error?: string; - last_server_ping?: string; -}; - -export type NewPostgresTrigger = { - replication_slot_name?: string; - publication_name?: string; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; - postgres_resource_path: string; - publication?: PublicationData; -}; - -export type EditPostgresTrigger = { - replication_slot_name: string; - publication_name: string; - path: string; - script_path: string; - is_flow: boolean; - enabled: boolean; - postgres_resource_path: string; - publication?: PublicationData; -}; - -export type KafkaTrigger = TriggerExtraProperty & { - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewKafkaTrigger = { - path: string; - script_path: string; - is_flow: boolean; - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - enabled?: boolean; -}; - -export type EditKafkaTrigger = { - kafka_resource_path: string; - group_id: string; - topics: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; -}; - -export type NatsTrigger = TriggerExtraProperty & { - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - server_id?: string; - last_server_ping?: string; - error?: string; - enabled: boolean; -}; - -export type NewNatsTrigger = { - path: string; - script_path: string; - is_flow: boolean; - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - enabled?: boolean; -}; - -export type EditNatsTrigger = { - nats_resource_path: string; - use_jetstream: boolean; - stream_name?: string; - consumer_name?: string; - subjects: Array<(string)>; - path: string; - script_path: string; - is_flow: boolean; -}; - -export type Group = { - name: string; - summary?: string; - members?: Array<(string)>; - extra_perms?: { - [key: string]: (boolean); - }; -}; - -export type InstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; -}; - -export type Folder = { - name: string; - owners: Array<(string)>; - extra_perms: { - [key: string]: (boolean); - }; - summary?: string; - created_by?: string; - edited_at?: string; -}; - -export type WorkerPing = { - worker: string; - worker_instance: string; - last_ping?: number; - started_at: string; - ip: string; - jobs_executed: number; - custom_tags?: Array<(string)>; - worker_group: string; - wm_version: string; - last_job_id?: string; - last_job_workspace_id?: string; - occupancy_rate?: number; - occupancy_rate_15s?: number; - occupancy_rate_5m?: number; - occupancy_rate_30m?: number; - memory?: number; - vcpus?: number; - memory_usage?: number; - wm_memory_usage?: number; -}; - -export type UserWorkspaceList = { - email: string; - workspaces: Array<{ - id: string; - name: string; - username: string; - color: string; - operator_settings?: OperatorSettings; - }>; -}; - -export type CreateWorkspace = { - id: string; - name: string; - username?: string; - color?: string; -}; - -export type Workspace = { - id: string; - name: string; - owner: string; - domain?: string; - color?: string; -}; - -export type WorkspaceInvite = { - workspace_id: string; - email: string; - is_admin: boolean; - operator: boolean; -}; - -export type GlobalUserInfo = { - email: string; - login_type: 'password' | 'github'; - super_admin: boolean; - devops?: boolean; - verified: boolean; - name?: string; - company?: string; - username?: string; - operator_only?: boolean; -}; - -export type login_type = 'password' | 'github'; - -export type Flow = OpenFlow & FlowMetadata & { - lock_error_logs?: string; -}; - -export type ExtraPerms = { - [key: string]: (boolean); -}; - -export type FlowMetadata = { - workspace_id?: string; - path: string; - edited_by: string; - edited_at: string; - archived: boolean; - extra_perms: ExtraPerms; - starred?: boolean; - draft_only?: boolean; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; -}; - -export type OpenFlowWPath = OpenFlow & { - path: string; - tag?: string; - ws_error_handler_muted?: boolean; - priority?: number; - dedicated_worker?: boolean; - timeout?: number; - visible_to_runner_only?: boolean; - on_behalf_of_email?: string; -}; - -export type FlowPreview = { - value: FlowValue; - path?: string; - args: ScriptArgs; - tag?: string; - restarted_from?: RestartedFrom; -}; - -export type RestartedFrom = { - flow_job_id?: string; - step_id?: string; - branch_or_iteration_n?: number; -}; - -export type Policy = { - triggerables?: { - [key: string]: { - [key: string]: unknown; - }; - }; - triggerables_v2?: { - [key: string]: { - [key: string]: unknown; - }; - }; - s3_inputs?: Array<{ - [key: string]: unknown; - }>; - allowed_s3_keys?: Array<{ - s3_path?: string; - resource?: string; - }>; - execution_mode?: 'viewer' | 'publisher' | 'anonymous'; - on_behalf_of?: string; - on_behalf_of_email?: string; -}; - -export type execution_mode = 'viewer' | 'publisher' | 'anonymous'; - -export type ListableApp = { - id: number; - workspace_id: string; - path: string; - summary: string; - version: number; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - edited_at: string; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; -}; - -export type ListableRawApp = { - workspace_id: string; - path: string; - summary: string; - extra_perms: { - [key: string]: (boolean); - }; - starred?: boolean; - version: number; - edited_at: string; -}; - -export type AppWithLastVersion = { - id: number; - workspace_id: string; - path: string; - summary: string; - versions: Array<(number)>; - created_by: string; - created_at: string; - value: { - [key: string]: unknown; - }; - policy: Policy; - execution_mode: 'viewer' | 'publisher' | 'anonymous'; - extra_perms: { - [key: string]: (boolean); - }; - custom_path?: string; -}; - -export type AppWithLastVersionWDraft = AppWithLastVersion & { - draft_only?: boolean; - draft?: unknown; -}; - -export type AppHistory = { - version: number; - deployment_msg?: string; -}; - -export type FlowVersion = { - id: number; - created_at: string; - deployment_msg?: string; -}; - -export type SlackToken = { - access_token: string; - team_id: string; - team_name: string; - bot: { - bot_access_token?: string; - }; -}; - -export type TokenResponse = { - access_token: string; - expires_in?: number; - refresh_token?: string; - scope?: Array<(string)>; -}; - -export type HubScriptKind = unknown; - -export type PolarsClientKwargs = { - region_name: string; -}; - -export type LargeFileStorage = { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - public_resource?: boolean; - secondary_storage?: { - [key: string]: { - type?: 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - s3_resource_path?: string; - azure_blob_resource_path?: string; - public_resource?: boolean; - }; - }; -}; - -export type type3 = 'S3Storage' | 'AzureBlobStorage' | 'AzureWorkloadIdentity' | 'S3AwsOidc'; - -export type WindmillLargeFile = { - s3: string; -}; - -export type WindmillFileMetadata = { - mime_type?: string; - size_in_bytes?: number; - last_modified?: string; - expires?: string; - version_id?: string; -}; - -export type WindmillFilePreview = { - msg?: string; - content?: string; - content_type: 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; -}; - -export type content_type = 'RawText' | 'Csv' | 'Parquet' | 'Unknown'; - -export type S3Resource = { - bucket: string; - region: string; - endPoint: string; - useSSL: boolean; - accessKey?: string; - secretKey?: string; - pathStyle: boolean; -}; - -export type WorkspaceGitSyncSettings = { - include_path?: Array<(string)>; - include_type?: Array<('script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group')>; - repositories?: Array; -}; - -export type WorkspaceDeployUISettings = { - include_path?: Array<(string)>; - include_type?: Array<('script' | 'flow' | 'app' | 'resource' | 'variable' | 'secret' | 'trigger')>; -}; - -export type WorkspaceDefaultScripts = { - order?: Array<(string)>; - hidden?: Array<(string)>; - default_script_content?: { - [key: string]: (string); - }; -}; - -export type GitRepositorySettings = { - script_path: string; - git_repo_resource_path: string; - use_individual_branch?: boolean; - group_by_folder?: boolean; - exclude_types_override?: Array<('script' | 'flow' | 'app' | 'folder' | 'resource' | 'variable' | 'secret' | 'resourcetype' | 'schedule' | 'user' | 'group')>; -}; - -export type UploadFilePart = { - part_number: number; - tag: string; -}; - -export type MetricMetadata = { - id: string; - name?: string; -}; - -export type ScalarMetric = { - metric_id?: string; - value: number; -}; - -export type TimeseriesMetric = { - metric_id?: string; - values: Array; -}; - -export type MetricDataPoint = { - timestamp: string; - value: number; -}; - -export type RawScriptForDependencies = { - raw_code: string; - path: string; - language: ScriptLang; -}; - -export type ConcurrencyGroup = { - concurrency_key: string; - total_running: number; -}; - -export type ExtendedJobs = { - jobs: Array; - obscured_jobs: Array; - /** - * Obscured jobs omitted for security because of too specific filtering - */ - omitted_obscured_jobs?: boolean; -}; - -export type ExportedUser = { - email: string; - password_hash?: string; - super_admin: boolean; - verified: boolean; - name?: string; - company?: string; - first_time_user: boolean; - username?: string; -}; - -export type GlobalSetting = { - name: string; - value: { - [key: string]: unknown; - }; -}; - -export type Config = { - name: string; - config?: { - [key: string]: unknown; - }; -}; - -export type ExportedInstanceGroup = { - name: string; - summary?: string; - emails?: Array<(string)>; - id?: string; - scim_display_name?: string; - external_id?: string; -}; - -export type JobSearchHit = { - dancer?: string; -}; - -export type LogSearchHit = { - dancer?: string; -}; - -export type AutoscalingEvent = { - id?: number; - worker_group?: string; - event_type?: string; - desired_workers?: number; - reason?: string; - applied_at?: string; -}; - -export type CriticalAlert = { - /** - * Unique identifier for the alert - */ - id?: number; - /** - * Type of alert (e.g., critical_error) - */ - alert_type?: string; - /** - * The message content of the alert - */ - message?: string; - /** - * Time when the alert was created - */ - created_at?: string; - /** - * Acknowledgment status of the alert, can be true, false, or null if not set - */ - acknowledged?: (boolean) | null; - /** - * Workspace id if the alert is in the scope of a workspace - */ - workspace_id?: (string) | null; -}; - -export type CaptureTriggerKind = 'webhook' | 'http' | 'websocket' | 'kafka' | 'email' | 'nats' | 'postgres' | 'sqs' | 'mqtt' | 'gcp'; - -export type Capture = { - trigger_kind: CaptureTriggerKind; - payload: unknown; - trigger_extra?: unknown; - id: number; - created_at: string; -}; - -export type CaptureConfig = { - trigger_config?: unknown; - trigger_kind: CaptureTriggerKind; - error?: string; - last_server_ping?: string; -}; - -export type OperatorSettings = { - /** - * Whether operators can view runs - */ - runs: boolean; - /** - * Whether operators can view schedules - */ - schedules: boolean; - /** - * Whether operators can view resources - */ - resources: boolean; - /** - * Whether operators can view variables - */ - variables: boolean; - /** - * Whether operators can view audit logs - */ - audit_logs: boolean; - /** - * Whether operators can view triggers - */ - triggers: boolean; - /** - * Whether operators can view groups page - */ - groups: boolean; - /** - * Whether operators can view folders page - */ - folders: boolean; - /** - * Whether operators can view workers page - */ - workers: boolean; -} | null; - -export type TeamInfo = { - /** - * The unique identifier of the Microsoft Teams team - */ - team_id: string; - /** - * The display name of the Microsoft Teams team - */ - team_name: string; - /** - * List of channels within the team - */ - channels: Array; -}; - -export type ChannelInfo = { - /** - * The unique identifier of the channel - */ - channel_id: string; - /** - * The display name of the channel - */ - channel_name: string; - /** - * The Microsoft Teams tenant identifier - */ - tenant_id: string; - /** - * The service URL for the channel - */ - service_url: string; -}; - -export type GithubInstallations = Array<{ - workspace_id?: string; - installation_id: number; - account_id: string; - repositories: Array<{ - name: string; - url: string; - }>; -}>; - -export type WorkspaceGithubInstallation = { - account_id: string; - installation_id: number; -}; - -export type OpenFlow = { - summary: string; - description?: string; - value: FlowValue; - schema?: { - [key: string]: unknown; - }; -}; - -export type FlowValue = { - modules: Array; - failure_module?: FlowModule; - preprocessor_module?: FlowModule; - same_worker?: boolean; - concurrent_limit?: number; - concurrency_key?: string; - concurrency_time_window_s?: number; - skip_expr?: string; - cache_ttl?: number; - priority?: number; - early_return?: string; -}; - -export type Retry = { - constant?: { - attempts?: number; - seconds?: number; - }; - exponential?: { - attempts?: number; - multiplier?: number; - seconds?: number; - random_factor?: number; - }; -}; - -export type FlowModule = { - id: string; - value: FlowModuleValue; - stop_after_if?: { - skip_if_stopped?: boolean; - expr: string; - }; - stop_after_all_iters_if?: { - skip_if_stopped?: boolean; - expr: string; - }; - skip_if?: { - expr: string; - }; - sleep?: InputTransform; - cache_ttl?: number; - timeout?: number; - delete_after_use?: boolean; - summary?: string; - mock?: { - enabled?: boolean; - return_value?: unknown; - }; - suspend?: { - required_events?: number; - timeout?: number; - resume_form?: { - schema?: { - [key: string]: unknown; - }; - }; - user_auth_required?: boolean; - user_groups_required?: InputTransform; - self_approval_disabled?: boolean; - hide_cancel?: boolean; - continue_on_disapprove_timeout?: boolean; - }; - priority?: number; - continue_on_error?: boolean; - retry?: Retry; -}; - -export type InputTransform = StaticTransform | JavascriptTransform; - -export type StaticTransform = { - value?: unknown; - type: 'static'; -}; - -export type JavascriptTransform = { - expr: string; - type: 'javascript'; -}; - -export type FlowModuleValue = RawScript | PathScript | PathFlow | ForloopFlow | WhileloopFlow | BranchOne | BranchAll | Identity; - -export type RawScript = { - input_transforms: { - [key: string]: InputTransform; - }; - content: string; - language: 'deno' | 'bun' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php'; - path?: string; - lock?: string; - type: 'rawscript'; - tag?: string; - concurrent_limit?: number; - concurrency_time_window_s?: number; - custom_concurrency_key?: string; - is_trigger?: boolean; -}; - -export type language = 'deno' | 'bun' | 'python3' | 'go' | 'bash' | 'powershell' | 'postgresql' | 'mysql' | 'bigquery' | 'snowflake' | 'mssql' | 'oracledb' | 'graphql' | 'nativets' | 'php'; - -export type PathScript = { - input_transforms: { - [key: string]: InputTransform; - }; - path: string; - hash?: string; - type: 'script'; - tag_override?: string; - is_trigger?: boolean; -}; - -export type PathFlow = { - input_transforms: { - [key: string]: InputTransform; - }; - path: string; - type: 'flow'; -}; - -export type ForloopFlow = { - modules: Array; - iterator: InputTransform; - skip_failures: boolean; - type: 'forloopflow'; - parallel?: boolean; - parallelism?: number; -}; - -export type WhileloopFlow = { - modules: Array; - skip_failures: boolean; - type: 'whileloopflow'; - parallel?: boolean; - parallelism?: number; -}; - -export type BranchOne = { - branches: Array<{ - summary?: string; - expr: string; - modules: Array; - }>; - default: Array; - type: 'branchone'; -}; - -export type BranchAll = { - branches: Array<{ - summary?: string; - skip_failure?: boolean; - modules: Array; - }>; - type: 'branchall'; - parallel?: boolean; -}; - -export type Identity = { - type: 'identity'; - flow?: boolean; -}; - -export type FlowStatus = { - step: number; - modules: Array; - user_states?: { - [key: string]: unknown; - }; - preprocessor_module?: (FlowStatusModule); - failure_module: (FlowStatusModule & { - parent_module?: string; -}); - retry?: { - fail_count?: number; - failed_jobs?: Array<(string)>; - }; -}; - -export type FlowStatusModule = { - type: 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; - id?: string; - job?: string; - count?: number; - progress?: number; - iterator?: { - index?: number; - itered?: Array; - args?: unknown; - }; - flow_jobs?: Array<(string)>; - flow_jobs_success?: Array<(boolean)>; - branch_chosen?: { - type: 'branch' | 'default'; - branch?: number; - }; - branchall?: { - branch: number; - len: number; - }; - approvers?: Array<{ - resume_id: number; - approver: string; - }>; - failed_retries?: Array<(string)>; - skipped?: boolean; -}; - -export type type4 = 'WaitingForPriorSteps' | 'WaitingForEvents' | 'WaitingForExecutor' | 'InProgress' | 'Success' | 'Failure'; - -export type ParameterId = string; - -export type ParameterKey = string; - -export type ParameterWorkspaceId = string; - -export type ParameterPublicationName = string; - -export type ParameterVersionId = number; - -export type ParameterToken = string; - -export type ParameterAccountId = number; - -export type ParameterClientName = string; - -export type ParameterScriptPath = string; - -export type ParameterScriptHash = string; - -export type ParameterJobId = string; - -export type ParameterPath = string; - -export type ParameterCustomPath = string; - -export type ParameterPathId = number; - -export type ParameterPathVersion = number; - -export type ParameterName = string; - -/** - * which page to return (start at 1, default 1) - */ -export type ParameterPage = number; - -/** - * number of items to return for a given page (default 30, max 100) - */ -export type ParameterPerPage = number; - -/** - * order by desc order (default true) - */ -export type ParameterOrderDesc = boolean; - -/** - * mask to filter exact matching user creator - */ -export type ParameterCreatedBy = string; - -/** - * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels') - */ -export type ParameterLabel = string; - -/** - * worker this job was ran on - */ -export type ParameterWorker = string; - -/** - * The parent job that is at the origin and responsible for the execution of this script if any - */ -export type ParameterParentJob = string; - -/** - * Override the tag to use - */ -export type ParameterWorkerTag = string; - -/** - * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl - */ -export type ParameterCacheTtl = string; - -/** - * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request) - */ -export type ParameterNewJobId = string; - -/** - * List of headers's keys (separated with ',') whove value are added to the args - * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key - * - */ -export type ParameterIncludeHeader = string; - -/** - * The maximum size of the queue for which the request would get rejected if that job would push it above that limit - * - */ -export type ParameterQueueLimit = string; - -/** - * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent - * `encodeURIComponent(btoa(JSON.stringify({a: 2})))` - * - */ -export type ParameterPayload = string; - -/** - * mask to filter matching starting path - */ -export type ParameterScriptStartPath = string; - -/** - * mask to filter by schedule path - */ -export type ParameterSchedulePath = string; - -/** - * mask to filter exact matching path - */ -export type ParameterScriptExactPath = string; - -/** - * mask to filter exact matching path - */ -export type ParameterScriptExactHash = string; - -/** - * filter on created before (inclusive) timestamp - */ -export type ParameterCreatedBefore = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterCreatedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterStartedBefore = string; - -/** - * filter on started after (exclusive) timestamp - */ -export type ParameterStartedAfter = string; - -/** - * filter on started before (inclusive) timestamp - */ -export type ParameterBefore = string; - -/** - * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp - */ -export type ParameterCreatedOrStartedAfter = string; - -/** - * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs - */ -export type ParameterCreatedOrStartedAfterCompletedJob = string; - -/** - * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp - */ -export type ParameterCreatedOrStartedBefore = string; - -/** - * filter on successful jobs - */ -export type ParameterSuccess = boolean; - -/** - * filter on jobs scheduled_for before now (hence waitinf for a worker) - */ -export type ParameterScheduledForBeforeNow = boolean; - -/** - * filter on suspended jobs - */ -export type ParameterSuspended = boolean; - -/** - * filter on running jobs - */ -export type ParameterRunning = boolean; - -/** - * allow wildcards (*) in the filter of label, tag, worker - */ -export type ParameterAllowWildcards = boolean; - -/** - * filter on jobs containing those args as a json subset (@> in postgres) - */ -export type ParameterArgsFilter = string; - -/** - * filter on jobs with a given tag/worker group - */ -export type ParameterTag = string; - -/** - * filter on jobs containing those result as a json subset (@> in postgres) - */ -export type ParameterResultFilter = string; - -/** - * filter on created after (exclusive) timestamp - */ -export type ParameterAfter = string; - -/** - * filter on exact username of user - */ -export type ParameterUsername = string; - -/** - * filter on exact or prefix name of operation - */ -export type ParameterOperation = string; - -/** - * filter on exact or prefix name of resource - */ -export type ParameterResourceName = string; - -/** - * filter on type of operation - */ -export type ParameterActionKind = 'Create' | 'Update' | 'Delete' | 'Execute'; - -/** - * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by, - */ -export type ParameterJobKinds = string; - -export type ParameterRunnableId = string; - -export type ParameterRunnableTypeQuery = RunnableType; - -export type ParameterInputId = string; - -export type ParameterGetStarted = boolean; - -export type ParameterConcurrencyId = string; - -export type ParameterRunnableKind = 'script' | 'flow'; - -export type BackendVersionResponse = (string); - -export type BackendUptodateResponse = (string); - -export type GetLicenseIdResponse = (string); - -export type GetOpenApiYamlResponse = (string); - -export type GetAuditLogData = { - id: number; - workspace: string; -}; - -export type GetAuditLogResponse = (AuditLog); - -export type ListAuditLogsData = { - /** - * filter on type of operation - */ - actionKind?: 'Create' | 'Update' | 'Delete' | 'Execute'; - /** - * filter on created after (exclusive) timestamp - */ - after?: string; - /** - * get audit logs for all workspaces - */ - allWorkspaces?: boolean; - /** - * filter on started before (inclusive) timestamp - */ - before?: string; - /** - * comma separated list of operations to exclude - */ - excludeOperations?: string; - /** - * filter on exact or prefix name of operation - */ - operation?: string; - /** - * comma separated list of exact operations to include - */ - operations?: string; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * filter on exact or prefix name of resource - */ - resource?: string; - /** - * filter on exact username of user - */ - username?: string; - workspace: string; -}; - -export type ListAuditLogsResponse = (Array); - -export type LoginData = { - /** - * credentials - */ - requestBody: Login; -}; - -export type LoginResponse = (string); - -export type LogoutResponse = (string); - -export type GetUserData = { - username: string; - workspace: string; -}; - -export type GetUserResponse = (User); - -export type UpdateUserData = { - /** - * new user - */ - requestBody: EditWorkspaceUser; - username: string; - workspace: string; -}; - -export type UpdateUserResponse = (string); - -export type IsOwnerOfPathData = { - path: string; - workspace: string; -}; - -export type IsOwnerOfPathResponse = (boolean); - -export type SetPasswordData = { - /** - * set password - */ - requestBody: { - password: string; - }; -}; - -export type SetPasswordResponse = (string); - -export type SetPasswordForUserData = { - /** - * set password - */ - requestBody: { - password: string; - }; - user: string; -}; - -export type SetPasswordForUserResponse = (string); - -export type SetLoginTypeForUserData = { - /** - * set login type - */ - requestBody: { - login_type: string; - }; - user: string; -}; - -export type SetLoginTypeForUserResponse = (string); - -export type CreateUserGloballyData = { - /** - * user info - */ - requestBody: { - email: string; - password: string; - super_admin: boolean; - name?: string; - company?: string; - }; -}; - -export type CreateUserGloballyResponse = (string); - -export type GlobalUserUpdateData = { - email: string; - /** - * new user info - */ - requestBody: { - is_super_admin?: boolean; - is_devops?: boolean; - name?: string; - }; -}; - -export type GlobalUserUpdateResponse = (string); - -export type GlobalUsernameInfoData = { - email: string; -}; - -export type GlobalUsernameInfoResponse = ({ - username: string; - workspace_usernames: Array<{ - workspace_id: string; - username: string; - }>; -}); - -export type GlobalUserRenameData = { - email: string; - /** - * new username - */ - requestBody: { - new_username: string; - }; -}; - -export type GlobalUserRenameResponse = (string); - -export type GlobalUserDeleteData = { - email: string; -}; - -export type GlobalUserDeleteResponse = (string); - -export type GlobalUsersOverwriteData = { - /** - * List of users - */ - requestBody: Array; -}; - -export type GlobalUsersOverwriteResponse = (string); - -export type GlobalUsersExportResponse = (Array); - -export type DeleteUserData = { - username: string; - workspace: string; -}; - -export type DeleteUserResponse = (string); - -export type GetGlobalConnectedRepositoriesResponse = (GithubInstallations); - -export type ListWorkspacesResponse = (Array); - -export type IsDomainAllowedResponse = (boolean); - -export type ListUserWorkspacesResponse = (UserWorkspaceList); - -export type ListWorkspacesAsSuperAdminData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListWorkspacesAsSuperAdminResponse = (Array); - -export type CreateWorkspaceData = { - /** - * new token - */ - requestBody: CreateWorkspace; -}; - -export type CreateWorkspaceResponse = (string); - -export type ExistsWorkspaceData = { - /** - * id of workspace - */ - requestBody: { - id: string; - }; -}; - -export type ExistsWorkspaceResponse = (boolean); - -export type ExistsUsernameData = { - requestBody: { - id: string; - username: string; - }; -}; - -export type ExistsUsernameResponse = (boolean); - -export type GetGlobalData = { - key: string; -}; - -export type GetGlobalResponse = (unknown); - -export type SetGlobalData = { - key: string; - /** - * value set - */ - requestBody: { - value?: unknown; - }; -}; - -export type SetGlobalResponse = (string); - -export type GetLocalResponse = (unknown); - -export type TestSmtpData = { - /** - * test smtp payload - */ - requestBody: { - to: string; - smtp: { - host: string; - username: string; - password: string; - port: number; - from: string; - tls_implicit: boolean; - disable_tls: boolean; - }; - }; -}; - -export type TestSmtpResponse = (string); - -export type TestCriticalChannelsData = { - /** - * test critical channel payload - */ - requestBody: Array<{ - email?: string; - slack_channel?: string; - }>; -}; - -export type TestCriticalChannelsResponse = (string); - -export type GetCriticalAlertsData = { - acknowledged?: (boolean) | null; - page?: number; - pageSize?: number; -}; - -export type GetCriticalAlertsResponse = ({ - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}); - -export type AcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; -}; - -export type AcknowledgeCriticalAlertResponse = (string); - -export type AcknowledgeAllCriticalAlertsResponse = (string); - -export type TestLicenseKeyData = { - /** - * test license key - */ - requestBody: { - license_key: string; - }; -}; - -export type TestLicenseKeyResponse = (string); - -export type TestObjectStorageConfigData = { - /** - * test object storage config - */ - requestBody: { - [key: string]: unknown; - }; -}; - -export type TestObjectStorageConfigResponse = (string); - -export type SendStatsResponse = (string); - -export type GetLatestKeyRenewalAttemptResponse = ({ - result: string; - attempted_at: string; -} | null); - -export type RenewLicenseKeyData = { - licenseKey?: string; -}; - -export type RenewLicenseKeyResponse = (string); - -export type CreateCustomerPortalSessionData = { - licenseKey?: string; -}; - -export type CreateCustomerPortalSessionResponse = (string); - -export type TestMetadataData = { - /** - * test metadata - */ - requestBody: string; -}; - -export type TestMetadataResponse = (string); - -export type ListGlobalSettingsResponse = (Array); - -export type GetCurrentEmailResponse = (string); - -export type RefreshUserTokenData = { - ifExpiringInLessThanS?: number; -}; - -export type RefreshUserTokenResponse = (string); - -export type GetTutorialProgressResponse = ({ - progress?: number; -}); - -export type UpdateTutorialProgressData = { - /** - * progress update - */ - requestBody: { - progress?: number; - }; -}; - -export type UpdateTutorialProgressResponse = (string); - -export type LeaveInstanceResponse = (string); - -export type GetUsageResponse = (number); - -export type GetRunnableResponse = ({ - workspace: string; - endpoint_async: string; - endpoint_sync: string; - endpoint_openai_sync: string; - summary: string; - description?: string; - kind: string; -}); - -export type GlobalWhoamiResponse = (GlobalUserInfo); - -export type ListWorkspaceInvitesResponse = (Array); - -export type WhoamiData = { - workspace: string; -}; - -export type WhoamiResponse = (User); - -export type GetGithubAppTokenData = { - /** - * jwt job token - */ - requestBody: { - job_token: string; - }; - workspace: string; -}; - -export type GetGithubAppTokenResponse = ({ - token: string; -}); - -export type InstallFromWorkspaceData = { - requestBody: { - /** - * The ID of the workspace containing the installation to copy - */ - source_workspace_id: string; - /** - * The ID of the GitHub installation to copy - */ - installation_id: number; - }; - workspace: string; -}; - -export type InstallFromWorkspaceResponse = (unknown); - -export type DeleteFromWorkspaceData = { - /** - * The ID of the GitHub installation to delete - */ - installationId: number; - workspace: string; -}; - -export type DeleteFromWorkspaceResponse = (unknown); - -export type ExportInstallationData = { - installationId: number; - workspace: string; -}; - -export type ExportInstallationResponse = ({ - jwt_token?: string; -}); - -export type ImportInstallationData = { - requestBody: { - jwt_token: string; - }; - workspace: string; -}; - -export type ImportInstallationResponse = (unknown); - -export type AcceptInviteData = { - /** - * accept invite - */ - requestBody: { - workspace_id: string; - username?: string; - }; -}; - -export type AcceptInviteResponse = (string); - -export type DeclineInviteData = { - /** - * decline invite - */ - requestBody: { - workspace_id: string; - }; -}; - -export type DeclineInviteResponse = (string); - -export type InviteUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - }; - workspace: string; -}; - -export type InviteUserResponse = (string); - -export type AddUserData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - username?: string; - operator: boolean; - }; - workspace: string; -}; - -export type AddUserResponse = (string); - -export type DeleteInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - email: string; - is_admin: boolean; - operator: boolean; - }; - workspace: string; -}; - -export type DeleteInviteResponse = (string); - -export type ArchiveWorkspaceData = { - workspace: string; -}; - -export type ArchiveWorkspaceResponse = (string); - -export type UnarchiveWorkspaceData = { - workspace: string; -}; - -export type UnarchiveWorkspaceResponse = (string); - -export type DeleteWorkspaceData = { - workspace: string; -}; - -export type DeleteWorkspaceResponse = (string); - -export type LeaveWorkspaceData = { - workspace: string; -}; - -export type LeaveWorkspaceResponse = (string); - -export type GetWorkspaceNameData = { - workspace: string; -}; - -export type GetWorkspaceNameResponse = (string); - -export type ChangeWorkspaceNameData = { - requestBody?: { - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceNameResponse = (string); - -export type ChangeWorkspaceIdData = { - requestBody?: { - new_id?: string; - new_name?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceIdResponse = (string); - -export type ChangeWorkspaceColorData = { - requestBody?: { - color?: string; - }; - workspace: string; -}; - -export type ChangeWorkspaceColorResponse = (string); - -export type WhoisData = { - username: string; - workspace: string; -}; - -export type WhoisResponse = (User); - -export type UpdateOperatorSettingsData = { - requestBody: OperatorSettings; - workspace: string; -}; - -export type UpdateOperatorSettingsResponse = (string); - -export type ExistsEmailData = { - email: string; -}; - -export type ExistsEmailResponse = (boolean); - -export type ListUsersAsSuperAdminData = { - /** - * filter only active users - */ - activeOnly?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListUsersAsSuperAdminResponse = (Array); - -export type ListPendingInvitesData = { - workspace: string; -}; - -export type ListPendingInvitesResponse = (Array); - -export type GetSettingsData = { - workspace: string; -}; - -export type GetSettingsResponse = ({ - workspace_id?: string; - slack_name?: string; - slack_team_id?: string; - slack_command_script?: string; - teams_team_id?: string; - teams_command_script?: string; - teams_team_name?: string; - auto_invite_domain?: string; - auto_invite_operator?: boolean; - auto_add?: boolean; - plan?: string; - customer_id?: string; - webhook?: string; - deploy_to?: string; - ai_config?: AIConfig; - error_handler?: string; - error_handler_extra_args?: ScriptArgs; - error_handler_muted_on_cancel: boolean; - large_file_storage?: LargeFileStorage; - git_sync?: WorkspaceGitSyncSettings; - deploy_ui?: WorkspaceDeployUISettings; - default_app?: string; - default_scripts?: WorkspaceDefaultScripts; - mute_critical_alerts?: boolean; - color?: string; - operator_settings?: OperatorSettings; -}); - -export type GetDeployToData = { - workspace: string; -}; - -export type GetDeployToResponse = ({ - deploy_to?: string; -}); - -export type GetIsPremiumData = { - workspace: string; -}; - -export type GetIsPremiumResponse = (boolean); - -export type GetPremiumInfoData = { - workspace: string; -}; - -export type GetPremiumInfoResponse = ({ - premium: boolean; - usage?: number; - owner: string; - status?: string; -}); - -export type GetThresholdAlertData = { - workspace: string; -}; - -export type GetThresholdAlertResponse = ({ - threshold_alert_amount?: number; - last_alert_sent?: string; -}); - -export type SetThresholdAlertData = { - /** - * threshold alert info - */ - requestBody: { - threshold_alert_amount?: number; - }; - workspace: string; -}; - -export type SetThresholdAlertResponse = (string); - -export type EditSlackCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditSlackCommandResponse = (string); - -export type EditTeamsCommandData = { - /** - * WorkspaceInvite - */ - requestBody: { - slack_command_script?: string; - }; - workspace: string; -}; - -export type EditTeamsCommandResponse = (string); - -export type ListAvailableTeamsIdsData = { - workspace: string; -}; - -export type ListAvailableTeamsIdsResponse = (Array<{ - team_name?: string; - team_id?: string; -}>); - -export type ListAvailableTeamsChannelsData = { - workspace: string; -}; - -export type ListAvailableTeamsChannelsResponse = (Array<{ - channel_name?: string; - channel_id?: string; - service_url?: string; - tenant_id?: string; -}>); - -export type ConnectTeamsData = { - /** - * connect teams - */ - requestBody: { - team_id?: string; - team_name?: string; - }; - workspace: string; -}; - -export type ConnectTeamsResponse = (string); - -export type RunSlackMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunSlackMessageTestJobResponse = ({ - job_uuid?: string; -}); - -export type RunTeamsMessageTestJobData = { - /** - * path to hub script to run and its corresponding args - */ - requestBody: { - hub_script_path?: string; - channel?: string; - test_msg?: string; - }; - workspace: string; -}; - -export type RunTeamsMessageTestJobResponse = ({ - job_uuid?: string; -}); - -export type EditDeployToData = { - requestBody: { - deploy_to?: string; - }; - workspace: string; -}; - -export type EditDeployToResponse = (string); - -export type EditAutoInviteData = { - /** - * WorkspaceInvite - */ - requestBody: { - operator?: boolean; - invite_all?: boolean; - auto_add?: boolean; - }; - workspace: string; -}; - -export type EditAutoInviteResponse = (string); - -export type EditWebhookData = { - /** - * WorkspaceWebhook - */ - requestBody: { - webhook?: string; - }; - workspace: string; -}; - -export type EditWebhookResponse = (string); - -export type EditCopilotConfigData = { - /** - * WorkspaceCopilotConfig - */ - requestBody: AIConfig; - workspace: string; -}; - -export type EditCopilotConfigResponse = (string); - -export type GetCopilotInfoData = { - workspace: string; -}; - -export type GetCopilotInfoResponse = (AIConfig); - -export type EditErrorHandlerData = { - /** - * WorkspaceErrorHandler - */ - requestBody: { - error_handler?: string; - error_handler_extra_args?: ScriptArgs; - error_handler_muted_on_cancel?: boolean; - }; - workspace: string; -}; - -export type EditErrorHandlerResponse = (string); - -export type EditLargeFileStorageConfigData = { - /** - * LargeFileStorage info - */ - requestBody: { - large_file_storage?: LargeFileStorage; - }; - workspace: string; -}; - -export type EditLargeFileStorageConfigResponse = (unknown); - -export type EditWorkspaceGitSyncConfigData = { - /** - * Workspace Git sync settings - */ - requestBody: { - git_sync_settings?: WorkspaceGitSyncSettings; - }; - workspace: string; -}; - -export type EditWorkspaceGitSyncConfigResponse = (unknown); - -export type EditWorkspaceDeployUiSettingsData = { - /** - * Workspace deploy UI settings - */ - requestBody: { - deploy_ui_settings?: WorkspaceDeployUISettings; - }; - workspace: string; -}; - -export type EditWorkspaceDeployUiSettingsResponse = (unknown); - -export type EditWorkspaceDefaultAppData = { - /** - * Workspace default app - */ - requestBody: { - default_app_path?: string; - }; - workspace: string; -}; - -export type EditWorkspaceDefaultAppResponse = (string); - -export type EditDefaultScriptsData = { - /** - * Workspace default app - */ - requestBody?: WorkspaceDefaultScripts; - workspace: string; -}; - -export type EditDefaultScriptsResponse = (string); - -export type GetDefaultScriptsData = { - workspace: string; -}; - -export type GetDefaultScriptsResponse = (WorkspaceDefaultScripts); - -export type SetEnvironmentVariableData = { - /** - * Workspace default app - */ - requestBody: { - name: string; - value?: string; - }; - workspace: string; -}; - -export type SetEnvironmentVariableResponse = (string); - -export type GetWorkspaceEncryptionKeyData = { - workspace: string; -}; - -export type GetWorkspaceEncryptionKeyResponse = ({ - key: string; -}); - -export type SetWorkspaceEncryptionKeyData = { - /** - * New encryption key - */ - requestBody: { - new_key: string; - skip_reencrypt?: boolean; - }; - workspace: string; -}; - -export type SetWorkspaceEncryptionKeyResponse = (string); - -export type GetWorkspaceDefaultAppData = { - workspace: string; -}; - -export type GetWorkspaceDefaultAppResponse = ({ - default_app_path?: string; -}); - -export type GetLargeFileStorageConfigData = { - workspace: string; -}; - -export type GetLargeFileStorageConfigResponse = (LargeFileStorage); - -export type GetWorkspaceUsageData = { - workspace: string; -}; - -export type GetWorkspaceUsageResponse = (number); - -export type GetUsedTriggersData = { - workspace: string; -}; - -export type GetUsedTriggersResponse = ({ - http_routes_used: boolean; - websocket_used: boolean; - kafka_used: boolean; - nats_used: boolean; - postgres_used: boolean; - mqtt_used: boolean; - gcp_used: boolean; - sqs_used: boolean; -}); - -export type ListUsersData = { - workspace: string; -}; - -export type ListUsersResponse = (Array); - -export type ListUsersUsageData = { - workspace: string; -}; - -export type ListUsersUsageResponse = (Array); - -export type ListUsernamesData = { - workspace: string; -}; - -export type ListUsernamesResponse = (Array<(string)>); - -export type UsernameToEmailData = { - username: string; - workspace: string; -}; - -export type UsernameToEmailResponse = (string); - -export type CreateTokenData = { - /** - * new token - */ - requestBody: NewToken; -}; - -export type CreateTokenResponse = (string); - -export type CreateTokenImpersonateData = { - /** - * new token - */ - requestBody: NewTokenImpersonate; -}; - -export type CreateTokenImpersonateResponse = (string); - -export type DeleteTokenData = { - tokenPrefix: string; -}; - -export type DeleteTokenResponse = (string); - -export type ListTokensData = { - excludeEphemeral?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; -}; - -export type ListTokensResponse = (Array); - -export type GetOidcTokenData = { - audience: string; - workspace: string; -}; - -export type GetOidcTokenResponse = (string); - -export type CreateVariableData = { - alreadyEncrypted?: boolean; - /** - * new variable - */ - requestBody: CreateVariable; - workspace: string; -}; - -export type CreateVariableResponse = (string); - -export type EncryptValueData = { - /** - * new variable - */ - requestBody: string; - workspace: string; -}; - -export type EncryptValueResponse = (string); - -export type DeleteVariableData = { - path: string; - workspace: string; -}; - -export type DeleteVariableResponse = (string); - -export type UpdateVariableData = { - alreadyEncrypted?: boolean; - path: string; - /** - * updated variable - */ - requestBody: EditVariable; - workspace: string; -}; - -export type UpdateVariableResponse = (string); - -export type GetVariableData = { - /** - * ask to decrypt secret if this variable is secret - * (if not secret no effect, default: true) - * - */ - decryptSecret?: boolean; - /** - * ask to include the encrypted value if secret and decrypt secret is not true (default: false) - * - */ - includeEncrypted?: boolean; - path: string; - workspace: string; -}; - -export type GetVariableResponse = (ListableVariable); - -export type GetVariableValueData = { - path: string; - workspace: string; -}; - -export type GetVariableValueResponse = (string); - -export type ExistsVariableData = { - path: string; - workspace: string; -}; - -export type ExistsVariableResponse = (boolean); - -export type ListVariableData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - workspace: string; -}; - -export type ListVariableResponse = (Array); - -export type ListContextualVariablesData = { - workspace: string; -}; - -export type ListContextualVariablesResponse = (Array); - -export type WorkspaceGetCriticalAlertsData = { - acknowledged?: (boolean) | null; - page?: number; - pageSize?: number; - workspace: string; -}; - -export type WorkspaceGetCriticalAlertsResponse = ({ - alerts?: Array; - /** - * Total number of rows matching the query. - */ - total_rows?: number; - /** - * Total number of pages based on the page size. - */ - total_pages?: number; -}); - -export type WorkspaceAcknowledgeCriticalAlertData = { - /** - * The ID of the critical alert to acknowledge - */ - id: number; - workspace: string; -}; - -export type WorkspaceAcknowledgeCriticalAlertResponse = (string); - -export type WorkspaceAcknowledgeAllCriticalAlertsData = { - workspace: string; -}; - -export type WorkspaceAcknowledgeAllCriticalAlertsResponse = (string); - -export type WorkspaceMuteCriticalAlertsUiData = { - /** - * Boolean flag to mute critical alerts. - */ - requestBody: { - /** - * Whether critical alerts should be muted. - */ - mute_critical_alerts?: boolean; - }; - workspace: string; -}; - -export type WorkspaceMuteCriticalAlertsUiResponse = (string); - -export type LoginWithOauthData = { - clientName: string; - /** - * Partially filled script - */ - requestBody: { - code?: string; - state?: string; - }; -}; - -export type LoginWithOauthResponse = (string); - -export type ConnectSlackCallbackData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; - workspace: string; -}; - -export type ConnectSlackCallbackResponse = (string); - -export type ConnectSlackCallbackInstanceData = { - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectSlackCallbackInstanceResponse = (string); - -export type ConnectCallbackData = { - clientName: string; - /** - * code endpoint - */ - requestBody: { - code: string; - state: string; - }; -}; - -export type ConnectCallbackResponse = (TokenResponse); - -export type CreateAccountData = { - /** - * code endpoint - */ - requestBody: { - refresh_token?: string; - expires_in: number; - client: string; - }; - workspace: string; -}; - -export type CreateAccountResponse = (string); - -export type RefreshTokenData = { - id: number; - /** - * variable path - */ - requestBody: { - path: string; - }; - workspace: string; -}; - -export type RefreshTokenResponse = (string); - -export type DisconnectAccountData = { - id: number; - workspace: string; -}; - -export type DisconnectAccountResponse = (string); - -export type DisconnectSlackData = { - workspace: string; -}; - -export type DisconnectSlackResponse = (string); - -export type DisconnectTeamsData = { - workspace: string; -}; - -export type DisconnectTeamsResponse = (string); - -export type ListOauthLoginsResponse = ({ - oauth: Array<{ - type: string; - display_name?: string; - }>; - saml?: string; -}); - -export type ListOauthConnectsResponse = (Array<(string)>); - -export type GetOauthConnectData = { - /** - * client name - */ - client: string; -}; - -export type GetOauthConnectResponse = ({ - extra_params?: { - [key: string]: unknown; - }; - scopes?: Array<(string)>; -}); - -export type SyncTeamsResponse = (Array); - -export type SendMessageToConversationData = { - requestBody: { - /** - * The ID of the Teams conversation/activity - */ - conversation_id: string; - /** - * Used for styling the card conditionally - */ - success?: boolean; - /** - * The message text to be sent in the Teams card - */ - text: string; - /** - * The card block to be sent in the Teams card - */ - card_block?: { - [key: string]: unknown; - }; - }; -}; - -export type SendMessageToConversationResponse = (unknown); - -export type CreateResourceData = { - /** - * new resource - */ - requestBody: CreateResource; - updateIfExists?: boolean; - workspace: string; -}; - -export type CreateResourceResponse = (string); - -export type DeleteResourceData = { - path: string; - workspace: string; -}; - -export type DeleteResourceResponse = (string); - -export type UpdateResourceData = { - path: string; - /** - * updated resource - */ - requestBody: EditResource; - workspace: string; -}; - -export type UpdateResourceResponse = (string); - -export type UpdateResourceValueData = { - path: string; - /** - * updated resource - */ - requestBody: { - value?: unknown; - }; - workspace: string; -}; - -export type UpdateResourceValueResponse = (string); - -export type GetResourceData = { - path: string; - workspace: string; -}; - -export type GetResourceResponse = (Resource); - -export type GetResourceValueInterpolatedData = { - /** - * job id - */ - jobId?: string; - path: string; - workspace: string; -}; - -export type GetResourceValueInterpolatedResponse = (unknown); - -export type GetResourceValueData = { - path: string; - workspace: string; -}; - -export type GetResourceValueResponse = (unknown); - -export type ExistsResourceData = { - path: string; - workspace: string; -}; - -export type ExistsResourceResponse = (boolean); - -export type ListResourceData = { - /** - * which page to return (start at 1, default 1) - */ - page?: number; - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * resource_types to list from, separated by ',', - */ - resourceType?: string; - /** - * resource_types to not list from, separated by ',', - */ - resourceTypeExclude?: string; - workspace: string; -}; - -export type ListResourceResponse = (Array); - -export type ListSearchResourceData = { - workspace: string; -}; - -export type ListSearchResourceResponse = (Array<{ - path: string; - value: unknown; -}>); - -export type ListResourceNamesData = { - name: string; - workspace: string; -}; - -export type ListResourceNamesResponse = (Array<{ - name: string; - path: string; -}>); - -export type CreateResourceTypeData = { - /** - * new resource_type - */ - requestBody: ResourceType; - workspace: string; -}; - -export type CreateResourceTypeResponse = (string); - -export type FileResourceTypeToFileExtMapData = { - workspace: string; -}; - -export type FileResourceTypeToFileExtMapResponse = (unknown); - -export type DeleteResourceTypeData = { - path: string; - workspace: string; -}; - -export type DeleteResourceTypeResponse = (string); - -export type UpdateResourceTypeData = { - path: string; - /** - * updated resource_type - */ - requestBody: EditResourceType; - workspace: string; -}; - -export type UpdateResourceTypeResponse = (string); - -export type GetResourceTypeData = { - path: string; - workspace: string; -}; - -export type GetResourceTypeResponse = (ResourceType); - -export type ExistsResourceTypeData = { - path: string; - workspace: string; -}; - -export type ExistsResourceTypeResponse = (boolean); - -export type ListResourceTypeData = { - workspace: string; -}; - -export type ListResourceTypeResponse = (Array); - -export type ListResourceTypeNamesData = { - workspace: string; -}; - -export type ListResourceTypeNamesResponse = (Array<(string)>); - -export type QueryResourceTypesData = { - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; - workspace: string; -}; - -export type QueryResourceTypesResponse = (Array<{ - name: string; - score: number; - schema?: unknown; -}>); - -export type ListHubIntegrationsData = { - /** - * query integrations kind - */ - kind?: string; -}; - -export type ListHubIntegrationsResponse = (Array<{ - name: string; -}>); - -export type ListHubFlowsResponse = ({ - flows?: Array<{ - id: number; - flow_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}); - -export type GetHubFlowByIdData = { - id: number; -}; - -export type GetHubFlowByIdResponse = ({ - flow?: OpenFlow; -}); - -export type ListHubAppsResponse = ({ - apps?: Array<{ - id: number; - app_id: number; - summary: string; - apps: Array<(string)>; - approved: boolean; - votes: number; - }>; -}); - -export type GetHubAppByIdData = { - id: number; -}; - -export type GetHubAppByIdResponse = ({ - app: { - summary: string; - value: unknown; - }; -}); - -export type GetPublicAppByCustomPathData = { - customPath: string; -}; - -export type GetPublicAppByCustomPathResponse = ((AppWithLastVersion & { - workspace_id?: string; -})); - -export type GetHubScriptContentByPathData = { - path: string; -}; - -export type GetHubScriptContentByPathResponse = (string); - -export type GetHubScriptByPathData = { - path: string; -}; - -export type GetHubScriptByPathResponse = ({ - content: string; - lockfile?: string; - schema?: unknown; - language: string; - summary?: string; -}); - -export type GetTopHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; -}; - -export type GetTopHubScriptsResponse = ({ - asks?: Array<{ - id: number; - ask_id: number; - summary: string; - app: string; - version_id: number; - kind: HubScriptKind; - votes: number; - views: number; - }>; -}); - -export type QueryHubScriptsData = { - /** - * query scripts app - */ - app?: string; - /** - * query scripts kind - */ - kind?: string; - /** - * query limit - */ - limit?: number; - /** - * query text - */ - text: string; -}; - -export type QueryHubScriptsResponse = (Array<{ - ask_id: number; - id: number; - version_id: number; - summary: string; - app: string; - kind: HubScriptKind; - score: number; -}>); - -export type ListSearchScriptData = { - workspace: string; -}; - -export type ListSearchScriptResponse = (Array<{ - path: string; - content: string; -}>); - -export type ListScriptsData = { - /** - * mask to filter exact matching user creator - */ - createdBy?: string; - /** - * mask to filter scripts whom first direct parent has exact hash - */ - firstParentHash?: string; - /** - * (default false) - * include scripts that have no deployed version - * - */ - includeDraftOnly?: boolean; - /** - * (default false) - * include scripts without an exported main function - * - */ - includeWithoutMain?: boolean; - /** - * (default regardless) - * if true show only the templates - * if false show only the non templates - * if not defined, show all regardless of if the script is a template - * - */ - isTemplate?: boolean; - /** - * (default regardless) - * script kinds to filter, split by comma - * - */ - kinds?: string; - /** - * mask to filter scripts whom last parent in the chain has exact hash. - * Beware that each script stores only a limited number of parents. Hence - * the last parent hash for a script is not necessarily its top-most parent. - * To find the top-most parent you will have to jump from last to last hash - * until finding the parent - * - */ - lastParentHash?: string; - /** - * order by desc order (default true) - */ - orderDesc?: boolean; - /** - * which page to return (start at 1, default 1) - */ - page?: number; - /** - * is the hash present in the array of stored parent hashes for this script. - * The same warning applies than for last_parent_hash. A script only store a - * limited number of direct parent - * - */ - parentHash?: string; - /** - * mask to filter exact matching path - */ - pathExact?: string; - /** - * mask to filter matching starting path - */ - pathStart?: string; - /** - * number of items to return for a given page (default 30, max 100) - */ - perPage?: number; - /** - * (default false) - * show only the archived files. - * when multiple archived hash share the same path, only the ones with the latest create_at - * are - * ed. - * - */ - showArchived?: boolean; - /** - * (default false) - * show only the starred items - * - */ - starredOnly?: boolean; - /** - * (default false) - * include deployment message - * - */ - withDeploymentMsg?: boolean; - workspace: string; -}; - -export type ListScriptsResponse = (Array +{#if !editor} +
+ +
+{/if}
{#if $vimMode}
diff --git a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte index 6c3b4790ba..c423ba7c9e 100644 --- a/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte +++ b/frontend/src/lib/components/ErrorOrRecoveryHandler.svelte @@ -361,7 +361,7 @@ + + + + + +
+
+
+ +
+
+
+ {#each lines as line, i} +
+ {line} +
+ {/each} +
+
+
+
+
+
diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index 30edf25691..448e6e89b4 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -187,7 +187,7 @@ `path` in module.value ? module.value.path : ($initialPathStore == '' ? $pathStore : $initialPathStore) + '/' + module.id, - jobKinds: ['preview', 'script', 'flowpreview', 'flow'].join(','), + jobKinds: ['preview', 'script', 'flowpreview', 'flow', 'flowscript'].join(','), page: 1, perPage: 1 }) diff --git a/frontend/src/lib/components/GraphqlSchemaViewer.svelte b/frontend/src/lib/components/GraphqlSchemaViewer.svelte index 86d0467255..eb290cebe9 100644 --- a/frontend/src/lib/components/GraphqlSchemaViewer.svelte +++ b/frontend/src/lib/components/GraphqlSchemaViewer.svelte @@ -2,7 +2,7 @@ import { BROWSER } from 'esm-env' import { editor as meditor } from 'monaco-editor' - import '@codingame/monaco-vscode-standalone-languages' + // import '@codingame/monaco-vscode-standalone-languages' import { onDestroy, onMount } from 'svelte' diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index 67f88534c5..a12b4026a8 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -515,6 +515,7 @@ on:change={() => { dispatch('change', { argName, arg }) }} + loadAsync /> {/if} @@ -583,6 +584,7 @@ focused = false }} autoHeight + loadAsync /> {#if !hideHelpButton} diff --git a/frontend/src/lib/components/JsonEditor.svelte b/frontend/src/lib/components/JsonEditor.svelte index 93481027e7..24b41f9e55 100644 --- a/frontend/src/lib/components/JsonEditor.svelte +++ b/frontend/src/lib/components/JsonEditor.svelte @@ -9,6 +9,7 @@ export let error = '' export let editor: SimpleEditor | undefined = undefined export let small = false + export let loadAsync = false $: tooBig = code && code?.length > 1000000 @@ -38,6 +39,7 @@
import type { Schema } from '$lib/common' - import { ScriptService, type FlowModule, type Job, JobService } from '$lib/gen' + import { ScriptService, type FlowModule, type Job } from '$lib/gen' import { workspaceStore } from '$lib/stores' import { getScriptByPath } from '$lib/scripts' import { CornerDownLeft, Loader2 } from 'lucide-svelte' import { getContext } from 'svelte' + import Button from './common/button/Button.svelte' import type { FlowEditorContext } from './flows/types' @@ -68,17 +69,12 @@ script.content, script.language, args, - $flowStore?.tag ?? (val.tag_override ? val.tag_override : script.tag) + $flowStore?.tag ?? (val.tag_override ? val.tag_override : script.tag), + script.lock, + val.hash ?? script.hash ) } else if (val.type == 'flow') { - await testJobLoader?.abstractRun(() => - JobService.runFlowByPath({ - workspace: $workspaceStore!, - path: val.path, - requestBody: args, - skipPreprocessor: true - }) - ) + await testJobLoader?.runFlowByPath(val.path, args) } else { throw Error('Not supported module type') } diff --git a/frontend/src/lib/components/ResourceEditor.svelte b/frontend/src/lib/components/ResourceEditor.svelte index 10f6086b83..026a18a1a6 100644 --- a/frontend/src/lib/components/ResourceEditor.svelte +++ b/frontend/src/lib/components/ResourceEditor.svelte @@ -118,6 +118,8 @@ resourceTypeInfo = resourceType if (resourceType.schema) { resourceSchema = resourceType.schema as Schema + resourceSchema.order = + resourceSchema.order ?? Object.keys(resourceSchema.properties).sort() } if (resourceTypeInfo?.format_extension) { textFileContent = args.content @@ -237,7 +239,7 @@ }} />
-
+
{#if loadingSchema} {:else if !viewJsonSchema && resourceSchema && resourceSchema?.properties} diff --git a/frontend/src/lib/components/ResourcePicker.svelte b/frontend/src/lib/components/ResourcePicker.svelte index 42e93eab6e..f82dd888dc 100644 --- a/frontend/src/lib/components/ResourcePicker.svelte +++ b/frontend/src/lib/components/ResourcePicker.svelte @@ -135,7 +135,7 @@ }} /> -
+
{#if collection?.length > 0} -
+
+ + +
+
+ + x + +
+
diff --git a/frontend/src/lib/components/apps/editor/AppTimeline.svelte b/frontend/src/lib/components/apps/editor/AppTimeline.svelte index 7d2f4b06f1..bf41491c29 100644 --- a/frontend/src/lib/components/apps/editor/AppTimeline.svelte +++ b/frontend/src/lib/components/apps/editor/AppTimeline.svelte @@ -1,18 +1,19 @@ + +{#if runnableComponents && $runnableComponents[id] != undefined} + +{/if} diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte index 4e02887b4f..12cfedd2cf 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte @@ -10,26 +10,25 @@ import { defaultScriptLanguages, getScriptByPath, processLangs } from '$lib/scripts' import { Building, GitFork, Globe2 } from 'lucide-svelte' - import { createEventDispatcher, getContext } from 'svelte' + import { createEventDispatcher } from 'svelte' import { fly } from 'svelte/transition' - import type { AppViewerContext } from '../../types' import { defaultCode } from '../component' - import InlineScriptList from '../settingsPanel/mainInput/InlineScriptList.svelte' import WorkspaceScriptList from '../settingsPanel/mainInput/WorkspaceScriptList.svelte' import RunnableSelector from '../settingsPanel/mainInput/RunnableSelector.svelte' import { defaultScripts } from '$lib/stores' import DefaultScripts from '$lib/components/DefaultScripts.svelte' import type { Preview } from '$lib/gen' + import type { InlineScript } from '../../types' - export let name: string export let componentType: string | undefined = undefined export let showScriptPicker = false + export let rawApps = false + export let unusedInlineScripts: { name: string; inlineScript: InlineScript }[] - let tab = 'inlinescripts' + let tab = 'workspacescripts' let filter: string = '' let picker: Drawer - const { appPath, app } = getContext('AppViewerContext') const dispatch = createEventDispatcher() async function inferInlineScriptSchema( @@ -48,26 +47,22 @@ async function createInlineScriptByLanguage( language: Preview['language'], - path: string, subkind: 'pgsql' | 'mysql' | 'fetch' | undefined = undefined ) { const content = defaultCode(componentType ?? '', (subkind || language) ?? '') ?? initialCode(language, 'script', subkind ?? 'flow') - return newInlineScript(content, language, path) + return newInlineScript(content, language) } - async function newInlineScript(content: string, language: Preview['language'], path: string) { - const fullPath = `${$appPath}/${path}` - + async function newInlineScript(content: string, language: Preview['language']) { let schema: Schema = emptySchema() schema = await inferInlineScriptSchema(language, content, schema) const newInlineScript = { content, language, - path: fullPath, schema } dispatch('new', newInlineScript) @@ -75,23 +70,12 @@ async function pickScript(path: string) { const script = await getScriptByPath(path) - newInlineScript(script.content, script.language, path) + newInlineScript(script.content, script.language) } async function pickHubScript(path: string) { const script = await getScriptByPath(path) - newInlineScript(script.content, script.language, path) - } - - function pickInlineScript(name: string) { - const unusedInlineScriptIndex = $app.unusedInlineScripts?.findIndex( - (script) => script.name === name - ) - const unusedInlineScript = $app.unusedInlineScripts?.[unusedInlineScriptIndex] - - $app.unusedInlineScripts.splice(unusedInlineScriptIndex, 1) - $app = $app - dispatch('new', unusedInlineScript.inlineScript) + newInlineScript(script.content, script.language) } $: langs = processLangs(undefined, $defaultScripts?.order ?? Object.keys(defaultScriptLanguages)) @@ -108,12 +92,6 @@
- -
- - Detached Inline Scripts -
-
@@ -131,14 +109,7 @@
- {#if tab == 'inlinescripts'} - pickInlineScript(e.detail)} - inlineScripts={$app.unusedInlineScripts - ? $app.unusedInlineScripts.map((uis) => uis.name) - : []} - /> - {:else if tab == 'workspacescripts'} + {#if tab == 'workspacescripts'} pickScript(e.detail)} /> {:else if tab == 'hubscripts'} pickHubScript(e.detail.path)} /> @@ -159,7 +130,7 @@
Choose a language
{#if showScriptPicker} - + {/if}
-
-
- Frontend - - Frontend scripts are executed in the browser and can manipulate the app context directly. - -
+ {#if !rawApps} +
+
+ Frontend + + Frontend scripts are executed in the browser and can manipulate the app context + directly. + +
-
- { - const newInlineScript = { - content: `// read outputs and ctx +
+ { + const newInlineScript = { + content: `// read outputs and ctx console.log(ctx.email) // access a global state store @@ -235,14 +208,15 @@ state.foo += 1 // all helpers can be found at https://www.windmill.dev/docs/apps/app-runnable-panel#frontend-scripts-helpers return state.foo`, - language: 'frontend', - path: 'frontend script', - schema: undefined - } - dispatch('new', newInlineScript) - }} - /> + language: 'frontend', + path: 'frontend script', + schema: undefined + } + dispatch('new', newInlineScript) + }} + /> +
-
+ {/if}
diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte index cdf071618e..670ebb2445 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte @@ -14,13 +14,13 @@ import type { AppInput } from '../../inputType' import SimpleEditor from '$lib/components/SimpleEditor.svelte' import { buildExtraLib } from '../../utils' - import RunButton from './RunButton.svelte' + import RunButton from './AppRunButton.svelte' import { scriptLangToEditorLang } from '$lib/scripts' import ScriptGen from '$lib/components/copilot/ScriptGen.svelte' import DiffEditor from '$lib/components/DiffEditor.svelte' - import { userStore } from '$lib/stores' import CacheTtlPopup from './CacheTtlPopup.svelte' import EditorSettings from '$lib/components/EditorSettings.svelte' + import { userStore } from '$lib/stores' let inlineScriptEditorDrawer: InlineScriptEditorDrawer @@ -179,7 +179,9 @@ if (!deepEqual(newFields, fields)) { fields = newFields - $stateId++ + if (stateId) { + $stateId++ + } } } } @@ -211,7 +213,9 @@ ] } } - $stateId++ + if (stateId) { + $stateId++ + } } } @@ -219,6 +223,8 @@ {#if inlineScript} {#if inlineScript.language != 'frontend'} { $app = $app - $stateId++ + if (stateId) { + $stateId++ + } }} />
{:else} { if ( diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptHiddenRunnable.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptHiddenRunnable.svelte index 3a04c55389..aca0f9c043 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptHiddenRunnable.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptHiddenRunnable.svelte @@ -10,7 +10,7 @@ export let id: string export let transformer: boolean - const { runnableComponents } = getContext('AppViewerContext') + const { runnableComponents, app } = getContext('AppViewerContext') async function fork(nrunnable: Runnable) { runnable = { ...runnable, ...nrunnable, autoRefresh: true, recomputeOnInputChanged: true } } @@ -37,9 +37,11 @@ bind:inlineScript={runnable.transformer} name="Transformer" on:delete={() => { - delete $runnableComponents[id] - runnable.transformer = undefined - runnable = runnable + if (runnableComponents) { + delete $runnableComponents[id] + runnable.transformer = undefined + runnable = runnable + } }} /> {:else} @@ -67,8 +69,8 @@ /> {:else} onPick(e.detail)} - name={runnable.name} on:delete showScriptPicker on:new={(e) => { diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte index 16fe10c594..866141b231 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte @@ -18,18 +18,26 @@ import { deepEqual } from 'fast-equals' import { computeFields } from './utils' import { inferArgs, loadSchema } from '$lib/infer' - import RunButton from './RunButton.svelte' + import AppRunButton from './AppRunButton.svelte' import { getScriptByPath } from '$lib/scripts' import { sendUserToast } from '$lib/toast' import { autoPlacement } from '@floating-ui/core' import { ExternalLink, Eye, GitFork, Pen, RefreshCw, Trash } from 'lucide-svelte' + import { get } from 'svelte/store' + import RunButton from '$lib/components/RunButton.svelte' import Popover from '$lib/components/meltComponents/Popover.svelte' export let runnable: RunnableByPath - export let fields: Record + export let fields: + | Record + | undefined export let id: string + export let rawApps = false + export let isLoading = false + export let onRun = async () => {} + export let onCancel = async () => {} - const { stateId } = getContext('AppViewerContext') + const viewerContext = getContext('AppViewerContext') let drawerFlowViewer: Drawer let flowPath: string = '' @@ -37,15 +45,16 @@ const dispatch = createEventDispatcher() - async function refreshScript(x: RunnableByPath) { + async function refreshScript(runnable: RunnableByPath) { try { - let { schema } = await getScriptByPath(x.path) - if (!deepEqual(x.schema, schema)) { - x.schema = schema - if (!x.schema.order) { - x.schema.order = Object.keys(x.schema.properties ?? {}) + let { schema } = await getScriptByPath(runnable.path) + console.log('schema1', schema) + if (!deepEqual(runnable.schema, schema)) { + runnable.schema = schema + if (!runnable.schema.order) { + runnable.schema.order = Object.keys(runnable.schema.properties ?? {}) } - fields = computeFields(schema, false, fields) + fields = computeFields(schema, false, fields ?? {}) } } catch (e) { notFound = true @@ -53,15 +62,16 @@ } } - async function refreshFlow(x: RunnableByPath) { + async function refreshFlow(runnable: RunnableByPath) { try { - const { schema } = (await loadSchema($workspaceStore ?? '', x.path, 'flow')) ?? emptySchema() - if (!deepEqual(x.schema, schema)) { - x.schema = schema - if (!x.schema.order) { - x.schema.order = Object.keys(x.schema.properties ?? {}) + const { schema } = + (await loadSchema($workspaceStore ?? '', runnable.path, 'flow')) ?? emptySchema() + if (!deepEqual(runnable.schema, schema)) { + runnable.schema = schema + if (!runnable.schema.order) { + runnable.schema.order = Object.keys(runnable.schema.properties ?? {}) } - fields = computeFields(schema, false, fields) + fields = computeFields(schema, false, fields ?? {}) } } catch (e) { notFound = true @@ -92,6 +102,7 @@ if (deepEqual(runnable, lastRunnable)) { return } + console.log('runnable', runnable) notFound = false if (runnable.runType == 'script') { refreshScript(runnable) @@ -111,7 +122,11 @@
- + {#if !rawApps} + + {:else} + + {/if}
- {#key $stateId} + {#key viewerContext?.stateId ? get(viewerContext.stateId) : 0} {#if notFound}
{runnable.runType} not found at {runnable.path} in workspace {$workspaceStore}
import { getContext } from 'svelte' - import type { AppEditorContext, AppViewerContext, HiddenRunnable } from '../../types' + import type { AppEditorContext, AppViewerContext } from '../../types' import { Pane, Splitpanes } from 'svelte-splitpanes' import InlineScriptsPanelList from './InlineScriptsPanelList.svelte' import InlineScriptEditor from './InlineScriptEditor.svelte' @@ -9,13 +9,11 @@ import InlineScriptHiddenRunnable from './InlineScriptHiddenRunnable.svelte' import { BG_PREFIX } from '../../utils' import { sendUserToast } from '$lib/toast' - import type { RunnableByName } from '../../inputType' - import { ScriptService } from '$lib/gen' import { workspaceStore } from '$lib/stores' - import { findNextAvailablePath } from '$lib/path' import { twMerge } from 'tailwind-merge' + import { createScriptFromInlineScript } from './utils' - const { app, runnableComponents } = getContext('AppViewerContext') + const { app, runnableComponents, appPath } = getContext('AppViewerContext') const { selectedComponentInEditor } = getContext('AppEditorContext') function deleteBackgroundScript(index: number) { @@ -36,8 +34,10 @@ } $selectedComponentInEditor = undefined - delete $runnableComponents[BG_PREFIX + index] - $runnableComponents = $runnableComponents + if (runnableComponents) { + delete $runnableComponents[BG_PREFIX + index] + $runnableComponents = $runnableComponents + } } $: gridItem = @@ -57,50 +57,6 @@ (k_, index) => `unused-${index}` === $selectedComponentInEditor ) - async function createScriptFromInlineScript( - id: string, - runnable: HiddenRunnable | RunnableByName - ) { - if (runnable.type != 'runnableByName') { - sendUserToast('Only inline scripts can be saved to workspace', true) - return - } - if (!runnable.inlineScript) { - sendUserToast('No inline script found', true) - return - } - let path = `${runnable.inlineScript.path}/inline_${id}` - path = await findNextAvailablePath(path) - let language = runnable.inlineScript.language - if (language == 'frontend') { - sendUserToast('Frontend scripts can not be saved to workspace', true) - return - } - await ScriptService.createScript({ - workspace: $workspaceStore!, - requestBody: { - path: path, - summary: runnable.name ?? '', - description: '', - content: runnable.inlineScript.content, - parent_hash: undefined, - schema: runnable.inlineScript.schema, - is_template: false, - language: language! - } - }) - - Object.assign(runnable, { - type: 'runnableByPath', - schema: runnable.inlineScript.schema, - runType: 'script', - recomputeIds: undefined, - path - }) - - $app = $app - } - export let width: number | undefined = undefined @@ -114,13 +70,18 @@ {#if !$selectedComponentInEditor}
- Select a script on the left panel + Select a runnable on the left panel
{:else if gridItem} {#key gridItem?.id} { - createScriptFromInlineScript(gridItem?.id ?? 'unknown', e.detail) + createScriptFromInlineScript( + gridItem?.id ?? 'unknown', + e.detail, + $workspaceStore ?? '', + $appPath + ) }} bind:gridItem /> @@ -145,7 +106,13 @@ {#if $app.hiddenInlineScripts?.[hiddenInlineScript]} { - createScriptFromInlineScript(BG_PREFIX + hiddenInlineScript, e.detail) + createScriptFromInlineScript( + BG_PREFIX + hiddenInlineScript, + e.detail, + $workspaceStore ?? '', + $appPath + ) + $app = $app }} transformer={$selectedComponentInEditor?.endsWith('_transformer')} on:delete={() => deleteBackgroundScript(hiddenInlineScript)} @@ -154,7 +121,7 @@ />{/if}{/key} {:else}
- No script found at id {$selectedComponentInEditor} + No runnable found at id {$selectedComponentInEditor}
{/if}
diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte index e5a83cc178..4ba20786dc 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte @@ -21,7 +21,7 @@ function selectScript(id: string) { $selectedComponentInEditor = id - if (!id.startsWith('unused-') || !id.startsWith(BG_PREFIX)) { + if ((selectedComponent && !id.startsWith('unused-')) || !id.startsWith(BG_PREFIX)) { $selectedComponent = [$selectedComponentInEditor.split('_transformer')[0]] } } @@ -29,7 +29,7 @@ $: runnables = getAppScripts($app.grid, $app.subgrids) // When selected component changes, update selectedScriptComponentId - $: handleSelectedComponent($selectedComponent) + $: selectedComponent && handleSelectedComponent($selectedComponent) function handleSelectedComponent(selectedComponent: string[] | undefined) { if ( @@ -184,11 +184,11 @@ {/if}
-
Background Runnables + diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts index 15b7c44237..7609ce4beb 100644 --- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts +++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/utils.ts @@ -1,6 +1,8 @@ import type { Schema } from '$lib/common' -import type { AppInputs, Runnable } from '../../inputType' -import type { GridItem, InlineScript } from '../../types' +import { ScriptService } from '$lib/gen' +import { sendUserToast } from '$lib/toast' +import type { AppInputs, Runnable, RunnableByName } from '../../inputType' +import type { GridItem, HiddenRunnable, InlineScript } from '../../types' import { fieldTypeToTsType, schemaToInputsSpec } from '../../utils' import type { AppComponent } from '../component' @@ -111,7 +113,7 @@ export function getAppScripts( grid: GridItem[], subgrids: Record | undefined ): AppScriptsList { - const scriptsList = grid.reduce( + const scriptsList = (grid ?? []).reduce( (acc, gridComponent) => processGridItemRunnable(gridComponent, acc), { inline: [], imported: [], transformer: false } as AppScriptsList ) @@ -143,3 +145,45 @@ function processRunnable( transformer: transformer !== undefined }) } + +export async function createScriptFromInlineScript( + id: string, + runnable: HiddenRunnable | RunnableByName, + workspace: string, + appPath: string +) { + if (runnable.type != 'runnableByName') { + sendUserToast('Only inline scripts can be saved to workspace', true) + return + } + if (!runnable.inlineScript) { + sendUserToast('No inline script found', true) + return + } + let language = runnable.inlineScript.language + if (language == 'frontend') { + sendUserToast('Frontend scripts can not be saved to workspace', true) + return + } + await ScriptService.createScript({ + workspace, + requestBody: { + path: appPath + '/' + id, + summary: runnable.name ?? '', + description: '', + content: runnable.inlineScript.content, + parent_hash: undefined, + schema: runnable.inlineScript.schema, + is_template: false, + language: language! + } + }) + + Object.assign(runnable, { + type: 'runnableByPath', + schema: runnable.inlineScript.schema, + runType: 'script', + recomputeIds: undefined, + path: appPath + '/' + id + }) +} diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte index e9fe80912d..b706095172 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/ComponentPanel.svelte @@ -156,7 +156,6 @@ type: 'runnableByName', name: `Eval of ${id}`, inlineScript: { - path: `${id}_eval`, content: `return ${componentSettings?.item.data.componentInput?.['expr']}`, language: 'frontend', refreshOn: componentSettings?.item.data.componentInput?.['connections']?.map((c) => { diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/EventHandlers.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/EventHandlers.svelte index a048a4fb20..8a0e4acafc 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/EventHandlers.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/EventHandlers.svelte @@ -23,7 +23,15 @@ 'conditionalwrapper', 'fileinputcomponent', 's3fileinputcomponent', - 'steppercomponent' + 'steppercomponent', + 'dateinputcomponent', + 'datetimeinputcomponent', + 'timeinputcomponent', + 'numberinputcomponent', + 'textinputcomponent', + 'textareainputcomponent', + 'passwordinputcomponent', + 'emailinputcomponent' ] @@ -49,7 +57,7 @@ bind:value={item.data.onCloseRecomputeIds} /> {/if} - {#if (`recomputeIds` in item.data && Array.isArray(item.data.recomputeIds)) || item.data.type === 'buttoncomponent' || item.data.type === 'formcomponent' || item.data.type === 'formbuttoncomponent' || item.data.type === 'checkboxcomponent'} + {#if (`recomputeIds` in item.data && Array.isArray(item.data.recomputeIds)) || item.data.type === 'buttoncomponent' || item.data.type === 'formbuttoncomponent'} id !== ownId)} bind:value={item.data.onToggle} /> {/if} + {#if item.data.type === 'dateinputcomponent' || item.data.type === 'datetimeinputcomponent' || item.data.type === 'timeinputcomponent' || item.data.type === 'numberinputcomponent' || item.data.type === 'textinputcomponent' || item.data.type === 'textareainputcomponent' || item.data.type === 'passwordinputcomponent' || item.data.type === 'emailinputcomponent'} + id !== ownId)} + bind:value={item.data.onChange} + /> + {/if} {#if item.data.type === 'resourceselectcomponent' || item.data.type === 'selectcomponent' || item.data.type == 'userresourcecomponent'} diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/SelectedRunnable.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/SelectedRunnable.svelte index 84cec1ed75..94c0af27cf 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/SelectedRunnable.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/SelectedRunnable.svelte @@ -46,36 +46,25 @@ appInput?.runnable?.type === 'runnableByPath' || (appInput?.runnable?.type === 'runnableByName' && appInput.runnable?.inlineScript !== undefined) - function getActions(hasScript: boolean): ActionType[] { - if (hasScript) { - return [ - ...(appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript - ? ([ - { - label: 'Detach', - icon: ExternalLink, - color: 'light', - callback: detach - } - ] as const) - : []), - { - label: 'Clear', - icon: X, - color: 'red', - callback: clear - } - ] - } else { - return [ - { - label: 'Clear', - icon: X, - color: 'red', - callback: clear - } - ] - } + function getActions(_hasScript: boolean): ActionType[] { + return [ + ...(appInput.runnable?.type === 'runnableByName' && appInput.runnable.inlineScript + ? ([ + { + label: 'Detach', + icon: ExternalLink, + color: 'light', + callback: detach + } + ] as const) + : []), + { + label: 'Clear', + icon: X, + color: 'red', + callback: clear + } + ] } $: actions = getActions(hasScript) diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/EvalV2InputEditor.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/EvalV2InputEditor.svelte index 37735e8677..3b59f74051 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/EvalV2InputEditor.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/EvalV2InputEditor.svelte @@ -73,10 +73,11 @@ componentInput.expr ?? '', (e) => (componentInput.expr = e)} shouldBindKey={false} fixedOverflowWidgets={false} {extraLib} @@ -105,10 +106,11 @@
{#if !fullscreen} componentInput.expr ?? '', (e) => (componentInput.expr = e)} shouldBindKey={false} {extraLib} autoHeight diff --git a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte index 6f9a629261..8028ea9657 100644 --- a/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte +++ b/frontend/src/lib/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte @@ -5,13 +5,14 @@ import type { AppComponent } from '../../component' import RunnableSelector from '../mainInput/RunnableSelector.svelte' import SelectedRunnable from '../SelectedRunnable.svelte' - import type { AppEditorContext } from '$lib/components/apps/types' + import type { AppEditorContext, AppViewerContext } from '$lib/components/apps/types' export let appInput: ResultAppInput export let defaultUserInput = false export let appComponent: AppComponent const { selectedComponentInEditor } = getContext('AppEditorContext') + const { app } = getContext('AppViewerContext') function onPick({ runnable, @@ -33,6 +34,7 @@ {:else if appInput !== undefined} ('AppViewerContext') + const appContext = getContext('AppViewerContext') + $: componentInput && appContext?.onchange?.() let s3FileUploadRawMode = false let s3FilePicker: S3FilePicker | undefined = undefined - - $: componentInput && onchange?.() {#key subFieldType} @@ -235,6 +234,7 @@ {:else}
('AppViewerContext') + // const { app, workspace } = getContext('AppViewerContext') let tab: Tab = onlyFlow ? 'workspaceflows' - : $app?.unusedInlineScripts?.length > 0 - ? 'inlinescripts' - : 'workspacescripts' + : unusedInlineScripts?.length > 0 + ? 'inlinescripts' + : 'workspacescripts' let filter: string = '' let picker: Drawer @@ -41,7 +43,7 @@ path: string, runType: 'script' | 'flow' | 'hubscript' ): Promise<{ schema: Schema; summary: string | undefined }> { - const schema = await loadSchema(workspace, path, runType) + const schema = await loadSchema($workspaceStore!, path, runType) if (!schema.schema.order) { schema.schema.order = Object.keys(schema.schema.properties ?? {}) } @@ -88,7 +90,7 @@ type: 'runnableByPath', path, runType: 'hubscript', - schema, + schema: schema.schema, name: defaultIfEmptyString(schema.summary, path) } as const dispatch('pick', { @@ -98,10 +100,8 @@ } function pickInlineScript(name: string) { - const unusedInlineScriptIndex = $app.unusedInlineScripts?.findIndex( - (script) => script.name === name - ) - const unusedInlineScript = $app.unusedInlineScripts?.[unusedInlineScriptIndex] + const unusedInlineScriptIndex = unusedInlineScripts?.findIndex((script) => script.name === name) + const unusedInlineScript = unusedInlineScripts?.[unusedInlineScriptIndex] dispatch('pick', { runnable: { type: 'runnableByName', @@ -111,25 +111,17 @@ fields: {} }) - $app.unusedInlineScripts.splice(unusedInlineScriptIndex, 1) - $app.unusedInlineScripts = $app.unusedInlineScripts + unusedInlineScripts.splice(unusedInlineScriptIndex, 1) + unusedInlineScripts = unusedInlineScripts } function createScript() { - let index = 0 - let newScriptPath = `Inline Script ${index}` - - const names = getAllScriptNames($app) - - // Find a name that is not used by any other inline script - while (names.includes(newScriptPath)) { - newScriptPath = `Inline Script ${++index}` - } + let newScriptName = `Inline Script` dispatch('pick', { runnable: { type: 'runnableByName', - name: newScriptPath, + name: newScriptName, inlineScript: undefined }, fields: {} @@ -179,8 +171,8 @@ {#if tab == 'inlinescripts'} pickInlineScript(e.detail)} - inlineScripts={$app.unusedInlineScripts - ? $app.unusedInlineScripts.map((uis) => uis.name) + inlineScripts={unusedInlineScripts + ? unusedInlineScripts.map((uis) => uis.name) : []} /> {:else if tab == 'workspacescripts'} @@ -215,7 +207,7 @@ on:click={() => picker?.openDrawer()} size="xs" color="blue" - variant="border" + variant={rawApps ? 'contained' : 'border'} startIcon={{ icon: MousePointer }} btnClasses="truncate w-full" > diff --git a/frontend/src/lib/components/apps/inputType.ts b/frontend/src/lib/components/apps/inputType.ts index e348300628..96e051a90a 100644 --- a/frontend/src/lib/components/apps/inputType.ts +++ b/frontend/src/lib/components/apps/inputType.ts @@ -142,6 +142,8 @@ export type RunnableByName = { export type Runnable = RunnableByPath | RunnableByName | undefined +export type RunnableWithFields = Runnable & { fields?: Record } + // Runnable input, set by the developer in the component panel export type ResultInput = { runnable: Runnable diff --git a/frontend/src/lib/components/apps/store.ts b/frontend/src/lib/components/apps/store.ts index 54356aa2a5..69b064e2f9 100644 --- a/frontend/src/lib/components/apps/store.ts +++ b/frontend/src/lib/components/apps/store.ts @@ -1,7 +1,6 @@ import type { Policy } from '$lib/gen' import { writable } from 'svelte/store' -import type { App } from './types' -export const importStore = writable<{ summary: string; value: App; policy: Policy } | undefined>( +export const importStore = writable<{ summary: string; value: any; policy: Policy } | undefined>( undefined ) diff --git a/frontend/src/lib/components/apps/types.ts b/frontend/src/lib/components/apps/types.ts index e58618f99b..b000fc2326 100644 --- a/frontend/src/lib/components/apps/types.ts +++ b/frontend/src/lib/components/apps/types.ts @@ -196,6 +196,17 @@ export type ListInputs = { export type GroupContext = { id: string; context: Writable> } +export type JobById = { + job: string + component: string + result?: any + error?: any + transformer?: { result?: any; error?: string } + created_at?: number + started_at?: number + duration_ms?: number +} + export type AppViewerContext = { worldStore: Writable app: Writable @@ -227,21 +238,7 @@ export type AppViewerContext = { isEditor: boolean jobs: Writable // jobByComponent: Writable>, - jobsById: Writable< - Record< - string, - { - job: string - component: string - result?: string - error?: any - transformer?: { result?: string; error?: string } - created_at?: number - started_at?: number - duration_ms?: number - } - > - > + jobsById: Writable> noBackend: boolean errorByComponent: Writable> openDebugRun: Writable<((jobID: string) => void) | undefined> diff --git a/frontend/src/lib/components/apps/utils.ts b/frontend/src/lib/components/apps/utils.ts index 0d826f2863..dc512b8645 100644 --- a/frontend/src/lib/components/apps/utils.ts +++ b/frontend/src/lib/components/apps/utils.ts @@ -42,9 +42,9 @@ export function allItems( subgrids: Record | undefined ): GridItem[] { if (subgrids == undefined) { - return grid + return grid ?? [] } - return [...grid, ...Object.values(subgrids).flat()] + return [...(grid ?? []), ...Object.values(subgrids).flat()] } export function schemaToInputsSpec( @@ -164,12 +164,54 @@ export function toStatic( return { app: newApp, summary } } +// function hasCycle(path, obj, seen = new Set()) { +// if (obj && typeof obj === 'object') { +// if (seen.has(obj)) { +// console.log('cycle detected', path) +// return true // cycle detected +// } +// seen.add(obj) +// for (const key in obj) { +// if (hasCycle(path + '.' + key, obj[key], seen)) { +// return true +// } +// } +// seen.delete(obj) // backtrack for other branches +// } +// return false +// } + +export function deepCloneWithFunctions(obj) { + if (obj === null || typeof obj !== 'object') return obj + if (typeof obj === 'function') return obj + + if (Array.isArray(obj)) { + return obj.map(deepCloneWithFunctions) + } + + const cloned = {} + for (const key in obj) { + cloned[key] = deepCloneWithFunctions(obj[key]) + } + return cloned +} + export function buildExtraLib( components: Record>>, idToExclude: string, state: Record, goto: boolean ): string { + // console.log( + // Object.entries(components).map(([k, v]) => [ + // k, + // Object.values(v).map((x) => x.peak()), + // hasCycle( + // k, + // Object.values(v).map((x) => x.peak()) + // ) + // ]) + // ) const cs = Object.entries(components) .filter(([k, v]) => k != idToExclude && k != 'state') .map(([k, v]) => [k, Object.fromEntries(Object.entries(v).map(([k, v]) => [k, v.peak()]))]) @@ -335,7 +377,7 @@ declare const result: any; } export function getAllScriptNames(app: App): string[] { - const names = allItems(app.grid, app?.subgrids).reduce((acc, gridItem: GridItem) => { + const names = (allItems(app.grid, app?.subgrids) ?? []).reduce((acc, gridItem: GridItem) => { const { componentInput } = gridItem.data if ( @@ -384,7 +426,7 @@ export function getAllScriptNames(app: App): string[] { return acc }, [] as string[]) - const unusedNames = app.unusedInlineScripts.map((x) => x.name) + const unusedNames = app.unusedInlineScripts?.map((x) => x.name) ?? [] const backgroundNames = app.hiddenInlineScripts?.map((x) => x.name) ?? [] return [...names, ...unusedNames, ...backgroundNames] diff --git a/frontend/src/lib/components/common/modal/Modal.svelte b/frontend/src/lib/components/common/modal/Modal.svelte index 46593e49cd..47a2fe09a0 100644 --- a/frontend/src/lib/components/common/modal/Modal.svelte +++ b/frontend/src/lib/components/common/modal/Modal.svelte @@ -4,6 +4,7 @@ import Button from '../button/Button.svelte' import Badge from '../badge/Badge.svelte' import { twMerge } from 'tailwind-merge' + import CloseButton from '../CloseButton.svelte' export let title: string export let open: boolean = false @@ -11,6 +12,7 @@ export { c as class } export let style = '' export let cancelText: string | undefined = undefined + export let kind: 'button' | 'X' = 'button' const dispatch = createEventDispatcher() @@ -69,6 +71,10 @@ )} {style} > + {#if kind == 'X'} +
(open = false)} />
+ {/if}
@@ -81,21 +87,23 @@
-
- - -
+ {cancelText ?? 'Cancel'}Escape + +
+ {/if}
diff --git a/frontend/src/lib/components/common/table/AppRow.svelte b/frontend/src/lib/components/common/table/AppRow.svelte index 4e629dc205..12d13cbf38 100644 --- a/frontend/src/lib/components/common/table/AppRow.svelte +++ b/frontend/src/lib/components/common/table/AppRow.svelte @@ -23,8 +23,7 @@ Pen, Share, Trash, - Clipboard, - Loader2 + Clipboard } from 'lucide-svelte' import { goto as gotoUrl } from '$app/navigation' import { page } from '$app/stores' @@ -55,16 +54,14 @@ {#if menuOpen} - {#await import('$lib/components/apps/editor/AppJsonEditor.svelte')} - - {:then Module} + {#await import('$lib/components/apps/editor/AppJsonEditor.svelte') then Module} {/await} {/if} {/if} + {#if app.raw_app} + +
+ + Raw +
+ {/if}
@@ -98,7 +103,7 @@ size="xs" variant="border" startIcon={{ icon: Pen }} - href="{base}/apps/edit/{app.path}?nodraft=true" + href="{base}/apps{app.raw_app ? '_raw' : ''}/edit/{app.path}?nodraft=true" > Edit @@ -110,7 +115,7 @@ size="xs" variant="border" startIcon={{ icon: GitFork }} - href="{base}/apps/add?template={app.path}" + href="{base}/apps{app.raw_app ? '_raw' : ''}/add?template={app.path}" > Fork @@ -157,7 +162,7 @@ { displayName: 'Duplicate/Fork', icon: GitFork, - href: `${base}/apps/add?template=${path}`, + href: `${base}/apps${app.raw_app ? '_raw' : ''}/add?template=${path}`, hide: $userStore?.operator }, { diff --git a/frontend/src/lib/components/copilot/autocomplete/monaco-adapter.ts b/frontend/src/lib/components/copilot/autocomplete/monaco-adapter.ts index 8d421b450f..9952199fd2 100644 --- a/frontend/src/lib/components/copilot/autocomplete/monaco-adapter.ts +++ b/frontend/src/lib/components/copilot/autocomplete/monaco-adapter.ts @@ -154,22 +154,22 @@ const MAX_PATCHES = 4 export class Autocompletor { editor: meditor.IStandaloneCodeEditor language: string - scriptLang: ScriptLang | 'bunnative' + scriptLang: ScriptLang | 'bunnative' | 'jsx' | 'tsx' | 'json' viewZoneIds: string[] = [] decorationsCollection: meditor.IEditorDecorationsCollection | undefined = undefined visualChanges: VisualChange[] = [] modifiedCode: string = '' applyZone: | { - startLineNumber: number - endLineNumber: number - } + startLineNumber: number + endLineNumber: number + } | undefined = undefined lastChangePosition: | { - lineNumber: number - column: number - } + lineNumber: number + column: number + } | undefined = undefined abortController: AbortController | undefined = undefined @@ -180,19 +180,19 @@ export class Autocompletor { predictedChange: | { - position: { - lineNumber: number - column: number - } - distance: number - } + position: { + lineNumber: number + column: number + } + distance: number + } | undefined = undefined tabWidget: meditor.IContentWidget | undefined = undefined constructor( editor: meditor.IStandaloneCodeEditor, language: string, - scriptLang: ScriptLang | 'bunnative' + scriptLang: ScriptLang | 'bunnative' | 'jsx' | 'tsx' | 'json' ) { this.editor = editor this.language = language @@ -240,18 +240,18 @@ export class Autocompletor { let closestPosition: | { - lineNumber: number - column: number - } + lineNumber: number + column: number + } | undefined = undefined let closestDistance = Infinity for (const change of this.visualChanges) { if (change.type === 'deleted') { const distance = Math.min( Math.abs(change.range.startLine - position.lineNumber) + - Math.abs(change.range.startColumn - position.column) / 10000, + Math.abs(change.range.startColumn - position.column) / 10000, Math.abs(change.range.endLine - position.lineNumber) + - Math.abs(change.range.endColumn - position.column) / 10000 + Math.abs(change.range.endColumn - position.column) / 10000 ) if (distance < closestDistance) { closestDistance = distance diff --git a/frontend/src/lib/components/copilot/autocomplete/request.ts b/frontend/src/lib/components/copilot/autocomplete/request.ts index b670f5ed06..0d6700a2b4 100644 --- a/frontend/src/lib/components/copilot/autocomplete/request.ts +++ b/frontend/src/lib/components/copilot/autocomplete/request.ts @@ -64,7 +64,7 @@ export async function autocompleteRequest( modifiableSuffix: string suffix: string language: string - scriptLang: ScriptLang | 'bunnative' + scriptLang: ScriptLang | 'bunnative' | 'jsx' | 'tsx' | 'json' events: string[] }, abortController: AbortController diff --git a/frontend/src/lib/components/copilot/chat/ContextElementBadge.svelte b/frontend/src/lib/components/copilot/chat/ContextElementBadge.svelte index f07b4fefd8..b1d1a6dbdb 100644 --- a/frontend/src/lib/components/copilot/chat/ContextElementBadge.svelte +++ b/frontend/src/lib/components/copilot/chat/ContextElementBadge.svelte @@ -23,12 +23,11 @@ }>() - +
(showDelete = true)} on:mouseleave={() => (showDelete = false)} diff --git a/frontend/src/lib/components/copilot/chat/core.ts b/frontend/src/lib/components/copilot/chat/core.ts index ed5c968b88..ee0b67c710 100644 --- a/frontend/src/lib/components/copilot/chat/core.ts +++ b/frontend/src/lib/components/copilot/chat/core.ts @@ -93,7 +93,7 @@ export const SUPPORTED_CHAT_SCRIPT_LANGUAGES = [ ] export function getLangContext( - lang: ScriptLang | 'bunnative', + lang: ScriptLang | 'bunnative' | 'jsx' | 'tsx' | 'json', { allowResourcesFetch = false }: { allowResourcesFetch?: boolean } = {} ) { const tsContext = diff --git a/frontend/src/lib/components/flows/CreateActionsApp.svelte b/frontend/src/lib/components/flows/CreateActionsApp.svelte index c8260b0fc0..d68356e786 100644 --- a/frontend/src/lib/components/flows/CreateActionsApp.svelte +++ b/frontend/src/lib/components/flows/CreateActionsApp.svelte @@ -2,24 +2,16 @@ import { goto } from '$lib/navigation' import { base } from '$lib/base' - import { Button, FileInput } from '$lib/components/common' + import { Button } from '$lib/components/common' import Drawer from '$lib/components/common/drawer/Drawer.svelte' import DrawerContent from '$lib/components/common/drawer/DrawerContent.svelte' import { LayoutDashboard, Loader2, Plus } from 'lucide-svelte' import { importStore } from '../apps/store' - import { RawAppService } from '$lib/gen' - import { workspaceStore } from '$lib/stores' - import Path from '../Path.svelte' - import Tooltip from '../Tooltip.svelte' + import YAML from 'yaml' let drawer: Drawer | undefined = undefined - let rawAppDrawer: Drawer | undefined = undefined let pendingRaw: string = '' - let pendingCode: string = '' - let summary: string = '' - let path: string = '' - let pathError: string = '' let importType: 'yaml' | 'json' = 'yaml' @@ -28,19 +20,6 @@ await goto('/apps/add?nodraft=true') drawer?.closeDrawer?.() } - - async function importRawApp() { - await RawAppService.createRawApp({ - workspace: $workspaceStore!, - requestBody: { - path, - summary, - value: pendingCode - } - }) - await goto(`/apps/get_raw/0/${path}`) - rawAppDrawer?.closeDrawer?.() - } @@ -65,11 +44,11 @@ drawer?.toggleDrawer?.() importType = 'json' } - }, - { - label: 'Import app in React/Vue/Svelte', - onClick: () => rawAppDrawer?.toggleDrawer?.() } + // { + // label: 'Build app in React/Vue/Svelte (alpha)', + // onClick: () => goto('/apps_raw/add?nodraft=true') + // } ]} >
@@ -99,45 +78,3 @@ - - - - rawAppDrawer?.toggleDrawer?.()} - > - -

Summary

- - - -

IIFE JS code Bundle that contains an IIFE code that will mount itself to a "root" element. Any framework - or vanilla JS can be used to create an app and templates are provided for the major - frameworks: React/Vue/Svelte. In those frontend apps, it is possible to inline scripts - directly to be executed by windmill backend which makes it a convenient way of building apps - with both frontend and backend all-in-one.

- { - pendingCode = detail?.[0] - }} - /> - - - - -
-
diff --git a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte index b977e061a7..139223cb1c 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte @@ -358,11 +358,12 @@
- + {#if flowModule.value.type === 'rawscript'} {#if !noEditor} {#key flowModule.id} @@ -79,8 +79,8 @@ right: isLoop ? 'Break loop' : parentLoopId - ? 'Break parent loop module' - : 'Stop flow' + ' if condition met' + ? 'Break parent loop module' + : 'Stop flow' + ' if condition met' }} /> @@ -94,8 +94,8 @@ ? Array.isArray(result) && result.length > 0 ? result[result.length - 1] : result === NEVER_TESTED_THIS_FAR - ? result - : undefined + ? result + : undefined : result} {#if !parentLoopId && !isLoop} @@ -210,7 +211,8 @@ lang="javascript" bind:code={flowModule.stop_after_all_iters_if.expr} class="few-lines-editor" - extraLib={`declare const result = ${JSON.stringify(result)};`} + extraLib={`declare const result = ${JSON.stringify(result)};` + + `\ndeclare const flow_input = ${JSON.stringify(stepPropPicker.pickableProperties.flow_input)};`} />
diff --git a/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte b/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte index a9e7bd52c0..5d38c3e632 100644 --- a/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowConstantsItem.svelte @@ -8,7 +8,10 @@ $: settingsClass = classNames( 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center', - $selectedId == 'constants' ? 'border border-1 border-slate-800 dark:bg-white/5 dark:border-slate-400/60 dark:border-gray-400' : '' + $selectedId == 'constants' + ? 'border border-1 border-slate-800 dark:bg-white/5 dark:border-slate-400/60 dark:border-gray-400' + : '', + 'hover:!bg-surface-secondary active:!bg-surface' ) diff --git a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte index 84f59161da..fa70f4181b 100644 --- a/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowModuleSchemaItem.svelte @@ -53,6 +53,7 @@ export let path: string = '' export let modType: string | undefined = undefined export let bgColor: string = '' + export let bgHoverColor: string = '' export let concurrency: boolean = false export let retries: number | undefined = undefined export let warningMessage: string | undefined = undefined @@ -195,15 +196,17 @@
(hover = true)} on:mouseleave={() => (hover = false)} - on:pointerdown|preventDefault|stopPropagation + on:pointerdown|preventDefault|stopPropagation={() => dispatch('pointerdown')} >
{#if retry} @@ -338,6 +341,8 @@ {loopStatus} rightMargin bind:derivedHistoryOpen={historyOpen} + historyOffset={{ mainAxis: 12, crossAxis: -9 }} + class="p-1" /> {/if} diff --git a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte index 4f5c8d569c..6071962938 100644 --- a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte @@ -11,7 +11,8 @@ 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center h-[32px]', $selectedId?.startsWith('settings') ? 'border border-1 border-slate-800 dark:bg-white/5 dark:border-slate-400/60 dark:border-gray-400' - : '' + : '', + 'hover:!bg-surface-secondary active:!bg-surface' ) diff --git a/frontend/src/lib/components/flows/map/MapItem.svelte b/frontend/src/lib/components/flows/map/MapItem.svelte index dceff7d539..68a9328356 100644 --- a/frontend/src/lib/components/flows/map/MapItem.svelte +++ b/frontend/src/lib/components/flows/map/MapItem.svelte @@ -19,6 +19,7 @@ export let insertable: boolean export let annotation: string | undefined = undefined export let bgColor: string = '' + export let bgHoverColor: string = '' export let moving: string | undefined = undefined export let duration_ms: number | undefined = undefined @@ -129,6 +130,7 @@ }} {...itemProps} {bgColor} + {bgHoverColor} warningMessage={mod?.value?.type === 'forloopflow' && mod?.value?.iterator?.type === 'javascript' && mod?.value?.iterator?.expr === '' @@ -153,6 +155,7 @@ id={mod.id} label={mod.summary || 'Run one branch'} {bgColor} + {bgHoverColor} >
@@ -170,6 +173,7 @@ {...itemProps} label={mod.summary || `Run all branches${mod.value.parallel ? ' (parallel)' : ''}`} {bgColor} + {bgHoverColor} >
@@ -192,6 +196,7 @@ {...itemProps} modType={mod.value.type} {bgColor} + {bgHoverColor} label={mod.summary || (mod.id === 'preprocessor' ? 'Preprocessor' diff --git a/frontend/src/lib/components/flows/map/VirtualItem.svelte b/frontend/src/lib/components/flows/map/VirtualItem.svelte index 909a02a120..76e50ccd26 100644 --- a/frontend/src/lib/components/flows/map/VirtualItem.svelte +++ b/frontend/src/lib/components/flows/map/VirtualItem.svelte @@ -13,6 +13,7 @@ export let label: string | undefined = undefined export let bgColor: string = '' + export let bgHoverColor: string = '' export let selected: boolean export let selectable: boolean export let id: string | undefined = undefined @@ -36,6 +37,7 @@ {/if} diff --git a/frontend/src/lib/components/flows/map/VirtualItemWrapper.svelte b/frontend/src/lib/components/flows/map/VirtualItemWrapper.svelte index f1ce5ee1bb..7d636f02e2 100644 --- a/frontend/src/lib/components/flows/map/VirtualItemWrapper.svelte +++ b/frontend/src/lib/components/flows/map/VirtualItemWrapper.svelte @@ -9,6 +9,7 @@ export let id: string | undefined export let onTop: boolean = false export let bgColor: string + export let bgHoverColor: string = '' const dispatch = createEventDispatcher<{ insert: { @@ -28,18 +29,17 @@
{ if (selectable) { - if (id) { - dispatch('select', id) - } else { - dispatch('select', label || label || '') - } + dispatch('select', id || label || '') } }} on:mouseenter={() => { diff --git a/frontend/src/lib/components/flows/propPicker/OutputPicker.svelte b/frontend/src/lib/components/flows/propPicker/OutputPicker.svelte index acec192684..d30a3cc87b 100644 --- a/frontend/src/lib/components/flows/propPicker/OutputPicker.svelte +++ b/frontend/src/lib/components/flows/propPicker/OutputPicker.svelte @@ -80,6 +80,7 @@ fullScreenWidthOffset={2 * width} extraProps={{ 'data-prop-picker': true }} closeOnOtherPopoverOpen + class="outline-none" >
{ + e.preventDefault() + e.stopPropagation() + }} data-prop-picker title={`${isOpen ? 'Close' : 'Open'} step output`} > diff --git a/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte b/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte index 4b820e08f9..7f3bdc3b16 100644 --- a/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte +++ b/frontend/src/lib/components/flows/propPicker/OutputPickerInner.svelte @@ -57,6 +57,7 @@ export let disableMock: boolean = false export let disableHistory: boolean = false export let derivedHistoryOpen: boolean = false // derived from historyOpen + export let historyOffset = { mainAxis: 8, crossAxis: -4.5 } type SelectedJob = | Job @@ -211,7 +212,7 @@
@@ -234,8 +235,9 @@ { + isLoading = true + }, 200) + + try { + const fullJob = await detail.getFullJob() + if (fullJob) { + selectJob(fullJob) + togglePreview('job') + } + } finally { + // Clear the timeout if operation completed before 200ms + clearTimeout(loadingTimeout) + isLoading = false } - isLoading = false }} mockValue={mock?.return_value} mockEnabled={mock?.enabled} @@ -540,20 +556,20 @@ { - if (mock?.enabled) { - const newMock = { - enabled: true, - return_value: structuredClone(detail) + on:changeValue={({ detail }) => { + if (mock?.enabled) { + const newMock = { + enabled: true, + return_value: structuredClone(detail) + } + tmpMock = newMock } - tmpMock = newMock - } - }} - code={JSON.stringify( - mock?.enabled && mock.return_value ? mock.return_value : '', - null, - 2 - )} + }} + code={JSON.stringify( + mock?.enabled && mock.return_value ? mock.return_value : '', + null, + 2 + )} class="h-full" /> {/await} diff --git a/frontend/src/lib/components/flows/propPicker/StepHistory.svelte b/frontend/src/lib/components/flows/propPicker/StepHistory.svelte index 1fb5448801..c94876d343 100644 --- a/frontend/src/lib/components/flows/propPicker/StepHistory.svelte +++ b/frontend/src/lib/components/flows/propPicker/StepHistory.svelte @@ -27,7 +27,7 @@ const previousJobs = await JobService.listCompletedJobs({ workspace: $workspaceStore!, scriptPathExact: path === '' ? $pathStore + '/' + moduleId : path, - jobKinds: ['preview', 'script', 'flowpreview', 'flow'].join(','), + jobKinds: ['preview', 'script', 'flowpreview', 'flow', 'flowscript'].join(','), page, perPage }) diff --git a/frontend/src/lib/components/graph/renderers/nodes/BranchAllStart.svelte b/frontend/src/lib/components/graph/renderers/nodes/BranchAllStart.svelte index cc0bd3bd3b..fd3af74dbf 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/BranchAllStart.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/BranchAllStart.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import { X } from 'lucide-svelte' import type { GraphModuleState } from '../../model' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { FlowModule } from '$lib/gen' import type { GraphEventHandlers } from '../../graphBuilder' import { computeBorderStatus } from '../utils' @@ -33,14 +33,15 @@ selectable selected={data.selected} bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} borderColor={borderStatus ? getStateColor(borderStatus, darkMode) + (!darkMode ? '; border-width: 3px' : '') : undefined} on:select={() => { - data.eventHandlers.select(data.id) + setTimeout(() => data.eventHandlers.select(data.id)) }} on:insert={(e) => { - data.eventHandlers.insert(e.detail) + setTimeout(() => data.eventHandlers.insert(e.detail)) }} /> {#if data.insertable} diff --git a/frontend/src/lib/components/graph/renderers/nodes/BranchOneStart.svelte b/frontend/src/lib/components/graph/renderers/nodes/BranchOneStart.svelte index 92af67f6ff..d6ba058ba7 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/BranchOneStart.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/BranchOneStart.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import { X } from 'lucide-svelte' import type { GraphModuleState } from '../../model' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { FlowModule } from '$lib/gen' import type { GraphEventHandlers } from '../../graphBuilder' import { computeBorderStatus } from '../utils' @@ -26,7 +26,6 @@ 'branchone', data.flowModuleStates?.[data.id] ) - @@ -36,9 +35,10 @@ selectable selected={data.selected} bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} borderColor={borderStatus ? getStateColor(borderStatus, darkMode) : undefined} on:select={() => { - data.eventHandlers.select(data.id) + setTimeout(() => data?.eventHandlers?.select(data.id)) }} /> {#if data.insertable} diff --git a/frontend/src/lib/components/graph/renderers/nodes/ForLoopEndNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/ForLoopEndNode.svelte index 42b250dcbe..be6301beb7 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/ForLoopEndNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/ForLoopEndNode.svelte @@ -26,7 +26,7 @@ bgColor={getStateColor(undefined, darkMode)} borderColor={getStateColor(data.flowModuleStates?.[data.id]?.type, darkMode)} on:select={(e) => { - data?.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} /> {:else} @@ -38,7 +38,7 @@ bgColor={getStateColor(undefined, darkMode)} borderColor={getStateColor(data.flowModuleStates?.[data.id]?.type, darkMode)} on:select={(e) => { - data?.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} /> {/if} diff --git a/frontend/src/lib/components/graph/renderers/nodes/ForLoopStartNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/ForLoopStartNode.svelte index 278018360e..99e7f06b91 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/ForLoopStartNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/ForLoopStartNode.svelte @@ -2,7 +2,7 @@ import VirtualItem from '$lib/components/flows/map/VirtualItem.svelte' import NodeWrapper from './NodeWrapper.svelte' import type { FlowModule, FlowStatusModule } from '$lib/gen' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { GraphModuleState } from '../../model' import type { GraphEventHandlers } from '../../graphBuilder' import { getContext } from 'svelte' @@ -38,9 +38,11 @@ return {} } - function computeStatus(state: GraphModuleState | undefined): FlowStatusModule["type"] | undefined { + function computeStatus( + state: GraphModuleState | undefined + ): FlowStatusModule['type'] | undefined { if (state?.type == 'InProgress' || state?.type == 'Success' || state?.type == 'Failure') { - let r = state?.flow_jobs_success?.[state?.selectedForloopIndex ?? 0] + let r = state?.flow_jobs_success?.[state?.selectedForloopIndex ?? 0] if (r == undefined) return 'InProgress' return r ? 'Success' : 'InProgress' } @@ -77,9 +79,10 @@ id={data.id} hideId bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} borderColor={getStateColor(computeStatus(data.flowModuleStates?.[data.id]), darkMode)} on:select={(e) => { - data?.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} inputJson={filteredInput} prefix="flow_input" diff --git a/frontend/src/lib/components/graph/renderers/nodes/InputNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/InputNode.svelte index 247870d0a4..5a980696f8 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/InputNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/InputNode.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import type { GraphEventHandlers } from '../../graphBuilder' import type { FlowModule } from '$lib/gen' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import { getContext } from 'svelte' import type { Writable } from 'svelte/store' import InsertModuleButton from '$lib/components/flows/map/InsertModuleButton.svelte' @@ -73,11 +73,12 @@ selectable selected={$selectedId === 'Input'} bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} on:insert={(e) => { - data.eventHandlers?.insert(e.detail) + setTimeout(() => data?.eventHandlers?.insert(e.detail)) }} on:select={(e) => { - data.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} inputJson={topFlowInput} prefix="flow_input" diff --git a/frontend/src/lib/components/graph/renderers/nodes/ModuleNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/ModuleNode.svelte index 66139fb034..5003a38053 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/ModuleNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/ModuleNode.svelte @@ -5,7 +5,7 @@ import NodeWrapper from './NodeWrapper.svelte' import type { GraphEventHandlers } from '../../graphBuilder' import type { GraphModuleState } from '../../model' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' export let data: { offset: number @@ -41,7 +41,7 @@ selected: state?.selectedForloopIndex ?? 0, selectedManually: state?.selectedForLoopSetManually, flowJobsSuccess: state?.flow_jobs_success - } + } : (undefined as any) @@ -66,13 +66,14 @@ annotation={flowJobs && (data.module.value.type === 'forloopflow' || data.module.value.type === 'whileloopflow') ? 'Iteration: ' + - ((state?.selectedForloopIndex ?? 0) >= 0 + ((state?.selectedForloopIndex ?? 0) >= 0 ? (state?.selectedForloopIndex ?? 0) + 1 : state?.flow_jobs?.length) + - '/' + - (state?.iteration_total ?? '?') + '/' + + (state?.iteration_total ?? '?') : ''} bgColor={getStateColor(type, darkMode, true, state?.skipped)} + bgHoverColor={getStateHoverColor(type, darkMode, true, state?.skipped)} moving={data.moving} duration_ms={state?.duration_ms} retries={data.retries} @@ -93,7 +94,7 @@ data.eventHandlers.newBranch(data.module) }} on:select={(e) => { - data.eventHandlers.select(e.detail) + setTimeout(() => data.eventHandlers.select(e.detail)) }} on:selectedIteration={(e) => { data.eventHandlers.selectedIteration(e.detail, data.module.id) diff --git a/frontend/src/lib/components/graph/renderers/nodes/NoBranchNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/NoBranchNode.svelte index a87b5cbfb6..e8a740a220 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/NoBranchNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/NoBranchNode.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import type { FlowModule } from '$lib/gen' import type { GraphEventHandlers } from '../../graphBuilder' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { GraphModuleState } from '../../model' import { computeBorderStatus } from '../utils' @@ -31,9 +31,10 @@ selectable={true} selected={false} bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} borderColor={getStateColor(borderStatus, darkMode)} on:select={(e) => { - data?.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} /> diff --git a/frontend/src/lib/components/graph/renderers/nodes/ResultNode.svelte b/frontend/src/lib/components/graph/renderers/nodes/ResultNode.svelte index 5dbf32743b..d761a1e50d 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/ResultNode.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/ResultNode.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import type { FlowModule } from '$lib/gen' import type { GraphEventHandlers } from '../../graphBuilder' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { Writable } from 'svelte/store' import { getContext } from 'svelte' @@ -29,8 +29,12 @@ data.success == undefined ? undefined : data.success ? 'Success' : 'Failure', darkMode )} + bgHoverColor={getStateHoverColor( + data.success == undefined ? undefined : data.success ? 'Success' : 'Failure', + darkMode + )} on:select={(e) => { - data?.eventHandlers?.select(e.detail) + setTimeout(() => data?.eventHandlers?.select(e.detail)) }} /> diff --git a/frontend/src/lib/components/graph/renderers/nodes/SubflowBound.svelte b/frontend/src/lib/components/graph/renderers/nodes/SubflowBound.svelte index 587835da45..9cf594a98d 100644 --- a/frontend/src/lib/components/graph/renderers/nodes/SubflowBound.svelte +++ b/frontend/src/lib/components/graph/renderers/nodes/SubflowBound.svelte @@ -3,7 +3,7 @@ import NodeWrapper from './NodeWrapper.svelte' import { Minimize2 } from 'lucide-svelte' import type { GraphModuleState } from '../../model' - import { getStateColor } from '../../util' + import { getStateColor, getStateHoverColor } from '../../util' import type { FlowModule } from '$lib/gen' import type { GraphEventHandlers } from '../../graphBuilder' @@ -28,9 +28,10 @@ selectable selected={data.selected} bgColor={getStateColor(undefined, darkMode)} + bgHoverColor={getStateHoverColor(undefined, darkMode)} borderColor={undefined} on:select={() => { - data.eventHandlers.select(data.id) + setTimeout(() => data.eventHandlers?.select(data.id)) }} /> +
+ + +{/if} + + closeSaveDrawer()}> + {#if !onLatest} + + By deploying, you may overwrite changes made by other users. Press 'Deploy' to see diff. + +
+ {/if} + Summary +
+ + { + if (appPath == '' && summary?.length > 0 && !dirtyPath) { + path?.setName( + summary + .toLowerCase() + .replace(/[^a-z0-9_]/g, '_') + .replace(/-+/g, '_') + .replace(/^-|-$/g, '') + ) + } + }} + /> +
+
+ Deployment message +
+ + +
+
+ Path + + +
+ + +
+
+ {#if appPath == ''} + + Save this app once before you can publish it + + {:else} + + A viewer of the app will execute the runnables of the app on behalf of the publisher (you) + + It ensures that all required resources/runnable visible for publisher but not for viewer + at time of creating the app would prevent the execution of the app. To guarantee tight + security, a policy is computed at time of deployment of the app which only allow the + scripts/flows referred to in the app to be called on behalf of. Furthermore, static + parameters are not overridable. Hence, users will only be able to use the app as intended + by the publisher without risk for leaking resources not used in the app. + + + +
+ +

Public URL

+
+ +
+ { + policy.execution_mode = e.detail ? 'anonymous' : 'publisher' + setPublishState() + }} + /> +
+ +
+
+
Public URL
+
+ {#if secretUrl} + {@const href = `${window.location.origin}${base}/public/${$workspaceStore}/${secretUrl}`} + + {:else} + {/if} +
+ Share this url directly or embed it using an iframe (if requiring login, top-level domain + of embedding app must be the same as the one of Windmill) +
+ +
+ {#if !$enterpriseLicense} + + Custom path is an enterprise only feature. + +
+ {:else if !($userStore?.is_admin || $userStore?.is_super_admin)} + + Custom path can only be set by workspace admins + +
+ {/if} + { + customPath = detail ? '' : undefined + }} + checked={customPath !== undefined} + options={{ + right: 'Use a custom URL' + }} + disabled={!$enterpriseLicense || !($userStore?.is_admin || $userStore?.is_super_admin)} + /> + + {#if customPath !== undefined} +
+
Custom path
+
+ { + dirtyCustomPath = true + }} + /> +
+
Custom public URL
+
+ + +
{dirtyCustomPath ? customPathError : ''} +
+ {/if} +
+
+ + You will still need to deploy the app to make visible the latest changes + + + Embed this app in your own product to be used by your own users + {/if} +
+
+ + + (historyBrowserDrawerOpen = false)}> + + + + + { + jobs = [] + }} + on:clearErrors={() => { + console.log('todo clear errors') + }} + {jobs} + hasErrors={false} + {jobsById} + errorByComponent={{}} +/> + +
+
+ +
+ +
+ {#if newPath || newEditedPath} +
+
+ +
+ { + currentTarget.select() + }} + /> +
+ {/if} +
+ {#if $enterpriseLicense && appPath != ''} + + {/if} +
+ + + + + + + + + + +
+
diff --git a/frontend/src/lib/components/raw_apps/RawAppInlineScriptEditor.svelte b/frontend/src/lib/components/raw_apps/RawAppInlineScriptEditor.svelte new file mode 100644 index 0000000000..448406c008 --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppInlineScriptEditor.svelte @@ -0,0 +1,219 @@ + + +{#if inlineScript} + {#if inlineScript.language != 'frontend'} + { + dispatch('createScriptFromInlineScript') + drawerIsOpen = false + }} + /> + {/if} +
+
+ {#if name !== undefined} +
+ { + // $app = $app + // if (stateId) { + // $stateId++ + // } + }} + /> +
+
+ {/if} +
+ {#if inlineScript} + + {/if} + { + acc[key] = obj.type === 'static' ? obj.value : undefined + return acc + }, {})} + /> + + + + +
+
+ + + +
+ {#if !drawerIsOpen && inlineScript.language != 'frontend'} + onRun()} + on:change={async (e) => { + if (inlineScript && inlineScript.language != 'frontend') { + if (inlineScript.lock != undefined) { + inlineScript.lock = undefined + } + const oldSchema = JSON.stringify(inlineScript.schema) + if (inlineScript.schema == undefined) { + inlineScript.schema = emptySchema() + } + await inferInlineScriptSchema(inlineScript?.language, e.detail, inlineScript.schema) + if (JSON.stringify(inlineScript.schema) != oldSchema) { + inlineScript = inlineScript + syncFields() + } + } + // $app = $app + }} + args={Object.entries(fields ?? {}).reduce((acc, [key, obj]) => { + acc[key] = obj.type === 'static' ? obj.value : undefined + return acc + }, {})} + /> + + + {/if} +
+
+{/if} diff --git a/frontend/src/lib/components/raw_apps/RawAppInlineScriptPanelList.svelte b/frontend/src/lib/components/raw_apps/RawAppInlineScriptPanelList.svelte new file mode 100644 index 0000000000..8bece2ea3a --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppInlineScriptPanelList.svelte @@ -0,0 +1,90 @@ + + + + +
+ { + dispatch('hidePanel') + }} + /> + + +
+
+
+
+
+ {#if Object.keys($runnables ?? {}).length > 0} + {#each Object.entries($runnables ?? {}) as [id, runnable]} + {#if runnable} + + {/if} + {/each} + {:else} +
No backend runnable
+ {/if} +
+
+
+
+ + diff --git a/frontend/src/lib/components/raw_apps/RawAppInlineScriptRunnable.svelte b/frontend/src/lib/components/raw_apps/RawAppInlineScriptRunnable.svelte new file mode 100644 index 0000000000..1c96d7b9c9 --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppInlineScriptRunnable.svelte @@ -0,0 +1,214 @@ + + + +{#if runnable?.type == 'runnableByPath' || (runnable?.type == 'runnableByName' && runnable.inlineScript)} + + + {#if runnable?.type === 'runnableByName' && runnable.inlineScript} + {#if runnable.inlineScript.language == 'frontend'} +
Frontend scripts not supported for raw apps
+ {:else} + + dispatch('createScriptFromInlineScript', runnable)} + {id} + bind:inlineScript={runnable.inlineScript} + bind:name={runnable.name} + bind:fields={runnable.fields} + isLoading={testIsLoading} + onRun={testPreview} + onCancel={async () => { + if (testJobLoader) { + await testJobLoader.cancelJob() + } + }} + on:delete + path={appPath} + /> + {/if} + {:else if runnable?.type == 'runnableByPath'} + fork(e.detail)} + on:delete + {id} + isLoading={testIsLoading} + onRun={testPreview} + onCancel={async () => { + if (testJobLoader) { + await testJobLoader.cancelJob() + } + }} + /> + {/if} +
+ + + Inputs + Test + + {#if selectedTab == 'inputs'} + {#if runnable?.fields} +
+ {#each Object.keys(runnable.fields) as k} + {@const meta = runnable.fields[k]} + + {/each} +
+ {:else} +
No inputs
+ {/if} + {:else if selectedTab == 'test'} + + + +
+ v.type == 'static') + .map(([k]) => k)} + schema={getSchema(runnable)} + bind:args + shouldCapitalize + /> +
+
+ + + +
+
+ {/if} +
+
+
+
+{:else} + onPick(e.detail)} + on:delete + showScriptPicker + on:new={(e) => { + runnable = { + type: 'runnableByName', + inlineScript: e.detail, + name: runnable?.name ?? 'Background Runnable' + } + }} + /> +{/if} diff --git a/frontend/src/lib/components/raw_apps/RawAppInlineScriptsPanel.svelte b/frontend/src/lib/components/raw_apps/RawAppInlineScriptsPanel.svelte new file mode 100644 index 0000000000..b3c00b5cc6 --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppInlineScriptsPanel.svelte @@ -0,0 +1,61 @@ + + + + + + + + {#if !selectedRunnable} +
+ Select a runnable on the left panel +
+ {:else if $runnables?.[selectedRunnable]} + {#key selectedRunnable} + { + createScriptFromInlineScript( + selectedRunnable ?? '', + e.detail, + $workspaceStore ?? '', + appPath + ) + }} + on:delete={() => { + runnables.update((runnables) => { + if (selectedRunnable) { + delete runnables[selectedRunnable] + } + selectedRunnable = undefined + return { ...runnables } + }) + }} + id={selectedRunnable} + bind:runnable={$runnables[selectedRunnable]} + />{/key} + {:else} +
+ No runnable at id {selectedRunnable} +
+ {/if} +
+
diff --git a/frontend/src/lib/components/raw_apps/RawAppInputsSpecEditor.svelte b/frontend/src/lib/components/raw_apps/RawAppInputsSpecEditor.svelte new file mode 100644 index 0000000000..7160917bcb --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppInputsSpecEditor.svelte @@ -0,0 +1,113 @@ + + +{#if !(resourceOnly && (fieldType !== 'object' || !format?.startsWith('resource-')))} +
+
+
+
+ + {customTitle + ? customTitle + : shouldCapitalize + ? capitalize(addWhitespaceBeforeCapitals(key)) + : key} + + {#if loading} + + {/if} + {#if tooltip || markdownTooltip} + + {tooltip} + + {/if} +
+ {#if displayType} +
+ {fieldType === 'array' && subFieldType + ? `${fieldTypeToTsType(subFieldType)}[]` + : fieldTypeToTsType(fieldType)} +
+ {/if} +
+ +
+ {#if componentInput?.type && allowTypeChange !== false} + + + + + {/if} +
+
+ + {#if componentInput?.type === 'static'} +
+ +
+ {:else if componentInput?.type === 'user' || componentInput?.type == undefined} + Field's value is a frontend input + {/if} + {#if componentInput?.type === 'user' && ((fieldType == 'object' && format?.startsWith('resource-') && format !== 'resource-s3_object') || fieldType == 'resource')} +
+ + Apps are executed on behalf of publishers. If you want to accept resources from user, you + need to enable this (potentially dangerous!) +
+ {/if} +
+{/if} diff --git a/frontend/src/lib/components/raw_apps/RawAppPreview.svelte b/frontend/src/lib/components/raw_apps/RawAppPreview.svelte new file mode 100644 index 0000000000..083fc41a8a --- /dev/null +++ b/frontend/src/lib/components/raw_apps/RawAppPreview.svelte @@ -0,0 +1,23 @@ + + + + + diff --git a/frontend/src/lib/components/raw_apps/utils.ts b/frontend/src/lib/components/raw_apps/utils.ts new file mode 100644 index 0000000000..7c088d0df8 --- /dev/null +++ b/frontend/src/lib/components/raw_apps/utils.ts @@ -0,0 +1,109 @@ +import type { Schema } from '$lib/common' +import { schemaToTsType } from '$lib/schema' +import { capitalize } from '$lib/utils' +import type { HiddenRunnable } from '../apps/types' + +export type RawApp = { + files: string[] +} + +export function htmlContent(workspace: string, version: number, ctx: any) { + return ` + + + + + App Preview + + + + +
+ + + + ` +} + +function removeStaticFields(schema: Schema, fields: Record): Schema { + const staticFields = Object.keys(fields).filter((k) => fields[k].type == 'static') + return { + ...schema, + properties: { + ...Object.fromEntries( + Object.entries(schema.properties ?? {}).filter(([k]) => !staticFields.includes(k)) + ) + } + } +} + +function hiddenRunnableToTsType(runnable: HiddenRunnable) { + if (runnable.type == 'runnableByName') { + if (runnable.inlineScript?.schema) { + return schemaToTsType(removeStaticFields(runnable.inlineScript?.schema, runnable.fields)) + } else { + return '{}' + } + } else if (runnable.type == 'runnableByPath') { + return schemaToTsType(removeStaticFields(runnable.schema, runnable.fields)) + } else { + return '{}' + } +} + +export function genWmillTs(runnables: Record) { + return `// THIS FILE IS READ-ONLY +// AND GENERATED AUTOMATICALLY FROM YOUR RUNNABLES + +${Object.entries(runnables) + .map(([k, v]) => `export type RunBg${capitalize(k)} = ${hiddenRunnableToTsType(v)}\n`) + + .join('\n')} + +export const runBg = { +${Object.keys(runnables) + .map((k) => ` ${k}: null as unknown as (data: RunBg${capitalize(k)}) => Promise`) + .join(',\n')} +} + +export const runBgAsync = { +${Object.keys(runnables) + .map((k) => ` ${k}: null as unknown as (data: RunBg${capitalize(k)}) => Promise`) + .join(',\n')} +} + + +export type Job = { + type: 'QueuedJob' | 'CompletedJob' + id: string + created_at: number + started_at: number | undefined + duration_ms: number + success: boolean + args: any + result: any +} + +/** +* Execute a job and wait for it to complete and return the completed job +* @param id +*/ +// @ts-ignore +export function waitJob(id: string): Promise { + // implementation passed when bundling/deploying + return null as unknown as Promise +} + +/** +* Get a job by id and return immediately with the current state of the job +* @param id +*/ +// @ts-ignore +export function getJob(id: string): Promise { + // implementation passed when bundling/deploying + return null as unknown as Promise +} +` +} diff --git a/frontend/src/lib/components/schema/SchemaFormDND.svelte b/frontend/src/lib/components/schema/SchemaFormDND.svelte index 11d86ebe97..f4adaa1dc8 100644 --- a/frontend/src/lib/components/schema/SchemaFormDND.svelte +++ b/frontend/src/lib/components/schema/SchemaFormDND.svelte @@ -13,7 +13,7 @@ export let onlyMaskPassword: boolean = false export let disablePortal: boolean = false export let disabled: boolean = false - export let schemaSkippedValues: string[] = [] + export let hiddenArgs: string[] = [] export let nestedParent: { label: string; nestedParent: any | undefined } | undefined = undefined export let disableDnd: boolean = false export let shouldDispatchChanges: boolean = false @@ -73,7 +73,7 @@ - import { workspaceStore, usersWorkspaceStore } from '$lib/stores' + import { workspaceStore, usersWorkspaceStore, workspaceColor } from '$lib/stores' import Button from '../common/button/Button.svelte' import { sendUserToast } from '$lib/toast' import { WorkspaceService } from '$lib/gen' @@ -7,25 +7,25 @@ import { Pen } from 'lucide-svelte' import Toggle from '$lib/components/Toggle.svelte' - let colorEnabled = false - let workspaceColor: string | undefined = undefined - let savedWorkspaceColor: string | undefined = undefined - let lastWorkspace: string | undefined = undefined + let { open = false } = $props<{ open?: boolean }>() - export let open = false + let colorEnabled = $state(false) + let editingColor = $state(undefined) + let lastWorkspace = $state(undefined) - $: $usersWorkspaceStore && $workspaceStore !== lastWorkspace && onWorkspaceChange() + $effect(() => { + if ($workspaceStore !== lastWorkspace) { + lastWorkspace = $workspaceStore + editingColor = $workspaceColor ?? undefined + colorEnabled = !!$workspaceColor + } + }) - function onWorkspaceChange() { - lastWorkspace = $workspaceStore - savedWorkspaceColor = $usersWorkspaceStore?.workspaces.find( - (w) => w.id === $workspaceStore - )?.color - workspaceColor = savedWorkspaceColor - } - - $: colorEnabled = !!workspaceColor - $: if (colorEnabled && !workspaceColor) generateRandomColor() + $effect(() => { + if (colorEnabled && !editingColor) { + generateRandomColor() + } + }) function generateRandomColor() { const randomColor = @@ -33,11 +33,11 @@ Math.floor(Math.random() * 16777215) .toString(16) .padStart(6, '0') - workspaceColor = randomColor + editingColor = randomColor } async function changeWorkspaceColor() { - const colorToSave = colorEnabled && workspaceColor ? workspaceColor : undefined + const colorToSave = colorEnabled && editingColor ? editingColor : undefined open = false await WorkspaceService.changeWorkspaceColor({ workspace: $workspaceStore!, @@ -47,7 +47,6 @@ }) usersWorkspaceStore.set(await WorkspaceService.listUserWorkspaces()) - savedWorkspaceColor = colorToSave sendUserToast(`Workspace color updated.`) } @@ -55,10 +54,10 @@

Workspace color

- {#if savedWorkspaceColor} + {#if $workspaceColor}
{:else} No color set @@ -76,9 +75,7 @@ }} />
-

- Color to identify the current workspace in the list of workspaces -

+

Color to identify the current workspace in the list of workspaces

@@ -88,12 +85,12 @@
{#if colorEnabled} - + {/if} diff --git a/frontend/src/lib/components/settings/ChangeWorkspaceName.svelte b/frontend/src/lib/components/settings/ChangeWorkspaceName.svelte index 52b9dfb2de..1fabd3b231 100644 --- a/frontend/src/lib/components/settings/ChangeWorkspaceName.svelte +++ b/frontend/src/lib/components/settings/ChangeWorkspaceName.svelte @@ -6,15 +6,21 @@ import Modal from '../common/modal/Modal.svelte' import { Pen } from 'lucide-svelte' - let newName = '' - let currentName = '' + let { open = false } = $props<{ open?: boolean }>() + + let newName = $state('') + let currentName = $state('') + + $effect(() => { + if ($workspaceStore) { + getWorkspaceName() + } + }) async function getWorkspaceName() { currentName = await WorkspaceService.getWorkspaceName({ workspace: $workspaceStore! }) } - getWorkspaceName() - async function renameWorkspace() { open = false await WorkspaceService.changeWorkspaceName({ @@ -28,8 +34,6 @@ newName = '' getWorkspaceName() } - - export let open = false
@@ -50,9 +54,7 @@ />
-

- Displayable name -

+

Displayable name

diff --git a/frontend/src/lib/components/sidebar/WorkspaceMenu.svelte b/frontend/src/lib/components/sidebar/WorkspaceMenu.svelte index c110f5df4f..f7e481b7cb 100644 --- a/frontend/src/lib/components/sidebar/WorkspaceMenu.svelte +++ b/frontend/src/lib/components/sidebar/WorkspaceMenu.svelte @@ -5,7 +5,8 @@ userStore, userWorkspaces, workspaceStore, - workspaceUsageStore + workspaceUsageStore, + workspaceColor } from '$lib/stores' import { Building, Plus, Settings } from 'lucide-svelte' import MenuButton from '$lib/components/sidebar/MenuButton.svelte' @@ -61,7 +62,7 @@ icon={Building} label={$workspaceStore ?? ''} {isCollapsed} - color={$userWorkspaces.find((w) => w.id === $workspaceStore)?.color} + color={$workspaceColor} {trigger} /> @@ -153,9 +154,7 @@ >{$workspaceUsageStore}/1000 free workspace execs
-
{/if} diff --git a/frontend/src/lib/components/triggers/CaptureWrapper.svelte b/frontend/src/lib/components/triggers/CaptureWrapper.svelte index d588a05df7..e767edce1c 100644 --- a/frontend/src/lib/components/triggers/CaptureWrapper.svelte +++ b/frontend/src/lib/components/triggers/CaptureWrapper.svelte @@ -352,6 +352,7 @@ bind:queue_url={args.queue_url} bind:aws_resource_path={args.aws_resource_path} bind:message_attributes={args.message_attributes} + bind:aws_auth_resource_type={args.aws_auth_resource_type} {showCapture} {captureInfo} bind:captureTable diff --git a/frontend/src/lib/components/triggers/TriggersWrapper.svelte b/frontend/src/lib/components/triggers/TriggersWrapper.svelte index 06decadd5e..7c971f46c1 100644 --- a/frontend/src/lib/components/triggers/TriggersWrapper.svelte +++ b/frontend/src/lib/components/triggers/TriggersWrapper.svelte @@ -93,6 +93,7 @@ bind:queue_url={args.queue_url} bind:aws_resource_path={args.aws_resource_path} bind:message_attributes={args.message_attributes} + bind:aws_auth_resource_type={args.aws_auth_resource_type} headless={true} can_write={true} showCapture={false} diff --git a/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte b/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte index d359085122..816dffd90f 100644 --- a/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte +++ b/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorConfigSection.svelte @@ -50,7 +50,6 @@ const DEFAULT_PUSH_CONFIG: PushConfig = { audience: '', authenticate: false, - base_endpoint } async function loadAllPubSubTopicsFromProject() { @@ -87,7 +86,7 @@ function getBaseUrl(captureInfo: CaptureInfo | undefined) { if (captureInfo) { - return `${location.origin}${base}/api/w/${$workspaceStore}/capture_u/gcp/${ + return `${window.location.origin}${base}/api/w/${$workspaceStore}/capture_u/gcp/${ captureInfo.isFlow ? 'flow' : 'script' }` } else { @@ -271,19 +270,6 @@
- - -

Enable Google Cloud authentication for push delivery using a verified token. + {#if delivery_config.authenticate} + + + + {/if}

{/if}
diff --git a/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorInner.svelte b/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorInner.svelte index 45a74ec93d..b59fb4c60f 100644 --- a/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorInner.svelte +++ b/frontend/src/lib/components/triggers/gcp/GcpTriggerEditorInner.svelte @@ -103,6 +103,7 @@ delivery_type = s.delivery_type subscription_id = s.subscription_id delivery_config = s.delivery_config + subscription_mode = s.subscription_mode is_flow = s.is_flow path = s.path enabled = s.enabled @@ -116,12 +117,12 @@ async function updateTrigger(): Promise { try { is_loading = true + const base_endpoint = `${window.location.origin}${base}` if (delivery_type === 'push') { if (!delivery_config) { sendUserToast('Must set route path when delivery type is push', true) return } - delivery_config.base_endpoint = `${window.location.origin}${base}` } else { delivery_config = undefined } @@ -131,13 +132,11 @@ path: initialPath, requestBody: { gcp_resource_path, - subscription_mode: { - subscription_mode, - subscription_id, - delivery_type, - delivery_config, - base_endpoint: `${window.location.origin}${base}` - }, + subscription_mode, + subscription_id, + delivery_type, + delivery_config, + base_endpoint, topic_id, path, script_path, @@ -151,13 +150,11 @@ workspace: $workspaceStore!, requestBody: { gcp_resource_path, - subscription_mode: { - subscription_mode, - subscription_id, - delivery_type, - delivery_config: delivery_config, - base_endpoint: `${window.location.origin}${base}` - }, + subscription_mode, + subscription_id, + delivery_type, + delivery_config, + base_endpoint, topic_id, path, script_path, @@ -281,7 +278,7 @@ bind:delivery_config bind:topic_id bind:subscription_mode - bind:path={path} + bind:path cloud_subscription_id={subscription_id} create_update_subscription_id={subscription_id} {can_write} diff --git a/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte index 29172d031a..00018eca3c 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresEditorConfigSection.svelte @@ -35,10 +35,9 @@ export let publication: PublicationData = DEFAULT_PUBLICATION function updateValidity(publication: PublicationData) { - console.log({ publication }) isValid = !emptyString(postgres_resource_path) && - (!publication.table_to_track || publication.table_to_track.length === 0) + (!publication.table_to_track || publication.table_to_track.length !== 0) } $: updateValidity(publication) diff --git a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte index 4956808907..988152f00c 100644 --- a/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte +++ b/frontend/src/lib/components/triggers/postgres/PostgresTriggerEditorInner.svelte @@ -45,7 +45,7 @@ let postgres_resource_path = '' let publication_name: string = '' let replication_slot_name: string = '' - let relations: Relations[] = [] + let relations: Relations[] | undefined = [] let transaction_to_track: string[] = [] let language: Language = 'Typescript' let loading = false @@ -247,11 +247,10 @@ } const getTemplateScript = async () => { - if (relations.length === 0 || emptyString(postgres_resource_path)) { + if (!relations || relations.length === 0 || emptyString(postgres_resource_path)) { sendUserToast('You must pick a database resource and choose at least one schema', true) return } - try { loading = true let templateId = await PostgresTriggerService.createTemplateScript({ @@ -359,7 +358,7 @@ allowRefresh /> - {#if script_path === undefined && is_flow === false} + {#if emptyStringTrimmed(script_path) && is_flow === false}
{/each}
- {:else if relations} + {/if} + {#if selected === 'specific'}
-
-

- Select an AWS resource with credentials to authenticate your account. +

+

+ Select an AWS resource to authenticate your account.

- + + { + aws_resource_path = '' + }} let:item> + + + + + {#if aws_auth_resource_type === 'credentials'} + + {:else if aws_auth_resource_type === 'oidc'} + + {/if} {#if isValid} {/if} diff --git a/frontend/src/lib/components/triggers/sqs/SqsTriggerEditorInner.svelte b/frontend/src/lib/components/triggers/sqs/SqsTriggerEditorInner.svelte index 27e2c2068d..197f5382bd 100644 --- a/frontend/src/lib/components/triggers/sqs/SqsTriggerEditorInner.svelte +++ b/frontend/src/lib/components/triggers/sqs/SqsTriggerEditorInner.svelte @@ -9,7 +9,7 @@ import { Loader2, Save } from 'lucide-svelte' import Label from '$lib/components/Label.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { SqsTriggerService } from '$lib/gen' + import { SqsTriggerService, type AwsAuthResourceType } from '$lib/gen' import SqsTriggerEditorConfigSection from './SqsTriggerEditorConfigSection.svelte' import Section from '$lib/components/Section.svelte' import ScriptPicker from '$lib/components/ScriptPicker.svelte' @@ -32,6 +32,7 @@ let aws_resource_path: string = '' let queue_url = '' let message_attributes: string[] = [] + let aws_auth_resource_type: AwsAuthResourceType = 'credentials' let isValid = false const dispatch = createEventDispatcher() @@ -70,6 +71,7 @@ queue_url = defaultValues?.queue_url ?? '' path = '' message_attributes = defaultValues?.message_attributes ?? [] + aws_auth_resource_type = defaultValues?.aws_auth_resource_type ?? 'credentials' initialPath = '' edit = false dirtyPath = false @@ -92,6 +94,7 @@ message_attributes = s.message_attributes ?? [] path = s.path enabled = s.enabled + aws_auth_resource_type = s.aws_auth_resource_type can_write = canWrite(s.path, s.extra_perms, $userStore) } catch (error) { sendUserToast(`Could not load SQS trigger: ${error.body}`, true) @@ -106,6 +109,7 @@ requestBody: { path, script_path, + aws_auth_resource_type, enabled, is_flow, queue_url, @@ -121,6 +125,7 @@ enabled: true, aws_resource_path, queue_url, + aws_auth_resource_type, path, script_path, is_flow, @@ -232,6 +237,7 @@ bind:queue_url bind:message_attributes bind:aws_resource_path + bind:aws_auth_resource_type {can_write} headless={true} /> diff --git a/frontend/src/lib/components/tutorials/utils.ts b/frontend/src/lib/components/tutorials/utils.ts index f1cd29691b..89a49c5fdd 100644 --- a/frontend/src/lib/components/tutorials/utils.ts +++ b/frontend/src/lib/components/tutorials/utils.ts @@ -221,7 +221,7 @@ export function isAppTainted(app: App) { return !deepEqual(app, emptyApp) } else { // For older apps, - return !(app.grid.length === 0 && app.hiddenInlineScripts?.length === 0) + return !(app.grid?.length === 0 && app.hiddenInlineScripts?.length === 0) } } diff --git a/frontend/src/lib/components/vscode.ts b/frontend/src/lib/components/vscode.ts index 7013945a3d..c0ee224282 100644 --- a/frontend/src/lib/components/vscode.ts +++ b/frontend/src/lib/components/vscode.ts @@ -3,13 +3,13 @@ import { initServices } from 'monaco-languageclient/vscode/services' // import getTextmateServiceOverride from '@codingame/monaco-vscode-textmate-service-override' import getMonarchServiceOverride from '@codingame/monaco-vscode-monarch-service-override' import '@codingame/monaco-vscode-standalone-typescript-language-features' -import { editor as meditor } from 'monaco-editor/esm/vs/editor/editor.api' import getConfigurationServiceOverride from '@codingame/monaco-vscode-configuration-service-override' +import { editor as meditor } from 'monaco-editor/esm/vs/editor/editor.api' export let isInitialized = false export let isInitializing = false -export async function initializeVscode(caller?: string) { +export async function initializeVscode(caller?: string, htmlContainer?: HTMLElement) { if (!isInitialized && !isInitializing) { console.log(`Initializing vscode-api from ${caller ?? 'unknown'}`) isInitializing = true @@ -30,6 +30,7 @@ export async function initializeVscode(caller?: string) { }) } }) + isInitialized = true meditor.defineTheme('nord', { base: 'vs-dark', diff --git a/frontend/src/lib/editorUtils.ts b/frontend/src/lib/editorUtils.ts index 677fec82ed..fb4f8782ee 100644 --- a/frontend/src/lib/editorUtils.ts +++ b/frontend/src/lib/editorUtils.ts @@ -49,8 +49,12 @@ export function createLongHash() { export function langToExt(lang: string): string { switch (lang) { + case 'tsx': + return 'tsx' case 'javascript': - return 'ts' + return 'js' + case 'jsx': + return 'js' case 'bunnative': return 'ts' case 'json': @@ -89,6 +93,59 @@ export function langToExt(lang: string): string { return 'nu' case 'java': return 'java' + case 'svelte': + return 'svelte' + case 'vue': + return 'vue' + default: + return 'unknown' + } +} + +export function extToLang(ext: string) { + switch (ext) { + case 'tsx': + return 'typescript' + case 'ts': + return 'typescript' + case 'js': + return 'javascript' + case 'jsx': + return 'javascript' + case 'json': + return 'json' + case 'sql': + return 'sql' + case 'yaml': + return 'yaml' + case 'py': + return 'python' + case 'go': + return 'go' + case 'sh': + return 'bash' + case 'ps1': + return 'powershell' + case 'php': + return 'php' + case 'rs': + return 'rust' + case 'gql': + return 'graphql' + case 'css': + return 'css' + case 'yml': + return 'ansible' + case 'cs': + return 'csharp' + case 'svelte': + return 'svelte' + case 'vue': + return 'vue' + case 'nu': + return 'nu' + case 'java': + return 'java' // for related places search: ADD_NEW_LANG default: return 'unknown' diff --git a/frontend/src/lib/monaco_workers/graphql.worker.bundle.js b/frontend/src/lib/monaco_workers/graphql.worker.bundle.js index dc005db039..5884d0688f 100644 --- a/frontend/src/lib/monaco_workers/graphql.worker.bundle.js +++ b/frontend/src/lib/monaco_workers/graphql.worker.bundle.js @@ -1,6251 +1,54 @@ -'use strict' -;(() => { - var t4 = Object.create - var Ju = Object.defineProperty - var n4 = Object.getOwnPropertyDescriptor - var r4 = Object.getOwnPropertyNames - var i4 = Object.getPrototypeOf, - s4 = Object.prototype.hasOwnProperty - var Ff = ((e) => - typeof require < 'u' - ? require - : typeof Proxy < 'u' - ? new Proxy(e, { get: (t, n) => (typeof require < 'u' ? require : t)[n] }) - : e)(function (e) { - if (typeof require < 'u') return require.apply(this, arguments) - throw Error('Dynamic require of "' + e + '" is not supported') - }) - var o4 = (e, t) => () => (e && (t = e((e = 0))), t) - var Kn = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), - a4 = (e, t) => { - for (var n in t) Ju(e, n, { get: t[n], enumerable: !0 }) - }, - u4 = (e, t, n, r) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of r4(t)) - !s4.call(e, i) && - i !== n && - Ju(e, i, { get: () => t[i], enumerable: !(r = n4(t, i)) || r.enumerable }) - return e - } - var Xu = (e, t, n) => ( - (n = e != null ? t4(i4(e)) : {}), - u4(t || !e || !e.__esModule ? Ju(n, 'default', { value: e, enumerable: !0 }) : n, e) - ) - var Z0 = Kn((yI, Du) => { - 'use strict' - function K0(e, t) { - if (e != null) return e - var n = new Error(t !== void 0 ? t : 'Got unexpected ' + e) - throw ((n.framesToPop = 1), n) - } - Du.exports = K0 - Du.exports.default = K0 - Object.defineProperty(Du.exports, '__esModule', { value: !0 }) - }) - var go = Kn((bR, lm) => { - 'use strict' - var Tn = '\\\\/', - sm = `[^${Tn}]`, - qn = '\\.', - uD = '\\+', - lD = '\\?', - Au = '\\/', - cD = '(?=.)', - om = '[^/]', - b1 = `(?:${Au}|$)`, - am = `(?:^|${Au})`, - E1 = `${qn}{1,2}${b1}`, - fD = `(?!${qn})`, - dD = `(?!${am}${E1})`, - pD = `(?!${qn}{0,1}${b1})`, - hD = `(?!${E1})`, - mD = `[^.${Au}]`, - gD = `${om}*?`, - DD = '/', - um = { - DOT_LITERAL: qn, - PLUS_LITERAL: uD, - QMARK_LITERAL: lD, - SLASH_LITERAL: Au, - ONE_CHAR: cD, - QMARK: om, - END_ANCHOR: b1, - DOTS_SLASH: E1, - NO_DOT: fD, - NO_DOTS: dD, - NO_DOT_SLASH: pD, - NO_DOTS_SLASH: hD, - QMARK_NO_DOT: mD, - STAR: gD, - START_ANCHOR: am, - SEP: DD - }, - vD = { - ...um, - SLASH_LITERAL: `[${Tn}]`, - QMARK: sm, - STAR: `${sm}*?`, - DOTS_SLASH: `${qn}{1,2}(?:[${Tn}]|$)`, - NO_DOT: `(?!${qn})`, - NO_DOTS: `(?!(?:^|[${Tn}])${qn}{1,2}(?:[${Tn}]|$))`, - NO_DOT_SLASH: `(?!${qn}{0,1}(?:[${Tn}]|$))`, - NO_DOTS_SLASH: `(?!${qn}{1,2}(?:[${Tn}]|$))`, - QMARK_NO_DOT: `[^.${Tn}]`, - START_ANCHOR: `(?:^|[${Tn}])`, - END_ANCHOR: `(?:[${Tn}]|$)`, - SEP: '\\' - }, - bD = { - alnum: 'a-zA-Z0-9', - alpha: 'a-zA-Z', - ascii: '\\x00-\\x7F', - blank: ' \\t', - cntrl: '\\x00-\\x1F\\x7F', - digit: '0-9', - graph: '\\x21-\\x7E', - lower: 'a-z', - print: '\\x20-\\x7E ', - punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~', - space: ' \\t\\r\\n\\v\\f', - upper: 'A-Z', - word: 'A-Za-z0-9_', - xdigit: 'A-Fa-f0-9' - } - lm.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE: bD, - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - REPLACEMENTS: { '***': '*', '**/**': '**', '**/**/**': '**' }, - CHAR_0: 48, - CHAR_9: 57, - CHAR_UPPERCASE_A: 65, - CHAR_LOWERCASE_A: 97, - CHAR_UPPERCASE_Z: 90, - CHAR_LOWERCASE_Z: 122, - CHAR_LEFT_PARENTHESES: 40, - CHAR_RIGHT_PARENTHESES: 41, - CHAR_ASTERISK: 42, - CHAR_AMPERSAND: 38, - CHAR_AT: 64, - CHAR_BACKWARD_SLASH: 92, - CHAR_CARRIAGE_RETURN: 13, - CHAR_CIRCUMFLEX_ACCENT: 94, - CHAR_COLON: 58, - CHAR_COMMA: 44, - CHAR_DOT: 46, - CHAR_DOUBLE_QUOTE: 34, - CHAR_EQUAL: 61, - CHAR_EXCLAMATION_MARK: 33, - CHAR_FORM_FEED: 12, - CHAR_FORWARD_SLASH: 47, - CHAR_GRAVE_ACCENT: 96, - CHAR_HASH: 35, - CHAR_HYPHEN_MINUS: 45, - CHAR_LEFT_ANGLE_BRACKET: 60, - CHAR_LEFT_CURLY_BRACE: 123, - CHAR_LEFT_SQUARE_BRACKET: 91, - CHAR_LINE_FEED: 10, - CHAR_NO_BREAK_SPACE: 160, - CHAR_PERCENT: 37, - CHAR_PLUS: 43, - CHAR_QUESTION_MARK: 63, - CHAR_RIGHT_ANGLE_BRACKET: 62, - CHAR_RIGHT_CURLY_BRACE: 125, - CHAR_RIGHT_SQUARE_BRACKET: 93, - CHAR_SEMICOLON: 59, - CHAR_SINGLE_QUOTE: 39, - CHAR_SPACE: 32, - CHAR_TAB: 9, - CHAR_UNDERSCORE: 95, - CHAR_VERTICAL_LINE: 124, - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - extglobChars(e) { - return { - '!': { type: 'negate', open: '(?:(?!(?:', close: `))${e.STAR})` }, - '?': { type: 'qmark', open: '(?:', close: ')?' }, - '+': { type: 'plus', open: '(?:', close: ')+' }, - '*': { type: 'star', open: '(?:', close: ')*' }, - '@': { type: 'at', open: '(?:', close: ')' } - } - }, - globChars(e) { - return e === !0 ? vD : um - } - } - }) - var Fu = Kn((Vt) => { - 'use strict' - var { - REGEX_BACKSLASH: ED, - REGEX_REMOVE_BACKSLASH: yD, - REGEX_SPECIAL_CHARS: xD, - REGEX_SPECIAL_CHARS_GLOBAL: _D - } = go() - Vt.isObject = (e) => e !== null && typeof e == 'object' && !Array.isArray(e) - Vt.hasRegexChars = (e) => xD.test(e) - Vt.isRegexChar = (e) => e.length === 1 && Vt.hasRegexChars(e) - Vt.escapeRegex = (e) => e.replace(_D, '\\$1') - Vt.toPosixSlashes = (e) => e.replace(ED, '/') - Vt.removeBackslashes = (e) => e.replace(yD, (t) => (t === '\\' ? '' : t)) - Vt.supportsLookbehinds = () => { - let e = process.version.slice(1).split('.').map(Number) - return (e.length === 3 && e[0] >= 9) || (e[0] === 8 && e[1] >= 10) - } - Vt.escapeLast = (e, t, n) => { - let r = e.lastIndexOf(t, n) - return r === -1 - ? e - : e[r - 1] === '\\' - ? Vt.escapeLast(e, t, r - 1) - : `${e.slice(0, r)}\\${e.slice(r)}` - } - Vt.removePrefix = (e, t = {}) => { - let n = e - return n.startsWith('./') && ((n = n.slice(2)), (t.prefix = './')), n - } - Vt.wrapOutput = (e, t = {}, n = {}) => { - let r = n.contains ? '' : '^', - i = n.contains ? '' : '$', - s = `${r}(?:${e})${i}` - return t.negated === !0 && (s = `(?:^(?!${s}).*$)`), s - } - Vt.basename = (e, { windows: t } = {}) => - t ? e.replace(/[\\/]$/, '').replace(/.*[\\/]/, '') : e.replace(/\/$/, '').replace(/.*\//, '') - }) - var vm = Kn((yR, Dm) => { - 'use strict' - var cm = Fu(), - { - CHAR_ASTERISK: y1, - CHAR_AT: ND, - CHAR_BACKWARD_SLASH: Do, - CHAR_COMMA: TD, - CHAR_DOT: x1, - CHAR_EXCLAMATION_MARK: fm, - CHAR_FORWARD_SLASH: gm, - CHAR_LEFT_CURLY_BRACE: _1, - CHAR_LEFT_PARENTHESES: N1, - CHAR_LEFT_SQUARE_BRACKET: SD, - CHAR_PLUS: AD, - CHAR_QUESTION_MARK: dm, - CHAR_RIGHT_CURLY_BRACE: FD, - CHAR_RIGHT_PARENTHESES: pm, - CHAR_RIGHT_SQUARE_BRACKET: wD - } = go(), - hm = (e) => e === gm || e === Do, - mm = (e) => { - e.isPrefix !== !0 && (e.depth = e.isGlobstar ? 1 / 0 : 1) - }, - LD = (e, t) => { - let n = t || {}, - r = e.length - 1, - i = n.parts === !0 || n.scanToEnd === !0, - s = [], - o = [], - a = [], - u = e, - l = -1, - c = 0, - d = 0, - h = !1, - m = !1, - g = !1, - v = !1, - N = !1, - _ = !1, - w = !1, - C = !1, - S = !1, - k = 0, - M, - I, - B = { value: '', depth: 0, isGlob: !1 }, - L = () => l >= r, - A = () => u.charCodeAt(l + 1), - X = () => ((M = I), u.charCodeAt(++l)) - for (; l < r; ) { - I = X() - let Q - if (I === Do) { - ;(w = B.backslashes = !0), (I = X()), I === _1 && (_ = !0) - continue - } - if (_ === !0 || I === _1) { - for (k++; L() !== !0 && (I = X()); ) { - if (I === Do) { - ;(w = B.backslashes = !0), X() - continue - } - if (I === _1) { - k++ - continue - } - if (_ !== !0 && I === x1 && (I = X()) === x1) { - if (((h = B.isBrace = !0), (g = B.isGlob = !0), (S = !0), i === !0)) continue - break - } - if (_ !== !0 && I === TD) { - if (((h = B.isBrace = !0), (g = B.isGlob = !0), (S = !0), i === !0)) continue - break - } - if (I === FD && (k--, k === 0)) { - ;(_ = !1), (h = B.isBrace = !0), (S = !0) - break - } - } - if (i === !0) continue - break - } - if (I === gm) { - if ((s.push(l), o.push(B), (B = { value: '', depth: 0, isGlob: !1 }), S === !0)) - continue - if (M === x1 && l === c + 1) { - c += 2 - continue - } - d = l + 1 - continue - } - if ( - n.noext !== !0 && - (I === AD || I === ND || I === y1 || I === dm || I === fm) === !0 && - A() === N1 - ) { - if (((g = B.isGlob = !0), (v = B.isExtglob = !0), (S = !0), i === !0)) { - for (; L() !== !0 && (I = X()); ) { - if (I === Do) { - ;(w = B.backslashes = !0), (I = X()) - continue - } - if (I === pm) { - ;(g = B.isGlob = !0), (S = !0) - break - } - } - continue - } - break - } - if (I === y1) { - if ((M === y1 && (N = B.isGlobstar = !0), (g = B.isGlob = !0), (S = !0), i === !0)) - continue - break - } - if (I === dm) { - if (((g = B.isGlob = !0), (S = !0), i === !0)) continue - break - } - if (I === SD) - for (; L() !== !0 && (Q = X()); ) { - if (Q === Do) { - ;(w = B.backslashes = !0), X() - continue - } - if (Q === wD) { - if (((m = B.isBracket = !0), (g = B.isGlob = !0), (S = !0), i === !0)) continue - break - } - } - if (n.nonegate !== !0 && I === fm && l === c) { - ;(C = B.negated = !0), c++ - continue - } - if (n.noparen !== !0 && I === N1) { - if (((g = B.isGlob = !0), i === !0)) { - for (; L() !== !0 && (I = X()); ) { - if (I === N1) { - ;(w = B.backslashes = !0), (I = X()) - continue - } - if (I === pm) { - S = !0 - break - } - } - continue - } - break - } - if (g === !0) { - if (((S = !0), i === !0)) continue - break - } - } - n.noext === !0 && ((v = !1), (g = !1)) - let z = u, - fe = '', - F = '' - c > 0 && ((fe = u.slice(0, c)), (u = u.slice(c)), (d -= c)), - z && g === !0 && d > 0 - ? ((z = u.slice(0, d)), (F = u.slice(d))) - : g === !0 - ? ((z = ''), (F = u)) - : (z = u), - z && - z !== '' && - z !== '/' && - z !== u && - hm(z.charCodeAt(z.length - 1)) && - (z = z.slice(0, -1)), - n.unescape === !0 && - (F && (F = cm.removeBackslashes(F)), z && w === !0 && (z = cm.removeBackslashes(z))) - let T = { - prefix: fe, - input: e, - start: c, - base: z, - glob: F, - isBrace: h, - isBracket: m, - isGlob: g, - isExtglob: v, - isGlobstar: N, - negated: C - } - if ( - (n.tokens === !0 && ((T.maxDepth = 0), hm(I) || o.push(B), (T.tokens = o)), - n.parts === !0 || n.tokens === !0) - ) { - let Q - for (let $ = 0; $ < s.length; $++) { - let ee = Q ? Q + 1 : c, - ne = s[$], - se = e.slice(ee, ne) - n.tokens && - ($ === 0 && c !== 0 ? ((o[$].isPrefix = !0), (o[$].value = fe)) : (o[$].value = se), - mm(o[$]), - (T.maxDepth += o[$].depth)), - ($ !== 0 || se !== '') && a.push(se), - (Q = ne) - } - if (Q && Q + 1 < e.length) { - let $ = e.slice(Q + 1) - a.push($), - n.tokens && - ((o[o.length - 1].value = $), - mm(o[o.length - 1]), - (T.maxDepth += o[o.length - 1].depth)) - } - ;(T.slashes = s), (T.parts = a) - } - return T - } - Dm.exports = LD - }) - var xm = Kn((xR, ym) => { - 'use strict' - var wu = go(), - cn = Fu(), - { - MAX_LENGTH: Lu, - POSIX_REGEX_SOURCE: CD, - REGEX_NON_SPECIAL_CHARS: ID, - REGEX_SPECIAL_CHARS_BACKREF: RD, - REPLACEMENTS: bm - } = wu, - kD = (e, t) => { - if (typeof t.expandRange == 'function') return t.expandRange(...e, t) - e.sort() - let n = `[${e.join('-')}]` - try { - new RegExp(n) - } catch { - return e.map((i) => cn.escapeRegex(i)).join('..') - } - return n - }, - is = (e, t) => `Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`, - Em = (e, t) => { - if (typeof e != 'string') throw new TypeError('Expected a string') - e = bm[e] || e - let n = { ...t }, - r = typeof n.maxLength == 'number' ? Math.min(Lu, n.maxLength) : Lu, - i = e.length - if (i > r) throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`) - let s = { type: 'bos', value: '', output: n.prepend || '' }, - o = [s], - a = n.capture ? '' : '?:', - u = wu.globChars(n.windows), - l = wu.extglobChars(u), - { - DOT_LITERAL: c, - PLUS_LITERAL: d, - SLASH_LITERAL: h, - ONE_CHAR: m, - DOTS_SLASH: g, - NO_DOT: v, - NO_DOT_SLASH: N, - NO_DOTS_SLASH: _, - QMARK: w, - QMARK_NO_DOT: C, - STAR: S, - START_ANCHOR: k - } = u, - M = (H) => `(${a}(?:(?!${k}${H.dot ? g : c}).)*?)`, - I = n.dot ? '' : v, - B = n.dot ? w : C, - L = n.bash === !0 ? M(n) : S - n.capture && (L = `(${L})`), typeof n.noext == 'boolean' && (n.noextglob = n.noext) - let A = { - input: e, - index: -1, - start: 0, - dot: n.dot === !0, - consumed: '', - output: '', - prefix: '', - backtrack: !1, - negated: !1, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: !1, - tokens: o - } - ;(e = cn.removePrefix(e, A)), (i = e.length) - let X = [], - z = [], - fe = [], - F = s, - T, - Q = () => A.index === i - 1, - $ = (A.peek = (H = 1) => e[A.index + H]), - ee = (A.advance = () => e[++A.index]), - ne = () => e.slice(A.index + 1), - se = (H = '', Ne = 0) => { - ;(A.consumed += H), (A.index += Ne) - }, - Ie = (H) => { - ;(A.output += H.output != null ? H.output : H.value), se(H.value) - }, - P = () => { - let H = 1 - for (; $() === '!' && ($(2) !== '(' || $(3) === '?'); ) ee(), A.start++, H++ - return H % 2 === 0 ? !1 : ((A.negated = !0), A.start++, !0) - }, - Z = (H) => { - A[H]++, fe.push(H) - }, - J = (H) => { - A[H]--, fe.pop() - }, - G = (H) => { - if (F.type === 'globstar') { - let Ne = A.braces > 0 && (H.type === 'comma' || H.type === 'brace'), - Y = H.extglob === !0 || (X.length && (H.type === 'pipe' || H.type === 'paren')) - H.type !== 'slash' && - H.type !== 'paren' && - !Ne && - !Y && - ((A.output = A.output.slice(0, -F.output.length)), - (F.type = 'star'), - (F.value = '*'), - (F.output = L), - (A.output += F.output)) - } - if ( - (X.length && H.type !== 'paren' && !l[H.value] && (X[X.length - 1].inner += H.value), - (H.value || H.output) && Ie(H), - F && F.type === 'text' && H.type === 'text') - ) { - ;(F.value += H.value), (F.output = (F.output || '') + H.value) - return - } - ;(H.prev = F), o.push(H), (F = H) - }, - _e = (H, Ne) => { - let Y = { ...l[Ne], conditions: 1, inner: '' } - ;(Y.prev = F), (Y.parens = A.parens), (Y.output = A.output) - let de = (n.capture ? '(' : '') + Y.open - Z('parens'), - G({ type: H, value: Ne, output: A.output ? '' : m }), - G({ type: 'paren', extglob: !0, value: ee(), output: de }), - X.push(Y) - }, - Re = (H) => { - let Ne = H.close + (n.capture ? ')' : '') - if (H.type === 'negate') { - let Y = L - H.inner && H.inner.length > 1 && H.inner.includes('/') && (Y = M(n)), - (Y !== L || Q() || /^\)+$/.test(ne())) && (Ne = H.close = `)$))${Y}`), - H.prev.type === 'bos' && Q() && (A.negatedExtglob = !0) - } - G({ type: 'paren', extglob: !0, value: T, output: Ne }), J('parens') - } - if (n.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(e)) { - let H = !1, - Ne = e.replace(RD, (Y, de, Te, Dt, Ye, ds) => - Dt === '\\' - ? ((H = !0), Y) - : Dt === '?' - ? de - ? de + Dt + (Ye ? w.repeat(Ye.length) : '') - : ds === 0 - ? B + (Ye ? w.repeat(Ye.length) : '') - : w.repeat(Te.length) - : Dt === '.' - ? c.repeat(Te.length) - : Dt === '*' - ? de - ? de + Dt + (Ye ? L : '') - : L - : de - ? Y - : `\\${Y}` - ) - return ( - H === !0 && - (n.unescape === !0 - ? (Ne = Ne.replace(/\\/g, '')) - : (Ne = Ne.replace(/\\+/g, (Y) => (Y.length % 2 === 0 ? '\\\\' : Y ? '\\' : '')))), - Ne === e && n.contains === !0 - ? ((A.output = e), A) - : ((A.output = cn.wrapOutput(Ne, A, t)), A) - ) - } - for (; !Q(); ) { - if (((T = ee()), T === '\0')) continue - if (T === '\\') { - let Y = $() - if ((Y === '/' && n.bash !== !0) || Y === '.' || Y === ';') continue - if (!Y) { - ;(T += '\\'), G({ type: 'text', value: T }) - continue - } - let de = /^\\+/.exec(ne()), - Te = 0 - if ( - (de && - de[0].length > 2 && - ((Te = de[0].length), (A.index += Te), Te % 2 !== 0 && (T += '\\')), - n.unescape === !0 ? (T = ee() || '') : (T += ee() || ''), - A.brackets === 0) - ) { - G({ type: 'text', value: T }) - continue - } - } - if (A.brackets > 0 && (T !== ']' || F.value === '[' || F.value === '[^')) { - if (n.posix !== !1 && T === ':') { - let Y = F.value.slice(1) - if (Y.includes('[') && ((F.posix = !0), Y.includes(':'))) { - let de = F.value.lastIndexOf('['), - Te = F.value.slice(0, de), - Dt = F.value.slice(de + 2), - Ye = CD[Dt] - if (Ye) { - ;(F.value = Te + Ye), - (A.backtrack = !0), - ee(), - !s.output && o.indexOf(F) === 1 && (s.output = m) - continue - } - } - } - ;((T === '[' && $() !== ':') || (T === '-' && $() === ']')) && (T = `\\${T}`), - T === ']' && (F.value === '[' || F.value === '[^') && (T = `\\${T}`), - n.posix === !0 && T === '!' && F.value === '[' && (T = '^'), - (F.value += T), - Ie({ value: T }) - continue - } - if (A.quotes === 1 && T !== '"') { - ;(T = cn.escapeRegex(T)), (F.value += T), Ie({ value: T }) - continue - } - if (T === '"') { - ;(A.quotes = A.quotes === 1 ? 0 : 1), - n.keepQuotes === !0 && G({ type: 'text', value: T }) - continue - } - if (T === '(') { - Z('parens'), G({ type: 'paren', value: T }) - continue - } - if (T === ')') { - if (A.parens === 0 && n.strictBrackets === !0) throw new SyntaxError(is('opening', '(')) - let Y = X[X.length - 1] - if (Y && A.parens === Y.parens + 1) { - Re(X.pop()) - continue - } - G({ type: 'paren', value: T, output: A.parens ? ')' : '\\)' }), J('parens') - continue - } - if (T === '[') { - if (n.nobracket === !0 || !ne().includes(']')) { - if (n.nobracket !== !0 && n.strictBrackets === !0) - throw new SyntaxError(is('closing', ']')) - T = `\\${T}` - } else Z('brackets') - G({ type: 'bracket', value: T }) - continue - } - if (T === ']') { - if (n.nobracket === !0 || (F && F.type === 'bracket' && F.value.length === 1)) { - G({ type: 'text', value: T, output: `\\${T}` }) - continue - } - if (A.brackets === 0) { - if (n.strictBrackets === !0) throw new SyntaxError(is('opening', '[')) - G({ type: 'text', value: T, output: `\\${T}` }) - continue - } - J('brackets') - let Y = F.value.slice(1) - if ( - (F.posix !== !0 && Y[0] === '^' && !Y.includes('/') && (T = `/${T}`), - (F.value += T), - Ie({ value: T }), - n.literalBrackets === !1 || cn.hasRegexChars(Y)) - ) - continue - let de = cn.escapeRegex(F.value) - if (((A.output = A.output.slice(0, -F.value.length)), n.literalBrackets === !0)) { - ;(A.output += de), (F.value = de) - continue - } - ;(F.value = `(${a}${de}|${F.value})`), (A.output += F.value) - continue - } - if (T === '{' && n.nobrace !== !0) { - Z('braces') - let Y = { - type: 'brace', - value: T, - output: '(', - outputIndex: A.output.length, - tokensIndex: A.tokens.length - } - z.push(Y), G(Y) - continue - } - if (T === '}') { - let Y = z[z.length - 1] - if (n.nobrace === !0 || !Y) { - G({ type: 'text', value: T, output: T }) - continue - } - let de = ')' - if (Y.dots === !0) { - let Te = o.slice(), - Dt = [] - for (let Ye = Te.length - 1; Ye >= 0 && (o.pop(), Te[Ye].type !== 'brace'); Ye--) - Te[Ye].type !== 'dots' && Dt.unshift(Te[Ye].value) - ;(de = kD(Dt, n)), (A.backtrack = !0) - } - if (Y.comma !== !0 && Y.dots !== !0) { - let Te = A.output.slice(0, Y.outputIndex), - Dt = A.tokens.slice(Y.tokensIndex) - ;(Y.value = Y.output = '\\{'), (T = de = '\\}'), (A.output = Te) - for (let Ye of Dt) A.output += Ye.output || Ye.value - } - G({ type: 'brace', value: T, output: de }), J('braces'), z.pop() - continue - } - if (T === '|') { - X.length > 0 && X[X.length - 1].conditions++, G({ type: 'text', value: T }) - continue - } - if (T === ',') { - let Y = T, - de = z[z.length - 1] - de && fe[fe.length - 1] === 'braces' && ((de.comma = !0), (Y = '|')), - G({ type: 'comma', value: T, output: Y }) - continue - } - if (T === '/') { - if (F.type === 'dot' && A.index === A.start + 1) { - ;(A.start = A.index + 1), (A.consumed = ''), (A.output = ''), o.pop(), (F = s) - continue - } - G({ type: 'slash', value: T, output: h }) - continue - } - if (T === '.') { - if (A.braces > 0 && F.type === 'dot') { - F.value === '.' && (F.output = c) - let Y = z[z.length - 1] - ;(F.type = 'dots'), (F.output += T), (F.value += T), (Y.dots = !0) - continue - } - if (A.braces + A.parens === 0 && F.type !== 'bos' && F.type !== 'slash') { - G({ type: 'text', value: T, output: c }) - continue - } - G({ type: 'dot', value: T, output: c }) - continue - } - if (T === '?') { - if (!(F && F.value === '(') && n.noextglob !== !0 && $() === '(' && $(2) !== '?') { - _e('qmark', T) - continue - } - if (F && F.type === 'paren') { - let de = $(), - Te = T - if (de === '<' && !cn.supportsLookbehinds()) - throw new Error('Node.js v10 or higher is required for regex lookbehinds') - ;((F.value === '(' && !/[!=<:]/.test(de)) || - (de === '<' && !/<([!=]|\w+>)/.test(ne()))) && - (Te = `\\${T}`), - G({ type: 'text', value: T, output: Te }) - continue - } - if (n.dot !== !0 && (F.type === 'slash' || F.type === 'bos')) { - G({ type: 'qmark', value: T, output: C }) - continue - } - G({ type: 'qmark', value: T, output: w }) - continue - } - if (T === '!') { - if (n.noextglob !== !0 && $() === '(' && ($(2) !== '?' || !/[!=<:]/.test($(3)))) { - _e('negate', T) - continue - } - if (n.nonegate !== !0 && A.index === 0) { - P() - continue - } - } - if (T === '+') { - if (n.noextglob !== !0 && $() === '(' && $(2) !== '?') { - _e('plus', T) - continue - } - if ((F && F.value === '(') || n.regex === !1) { - G({ type: 'plus', value: T, output: d }) - continue - } - if ( - (F && (F.type === 'bracket' || F.type === 'paren' || F.type === 'brace')) || - A.parens > 0 - ) { - G({ type: 'plus', value: T }) - continue - } - G({ type: 'plus', value: d }) - continue - } - if (T === '@') { - if (n.noextglob !== !0 && $() === '(' && $(2) !== '?') { - G({ type: 'at', extglob: !0, value: T, output: '' }) - continue - } - G({ type: 'text', value: T }) - continue - } - if (T !== '*') { - ;(T === '$' || T === '^') && (T = `\\${T}`) - let Y = ID.exec(ne()) - Y && ((T += Y[0]), (A.index += Y[0].length)), G({ type: 'text', value: T }) - continue - } - if (F && (F.type === 'globstar' || F.star === !0)) { - ;(F.type = 'star'), - (F.star = !0), - (F.value += T), - (F.output = L), - (A.backtrack = !0), - (A.globstar = !0), - se(T) - continue - } - let H = ne() - if (n.noextglob !== !0 && /^\([^?]/.test(H)) { - _e('star', T) - continue - } - if (F.type === 'star') { - if (n.noglobstar === !0) { - se(T) - continue - } - let Y = F.prev, - de = Y.prev, - Te = Y.type === 'slash' || Y.type === 'bos', - Dt = de && (de.type === 'star' || de.type === 'globstar') - if (n.bash === !0 && (!Te || (H[0] && H[0] !== '/'))) { - G({ type: 'star', value: T, output: '' }) - continue - } - let Ye = A.braces > 0 && (Y.type === 'comma' || Y.type === 'brace'), - ds = X.length && (Y.type === 'pipe' || Y.type === 'paren') - if (!Te && Y.type !== 'paren' && !Ye && !ds) { - G({ type: 'star', value: T, output: '' }) - continue - } - for (; H.slice(0, 3) === '/**'; ) { - let Zr = e[A.index + 4] - if (Zr && Zr !== '/') break - ;(H = H.slice(3)), se('/**', 3) - } - if (Y.type === 'bos' && Q()) { - ;(F.type = 'globstar'), - (F.value += T), - (F.output = M(n)), - (A.output = F.output), - (A.globstar = !0), - se(T) - continue - } - if (Y.type === 'slash' && Y.prev.type !== 'bos' && !Dt && Q()) { - ;(A.output = A.output.slice(0, -(Y.output + F.output).length)), - (Y.output = `(?:${Y.output}`), - (F.type = 'globstar'), - (F.output = M(n) + (n.strictSlashes ? ')' : '|$)')), - (F.value += T), - (A.globstar = !0), - (A.output += Y.output + F.output), - se(T) - continue - } - if (Y.type === 'slash' && Y.prev.type !== 'bos' && H[0] === '/') { - let Zr = H[1] !== void 0 ? '|$' : '' - ;(A.output = A.output.slice(0, -(Y.output + F.output).length)), - (Y.output = `(?:${Y.output}`), - (F.type = 'globstar'), - (F.output = `${M(n)}${h}|${h}${Zr})`), - (F.value += T), - (A.output += Y.output + F.output), - (A.globstar = !0), - se(T + ee()), - G({ type: 'slash', value: '/', output: '' }) - continue - } - if (Y.type === 'bos' && H[0] === '/') { - ;(F.type = 'globstar'), - (F.value += T), - (F.output = `(?:^|${h}|${M(n)}${h})`), - (A.output = F.output), - (A.globstar = !0), - se(T + ee()), - G({ type: 'slash', value: '/', output: '' }) - continue - } - ;(A.output = A.output.slice(0, -F.output.length)), - (F.type = 'globstar'), - (F.output = M(n)), - (F.value += T), - (A.output += F.output), - (A.globstar = !0), - se(T) - continue - } - let Ne = { type: 'star', value: T, output: L } - if (n.bash === !0) { - ;(Ne.output = '.*?'), - (F.type === 'bos' || F.type === 'slash') && (Ne.output = I + Ne.output), - G(Ne) - continue - } - if (F && (F.type === 'bracket' || F.type === 'paren') && n.regex === !0) { - ;(Ne.output = T), G(Ne) - continue - } - ;(A.index === A.start || F.type === 'slash' || F.type === 'dot') && - (F.type === 'dot' - ? ((A.output += N), (F.output += N)) - : n.dot === !0 - ? ((A.output += _), (F.output += _)) - : ((A.output += I), (F.output += I)), - $() !== '*' && ((A.output += m), (F.output += m))), - G(Ne) - } - for (; A.brackets > 0; ) { - if (n.strictBrackets === !0) throw new SyntaxError(is('closing', ']')) - ;(A.output = cn.escapeLast(A.output, '[')), J('brackets') - } - for (; A.parens > 0; ) { - if (n.strictBrackets === !0) throw new SyntaxError(is('closing', ')')) - ;(A.output = cn.escapeLast(A.output, '(')), J('parens') - } - for (; A.braces > 0; ) { - if (n.strictBrackets === !0) throw new SyntaxError(is('closing', '}')) - ;(A.output = cn.escapeLast(A.output, '{')), J('braces') - } - if ( - (n.strictSlashes !== !0 && - (F.type === 'star' || F.type === 'bracket') && - G({ type: 'maybe_slash', value: '', output: `${h}?` }), - A.backtrack === !0) - ) { - A.output = '' - for (let H of A.tokens) - (A.output += H.output != null ? H.output : H.value), H.suffix && (A.output += H.suffix) - } - return A - } - Em.fastpaths = (e, t) => { - let n = { ...t }, - r = typeof n.maxLength == 'number' ? Math.min(Lu, n.maxLength) : Lu, - i = e.length - if (i > r) throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`) - e = bm[e] || e - let { - DOT_LITERAL: s, - SLASH_LITERAL: o, - ONE_CHAR: a, - DOTS_SLASH: u, - NO_DOT: l, - NO_DOTS: c, - NO_DOTS_SLASH: d, - STAR: h, - START_ANCHOR: m - } = wu.globChars(n.windows), - g = n.dot ? c : l, - v = n.dot ? d : l, - N = n.capture ? '' : '?:', - _ = { negated: !1, prefix: '' }, - w = n.bash === !0 ? '.*?' : h - n.capture && (w = `(${w})`) - let C = (I) => (I.noglobstar === !0 ? w : `(${N}(?:(?!${m}${I.dot ? u : s}).)*?)`), - S = (I) => { - switch (I) { - case '*': - return `${g}${a}${w}` - case '.*': - return `${s}${a}${w}` - case '*.*': - return `${g}${w}${s}${a}${w}` - case '*/*': - return `${g}${w}${o}${a}${v}${w}` - case '**': - return g + C(n) - case '**/*': - return `(?:${g}${C(n)}${o})?${v}${a}${w}` - case '**/*.*': - return `(?:${g}${C(n)}${o})?${v}${w}${s}${a}${w}` - case '**/.*': - return `(?:${g}${C(n)}${o})?${s}${a}${w}` - default: { - let B = /^(.*?)\.(\w+)$/.exec(I) - if (!B) return - let L = S(B[1]) - return L ? L + s + B[2] : void 0 - } - } - }, - k = cn.removePrefix(e, _), - M = S(k) - return M && n.strictSlashes !== !0 && (M += `${o}?`), M - } - ym.exports = Em - }) - var Tm = Kn((_R, Nm) => { - 'use strict' - var OD = vm(), - T1 = xm(), - _m = Fu(), - MD = go(), - PD = (e) => e && typeof e == 'object' && !Array.isArray(e), - nt = (e, t, n = !1) => { - if (Array.isArray(e)) { - let c = e.map((h) => nt(h, t, n)) - return (h) => { - for (let m of c) { - let g = m(h) - if (g) return g - } - return !1 - } - } - let r = PD(e) && e.tokens && e.input - if (e === '' || (typeof e != 'string' && !r)) - throw new TypeError('Expected pattern to be a non-empty string') - let i = t || {}, - s = i.windows, - o = r ? nt.compileRe(e, t) : nt.makeRe(e, t, !1, !0), - a = o.state - delete o.state - let u = () => !1 - if (i.ignore) { - let c = { ...t, ignore: null, onMatch: null, onResult: null } - u = nt(i.ignore, c, n) - } - let l = (c, d = !1) => { - let { isMatch: h, match: m, output: g } = nt.test(c, o, t, { glob: e, posix: s }), - v = { glob: e, state: a, regex: o, posix: s, input: c, output: g, match: m, isMatch: h } - return ( - typeof i.onResult == 'function' && i.onResult(v), - h === !1 - ? ((v.isMatch = !1), d ? v : !1) - : u(c) - ? (typeof i.onIgnore == 'function' && i.onIgnore(v), (v.isMatch = !1), d ? v : !1) - : (typeof i.onMatch == 'function' && i.onMatch(v), d ? v : !0) - ) - } - return n && (l.state = a), l - } - nt.test = (e, t, n, { glob: r, posix: i } = {}) => { - if (typeof e != 'string') throw new TypeError('Expected input to be a string') - if (e === '') return { isMatch: !1, output: '' } - let s = n || {}, - o = s.format || (i ? _m.toPosixSlashes : null), - a = e === r, - u = a && o ? o(e) : e - return ( - a === !1 && ((u = o ? o(e) : e), (a = u === r)), - (a === !1 || s.capture === !0) && - (s.matchBase === !0 || s.basename === !0 - ? (a = nt.matchBase(e, t, n, i)) - : (a = t.exec(u))), - { isMatch: !!a, match: a, output: u } - ) - } - nt.matchBase = (e, t, n) => (t instanceof RegExp ? t : nt.makeRe(t, n)).test(_m.basename(e)) - nt.isMatch = (e, t, n) => nt(t, n)(e) - nt.parse = (e, t) => - Array.isArray(e) ? e.map((n) => nt.parse(n, t)) : T1(e, { ...t, fastpaths: !1 }) - nt.scan = (e, t) => OD(e, t) - nt.compileRe = (e, t, n = !1, r = !1) => { - if (n === !0) return e.output - let i = t || {}, - s = i.contains ? '' : '^', - o = i.contains ? '' : '$', - a = `${s}(?:${e.output})${o}` - e && e.negated === !0 && (a = `^(?!${a}).*$`) - let u = nt.toRegex(a, t) - return r === !0 && (u.state = e), u - } - nt.makeRe = (e, t, n = !1, r = !1) => { - if (!e || typeof e != 'string') throw new TypeError('Expected a non-empty string') - let i = t || {}, - s = { negated: !1, fastpaths: !0 }, - o = '', - a - return ( - e.startsWith('./') && ((e = e.slice(2)), (o = s.prefix = './')), - i.fastpaths !== !1 && (e[0] === '.' || e[0] === '*') && (a = T1.fastpaths(e, t)), - a === void 0 ? ((s = T1(e, t)), (s.prefix = o + (s.prefix || ''))) : (s.output = a), - nt.compileRe(s, t, n, r) - ) - } - nt.toRegex = (e, t) => { - try { - let n = t || {} - return new RegExp(e, n.flags || (n.nocase ? 'i' : '')) - } catch (n) { - if (t && t.debug === !0) throw n - return /$^/ - } - } - nt.constants = MD - Nm.exports = nt - }) - var Am = Kn((NR, Sm) => { - 'use strict' - Sm.exports = Tm() - }) - var J2 = {} - a4(J2, { - __debug: () => Y2, - check: () => Q2, - default: () => Hb, - doc: () => ef, - format: () => uf, - formatWithCursor: () => af, - getSupportInfo: () => z2, - util: () => tf, - version: () => W2 - }) - function t8(e) { - let t = e.indexOf('\r') - return t >= 0 - ? e.charAt(t + 1) === - ` -` - ? 'crlf' - : 'cr' - : 'lf' - } - function G1(e) { - switch (e) { - case 'cr': - return '\r' - case 'crlf': - return `\r -` - default: - return ` -` - } - } - function u2(e, t) { - let n - switch (t) { - case ` -`: - n = /\n/g - break - case '\r': - n = /\r/g - break - case `\r -`: - n = /\r\n/g - break - default: - throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`) - } - let r = e.match(n) - return r ? r.length : 0 - } - function n8(e) { - return Bu( - !1, - e, - /\r\n?/g, - ` -` - ) - } - function r8(e) { - if (typeof e == 'string') return Jr - if (Array.isArray(e)) return Hn - if (!e) return - let { type: t } = e - if (l2.has(t)) return t - } - function s8(e) { - let t = e === null ? 'null' : typeof e - if (t !== 'string' && t !== 'object') - return `Unexpected doc '${t}', -Expected it to be 'string' or 'object'.` - if (Kr(e)) throw new Error('doc is valid.') - let n = Object.prototype.toString.call(e) - if (n !== '[object Object]') return `Unexpected doc '${n}'.` - let r = i8([...l2].map((i) => `'${i}'`)) - return `Unexpected doc.type '${e.type}'. -Expected it to be ${r}.` - } - function a8(e, t, n, r) { - let i = [e] - for (; i.length > 0; ) { - let s = i.pop() - if (s === Cm) { - n(i.pop()) - continue - } - n && i.push(s, Cm) - let o = Kr(s) - if (!o) throw new ls(s) - if (t?.(s) !== !1) - switch (o) { - case Hn: - case Fn: { - let a = o === Hn ? s : s.parts - for (let u = a.length, l = u - 1; l >= 0; --l) i.push(a[l]) - break - } - case Jt: - i.push(s.flatContents, s.breakContents) - break - case $t: - if (r && s.expandedStates) - for (let a = s.expandedStates.length, u = a - 1; u >= 0; --u) - i.push(s.expandedStates[u]) - else i.push(s.contents) - break - case Qn: - case Wn: - case Yn: - case wn: - case Jn: - i.push(s.contents) - break - case Jr: - case Xr: - case zn: - case Xn: - case yt: - case nn: - break - default: - throw new ls(s) - } - } - } - function Ou(e) { - return An(e), { type: Wn, contents: e } - } - function cs(e, t) { - return An(t), { type: Qn, contents: t, n: e } - } - function f2(e, t = {}) { - return ( - An(e), - W1(t.expandedStates, !0), - { type: $t, id: t.id, contents: e, break: !!t.shouldBreak, expandedStates: t.expandedStates } - ) - } - function u8(e) { - return cs(Number.NEGATIVE_INFINITY, e) - } - function l8(e) { - return cs({ type: 'root' }, e) - } - function c8(e) { - return cs(-1, e) - } - function f8(e, t) { - return f2(e[0], { ...t, expandedStates: e }) - } - function d2(e) { - return W1(e), { type: Fn, parts: e } - } - function d8(e, t = '', n = {}) { - return ( - An(e), t !== '' && An(t), { type: Jt, breakContents: e, flatContents: t, groupId: n.groupId } - ) - } - function p8(e, t) { - return An(e), { type: Yn, contents: e, groupId: t.groupId, negate: t.negate } - } - function O1(e) { - return An(e), { type: Jn, contents: e } - } - function g2(e, t) { - An(e), W1(t) - let n = [] - for (let r = 0; r < t.length; r++) r !== 0 && n.push(e), n.push(t[r]) - return n - } - function D2(e, t, n) { - An(e) - let r = e - if (t > 0) { - for (let i = 0; i < Math.floor(t / n); ++i) r = Ou(r) - ;(r = cs(t % n, r)), (r = cs(Number.NEGATIVE_INFINITY, r)) - } - return r - } - function D8(e, t) { - return An(t), e ? { type: wn, label: e, contents: t } : t - } - function Gn(e) { - var t - if (!e) return '' - if (Array.isArray(e)) { - let n = [] - for (let r of e) - if (Array.isArray(r)) n.push(...Gn(r)) - else { - let i = Gn(r) - i !== '' && n.push(i) - } - return n - } - return e.type === Jt - ? { ...e, breakContents: Gn(e.breakContents), flatContents: Gn(e.flatContents) } - : e.type === $t - ? { - ...e, - contents: Gn(e.contents), - expandedStates: (t = e.expandedStates) == null ? void 0 : t.map(Gn) - } - : e.type === Fn - ? { type: 'fill', parts: e.parts.map(Gn) } - : e.contents - ? { ...e, contents: Gn(e.contents) } - : e - } - function v8(e) { - let t = Object.create(null), - n = new Set() - return r(Gn(e)) - function r(s, o, a) { - var u, l - if (typeof s == 'string') return JSON.stringify(s) - if (Array.isArray(s)) { - let c = s.map(r).filter(Boolean) - return c.length === 1 ? c[0] : `[${c.join(', ')}]` - } - if (s.type === yt) { - let c = ((u = a?.[o + 1]) == null ? void 0 : u.type) === nn - return s.literal - ? c - ? 'literalline' - : 'literallineWithoutBreakParent' - : s.hard - ? c - ? 'hardline' - : 'hardlineWithoutBreakParent' - : s.soft - ? 'softline' - : 'line' - } - if (s.type === nn) - return ((l = a?.[o - 1]) == null ? void 0 : l.type) === yt && a[o - 1].hard - ? void 0 - : 'breakParent' - if (s.type === zn) return 'trim' - if (s.type === Wn) return 'indent(' + r(s.contents) + ')' - if (s.type === Qn) - return s.n === Number.NEGATIVE_INFINITY - ? 'dedentToRoot(' + r(s.contents) + ')' - : s.n < 0 - ? 'dedent(' + r(s.contents) + ')' - : s.n.type === 'root' - ? 'markAsRoot(' + r(s.contents) + ')' - : 'align(' + JSON.stringify(s.n) + ', ' + r(s.contents) + ')' - if (s.type === Jt) - return ( - 'ifBreak(' + - r(s.breakContents) + - (s.flatContents ? ', ' + r(s.flatContents) : '') + - (s.groupId ? (s.flatContents ? '' : ', ""') + `, { groupId: ${i(s.groupId)} }` : '') + - ')' - ) - if (s.type === Yn) { - let c = [] - s.negate && c.push('negate: true'), s.groupId && c.push(`groupId: ${i(s.groupId)}`) - let d = c.length > 0 ? `, { ${c.join(', ')} }` : '' - return `indentIfBreak(${r(s.contents)}${d})` - } - if (s.type === $t) { - let c = [] - s.break && s.break !== 'propagated' && c.push('shouldBreak: true'), - s.id && c.push(`id: ${i(s.id)}`) - let d = c.length > 0 ? `, { ${c.join(', ')} }` : '' - return s.expandedStates - ? `conditionalGroup([${s.expandedStates.map((h) => r(h)).join(',')}]${d})` - : `group(${r(s.contents)}${d})` - } - if (s.type === Fn) return `fill([${s.parts.map((c) => r(c)).join(', ')}])` - if (s.type === Jn) return 'lineSuffix(' + r(s.contents) + ')' - if (s.type === Xn) return 'lineSuffixBoundary' - if (s.type === wn) return `label(${JSON.stringify(s.label)}, ${r(s.contents)})` - throw new Error('Unknown doc type ' + s.type) - } - function i(s) { - if (typeof s != 'symbol') return JSON.stringify(String(s)) - if (s in t) return t[s] - let o = s.description || 'symbol' - for (let a = 0; ; a++) { - let u = o + (a > 0 ? ` #${a}` : '') - if (!n.has(u)) return n.add(u), (t[s] = `Symbol.for(${JSON.stringify(u)})`) - } - } - } - function y8(e) { - return e === 12288 || (e >= 65281 && e <= 65376) || (e >= 65504 && e <= 65510) - } - function x8(e) { - return ( - (e >= 4352 && e <= 4447) || - e === 8986 || - e === 8987 || - e === 9001 || - e === 9002 || - (e >= 9193 && e <= 9196) || - e === 9200 || - e === 9203 || - e === 9725 || - e === 9726 || - e === 9748 || - e === 9749 || - (e >= 9800 && e <= 9811) || - e === 9855 || - e === 9875 || - e === 9889 || - e === 9898 || - e === 9899 || - e === 9917 || - e === 9918 || - e === 9924 || - e === 9925 || - e === 9934 || - e === 9940 || - e === 9962 || - e === 9970 || - e === 9971 || - e === 9973 || - e === 9978 || - e === 9981 || - e === 9989 || - e === 9994 || - e === 9995 || - e === 10024 || - e === 10060 || - e === 10062 || - (e >= 10067 && e <= 10069) || - e === 10071 || - (e >= 10133 && e <= 10135) || - e === 10160 || - e === 10175 || - e === 11035 || - e === 11036 || - e === 11088 || - e === 11093 || - (e >= 11904 && e <= 11929) || - (e >= 11931 && e <= 12019) || - (e >= 12032 && e <= 12245) || - (e >= 12272 && e <= 12287) || - (e >= 12289 && e <= 12350) || - (e >= 12353 && e <= 12438) || - (e >= 12441 && e <= 12543) || - (e >= 12549 && e <= 12591) || - (e >= 12593 && e <= 12686) || - (e >= 12688 && e <= 12771) || - (e >= 12783 && e <= 12830) || - (e >= 12832 && e <= 12871) || - (e >= 12880 && e <= 19903) || - (e >= 19968 && e <= 42124) || - (e >= 42128 && e <= 42182) || - (e >= 43360 && e <= 43388) || - (e >= 44032 && e <= 55203) || - (e >= 63744 && e <= 64255) || - (e >= 65040 && e <= 65049) || - (e >= 65072 && e <= 65106) || - (e >= 65108 && e <= 65126) || - (e >= 65128 && e <= 65131) || - (e >= 94176 && e <= 94180) || - e === 94192 || - e === 94193 || - (e >= 94208 && e <= 100343) || - (e >= 100352 && e <= 101589) || - (e >= 101632 && e <= 101640) || - (e >= 110576 && e <= 110579) || - (e >= 110581 && e <= 110587) || - e === 110589 || - e === 110590 || - (e >= 110592 && e <= 110882) || - e === 110898 || - (e >= 110928 && e <= 110930) || - e === 110933 || - (e >= 110948 && e <= 110951) || - (e >= 110960 && e <= 111355) || - e === 126980 || - e === 127183 || - e === 127374 || - (e >= 127377 && e <= 127386) || - (e >= 127488 && e <= 127490) || - (e >= 127504 && e <= 127547) || - (e >= 127552 && e <= 127560) || - e === 127568 || - e === 127569 || - (e >= 127584 && e <= 127589) || - (e >= 127744 && e <= 127776) || - (e >= 127789 && e <= 127797) || - (e >= 127799 && e <= 127868) || - (e >= 127870 && e <= 127891) || - (e >= 127904 && e <= 127946) || - (e >= 127951 && e <= 127955) || - (e >= 127968 && e <= 127984) || - e === 127988 || - (e >= 127992 && e <= 128062) || - e === 128064 || - (e >= 128066 && e <= 128252) || - (e >= 128255 && e <= 128317) || - (e >= 128331 && e <= 128334) || - (e >= 128336 && e <= 128359) || - e === 128378 || - e === 128405 || - e === 128406 || - e === 128420 || - (e >= 128507 && e <= 128591) || - (e >= 128640 && e <= 128709) || - e === 128716 || - (e >= 128720 && e <= 128722) || - (e >= 128725 && e <= 128727) || - (e >= 128732 && e <= 128735) || - e === 128747 || - e === 128748 || - (e >= 128756 && e <= 128764) || - (e >= 128992 && e <= 129003) || - e === 129008 || - (e >= 129292 && e <= 129338) || - (e >= 129340 && e <= 129349) || - (e >= 129351 && e <= 129535) || - (e >= 129648 && e <= 129660) || - (e >= 129664 && e <= 129672) || - (e >= 129680 && e <= 129725) || - (e >= 129727 && e <= 129733) || - (e >= 129742 && e <= 129755) || - (e >= 129760 && e <= 129768) || - (e >= 129776 && e <= 129784) || - (e >= 131072 && e <= 196605) || - (e >= 196608 && e <= 262141) - ) - } - function T8(e) { - if (!e) return 0 - if (!N8.test(e)) return e.length - e = e.replace(E8(), ' ') - let t = 0 - for (let n of e) { - let r = n.codePointAt(0) - r <= 31 || (r >= 127 && r <= 159) || (r >= 768 && r <= 879) || (t += _8(r) ? 1 : 2) - } - return t - } - function Uu(e, t) { - if (typeof e == 'string') return t(e) - let n = new Map() - return r(e) - function r(s) { - if (n.has(s)) return n.get(s) - let o = i(s) - return n.set(s, o), o - } - function i(s) { - switch (Kr(s)) { - case Hn: - return t(s.map(r)) - case Fn: - return t({ ...s, parts: s.parts.map(r) }) - case Jt: - return t({ ...s, breakContents: r(s.breakContents), flatContents: r(s.flatContents) }) - case $t: { - let { expandedStates: o, contents: a } = s - return ( - o ? ((o = o.map(r)), (a = o[0])) : (a = r(a)), - t({ ...s, contents: a, expandedStates: o }) - ) - } - case Qn: - case Wn: - case Yn: - case wn: - case Jn: - return t({ ...s, contents: r(s.contents) }) - case Jr: - case Xr: - case zn: - case Xn: - case yt: - case nn: - return t(s) - default: - throw new ls(s) - } - } - } - function Y1(e, t, n) { - let r = n, - i = !1 - function s(o) { - if (i) return !1 - let a = t(o) - a !== void 0 && ((i = !0), (r = a)) - } - return H1(e, s), r - } - function S8(e) { - if ((e.type === $t && e.break) || (e.type === yt && e.hard) || e.type === nn) return !0 - } - function A8(e) { - return Y1(e, S8, !1) - } - function Im(e) { - if (e.length > 0) { - let t = gt(!1, e, -1) - !t.expandedStates && !t.break && (t.break = 'propagated') - } - return null - } - function F8(e) { - let t = new Set(), - n = [] - function r(s) { - if ((s.type === nn && Im(n), s.type === $t)) { - if ((n.push(s), t.has(s))) return !1 - t.add(s) - } - } - function i(s) { - s.type === $t && n.pop().break && Im(n) - } - H1(e, r, i, !0) - } - function w8(e) { - return e.type === yt && !e.hard ? (e.soft ? '' : ' ') : e.type === Jt ? e.flatContents : e - } - function L8(e) { - return Uu(e, w8) - } - function Rm(e) { - for (e = [...e]; e.length >= 2 && gt(!1, e, -2).type === yt && gt(!1, e, -1).type === nn; ) - e.length -= 2 - if (e.length > 0) { - let t = bo(gt(!1, e, -1)) - e[e.length - 1] = t - } - return e - } - function bo(e) { - switch (Kr(e)) { - case Wn: - case Yn: - case $t: - case Jn: - case wn: { - let t = bo(e.contents) - return { ...e, contents: t } - } - case Jt: - return { ...e, breakContents: bo(e.breakContents), flatContents: bo(e.flatContents) } - case Fn: - return { ...e, parts: Rm(e.parts) } - case Hn: - return Rm(e) - case Jr: - return e.replace(/[\n\r]*$/, '') - case Qn: - case Xr: - case zn: - case Xn: - case yt: - case nn: - break - default: - throw new ls(e) - } - return e - } - function v2(e) { - return bo(I8(e)) - } - function C8(e) { - switch (Kr(e)) { - case Fn: - if (e.parts.every((t) => t === '')) return '' - break - case $t: - if (!e.contents && !e.id && !e.break && !e.expandedStates) return '' - if ( - e.contents.type === $t && - e.contents.id === e.id && - e.contents.break === e.break && - e.contents.expandedStates === e.expandedStates - ) - return e.contents - break - case Qn: - case Wn: - case Yn: - case Jn: - if (!e.contents) return '' - break - case Jt: - if (!e.flatContents && !e.breakContents) return '' - break - case Hn: { - let t = [] - for (let n of e) { - if (!n) continue - let [r, ...i] = Array.isArray(n) ? n : [n] - typeof r == 'string' && typeof gt(!1, t, -1) == 'string' - ? (t[t.length - 1] += r) - : t.push(r), - t.push(...i) - } - return t.length === 0 ? '' : t.length === 1 ? t[0] : t - } - case Jr: - case Xr: - case zn: - case Xn: - case yt: - case wn: - case nn: - break - default: - throw new ls(e) - } - return e - } - function I8(e) { - return Uu(e, (t) => C8(t)) - } - function R8(e, t = m2) { - return Uu(e, (n) => - typeof n == 'string' - ? g2( - t, - n.split(` -`) - ) - : n - ) - } - function k8(e) { - if (e.type === yt) return !0 - } - function O8(e) { - return Y1(e, k8, !1) - } - function b2(e, t) { - return e.type === wn ? { ...e, contents: t(e.contents) } : t(e) - } - function E2() { - return { value: '', length: 0, queue: [] } - } - function M8(e, t) { - return P1(e, { type: 'indent' }, t) - } - function P8(e, t, n) { - return t === Number.NEGATIVE_INFINITY - ? e.root || E2() - : t < 0 - ? P1(e, { type: 'dedent' }, n) - : t - ? t.type === 'root' - ? { ...e, root: e } - : P1(e, { type: typeof t == 'string' ? 'stringAlign' : 'numberAlign', n: t }, n) - : e - } - function P1(e, t, n) { - let r = t.type === 'dedent' ? e.queue.slice(0, -1) : [...e.queue, t], - i = '', - s = 0, - o = 0, - a = 0 - for (let g of r) - switch (g.type) { - case 'indent': - c(), n.useTabs ? u(1) : l(n.tabWidth) - break - case 'stringAlign': - c(), (i += g.n), (s += g.n.length) - break - case 'numberAlign': - ;(o += 1), (a += g.n) - break - default: - throw new Error(`Unexpected type '${g.type}'`) - } - return h(), { ...e, value: i, length: s, queue: r } - function u(g) { - ;(i += ' '.repeat(g)), (s += n.tabWidth * g) - } - function l(g) { - ;(i += ' '.repeat(g)), (s += g) - } - function c() { - n.useTabs ? d() : h() - } - function d() { - o > 0 && u(o), m() - } - function h() { - a > 0 && l(a), m() - } - function m() { - ;(o = 0), (a = 0) - } - } - function B1(e) { - let t = 0, - n = 0, - r = e.length - e: for (; r--; ) { - let i = e[r] - if (i === Eo) { - n++ - continue - } - for (let s = i.length - 1; s >= 0; s--) { - let o = i[s] - if (o === ' ' || o === ' ') t++ - else { - e[r] = i.slice(0, s + 1) - break e - } - } - } - if (t > 0 || n > 0) for (e.length = r + 1; n-- > 0; ) e.push(Eo) - return t - } - function Iu(e, t, n, r, i, s) { - if (n === Number.POSITIVE_INFINITY) return !0 - let o = t.length, - a = [e], - u = [] - for (; n >= 0; ) { - if (a.length === 0) { - if (o === 0) return !0 - a.push(t[--o]) - continue - } - let { mode: l, doc: c } = a.pop(), - d = Kr(c) - switch (d) { - case Jr: - u.push(c), (n -= z1(c)) - break - case Hn: - case Fn: { - let h = d === Hn ? c : c.parts - for (let m = h.length - 1; m >= 0; m--) a.push({ mode: l, doc: h[m] }) - break - } - case Wn: - case Qn: - case Yn: - case wn: - a.push({ mode: l, doc: c.contents }) - break - case zn: - n += B1(u) - break - case $t: { - if (s && c.break) return !1 - let h = c.break ? Ut : l, - m = c.expandedStates && h === Ut ? gt(!1, c.expandedStates, -1) : c.contents - a.push({ mode: h, doc: m }) - break - } - case Jt: { - let h = (c.groupId ? i[c.groupId] || Sn : l) === Ut ? c.breakContents : c.flatContents - h && a.push({ mode: l, doc: h }) - break - } - case yt: - if (l === Ut || c.hard) return !0 - c.soft || (u.push(' '), n--) - break - case Jn: - r = !0 - break - case Xn: - if (r) return !1 - break - } - } - return !1 - } - function $u(e, t) { - let n = {}, - r = t.printWidth, - i = G1(t.endOfLine), - s = 0, - o = [{ ind: E2(), mode: Ut, doc: e }], - a = [], - u = !1, - l = [], - c = 0 - for (F8(e); o.length > 0; ) { - let { ind: h, mode: m, doc: g } = o.pop() - switch (Kr(g)) { - case Jr: { - let v = - i !== - ` -` - ? Bu( - !1, - g, - ` -`, - i - ) - : g - a.push(v), o.length > 0 && (s += z1(v)) - break - } - case Hn: - for (let v = g.length - 1; v >= 0; v--) o.push({ ind: h, mode: m, doc: g[v] }) - break - case Xr: - if (c >= 2) throw new Error("There are too many 'cursor' in doc.") - a.push(Eo), c++ - break - case Wn: - o.push({ ind: M8(h, t), mode: m, doc: g.contents }) - break - case Qn: - o.push({ ind: P8(h, g.n, t), mode: m, doc: g.contents }) - break - case zn: - s -= B1(a) - break - case $t: - switch (m) { - case Sn: - if (!u) { - o.push({ ind: h, mode: g.break ? Ut : Sn, doc: g.contents }) - break - } - case Ut: { - u = !1 - let v = { ind: h, mode: Sn, doc: g.contents }, - N = r - s, - _ = l.length > 0 - if (!g.break && Iu(v, o, N, _, n)) o.push(v) - else if (g.expandedStates) { - let w = gt(!1, g.expandedStates, -1) - if (g.break) { - o.push({ ind: h, mode: Ut, doc: w }) - break - } else - for (let C = 1; C < g.expandedStates.length + 1; C++) - if (C >= g.expandedStates.length) { - o.push({ ind: h, mode: Ut, doc: w }) - break - } else { - let S = g.expandedStates[C], - k = { ind: h, mode: Sn, doc: S } - if (Iu(k, o, N, _, n)) { - o.push(k) - break - } - } - } else o.push({ ind: h, mode: Ut, doc: g.contents }) - break - } - } - g.id && (n[g.id] = gt(!1, o, -1).mode) - break - case Fn: { - let v = r - s, - { parts: N } = g - if (N.length === 0) break - let [_, w] = N, - C = { ind: h, mode: Sn, doc: _ }, - S = { ind: h, mode: Ut, doc: _ }, - k = Iu(C, [], v, l.length > 0, n, !0) - if (N.length === 1) { - k ? o.push(C) : o.push(S) - break - } - let M = { ind: h, mode: Sn, doc: w }, - I = { ind: h, mode: Ut, doc: w } - if (N.length === 2) { - k ? o.push(M, C) : o.push(I, S) - break - } - N.splice(0, 2) - let B = { ind: h, mode: m, doc: d2(N) }, - L = N[0] - Iu({ ind: h, mode: Sn, doc: [_, w, L] }, [], v, l.length > 0, n, !0) - ? o.push(B, M, C) - : k - ? o.push(B, I, C) - : o.push(B, I, S) - break - } - case Jt: - case Yn: { - let v = g.groupId ? n[g.groupId] : m - if (v === Ut) { - let N = g.type === Jt ? g.breakContents : g.negate ? g.contents : Ou(g.contents) - N && o.push({ ind: h, mode: m, doc: N }) - } - if (v === Sn) { - let N = g.type === Jt ? g.flatContents : g.negate ? Ou(g.contents) : g.contents - N && o.push({ ind: h, mode: m, doc: N }) - } - break - } - case Jn: - l.push({ ind: h, mode: m, doc: g.contents }) - break - case Xn: - l.length > 0 && o.push({ ind: h, mode: m, doc: Q1 }) - break - case yt: - switch (m) { - case Sn: - if (g.hard) u = !0 - else { - g.soft || (a.push(' '), (s += 1)) - break - } - case Ut: - if (l.length > 0) { - o.push({ ind: h, mode: m, doc: g }, ...l.reverse()), (l.length = 0) - break - } - g.literal - ? h.root - ? (a.push(i, h.root.value), (s = h.root.length)) - : (a.push(i), (s = 0)) - : ((s -= B1(a)), a.push(i + h.value), (s = h.length)) - break - } - break - case wn: - o.push({ ind: h, mode: m, doc: g.contents }) - break - case nn: - break - default: - throw new ls(g) - } - o.length === 0 && l.length > 0 && (o.push(...l.reverse()), (l.length = 0)) - } - let d = a.indexOf(Eo) - if (d !== -1) { - let h = a.indexOf(Eo, d + 1), - m = a.slice(0, d).join(''), - g = a.slice(d + 1, h).join(''), - v = a.slice(h + 1).join('') - return { formatted: m + g + v, cursorNodeStart: m.length, cursorNodeText: g } - } - return { formatted: a.join('') } - } - function B8(e, t, n = 0) { - let r = 0 - for (let i = n; i < e.length; ++i) e[i] === ' ' ? (r = r + t - (r % t)) : r++ - return r - } - function $8(e) { - return e !== null && typeof e == 'object' - } - function* x2(e, t) { - let { getVisitorKeys: n, filter: r = () => !0 } = t, - i = (s) => j8(s) && r(s) - for (let s of n(e)) { - let o = e[s] - if (Array.isArray(o)) for (let a of o) i(a) && (yield a) - else i(o) && (yield o) - } - } - function* q8(e, t) { - let n = [e] - for (let r = 0; r < n.length; r++) { - let i = n[r] - for (let s of x2(i, t)) yield s, n.push(s) - } - } - function _o(e) { - return (t, n, r) => { - let i = !!(r != null && r.backwards) - if (n === !1) return !1 - let { length: s } = t, - o = n - for (; o >= 0 && o < s; ) { - let a = t.charAt(o) - if (e instanceof RegExp) { - if (!e.test(a)) return o - } else if (!e.includes(a)) return o - i ? o-- : o++ - } - return o === -1 || o === s ? o : !1 - } - } - function H8(e, t, n) { - let r = !!(n != null && n.backwards) - if (t === !1) return !1 - let i = e.charAt(t) - if (r) { - if ( - e.charAt(t - 1) === '\r' && - i === - ` -` - ) - return t - 2 - if ( - i === - ` -` || - i === '\r' || - i === '\u2028' || - i === '\u2029' - ) - return t - 1 - } else { - if ( - i === '\r' && - e.charAt(t + 1) === - ` -` - ) - return t + 2 - if ( - i === - ` -` || - i === '\r' || - i === '\u2028' || - i === '\u2029' - ) - return t + 1 - } - return t - } - function W8(e, t, n = {}) { - let r = vr(e, n.backwards ? t - 1 : t, n), - i = Yr(e, r, n) - return r !== i - } - function Q8(e) { - return Array.isArray(e) && e.length > 0 - } - function J8(e) { - return e ? (t) => e(t, T2) : Y8 - } - function X8(e) { - let t = e.type || e.kind || '(unknown type)', - n = String( - e.name || - (e.id && (typeof e.id == 'object' ? e.id.name : e.id)) || - (e.key && (typeof e.key == 'object' ? e.key.name : e.key)) || - (e.value && (typeof e.value == 'object' ? '' : String(e.value))) || - e.operator || - '' - ) - return n.length > 20 && (n = n.slice(0, 19) + '\u2026'), t + (n ? ' ' + n : '') - } - function X1(e, t) { - ;(e.comments ?? (e.comments = [])).push(t), (t.printed = !1), (t.nodeDescription = X8(e)) - } - function ss(e, t) { - ;(t.leading = !0), (t.trailing = !1), X1(e, t) - } - function Wr(e, t, n) { - ;(t.leading = !1), (t.trailing = !1), n && (t.marker = n), X1(e, t) - } - function os(e, t) { - ;(t.leading = !1), (t.trailing = !0), X1(e, t) - } - function K1(e, t) { - if (w1.has(e)) return w1.get(e) - let { - printer: { getCommentChildNodes: n, canAttachComment: r, getVisitorKeys: i }, - locStart: s, - locEnd: o - } = t - if (!r) return [] - let a = (n?.(e, t) ?? [...x2(e, { getVisitorKeys: ju(i) })]).flatMap((u) => - r(u) ? [u] : K1(u, t) - ) - return a.sort((u, l) => s(u) - s(l) || o(u) - o(l)), w1.set(e, a), a - } - function S2(e, t, n, r) { - let { locStart: i, locEnd: s } = n, - o = i(t), - a = s(t), - u = K1(e, n), - l, - c, - d = 0, - h = u.length - for (; d < h; ) { - let m = (d + h) >> 1, - g = u[m], - v = i(g), - N = s(g) - if (v <= o && a <= N) return S2(g, t, n, g) - if (N <= o) { - ;(l = g), (d = m + 1) - continue - } - if (a <= v) { - ;(c = g), (h = m) - continue - } - throw new Error('Comment location overlaps with node location') - } - if (r?.type === 'TemplateLiteral') { - let { quasis: m } = r, - g = C1(m, t, n) - l && C1(m, l, n) !== g && (l = null), c && C1(m, c, n) !== g && (c = null) - } - return { enclosingNode: r, precedingNode: l, followingNode: c } - } - function K8(e, t) { - let { comments: n } = e - if ((delete e.comments, !z8(n) || !t.printer.canAttachComment)) return - let r = [], - { - locStart: i, - locEnd: s, - printer: { - experimentalFeatures: { avoidAstMutation: o = !1 } = {}, - handleComments: a = {} - }, - originalText: u - } = t, - { ownLine: l = L1, endOfLine: c = L1, remaining: d = L1 } = a, - h = n.map((m, g) => ({ - ...S2(e, m, t), - comment: m, - text: u, - options: t, - ast: e, - isLastComment: n.length - 1 === g - })) - for (let [m, g] of h.entries()) { - let { - comment: v, - precedingNode: N, - enclosingNode: _, - followingNode: w, - text: C, - options: S, - ast: k, - isLastComment: M - } = g - if ( - S.parser === 'json' || - S.parser === 'json5' || - S.parser === 'jsonc' || - S.parser === '__js_expression' || - S.parser === '__ts_expression' || - S.parser === '__vue_expression' || - S.parser === '__vue_ts_expression' - ) { - if (i(v) - i(k) <= 0) { - ss(k, v) - continue - } - if (s(v) - s(k) >= 0) { - os(k, v) - continue - } - } - let I - if ( - (o - ? (I = [g]) - : ((v.enclosingNode = _), - (v.precedingNode = N), - (v.followingNode = w), - (I = [v, C, S, k, M])), - Z8(C, S, h, m)) - ) - (v.placement = 'ownLine'), l(...I) || (w ? ss(w, v) : N ? os(N, v) : Wr(_ || k, v)) - else if (ev(C, S, h, m)) - (v.placement = 'endOfLine'), c(...I) || (N ? os(N, v) : w ? ss(w, v) : Wr(_ || k, v)) - else if (((v.placement = 'remaining'), !d(...I))) - if (N && w) { - let B = r.length - B > 0 && r[B - 1].followingNode !== w && km(r, S), r.push(g) - } else N ? os(N, v) : w ? ss(w, v) : Wr(_ || k, v) - } - if ((km(r, t), !o)) - for (let m of n) delete m.precedingNode, delete m.enclosingNode, delete m.followingNode - } - function Z8(e, t, n, r) { - let { comment: i, precedingNode: s } = n[r], - { locStart: o, locEnd: a } = t, - u = o(i) - if (s) - for (let l = r - 1; l >= 0; l--) { - let { comment: c, precedingNode: d } = n[l] - if (d !== s || !A2(e.slice(a(c), u))) break - u = o(c) - } - return Dr(e, u, { backwards: !0 }) - } - function ev(e, t, n, r) { - let { comment: i, followingNode: s } = n[r], - { locStart: o, locEnd: a } = t, - u = a(i) - if (s) - for (let l = r + 1; l < n.length; l++) { - let { comment: c, followingNode: d } = n[l] - if (d !== s || !A2(e.slice(u, o(c)))) break - u = a(c) - } - return Dr(e, u) - } - function km(e, t) { - var n, r - let i = e.length - if (i === 0) return - let { precedingNode: s, followingNode: o } = e[0], - a = t.locStart(o), - u - for (u = i; u > 0; --u) { - let { comment: l, precedingNode: c, followingNode: d } = e[u - 1] - U1.strictEqual(c, s), U1.strictEqual(d, o) - let h = t.originalText.slice(t.locEnd(l), a) - if (((r = (n = t.printer).isGap) == null ? void 0 : r.call(n, h, t)) ?? /^[\s(]*$/.test(h)) - a = t.locStart(l) - else break - } - for (let [l, { comment: c }] of e.entries()) l < u ? os(s, c) : ss(o, c) - for (let l of [s, o]) - l.comments && - l.comments.length > 1 && - l.comments.sort((c, d) => t.locStart(c) - t.locStart(d)) - e.length = 0 - } - function C1(e, t, n) { - let r = n.locStart(t) - 1 - for (let i = 1; i < e.length; ++i) if (r < n.locStart(e[i])) return i - 1 - return 0 - } - function tv(e, t) { - let n = t - 1 - ;(n = vr(e, n, { backwards: !0 })), - (n = Yr(e, n, { backwards: !0 })), - (n = vr(e, n, { backwards: !0 })) - let r = Yr(e, n, { backwards: !0 }) - return n !== r - } - function F2(e, t) { - let n = e.node - return (n.printed = !0), t.printer.printComment(e, t) - } - function nv(e, t) { - var n - let r = e.node, - i = [F2(e, t)], - { printer: s, originalText: o, locStart: a, locEnd: u } = t - if ((n = s.isBlockComment) != null && n.call(s, r)) { - let c = Dr(o, u(r)) ? (Dr(o, a(r), { backwards: !0 }) ? zr : h2) : ' ' - i.push(c) - } else i.push(zr) - let l = Yr(o, vr(o, u(r))) - return l !== !1 && Dr(o, l) && i.push(zr), i - } - function rv(e, t, n) { - var r - let i = e.node, - s = F2(e, t), - { printer: o, originalText: a, locStart: u } = t, - l = (r = o.isBlockComment) == null ? void 0 : r.call(o, i) - if ( - (n != null && n.hasLineSuffix && !(n != null && n.isBlock)) || - Dr(a, u(i), { backwards: !0 }) - ) { - let c = Z1(a, u(i)) - return { doc: O1([zr, c ? zr : '', s]), isBlock: l, hasLineSuffix: !0 } - } - return !l || (n != null && n.hasLineSuffix) - ? { doc: [O1([' ', s]), Vu], isBlock: l, hasLineSuffix: !0 } - : { doc: [' ', s], isBlock: l, hasLineSuffix: !1 } - } - function iv(e, t) { - let n = e.node - if (!n) return {} - let r = t[Symbol.for('printedComments')] - if ((n.comments || []).filter((a) => !r.has(a)).length === 0) - return { leading: '', trailing: '' } - let i = [], - s = [], - o - return ( - e.each(() => { - let a = e.node - if (r != null && r.has(a)) return - let { leading: u, trailing: l } = a - u ? i.push(nv(e, t)) : l && ((o = rv(e, t, o)), s.push(o.doc)) - }, 'comments'), - { leading: i, trailing: s } - ) - } - function sv(e, t, n) { - let { leading: r, trailing: i } = iv(e, n) - return !r && !i ? t : b2(t, (s) => [r, s, i]) - } - function ov(e) { - let { [Symbol.for('comments')]: t, [Symbol.for('printedComments')]: n } = e - for (let r of t) { - if (!r.printed && !n.has(r)) - throw new Error( - 'Comment "' + r.value.trim() + '" was not printed. Please report this error!' - ) - delete r.printed - } - } - function av(e) { - return () => {} - } - function L2({ plugins: e = [], showDeprecated: t = !1 } = {}) { - let n = e.flatMap((i) => i.languages ?? []), - r = [] - for (let i of fv(Object.assign({}, ...e.map(({ options: s }) => s), lv))) - (!t && i.deprecated) || - (Array.isArray(i.choices) && - (t || (i.choices = i.choices.filter((s) => !s.deprecated)), - i.name === 'parser' && (i.choices = [...i.choices, ...cv(i.choices, n, e)])), - (i.pluginDefaults = Object.fromEntries( - e - .filter((s) => { - var o - return ((o = s.defaultOptions) == null ? void 0 : o[i.name]) !== void 0 - }) - .map((s) => [s.name, s.defaultOptions[i.name]]) - )), - r.push(i)) - return { languages: n, options: r } - } - function* cv(e, t, n) { - let r = new Set(e.map((i) => i.value)) - for (let i of t) - if (i.parsers) { - for (let s of i.parsers) - if (!r.has(s)) { - r.add(s) - let o = n.find((u) => u.parsers && Object.prototype.hasOwnProperty.call(u.parsers, s)), - a = i.name - o != null && o.name && (a += ` (plugin: ${o.name})`), yield { value: s, description: a } - } - } - } - function fv(e) { - let t = [] - for (let [n, r] of Object.entries(e)) { - let i = { name: n, ...r } - Array.isArray(i.default) && (i.default = gt(!1, i.default, -1).value), t.push(i) - } - return t - } - function Mm(e, t) { - if (!t) return - let n = dv(t).toLowerCase() - return ( - e.find(({ filenames: r }) => r?.some((i) => i.toLowerCase() === n)) ?? - e.find(({ extensions: r }) => r?.some((i) => n.endsWith(i))) - ) - } - function pv(e, t) { - if (t) - return ( - e.find(({ name: n }) => n.toLowerCase() === t) ?? - e.find(({ aliases: n }) => n?.includes(t)) ?? - e.find(({ extensions: n }) => n?.includes(`.${t}`)) - ) - } - function hv(e, t) { - let n = e.plugins.flatMap((i) => i.languages ?? []), - r = pv(n, t.language) ?? Mm(n, t.physicalFile) ?? Mm(n, t.file) ?? (t.physicalFile, void 0) - return r?.parsers[0] - } - function Vm(e, t, n, r) { - return [ - `Invalid ${us.default.red(r.key(e))} value.`, - `Expected ${us.default.blue(n)},`, - `but received ${t === C2 ? us.default.gray('nothing') : us.default.red(r.value(t))}.` - ].join(' ') - } - function I2({ text: e, list: t }, n) { - let r = [] - return ( - e && r.push(`- ${us.default.blue(e)}`), - t && - r.push( - [`- ${us.default.blue(t.title)}:`].concat( - t.values.map((i) => I2(i, n - Bm.length).replace(/^|\n/g, `$&${Bm}`)) - ).join(` -`) - ), - R2(r, n) - ) - } - function R2(e, t) { - if (e.length === 1) return e[0] - let [n, r] = e, - [i, s] = e.map( - (o) => - o.split( - ` -`, - 1 - )[0].length - ) - return i > t && i > s ? r : n - } - function vv(e, t) { - if (e === t) return 0 - let n = e - e.length > t.length && ((e = t), (t = n)) - let r = e.length, - i = t.length - for (; r > 0 && e.charCodeAt(~-r) === t.charCodeAt(~-i); ) r--, i-- - let s = 0 - for (; s < r && e.charCodeAt(s) === t.charCodeAt(s); ) s++ - if (((r -= s), (i -= s), r === 0)) return i - let o, - a, - u, - l, - c = 0, - d = 0 - for (; c < r; ) ($m[c] = e.charCodeAt(s + c)), (I1[c] = ++c) - for (; d < i; ) - for (o = t.charCodeAt(s + d), u = d++, a = d, c = 0; c < r; c++) - (l = o === $m[c] ? u : u + 1), - (u = I1[c]), - (a = I1[c] = u > a ? (l > a ? a + 1 : l) : l > u ? u + 1 : l) - return a - } - function Ev(e, t) { - let n = new e(t), - r = Object.create(n) - for (let i of bv) i in t && (r[i] = yv(t[i], n, br.prototype[i].length)) - return r - } - function yv(e, t, n) { - return typeof e == 'function' - ? (...r) => e(...r.slice(0, n - 1), t, ...r.slice(n - 1)) - : () => e - } - function jm({ from: e, to: t }) { - return { from: [e], to: t } - } - function Sv(e, t) { - let n = Object.create(null) - for (let r of e) { - let i = r[t] - if (n[i]) throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`) - n[i] = r - } - return n - } - function Av(e, t) { - let n = new Map() - for (let r of e) { - let i = r[t] - if (n.has(i)) throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`) - n.set(i, r) - } - return n - } - function Fv() { - let e = Object.create(null) - return (t) => { - let n = JSON.stringify(t) - return e[n] ? !0 : ((e[n] = !0), !1) - } - } - function wv(e, t) { - let n = [], - r = [] - for (let i of e) t(i) ? n.push(i) : r.push(i) - return [n, r] - } - function Lv(e) { - return e === Math.floor(e) - } - function Cv(e, t) { - if (e === t) return 0 - let n = typeof e, - r = typeof t, - i = ['undefined', 'object', 'boolean', 'number', 'string'] - return n !== r - ? i.indexOf(n) - i.indexOf(r) - : n !== 'string' - ? Number(e) - Number(t) - : e.localeCompare(t) - } - function Iv(e) { - return (...t) => { - let n = e(...t) - return typeof n == 'string' ? new Error(n) : n - } - } - function qm(e) { - return e === void 0 ? {} : e - } - function O2(e) { - if (typeof e == 'string') return { text: e } - let { text: t, list: n } = e - return ( - Rv((t || n) !== void 0, 'Unexpected `expected` result, there should be at least one field.'), - n ? { text: t, list: { title: n.title, values: n.values.map(O2) } } : { text: t } - ) - } - function Gm(e, t) { - return e === !0 ? !0 : e === !1 ? { value: t } : e - } - function Hm(e, t, n = !1) { - return e === !1 - ? !1 - : e === !0 - ? n - ? !0 - : [{ value: t }] - : 'value' in e - ? [e] - : e.length === 0 - ? !1 - : e - } - function Wm(e, t) { - return typeof e == 'string' || 'key' in e - ? { from: t, to: e } - : 'from' in e - ? { from: e.from, to: e.to } - : { from: t, to: e.to } - } - function $1(e, t) { - return e === void 0 ? [] : Array.isArray(e) ? e.map((n) => Wm(n, t)) : [Wm(e, t)] - } - function Qm(e, t) { - let n = $1(typeof e == 'object' && 'redirect' in e ? e.redirect : e, t) - return n.length === 0 - ? { remain: t, redirect: n } - : typeof e == 'object' && 'remain' in e - ? { remain: e.remain, redirect: n } - : { redirect: n } - } - function Rv(e, t) { - if (!e) throw new Error(t) - } - function jv( - e, - t, - { logger: n = !1, isCLI: r = !1, passThrough: i = !1, FlagSchema: s, descriptor: o } = {} - ) { - if (r) { - if (!s) throw new Error("'FlagSchema' option is required.") - if (!o) throw new Error("'descriptor' option is required.") - } else o = as - let a = i - ? Array.isArray(i) - ? (h, m) => (i.includes(h) ? { [h]: m } : void 0) - : (h, m) => ({ [h]: m }) - : (h, m, g) => { - let { _: v, ...N } = g.schemas - return k2(h, m, { ...g, schemas: N }) - }, - u = qv(t, { isCLI: r, FlagSchema: s }), - l = new $v(u, { logger: n, unknown: a, descriptor: o }), - c = n !== !1 - c && R1 && (l._hasDeprecationWarned = R1) - let d = l.normalize(e) - return c && (R1 = l._hasDeprecationWarned), d - } - function qv(e, { isCLI: t, FlagSchema: n }) { - let r = [] - t && r.push(_v.create({ name: '_' })) - for (let i of e) - r.push(Gv(i, { isCLI: t, optionInfos: e, FlagSchema: n })), - i.alias && t && r.push(xv.create({ name: i.alias, sourceName: i.name })) - return r - } - function Gv(e, { isCLI: t, optionInfos: n, FlagSchema: r }) { - let { name: i } = e, - s = { name: i }, - o, - a = {} - switch (e.type) { - case 'int': - ;(o = Mv), t && (s.preprocess = Number) - break - case 'string': - o = zm - break - case 'choice': - ;(o = kv), - (s.choices = e.choices.map((u) => - u != null && u.redirect - ? { ...u, redirect: { to: { key: e.name, value: u.redirect } } } - : u - )) - break - case 'boolean': - o = Tv - break - case 'flag': - ;(o = r), - (s.flags = n.flatMap((u) => - [u.alias, u.description && u.name, u.oppositeDescription && `no-${u.name}`].filter( - Boolean - ) - )) - break - case 'path': - o = zm - break - default: - throw new Error(`Unexpected type ${e.type}`) - } - if ( - (e.exception - ? (s.validate = (u, l, c) => e.exception(u) || l.validate(u, c)) - : (s.validate = (u, l, c) => u === void 0 || l.validate(u, c)), - e.redirect && - (a.redirect = (u) => - u - ? { - to: - typeof e.redirect == 'string' - ? e.redirect - : { key: e.redirect.option, value: e.redirect.value } - } - : void 0), - e.deprecated && (a.deprecated = !0), - t && !e.array) - ) { - let u = s.preprocess || ((l) => l) - s.preprocess = (l, c, d) => c.preprocess(u(Array.isArray(l) ? gt(!1, l, -1) : l), d) - } - return e.array - ? Nv.create({ - ...(t ? { preprocess: (u) => (Array.isArray(u) ? u : [u]) } : {}), - ...a, - valueSchema: o.create(s) - }) - : o.create({ ...s, ...a }) - } - function P2(e, t) { - if (!t) throw new Error('parserName is required.') - let n = M2(!1, e, (i) => i.parsers && Object.prototype.hasOwnProperty.call(i.parsers, t)) - if (n) return n - let r = `Couldn't resolve parser "${t}".` - throw ((r += ' Plugins must be explicitly added to the standalone bundle.'), new w2(r)) - } - function Qv(e, t) { - if (!t) throw new Error('astFormat is required.') - let n = M2(!1, e, (i) => i.printers && Object.prototype.hasOwnProperty.call(i.printers, t)) - if (n) return n - let r = `Couldn't find plugin for AST format "${t}".` - throw ((r += ' Plugins must be explicitly added to the standalone bundle.'), new w2(r)) - } - function B2({ plugins: e, parser: t }) { - let n = P2(e, t) - return V2(n, t) - } - function V2(e, t) { - let n = e.parsers[t] - return typeof n == 'function' ? n() : n - } - function zv(e, t) { - let n = e.printers[t] - return typeof n == 'function' ? n() : n - } - async function Yv(e, t = {}) { - var n - let r = { ...e } - if (!r.parser) - if (r.filepath) { - if (((r.parser = mv(r, { physicalFile: r.filepath })), !r.parser)) - throw new Om(`No parser could be inferred for file "${r.filepath}".`) - } else throw new Om("No parser and no file path given, couldn't infer a parser.") - let i = L2({ plugins: e.plugins, showDeprecated: !0 }).options, - s = { - ...Ym, - ...Object.fromEntries(i.filter((h) => h.default !== void 0).map((h) => [h.name, h.default])) - }, - o = P2(r.plugins, r.parser), - a = await V2(o, r.parser) - ;(r.astFormat = a.astFormat), (r.locEnd = a.locEnd), (r.locStart = a.locStart) - let u = (n = o.printers) != null && n[a.astFormat] ? o : Qv(r.plugins, a.astFormat), - l = await zv(u, a.astFormat) - r.printer = l - let c = u.defaultOptions - ? Object.fromEntries(Object.entries(u.defaultOptions).filter(([, h]) => h !== void 0)) - : {}, - d = { ...s, ...c } - for (let [h, m] of Object.entries(d)) (r[h] === null || r[h] === void 0) && (r[h] = m) - return ( - r.parser === 'json' && (r.trailingComma = 'none'), - Hv(r, i, { passThrough: Object.keys(Ym), ...t }) - ) - } - async function Xv(e, t) { - let n = await B2(t), - r = n.preprocess ? n.preprocess(e, t) : e - t.originalText = r - let i - try { - i = await n.parse(r, t, t) - } catch (s) { - Kv(s, e) - } - return { text: r, ast: i } - } - function Kv(e, t) { - let { loc: n } = e - if (n) { - let r = (0, Jv.codeFrameColumns)(t, n, { highlightCode: !0 }) - throw ( - ((e.message += - ` -` + r), - (e.codeFrame = r), - e) - ) - } - throw e - } - async function Zv(e, t, n, r, i) { - let { - embeddedLanguageFormatting: s, - printer: { embed: o, hasPrettierIgnore: a = () => !1, getVisitorKeys: u } - } = n - if (!o || s !== 'auto') return - if (o.length > 2) - throw new Error( - 'printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed' - ) - let l = ju(o.getVisitorKeys ?? u), - c = [] - m() - let d = e.stack - for (let { print: g, node: v, pathStack: N } of c) - try { - e.stack = N - let _ = await g(h, t, e, n) - _ && i.set(v, _) - } catch (_) { - if (globalThis.PRETTIER_DEBUG) throw _ - } - e.stack = d - function h(g, v) { - return eb(g, v, n, r) - } - function m() { - let { node: g } = e - if (g === null || typeof g != 'object' || a(e)) return - for (let N of l(g)) Array.isArray(g[N]) ? e.each(m, N) : e.call(m, N) - let v = o(e, n) - if (v) { - if (typeof v == 'function') { - c.push({ print: v, node: g, pathStack: [...e.stack] }) - return - } - i.set(g, v) - } - } - } - async function eb(e, t, n, r) { - let i = await fs({ ...n, ...t, parentParser: n.parser, originalText: e }, { passThrough: !0 }), - { ast: s } = await No(e, i), - o = await r(s, i) - return v2(o) - } - function tb(e, t) { - let { - originalText: n, - [Symbol.for('comments')]: r, - locStart: i, - locEnd: s, - [Symbol.for('printedComments')]: o - } = t, - { node: a } = e, - u = i(a), - l = s(a) - for (let c of r) i(c) >= u && s(c) <= l && o.add(c) - return n.slice(u, l) - } - async function qu(e, t) { - ;({ ast: e } = await U2(e, t)) - let n = new Map(), - r = new U8(e), - i = uv(t), - s = new Map() - await Zv(r, a, t, qu, s) - let o = await Jm(r, t, a, void 0, s) - return ov(t), o - function a(l, c) { - return l === void 0 || l === r - ? u(c) - : Array.isArray(l) - ? r.call(() => u(c), ...l) - : r.call(() => u(c), l) - } - function u(l) { - i(r) - let c = r.node - if (c == null) return '' - let d = c && typeof c == 'object' && l === void 0 - if (d && n.has(c)) return n.get(c) - let h = Jm(r, t, a, l, s) - return d && n.set(c, h), h - } - } - function Jm(e, t, n, r, i) { - var s - let { node: o } = e, - { printer: a } = t, - u - return ( - (s = a.hasPrettierIgnore) != null && s.call(a, e) - ? (u = nb(e, t)) - : i.has(o) - ? (u = i.get(o)) - : (u = a.print(e, t, n, r)), - o === t.cursorNode && (u = b2(u, (l) => [M1, l, M1])), - a.printComment && - (!a.willPrintOwnComments || !a.willPrintOwnComments(e, t)) && - (u = sv(e, u, t)), - u - ) - } - async function U2(e, t) { - let n = e.comments ?? [] - ;(t[Symbol.for('comments')] = n), - (t[Symbol.for('tokens')] = e.tokens ?? []), - (t[Symbol.for('printedComments')] = new Set()), - K8(e, t) - let { - printer: { preprocess: r } - } = t - return (e = r ? await r(e, t) : e), { ast: e, comments: n } - } - function rb(e, t) { - let { cursorOffset: n, locStart: r, locEnd: i } = t, - s = ju(t.printer.getVisitorKeys), - o = (u) => r(u) <= n && i(u) >= n, - a = e - for (let u of q8(e, { getVisitorKeys: s, filter: o })) a = u - return a - } - function sb(e, t) { - let { - printer: { massageAstNode: n, getVisitorKeys: r } - } = t - if (!n) return e - let i = ju(r), - s = n.ignoredProperties ?? new Set() - return o(e) - function o(a, u) { - if (!(a !== null && typeof a == 'object')) return a - if (Array.isArray(a)) return a.map((h) => o(h, u)).filter(Boolean) - let l = {}, - c = new Set(i(a)) - for (let h in a) - !Object.prototype.hasOwnProperty.call(a, h) || - s.has(h) || - (c.has(h) ? (l[h] = o(a[h], a)) : (l[h] = a[h])) - let d = n(a, l, u) - if (d !== null) return d ?? l - } - } - function ub(e, t) { - let n = [e.node, ...e.parentNodes], - r = new Set([t.node, ...t.parentNodes]) - return n.find((i) => $2.has(i.type) && r.has(i)) - } - function Xm(e) { - let t = e.length - 1 - for (;;) { - let n = e[t] - if (n?.type === 'Program' || n?.type === 'File') t-- - else break - } - return e.slice(0, t + 1) - } - function lb(e, t, { locStart: n, locEnd: r }) { - let i = e.node, - s = t.node - if (i === s) return { startNode: i, endNode: s } - let o = n(e.node) - for (let u of Xm(t.parentNodes)) - if (n(u) >= o) s = u - else break - let a = r(t.node) - for (let u of Xm(e.parentNodes)) { - if (r(u) <= a) i = u - else break - if (i === s) break - } - return { startNode: i, endNode: s } - } - function j1(e, t, n, r, i = [], s) { - let { locStart: o, locEnd: a } = n, - u = o(e), - l = a(e) - if (!(t > l || t < u || (s === 'rangeEnd' && t === u) || (s === 'rangeStart' && t === l))) { - for (let c of K1(e, n)) { - let d = j1(c, t, n, r, [e, ...i], s) - if (d) return d - } - if (!r || r(e, i[0])) return { node: e, parentNodes: i } - } - } - function cb(e, t) { - return ( - t !== 'DeclareExportDeclaration' && - e !== 'TypeParameterDeclaration' && - (e === 'Directive' || - e === 'TypeAlias' || - e === 'TSExportAssignment' || - e.startsWith('Declare') || - e.startsWith('TSDeclare') || - e.endsWith('Statement') || - e.endsWith('Declaration')) - ) - } - function Km(e, t, n) { - if (!t) return !1 - switch (e.parser) { - case 'flow': - case 'babel': - case 'babel-flow': - case 'babel-ts': - case 'typescript': - case 'acorn': - case 'espree': - case 'meriyah': - case '__babel_estree': - return cb(t.type, n?.type) - case 'json': - case 'json5': - case 'jsonc': - case 'json-stringify': - return $2.has(t.type) - case 'graphql': - return fb.has(t.kind) - case 'vue': - return t.tag !== 'root' - } - return !1 - } - function db(e, t, n) { - let { rangeStart: r, rangeEnd: i, locStart: s, locEnd: o } = t - U1.ok(i > r) - let a = e.slice(r, i).search(/\S/), - u = a === -1 - if (!u) for (r += a; i > r && !/\S/.test(e[i - 1]); --i); - let l = j1(n, r, t, (m, g) => Km(t, m, g), [], 'rangeStart'), - c = u ? l : j1(n, i, t, (m) => Km(t, m), [], 'rangeEnd') - if (!l || !c) return { rangeStart: 0, rangeEnd: 0 } - let d, h - if (ab(t)) { - let m = ub(l, c) - ;(d = m), (h = m) - } else ({ startNode: d, endNode: h } = lb(l, c, t)) - return { rangeStart: Math.min(s(d), s(h)), rangeEnd: Math.max(o(d), o(h)) } - } - async function q2(e, t, n = 0) { - if (!e || e.trim().length === 0) return { formatted: '', cursorOffset: -1, comments: [] } - let { ast: r, text: i } = await No(e, t) - t.cursorOffset >= 0 && (t.cursorNode = ib(r, t)) - let s = await qu(r, t, n) - n > 0 && (s = D2([zr, s], n, t.tabWidth)) - let o = $u(s, t) - if (n > 0) { - let u = o.formatted.trim() - o.cursorNodeStart !== void 0 && (o.cursorNodeStart -= o.formatted.indexOf(u)), - (o.formatted = u + G1(t.endOfLine)) - } - let a = t[Symbol.for('comments')] - if (t.cursorOffset >= 0) { - let u, l, c, d, h - if ( - (t.cursorNode && o.cursorNodeText - ? ((u = t.locStart(t.cursorNode)), - (l = i.slice(u, t.locEnd(t.cursorNode))), - (c = t.cursorOffset - u), - (d = o.cursorNodeStart), - (h = o.cursorNodeText)) - : ((u = 0), (l = i), (c = t.cursorOffset), (d = 0), (h = o.formatted)), - l === h) - ) - return { formatted: o.formatted, cursorOffset: d + c, comments: a } - let m = l.split('') - m.splice(c, 0, Zm) - let g = h.split(''), - v = (0, e8.diffArrays)(m, g), - N = d - for (let _ of v) - if (_.removed) { - if (_.value.includes(Zm)) break - } else N += _.count - return { formatted: o.formatted, cursorOffset: N, comments: a } - } - return { formatted: o.formatted, cursorOffset: -1, comments: a } - } - async function pb(e, t) { - let { ast: n, text: r } = await No(e, t), - { rangeStart: i, rangeEnd: s } = db(r, t, n), - o = r.slice(i, s), - a = Math.min( - i, - r.lastIndexOf( - ` -`, - i - ) + 1 - ), - u = r.slice(a, i).match(/^\s*/)[0], - l = J1(u, t.tabWidth), - c = await q2( - o, - { - ...t, - rangeStart: 0, - rangeEnd: Number.POSITIVE_INFINITY, - cursorOffset: t.cursorOffset > i && t.cursorOffset <= s ? t.cursorOffset - i : -1, - endOfLine: 'lf' - }, - l - ), - d = c.formatted.trimEnd(), - { cursorOffset: h } = t - h > s ? (h += d.length - o.length) : c.cursorOffset >= 0 && (h = c.cursorOffset + i) - let m = r.slice(0, i) + d + r.slice(s) - if (t.endOfLine !== 'lf') { - let g = G1(t.endOfLine) - h >= 0 && - g === - `\r -` && - (h += u2( - m.slice(0, h), - ` -` - )), - (m = Bu( - !1, - m, - ` -`, - g - )) - } - return { formatted: m, cursorOffset: h, comments: c.comments } - } - function k1(e, t, n) { - return typeof t != 'number' || Number.isNaN(t) || t < 0 || t > e.length ? n : t - } - function e2(e, t) { - let { cursorOffset: n, rangeStart: r, rangeEnd: i } = t - return ( - (n = k1(e, n, -1)), - (r = k1(e, r, 0)), - (i = k1(e, i, e.length)), - { ...t, cursorOffset: n, rangeStart: r, rangeEnd: i } - ) - } - function G2(e, t) { - let { cursorOffset: n, rangeStart: r, rangeEnd: i, endOfLine: s } = e2(e, t), - o = e.charAt(0) === j2 - if ((o && ((e = e.slice(1)), n--, r--, i--), s === 'auto' && (s = t8(e)), e.includes('\r'))) { - let a = (u) => - u2( - e.slice(0, Math.max(u, 0)), - `\r -` - ) - ;(n -= a(n)), (r -= a(r)), (i -= a(i)), (e = n8(e)) - } - return { - hasBOM: o, - text: e, - options: e2(e, { ...t, cursorOffset: n, rangeStart: r, rangeEnd: i, endOfLine: s }) - } - } - async function t2(e, t) { - let n = await B2(t) - return !n.hasPragma || n.hasPragma(e) - } - async function H2(e, t) { - let { hasBOM: n, text: r, options: i } = G2(e, await fs(t)) - if ((i.rangeStart >= i.rangeEnd && r !== '') || (i.requirePragma && !(await t2(r, i)))) - return { formatted: e, cursorOffset: t.cursorOffset, comments: [] } - let s - return ( - i.rangeStart > 0 || i.rangeEnd < r.length - ? (s = await pb(r, i)) - : (!i.requirePragma && - i.insertPragma && - i.printer.insertPragma && - !(await t2(r, i)) && - (r = i.printer.insertPragma(r)), - (s = await q2(r, i))), - n && ((s.formatted = j2 + s.formatted), s.cursorOffset >= 0 && s.cursorOffset++), - s - ) - } - async function hb(e, t, n) { - let { text: r, options: i } = G2(e, await fs(t)), - s = await No(r, i) - return ( - n && - (n.preprocessForPrint && (s.ast = await U2(s.ast, i)), n.massage && (s.ast = ob(s.ast, i))), - s - ) - } - async function mb(e, t) { - t = await fs(t) - let n = await qu(e, t) - return $u(n, t) - } - async function gb(e, t) { - let n = v8(e), - { formatted: r } = await H2(n, { ...t, parser: '__js_expression' }) - return r - } - async function Db(e, t) { - t = await fs(t) - let { ast: n } = await No(e, t) - return qu(n, t) - } - async function vb(e, t) { - return $u(e, await fs(t)) - } - function xb(e, t) { - if (t === !1) return !1 - if (e.charAt(t) === '/' && e.charAt(t + 1) === '*') { - for (let n = t + 2; n < e.length; ++n) - if (e.charAt(n) === '*' && e.charAt(n + 1) === '/') return n + 2 - } - return t - } - function _b(e, t) { - return t === !1 ? !1 : e.charAt(t) === '/' && e.charAt(t + 1) === '/' ? N2(e, t) : t - } - function Nb(e, t) { - let n = null, - r = t - for (; r !== n; ) (n = r), (r = vr(e, r)), (r = nf(e, r)), (r = rf(e, r)), (r = Yr(e, r)) - return r - } - function Tb(e, t) { - let n = null, - r = t - for (; r !== n; ) (n = r), (r = _2(e, r)), (r = nf(e, r)), (r = vr(e, r)) - return (r = rf(e, r)), (r = Yr(e, r)), r !== !1 && Dr(e, r) - } - function Sb(e, t) { - let n = e.lastIndexOf(` -`) - return n === -1 ? 0 : J1(e.slice(n + 1).match(/^[\t ]*/)[0], t) - } - function Fb(e) { - if (typeof e != 'string') throw new TypeError('Expected a string') - return e.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d') - } - function wb(e, t) { - let n = e.match(new RegExp(`(${Fb(t)})+`, 'g')) - return n === null ? 0 : n.reduce((r, i) => Math.max(r, i.length / t.length), 0) - } - function Cb(e, t) { - let n = sf(e, t) - return n === !1 ? '' : e.charAt(n) - } - function Rb(e, t, n) { - for (let r = t; r < n; ++r) - if ( - e.charAt(r) === - ` -` - ) - return !0 - return !1 - } - function Ob(e, t, n = {}) { - return vr(e, n.backwards ? t - 1 : t, n) !== t - } - function Pb(e, t, n) { - let r = t === '"' ? "'" : '"', - i = Bu(!1, e, /\\(.)|(["'])/gs, (s, o, a) => - o === r - ? o - : a === t - ? '\\' + a - : a || (n && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o) ? o : '\\' + o) - ) - return t + i + t - } - function Vb(e, t, n) { - return sf(e, n(t)) - } - function Ub(e, t) { - return arguments.length === 2 || typeof t == 'number' ? sf(e, t) : Vb(...arguments) - } - function $b(e, t, n) { - return Z1(e, n(t)) - } - function jb(e, t) { - return arguments.length === 2 || typeof t == 'number' ? Z1(e, t) : $b(...arguments) - } - function qb(e, t, n) { - return of(e, n(t)) - } - function Gb(e, t) { - return arguments.length === 2 || typeof t == 'number' ? of(e, t) : qb(...arguments) - } - function Qr(e, t = 1) { - return async (...n) => { - let r = n[t] ?? {}, - i = r.plugins ?? [] - return (n[t] = { ...r, plugins: Array.isArray(i) ? i : Object.values(i) }), e(...n) - } - } - async function uf(e, t) { - let { formatted: n } = await af(e, { ...t, cursorOffset: -1 }) - return n - } - async function Q2(e, t) { - return (await uf(e, t)) === e - } - var VD, - Mu, - UD, - $D, - jD, - qD, - n2, - GD, - yo, - Pu, - r2, - xo, - HD, - WD, - QD, - vo, - zD, - YD, - q1, - i2, - s2, - o2, - JD, - XD, - KD, - a2, - ZD, - Bu, - e8, - Jr, - Hn, - Xr, - Wn, - Qn, - zn, - $t, - Fn, - Jt, - Yn, - Jn, - Xn, - yt, - wn, - nn, - l2, - Kr, - i8, - o8, - ls, - Cm, - H1, - c2, - An, - W1, - h8, - Vu, - m8, - Q1, - p2, - h2, - g8, - zr, - m2, - M1, - b8, - gt, - E8, - _8, - N8, - z1, - Ut, - Sn, - Eo, - J1, - Hr, - V1, - Ru, - V8, - U8, - y2, - U1, - j8, - G8, - vr, - _2, - N2, - Yr, - Dr, - z8, - T2, - Y8, - ju, - w1, - L1, - A2, - Z1, - uv, - w2, - Om, - lv, - dv, - mv, - as, - Pm, - gv, - us, - C2, - ku, - Bm, - Dv, - Um, - I1, - $m, - k2, - bv, - br, - xv, - _v, - Nv, - Tv, - kv, - Ov, - Mv, - zm, - Pv, - Bv, - Vv, - Uv, - $v, - R1, - Hv, - Wv, - M2, - Ym, - fs, - Jv, - No, - nb, - ib, - ob, - ab, - $2, - fb, - j2, - Zm, - ef, - bb, - Eb, - yb, - W2, - tf, - nf, - rf, - sf, - of, - Ab, - Lb, - Ib, - kb, - Mb, - Bb, - af, - z2, - Y2, - Hb, - X2 = o4(() => { - ;(VD = Object.create), - (Mu = Object.defineProperty), - (UD = Object.getOwnPropertyDescriptor), - ($D = Object.getOwnPropertyNames), - (jD = Object.getPrototypeOf), - (qD = Object.prototype.hasOwnProperty), - (n2 = (e) => { - throw TypeError(e) - }), - (GD = (e, t) => () => (e && (t = e((e = 0))), t)), - (yo = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports)), - (Pu = (e, t) => { - for (var n in t) Mu(e, n, { get: t[n], enumerable: !0 }) - }), - (r2 = (e, t, n, r) => { - if ((t && typeof t == 'object') || typeof t == 'function') - for (let i of $D(t)) - !qD.call(e, i) && - i !== n && - Mu(e, i, { get: () => t[i], enumerable: !(r = UD(t, i)) || r.enumerable }) - return e - }), - (xo = (e, t, n) => ( - (n = e != null ? VD(jD(e)) : {}), - r2(t || !e || !e.__esModule ? Mu(n, 'default', { value: e, enumerable: !0 }) : n, e) - )), - (HD = (e) => r2(Mu({}, '__esModule', { value: !0 }), e)), - (WD = (e, t, n) => t.has(e) || n2('Cannot ' + n)), - (QD = (e, t, n) => - t.has(e) - ? n2('Cannot add the same private member more than once') - : t instanceof WeakSet - ? t.add(e) - : t.set(e, n)), - (vo = (e, t, n) => (WD(e, t, 'access private method'), n)), - (zD = yo((e) => { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), (e.default = t) - function t() {} - t.prototype = { - diff: function (r, i) { - var s, - o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, - a = o.callback - typeof o == 'function' && ((a = o), (o = {})), (this.options = o) - var u = this - function l(M) { - return a - ? (setTimeout(function () { - a(void 0, M) - }, 0), - !0) - : M - } - ;(r = this.castInput(r)), - (i = this.castInput(i)), - (r = this.removeEmpty(this.tokenize(r))), - (i = this.removeEmpty(this.tokenize(i))) - var c = i.length, - d = r.length, - h = 1, - m = c + d - o.maxEditLength && (m = Math.min(m, o.maxEditLength)) - var g = (s = o.timeout) !== null && s !== void 0 ? s : 1 / 0, - v = Date.now() + g, - N = [{ oldPos: -1, lastComponent: void 0 }], - _ = this.extractCommon(N[0], i, r, 0) - if (N[0].oldPos + 1 >= d && _ + 1 >= c) - return l([{ value: this.join(i), count: i.length }]) - var w = -1 / 0, - C = 1 / 0 - function S() { - for (var M = Math.max(w, -h); M <= Math.min(C, h); M += 2) { - var I = void 0, - B = N[M - 1], - L = N[M + 1] - B && (N[M - 1] = void 0) - var A = !1 - if (L) { - var X = L.oldPos - M - A = L && 0 <= X && X < c - } - var z = B && B.oldPos + 1 < d - if (!A && !z) { - N[M] = void 0 - continue - } - if ( - (!z || (A && B.oldPos + 1 < L.oldPos) - ? (I = u.addToPath(L, !0, void 0, 0)) - : (I = u.addToPath(B, void 0, !0, 1)), - (_ = u.extractCommon(I, i, r, M)), - I.oldPos + 1 >= d && _ + 1 >= c) - ) - return l(n(u, I.lastComponent, i, r, u.useLongestToken)) - ;(N[M] = I), - I.oldPos + 1 >= d && (C = Math.min(C, M - 1)), - _ + 1 >= c && (w = Math.max(w, M + 1)) - } - h++ - } - if (a) - (function M() { - setTimeout(function () { - if (h > m || Date.now() > v) return a() - S() || M() - }, 0) - })() - else - for (; h <= m && Date.now() <= v; ) { - var k = S() - if (k) return k - } - }, - addToPath: function (r, i, s, o) { - var a = r.lastComponent - return a && a.added === i && a.removed === s - ? { - oldPos: r.oldPos + o, - lastComponent: { - count: a.count + 1, - added: i, - removed: s, - previousComponent: a.previousComponent - } - } - : { - oldPos: r.oldPos + o, - lastComponent: { count: 1, added: i, removed: s, previousComponent: a } - } - }, - extractCommon: function (r, i, s, o) { - for ( - var a = i.length, u = s.length, l = r.oldPos, c = l - o, d = 0; - c + 1 < a && l + 1 < u && this.equals(i[c + 1], s[l + 1]); +"use strict";(()=>{var t4=Object.create;var Ju=Object.defineProperty;var n4=Object.getOwnPropertyDescriptor;var r4=Object.getOwnPropertyNames;var i4=Object.getPrototypeOf,s4=Object.prototype.hasOwnProperty;var Ff=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var o4=(e,t)=>()=>(e&&(t=e(e=0)),t);var Kn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),a4=(e,t)=>{for(var n in t)Ju(e,n,{get:t[n],enumerable:!0})},u4=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of r4(t))!s4.call(e,i)&&i!==n&&Ju(e,i,{get:()=>t[i],enumerable:!(r=n4(t,i))||r.enumerable});return e};var Xu=(e,t,n)=>(n=e!=null?t4(i4(e)):{},u4(t||!e||!e.__esModule?Ju(n,"default",{value:e,enumerable:!0}):n,e));var Z0=Kn((yI,Du)=>{"use strict";function K0(e,t){if(e!=null)return e;var n=new Error(t!==void 0?t:"Got unexpected "+e);throw n.framesToPop=1,n}Du.exports=K0;Du.exports.default=K0;Object.defineProperty(Du.exports,"__esModule",{value:!0})});var go=Kn((bR,lm)=>{"use strict";var Tn="\\\\/",sm=`[^${Tn}]`,qn="\\.",uD="\\+",lD="\\?",Au="\\/",cD="(?=.)",om="[^/]",b1=`(?:${Au}|$)`,am=`(?:^|${Au})`,E1=`${qn}{1,2}${b1}`,fD=`(?!${qn})`,dD=`(?!${am}${E1})`,pD=`(?!${qn}{0,1}${b1})`,hD=`(?!${E1})`,mD=`[^.${Au}]`,gD=`${om}*?`,DD="/",um={DOT_LITERAL:qn,PLUS_LITERAL:uD,QMARK_LITERAL:lD,SLASH_LITERAL:Au,ONE_CHAR:cD,QMARK:om,END_ANCHOR:b1,DOTS_SLASH:E1,NO_DOT:fD,NO_DOTS:dD,NO_DOT_SLASH:pD,NO_DOTS_SLASH:hD,QMARK_NO_DOT:mD,STAR:gD,START_ANCHOR:am,SEP:DD},vD={...um,SLASH_LITERAL:`[${Tn}]`,QMARK:sm,STAR:`${sm}*?`,DOTS_SLASH:`${qn}{1,2}(?:[${Tn}]|$)`,NO_DOT:`(?!${qn})`,NO_DOTS:`(?!(?:^|[${Tn}])${qn}{1,2}(?:[${Tn}]|$))`,NO_DOT_SLASH:`(?!${qn}{0,1}(?:[${Tn}]|$))`,NO_DOTS_SLASH:`(?!${qn}{1,2}(?:[${Tn}]|$))`,QMARK_NO_DOT:`[^.${Tn}]`,START_ANCHOR:`(?:^|[${Tn}])`,END_ANCHOR:`(?:[${Tn}]|$)`,SEP:"\\"},bD={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};lm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:bD,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?vD:um}}});var Fu=Kn(Vt=>{"use strict";var{REGEX_BACKSLASH:ED,REGEX_REMOVE_BACKSLASH:yD,REGEX_SPECIAL_CHARS:xD,REGEX_SPECIAL_CHARS_GLOBAL:_D}=go();Vt.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Vt.hasRegexChars=e=>xD.test(e);Vt.isRegexChar=e=>e.length===1&&Vt.hasRegexChars(e);Vt.escapeRegex=e=>e.replace(_D,"\\$1");Vt.toPosixSlashes=e=>e.replace(ED,"/");Vt.removeBackslashes=e=>e.replace(yD,t=>t==="\\"?"":t);Vt.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Vt.escapeLast=(e,t,n)=>{let r=e.lastIndexOf(t,n);return r===-1?e:e[r-1]==="\\"?Vt.escapeLast(e,t,r-1):`${e.slice(0,r)}\\${e.slice(r)}`};Vt.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n};Vt.wrapOutput=(e,t={},n={})=>{let r=n.contains?"":"^",i=n.contains?"":"$",s=`${r}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s};Vt.basename=(e,{windows:t}={})=>t?e.replace(/[\\/]$/,"").replace(/.*[\\/]/,""):e.replace(/\/$/,"").replace(/.*\//,"")});var vm=Kn((yR,Dm)=>{"use strict";var cm=Fu(),{CHAR_ASTERISK:y1,CHAR_AT:ND,CHAR_BACKWARD_SLASH:Do,CHAR_COMMA:TD,CHAR_DOT:x1,CHAR_EXCLAMATION_MARK:fm,CHAR_FORWARD_SLASH:gm,CHAR_LEFT_CURLY_BRACE:_1,CHAR_LEFT_PARENTHESES:N1,CHAR_LEFT_SQUARE_BRACKET:SD,CHAR_PLUS:AD,CHAR_QUESTION_MARK:dm,CHAR_RIGHT_CURLY_BRACE:FD,CHAR_RIGHT_PARENTHESES:pm,CHAR_RIGHT_SQUARE_BRACKET:wD}=go(),hm=e=>e===gm||e===Do,mm=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},LD=(e,t)=>{let n=t||{},r=e.length-1,i=n.parts===!0||n.scanToEnd===!0,s=[],o=[],a=[],u=e,l=-1,c=0,d=0,h=!1,m=!1,g=!1,v=!1,N=!1,_=!1,w=!1,C=!1,S=!1,k=0,M,I,B={value:"",depth:0,isGlob:!1},L=()=>l>=r,A=()=>u.charCodeAt(l+1),X=()=>(M=I,u.charCodeAt(++l));for(;l0&&(fe=u.slice(0,c),u=u.slice(c),d-=c),z&&g===!0&&d>0?(z=u.slice(0,d),F=u.slice(d)):g===!0?(z="",F=u):z=u,z&&z!==""&&z!=="/"&&z!==u&&hm(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),n.unescape===!0&&(F&&(F=cm.removeBackslashes(F)),z&&w===!0&&(z=cm.removeBackslashes(z)));let T={prefix:fe,input:e,start:c,base:z,glob:F,isBrace:h,isBracket:m,isGlob:g,isExtglob:v,isGlobstar:N,negated:C};if(n.tokens===!0&&(T.maxDepth=0,hm(I)||o.push(B),T.tokens=o),n.parts===!0||n.tokens===!0){let Q;for(let $=0;${"use strict";var wu=go(),cn=Fu(),{MAX_LENGTH:Lu,POSIX_REGEX_SOURCE:CD,REGEX_NON_SPECIAL_CHARS:ID,REGEX_SPECIAL_CHARS_BACKREF:RD,REPLACEMENTS:bm}=wu,kD=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let n=`[${e.join("-")}]`;try{new RegExp(n)}catch{return e.map(i=>cn.escapeRegex(i)).join("..")}return n},is=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Em=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=bm[e]||e;let n={...t},r=typeof n.maxLength=="number"?Math.min(Lu,n.maxLength):Lu,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);let s={type:"bos",value:"",output:n.prepend||""},o=[s],a=n.capture?"":"?:",u=wu.globChars(n.windows),l=wu.extglobChars(u),{DOT_LITERAL:c,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:v,NO_DOT_SLASH:N,NO_DOTS_SLASH:_,QMARK:w,QMARK_NO_DOT:C,STAR:S,START_ANCHOR:k}=u,M=H=>`(${a}(?:(?!${k}${H.dot?g:c}).)*?)`,I=n.dot?"":v,B=n.dot?w:C,L=n.bash===!0?M(n):S;n.capture&&(L=`(${L})`),typeof n.noext=="boolean"&&(n.noextglob=n.noext);let A={input:e,index:-1,start:0,dot:n.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=cn.removePrefix(e,A),i=e.length;let X=[],z=[],fe=[],F=s,T,Q=()=>A.index===i-1,$=A.peek=(H=1)=>e[A.index+H],ee=A.advance=()=>e[++A.index],ne=()=>e.slice(A.index+1),se=(H="",Ne=0)=>{A.consumed+=H,A.index+=Ne},Ie=H=>{A.output+=H.output!=null?H.output:H.value,se(H.value)},P=()=>{let H=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),A.start++,H++;return H%2===0?!1:(A.negated=!0,A.start++,!0)},Z=H=>{A[H]++,fe.push(H)},J=H=>{A[H]--,fe.pop()},G=H=>{if(F.type==="globstar"){let Ne=A.braces>0&&(H.type==="comma"||H.type==="brace"),Y=H.extglob===!0||X.length&&(H.type==="pipe"||H.type==="paren");H.type!=="slash"&&H.type!=="paren"&&!Ne&&!Y&&(A.output=A.output.slice(0,-F.output.length),F.type="star",F.value="*",F.output=L,A.output+=F.output)}if(X.length&&H.type!=="paren"&&!l[H.value]&&(X[X.length-1].inner+=H.value),(H.value||H.output)&&Ie(H),F&&F.type==="text"&&H.type==="text"){F.value+=H.value,F.output=(F.output||"")+H.value;return}H.prev=F,o.push(H),F=H},_e=(H,Ne)=>{let Y={...l[Ne],conditions:1,inner:""};Y.prev=F,Y.parens=A.parens,Y.output=A.output;let de=(n.capture?"(":"")+Y.open;Z("parens"),G({type:H,value:Ne,output:A.output?"":m}),G({type:"paren",extglob:!0,value:ee(),output:de}),X.push(Y)},Re=H=>{let Ne=H.close+(n.capture?")":"");if(H.type==="negate"){let Y=L;H.inner&&H.inner.length>1&&H.inner.includes("/")&&(Y=M(n)),(Y!==L||Q()||/^\)+$/.test(ne()))&&(Ne=H.close=`)$))${Y}`),H.prev.type==="bos"&&Q()&&(A.negatedExtglob=!0)}G({type:"paren",extglob:!0,value:T,output:Ne}),J("parens")};if(n.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let H=!1,Ne=e.replace(RD,(Y,de,Te,Dt,Ye,ds)=>Dt==="\\"?(H=!0,Y):Dt==="?"?de?de+Dt+(Ye?w.repeat(Ye.length):""):ds===0?B+(Ye?w.repeat(Ye.length):""):w.repeat(Te.length):Dt==="."?c.repeat(Te.length):Dt==="*"?de?de+Dt+(Ye?L:""):L:de?Y:`\\${Y}`);return H===!0&&(n.unescape===!0?Ne=Ne.replace(/\\/g,""):Ne=Ne.replace(/\\+/g,Y=>Y.length%2===0?"\\\\":Y?"\\":"")),Ne===e&&n.contains===!0?(A.output=e,A):(A.output=cn.wrapOutput(Ne,A,t),A)}for(;!Q();){if(T=ee(),T==="\0")continue;if(T==="\\"){let Y=$();if(Y==="/"&&n.bash!==!0||Y==="."||Y===";")continue;if(!Y){T+="\\",G({type:"text",value:T});continue}let de=/^\\+/.exec(ne()),Te=0;if(de&&de[0].length>2&&(Te=de[0].length,A.index+=Te,Te%2!==0&&(T+="\\")),n.unescape===!0?T=ee()||"":T+=ee()||"",A.brackets===0){G({type:"text",value:T});continue}}if(A.brackets>0&&(T!=="]"||F.value==="["||F.value==="[^")){if(n.posix!==!1&&T===":"){let Y=F.value.slice(1);if(Y.includes("[")&&(F.posix=!0,Y.includes(":"))){let de=F.value.lastIndexOf("["),Te=F.value.slice(0,de),Dt=F.value.slice(de+2),Ye=CD[Dt];if(Ye){F.value=Te+Ye,A.backtrack=!0,ee(),!s.output&&o.indexOf(F)===1&&(s.output=m);continue}}}(T==="["&&$()!==":"||T==="-"&&$()==="]")&&(T=`\\${T}`),T==="]"&&(F.value==="["||F.value==="[^")&&(T=`\\${T}`),n.posix===!0&&T==="!"&&F.value==="["&&(T="^"),F.value+=T,Ie({value:T});continue}if(A.quotes===1&&T!=='"'){T=cn.escapeRegex(T),F.value+=T,Ie({value:T});continue}if(T==='"'){A.quotes=A.quotes===1?0:1,n.keepQuotes===!0&&G({type:"text",value:T});continue}if(T==="("){Z("parens"),G({type:"paren",value:T});continue}if(T===")"){if(A.parens===0&&n.strictBrackets===!0)throw new SyntaxError(is("opening","("));let Y=X[X.length-1];if(Y&&A.parens===Y.parens+1){Re(X.pop());continue}G({type:"paren",value:T,output:A.parens?")":"\\)"}),J("parens");continue}if(T==="["){if(n.nobracket===!0||!ne().includes("]")){if(n.nobracket!==!0&&n.strictBrackets===!0)throw new SyntaxError(is("closing","]"));T=`\\${T}`}else Z("brackets");G({type:"bracket",value:T});continue}if(T==="]"){if(n.nobracket===!0||F&&F.type==="bracket"&&F.value.length===1){G({type:"text",value:T,output:`\\${T}`});continue}if(A.brackets===0){if(n.strictBrackets===!0)throw new SyntaxError(is("opening","["));G({type:"text",value:T,output:`\\${T}`});continue}J("brackets");let Y=F.value.slice(1);if(F.posix!==!0&&Y[0]==="^"&&!Y.includes("/")&&(T=`/${T}`),F.value+=T,Ie({value:T}),n.literalBrackets===!1||cn.hasRegexChars(Y))continue;let de=cn.escapeRegex(F.value);if(A.output=A.output.slice(0,-F.value.length),n.literalBrackets===!0){A.output+=de,F.value=de;continue}F.value=`(${a}${de}|${F.value})`,A.output+=F.value;continue}if(T==="{"&&n.nobrace!==!0){Z("braces");let Y={type:"brace",value:T,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};z.push(Y),G(Y);continue}if(T==="}"){let Y=z[z.length-1];if(n.nobrace===!0||!Y){G({type:"text",value:T,output:T});continue}let de=")";if(Y.dots===!0){let Te=o.slice(),Dt=[];for(let Ye=Te.length-1;Ye>=0&&(o.pop(),Te[Ye].type!=="brace");Ye--)Te[Ye].type!=="dots"&&Dt.unshift(Te[Ye].value);de=kD(Dt,n),A.backtrack=!0}if(Y.comma!==!0&&Y.dots!==!0){let Te=A.output.slice(0,Y.outputIndex),Dt=A.tokens.slice(Y.tokensIndex);Y.value=Y.output="\\{",T=de="\\}",A.output=Te;for(let Ye of Dt)A.output+=Ye.output||Ye.value}G({type:"brace",value:T,output:de}),J("braces"),z.pop();continue}if(T==="|"){X.length>0&&X[X.length-1].conditions++,G({type:"text",value:T});continue}if(T===","){let Y=T,de=z[z.length-1];de&&fe[fe.length-1]==="braces"&&(de.comma=!0,Y="|"),G({type:"comma",value:T,output:Y});continue}if(T==="/"){if(F.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),F=s;continue}G({type:"slash",value:T,output:h});continue}if(T==="."){if(A.braces>0&&F.type==="dot"){F.value==="."&&(F.output=c);let Y=z[z.length-1];F.type="dots",F.output+=T,F.value+=T,Y.dots=!0;continue}if(A.braces+A.parens===0&&F.type!=="bos"&&F.type!=="slash"){G({type:"text",value:T,output:c});continue}G({type:"dot",value:T,output:c});continue}if(T==="?"){if(!(F&&F.value==="(")&&n.noextglob!==!0&&$()==="("&&$(2)!=="?"){_e("qmark",T);continue}if(F&&F.type==="paren"){let de=$(),Te=T;if(de==="<"&&!cn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(F.value==="("&&!/[!=<:]/.test(de)||de==="<"&&!/<([!=]|\w+>)/.test(ne()))&&(Te=`\\${T}`),G({type:"text",value:T,output:Te});continue}if(n.dot!==!0&&(F.type==="slash"||F.type==="bos")){G({type:"qmark",value:T,output:C});continue}G({type:"qmark",value:T,output:w});continue}if(T==="!"){if(n.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){_e("negate",T);continue}if(n.nonegate!==!0&&A.index===0){P();continue}}if(T==="+"){if(n.noextglob!==!0&&$()==="("&&$(2)!=="?"){_e("plus",T);continue}if(F&&F.value==="("||n.regex===!1){G({type:"plus",value:T,output:d});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||A.parens>0){G({type:"plus",value:T});continue}G({type:"plus",value:d});continue}if(T==="@"){if(n.noextglob!==!0&&$()==="("&&$(2)!=="?"){G({type:"at",extglob:!0,value:T,output:""});continue}G({type:"text",value:T});continue}if(T!=="*"){(T==="$"||T==="^")&&(T=`\\${T}`);let Y=ID.exec(ne());Y&&(T+=Y[0],A.index+=Y[0].length),G({type:"text",value:T});continue}if(F&&(F.type==="globstar"||F.star===!0)){F.type="star",F.star=!0,F.value+=T,F.output=L,A.backtrack=!0,A.globstar=!0,se(T);continue}let H=ne();if(n.noextglob!==!0&&/^\([^?]/.test(H)){_e("star",T);continue}if(F.type==="star"){if(n.noglobstar===!0){se(T);continue}let Y=F.prev,de=Y.prev,Te=Y.type==="slash"||Y.type==="bos",Dt=de&&(de.type==="star"||de.type==="globstar");if(n.bash===!0&&(!Te||H[0]&&H[0]!=="/")){G({type:"star",value:T,output:""});continue}let Ye=A.braces>0&&(Y.type==="comma"||Y.type==="brace"),ds=X.length&&(Y.type==="pipe"||Y.type==="paren");if(!Te&&Y.type!=="paren"&&!Ye&&!ds){G({type:"star",value:T,output:""});continue}for(;H.slice(0,3)==="/**";){let Zr=e[A.index+4];if(Zr&&Zr!=="/")break;H=H.slice(3),se("/**",3)}if(Y.type==="bos"&&Q()){F.type="globstar",F.value+=T,F.output=M(n),A.output=F.output,A.globstar=!0,se(T);continue}if(Y.type==="slash"&&Y.prev.type!=="bos"&&!Dt&&Q()){A.output=A.output.slice(0,-(Y.output+F.output).length),Y.output=`(?:${Y.output}`,F.type="globstar",F.output=M(n)+(n.strictSlashes?")":"|$)"),F.value+=T,A.globstar=!0,A.output+=Y.output+F.output,se(T);continue}if(Y.type==="slash"&&Y.prev.type!=="bos"&&H[0]==="/"){let Zr=H[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(Y.output+F.output).length),Y.output=`(?:${Y.output}`,F.type="globstar",F.output=`${M(n)}${h}|${h}${Zr})`,F.value+=T,A.output+=Y.output+F.output,A.globstar=!0,se(T+ee()),G({type:"slash",value:"/",output:""});continue}if(Y.type==="bos"&&H[0]==="/"){F.type="globstar",F.value+=T,F.output=`(?:^|${h}|${M(n)}${h})`,A.output=F.output,A.globstar=!0,se(T+ee()),G({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-F.output.length),F.type="globstar",F.output=M(n),F.value+=T,A.output+=F.output,A.globstar=!0,se(T);continue}let Ne={type:"star",value:T,output:L};if(n.bash===!0){Ne.output=".*?",(F.type==="bos"||F.type==="slash")&&(Ne.output=I+Ne.output),G(Ne);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&n.regex===!0){Ne.output=T,G(Ne);continue}(A.index===A.start||F.type==="slash"||F.type==="dot")&&(F.type==="dot"?(A.output+=N,F.output+=N):n.dot===!0?(A.output+=_,F.output+=_):(A.output+=I,F.output+=I),$()!=="*"&&(A.output+=m,F.output+=m)),G(Ne)}for(;A.brackets>0;){if(n.strictBrackets===!0)throw new SyntaxError(is("closing","]"));A.output=cn.escapeLast(A.output,"["),J("brackets")}for(;A.parens>0;){if(n.strictBrackets===!0)throw new SyntaxError(is("closing",")"));A.output=cn.escapeLast(A.output,"("),J("parens")}for(;A.braces>0;){if(n.strictBrackets===!0)throw new SyntaxError(is("closing","}"));A.output=cn.escapeLast(A.output,"{"),J("braces")}if(n.strictSlashes!==!0&&(F.type==="star"||F.type==="bracket")&&G({type:"maybe_slash",value:"",output:`${h}?`}),A.backtrack===!0){A.output="";for(let H of A.tokens)A.output+=H.output!=null?H.output:H.value,H.suffix&&(A.output+=H.suffix)}return A};Em.fastpaths=(e,t)=>{let n={...t},r=typeof n.maxLength=="number"?Math.min(Lu,n.maxLength):Lu,i=e.length;if(i>r)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${r}`);e=bm[e]||e;let{DOT_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:c,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=wu.globChars(n.windows),g=n.dot?c:l,v=n.dot?d:l,N=n.capture?"":"?:",_={negated:!1,prefix:""},w=n.bash===!0?".*?":h;n.capture&&(w=`(${w})`);let C=I=>I.noglobstar===!0?w:`(${N}(?:(?!${m}${I.dot?u:s}).)*?)`,S=I=>{switch(I){case"*":return`${g}${a}${w}`;case".*":return`${s}${a}${w}`;case"*.*":return`${g}${w}${s}${a}${w}`;case"*/*":return`${g}${w}${o}${a}${v}${w}`;case"**":return g+C(n);case"**/*":return`(?:${g}${C(n)}${o})?${v}${a}${w}`;case"**/*.*":return`(?:${g}${C(n)}${o})?${v}${w}${s}${a}${w}`;case"**/.*":return`(?:${g}${C(n)}${o})?${s}${a}${w}`;default:{let B=/^(.*?)\.(\w+)$/.exec(I);if(!B)return;let L=S(B[1]);return L?L+s+B[2]:void 0}}},k=cn.removePrefix(e,_),M=S(k);return M&&n.strictSlashes!==!0&&(M+=`${o}?`),M};ym.exports=Em});var Tm=Kn((_R,Nm)=>{"use strict";var OD=vm(),T1=xm(),_m=Fu(),MD=go(),PD=e=>e&&typeof e=="object"&&!Array.isArray(e),nt=(e,t,n=!1)=>{if(Array.isArray(e)){let c=e.map(h=>nt(h,t,n));return h=>{for(let m of c){let g=m(h);if(g)return g}return!1}}let r=PD(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!r)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=i.windows,o=r?nt.compileRe(e,t):nt.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};u=nt(i.ignore,c,n)}let l=(c,d=!1)=>{let{isMatch:h,match:m,output:g}=nt.test(c,o,t,{glob:e,posix:s}),v={glob:e,state:a,regex:o,posix:s,input:c,output:g,match:m,isMatch:h};return typeof i.onResult=="function"&&i.onResult(v),h===!1?(v.isMatch=!1,d?v:!1):u(c)?(typeof i.onIgnore=="function"&&i.onIgnore(v),v.isMatch=!1,d?v:!1):(typeof i.onMatch=="function"&&i.onMatch(v),d?v:!0)};return n&&(l.state=a),l};nt.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=n||{},o=s.format||(i?_m.toPosixSlashes:null),a=e===r,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===r),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=nt.matchBase(e,t,n,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};nt.matchBase=(e,t,n)=>(t instanceof RegExp?t:nt.makeRe(t,n)).test(_m.basename(e));nt.isMatch=(e,t,n)=>nt(t,n)(e);nt.parse=(e,t)=>Array.isArray(e)?e.map(n=>nt.parse(n,t)):T1(e,{...t,fastpaths:!1});nt.scan=(e,t)=>OD(e,t);nt.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let u=nt.toRegex(a,t);return r===!0&&(u.state=e),u};nt.makeRe=(e,t,n=!1,r=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i=t||{},s={negated:!1,fastpaths:!0},o="",a;return e.startsWith("./")&&(e=e.slice(2),o=s.prefix="./"),i.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(a=T1.fastpaths(e,t)),a===void 0?(s=T1(e,t),s.prefix=o+(s.prefix||"")):s.output=a,nt.compileRe(s,t,n,r)};nt.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(n){if(t&&t.debug===!0)throw n;return/$^/}};nt.constants=MD;Nm.exports=nt});var Am=Kn((NR,Sm)=>{"use strict";Sm.exports=Tm()});var J2={};a4(J2,{__debug:()=>Y2,check:()=>Q2,default:()=>Hb,doc:()=>ef,format:()=>uf,formatWithCursor:()=>af,getSupportInfo:()=>z2,util:()=>tf,version:()=>W2});function t8(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` +`?"crlf":"cr":"lf"}function G1(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`;default:return` +`}}function u2(e,t){let n;switch(t){case` +`:n=/\n/g;break;case"\r":n=/\r/g;break;case`\r +`:n=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let r=e.match(n);return r?r.length:0}function n8(e){return Bu(!1,e,/\r\n?/g,` +`)}function r8(e){if(typeof e=="string")return Jr;if(Array.isArray(e))return Hn;if(!e)return;let{type:t}=e;if(l2.has(t))return t}function s8(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(Kr(e))throw new Error("doc is valid.");let n=Object.prototype.toString.call(e);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=i8([...l2].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${r}.`}function a8(e,t,n,r){let i=[e];for(;i.length>0;){let s=i.pop();if(s===Cm){n(i.pop());continue}n&&i.push(s,Cm);let o=Kr(s);if(!o)throw new ls(s);if(t?.(s)!==!1)switch(o){case Hn:case Fn:{let a=o===Hn?s:s.parts;for(let u=a.length,l=u-1;l>=0;--l)i.push(a[l]);break}case Jt:i.push(s.flatContents,s.breakContents);break;case $t:if(r&&s.expandedStates)for(let a=s.expandedStates.length,u=a-1;u>=0;--u)i.push(s.expandedStates[u]);else i.push(s.contents);break;case Qn:case Wn:case Yn:case wn:case Jn:i.push(s.contents);break;case Jr:case Xr:case zn:case Xn:case yt:case nn:break;default:throw new ls(s)}}}function Ou(e){return An(e),{type:Wn,contents:e}}function cs(e,t){return An(t),{type:Qn,contents:t,n:e}}function f2(e,t={}){return An(e),W1(t.expandedStates,!0),{type:$t,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function u8(e){return cs(Number.NEGATIVE_INFINITY,e)}function l8(e){return cs({type:"root"},e)}function c8(e){return cs(-1,e)}function f8(e,t){return f2(e[0],{...t,expandedStates:e})}function d2(e){return W1(e),{type:Fn,parts:e}}function d8(e,t="",n={}){return An(e),t!==""&&An(t),{type:Jt,breakContents:e,flatContents:t,groupId:n.groupId}}function p8(e,t){return An(e),{type:Yn,contents:e,groupId:t.groupId,negate:t.negate}}function O1(e){return An(e),{type:Jn,contents:e}}function g2(e,t){An(e),W1(t);let n=[];for(let r=0;r0){for(let i=0;i0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${r(s.contents)}${d})`}if(s.type===$t){let c=[];s.break&&s.break!=="propagated"&&c.push("shouldBreak: true"),s.id&&c.push(`id: ${i(s.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return s.expandedStates?`conditionalGroup([${s.expandedStates.map(h=>r(h)).join(",")}]${d})`:`group(${r(s.contents)}${d})`}if(s.type===Fn)return`fill([${s.parts.map(c=>r(c)).join(", ")}])`;if(s.type===Jn)return"lineSuffix("+r(s.contents)+")";if(s.type===Xn)return"lineSuffixBoundary";if(s.type===wn)return`label(${JSON.stringify(s.label)}, ${r(s.contents)})`;throw new Error("Unknown doc type "+s.type)}function i(s){if(typeof s!="symbol")return JSON.stringify(String(s));if(s in t)return t[s];let o=s.description||"symbol";for(let a=0;;a++){let u=o+(a>0?` #${a}`:"");if(!n.has(u))return n.add(u),t[s]=`Symbol.for(${JSON.stringify(u)})`}}}function y8(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function x8(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function T8(e){if(!e)return 0;if(!N8.test(e))return e.length;e=e.replace(E8()," ");let t=0;for(let n of e){let r=n.codePointAt(0);r<=31||r>=127&&r<=159||r>=768&&r<=879||(t+=_8(r)?1:2)}return t}function Uu(e,t){if(typeof e=="string")return t(e);let n=new Map;return r(e);function r(s){if(n.has(s))return n.get(s);let o=i(s);return n.set(s,o),o}function i(s){switch(Kr(s)){case Hn:return t(s.map(r));case Fn:return t({...s,parts:s.parts.map(r)});case Jt:return t({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case $t:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),t({...s,contents:a,expandedStates:o})}case Qn:case Wn:case Yn:case wn:case Jn:return t({...s,contents:r(s.contents)});case Jr:case Xr:case zn:case Xn:case yt:case nn:return t(s);default:throw new ls(s)}}}function Y1(e,t,n){let r=n,i=!1;function s(o){if(i)return!1;let a=t(o);a!==void 0&&(i=!0,r=a)}return H1(e,s),r}function S8(e){if(e.type===$t&&e.break||e.type===yt&&e.hard||e.type===nn)return!0}function A8(e){return Y1(e,S8,!1)}function Im(e){if(e.length>0){let t=gt(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function F8(e){let t=new Set,n=[];function r(s){if(s.type===nn&&Im(n),s.type===$t){if(n.push(s),t.has(s))return!1;t.add(s)}}function i(s){s.type===$t&&n.pop().break&&Im(n)}H1(e,r,i,!0)}function w8(e){return e.type===yt&&!e.hard?e.soft?"":" ":e.type===Jt?e.flatContents:e}function L8(e){return Uu(e,w8)}function Rm(e){for(e=[...e];e.length>=2&>(!1,e,-2).type===yt&>(!1,e,-1).type===nn;)e.length-=2;if(e.length>0){let t=bo(gt(!1,e,-1));e[e.length-1]=t}return e}function bo(e){switch(Kr(e)){case Wn:case Yn:case $t:case Jn:case wn:{let t=bo(e.contents);return{...e,contents:t}}case Jt:return{...e,breakContents:bo(e.breakContents),flatContents:bo(e.flatContents)};case Fn:return{...e,parts:Rm(e.parts)};case Hn:return Rm(e);case Jr:return e.replace(/[\n\r]*$/,"");case Qn:case Xr:case zn:case Xn:case yt:case nn:break;default:throw new ls(e)}return e}function v2(e){return bo(I8(e))}function C8(e){switch(Kr(e)){case Fn:if(e.parts.every(t=>t===""))return"";break;case $t:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===$t&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Qn:case Wn:case Yn:case Jn:if(!e.contents)return"";break;case Jt:if(!e.flatContents&&!e.breakContents)return"";break;case Hn:{let t=[];for(let n of e){if(!n)continue;let[r,...i]=Array.isArray(n)?n:[n];typeof r=="string"&&typeof gt(!1,t,-1)=="string"?t[t.length-1]+=r:t.push(r),t.push(...i)}return t.length===0?"":t.length===1?t[0]:t}case Jr:case Xr:case zn:case Xn:case yt:case wn:case nn:break;default:throw new ls(e)}return e}function I8(e){return Uu(e,t=>C8(t))}function R8(e,t=m2){return Uu(e,n=>typeof n=="string"?g2(t,n.split(` +`)):n)}function k8(e){if(e.type===yt)return!0}function O8(e){return Y1(e,k8,!1)}function b2(e,t){return e.type===wn?{...e,contents:t(e.contents)}:t(e)}function E2(){return{value:"",length:0,queue:[]}}function M8(e,t){return P1(e,{type:"indent"},t)}function P8(e,t,n){return t===Number.NEGATIVE_INFINITY?e.root||E2():t<0?P1(e,{type:"dedent"},n):t?t.type==="root"?{...e,root:e}:P1(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},n):e}function P1(e,t,n){let r=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,o=0,a=0;for(let g of r)switch(g.type){case"indent":c(),n.useTabs?u(1):l(n.tabWidth);break;case"stringAlign":c(),i+=g.n,s+=g.n.length;break;case"numberAlign":o+=1,a+=g.n;break;default:throw new Error(`Unexpected type '${g.type}'`)}return h(),{...e,value:i,length:s,queue:r};function u(g){i+=" ".repeat(g),s+=n.tabWidth*g}function l(g){i+=" ".repeat(g),s+=g}function c(){n.useTabs?d():h()}function d(){o>0&&u(o),m()}function h(){a>0&&l(a),m()}function m(){o=0,a=0}}function B1(e){let t=0,n=0,r=e.length;e:for(;r--;){let i=e[r];if(i===Eo){n++;continue}for(let s=i.length-1;s>=0;s--){let o=i[s];if(o===" "||o===" ")t++;else{e[r]=i.slice(0,s+1);break e}}}if(t>0||n>0)for(e.length=r+1;n-- >0;)e.push(Eo);return t}function Iu(e,t,n,r,i,s){if(n===Number.POSITIVE_INFINITY)return!0;let o=t.length,a=[e],u=[];for(;n>=0;){if(a.length===0){if(o===0)return!0;a.push(t[--o]);continue}let{mode:l,doc:c}=a.pop(),d=Kr(c);switch(d){case Jr:u.push(c),n-=z1(c);break;case Hn:case Fn:{let h=d===Hn?c:c.parts;for(let m=h.length-1;m>=0;m--)a.push({mode:l,doc:h[m]});break}case Wn:case Qn:case Yn:case wn:a.push({mode:l,doc:c.contents});break;case zn:n+=B1(u);break;case $t:{if(s&&c.break)return!1;let h=c.break?Ut:l,m=c.expandedStates&&h===Ut?gt(!1,c.expandedStates,-1):c.contents;a.push({mode:h,doc:m});break}case Jt:{let h=(c.groupId?i[c.groupId]||Sn:l)===Ut?c.breakContents:c.flatContents;h&&a.push({mode:l,doc:h});break}case yt:if(l===Ut||c.hard)return!0;c.soft||(u.push(" "),n--);break;case Jn:r=!0;break;case Xn:if(r)return!1;break}}return!1}function $u(e,t){let n={},r=t.printWidth,i=G1(t.endOfLine),s=0,o=[{ind:E2(),mode:Ut,doc:e}],a=[],u=!1,l=[],c=0;for(F8(e);o.length>0;){let{ind:h,mode:m,doc:g}=o.pop();switch(Kr(g)){case Jr:{let v=i!==` +`?Bu(!1,g,` +`,i):g;a.push(v),o.length>0&&(s+=z1(v));break}case Hn:for(let v=g.length-1;v>=0;v--)o.push({ind:h,mode:m,doc:g[v]});break;case Xr:if(c>=2)throw new Error("There are too many 'cursor' in doc.");a.push(Eo),c++;break;case Wn:o.push({ind:M8(h,t),mode:m,doc:g.contents});break;case Qn:o.push({ind:P8(h,g.n,t),mode:m,doc:g.contents});break;case zn:s-=B1(a);break;case $t:switch(m){case Sn:if(!u){o.push({ind:h,mode:g.break?Ut:Sn,doc:g.contents});break}case Ut:{u=!1;let v={ind:h,mode:Sn,doc:g.contents},N=r-s,_=l.length>0;if(!g.break&&Iu(v,o,N,_,n))o.push(v);else if(g.expandedStates){let w=gt(!1,g.expandedStates,-1);if(g.break){o.push({ind:h,mode:Ut,doc:w});break}else for(let C=1;C=g.expandedStates.length){o.push({ind:h,mode:Ut,doc:w});break}else{let S=g.expandedStates[C],k={ind:h,mode:Sn,doc:S};if(Iu(k,o,N,_,n)){o.push(k);break}}}else o.push({ind:h,mode:Ut,doc:g.contents});break}}g.id&&(n[g.id]=gt(!1,o,-1).mode);break;case Fn:{let v=r-s,{parts:N}=g;if(N.length===0)break;let[_,w]=N,C={ind:h,mode:Sn,doc:_},S={ind:h,mode:Ut,doc:_},k=Iu(C,[],v,l.length>0,n,!0);if(N.length===1){k?o.push(C):o.push(S);break}let M={ind:h,mode:Sn,doc:w},I={ind:h,mode:Ut,doc:w};if(N.length===2){k?o.push(M,C):o.push(I,S);break}N.splice(0,2);let B={ind:h,mode:m,doc:d2(N)},L=N[0];Iu({ind:h,mode:Sn,doc:[_,w,L]},[],v,l.length>0,n,!0)?o.push(B,M,C):k?o.push(B,I,C):o.push(B,I,S);break}case Jt:case Yn:{let v=g.groupId?n[g.groupId]:m;if(v===Ut){let N=g.type===Jt?g.breakContents:g.negate?g.contents:Ou(g.contents);N&&o.push({ind:h,mode:m,doc:N})}if(v===Sn){let N=g.type===Jt?g.flatContents:g.negate?Ou(g.contents):g.contents;N&&o.push({ind:h,mode:m,doc:N})}break}case Jn:l.push({ind:h,mode:m,doc:g.contents});break;case Xn:l.length>0&&o.push({ind:h,mode:m,doc:Q1});break;case yt:switch(m){case Sn:if(g.hard)u=!0;else{g.soft||(a.push(" "),s+=1);break}case Ut:if(l.length>0){o.push({ind:h,mode:m,doc:g},...l.reverse()),l.length=0;break}g.literal?h.root?(a.push(i,h.root.value),s=h.root.length):(a.push(i),s=0):(s-=B1(a),a.push(i+h.value),s=h.length);break}break;case wn:o.push({ind:h,mode:m,doc:g.contents});break;case nn:break;default:throw new ls(g)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let d=a.indexOf(Eo);if(d!==-1){let h=a.indexOf(Eo,d+1),m=a.slice(0,d).join(""),g=a.slice(d+1,h).join(""),v=a.slice(h+1).join("");return{formatted:m+g+v,cursorNodeStart:m.length,cursorNodeText:g}}return{formatted:a.join("")}}function B8(e,t,n=0){let r=0;for(let i=n;i!0}=t,i=s=>j8(s)&&r(s);for(let s of n(e)){let o=e[s];if(Array.isArray(o))for(let a of o)i(a)&&(yield a);else i(o)&&(yield o)}}function*q8(e,t){let n=[e];for(let r=0;r{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,o=n;for(;o>=0&&o0}function J8(e){return e?t=>e(t,T2):Y8}function X8(e){let t=e.type||e.kind||"(unknown type)",n=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return n.length>20&&(n=n.slice(0,19)+"\u2026"),t+(n?" "+n:"")}function X1(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=X8(e)}function ss(e,t){t.leading=!0,t.trailing=!1,X1(e,t)}function Wr(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),X1(e,t)}function os(e,t){t.leading=!1,t.trailing=!0,X1(e,t)}function K1(e,t){if(w1.has(e))return w1.get(e);let{printer:{getCommentChildNodes:n,canAttachComment:r,getVisitorKeys:i},locStart:s,locEnd:o}=t;if(!r)return[];let a=(n?.(e,t)??[...x2(e,{getVisitorKeys:ju(i)})]).flatMap(u=>r(u)?[u]:K1(u,t));return a.sort((u,l)=>s(u)-s(l)||o(u)-o(l)),w1.set(e,a),a}function S2(e,t,n,r){let{locStart:i,locEnd:s}=n,o=i(t),a=s(t),u=K1(e,n),l,c,d=0,h=u.length;for(;d>1,g=u[m],v=i(g),N=s(g);if(v<=o&&a<=N)return S2(g,t,n,g);if(N<=o){l=g,d=m+1;continue}if(a<=v){c=g,h=m;continue}throw new Error("Comment location overlaps with node location")}if(r?.type==="TemplateLiteral"){let{quasis:m}=r,g=C1(m,t,n);l&&C1(m,l,n)!==g&&(l=null),c&&C1(m,c,n)!==g&&(c=null)}return{enclosingNode:r,precedingNode:l,followingNode:c}}function K8(e,t){let{comments:n}=e;if(delete e.comments,!z8(n)||!t.printer.canAttachComment)return;let r=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:o=!1}={},handleComments:a={}},originalText:u}=t,{ownLine:l=L1,endOfLine:c=L1,remaining:d=L1}=a,h=n.map((m,g)=>({...S2(e,m,t),comment:m,text:u,options:t,ast:e,isLastComment:n.length-1===g}));for(let[m,g]of h.entries()){let{comment:v,precedingNode:N,enclosingNode:_,followingNode:w,text:C,options:S,ast:k,isLastComment:M}=g;if(S.parser==="json"||S.parser==="json5"||S.parser==="jsonc"||S.parser==="__js_expression"||S.parser==="__ts_expression"||S.parser==="__vue_expression"||S.parser==="__vue_ts_expression"){if(i(v)-i(k)<=0){ss(k,v);continue}if(s(v)-s(k)>=0){os(k,v);continue}}let I;if(o?I=[g]:(v.enclosingNode=_,v.precedingNode=N,v.followingNode=w,I=[v,C,S,k,M]),Z8(C,S,h,m))v.placement="ownLine",l(...I)||(w?ss(w,v):N?os(N,v):Wr(_||k,v));else if(ev(C,S,h,m))v.placement="endOfLine",c(...I)||(N?os(N,v):w?ss(w,v):Wr(_||k,v));else if(v.placement="remaining",!d(...I))if(N&&w){let B=r.length;B>0&&r[B-1].followingNode!==w&&km(r,S),r.push(g)}else N?os(N,v):w?ss(w,v):Wr(_||k,v)}if(km(r,t),!o)for(let m of n)delete m.precedingNode,delete m.enclosingNode,delete m.followingNode}function Z8(e,t,n,r){let{comment:i,precedingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=o(i);if(s)for(let l=r-1;l>=0;l--){let{comment:c,precedingNode:d}=n[l];if(d!==s||!A2(e.slice(a(c),u)))break;u=o(c)}return Dr(e,u,{backwards:!0})}function ev(e,t,n,r){let{comment:i,followingNode:s}=n[r],{locStart:o,locEnd:a}=t,u=a(i);if(s)for(let l=r+1;l0;--u){let{comment:l,precedingNode:c,followingNode:d}=e[u-1];U1.strictEqual(c,s),U1.strictEqual(d,o);let h=t.originalText.slice(t.locEnd(l),a);if(((r=(n=t.printer).isGap)==null?void 0:r.call(n,h,t))??/^[\s(]*$/.test(h))a=t.locStart(l);else break}for(let[l,{comment:c}]of e.entries())l1&&l.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function C1(e,t,n){let r=n.locStart(t)-1;for(let i=1;i!r.has(a)).length===0)return{leading:"",trailing:""};let i=[],s=[],o;return e.each(()=>{let a=e.node;if(r!=null&&r.has(a))return;let{leading:u,trailing:l}=a;u?i.push(nv(e,t)):l&&(o=rv(e,t,o),s.push(o.doc))},"comments"),{leading:i,trailing:s}}function sv(e,t,n){let{leading:r,trailing:i}=iv(e,n);return!r&&!i?t:b2(t,s=>[r,s,i])}function ov(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:n}=e;for(let r of t){if(!r.printed&&!n.has(r))throw new Error('Comment "'+r.value.trim()+'" was not printed. Please report this error!');delete r.printed}}function av(e){return()=>{}}function L2({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(i=>i.languages??[]),r=[];for(let i of fv(Object.assign({},...e.map(({options:s})=>s),lv)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(s=>!s.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...cv(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(s=>{var o;return((o=s.defaultOptions)==null?void 0:o[i.name])!==void 0}).map(s=>[s.name,s.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*cv(e,t,n){let r=new Set(e.map(i=>i.value));for(let i of t)if(i.parsers){for(let s of i.parsers)if(!r.has(s)){r.add(s);let o=n.find(u=>u.parsers&&Object.prototype.hasOwnProperty.call(u.parsers,s)),a=i.name;o!=null&&o.name&&(a+=` (plugin: ${o.name})`),yield{value:s,description:a}}}}function fv(e){let t=[];for(let[n,r]of Object.entries(e)){let i={name:n,...r};Array.isArray(i.default)&&(i.default=gt(!1,i.default,-1).value),t.push(i)}return t}function Mm(e,t){if(!t)return;let n=dv(t).toLowerCase();return e.find(({filenames:r})=>r?.some(i=>i.toLowerCase()===n))??e.find(({extensions:r})=>r?.some(i=>n.endsWith(i)))}function pv(e,t){if(t)return e.find(({name:n})=>n.toLowerCase()===t)??e.find(({aliases:n})=>n?.includes(t))??e.find(({extensions:n})=>n?.includes(`.${t}`))}function hv(e,t){let n=e.plugins.flatMap(i=>i.languages??[]),r=pv(n,t.language)??Mm(n,t.physicalFile)??Mm(n,t.file)??(t.physicalFile,void 0);return r?.parsers[0]}function Vm(e,t,n,r){return[`Invalid ${us.default.red(r.key(e))} value.`,`Expected ${us.default.blue(n)},`,`but received ${t===C2?us.default.gray("nothing"):us.default.red(r.value(t))}.`].join(" ")}function I2({text:e,list:t},n){let r=[];return e&&r.push(`- ${us.default.blue(e)}`),t&&r.push([`- ${us.default.blue(t.title)}:`].concat(t.values.map(i=>I2(i,n-Bm.length).replace(/^|\n/g,`$&${Bm}`))).join(` +`)),R2(r,n)}function R2(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,s]=e.map(o=>o.split(` +`,1)[0].length);return i>t&&i>s?r:n}function vv(e,t){if(e===t)return 0;let n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let s=0;for(;sa?l>a?a+1:l:l>u?u+1:l;return a}function Ev(e,t){let n=new e(t),r=Object.create(n);for(let i of bv)i in t&&(r[i]=yv(t[i],n,br.prototype[i].length));return r}function yv(e,t,n){return typeof e=="function"?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}function jm({from:e,to:t}){return{from:[e],to:t}}function Sv(e,t){let n=Object.create(null);for(let r of e){let i=r[t];if(n[i])throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n[i]=r}return n}function Av(e,t){let n=new Map;for(let r of e){let i=r[t];if(n.has(i))throw new Error(`Duplicate ${t} ${JSON.stringify(i)}`);n.set(i,r)}return n}function Fv(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function wv(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function Lv(e){return e===Math.floor(e)}function Cv(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=["undefined","object","boolean","number","string"];return n!==r?i.indexOf(n)-i.indexOf(r):n!=="string"?Number(e)-Number(t):e.localeCompare(t)}function Iv(e){return(...t)=>{let n=e(...t);return typeof n=="string"?new Error(n):n}}function qm(e){return e===void 0?{}:e}function O2(e){if(typeof e=="string")return{text:e};let{text:t,list:n}=e;return Rv((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(O2)}}:{text:t}}function Gm(e,t){return e===!0?!0:e===!1?{value:t}:e}function Hm(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Wm(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function $1(e,t){return e===void 0?[]:Array.isArray(e)?e.map(n=>Wm(n,t)):[Wm(e,t)]}function Qm(e,t){let n=$1(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}function Rv(e,t){if(!e)throw new Error(t)}function jv(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:s,descriptor:o}={}){if(r){if(!s)throw new Error("'FlagSchema' option is required.");if(!o)throw new Error("'descriptor' option is required.")}else o=as;let a=i?Array.isArray(i)?(h,m)=>i.includes(h)?{[h]:m}:void 0:(h,m)=>({[h]:m}):(h,m,g)=>{let{_:v,...N}=g.schemas;return k2(h,m,{...g,schemas:N})},u=qv(t,{isCLI:r,FlagSchema:s}),l=new $v(u,{logger:n,unknown:a,descriptor:o}),c=n!==!1;c&&R1&&(l._hasDeprecationWarned=R1);let d=l.normalize(e);return c&&(R1=l._hasDeprecationWarned),d}function qv(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(_v.create({name:"_"}));for(let i of e)r.push(Gv(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(xv.create({name:i.alias,sourceName:i.name}));return r}function Gv(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,s={name:i},o,a={};switch(e.type){case"int":o=Mv,t&&(s.preprocess=Number);break;case"string":o=zm;break;case"choice":o=kv,s.choices=e.choices.map(u=>u!=null&&u.redirect?{...u,redirect:{to:{key:e.name,value:u.redirect}}}:u);break;case"boolean":o=Tv;break;case"flag":o=r,s.flags=n.flatMap(u=>[u.alias,u.description&&u.name,u.oppositeDescription&&`no-${u.name}`].filter(Boolean));break;case"path":o=zm;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?s.validate=(u,l,c)=>e.exception(u)||l.validate(u,c):s.validate=(u,l,c)=>u===void 0||l.validate(u,c),e.redirect&&(a.redirect=u=>u?{to:typeof e.redirect=="string"?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(a.deprecated=!0),t&&!e.array){let u=s.preprocess||(l=>l);s.preprocess=(l,c,d)=>c.preprocess(u(Array.isArray(l)?gt(!1,l,-1):l),d)}return e.array?Nv.create({...t?{preprocess:u=>Array.isArray(u)?u:[u]}:{},...a,valueSchema:o.create(s)}):o.create({...s,...a})}function P2(e,t){if(!t)throw new Error("parserName is required.");let n=M2(!1,e,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new w2(r)}function Qv(e,t){if(!t)throw new Error("astFormat is required.");let n=M2(!1,e,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new w2(r)}function B2({plugins:e,parser:t}){let n=P2(e,t);return V2(n,t)}function V2(e,t){let n=e.parsers[t];return typeof n=="function"?n():n}function zv(e,t){let n=e.printers[t];return typeof n=="function"?n():n}async function Yv(e,t={}){var n;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=mv(r,{physicalFile:r.filepath}),!r.parser)throw new Om(`No parser could be inferred for file "${r.filepath}".`)}else throw new Om("No parser and no file path given, couldn't infer a parser.");let i=L2({plugins:e.plugins,showDeprecated:!0}).options,s={...Ym,...Object.fromEntries(i.filter(h=>h.default!==void 0).map(h=>[h.name,h.default]))},o=P2(r.plugins,r.parser),a=await V2(o,r.parser);r.astFormat=a.astFormat,r.locEnd=a.locEnd,r.locStart=a.locStart;let u=(n=o.printers)!=null&&n[a.astFormat]?o:Qv(r.plugins,a.astFormat),l=await zv(u,a.astFormat);r.printer=l;let c=u.defaultOptions?Object.fromEntries(Object.entries(u.defaultOptions).filter(([,h])=>h!==void 0)):{},d={...s,...c};for(let[h,m]of Object.entries(d))(r[h]===null||r[h]===void 0)&&(r[h]=m);return r.parser==="json"&&(r.trailingComma="none"),Hv(r,i,{passThrough:Object.keys(Ym),...t})}async function Xv(e,t){let n=await B2(t),r=n.preprocess?n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(s){Kv(s,e)}return{text:r,ast:i}}function Kv(e,t){let{loc:n}=e;if(n){let r=(0,Jv.codeFrameColumns)(t,n,{highlightCode:!0});throw e.message+=` +`+r,e.codeFrame=r,e}throw e}async function Zv(e,t,n,r,i){let{embeddedLanguageFormatting:s,printer:{embed:o,hasPrettierIgnore:a=()=>!1,getVisitorKeys:u}}=n;if(!o||s!=="auto")return;if(o.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=ju(o.getVisitorKeys??u),c=[];m();let d=e.stack;for(let{print:g,node:v,pathStack:N}of c)try{e.stack=N;let _=await g(h,t,e,n);_&&i.set(v,_)}catch(_){if(globalThis.PRETTIER_DEBUG)throw _}e.stack=d;function h(g,v){return eb(g,v,n,r)}function m(){let{node:g}=e;if(g===null||typeof g!="object"||a(e))return;for(let N of l(g))Array.isArray(g[N])?e.each(m,N):e.call(m,N);let v=o(e,n);if(v){if(typeof v=="function"){c.push({print:v,node:g,pathStack:[...e.stack]});return}i.set(g,v)}}}async function eb(e,t,n,r){let i=await fs({...n,...t,parentParser:n.parser,originalText:e},{passThrough:!0}),{ast:s}=await No(e,i),o=await r(s,i);return v2(o)}function tb(e,t){let{originalText:n,[Symbol.for("comments")]:r,locStart:i,locEnd:s,[Symbol.for("printedComments")]:o}=t,{node:a}=e,u=i(a),l=s(a);for(let c of r)i(c)>=u&&s(c)<=l&&o.add(c);return n.slice(u,l)}async function qu(e,t){({ast:e}=await U2(e,t));let n=new Map,r=new U8(e),i=uv(t),s=new Map;await Zv(r,a,t,qu,s);let o=await Jm(r,t,a,void 0,s);return ov(t),o;function a(l,c){return l===void 0||l===r?u(c):Array.isArray(l)?r.call(()=>u(c),...l):r.call(()=>u(c),l)}function u(l){i(r);let c=r.node;if(c==null)return"";let d=c&&typeof c=="object"&&l===void 0;if(d&&n.has(c))return n.get(c);let h=Jm(r,t,a,l,s);return d&&n.set(c,h),h}}function Jm(e,t,n,r,i){var s;let{node:o}=e,{printer:a}=t,u;return(s=a.hasPrettierIgnore)!=null&&s.call(a,e)?u=nb(e,t):i.has(o)?u=i.get(o):u=a.print(e,t,n,r),o===t.cursorNode&&(u=b2(u,l=>[M1,l,M1])),a.printComment&&(!a.willPrintOwnComments||!a.willPrintOwnComments(e,t))&&(u=sv(e,u,t)),u}async function U2(e,t){let n=e.comments??[];t[Symbol.for("comments")]=n,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,K8(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function rb(e,t){let{cursorOffset:n,locStart:r,locEnd:i}=t,s=ju(t.printer.getVisitorKeys),o=u=>r(u)<=n&&i(u)>=n,a=e;for(let u of q8(e,{getVisitorKeys:s,filter:o}))a=u;return a}function sb(e,t){let{printer:{massageAstNode:n,getVisitorKeys:r}}=t;if(!n)return e;let i=ju(r),s=n.ignoredProperties??new Set;return o(e);function o(a,u){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a))return a.map(h=>o(h,u)).filter(Boolean);let l={},c=new Set(i(a));for(let h in a)!Object.prototype.hasOwnProperty.call(a,h)||s.has(h)||(c.has(h)?l[h]=o(a[h],a):l[h]=a[h]);let d=n(a,l,u);if(d!==null)return d??l}}function ub(e,t){let n=[e.node,...e.parentNodes],r=new Set([t.node,...t.parentNodes]);return n.find(i=>$2.has(i.type)&&r.has(i))}function Xm(e){let t=e.length-1;for(;;){let n=e[t];if(n?.type==="Program"||n?.type==="File")t--;else break}return e.slice(0,t+1)}function lb(e,t,{locStart:n,locEnd:r}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let o=n(e.node);for(let u of Xm(t.parentNodes))if(n(u)>=o)s=u;else break;let a=r(t.node);for(let u of Xm(e.parentNodes)){if(r(u)<=a)i=u;else break;if(i===s)break}return{startNode:i,endNode:s}}function j1(e,t,n,r,i=[],s){let{locStart:o,locEnd:a}=n,u=o(e),l=a(e);if(!(t>l||tr);let a=e.slice(r,i).search(/\S/),u=a===-1;if(!u)for(r+=a;i>r&&!/\S/.test(e[i-1]);--i);let l=j1(n,r,t,(m,g)=>Km(t,m,g),[],"rangeStart"),c=u?l:j1(n,i,t,m=>Km(t,m),[],"rangeEnd");if(!l||!c)return{rangeStart:0,rangeEnd:0};let d,h;if(ab(t)){let m=ub(l,c);d=m,h=m}else({startNode:d,endNode:h}=lb(l,c,t));return{rangeStart:Math.min(s(d),s(h)),rangeEnd:Math.max(o(d),o(h))}}async function q2(e,t,n=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:r,text:i}=await No(e,t);t.cursorOffset>=0&&(t.cursorNode=ib(r,t));let s=await qu(r,t,n);n>0&&(s=D2([zr,s],n,t.tabWidth));let o=$u(s,t);if(n>0){let u=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(u)),o.formatted=u+G1(t.endOfLine)}let a=t[Symbol.for("comments")];if(t.cursorOffset>=0){let u,l,c,d,h;if(t.cursorNode&&o.cursorNodeText?(u=t.locStart(t.cursorNode),l=i.slice(u,t.locEnd(t.cursorNode)),c=t.cursorOffset-u,d=o.cursorNodeStart,h=o.cursorNodeText):(u=0,l=i,c=t.cursorOffset,d=0,h=o.formatted),l===h)return{formatted:o.formatted,cursorOffset:d+c,comments:a};let m=l.split("");m.splice(c,0,Zm);let g=h.split(""),v=(0,e8.diffArrays)(m,g),N=d;for(let _ of v)if(_.removed){if(_.value.includes(Zm))break}else N+=_.count;return{formatted:o.formatted,cursorOffset:N,comments:a}}return{formatted:o.formatted,cursorOffset:-1,comments:a}}async function pb(e,t){let{ast:n,text:r}=await No(e,t),{rangeStart:i,rangeEnd:s}=db(r,t,n),o=r.slice(i,s),a=Math.min(i,r.lastIndexOf(` +`,i)+1),u=r.slice(a,i).match(/^\s*/)[0],l=J1(u,t.tabWidth),c=await q2(o,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),d=c.formatted.trimEnd(),{cursorOffset:h}=t;h>s?h+=d.length-o.length:c.cursorOffset>=0&&(h=c.cursorOffset+i);let m=r.slice(0,i)+d+r.slice(s);if(t.endOfLine!=="lf"){let g=G1(t.endOfLine);h>=0&&g===`\r +`&&(h+=u2(m.slice(0,h),` +`)),m=Bu(!1,m,` +`,g)}return{formatted:m,cursorOffset:h,comments:c.comments}}function k1(e,t,n){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?n:t}function e2(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=k1(e,n,-1),r=k1(e,r,0),i=k1(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function G2(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s}=e2(e,t),o=e.charAt(0)===j2;if(o&&(e=e.slice(1),n--,r--,i--),s==="auto"&&(s=t8(e)),e.includes("\r")){let a=u=>u2(e.slice(0,Math.max(u,0)),`\r +`);n-=a(n),r-=a(r),i-=a(i),e=n8(e)}return{hasBOM:o,text:e,options:e2(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:s})}}async function t2(e,t){let n=await B2(t);return!n.hasPragma||n.hasPragma(e)}async function H2(e,t){let{hasBOM:n,text:r,options:i}=G2(e,await fs(t));if(i.rangeStart>=i.rangeEnd&&r!==""||i.requirePragma&&!await t2(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let s;return i.rangeStart>0||i.rangeEnd=0&&s.cursorOffset++),s}async function hb(e,t,n){let{text:r,options:i}=G2(e,await fs(t)),s=await No(r,i);return n&&(n.preprocessForPrint&&(s.ast=await U2(s.ast,i)),n.massage&&(s.ast=ob(s.ast,i))),s}async function mb(e,t){t=await fs(t);let n=await qu(e,t);return $u(n,t)}async function gb(e,t){let n=v8(e),{formatted:r}=await H2(n,{...t,parser:"__js_expression"});return r}async function Db(e,t){t=await fs(t);let{ast:n}=await No(e,t);return qu(n,t)}async function vb(e,t){return $u(e,await fs(t))}function xb(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;nMath.max(r,i.length/t.length),0)}function Cb(e,t){let n=sf(e,t);return n===!1?"":e.charAt(n)}function Rb(e,t,n){for(let r=t;ro===r?o:a===t?"\\"+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(o)?o:"\\"+o));return t+i+t}function Vb(e,t,n){return sf(e,n(t))}function Ub(e,t){return arguments.length===2||typeof t=="number"?sf(e,t):Vb(...arguments)}function $b(e,t,n){return Z1(e,n(t))}function jb(e,t){return arguments.length===2||typeof t=="number"?Z1(e,t):$b(...arguments)}function qb(e,t,n){return of(e,n(t))}function Gb(e,t){return arguments.length===2||typeof t=="number"?of(e,t):qb(...arguments)}function Qr(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}async function uf(e,t){let{formatted:n}=await af(e,{...t,cursorOffset:-1});return n}async function Q2(e,t){return await uf(e,t)===e}var VD,Mu,UD,$D,jD,qD,n2,GD,yo,Pu,r2,xo,HD,WD,QD,vo,zD,YD,q1,i2,s2,o2,JD,XD,KD,a2,ZD,Bu,e8,Jr,Hn,Xr,Wn,Qn,zn,$t,Fn,Jt,Yn,Jn,Xn,yt,wn,nn,l2,Kr,i8,o8,ls,Cm,H1,c2,An,W1,h8,Vu,m8,Q1,p2,h2,g8,zr,m2,M1,b8,gt,E8,_8,N8,z1,Ut,Sn,Eo,J1,Hr,V1,Ru,V8,U8,y2,U1,j8,G8,vr,_2,N2,Yr,Dr,z8,T2,Y8,ju,w1,L1,A2,Z1,uv,w2,Om,lv,dv,mv,as,Pm,gv,us,C2,ku,Bm,Dv,Um,I1,$m,k2,bv,br,xv,_v,Nv,Tv,kv,Ov,Mv,zm,Pv,Bv,Vv,Uv,$v,R1,Hv,Wv,M2,Ym,fs,Jv,No,nb,ib,ob,ab,$2,fb,j2,Zm,ef,bb,Eb,yb,W2,tf,nf,rf,sf,of,Ab,Lb,Ib,kb,Mb,Bb,af,z2,Y2,Hb,X2=o4(()=>{VD=Object.create,Mu=Object.defineProperty,UD=Object.getOwnPropertyDescriptor,$D=Object.getOwnPropertyNames,jD=Object.getPrototypeOf,qD=Object.prototype.hasOwnProperty,n2=e=>{throw TypeError(e)},GD=(e,t)=>()=>(e&&(t=e(e=0)),t),yo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pu=(e,t)=>{for(var n in t)Mu(e,n,{get:t[n],enumerable:!0})},r2=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $D(t))!qD.call(e,i)&&i!==n&&Mu(e,i,{get:()=>t[i],enumerable:!(r=UD(t,i))||r.enumerable});return e},xo=(e,t,n)=>(n=e!=null?VD(jD(e)):{},r2(t||!e||!e.__esModule?Mu(n,"default",{value:e,enumerable:!0}):n,e)),HD=e=>r2(Mu({},"__esModule",{value:!0}),e),WD=(e,t,n)=>t.has(e)||n2("Cannot "+n),QD=(e,t,n)=>t.has(e)?n2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),vo=(e,t,n)=>(WD(e,t,"access private method"),n),zD=yo(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){}t.prototype={diff:function(r,i){var s,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var u=this;function l(M){return a?(setTimeout(function(){a(void 0,M)},0),!0):M}r=this.castInput(r),i=this.castInput(i),r=this.removeEmpty(this.tokenize(r)),i=this.removeEmpty(this.tokenize(i));var c=i.length,d=r.length,h=1,m=c+d;o.maxEditLength&&(m=Math.min(m,o.maxEditLength));var g=(s=o.timeout)!==null&&s!==void 0?s:1/0,v=Date.now()+g,N=[{oldPos:-1,lastComponent:void 0}],_=this.extractCommon(N[0],i,r,0);if(N[0].oldPos+1>=d&&_+1>=c)return l([{value:this.join(i),count:i.length}]);var w=-1/0,C=1/0;function S(){for(var M=Math.max(w,-h);M<=Math.min(C,h);M+=2){var I=void 0,B=N[M-1],L=N[M+1];B&&(N[M-1]=void 0);var A=!1;if(L){var X=L.oldPos-M;A=L&&0<=X&&X=d&&_+1>=c)return l(n(u,I.lastComponent,i,r,u.useLongestToken));N[M]=I,I.oldPos+1>=d&&(C=Math.min(C,M-1)),_+1>=c&&(w=Math.max(w,M+1))}h++}if(a)(function M(){setTimeout(function(){if(h>m||Date.now()>v)return a();S()||M()},0)})();else for(;h<=m&&Date.now()<=v;){var k=S();if(k)return k}},addToPath:function(r,i,s,o){var a=r.lastComponent;return a&&a.added===i&&a.removed===s?{oldPos:r.oldPos+o,lastComponent:{count:a.count+1,added:i,removed:s,previousComponent:a.previousComponent}}:{oldPos:r.oldPos+o,lastComponent:{count:1,added:i,removed:s,previousComponent:a}}},extractCommon:function(r,i,s,o){for(var a=i.length,u=s.length,l=r.oldPos,c=l-o,d=0;c+1w.length?S:w}),g.value=r.join(N)}else g.value=r.join(s.slice(h,h+g.count));h+=g.count,g.added||(m+=g.count)}}var _=u[d-1];return d>1&&typeof _.value=="string"&&(_.added||_.removed)&&r.equals("",_.value)&&(u[d-2].value+=_.value,u.pop()),u}}),YD=yo(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=i,e.arrayDiff=void 0;var t=n(zD());function n(s){return s&&s.__esModule?s:{default:s}}var r=new t.default;e.arrayDiff=r,r.tokenize=function(s){return s.slice()},r.join=r.removeEmpty=function(s){return s};function i(s,o,a){return r.diff(s,o,a)}}),q1=yo((e,t)=>{"use strict";var n=new Proxy(String,{get:()=>n});t.exports=n}),i2={};Pu(i2,{default:()=>o2,shouldHighlight:()=>s2});JD=GD(()=>{s2=()=>!1,o2=String}),XD=yo((e,t)=>{var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n}};t.exports=r(),t.exports.createColors=r}),KD=yo(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=m,e.default=g;var t=(JD(),HD(i2)),n=i(XD(),!0);function r(v){if(typeof WeakMap!="function")return null;var N=new WeakMap,_=new WeakMap;return(r=function(w){return w?_:N})(v)}function i(v,N){if(!N&&v&&v.__esModule)return v;if(v===null||typeof v!="object"&&typeof v!="function")return{default:v};var _=r(N);if(_&&_.has(v))return _.get(v);var w={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in v)if(S!=="default"&&{}.hasOwnProperty.call(v,S)){var k=C?Object.getOwnPropertyDescriptor(v,S):null;k&&(k.get||k.set)?Object.defineProperty(w,S,k):w[S]=v[S]}return w.default=v,_&&_.set(v,w),w}var s=n.default,o=(v,N)=>_=>v(N(_)),a;function u(v){if(v){var N;return(N=a)!=null||(a=(0,n.createColors)(!0)),a}return s}var l=!1;function c(v){return{gutter:v.gray,marker:o(v.red,v.bold),message:o(v.red,v.bold)}}var d=/\r\n|[\n\r\u2028\u2029]/;function h(v,N,_){let w=Object.assign({column:0,line:-1},v.start),C=Object.assign({},w,v.end),{linesAbove:S=2,linesBelow:k=3}=_||{},M=w.line,I=w.column,B=C.line,L=C.column,A=Math.max(M-(S+1),0),X=Math.min(N.length,B+k);M===-1&&(A=0),B===-1&&(X=N.length);let z=B-M,fe={};if(z)for(let F=0;F<=z;F++){let T=F+M;if(!I)fe[T]=!0;else if(F===0){let Q=N[T-1].length;fe[T]=[I,Q-I+1]}else if(F===z)fe[T]=[0,L];else{let Q=N[T-F].length;fe[T]=[0,Q]}}else I===L?I?fe[M]=[I,0]:fe[M]=!0:fe[M]=[I,L-I];return{start:A,end:X,markerLines:fe}}function m(v,N,_={}){let w=(_.highlightCode||_.forceColor)&&(0,t.shouldHighlight)(_),C=u(_.forceColor),S=c(C),k=(fe,F)=>w?fe(F):F,M=v.split(d),{start:I,end:B,markerLines:L}=h(N,M,_),A=N.start&&typeof N.start.column=="number",X=String(B).length,z=(w?(0,t.default)(v,_):v).split(d,B).slice(I,B).map((fe,F)=>{let T=I+1+F,Q=` ${` ${T}`.slice(-X)} |`,$=L[T],ee=!L[T+1];if($){let ne="";if(Array.isArray($)){let se=fe.slice(0,Math.max($[0]-1,0)).replace(/[^\t]/g," "),Ie=$[1]||1;ne=[` + `,k(S.gutter,Q.replace(/\d/g," "))," ",se,k(S.marker,"^").repeat(Ie)].join(""),ee&&_.message&&(ne+=" "+k(S.message,_.message))}return[k(S.marker,">"),k(S.gutter,Q),fe.length>0?` ${fe}`:"",ne].join("")}else return` ${k(S.gutter,Q)}${fe.length>0?` ${fe}`:""}`}).join(` +`);return _.message&&!A&&(z=`${" ".repeat(X+1)}${_.message} +${z}`),w?C.reset(z):z}function g(v,N,_,w={}){if(!l){l=!0;let C="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let S=new Error(C);S.name="DeprecationWarning",console.warn(new Error(C))}}return _=Math.max(_,0),m(v,{start:{column:_,line:N}},w)}}),a2={};Pu(a2,{__debug:()=>Y2,check:()=>Q2,doc:()=>ef,format:()=>uf,formatWithCursor:()=>af,getSupportInfo:()=>z2,util:()=>tf,version:()=>W2});ZD=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Bu=ZD,e8=xo(YD(),1);Jr="string",Hn="array",Xr="cursor",Wn="indent",Qn="align",zn="trim",$t="group",Fn="fill",Jt="if-break",Yn="indent-if-break",Jn="line-suffix",Xn="line-suffix-boundary",yt="line",wn="label",nn="break-parent",l2=new Set([Xr,Wn,Qn,zn,$t,Fn,Jt,Yn,Jn,Xn,yt,wn,nn]);Kr=r8,i8=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);o8=class extends Error{name="InvalidDocError";constructor(e){super(s8(e)),this.doc=e}},ls=o8,Cm={};H1=a8,c2=()=>{},An=c2,W1=c2;h8={type:Xn},Vu={type:nn},m8={type:zn},Q1={type:yt,hard:!0},p2={type:yt,hard:!0,literal:!0},h2={type:yt},g8={type:yt,soft:!0},zr=[Q1,Vu],m2=[p2,Vu],M1={type:Xr};b8=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},gt=b8,E8=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;_8=e=>!(y8(e)||x8(e)),N8=/[^\x20-\x7F]/;z1=T8;Ut=Symbol("MODE_BREAK"),Sn=Symbol("MODE_FLAT"),Eo=Symbol("cursor");J1=B8,V8=class{constructor(e){QD(this,Hr),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return gt(!1,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:gt(!1,this.stack,-2)}get node(){return gt(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=gt(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...vo(this,Hr,Ru).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?gt(!1,e,-2):null}getValue(){return gt(!1,this.stack,-1)}getNode(e=0){let t=vo(this,Hr,V1).call(this,e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:n}=this,{length:r}=n,i=gt(!1,n,-1);for(let s of t)i=i[s],n.push(s,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=vo(this,Hr,V1).call(this,t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=gt(!1,n,-1);for(let s of t)i=i[s],n.push(s,i);try{for(let s=0;s{n[i]=e(r,i,s)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let s=null;if(typeof n=="number"&&(s=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,s))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of vo(this,Hr,Ru).call(this))if(e(t))return t}hasAncestor(e){for(let t of vo(this,Hr,Ru).call(this))if(e(t))return!0;return!1}};Hr=new WeakSet,V1=function(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1},Ru=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}};U8=V8,y2=new Proxy(()=>{},{get:()=>y2}),U1=y2;j8=$8;G8=_o(/\s/),vr=_o(" "),_2=_o(",; "),N2=_o(/[^\n\r]/);Yr=H8;Dr=W8;z8=Q8,T2=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Y8=e=>Object.keys(e).filter(t=>!T2.has(t));ju=J8;w1=new WeakMap;L1=()=>!1;A2=e=>!/[\S\n\u2028\u2029]/.test(e);Z1=tv;uv=av,w2=class extends Error{name="ConfigError"},Om=class extends Error{name="UndefinedParserError"},lv={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};dv=e=>String(e).split(/[/\\]/).pop();mv=hv,as={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(n=>as.value(n)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(n=>`${as.key(n)}: ${as.value(e[n])}`).join(", ")} }`},pair:({key:e,value:t})=>as.value({[e]:t})},Pm=xo(q1(),1),gv=(e,t,{descriptor:n})=>{let r=[`${Pm.default.yellow(typeof e=="string"?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Pm.default.blue(typeof t=="string"?n.key(t):n.pair(t))}`),r.join("; ")+"."},us=xo(q1(),1),C2=Symbol.for("vnopts.VALUE_NOT_EXIST"),ku=Symbol.for("vnopts.VALUE_UNCHANGED"),Bm=" ".repeat(2),Dv=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),s=[];return r&&s.push(Vm(e,t,r,n.descriptor)),i&&s.push([Vm(e,t,i.title,n.descriptor)].concat(i.values.map(o=>I2(o,n.loggerPrintWidth))).join(` +`)),R2(s,n.loggerPrintWidth)};Um=xo(q1(),1),I1=[],$m=[];k2=(e,t,{descriptor:n,logger:r,schemas:i})=>{let s=[`Ignored unknown option ${Um.default.yellow(n.pair({key:e,value:t}))}.`],o=Object.keys(i).sort().find(a=>vv(e,a)<3);o&&s.push(`Did you mean ${Um.default.blue(n.key(o))}?`),r.warn(s.join(" "))},bv=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];br=class{static create(e){return Ev(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return ku}};xv=class extends br{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},_v=class extends br{expected(){return"anything"}validate(){return!0}},Nv=class extends br{constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let i=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);i!==!0&&n.push(i.value)}return n.length===0?!0:{value:n}}deprecated(e,t){let n=[];for(let r of e){let i=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);i!==!1&&n.push(...i.map(({value:s})=>({value:[s]})))}return n}forward(e,t){let n=[];for(let r of e){let i=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...i.map(jm))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let s=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in s&&n.push(s.remain),r.push(...s.redirect.map(jm))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};Tv=class extends br{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};kv=class extends br{constructor(e){super(e),this._choices=Av(e.choices.map(t=>t&&typeof t=="object"?t:{value:t}),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(Cv).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},Ov=class extends br{expected(){return"a number"}validate(e,t){return typeof e=="number"}},Mv=class extends Ov{expected(){return"an integer"}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&Lv(e)}},zm=class extends br{expected(){return"a string"}validate(e){return typeof e=="string"}},Pv=as,Bv=k2,Vv=Dv,Uv=gv,$v=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=Pv,unknown:s=Bv,invalid:o=Vv,deprecated:a=Uv,missing:u=()=>!1,required:l=()=>!1,preprocess:c=h=>h,postprocess:d=()=>ku}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:Sv(e,"name"),normalizeDefaultResult:qm,normalizeExpectedResult:O2,normalizeDeprecatedResult:Hm,normalizeForwardResult:$1,normalizeRedirectResult:Qm,normalizeValidateResult:Gm},this._unknownHandler=s,this._invalidHandler=Iv(o),this._deprecatedHandler=a,this._identifyMissing=(h,m)=>!(h in m)||u(h,m),this._identifyRequired=l,this._preprocess=c,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Fv()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let i=n.shift(),s=this._applyNormalization(i,t);n.push(...s)}};r();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in t)){let o=qm(s.default(this._utils));"value"in o&&n.push({[i]:o.value})}}r();for(let i of Object.keys(this._utils.schemas)){if(!(i in t))continue;let s=this._utils.schemas[i],o=t[i],a=s.postprocess(o,this._utils);a!==ku&&(this._applyValidation(a,i,s),t[i]=a)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let s of r){let o=this._utils.schemas[s],a=o.preprocess(e[s],this._utils);this._applyValidation(a,s,o);let u=({from:d,to:h})=>{n.push(typeof h=="string"?{[h]:d}:{[h.key]:h.value})},l=({value:d,redirectTo:h})=>{let m=Hm(o.deprecated(d,this._utils),a,!0);if(m!==!1)if(m===!0)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,h,this._utils));else for(let{value:g}of m){let v={key:s,value:g};if(!this._hasDeprecationWarned(v)){let N=typeof h=="string"?{key:h,value:g}:h;this._utils.logger.warn(this._deprecatedHandler(v,N,this._utils))}}};$1(o.forward(a,this._utils),a).forEach(u);let c=Qm(o.redirect(a,this._utils),a);if(c.redirect.forEach(u),"remain"in c){let d=c.remain;t[s]=s in t?o.overlap(t[s],d,this._utils):d,l({value:d})}for(let{from:d,to:h}of c.redirect)l({value:d,redirectTo:h})}for(let s of i){let o=e[s];this._applyUnknownHandler(s,o,t,(a,u)=>{n.push({[a]:u})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,C2,this._utils)}_partitionOptionKeys(e){let[t,n]=wv(Object.keys(e).filter(r=>!this._identifyMissing(r,e)),r=>r in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=Gm(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let s of Object.keys(i)){if(this._identifyMissing(s,i))continue;let o=i[s];s in this._utils.schemas?r(s,o):n[s]=o}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==ku){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let i of n){let s=t.override[i];this._applyValidation(s,i,this._utils.schemas[i]),e[i]=s}for(let i of r){let s=t.override[i];this._applyUnknownHandler(i,s,e,(o,a)=>{let u=this._utils.schemas[o];this._applyValidation(a,o,u),e[o]=a})}}}}};Hv=jv,Wv=(e,t,n)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(n);for(let r=t.length-1;r>=0;r--){let i=t[r];if(n(i,r,t))return i}}},M2=Wv;Ym={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};fs=Yv,Jv=xo(KD(),1);No=Xv;nb=tb;ib=rb;ob=sb,ab=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";$2=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),fb=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);j2="\uFEFF",Zm=Symbol("cursor");ef={};Pu(ef,{builders:()=>bb,printer:()=>Eb,utils:()=>yb});bb={join:g2,line:h2,softline:g8,hardline:zr,literalline:m2,group:f2,conditionalGroup:f8,fill:d2,lineSuffix:O1,lineSuffixBoundary:h8,cursor:M1,breakParent:Vu,ifBreak:d8,trim:m8,indent:Ou,indentIfBreak:p8,align:cs,addAlignmentToDoc:D2,markAsRoot:l8,dedentToRoot:u8,dedent:c8,hardlineWithoutBreakParent:Q1,literallineWithoutBreakParent:p2,label:D8,concat:e=>e},Eb={printDocToString:$u},yb={willBreak:A8,traverseDoc:H1,findInDoc:Y1,mapDoc:Uu,removeLines:L8,stripTrailingHardline:v2,replaceEndOfLine:R8,canBreak:O8},W2="3.3.2",tf={};Pu(tf,{addDanglingComment:()=>Wr,addLeadingComment:()=>ss,addTrailingComment:()=>os,getAlignmentSize:()=>J1,getIndentSize:()=>Ab,getMaxContinuousCount:()=>Lb,getNextNonSpaceNonCommentCharacter:()=>Ib,getNextNonSpaceNonCommentCharacterIndex:()=>Ub,getStringWidth:()=>z1,hasNewline:()=>Dr,hasNewlineInRange:()=>kb,hasSpaces:()=>Mb,isNextLineEmpty:()=>Gb,isNextLineEmptyAfterIndex:()=>of,isPreviousLineEmpty:()=>jb,makeString:()=>Bb,skip:()=>_o,skipEverythingButNewLine:()=>N2,skipInlineComment:()=>nf,skipNewline:()=>Yr,skipSpaces:()=>vr,skipToLineEnd:()=>_2,skipTrailingComment:()=>rf,skipWhitespace:()=>G8});nf=xb;rf=_b;sf=Nb;of=Tb;Ab=Sb;Lb=wb;Ib=Cb;kb=Rb;Mb=Ob;Bb=Pb;af=Qr(H2);z2=Qr(L2,0),Y2={parse:Qr(hb),formatAST:Qr(mb),formatDoc:Qr(gb),printToDoc:Qr(Db),printDocToString:Qr(vb)},Hb=a2});var eg=Kn((Z2,lf)=>{(function(e){function t(){var r=e();return r.default||r}if(typeof Z2=="object"&&typeof lf=="object")lf.exports=t();else if(typeof define=="function"&&define.amd)define(t);else{var n=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};n.prettierPlugins=n.prettierPlugins||{},n.prettierPlugins.graphql=t()}})(function(){"use strict";var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(f,D)=>{for(var b in D)e(f,b,{get:D[b],enumerable:!0})},s=(f,D,b,x)=>{if(D&&typeof D=="object"||typeof D=="function")for(let y of n(D))!r.call(f,y)&&y!==b&&e(f,y,{get:()=>D[y],enumerable:!(x=t(D,y))||x.enumerable});return f},o=f=>s(e({},"__esModule",{value:!0}),f),a={};i(a,{languages:()=>pg,options:()=>gg,parsers:()=>gf,printers:()=>e4});var u=(f,D,b,x)=>{if(!(f&&D==null))return D.replaceAll?D.replaceAll(b,x):b.global?D.replace(b,x):D.split(b).join(x)},l=u,c="indent",d="group",h="if-break",m="line",g="break-parent",v=()=>{},N=v,_=v;function w(f){return N(f),{type:c,contents:f}}function C(f,D={}){return N(f),_(D.expandedStates,!0),{type:d,id:D.id,contents:f,break:!!D.shouldBreak,expandedStates:D.expandedStates}}function S(f,D="",b={}){return N(f),D!==""&&N(D),{type:h,breakContents:f,flatContents:D,groupId:b.groupId}}var k={type:g},M={type:m,hard:!0},I={type:m},B={type:m,soft:!0},L=[M,k];function A(f,D){N(f),_(D);let b=[];for(let x=0;x{let y=!!(x!=null&&x.backwards);if(b===!1)return!1;let{length:V}=D,ie=b;for(;ie>=0&&ie0}var Re=_e,H=class extends Error{name="UnexpectedNodeError";constructor(f,D,b="type"){super(`Unexpected ${D} node ${b}: ${JSON.stringify(f[b])}.`),this.node=f}},Ne=H,Y=null;function de(f){if(Y!==null&&typeof Y.property){let D=Y;return Y=de.prototype=null,D}return Y=de.prototype=f??Object.create(null),new de}var Te=10;for(let f=0;f<=Te;f++)de();function Dt(f){return de(f)}function Ye(f,D="type"){Dt(f);function b(x){let y=x[D],V=f[y];if(!Array.isArray(V))throw Object.assign(new Error(`Missing visitor keys for '${y}'.`),{node:x});return V}return b}var ds=Ye,Zr=class{constructor(f,D,b){this.start=f.start,this.end=D.end,this.startToken=f,this.endToken=D,this.source=b}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},cf=class{constructor(f,D,b,x,y,V){this.kind=f,this.start=D,this.end=b,this.line=x,this.column=y,this.value=V,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},ff={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wb=new Set(Object.keys(ff)),ei;(function(f){f.QUERY="query",f.MUTATION="mutation",f.SUBSCRIPTION="subscription"})(ei||(ei={}));var tg=ds(ff,"kind"),ng=tg;function df(f){return f.loc.start}function pf(f){return f.loc.end}function rg(f){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(f)}function ig(f){return`# @format - ) - c++, l++, d++ - return ( - d && (r.lastComponent = { count: d, previousComponent: r.lastComponent }), - (r.oldPos = l), - c - ) - }, - equals: function (r, i) { - return this.options.comparator - ? this.options.comparator(r, i) - : r === i || (this.options.ignoreCase && r.toLowerCase() === i.toLowerCase()) - }, - removeEmpty: function (r) { - for (var i = [], s = 0; s < r.length; s++) r[s] && i.push(r[s]) - return i - }, - castInput: function (r) { - return r - }, - tokenize: function (r) { - return r.split('') - }, - join: function (r) { - return r.join('') - } - } - function n(r, i, s, o, a) { - for (var u = [], l; i; ) - u.push(i), (l = i.previousComponent), delete i.previousComponent, (i = l) - u.reverse() - for (var c = 0, d = u.length, h = 0, m = 0; c < d; c++) { - var g = u[c] - if (g.removed) { - if ( - ((g.value = r.join(o.slice(m, m + g.count))), (m += g.count), c && u[c - 1].added) - ) { - var v = u[c - 1] - ;(u[c - 1] = u[c]), (u[c] = v) - } - } else { - if (!g.added && a) { - var N = s.slice(h, h + g.count) - ;(N = N.map(function (w, C) { - var S = o[m + C] - return S.length > w.length ? S : w - })), - (g.value = r.join(N)) - } else g.value = r.join(s.slice(h, h + g.count)) - ;(h += g.count), g.added || (m += g.count) - } - } - var _ = u[d - 1] - return ( - d > 1 && - typeof _.value == 'string' && - (_.added || _.removed) && - r.equals('', _.value) && - ((u[d - 2].value += _.value), u.pop()), - u - ) - } - })), - (YD = yo((e) => { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.diffArrays = i), - (e.arrayDiff = void 0) - var t = n(zD()) - function n(s) { - return s && s.__esModule ? s : { default: s } - } - var r = new t.default() - ;(e.arrayDiff = r), - (r.tokenize = function (s) { - return s.slice() - }), - (r.join = r.removeEmpty = - function (s) { - return s - }) - function i(s, o, a) { - return r.diff(s, o, a) - } - })), - (q1 = yo((e, t) => { - 'use strict' - var n = new Proxy(String, { get: () => n }) - t.exports = n - })), - (i2 = {}) - Pu(i2, { default: () => o2, shouldHighlight: () => s2 }) - ;(JD = GD(() => { - ;(s2 = () => !1), (o2 = String) - })), - (XD = yo((e, t) => { - var n = String, - r = function () { - return { - isColorSupported: !1, - reset: n, - bold: n, - dim: n, - italic: n, - underline: n, - inverse: n, - hidden: n, - strikethrough: n, - black: n, - red: n, - green: n, - yellow: n, - blue: n, - magenta: n, - cyan: n, - white: n, - gray: n, - bgBlack: n, - bgRed: n, - bgGreen: n, - bgYellow: n, - bgBlue: n, - bgMagenta: n, - bgCyan: n, - bgWhite: n - } - } - ;(t.exports = r()), (t.exports.createColors = r) - })), - (KD = yo((e) => { - 'use strict' - Object.defineProperty(e, '__esModule', { value: !0 }), - (e.codeFrameColumns = m), - (e.default = g) - var t = (JD(), HD(i2)), - n = i(XD(), !0) - function r(v) { - if (typeof WeakMap != 'function') return null - var N = new WeakMap(), - _ = new WeakMap() - return (r = function (w) { - return w ? _ : N - })(v) - } - function i(v, N) { - if (!N && v && v.__esModule) return v - if (v === null || (typeof v != 'object' && typeof v != 'function')) - return { default: v } - var _ = r(N) - if (_ && _.has(v)) return _.get(v) - var w = { __proto__: null }, - C = Object.defineProperty && Object.getOwnPropertyDescriptor - for (var S in v) - if (S !== 'default' && {}.hasOwnProperty.call(v, S)) { - var k = C ? Object.getOwnPropertyDescriptor(v, S) : null - k && (k.get || k.set) ? Object.defineProperty(w, S, k) : (w[S] = v[S]) - } - return (w.default = v), _ && _.set(v, w), w - } - var s = n.default, - o = (v, N) => (_) => v(N(_)), - a - function u(v) { - if (v) { - var N - return (N = a) != null || (a = (0, n.createColors)(!0)), a - } - return s - } - var l = !1 - function c(v) { - return { gutter: v.gray, marker: o(v.red, v.bold), message: o(v.red, v.bold) } - } - var d = /\r\n|[\n\r\u2028\u2029]/ - function h(v, N, _) { - let w = Object.assign({ column: 0, line: -1 }, v.start), - C = Object.assign({}, w, v.end), - { linesAbove: S = 2, linesBelow: k = 3 } = _ || {}, - M = w.line, - I = w.column, - B = C.line, - L = C.column, - A = Math.max(M - (S + 1), 0), - X = Math.min(N.length, B + k) - M === -1 && (A = 0), B === -1 && (X = N.length) - let z = B - M, - fe = {} - if (z) - for (let F = 0; F <= z; F++) { - let T = F + M - if (!I) fe[T] = !0 - else if (F === 0) { - let Q = N[T - 1].length - fe[T] = [I, Q - I + 1] - } else if (F === z) fe[T] = [0, L] - else { - let Q = N[T - F].length - fe[T] = [0, Q] - } - } - else I === L ? (I ? (fe[M] = [I, 0]) : (fe[M] = !0)) : (fe[M] = [I, L - I]) - return { start: A, end: X, markerLines: fe } - } - function m(v, N, _ = {}) { - let w = (_.highlightCode || _.forceColor) && (0, t.shouldHighlight)(_), - C = u(_.forceColor), - S = c(C), - k = (fe, F) => (w ? fe(F) : F), - M = v.split(d), - { start: I, end: B, markerLines: L } = h(N, M, _), - A = N.start && typeof N.start.column == 'number', - X = String(B).length, - z = (w ? (0, t.default)(v, _) : v) - .split(d, B) - .slice(I, B) - .map((fe, F) => { - let T = I + 1 + F, - Q = ` ${` ${T}`.slice(-X)} |`, - $ = L[T], - ee = !L[T + 1] - if ($) { - let ne = '' - if (Array.isArray($)) { - let se = fe.slice(0, Math.max($[0] - 1, 0)).replace(/[^\t]/g, ' '), - Ie = $[1] || 1 - ;(ne = [ - ` - `, - k(S.gutter, Q.replace(/\d/g, ' ')), - ' ', - se, - k(S.marker, '^').repeat(Ie) - ].join('')), - ee && _.message && (ne += ' ' + k(S.message, _.message)) - } - return [ - k(S.marker, '>'), - k(S.gutter, Q), - fe.length > 0 ? ` ${fe}` : '', - ne - ].join('') - } else return ` ${k(S.gutter, Q)}${fe.length > 0 ? ` ${fe}` : ''}` - }).join(` -`) - return ( - _.message && - !A && - (z = `${' '.repeat(X + 1)}${_.message} -${z}`), - w ? C.reset(z) : z - ) - } - function g(v, N, _, w = {}) { - if (!l) { - l = !0 - let C = - 'Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.' - { - let S = new Error(C) - ;(S.name = 'DeprecationWarning'), console.warn(new Error(C)) - } - } - return (_ = Math.max(_, 0)), m(v, { start: { column: _, line: N } }, w) - } - })), - (a2 = {}) - Pu(a2, { - __debug: () => Y2, - check: () => Q2, - doc: () => ef, - format: () => uf, - formatWithCursor: () => af, - getSupportInfo: () => z2, - util: () => tf, - version: () => W2 - }) - ;(ZD = (e, t, n, r) => { - if (!(e && t == null)) - return t.replaceAll ? t.replaceAll(n, r) : n.global ? t.replace(n, r) : t.split(n).join(r) - }), - (Bu = ZD), - (e8 = xo(YD(), 1)) - ;(Jr = 'string'), - (Hn = 'array'), - (Xr = 'cursor'), - (Wn = 'indent'), - (Qn = 'align'), - (zn = 'trim'), - ($t = 'group'), - (Fn = 'fill'), - (Jt = 'if-break'), - (Yn = 'indent-if-break'), - (Jn = 'line-suffix'), - (Xn = 'line-suffix-boundary'), - (yt = 'line'), - (wn = 'label'), - (nn = 'break-parent'), - (l2 = new Set([Xr, Wn, Qn, zn, $t, Fn, Jt, Yn, Jn, Xn, yt, wn, nn])) - ;(Kr = r8), (i8 = (e) => new Intl.ListFormat('en-US', { type: 'disjunction' }).format(e)) - ;(o8 = class extends Error { - name = 'InvalidDocError' - constructor(e) { - super(s8(e)), (this.doc = e) - } - }), - (ls = o8), - (Cm = {}) - ;(H1 = a8), (c2 = () => {}), (An = c2), (W1 = c2) - ;(h8 = { type: Xn }), - (Vu = { type: nn }), - (m8 = { type: zn }), - (Q1 = { type: yt, hard: !0 }), - (p2 = { type: yt, hard: !0, literal: !0 }), - (h2 = { type: yt }), - (g8 = { type: yt, soft: !0 }), - (zr = [Q1, Vu]), - (m2 = [p2, Vu]), - (M1 = { type: Xr }) - ;(b8 = (e, t, n) => { - if (!(e && t == null)) - return Array.isArray(t) || typeof t == 'string' ? t[n < 0 ? t.length + n : n] : t.at(n) - }), - (gt = b8), - (E8 = () => - /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g) - ;(_8 = (e) => !(y8(e) || x8(e))), (N8 = /[^\x20-\x7F]/) - z1 = T8 - ;(Ut = Symbol('MODE_BREAK')), (Sn = Symbol('MODE_FLAT')), (Eo = Symbol('cursor')) - ;(J1 = B8), - (V8 = class { - constructor(e) { - QD(this, Hr), (this.stack = [e]) - } - get key() { - let { stack: e, siblings: t } = this - return gt(!1, e, t === null ? -2 : -4) ?? null - } - get index() { - return this.siblings === null ? null : gt(!1, this.stack, -2) - } - get node() { - return gt(!1, this.stack, -1) - } - get parent() { - return this.getNode(1) - } - get grandparent() { - return this.getNode(2) - } - get isInArray() { - return this.siblings !== null - } - get siblings() { - let { stack: e } = this, - t = gt(!1, e, -3) - return Array.isArray(t) ? t : null - } - get next() { - let { siblings: e } = this - return e === null ? null : e[this.index + 1] - } - get previous() { - let { siblings: e } = this - return e === null ? null : e[this.index - 1] - } - get isFirst() { - return this.index === 0 - } - get isLast() { - let { siblings: e, index: t } = this - return e !== null && t === e.length - 1 - } - get isRoot() { - return this.stack.length === 1 - } - get root() { - return this.stack[0] - } - get ancestors() { - return [...vo(this, Hr, Ru).call(this)] - } - getName() { - let { stack: e } = this, - { length: t } = e - return t > 1 ? gt(!1, e, -2) : null - } - getValue() { - return gt(!1, this.stack, -1) - } - getNode(e = 0) { - let t = vo(this, Hr, V1).call(this, e) - return t === -1 ? null : this.stack[t] - } - getParentNode(e = 0) { - return this.getNode(e + 1) - } - call(e, ...t) { - let { stack: n } = this, - { length: r } = n, - i = gt(!1, n, -1) - for (let s of t) (i = i[s]), n.push(s, i) - try { - return e(this) - } finally { - n.length = r - } - } - callParent(e, t = 0) { - let n = vo(this, Hr, V1).call(this, t + 1), - r = this.stack.splice(n + 1) - try { - return e(this) - } finally { - this.stack.push(...r) - } - } - each(e, ...t) { - let { stack: n } = this, - { length: r } = n, - i = gt(!1, n, -1) - for (let s of t) (i = i[s]), n.push(s, i) - try { - for (let s = 0; s < i.length; ++s) n.push(s, i[s]), e(this, s, i), (n.length -= 2) - } finally { - n.length = r - } - } - map(e, ...t) { - let n = [] - return ( - this.each((r, i, s) => { - n[i] = e(r, i, s) - }, ...t), - n - ) - } - match(...e) { - let t = this.stack.length - 1, - n = null, - r = this.stack[t--] - for (let i of e) { - if (r === void 0) return !1 - let s = null - if ( - (typeof n == 'number' && ((s = n), (n = this.stack[t--]), (r = this.stack[t--])), - i && !i(r, n, s)) - ) - return !1 - ;(n = this.stack[t--]), (r = this.stack[t--]) - } - return !0 - } - findAncestor(e) { - for (let t of vo(this, Hr, Ru).call(this)) if (e(t)) return t - } - hasAncestor(e) { - for (let t of vo(this, Hr, Ru).call(this)) if (e(t)) return !0 - return !1 - } - }) - ;(Hr = new WeakSet()), - (V1 = function (e) { - let { stack: t } = this - for (let n = t.length - 1; n >= 0; n -= 2) if (!Array.isArray(t[n]) && --e < 0) return n - return -1 - }), - (Ru = function* () { - let { stack: e } = this - for (let t = e.length - 3; t >= 0; t -= 2) { - let n = e[t] - Array.isArray(n) || (yield n) - } - }) - ;(U8 = V8), (y2 = new Proxy(() => {}, { get: () => y2 })), (U1 = y2) - j8 = $8 - ;(G8 = _o(/\s/)), (vr = _o(' ')), (_2 = _o(',; ')), (N2 = _o(/[^\n\r]/)) - Yr = H8 - Dr = W8 - ;(z8 = Q8), - (T2 = new Set([ - 'tokens', - 'comments', - 'parent', - 'enclosingNode', - 'precedingNode', - 'followingNode' - ])), - (Y8 = (e) => Object.keys(e).filter((t) => !T2.has(t))) - ju = J8 - w1 = new WeakMap() - L1 = () => !1 - A2 = (e) => !/[\S\n\u2028\u2029]/.test(e) - Z1 = tv - ;(uv = av), - (w2 = class extends Error { - name = 'ConfigError' - }), - (Om = class extends Error { - name = 'UndefinedParserError' - }), - (lv = { - cursorOffset: { - category: 'Special', - type: 'int', - default: -1, - range: { start: -1, end: 1 / 0, step: 1 }, - description: - 'Print (to stderr) where a cursor at the given position would move to after formatting.', - cliCategory: 'Editor' - }, - endOfLine: { - category: 'Global', - type: 'choice', - default: 'lf', - description: 'Which end of line characters to apply.', - choices: [ - { - value: 'lf', - description: - 'Line Feed only (\\n), common on Linux and macOS as well as inside git repos' - }, - { - value: 'crlf', - description: 'Carriage Return + Line Feed characters (\\r\\n), common on Windows' - }, - { - value: 'cr', - description: 'Carriage Return character only (\\r), used very rarely' - }, - { - value: 'auto', - description: `Maintain existing -(mixed values within one file are normalised by looking at what's used after the first line)` - } - ] - }, - filepath: { - category: 'Special', - type: 'path', - description: 'Specify the input filepath. This will be used to do parser inference.', - cliName: 'stdin-filepath', - cliCategory: 'Other', - cliDescription: 'Path to the file to pretend that stdin comes from.' - }, - insertPragma: { - category: 'Special', - type: 'boolean', - default: !1, - description: "Insert @format pragma into file's first docblock comment.", - cliCategory: 'Other' - }, - parser: { - category: 'Global', - type: 'choice', - default: void 0, - description: 'Which parser to use.', - exception: (e) => typeof e == 'string' || typeof e == 'function', - choices: [ - { value: 'flow', description: 'Flow' }, - { value: 'babel', description: 'JavaScript' }, - { value: 'babel-flow', description: 'Flow' }, - { value: 'babel-ts', description: 'TypeScript' }, - { value: 'typescript', description: 'TypeScript' }, - { value: 'acorn', description: 'JavaScript' }, - { value: 'espree', description: 'JavaScript' }, - { value: 'meriyah', description: 'JavaScript' }, - { value: 'css', description: 'CSS' }, - { value: 'less', description: 'Less' }, - { value: 'scss', description: 'SCSS' }, - { value: 'json', description: 'JSON' }, - { value: 'json5', description: 'JSON5' }, - { value: 'jsonc', description: 'JSON with Comments' }, - { value: 'json-stringify', description: 'JSON.stringify' }, - { value: 'graphql', description: 'GraphQL' }, - { value: 'markdown', description: 'Markdown' }, - { value: 'mdx', description: 'MDX' }, - { value: 'vue', description: 'Vue' }, - { value: 'yaml', description: 'YAML' }, - { value: 'glimmer', description: 'Ember / Handlebars' }, - { value: 'html', description: 'HTML' }, - { value: 'angular', description: 'Angular' }, - { value: 'lwc', description: 'Lightning Web Components' } - ] - }, - plugins: { - type: 'path', - array: !0, - default: [{ value: [] }], - category: 'Global', - description: 'Add a plugin. Multiple plugins can be passed as separate `--plugin`s.', - exception: (e) => typeof e == 'string' || typeof e == 'object', - cliName: 'plugin', - cliCategory: 'Config' - }, - printWidth: { - category: 'Global', - type: 'int', - default: 80, - description: 'The line length where Prettier will try wrap.', - range: { start: 0, end: 1 / 0, step: 1 } - }, - rangeEnd: { - category: 'Special', - type: 'int', - default: 1 / 0, - range: { start: 0, end: 1 / 0, step: 1 }, - description: `Format code ending at a given character offset (exclusive). -The range will extend forwards to the end of the selected statement.`, - cliCategory: 'Editor' - }, - rangeStart: { - category: 'Special', - type: 'int', - default: 0, - range: { start: 0, end: 1 / 0, step: 1 }, - description: `Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement.`, - cliCategory: 'Editor' - }, - requirePragma: { - category: 'Special', - type: 'boolean', - default: !1, - description: `Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`, - cliCategory: 'Other' - }, - tabWidth: { - type: 'int', - category: 'Global', - default: 2, - description: 'Number of spaces per indentation level.', - range: { start: 0, end: 1 / 0, step: 1 } - }, - useTabs: { - category: 'Global', - type: 'boolean', - default: !1, - description: 'Indent with tabs instead of spaces.' - }, - embeddedLanguageFormatting: { - category: 'Global', - type: 'choice', - default: 'auto', - description: 'Control how Prettier formats quoted code embedded in the file.', - choices: [ - { - value: 'auto', - description: 'Format embedded code if Prettier can automatically identify it.' - }, - { value: 'off', description: 'Never automatically format embedded code.' } - ] - } - }) - dv = (e) => String(e).split(/[/\\]/).pop() - ;(mv = hv), - (as = { - key: (e) => (/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e) ? e : JSON.stringify(e)), - value(e) { - if (e === null || typeof e != 'object') return JSON.stringify(e) - if (Array.isArray(e)) return `[${e.map((n) => as.value(n)).join(', ')}]` - let t = Object.keys(e) - return t.length === 0 - ? '{}' - : `{ ${t.map((n) => `${as.key(n)}: ${as.value(e[n])}`).join(', ')} }` - }, - pair: ({ key: e, value: t }) => as.value({ [e]: t }) - }), - (Pm = xo(q1(), 1)), - (gv = (e, t, { descriptor: n }) => { - let r = [ - `${Pm.default.yellow(typeof e == 'string' ? n.key(e) : n.pair(e))} is deprecated` - ] - return ( - t && - r.push( - `we now treat it as ${Pm.default.blue(typeof t == 'string' ? n.key(t) : n.pair(t))}` - ), - r.join('; ') + '.' - ) - }), - (us = xo(q1(), 1)), - (C2 = Symbol.for('vnopts.VALUE_NOT_EXIST')), - (ku = Symbol.for('vnopts.VALUE_UNCHANGED')), - (Bm = ' '.repeat(2)), - (Dv = (e, t, n) => { - let { text: r, list: i } = n.normalizeExpectedResult(n.schemas[e].expected(n)), - s = [] - return ( - r && s.push(Vm(e, t, r, n.descriptor)), - i && - s.push( - [Vm(e, t, i.title, n.descriptor)].concat( - i.values.map((o) => I2(o, n.loggerPrintWidth)) - ).join(` -`) - ), - R2(s, n.loggerPrintWidth) - ) - }) - ;(Um = xo(q1(), 1)), (I1 = []), ($m = []) - ;(k2 = (e, t, { descriptor: n, logger: r, schemas: i }) => { - let s = [`Ignored unknown option ${Um.default.yellow(n.pair({ key: e, value: t }))}.`], - o = Object.keys(i) - .sort() - .find((a) => vv(e, a) < 3) - o && s.push(`Did you mean ${Um.default.blue(n.key(o))}?`), r.warn(s.join(' ')) - }), - (bv = [ - 'default', - 'expected', - 'validate', - 'deprecated', - 'forward', - 'redirect', - 'overlap', - 'preprocess', - 'postprocess' - ]) - br = class { - static create(e) { - return Ev(this, e) - } - constructor(e) { - this.name = e.name - } - default(e) {} - expected(e) { - return 'nothing' - } - validate(e, t) { - return !1 - } - deprecated(e, t) { - return !1 - } - forward(e, t) {} - redirect(e, t) {} - overlap(e, t, n) { - return e - } - preprocess(e, t) { - return e - } - postprocess(e, t) { - return ku - } - } - ;(xv = class extends br { - constructor(e) { - super(e), (this._sourceName = e.sourceName) - } - expected(e) { - return e.schemas[this._sourceName].expected(e) - } - validate(e, t) { - return t.schemas[this._sourceName].validate(e, t) - } - redirect(e, t) { - return this._sourceName - } - }), - (_v = class extends br { - expected() { - return 'anything' - } - validate() { - return !0 - } - }), - (Nv = class extends br { - constructor({ valueSchema: e, name: t = e.name, ...n }) { - super({ ...n, name: t }), (this._valueSchema = e) - } - expected(e) { - let { text: t, list: n } = e.normalizeExpectedResult(this._valueSchema.expected(e)) - return { - text: t && `an array of ${t}`, - list: n && { title: 'an array of the following values', values: [{ list: n }] } - } - } - validate(e, t) { - if (!Array.isArray(e)) return !1 - let n = [] - for (let r of e) { - let i = t.normalizeValidateResult(this._valueSchema.validate(r, t), r) - i !== !0 && n.push(i.value) - } - return n.length === 0 ? !0 : { value: n } - } - deprecated(e, t) { - let n = [] - for (let r of e) { - let i = t.normalizeDeprecatedResult(this._valueSchema.deprecated(r, t), r) - i !== !1 && n.push(...i.map(({ value: s }) => ({ value: [s] }))) - } - return n - } - forward(e, t) { - let n = [] - for (let r of e) { - let i = t.normalizeForwardResult(this._valueSchema.forward(r, t), r) - n.push(...i.map(jm)) - } - return n - } - redirect(e, t) { - let n = [], - r = [] - for (let i of e) { - let s = t.normalizeRedirectResult(this._valueSchema.redirect(i, t), i) - 'remain' in s && n.push(s.remain), r.push(...s.redirect.map(jm)) - } - return n.length === 0 ? { redirect: r } : { redirect: r, remain: n } - } - overlap(e, t) { - return e.concat(t) - } - }) - Tv = class extends br { - expected() { - return 'true or false' - } - validate(e) { - return typeof e == 'boolean' - } - } - ;(kv = class extends br { - constructor(e) { - super(e), - (this._choices = Av( - e.choices.map((t) => (t && typeof t == 'object' ? t : { value: t })), - 'value' - )) - } - expected({ descriptor: e }) { - let t = Array.from(this._choices.keys()) - .map((i) => this._choices.get(i)) - .filter(({ hidden: i }) => !i) - .map((i) => i.value) - .sort(Cv) - .map(e.value), - n = t.slice(0, -2), - r = t.slice(-2) - return { - text: n.concat(r.join(' or ')).join(', '), - list: { title: 'one of the following values', values: t } - } - } - validate(e) { - return this._choices.has(e) - } - deprecated(e) { - let t = this._choices.get(e) - return t && t.deprecated ? { value: e } : !1 - } - forward(e) { - let t = this._choices.get(e) - return t ? t.forward : void 0 - } - redirect(e) { - let t = this._choices.get(e) - return t ? t.redirect : void 0 - } - }), - (Ov = class extends br { - expected() { - return 'a number' - } - validate(e, t) { - return typeof e == 'number' - } - }), - (Mv = class extends Ov { - expected() { - return 'an integer' - } - validate(e, t) { - return t.normalizeValidateResult(super.validate(e, t), e) === !0 && Lv(e) - } - }), - (zm = class extends br { - expected() { - return 'a string' - } - validate(e) { - return typeof e == 'string' - } - }), - (Pv = as), - (Bv = k2), - (Vv = Dv), - (Uv = gv), - ($v = class { - constructor(e, t) { - let { - logger: n = console, - loggerPrintWidth: r = 80, - descriptor: i = Pv, - unknown: s = Bv, - invalid: o = Vv, - deprecated: a = Uv, - missing: u = () => !1, - required: l = () => !1, - preprocess: c = (h) => h, - postprocess: d = () => ku - } = t || {} - ;(this._utils = { - descriptor: i, - logger: n || { warn: () => {} }, - loggerPrintWidth: r, - schemas: Sv(e, 'name'), - normalizeDefaultResult: qm, - normalizeExpectedResult: O2, - normalizeDeprecatedResult: Hm, - normalizeForwardResult: $1, - normalizeRedirectResult: Qm, - normalizeValidateResult: Gm - }), - (this._unknownHandler = s), - (this._invalidHandler = Iv(o)), - (this._deprecatedHandler = a), - (this._identifyMissing = (h, m) => !(h in m) || u(h, m)), - (this._identifyRequired = l), - (this._preprocess = c), - (this._postprocess = d), - this.cleanHistory() - } - cleanHistory() { - this._hasDeprecationWarned = Fv() - } - normalize(e) { - let t = {}, - n = [this._preprocess(e, this._utils)], - r = () => { - for (; n.length !== 0; ) { - let i = n.shift(), - s = this._applyNormalization(i, t) - n.push(...s) - } - } - r() - for (let i of Object.keys(this._utils.schemas)) { - let s = this._utils.schemas[i] - if (!(i in t)) { - let o = qm(s.default(this._utils)) - 'value' in o && n.push({ [i]: o.value }) - } - } - r() - for (let i of Object.keys(this._utils.schemas)) { - if (!(i in t)) continue - let s = this._utils.schemas[i], - o = t[i], - a = s.postprocess(o, this._utils) - a !== ku && (this._applyValidation(a, i, s), (t[i] = a)) - } - return this._applyPostprocess(t), this._applyRequiredCheck(t), t - } - _applyNormalization(e, t) { - let n = [], - { knownKeys: r, unknownKeys: i } = this._partitionOptionKeys(e) - for (let s of r) { - let o = this._utils.schemas[s], - a = o.preprocess(e[s], this._utils) - this._applyValidation(a, s, o) - let u = ({ from: d, to: h }) => { - n.push(typeof h == 'string' ? { [h]: d } : { [h.key]: h.value }) - }, - l = ({ value: d, redirectTo: h }) => { - let m = Hm(o.deprecated(d, this._utils), a, !0) - if (m !== !1) - if (m === !0) - this._hasDeprecationWarned(s) || - this._utils.logger.warn(this._deprecatedHandler(s, h, this._utils)) - else - for (let { value: g } of m) { - let v = { key: s, value: g } - if (!this._hasDeprecationWarned(v)) { - let N = typeof h == 'string' ? { key: h, value: g } : h - this._utils.logger.warn(this._deprecatedHandler(v, N, this._utils)) - } - } - } - $1(o.forward(a, this._utils), a).forEach(u) - let c = Qm(o.redirect(a, this._utils), a) - if ((c.redirect.forEach(u), 'remain' in c)) { - let d = c.remain - ;(t[s] = s in t ? o.overlap(t[s], d, this._utils) : d), l({ value: d }) - } - for (let { from: d, to: h } of c.redirect) l({ value: d, redirectTo: h }) - } - for (let s of i) { - let o = e[s] - this._applyUnknownHandler(s, o, t, (a, u) => { - n.push({ [a]: u }) - }) - } - return n - } - _applyRequiredCheck(e) { - for (let t of Object.keys(this._utils.schemas)) - if (this._identifyMissing(t, e) && this._identifyRequired(t)) - throw this._invalidHandler(t, C2, this._utils) - } - _partitionOptionKeys(e) { - let [t, n] = wv( - Object.keys(e).filter((r) => !this._identifyMissing(r, e)), - (r) => r in this._utils.schemas - ) - return { knownKeys: t, unknownKeys: n } - } - _applyValidation(e, t, n) { - let r = Gm(n.validate(e, this._utils), e) - if (r !== !0) throw this._invalidHandler(t, r.value, this._utils) - } - _applyUnknownHandler(e, t, n, r) { - let i = this._unknownHandler(e, t, this._utils) - if (i) - for (let s of Object.keys(i)) { - if (this._identifyMissing(s, i)) continue - let o = i[s] - s in this._utils.schemas ? r(s, o) : (n[s] = o) - } - } - _applyPostprocess(e) { - let t = this._postprocess(e, this._utils) - if (t !== ku) { - if (t.delete) for (let n of t.delete) delete e[n] - if (t.override) { - let { knownKeys: n, unknownKeys: r } = this._partitionOptionKeys(t.override) - for (let i of n) { - let s = t.override[i] - this._applyValidation(s, i, this._utils.schemas[i]), (e[i] = s) - } - for (let i of r) { - let s = t.override[i] - this._applyUnknownHandler(i, s, e, (o, a) => { - let u = this._utils.schemas[o] - this._applyValidation(a, o, u), (e[o] = a) - }) - } - } - } - } - }) - ;(Hv = jv), - (Wv = (e, t, n) => { - if (!(e && t == null)) { - if (t.findLast) return t.findLast(n) - for (let r = t.length - 1; r >= 0; r--) { - let i = t[r] - if (n(i, r, t)) return i - } - } - }), - (M2 = Wv) - Ym = { astFormat: 'estree', printer: {}, originalText: void 0, locStart: null, locEnd: null } - ;(fs = Yv), (Jv = xo(KD(), 1)) - No = Xv - nb = tb - ib = rb - ;(ob = sb), - (ab = ({ parser: e }) => - e === 'json' || e === 'json5' || e === 'jsonc' || e === 'json-stringify') - ;($2 = new Set([ - 'JsonRoot', - 'ObjectExpression', - 'ArrayExpression', - 'StringLiteral', - 'NumericLiteral', - 'BooleanLiteral', - 'NullLiteral', - 'UnaryExpression', - 'TemplateLiteral' - ])), - (fb = new Set([ - 'OperationDefinition', - 'FragmentDefinition', - 'VariableDefinition', - 'TypeExtensionDefinition', - 'ObjectTypeDefinition', - 'FieldDefinition', - 'DirectiveDefinition', - 'EnumTypeDefinition', - 'EnumValueDefinition', - 'InputValueDefinition', - 'InputObjectTypeDefinition', - 'SchemaDefinition', - 'OperationTypeDefinition', - 'InterfaceTypeDefinition', - 'UnionTypeDefinition', - 'ScalarTypeDefinition' - ])) - ;(j2 = '\uFEFF'), (Zm = Symbol('cursor')) - ef = {} - Pu(ef, { builders: () => bb, printer: () => Eb, utils: () => yb }) - ;(bb = { - join: g2, - line: h2, - softline: g8, - hardline: zr, - literalline: m2, - group: f2, - conditionalGroup: f8, - fill: d2, - lineSuffix: O1, - lineSuffixBoundary: h8, - cursor: M1, - breakParent: Vu, - ifBreak: d8, - trim: m8, - indent: Ou, - indentIfBreak: p8, - align: cs, - addAlignmentToDoc: D2, - markAsRoot: l8, - dedentToRoot: u8, - dedent: c8, - hardlineWithoutBreakParent: Q1, - literallineWithoutBreakParent: p2, - label: D8, - concat: (e) => e - }), - (Eb = { printDocToString: $u }), - (yb = { - willBreak: A8, - traverseDoc: H1, - findInDoc: Y1, - mapDoc: Uu, - removeLines: L8, - stripTrailingHardline: v2, - replaceEndOfLine: R8, - canBreak: O8 - }), - (W2 = '3.3.2'), - (tf = {}) - Pu(tf, { - addDanglingComment: () => Wr, - addLeadingComment: () => ss, - addTrailingComment: () => os, - getAlignmentSize: () => J1, - getIndentSize: () => Ab, - getMaxContinuousCount: () => Lb, - getNextNonSpaceNonCommentCharacter: () => Ib, - getNextNonSpaceNonCommentCharacterIndex: () => Ub, - getStringWidth: () => z1, - hasNewline: () => Dr, - hasNewlineInRange: () => kb, - hasSpaces: () => Mb, - isNextLineEmpty: () => Gb, - isNextLineEmptyAfterIndex: () => of, - isPreviousLineEmpty: () => jb, - makeString: () => Bb, - skip: () => _o, - skipEverythingButNewLine: () => N2, - skipInlineComment: () => nf, - skipNewline: () => Yr, - skipSpaces: () => vr, - skipToLineEnd: () => _2, - skipTrailingComment: () => rf, - skipWhitespace: () => G8 - }) - nf = xb - rf = _b - sf = Nb - of = Tb - Ab = Sb - Lb = wb - Ib = Cb - kb = Rb - Mb = Ob - Bb = Pb - af = Qr(H2) - ;(z2 = Qr(L2, 0)), - (Y2 = { - parse: Qr(hb), - formatAST: Qr(mb), - formatDoc: Qr(gb), - printToDoc: Qr(Db), - printDocToString: Qr(vb) - }), - (Hb = a2) - }) - var eg = Kn((Z2, lf) => { - ;(function (e) { - function t() { - var r = e() - return r.default || r - } - if (typeof Z2 == 'object' && typeof lf == 'object') lf.exports = t() - else if (typeof define == 'function' && define.amd) define(t) - else { - var n = - typeof globalThis < 'u' - ? globalThis - : typeof global < 'u' - ? global - : typeof self < 'u' - ? self - : this || {} - ;(n.prettierPlugins = n.prettierPlugins || {}), (n.prettierPlugins.graphql = t()) - } - })(function () { - 'use strict' - var e = Object.defineProperty, - t = Object.getOwnPropertyDescriptor, - n = Object.getOwnPropertyNames, - r = Object.prototype.hasOwnProperty, - i = (f, D) => { - for (var b in D) e(f, b, { get: D[b], enumerable: !0 }) - }, - s = (f, D, b, x) => { - if ((D && typeof D == 'object') || typeof D == 'function') - for (let y of n(D)) - !r.call(f, y) && - y !== b && - e(f, y, { get: () => D[y], enumerable: !(x = t(D, y)) || x.enumerable }) - return f - }, - o = (f) => s(e({}, '__esModule', { value: !0 }), f), - a = {} - i(a, { languages: () => pg, options: () => gg, parsers: () => gf, printers: () => e4 }) - var u = (f, D, b, x) => { - if (!(f && D == null)) - return D.replaceAll - ? D.replaceAll(b, x) - : b.global - ? D.replace(b, x) - : D.split(b).join(x) - }, - l = u, - c = 'indent', - d = 'group', - h = 'if-break', - m = 'line', - g = 'break-parent', - v = () => {}, - N = v, - _ = v - function w(f) { - return N(f), { type: c, contents: f } - } - function C(f, D = {}) { - return ( - N(f), - _(D.expandedStates, !0), - { - type: d, - id: D.id, - contents: f, - break: !!D.shouldBreak, - expandedStates: D.expandedStates - } - ) - } - function S(f, D = '', b = {}) { - return ( - N(f), D !== '' && N(D), { type: h, breakContents: f, flatContents: D, groupId: b.groupId } - ) - } - var k = { type: g }, - M = { type: m, hard: !0 }, - I = { type: m }, - B = { type: m, soft: !0 }, - L = [M, k] - function A(f, D) { - N(f), _(D) - let b = [] - for (let x = 0; x < D.length; x++) x !== 0 && b.push(f), b.push(D[x]) - return b - } - function X(f) { - return (D, b, x) => { - let y = !!(x != null && x.backwards) - if (b === !1) return !1 - let { length: V } = D, - ie = b - for (; ie >= 0 && ie < V; ) { - let Ae = D.charAt(ie) - if (f instanceof RegExp) { - if (!f.test(Ae)) return ie - } else if (!f.includes(Ae)) return ie - y ? ie-- : ie++ - } - return ie === -1 || ie === V ? ie : !1 - } - } - var z = X(/\s/), - fe = X(' '), - F = X(',; '), - T = X(/[^\n\r]/) - function Q(f, D, b) { - let x = !!(b != null && b.backwards) - if (D === !1) return !1 - let y = f.charAt(D) - if (x) { - if ( - f.charAt(D - 1) === '\r' && - y === - ` -` - ) - return D - 2 - if ( - y === - ` -` || - y === '\r' || - y === '\u2028' || - y === '\u2029' - ) - return D - 1 - } else { - if ( - y === '\r' && - f.charAt(D + 1) === - ` -` - ) - return D + 2 - if ( - y === - ` -` || - y === '\r' || - y === '\u2028' || - y === '\u2029' - ) - return D + 1 - } - return D - } - var $ = Q - function ee(f, D, b = {}) { - let x = fe(f, b.backwards ? D - 1 : D, b), - y = $(f, x, b) - return x !== y - } - var ne = ee - function se(f, D) { - if (D === !1) return !1 - if (f.charAt(D) === '/' && f.charAt(D + 1) === '*') { - for (let b = D + 2; b < f.length; ++b) - if (f.charAt(b) === '*' && f.charAt(b + 1) === '/') return b + 2 - } - return D - } - var Ie = se - function P(f, D) { - return D === !1 ? !1 : f.charAt(D) === '/' && f.charAt(D + 1) === '/' ? T(f, D) : D - } - var Z = P - function J(f, D) { - let b = null, - x = D - for (; x !== b; ) (b = x), (x = F(f, x)), (x = Ie(f, x)), (x = fe(f, x)) - return (x = Z(f, x)), (x = $(f, x)), x !== !1 && ne(f, x) - } - var G = J - function _e(f) { - return Array.isArray(f) && f.length > 0 - } - var Re = _e, - H = class extends Error { - name = 'UnexpectedNodeError' - constructor(f, D, b = 'type') { - super(`Unexpected ${D} node ${b}: ${JSON.stringify(f[b])}.`), (this.node = f) - } - }, - Ne = H, - Y = null - function de(f) { - if (Y !== null && typeof Y.property) { - let D = Y - return (Y = de.prototype = null), D - } - return (Y = de.prototype = f ?? Object.create(null)), new de() - } - var Te = 10 - for (let f = 0; f <= Te; f++) de() - function Dt(f) { - return de(f) - } - function Ye(f, D = 'type') { - Dt(f) - function b(x) { - let y = x[D], - V = f[y] - if (!Array.isArray(V)) - throw Object.assign(new Error(`Missing visitor keys for '${y}'.`), { node: x }) - return V - } - return b - } - var ds = Ye, - Zr = class { - constructor(f, D, b) { - ;(this.start = f.start), - (this.end = D.end), - (this.startToken = f), - (this.endToken = D), - (this.source = b) - } - get [Symbol.toStringTag]() { - return 'Location' - } - toJSON() { - return { start: this.start, end: this.end } - } - }, - cf = class { - constructor(f, D, b, x, y, V) { - ;(this.kind = f), - (this.start = D), - (this.end = b), - (this.line = x), - (this.column = y), - (this.value = V), - (this.prev = null), - (this.next = null) - } - get [Symbol.toStringTag]() { - return 'Token' - } - toJSON() { - return { kind: this.kind, value: this.value, line: this.line, column: this.column } - } - }, - ff = { - Name: [], - Document: ['definitions'], - OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'], - VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], - Variable: ['name'], - SelectionSet: ['selections'], - Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], - Argument: ['name', 'value'], - FragmentSpread: ['name', 'directives'], - InlineFragment: ['typeCondition', 'directives', 'selectionSet'], - FragmentDefinition: [ - 'name', - 'variableDefinitions', - 'typeCondition', - 'directives', - 'selectionSet' - ], - IntValue: [], - FloatValue: [], - StringValue: [], - BooleanValue: [], - NullValue: [], - EnumValue: [], - ListValue: ['values'], - ObjectValue: ['fields'], - ObjectField: ['name', 'value'], - Directive: ['name', 'arguments'], - NamedType: ['name'], - ListType: ['type'], - NonNullType: ['type'], - SchemaDefinition: ['description', 'directives', 'operationTypes'], - OperationTypeDefinition: ['type'], - ScalarTypeDefinition: ['description', 'name', 'directives'], - ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], - InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'], - InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - UnionTypeDefinition: ['description', 'name', 'directives', 'types'], - EnumTypeDefinition: ['description', 'name', 'directives', 'values'], - EnumValueDefinition: ['description', 'name', 'directives'], - InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], - DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], - SchemaExtension: ['directives', 'operationTypes'], - ScalarTypeExtension: ['name', 'directives'], - ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - UnionTypeExtension: ['name', 'directives', 'types'], - EnumTypeExtension: ['name', 'directives', 'values'], - InputObjectTypeExtension: ['name', 'directives', 'fields'] - }, - Wb = new Set(Object.keys(ff)), - ei - ;(function (f) { - ;(f.QUERY = 'query'), (f.MUTATION = 'mutation'), (f.SUBSCRIPTION = 'subscription') - })(ei || (ei = {})) - var tg = ds(ff, 'kind'), - ng = tg - function df(f) { - return f.loc.start - } - function pf(f) { - return f.loc.end - } - function rg(f) { - return /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(f) - } - function ig(f) { - return ( - `# @format +`+f}function sg(f,D,b){let{node:x}=f;if(!x.description)return"";let y=[b("description")];return x.kind==="InputValueDefinition"&&!x.description.block?y.push(I):y.push(L),y}var Ln=sg;function og(f,D,b){let{node:x}=f;switch(x.kind){case"Document":return[...A(L,fn(f,D,b,"definitions")),L];case"OperationDefinition":{let y=D.originalText[df(x)]!=="{",V=!!x.name;return[y?x.operation:"",y&&V?[" ",b("name")]:"",y&&!V&&Re(x.variableDefinitions)?" ":"",hf(f,b),Ft(f,b,x),!y&&!V?"":" ",b("selectionSet")]}case"FragmentDefinition":return["fragment ",b("name"),hf(f,b)," on ",b("typeCondition"),Ft(f,b,x)," ",b("selectionSet")];case"SelectionSet":return["{",w([L,A(L,fn(f,D,b,"selections"))]),L,"}"];case"Field":return C([x.alias?[b("alias"),": "]:"",b("name"),x.arguments.length>0?C(["(",w([B,A([S("",", "),B],fn(f,D,b,"arguments"))]),B,")"]):"",Ft(f,b,x),x.selectionSet?" ":"",b("selectionSet")]);case"Name":return x.value;case"StringValue":if(x.block){let y=l(!1,x.value,'"""',String.raw`\"""`).split(` +`);return y.length===1&&(y[0]=y[0].trim()),y.every(V=>V==="")&&(y.length=0),A(L,['"""',...y,'"""'])}return['"',l(!1,l(!1,x.value,/["\\]/g,String.raw`\$&`),` +`,String.raw`\n`),'"'];case"IntValue":case"FloatValue":case"EnumValue":return x.value;case"BooleanValue":return x.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",b("name")];case"ListValue":return C(["[",w([B,A([S("",", "),B],f.map(b,"values"))]),B,"]"]);case"ObjectValue":{let y=D.bracketSpacing&&x.fields.length>0?" ":"";return C(["{",y,w([B,A([S("",", "),B],f.map(b,"fields"))]),B,S("",y),"}"])}case"ObjectField":case"Argument":return[b("name"),": ",b("value")];case"Directive":return["@",b("name"),x.arguments.length>0?C(["(",w([B,A([S("",", "),B],fn(f,D,b,"arguments"))]),B,")"]):""];case"NamedType":return b("name");case"VariableDefinition":return[b("variable"),": ",b("type"),x.defaultValue?[" = ",b("defaultValue")]:"",Ft(f,b,x)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:y}=x,V=[];return y.endsWith("TypeDefinition")?V.push(Ln(f,D,b)):V.push("extend "),y.startsWith("ObjectType")?V.push("type"):y.startsWith("InputObjectType")?V.push("input"):V.push("interface"),V.push(" ",b("name")),!y.startsWith("InputObjectType")&&x.interfaces.length>0&&V.push(" implements ",...lg(f,D,b)),V.push(Ft(f,b,x)),x.fields.length>0&&V.push([" {",w([L,A(L,fn(f,D,b,"fields"))]),L,"}"]),V}case"FieldDefinition":return[Ln(f,D,b),b("name"),x.arguments.length>0?C(["(",w([B,A([S("",", "),B],fn(f,D,b,"arguments"))]),B,")"]):"",": ",b("type"),Ft(f,b,x)];case"DirectiveDefinition":return[Ln(f,D,b),"directive ","@",b("name"),x.arguments.length>0?C(["(",w([B,A([S("",", "),B],fn(f,D,b,"arguments"))]),B,")"]):"",x.repeatable?" repeatable":""," on ",...A(" | ",f.map(b,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[Ln(f,D,b),x.kind==="EnumTypeExtension"?"extend ":"","enum ",b("name"),Ft(f,b,x),x.values.length>0?[" {",w([L,A(L,fn(f,D,b,"values"))]),L,"}"]:""];case"EnumValueDefinition":return[Ln(f,D,b),b("name"),Ft(f,b,x)];case"InputValueDefinition":return[Ln(f,D,b),b("name"),": ",b("type"),x.defaultValue?[" = ",b("defaultValue")]:"",Ft(f,b,x)];case"SchemaExtension":return["extend schema",Ft(f,b,x),...x.operationTypes.length>0?[" {",w([L,A(L,fn(f,D,b,"operationTypes"))]),L,"}"]:[]];case"SchemaDefinition":return[Ln(f,D,b),"schema",Ft(f,b,x)," {",x.operationTypes.length>0?w([L,A(L,fn(f,D,b,"operationTypes"))]):"",L,"}"];case"OperationTypeDefinition":return[x.operation,": ",b("type")];case"FragmentSpread":return["...",b("name"),Ft(f,b,x)];case"InlineFragment":return["...",x.typeCondition?[" on ",b("typeCondition")]:"",Ft(f,b,x)," ",b("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return C([Ln(f,D,b),C([x.kind==="UnionTypeExtension"?"extend ":"","union ",b("name"),Ft(f,b,x),x.types.length>0?[" =",S(""," "),w([S([I,"| "]),A([I,"| "],f.map(b,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[Ln(f,D,b),x.kind==="ScalarTypeExtension"?"extend ":"","scalar ",b("name"),Ft(f,b,x)];case"NonNullType":return[b("type"),"!"];case"ListType":return["[",b("type"),"]"];default:throw new Ne(x,"Graphql","kind")}}function Ft(f,D,b){if(b.directives.length===0)return"";let x=A(I,f.map(D,"directives"));return b.kind==="FragmentDefinition"||b.kind==="OperationDefinition"?C([I,x]):[" ",C(w([B,x]))]}function fn(f,D,b,x){return f.map(({isLast:y,node:V})=>{let ie=b();return!y&&G(D.originalText,pf(V))?[ie,L]:ie},x)}function ag(f){return f.kind!=="Comment"}function ug(f){let D=f.node;if(D.kind==="Comment")return"#"+D.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(D))}function lg(f,D,b){let{node:x}=f,y=[],{interfaces:V}=x,ie=f.map(b,"interfaces");for(let Ae=0;Aex.value.trim()==="prettier-ignore")}var fg={print:og,massageAstNode:mf,hasPrettierIgnore:cg,insertPragma:ig,printComment:ug,canAttachComment:ag,getVisitorKeys:ng},dg=fg,pg=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}],hg={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},mg={bracketSpacing:hg.bracketSpacing},gg=mg,gf={};i(gf,{graphql:()=>Zg});function Dg(f){return typeof f=="object"&&f!==null}function vg(f,D){if(!f)throw new Error(D??"Unexpected invariant triggered.")}var bg=/\r\n|[\n\r]/g;function Hu(f,D){let b=0,x=1;for(let y of f.body.matchAll(bg)){if(typeof y.index=="number"||vg(!1),y.index>=D)break;b=y.index+y[0].length,x+=1}return{line:x,column:D+1-b}}function Eg(f){return Df(f.source,Hu(f.source,f.start))}function Df(f,D){let b=f.locationOffset.column-1,x="".padStart(b)+f.body,y=D.line-1,V=f.locationOffset.line-1,ie=D.line+V,Ae=D.line===1?b:0,Qe=D.column+Ae,Rt=`${f.name}:${ie}:${Qe} +`,xt=x.split(/\r\n|[\n\r]/g),ni=xt[y];if(ni.length>120){let Cn=Math.floor(Qe/80),Yu=Qe%80,wt=[];for(let ri=0;ri["|",ri]),["|","^".padStart(Yu)],["|",wt[Cn+1]]])}return Rt+vf([[`${ie-1} |`,xt[y-1]],[`${ie} |`,ni],["|","^".padStart(Qe)],[`${ie+1} |`,xt[y+1]]])}function vf(f){let D=f.filter(([x,y])=>y!==void 0),b=Math.max(...D.map(([x])=>x.length));return D.map(([x,y])=>x.padStart(b)+(y?" "+y:"")).join(` +`)}function yg(f){let D=f[0];return D==null||"kind"in D||"length"in D?{nodes:D,source:f[1],positions:f[2],path:f[3],originalError:f[4],extensions:f[5]}:D}var xg=class K2 extends Error{constructor(D,...b){var x,y,V;let{nodes:ie,source:Ae,positions:Qe,path:Rt,originalError:xt,extensions:ni}=yg(b);super(D),this.name="GraphQLError",this.path=Rt??void 0,this.originalError=xt??void 0,this.nodes=bf(Array.isArray(ie)?ie:ie?[ie]:void 0);let Cn=bf((x=this.nodes)===null||x===void 0?void 0:x.map(wt=>wt.loc).filter(wt=>wt!=null));this.source=Ae??(Cn==null||(y=Cn[0])===null||y===void 0?void 0:y.source),this.positions=Qe??Cn?.map(wt=>wt.start),this.locations=Qe&&Ae?Qe.map(wt=>Hu(Ae,wt)):Cn?.map(wt=>Hu(wt.source,wt.start));let Yu=Dg(xt?.extensions)?xt?.extensions:void 0;this.extensions=(V=ni??Yu)!==null&&V!==void 0?V:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),xt!=null&&xt.stack?Object.defineProperty(this,"stack",{value:xt.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,K2):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let D=this.message;if(this.nodes)for(let b of this.nodes)b.loc&&(D+=` -` + f - ) - } - function sg(f, D, b) { - let { node: x } = f - if (!x.description) return '' - let y = [b('description')] - return x.kind === 'InputValueDefinition' && !x.description.block ? y.push(I) : y.push(L), y - } - var Ln = sg - function og(f, D, b) { - let { node: x } = f - switch (x.kind) { - case 'Document': - return [...A(L, fn(f, D, b, 'definitions')), L] - case 'OperationDefinition': { - let y = D.originalText[df(x)] !== '{', - V = !!x.name - return [ - y ? x.operation : '', - y && V ? [' ', b('name')] : '', - y && !V && Re(x.variableDefinitions) ? ' ' : '', - hf(f, b), - Ft(f, b, x), - !y && !V ? '' : ' ', - b('selectionSet') - ] - } - case 'FragmentDefinition': - return [ - 'fragment ', - b('name'), - hf(f, b), - ' on ', - b('typeCondition'), - Ft(f, b, x), - ' ', - b('selectionSet') - ] - case 'SelectionSet': - return ['{', w([L, A(L, fn(f, D, b, 'selections'))]), L, '}'] - case 'Field': - return C([ - x.alias ? [b('alias'), ': '] : '', - b('name'), - x.arguments.length > 0 - ? C(['(', w([B, A([S('', ', '), B], fn(f, D, b, 'arguments'))]), B, ')']) - : '', - Ft(f, b, x), - x.selectionSet ? ' ' : '', - b('selectionSet') - ]) - case 'Name': - return x.value - case 'StringValue': - if (x.block) { - let y = l(!1, x.value, '"""', String.raw`\"""`).split(` -`) - return ( - y.length === 1 && (y[0] = y[0].trim()), - y.every((V) => V === '') && (y.length = 0), - A(L, ['"""', ...y, '"""']) - ) - } - return [ - '"', - l( - !1, - l(!1, x.value, /["\\]/g, String.raw`\$&`), - ` -`, - String.raw`\n` - ), - '"' - ] - case 'IntValue': - case 'FloatValue': - case 'EnumValue': - return x.value - case 'BooleanValue': - return x.value ? 'true' : 'false' - case 'NullValue': - return 'null' - case 'Variable': - return ['$', b('name')] - case 'ListValue': - return C(['[', w([B, A([S('', ', '), B], f.map(b, 'values'))]), B, ']']) - case 'ObjectValue': { - let y = D.bracketSpacing && x.fields.length > 0 ? ' ' : '' - return C(['{', y, w([B, A([S('', ', '), B], f.map(b, 'fields'))]), B, S('', y), '}']) - } - case 'ObjectField': - case 'Argument': - return [b('name'), ': ', b('value')] - case 'Directive': - return [ - '@', - b('name'), - x.arguments.length > 0 - ? C(['(', w([B, A([S('', ', '), B], fn(f, D, b, 'arguments'))]), B, ')']) - : '' - ] - case 'NamedType': - return b('name') - case 'VariableDefinition': - return [ - b('variable'), - ': ', - b('type'), - x.defaultValue ? [' = ', b('defaultValue')] : '', - Ft(f, b, x) - ] - case 'ObjectTypeExtension': - case 'ObjectTypeDefinition': - case 'InputObjectTypeExtension': - case 'InputObjectTypeDefinition': - case 'InterfaceTypeExtension': - case 'InterfaceTypeDefinition': { - let { kind: y } = x, - V = [] - return ( - y.endsWith('TypeDefinition') ? V.push(Ln(f, D, b)) : V.push('extend '), - y.startsWith('ObjectType') - ? V.push('type') - : y.startsWith('InputObjectType') - ? V.push('input') - : V.push('interface'), - V.push(' ', b('name')), - !y.startsWith('InputObjectType') && - x.interfaces.length > 0 && - V.push(' implements ', ...lg(f, D, b)), - V.push(Ft(f, b, x)), - x.fields.length > 0 && V.push([' {', w([L, A(L, fn(f, D, b, 'fields'))]), L, '}']), - V - ) - } - case 'FieldDefinition': - return [ - Ln(f, D, b), - b('name'), - x.arguments.length > 0 - ? C(['(', w([B, A([S('', ', '), B], fn(f, D, b, 'arguments'))]), B, ')']) - : '', - ': ', - b('type'), - Ft(f, b, x) - ] - case 'DirectiveDefinition': - return [ - Ln(f, D, b), - 'directive ', - '@', - b('name'), - x.arguments.length > 0 - ? C(['(', w([B, A([S('', ', '), B], fn(f, D, b, 'arguments'))]), B, ')']) - : '', - x.repeatable ? ' repeatable' : '', - ' on ', - ...A(' | ', f.map(b, 'locations')) - ] - case 'EnumTypeExtension': - case 'EnumTypeDefinition': - return [ - Ln(f, D, b), - x.kind === 'EnumTypeExtension' ? 'extend ' : '', - 'enum ', - b('name'), - Ft(f, b, x), - x.values.length > 0 ? [' {', w([L, A(L, fn(f, D, b, 'values'))]), L, '}'] : '' - ] - case 'EnumValueDefinition': - return [Ln(f, D, b), b('name'), Ft(f, b, x)] - case 'InputValueDefinition': - return [ - Ln(f, D, b), - b('name'), - ': ', - b('type'), - x.defaultValue ? [' = ', b('defaultValue')] : '', - Ft(f, b, x) - ] - case 'SchemaExtension': - return [ - 'extend schema', - Ft(f, b, x), - ...(x.operationTypes.length > 0 - ? [' {', w([L, A(L, fn(f, D, b, 'operationTypes'))]), L, '}'] - : []) - ] - case 'SchemaDefinition': - return [ - Ln(f, D, b), - 'schema', - Ft(f, b, x), - ' {', - x.operationTypes.length > 0 ? w([L, A(L, fn(f, D, b, 'operationTypes'))]) : '', - L, - '}' - ] - case 'OperationTypeDefinition': - return [x.operation, ': ', b('type')] - case 'FragmentSpread': - return ['...', b('name'), Ft(f, b, x)] - case 'InlineFragment': - return [ - '...', - x.typeCondition ? [' on ', b('typeCondition')] : '', - Ft(f, b, x), - ' ', - b('selectionSet') - ] - case 'UnionTypeExtension': - case 'UnionTypeDefinition': - return C([ - Ln(f, D, b), - C([ - x.kind === 'UnionTypeExtension' ? 'extend ' : '', - 'union ', - b('name'), - Ft(f, b, x), - x.types.length > 0 - ? [' =', S('', ' '), w([S([I, '| ']), A([I, '| '], f.map(b, 'types'))])] - : '' - ]) - ]) - case 'ScalarTypeExtension': - case 'ScalarTypeDefinition': - return [ - Ln(f, D, b), - x.kind === 'ScalarTypeExtension' ? 'extend ' : '', - 'scalar ', - b('name'), - Ft(f, b, x) - ] - case 'NonNullType': - return [b('type'), '!'] - case 'ListType': - return ['[', b('type'), ']'] - default: - throw new Ne(x, 'Graphql', 'kind') - } - } - function Ft(f, D, b) { - if (b.directives.length === 0) return '' - let x = A(I, f.map(D, 'directives')) - return b.kind === 'FragmentDefinition' || b.kind === 'OperationDefinition' - ? C([I, x]) - : [' ', C(w([B, x]))] - } - function fn(f, D, b, x) { - return f.map(({ isLast: y, node: V }) => { - let ie = b() - return !y && G(D.originalText, pf(V)) ? [ie, L] : ie - }, x) - } - function ag(f) { - return f.kind !== 'Comment' - } - function ug(f) { - let D = f.node - if (D.kind === 'Comment') return '#' + D.value.trimEnd() - throw new Error('Not a comment: ' + JSON.stringify(D)) - } - function lg(f, D, b) { - let { node: x } = f, - y = [], - { interfaces: V } = x, - ie = f.map(b, 'interfaces') - for (let Ae = 0; Ae < V.length; Ae++) { - let Qe = V[Ae] - y.push(ie[Ae]) - let Rt = V[Ae + 1] - if (Rt) { - let xt = D.originalText.slice(Qe.loc.end, Rt.loc.start).includes('#') - y.push(' &', xt ? I : ' ') - } - } - return y - } - function hf(f, D) { - let { node: b } = f - return Re(b.variableDefinitions) - ? C(['(', w([B, A([S('', ', '), B], f.map(D, 'variableDefinitions'))]), B, ')']) - : '' - } - function mf(f, D) { - f.kind === 'StringValue' && - f.block && - !f.value.includes(` -`) && - (D.value = f.value.trim()) - } - mf.ignoredProperties = new Set(['loc', 'comments']) - function cg(f) { - var D - let { node: b } = f - return (D = b?.comments) == null - ? void 0 - : D.some((x) => x.value.trim() === 'prettier-ignore') - } - var fg = { - print: og, - massageAstNode: mf, - hasPrettierIgnore: cg, - insertPragma: ig, - printComment: ug, - canAttachComment: ag, - getVisitorKeys: ng - }, - dg = fg, - pg = [ - { - linguistLanguageId: 139, - name: 'GraphQL', - type: 'data', - color: '#e10098', - extensions: ['.graphql', '.gql', '.graphqls'], - tmScope: 'source.graphql', - aceMode: 'text', - parsers: ['graphql'], - vscodeLanguageIds: ['graphql'] - } - ], - hg = { - bracketSpacing: { - category: 'Common', - type: 'boolean', - default: !0, - description: 'Print spaces between brackets.', - oppositeDescription: 'Do not print spaces between brackets.' - }, - singleQuote: { - category: 'Common', - type: 'boolean', - default: !1, - description: 'Use single quotes instead of double quotes.' - }, - proseWrap: { - category: 'Common', - type: 'choice', - default: 'preserve', - description: 'How to wrap prose.', - choices: [ - { value: 'always', description: 'Wrap prose if it exceeds the print width.' }, - { value: 'never', description: 'Do not wrap prose.' }, - { value: 'preserve', description: 'Wrap prose as-is.' } - ] - }, - bracketSameLine: { - category: 'Common', - type: 'boolean', - default: !1, - description: 'Put > of opening tags on the last line instead of on a new line.' - }, - singleAttributePerLine: { - category: 'Common', - type: 'boolean', - default: !1, - description: 'Enforce single attribute per line in HTML, Vue and JSX.' - } - }, - mg = { bracketSpacing: hg.bracketSpacing }, - gg = mg, - gf = {} - i(gf, { graphql: () => Zg }) - function Dg(f) { - return typeof f == 'object' && f !== null - } - function vg(f, D) { - if (!f) throw new Error(D ?? 'Unexpected invariant triggered.') - } - var bg = /\r\n|[\n\r]/g - function Hu(f, D) { - let b = 0, - x = 1 - for (let y of f.body.matchAll(bg)) { - if ((typeof y.index == 'number' || vg(!1), y.index >= D)) break - ;(b = y.index + y[0].length), (x += 1) - } - return { line: x, column: D + 1 - b } - } - function Eg(f) { - return Df(f.source, Hu(f.source, f.start)) - } - function Df(f, D) { - let b = f.locationOffset.column - 1, - x = ''.padStart(b) + f.body, - y = D.line - 1, - V = f.locationOffset.line - 1, - ie = D.line + V, - Ae = D.line === 1 ? b : 0, - Qe = D.column + Ae, - Rt = `${f.name}:${ie}:${Qe} -`, - xt = x.split(/\r\n|[\n\r]/g), - ni = xt[y] - if (ni.length > 120) { - let Cn = Math.floor(Qe / 80), - Yu = Qe % 80, - wt = [] - for (let ri = 0; ri < ni.length; ri += 80) wt.push(ni.slice(ri, ri + 80)) - return ( - Rt + - vf([ - [`${ie} |`, wt[0]], - ...wt.slice(1, Cn + 1).map((ri) => ['|', ri]), - ['|', '^'.padStart(Yu)], - ['|', wt[Cn + 1]] - ]) - ) - } - return ( - Rt + - vf([ - [`${ie - 1} |`, xt[y - 1]], - [`${ie} |`, ni], - ['|', '^'.padStart(Qe)], - [`${ie + 1} |`, xt[y + 1]] - ]) - ) - } - function vf(f) { - let D = f.filter(([x, y]) => y !== void 0), - b = Math.max(...D.map(([x]) => x.length)) - return D.map(([x, y]) => x.padStart(b) + (y ? ' ' + y : '')).join(` -`) - } - function yg(f) { - let D = f[0] - return D == null || 'kind' in D || 'length' in D - ? { - nodes: D, - source: f[1], - positions: f[2], - path: f[3], - originalError: f[4], - extensions: f[5] - } - : D - } - var xg = class K2 extends Error { - constructor(D, ...b) { - var x, y, V - let { - nodes: ie, - source: Ae, - positions: Qe, - path: Rt, - originalError: xt, - extensions: ni - } = yg(b) - super(D), - (this.name = 'GraphQLError'), - (this.path = Rt ?? void 0), - (this.originalError = xt ?? void 0), - (this.nodes = bf(Array.isArray(ie) ? ie : ie ? [ie] : void 0)) - let Cn = bf( - (x = this.nodes) === null || x === void 0 - ? void 0 - : x.map((wt) => wt.loc).filter((wt) => wt != null) - ) - ;(this.source = - Ae ?? (Cn == null || (y = Cn[0]) === null || y === void 0 ? void 0 : y.source)), - (this.positions = Qe ?? Cn?.map((wt) => wt.start)), - (this.locations = - Qe && Ae ? Qe.map((wt) => Hu(Ae, wt)) : Cn?.map((wt) => Hu(wt.source, wt.start))) - let Yu = Dg(xt?.extensions) ? xt?.extensions : void 0 - ;(this.extensions = (V = ni ?? Yu) !== null && V !== void 0 ? V : Object.create(null)), - Object.defineProperties(this, { - message: { writable: !0, enumerable: !0 }, - name: { enumerable: !1 }, - nodes: { enumerable: !1 }, - source: { enumerable: !1 }, - positions: { enumerable: !1 }, - originalError: { enumerable: !1 } - }), - xt != null && xt.stack - ? Object.defineProperty(this, 'stack', { - value: xt.stack, - writable: !0, - configurable: !0 - }) - : Error.captureStackTrace - ? Error.captureStackTrace(this, K2) - : Object.defineProperty(this, 'stack', { - value: Error().stack, - writable: !0, - configurable: !0 - }) - } - get [Symbol.toStringTag]() { - return 'GraphQLError' - } - toString() { - let D = this.message - if (this.nodes) - for (let b of this.nodes) - b.loc && - (D += - ` +`+Eg(b.loc));else if(this.source&&this.locations)for(let b of this.locations)D+=` -` + Eg(b.loc)) - else if (this.source && this.locations) - for (let b of this.locations) - D += - ` - -` + Df(this.source, b) - return D - } - toJSON() { - let D = { message: this.message } - return ( - this.locations != null && (D.locations = this.locations), - this.path != null && (D.path = this.path), - this.extensions != null && - Object.keys(this.extensions).length > 0 && - (D.extensions = this.extensions), - D - ) - } - } - function bf(f) { - return f === void 0 || f.length === 0 ? void 0 : f - } - function ft(f, D, b) { - return new xg(`Syntax Error: ${b}`, { source: f, positions: [D] }) - } - var Wu - ;(function (f) { - ;(f.QUERY = 'QUERY'), - (f.MUTATION = 'MUTATION'), - (f.SUBSCRIPTION = 'SUBSCRIPTION'), - (f.FIELD = 'FIELD'), - (f.FRAGMENT_DEFINITION = 'FRAGMENT_DEFINITION'), - (f.FRAGMENT_SPREAD = 'FRAGMENT_SPREAD'), - (f.INLINE_FRAGMENT = 'INLINE_FRAGMENT'), - (f.VARIABLE_DEFINITION = 'VARIABLE_DEFINITION'), - (f.SCHEMA = 'SCHEMA'), - (f.SCALAR = 'SCALAR'), - (f.OBJECT = 'OBJECT'), - (f.FIELD_DEFINITION = 'FIELD_DEFINITION'), - (f.ARGUMENT_DEFINITION = 'ARGUMENT_DEFINITION'), - (f.INTERFACE = 'INTERFACE'), - (f.UNION = 'UNION'), - (f.ENUM = 'ENUM'), - (f.ENUM_VALUE = 'ENUM_VALUE'), - (f.INPUT_OBJECT = 'INPUT_OBJECT'), - (f.INPUT_FIELD_DEFINITION = 'INPUT_FIELD_DEFINITION') - })(Wu || (Wu = {})) - var ue - ;(function (f) { - ;(f.NAME = 'Name'), - (f.DOCUMENT = 'Document'), - (f.OPERATION_DEFINITION = 'OperationDefinition'), - (f.VARIABLE_DEFINITION = 'VariableDefinition'), - (f.SELECTION_SET = 'SelectionSet'), - (f.FIELD = 'Field'), - (f.ARGUMENT = 'Argument'), - (f.FRAGMENT_SPREAD = 'FragmentSpread'), - (f.INLINE_FRAGMENT = 'InlineFragment'), - (f.FRAGMENT_DEFINITION = 'FragmentDefinition'), - (f.VARIABLE = 'Variable'), - (f.INT = 'IntValue'), - (f.FLOAT = 'FloatValue'), - (f.STRING = 'StringValue'), - (f.BOOLEAN = 'BooleanValue'), - (f.NULL = 'NullValue'), - (f.ENUM = 'EnumValue'), - (f.LIST = 'ListValue'), - (f.OBJECT = 'ObjectValue'), - (f.OBJECT_FIELD = 'ObjectField'), - (f.DIRECTIVE = 'Directive'), - (f.NAMED_TYPE = 'NamedType'), - (f.LIST_TYPE = 'ListType'), - (f.NON_NULL_TYPE = 'NonNullType'), - (f.SCHEMA_DEFINITION = 'SchemaDefinition'), - (f.OPERATION_TYPE_DEFINITION = 'OperationTypeDefinition'), - (f.SCALAR_TYPE_DEFINITION = 'ScalarTypeDefinition'), - (f.OBJECT_TYPE_DEFINITION = 'ObjectTypeDefinition'), - (f.FIELD_DEFINITION = 'FieldDefinition'), - (f.INPUT_VALUE_DEFINITION = 'InputValueDefinition'), - (f.INTERFACE_TYPE_DEFINITION = 'InterfaceTypeDefinition'), - (f.UNION_TYPE_DEFINITION = 'UnionTypeDefinition'), - (f.ENUM_TYPE_DEFINITION = 'EnumTypeDefinition'), - (f.ENUM_VALUE_DEFINITION = 'EnumValueDefinition'), - (f.INPUT_OBJECT_TYPE_DEFINITION = 'InputObjectTypeDefinition'), - (f.DIRECTIVE_DEFINITION = 'DirectiveDefinition'), - (f.SCHEMA_EXTENSION = 'SchemaExtension'), - (f.SCALAR_TYPE_EXTENSION = 'ScalarTypeExtension'), - (f.OBJECT_TYPE_EXTENSION = 'ObjectTypeExtension'), - (f.INTERFACE_TYPE_EXTENSION = 'InterfaceTypeExtension'), - (f.UNION_TYPE_EXTENSION = 'UnionTypeExtension'), - (f.ENUM_TYPE_EXTENSION = 'EnumTypeExtension'), - (f.INPUT_OBJECT_TYPE_EXTENSION = 'InputObjectTypeExtension') - })(ue || (ue = {})) - function _g(f) { - return f === 9 || f === 32 - } - function ps(f) { - return f >= 48 && f <= 57 - } - function Ef(f) { - return (f >= 97 && f <= 122) || (f >= 65 && f <= 90) - } - function yf(f) { - return Ef(f) || f === 95 - } - function Ng(f) { - return Ef(f) || ps(f) || f === 95 - } - function Tg(f) { - var D - let b = Number.MAX_SAFE_INTEGER, - x = null, - y = -1 - for (let ie = 0; ie < f.length; ++ie) { - var V - let Ae = f[ie], - Qe = Sg(Ae) - Qe !== Ae.length && - ((x = (V = x) !== null && V !== void 0 ? V : ie), - (y = ie), - ie !== 0 && Qe < b && (b = Qe)) - } - return f - .map((ie, Ae) => (Ae === 0 ? ie : ie.slice(b))) - .slice((D = x) !== null && D !== void 0 ? D : 0, y + 1) - } - function Sg(f) { - let D = 0 - for (; D < f.length && _g(f.charCodeAt(D)); ) ++D - return D - } - var j - ;(function (f) { - ;(f.SOF = ''), - (f.EOF = ''), - (f.BANG = '!'), - (f.DOLLAR = '$'), - (f.AMP = '&'), - (f.PAREN_L = '('), - (f.PAREN_R = ')'), - (f.SPREAD = '...'), - (f.COLON = ':'), - (f.EQUALS = '='), - (f.AT = '@'), - (f.BRACKET_L = '['), - (f.BRACKET_R = ']'), - (f.BRACE_L = '{'), - (f.PIPE = '|'), - (f.BRACE_R = '}'), - (f.NAME = 'Name'), - (f.INT = 'Int'), - (f.FLOAT = 'Float'), - (f.STRING = 'String'), - (f.BLOCK_STRING = 'BlockString'), - (f.COMMENT = 'Comment') - })(j || (j = {})) - var Ag = class { - constructor(f) { - let D = new cf(j.SOF, 0, 0, 0, 0) - ;(this.source = f), - (this.lastToken = D), - (this.token = D), - (this.line = 1), - (this.lineStart = 0) - } - get [Symbol.toStringTag]() { - return 'Lexer' - } - advance() { - return (this.lastToken = this.token), (this.token = this.lookahead()) - } - lookahead() { - let f = this.token - if (f.kind !== j.EOF) - do - if (f.next) f = f.next - else { - let D = wg(this, f.end) - ;(f.next = D), (D.prev = f), (f = D) - } - while (f.kind === j.COMMENT) - return f - } - } - function Fg(f) { - return ( - f === j.BANG || - f === j.DOLLAR || - f === j.AMP || - f === j.PAREN_L || - f === j.PAREN_R || - f === j.SPREAD || - f === j.COLON || - f === j.EQUALS || - f === j.AT || - f === j.BRACKET_L || - f === j.BRACKET_R || - f === j.BRACE_L || - f === j.PIPE || - f === j.BRACE_R - ) - } - function ti(f) { - return (f >= 0 && f <= 55295) || (f >= 57344 && f <= 1114111) - } - function To(f, D) { - return xf(f.charCodeAt(D)) && _f(f.charCodeAt(D + 1)) - } - function xf(f) { - return f >= 55296 && f <= 56319 - } - function _f(f) { - return f >= 56320 && f <= 57343 - } - function Er(f, D) { - let b = f.source.body.codePointAt(D) - if (b === void 0) return j.EOF - if (b >= 32 && b <= 126) { - let x = String.fromCodePoint(b) - return x === '"' ? `'"'` : `"${x}"` - } - return 'U+' + b.toString(16).toUpperCase().padStart(4, '0') - } - function rt(f, D, b, x, y) { - let V = f.line, - ie = 1 + b - f.lineStart - return new cf(D, b, x, V, ie, y) - } - function wg(f, D) { - let b = f.source.body, - x = b.length, - y = D - for (; y < x; ) { - let V = b.charCodeAt(y) - switch (V) { - case 65279: - case 9: - case 32: - case 44: - ++y - continue - case 10: - ++y, ++f.line, (f.lineStart = y) - continue - case 13: - b.charCodeAt(y + 1) === 10 ? (y += 2) : ++y, ++f.line, (f.lineStart = y) - continue - case 35: - return Lg(f, y) - case 33: - return rt(f, j.BANG, y, y + 1) - case 36: - return rt(f, j.DOLLAR, y, y + 1) - case 38: - return rt(f, j.AMP, y, y + 1) - case 40: - return rt(f, j.PAREN_L, y, y + 1) - case 41: - return rt(f, j.PAREN_R, y, y + 1) - case 46: - if (b.charCodeAt(y + 1) === 46 && b.charCodeAt(y + 2) === 46) - return rt(f, j.SPREAD, y, y + 3) - break - case 58: - return rt(f, j.COLON, y, y + 1) - case 61: - return rt(f, j.EQUALS, y, y + 1) - case 64: - return rt(f, j.AT, y, y + 1) - case 91: - return rt(f, j.BRACKET_L, y, y + 1) - case 93: - return rt(f, j.BRACKET_R, y, y + 1) - case 123: - return rt(f, j.BRACE_L, y, y + 1) - case 124: - return rt(f, j.PIPE, y, y + 1) - case 125: - return rt(f, j.BRACE_R, y, y + 1) - case 34: - return b.charCodeAt(y + 1) === 34 && b.charCodeAt(y + 2) === 34 ? Mg(f, y) : Ig(f, y) - } - if (ps(V) || V === 45) return Cg(f, y, V) - if (yf(V)) return Pg(f, y) - throw ft( - f.source, - y, - V === 39 - ? `Unexpected single quote character ('), did you mean to use a double quote (")?` - : ti(V) || To(b, y) - ? `Unexpected character: ${Er(f, y)}.` - : `Invalid character: ${Er(f, y)}.` - ) - } - return rt(f, j.EOF, x, x) - } - function Lg(f, D) { - let b = f.source.body, - x = b.length, - y = D + 1 - for (; y < x; ) { - let V = b.charCodeAt(y) - if (V === 10 || V === 13) break - if (ti(V)) ++y - else if (To(b, y)) y += 2 - else break - } - return rt(f, j.COMMENT, D, y, b.slice(D + 1, y)) - } - function Cg(f, D, b) { - let x = f.source.body, - y = D, - V = b, - ie = !1 - if ((V === 45 && (V = x.charCodeAt(++y)), V === 48)) { - if (((V = x.charCodeAt(++y)), ps(V))) - throw ft(f.source, y, `Invalid number, unexpected digit after 0: ${Er(f, y)}.`) - } else (y = Qu(f, y, V)), (V = x.charCodeAt(y)) - if ( - (V === 46 && - ((ie = !0), (V = x.charCodeAt(++y)), (y = Qu(f, y, V)), (V = x.charCodeAt(y))), - (V === 69 || V === 101) && - ((ie = !0), - (V = x.charCodeAt(++y)), - (V === 43 || V === 45) && (V = x.charCodeAt(++y)), - (y = Qu(f, y, V)), - (V = x.charCodeAt(y))), - V === 46 || yf(V)) - ) - throw ft(f.source, y, `Invalid number, expected digit but got: ${Er(f, y)}.`) - return rt(f, ie ? j.FLOAT : j.INT, D, y, x.slice(D, y)) - } - function Qu(f, D, b) { - if (!ps(b)) throw ft(f.source, D, `Invalid number, expected digit but got: ${Er(f, D)}.`) - let x = f.source.body, - y = D + 1 - for (; ps(x.charCodeAt(y)); ) ++y - return y - } - function Ig(f, D) { - let b = f.source.body, - x = b.length, - y = D + 1, - V = y, - ie = '' - for (; y < x; ) { - let Ae = b.charCodeAt(y) - if (Ae === 34) return (ie += b.slice(V, y)), rt(f, j.STRING, D, y + 1, ie) - if (Ae === 92) { - ie += b.slice(V, y) - let Qe = - b.charCodeAt(y + 1) === 117 - ? b.charCodeAt(y + 2) === 123 - ? Rg(f, y) - : kg(f, y) - : Og(f, y) - ;(ie += Qe.value), (y += Qe.size), (V = y) - continue - } - if (Ae === 10 || Ae === 13) break - if (ti(Ae)) ++y - else if (To(b, y)) y += 2 - else throw ft(f.source, y, `Invalid character within String: ${Er(f, y)}.`) - } - throw ft(f.source, y, 'Unterminated string.') - } - function Rg(f, D) { - let b = f.source.body, - x = 0, - y = 3 - for (; y < 12; ) { - let V = b.charCodeAt(D + y++) - if (V === 125) { - if (y < 5 || !ti(x)) break - return { value: String.fromCodePoint(x), size: y } - } - if (((x = (x << 4) | hs(V)), x < 0)) break - } - throw ft(f.source, D, `Invalid Unicode escape sequence: "${b.slice(D, D + y)}".`) - } - function kg(f, D) { - let b = f.source.body, - x = Nf(b, D + 2) - if (ti(x)) return { value: String.fromCodePoint(x), size: 6 } - if (xf(x) && b.charCodeAt(D + 6) === 92 && b.charCodeAt(D + 7) === 117) { - let y = Nf(b, D + 8) - if (_f(y)) return { value: String.fromCodePoint(x, y), size: 12 } - } - throw ft(f.source, D, `Invalid Unicode escape sequence: "${b.slice(D, D + 6)}".`) - } - function Nf(f, D) { - return ( - (hs(f.charCodeAt(D)) << 12) | - (hs(f.charCodeAt(D + 1)) << 8) | - (hs(f.charCodeAt(D + 2)) << 4) | - hs(f.charCodeAt(D + 3)) - ) - } - function hs(f) { - return f >= 48 && f <= 57 - ? f - 48 - : f >= 65 && f <= 70 - ? f - 55 - : f >= 97 && f <= 102 - ? f - 87 - : -1 - } - function Og(f, D) { - let b = f.source.body - switch (b.charCodeAt(D + 1)) { - case 34: - return { value: '"', size: 2 } - case 92: - return { value: '\\', size: 2 } - case 47: - return { value: '/', size: 2 } - case 98: - return { value: '\b', size: 2 } - case 102: - return { value: '\f', size: 2 } - case 110: - return { - value: ` -`, - size: 2 - } - case 114: - return { value: '\r', size: 2 } - case 116: - return { value: ' ', size: 2 } - } - throw ft(f.source, D, `Invalid character escape sequence: "${b.slice(D, D + 2)}".`) - } - function Mg(f, D) { - let b = f.source.body, - x = b.length, - y = f.lineStart, - V = D + 3, - ie = V, - Ae = '', - Qe = [] - for (; V < x; ) { - let Rt = b.charCodeAt(V) - if (Rt === 34 && b.charCodeAt(V + 1) === 34 && b.charCodeAt(V + 2) === 34) { - ;(Ae += b.slice(ie, V)), Qe.push(Ae) - let xt = rt( - f, - j.BLOCK_STRING, - D, - V + 3, - Tg(Qe).join(` -`) - ) - return (f.line += Qe.length - 1), (f.lineStart = y), xt - } - if ( - Rt === 92 && - b.charCodeAt(V + 1) === 34 && - b.charCodeAt(V + 2) === 34 && - b.charCodeAt(V + 3) === 34 - ) { - ;(Ae += b.slice(ie, V)), (ie = V + 1), (V += 4) - continue - } - if (Rt === 10 || Rt === 13) { - ;(Ae += b.slice(ie, V)), - Qe.push(Ae), - Rt === 13 && b.charCodeAt(V + 1) === 10 ? (V += 2) : ++V, - (Ae = ''), - (ie = V), - (y = V) - continue - } - if (ti(Rt)) ++V - else if (To(b, V)) V += 2 - else throw ft(f.source, V, `Invalid character within String: ${Er(f, V)}.`) - } - throw ft(f.source, V, 'Unterminated string.') - } - function Pg(f, D) { - let b = f.source.body, - x = b.length, - y = D + 1 - for (; y < x; ) { - let V = b.charCodeAt(y) - if (Ng(V)) ++y - else break - } - return rt(f, j.NAME, D, y, b.slice(D, y)) - } - function zu(f, D) { - if (!f) throw new Error(D) - } - function Tf(f) { - return So(f, []) - } - function So(f, D) { - switch (typeof f) { - case 'string': - return JSON.stringify(f) - case 'function': - return f.name ? `[function ${f.name}]` : '[function]' - case 'object': - return Bg(f, D) - default: - return String(f) - } - } - function Bg(f, D) { - if (f === null) return 'null' - if (D.includes(f)) return '[Circular]' - let b = [...D, f] - if (Vg(f)) { - let x = f.toJSON() - if (x !== f) return typeof x == 'string' ? x : So(x, b) - } else if (Array.isArray(f)) return $g(f, b) - return Ug(f, b) - } - function Vg(f) { - return typeof f.toJSON == 'function' - } - function Ug(f, D) { - let b = Object.entries(f) - return b.length === 0 - ? '{}' - : D.length > 2 - ? '[' + jg(f) + ']' - : '{ ' + b.map(([x, y]) => x + ': ' + So(y, D)).join(', ') + ' }' - } - function $g(f, D) { - if (f.length === 0) return '[]' - if (D.length > 2) return '[Array]' - let b = Math.min(10, f.length), - x = f.length - b, - y = [] - for (let V = 0; V < b; ++V) y.push(So(f[V], D)) - return ( - x === 1 ? y.push('... 1 more item') : x > 1 && y.push(`... ${x} more items`), - '[' + y.join(', ') + ']' - ) - } - function jg(f) { - let D = Object.prototype.toString - .call(f) - .replace(/^\[object /, '') - .replace(/]$/, '') - if (D === 'Object' && typeof f.constructor == 'function') { - let b = f.constructor.name - if (typeof b == 'string' && b !== '') return b - } - return D - } - var qg = - globalThis.process && globalThis.process.env.NODE_ENV === 'production' - ? function (f, D) { - return f instanceof D - } - : function (f, D) { - if (f instanceof D) return !0 - if (typeof f == 'object' && f !== null) { - var b - let x = D.prototype[Symbol.toStringTag], - y = - Symbol.toStringTag in f - ? f[Symbol.toStringTag] - : (b = f.constructor) === null || b === void 0 - ? void 0 - : b.name - if (x === y) { - let V = Tf(f) - throw new Error(`Cannot use ${x} "${V}" from another module or realm. +`+Df(this.source,b);return D}toJSON(){let D={message:this.message};return this.locations!=null&&(D.locations=this.locations),this.path!=null&&(D.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(D.extensions=this.extensions),D}};function bf(f){return f===void 0||f.length===0?void 0:f}function ft(f,D,b){return new xg(`Syntax Error: ${b}`,{source:f,positions:[D]})}var Wu;(function(f){f.QUERY="QUERY",f.MUTATION="MUTATION",f.SUBSCRIPTION="SUBSCRIPTION",f.FIELD="FIELD",f.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",f.FRAGMENT_SPREAD="FRAGMENT_SPREAD",f.INLINE_FRAGMENT="INLINE_FRAGMENT",f.VARIABLE_DEFINITION="VARIABLE_DEFINITION",f.SCHEMA="SCHEMA",f.SCALAR="SCALAR",f.OBJECT="OBJECT",f.FIELD_DEFINITION="FIELD_DEFINITION",f.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",f.INTERFACE="INTERFACE",f.UNION="UNION",f.ENUM="ENUM",f.ENUM_VALUE="ENUM_VALUE",f.INPUT_OBJECT="INPUT_OBJECT",f.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Wu||(Wu={}));var ue;(function(f){f.NAME="Name",f.DOCUMENT="Document",f.OPERATION_DEFINITION="OperationDefinition",f.VARIABLE_DEFINITION="VariableDefinition",f.SELECTION_SET="SelectionSet",f.FIELD="Field",f.ARGUMENT="Argument",f.FRAGMENT_SPREAD="FragmentSpread",f.INLINE_FRAGMENT="InlineFragment",f.FRAGMENT_DEFINITION="FragmentDefinition",f.VARIABLE="Variable",f.INT="IntValue",f.FLOAT="FloatValue",f.STRING="StringValue",f.BOOLEAN="BooleanValue",f.NULL="NullValue",f.ENUM="EnumValue",f.LIST="ListValue",f.OBJECT="ObjectValue",f.OBJECT_FIELD="ObjectField",f.DIRECTIVE="Directive",f.NAMED_TYPE="NamedType",f.LIST_TYPE="ListType",f.NON_NULL_TYPE="NonNullType",f.SCHEMA_DEFINITION="SchemaDefinition",f.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",f.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",f.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",f.FIELD_DEFINITION="FieldDefinition",f.INPUT_VALUE_DEFINITION="InputValueDefinition",f.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",f.UNION_TYPE_DEFINITION="UnionTypeDefinition",f.ENUM_TYPE_DEFINITION="EnumTypeDefinition",f.ENUM_VALUE_DEFINITION="EnumValueDefinition",f.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",f.DIRECTIVE_DEFINITION="DirectiveDefinition",f.SCHEMA_EXTENSION="SchemaExtension",f.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",f.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",f.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",f.UNION_TYPE_EXTENSION="UnionTypeExtension",f.ENUM_TYPE_EXTENSION="EnumTypeExtension",f.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(ue||(ue={}));function _g(f){return f===9||f===32}function ps(f){return f>=48&&f<=57}function Ef(f){return f>=97&&f<=122||f>=65&&f<=90}function yf(f){return Ef(f)||f===95}function Ng(f){return Ef(f)||ps(f)||f===95}function Tg(f){var D;let b=Number.MAX_SAFE_INTEGER,x=null,y=-1;for(let ie=0;ieAe===0?ie:ie.slice(b)).slice((D=x)!==null&&D!==void 0?D:0,y+1)}function Sg(f){let D=0;for(;D=0&&f<=55295||f>=57344&&f<=1114111}function To(f,D){return xf(f.charCodeAt(D))&&_f(f.charCodeAt(D+1))}function xf(f){return f>=55296&&f<=56319}function _f(f){return f>=56320&&f<=57343}function Er(f,D){let b=f.source.body.codePointAt(D);if(b===void 0)return j.EOF;if(b>=32&&b<=126){let x=String.fromCodePoint(b);return x==='"'?`'"'`:`"${x}"`}return"U+"+b.toString(16).toUpperCase().padStart(4,"0")}function rt(f,D,b,x,y){let V=f.line,ie=1+b-f.lineStart;return new cf(D,b,x,V,ie,y)}function wg(f,D){let b=f.source.body,x=b.length,y=D;for(;y=48&&f<=57?f-48:f>=65&&f<=70?f-55:f>=97&&f<=102?f-87:-1}function Og(f,D){let b=f.source.body;switch(b.charCodeAt(D+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ft(f.source,D,`Invalid character escape sequence: "${b.slice(D,D+2)}".`)}function Mg(f,D){let b=f.source.body,x=b.length,y=f.lineStart,V=D+3,ie=V,Ae="",Qe=[];for(;V2?"["+jg(f)+"]":"{ "+b.map(([x,y])=>x+": "+So(y,D)).join(", ")+" }"}function $g(f,D){if(f.length===0)return"[]";if(D.length>2)return"[Array]";let b=Math.min(10,f.length),x=f.length-b,y=[];for(let V=0;V1&&y.push(`... ${x} more items`),"["+y.join(", ")+"]"}function jg(f){let D=Object.prototype.toString.call(f).replace(/^\[object /,"").replace(/]$/,"");if(D==="Object"&&typeof f.constructor=="function"){let b=f.constructor.name;if(typeof b=="string"&&b!=="")return b}return D}var qg=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(f,D){return f instanceof D}:function(f,D){if(f instanceof D)return!0;if(typeof f=="object"&&f!==null){var b;let x=D.prototype[Symbol.toStringTag],y=Symbol.toStringTag in f?f[Symbol.toStringTag]:(b=f.constructor)===null||b===void 0?void 0:b.name;if(x===y){let V=Tf(f);throw new Error(`Cannot use ${x} "${V}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -6256,11727 +59,32 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`) - } - } - return !1 - }, - Sf = class { - constructor(f, D = 'GraphQL request', b = { line: 1, column: 1 }) { - typeof f == 'string' || zu(!1, `Body must be a string. Received: ${Tf(f)}.`), - (this.body = f), - (this.name = D), - (this.locationOffset = b), - this.locationOffset.line > 0 || - zu(!1, 'line in locationOffset is 1-indexed and must be positive.'), - this.locationOffset.column > 0 || - zu(!1, 'column in locationOffset is 1-indexed and must be positive.') - } - get [Symbol.toStringTag]() { - return 'Source' - } - } - function Gg(f) { - return qg(f, Sf) - } - function Hg(f, D) { - return new Wg(f, D).parseDocument() - } - var Wg = class { - constructor(f, D = {}) { - let b = Gg(f) ? f : new Sf(f) - ;(this._lexer = new Ag(b)), (this._options = D), (this._tokenCounter = 0) - } - parseName() { - let f = this.expectToken(j.NAME) - return this.node(f, { kind: ue.NAME, value: f.value }) - } - parseDocument() { - return this.node(this._lexer.token, { - kind: ue.DOCUMENT, - definitions: this.many(j.SOF, this.parseDefinition, j.EOF) - }) - } - parseDefinition() { - if (this.peek(j.BRACE_L)) return this.parseOperationDefinition() - let f = this.peekDescription(), - D = f ? this._lexer.lookahead() : this._lexer.token - if (D.kind === j.NAME) { - switch (D.value) { - case 'schema': - return this.parseSchemaDefinition() - case 'scalar': - return this.parseScalarTypeDefinition() - case 'type': - return this.parseObjectTypeDefinition() - case 'interface': - return this.parseInterfaceTypeDefinition() - case 'union': - return this.parseUnionTypeDefinition() - case 'enum': - return this.parseEnumTypeDefinition() - case 'input': - return this.parseInputObjectTypeDefinition() - case 'directive': - return this.parseDirectiveDefinition() - } - if (f) - throw ft( - this._lexer.source, - this._lexer.token.start, - 'Unexpected description, descriptions are supported only on type definitions.' - ) - switch (D.value) { - case 'query': - case 'mutation': - case 'subscription': - return this.parseOperationDefinition() - case 'fragment': - return this.parseFragmentDefinition() - case 'extend': - return this.parseTypeSystemExtension() - } - } - throw this.unexpected(D) - } - parseOperationDefinition() { - let f = this._lexer.token - if (this.peek(j.BRACE_L)) - return this.node(f, { - kind: ue.OPERATION_DEFINITION, - operation: ei.QUERY, - name: void 0, - variableDefinitions: [], - directives: [], - selectionSet: this.parseSelectionSet() - }) - let D = this.parseOperationType(), - b - return ( - this.peek(j.NAME) && (b = this.parseName()), - this.node(f, { - kind: ue.OPERATION_DEFINITION, - operation: D, - name: b, - variableDefinitions: this.parseVariableDefinitions(), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - ) - } - parseOperationType() { - let f = this.expectToken(j.NAME) - switch (f.value) { - case 'query': - return ei.QUERY - case 'mutation': - return ei.MUTATION - case 'subscription': - return ei.SUBSCRIPTION - } - throw this.unexpected(f) - } - parseVariableDefinitions() { - return this.optionalMany(j.PAREN_L, this.parseVariableDefinition, j.PAREN_R) - } - parseVariableDefinition() { - return this.node(this._lexer.token, { - kind: ue.VARIABLE_DEFINITION, - variable: this.parseVariable(), - type: (this.expectToken(j.COLON), this.parseTypeReference()), - defaultValue: this.expectOptionalToken(j.EQUALS) - ? this.parseConstValueLiteral() - : void 0, - directives: this.parseConstDirectives() - }) - } - parseVariable() { - let f = this._lexer.token - return ( - this.expectToken(j.DOLLAR), this.node(f, { kind: ue.VARIABLE, name: this.parseName() }) - ) - } - parseSelectionSet() { - return this.node(this._lexer.token, { - kind: ue.SELECTION_SET, - selections: this.many(j.BRACE_L, this.parseSelection, j.BRACE_R) - }) - } - parseSelection() { - return this.peek(j.SPREAD) ? this.parseFragment() : this.parseField() - } - parseField() { - let f = this._lexer.token, - D = this.parseName(), - b, - x - return ( - this.expectOptionalToken(j.COLON) ? ((b = D), (x = this.parseName())) : (x = D), - this.node(f, { - kind: ue.FIELD, - alias: b, - name: x, - arguments: this.parseArguments(!1), - directives: this.parseDirectives(!1), - selectionSet: this.peek(j.BRACE_L) ? this.parseSelectionSet() : void 0 - }) - ) - } - parseArguments(f) { - let D = f ? this.parseConstArgument : this.parseArgument - return this.optionalMany(j.PAREN_L, D, j.PAREN_R) - } - parseArgument(f = !1) { - let D = this._lexer.token, - b = this.parseName() - return ( - this.expectToken(j.COLON), - this.node(D, { kind: ue.ARGUMENT, name: b, value: this.parseValueLiteral(f) }) - ) - } - parseConstArgument() { - return this.parseArgument(!0) - } - parseFragment() { - let f = this._lexer.token - this.expectToken(j.SPREAD) - let D = this.expectOptionalKeyword('on') - return !D && this.peek(j.NAME) - ? this.node(f, { - kind: ue.FRAGMENT_SPREAD, - name: this.parseFragmentName(), - directives: this.parseDirectives(!1) - }) - : this.node(f, { - kind: ue.INLINE_FRAGMENT, - typeCondition: D ? this.parseNamedType() : void 0, - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - } - parseFragmentDefinition() { - let f = this._lexer.token - return ( - this.expectKeyword('fragment'), - this._options.allowLegacyFragmentVariables === !0 - ? this.node(f, { - kind: ue.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - variableDefinitions: this.parseVariableDefinitions(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - : this.node(f, { - kind: ue.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - ) - } - parseFragmentName() { - if (this._lexer.token.value === 'on') throw this.unexpected() - return this.parseName() - } - parseValueLiteral(f) { - let D = this._lexer.token - switch (D.kind) { - case j.BRACKET_L: - return this.parseList(f) - case j.BRACE_L: - return this.parseObject(f) - case j.INT: - return this.advanceLexer(), this.node(D, { kind: ue.INT, value: D.value }) - case j.FLOAT: - return this.advanceLexer(), this.node(D, { kind: ue.FLOAT, value: D.value }) - case j.STRING: - case j.BLOCK_STRING: - return this.parseStringLiteral() - case j.NAME: - switch ((this.advanceLexer(), D.value)) { - case 'true': - return this.node(D, { kind: ue.BOOLEAN, value: !0 }) - case 'false': - return this.node(D, { kind: ue.BOOLEAN, value: !1 }) - case 'null': - return this.node(D, { kind: ue.NULL }) - default: - return this.node(D, { kind: ue.ENUM, value: D.value }) - } - case j.DOLLAR: - if (f) - if ((this.expectToken(j.DOLLAR), this._lexer.token.kind === j.NAME)) { - let b = this._lexer.token.value - throw ft( - this._lexer.source, - D.start, - `Unexpected variable "$${b}" in constant value.` - ) - } else throw this.unexpected(D) - return this.parseVariable() - default: - throw this.unexpected() - } - } - parseConstValueLiteral() { - return this.parseValueLiteral(!0) - } - parseStringLiteral() { - let f = this._lexer.token - return ( - this.advanceLexer(), - this.node(f, { kind: ue.STRING, value: f.value, block: f.kind === j.BLOCK_STRING }) - ) - } - parseList(f) { - let D = () => this.parseValueLiteral(f) - return this.node(this._lexer.token, { - kind: ue.LIST, - values: this.any(j.BRACKET_L, D, j.BRACKET_R) - }) - } - parseObject(f) { - let D = () => this.parseObjectField(f) - return this.node(this._lexer.token, { - kind: ue.OBJECT, - fields: this.any(j.BRACE_L, D, j.BRACE_R) - }) - } - parseObjectField(f) { - let D = this._lexer.token, - b = this.parseName() - return ( - this.expectToken(j.COLON), - this.node(D, { kind: ue.OBJECT_FIELD, name: b, value: this.parseValueLiteral(f) }) - ) - } - parseDirectives(f) { - let D = [] - for (; this.peek(j.AT); ) D.push(this.parseDirective(f)) - return D - } - parseConstDirectives() { - return this.parseDirectives(!0) - } - parseDirective(f) { - let D = this._lexer.token - return ( - this.expectToken(j.AT), - this.node(D, { - kind: ue.DIRECTIVE, - name: this.parseName(), - arguments: this.parseArguments(f) - }) - ) - } - parseTypeReference() { - let f = this._lexer.token, - D - if (this.expectOptionalToken(j.BRACKET_L)) { - let b = this.parseTypeReference() - this.expectToken(j.BRACKET_R), (D = this.node(f, { kind: ue.LIST_TYPE, type: b })) - } else D = this.parseNamedType() - return this.expectOptionalToken(j.BANG) - ? this.node(f, { kind: ue.NON_NULL_TYPE, type: D }) - : D - } - parseNamedType() { - return this.node(this._lexer.token, { kind: ue.NAMED_TYPE, name: this.parseName() }) - } - peekDescription() { - return this.peek(j.STRING) || this.peek(j.BLOCK_STRING) - } - parseDescription() { - if (this.peekDescription()) return this.parseStringLiteral() - } - parseSchemaDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('schema') - let b = this.parseConstDirectives(), - x = this.many(j.BRACE_L, this.parseOperationTypeDefinition, j.BRACE_R) - return this.node(f, { - kind: ue.SCHEMA_DEFINITION, - description: D, - directives: b, - operationTypes: x - }) - } - parseOperationTypeDefinition() { - let f = this._lexer.token, - D = this.parseOperationType() - this.expectToken(j.COLON) - let b = this.parseNamedType() - return this.node(f, { kind: ue.OPERATION_TYPE_DEFINITION, operation: D, type: b }) - } - parseScalarTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('scalar') - let b = this.parseName(), - x = this.parseConstDirectives() - return this.node(f, { - kind: ue.SCALAR_TYPE_DEFINITION, - description: D, - name: b, - directives: x - }) - } - parseObjectTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('type') - let b = this.parseName(), - x = this.parseImplementsInterfaces(), - y = this.parseConstDirectives(), - V = this.parseFieldsDefinition() - return this.node(f, { - kind: ue.OBJECT_TYPE_DEFINITION, - description: D, - name: b, - interfaces: x, - directives: y, - fields: V - }) - } - parseImplementsInterfaces() { - return this.expectOptionalKeyword('implements') - ? this.delimitedMany(j.AMP, this.parseNamedType) - : [] - } - parseFieldsDefinition() { - return this.optionalMany(j.BRACE_L, this.parseFieldDefinition, j.BRACE_R) - } - parseFieldDefinition() { - let f = this._lexer.token, - D = this.parseDescription(), - b = this.parseName(), - x = this.parseArgumentDefs() - this.expectToken(j.COLON) - let y = this.parseTypeReference(), - V = this.parseConstDirectives() - return this.node(f, { - kind: ue.FIELD_DEFINITION, - description: D, - name: b, - arguments: x, - type: y, - directives: V - }) - } - parseArgumentDefs() { - return this.optionalMany(j.PAREN_L, this.parseInputValueDef, j.PAREN_R) - } - parseInputValueDef() { - let f = this._lexer.token, - D = this.parseDescription(), - b = this.parseName() - this.expectToken(j.COLON) - let x = this.parseTypeReference(), - y - this.expectOptionalToken(j.EQUALS) && (y = this.parseConstValueLiteral()) - let V = this.parseConstDirectives() - return this.node(f, { - kind: ue.INPUT_VALUE_DEFINITION, - description: D, - name: b, - type: x, - defaultValue: y, - directives: V - }) - } - parseInterfaceTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('interface') - let b = this.parseName(), - x = this.parseImplementsInterfaces(), - y = this.parseConstDirectives(), - V = this.parseFieldsDefinition() - return this.node(f, { - kind: ue.INTERFACE_TYPE_DEFINITION, - description: D, - name: b, - interfaces: x, - directives: y, - fields: V - }) - } - parseUnionTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('union') - let b = this.parseName(), - x = this.parseConstDirectives(), - y = this.parseUnionMemberTypes() - return this.node(f, { - kind: ue.UNION_TYPE_DEFINITION, - description: D, - name: b, - directives: x, - types: y - }) - } - parseUnionMemberTypes() { - return this.expectOptionalToken(j.EQUALS) - ? this.delimitedMany(j.PIPE, this.parseNamedType) - : [] - } - parseEnumTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('enum') - let b = this.parseName(), - x = this.parseConstDirectives(), - y = this.parseEnumValuesDefinition() - return this.node(f, { - kind: ue.ENUM_TYPE_DEFINITION, - description: D, - name: b, - directives: x, - values: y - }) - } - parseEnumValuesDefinition() { - return this.optionalMany(j.BRACE_L, this.parseEnumValueDefinition, j.BRACE_R) - } - parseEnumValueDefinition() { - let f = this._lexer.token, - D = this.parseDescription(), - b = this.parseEnumValueName(), - x = this.parseConstDirectives() - return this.node(f, { - kind: ue.ENUM_VALUE_DEFINITION, - description: D, - name: b, - directives: x - }) - } - parseEnumValueName() { - if ( - this._lexer.token.value === 'true' || - this._lexer.token.value === 'false' || - this._lexer.token.value === 'null' - ) - throw ft( - this._lexer.source, - this._lexer.token.start, - `${Ao(this._lexer.token)} is reserved and cannot be used for an enum value.` - ) - return this.parseName() - } - parseInputObjectTypeDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('input') - let b = this.parseName(), - x = this.parseConstDirectives(), - y = this.parseInputFieldsDefinition() - return this.node(f, { - kind: ue.INPUT_OBJECT_TYPE_DEFINITION, - description: D, - name: b, - directives: x, - fields: y - }) - } - parseInputFieldsDefinition() { - return this.optionalMany(j.BRACE_L, this.parseInputValueDef, j.BRACE_R) - } - parseTypeSystemExtension() { - let f = this._lexer.lookahead() - if (f.kind === j.NAME) - switch (f.value) { - case 'schema': - return this.parseSchemaExtension() - case 'scalar': - return this.parseScalarTypeExtension() - case 'type': - return this.parseObjectTypeExtension() - case 'interface': - return this.parseInterfaceTypeExtension() - case 'union': - return this.parseUnionTypeExtension() - case 'enum': - return this.parseEnumTypeExtension() - case 'input': - return this.parseInputObjectTypeExtension() - } - throw this.unexpected(f) - } - parseSchemaExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('schema') - let D = this.parseConstDirectives(), - b = this.optionalMany(j.BRACE_L, this.parseOperationTypeDefinition, j.BRACE_R) - if (D.length === 0 && b.length === 0) throw this.unexpected() - return this.node(f, { kind: ue.SCHEMA_EXTENSION, directives: D, operationTypes: b }) - } - parseScalarTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('scalar') - let D = this.parseName(), - b = this.parseConstDirectives() - if (b.length === 0) throw this.unexpected() - return this.node(f, { kind: ue.SCALAR_TYPE_EXTENSION, name: D, directives: b }) - } - parseObjectTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('type') - let D = this.parseName(), - b = this.parseImplementsInterfaces(), - x = this.parseConstDirectives(), - y = this.parseFieldsDefinition() - if (b.length === 0 && x.length === 0 && y.length === 0) throw this.unexpected() - return this.node(f, { - kind: ue.OBJECT_TYPE_EXTENSION, - name: D, - interfaces: b, - directives: x, - fields: y - }) - } - parseInterfaceTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('interface') - let D = this.parseName(), - b = this.parseImplementsInterfaces(), - x = this.parseConstDirectives(), - y = this.parseFieldsDefinition() - if (b.length === 0 && x.length === 0 && y.length === 0) throw this.unexpected() - return this.node(f, { - kind: ue.INTERFACE_TYPE_EXTENSION, - name: D, - interfaces: b, - directives: x, - fields: y - }) - } - parseUnionTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('union') - let D = this.parseName(), - b = this.parseConstDirectives(), - x = this.parseUnionMemberTypes() - if (b.length === 0 && x.length === 0) throw this.unexpected() - return this.node(f, { kind: ue.UNION_TYPE_EXTENSION, name: D, directives: b, types: x }) - } - parseEnumTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('enum') - let D = this.parseName(), - b = this.parseConstDirectives(), - x = this.parseEnumValuesDefinition() - if (b.length === 0 && x.length === 0) throw this.unexpected() - return this.node(f, { kind: ue.ENUM_TYPE_EXTENSION, name: D, directives: b, values: x }) - } - parseInputObjectTypeExtension() { - let f = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('input') - let D = this.parseName(), - b = this.parseConstDirectives(), - x = this.parseInputFieldsDefinition() - if (b.length === 0 && x.length === 0) throw this.unexpected() - return this.node(f, { - kind: ue.INPUT_OBJECT_TYPE_EXTENSION, - name: D, - directives: b, - fields: x - }) - } - parseDirectiveDefinition() { - let f = this._lexer.token, - D = this.parseDescription() - this.expectKeyword('directive'), this.expectToken(j.AT) - let b = this.parseName(), - x = this.parseArgumentDefs(), - y = this.expectOptionalKeyword('repeatable') - this.expectKeyword('on') - let V = this.parseDirectiveLocations() - return this.node(f, { - kind: ue.DIRECTIVE_DEFINITION, - description: D, - name: b, - arguments: x, - repeatable: y, - locations: V - }) - } - parseDirectiveLocations() { - return this.delimitedMany(j.PIPE, this.parseDirectiveLocation) - } - parseDirectiveLocation() { - let f = this._lexer.token, - D = this.parseName() - if (Object.prototype.hasOwnProperty.call(Wu, D.value)) return D - throw this.unexpected(f) - } - node(f, D) { - return ( - this._options.noLocation !== !0 && - (D.loc = new Zr(f, this._lexer.lastToken, this._lexer.source)), - D - ) - } - peek(f) { - return this._lexer.token.kind === f - } - expectToken(f) { - let D = this._lexer.token - if (D.kind === f) return this.advanceLexer(), D - throw ft(this._lexer.source, D.start, `Expected ${Af(f)}, found ${Ao(D)}.`) - } - expectOptionalToken(f) { - return this._lexer.token.kind === f ? (this.advanceLexer(), !0) : !1 - } - expectKeyword(f) { - let D = this._lexer.token - if (D.kind === j.NAME && D.value === f) this.advanceLexer() - else throw ft(this._lexer.source, D.start, `Expected "${f}", found ${Ao(D)}.`) - } - expectOptionalKeyword(f) { - let D = this._lexer.token - return D.kind === j.NAME && D.value === f ? (this.advanceLexer(), !0) : !1 - } - unexpected(f) { - let D = f ?? this._lexer.token - return ft(this._lexer.source, D.start, `Unexpected ${Ao(D)}.`) - } - any(f, D, b) { - this.expectToken(f) - let x = [] - for (; !this.expectOptionalToken(b); ) x.push(D.call(this)) - return x - } - optionalMany(f, D, b) { - if (this.expectOptionalToken(f)) { - let x = [] - do x.push(D.call(this)) - while (!this.expectOptionalToken(b)) - return x - } - return [] - } - many(f, D, b) { - this.expectToken(f) - let x = [] - do x.push(D.call(this)) - while (!this.expectOptionalToken(b)) - return x - } - delimitedMany(f, D) { - this.expectOptionalToken(f) - let b = [] - do b.push(D.call(this)) - while (this.expectOptionalToken(f)) - return b - } - advanceLexer() { - let { maxTokens: f } = this._options, - D = this._lexer.advance() - if (f !== void 0 && D.kind !== j.EOF && (++this._tokenCounter, this._tokenCounter > f)) - throw ft( - this._lexer.source, - D.start, - `Document contains more that ${f} tokens. Parsing aborted.` - ) - } - } - function Ao(f) { - let D = f.value - return Af(f.kind) + (D != null ? ` "${D}"` : '') - } - function Af(f) { - return Fg(f) ? `"${f}"` : f - } - function Qg(f, D) { - let b = new SyntaxError(f + ' (' + D.loc.start.line + ':' + D.loc.start.column + ')') - return Object.assign(b, D) - } - var zg = Qg - function Yg(f) { - let D = [], - { startToken: b, endToken: x } = f.loc - for (let y = b; y !== x; y = y.next) - y.kind === 'Comment' && D.push({ ...y, loc: { start: y.start, end: y.end } }) - return D - } - var Jg = { allowLegacyFragmentVariables: !0 } - function Xg(f) { - if (f?.name === 'GraphQLError') { - let { - message: D, - locations: [b] - } = f - return zg(D, { loc: { start: b }, cause: f }) - } - return f - } - function Kg(f) { - let D - try { - D = Hg(f, Jg) - } catch (b) { - throw Xg(b) - } - return (D.comments = Yg(D)), D - } - var Zg = { parse: Kg, astFormat: 'graphql', hasPragma: rg, locStart: df, locEnd: pf }, - e4 = { graphql: dg } - return o(a) - }) - }) - var Ku = class { - constructor() { - ;(this.listeners = []), - (this.unexpectedErrorHandler = function (t) { - setTimeout(() => { - throw t.stack - ? ms.isErrorNoTelemetry(t) - ? new ms( - t.message + - ` +spurious results.`)}}return!1},Sf=class{constructor(f,D="GraphQL request",b={line:1,column:1}){typeof f=="string"||zu(!1,`Body must be a string. Received: ${Tf(f)}.`),this.body=f,this.name=D,this.locationOffset=b,this.locationOffset.line>0||zu(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||zu(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Gg(f){return qg(f,Sf)}function Hg(f,D){return new Wg(f,D).parseDocument()}var Wg=class{constructor(f,D={}){let b=Gg(f)?f:new Sf(f);this._lexer=new Ag(b),this._options=D,this._tokenCounter=0}parseName(){let f=this.expectToken(j.NAME);return this.node(f,{kind:ue.NAME,value:f.value})}parseDocument(){return this.node(this._lexer.token,{kind:ue.DOCUMENT,definitions:this.many(j.SOF,this.parseDefinition,j.EOF)})}parseDefinition(){if(this.peek(j.BRACE_L))return this.parseOperationDefinition();let f=this.peekDescription(),D=f?this._lexer.lookahead():this._lexer.token;if(D.kind===j.NAME){switch(D.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(f)throw ft(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(D.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(D)}parseOperationDefinition(){let f=this._lexer.token;if(this.peek(j.BRACE_L))return this.node(f,{kind:ue.OPERATION_DEFINITION,operation:ei.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let D=this.parseOperationType(),b;return this.peek(j.NAME)&&(b=this.parseName()),this.node(f,{kind:ue.OPERATION_DEFINITION,operation:D,name:b,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let f=this.expectToken(j.NAME);switch(f.value){case"query":return ei.QUERY;case"mutation":return ei.MUTATION;case"subscription":return ei.SUBSCRIPTION}throw this.unexpected(f)}parseVariableDefinitions(){return this.optionalMany(j.PAREN_L,this.parseVariableDefinition,j.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:ue.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(j.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(j.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let f=this._lexer.token;return this.expectToken(j.DOLLAR),this.node(f,{kind:ue.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:ue.SELECTION_SET,selections:this.many(j.BRACE_L,this.parseSelection,j.BRACE_R)})}parseSelection(){return this.peek(j.SPREAD)?this.parseFragment():this.parseField()}parseField(){let f=this._lexer.token,D=this.parseName(),b,x;return this.expectOptionalToken(j.COLON)?(b=D,x=this.parseName()):x=D,this.node(f,{kind:ue.FIELD,alias:b,name:x,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(j.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(f){let D=f?this.parseConstArgument:this.parseArgument;return this.optionalMany(j.PAREN_L,D,j.PAREN_R)}parseArgument(f=!1){let D=this._lexer.token,b=this.parseName();return this.expectToken(j.COLON),this.node(D,{kind:ue.ARGUMENT,name:b,value:this.parseValueLiteral(f)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let f=this._lexer.token;this.expectToken(j.SPREAD);let D=this.expectOptionalKeyword("on");return!D&&this.peek(j.NAME)?this.node(f,{kind:ue.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(f,{kind:ue.INLINE_FRAGMENT,typeCondition:D?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let f=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(f,{kind:ue.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(f,{kind:ue.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(f){let D=this._lexer.token;switch(D.kind){case j.BRACKET_L:return this.parseList(f);case j.BRACE_L:return this.parseObject(f);case j.INT:return this.advanceLexer(),this.node(D,{kind:ue.INT,value:D.value});case j.FLOAT:return this.advanceLexer(),this.node(D,{kind:ue.FLOAT,value:D.value});case j.STRING:case j.BLOCK_STRING:return this.parseStringLiteral();case j.NAME:switch(this.advanceLexer(),D.value){case"true":return this.node(D,{kind:ue.BOOLEAN,value:!0});case"false":return this.node(D,{kind:ue.BOOLEAN,value:!1});case"null":return this.node(D,{kind:ue.NULL});default:return this.node(D,{kind:ue.ENUM,value:D.value})}case j.DOLLAR:if(f)if(this.expectToken(j.DOLLAR),this._lexer.token.kind===j.NAME){let b=this._lexer.token.value;throw ft(this._lexer.source,D.start,`Unexpected variable "$${b}" in constant value.`)}else throw this.unexpected(D);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let f=this._lexer.token;return this.advanceLexer(),this.node(f,{kind:ue.STRING,value:f.value,block:f.kind===j.BLOCK_STRING})}parseList(f){let D=()=>this.parseValueLiteral(f);return this.node(this._lexer.token,{kind:ue.LIST,values:this.any(j.BRACKET_L,D,j.BRACKET_R)})}parseObject(f){let D=()=>this.parseObjectField(f);return this.node(this._lexer.token,{kind:ue.OBJECT,fields:this.any(j.BRACE_L,D,j.BRACE_R)})}parseObjectField(f){let D=this._lexer.token,b=this.parseName();return this.expectToken(j.COLON),this.node(D,{kind:ue.OBJECT_FIELD,name:b,value:this.parseValueLiteral(f)})}parseDirectives(f){let D=[];for(;this.peek(j.AT);)D.push(this.parseDirective(f));return D}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(f){let D=this._lexer.token;return this.expectToken(j.AT),this.node(D,{kind:ue.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(f)})}parseTypeReference(){let f=this._lexer.token,D;if(this.expectOptionalToken(j.BRACKET_L)){let b=this.parseTypeReference();this.expectToken(j.BRACKET_R),D=this.node(f,{kind:ue.LIST_TYPE,type:b})}else D=this.parseNamedType();return this.expectOptionalToken(j.BANG)?this.node(f,{kind:ue.NON_NULL_TYPE,type:D}):D}parseNamedType(){return this.node(this._lexer.token,{kind:ue.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(j.STRING)||this.peek(j.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("schema");let b=this.parseConstDirectives(),x=this.many(j.BRACE_L,this.parseOperationTypeDefinition,j.BRACE_R);return this.node(f,{kind:ue.SCHEMA_DEFINITION,description:D,directives:b,operationTypes:x})}parseOperationTypeDefinition(){let f=this._lexer.token,D=this.parseOperationType();this.expectToken(j.COLON);let b=this.parseNamedType();return this.node(f,{kind:ue.OPERATION_TYPE_DEFINITION,operation:D,type:b})}parseScalarTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("scalar");let b=this.parseName(),x=this.parseConstDirectives();return this.node(f,{kind:ue.SCALAR_TYPE_DEFINITION,description:D,name:b,directives:x})}parseObjectTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("type");let b=this.parseName(),x=this.parseImplementsInterfaces(),y=this.parseConstDirectives(),V=this.parseFieldsDefinition();return this.node(f,{kind:ue.OBJECT_TYPE_DEFINITION,description:D,name:b,interfaces:x,directives:y,fields:V})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(j.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(j.BRACE_L,this.parseFieldDefinition,j.BRACE_R)}parseFieldDefinition(){let f=this._lexer.token,D=this.parseDescription(),b=this.parseName(),x=this.parseArgumentDefs();this.expectToken(j.COLON);let y=this.parseTypeReference(),V=this.parseConstDirectives();return this.node(f,{kind:ue.FIELD_DEFINITION,description:D,name:b,arguments:x,type:y,directives:V})}parseArgumentDefs(){return this.optionalMany(j.PAREN_L,this.parseInputValueDef,j.PAREN_R)}parseInputValueDef(){let f=this._lexer.token,D=this.parseDescription(),b=this.parseName();this.expectToken(j.COLON);let x=this.parseTypeReference(),y;this.expectOptionalToken(j.EQUALS)&&(y=this.parseConstValueLiteral());let V=this.parseConstDirectives();return this.node(f,{kind:ue.INPUT_VALUE_DEFINITION,description:D,name:b,type:x,defaultValue:y,directives:V})}parseInterfaceTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("interface");let b=this.parseName(),x=this.parseImplementsInterfaces(),y=this.parseConstDirectives(),V=this.parseFieldsDefinition();return this.node(f,{kind:ue.INTERFACE_TYPE_DEFINITION,description:D,name:b,interfaces:x,directives:y,fields:V})}parseUnionTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("union");let b=this.parseName(),x=this.parseConstDirectives(),y=this.parseUnionMemberTypes();return this.node(f,{kind:ue.UNION_TYPE_DEFINITION,description:D,name:b,directives:x,types:y})}parseUnionMemberTypes(){return this.expectOptionalToken(j.EQUALS)?this.delimitedMany(j.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("enum");let b=this.parseName(),x=this.parseConstDirectives(),y=this.parseEnumValuesDefinition();return this.node(f,{kind:ue.ENUM_TYPE_DEFINITION,description:D,name:b,directives:x,values:y})}parseEnumValuesDefinition(){return this.optionalMany(j.BRACE_L,this.parseEnumValueDefinition,j.BRACE_R)}parseEnumValueDefinition(){let f=this._lexer.token,D=this.parseDescription(),b=this.parseEnumValueName(),x=this.parseConstDirectives();return this.node(f,{kind:ue.ENUM_VALUE_DEFINITION,description:D,name:b,directives:x})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ft(this._lexer.source,this._lexer.token.start,`${Ao(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("input");let b=this.parseName(),x=this.parseConstDirectives(),y=this.parseInputFieldsDefinition();return this.node(f,{kind:ue.INPUT_OBJECT_TYPE_DEFINITION,description:D,name:b,directives:x,fields:y})}parseInputFieldsDefinition(){return this.optionalMany(j.BRACE_L,this.parseInputValueDef,j.BRACE_R)}parseTypeSystemExtension(){let f=this._lexer.lookahead();if(f.kind===j.NAME)switch(f.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(f)}parseSchemaExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let D=this.parseConstDirectives(),b=this.optionalMany(j.BRACE_L,this.parseOperationTypeDefinition,j.BRACE_R);if(D.length===0&&b.length===0)throw this.unexpected();return this.node(f,{kind:ue.SCHEMA_EXTENSION,directives:D,operationTypes:b})}parseScalarTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let D=this.parseName(),b=this.parseConstDirectives();if(b.length===0)throw this.unexpected();return this.node(f,{kind:ue.SCALAR_TYPE_EXTENSION,name:D,directives:b})}parseObjectTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let D=this.parseName(),b=this.parseImplementsInterfaces(),x=this.parseConstDirectives(),y=this.parseFieldsDefinition();if(b.length===0&&x.length===0&&y.length===0)throw this.unexpected();return this.node(f,{kind:ue.OBJECT_TYPE_EXTENSION,name:D,interfaces:b,directives:x,fields:y})}parseInterfaceTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let D=this.parseName(),b=this.parseImplementsInterfaces(),x=this.parseConstDirectives(),y=this.parseFieldsDefinition();if(b.length===0&&x.length===0&&y.length===0)throw this.unexpected();return this.node(f,{kind:ue.INTERFACE_TYPE_EXTENSION,name:D,interfaces:b,directives:x,fields:y})}parseUnionTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let D=this.parseName(),b=this.parseConstDirectives(),x=this.parseUnionMemberTypes();if(b.length===0&&x.length===0)throw this.unexpected();return this.node(f,{kind:ue.UNION_TYPE_EXTENSION,name:D,directives:b,types:x})}parseEnumTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let D=this.parseName(),b=this.parseConstDirectives(),x=this.parseEnumValuesDefinition();if(b.length===0&&x.length===0)throw this.unexpected();return this.node(f,{kind:ue.ENUM_TYPE_EXTENSION,name:D,directives:b,values:x})}parseInputObjectTypeExtension(){let f=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let D=this.parseName(),b=this.parseConstDirectives(),x=this.parseInputFieldsDefinition();if(b.length===0&&x.length===0)throw this.unexpected();return this.node(f,{kind:ue.INPUT_OBJECT_TYPE_EXTENSION,name:D,directives:b,fields:x})}parseDirectiveDefinition(){let f=this._lexer.token,D=this.parseDescription();this.expectKeyword("directive"),this.expectToken(j.AT);let b=this.parseName(),x=this.parseArgumentDefs(),y=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let V=this.parseDirectiveLocations();return this.node(f,{kind:ue.DIRECTIVE_DEFINITION,description:D,name:b,arguments:x,repeatable:y,locations:V})}parseDirectiveLocations(){return this.delimitedMany(j.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let f=this._lexer.token,D=this.parseName();if(Object.prototype.hasOwnProperty.call(Wu,D.value))return D;throw this.unexpected(f)}node(f,D){return this._options.noLocation!==!0&&(D.loc=new Zr(f,this._lexer.lastToken,this._lexer.source)),D}peek(f){return this._lexer.token.kind===f}expectToken(f){let D=this._lexer.token;if(D.kind===f)return this.advanceLexer(),D;throw ft(this._lexer.source,D.start,`Expected ${Af(f)}, found ${Ao(D)}.`)}expectOptionalToken(f){return this._lexer.token.kind===f?(this.advanceLexer(),!0):!1}expectKeyword(f){let D=this._lexer.token;if(D.kind===j.NAME&&D.value===f)this.advanceLexer();else throw ft(this._lexer.source,D.start,`Expected "${f}", found ${Ao(D)}.`)}expectOptionalKeyword(f){let D=this._lexer.token;return D.kind===j.NAME&&D.value===f?(this.advanceLexer(),!0):!1}unexpected(f){let D=f??this._lexer.token;return ft(this._lexer.source,D.start,`Unexpected ${Ao(D)}.`)}any(f,D,b){this.expectToken(f);let x=[];for(;!this.expectOptionalToken(b);)x.push(D.call(this));return x}optionalMany(f,D,b){if(this.expectOptionalToken(f)){let x=[];do x.push(D.call(this));while(!this.expectOptionalToken(b));return x}return[]}many(f,D,b){this.expectToken(f);let x=[];do x.push(D.call(this));while(!this.expectOptionalToken(b));return x}delimitedMany(f,D){this.expectOptionalToken(f);let b=[];do b.push(D.call(this));while(this.expectOptionalToken(f));return b}advanceLexer(){let{maxTokens:f}=this._options,D=this._lexer.advance();if(f!==void 0&&D.kind!==j.EOF&&(++this._tokenCounter,this._tokenCounter>f))throw ft(this._lexer.source,D.start,`Document contains more that ${f} tokens. Parsing aborted.`)}};function Ao(f){let D=f.value;return Af(f.kind)+(D!=null?` "${D}"`:"")}function Af(f){return Fg(f)?`"${f}"`:f}function Qg(f,D){let b=new SyntaxError(f+" ("+D.loc.start.line+":"+D.loc.start.column+")");return Object.assign(b,D)}var zg=Qg;function Yg(f){let D=[],{startToken:b,endToken:x}=f.loc;for(let y=b;y!==x;y=y.next)y.kind==="Comment"&&D.push({...y,loc:{start:y.start,end:y.end}});return D}var Jg={allowLegacyFragmentVariables:!0};function Xg(f){if(f?.name==="GraphQLError"){let{message:D,locations:[b]}=f;return zg(D,{loc:{start:b},cause:f})}return f}function Kg(f){let D;try{D=Hg(f,Jg)}catch(b){throw Xg(b)}return D.comments=Yg(D),D}var Zg={parse:Kg,astFormat:"graphql",hasPragma:rg,locStart:df,locEnd:pf},e4={graphql:dg};return o(a)})});var Ku=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?ms.isErrorNoTelemetry(t)?new ms(t.message+` -` + - t.stack - ) - : new Error( - t.message + - ` +`+t.stack):new Error(t.message+` -` + - t.stack - ) - : t - }, 0) - }) - } - emit(t) { - this.listeners.forEach((n) => { - n(t) - }) - } - onUnexpectedError(t) { - this.unexpectedErrorHandler(t), this.emit(t) - } - onUnexpectedExternalError(t) { - this.unexpectedErrorHandler(t) - } - }, - l4 = new Ku() - function In(e) { - c4(e) || l4.onUnexpectedError(e) - } - function el(e) { - if (e instanceof Error) { - let { name: t, message: n } = e, - r = e.stacktrace || e.stack - return { $isError: !0, name: t, message: n, stack: r, noTelemetry: ms.isErrorNoTelemetry(e) } - } - return e - } - var Zu = 'Canceled' - function c4(e) { - return e instanceof Fo ? !0 : e instanceof Error && e.name === Zu && e.message === Zu - } - var Fo = class extends Error { - constructor() { - super(Zu), (this.name = this.message) - } - } - var ms = class e extends Error { - constructor(t) { - super(t), (this.name = 'CodeExpectedError') - } - static fromError(t) { - if (t instanceof e) return t - let n = new e() - return (n.message = t.message), (n.stack = t.stack), n - } - static isErrorNoTelemetry(t) { - return t.name === 'CodeExpectedError' - } - }, - it = class e extends Error { - constructor(t) { - super(t || 'An unexpected bug occurred.'), Object.setPrototypeOf(this, e.prototype) - } - } - function tl(e, t) { - let n = this, - r = !1, - i - return function () { - if (r) return i - if (((r = !0), t)) - try { - i = e.apply(n, arguments) - } finally { - t() - } - else i = e.apply(n, arguments) - return i - } - } - var ii - ;(function (e) { - function t(S) { - return S && typeof S == 'object' && typeof S[Symbol.iterator] == 'function' - } - e.is = t - let n = Object.freeze([]) - function r() { - return n - } - e.empty = r - function* i(S) { - yield S - } - e.single = i - function s(S) { - return t(S) ? S : i(S) - } - e.wrap = s - function o(S) { - return S || n - } - e.from = o - function* a(S) { - for (let k = S.length - 1; k >= 0; k--) yield S[k] - } - e.reverse = a - function u(S) { - return !S || S[Symbol.iterator]().next().done === !0 - } - e.isEmpty = u - function l(S) { - return S[Symbol.iterator]().next().value - } - e.first = l - function c(S, k) { - let M = 0 - for (let I of S) if (k(I, M++)) return !0 - return !1 - } - e.some = c - function d(S, k) { - for (let M of S) if (k(M)) return M - } - e.find = d - function* h(S, k) { - for (let M of S) k(M) && (yield M) - } - e.filter = h - function* m(S, k) { - let M = 0 - for (let I of S) yield k(I, M++) - } - e.map = m - function* g(S, k) { - let M = 0 - for (let I of S) yield* k(I, M++) - } - e.flatMap = g - function* v(...S) { - for (let k of S) yield* k - } - e.concat = v - function N(S, k, M) { - let I = M - for (let B of S) I = k(I, B) - return I - } - e.reduce = N - function* _(S, k, M = S.length) { - for ( - k < 0 && (k += S.length), M < 0 ? (M += S.length) : M > S.length && (M = S.length); - k < M; - k++ - ) - yield S[k] - } - e.slice = _ - function w(S, k = Number.POSITIVE_INFINITY) { - let M = [] - if (k === 0) return [M, S] - let I = S[Symbol.iterator]() - for (let B = 0; B < k; B++) { - let L = I.next() - if (L.done) return [M, e.empty()] - M.push(L.value) - } - return [ - M, - { - [Symbol.iterator]() { - return I - } - } - ] - } - e.consume = w - async function C(S) { - let k = [] - for await (let M of S) k.push(M) - return Promise.resolve(k) - } - e.asyncToArray = C - })(ii || (ii = {})) - var d4 = !1, - si = null - function p4(e) { - si = e - } - if (d4) { - let e = '__is_disposable_tracked__' - p4( - new (class { - trackDisposable(t) { - let n = new Error('Potentially leaked disposable').stack - setTimeout(() => { - t[e] || console.log(n) - }, 3e3) - } - setParent(t, n) { - if (t && t !== Xt.None) - try { - t[e] = !0 - } catch {} - } - markAsDisposed(t) { - if (t && t !== Xt.None) - try { - t[e] = !0 - } catch {} - } - markAsSingleton(t) {} - })() - ) - } - function wo(e) { - return si?.trackDisposable(e), e - } - function Lo(e) { - si?.markAsDisposed(e) - } - function nl(e, t) { - si?.setParent(e, t) - } - function h4(e, t) { - if (si) for (let n of e) si.setParent(n, t) - } - function Co(e) { - if (ii.is(e)) { - let t = [] - for (let n of e) - if (n) - try { - n.dispose() - } catch (r) { - t.push(r) - } - if (t.length === 1) throw t[0] - if (t.length > 1) throw new AggregateError(t, 'Encountered errors while disposing of store') - return Array.isArray(e) ? [] : e - } else if (e) return e.dispose(), e - } - function Lf(...e) { - let t = Zn(() => Co(e)) - return h4(e, t), t - } - function Zn(e) { - let t = wo({ - dispose: tl(() => { - Lo(t), e() - }) - }) - return t - } - var yr = class e { - static { - this.DISABLE_DISPOSED_WARNING = !1 - } - constructor() { - ;(this._toDispose = new Set()), (this._isDisposed = !1), wo(this) - } - dispose() { - this._isDisposed || (Lo(this), (this._isDisposed = !0), this.clear()) - } - get isDisposed() { - return this._isDisposed - } - clear() { - if (this._toDispose.size !== 0) - try { - Co(this._toDispose) - } finally { - this._toDispose.clear() - } - } - add(t) { - if (!t) return t - if (t === this) throw new Error('Cannot register a disposable on itself!') - return ( - nl(t, this), - this._isDisposed - ? e.DISABLE_DISPOSED_WARNING || - console.warn( - new Error( - 'Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!' - ).stack - ) - : this._toDispose.add(t), - t - ) - } - deleteAndLeak(t) { - t && this._toDispose.has(t) && (this._toDispose.delete(t), nl(t, null)) - } - }, - Xt = class { - static { - this.None = Object.freeze({ dispose() {} }) - } - constructor() { - ;(this._store = new yr()), wo(this), nl(this._store, this) - } - dispose() { - Lo(this), this._store.dispose() - } - _register(t) { - if (t === this) throw new Error('Cannot register a disposable on itself!') - return this._store.add(t) - } - } - var wf = class { - constructor() { - ;(this._store = new Map()), (this._isDisposed = !1), wo(this) - } - dispose() { - Lo(this), (this._isDisposed = !0), this.clearAndDisposeAll() - } - clearAndDisposeAll() { - if (this._store.size) - try { - Co(this._store.values()) - } finally { - this._store.clear() - } - } - get(t) { - return this._store.get(t) - } - set(t, n, r = !1) { - this._isDisposed && - console.warn( - new Error( - 'Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!' - ).stack - ), - r || this._store.get(t)?.dispose(), - this._store.set(t, n) - } - deleteAndDispose(t) { - this._store.get(t)?.dispose(), this._store.delete(t) - } - [Symbol.iterator]() { - return this._store[Symbol.iterator]() - } - } - var $e = class e { - static { - this.Undefined = new e(void 0) - } - constructor(t) { - ;(this.element = t), (this.next = e.Undefined), (this.prev = e.Undefined) - } - }, - gs = class { - constructor() { - ;(this._first = $e.Undefined), (this._last = $e.Undefined), (this._size = 0) - } - get size() { - return this._size - } - isEmpty() { - return this._first === $e.Undefined - } - clear() { - let t = this._first - for (; t !== $e.Undefined; ) { - let n = t.next - ;(t.prev = $e.Undefined), (t.next = $e.Undefined), (t = n) - } - ;(this._first = $e.Undefined), (this._last = $e.Undefined), (this._size = 0) - } - unshift(t) { - return this._insert(t, !1) - } - push(t) { - return this._insert(t, !0) - } - _insert(t, n) { - let r = new $e(t) - if (this._first === $e.Undefined) (this._first = r), (this._last = r) - else if (n) { - let s = this._last - ;(this._last = r), (r.prev = s), (s.next = r) - } else { - let s = this._first - ;(this._first = r), (r.next = s), (s.prev = r) - } - this._size += 1 - let i = !1 - return () => { - i || ((i = !0), this._remove(r)) - } - } - shift() { - if (this._first !== $e.Undefined) { - let t = this._first.element - return this._remove(this._first), t - } - } - pop() { - if (this._last !== $e.Undefined) { - let t = this._last.element - return this._remove(this._last), t - } - } - _remove(t) { - if (t.prev !== $e.Undefined && t.next !== $e.Undefined) { - let n = t.prev - ;(n.next = t.next), (t.next.prev = n) - } else - t.prev === $e.Undefined && t.next === $e.Undefined - ? ((this._first = $e.Undefined), (this._last = $e.Undefined)) - : t.next === $e.Undefined - ? ((this._last = this._last.prev), (this._last.next = $e.Undefined)) - : t.prev === $e.Undefined && - ((this._first = this._first.next), (this._first.prev = $e.Undefined)) - this._size -= 1 - } - *[Symbol.iterator]() { - let t = this._first - for (; t !== $e.Undefined; ) yield t.element, (t = t.next) - } - } - var m4 = globalThis.performance && typeof globalThis.performance.now == 'function', - oi = class e { - static create(t) { - return new e(t) - } - constructor(t) { - ;(this._now = - m4 && t === !1 ? Date.now : globalThis.performance.now.bind(globalThis.performance)), - (this._startTime = this._now()), - (this._stopTime = -1) - } - stop() { - this._stopTime = this._now() - } - reset() { - ;(this._startTime = this._now()), (this._stopTime = -1) - } - elapsed() { - return this._stopTime !== -1 - ? this._stopTime - this._startTime - : this._now() - this._startTime - } - } - var g4 = !1, - Cf = !1, - D4 = !1, - ui - ;(function (e) { - e.None = () => Xt.None - function t(F) { - if (D4) { - let { onDidAddListener: T } = F, - Q = Ds.create(), - $ = 0 - F.onDidAddListener = () => { - ++$ === 2 && - (console.warn( - 'snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here' - ), - Q.print()), - T?.() - } - } - } - function n(F, T) { - return m(F, () => {}, 0, void 0, !0, void 0, T) - } - e.defer = n - function r(F) { - return (T, Q = null, $) => { - let ee = !1, - ne - return ( - (ne = F( - (se) => { - if (!ee) return ne ? ne.dispose() : (ee = !0), T.call(Q, se) - }, - null, - $ - )), - ee && ne.dispose(), - ne - ) - } - } - e.once = r - function i(F, T) { - return e.once(e.filter(F, T)) - } - e.onceIf = i - function s(F, T, Q) { - return d(($, ee = null, ne) => F((se) => $.call(ee, T(se)), null, ne), Q) - } - e.map = s - function o(F, T, Q) { - return d( - ($, ee = null, ne) => - F( - (se) => { - T(se), $.call(ee, se) - }, - null, - ne - ), - Q - ) - } - e.forEach = o - function a(F, T, Q) { - return d(($, ee = null, ne) => F((se) => T(se) && $.call(ee, se), null, ne), Q) - } - e.filter = a - function u(F) { - return F - } - e.signal = u - function l(...F) { - return (T, Q = null, $) => { - let ee = Lf(...F.map((ne) => ne((se) => T.call(Q, se)))) - return h(ee, $) - } - } - e.any = l - function c(F, T, Q, $) { - let ee = Q - return s(F, (ne) => ((ee = T(ee, ne)), ee), $) - } - e.reduce = c - function d(F, T) { - let Q, - $ = { - onWillAddFirstListener() { - Q = F(ee.fire, ee) - }, - onDidRemoveLastListener() { - Q?.dispose() - } - } - T || t($) - let ee = new lt($) - return T?.add(ee), ee.event - } - function h(F, T) { - return T instanceof Array ? T.push(F) : T && T.add(F), F - } - function m(F, T, Q = 100, $ = !1, ee = !1, ne, se) { - let Ie, - P, - Z, - J = 0, - G, - _e = { - leakWarningThreshold: ne, - onWillAddFirstListener() { - Ie = F((H) => { - J++, - (P = T(P, H)), - $ && !Z && (Re.fire(P), (P = void 0)), - (G = () => { - let Ne = P - ;(P = void 0), (Z = void 0), (!$ || J > 1) && Re.fire(Ne), (J = 0) - }), - typeof Q == 'number' - ? (clearTimeout(Z), (Z = setTimeout(G, Q))) - : Z === void 0 && ((Z = 0), queueMicrotask(G)) - }) - }, - onWillRemoveListener() { - ee && J > 0 && G?.() - }, - onDidRemoveLastListener() { - ;(G = void 0), Ie.dispose() - } - } - se || t(_e) - let Re = new lt(_e) - return se?.add(Re), Re.event - } - e.debounce = m - function g(F, T = 0, Q) { - return e.debounce(F, ($, ee) => ($ ? ($.push(ee), $) : [ee]), T, void 0, !0, void 0, Q) - } - e.accumulate = g - function v(F, T = ($, ee) => $ === ee, Q) { - let $ = !0, - ee - return a( - F, - (ne) => { - let se = $ || !T(ne, ee) - return ($ = !1), (ee = ne), se - }, - Q - ) - } - e.latch = v - function N(F, T, Q) { - return [e.filter(F, T, Q), e.filter(F, ($) => !T($), Q)] - } - e.split = N - function _(F, T = !1, Q = [], $) { - let ee = Q.slice(), - ne = F((P) => { - ee ? ee.push(P) : Ie.fire(P) - }) - $ && $.add(ne) - let se = () => { - ee?.forEach((P) => Ie.fire(P)), (ee = null) - }, - Ie = new lt({ - onWillAddFirstListener() { - ne || ((ne = F((P) => Ie.fire(P))), $ && $.add(ne)) - }, - onDidAddFirstListener() { - ee && (T ? setTimeout(se) : se()) - }, - onDidRemoveLastListener() { - ne && ne.dispose(), (ne = null) - } - }) - return $ && $.add(Ie), Ie.event - } - e.buffer = _ - function w(F, T) { - return ($, ee, ne) => { - let se = T(new S()) - return F( - function (Ie) { - let P = se.evaluate(Ie) - P !== C && $.call(ee, P) - }, - void 0, - ne - ) - } - } - e.chain = w - let C = Symbol('HaltChainable') - class S { - constructor() { - this.steps = [] - } - map(T) { - return this.steps.push(T), this - } - forEach(T) { - return this.steps.push((Q) => (T(Q), Q)), this - } - filter(T) { - return this.steps.push((Q) => (T(Q) ? Q : C)), this - } - reduce(T, Q) { - let $ = Q - return this.steps.push((ee) => (($ = T($, ee)), $)), this - } - latch(T = (Q, $) => Q === $) { - let Q = !0, - $ - return ( - this.steps.push((ee) => { - let ne = Q || !T(ee, $) - return (Q = !1), ($ = ee), ne ? ee : C - }), - this - ) - } - evaluate(T) { - for (let Q of this.steps) if (((T = Q(T)), T === C)) break - return T - } - } - function k(F, T, Q = ($) => $) { - let $ = (...Ie) => se.fire(Q(...Ie)), - ee = () => F.on(T, $), - ne = () => F.removeListener(T, $), - se = new lt({ onWillAddFirstListener: ee, onDidRemoveLastListener: ne }) - return se.event - } - e.fromNodeEventEmitter = k - function M(F, T, Q = ($) => $) { - let $ = (...Ie) => se.fire(Q(...Ie)), - ee = () => F.addEventListener(T, $), - ne = () => F.removeEventListener(T, $), - se = new lt({ onWillAddFirstListener: ee, onDidRemoveLastListener: ne }) - return se.event - } - e.fromDOMEventEmitter = M - function I(F) { - return new Promise((T) => r(F)(T)) - } - e.toPromise = I - function B(F) { - let T = new lt() - return ( - F.then( - (Q) => { - T.fire(Q) - }, - () => { - T.fire(void 0) - } - ).finally(() => { - T.dispose() - }), - T.event - ) - } - e.fromPromise = B - function L(F, T) { - return F((Q) => T.fire(Q)) - } - e.forward = L - function A(F, T, Q) { - return T(Q), F(($) => T($)) - } - e.runAndSubscribe = A - class X { - constructor(T, Q) { - ;(this._observable = T), (this._counter = 0), (this._hasChanged = !1) - let $ = { - onWillAddFirstListener: () => { - T.addObserver(this), this._observable.reportChanges() - }, - onDidRemoveLastListener: () => { - T.removeObserver(this) - } - } - Q || t($), (this.emitter = new lt($)), Q && Q.add(this.emitter) - } - beginUpdate(T) { - this._counter++ - } - handlePossibleChange(T) {} - handleChange(T, Q) { - this._hasChanged = !0 - } - endUpdate(T) { - this._counter--, - this._counter === 0 && - (this._observable.reportChanges(), - this._hasChanged && - ((this._hasChanged = !1), this.emitter.fire(this._observable.get()))) - } - } - function z(F, T) { - return new X(F, T).emitter.event - } - e.fromObservable = z - function fe(F) { - return (T, Q, $) => { - let ee = 0, - ne = !1, - se = { - beginUpdate() { - ee++ - }, - endUpdate() { - ee--, ee === 0 && (F.reportChanges(), ne && ((ne = !1), T.call(Q))) - }, - handlePossibleChange() {}, - handleChange() { - ne = !0 - } - } - F.addObserver(se), F.reportChanges() - let Ie = { - dispose() { - F.removeObserver(se) - } - } - return $ instanceof yr ? $.add(Ie) : Array.isArray($) && $.push(Ie), Ie - } - } - e.fromObservableLight = fe - })(ui || (ui = {})) - var rl = class e { - static { - this.all = new Set() - } - static { - this._idPool = 0 - } - constructor(t) { - ;(this.listenerCount = 0), - (this.invocationCount = 0), - (this.elapsedOverall = 0), - (this.durations = []), - (this.name = `${t}_${e._idPool++}`), - e.all.add(this) - } - start(t) { - ;(this._stopWatch = new oi()), (this.listenerCount = t) - } - stop() { - if (this._stopWatch) { - let t = this._stopWatch.elapsed() - this.durations.push(t), - (this.elapsedOverall += t), - (this.invocationCount += 1), - (this._stopWatch = void 0) - } - } - }, - If = -1, - il = class e { - static { - this._idPool = 1 - } - constructor(t, n, r = (e._idPool++).toString(16).padStart(3, '0')) { - ;(this._errorHandler = t), (this.threshold = n), (this.name = r), (this._warnCountdown = 0) - } - dispose() { - this._stacks?.clear() - } - check(t, n) { - let r = this.threshold - if (r <= 0 || n < r) return - this._stacks || (this._stacks = new Map()) - let i = this._stacks.get(t.value) || 0 - if ( - (this._stacks.set(t.value, i + 1), (this._warnCountdown -= 1), this._warnCountdown <= 0) - ) { - this._warnCountdown = r * 0.5 - let [s, o] = this.getMostFrequentStack(), - a = `[${this.name}] potential listener LEAK detected, having ${n} listeners already. MOST frequent listener (${o}):` - console.warn(a), console.warn(s) - let u = new sl(a, s) - this._errorHandler(u) - } - return () => { - let s = this._stacks.get(t.value) || 0 - this._stacks.set(t.value, s - 1) - } - } - getMostFrequentStack() { - if (!this._stacks) return - let t, - n = 0 - for (let [r, i] of this._stacks) (!t || n < i) && ((t = [r, i]), (n = i)) - return t - } - }, - Ds = class e { - static create() { - let t = new Error() - return new e(t.stack ?? '') - } - constructor(t) { - this.value = t - } - print() { - console.warn( - this.value - .split( - ` -` - ) - .slice(2).join(` -`) - ) - } - }, - sl = class extends Error { - constructor(t, n) { - super(t), (this.name = 'ListenerLeakError'), (this.stack = n) - } - }, - ol = class extends Error { - constructor(t, n) { - super(t), (this.name = 'ListenerRefusalError'), (this.stack = n) - } - }, - ai = class { - constructor(t) { - this.value = t - } - }, - v4 = 2, - b4 = (e, t) => { - if (e instanceof ai) t(e) - else - for (let n = 0; n < e.length; n++) { - let r = e[n] - r && t(r) - } - }, - Io - if (g4) { - let e = [] - setInterval(() => { - e.length !== 0 && - (console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"), - console.warn( - e.join(` -`) - ), - (e.length = 0)) - }, 3e3), - (Io = new FinalizationRegistry((t) => { - typeof t == 'string' && e.push(t) - })) - } - var lt = class { - constructor(t) { - ;(this._size = 0), - (this._options = t), - (this._leakageMon = - If > 0 || this._options?.leakWarningThreshold - ? new il(t?.onListenerError ?? In, this._options?.leakWarningThreshold ?? If) - : void 0), - (this._perfMon = this._options?._profName ? new rl(this._options._profName) : void 0), - (this._deliveryQueue = this._options?.deliveryQueue) - } - dispose() { - if (!this._disposed) { - if ( - ((this._disposed = !0), - this._deliveryQueue?.current === this && this._deliveryQueue.reset(), - this._listeners) - ) { - if (Cf) { - let t = this._listeners - queueMicrotask(() => { - b4(t, (n) => n.stack?.print()) - }) - } - ;(this._listeners = void 0), (this._size = 0) - } - this._options?.onDidRemoveLastListener?.(), this._leakageMon?.dispose() - } - } - get event() { - return ( - (this._event ??= (t, n, r) => { - if (this._leakageMon && this._size > this._leakageMon.threshold ** 2) { - let u = `[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})` - console.warn(u) - let l = this._leakageMon.getMostFrequentStack() ?? ['UNKNOWN stack', -1], - c = new ol(`${u}. HINT: Stack shows most frequent listener (${l[1]}-times)`, l[0]) - return (this._options?.onListenerError || In)(c), Xt.None - } - if (this._disposed) return Xt.None - n && (t = t.bind(n)) - let i = new ai(t), - s, - o - this._leakageMon && - this._size >= Math.ceil(this._leakageMon.threshold * 0.2) && - ((i.stack = Ds.create()), (s = this._leakageMon.check(i.stack, this._size + 1))), - Cf && (i.stack = o ?? Ds.create()), - this._listeners - ? this._listeners instanceof ai - ? ((this._deliveryQueue ??= new al()), (this._listeners = [this._listeners, i])) - : this._listeners.push(i) - : (this._options?.onWillAddFirstListener?.(this), - (this._listeners = i), - this._options?.onDidAddFirstListener?.(this)), - this._size++ - let a = Zn(() => { - Io?.unregister(a), s?.(), this._removeListener(i) - }) - if ((r instanceof yr ? r.add(a) : Array.isArray(r) && r.push(a), Io)) { - let u = new Error().stack - .split( - ` -` - ) - .slice(2, 3) - .join( - ` -` - ) - .trim(), - l = /(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(u) - Io.register(a, l?.[2] ?? u, a) - } - return a - }), - this._event - ) - } - _removeListener(t) { - if ((this._options?.onWillRemoveListener?.(this), !this._listeners)) return - if (this._size === 1) { - ;(this._listeners = void 0), - this._options?.onDidRemoveLastListener?.(this), - (this._size = 0) - return - } - let n = this._listeners, - r = n.indexOf(t) - if (r === -1) - throw ( - (console.log('disposed?', this._disposed), - console.log('size?', this._size), - console.log('arr?', JSON.stringify(this._listeners)), - new Error('Attempted to dispose unknown listener')) - ) - this._size--, (n[r] = void 0) - let i = this._deliveryQueue.current === this - if (this._size * v4 <= n.length) { - let s = 0 - for (let o = 0; o < n.length; o++) - n[o] - ? (n[s++] = n[o]) - : i && (this._deliveryQueue.end--, s < this._deliveryQueue.i && this._deliveryQueue.i--) - n.length = s - } - } - _deliver(t, n) { - if (!t) return - let r = this._options?.onListenerError || In - if (!r) { - t.value(n) - return - } - try { - t.value(n) - } catch (i) { - r(i) - } - } - _deliverQueue(t) { - let n = t.current._listeners - for (; t.i < t.end; ) this._deliver(n[t.i++], t.value) - t.reset() - } - fire(t) { - if ( - (this._deliveryQueue?.current && - (this._deliverQueue(this._deliveryQueue), this._perfMon?.stop()), - this._perfMon?.start(this._size), - this._listeners) - ) - if (this._listeners instanceof ai) this._deliver(this._listeners, t) - else { - let n = this._deliveryQueue - n.enqueue(this, t, this._listeners.length), this._deliverQueue(n) - } - this._perfMon?.stop() - } - hasListeners() { - return this._size > 0 - } - } - var al = class { - constructor() { - ;(this.i = -1), (this.end = 0) - } - enqueue(t, n, r) { - ;(this.i = 0), (this.end = r), (this.current = t), (this.value = n) - } - reset() { - ;(this.i = this.end), (this.current = void 0), (this.value = void 0) - } - } - function ul() { - return globalThis._VSCODE_NLS_MESSAGES - } - function vs() { - return globalThis._VSCODE_NLS_LANGUAGE - } - var E4 = - vs() === 'pseudo' || - (typeof document < 'u' && - document.location && - document.location.hash.indexOf('pseudo=true') >= 0) - function Rf(e, t) { - let n - return ( - t.length === 0 - ? (n = e) - : (n = e.replace(/\{(\d+)\}/g, (r, i) => { - let s = i[0], - o = t[s], - a = r - return ( - typeof o == 'string' - ? (a = o) - : (typeof o == 'number' || typeof o == 'boolean' || o === void 0 || o === null) && - (a = String(o)), - a - ) - })), - E4 && (n = '\uFF3B' + n.replace(/[aouei]/g, '$&$&') + '\uFF3D'), - n - ) - } - function ke(e, t, ...n) { - return Rf(typeof e == 'number' ? y4(e, t) : t, n) - } - function y4(e, t) { - let n = ul()?.[e] - if (typeof n != 'string') { - if (typeof t == 'string') return t - throw new Error(`!!! NLS MISSING: ${e} !!!`) - } - return n - } - var li = 'en', - Oo = !1, - Mo = !1, - ko = !1, - _4 = !1, - Of = !1, - fl = !1, - N4 = !1, - T4 = !1, - S4 = !1, - A4 = !1, - Ro, - ll = li, - kf = li, - F4, - Rn, - kn = globalThis, - jt - typeof kn.vscode < 'u' && typeof kn.vscode.process < 'u' - ? (jt = kn.vscode.process) - : typeof process < 'u' && typeof process?.versions?.node == 'string' && (jt = process) - var Mf = typeof jt?.versions?.electron == 'string', - w4 = Mf && jt?.type === 'renderer' - if (typeof jt == 'object') { - ;(Oo = jt.platform === 'win32'), - (Mo = jt.platform === 'darwin'), - (ko = jt.platform === 'linux'), - (_4 = ko && !!jt.env.SNAP && !!jt.env.SNAP_REVISION), - (N4 = Mf), - (S4 = !!jt.env.CI || !!jt.env.BUILD_ARTIFACTSTAGINGDIRECTORY), - (Ro = li), - (ll = li) - let e = jt.env.VSCODE_NLS_CONFIG - if (e) - try { - let t = JSON.parse(e) - ;(Ro = t.userLocale), - (kf = t.osLocale), - (ll = t.resolvedLanguage || li), - (F4 = t.languagePack?.translationsConfigFile) - } catch {} - Of = !0 - } else - typeof navigator == 'object' && !w4 - ? ((Rn = navigator.userAgent), - (Oo = Rn.indexOf('Windows') >= 0), - (Mo = Rn.indexOf('Macintosh') >= 0), - (T4 = - (Rn.indexOf('Macintosh') >= 0 || Rn.indexOf('iPad') >= 0 || Rn.indexOf('iPhone') >= 0) && - !!navigator.maxTouchPoints && - navigator.maxTouchPoints > 0), - (ko = Rn.indexOf('Linux') >= 0), - (A4 = Rn?.indexOf('Mobi') >= 0), - (fl = !0), - (ll = vs() || li), - (Ro = navigator.language.toLowerCase()), - (kf = Ro)) - : console.error('Unable to resolve platform.') - var cl = 0 - Mo ? (cl = 1) : Oo ? (cl = 3) : ko && (cl = 2) - var xr = Oo, - Pf = Mo - var Bf = Of, - dl = fl, - L4 = fl && typeof kn.importScripts == 'function', - Vf = L4 ? kn.origin : void 0 - var dn = Rn - var C4 = typeof kn.postMessage == 'function' && !kn.importScripts, - Uf = (() => { - if (C4) { - let e = [] - kn.addEventListener('message', (n) => { - if (n.data && n.data.vscodeScheduleAsyncWork) - for (let r = 0, i = e.length; r < i; r++) { - let s = e[r] - if (s.id === n.data.vscodeScheduleAsyncWork) { - e.splice(r, 1), s.callback() - return - } - } - }) - let t = 0 - return (n) => { - let r = ++t - e.push({ id: r, callback: n }), kn.postMessage({ vscodeScheduleAsyncWork: r }, '*') - } - } - return (e) => setTimeout(e) - })() - var I4 = !!(dn && dn.indexOf('Chrome') >= 0), - fE = !!(dn && dn.indexOf('Firefox') >= 0), - dE = !!(!I4 && dn && dn.indexOf('Safari') >= 0), - pE = !!(dn && dn.indexOf('Edg/') >= 0), - hE = !!(dn && dn.indexOf('Android') >= 0) - function k4(e) { - return e - } - var Po = class { - constructor(t, n) { - ;(this.lastCache = void 0), - (this.lastArgKey = void 0), - typeof t == 'function' - ? ((this._fn = t), (this._computeKey = k4)) - : ((this._fn = n), (this._computeKey = t.getCacheKey)) - } - get(t) { - let n = this._computeKey(t) - return ( - this.lastArgKey !== n && ((this.lastArgKey = n), (this.lastCache = this._fn(t))), - this.lastCache - ) - } - } - var bs = class { - constructor(t) { - ;(this.executor = t), (this._didRun = !1) - } - get value() { - if (!this._didRun) - try { - this._value = this.executor() - } catch (t) { - this._error = t - } finally { - this._didRun = !0 - } - if (this._error) throw this._error - return this._value - } - get rawValue() { - return this._value - } - } - function jf(e) { - return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g, '\\$&') - } - function qf(e) { - return e.split(/\r\n|\r|\n/) - } - function Gf(e) { - for (let t = 0, n = e.length; t < n; t++) { - let r = e.charCodeAt(t) - if (r !== 32 && r !== 9) return t - } - return -1 - } - function Hf(e, t = e.length - 1) { - for (let n = t; n >= 0; n--) { - let r = e.charCodeAt(n) - if (r !== 32 && r !== 9) return n - } - return -1 - } - function pl(e) { - return e >= 65 && e <= 90 - } - function di(e) { - return 55296 <= e && e <= 56319 - } - function Bo(e) { - return 56320 <= e && e <= 57343 - } - function hl(e, t) { - return ((e - 55296) << 10) + (t - 56320) + 65536 - } - function Wf(e, t, n) { - let r = e.charCodeAt(n) - if (di(r) && n + 1 < t) { - let i = e.charCodeAt(n + 1) - if (Bo(i)) return hl(r, i) - } - return r - } - var O4 = /^[\t\n\r\x20-\x7E]*$/ - function Qf(e) { - return O4.test(e) - } - var bE = String.fromCharCode(65279) - var $f = class e { - static { - this._INSTANCE = null - } - static getInstance() { - return e._INSTANCE || (e._INSTANCE = new e()), e._INSTANCE - } - constructor() { - this._data = M4() - } - getGraphemeBreakType(t) { - if (t < 32) return t === 10 ? 3 : t === 13 ? 2 : 4 - if (t < 127) return 0 - let n = this._data, - r = n.length / 3, - i = 1 - for (; i <= r; ) - if (t < n[3 * i]) i = 2 * i - else if (t > n[3 * i + 1]) i = 2 * i + 1 - else return n[3 * i + 2] - return 0 - } - } - function M4() { - return JSON.parse( - '[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]' - ) - } - var ci = class e { - static { - this.ambiguousCharacterData = new bs(() => - JSON.parse( - '{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}' - ) - ) - } - static { - this.cache = new Po({ getCacheKey: JSON.stringify }, (t) => { - function n(c) { - let d = new Map() - for (let h = 0; h < c.length; h += 2) d.set(c[h], c[h + 1]) - return d - } - function r(c, d) { - let h = new Map(c) - for (let [m, g] of d) h.set(m, g) - return h - } - function i(c, d) { - if (!c) return d - let h = new Map() - for (let [m, g] of c) d.has(m) && h.set(m, g) - return h - } - let s = this.ambiguousCharacterData.value, - o = t.filter((c) => !c.startsWith('_') && c in s) - o.length === 0 && (o = ['_default']) - let a - for (let c of o) { - let d = n(s[c]) - a = i(a, d) - } - let u = n(s._common), - l = r(u, a) - return new e(l) - }) - } - static getInstance(t) { - return e.cache.get(Array.from(t)) - } - static { - this._locales = new bs(() => - Object.keys(e.ambiguousCharacterData.value).filter((t) => !t.startsWith('_')) - ) - } - static getLocales() { - return e._locales.value - } - constructor(t) { - this.confusableDictionary = t - } - isAmbiguous(t) { - return this.confusableDictionary.has(t) - } - getPrimaryConfusable(t) { - return this.confusableDictionary.get(t) - } - getConfusableCodePoints() { - return new Set(this.confusableDictionary.keys()) - } - }, - fi = class e { - static getRawData() { - return JSON.parse( - '[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]' - ) - } - static { - this._data = void 0 - } - static getData() { - return this._data || (this._data = new Set(e.getRawData())), this._data - } - static isInvisibleCharacter(t) { - return e.getData().has(t) - } - static get codePoints() { - return e.getData() - } - } - var pi, - ml = globalThis.vscode - if (typeof ml < 'u' && typeof ml.process < 'u') { - let e = ml.process - pi = { - get platform() { - return e.platform - }, - get arch() { - return e.arch - }, - get env() { - return e.env - }, - cwd() { - return e.cwd() - } - } - } else - typeof process < 'u' && typeof process?.versions?.node == 'string' - ? (pi = { - get platform() { - return process.platform - }, - get arch() { - return process.arch - }, - get env() { - return process.env - }, - cwd() { - return process.env.VSCODE_CWD || process.cwd() - } - }) - : (pi = { - get platform() { - return xr ? 'win32' : Pf ? 'darwin' : 'linux' - }, - get arch() {}, - get env() { - return {} - }, - cwd() { - return '/' - } - }) - var ys = pi.cwd, - zf = pi.env, - Yf = pi.platform - var B4 = 65, - V4 = 97, - U4 = 90, - $4 = 122, - nr = 46, - dt = 47, - kt = 92, - er = 58, - j4 = 63, - Vo = class extends Error { - constructor(t, n, r) { - let i - typeof n == 'string' && n.indexOf('not ') === 0 - ? ((i = 'must not be'), (n = n.replace(/^not /, ''))) - : (i = 'must be') - let s = t.indexOf('.') !== -1 ? 'property' : 'argument', - o = `The "${t}" ${s} ${i} of type ${n}` - ;(o += `. Received type ${typeof r}`), super(o), (this.code = 'ERR_INVALID_ARG_TYPE') - } - } - function q4(e, t) { - if (e === null || typeof e != 'object') throw new Vo(t, 'Object', e) - } - function ze(e, t) { - if (typeof e != 'string') throw new Vo(t, 'string', e) - } - var On = Yf === 'win32' - function he(e) { - return e === dt || e === kt - } - function gl(e) { - return e === dt - } - function tr(e) { - return (e >= B4 && e <= U4) || (e >= V4 && e <= $4) - } - function Uo(e, t, n, r) { - let i = '', - s = 0, - o = -1, - a = 0, - u = 0 - for (let l = 0; l <= e.length; ++l) { - if (l < e.length) u = e.charCodeAt(l) - else { - if (r(u)) break - u = dt - } - if (r(u)) { - if (!(o === l - 1 || a === 1)) - if (a === 2) { - if ( - i.length < 2 || - s !== 2 || - i.charCodeAt(i.length - 1) !== nr || - i.charCodeAt(i.length - 2) !== nr - ) { - if (i.length > 2) { - let c = i.lastIndexOf(n) - c === -1 - ? ((i = ''), (s = 0)) - : ((i = i.slice(0, c)), (s = i.length - 1 - i.lastIndexOf(n))), - (o = l), - (a = 0) - continue - } else if (i.length !== 0) { - ;(i = ''), (s = 0), (o = l), (a = 0) - continue - } - } - t && ((i += i.length > 0 ? `${n}..` : '..'), (s = 2)) - } else - i.length > 0 ? (i += `${n}${e.slice(o + 1, l)}`) : (i = e.slice(o + 1, l)), - (s = l - o - 1) - ;(o = l), (a = 0) - } else u === nr && a !== -1 ? ++a : (a = -1) - } - return i - } - function G4(e) { - return e ? `${e[0] === '.' ? '' : '.'}${e}` : '' - } - function Jf(e, t) { - q4(t, 'pathObject') - let n = t.dir || t.root, - r = t.base || `${t.name || ''}${G4(t.ext)}` - return n ? (n === t.root ? `${n}${r}` : `${n}${e}${r}`) : r - } - var vt = { - resolve(...e) { - let t = '', - n = '', - r = !1 - for (let i = e.length - 1; i >= -1; i--) { - let s - if (i >= 0) { - if (((s = e[i]), ze(s, `paths[${i}]`), s.length === 0)) continue - } else - t.length === 0 - ? (s = ys()) - : ((s = zf[`=${t}`] || ys()), - (s === void 0 || - (s.slice(0, 2).toLowerCase() !== t.toLowerCase() && s.charCodeAt(2) === kt)) && - (s = `${t}\\`)) - let o = s.length, - a = 0, - u = '', - l = !1, - c = s.charCodeAt(0) - if (o === 1) he(c) && ((a = 1), (l = !0)) - else if (he(c)) - if (((l = !0), he(s.charCodeAt(1)))) { - let d = 2, - h = d - for (; d < o && !he(s.charCodeAt(d)); ) d++ - if (d < o && d !== h) { - let m = s.slice(h, d) - for (h = d; d < o && he(s.charCodeAt(d)); ) d++ - if (d < o && d !== h) { - for (h = d; d < o && !he(s.charCodeAt(d)); ) d++ - ;(d === o || d !== h) && ((u = `\\\\${m}\\${s.slice(h, d)}`), (a = d)) - } - } - } else a = 1 - else - tr(c) && - s.charCodeAt(1) === er && - ((u = s.slice(0, 2)), (a = 2), o > 2 && he(s.charCodeAt(2)) && ((l = !0), (a = 3))) - if (u.length > 0) - if (t.length > 0) { - if (u.toLowerCase() !== t.toLowerCase()) continue - } else t = u - if (r) { - if (t.length > 0) break - } else if (((n = `${s.slice(a)}\\${n}`), (r = l), l && t.length > 0)) break - } - return (n = Uo(n, !r, '\\', he)), r ? `${t}\\${n}` : `${t}${n}` || '.' - }, - normalize(e) { - ze(e, 'path') - let t = e.length - if (t === 0) return '.' - let n = 0, - r, - i = !1, - s = e.charCodeAt(0) - if (t === 1) return gl(s) ? '\\' : e - if (he(s)) - if (((i = !0), he(e.charCodeAt(1)))) { - let a = 2, - u = a - for (; a < t && !he(e.charCodeAt(a)); ) a++ - if (a < t && a !== u) { - let l = e.slice(u, a) - for (u = a; a < t && he(e.charCodeAt(a)); ) a++ - if (a < t && a !== u) { - for (u = a; a < t && !he(e.charCodeAt(a)); ) a++ - if (a === t) return `\\\\${l}\\${e.slice(u)}\\` - a !== u && ((r = `\\\\${l}\\${e.slice(u, a)}`), (n = a)) - } - } - } else n = 1 - else - tr(s) && - e.charCodeAt(1) === er && - ((r = e.slice(0, 2)), (n = 2), t > 2 && he(e.charCodeAt(2)) && ((i = !0), (n = 3))) - let o = n < t ? Uo(e.slice(n), !i, '\\', he) : '' - return ( - o.length === 0 && !i && (o = '.'), - o.length > 0 && he(e.charCodeAt(t - 1)) && (o += '\\'), - r === void 0 ? (i ? `\\${o}` : o) : i ? `${r}\\${o}` : `${r}${o}` - ) - }, - isAbsolute(e) { - ze(e, 'path') - let t = e.length - if (t === 0) return !1 - let n = e.charCodeAt(0) - return he(n) || (t > 2 && tr(n) && e.charCodeAt(1) === er && he(e.charCodeAt(2))) - }, - join(...e) { - if (e.length === 0) return '.' - let t, n - for (let s = 0; s < e.length; ++s) { - let o = e[s] - ze(o, 'path'), o.length > 0 && (t === void 0 ? (t = n = o) : (t += `\\${o}`)) - } - if (t === void 0) return '.' - let r = !0, - i = 0 - if (typeof n == 'string' && he(n.charCodeAt(0))) { - ++i - let s = n.length - s > 1 && he(n.charCodeAt(1)) && (++i, s > 2 && (he(n.charCodeAt(2)) ? ++i : (r = !1))) - } - if (r) { - for (; i < t.length && he(t.charCodeAt(i)); ) i++ - i >= 2 && (t = `\\${t.slice(i)}`) - } - return vt.normalize(t) - }, - relative(e, t) { - if ((ze(e, 'from'), ze(t, 'to'), e === t)) return '' - let n = vt.resolve(e), - r = vt.resolve(t) - if (n === r || ((e = n.toLowerCase()), (t = r.toLowerCase()), e === t)) return '' - let i = 0 - for (; i < e.length && e.charCodeAt(i) === kt; ) i++ - let s = e.length - for (; s - 1 > i && e.charCodeAt(s - 1) === kt; ) s-- - let o = s - i, - a = 0 - for (; a < t.length && t.charCodeAt(a) === kt; ) a++ - let u = t.length - for (; u - 1 > a && t.charCodeAt(u - 1) === kt; ) u-- - let l = u - a, - c = o < l ? o : l, - d = -1, - h = 0 - for (; h < c; h++) { - let g = e.charCodeAt(i + h) - if (g !== t.charCodeAt(a + h)) break - g === kt && (d = h) - } - if (h !== c) { - if (d === -1) return r - } else { - if (l > c) { - if (t.charCodeAt(a + h) === kt) return r.slice(a + h + 1) - if (h === 2) return r.slice(a + h) - } - o > c && (e.charCodeAt(i + h) === kt ? (d = h) : h === 2 && (d = 3)), d === -1 && (d = 0) - } - let m = '' - for (h = i + d + 1; h <= s; ++h) - (h === s || e.charCodeAt(h) === kt) && (m += m.length === 0 ? '..' : '\\..') - return ( - (a += d), - m.length > 0 ? `${m}${r.slice(a, u)}` : (r.charCodeAt(a) === kt && ++a, r.slice(a, u)) - ) - }, - toNamespacedPath(e) { - if (typeof e != 'string' || e.length === 0) return e - let t = vt.resolve(e) - if (t.length <= 2) return e - if (t.charCodeAt(0) === kt) { - if (t.charCodeAt(1) === kt) { - let n = t.charCodeAt(2) - if (n !== j4 && n !== nr) return `\\\\?\\UNC\\${t.slice(2)}` - } - } else if (tr(t.charCodeAt(0)) && t.charCodeAt(1) === er && t.charCodeAt(2) === kt) - return `\\\\?\\${t}` - return e - }, - dirname(e) { - ze(e, 'path') - let t = e.length - if (t === 0) return '.' - let n = -1, - r = 0, - i = e.charCodeAt(0) - if (t === 1) return he(i) ? e : '.' - if (he(i)) { - if (((n = r = 1), he(e.charCodeAt(1)))) { - let a = 2, - u = a - for (; a < t && !he(e.charCodeAt(a)); ) a++ - if (a < t && a !== u) { - for (u = a; a < t && he(e.charCodeAt(a)); ) a++ - if (a < t && a !== u) { - for (u = a; a < t && !he(e.charCodeAt(a)); ) a++ - if (a === t) return e - a !== u && (n = r = a + 1) - } - } - } - } else - tr(i) && e.charCodeAt(1) === er && ((n = t > 2 && he(e.charCodeAt(2)) ? 3 : 2), (r = n)) - let s = -1, - o = !0 - for (let a = t - 1; a >= r; --a) - if (he(e.charCodeAt(a))) { - if (!o) { - s = a - break - } - } else o = !1 - if (s === -1) { - if (n === -1) return '.' - s = n - } - return e.slice(0, s) - }, - basename(e, t) { - t !== void 0 && ze(t, 'suffix'), ze(e, 'path') - let n = 0, - r = -1, - i = !0, - s - if ( - (e.length >= 2 && tr(e.charCodeAt(0)) && e.charCodeAt(1) === er && (n = 2), - t !== void 0 && t.length > 0 && t.length <= e.length) - ) { - if (t === e) return '' - let o = t.length - 1, - a = -1 - for (s = e.length - 1; s >= n; --s) { - let u = e.charCodeAt(s) - if (he(u)) { - if (!i) { - n = s + 1 - break - } - } else - a === -1 && ((i = !1), (a = s + 1)), - o >= 0 && (u === t.charCodeAt(o) ? --o === -1 && (r = s) : ((o = -1), (r = a))) - } - return n === r ? (r = a) : r === -1 && (r = e.length), e.slice(n, r) - } - for (s = e.length - 1; s >= n; --s) - if (he(e.charCodeAt(s))) { - if (!i) { - n = s + 1 - break - } - } else r === -1 && ((i = !1), (r = s + 1)) - return r === -1 ? '' : e.slice(n, r) - }, - extname(e) { - ze(e, 'path') - let t = 0, - n = -1, - r = 0, - i = -1, - s = !0, - o = 0 - e.length >= 2 && e.charCodeAt(1) === er && tr(e.charCodeAt(0)) && (t = r = 2) - for (let a = e.length - 1; a >= t; --a) { - let u = e.charCodeAt(a) - if (he(u)) { - if (!s) { - r = a + 1 - break - } - continue - } - i === -1 && ((s = !1), (i = a + 1)), - u === nr ? (n === -1 ? (n = a) : o !== 1 && (o = 1)) : n !== -1 && (o = -1) - } - return n === -1 || i === -1 || o === 0 || (o === 1 && n === i - 1 && n === r + 1) - ? '' - : e.slice(n, i) - }, - format: Jf.bind(null, '\\'), - parse(e) { - ze(e, 'path') - let t = { root: '', dir: '', base: '', ext: '', name: '' } - if (e.length === 0) return t - let n = e.length, - r = 0, - i = e.charCodeAt(0) - if (n === 1) return he(i) ? ((t.root = t.dir = e), t) : ((t.base = t.name = e), t) - if (he(i)) { - if (((r = 1), he(e.charCodeAt(1)))) { - let d = 2, - h = d - for (; d < n && !he(e.charCodeAt(d)); ) d++ - if (d < n && d !== h) { - for (h = d; d < n && he(e.charCodeAt(d)); ) d++ - if (d < n && d !== h) { - for (h = d; d < n && !he(e.charCodeAt(d)); ) d++ - d === n ? (r = d) : d !== h && (r = d + 1) - } - } - } - } else if (tr(i) && e.charCodeAt(1) === er) { - if (n <= 2) return (t.root = t.dir = e), t - if (((r = 2), he(e.charCodeAt(2)))) { - if (n === 3) return (t.root = t.dir = e), t - r = 3 - } - } - r > 0 && (t.root = e.slice(0, r)) - let s = -1, - o = r, - a = -1, - u = !0, - l = e.length - 1, - c = 0 - for (; l >= r; --l) { - if (((i = e.charCodeAt(l)), he(i))) { - if (!u) { - o = l + 1 - break - } - continue - } - a === -1 && ((u = !1), (a = l + 1)), - i === nr ? (s === -1 ? (s = l) : c !== 1 && (c = 1)) : s !== -1 && (c = -1) - } - return ( - a !== -1 && - (s === -1 || c === 0 || (c === 1 && s === a - 1 && s === o + 1) - ? (t.base = t.name = e.slice(o, a)) - : ((t.name = e.slice(o, s)), (t.base = e.slice(o, a)), (t.ext = e.slice(s, a)))), - o > 0 && o !== r ? (t.dir = e.slice(0, o - 1)) : (t.dir = t.root), - t - ) - }, - sep: '\\', - delimiter: ';', - win32: null, - posix: null - }, - H4 = (() => { - if (On) { - let e = /\\/g - return () => { - let t = ys().replace(e, '/') - return t.slice(t.indexOf('/')) - } - } - return () => ys() - })(), - pt = { - resolve(...e) { - let t = '', - n = !1 - for (let r = e.length - 1; r >= -1 && !n; r--) { - let i = r >= 0 ? e[r] : H4() - ze(i, `paths[${r}]`), i.length !== 0 && ((t = `${i}/${t}`), (n = i.charCodeAt(0) === dt)) - } - return (t = Uo(t, !n, '/', gl)), n ? `/${t}` : t.length > 0 ? t : '.' - }, - normalize(e) { - if ((ze(e, 'path'), e.length === 0)) return '.' - let t = e.charCodeAt(0) === dt, - n = e.charCodeAt(e.length - 1) === dt - return ( - (e = Uo(e, !t, '/', gl)), - e.length === 0 ? (t ? '/' : n ? './' : '.') : (n && (e += '/'), t ? `/${e}` : e) - ) - }, - isAbsolute(e) { - return ze(e, 'path'), e.length > 0 && e.charCodeAt(0) === dt - }, - join(...e) { - if (e.length === 0) return '.' - let t - for (let n = 0; n < e.length; ++n) { - let r = e[n] - ze(r, 'path'), r.length > 0 && (t === void 0 ? (t = r) : (t += `/${r}`)) - } - return t === void 0 ? '.' : pt.normalize(t) - }, - relative(e, t) { - if ( - (ze(e, 'from'), - ze(t, 'to'), - e === t || ((e = pt.resolve(e)), (t = pt.resolve(t)), e === t)) - ) - return '' - let n = 1, - r = e.length, - i = r - n, - s = 1, - o = t.length - s, - a = i < o ? i : o, - u = -1, - l = 0 - for (; l < a; l++) { - let d = e.charCodeAt(n + l) - if (d !== t.charCodeAt(s + l)) break - d === dt && (u = l) - } - if (l === a) - if (o > a) { - if (t.charCodeAt(s + l) === dt) return t.slice(s + l + 1) - if (l === 0) return t.slice(s + l) - } else i > a && (e.charCodeAt(n + l) === dt ? (u = l) : l === 0 && (u = 0)) - let c = '' - for (l = n + u + 1; l <= r; ++l) - (l === r || e.charCodeAt(l) === dt) && (c += c.length === 0 ? '..' : '/..') - return `${c}${t.slice(s + u)}` - }, - toNamespacedPath(e) { - return e - }, - dirname(e) { - if ((ze(e, 'path'), e.length === 0)) return '.' - let t = e.charCodeAt(0) === dt, - n = -1, - r = !0 - for (let i = e.length - 1; i >= 1; --i) - if (e.charCodeAt(i) === dt) { - if (!r) { - n = i - break - } - } else r = !1 - return n === -1 ? (t ? '/' : '.') : t && n === 1 ? '//' : e.slice(0, n) - }, - basename(e, t) { - t !== void 0 && ze(t, 'ext'), ze(e, 'path') - let n = 0, - r = -1, - i = !0, - s - if (t !== void 0 && t.length > 0 && t.length <= e.length) { - if (t === e) return '' - let o = t.length - 1, - a = -1 - for (s = e.length - 1; s >= 0; --s) { - let u = e.charCodeAt(s) - if (u === dt) { - if (!i) { - n = s + 1 - break - } - } else - a === -1 && ((i = !1), (a = s + 1)), - o >= 0 && (u === t.charCodeAt(o) ? --o === -1 && (r = s) : ((o = -1), (r = a))) - } - return n === r ? (r = a) : r === -1 && (r = e.length), e.slice(n, r) - } - for (s = e.length - 1; s >= 0; --s) - if (e.charCodeAt(s) === dt) { - if (!i) { - n = s + 1 - break - } - } else r === -1 && ((i = !1), (r = s + 1)) - return r === -1 ? '' : e.slice(n, r) - }, - extname(e) { - ze(e, 'path') - let t = -1, - n = 0, - r = -1, - i = !0, - s = 0 - for (let o = e.length - 1; o >= 0; --o) { - let a = e.charCodeAt(o) - if (a === dt) { - if (!i) { - n = o + 1 - break - } - continue - } - r === -1 && ((i = !1), (r = o + 1)), - a === nr ? (t === -1 ? (t = o) : s !== 1 && (s = 1)) : t !== -1 && (s = -1) - } - return t === -1 || r === -1 || s === 0 || (s === 1 && t === r - 1 && t === n + 1) - ? '' - : e.slice(t, r) - }, - format: Jf.bind(null, '/'), - parse(e) { - ze(e, 'path') - let t = { root: '', dir: '', base: '', ext: '', name: '' } - if (e.length === 0) return t - let n = e.charCodeAt(0) === dt, - r - n ? ((t.root = '/'), (r = 1)) : (r = 0) - let i = -1, - s = 0, - o = -1, - a = !0, - u = e.length - 1, - l = 0 - for (; u >= r; --u) { - let c = e.charCodeAt(u) - if (c === dt) { - if (!a) { - s = u + 1 - break - } - continue - } - o === -1 && ((a = !1), (o = u + 1)), - c === nr ? (i === -1 ? (i = u) : l !== 1 && (l = 1)) : i !== -1 && (l = -1) - } - if (o !== -1) { - let c = s === 0 && n ? 1 : s - i === -1 || l === 0 || (l === 1 && i === o - 1 && i === s + 1) - ? (t.base = t.name = e.slice(c, o)) - : ((t.name = e.slice(c, i)), (t.base = e.slice(c, o)), (t.ext = e.slice(i, o))) - } - return s > 0 ? (t.dir = e.slice(0, s - 1)) : n && (t.dir = '/'), t - }, - sep: '/', - delimiter: ':', - win32: null, - posix: null - } - pt.win32 = vt.win32 = vt - pt.posix = vt.posix = pt - var yE = On ? vt.normalize : pt.normalize, - Xf = On ? vt.join : pt.join, - xE = On ? vt.resolve : pt.resolve, - _E = On ? vt.relative : pt.relative, - NE = On ? vt.dirname : pt.dirname, - TE = On ? vt.basename : pt.basename, - SE = On ? vt.extname : pt.extname, - AE = On ? vt.sep : pt.sep - var W4 = /^\w[\w\d+.-]*$/, - Q4 = /^\//, - z4 = /^\/\// - function Y4(e, t) { - if (!e.scheme && t) - throw new Error( - `[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}` - ) - if (e.scheme && !W4.test(e.scheme)) - throw new Error('[UriError]: Scheme contains illegal characters.') - if (e.path) { - if (e.authority) { - if (!Q4.test(e.path)) - throw new Error( - '[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character' - ) - } else if (z4.test(e.path)) - throw new Error( - '[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")' - ) - } - } - function J4(e, t) { - return !e && !t ? 'file' : e - } - function X4(e, t) { - switch (e) { - case 'https': - case 'http': - case 'file': - t ? t[0] !== rn && (t = rn + t) : (t = rn) - break - } - return t - } - var Oe = '', - rn = '/', - K4 = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/, - _t = class e { - static isUri(t) { - return t instanceof e - ? !0 - : t - ? typeof t.authority == 'string' && - typeof t.fragment == 'string' && - typeof t.path == 'string' && - typeof t.query == 'string' && - typeof t.scheme == 'string' && - typeof t.fsPath == 'string' && - typeof t.with == 'function' && - typeof t.toString == 'function' - : !1 - } - constructor(t, n, r, i, s, o = !1) { - typeof t == 'object' - ? ((this.scheme = t.scheme || Oe), - (this.authority = t.authority || Oe), - (this.path = t.path || Oe), - (this.query = t.query || Oe), - (this.fragment = t.fragment || Oe)) - : ((this.scheme = J4(t, o)), - (this.authority = n || Oe), - (this.path = X4(this.scheme, r || Oe)), - (this.query = i || Oe), - (this.fragment = s || Oe), - Y4(this, o)) - } - get fsPath() { - return Dl(this, !1) - } - with(t) { - if (!t) return this - let { scheme: n, authority: r, path: i, query: s, fragment: o } = t - return ( - n === void 0 ? (n = this.scheme) : n === null && (n = Oe), - r === void 0 ? (r = this.authority) : r === null && (r = Oe), - i === void 0 ? (i = this.path) : i === null && (i = Oe), - s === void 0 ? (s = this.query) : s === null && (s = Oe), - o === void 0 ? (o = this.fragment) : o === null && (o = Oe), - n === this.scheme && - r === this.authority && - i === this.path && - s === this.query && - o === this.fragment - ? this - : new rr(n, r, i, s, o) - ) - } - static parse(t, n = !1) { - let r = K4.exec(t) - return r - ? new rr(r[2] || Oe, $o(r[4] || Oe), $o(r[5] || Oe), $o(r[7] || Oe), $o(r[9] || Oe), n) - : new rr(Oe, Oe, Oe, Oe, Oe) - } - static file(t) { - let n = Oe - if ((xr && (t = t.replace(/\\/g, rn)), t[0] === rn && t[1] === rn)) { - let r = t.indexOf(rn, 2) - r === -1 - ? ((n = t.substring(2)), (t = rn)) - : ((n = t.substring(2, r)), (t = t.substring(r) || rn)) - } - return new rr('file', n, t, Oe, Oe) - } - static from(t, n) { - return new rr(t.scheme, t.authority, t.path, t.query, t.fragment, n) - } - static joinPath(t, ...n) { - if (!t.path) throw new Error('[UriError]: cannot call joinPath on URI without path') - let r - return ( - xr && t.scheme === 'file' - ? (r = e.file(vt.join(Dl(t, !0), ...n)).path) - : (r = pt.join(t.path, ...n)), - t.with({ path: r }) - ) - } - toString(t = !1) { - return vl(this, t) - } - toJSON() { - return this - } - static revive(t) { - if (t) { - if (t instanceof e) return t - { - let n = new rr(t) - return ( - (n._formatted = t.external ?? null), - (n._fsPath = t._sep === td ? t.fsPath ?? null : null), - n - ) - } - } else return t - } - }, - td = xr ? 1 : void 0, - rr = class extends _t { - constructor() { - super(...arguments), (this._formatted = null), (this._fsPath = null) - } - get fsPath() { - return this._fsPath || (this._fsPath = Dl(this, !1)), this._fsPath - } - toString(t = !1) { - return t - ? vl(this, !0) - : (this._formatted || (this._formatted = vl(this, !1)), this._formatted) - } - toJSON() { - let t = { $mid: 1 } - return ( - this._fsPath && ((t.fsPath = this._fsPath), (t._sep = td)), - this._formatted && (t.external = this._formatted), - this.path && (t.path = this.path), - this.scheme && (t.scheme = this.scheme), - this.authority && (t.authority = this.authority), - this.query && (t.query = this.query), - this.fragment && (t.fragment = this.fragment), - t - ) - } - }, - nd = { - 58: '%3A', - 47: '%2F', - 63: '%3F', - 35: '%23', - 91: '%5B', - 93: '%5D', - 64: '%40', - 33: '%21', - 36: '%24', - 38: '%26', - 39: '%27', - 40: '%28', - 41: '%29', - 42: '%2A', - 43: '%2B', - 44: '%2C', - 59: '%3B', - 61: '%3D', - 32: '%20' - } - function Zf(e, t, n) { - let r, - i = -1 - for (let s = 0; s < e.length; s++) { - let o = e.charCodeAt(s) - if ( - (o >= 97 && o <= 122) || - (o >= 65 && o <= 90) || - (o >= 48 && o <= 57) || - o === 45 || - o === 46 || - o === 95 || - o === 126 || - (t && o === 47) || - (n && o === 91) || - (n && o === 93) || - (n && o === 58) - ) - i !== -1 && ((r += encodeURIComponent(e.substring(i, s))), (i = -1)), - r !== void 0 && (r += e.charAt(s)) - else { - r === void 0 && (r = e.substr(0, s)) - let a = nd[o] - a !== void 0 - ? (i !== -1 && ((r += encodeURIComponent(e.substring(i, s))), (i = -1)), (r += a)) - : i === -1 && (i = s) - } - } - return i !== -1 && (r += encodeURIComponent(e.substring(i))), r !== void 0 ? r : e - } - function Z4(e) { - let t - for (let n = 0; n < e.length; n++) { - let r = e.charCodeAt(n) - r === 35 || r === 63 - ? (t === void 0 && (t = e.substr(0, n)), (t += nd[r])) - : t !== void 0 && (t += e[n]) - } - return t !== void 0 ? t : e - } - function Dl(e, t) { - let n - return ( - e.authority && e.path.length > 1 && e.scheme === 'file' - ? (n = `//${e.authority}${e.path}`) - : e.path.charCodeAt(0) === 47 && - ((e.path.charCodeAt(1) >= 65 && e.path.charCodeAt(1) <= 90) || - (e.path.charCodeAt(1) >= 97 && e.path.charCodeAt(1) <= 122)) && - e.path.charCodeAt(2) === 58 - ? t - ? (n = e.path.substr(1)) - : (n = e.path[1].toLowerCase() + e.path.substr(2)) - : (n = e.path), - xr && (n = n.replace(/\//g, '\\')), - n - ) - } - function vl(e, t) { - let n = t ? Z4 : Zf, - r = '', - { scheme: i, authority: s, path: o, query: a, fragment: u } = e - if ((i && ((r += i), (r += ':')), (s || i === 'file') && ((r += rn), (r += rn)), s)) { - let l = s.indexOf('@') - if (l !== -1) { - let c = s.substr(0, l) - ;(s = s.substr(l + 1)), - (l = c.lastIndexOf(':')), - l === -1 - ? (r += n(c, !1, !1)) - : ((r += n(c.substr(0, l), !1, !1)), (r += ':'), (r += n(c.substr(l + 1), !1, !0))), - (r += '@') - } - ;(s = s.toLowerCase()), - (l = s.lastIndexOf(':')), - l === -1 ? (r += n(s, !1, !0)) : ((r += n(s.substr(0, l), !1, !0)), (r += s.substr(l))) - } - if (o) { - if (o.length >= 3 && o.charCodeAt(0) === 47 && o.charCodeAt(2) === 58) { - let l = o.charCodeAt(1) - l >= 65 && l <= 90 && (o = `/${String.fromCharCode(l + 32)}:${o.substr(3)}`) - } else if (o.length >= 2 && o.charCodeAt(1) === 58) { - let l = o.charCodeAt(0) - l >= 65 && l <= 90 && (o = `${String.fromCharCode(l + 32)}:${o.substr(2)}`) - } - r += n(o, !0, !1) - } - return ( - a && ((r += '?'), (r += n(a, !1, !1))), u && ((r += '#'), (r += t ? u : Zf(u, !1, !1))), r - ) - } - function rd(e) { - try { - return decodeURIComponent(e) - } catch { - return e.length > 3 ? e.substr(0, 3) + rd(e.substr(3)) : e - } - } - var ed = /(%[0-9A-Za-z][0-9A-Za-z])+/g - function $o(e) { - return e.match(ed) ? e.replace(ed, (t) => rd(t)) : e - } - var ir - ;(function (e) { - ;(e.inMemory = 'inmemory'), - (e.vscode = 'vscode'), - (e.internal = 'private'), - (e.walkThrough = 'walkThrough'), - (e.walkThroughSnippet = 'walkThroughSnippet'), - (e.http = 'http'), - (e.https = 'https'), - (e.file = 'file'), - (e.mailto = 'mailto'), - (e.untitled = 'untitled'), - (e.data = 'data'), - (e.command = 'command'), - (e.vscodeRemote = 'vscode-remote'), - (e.vscodeRemoteResource = 'vscode-remote-resource'), - (e.vscodeManagedRemoteResource = 'vscode-managed-remote-resource'), - (e.vscodeUserData = 'vscode-userdata'), - (e.vscodeCustomEditor = 'vscode-custom-editor'), - (e.vscodeNotebookCell = 'vscode-notebook-cell'), - (e.vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata'), - (e.vscodeNotebookCellMetadataDiff = 'vscode-notebook-cell-metadata-diff'), - (e.vscodeNotebookCellOutput = 'vscode-notebook-cell-output'), - (e.vscodeNotebookCellOutputDiff = 'vscode-notebook-cell-output-diff'), - (e.vscodeNotebookMetadata = 'vscode-notebook-metadata'), - (e.vscodeInteractiveInput = 'vscode-interactive-input'), - (e.vscodeSettings = 'vscode-settings'), - (e.vscodeWorkspaceTrust = 'vscode-workspace-trust'), - (e.vscodeTerminal = 'vscode-terminal'), - (e.vscodeChatCodeBlock = 'vscode-chat-code-block'), - (e.vscodeChatCodeCompareBlock = 'vscode-chat-code-compare-block'), - (e.vscodeChatSesssion = 'vscode-chat-editor'), - (e.webviewPanel = 'webview-panel'), - (e.vscodeWebview = 'vscode-webview'), - (e.extension = 'extension'), - (e.vscodeFileResource = 'vscode-file'), - (e.tmp = 'tmp'), - (e.vsls = 'vsls'), - (e.vscodeSourceControl = 'vscode-scm'), - (e.commentsInput = 'comment'), - (e.codeSetting = 'code-setting'), - (e.outputChannel = 'output') - })(ir || (ir = {})) - var e5 = 'tkn', - bl = class { - constructor() { - ;(this._hosts = Object.create(null)), - (this._ports = Object.create(null)), - (this._connectionTokens = Object.create(null)), - (this._preferredWebSchema = 'http'), - (this._delegate = null), - (this._serverRootPath = '/') - } - setPreferredWebSchema(t) { - this._preferredWebSchema = t - } - get _remoteResourcesPath() { - return pt.join(this._serverRootPath, ir.vscodeRemoteResource) - } - rewrite(t) { - if (this._delegate) - try { - return this._delegate(t) - } catch (a) { - return In(a), t - } - let n = t.authority, - r = this._hosts[n] - r && r.indexOf(':') !== -1 && r.indexOf('[') === -1 && (r = `[${r}]`) - let i = this._ports[n], - s = this._connectionTokens[n], - o = `path=${encodeURIComponent(t.path)}` - return ( - typeof s == 'string' && (o += `&${e5}=${encodeURIComponent(s)}`), - _t.from({ - scheme: dl ? this._preferredWebSchema : ir.vscodeRemoteResource, - authority: `${r}:${i}`, - path: this._remoteResourcesPath, - query: o - }) - ) - } - }, - t5 = new bl(), - n5 = 'vscode-app', - El = class e { - static { - this.FALLBACK_AUTHORITY = n5 - } - asBrowserUri(t) { - let n = this.toUri(t) - return this.uriToBrowserUri(n) - } - uriToBrowserUri(t) { - return t.scheme === ir.vscodeRemote - ? t5.rewrite(t) - : t.scheme === ir.file && - (Bf || Vf === `${ir.vscodeFileResource}://${e.FALLBACK_AUTHORITY}`) - ? t.with({ - scheme: ir.vscodeFileResource, - authority: t.authority || e.FALLBACK_AUTHORITY, - query: null, - fragment: null - }) - : t - } - toUri(t, n) { - if (_t.isUri(t)) return t - if (globalThis._VSCODE_FILE_ROOT) { - let r = globalThis._VSCODE_FILE_ROOT - if (/^\w[\w\d+.-]*:\/\//.test(r)) return _t.joinPath(_t.parse(r, !0), t) - let i = Xf(r, t) - return _t.file(i) - } - return _t.parse(n.toUrl(t)) - } - }, - jo = new El(), - id - ;(function (e) { - let t = new Map([ - ['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }], - ['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }], - [ - '3', - { - 'Cross-Origin-Opener-Policy': 'same-origin', - 'Cross-Origin-Embedder-Policy': 'require-corp' - } - ] - ]) - e.CoopAndCoep = Object.freeze(t.get('3')) - let n = 'vscode-coi' - function r(s) { - let o - typeof s == 'string' - ? (o = new URL(s).searchParams) - : s instanceof URL - ? (o = s.searchParams) - : _t.isUri(s) && (o = new URL(s.toString(!0)).searchParams) - let a = o?.get(n) - if (a) return t.get(a) - } - e.getHeadersFromQuery = r - function i(s, o, a) { - if (!globalThis.crossOriginIsolated) return - let u = o && a ? '3' : a ? '2' : '1' - s instanceof URLSearchParams ? s.set(n, u) : (s[n] = u) - } - e.addSearchParam = i - })(id || (id = {})) - var r5 = !0, - yl = 'default', - i5 = '$initialize' - var xl = class { - constructor(t, n, r, i, s) { - ;(this.vsWorker = t), - (this.req = n), - (this.channel = r), - (this.method = i), - (this.args = s), - (this.type = 0) - } - }, - qo = class { - constructor(t, n, r, i) { - ;(this.vsWorker = t), (this.seq = n), (this.res = r), (this.err = i), (this.type = 1) - } - }, - _l = class { - constructor(t, n, r, i, s) { - ;(this.vsWorker = t), - (this.req = n), - (this.channel = r), - (this.eventName = i), - (this.arg = s), - (this.type = 2) - } - }, - Nl = class { - constructor(t, n, r) { - ;(this.vsWorker = t), (this.req = n), (this.event = r), (this.type = 3) - } - }, - Tl = class { - constructor(t, n) { - ;(this.vsWorker = t), (this.req = n), (this.type = 4) - } - }, - Sl = class { - constructor(t) { - ;(this._workerId = -1), - (this._handler = t), - (this._lastSentReq = 0), - (this._pendingReplies = Object.create(null)), - (this._pendingEmitters = new Map()), - (this._pendingEvents = new Map()) - } - setWorkerId(t) { - this._workerId = t - } - sendMessage(t, n, r) { - let i = String(++this._lastSentReq) - return new Promise((s, o) => { - ;(this._pendingReplies[i] = { resolve: s, reject: o }), - this._send(new xl(this._workerId, i, t, n, r)) - }) - } - listen(t, n, r) { - let i = null, - s = new lt({ - onWillAddFirstListener: () => { - ;(i = String(++this._lastSentReq)), - this._pendingEmitters.set(i, s), - this._send(new _l(this._workerId, i, t, n, r)) - }, - onDidRemoveLastListener: () => { - this._pendingEmitters.delete(i), this._send(new Tl(this._workerId, i)), (i = null) - } - }) - return s.event - } - handleMessage(t) { - !t || - !t.vsWorker || - (this._workerId !== -1 && t.vsWorker !== this._workerId) || - this._handleMessage(t) - } - createProxyToRemoteChannel(t, n) { - let r = { - get: (i, s) => ( - typeof s == 'string' && - !i[s] && - (od(s) - ? (i[s] = (o) => this.listen(t, s, o)) - : sd(s) - ? (i[s] = this.listen(t, s, void 0)) - : s.charCodeAt(0) === 36 && - (i[s] = async (...o) => (await n?.(), this.sendMessage(t, s, o)))), - i[s] - ) - } - return new Proxy(Object.create(null), r) - } - _handleMessage(t) { - switch (t.type) { - case 1: - return this._handleReplyMessage(t) - case 0: - return this._handleRequestMessage(t) - case 2: - return this._handleSubscribeEventMessage(t) - case 3: - return this._handleEventMessage(t) - case 4: - return this._handleUnsubscribeEventMessage(t) - } - } - _handleReplyMessage(t) { - if (!this._pendingReplies[t.seq]) { - console.warn('Got reply to unknown seq') - return - } - let n = this._pendingReplies[t.seq] - if ((delete this._pendingReplies[t.seq], t.err)) { - let r = t.err - t.err.$isError && - ((r = new Error()), - (r.name = t.err.name), - (r.message = t.err.message), - (r.stack = t.err.stack)), - n.reject(r) - return - } - n.resolve(t.res) - } - _handleRequestMessage(t) { - let n = t.req - this._handler.handleMessage(t.channel, t.method, t.args).then( - (i) => { - this._send(new qo(this._workerId, n, i, void 0)) - }, - (i) => { - i.detail instanceof Error && (i.detail = el(i.detail)), - this._send(new qo(this._workerId, n, void 0, el(i))) - } - ) - } - _handleSubscribeEventMessage(t) { - let n = t.req, - r = this._handler.handleEvent( - t.channel, - t.eventName, - t.arg - )((i) => { - this._send(new Nl(this._workerId, n, i)) - }) - this._pendingEvents.set(n, r) - } - _handleEventMessage(t) { - if (!this._pendingEmitters.has(t.req)) { - console.warn('Got event for unknown req') - return - } - this._pendingEmitters.get(t.req).fire(t.event) - } - _handleUnsubscribeEventMessage(t) { - if (!this._pendingEvents.has(t.req)) { - console.warn('Got unsubscribe for unknown req') - return - } - this._pendingEvents.get(t.req).dispose(), this._pendingEvents.delete(t.req) - } - _send(t) { - let n = [] - if (t.type === 0) - for (let r = 0; r < t.args.length; r++) - t.args[r] instanceof ArrayBuffer && n.push(t.args[r]) - else t.type === 1 && t.res instanceof ArrayBuffer && n.push(t.res) - this._handler.sendMessage(t, n) - } - } - function sd(e) { - return e[0] === 'o' && e[1] === 'n' && pl(e.charCodeAt(2)) - } - function od(e) { - return /^onDynamic/.test(e) && pl(e.charCodeAt(9)) - } - var Go = class { - constructor(t, n) { - ;(this._localChannels = new Map()), - (this._remoteChannels = new Map()), - (this._requestHandlerFactory = n), - (this._requestHandler = null), - (this._protocol = new Sl({ - sendMessage: (r, i) => { - t(r, i) - }, - handleMessage: (r, i, s) => this._handleMessage(r, i, s), - handleEvent: (r, i, s) => this._handleEvent(r, i, s) - })) - } - onmessage(t) { - this._protocol.handleMessage(t) - } - _handleMessage(t, n, r) { - if (t === yl && n === i5) return this.initialize(r[0], r[1], r[2]) - let i = t === yl ? this._requestHandler : this._localChannels.get(t) - if (!i) return Promise.reject(new Error(`Missing channel ${t} on worker thread`)) - if (typeof i[n] != 'function') - return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`)) - try { - return Promise.resolve(i[n].apply(i, r)) - } catch (s) { - return Promise.reject(s) - } - } - _handleEvent(t, n, r) { - let i = t === yl ? this._requestHandler : this._localChannels.get(t) - if (!i) throw new Error(`Missing channel ${t} on worker thread`) - if (od(n)) { - let s = i[n].call(i, r) - if (typeof s != 'function') - throw new Error(`Missing dynamic event ${n} on request handler.`) - return s - } - if (sd(n)) { - let s = i[n] - if (typeof s != 'function') throw new Error(`Missing event ${n} on request handler.`) - return s - } - throw new Error(`Malformed event name ${n}`) - } - getChannel(t) { - if (!this._remoteChannels.has(t)) { - let n = this._protocol.createProxyToRemoteChannel(t) - this._remoteChannels.set(t, n) - } - return this._remoteChannels.get(t) - } - async initialize(t, n, r) { - if ((this._protocol.setWorkerId(t), this._requestHandlerFactory)) { - this._requestHandler = this._requestHandlerFactory(this) - return - } - return ( - n && - (typeof n.baseUrl < 'u' && delete n.baseUrl, - typeof n.paths < 'u' && typeof n.paths.vs < 'u' && delete n.paths.vs, - typeof n.trustedTypesPolicy < 'u' && delete n.trustedTypesPolicy, - (n.catchError = !0), - globalThis.require.config(n)), - r5 - ? import(`${jo.asBrowserUri(`${r}.js`).toString(!0)}`).then((s) => { - if (((this._requestHandler = s.create(this)), !this._requestHandler)) - throw new Error('No RequestHandler!') - }) - : new Promise((i, s) => { - let o = globalThis.require - o( - [r], - (a) => { - if (((this._requestHandler = a.create(this)), !this._requestHandler)) { - s(new Error('No RequestHandler!')) - return - } - i() - }, - s - ) - }) - ) - } - } - var sn = class { - constructor(t, n, r, i) { - ;(this.originalStart = t), - (this.originalLength = n), - (this.modifiedStart = r), - (this.modifiedLength = i) - } - getOriginalEnd() { - return this.originalStart + this.originalLength - } - getModifiedEnd() { - return this.modifiedStart + this.modifiedLength - } - } - function ad(e, t) { - return ((t << 5) - t + e) | 0 - } - function cd(e, t) { - t = ad(149417, t) - for (let n = 0, r = e.length; n < r; n++) t = ad(e.charCodeAt(n), t) - return t - } - function Al(e, t, n = 32) { - let r = n - t, - i = ~((1 << r) - 1) - return ((e << t) | ((i & e) >>> r)) >>> 0 - } - function ud(e, t = 0, n = e.byteLength, r = 0) { - for (let i = 0; i < n; i++) e[t + i] = r - } - function s5(e, t, n = '0') { - for (; e.length < t; ) e = n + e - return e - } - function xs(e, t = 32) { - return e instanceof ArrayBuffer - ? Array.from(new Uint8Array(e)) - .map((n) => n.toString(16).padStart(2, '0')) - .join('') - : s5((e >>> 0).toString(16), t / 4) - } - var ld = class e { - static { - this._bigBlock32 = new DataView(new ArrayBuffer(320)) - } - constructor() { - ;(this._h0 = 1732584193), - (this._h1 = 4023233417), - (this._h2 = 2562383102), - (this._h3 = 271733878), - (this._h4 = 3285377520), - (this._buff = new Uint8Array(64 + 3)), - (this._buffDV = new DataView(this._buff.buffer)), - (this._buffLen = 0), - (this._totalLen = 0), - (this._leftoverHighSurrogate = 0), - (this._finished = !1) - } - update(t) { - let n = t.length - if (n === 0) return - let r = this._buff, - i = this._buffLen, - s = this._leftoverHighSurrogate, - o, - a - for (s !== 0 ? ((o = s), (a = -1), (s = 0)) : ((o = t.charCodeAt(0)), (a = 0)); ; ) { - let u = o - if (di(o)) - if (a + 1 < n) { - let l = t.charCodeAt(a + 1) - Bo(l) ? (a++, (u = hl(o, l))) : (u = 65533) - } else { - s = o - break - } - else Bo(o) && (u = 65533) - if (((i = this._push(r, i, u)), a++, a < n)) o = t.charCodeAt(a) - else break - } - ;(this._buffLen = i), (this._leftoverHighSurrogate = s) - } - _push(t, n, r) { - return ( - r < 128 - ? (t[n++] = r) - : r < 2048 - ? ((t[n++] = 192 | ((r & 1984) >>> 6)), (t[n++] = 128 | ((r & 63) >>> 0))) - : r < 65536 - ? ((t[n++] = 224 | ((r & 61440) >>> 12)), - (t[n++] = 128 | ((r & 4032) >>> 6)), - (t[n++] = 128 | ((r & 63) >>> 0))) - : ((t[n++] = 240 | ((r & 1835008) >>> 18)), - (t[n++] = 128 | ((r & 258048) >>> 12)), - (t[n++] = 128 | ((r & 4032) >>> 6)), - (t[n++] = 128 | ((r & 63) >>> 0))), - n >= 64 && - (this._step(), - (n -= 64), - (this._totalLen += 64), - (t[0] = t[64 + 0]), - (t[1] = t[64 + 1]), - (t[2] = t[64 + 2])), - n - ) - } - digest() { - return ( - this._finished || - ((this._finished = !0), - this._leftoverHighSurrogate && - ((this._leftoverHighSurrogate = 0), - (this._buffLen = this._push(this._buff, this._buffLen, 65533))), - (this._totalLen += this._buffLen), - this._wrapUp()), - xs(this._h0) + xs(this._h1) + xs(this._h2) + xs(this._h3) + xs(this._h4) - ) - } - _wrapUp() { - ;(this._buff[this._buffLen++] = 128), - ud(this._buff, this._buffLen), - this._buffLen > 56 && (this._step(), ud(this._buff)) - let t = 8 * this._totalLen - this._buffDV.setUint32(56, Math.floor(t / 4294967296), !1), - this._buffDV.setUint32(60, t % 4294967296, !1), - this._step() - } - _step() { - let t = e._bigBlock32, - n = this._buffDV - for (let d = 0; d < 64; d += 4) t.setUint32(d, n.getUint32(d, !1), !1) - for (let d = 64; d < 320; d += 4) - t.setUint32( - d, - Al( - t.getUint32(d - 12, !1) ^ - t.getUint32(d - 32, !1) ^ - t.getUint32(d - 56, !1) ^ - t.getUint32(d - 64, !1), - 1 - ), - !1 - ) - let r = this._h0, - i = this._h1, - s = this._h2, - o = this._h3, - a = this._h4, - u, - l, - c - for (let d = 0; d < 80; d++) - d < 20 - ? ((u = (i & s) | (~i & o)), (l = 1518500249)) - : d < 40 - ? ((u = i ^ s ^ o), (l = 1859775393)) - : d < 60 - ? ((u = (i & s) | (i & o) | (s & o)), (l = 2400959708)) - : ((u = i ^ s ^ o), (l = 3395469782)), - (c = (Al(r, 5) + u + a + l + t.getUint32(d * 4, !1)) & 4294967295), - (a = o), - (o = s), - (s = Al(i, 30)), - (i = r), - (r = c) - ;(this._h0 = (this._h0 + r) & 4294967295), - (this._h1 = (this._h1 + i) & 4294967295), - (this._h2 = (this._h2 + s) & 4294967295), - (this._h3 = (this._h3 + o) & 4294967295), - (this._h4 = (this._h4 + a) & 4294967295) - } - } - var Ho = class { - constructor(t) { - this.source = t - } - getElements() { - let t = this.source, - n = new Int32Array(t.length) - for (let r = 0, i = t.length; r < i; r++) n[r] = t.charCodeAt(r) - return n - } - } - function fd(e, t, n) { - return new _s(new Ho(e), new Ho(t)).ComputeDiff(n).changes - } - var sr = class { - static Assert(t, n) { - if (!t) throw new Error(n) - } - }, - or = class { - static Copy(t, n, r, i, s) { - for (let o = 0; o < s; o++) r[i + o] = t[n + o] - } - static Copy2(t, n, r, i, s) { - for (let o = 0; o < s; o++) r[i + o] = t[n + o] - } - }, - Wo = class { - constructor() { - ;(this.m_changes = []), - (this.m_originalStart = 1073741824), - (this.m_modifiedStart = 1073741824), - (this.m_originalCount = 0), - (this.m_modifiedCount = 0) - } - MarkNextChange() { - ;(this.m_originalCount > 0 || this.m_modifiedCount > 0) && - this.m_changes.push( - new sn( - this.m_originalStart, - this.m_originalCount, - this.m_modifiedStart, - this.m_modifiedCount - ) - ), - (this.m_originalCount = 0), - (this.m_modifiedCount = 0), - (this.m_originalStart = 1073741824), - (this.m_modifiedStart = 1073741824) - } - AddOriginalElement(t, n) { - ;(this.m_originalStart = Math.min(this.m_originalStart, t)), - (this.m_modifiedStart = Math.min(this.m_modifiedStart, n)), - this.m_originalCount++ - } - AddModifiedElement(t, n) { - ;(this.m_originalStart = Math.min(this.m_originalStart, t)), - (this.m_modifiedStart = Math.min(this.m_modifiedStart, n)), - this.m_modifiedCount++ - } - getChanges() { - return ( - (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), - this.m_changes - ) - } - getReverseChanges() { - return ( - (this.m_originalCount > 0 || this.m_modifiedCount > 0) && this.MarkNextChange(), - this.m_changes.reverse(), - this.m_changes - ) - } - }, - _s = class e { - constructor(t, n, r = null) { - ;(this.ContinueProcessingPredicate = r), - (this._originalSequence = t), - (this._modifiedSequence = n) - let [i, s, o] = e._getElements(t), - [a, u, l] = e._getElements(n) - ;(this._hasStrings = o && l), - (this._originalStringElements = i), - (this._originalElementsOrHash = s), - (this._modifiedStringElements = a), - (this._modifiedElementsOrHash = u), - (this.m_forwardHistory = []), - (this.m_reverseHistory = []) - } - static _isStringArray(t) { - return t.length > 0 && typeof t[0] == 'string' - } - static _getElements(t) { - let n = t.getElements() - if (e._isStringArray(n)) { - let r = new Int32Array(n.length) - for (let i = 0, s = n.length; i < s; i++) r[i] = cd(n[i], 0) - return [n, r, !0] - } - return n instanceof Int32Array ? [[], n, !1] : [[], new Int32Array(n), !1] - } - ElementsAreEqual(t, n) { - return this._originalElementsOrHash[t] !== this._modifiedElementsOrHash[n] - ? !1 - : this._hasStrings - ? this._originalStringElements[t] === this._modifiedStringElements[n] - : !0 - } - ElementsAreStrictEqual(t, n) { - if (!this.ElementsAreEqual(t, n)) return !1 - let r = e._getStrictElement(this._originalSequence, t), - i = e._getStrictElement(this._modifiedSequence, n) - return r === i - } - static _getStrictElement(t, n) { - return typeof t.getStrictElement == 'function' ? t.getStrictElement(n) : null - } - OriginalElementsAreEqual(t, n) { - return this._originalElementsOrHash[t] !== this._originalElementsOrHash[n] - ? !1 - : this._hasStrings - ? this._originalStringElements[t] === this._originalStringElements[n] - : !0 - } - ModifiedElementsAreEqual(t, n) { - return this._modifiedElementsOrHash[t] !== this._modifiedElementsOrHash[n] - ? !1 - : this._hasStrings - ? this._modifiedStringElements[t] === this._modifiedStringElements[n] - : !0 - } - ComputeDiff(t) { - return this._ComputeDiff( - 0, - this._originalElementsOrHash.length - 1, - 0, - this._modifiedElementsOrHash.length - 1, - t - ) - } - _ComputeDiff(t, n, r, i, s) { - let o = [!1], - a = this.ComputeDiffRecursive(t, n, r, i, o) - return s && (a = this.PrettifyChanges(a)), { quitEarly: o[0], changes: a } - } - ComputeDiffRecursive(t, n, r, i, s) { - for (s[0] = !1; t <= n && r <= i && this.ElementsAreEqual(t, r); ) t++, r++ - for (; n >= t && i >= r && this.ElementsAreEqual(n, i); ) n--, i-- - if (t > n || r > i) { - let d - return ( - r <= i - ? (sr.Assert(t === n + 1, 'originalStart should only be one more than originalEnd'), - (d = [new sn(t, 0, r, i - r + 1)])) - : t <= n - ? (sr.Assert(r === i + 1, 'modifiedStart should only be one more than modifiedEnd'), - (d = [new sn(t, n - t + 1, r, 0)])) - : (sr.Assert(t === n + 1, 'originalStart should only be one more than originalEnd'), - sr.Assert(r === i + 1, 'modifiedStart should only be one more than modifiedEnd'), - (d = [])), - d - ) - } - let o = [0], - a = [0], - u = this.ComputeRecursionPoint(t, n, r, i, o, a, s), - l = o[0], - c = a[0] - if (u !== null) return u - if (!s[0]) { - let d = this.ComputeDiffRecursive(t, l, r, c, s), - h = [] - return ( - s[0] - ? (h = [new sn(l + 1, n - (l + 1) + 1, c + 1, i - (c + 1) + 1)]) - : (h = this.ComputeDiffRecursive(l + 1, n, c + 1, i, s)), - this.ConcatenateChanges(d, h) - ) - } - return [new sn(t, n - t + 1, r, i - r + 1)] - } - WALKTRACE(t, n, r, i, s, o, a, u, l, c, d, h, m, g, v, N, _, w) { - let C = null, - S = null, - k = new Wo(), - M = n, - I = r, - B = m[0] - N[0] - i, - L = -1073741824, - A = this.m_forwardHistory.length - 1 - do { - let X = B + t - X === M || (X < I && l[X - 1] < l[X + 1]) - ? ((d = l[X + 1]), - (g = d - B - i), - d < L && k.MarkNextChange(), - (L = d), - k.AddModifiedElement(d + 1, g), - (B = X + 1 - t)) - : ((d = l[X - 1] + 1), - (g = d - B - i), - d < L && k.MarkNextChange(), - (L = d - 1), - k.AddOriginalElement(d, g + 1), - (B = X - 1 - t)), - A >= 0 && ((l = this.m_forwardHistory[A]), (t = l[0]), (M = 1), (I = l.length - 1)) - } while (--A >= -1) - if (((C = k.getReverseChanges()), w[0])) { - let X = m[0] + 1, - z = N[0] + 1 - if (C !== null && C.length > 0) { - let fe = C[C.length - 1] - ;(X = Math.max(X, fe.getOriginalEnd())), (z = Math.max(z, fe.getModifiedEnd())) - } - S = [new sn(X, h - X + 1, z, v - z + 1)] - } else { - ;(k = new Wo()), - (M = o), - (I = a), - (B = m[0] - N[0] - u), - (L = 1073741824), - (A = _ ? this.m_reverseHistory.length - 1 : this.m_reverseHistory.length - 2) - do { - let X = B + s - X === M || (X < I && c[X - 1] >= c[X + 1]) - ? ((d = c[X + 1] - 1), - (g = d - B - u), - d > L && k.MarkNextChange(), - (L = d + 1), - k.AddOriginalElement(d + 1, g + 1), - (B = X + 1 - s)) - : ((d = c[X - 1]), - (g = d - B - u), - d > L && k.MarkNextChange(), - (L = d), - k.AddModifiedElement(d + 1, g + 1), - (B = X - 1 - s)), - A >= 0 && ((c = this.m_reverseHistory[A]), (s = c[0]), (M = 1), (I = c.length - 1)) - } while (--A >= -1) - S = k.getChanges() - } - return this.ConcatenateChanges(C, S) - } - ComputeRecursionPoint(t, n, r, i, s, o, a) { - let u = 0, - l = 0, - c = 0, - d = 0, - h = 0, - m = 0 - t--, r--, (s[0] = 0), (o[0] = 0), (this.m_forwardHistory = []), (this.m_reverseHistory = []) - let g = n - t + (i - r), - v = g + 1, - N = new Int32Array(v), - _ = new Int32Array(v), - w = i - r, - C = n - t, - S = t - r, - k = n - i, - I = (C - w) % 2 === 0 - ;(N[w] = t), (_[C] = n), (a[0] = !1) - for (let B = 1; B <= g / 2 + 1; B++) { - let L = 0, - A = 0 - ;(c = this.ClipDiagonalBound(w - B, B, w, v)), - (d = this.ClipDiagonalBound(w + B, B, w, v)) - for (let z = c; z <= d; z += 2) { - z === c || (z < d && N[z - 1] < N[z + 1]) ? (u = N[z + 1]) : (u = N[z - 1] + 1), - (l = u - (z - w) - S) - let fe = u - for (; u < n && l < i && this.ElementsAreEqual(u + 1, l + 1); ) u++, l++ - if ( - ((N[z] = u), - u + l > L + A && ((L = u), (A = l)), - !I && Math.abs(z - C) <= B - 1 && u >= _[z]) - ) - return ( - (s[0] = u), - (o[0] = l), - fe <= _[z] && 1447 > 0 && B <= 1447 + 1 - ? this.WALKTRACE(w, c, d, S, C, h, m, k, N, _, u, n, s, l, i, o, I, a) - : null - ) - } - let X = (L - t + (A - r) - B) / 2 - if (this.ContinueProcessingPredicate !== null && !this.ContinueProcessingPredicate(L, X)) - return ( - (a[0] = !0), - (s[0] = L), - (o[0] = A), - X > 0 && 1447 > 0 && B <= 1447 + 1 - ? this.WALKTRACE(w, c, d, S, C, h, m, k, N, _, u, n, s, l, i, o, I, a) - : (t++, r++, [new sn(t, n - t + 1, r, i - r + 1)]) - ) - ;(h = this.ClipDiagonalBound(C - B, B, C, v)), - (m = this.ClipDiagonalBound(C + B, B, C, v)) - for (let z = h; z <= m; z += 2) { - z === h || (z < m && _[z - 1] >= _[z + 1]) ? (u = _[z + 1] - 1) : (u = _[z - 1]), - (l = u - (z - C) - k) - let fe = u - for (; u > t && l > r && this.ElementsAreEqual(u, l); ) u--, l-- - if (((_[z] = u), I && Math.abs(z - w) <= B && u <= N[z])) - return ( - (s[0] = u), - (o[0] = l), - fe >= N[z] && 1447 > 0 && B <= 1447 + 1 - ? this.WALKTRACE(w, c, d, S, C, h, m, k, N, _, u, n, s, l, i, o, I, a) - : null - ) - } - if (B <= 1447) { - let z = new Int32Array(d - c + 2) - ;(z[0] = w - c + 1), - or.Copy2(N, c, z, 1, d - c + 1), - this.m_forwardHistory.push(z), - (z = new Int32Array(m - h + 2)), - (z[0] = C - h + 1), - or.Copy2(_, h, z, 1, m - h + 1), - this.m_reverseHistory.push(z) - } - } - return this.WALKTRACE(w, c, d, S, C, h, m, k, N, _, u, n, s, l, i, o, I, a) - } - PrettifyChanges(t) { - for (let n = 0; n < t.length; n++) { - let r = t[n], - i = n < t.length - 1 ? t[n + 1].originalStart : this._originalElementsOrHash.length, - s = n < t.length - 1 ? t[n + 1].modifiedStart : this._modifiedElementsOrHash.length, - o = r.originalLength > 0, - a = r.modifiedLength > 0 - for ( - ; - r.originalStart + r.originalLength < i && - r.modifiedStart + r.modifiedLength < s && - (!o || - this.OriginalElementsAreEqual(r.originalStart, r.originalStart + r.originalLength)) && - (!a || - this.ModifiedElementsAreEqual(r.modifiedStart, r.modifiedStart + r.modifiedLength)); +`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}},l4=new Ku;function In(e){c4(e)||l4.onUnexpectedError(e)}function el(e){if(e instanceof Error){let{name:t,message:n}=e,r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r,noTelemetry:ms.isErrorNoTelemetry(e)}}return e}var Zu="Canceled";function c4(e){return e instanceof Fo?!0:e instanceof Error&&e.name===Zu&&e.message===Zu}var Fo=class extends Error{constructor(){super(Zu),this.name=this.message}};var ms=class e extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},it=class e extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,e.prototype)}};function tl(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var ii;(function(e){function t(S){return S&&typeof S=="object"&&typeof S[Symbol.iterator]=="function"}e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(S){yield S}e.single=i;function s(S){return t(S)?S:i(S)}e.wrap=s;function o(S){return S||n}e.from=o;function*a(S){for(let k=S.length-1;k>=0;k--)yield S[k]}e.reverse=a;function u(S){return!S||S[Symbol.iterator]().next().done===!0}e.isEmpty=u;function l(S){return S[Symbol.iterator]().next().value}e.first=l;function c(S,k){let M=0;for(let I of S)if(k(I,M++))return!0;return!1}e.some=c;function d(S,k){for(let M of S)if(k(M))return M}e.find=d;function*h(S,k){for(let M of S)k(M)&&(yield M)}e.filter=h;function*m(S,k){let M=0;for(let I of S)yield k(I,M++)}e.map=m;function*g(S,k){let M=0;for(let I of S)yield*k(I,M++)}e.flatMap=g;function*v(...S){for(let k of S)yield*k}e.concat=v;function N(S,k,M){let I=M;for(let B of S)I=k(I,B);return I}e.reduce=N;function*_(S,k,M=S.length){for(k<0&&(k+=S.length),M<0?M+=S.length:M>S.length&&(M=S.length);k{t[e]||console.log(n)},3e3)}setParent(t,n){if(t&&t!==Xt.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Xt.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function wo(e){return si?.trackDisposable(e),e}function Lo(e){si?.markAsDisposed(e)}function nl(e,t){si?.setParent(e,t)}function h4(e,t){if(si)for(let n of e)si.setParent(n,t)}function Co(e){if(ii.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Lf(...e){let t=Zn(()=>Co(e));return h4(e,t),t}function Zn(e){let t=wo({dispose:tl(()=>{Lo(t),e()})});return t}var yr=class e{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1,wo(this)}dispose(){this._isDisposed||(Lo(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Co(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return nl(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),nl(t,null))}},Xt=class{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new yr,wo(this),nl(this._store,this)}dispose(){Lo(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}};var wf=class{constructor(){this._store=new Map,this._isDisposed=!1,wo(this)}dispose(){Lo(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{Co(this._store.values())}finally{this._store.clear()}}get(t){return this._store.get(t)}set(t,n,r=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),r||this._store.get(t)?.dispose(),this._store.set(t,n)}deleteAndDispose(t){this._store.get(t)?.dispose(),this._store.delete(t)}[Symbol.iterator](){return this._store[Symbol.iterator]()}};var $e=class e{static{this.Undefined=new e(void 0)}constructor(t){this.element=t,this.next=e.Undefined,this.prev=e.Undefined}},gs=class{constructor(){this._first=$e.Undefined,this._last=$e.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===$e.Undefined}clear(){let t=this._first;for(;t!==$e.Undefined;){let n=t.next;t.prev=$e.Undefined,t.next=$e.Undefined,t=n}this._first=$e.Undefined,this._last=$e.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){let r=new $e(t);if(this._first===$e.Undefined)this._first=r,this._last=r;else if(n){let s=this._last;this._last=r,r.prev=s,s.next=r}else{let s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==$e.Undefined){let t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==$e.Undefined){let t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==$e.Undefined&&t.next!==$e.Undefined){let n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===$e.Undefined&&t.next===$e.Undefined?(this._first=$e.Undefined,this._last=$e.Undefined):t.next===$e.Undefined?(this._last=this._last.prev,this._last.next=$e.Undefined):t.prev===$e.Undefined&&(this._first=this._first.next,this._first.prev=$e.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==$e.Undefined;)yield t.element,t=t.next}};var m4=globalThis.performance&&typeof globalThis.performance.now=="function",oi=class e{static create(t){return new e(t)}constructor(t){this._now=m4&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}};var g4=!1,Cf=!1,D4=!1,ui;(function(e){e.None=()=>Xt.None;function t(F){if(D4){let{onDidAddListener:T}=F,Q=Ds.create(),$=0;F.onDidAddListener=()=>{++$===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),Q.print()),T?.()}}}function n(F,T){return m(F,()=>{},0,void 0,!0,void 0,T)}e.defer=n;function r(F){return(T,Q=null,$)=>{let ee=!1,ne;return ne=F(se=>{if(!ee)return ne?ne.dispose():ee=!0,T.call(Q,se)},null,$),ee&&ne.dispose(),ne}}e.once=r;function i(F,T){return e.once(e.filter(F,T))}e.onceIf=i;function s(F,T,Q){return d(($,ee=null,ne)=>F(se=>$.call(ee,T(se)),null,ne),Q)}e.map=s;function o(F,T,Q){return d(($,ee=null,ne)=>F(se=>{T(se),$.call(ee,se)},null,ne),Q)}e.forEach=o;function a(F,T,Q){return d(($,ee=null,ne)=>F(se=>T(se)&&$.call(ee,se),null,ne),Q)}e.filter=a;function u(F){return F}e.signal=u;function l(...F){return(T,Q=null,$)=>{let ee=Lf(...F.map(ne=>ne(se=>T.call(Q,se))));return h(ee,$)}}e.any=l;function c(F,T,Q,$){let ee=Q;return s(F,ne=>(ee=T(ee,ne),ee),$)}e.reduce=c;function d(F,T){let Q,$={onWillAddFirstListener(){Q=F(ee.fire,ee)},onDidRemoveLastListener(){Q?.dispose()}};T||t($);let ee=new lt($);return T?.add(ee),ee.event}function h(F,T){return T instanceof Array?T.push(F):T&&T.add(F),F}function m(F,T,Q=100,$=!1,ee=!1,ne,se){let Ie,P,Z,J=0,G,_e={leakWarningThreshold:ne,onWillAddFirstListener(){Ie=F(H=>{J++,P=T(P,H),$&&!Z&&(Re.fire(P),P=void 0),G=()=>{let Ne=P;P=void 0,Z=void 0,(!$||J>1)&&Re.fire(Ne),J=0},typeof Q=="number"?(clearTimeout(Z),Z=setTimeout(G,Q)):Z===void 0&&(Z=0,queueMicrotask(G))})},onWillRemoveListener(){ee&&J>0&&G?.()},onDidRemoveLastListener(){G=void 0,Ie.dispose()}};se||t(_e);let Re=new lt(_e);return se?.add(Re),Re.event}e.debounce=m;function g(F,T=0,Q){return e.debounce(F,($,ee)=>$?($.push(ee),$):[ee],T,void 0,!0,void 0,Q)}e.accumulate=g;function v(F,T=($,ee)=>$===ee,Q){let $=!0,ee;return a(F,ne=>{let se=$||!T(ne,ee);return $=!1,ee=ne,se},Q)}e.latch=v;function N(F,T,Q){return[e.filter(F,T,Q),e.filter(F,$=>!T($),Q)]}e.split=N;function _(F,T=!1,Q=[],$){let ee=Q.slice(),ne=F(P=>{ee?ee.push(P):Ie.fire(P)});$&&$.add(ne);let se=()=>{ee?.forEach(P=>Ie.fire(P)),ee=null},Ie=new lt({onWillAddFirstListener(){ne||(ne=F(P=>Ie.fire(P)),$&&$.add(ne))},onDidAddFirstListener(){ee&&(T?setTimeout(se):se())},onDidRemoveLastListener(){ne&&ne.dispose(),ne=null}});return $&&$.add(Ie),Ie.event}e.buffer=_;function w(F,T){return($,ee,ne)=>{let se=T(new S);return F(function(Ie){let P=se.evaluate(Ie);P!==C&&$.call(ee,P)},void 0,ne)}}e.chain=w;let C=Symbol("HaltChainable");class S{constructor(){this.steps=[]}map(T){return this.steps.push(T),this}forEach(T){return this.steps.push(Q=>(T(Q),Q)),this}filter(T){return this.steps.push(Q=>T(Q)?Q:C),this}reduce(T,Q){let $=Q;return this.steps.push(ee=>($=T($,ee),$)),this}latch(T=(Q,$)=>Q===$){let Q=!0,$;return this.steps.push(ee=>{let ne=Q||!T(ee,$);return Q=!1,$=ee,ne?ee:C}),this}evaluate(T){for(let Q of this.steps)if(T=Q(T),T===C)break;return T}}function k(F,T,Q=$=>$){let $=(...Ie)=>se.fire(Q(...Ie)),ee=()=>F.on(T,$),ne=()=>F.removeListener(T,$),se=new lt({onWillAddFirstListener:ee,onDidRemoveLastListener:ne});return se.event}e.fromNodeEventEmitter=k;function M(F,T,Q=$=>$){let $=(...Ie)=>se.fire(Q(...Ie)),ee=()=>F.addEventListener(T,$),ne=()=>F.removeEventListener(T,$),se=new lt({onWillAddFirstListener:ee,onDidRemoveLastListener:ne});return se.event}e.fromDOMEventEmitter=M;function I(F){return new Promise(T=>r(F)(T))}e.toPromise=I;function B(F){let T=new lt;return F.then(Q=>{T.fire(Q)},()=>{T.fire(void 0)}).finally(()=>{T.dispose()}),T.event}e.fromPromise=B;function L(F,T){return F(Q=>T.fire(Q))}e.forward=L;function A(F,T,Q){return T(Q),F($=>T($))}e.runAndSubscribe=A;class X{constructor(T,Q){this._observable=T,this._counter=0,this._hasChanged=!1;let $={onWillAddFirstListener:()=>{T.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{T.removeObserver(this)}};Q||t($),this.emitter=new lt($),Q&&Q.add(this.emitter)}beginUpdate(T){this._counter++}handlePossibleChange(T){}handleChange(T,Q){this._hasChanged=!0}endUpdate(T){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(F,T){return new X(F,T).emitter.event}e.fromObservable=z;function fe(F){return(T,Q,$)=>{let ee=0,ne=!1,se={beginUpdate(){ee++},endUpdate(){ee--,ee===0&&(F.reportChanges(),ne&&(ne=!1,T.call(Q)))},handlePossibleChange(){},handleChange(){ne=!0}};F.addObserver(se),F.reportChanges();let Ie={dispose(){F.removeObserver(se)}};return $ instanceof yr?$.add(Ie):Array.isArray($)&&$.push(Ie),Ie}}e.fromObservableLight=fe})(ui||(ui={}));var rl=class e{static{this.all=new Set}static{this._idPool=0}constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${e._idPool++}`,e.all.add(this)}start(t){this._stopWatch=new oi,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}},If=-1,il=class e{static{this._idPool=1}constructor(t,n,r=(e._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,n){let r=this.threshold;if(r<=0||n{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,n=0;for(let[r,i]of this._stacks)(!t||n{if(e instanceof ai)t(e);else for(let n=0;n{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(` +`)),e.length=0)},3e3),Io=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var lt=class{constructor(t){this._size=0,this._options=t,this._leakageMon=If>0||this._options?.leakWarningThreshold?new il(t?.onListenerError??In,this._options?.leakWarningThreshold??If):void 0,this._perfMon=this._options?._profName?new rl(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(Cf){let t=this._listeners;queueMicrotask(()=>{b4(t,n=>n.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??=(t,n,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let u=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(u);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new ol(`${u}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||In)(c),Xt.None}if(this._disposed)return Xt.None;n&&(t=t.bind(n));let i=new ai(t),s,o;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Ds.create(),s=this._leakageMon.check(i.stack,this._size+1)),Cf&&(i.stack=o??Ds.create()),this._listeners?this._listeners instanceof ai?(this._deliveryQueue??=new al,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Zn(()=>{Io?.unregister(a),s?.(),this._removeListener(i)});if(r instanceof yr?r.add(a):Array.isArray(r)&&r.push(a),Io){let u=new Error().stack.split(` +`).slice(2,3).join(` +`).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(u);Io.register(a,l?.[2]??u,a)}return a},this._event}_removeListener(t){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let n=this._listeners,r=n.indexOf(t);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;let i=this._deliveryQueue.current===this;if(this._size*v4<=n.length){let s=0;for(let o=0;o0}};var al=class{constructor(){this.i=-1,this.end=0}enqueue(t,n,r){this.i=0,this.end=r,this.current=t,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}};function ul(){return globalThis._VSCODE_NLS_MESSAGES}function vs(){return globalThis._VSCODE_NLS_LANGUAGE}var E4=vs()==="pseudo"||typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function Rf(e,t){let n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,(r,i)=>{let s=i[0],o=t[s],a=r;return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||o===void 0||o===null)&&(a=String(o)),a}),E4&&(n="\uFF3B"+n.replace(/[aouei]/g,"$&$&")+"\uFF3D"),n}function ke(e,t,...n){return Rf(typeof e=="number"?y4(e,t):t,n)}function y4(e,t){let n=ul()?.[e];if(typeof n!="string"){if(typeof t=="string")return t;throw new Error(`!!! NLS MISSING: ${e} !!!`)}return n}var li="en",Oo=!1,Mo=!1,ko=!1,_4=!1,Of=!1,fl=!1,N4=!1,T4=!1,S4=!1,A4=!1,Ro,ll=li,kf=li,F4,Rn,kn=globalThis,jt;typeof kn.vscode<"u"&&typeof kn.vscode.process<"u"?jt=kn.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(jt=process);var Mf=typeof jt?.versions?.electron=="string",w4=Mf&&jt?.type==="renderer";if(typeof jt=="object"){Oo=jt.platform==="win32",Mo=jt.platform==="darwin",ko=jt.platform==="linux",_4=ko&&!!jt.env.SNAP&&!!jt.env.SNAP_REVISION,N4=Mf,S4=!!jt.env.CI||!!jt.env.BUILD_ARTIFACTSTAGINGDIRECTORY,Ro=li,ll=li;let e=jt.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);Ro=t.userLocale,kf=t.osLocale,ll=t.resolvedLanguage||li,F4=t.languagePack?.translationsConfigFile}catch{}Of=!0}else typeof navigator=="object"&&!w4?(Rn=navigator.userAgent,Oo=Rn.indexOf("Windows")>=0,Mo=Rn.indexOf("Macintosh")>=0,T4=(Rn.indexOf("Macintosh")>=0||Rn.indexOf("iPad")>=0||Rn.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ko=Rn.indexOf("Linux")>=0,A4=Rn?.indexOf("Mobi")>=0,fl=!0,ll=vs()||li,Ro=navigator.language.toLowerCase(),kf=Ro):console.error("Unable to resolve platform.");var cl=0;Mo?cl=1:Oo?cl=3:ko&&(cl=2);var xr=Oo,Pf=Mo;var Bf=Of,dl=fl,L4=fl&&typeof kn.importScripts=="function",Vf=L4?kn.origin:void 0;var dn=Rn;var C4=typeof kn.postMessage=="function"&&!kn.importScripts,Uf=(()=>{if(C4){let e=[];kn.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=e.length;r{let r=++t;e.push({id:r,callback:n}),kn.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var I4=!!(dn&&dn.indexOf("Chrome")>=0),fE=!!(dn&&dn.indexOf("Firefox")>=0),dE=!!(!I4&&dn&&dn.indexOf("Safari")>=0),pE=!!(dn&&dn.indexOf("Edg/")>=0),hE=!!(dn&&dn.indexOf("Android")>=0);function k4(e){return e}var Po=class{constructor(t,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof t=="function"?(this._fn=t,this._computeKey=k4):(this._fn=n,this._computeKey=t.getCacheKey)}get(t){let n=this._computeKey(t);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(t)),this.lastCache}};var bs=class{constructor(t){this.executor=t,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(t){this._error=t}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}};function jf(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function qf(e){return e.split(/\r\n|\r|\n/)}function Gf(e){for(let t=0,n=e.length;t=0;n--){let r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function pl(e){return e>=65&&e<=90}function di(e){return 55296<=e&&e<=56319}function Bo(e){return 56320<=e&&e<=57343}function hl(e,t){return(e-55296<<10)+(t-56320)+65536}function Wf(e,t,n){let r=e.charCodeAt(n);if(di(r)&&n+1n[3*i+1])i=2*i+1;else return n[3*i+2];return 0}};function M4(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}var ci=class e{static{this.ambiguousCharacterData=new bs(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))}static{this.cache=new Po({getCacheKey:JSON.stringify},t=>{function n(c){let d=new Map;for(let h=0;h!c.startsWith("_")&&c in s);o.length===0&&(o=["_default"]);let a;for(let c of o){let d=n(s[c]);a=i(a,d)}let u=n(s._common),l=r(u,a);return new e(l)})}static getInstance(t){return e.cache.get(Array.from(t))}static{this._locales=new bs(()=>Object.keys(e.ambiguousCharacterData.value).filter(t=>!t.startsWith("_")))}static getLocales(){return e._locales.value}constructor(t){this.confusableDictionary=t}isAmbiguous(t){return this.confusableDictionary.has(t)}getPrimaryConfusable(t){return this.confusableDictionary.get(t)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}},fi=class e{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static{this._data=void 0}static getData(){return this._data||(this._data=new Set(e.getRawData())),this._data}static isInvisibleCharacter(t){return e.getData().has(t)}static get codePoints(){return e.getData()}};var pi,ml=globalThis.vscode;if(typeof ml<"u"&&typeof ml.process<"u"){let e=ml.process;pi={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?pi={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:pi={get platform(){return xr?"win32":Pf?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};var ys=pi.cwd,zf=pi.env,Yf=pi.platform;var B4=65,V4=97,U4=90,$4=122,nr=46,dt=47,kt=92,er=58,j4=63,Vo=class extends Error{constructor(t,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";let s=t.indexOf(".")!==-1?"property":"argument",o=`The "${t}" ${s} ${i} of type ${n}`;o+=`. Received type ${typeof r}`,super(o),this.code="ERR_INVALID_ARG_TYPE"}};function q4(e,t){if(e===null||typeof e!="object")throw new Vo(t,"Object",e)}function ze(e,t){if(typeof e!="string")throw new Vo(t,"string",e)}var On=Yf==="win32";function he(e){return e===dt||e===kt}function gl(e){return e===dt}function tr(e){return e>=B4&&e<=U4||e>=V4&&e<=$4}function Uo(e,t,n,r){let i="",s=0,o=-1,a=0,u=0;for(let l=0;l<=e.length;++l){if(l2){let c=i.lastIndexOf(n);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(n)),o=l,a=0;continue}else if(i.length!==0){i="",s=0,o=l,a=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),s=l-o-1;o=l,a=0}else u===nr&&a!==-1?++a:a=-1}return i}function G4(e){return e?`${e[0]==="."?"":"."}${e}`:""}function Jf(e,t){q4(t,"pathObject");let n=t.dir||t.root,r=t.base||`${t.name||""}${G4(t.ext)}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}var vt={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],ze(s,`paths[${i}]`),s.length===0)continue}else t.length===0?s=ys():(s=zf[`=${t}`]||ys(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===kt)&&(s=`${t}\\`));let o=s.length,a=0,u="",l=!1,c=s.charCodeAt(0);if(o===1)he(c)&&(a=1,l=!0);else if(he(c))if(l=!0,he(s.charCodeAt(1))){let d=2,h=d;for(;d2&&he(s.charCodeAt(2))&&(l=!0,a=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(r){if(t.length>0)break}else if(n=`${s.slice(a)}\\${n}`,r=l,l&&t.length>0)break}return n=Uo(n,!r,"\\",he),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){ze(e,"path");let t=e.length;if(t===0)return".";let n=0,r,i=!1,s=e.charCodeAt(0);if(t===1)return gl(s)?"\\":e;if(he(s))if(i=!0,he(e.charCodeAt(1))){let a=2,u=a;for(;a2&&he(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&he(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){ze(e,"path");let t=e.length;if(t===0)return!1;let n=e.charCodeAt(0);return he(n)||t>2&&tr(n)&&e.charCodeAt(1)===er&&he(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let s=0;s0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&he(n.charCodeAt(0))){++i;let s=n.length;s>1&&he(n.charCodeAt(1))&&(++i,s>2&&(he(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return vt.normalize(t)},relative(e,t){if(ze(e,"from"),ze(t,"to"),e===t)return"";let n=vt.resolve(e),r=vt.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(s-1)===kt;)s--;let o=s-i,a=0;for(;aa&&t.charCodeAt(u-1)===kt;)u--;let l=u-a,c=oc){if(t.charCodeAt(a+h)===kt)return r.slice(a+h+1);if(h===2)return r.slice(a+h)}o>c&&(e.charCodeAt(i+h)===kt?d=h:h===2&&(d=3)),d===-1&&(d=0)}let m="";for(h=i+d+1;h<=s;++h)(h===s||e.charCodeAt(h)===kt)&&(m+=m.length===0?"..":"\\..");return a+=d,m.length>0?`${m}${r.slice(a,u)}`:(r.charCodeAt(a)===kt&&++a,r.slice(a,u))},toNamespacedPath(e){if(typeof e!="string"||e.length===0)return e;let t=vt.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===kt){if(t.charCodeAt(1)===kt){let n=t.charCodeAt(2);if(n!==j4&&n!==nr)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(tr(t.charCodeAt(0))&&t.charCodeAt(1)===er&&t.charCodeAt(2)===kt)return`\\\\?\\${t}`;return e},dirname(e){ze(e,"path");let t=e.length;if(t===0)return".";let n=-1,r=0,i=e.charCodeAt(0);if(t===1)return he(i)?e:".";if(he(i)){if(n=r=1,he(e.charCodeAt(1))){let a=2,u=a;for(;a2&&he(e.charCodeAt(2))?3:2,r=n);let s=-1,o=!0;for(let a=t-1;a>=r;--a)if(he(e.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(n===-1)return".";s=n}return e.slice(0,s)},basename(e,t){t!==void 0&&ze(t,"suffix"),ze(e,"path");let n=0,r=-1,i=!0,s;if(e.length>=2&&tr(e.charCodeAt(0))&&e.charCodeAt(1)===er&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=n;--s){let u=e.charCodeAt(s);if(he(u)){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=n;--s)if(he(e.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){ze(e,"path");let t=0,n=-1,r=0,i=-1,s=!0,o=0;e.length>=2&&e.charCodeAt(1)===er&&tr(e.charCodeAt(0))&&(t=r=2);for(let a=e.length-1;a>=t;--a){let u=e.charCodeAt(a);if(he(u)){if(!s){r=a+1;break}continue}i===-1&&(s=!1,i=a+1),u===nr?n===-1?n=a:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Jf.bind(null,"\\"),parse(e){ze(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.length,r=0,i=e.charCodeAt(0);if(n===1)return he(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(he(i)){if(r=1,he(e.charCodeAt(1))){let d=2,h=d;for(;d0&&(t.root=e.slice(0,r));let s=-1,o=r,a=-1,u=!0,l=e.length-1,c=0;for(;l>=r;--l){if(i=e.charCodeAt(l),he(i)){if(!u){o=l+1;break}continue}a===-1&&(u=!1,a=l+1),i===nr?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return a!==-1&&(s===-1||c===0||c===1&&s===a-1&&s===o+1?t.base=t.name=e.slice(o,a):(t.name=e.slice(o,s),t.base=e.slice(o,a),t.ext=e.slice(s,a))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},H4=(()=>{if(On){let e=/\\/g;return()=>{let t=ys().replace(e,"/");return t.slice(t.indexOf("/"))}}return()=>ys()})(),pt={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:H4();ze(i,`paths[${r}]`),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===dt)}return t=Uo(t,!n,"/",gl),n?`/${t}`:t.length>0?t:"."},normalize(e){if(ze(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===dt,n=e.charCodeAt(e.length-1)===dt;return e=Uo(e,!t,"/",gl),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return ze(e,"path"),e.length>0&&e.charCodeAt(0)===dt},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":pt.normalize(t)},relative(e,t){if(ze(e,"from"),ze(t,"to"),e===t||(e=pt.resolve(e),t=pt.resolve(t),e===t))return"";let n=1,r=e.length,i=r-n,s=1,o=t.length-s,a=ia){if(t.charCodeAt(s+l)===dt)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>a&&(e.charCodeAt(n+l)===dt?u=l:l===0&&(u=0));let c="";for(l=n+u+1;l<=r;++l)(l===r||e.charCodeAt(l)===dt)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(ze(e,"path"),e.length===0)return".";let t=e.charCodeAt(0)===dt,n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===dt){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&ze(t,"ext"),ze(e,"path");let n=0,r=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,a=-1;for(s=e.length-1;s>=0;--s){let u=e.charCodeAt(s);if(u===dt){if(!i){n=s+1;break}}else a===-1&&(i=!1,a=s+1),o>=0&&(u===t.charCodeAt(o)?--o===-1&&(r=s):(o=-1,r=a))}return n===r?r=a:r===-1&&(r=e.length),e.slice(n,r)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===dt){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":e.slice(n,r)},extname(e){ze(e,"path");let t=-1,n=0,r=-1,i=!0,s=0;for(let o=e.length-1;o>=0;--o){let a=e.charCodeAt(o);if(a===dt){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),a===nr?t===-1?t=o:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||r===-1||s===0||s===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Jf.bind(null,"/"),parse(e){ze(e,"path");let t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;let n=e.charCodeAt(0)===dt,r;n?(t.root="/",r=1):r=0;let i=-1,s=0,o=-1,a=!0,u=e.length-1,l=0;for(;u>=r;--u){let c=e.charCodeAt(u);if(c===dt){if(!a){s=u+1;break}continue}o===-1&&(a=!1,o=u+1),c===nr?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){let c=s===0&&n?1:s;i===-1||l===0||l===1&&i===o-1&&i===s+1?t.base=t.name=e.slice(c,o):(t.name=e.slice(c,i),t.base=e.slice(c,o),t.ext=e.slice(i,o))}return s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};pt.win32=vt.win32=vt;pt.posix=vt.posix=pt;var yE=On?vt.normalize:pt.normalize,Xf=On?vt.join:pt.join,xE=On?vt.resolve:pt.resolve,_E=On?vt.relative:pt.relative,NE=On?vt.dirname:pt.dirname,TE=On?vt.basename:pt.basename,SE=On?vt.extname:pt.extname,AE=On?vt.sep:pt.sep;var W4=/^\w[\w\d+.-]*$/,Q4=/^\//,z4=/^\/\//;function Y4(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!W4.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Q4.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(z4.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function J4(e,t){return!e&&!t?"file":e}function X4(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==rn&&(t=rn+t):t=rn;break}return t}var Oe="",rn="/",K4=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,_t=class e{static isUri(t){return t instanceof e?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}constructor(t,n,r,i,s,o=!1){typeof t=="object"?(this.scheme=t.scheme||Oe,this.authority=t.authority||Oe,this.path=t.path||Oe,this.query=t.query||Oe,this.fragment=t.fragment||Oe):(this.scheme=J4(t,o),this.authority=n||Oe,this.path=X4(this.scheme,r||Oe),this.query=i||Oe,this.fragment=s||Oe,Y4(this,o))}get fsPath(){return Dl(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:s,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Oe),r===void 0?r=this.authority:r===null&&(r=Oe),i===void 0?i=this.path:i===null&&(i=Oe),s===void 0?s=this.query:s===null&&(s=Oe),o===void 0?o=this.fragment:o===null&&(o=Oe),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&o===this.fragment?this:new rr(n,r,i,s,o)}static parse(t,n=!1){let r=K4.exec(t);return r?new rr(r[2]||Oe,$o(r[4]||Oe),$o(r[5]||Oe),$o(r[7]||Oe),$o(r[9]||Oe),n):new rr(Oe,Oe,Oe,Oe,Oe)}static file(t){let n=Oe;if(xr&&(t=t.replace(/\\/g,rn)),t[0]===rn&&t[1]===rn){let r=t.indexOf(rn,2);r===-1?(n=t.substring(2),t=rn):(n=t.substring(2,r),t=t.substring(r)||rn)}return new rr("file",n,t,Oe,Oe)}static from(t,n){return new rr(t.scheme,t.authority,t.path,t.query,t.fragment,n)}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return xr&&t.scheme==="file"?r=e.file(vt.join(Dl(t,!0),...n)).path:r=pt.join(t.path,...n),t.with({path:r})}toString(t=!1){return vl(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof e)return t;{let n=new rr(t);return n._formatted=t.external??null,n._fsPath=t._sep===td?t.fsPath??null:null,n}}else return t}},td=xr?1:void 0,rr=class extends _t{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Dl(this,!1)),this._fsPath}toString(t=!1){return t?vl(this,!0):(this._formatted||(this._formatted=vl(this,!1)),this._formatted)}toJSON(){let t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=td),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}},nd={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Zf(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r!==void 0&&(r+=e.charAt(s));else{r===void 0&&(r=e.substr(0,s));let a=nd[o];a!==void 0?(i!==-1&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=a):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r!==void 0?r:e}function Z4(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,xr&&(n=n.replace(/\//g,"\\")),n}function vl(e,t){let n=t?Z4:Zf,r="",{scheme:i,authority:s,path:o,query:a,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=rn,r+=rn),s){let l=s.indexOf("@");if(l!==-1){let c=s.substr(0,l);s=s.substr(l+1),l=c.lastIndexOf(":"),l===-1?r+=n(c,!1,!1):(r+=n(c.substr(0,l),!1,!1),r+=":",r+=n(c.substr(l+1),!1,!0)),r+="@"}s=s.toLowerCase(),l=s.lastIndexOf(":"),l===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,l),!1,!0),r+=s.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:Zf(u,!1,!1)),r}function rd(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+rd(e.substr(3)):e}}var ed=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function $o(e){return e.match(ed)?e.replace(ed,t=>rd(t)):e}var ir;(function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.vscodeManagedRemoteResource="vscode-managed-remote-resource",e.vscodeUserData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellMetadataDiff="vscode-notebook-cell-metadata-diff",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeNotebookCellOutputDiff="vscode-notebook-cell-output-diff",e.vscodeNotebookMetadata="vscode-notebook-metadata",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.vscodeChatCodeBlock="vscode-chat-code-block",e.vscodeChatCodeCompareBlock="vscode-chat-code-compare-block",e.vscodeChatSesssion="vscode-chat-editor",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls",e.vscodeSourceControl="vscode-scm",e.commentsInput="comment",e.codeSetting="code-setting",e.outputChannel="output"})(ir||(ir={}));var e5="tkn",bl=class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._serverRootPath="/"}setPreferredWebSchema(t){this._preferredWebSchema=t}get _remoteResourcesPath(){return pt.join(this._serverRootPath,ir.vscodeRemoteResource)}rewrite(t){if(this._delegate)try{return this._delegate(t)}catch(a){return In(a),t}let n=t.authority,r=this._hosts[n];r&&r.indexOf(":")!==-1&&r.indexOf("[")===-1&&(r=`[${r}]`);let i=this._ports[n],s=this._connectionTokens[n],o=`path=${encodeURIComponent(t.path)}`;return typeof s=="string"&&(o+=`&${e5}=${encodeURIComponent(s)}`),_t.from({scheme:dl?this._preferredWebSchema:ir.vscodeRemoteResource,authority:`${r}:${i}`,path:this._remoteResourcesPath,query:o})}},t5=new bl,n5="vscode-app",El=class e{static{this.FALLBACK_AUTHORITY=n5}asBrowserUri(t){let n=this.toUri(t);return this.uriToBrowserUri(n)}uriToBrowserUri(t){return t.scheme===ir.vscodeRemote?t5.rewrite(t):t.scheme===ir.file&&(Bf||Vf===`${ir.vscodeFileResource}://${e.FALLBACK_AUTHORITY}`)?t.with({scheme:ir.vscodeFileResource,authority:t.authority||e.FALLBACK_AUTHORITY,query:null,fragment:null}):t}toUri(t,n){if(_t.isUri(t))return t;if(globalThis._VSCODE_FILE_ROOT){let r=globalThis._VSCODE_FILE_ROOT;if(/^\w[\w\d+.-]*:\/\//.test(r))return _t.joinPath(_t.parse(r,!0),t);let i=Xf(r,t);return _t.file(i)}return _t.parse(n.toUrl(t))}},jo=new El,id;(function(e){let t=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);e.CoopAndCoep=Object.freeze(t.get("3"));let n="vscode-coi";function r(s){let o;typeof s=="string"?o=new URL(s).searchParams:s instanceof URL?o=s.searchParams:_t.isUri(s)&&(o=new URL(s.toString(!0)).searchParams);let a=o?.get(n);if(a)return t.get(a)}e.getHeadersFromQuery=r;function i(s,o,a){if(!globalThis.crossOriginIsolated)return;let u=o&&a?"3":a?"2":"1";s instanceof URLSearchParams?s.set(n,u):s[n]=u}e.addSearchParam=i})(id||(id={}));var r5=!0,yl="default",i5="$initialize";var xl=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}},qo=class{constructor(t,n,r,i){this.vsWorker=t,this.seq=n,this.res=r,this.err=i,this.type=1}},_l=class{constructor(t,n,r,i,s){this.vsWorker=t,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}},Nl=class{constructor(t,n,r){this.vsWorker=t,this.req=n,this.event=r,this.type=3}},Tl=class{constructor(t,n){this.vsWorker=t,this.req=n,this.type=4}},Sl=class{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(t){this._workerId=t}sendMessage(t,n,r){let i=String(++this._lastSentReq);return new Promise((s,o)=>{this._pendingReplies[i]={resolve:s,reject:o},this._send(new xl(this._workerId,i,t,n,r))})}listen(t,n,r){let i=null,s=new lt({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new _l(this._workerId,i,t,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Tl(this._workerId,i)),i=null}});return s.event}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}createProxyToRemoteChannel(t,n){let r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(od(s)?i[s]=o=>this.listen(t,s,o):sd(s)?i[s]=this.listen(t,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...o)=>(await n?.(),this.sendMessage(t,s,o)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(t){switch(t.type){case 1:return this._handleReplyMessage(t);case 0:return this._handleRequestMessage(t);case 2:return this._handleSubscribeEventMessage(t);case 3:return this._handleEventMessage(t);case 4:return this._handleUnsubscribeEventMessage(t)}}_handleReplyMessage(t){if(!this._pendingReplies[t.seq]){console.warn("Got reply to unknown seq");return}let n=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let r=t.err;t.err.$isError&&(r=new Error,r.name=t.err.name,r.message=t.err.message,r.stack=t.err.stack),n.reject(r);return}n.resolve(t.res)}_handleRequestMessage(t){let n=t.req;this._handler.handleMessage(t.channel,t.method,t.args).then(i=>{this._send(new qo(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=el(i.detail)),this._send(new qo(this._workerId,n,void 0,el(i)))})}_handleSubscribeEventMessage(t){let n=t.req,r=this._handler.handleEvent(t.channel,t.eventName,t.arg)(i=>{this._send(new Nl(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(t){if(!this._pendingEmitters.has(t.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(t.req).fire(t.event)}_handleUnsubscribeEventMessage(t){if(!this._pendingEvents.has(t.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(t.req).dispose(),this._pendingEvents.delete(t.req)}_send(t){let n=[];if(t.type===0)for(let r=0;r{t(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n,r){if(t===yl&&n===i5)return this.initialize(r[0],r[1],r[2]);let i=t===yl?this._requestHandler:this._localChannels.get(t);if(!i)return Promise.reject(new Error(`Missing channel ${t} on worker thread`));if(typeof i[n]!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${t}`));try{return Promise.resolve(i[n].apply(i,r))}catch(s){return Promise.reject(s)}}_handleEvent(t,n,r){let i=t===yl?this._requestHandler:this._localChannels.get(t);if(!i)throw new Error(`Missing channel ${t} on worker thread`);if(od(n)){let s=i[n].call(i,r);if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return s}if(sd(n)){let s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(t){if(!this._remoteChannels.has(t)){let n=this._protocol.createProxyToRemoteChannel(t);this._remoteChannels.set(t,n)}return this._remoteChannels.get(t)}async initialize(t,n,r){if(this._protocol.setWorkerId(t),this._requestHandlerFactory){this._requestHandler=this._requestHandlerFactory(this);return}return n&&(typeof n.baseUrl<"u"&&delete n.baseUrl,typeof n.paths<"u"&&typeof n.paths.vs<"u"&&delete n.paths.vs,typeof n.trustedTypesPolicy<"u"&&delete n.trustedTypesPolicy,n.catchError=!0,globalThis.require.config(n)),r5?import(`${jo.asBrowserUri(`${r}.js`).toString(!0)}`).then(s=>{if(this._requestHandler=s.create(this),!this._requestHandler)throw new Error("No RequestHandler!")}):new Promise((i,s)=>{let o=globalThis.require;o([r],a=>{if(this._requestHandler=a.create(this),!this._requestHandler){s(new Error("No RequestHandler!"));return}i()},s)})}};var sn=class{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}};function ad(e,t){return(t<<5)-t+e|0}function cd(e,t){t=ad(149417,t);for(let n=0,r=e.length;n>>r)>>>0}function ud(e,t=0,n=e.byteLength,r=0){for(let i=0;in.toString(16).padStart(2,"0")).join(""):s5((e>>>0).toString(16),t/4)}var ld=class e{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let n=t.length;if(n===0)return;let r=this._buff,i=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=t.charCodeAt(0),a=0);;){let u=o;if(di(o))if(a+1>>6,t[n++]=128|(r&63)>>>0):r<65536?(t[n++]=224|(r&61440)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0):(t[n++]=240|(r&1835008)>>>18,t[n++]=128|(r&258048)>>>12,t[n++]=128|(r&4032)>>>6,t[n++]=128|(r&63)>>>0),n>=64&&(this._step(),n-=64,this._totalLen+=64,t[0]=t[64+0],t[1]=t[64+1],t[2]=t[64+2]),n}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),xs(this._h0)+xs(this._h1)+xs(this._h2)+xs(this._h3)+xs(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,ud(this._buff,this._buffLen),this._buffLen>56&&(this._step(),ud(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=e._bigBlock32,n=this._buffDV;for(let d=0;d<64;d+=4)t.setUint32(d,n.getUint32(d,!1),!1);for(let d=64;d<320;d+=4)t.setUint32(d,Al(t.getUint32(d-12,!1)^t.getUint32(d-32,!1)^t.getUint32(d-56,!1)^t.getUint32(d-64,!1),1),!1);let r=this._h0,i=this._h1,s=this._h2,o=this._h3,a=this._h4,u,l,c;for(let d=0;d<80;d++)d<20?(u=i&s|~i&o,l=1518500249):d<40?(u=i^s^o,l=1859775393):d<60?(u=i&s|i&o|s&o,l=2400959708):(u=i^s^o,l=3395469782),c=Al(r,5)+u+a+l+t.getUint32(d*4,!1)&4294967295,a=o,o=s,s=Al(i,30),i=r,r=c;this._h0=this._h0+r&4294967295,this._h1=this._h1+i&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}};var Ho=class{constructor(t){this.source=t}getElements(){let t=this.source,n=new Int32Array(t.length);for(let r=0,i=t.length;r0||this.m_modifiedCount>0)&&this.m_changes.push(new sn(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}},_s=class e{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;let[i,s,o]=e._getElements(t),[a,u,l]=e._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){let n=t.getElements();if(e._isStringArray(n)){let r=new Int32Array(n.length);for(let i=0,s=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let d;return r<=i?(sr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),d=[new sn(t,0,r,i-r+1)]):t<=n?(sr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[new sn(t,n-t+1,r,0)]):(sr.Assert(t===n+1,"originalStart should only be one more than originalEnd"),sr.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),d=[]),d}let o=[0],a=[0],u=this.ComputeRecursionPoint(t,n,r,i,o,a,s),l=o[0],c=a[0];if(u!==null)return u;if(!s[0]){let d=this.ComputeDiffRecursive(t,l,r,c,s),h=[];return s[0]?h=[new sn(l+1,n-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,n,c+1,i,s),this.ConcatenateChanges(d,h)}return[new sn(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,s,o,a,u,l,c,d,h,m,g,v,N,_,w){let C=null,S=null,k=new Wo,M=n,I=r,B=m[0]-N[0]-i,L=-1073741824,A=this.m_forwardHistory.length-1;do{let X=B+t;X===M||X=0&&(l=this.m_forwardHistory[A],t=l[0],M=1,I=l.length-1)}while(--A>=-1);if(C=k.getReverseChanges(),w[0]){let X=m[0]+1,z=N[0]+1;if(C!==null&&C.length>0){let fe=C[C.length-1];X=Math.max(X,fe.getOriginalEnd()),z=Math.max(z,fe.getModifiedEnd())}S=[new sn(X,h-X+1,z,v-z+1)]}else{k=new Wo,M=o,I=a,B=m[0]-N[0]-u,L=1073741824,A=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{let X=B+s;X===M||X=c[X+1]?(d=c[X+1]-1,g=d-B-u,d>L&&k.MarkNextChange(),L=d+1,k.AddOriginalElement(d+1,g+1),B=X+1-s):(d=c[X-1],g=d-B-u,d>L&&k.MarkNextChange(),L=d,k.AddModifiedElement(d+1,g+1),B=X-1-s),A>=0&&(c=this.m_reverseHistory[A],s=c[0],M=1,I=c.length-1)}while(--A>=-1);S=k.getChanges()}return this.ConcatenateChanges(C,S)}ComputeRecursionPoint(t,n,r,i,s,o,a){let u=0,l=0,c=0,d=0,h=0,m=0;t--,r--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];let g=n-t+(i-r),v=g+1,N=new Int32Array(v),_=new Int32Array(v),w=i-r,C=n-t,S=t-r,k=n-i,I=(C-w)%2===0;N[w]=t,_[C]=n,a[0]=!1;for(let B=1;B<=g/2+1;B++){let L=0,A=0;c=this.ClipDiagonalBound(w-B,B,w,v),d=this.ClipDiagonalBound(w+B,B,w,v);for(let z=c;z<=d;z+=2){z===c||zL+A&&(L=u,A=l),!I&&Math.abs(z-C)<=B-1&&u>=_[z])return s[0]=u,o[0]=l,fe<=_[z]&&1447>0&&B<=1447+1?this.WALKTRACE(w,c,d,S,C,h,m,k,N,_,u,n,s,l,i,o,I,a):null}let X=(L-t+(A-r)-B)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(L,X))return a[0]=!0,s[0]=L,o[0]=A,X>0&&1447>0&&B<=1447+1?this.WALKTRACE(w,c,d,S,C,h,m,k,N,_,u,n,s,l,i,o,I,a):(t++,r++,[new sn(t,n-t+1,r,i-r+1)]);h=this.ClipDiagonalBound(C-B,B,C,v),m=this.ClipDiagonalBound(C+B,B,C,v);for(let z=h;z<=m;z+=2){z===h||z=_[z+1]?u=_[z+1]-1:u=_[z-1],l=u-(z-C)-k;let fe=u;for(;u>t&&l>r&&this.ElementsAreEqual(u,l);)u--,l--;if(_[z]=u,I&&Math.abs(z-w)<=B&&u<=N[z])return s[0]=u,o[0]=l,fe>=N[z]&&1447>0&&B<=1447+1?this.WALKTRACE(w,c,d,S,C,h,m,k,N,_,u,n,s,l,i,o,I,a):null}if(B<=1447){let z=new Int32Array(d-c+2);z[0]=w-c+1,or.Copy2(N,c,z,1,d-c+1),this.m_forwardHistory.push(z),z=new Int32Array(m-h+2),z[0]=C-h+1,or.Copy2(_,h,z,1,m-h+1),this.m_reverseHistory.push(z)}}return this.WALKTRACE(w,c,d,S,C,h,m,k,N,_,u,n,s,l,i,o,I,a)}PrettifyChanges(t){for(let n=0;n0,a=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){let r=t[n],i=0,s=0;if(n>0){let d=t[n-1];i=d.originalStart+d.originalLength,s=d.modifiedStart+d.modifiedLength}let o=r.originalLength>0,a=r.modifiedLength>0,u=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let d=1;;d++){let h=r.originalStart-d,m=r.modifiedStart-d;if(hl&&(l=v,u=d)}r.originalStart-=u,r.modifiedStart-=u;let c=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],c)){t[n-1]=c[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&m>u&&(u=m,l=d,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){let r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){let s=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){let i=new Array(t.length+n.length-1);return or.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],or.Copy(n,1,i,t.length,n.length-1),i}else{let i=new Array(t.length+n.length);return or.Copy(t,0,i,0,t.length),or.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(sr.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),sr.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){let i=t.originalStart,s=t.originalLength,o=t.modifiedStart,a=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(a=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new sn(i,s,o,a),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&tr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return e.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return e.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}static strictContainsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.column<=t.startColumn||n.lineNumber===t.endLineNumber&&n.column>=t.endColumn)}containsRange(t){return e.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return e.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return e.plusRange(this,t)}static plusRange(t,n){let r,i,s,o;return n.startLineNumbert.endLineNumber?(s=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(s=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(s=t.endLineNumber,o=t.endColumn),new e(r,i,s,o)}intersectRanges(t){return e.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,o=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return rl?(s=l,o=c):s===l&&(o=Math.min(o,c)),r>s||r===s&&i>o?null:new e(r,i,s,o)}equalsRange(t){return e.equalsRange(this,t)}static equalsRange(t,n){return!t&&!n?!0:!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return e.getEndPosition(this)}static getEndPosition(t){return new Se(t.endLineNumber,t.endColumn)}getStartPosition(){return e.getStartPosition(this)}static getStartPosition(t){return new Se(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new e(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new e(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return e.collapseToStart(this)}static collapseToStart(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}collapseToEnd(){return e.collapseToEnd(this)}static collapseToEnd(t){return new e(t.endLineNumber,t.endColumn,t.endLineNumber,t.endColumn)}delta(t){return new e(this.startLineNumber+t,this.startColumn,this.endLineNumber+t,this.endColumn)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}toJSON(){return this}};function Fl(e){return e<0?0:e>255?255:e|0}function _r(e){return e<0?0:e>4294967295?4294967295:e|0}var Ns=class e{constructor(t){let n=Fl(t);this._defaultValue=n,this._asciiMap=e._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);return n.fill(t),n}set(t,n){let r=Fl(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}};var Ll=class{constructor(t,n,r){let i=new Uint8Array(t*n);for(let s=0,o=t*n;sn&&(n=u),a>r&&(r=a),l>r&&(r=l)}n++,r++;let i=new Ll(r,n,0);for(let s=0,o=t.length;s=this._maxCharCode?0:this._states.get(t,n)}},wl=null;function o5(){return wl===null&&(wl=new Cl([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),wl}var Ts=null;function a5(){if(Ts===null){Ts=new Ns(0);let e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;ni);if(i>0){let a=n.charCodeAt(i-1),u=n.charCodeAt(o);(a===40&&u===41||a===91&&u===93||a===123&&u===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=o5()){let r=a5(),i=[];for(let s=1,o=t.getLineCount();s<=o;s++){let a=t.getLineContent(s),u=a.length,l=0,c=0,d=0,h=1,m=!1,g=!1,v=!1,N=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}};var pd=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),zo;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof hi?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ui.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:pd})})(zo||(zo={}));var hi=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?pd:(this._emitter||(this._emitter=new lt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},Ss=class{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new hi),this._token}cancel(){this._token?this._token instanceof hi&&this._token.cancel():this._token=zo.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof hi&&this._token.dispose():this._token=zo.None}};var As=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}},Yo=new As,Rl=new As,kl=new As,u5=new Array(230),l5={},c5=[],f5=Object.create(null),d5=Object.create(null),md=[],Ol=[];for(let e=0;e<=193;e++)md[e]=-1;for(let e=0;e<=132;e++)Ol[e]=-1;(function(){let e="",t=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[1,1,"Hyper",0,e,0,e,e,e],[1,2,"Super",0,e,0,e,e,e],[1,3,"Fn",0,e,0,e,e,e],[1,4,"FnLock",0,e,0,e,e,e],[1,5,"Suspend",0,e,0,e,e,e],[1,6,"Resume",0,e,0,e,e,e],[1,7,"Turbo",0,e,0,e,e,e],[1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[1,9,"WakeUp",0,e,0,e,e,e],[0,10,"KeyA",31,"A",65,"VK_A",e,e],[0,11,"KeyB",32,"B",66,"VK_B",e,e],[0,12,"KeyC",33,"C",67,"VK_C",e,e],[0,13,"KeyD",34,"D",68,"VK_D",e,e],[0,14,"KeyE",35,"E",69,"VK_E",e,e],[0,15,"KeyF",36,"F",70,"VK_F",e,e],[0,16,"KeyG",37,"G",71,"VK_G",e,e],[0,17,"KeyH",38,"H",72,"VK_H",e,e],[0,18,"KeyI",39,"I",73,"VK_I",e,e],[0,19,"KeyJ",40,"J",74,"VK_J",e,e],[0,20,"KeyK",41,"K",75,"VK_K",e,e],[0,21,"KeyL",42,"L",76,"VK_L",e,e],[0,22,"KeyM",43,"M",77,"VK_M",e,e],[0,23,"KeyN",44,"N",78,"VK_N",e,e],[0,24,"KeyO",45,"O",79,"VK_O",e,e],[0,25,"KeyP",46,"P",80,"VK_P",e,e],[0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[0,27,"KeyR",48,"R",82,"VK_R",e,e],[0,28,"KeyS",49,"S",83,"VK_S",e,e],[0,29,"KeyT",50,"T",84,"VK_T",e,e],[0,30,"KeyU",51,"U",85,"VK_U",e,e],[0,31,"KeyV",52,"V",86,"VK_V",e,e],[0,32,"KeyW",53,"W",87,"VK_W",e,e],[0,33,"KeyX",54,"X",88,"VK_X",e,e],[0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[0,36,"Digit1",22,"1",49,"VK_1",e,e],[0,37,"Digit2",23,"2",50,"VK_2",e,e],[0,38,"Digit3",24,"3",51,"VK_3",e,e],[0,39,"Digit4",25,"4",52,"VK_4",e,e],[0,40,"Digit5",26,"5",53,"VK_5",e,e],[0,41,"Digit6",27,"6",54,"VK_6",e,e],[0,42,"Digit7",28,"7",55,"VK_7",e,e],[0,43,"Digit8",29,"8",56,"VK_8",e,e],[0,44,"Digit9",30,"9",57,"VK_9",e,e],[0,45,"Digit0",21,"0",48,"VK_0",e,e],[1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,e,0,e,e,e],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[1,64,"F1",59,"F1",112,"VK_F1",e,e],[1,65,"F2",60,"F2",113,"VK_F2",e,e],[1,66,"F3",61,"F3",114,"VK_F3",e,e],[1,67,"F4",62,"F4",115,"VK_F4",e,e],[1,68,"F5",63,"F5",116,"VK_F5",e,e],[1,69,"F6",64,"F6",117,"VK_F6",e,e],[1,70,"F7",65,"F7",118,"VK_F7",e,e],[1,71,"F8",66,"F8",119,"VK_F8",e,e],[1,72,"F9",67,"F9",120,"VK_F9",e,e],[1,73,"F10",68,"F10",121,"VK_F10",e,e],[1,74,"F11",69,"F11",122,"VK_F11",e,e],[1,75,"F12",70,"F12",123,"VK_F12",e,e],[1,76,"PrintScreen",0,e,0,e,e,e],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL",e,e],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[1,80,"Home",14,"Home",36,"VK_HOME",e,e],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[1,83,"End",13,"End",35,"VK_END",e,e],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK",e,e],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE",e,e],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD",e,e],[1,94,"NumpadEnter",3,e,0,e,e,e],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1",e,e],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2",e,e],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3",e,e],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4",e,e],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5",e,e],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6",e,e],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7",e,e],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8",e,e],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9",e,e],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0",e,e],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102",e,e],[1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[1,108,"Power",0,e,0,e,e,e],[1,109,"NumpadEqual",0,e,0,e,e,e],[1,110,"F13",71,"F13",124,"VK_F13",e,e],[1,111,"F14",72,"F14",125,"VK_F14",e,e],[1,112,"F15",73,"F15",126,"VK_F15",e,e],[1,113,"F16",74,"F16",127,"VK_F16",e,e],[1,114,"F17",75,"F17",128,"VK_F17",e,e],[1,115,"F18",76,"F18",129,"VK_F18",e,e],[1,116,"F19",77,"F19",130,"VK_F19",e,e],[1,117,"F20",78,"F20",131,"VK_F20",e,e],[1,118,"F21",79,"F21",132,"VK_F21",e,e],[1,119,"F22",80,"F22",133,"VK_F22",e,e],[1,120,"F23",81,"F23",134,"VK_F23",e,e],[1,121,"F24",82,"F24",135,"VK_F24",e,e],[1,122,"Open",0,e,0,e,e,e],[1,123,"Help",0,e,0,e,e,e],[1,124,"Select",0,e,0,e,e,e],[1,125,"Again",0,e,0,e,e,e],[1,126,"Undo",0,e,0,e,e,e],[1,127,"Cut",0,e,0,e,e,e],[1,128,"Copy",0,e,0,e,e,e],[1,129,"Paste",0,e,0,e,e,e],[1,130,"Find",0,e,0,e,e,e],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1",e,e],[1,136,"KanaMode",0,e,0,e,e,e],[0,137,"IntlYen",0,e,0,e,e,e],[1,138,"Convert",0,e,0,e,e,e],[1,139,"NonConvert",0,e,0,e,e,e],[1,140,"Lang1",0,e,0,e,e,e],[1,141,"Lang2",0,e,0,e,e,e],[1,142,"Lang3",0,e,0,e,e,e],[1,143,"Lang4",0,e,0,e,e,e],[1,144,"Lang5",0,e,0,e,e,e],[1,145,"Abort",0,e,0,e,e,e],[1,146,"Props",0,e,0,e,e,e],[1,147,"NumpadParenLeft",0,e,0,e,e,e],[1,148,"NumpadParenRight",0,e,0,e,e,e],[1,149,"NumpadBackspace",0,e,0,e,e,e],[1,150,"NumpadMemoryStore",0,e,0,e,e,e],[1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[1,152,"NumpadMemoryClear",0,e,0,e,e,e],[1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR",e,e],[1,156,"NumpadClearEntry",0,e,0,e,e,e],[1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[1,0,e,6,"Alt",18,"VK_MENU",e,e],[1,0,e,57,"Meta",91,"VK_COMMAND",e,e],[1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[1,165,"BrightnessUp",0,e,0,e,e,e],[1,166,"BrightnessDown",0,e,0,e,e,e],[1,167,"MediaPlay",0,e,0,e,e,e],[1,168,"MediaRecord",0,e,0,e,e,e],[1,169,"MediaFastForward",0,e,0,e,e,e],[1,170,"MediaRewind",0,e,0,e,e,e],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP",e,e],[1,174,"Eject",0,e,0,e,e,e],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[1,180,"SelectTask",0,e,0,e,e,e],[1,181,"LaunchScreenSaver",0,e,0,e,e,e],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[1,189,"ZoomToggle",0,e,0,e,e,e],[1,190,"MailReply",0,e,0,e,e,e],[1,191,"MailForward",0,e,0,e,e,e],[1,192,"MailSend",0,e,0,e,e,e],[1,0,e,114,"KeyInComposition",229,e,e,e],[1,0,e,116,"ABNT_C2",194,"VK_ABNT_C2",e,e],[1,0,e,96,"OEM_8",223,"VK_OEM_8",e,e],[1,0,e,0,e,0,"VK_KANA",e,e],[1,0,e,0,e,0,"VK_HANGUL",e,e],[1,0,e,0,e,0,"VK_JUNJA",e,e],[1,0,e,0,e,0,"VK_FINAL",e,e],[1,0,e,0,e,0,"VK_HANJA",e,e],[1,0,e,0,e,0,"VK_KANJI",e,e],[1,0,e,0,e,0,"VK_CONVERT",e,e],[1,0,e,0,e,0,"VK_NONCONVERT",e,e],[1,0,e,0,e,0,"VK_ACCEPT",e,e],[1,0,e,0,e,0,"VK_MODECHANGE",e,e],[1,0,e,0,e,0,"VK_SELECT",e,e],[1,0,e,0,e,0,"VK_PRINT",e,e],[1,0,e,0,e,0,"VK_EXECUTE",e,e],[1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[1,0,e,0,e,0,"VK_HELP",e,e],[1,0,e,0,e,0,"VK_APPS",e,e],[1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[1,0,e,0,e,0,"VK_PACKET",e,e],[1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[1,0,e,0,e,0,"VK_ATTN",e,e],[1,0,e,0,e,0,"VK_CRSEL",e,e],[1,0,e,0,e,0,"VK_EXSEL",e,e],[1,0,e,0,e,0,"VK_EREOF",e,e],[1,0,e,0,e,0,"VK_PLAY",e,e],[1,0,e,0,e,0,"VK_ZOOM",e,e],[1,0,e,0,e,0,"VK_NONAME",e,e],[1,0,e,0,e,0,"VK_PA1",e,e],[1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]],n=[],r=[];for(let i of t){let[s,o,a,u,l,c,d,h,m]=i;if(r[o]||(r[o]=!0,c5[o]=a,f5[a]=o,d5[a.toLowerCase()]=o,s&&(md[o]=u,u!==0&&u!==3&&u!==5&&u!==4&&u!==6&&u!==57&&(Ol[u]=o))),!n[u]){if(n[u]=!0,!l)throw new Error(`String representation missing for key code ${u} around scan code ${a}`);Yo.define(u,l),Rl.define(u,h||l),kl.define(u,m||h||l)}c&&(u5[c]=u),d&&(l5[d]=u)}Ol[3]=46})();var hd;(function(e){function t(a){return Yo.keyCodeToStr(a)}e.toString=t;function n(a){return Yo.strToKeyCode(a)}e.fromString=n;function r(a){return Rl.keyCodeToStr(a)}e.toUserSettingsUS=r;function i(a){return kl.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return Rl.strToKeyCode(a)||kl.strToKeyCode(a)}e.fromUserSettings=s;function o(a){if(a>=98&&a<=113)return null;switch(a){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Yo.keyCodeToStr(a)}e.toElectronAccelerator=o})(hd||(hd={}));function gd(e,t){let n=(t&65535)<<16>>>0;return(e|n)>>>0}var Jo=class e extends oe{constructor(t,n,r,i){super(t,n,r,i),this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return e.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new e(this.startLineNumber,this.startColumn,t,n):new e(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new Se(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Se(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(t,n){return this.getDirection()===0?new e(t,n,this.endLineNumber,this.endColumn):new e(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new e(t.lineNumber,t.column,n.lineNumber,n.column)}static fromRange(t,n){return n===0?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}static liftSelection(t){return new e(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;r{this._tokenizationSupports.get(t)===n&&(this._tokenizationSupports.delete(t),this.handleChange([t]))})}get(t){return this._tokenizationSupports.get(t)||null}registerFactory(t,n){this._factories.get(t)?.dispose();let r=new Ml(this,t,n);return this._factories.set(t,r),Zn(()=>{let i=this._factories.get(t);!i||i!==r||(this._factories.delete(t),i.dispose())})}async getOrCreate(t){let n=this.get(t);if(n)return n;let r=this._factories.get(t);return!r||r.isResolved?null:(await r.resolve(),this.get(t))}isResolved(t){if(this.get(t))return!0;let r=this._factories.get(t);return!!(!r||r.isResolved)}setColorMap(t){this._colorMap=t,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}},Ml=class extends Xt{get isResolved(){return this._isResolved}constructor(t,n,r){super(),this._registry=t,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){let t=await this._factory.tokenizationSupport;this._isResolved=!0,t&&!this._isDisposed&&this._register(this._registry.register(this._languageId,t))}};var Xo=class{constructor(t,n,r){this.offset=t,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}};var Ed;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(Ed||(Ed={}));var yd;(function(e){let t=new Map;t.set(0,re.symbolMethod),t.set(1,re.symbolFunction),t.set(2,re.symbolConstructor),t.set(3,re.symbolField),t.set(4,re.symbolVariable),t.set(5,re.symbolClass),t.set(6,re.symbolStruct),t.set(7,re.symbolInterface),t.set(8,re.symbolModule),t.set(9,re.symbolProperty),t.set(10,re.symbolEvent),t.set(11,re.symbolOperator),t.set(12,re.symbolUnit),t.set(13,re.symbolValue),t.set(15,re.symbolEnum),t.set(14,re.symbolConstant),t.set(15,re.symbolEnum),t.set(16,re.symbolEnumMember),t.set(17,re.symbolKeyword),t.set(27,re.symbolSnippet),t.set(18,re.symbolText),t.set(19,re.symbolColor),t.set(20,re.symbolFile),t.set(21,re.symbolReference),t.set(22,re.symbolCustomColor),t.set(23,re.symbolFolder),t.set(24,re.symbolTypeParameter),t.set(25,re.account),t.set(26,re.issues);function n(s){let o=t.get(s);return o||(console.info("No codicon found for CompletionItemKind "+s),o=re.symbolProperty),o}e.toIcon=n;let r=new Map;r.set("method",0),r.set("function",1),r.set("constructor",2),r.set("field",3),r.set("variable",4),r.set("class",5),r.set("struct",6),r.set("interface",7),r.set("module",8),r.set("property",9),r.set("event",10),r.set("operator",11),r.set("unit",12),r.set("value",13),r.set("constant",14),r.set("enum",15),r.set("enum-member",16),r.set("enumMember",16),r.set("keyword",17),r.set("snippet",27),r.set("text",18),r.set("color",19),r.set("file",20),r.set("reference",21),r.set("customcolor",22),r.set("folder",23),r.set("type-parameter",24),r.set("typeParameter",24),r.set("account",25),r.set("issue",26);function i(s,o){let a=r.get(s);return typeof a>"u"&&!o&&(a=9),a}e.fromString=i})(yd||(yd={}));var xd;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(xd||(xd={}));var _d;(function(e){e[e.Automatic=0]="Automatic",e[e.PasteAs=1]="PasteAs"})(_d||(_d={}));var Nd;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(Nd||(Nd={}));var Td;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(Td||(Td={}));var _6={17:ke("Array","array"),16:ke("Boolean","boolean"),4:ke("Class","class"),13:ke("Constant","constant"),8:ke("Constructor","constructor"),9:ke("Enum","enumeration"),21:ke("EnumMember","enumeration member"),23:ke("Event","event"),7:ke("Field","field"),0:ke("File","file"),11:ke("Function","function"),10:ke("Interface","interface"),19:ke("Key","key"),5:ke("Method","method"),1:ke("Module","module"),2:ke("Namespace","namespace"),20:ke("Null","null"),15:ke("Number","number"),18:ke("Object","object"),24:ke("Operator","operator"),3:ke("Package","package"),6:ke("Property","property"),14:ke("String","string"),22:ke("Struct","struct"),25:ke("TypeParameter","type parameter"),12:ke("Variable","variable")};var Sd;(function(e){let t=new Map;t.set(0,re.symbolFile),t.set(1,re.symbolModule),t.set(2,re.symbolNamespace),t.set(3,re.symbolPackage),t.set(4,re.symbolClass),t.set(5,re.symbolMethod),t.set(6,re.symbolProperty),t.set(7,re.symbolField),t.set(8,re.symbolConstructor),t.set(9,re.symbolEnum),t.set(10,re.symbolInterface),t.set(11,re.symbolFunction),t.set(12,re.symbolVariable),t.set(13,re.symbolConstant),t.set(14,re.symbolString),t.set(15,re.symbolNumber),t.set(16,re.symbolBoolean),t.set(17,re.symbolArray),t.set(18,re.symbolObject),t.set(19,re.symbolKey),t.set(20,re.symbolNull),t.set(21,re.symbolEnumMember),t.set(22,re.symbolStruct),t.set(23,re.symbolEvent),t.set(24,re.symbolOperator),t.set(25,re.symbolTypeParameter);function n(r){let i=t.get(r);return i||(console.info("No codicon found for SymbolKind "+r),i=re.symbolProperty),i}e.toIcon=n})(Sd||(Sd={}));var Ad=class e{static{this.Comment=new e("comment")}static{this.Imports=new e("imports")}static{this.Region=new e("region")}static fromValue(t){switch(t){case"comment":return e.Comment;case"imports":return e.Imports;case"region":return e.Region}return new e(t)}constructor(t){this.value=t}},Fd;(function(e){e[e.AIGenerated=1]="AIGenerated"})(Fd||(Fd={}));var wd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(wd||(wd={}));var Ld;(function(e){function t(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}e.is=t})(Ld||(Ld={}));var Cd;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Cd||(Cd={}));var N6=new Fs,T6=new Fs,Id;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Id||(Id={}));var Rd;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(Rd||(Rd={}));var kd;(function(e){e[e.Invoke=1]="Invoke",e[e.Auto=2]="Auto"})(kd||(kd={}));var Od;(function(e){e[e.None=0]="None",e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(Od||(Od={}));var Md;(function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"})(Md||(Md={}));var Pd;(function(e){e[e.Deprecated=1]="Deprecated"})(Pd||(Pd={}));var Bd;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Bd||(Bd={}));var Vd;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(Vd||(Vd={}));var Ud;(function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"})(Ud||(Ud={}));var $d;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})($d||($d={}));var jd;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(jd||(jd={}));var qd;(function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"})(qd||(qd={}));var Gd;(function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.ariaRequired=5]="ariaRequired",e[e.autoClosingBrackets=6]="autoClosingBrackets",e[e.autoClosingComments=7]="autoClosingComments",e[e.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",e[e.autoClosingDelete=9]="autoClosingDelete",e[e.autoClosingOvertype=10]="autoClosingOvertype",e[e.autoClosingQuotes=11]="autoClosingQuotes",e[e.autoIndent=12]="autoIndent",e[e.automaticLayout=13]="automaticLayout",e[e.autoSurround=14]="autoSurround",e[e.bracketPairColorization=15]="bracketPairColorization",e[e.guides=16]="guides",e[e.codeLens=17]="codeLens",e[e.codeLensFontFamily=18]="codeLensFontFamily",e[e.codeLensFontSize=19]="codeLensFontSize",e[e.colorDecorators=20]="colorDecorators",e[e.colorDecoratorsLimit=21]="colorDecoratorsLimit",e[e.columnSelection=22]="columnSelection",e[e.comments=23]="comments",e[e.contextmenu=24]="contextmenu",e[e.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",e[e.cursorBlinking=26]="cursorBlinking",e[e.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",e[e.cursorStyle=28]="cursorStyle",e[e.cursorSurroundingLines=29]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",e[e.cursorWidth=31]="cursorWidth",e[e.disableLayerHinting=32]="disableLayerHinting",e[e.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",e[e.domReadOnly=34]="domReadOnly",e[e.dragAndDrop=35]="dragAndDrop",e[e.dropIntoEditor=36]="dropIntoEditor",e[e.emptySelectionClipboard=37]="emptySelectionClipboard",e[e.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",e[e.extraEditorClassName=39]="extraEditorClassName",e[e.fastScrollSensitivity=40]="fastScrollSensitivity",e[e.find=41]="find",e[e.fixedOverflowWidgets=42]="fixedOverflowWidgets",e[e.folding=43]="folding",e[e.foldingStrategy=44]="foldingStrategy",e[e.foldingHighlight=45]="foldingHighlight",e[e.foldingImportsByDefault=46]="foldingImportsByDefault",e[e.foldingMaximumRegions=47]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=49]="fontFamily",e[e.fontInfo=50]="fontInfo",e[e.fontLigatures=51]="fontLigatures",e[e.fontSize=52]="fontSize",e[e.fontWeight=53]="fontWeight",e[e.fontVariations=54]="fontVariations",e[e.formatOnPaste=55]="formatOnPaste",e[e.formatOnType=56]="formatOnType",e[e.glyphMargin=57]="glyphMargin",e[e.gotoLocation=58]="gotoLocation",e[e.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",e[e.hover=60]="hover",e[e.inDiffEditor=61]="inDiffEditor",e[e.inlineSuggest=62]="inlineSuggest",e[e.inlineEdit=63]="inlineEdit",e[e.letterSpacing=64]="letterSpacing",e[e.lightbulb=65]="lightbulb",e[e.lineDecorationsWidth=66]="lineDecorationsWidth",e[e.lineHeight=67]="lineHeight",e[e.lineNumbers=68]="lineNumbers",e[e.lineNumbersMinChars=69]="lineNumbersMinChars",e[e.linkedEditing=70]="linkedEditing",e[e.links=71]="links",e[e.matchBrackets=72]="matchBrackets",e[e.minimap=73]="minimap",e[e.mouseStyle=74]="mouseStyle",e[e.mouseWheelScrollSensitivity=75]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=76]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=77]="multiCursorMergeOverlapping",e[e.multiCursorModifier=78]="multiCursorModifier",e[e.multiCursorPaste=79]="multiCursorPaste",e[e.multiCursorLimit=80]="multiCursorLimit",e[e.occurrencesHighlight=81]="occurrencesHighlight",e[e.overviewRulerBorder=82]="overviewRulerBorder",e[e.overviewRulerLanes=83]="overviewRulerLanes",e[e.padding=84]="padding",e[e.pasteAs=85]="pasteAs",e[e.parameterHints=86]="parameterHints",e[e.peekWidgetDefaultFocus=87]="peekWidgetDefaultFocus",e[e.placeholder=88]="placeholder",e[e.definitionLinkOpensInPeek=89]="definitionLinkOpensInPeek",e[e.quickSuggestions=90]="quickSuggestions",e[e.quickSuggestionsDelay=91]="quickSuggestionsDelay",e[e.readOnly=92]="readOnly",e[e.readOnlyMessage=93]="readOnlyMessage",e[e.renameOnType=94]="renameOnType",e[e.renderControlCharacters=95]="renderControlCharacters",e[e.renderFinalNewline=96]="renderFinalNewline",e[e.renderLineHighlight=97]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=98]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=99]="renderValidationDecorations",e[e.renderWhitespace=100]="renderWhitespace",e[e.revealHorizontalRightPadding=101]="revealHorizontalRightPadding",e[e.roundedSelection=102]="roundedSelection",e[e.rulers=103]="rulers",e[e.scrollbar=104]="scrollbar",e[e.scrollBeyondLastColumn=105]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=106]="scrollBeyondLastLine",e[e.scrollPredominantAxis=107]="scrollPredominantAxis",e[e.selectionClipboard=108]="selectionClipboard",e[e.selectionHighlight=109]="selectionHighlight",e[e.selectOnLineNumbers=110]="selectOnLineNumbers",e[e.showFoldingControls=111]="showFoldingControls",e[e.showUnused=112]="showUnused",e[e.snippetSuggestions=113]="snippetSuggestions",e[e.smartSelect=114]="smartSelect",e[e.smoothScrolling=115]="smoothScrolling",e[e.stickyScroll=116]="stickyScroll",e[e.stickyTabStops=117]="stickyTabStops",e[e.stopRenderingLineAfter=118]="stopRenderingLineAfter",e[e.suggest=119]="suggest",e[e.suggestFontSize=120]="suggestFontSize",e[e.suggestLineHeight=121]="suggestLineHeight",e[e.suggestOnTriggerCharacters=122]="suggestOnTriggerCharacters",e[e.suggestSelection=123]="suggestSelection",e[e.tabCompletion=124]="tabCompletion",e[e.tabIndex=125]="tabIndex",e[e.unicodeHighlighting=126]="unicodeHighlighting",e[e.unusualLineTerminators=127]="unusualLineTerminators",e[e.useShadowDOM=128]="useShadowDOM",e[e.useTabStops=129]="useTabStops",e[e.wordBreak=130]="wordBreak",e[e.wordSegmenterLocales=131]="wordSegmenterLocales",e[e.wordSeparators=132]="wordSeparators",e[e.wordWrap=133]="wordWrap",e[e.wordWrapBreakAfterCharacters=134]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=135]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=136]="wordWrapColumn",e[e.wordWrapOverride1=137]="wordWrapOverride1",e[e.wordWrapOverride2=138]="wordWrapOverride2",e[e.wrappingIndent=139]="wrappingIndent",e[e.wrappingStrategy=140]="wrappingStrategy",e[e.showDeprecated=141]="showDeprecated",e[e.inlayHints=142]="inlayHints",e[e.editorClassName=143]="editorClassName",e[e.pixelRatio=144]="pixelRatio",e[e.tabFocusMode=145]="tabFocusMode",e[e.layoutInfo=146]="layoutInfo",e[e.wrappingInfo=147]="wrappingInfo",e[e.defaultColorDecorators=148]="defaultColorDecorators",e[e.colorDecoratorsActivatedOn=149]="colorDecoratorsActivatedOn",e[e.inlineCompletionsAccessibilityVerbose=150]="inlineCompletionsAccessibilityVerbose"})(Gd||(Gd={}));var Hd;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Hd||(Hd={}));var Wd;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(Wd||(Wd={}));var Qd;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Qd||(Qd={}));var zd;(function(e){e[e.Increase=0]="Increase",e[e.Decrease=1]="Decrease"})(zd||(zd={}));var Yd;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(Yd||(Yd={}));var Jd;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Jd||(Jd={}));var Xd;(function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(Xd||(Xd={}));var Kd;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Kd||(Kd={}));var Zd;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(Zd||(Zd={}));var Ko;(function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.F20=78]="F20",e[e.F21=79]="F21",e[e.F22=80]="F22",e[e.F23=81]="F23",e[e.F24=82]="F24",e[e.NumLock=83]="NumLock",e[e.ScrollLock=84]="ScrollLock",e[e.Semicolon=85]="Semicolon",e[e.Equal=86]="Equal",e[e.Comma=87]="Comma",e[e.Minus=88]="Minus",e[e.Period=89]="Period",e[e.Slash=90]="Slash",e[e.Backquote=91]="Backquote",e[e.BracketLeft=92]="BracketLeft",e[e.Backslash=93]="Backslash",e[e.BracketRight=94]="BracketRight",e[e.Quote=95]="Quote",e[e.OEM_8=96]="OEM_8",e[e.IntlBackslash=97]="IntlBackslash",e[e.Numpad0=98]="Numpad0",e[e.Numpad1=99]="Numpad1",e[e.Numpad2=100]="Numpad2",e[e.Numpad3=101]="Numpad3",e[e.Numpad4=102]="Numpad4",e[e.Numpad5=103]="Numpad5",e[e.Numpad6=104]="Numpad6",e[e.Numpad7=105]="Numpad7",e[e.Numpad8=106]="Numpad8",e[e.Numpad9=107]="Numpad9",e[e.NumpadMultiply=108]="NumpadMultiply",e[e.NumpadAdd=109]="NumpadAdd",e[e.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=111]="NumpadSubtract",e[e.NumpadDecimal=112]="NumpadDecimal",e[e.NumpadDivide=113]="NumpadDivide",e[e.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",e[e.ABNT_C1=115]="ABNT_C1",e[e.ABNT_C2=116]="ABNT_C2",e[e.AudioVolumeMute=117]="AudioVolumeMute",e[e.AudioVolumeUp=118]="AudioVolumeUp",e[e.AudioVolumeDown=119]="AudioVolumeDown",e[e.BrowserSearch=120]="BrowserSearch",e[e.BrowserHome=121]="BrowserHome",e[e.BrowserBack=122]="BrowserBack",e[e.BrowserForward=123]="BrowserForward",e[e.MediaTrackNext=124]="MediaTrackNext",e[e.MediaTrackPrevious=125]="MediaTrackPrevious",e[e.MediaStop=126]="MediaStop",e[e.MediaPlayPause=127]="MediaPlayPause",e[e.LaunchMediaPlayer=128]="LaunchMediaPlayer",e[e.LaunchMail=129]="LaunchMail",e[e.LaunchApp2=130]="LaunchApp2",e[e.Clear=131]="Clear",e[e.MAX_VALUE=132]="MAX_VALUE"})(Ko||(Ko={}));var Zo;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(Zo||(Zo={}));var ea;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(ea||(ea={}));var ep;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(ep||(ep={}));var tp;(function(e){e[e.Normal=1]="Normal",e[e.Underlined=2]="Underlined"})(tp||(tp={}));var np;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(np||(np={}));var rp;(function(e){e[e.AIGenerated=1]="AIGenerated"})(rp||(rp={}));var ip;(function(e){e[e.Invoke=0]="Invoke",e[e.Automatic=1]="Automatic"})(ip||(ip={}));var sp;(function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"})(sp||(sp={}));var op;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(op||(op={}));var ap;(function(e){e[e.Word=0]="Word",e[e.Line=1]="Line",e[e.Suggest=2]="Suggest"})(ap||(ap={}));var up;(function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None",e[e.LeftOfInjectedText=3]="LeftOfInjectedText",e[e.RightOfInjectedText=4]="RightOfInjectedText"})(up||(up={}));var lp;(function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"})(lp||(lp={}));var cp;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(cp||(cp={}));var fp;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(fp||(fp={}));var dp;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(dp||(dp={}));var ta;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(ta||(ta={}));var pp;(function(e){e.Off="off",e.OnCode="onCode",e.On="on"})(pp||(pp={}));var hp;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(hp||(hp={}));var mp;(function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"})(mp||(mp={}));var gp;(function(e){e[e.Deprecated=1]="Deprecated"})(gp||(gp={}));var Dp;(function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"})(Dp||(Dp={}));var vp;(function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"})(vp||(vp={}));var bp;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(bp||(bp={}));var Ep;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Ep||(Ep={}));var Pl=class{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(t,n){return gd(t,n)}};function yp(){return{editor:void 0,languages:void 0,CancellationTokenSource:Ss,Emitter:lt,KeyCode:Ko,KeyMod:Pl,Position:Se,Range:oe,Selection:Jo,SelectionDirection:ta,MarkerSeverity:Zo,MarkerTag:ea,Uri:_t,Token:Xo}}var ws=class e{static{this.CHANNEL_NAME="editorWorkerHost"}static getChannel(t){return t.getChannel(e.CHANNEL_NAME)}static setChannel(t,n){t.setChannel(e.CHANNEL_NAME,n)}};var xp,_p,Bl=class{constructor(t,n){this.uri=t,this.value=n}};function m5(e){return Array.isArray(e)}var Np=class e{static{this.defaultToKey=t=>t.toString()}constructor(t,n){if(this[xp]="ResourceMap",t instanceof e)this.map=new Map(t.map),this.toKey=n??e.defaultToKey;else if(m5(t)){this.map=new Map,this.toKey=n??e.defaultToKey;for(let[r,i]of t)this.set(r,i)}else this.map=new Map,this.toKey=t??e.defaultToKey}set(t,n){return this.map.set(this.toKey(t),new Bl(t,n)),this}get(t){return this.map.get(this.toKey(t))?.value}has(t){return this.map.has(this.toKey(t))}get size(){return this.map.size}clear(){this.map.clear()}delete(t){return this.map.delete(this.toKey(t))}forEach(t,n){typeof n<"u"&&(t=t.bind(n));for(let[r,i]of this.map)t(i.value,i.uri,this)}*values(){for(let t of this.map.values())yield t.value}*keys(){for(let t of this.map.values())yield t.uri}*entries(){for(let t of this.map.values())yield[t.uri,t.value]}*[(xp=Symbol.toStringTag,Symbol.iterator)](){for(let[,t]of this.map)yield[t.uri,t.value]}},Vl=class{constructor(){this[_p]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(t){return this._map.has(t)}get(t,n=0){let r=this._map.get(t);if(r)return n!==0&&this.touch(r,n),r.value}set(t,n,r=0){let i=this._map.get(t);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){let t=this,n=this._state,r=this._head,i={[Symbol.iterator](){return i},next(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){let s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(_p=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===2){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}},Ul=class extends Vl{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get(t,n=2){return super.get(t,n)}peek(t){return super.get(t,0)}set(t,n){return super.set(t,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}},na=class extends Ul{constructor(t,n=1){super(t,n)}trim(t){this.trimOld(t)}set(t,n){return super.set(t,n),this.checkTrim(),this}};var ra=class{constructor(){this.map=new Map}add(t,n){let r=this.map.get(t);r||(r=new Set,this.map.set(t,r)),r.add(n)}delete(t,n){let r=this.map.get(t);r&&(r.delete(n),r.size===0&&this.map.delete(t))}forEach(t,n){let r=this.map.get(t);r&&r.forEach(n)}get(t){let n=this.map.get(t);return n||new Set}};var U6=new na(10);function g5(e){let t=[];for(;Object.prototype!==e;)t=t.concat(Object.getOwnPropertyNames(e)),e=Object.getPrototypeOf(e);return t}function $l(e){let t=[];for(let n of g5(e))typeof e[n]=="function"&&t.push(n);return t}function Tp(e,t){let n=i=>function(){let s=Array.prototype.slice.call(arguments,0);return t(i,s)},r={};for(let i of e)r[i]=n(i);return r}var Sp;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(Sp||(Sp={}));var Ap;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=3]="Right"})(Ap||(Ap={}));var Fp;(function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"})(Fp||(Fp={}));function D5(e,t,n,r,i){if(r===0)return!0;let s=t.charCodeAt(r-1);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r);if(e.get(o)!==0)return!0}return!1}function v5(e,t,n,r,i){if(r+i===n)return!0;let s=t.charCodeAt(r+i);if(e.get(s)!==0||s===13||s===10)return!0;if(i>0){let o=t.charCodeAt(r+i-1);if(e.get(o)!==0)return!0}return!1}function b5(e,t,n,r,i){return D5(e,t,n,r,i)&&v5(e,t,n,r,i)}var ia=class{constructor(t,n){this._wordSeparators=t,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(t){this._searchRegex.lastIndex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(t){let n=t.length,r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(t),!r))return null;let i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Wf(t,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||b5(this._wordSeparators,t,n,i,s))return r}while(r);return null}};function wp(e,t="Unreachable"){throw new Error(t)}function Nr(e){if(!e()){debugger;e(),In(new it("Assertion Failed"))}}function Ls(e,t){let n=0;for(;n/?";function y5(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(let n of E5)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}var jl=y5();function ql(e){let t=jl;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}var Lp=new gs;Lp.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Cs(e,t,n,r,i){if(t=ql(t),i||(i=ii.first(Lp)),n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Cs(e,t,n,r,i)}let s=Date.now(),o=e-1-r,a=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){let c=o-i.windowSize*l;t.lastIndex=Math.max(0,c);let d=x5(t,n,o,a);if(!d&&u||(u=d,c<=0))break;a=c}if(u){let l={word:u[0],startColumn:r+1+u.index,endColumn:r+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function x5(e,t,n,r){let i;for(;i=e.exec(t);){let s=i.index||0;if(s<=n&&e.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}var sa=class{static computeUnicodeHighlights(t,n,r){let i=r?r.startLineNumber:1,s=r?r.endLineNumber:t.getLineCount(),o=new oa(n),a=o.getCandidateCodePoints(),u;a==="allNonBasicAscii"?u=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):u=new RegExp(`${_5(Array.from(a))}`,"g");let l=new ia(null,u),c=[],d=!1,h,m=0,g=0,v=0;e:for(let N=i,_=s;N<=_;N++){let w=t.getLineContent(N),C=w.length;l.reset(0);do if(h=l.next(w),h){let S=h.index,k=h.index+h[0].length;if(S>0){let L=w.charCodeAt(S-1);di(L)&&S--}if(k+1=L){d=!0;break e}c.push(new oe(N,S+1,N,k+1))}}while(h)}return{ranges:c,hasMore:d,ambiguousCharacterCount:m,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:v}}static computeUnicodeHighlightReason(t,n){let r=new oa(n);switch(r.shouldHighlightNonBasicASCII(t,null)){case 0:return null;case 2:return{kind:1};case 3:{let s=t.codePointAt(0),o=r.ambiguousCharacters.getPrimaryConfusable(s),a=ci.getLocales().filter(u=>!ci.getInstance(new Set([...n.allowedLocales,u])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:a}}case 1:return{kind:2}}}};function _5(e,t){return`[${jf(e.map(r=>String.fromCodePoint(r)).join(""))}]`}var oa=class{constructor(t){this.options=t,this.allowedCodePoints=new Set(t.allowedCodePoints),this.ambiguousCharacters=ci.getInstance(new Set(t.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";let t=new Set;if(this.options.invisibleCharacters)for(let n of fi.codePoints)Cp(String.fromCodePoint(n))||t.add(n);if(this.options.ambiguousCharacters)for(let n of this.ambiguousCharacters.getConfusableCodePoints())t.add(n);for(let n of this.allowedCodePoints)t.delete(n);return t}shouldHighlightNonBasicASCII(t,n){let r=t.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(let o of n){let a=o.codePointAt(0),u=Qf(o);i=i||u,!u&&!this.ambiguousCharacters.isAmbiguous(a)&&!fi.isInvisibleCharacter(a)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Cp(t)&&fi.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}};function Cp(e){return e===" "||e===` +`||e===" "}var ar=class{constructor(t,n,r){this.changes=t,this.moves=n,this.hitTimeout=r}},aa=class{constructor(t,n){this.lineRangeMapping=t,this.changes=n}};var Ee=class e{static addRange(t,n){let r=0;for(;rn))return new e(t,n)}static ofLength(t){return new e(0,t)}static ofStartAndLength(t,n){return new e(t,t+n)}constructor(t,n){if(this.start=t,this.endExclusive=n,t>n)throw new it(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(t){return new e(this.start+t,this.endExclusive+t)}deltaStart(t){return new e(this.start+t,this.endExclusive)}deltaEnd(t){return new e(this.start,this.endExclusive+t)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}contains(t){return this.start<=t&&t=t.endExclusive}slice(t){return t.slice(this.start,this.endExclusive)}substring(t){return t.substring(this.start,this.endExclusive)}clip(t){if(this.isEmpty)throw new it(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,t))}clipCyclic(t){if(this.isEmpty)throw new it(`Invalid clipping range: ${this.toString()}`);return t=this.endExclusive?this.start+(t-this.start)%this.length:t}forEach(t){for(let n=this.start;nn)throw new it(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=t,this.endLineNumberExclusive=n}contains(t){return this.startLineNumber<=t&&ti.endLineNumberExclusive>=t.startLineNumber),r=Tr(this._normalizedRanges,i=>i.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,t);else if(n===r-1){let i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(t)}else{let i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(t);this._normalizedRanges.splice(n,r-n,i)}}contains(t){let n=Mn(this._normalizedRanges,r=>r.startLineNumber<=t);return!!n&&n.endLineNumberExclusive>t}intersects(t){let n=Mn(this._normalizedRanges,r=>r.startLineNumbert.startLineNumber}getUnion(t){if(this._normalizedRanges.length===0)return t;if(t._normalizedRanges.length===0)return this;let n=[],r=0,i=0,s=null;for(;r=o.startLineNumber?s=new ge(s.startLineNumber,Math.max(s.endLineNumberExclusive,o.endLineNumberExclusive)):(n.push(s),s=o)}return s!==null&&n.push(s),new e(n)}subtractFrom(t){let n=ua(this._normalizedRanges,o=>o.endLineNumberExclusive>=t.startLineNumber),r=Tr(this._normalizedRanges,o=>o.startLineNumber<=t.endLineNumberExclusive)+1;if(n===r)return new e([t]);let i=[],s=t.startLineNumber;for(let o=n;os&&i.push(new ge(s,a.startLineNumber)),s=a.endLineNumberExclusive}return st.toString()).join(", ")}getIntersection(t){let n=[],r=0,i=0;for(;rn.delta(t)))}};var la=class e{static{this.zero=new e(0,0)}static betweenPositions(t,n){return t.lineNumber===n.lineNumber?new e(0,n.column-t.column):new e(n.lineNumber-t.lineNumber,n.column-1)}static ofRange(t){return e.betweenPositions(t.getStartPosition(),t.getEndPosition())}static ofText(t){let n=0,r=0;for(let i of t)i===` +`?(n++,r=0):r++;return new e(n,r)}constructor(t,n){this.lineCount=t,this.columnCount=n}isGreaterThanOrEqualTo(t){return this.lineCount!==t.lineCount?this.lineCount>t.lineCount:this.columnCount>=t.columnCount}createRange(t){return this.lineCount===0?new oe(t.lineNumber,t.column,t.lineNumber,t.column+this.columnCount):new oe(t.lineNumber,t.column,t.lineNumber+this.lineCount,this.columnCount+1)}addToPosition(t){return this.lineCount===0?new Se(t.lineNumber,t.column+this.columnCount):new Se(t.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}};var ca=class{constructor(t,n){this.range=t,this.text=n}toSingleEditOperation(){return{range:this.range,text:this.text}}};var pn=class e{static inverse(t,n,r){let i=[],s=1,o=1;for(let u of t){let l=new e(new ge(s,u.original.startLineNumber),new ge(o,u.modified.startLineNumber));l.modified.isEmpty||i.push(l),s=u.original.endLineNumberExclusive,o=u.modified.endLineNumberExclusive}let a=new e(new ge(s,n+1),new ge(o,r+1));return a.modified.isEmpty||i.push(a),i}static clip(t,n,r){let i=[];for(let s of t){let o=s.original.intersect(n),a=s.modified.intersect(r);o&&!o.isEmpty&&a&&!a.isEmpty&&i.push(new e(o,a))}return i}constructor(t,n){this.original=t,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new e(this.modified,this.original)}join(t){return new e(this.original.join(t.original),this.modified.join(t.modified))}toRangeMapping(){let t=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(t&&n)return new Ot(t,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new it("not a valid diff");return new Ot(new oe(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new oe(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Ot(new oe(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new oe(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(t,n){if(Rp(this.original.endLineNumberExclusive,t)&&Rp(this.modified.endLineNumberExclusive,n))return new Ot(new oe(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new oe(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Ot(oe.fromPositions(new Se(this.original.startLineNumber,1),mi(new Se(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),oe.fromPositions(new Se(this.modified.startLineNumber,1),mi(new Se(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Ot(oe.fromPositions(mi(new Se(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),t),mi(new Se(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),t)),oe.fromPositions(mi(new Se(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),mi(new Se(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new it}};function mi(e,t){if(e.lineNumber<1)return new Se(1,1);if(e.lineNumber>t.length)return new Se(t.length,t[t.length-1].length+1);let n=t[e.lineNumber-1];return e.column>n.length+1?new Se(e.lineNumber,n.length+1):e}function Rp(e,t){return e>=1&&e<=t.length}var Pn=class e extends pn{static fromRangeMappings(t){let n=ge.join(t.map(i=>ge.fromRangeInclusive(i.originalRange))),r=ge.join(t.map(i=>ge.fromRangeInclusive(i.modifiedRange)));return new e(n,r,t)}constructor(t,n,r){super(t,n),this.innerChanges=r}flip(){return new e(this.modified,this.original,this.innerChanges?.map(t=>t.flip()))}withInnerChangesFromLineRanges(){return new e(this.original,this.modified,[this.toRangeMapping()])}},Ot=class e{static assertSorted(t){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new e(this.modifiedRange,this.originalRange)}toTextEdit(t){let n=t.getValueOfRange(this.modifiedRange);return new ca(this.originalRange,n)}};var N5=3,fa=class{computeDiff(t,n,r){let s=new Hl(t,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),o=[],a=null;for(let u of s.changes){let l;u.originalEndLineNumber===0?l=new ge(u.originalStartLineNumber+1,u.originalStartLineNumber+1):l=new ge(u.originalStartLineNumber,u.originalEndLineNumber+1);let c;u.modifiedEndLineNumber===0?c=new ge(u.modifiedStartLineNumber+1,u.modifiedStartLineNumber+1):c=new ge(u.modifiedStartLineNumber,u.modifiedEndLineNumber+1);let d=new Pn(l,c,u.charChanges?.map(h=>new Ot(new oe(h.originalStartLineNumber,h.originalStartColumn,h.originalEndLineNumber,h.originalEndColumn),new oe(h.modifiedStartLineNumber,h.modifiedStartColumn,h.modifiedEndLineNumber,h.modifiedEndColumn))));a&&(a.modified.endLineNumberExclusive===d.modified.startLineNumber||a.original.endLineNumberExclusive===d.original.startLineNumber)&&(d=new Pn(a.original.join(d.original),a.modified.join(d.modified),a.innerChanges&&d.innerChanges?a.innerChanges.concat(d.innerChanges):void 0),o.pop()),o.push(d),a=d}return Nr(()=>Ls(o,(u,l)=>l.original.startLineNumber-u.original.endLineNumberExclusive===l.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive(t===10?"\\n":String.fromCharCode(t))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(t,n){if(t<0||t>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(t){return t>0&&t===this._lineNumbers.length?this.getEndLineNumber(t-1):(this._assertIndex(t,this._lineNumbers),this._lineNumbers[t])}getEndLineNumber(t){return t===-1?this.getStartLineNumber(t+1):(this._assertIndex(t,this._lineNumbers),this._charCodes[t]===10?this._lineNumbers[t]+1:this._lineNumbers[t])}getStartColumn(t){return t>0&&t===this._columns.length?this.getEndColumn(t-1):(this._assertIndex(t,this._columns),this._columns[t])}getEndColumn(t){return t===-1?this.getStartColumn(t+1):(this._assertIndex(t,this._columns),this._charCodes[t]===10?1:this._columns[t]+1)}},gi=class e{constructor(t,n,r,i,s,o,a,u){this.originalStartLineNumber=t,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=u}static createFromDiffChange(t,n,r){let i=n.getStartLineNumber(t.originalStart),s=n.getStartColumn(t.originalStart),o=n.getEndLineNumber(t.originalStart+t.originalLength-1),a=n.getEndColumn(t.originalStart+t.originalLength-1),u=r.getStartLineNumber(t.modifiedStart),l=r.getStartColumn(t.modifiedStart),c=r.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),d=r.getEndColumn(t.modifiedStart+t.modifiedLength-1);return new e(i,s,o,a,u,l,c,d)}};function T5(e){if(e.length<=1)return e;let t=[e[0]],n=t[0];for(let r=1,i=e.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){let m=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(m.getElements().length>0&&g.getElements().length>0){let v=Op(m,g,s,!0).changes;a&&(v=T5(v)),h=[];for(let N=0,_=v.length;N<_;N++)h.push(gi.createFromDiffChange(v[N],m,g))}}return new e(u,l,c,d,h)}},Hl=class{constructor(t,n,r){this.shouldComputeCharChanges=r.shouldComputeCharChanges,this.shouldPostProcessCharChanges=r.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=r.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=r.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=n,this.original=new da(t),this.modified=new da(n),this.continueLineDiff=kp(r.maxComputationTime),this.continueCharDiff=kp(r.maxComputationTime===0?0:Math.min(r.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:void 0}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:void 0}]};let t=Op(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),n=t.changes,r=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){let a=[];for(let u=0,l=n.length;u1&&v>1;){let N=h.charCodeAt(g-2),_=m.charCodeAt(v-2);if(N!==_)break;g--,v--}(g>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,o+1,1,v)}{let g=Ql(h,1),v=Ql(m,1),N=h.length+1,_=m.length+1;for(;g!0;let t=Date.now();return()=>Date.now()-tr===i){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let r=0,i=e.length;r0}e.isGreaterThan=r;function i(s){return s===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(zl||(zl={}));function ks(e,t){return(n,r)=>t(e(n),e(r))}var Os=(e,t)=>e-t;function jp(e){return(t,n)=>-e(t,n)}var Mp=class e{static{this.empty=new e(t=>{})}constructor(t){this.iterate=t}toArray(){let t=[];return this.iterate(n=>(t.push(n),!0)),t}filter(t){return new e(n=>this.iterate(r=>t(r)?n(r):!0))}map(t){return new e(n=>this.iterate(r=>n(t(r))))}findLast(t){let n;return this.iterate(r=>(t(r)&&(n=r),!0)),n}findLastMaxBy(t){let n,r=!0;return this.iterate(i=>((r||zl.isGreaterThan(t(i,n)))&&(r=!1,n=i),!0)),n}};var mn=class e{static trivial(t,n){return new e([new Pe(Ee.ofLength(t.length),Ee.ofLength(n.length))],!1)}static trivialTimedOut(t,n){return new e([new Pe(Ee.ofLength(t.length),Ee.ofLength(n.length))],!0)}constructor(t,n){this.diffs=t,this.hitTimeout=n}},Pe=class e{static invert(t,n){let r=[];return Vp(t,(i,s)=>{r.push(e.fromOffsetPairs(i?i.getEndExclusives():hn.zero,s?s.getStarts():new hn(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(t,n){return new e(new Ee(t.offset1,n.offset1),new Ee(t.offset2,n.offset2))}static assertSorted(t){let n;for(let r of t){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new it("Sequence diffs must be sorted");n=r}}constructor(t,n){this.seq1Range=t,this.seq2Range=n}swap(){return new e(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(t){return new e(this.seq1Range.join(t.seq1Range),this.seq2Range.join(t.seq2Range))}delta(t){return t===0?this:new e(this.seq1Range.delta(t),this.seq2Range.delta(t))}deltaStart(t){return t===0?this:new e(this.seq1Range.deltaStart(t),this.seq2Range.deltaStart(t))}deltaEnd(t){return t===0?this:new e(this.seq1Range.deltaEnd(t),this.seq2Range.deltaEnd(t))}intersect(t){let n=this.seq1Range.intersect(t.seq1Range),r=this.seq2Range.intersect(t.seq2Range);if(!(!n||!r))return new e(n,r)}getStarts(){return new hn(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new hn(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}},hn=class e{static{this.zero=new e(0,0)}static{this.max=new e(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(t,n){this.offset1=t,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(t){return t===0?this:new e(this.offset1+t,this.offset2+t)}equals(t){return this.offset1===t.offset1&&this.offset2===t.offset2}},ur=class e{static{this.instance=new e}isValid(){return!0}},pa=class{constructor(t){if(this.timeout=t,this.startTime=Date.now(),this.valid=!0,t<=0)throw new it("timeout must be positive")}isValid(){if(!(Date.now()-this.startTime0&&v>0&&o.get(g-1,v-1)===3&&(w+=a.get(g-1,v-1)),w+=i?i(g,v):1):w=-1;let C=Math.max(N,_,w);if(C===w){let S=g>0&&v>0?a.get(g-1,v-1):0;a.set(g,v,S+1),o.set(g,v,3)}else C===N?(a.set(g,v,0),o.set(g,v,1)):C===_&&(a.set(g,v,0),o.set(g,v,2));s.set(g,v,C)}let u=[],l=t.length,c=n.length;function d(g,v){(g+1!==l||v+1!==c)&&u.push(new Pe(new Ee(g+1,l),new Ee(v+1,c))),l=g,c=v}let h=t.length-1,m=n.length-1;for(;h>=0&&m>=0;)o.get(h,m)===3?(d(h,m),h--,m--):o.get(h,m)===1?h--:m--;return d(-1,-1),u.reverse(),new mn(u,!1)}};var vi=class{compute(t,n,r=ur.instance){if(t.length===0||n.length===0)return mn.trivial(t,n);let i=t,s=n;function o(v,N){for(;vi.length||k>s.length)continue;let M=o(S,k);u.set(c,M);let I=S===w?l.get(c+1):l.get(c-1);if(l.set(c,M!==S?new ma(I,S,k,M-S):I),u.get(c)===i.length&&u.get(c)-c===s.length)break e}}let d=l.get(c),h=[],m=i.length,g=s.length;for(;;){let v=d?d.x+d.length:0,N=d?d.y+d.length:0;if((v!==m||N!==g)&&h.push(new Pe(new Ee(v,m),new Ee(N,g))),!d)break;m=d.x,g=d.y,d=d.prev}return h.reverse(),new mn(h,!1)}},ma=class{constructor(t,n,r,i){this.prev=t,this.x=n,this.y=r,this.length=i}},Yl=class{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){if(t<0){if(t=-t-1,t>=this.negativeArr.length){let r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[t]=n}else{if(t>=this.positiveArr.length){let r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[t]=n}}},Jl=class{constructor(){this.positiveArr=[],this.negativeArr=[]}get(t){return t<0?(t=-t-1,this.negativeArr[t]):this.positiveArr[t]}set(t,n){t<0?(t=-t-1,this.negativeArr[t]=n):this.positiveArr[t]=n}};var lr=class{constructor(t,n,r){this.lines=t,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=t[i-1],o=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(o=this.range.startColumn-1,s=s.substring(o)),this.lineStartOffsets.push(o);let a=0;if(!r){let l=s.trimStart();a=s.length-l.length,s=l.trimEnd()}this.trimmedWsLengthsByLineIdx.push(a);let u=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-o-a,s.length):s.length;for(let l=0;lString.fromCharCode(n)).join("")}getElement(t){return this.elements[t]}get length(){return this.elements.length}getBoundaryScore(t){let n=Gp(t>0?this.elements[t-1]:-1),r=Gp(ts<=t),i=t-this.firstElementOffsetByLineIdx[r];return new Se(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(t){let n=this.translateOffset(t.start,"right"),r=this.translateOffset(t.endExclusive,"left");return r.isBefore(n)?oe.fromPositions(r,r):oe.fromPositions(n,r)}findWordContaining(t){if(t<0||t>=this.elements.length||!Xl(this.elements[t]))return;let n=t;for(;n>0&&Xl(this.elements[n-1]);)n--;let r=t;for(;ri<=t.start)??0,r=Ip(this.firstElementOffsetByLineIdx,i=>t.endExclusive<=i)??this.elements.length;return new Ee(n,r)}};function Xl(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}var S5={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function qp(e){return S5[e]}function Gp(e){return e===10?8:e===13?7:Ps(e)?6:e>=97&&e<=122?0:e>=65&&e<=90?1:e>=48&&e<=57?2:e===-1?3:e===44||e===59?5:4}function Wp(e,t,n,r,i,s){let{moves:o,excludedChanges:a}=F5(e,t,n,s);if(!s.isValid())return[];let u=e.filter(c=>!a.has(c)),l=w5(u,r,i,t,n,s);return $p(o,l),o=L5(o),o=o.filter(c=>{let d=c.original.toOffsetRange().slice(t).map(m=>m.trim());return d.join(` +`).length>=15&&A5(d,m=>m.length>=2)>=2}),o=C5(e,o),o}function A5(e,t){let n=0;for(let r of e)t(r)&&n++;return n}function F5(e,t,n,r){let i=[],s=e.filter(u=>u.modified.isEmpty&&u.original.length>=3).map(u=>new Ms(u.original,t,u)),o=new Set(e.filter(u=>u.original.isEmpty&&u.modified.length>=3).map(u=>new Ms(u.modified,n,u))),a=new Set;for(let u of s){let l=-1,c;for(let d of o){let h=u.computeSimilarity(d);h>l&&(l=h,c=d)}if(l>.9&&c&&(o.delete(c),i.push(new pn(u.range,c.range)),a.add(u.source),a.add(c.source)),!r.isValid())return{moves:i,excludedChanges:a}}return{moves:i,excludedChanges:a}}function w5(e,t,n,r,i,s){let o=[],a=new ra;for(let h of e)for(let m=h.original.startLineNumber;mh.modified.startLineNumber,Os));for(let h of e){let m=[];for(let g=h.modified.startLineNumber;g{for(let S of m)if(S.originalLineRange.endLineNumberExclusive+1===w.endLineNumberExclusive&&S.modifiedLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive){S.originalLineRange=new ge(S.originalLineRange.startLineNumber,w.endLineNumberExclusive),S.modifiedLineRange=new ge(S.modifiedLineRange.startLineNumber,N.endLineNumberExclusive),_.push(S);return}let C={modifiedLineRange:N,originalLineRange:w};u.push(C),_.push(C)}),m=_}if(!s.isValid())return[]}u.sort(jp(ks(h=>h.modifiedLineRange.length,Os)));let l=new Sr,c=new Sr;for(let h of u){let m=h.modifiedLineRange.startLineNumber-h.originalLineRange.startLineNumber,g=l.subtractFrom(h.modifiedLineRange),v=c.subtractFrom(h.originalLineRange).getWithDelta(m),N=g.getIntersection(v);for(let _ of N.ranges){if(_.length<3)continue;let w=_,C=_.delta(-m);o.push(new pn(C,w)),l.addRange(w),c.addRange(C)}}o.sort(ks(h=>h.original.startLineNumber,Os));let d=new Is(e);for(let h=0;hM.original.startLineNumber<=m.original.startLineNumber),v=Mn(e,M=>M.modified.startLineNumber<=m.modified.startLineNumber),N=Math.max(m.original.startLineNumber-g.original.startLineNumber,m.modified.startLineNumber-v.modified.startLineNumber),_=d.findLastMonotonous(M=>M.original.startLineNumberM.modified.startLineNumberr.length||I>i.length||l.contains(I)||c.contains(M)||!Hp(r[M-1],i[I-1],s))break}S>0&&(c.addRange(new ge(m.original.startLineNumber-S,m.original.startLineNumber)),l.addRange(new ge(m.modified.startLineNumber-S,m.modified.startLineNumber)));let k;for(k=0;kr.length||I>i.length||l.contains(I)||c.contains(M)||!Hp(r[M-1],i[I-1],s))break}k>0&&(c.addRange(new ge(m.original.endLineNumberExclusive,m.original.endLineNumberExclusive+k)),l.addRange(new ge(m.modified.endLineNumberExclusive,m.modified.endLineNumberExclusive+k))),(S>0||k>0)&&(o[h]=new pn(new ge(m.original.startLineNumber-S,m.original.endLineNumberExclusive+k),new ge(m.modified.startLineNumber-S,m.modified.endLineNumberExclusive+k)))}return o}function Hp(e,t,n){if(e.trim()===t.trim())return!0;if(e.length>300&&t.length>300)return!1;let i=new vi().compute(new lr([e],new oe(1,1,1,e.length),!1),new lr([t],new oe(1,1,1,t.length),!1),n),s=0,o=Pe.invert(i.diffs,e.length);for(let c of o)c.seq1Range.forEach(d=>{Ps(e.charCodeAt(d))||s++});function a(c){let d=0;for(let h=0;ht.length?e:t);return s/u>.6&&u>10}function L5(e){if(e.length===0)return e;e.sort(ks(n=>n.original.startLineNumber,Os));let t=[e[0]];for(let n=1;n=0&&o>=0&&s+o<=2){t[t.length-1]=r.join(i);continue}t.push(i)}return t}function C5(e,t){let n=new Is(e);return t=t.filter(r=>{let i=n.findLastMonotonous(a=>a.original.startLineNumbera.modified.startLineNumber0&&(a=a.delta(l))}i.push(a)}return r.length>0&&i.push(r[r.length-1]),i}function I5(e,t,n){if(!e.getBoundaryScore||!t.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],o=r+1=r.start&&e.seq2Range.start-o>=i.start&&n.isStronglyEqual(e.seq2Range.start-o,e.seq2Range.endExclusive-o)&&o<100;)o++;o--;let a=0;for(;e.seq1Range.start+al&&(l=g,u=c)}return e.delta(u)}function Yp(e,t,n){let r=[];for(let i of n){let s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new Pe(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Jp(e,t,n){let r=Pe.invert(n,e.length),i=[],s=new hn(0,0);function o(u,l){if(u.offset10;){let N=r[0];if(!(N.seq1Range.intersects(h.seq1Range)||N.seq2Range.intersects(h.seq2Range)))break;let w=e.findWordContaining(N.seq1Range.start),C=t.findWordContaining(N.seq2Range.start),S=new Pe(w,C),k=S.intersect(N);if(g+=k.seq1Range.length,v+=k.seq2Range.length,h=h.join(S),h.seq1Range.endExclusive>=N.seq1Range.endExclusive)r.shift();else break}g+v<(h.seq1Range.length+h.seq2Range.length)*2/3&&i.push(h),s=h.getEndExclusives()}for(;r.length>0;){let u=r.shift();u.seq1Range.isEmpty||(o(u.getStarts(),u),o(u.getEndExclusives().delta(-1),u))}return R5(n,i)}function R5(e,t){let n=[];for(;e.length>0||t.length>0;){let r=e[0],i=t[0],s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function Xp(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let o=[r[0]];for(let a=1;a5||m.seq1Range.length+m.seq2Range.length>5)},u=r[a],l=o[o.length-1];c(l,u)?(s=!0,o[o.length-1]=o[o.length-1].join(u)):o.push(u)}r=o}while(i++<10&&s);return r}function Kp(e,t,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;let a=[r[0]];for(let u=1;u5||v.length>500)return!1;let _=e.getText(v).trim();if(_.length>20||_.split(/\r\n|\r|\n/).length>1)return!1;let w=e.countLinesIn(m.seq1Range),C=m.seq1Range.length,S=t.countLinesIn(m.seq2Range),k=m.seq2Range.length,M=e.countLinesIn(g.seq1Range),I=g.seq1Range.length,B=t.countLinesIn(g.seq2Range),L=g.seq2Range.length,A=2*40+50;function X(z){return Math.min(z,A)}return Math.pow(Math.pow(X(w*40+C),1.5)+Math.pow(X(S*40+k),1.5),1.5)+Math.pow(Math.pow(X(M*40+I),1.5)+Math.pow(X(B*40+L),1.5),1.5)>(A**1.5)**1.5*1.3},l=r[u],c=a[a.length-1];d(c,l)?(s=!0,a[a.length-1]=a[a.length-1].join(l)):a.push(l)}r=a}while(i++<10&&s);let o=[];return Up(r,(a,u,l)=>{let c=u;function d(_){return _.length>0&&_.trim().length<=3&&u.seq1Range.length+u.seq2Range.length>100}let h=e.extendToFullLines(u.seq1Range),m=e.getText(new Ee(h.start,u.seq1Range.start));d(m)&&(c=c.deltaStart(-m.length));let g=e.getText(new Ee(u.seq1Range.endExclusive,h.endExclusive));d(g)&&(c=c.deltaEnd(g.length));let v=Pe.fromOffsetPairs(a?a.getEndExclusives():hn.zero,l?l.getStarts():hn.max),N=c.intersect(v);o.length>0&&N.getStarts().equals(o[o.length-1].getEndExclusives())?o[o.length-1]=o[o.length-1].join(N):o.push(N)}),o}var Bs=class{constructor(t,n){this.trimmedHash=t,this.lines=n}getElement(t){return this.trimmedHash[t]}get length(){return this.trimmedHash.length}getBoundaryScore(t){let n=t===0?0:Zp(this.lines[t-1]),r=t===this.lines.length?0:Zp(this.lines[t]);return 1e3-(n+r)}getText(t){return this.lines.slice(t.start,t.endExclusive).join(` +`)}isStronglyEqual(t,n){return this.lines[t]===this.lines[n]}};function Zp(e){let t=0;for(;tk===M))return new ar([],[],!1);if(t.length===1&&t[0].length===0||n.length===1&&n[0].length===0)return new ar([new Pn(new ge(1,t.length+1),new ge(1,n.length+1),[new Ot(new oe(1,1,t.length,t[t.length-1].length+1),new oe(1,1,n.length,n[n.length-1].length+1))])],[],!1);let i=r.maxComputationTimeMs===0?ur.instance:new pa(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,o=new Map;function a(k){let M=o.get(k);return M===void 0&&(M=o.size,o.set(k,M)),M}let u=t.map(k=>a(k.trim())),l=n.map(k=>a(k.trim())),c=new Bs(u,t),d=new Bs(l,n),h=(()=>c.length+d.length<1700?this.dynamicProgrammingDiffing.compute(c,d,i,(k,M)=>t[k]===n[M]?n[M].length===0?.1:1+Math.log(1+n[M].length):.99):this.myersDiffingAlgorithm.compute(c,d,i))(),m=h.diffs,g=h.hitTimeout;m=Kl(c,d,m),m=Xp(c,d,m);let v=[],N=k=>{if(s)for(let M=0;Mk.seq1Range.start-_===k.seq2Range.start-w);let M=k.seq1Range.start-_;N(M),_=k.seq1Range.endExclusive,w=k.seq2Range.endExclusive;let I=this.refineDiff(t,n,k,i,s);I.hitTimeout&&(g=!0);for(let B of I.mappings)v.push(B)}N(t.length-_);let C=eh(v,t,n),S=[];return r.computeMoves&&(S=this.computeMoves(C,t,n,u,l,i,s)),Nr(()=>{function k(I,B){if(I.lineNumber<1||I.lineNumber>B.length)return!1;let L=B[I.lineNumber-1];return!(I.column<1||I.column>L.length+1)}function M(I,B){return!(I.startLineNumber<1||I.startLineNumber>B.length+1||I.endLineNumberExclusive<1||I.endLineNumberExclusive>B.length+1)}for(let I of C){if(!I.innerChanges)return!1;for(let B of I.innerChanges)if(!(k(B.modifiedRange.getStartPosition(),n)&&k(B.modifiedRange.getEndPosition(),n)&&k(B.originalRange.getStartPosition(),t)&&k(B.originalRange.getEndPosition(),t)))return!1;if(!M(I.modified,n)||!M(I.original,t))return!1}return!0}),new ar(C,S,g)}computeMoves(t,n,r,i,s,o,a){return Wp(t,n,r,i,s,o).map(c=>{let d=this.refineDiff(n,r,new Pe(c.original.toOffsetRange(),c.modified.toOffsetRange()),o,a),h=eh(d.mappings,n,r,!0);return new aa(c,h)})}refineDiff(t,n,r,i,s){let a=O5(r).toRangeMapping2(t,n),u=new lr(t,a.originalRange,s),l=new lr(n,a.modifiedRange,s),c=u.length+l.length<500?this.dynamicProgrammingDiffing.compute(u,l,i):this.myersDiffingAlgorithm.compute(u,l,i),d=!1,h=c.diffs;d&&Pe.assertSorted(h),h=Kl(u,l,h),d&&Pe.assertSorted(h),h=Jp(u,l,h),d&&Pe.assertSorted(h),h=Yp(u,l,h),d&&Pe.assertSorted(h),h=Kp(u,l,h),d&&Pe.assertSorted(h);let m=h.map(g=>new Ot(u.translateRange(g.seq1Range),l.translateRange(g.seq2Range)));return d&&Ot.assertSorted(m),{mappings:m,hitTimeout:c.hitTimeout}}};function eh(e,t,n,r=!1){let i=[];for(let s of Bp(e.map(o=>k5(o,t,n)),(o,a)=>o.original.overlapOrTouch(a.original)||o.modified.overlapOrTouch(a.modified))){let o=s[0],a=s[s.length-1];i.push(new Pn(o.original.join(a.original),o.modified.join(a.modified),s.map(u=>u.innerChanges[0])))}return Nr(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length-i[i.length-1].modified.endLineNumberExclusive!==t.length-i[i.length-1].original.endLineNumberExclusive)?!1:Ls(i,(s,o)=>o.original.startLineNumber-s.original.endLineNumberExclusive===o.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n[e.modifiedRange.startLineNumber-1].length&&e.originalRange.startColumn-1>=t[e.originalRange.startLineNumber-1].length&&e.originalRange.startLineNumber<=e.originalRange.endLineNumber+i&&e.modifiedRange.startLineNumber<=e.modifiedRange.endLineNumber+i&&(r=1);let s=new ge(e.originalRange.startLineNumber+r,e.originalRange.endLineNumber+1+i),o=new ge(e.modifiedRange.startLineNumber+r,e.modifiedRange.endLineNumber+1+i);return new Pn(s,o,[e])}function O5(e){return new pn(new ge(e.seq1Range.start+1,e.seq1Range.endExclusive+1),new ge(e.seq2Range.start+1,e.seq2Range.endExclusive+1))}var Zl={getLegacy:()=>new fa,getDefault:()=>new ga};function cr(e,t){let n=Math.pow(10,t);return Math.round(e*n)/n}var Je=class{constructor(t,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,t))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=cr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a}},gn=class e{constructor(t,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=cr(Math.max(Math.min(1,n),0),3),this.l=cr(Math.max(Math.min(1,r),0),3),this.a=cr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.l===n.l&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=t.a,o=Math.max(n,r,i),a=Math.min(n,r,i),u=0,l=0,c=(a+o)/2,d=o-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),o){case n:u=(r-i)/d+(r1&&(r-=1),r<1/6?t+(n-t)*6*r:r<1/2?n:r<2/3?t+(n-t)*(2/3-r)*6:t}static toRGBA(t){let n=t.h/360,{s:r,l:i,a:s}=t,o,a,u;if(r===0)o=a=u=i;else{let l=i<.5?i*(1+r):i+r-i*r,c=2*i-l;o=e._hue2rgb(c,l,n+1/3),a=e._hue2rgb(c,l,n),u=e._hue2rgb(c,l,n-1/3)}return new Je(Math.round(o*255),Math.round(a*255),Math.round(u*255),s)}},bi=class e{constructor(t,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,t),0)|0,this.s=cr(Math.max(Math.min(1,n),0),3),this.v=cr(Math.max(Math.min(1,r),0),3),this.a=cr(Math.max(Math.min(1,i),0),3)}static equals(t,n){return t.h===n.h&&t.s===n.s&&t.v===n.v&&t.a===n.a}static fromRGBA(t){let n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),o=Math.min(n,r,i),a=s-o,u=s===0?0:a/s,l;return a===0?l=0:s===n?l=((r-i)/a%6+6)%6:s===r?l=(i-n)/a+2:l=(n-r)/a+4,new e(Math.round(l*60),u,s,t.a)}static toRGBA(t){let{h:n,s:r,v:i,a:s}=t,o=i*r,a=o*(1-Math.abs(n/60%2-1)),u=i-o,[l,c,d]=[0,0,0];return n<60?(l=o,c=a):n<120?(l=a,c=o):n<180?(c=o,d=a):n<240?(c=a,d=o):n<300?(l=a,d=o):n<=360&&(l=o,d=a),l=Math.round((l+u)*255),c=Math.round((c+u)*255),d=Math.round((d+u)*255),new Je(l,c,d,s)}},Ar=class e{static fromHex(t){return e.Format.CSS.parseHex(t)||e.red}static equals(t,n){return!t&&!n?!0:!t||!n?!1:t.equals(n)}get hsla(){return this._hsla?this._hsla:gn.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:bi.fromRGBA(this.rgba)}constructor(t){if(t)if(t instanceof Je)this.rgba=t;else if(t instanceof gn)this._hsla=t,this.rgba=gn.toRGBA(t);else if(t instanceof bi)this._hsva=t,this.rgba=bi.toRGBA(t);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(t){return!!t&&Je.equals(this.rgba,t.rgba)&&gn.equals(this.hsla,t.hsla)&&bi.equals(this.hsva,t.hsva)}getRelativeLuminance(){let t=e._relativeLuminanceForComponent(this.rgba.r),n=e._relativeLuminanceForComponent(this.rgba.g),r=e._relativeLuminanceForComponent(this.rgba.b),i=.2126*t+.7152*n+.0722*r;return cr(i,4)}static _relativeLuminanceForComponent(t){let n=t/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n>r}isDarkerThan(t){let n=this.getRelativeLuminance(),r=t.getRelativeLuminance();return n0)for(let i of r){let s=i.filter(l=>l!==void 0),o=s[1],a=s[2];if(!a)continue;let u;if(o==="rgb"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;u=th(Vs(e,i),Us(a,l),!1)}else if(o==="rgba"){let l=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=th(Vs(e,i),Us(a,l),!0)}else if(o==="hsl"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;u=nh(Vs(e,i),Us(a,l),!1)}else if(o==="hsla"){let l=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;u=nh(Vs(e,i),Us(a,l),!0)}else o==="#"&&(u=M5(Vs(e,i),o+a));u&&t.push(u)}return t}function ih(e){return!e||typeof e.getValue!="function"||typeof e.positionAt!="function"?[]:P5(e)}var sh=new RegExp("\\bMARK:\\s*(.*)$","d"),B5=/^-+|-+$/g;function oh(e,t){let n=[];if(t.findRegionSectionHeaders&&t.foldingRules?.markers){let r=V5(e,t);n=n.concat(r)}if(t.findMarkSectionHeaders){let r=U5(e);n=n.concat(r)}return n}function V5(e,t){let n=[],r=e.getLineCount();for(let i=1;i<=r;i++){let s=e.getLineContent(i),o=s.match(t.foldingRules.markers.start);if(o){let a={startLineNumber:i,startColumn:o[0].length+1,endLineNumber:i,endColumn:s.length+1};if(a.endColumn>a.startColumn){let u={range:a,...ah(s.substring(o[0].length)),shouldBeInComments:!1};(u.text||u.hasSeparatorLine)&&n.push(u)}}}return n}function U5(e){let t=[],n=e.getLineCount();for(let r=1;r<=n;r++){let i=e.getLineContent(r);$5(i,r,t)}return t}function $5(e,t,n){sh.lastIndex=0;let r=sh.exec(e);if(r){let i=r.indices[1][0]+1,s=r.indices[1][1]+1,o={startLineNumber:t,startColumn:i,endLineNumber:t,endColumn:s};if(o.endColumn>o.startColumn){let a={range:o,...ah(r[1]),shouldBeInComments:!0};(a.text||a.hasSeparatorLine)&&n.push(a)}}}function ah(e){e=e.trim();let t=e.startsWith("-");return e=e.replace(B5,""),{text:e,hasSeparatorLine:t}}var j5=Symbol("MicrotaskDelay");var q5,tc;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?tc=(e,t)=>{Uf(()=>{if(n)return;let r=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,r-Date.now())}}))});let n=!1;return{dispose(){n||(n=!0)}}}:tc=(e,t,n)=>{let r=e.requestIdleCallback(t,typeof n=="number"?{timeout:n}:void 0),i=!1;return{dispose(){i||(i=!0,e.cancelIdleCallback(r))}}},q5=e=>tc(globalThis,e)})();var uh;(function(e){async function t(r){let i,s=await Promise.all(r.map(o=>o.then(a=>a,a=>{i||(i=a)})));if(typeof i<"u")throw i;return s}e.settled=t;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(o){s(o)}})}e.withAsyncBody=n})(uh||(uh={}));var lh=class e{static fromArray(t){return new e(n=>{n.emitMany(t)})}static fromPromise(t){return new e(async n=>{n.emitMany(await t)})}static fromPromises(t){return new e(async n=>{await Promise.all(t.map(async r=>n.emitOne(await r)))})}static merge(t){return new e(async n=>{await Promise.all(t.map(async r=>{for await(let i of r)n.emitOne(i)}))})}static{this.EMPTY=e.fromArray([])}constructor(t,n){this._state=0,this._results=[],this._error=null,this._onReturn=n,this._onStateChanged=new lt,queueMicrotask(async()=>{let r={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(r)),this.resolve()}catch(i){this.reject(i)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async r=>{for await(let i of t)r.emitOne(n(i))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async r=>{for await(let i of t)n(i)&&r.emitOne(i)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,n=>!!n)}coalesce(){return e.coalesce(this)}static async toPromise(t){let n=[];for await(let r of t)n.push(r);return n}toPromise(){return e.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};var Da=class{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=_r(t);let r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+s),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(t,n){return t=_r(t),n=_r(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let s=r.length-t;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=_r(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],o=s-this.values[i],t=s)n=i+1;else break;return new nc(i,t-o)}};var nc=class{constructor(t,n){this.index=t,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}};var va=class{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);let n=t.changes;for(let r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new Se(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){let t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;it.push(this._models[n])),t}$acceptNewModel(t){this._models[t.url]=new rc(_t.parse(t.url),t.lines,t.EOL,t.versionId)}$acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}$acceptRemovedModel(t){this._models[t]&&delete this._models[t]}},rc=class extends va{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(t){let n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:t}};var G5=!0,ic=class{constructor(){this._workerTextModelSyncServer=new ba}dispose(){}_getModel(t){return this._workerTextModelSyncServer.getModel(t)}_getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(t){this._workerTextModelSyncServer.$acceptNewModel(t)}$acceptModelChanged(t,n){this._workerTextModelSyncServer.$acceptModelChanged(t,n)}$acceptRemovedModel(t){this._workerTextModelSyncServer.$acceptRemovedModel(t)}async $computeUnicodeHighlights(t,n,r){let i=this._getModel(t);return i?sa.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(t,n){let r=this._getModel(t);return r?oh(r,n):[]}async $computeDiff(t,n,r,i){let s=this._getModel(t),o=this._getModel(n);return!s||!o?null:Fr.computeDiff(s,o,r,i)}static computeDiff(t,n,r,i){let s=i==="advanced"?Zl.getDefault():Zl.getLegacy(),o=t.getLinesContent(),a=n.getLinesContent(),u=s.computeDiff(o,a,r),l=u.changes.length>0?!1:this._modelsAreIdentical(t,n);function c(d){return d.map(h=>[h.original.startLineNumber,h.original.endLineNumberExclusive,h.modified.startLineNumber,h.modified.endLineNumberExclusive,h.innerChanges?.map(m=>[m.originalRange.startLineNumber,m.originalRange.startColumn,m.originalRange.endLineNumber,m.originalRange.endColumn,m.modifiedRange.startLineNumber,m.modifiedRange.startColumn,m.modifiedRange.endLineNumber,m.modifiedRange.endColumn])])}return{identical:l,quitEarly:u.hitTimeout,changes:c(u.changes),moves:u.moves.map(d=>[d.lineRangeMapping.original.startLineNumber,d.lineRangeMapping.original.endLineNumberExclusive,d.lineRangeMapping.modified.startLineNumber,d.lineRangeMapping.modified.endLineNumberExclusive,c(d.changes)])}}static _modelsAreIdentical(t,n){let r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){let o=t.getLineContent(s),a=n.getLineContent(s);if(o!==a)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(t,n,r){let i=this._getModel(t);if(!i)return n;let s=[],o;n=n.slice(0).sort((u,l)=>{if(u.range&&l.range)return oe.compareRangesUsingStarts(u.range,l.range);let c=u.range?0:1,d=l.range?0:1;return c-d});let a=0;for(let u=1;uFr._diffLimit){s.push({range:u,text:l});continue}let h=fd(d,l,r),m=i.offsetAt(oe.lift(u).getStartPosition());for(let g of h){let v=i.positionAt(m+g.originalStart),N=i.positionAt(m+g.originalStart+g.originalLength),_={text:l.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:v.lineNumber,startColumn:v.column,endLineNumber:N.lineNumber,endColumn:N.column}};i.getValueInRange(_.range)!==_.text&&s.push(_)}}return typeof o=="number"&&s.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(t){let n=this._getModel(t);return n?dd(n):null}async $computeDefaultDocumentColors(t){let n=this._getModel(t);return n?ih(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(t,n,r,i){let s=new oi,o=new RegExp(r,i),a=new Set;e:for(let u of t){let l=this._getModel(u);if(l){for(let c of l.words(o))if(!(c===n||!isNaN(Number(c)))&&(a.add(c),a.size>Fr._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}}async $computeWordRanges(t,n,r,i){let s=this._getModel(t);if(!s)return Object.create(null);let o=new RegExp(r,i),a=Object.create(null);for(let u=n.startLineNumber;uthis._host.$fhr(a,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve($l(this._foreignModule))):new Promise((a,u)=>{let l=c=>{this._foreignModule=c.create(o,n),a($l(this._foreignModule))};G5?import(`${jo.asBrowserUri(`${t}.js`).toString(!0)}`).then(l).catch(u):Ff([`${t}`],l,u)})}$fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}};typeof importScripts=="function"&&(globalThis.monaco=yp());var sc=!1;function oc(e){if(sc)return;sc=!0;let t=new Go(n=>{globalThis.postMessage(n)},n=>new Fr(ws.getChannel(n),e));globalThis.onmessage=n=>{t.onmessage(n.data)}}globalThis.onmessage=e=>{sc||oc(null)};function pe(e,t){if(!!!e)throw new Error(t)}function Nt(e){return typeof e=="object"&&e!==null}function Ge(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var H5=/\r\n|[\n\r]/g;function Ei(e,t){let n=0,r=1;for(let i of e.body.matchAll(H5)){if(typeof i.index=="number"||Ge(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function ac(e){return Ea(e.source,Ei(e.source,e.start))}function Ea(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,l=`${e.name}:${o}:${u} +`,c=r.split(/\r\n|[\n\r]/g),d=c[i];if(d.length>120){let h=Math.floor(u/80),m=u%80,g=[];for(let v=0;v["|",v]),["|","^".padStart(m)],["|",g[h+1]]])}return l+ch([[`${o-1} |`,c[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,c[i+1]]])}function ch(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` +`)}function W5(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var O=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:o,source:a,positions:u,path:l,originalError:c,extensions:d}=W5(n);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=c??void 0,this.nodes=fh(Array.isArray(o)?o:o?[o]:void 0);let h=fh((r=this.nodes)===null||r===void 0?void 0:r.map(g=>g.loc).filter(g=>g!=null));this.source=a??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=u??h?.map(g=>g.start),this.locations=u&&a?u.map(g=>Ei(a,g)):h?.map(g=>Ei(g.source,g.start));let m=Nt(c?.extensions)?c?.extensions:void 0;this.extensions=(s=d??m)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` - ) { - let l = this.ElementsAreStrictEqual(r.originalStart, r.modifiedStart) - if ( - this.ElementsAreStrictEqual( - r.originalStart + r.originalLength, - r.modifiedStart + r.modifiedLength - ) && - !l - ) - break - r.originalStart++, r.modifiedStart++ - } - let u = [null] - if (n < t.length - 1 && this.ChangesOverlap(t[n], t[n + 1], u)) { - ;(t[n] = u[0]), t.splice(n + 1, 1), n-- - continue - } - } - for (let n = t.length - 1; n >= 0; n--) { - let r = t[n], - i = 0, - s = 0 - if (n > 0) { - let d = t[n - 1] - ;(i = d.originalStart + d.originalLength), (s = d.modifiedStart + d.modifiedLength) - } - let o = r.originalLength > 0, - a = r.modifiedLength > 0, - u = 0, - l = this._boundaryScore( - r.originalStart, - r.originalLength, - r.modifiedStart, - r.modifiedLength - ) - for (let d = 1; ; d++) { - let h = r.originalStart - d, - m = r.modifiedStart - d - if ( - h < i || - m < s || - (o && !this.OriginalElementsAreEqual(h, h + r.originalLength)) || - (a && !this.ModifiedElementsAreEqual(m, m + r.modifiedLength)) - ) - break - let v = - (h === i && m === s ? 5 : 0) + - this._boundaryScore(h, r.originalLength, m, r.modifiedLength) - v > l && ((l = v), (u = d)) - } - ;(r.originalStart -= u), (r.modifiedStart -= u) - let c = [null] - if (n > 0 && this.ChangesOverlap(t[n - 1], t[n], c)) { - ;(t[n - 1] = c[0]), t.splice(n, 1), n++ - continue - } - } - if (this._hasStrings) - for (let n = 1, r = t.length; n < r; n++) { - let i = t[n - 1], - s = t[n], - o = s.originalStart - i.originalStart - i.originalLength, - a = i.originalStart, - u = s.originalStart + s.originalLength, - l = u - a, - c = i.modifiedStart, - d = s.modifiedStart + s.modifiedLength, - h = d - c - if (o < 5 && l < 20 && h < 20) { - let m = this._findBetterContiguousSequence(a, l, c, h, o) - if (m) { - let [g, v] = m - ;(g !== i.originalStart + i.originalLength || - v !== i.modifiedStart + i.modifiedLength) && - ((i.originalLength = g - i.originalStart), - (i.modifiedLength = v - i.modifiedStart), - (s.originalStart = g + o), - (s.modifiedStart = v + o), - (s.originalLength = u - s.originalStart), - (s.modifiedLength = d - s.modifiedStart)) - } - } - } - return t - } - _findBetterContiguousSequence(t, n, r, i, s) { - if (n < s || i < s) return null - let o = t + n - s + 1, - a = r + i - s + 1, - u = 0, - l = 0, - c = 0 - for (let d = t; d < o; d++) - for (let h = r; h < a; h++) { - let m = this._contiguousSequenceScore(d, h, s) - m > 0 && m > u && ((u = m), (l = d), (c = h)) - } - return u > 0 ? [l, c] : null - } - _contiguousSequenceScore(t, n, r) { - let i = 0 - for (let s = 0; s < r; s++) { - if (!this.ElementsAreEqual(t + s, n + s)) return 0 - i += this._originalStringElements[t + s].length - } - return i - } - _OriginalIsBoundary(t) { - return t <= 0 || t >= this._originalElementsOrHash.length - 1 - ? !0 - : this._hasStrings && /^\s*$/.test(this._originalStringElements[t]) - } - _OriginalRegionIsBoundary(t, n) { - if (this._OriginalIsBoundary(t) || this._OriginalIsBoundary(t - 1)) return !0 - if (n > 0) { - let r = t + n - if (this._OriginalIsBoundary(r - 1) || this._OriginalIsBoundary(r)) return !0 - } - return !1 - } - _ModifiedIsBoundary(t) { - return t <= 0 || t >= this._modifiedElementsOrHash.length - 1 - ? !0 - : this._hasStrings && /^\s*$/.test(this._modifiedStringElements[t]) - } - _ModifiedRegionIsBoundary(t, n) { - if (this._ModifiedIsBoundary(t) || this._ModifiedIsBoundary(t - 1)) return !0 - if (n > 0) { - let r = t + n - if (this._ModifiedIsBoundary(r - 1) || this._ModifiedIsBoundary(r)) return !0 - } - return !1 - } - _boundaryScore(t, n, r, i) { - let s = this._OriginalRegionIsBoundary(t, n) ? 1 : 0, - o = this._ModifiedRegionIsBoundary(r, i) ? 1 : 0 - return s + o - } - ConcatenateChanges(t, n) { - let r = [] - if (t.length === 0 || n.length === 0) return n.length > 0 ? n : t - if (this.ChangesOverlap(t[t.length - 1], n[0], r)) { - let i = new Array(t.length + n.length - 1) - return ( - or.Copy(t, 0, i, 0, t.length - 1), - (i[t.length - 1] = r[0]), - or.Copy(n, 1, i, t.length, n.length - 1), - i - ) - } else { - let i = new Array(t.length + n.length) - return or.Copy(t, 0, i, 0, t.length), or.Copy(n, 0, i, t.length, n.length), i - } - } - ChangesOverlap(t, n, r) { - if ( - (sr.Assert( - t.originalStart <= n.originalStart, - 'Left change is not less than or equal to right change' - ), - sr.Assert( - t.modifiedStart <= n.modifiedStart, - 'Left change is not less than or equal to right change' - ), - t.originalStart + t.originalLength >= n.originalStart || - t.modifiedStart + t.modifiedLength >= n.modifiedStart) - ) { - let i = t.originalStart, - s = t.originalLength, - o = t.modifiedStart, - a = t.modifiedLength - return ( - t.originalStart + t.originalLength >= n.originalStart && - (s = n.originalStart + n.originalLength - t.originalStart), - t.modifiedStart + t.modifiedLength >= n.modifiedStart && - (a = n.modifiedStart + n.modifiedLength - t.modifiedStart), - (r[0] = new sn(i, s, o, a)), - !0 - ) - } else return (r[0] = null), !1 - } - ClipDiagonalBound(t, n, r, i) { - if (t >= 0 && t < i) return t - let s = r, - o = i - r - 1, - a = n % 2 === 0 - if (t < 0) { - let u = s % 2 === 0 - return a === u ? 0 : 1 - } else { - let u = o % 2 === 0 - return a === u ? i - 1 : i - 2 - } - } - } - var Se = class e { - constructor(t, n) { - ;(this.lineNumber = t), (this.column = n) - } - with(t = this.lineNumber, n = this.column) { - return t === this.lineNumber && n === this.column ? this : new e(t, n) - } - delta(t = 0, n = 0) { - return this.with(this.lineNumber + t, this.column + n) - } - equals(t) { - return e.equals(this, t) - } - static equals(t, n) { - return !t && !n ? !0 : !!t && !!n && t.lineNumber === n.lineNumber && t.column === n.column - } - isBefore(t) { - return e.isBefore(this, t) - } - static isBefore(t, n) { - return t.lineNumber < n.lineNumber - ? !0 - : n.lineNumber < t.lineNumber - ? !1 - : t.column < n.column - } - isBeforeOrEqual(t) { - return e.isBeforeOrEqual(this, t) - } - static isBeforeOrEqual(t, n) { - return t.lineNumber < n.lineNumber - ? !0 - : n.lineNumber < t.lineNumber - ? !1 - : t.column <= n.column - } - static compare(t, n) { - let r = t.lineNumber | 0, - i = n.lineNumber | 0 - if (r === i) { - let s = t.column | 0, - o = n.column | 0 - return s - o - } - return r - i - } - clone() { - return new e(this.lineNumber, this.column) - } - toString() { - return '(' + this.lineNumber + ',' + this.column + ')' - } - static lift(t) { - return new e(t.lineNumber, t.column) - } - static isIPosition(t) { - return t && typeof t.lineNumber == 'number' && typeof t.column == 'number' - } - toJSON() { - return { lineNumber: this.lineNumber, column: this.column } - } - } - var oe = class e { - constructor(t, n, r, i) { - t > r || (t === r && n > i) - ? ((this.startLineNumber = r), - (this.startColumn = i), - (this.endLineNumber = t), - (this.endColumn = n)) - : ((this.startLineNumber = t), - (this.startColumn = n), - (this.endLineNumber = r), - (this.endColumn = i)) - } - isEmpty() { - return e.isEmpty(this) - } - static isEmpty(t) { - return t.startLineNumber === t.endLineNumber && t.startColumn === t.endColumn - } - containsPosition(t) { - return e.containsPosition(this, t) - } - static containsPosition(t, n) { - return !( - n.lineNumber < t.startLineNumber || - n.lineNumber > t.endLineNumber || - (n.lineNumber === t.startLineNumber && n.column < t.startColumn) || - (n.lineNumber === t.endLineNumber && n.column > t.endColumn) - ) - } - static strictContainsPosition(t, n) { - return !( - n.lineNumber < t.startLineNumber || - n.lineNumber > t.endLineNumber || - (n.lineNumber === t.startLineNumber && n.column <= t.startColumn) || - (n.lineNumber === t.endLineNumber && n.column >= t.endColumn) - ) - } - containsRange(t) { - return e.containsRange(this, t) - } - static containsRange(t, n) { - return !( - n.startLineNumber < t.startLineNumber || - n.endLineNumber < t.startLineNumber || - n.startLineNumber > t.endLineNumber || - n.endLineNumber > t.endLineNumber || - (n.startLineNumber === t.startLineNumber && n.startColumn < t.startColumn) || - (n.endLineNumber === t.endLineNumber && n.endColumn > t.endColumn) - ) - } - strictContainsRange(t) { - return e.strictContainsRange(this, t) - } - static strictContainsRange(t, n) { - return !( - n.startLineNumber < t.startLineNumber || - n.endLineNumber < t.startLineNumber || - n.startLineNumber > t.endLineNumber || - n.endLineNumber > t.endLineNumber || - (n.startLineNumber === t.startLineNumber && n.startColumn <= t.startColumn) || - (n.endLineNumber === t.endLineNumber && n.endColumn >= t.endColumn) - ) - } - plusRange(t) { - return e.plusRange(this, t) - } - static plusRange(t, n) { - let r, i, s, o - return ( - n.startLineNumber < t.startLineNumber - ? ((r = n.startLineNumber), (i = n.startColumn)) - : n.startLineNumber === t.startLineNumber - ? ((r = n.startLineNumber), (i = Math.min(n.startColumn, t.startColumn))) - : ((r = t.startLineNumber), (i = t.startColumn)), - n.endLineNumber > t.endLineNumber - ? ((s = n.endLineNumber), (o = n.endColumn)) - : n.endLineNumber === t.endLineNumber - ? ((s = n.endLineNumber), (o = Math.max(n.endColumn, t.endColumn))) - : ((s = t.endLineNumber), (o = t.endColumn)), - new e(r, i, s, o) - ) - } - intersectRanges(t) { - return e.intersectRanges(this, t) - } - static intersectRanges(t, n) { - let r = t.startLineNumber, - i = t.startColumn, - s = t.endLineNumber, - o = t.endColumn, - a = n.startLineNumber, - u = n.startColumn, - l = n.endLineNumber, - c = n.endColumn - return ( - r < a ? ((r = a), (i = u)) : r === a && (i = Math.max(i, u)), - s > l ? ((s = l), (o = c)) : s === l && (o = Math.min(o, c)), - r > s || (r === s && i > o) ? null : new e(r, i, s, o) - ) - } - equalsRange(t) { - return e.equalsRange(this, t) - } - static equalsRange(t, n) { - return !t && !n - ? !0 - : !!t && - !!n && - t.startLineNumber === n.startLineNumber && - t.startColumn === n.startColumn && - t.endLineNumber === n.endLineNumber && - t.endColumn === n.endColumn - } - getEndPosition() { - return e.getEndPosition(this) - } - static getEndPosition(t) { - return new Se(t.endLineNumber, t.endColumn) - } - getStartPosition() { - return e.getStartPosition(this) - } - static getStartPosition(t) { - return new Se(t.startLineNumber, t.startColumn) - } - toString() { - return ( - '[' + - this.startLineNumber + - ',' + - this.startColumn + - ' -> ' + - this.endLineNumber + - ',' + - this.endColumn + - ']' - ) - } - setEndPosition(t, n) { - return new e(this.startLineNumber, this.startColumn, t, n) - } - setStartPosition(t, n) { - return new e(t, n, this.endLineNumber, this.endColumn) - } - collapseToStart() { - return e.collapseToStart(this) - } - static collapseToStart(t) { - return new e(t.startLineNumber, t.startColumn, t.startLineNumber, t.startColumn) - } - collapseToEnd() { - return e.collapseToEnd(this) - } - static collapseToEnd(t) { - return new e(t.endLineNumber, t.endColumn, t.endLineNumber, t.endColumn) - } - delta(t) { - return new e( - this.startLineNumber + t, - this.startColumn, - this.endLineNumber + t, - this.endColumn - ) - } - static fromPositions(t, n = t) { - return new e(t.lineNumber, t.column, n.lineNumber, n.column) - } - static lift(t) { - return t ? new e(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) : null - } - static isIRange(t) { - return ( - t && - typeof t.startLineNumber == 'number' && - typeof t.startColumn == 'number' && - typeof t.endLineNumber == 'number' && - typeof t.endColumn == 'number' - ) - } - static areIntersectingOrTouching(t, n) { - return !( - t.endLineNumber < n.startLineNumber || - (t.endLineNumber === n.startLineNumber && t.endColumn < n.startColumn) || - n.endLineNumber < t.startLineNumber || - (n.endLineNumber === t.startLineNumber && n.endColumn < t.startColumn) - ) - } - static areIntersecting(t, n) { - return !( - t.endLineNumber < n.startLineNumber || - (t.endLineNumber === n.startLineNumber && t.endColumn <= n.startColumn) || - n.endLineNumber < t.startLineNumber || - (n.endLineNumber === t.startLineNumber && n.endColumn <= t.startColumn) - ) - } - static compareRangesUsingStarts(t, n) { - if (t && n) { - let s = t.startLineNumber | 0, - o = n.startLineNumber | 0 - if (s === o) { - let a = t.startColumn | 0, - u = n.startColumn | 0 - if (a === u) { - let l = t.endLineNumber | 0, - c = n.endLineNumber | 0 - if (l === c) { - let d = t.endColumn | 0, - h = n.endColumn | 0 - return d - h - } - return l - c - } - return a - u - } - return s - o - } - return (t ? 1 : 0) - (n ? 1 : 0) - } - static compareRangesUsingEnds(t, n) { - return t.endLineNumber === n.endLineNumber - ? t.endColumn === n.endColumn - ? t.startLineNumber === n.startLineNumber - ? t.startColumn - n.startColumn - : t.startLineNumber - n.startLineNumber - : t.endColumn - n.endColumn - : t.endLineNumber - n.endLineNumber - } - static spansMultipleLines(t) { - return t.endLineNumber > t.startLineNumber - } - toJSON() { - return this - } - } - function Fl(e) { - return e < 0 ? 0 : e > 255 ? 255 : e | 0 - } - function _r(e) { - return e < 0 ? 0 : e > 4294967295 ? 4294967295 : e | 0 - } - var Ns = class e { - constructor(t) { - let n = Fl(t) - ;(this._defaultValue = n), (this._asciiMap = e._createAsciiMap(n)), (this._map = new Map()) - } - static _createAsciiMap(t) { - let n = new Uint8Array(256) - return n.fill(t), n - } - set(t, n) { - let r = Fl(n) - t >= 0 && t < 256 ? (this._asciiMap[t] = r) : this._map.set(t, r) - } - get(t) { - return t >= 0 && t < 256 ? this._asciiMap[t] : this._map.get(t) || this._defaultValue - } - clear() { - this._asciiMap.fill(this._defaultValue), this._map.clear() - } - } - var Ll = class { - constructor(t, n, r) { - let i = new Uint8Array(t * n) - for (let s = 0, o = t * n; s < o; s++) i[s] = r - ;(this._data = i), (this.rows = t), (this.cols = n) - } - get(t, n) { - return this._data[t * this.cols + n] - } - set(t, n, r) { - this._data[t * this.cols + n] = r - } - }, - Cl = class { - constructor(t) { - let n = 0, - r = 0 - for (let s = 0, o = t.length; s < o; s++) { - let [a, u, l] = t[s] - u > n && (n = u), a > r && (r = a), l > r && (r = l) - } - n++, r++ - let i = new Ll(r, n, 0) - for (let s = 0, o = t.length; s < o; s++) { - let [a, u, l] = t[s] - i.set(a, u, l) - } - ;(this._states = i), (this._maxCharCode = n) - } - nextState(t, n) { - return n < 0 || n >= this._maxCharCode ? 0 : this._states.get(t, n) - } - }, - wl = null - function o5() { - return ( - wl === null && - (wl = new Cl([ - [1, 104, 2], - [1, 72, 2], - [1, 102, 6], - [1, 70, 6], - [2, 116, 3], - [2, 84, 3], - [3, 116, 4], - [3, 84, 4], - [4, 112, 5], - [4, 80, 5], - [5, 115, 9], - [5, 83, 9], - [5, 58, 10], - [6, 105, 7], - [6, 73, 7], - [7, 108, 8], - [7, 76, 8], - [8, 101, 9], - [8, 69, 9], - [9, 58, 10], - [10, 47, 11], - [11, 47, 12] - ])), - wl - ) - } - var Ts = null - function a5() { - if (Ts === null) { - Ts = new Ns(0) - let e = ` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026` - for (let n = 0; n < e.length; n++) Ts.set(e.charCodeAt(n), 1) - let t = '.,;:' - for (let n = 0; n < t.length; n++) Ts.set(t.charCodeAt(n), 2) - } - return Ts - } - var Il = class e { - static _createLink(t, n, r, i, s) { - let o = s - 1 - do { - let a = n.charCodeAt(o) - if (t.get(a) !== 2) break - o-- - } while (o > i) - if (i > 0) { - let a = n.charCodeAt(i - 1), - u = n.charCodeAt(o) - ;((a === 40 && u === 41) || (a === 91 && u === 93) || (a === 123 && u === 125)) && o-- - } - return { - range: { startLineNumber: r, startColumn: i + 1, endLineNumber: r, endColumn: o + 2 }, - url: n.substring(i, o + 1) - } - } - static computeLinks(t, n = o5()) { - let r = a5(), - i = [] - for (let s = 1, o = t.getLineCount(); s <= o; s++) { - let a = t.getLineContent(s), - u = a.length, - l = 0, - c = 0, - d = 0, - h = 1, - m = !1, - g = !1, - v = !1, - N = !1 - for (; l < u; ) { - let _ = !1, - w = a.charCodeAt(l) - if (h === 13) { - let C - switch (w) { - case 40: - ;(m = !0), (C = 0) - break - case 41: - C = m ? 0 : 1 - break - case 91: - ;(v = !0), (g = !0), (C = 0) - break - case 93: - ;(v = !1), (C = g ? 0 : 1) - break - case 123: - ;(N = !0), (C = 0) - break - case 125: - C = N ? 0 : 1 - break - case 39: - case 34: - case 96: - d === w ? (C = 1) : d === 39 || d === 34 || d === 96 ? (C = 0) : (C = 1) - break - case 42: - C = d === 42 ? 1 : 0 - break - case 124: - C = d === 124 ? 1 : 0 - break - case 32: - C = v ? 0 : 1 - break - default: - C = r.get(w) - } - C === 1 && (i.push(e._createLink(r, a, s, c, l)), (_ = !0)) - } else if (h === 12) { - let C - w === 91 ? ((g = !0), (C = 0)) : (C = r.get(w)), C === 1 ? (_ = !0) : (h = 13) - } else (h = n.nextState(h, w)), h === 0 && (_ = !0) - _ && ((h = 1), (m = !1), (g = !1), (N = !1), (c = l + 1), (d = w)), l++ - } - h === 13 && i.push(e._createLink(r, a, s, c, u)) - } - return i - } - } - function dd(e) { - return !e || typeof e.getLineCount != 'function' || typeof e.getLineContent != 'function' - ? [] - : Il.computeLinks(e) - } - var Qo = class e { - constructor() { - this._defaultValueSet = [ - ['true', 'false'], - ['True', 'False'], - ['Private', 'Public', 'Friend', 'ReadOnly', 'Partial', 'Protected', 'WriteOnly'], - ['public', 'protected', 'private'] - ] - } - static { - this.INSTANCE = new e() - } - navigateValueSet(t, n, r, i, s) { - if (t && n) { - let o = this.doNavigateValueSet(n, s) - if (o) return { range: t, value: o } - } - if (r && i) { - let o = this.doNavigateValueSet(i, s) - if (o) return { range: r, value: o } - } - return null - } - doNavigateValueSet(t, n) { - let r = this.numberReplace(t, n) - return r !== null ? r : this.textReplace(t, n) - } - numberReplace(t, n) { - let r = Math.pow(10, t.length - (t.lastIndexOf('.') + 1)), - i = Number(t), - s = parseFloat(t) - return !isNaN(i) && !isNaN(s) && i === s - ? i === 0 && !n - ? null - : ((i = Math.floor(i * r)), (i += n ? r : -r), String(i / r)) - : null - } - textReplace(t, n) { - return this.valueSetsReplace(this._defaultValueSet, t, n) - } - valueSetsReplace(t, n, r) { - let i = null - for (let s = 0, o = t.length; i === null && s < o; s++) i = this.valueSetReplace(t[s], n, r) - return i - } - valueSetReplace(t, n, r) { - let i = t.indexOf(n) - return i >= 0 ? ((i += r ? 1 : -1), i < 0 ? (i = t.length - 1) : (i %= t.length), t[i]) : null - } - } - var pd = Object.freeze(function (e, t) { - let n = setTimeout(e.bind(t), 0) - return { - dispose() { - clearTimeout(n) - } - } - }), - zo - ;(function (e) { - function t(n) { - return n === e.None || n === e.Cancelled || n instanceof hi - ? !0 - : !n || typeof n != 'object' - ? !1 - : typeof n.isCancellationRequested == 'boolean' && - typeof n.onCancellationRequested == 'function' - } - ;(e.isCancellationToken = t), - (e.None = Object.freeze({ isCancellationRequested: !1, onCancellationRequested: ui.None })), - (e.Cancelled = Object.freeze({ isCancellationRequested: !0, onCancellationRequested: pd })) - })(zo || (zo = {})) - var hi = class { - constructor() { - ;(this._isCancelled = !1), (this._emitter = null) - } - cancel() { - this._isCancelled || - ((this._isCancelled = !0), this._emitter && (this._emitter.fire(void 0), this.dispose())) - } - get isCancellationRequested() { - return this._isCancelled - } - get onCancellationRequested() { - return this._isCancelled - ? pd - : (this._emitter || (this._emitter = new lt()), this._emitter.event) - } - dispose() { - this._emitter && (this._emitter.dispose(), (this._emitter = null)) - } - }, - Ss = class { - constructor(t) { - ;(this._token = void 0), - (this._parentListener = void 0), - (this._parentListener = t && t.onCancellationRequested(this.cancel, this)) - } - get token() { - return this._token || (this._token = new hi()), this._token - } - cancel() { - this._token - ? this._token instanceof hi && this._token.cancel() - : (this._token = zo.Cancelled) - } - dispose(t = !1) { - t && this.cancel(), - this._parentListener?.dispose(), - this._token ? this._token instanceof hi && this._token.dispose() : (this._token = zo.None) - } - } - var As = class { - constructor() { - ;(this._keyCodeToStr = []), (this._strToKeyCode = Object.create(null)) - } - define(t, n) { - ;(this._keyCodeToStr[t] = n), (this._strToKeyCode[n.toLowerCase()] = t) - } - keyCodeToStr(t) { - return this._keyCodeToStr[t] - } - strToKeyCode(t) { - return this._strToKeyCode[t.toLowerCase()] || 0 - } - }, - Yo = new As(), - Rl = new As(), - kl = new As(), - u5 = new Array(230), - l5 = {}, - c5 = [], - f5 = Object.create(null), - d5 = Object.create(null), - md = [], - Ol = [] - for (let e = 0; e <= 193; e++) md[e] = -1 - for (let e = 0; e <= 132; e++) Ol[e] = -1 - ;(function () { - let e = '', - t = [ - [1, 0, 'None', 0, 'unknown', 0, 'VK_UNKNOWN', e, e], - [1, 1, 'Hyper', 0, e, 0, e, e, e], - [1, 2, 'Super', 0, e, 0, e, e, e], - [1, 3, 'Fn', 0, e, 0, e, e, e], - [1, 4, 'FnLock', 0, e, 0, e, e, e], - [1, 5, 'Suspend', 0, e, 0, e, e, e], - [1, 6, 'Resume', 0, e, 0, e, e, e], - [1, 7, 'Turbo', 0, e, 0, e, e, e], - [1, 8, 'Sleep', 0, e, 0, 'VK_SLEEP', e, e], - [1, 9, 'WakeUp', 0, e, 0, e, e, e], - [0, 10, 'KeyA', 31, 'A', 65, 'VK_A', e, e], - [0, 11, 'KeyB', 32, 'B', 66, 'VK_B', e, e], - [0, 12, 'KeyC', 33, 'C', 67, 'VK_C', e, e], - [0, 13, 'KeyD', 34, 'D', 68, 'VK_D', e, e], - [0, 14, 'KeyE', 35, 'E', 69, 'VK_E', e, e], - [0, 15, 'KeyF', 36, 'F', 70, 'VK_F', e, e], - [0, 16, 'KeyG', 37, 'G', 71, 'VK_G', e, e], - [0, 17, 'KeyH', 38, 'H', 72, 'VK_H', e, e], - [0, 18, 'KeyI', 39, 'I', 73, 'VK_I', e, e], - [0, 19, 'KeyJ', 40, 'J', 74, 'VK_J', e, e], - [0, 20, 'KeyK', 41, 'K', 75, 'VK_K', e, e], - [0, 21, 'KeyL', 42, 'L', 76, 'VK_L', e, e], - [0, 22, 'KeyM', 43, 'M', 77, 'VK_M', e, e], - [0, 23, 'KeyN', 44, 'N', 78, 'VK_N', e, e], - [0, 24, 'KeyO', 45, 'O', 79, 'VK_O', e, e], - [0, 25, 'KeyP', 46, 'P', 80, 'VK_P', e, e], - [0, 26, 'KeyQ', 47, 'Q', 81, 'VK_Q', e, e], - [0, 27, 'KeyR', 48, 'R', 82, 'VK_R', e, e], - [0, 28, 'KeyS', 49, 'S', 83, 'VK_S', e, e], - [0, 29, 'KeyT', 50, 'T', 84, 'VK_T', e, e], - [0, 30, 'KeyU', 51, 'U', 85, 'VK_U', e, e], - [0, 31, 'KeyV', 52, 'V', 86, 'VK_V', e, e], - [0, 32, 'KeyW', 53, 'W', 87, 'VK_W', e, e], - [0, 33, 'KeyX', 54, 'X', 88, 'VK_X', e, e], - [0, 34, 'KeyY', 55, 'Y', 89, 'VK_Y', e, e], - [0, 35, 'KeyZ', 56, 'Z', 90, 'VK_Z', e, e], - [0, 36, 'Digit1', 22, '1', 49, 'VK_1', e, e], - [0, 37, 'Digit2', 23, '2', 50, 'VK_2', e, e], - [0, 38, 'Digit3', 24, '3', 51, 'VK_3', e, e], - [0, 39, 'Digit4', 25, '4', 52, 'VK_4', e, e], - [0, 40, 'Digit5', 26, '5', 53, 'VK_5', e, e], - [0, 41, 'Digit6', 27, '6', 54, 'VK_6', e, e], - [0, 42, 'Digit7', 28, '7', 55, 'VK_7', e, e], - [0, 43, 'Digit8', 29, '8', 56, 'VK_8', e, e], - [0, 44, 'Digit9', 30, '9', 57, 'VK_9', e, e], - [0, 45, 'Digit0', 21, '0', 48, 'VK_0', e, e], - [1, 46, 'Enter', 3, 'Enter', 13, 'VK_RETURN', e, e], - [1, 47, 'Escape', 9, 'Escape', 27, 'VK_ESCAPE', e, e], - [1, 48, 'Backspace', 1, 'Backspace', 8, 'VK_BACK', e, e], - [1, 49, 'Tab', 2, 'Tab', 9, 'VK_TAB', e, e], - [1, 50, 'Space', 10, 'Space', 32, 'VK_SPACE', e, e], - [0, 51, 'Minus', 88, '-', 189, 'VK_OEM_MINUS', '-', 'OEM_MINUS'], - [0, 52, 'Equal', 86, '=', 187, 'VK_OEM_PLUS', '=', 'OEM_PLUS'], - [0, 53, 'BracketLeft', 92, '[', 219, 'VK_OEM_4', '[', 'OEM_4'], - [0, 54, 'BracketRight', 94, ']', 221, 'VK_OEM_6', ']', 'OEM_6'], - [0, 55, 'Backslash', 93, '\\', 220, 'VK_OEM_5', '\\', 'OEM_5'], - [0, 56, 'IntlHash', 0, e, 0, e, e, e], - [0, 57, 'Semicolon', 85, ';', 186, 'VK_OEM_1', ';', 'OEM_1'], - [0, 58, 'Quote', 95, "'", 222, 'VK_OEM_7', "'", 'OEM_7'], - [0, 59, 'Backquote', 91, '`', 192, 'VK_OEM_3', '`', 'OEM_3'], - [0, 60, 'Comma', 87, ',', 188, 'VK_OEM_COMMA', ',', 'OEM_COMMA'], - [0, 61, 'Period', 89, '.', 190, 'VK_OEM_PERIOD', '.', 'OEM_PERIOD'], - [0, 62, 'Slash', 90, '/', 191, 'VK_OEM_2', '/', 'OEM_2'], - [1, 63, 'CapsLock', 8, 'CapsLock', 20, 'VK_CAPITAL', e, e], - [1, 64, 'F1', 59, 'F1', 112, 'VK_F1', e, e], - [1, 65, 'F2', 60, 'F2', 113, 'VK_F2', e, e], - [1, 66, 'F3', 61, 'F3', 114, 'VK_F3', e, e], - [1, 67, 'F4', 62, 'F4', 115, 'VK_F4', e, e], - [1, 68, 'F5', 63, 'F5', 116, 'VK_F5', e, e], - [1, 69, 'F6', 64, 'F6', 117, 'VK_F6', e, e], - [1, 70, 'F7', 65, 'F7', 118, 'VK_F7', e, e], - [1, 71, 'F8', 66, 'F8', 119, 'VK_F8', e, e], - [1, 72, 'F9', 67, 'F9', 120, 'VK_F9', e, e], - [1, 73, 'F10', 68, 'F10', 121, 'VK_F10', e, e], - [1, 74, 'F11', 69, 'F11', 122, 'VK_F11', e, e], - [1, 75, 'F12', 70, 'F12', 123, 'VK_F12', e, e], - [1, 76, 'PrintScreen', 0, e, 0, e, e, e], - [1, 77, 'ScrollLock', 84, 'ScrollLock', 145, 'VK_SCROLL', e, e], - [1, 78, 'Pause', 7, 'PauseBreak', 19, 'VK_PAUSE', e, e], - [1, 79, 'Insert', 19, 'Insert', 45, 'VK_INSERT', e, e], - [1, 80, 'Home', 14, 'Home', 36, 'VK_HOME', e, e], - [1, 81, 'PageUp', 11, 'PageUp', 33, 'VK_PRIOR', e, e], - [1, 82, 'Delete', 20, 'Delete', 46, 'VK_DELETE', e, e], - [1, 83, 'End', 13, 'End', 35, 'VK_END', e, e], - [1, 84, 'PageDown', 12, 'PageDown', 34, 'VK_NEXT', e, e], - [1, 85, 'ArrowRight', 17, 'RightArrow', 39, 'VK_RIGHT', 'Right', e], - [1, 86, 'ArrowLeft', 15, 'LeftArrow', 37, 'VK_LEFT', 'Left', e], - [1, 87, 'ArrowDown', 18, 'DownArrow', 40, 'VK_DOWN', 'Down', e], - [1, 88, 'ArrowUp', 16, 'UpArrow', 38, 'VK_UP', 'Up', e], - [1, 89, 'NumLock', 83, 'NumLock', 144, 'VK_NUMLOCK', e, e], - [1, 90, 'NumpadDivide', 113, 'NumPad_Divide', 111, 'VK_DIVIDE', e, e], - [1, 91, 'NumpadMultiply', 108, 'NumPad_Multiply', 106, 'VK_MULTIPLY', e, e], - [1, 92, 'NumpadSubtract', 111, 'NumPad_Subtract', 109, 'VK_SUBTRACT', e, e], - [1, 93, 'NumpadAdd', 109, 'NumPad_Add', 107, 'VK_ADD', e, e], - [1, 94, 'NumpadEnter', 3, e, 0, e, e, e], - [1, 95, 'Numpad1', 99, 'NumPad1', 97, 'VK_NUMPAD1', e, e], - [1, 96, 'Numpad2', 100, 'NumPad2', 98, 'VK_NUMPAD2', e, e], - [1, 97, 'Numpad3', 101, 'NumPad3', 99, 'VK_NUMPAD3', e, e], - [1, 98, 'Numpad4', 102, 'NumPad4', 100, 'VK_NUMPAD4', e, e], - [1, 99, 'Numpad5', 103, 'NumPad5', 101, 'VK_NUMPAD5', e, e], - [1, 100, 'Numpad6', 104, 'NumPad6', 102, 'VK_NUMPAD6', e, e], - [1, 101, 'Numpad7', 105, 'NumPad7', 103, 'VK_NUMPAD7', e, e], - [1, 102, 'Numpad8', 106, 'NumPad8', 104, 'VK_NUMPAD8', e, e], - [1, 103, 'Numpad9', 107, 'NumPad9', 105, 'VK_NUMPAD9', e, e], - [1, 104, 'Numpad0', 98, 'NumPad0', 96, 'VK_NUMPAD0', e, e], - [1, 105, 'NumpadDecimal', 112, 'NumPad_Decimal', 110, 'VK_DECIMAL', e, e], - [0, 106, 'IntlBackslash', 97, 'OEM_102', 226, 'VK_OEM_102', e, e], - [1, 107, 'ContextMenu', 58, 'ContextMenu', 93, e, e, e], - [1, 108, 'Power', 0, e, 0, e, e, e], - [1, 109, 'NumpadEqual', 0, e, 0, e, e, e], - [1, 110, 'F13', 71, 'F13', 124, 'VK_F13', e, e], - [1, 111, 'F14', 72, 'F14', 125, 'VK_F14', e, e], - [1, 112, 'F15', 73, 'F15', 126, 'VK_F15', e, e], - [1, 113, 'F16', 74, 'F16', 127, 'VK_F16', e, e], - [1, 114, 'F17', 75, 'F17', 128, 'VK_F17', e, e], - [1, 115, 'F18', 76, 'F18', 129, 'VK_F18', e, e], - [1, 116, 'F19', 77, 'F19', 130, 'VK_F19', e, e], - [1, 117, 'F20', 78, 'F20', 131, 'VK_F20', e, e], - [1, 118, 'F21', 79, 'F21', 132, 'VK_F21', e, e], - [1, 119, 'F22', 80, 'F22', 133, 'VK_F22', e, e], - [1, 120, 'F23', 81, 'F23', 134, 'VK_F23', e, e], - [1, 121, 'F24', 82, 'F24', 135, 'VK_F24', e, e], - [1, 122, 'Open', 0, e, 0, e, e, e], - [1, 123, 'Help', 0, e, 0, e, e, e], - [1, 124, 'Select', 0, e, 0, e, e, e], - [1, 125, 'Again', 0, e, 0, e, e, e], - [1, 126, 'Undo', 0, e, 0, e, e, e], - [1, 127, 'Cut', 0, e, 0, e, e, e], - [1, 128, 'Copy', 0, e, 0, e, e, e], - [1, 129, 'Paste', 0, e, 0, e, e, e], - [1, 130, 'Find', 0, e, 0, e, e, e], - [1, 131, 'AudioVolumeMute', 117, 'AudioVolumeMute', 173, 'VK_VOLUME_MUTE', e, e], - [1, 132, 'AudioVolumeUp', 118, 'AudioVolumeUp', 175, 'VK_VOLUME_UP', e, e], - [1, 133, 'AudioVolumeDown', 119, 'AudioVolumeDown', 174, 'VK_VOLUME_DOWN', e, e], - [1, 134, 'NumpadComma', 110, 'NumPad_Separator', 108, 'VK_SEPARATOR', e, e], - [0, 135, 'IntlRo', 115, 'ABNT_C1', 193, 'VK_ABNT_C1', e, e], - [1, 136, 'KanaMode', 0, e, 0, e, e, e], - [0, 137, 'IntlYen', 0, e, 0, e, e, e], - [1, 138, 'Convert', 0, e, 0, e, e, e], - [1, 139, 'NonConvert', 0, e, 0, e, e, e], - [1, 140, 'Lang1', 0, e, 0, e, e, e], - [1, 141, 'Lang2', 0, e, 0, e, e, e], - [1, 142, 'Lang3', 0, e, 0, e, e, e], - [1, 143, 'Lang4', 0, e, 0, e, e, e], - [1, 144, 'Lang5', 0, e, 0, e, e, e], - [1, 145, 'Abort', 0, e, 0, e, e, e], - [1, 146, 'Props', 0, e, 0, e, e, e], - [1, 147, 'NumpadParenLeft', 0, e, 0, e, e, e], - [1, 148, 'NumpadParenRight', 0, e, 0, e, e, e], - [1, 149, 'NumpadBackspace', 0, e, 0, e, e, e], - [1, 150, 'NumpadMemoryStore', 0, e, 0, e, e, e], - [1, 151, 'NumpadMemoryRecall', 0, e, 0, e, e, e], - [1, 152, 'NumpadMemoryClear', 0, e, 0, e, e, e], - [1, 153, 'NumpadMemoryAdd', 0, e, 0, e, e, e], - [1, 154, 'NumpadMemorySubtract', 0, e, 0, e, e, e], - [1, 155, 'NumpadClear', 131, 'Clear', 12, 'VK_CLEAR', e, e], - [1, 156, 'NumpadClearEntry', 0, e, 0, e, e, e], - [1, 0, e, 5, 'Ctrl', 17, 'VK_CONTROL', e, e], - [1, 0, e, 4, 'Shift', 16, 'VK_SHIFT', e, e], - [1, 0, e, 6, 'Alt', 18, 'VK_MENU', e, e], - [1, 0, e, 57, 'Meta', 91, 'VK_COMMAND', e, e], - [1, 157, 'ControlLeft', 5, e, 0, 'VK_LCONTROL', e, e], - [1, 158, 'ShiftLeft', 4, e, 0, 'VK_LSHIFT', e, e], - [1, 159, 'AltLeft', 6, e, 0, 'VK_LMENU', e, e], - [1, 160, 'MetaLeft', 57, e, 0, 'VK_LWIN', e, e], - [1, 161, 'ControlRight', 5, e, 0, 'VK_RCONTROL', e, e], - [1, 162, 'ShiftRight', 4, e, 0, 'VK_RSHIFT', e, e], - [1, 163, 'AltRight', 6, e, 0, 'VK_RMENU', e, e], - [1, 164, 'MetaRight', 57, e, 0, 'VK_RWIN', e, e], - [1, 165, 'BrightnessUp', 0, e, 0, e, e, e], - [1, 166, 'BrightnessDown', 0, e, 0, e, e, e], - [1, 167, 'MediaPlay', 0, e, 0, e, e, e], - [1, 168, 'MediaRecord', 0, e, 0, e, e, e], - [1, 169, 'MediaFastForward', 0, e, 0, e, e, e], - [1, 170, 'MediaRewind', 0, e, 0, e, e, e], - [1, 171, 'MediaTrackNext', 124, 'MediaTrackNext', 176, 'VK_MEDIA_NEXT_TRACK', e, e], - [1, 172, 'MediaTrackPrevious', 125, 'MediaTrackPrevious', 177, 'VK_MEDIA_PREV_TRACK', e, e], - [1, 173, 'MediaStop', 126, 'MediaStop', 178, 'VK_MEDIA_STOP', e, e], - [1, 174, 'Eject', 0, e, 0, e, e, e], - [1, 175, 'MediaPlayPause', 127, 'MediaPlayPause', 179, 'VK_MEDIA_PLAY_PAUSE', e, e], - [ - 1, - 176, - 'MediaSelect', - 128, - 'LaunchMediaPlayer', - 181, - 'VK_MEDIA_LAUNCH_MEDIA_SELECT', - e, - e - ], - [1, 177, 'LaunchMail', 129, 'LaunchMail', 180, 'VK_MEDIA_LAUNCH_MAIL', e, e], - [1, 178, 'LaunchApp2', 130, 'LaunchApp2', 183, 'VK_MEDIA_LAUNCH_APP2', e, e], - [1, 179, 'LaunchApp1', 0, e, 0, 'VK_MEDIA_LAUNCH_APP1', e, e], - [1, 180, 'SelectTask', 0, e, 0, e, e, e], - [1, 181, 'LaunchScreenSaver', 0, e, 0, e, e, e], - [1, 182, 'BrowserSearch', 120, 'BrowserSearch', 170, 'VK_BROWSER_SEARCH', e, e], - [1, 183, 'BrowserHome', 121, 'BrowserHome', 172, 'VK_BROWSER_HOME', e, e], - [1, 184, 'BrowserBack', 122, 'BrowserBack', 166, 'VK_BROWSER_BACK', e, e], - [1, 185, 'BrowserForward', 123, 'BrowserForward', 167, 'VK_BROWSER_FORWARD', e, e], - [1, 186, 'BrowserStop', 0, e, 0, 'VK_BROWSER_STOP', e, e], - [1, 187, 'BrowserRefresh', 0, e, 0, 'VK_BROWSER_REFRESH', e, e], - [1, 188, 'BrowserFavorites', 0, e, 0, 'VK_BROWSER_FAVORITES', e, e], - [1, 189, 'ZoomToggle', 0, e, 0, e, e, e], - [1, 190, 'MailReply', 0, e, 0, e, e, e], - [1, 191, 'MailForward', 0, e, 0, e, e, e], - [1, 192, 'MailSend', 0, e, 0, e, e, e], - [1, 0, e, 114, 'KeyInComposition', 229, e, e, e], - [1, 0, e, 116, 'ABNT_C2', 194, 'VK_ABNT_C2', e, e], - [1, 0, e, 96, 'OEM_8', 223, 'VK_OEM_8', e, e], - [1, 0, e, 0, e, 0, 'VK_KANA', e, e], - [1, 0, e, 0, e, 0, 'VK_HANGUL', e, e], - [1, 0, e, 0, e, 0, 'VK_JUNJA', e, e], - [1, 0, e, 0, e, 0, 'VK_FINAL', e, e], - [1, 0, e, 0, e, 0, 'VK_HANJA', e, e], - [1, 0, e, 0, e, 0, 'VK_KANJI', e, e], - [1, 0, e, 0, e, 0, 'VK_CONVERT', e, e], - [1, 0, e, 0, e, 0, 'VK_NONCONVERT', e, e], - [1, 0, e, 0, e, 0, 'VK_ACCEPT', e, e], - [1, 0, e, 0, e, 0, 'VK_MODECHANGE', e, e], - [1, 0, e, 0, e, 0, 'VK_SELECT', e, e], - [1, 0, e, 0, e, 0, 'VK_PRINT', e, e], - [1, 0, e, 0, e, 0, 'VK_EXECUTE', e, e], - [1, 0, e, 0, e, 0, 'VK_SNAPSHOT', e, e], - [1, 0, e, 0, e, 0, 'VK_HELP', e, e], - [1, 0, e, 0, e, 0, 'VK_APPS', e, e], - [1, 0, e, 0, e, 0, 'VK_PROCESSKEY', e, e], - [1, 0, e, 0, e, 0, 'VK_PACKET', e, e], - [1, 0, e, 0, e, 0, 'VK_DBE_SBCSCHAR', e, e], - [1, 0, e, 0, e, 0, 'VK_DBE_DBCSCHAR', e, e], - [1, 0, e, 0, e, 0, 'VK_ATTN', e, e], - [1, 0, e, 0, e, 0, 'VK_CRSEL', e, e], - [1, 0, e, 0, e, 0, 'VK_EXSEL', e, e], - [1, 0, e, 0, e, 0, 'VK_EREOF', e, e], - [1, 0, e, 0, e, 0, 'VK_PLAY', e, e], - [1, 0, e, 0, e, 0, 'VK_ZOOM', e, e], - [1, 0, e, 0, e, 0, 'VK_NONAME', e, e], - [1, 0, e, 0, e, 0, 'VK_PA1', e, e], - [1, 0, e, 0, e, 0, 'VK_OEM_CLEAR', e, e] - ], - n = [], - r = [] - for (let i of t) { - let [s, o, a, u, l, c, d, h, m] = i - if ( - (r[o] || - ((r[o] = !0), - (c5[o] = a), - (f5[a] = o), - (d5[a.toLowerCase()] = o), - s && - ((md[o] = u), - u !== 0 && u !== 3 && u !== 5 && u !== 4 && u !== 6 && u !== 57 && (Ol[u] = o))), - !n[u]) - ) { - if (((n[u] = !0), !l)) - throw new Error(`String representation missing for key code ${u} around scan code ${a}`) - Yo.define(u, l), Rl.define(u, h || l), kl.define(u, m || h || l) - } - c && (u5[c] = u), d && (l5[d] = u) - } - Ol[3] = 46 - })() - var hd - ;(function (e) { - function t(a) { - return Yo.keyCodeToStr(a) - } - e.toString = t - function n(a) { - return Yo.strToKeyCode(a) - } - e.fromString = n - function r(a) { - return Rl.keyCodeToStr(a) - } - e.toUserSettingsUS = r - function i(a) { - return kl.keyCodeToStr(a) - } - e.toUserSettingsGeneral = i - function s(a) { - return Rl.strToKeyCode(a) || kl.strToKeyCode(a) - } - e.fromUserSettings = s - function o(a) { - if (a >= 98 && a <= 113) return null - switch (a) { - case 16: - return 'Up' - case 18: - return 'Down' - case 15: - return 'Left' - case 17: - return 'Right' - } - return Yo.keyCodeToStr(a) - } - e.toElectronAccelerator = o - })(hd || (hd = {})) - function gd(e, t) { - let n = ((t & 65535) << 16) >>> 0 - return (e | n) >>> 0 - } - var Jo = class e extends oe { - constructor(t, n, r, i) { - super(t, n, r, i), - (this.selectionStartLineNumber = t), - (this.selectionStartColumn = n), - (this.positionLineNumber = r), - (this.positionColumn = i) - } - toString() { - return ( - '[' + - this.selectionStartLineNumber + - ',' + - this.selectionStartColumn + - ' -> ' + - this.positionLineNumber + - ',' + - this.positionColumn + - ']' - ) - } - equalsSelection(t) { - return e.selectionsEqual(this, t) - } - static selectionsEqual(t, n) { - return ( - t.selectionStartLineNumber === n.selectionStartLineNumber && - t.selectionStartColumn === n.selectionStartColumn && - t.positionLineNumber === n.positionLineNumber && - t.positionColumn === n.positionColumn - ) - } - getDirection() { - return this.selectionStartLineNumber === this.startLineNumber && - this.selectionStartColumn === this.startColumn - ? 0 - : 1 - } - setEndPosition(t, n) { - return this.getDirection() === 0 - ? new e(this.startLineNumber, this.startColumn, t, n) - : new e(t, n, this.startLineNumber, this.startColumn) - } - getPosition() { - return new Se(this.positionLineNumber, this.positionColumn) - } - getSelectionStart() { - return new Se(this.selectionStartLineNumber, this.selectionStartColumn) - } - setStartPosition(t, n) { - return this.getDirection() === 0 - ? new e(t, n, this.endLineNumber, this.endColumn) - : new e(this.endLineNumber, this.endColumn, t, n) - } - static fromPositions(t, n = t) { - return new e(t.lineNumber, t.column, n.lineNumber, n.column) - } - static fromRange(t, n) { - return n === 0 - ? new e(t.startLineNumber, t.startColumn, t.endLineNumber, t.endColumn) - : new e(t.endLineNumber, t.endColumn, t.startLineNumber, t.startColumn) - } - static liftSelection(t) { - return new e( - t.selectionStartLineNumber, - t.selectionStartColumn, - t.positionLineNumber, - t.positionColumn - ) - } - static selectionsArrEqual(t, n) { - if ((t && !n) || (!t && n)) return !1 - if (!t && !n) return !0 - if (t.length !== n.length) return !1 - for (let r = 0, i = t.length; r < i; r++) if (!this.selectionsEqual(t[r], n[r])) return !1 - return !0 - } - static isISelection(t) { - return ( - t && - typeof t.selectionStartLineNumber == 'number' && - typeof t.selectionStartColumn == 'number' && - typeof t.positionLineNumber == 'number' && - typeof t.positionColumn == 'number' - ) - } - static createWithDirection(t, n, r, i, s) { - return s === 0 ? new e(t, n, r, i) : new e(r, i, t, n) - } - } - function Dd(e) { - return typeof e == 'string' - } - var vd = Object.create(null) - function p(e, t) { - if (Dd(t)) { - let n = vd[t] - if (n === void 0) throw new Error(`${e} references an unknown codicon: ${t}`) - t = n - } - return (vd[e] = t), { id: e } - } - var bd = { - add: p('add', 6e4), - plus: p('plus', 6e4), - gistNew: p('gist-new', 6e4), - repoCreate: p('repo-create', 6e4), - lightbulb: p('lightbulb', 60001), - lightBulb: p('light-bulb', 60001), - repo: p('repo', 60002), - repoDelete: p('repo-delete', 60002), - gistFork: p('gist-fork', 60003), - repoForked: p('repo-forked', 60003), - gitPullRequest: p('git-pull-request', 60004), - gitPullRequestAbandoned: p('git-pull-request-abandoned', 60004), - recordKeys: p('record-keys', 60005), - keyboard: p('keyboard', 60005), - tag: p('tag', 60006), - gitPullRequestLabel: p('git-pull-request-label', 60006), - tagAdd: p('tag-add', 60006), - tagRemove: p('tag-remove', 60006), - person: p('person', 60007), - personFollow: p('person-follow', 60007), - personOutline: p('person-outline', 60007), - personFilled: p('person-filled', 60007), - gitBranch: p('git-branch', 60008), - gitBranchCreate: p('git-branch-create', 60008), - gitBranchDelete: p('git-branch-delete', 60008), - sourceControl: p('source-control', 60008), - mirror: p('mirror', 60009), - mirrorPublic: p('mirror-public', 60009), - star: p('star', 60010), - starAdd: p('star-add', 60010), - starDelete: p('star-delete', 60010), - starEmpty: p('star-empty', 60010), - comment: p('comment', 60011), - commentAdd: p('comment-add', 60011), - alert: p('alert', 60012), - warning: p('warning', 60012), - search: p('search', 60013), - searchSave: p('search-save', 60013), - logOut: p('log-out', 60014), - signOut: p('sign-out', 60014), - logIn: p('log-in', 60015), - signIn: p('sign-in', 60015), - eye: p('eye', 60016), - eyeUnwatch: p('eye-unwatch', 60016), - eyeWatch: p('eye-watch', 60016), - circleFilled: p('circle-filled', 60017), - primitiveDot: p('primitive-dot', 60017), - closeDirty: p('close-dirty', 60017), - debugBreakpoint: p('debug-breakpoint', 60017), - debugBreakpointDisabled: p('debug-breakpoint-disabled', 60017), - debugHint: p('debug-hint', 60017), - terminalDecorationSuccess: p('terminal-decoration-success', 60017), - primitiveSquare: p('primitive-square', 60018), - edit: p('edit', 60019), - pencil: p('pencil', 60019), - info: p('info', 60020), - issueOpened: p('issue-opened', 60020), - gistPrivate: p('gist-private', 60021), - gitForkPrivate: p('git-fork-private', 60021), - lock: p('lock', 60021), - mirrorPrivate: p('mirror-private', 60021), - close: p('close', 60022), - removeClose: p('remove-close', 60022), - x: p('x', 60022), - repoSync: p('repo-sync', 60023), - sync: p('sync', 60023), - clone: p('clone', 60024), - desktopDownload: p('desktop-download', 60024), - beaker: p('beaker', 60025), - microscope: p('microscope', 60025), - vm: p('vm', 60026), - deviceDesktop: p('device-desktop', 60026), - file: p('file', 60027), - fileText: p('file-text', 60027), - more: p('more', 60028), - ellipsis: p('ellipsis', 60028), - kebabHorizontal: p('kebab-horizontal', 60028), - mailReply: p('mail-reply', 60029), - reply: p('reply', 60029), - organization: p('organization', 60030), - organizationFilled: p('organization-filled', 60030), - organizationOutline: p('organization-outline', 60030), - newFile: p('new-file', 60031), - fileAdd: p('file-add', 60031), - newFolder: p('new-folder', 60032), - fileDirectoryCreate: p('file-directory-create', 60032), - trash: p('trash', 60033), - trashcan: p('trashcan', 60033), - history: p('history', 60034), - clock: p('clock', 60034), - folder: p('folder', 60035), - fileDirectory: p('file-directory', 60035), - symbolFolder: p('symbol-folder', 60035), - logoGithub: p('logo-github', 60036), - markGithub: p('mark-github', 60036), - github: p('github', 60036), - terminal: p('terminal', 60037), - console: p('console', 60037), - repl: p('repl', 60037), - zap: p('zap', 60038), - symbolEvent: p('symbol-event', 60038), - error: p('error', 60039), - stop: p('stop', 60039), - variable: p('variable', 60040), - symbolVariable: p('symbol-variable', 60040), - array: p('array', 60042), - symbolArray: p('symbol-array', 60042), - symbolModule: p('symbol-module', 60043), - symbolPackage: p('symbol-package', 60043), - symbolNamespace: p('symbol-namespace', 60043), - symbolObject: p('symbol-object', 60043), - symbolMethod: p('symbol-method', 60044), - symbolFunction: p('symbol-function', 60044), - symbolConstructor: p('symbol-constructor', 60044), - symbolBoolean: p('symbol-boolean', 60047), - symbolNull: p('symbol-null', 60047), - symbolNumeric: p('symbol-numeric', 60048), - symbolNumber: p('symbol-number', 60048), - symbolStructure: p('symbol-structure', 60049), - symbolStruct: p('symbol-struct', 60049), - symbolParameter: p('symbol-parameter', 60050), - symbolTypeParameter: p('symbol-type-parameter', 60050), - symbolKey: p('symbol-key', 60051), - symbolText: p('symbol-text', 60051), - symbolReference: p('symbol-reference', 60052), - goToFile: p('go-to-file', 60052), - symbolEnum: p('symbol-enum', 60053), - symbolValue: p('symbol-value', 60053), - symbolRuler: p('symbol-ruler', 60054), - symbolUnit: p('symbol-unit', 60054), - activateBreakpoints: p('activate-breakpoints', 60055), - archive: p('archive', 60056), - arrowBoth: p('arrow-both', 60057), - arrowDown: p('arrow-down', 60058), - arrowLeft: p('arrow-left', 60059), - arrowRight: p('arrow-right', 60060), - arrowSmallDown: p('arrow-small-down', 60061), - arrowSmallLeft: p('arrow-small-left', 60062), - arrowSmallRight: p('arrow-small-right', 60063), - arrowSmallUp: p('arrow-small-up', 60064), - arrowUp: p('arrow-up', 60065), - bell: p('bell', 60066), - bold: p('bold', 60067), - book: p('book', 60068), - bookmark: p('bookmark', 60069), - debugBreakpointConditionalUnverified: p('debug-breakpoint-conditional-unverified', 60070), - debugBreakpointConditional: p('debug-breakpoint-conditional', 60071), - debugBreakpointConditionalDisabled: p('debug-breakpoint-conditional-disabled', 60071), - debugBreakpointDataUnverified: p('debug-breakpoint-data-unverified', 60072), - debugBreakpointData: p('debug-breakpoint-data', 60073), - debugBreakpointDataDisabled: p('debug-breakpoint-data-disabled', 60073), - debugBreakpointLogUnverified: p('debug-breakpoint-log-unverified', 60074), - debugBreakpointLog: p('debug-breakpoint-log', 60075), - debugBreakpointLogDisabled: p('debug-breakpoint-log-disabled', 60075), - briefcase: p('briefcase', 60076), - broadcast: p('broadcast', 60077), - browser: p('browser', 60078), - bug: p('bug', 60079), - calendar: p('calendar', 60080), - caseSensitive: p('case-sensitive', 60081), - check: p('check', 60082), - checklist: p('checklist', 60083), - chevronDown: p('chevron-down', 60084), - chevronLeft: p('chevron-left', 60085), - chevronRight: p('chevron-right', 60086), - chevronUp: p('chevron-up', 60087), - chromeClose: p('chrome-close', 60088), - chromeMaximize: p('chrome-maximize', 60089), - chromeMinimize: p('chrome-minimize', 60090), - chromeRestore: p('chrome-restore', 60091), - circleOutline: p('circle-outline', 60092), - circle: p('circle', 60092), - debugBreakpointUnverified: p('debug-breakpoint-unverified', 60092), - terminalDecorationIncomplete: p('terminal-decoration-incomplete', 60092), - circleSlash: p('circle-slash', 60093), - circuitBoard: p('circuit-board', 60094), - clearAll: p('clear-all', 60095), - clippy: p('clippy', 60096), - closeAll: p('close-all', 60097), - cloudDownload: p('cloud-download', 60098), - cloudUpload: p('cloud-upload', 60099), - code: p('code', 60100), - collapseAll: p('collapse-all', 60101), - colorMode: p('color-mode', 60102), - commentDiscussion: p('comment-discussion', 60103), - creditCard: p('credit-card', 60105), - dash: p('dash', 60108), - dashboard: p('dashboard', 60109), - database: p('database', 60110), - debugContinue: p('debug-continue', 60111), - debugDisconnect: p('debug-disconnect', 60112), - debugPause: p('debug-pause', 60113), - debugRestart: p('debug-restart', 60114), - debugStart: p('debug-start', 60115), - debugStepInto: p('debug-step-into', 60116), - debugStepOut: p('debug-step-out', 60117), - debugStepOver: p('debug-step-over', 60118), - debugStop: p('debug-stop', 60119), - debug: p('debug', 60120), - deviceCameraVideo: p('device-camera-video', 60121), - deviceCamera: p('device-camera', 60122), - deviceMobile: p('device-mobile', 60123), - diffAdded: p('diff-added', 60124), - diffIgnored: p('diff-ignored', 60125), - diffModified: p('diff-modified', 60126), - diffRemoved: p('diff-removed', 60127), - diffRenamed: p('diff-renamed', 60128), - diff: p('diff', 60129), - diffSidebyside: p('diff-sidebyside', 60129), - discard: p('discard', 60130), - editorLayout: p('editor-layout', 60131), - emptyWindow: p('empty-window', 60132), - exclude: p('exclude', 60133), - extensions: p('extensions', 60134), - eyeClosed: p('eye-closed', 60135), - fileBinary: p('file-binary', 60136), - fileCode: p('file-code', 60137), - fileMedia: p('file-media', 60138), - filePdf: p('file-pdf', 60139), - fileSubmodule: p('file-submodule', 60140), - fileSymlinkDirectory: p('file-symlink-directory', 60141), - fileSymlinkFile: p('file-symlink-file', 60142), - fileZip: p('file-zip', 60143), - files: p('files', 60144), - filter: p('filter', 60145), - flame: p('flame', 60146), - foldDown: p('fold-down', 60147), - foldUp: p('fold-up', 60148), - fold: p('fold', 60149), - folderActive: p('folder-active', 60150), - folderOpened: p('folder-opened', 60151), - gear: p('gear', 60152), - gift: p('gift', 60153), - gistSecret: p('gist-secret', 60154), - gist: p('gist', 60155), - gitCommit: p('git-commit', 60156), - gitCompare: p('git-compare', 60157), - compareChanges: p('compare-changes', 60157), - gitMerge: p('git-merge', 60158), - githubAction: p('github-action', 60159), - githubAlt: p('github-alt', 60160), - globe: p('globe', 60161), - grabber: p('grabber', 60162), - graph: p('graph', 60163), - gripper: p('gripper', 60164), - heart: p('heart', 60165), - home: p('home', 60166), - horizontalRule: p('horizontal-rule', 60167), - hubot: p('hubot', 60168), - inbox: p('inbox', 60169), - issueReopened: p('issue-reopened', 60171), - issues: p('issues', 60172), - italic: p('italic', 60173), - jersey: p('jersey', 60174), - json: p('json', 60175), - kebabVertical: p('kebab-vertical', 60176), - key: p('key', 60177), - law: p('law', 60178), - lightbulbAutofix: p('lightbulb-autofix', 60179), - linkExternal: p('link-external', 60180), - link: p('link', 60181), - listOrdered: p('list-ordered', 60182), - listUnordered: p('list-unordered', 60183), - liveShare: p('live-share', 60184), - loading: p('loading', 60185), - location: p('location', 60186), - mailRead: p('mail-read', 60187), - mail: p('mail', 60188), - markdown: p('markdown', 60189), - megaphone: p('megaphone', 60190), - mention: p('mention', 60191), - milestone: p('milestone', 60192), - gitPullRequestMilestone: p('git-pull-request-milestone', 60192), - mortarBoard: p('mortar-board', 60193), - move: p('move', 60194), - multipleWindows: p('multiple-windows', 60195), - mute: p('mute', 60196), - noNewline: p('no-newline', 60197), - note: p('note', 60198), - octoface: p('octoface', 60199), - openPreview: p('open-preview', 60200), - package: p('package', 60201), - paintcan: p('paintcan', 60202), - pin: p('pin', 60203), - play: p('play', 60204), - run: p('run', 60204), - plug: p('plug', 60205), - preserveCase: p('preserve-case', 60206), - preview: p('preview', 60207), - project: p('project', 60208), - pulse: p('pulse', 60209), - question: p('question', 60210), - quote: p('quote', 60211), - radioTower: p('radio-tower', 60212), - reactions: p('reactions', 60213), - references: p('references', 60214), - refresh: p('refresh', 60215), - regex: p('regex', 60216), - remoteExplorer: p('remote-explorer', 60217), - remote: p('remote', 60218), - remove: p('remove', 60219), - replaceAll: p('replace-all', 60220), - replace: p('replace', 60221), - repoClone: p('repo-clone', 60222), - repoForcePush: p('repo-force-push', 60223), - repoPull: p('repo-pull', 60224), - repoPush: p('repo-push', 60225), - report: p('report', 60226), - requestChanges: p('request-changes', 60227), - rocket: p('rocket', 60228), - rootFolderOpened: p('root-folder-opened', 60229), - rootFolder: p('root-folder', 60230), - rss: p('rss', 60231), - ruby: p('ruby', 60232), - saveAll: p('save-all', 60233), - saveAs: p('save-as', 60234), - save: p('save', 60235), - screenFull: p('screen-full', 60236), - screenNormal: p('screen-normal', 60237), - searchStop: p('search-stop', 60238), - server: p('server', 60240), - settingsGear: p('settings-gear', 60241), - settings: p('settings', 60242), - shield: p('shield', 60243), - smiley: p('smiley', 60244), - sortPrecedence: p('sort-precedence', 60245), - splitHorizontal: p('split-horizontal', 60246), - splitVertical: p('split-vertical', 60247), - squirrel: p('squirrel', 60248), - starFull: p('star-full', 60249), - starHalf: p('star-half', 60250), - symbolClass: p('symbol-class', 60251), - symbolColor: p('symbol-color', 60252), - symbolConstant: p('symbol-constant', 60253), - symbolEnumMember: p('symbol-enum-member', 60254), - symbolField: p('symbol-field', 60255), - symbolFile: p('symbol-file', 60256), - symbolInterface: p('symbol-interface', 60257), - symbolKeyword: p('symbol-keyword', 60258), - symbolMisc: p('symbol-misc', 60259), - symbolOperator: p('symbol-operator', 60260), - symbolProperty: p('symbol-property', 60261), - wrench: p('wrench', 60261), - wrenchSubaction: p('wrench-subaction', 60261), - symbolSnippet: p('symbol-snippet', 60262), - tasklist: p('tasklist', 60263), - telescope: p('telescope', 60264), - textSize: p('text-size', 60265), - threeBars: p('three-bars', 60266), - thumbsdown: p('thumbsdown', 60267), - thumbsup: p('thumbsup', 60268), - tools: p('tools', 60269), - triangleDown: p('triangle-down', 60270), - triangleLeft: p('triangle-left', 60271), - triangleRight: p('triangle-right', 60272), - triangleUp: p('triangle-up', 60273), - twitter: p('twitter', 60274), - unfold: p('unfold', 60275), - unlock: p('unlock', 60276), - unmute: p('unmute', 60277), - unverified: p('unverified', 60278), - verified: p('verified', 60279), - versions: p('versions', 60280), - vmActive: p('vm-active', 60281), - vmOutline: p('vm-outline', 60282), - vmRunning: p('vm-running', 60283), - watch: p('watch', 60284), - whitespace: p('whitespace', 60285), - wholeWord: p('whole-word', 60286), - window: p('window', 60287), - wordWrap: p('word-wrap', 60288), - zoomIn: p('zoom-in', 60289), - zoomOut: p('zoom-out', 60290), - listFilter: p('list-filter', 60291), - listFlat: p('list-flat', 60292), - listSelection: p('list-selection', 60293), - selection: p('selection', 60293), - listTree: p('list-tree', 60294), - debugBreakpointFunctionUnverified: p('debug-breakpoint-function-unverified', 60295), - debugBreakpointFunction: p('debug-breakpoint-function', 60296), - debugBreakpointFunctionDisabled: p('debug-breakpoint-function-disabled', 60296), - debugStackframeActive: p('debug-stackframe-active', 60297), - circleSmallFilled: p('circle-small-filled', 60298), - debugStackframeDot: p('debug-stackframe-dot', 60298), - terminalDecorationMark: p('terminal-decoration-mark', 60298), - debugStackframe: p('debug-stackframe', 60299), - debugStackframeFocused: p('debug-stackframe-focused', 60299), - debugBreakpointUnsupported: p('debug-breakpoint-unsupported', 60300), - symbolString: p('symbol-string', 60301), - debugReverseContinue: p('debug-reverse-continue', 60302), - debugStepBack: p('debug-step-back', 60303), - debugRestartFrame: p('debug-restart-frame', 60304), - debugAlt: p('debug-alt', 60305), - callIncoming: p('call-incoming', 60306), - callOutgoing: p('call-outgoing', 60307), - menu: p('menu', 60308), - expandAll: p('expand-all', 60309), - feedback: p('feedback', 60310), - gitPullRequestReviewer: p('git-pull-request-reviewer', 60310), - groupByRefType: p('group-by-ref-type', 60311), - ungroupByRefType: p('ungroup-by-ref-type', 60312), - account: p('account', 60313), - gitPullRequestAssignee: p('git-pull-request-assignee', 60313), - bellDot: p('bell-dot', 60314), - debugConsole: p('debug-console', 60315), - library: p('library', 60316), - output: p('output', 60317), - runAll: p('run-all', 60318), - syncIgnored: p('sync-ignored', 60319), - pinned: p('pinned', 60320), - githubInverted: p('github-inverted', 60321), - serverProcess: p('server-process', 60322), - serverEnvironment: p('server-environment', 60323), - pass: p('pass', 60324), - issueClosed: p('issue-closed', 60324), - stopCircle: p('stop-circle', 60325), - playCircle: p('play-circle', 60326), - record: p('record', 60327), - debugAltSmall: p('debug-alt-small', 60328), - vmConnect: p('vm-connect', 60329), - cloud: p('cloud', 60330), - merge: p('merge', 60331), - export: p('export', 60332), - graphLeft: p('graph-left', 60333), - magnet: p('magnet', 60334), - notebook: p('notebook', 60335), - redo: p('redo', 60336), - checkAll: p('check-all', 60337), - pinnedDirty: p('pinned-dirty', 60338), - passFilled: p('pass-filled', 60339), - circleLargeFilled: p('circle-large-filled', 60340), - circleLarge: p('circle-large', 60341), - circleLargeOutline: p('circle-large-outline', 60341), - combine: p('combine', 60342), - gather: p('gather', 60342), - table: p('table', 60343), - variableGroup: p('variable-group', 60344), - typeHierarchy: p('type-hierarchy', 60345), - typeHierarchySub: p('type-hierarchy-sub', 60346), - typeHierarchySuper: p('type-hierarchy-super', 60347), - gitPullRequestCreate: p('git-pull-request-create', 60348), - runAbove: p('run-above', 60349), - runBelow: p('run-below', 60350), - notebookTemplate: p('notebook-template', 60351), - debugRerun: p('debug-rerun', 60352), - workspaceTrusted: p('workspace-trusted', 60353), - workspaceUntrusted: p('workspace-untrusted', 60354), - workspaceUnknown: p('workspace-unknown', 60355), - terminalCmd: p('terminal-cmd', 60356), - terminalDebian: p('terminal-debian', 60357), - terminalLinux: p('terminal-linux', 60358), - terminalPowershell: p('terminal-powershell', 60359), - terminalTmux: p('terminal-tmux', 60360), - terminalUbuntu: p('terminal-ubuntu', 60361), - terminalBash: p('terminal-bash', 60362), - arrowSwap: p('arrow-swap', 60363), - copy: p('copy', 60364), - personAdd: p('person-add', 60365), - filterFilled: p('filter-filled', 60366), - wand: p('wand', 60367), - debugLineByLine: p('debug-line-by-line', 60368), - inspect: p('inspect', 60369), - layers: p('layers', 60370), - layersDot: p('layers-dot', 60371), - layersActive: p('layers-active', 60372), - compass: p('compass', 60373), - compassDot: p('compass-dot', 60374), - compassActive: p('compass-active', 60375), - azure: p('azure', 60376), - issueDraft: p('issue-draft', 60377), - gitPullRequestClosed: p('git-pull-request-closed', 60378), - gitPullRequestDraft: p('git-pull-request-draft', 60379), - debugAll: p('debug-all', 60380), - debugCoverage: p('debug-coverage', 60381), - runErrors: p('run-errors', 60382), - folderLibrary: p('folder-library', 60383), - debugContinueSmall: p('debug-continue-small', 60384), - beakerStop: p('beaker-stop', 60385), - graphLine: p('graph-line', 60386), - graphScatter: p('graph-scatter', 60387), - pieChart: p('pie-chart', 60388), - bracket: p('bracket', 60175), - bracketDot: p('bracket-dot', 60389), - bracketError: p('bracket-error', 60390), - lockSmall: p('lock-small', 60391), - azureDevops: p('azure-devops', 60392), - verifiedFilled: p('verified-filled', 60393), - newline: p('newline', 60394), - layout: p('layout', 60395), - layoutActivitybarLeft: p('layout-activitybar-left', 60396), - layoutActivitybarRight: p('layout-activitybar-right', 60397), - layoutPanelLeft: p('layout-panel-left', 60398), - layoutPanelCenter: p('layout-panel-center', 60399), - layoutPanelJustify: p('layout-panel-justify', 60400), - layoutPanelRight: p('layout-panel-right', 60401), - layoutPanel: p('layout-panel', 60402), - layoutSidebarLeft: p('layout-sidebar-left', 60403), - layoutSidebarRight: p('layout-sidebar-right', 60404), - layoutStatusbar: p('layout-statusbar', 60405), - layoutMenubar: p('layout-menubar', 60406), - layoutCentered: p('layout-centered', 60407), - target: p('target', 60408), - indent: p('indent', 60409), - recordSmall: p('record-small', 60410), - errorSmall: p('error-small', 60411), - terminalDecorationError: p('terminal-decoration-error', 60411), - arrowCircleDown: p('arrow-circle-down', 60412), - arrowCircleLeft: p('arrow-circle-left', 60413), - arrowCircleRight: p('arrow-circle-right', 60414), - arrowCircleUp: p('arrow-circle-up', 60415), - layoutSidebarRightOff: p('layout-sidebar-right-off', 60416), - layoutPanelOff: p('layout-panel-off', 60417), - layoutSidebarLeftOff: p('layout-sidebar-left-off', 60418), - blank: p('blank', 60419), - heartFilled: p('heart-filled', 60420), - map: p('map', 60421), - mapHorizontal: p('map-horizontal', 60421), - foldHorizontal: p('fold-horizontal', 60421), - mapFilled: p('map-filled', 60422), - mapHorizontalFilled: p('map-horizontal-filled', 60422), - foldHorizontalFilled: p('fold-horizontal-filled', 60422), - circleSmall: p('circle-small', 60423), - bellSlash: p('bell-slash', 60424), - bellSlashDot: p('bell-slash-dot', 60425), - commentUnresolved: p('comment-unresolved', 60426), - gitPullRequestGoToChanges: p('git-pull-request-go-to-changes', 60427), - gitPullRequestNewChanges: p('git-pull-request-new-changes', 60428), - searchFuzzy: p('search-fuzzy', 60429), - commentDraft: p('comment-draft', 60430), - send: p('send', 60431), - sparkle: p('sparkle', 60432), - insert: p('insert', 60433), - mic: p('mic', 60434), - thumbsdownFilled: p('thumbsdown-filled', 60435), - thumbsupFilled: p('thumbsup-filled', 60436), - coffee: p('coffee', 60437), - snake: p('snake', 60438), - game: p('game', 60439), - vr: p('vr', 60440), - chip: p('chip', 60441), - piano: p('piano', 60442), - music: p('music', 60443), - micFilled: p('mic-filled', 60444), - repoFetch: p('repo-fetch', 60445), - copilot: p('copilot', 60446), - lightbulbSparkle: p('lightbulb-sparkle', 60447), - robot: p('robot', 60448), - sparkleFilled: p('sparkle-filled', 60449), - diffSingle: p('diff-single', 60450), - diffMultiple: p('diff-multiple', 60451), - surroundWith: p('surround-with', 60452), - share: p('share', 60453), - gitStash: p('git-stash', 60454), - gitStashApply: p('git-stash-apply', 60455), - gitStashPop: p('git-stash-pop', 60456), - vscode: p('vscode', 60457), - vscodeInsiders: p('vscode-insiders', 60458), - codeOss: p('code-oss', 60459), - runCoverage: p('run-coverage', 60460), - runAllCoverage: p('run-all-coverage', 60461), - coverage: p('coverage', 60462), - githubProject: p('github-project', 60463), - mapVertical: p('map-vertical', 60464), - foldVertical: p('fold-vertical', 60464), - mapVerticalFilled: p('map-vertical-filled', 60465), - foldVerticalFilled: p('fold-vertical-filled', 60465), - goToSearch: p('go-to-search', 60466), - percentage: p('percentage', 60467), - sortPercentage: p('sort-percentage', 60467), - attach: p('attach', 60468) - } - var p5 = { - dialogError: p('dialog-error', 'error'), - dialogWarning: p('dialog-warning', 'warning'), - dialogInfo: p('dialog-info', 'info'), - dialogClose: p('dialog-close', 'close'), - treeItemExpanded: p('tree-item-expanded', 'chevron-down'), - treeFilterOnTypeOn: p('tree-filter-on-type-on', 'list-filter'), - treeFilterOnTypeOff: p('tree-filter-on-type-off', 'list-selection'), - treeFilterClear: p('tree-filter-clear', 'close'), - treeItemLoading: p('tree-item-loading', 'loading'), - menuSelection: p('menu-selection', 'check'), - menuSubmenu: p('menu-submenu', 'chevron-right'), - menuBarMore: p('menubar-more', 'more'), - scrollbarButtonLeft: p('scrollbar-button-left', 'triangle-left'), - scrollbarButtonRight: p('scrollbar-button-right', 'triangle-right'), - scrollbarButtonUp: p('scrollbar-button-up', 'triangle-up'), - scrollbarButtonDown: p('scrollbar-button-down', 'triangle-down'), - toolBarMore: p('toolbar-more', 'more'), - quickInputBack: p('quick-input-back', 'arrow-left'), - dropDownButton: p('drop-down-button', 60084), - symbolCustomColor: p('symbol-customcolor', 60252), - exportIcon: p('export', 60332), - workspaceUnspecified: p('workspace-unspecified', 60355), - newLine: p('newline', 60394), - thumbsDownFilled: p('thumbsdown-filled', 60435), - thumbsUpFilled: p('thumbsup-filled', 60436), - gitFetch: p('git-fetch', 60445), - lightbulbSparkleAutofix: p('lightbulb-sparkle-autofix', 60447), - debugBreakpointPending: p('debug-breakpoint-pending', 60377) - }, - re = { ...bd, ...p5 } - var Fs = class { - constructor() { - ;(this._tokenizationSupports = new Map()), - (this._factories = new Map()), - (this._onDidChange = new lt()), - (this.onDidChange = this._onDidChange.event), - (this._colorMap = null) - } - handleChange(t) { - this._onDidChange.fire({ changedLanguages: t, changedColorMap: !1 }) - } - register(t, n) { - return ( - this._tokenizationSupports.set(t, n), - this.handleChange([t]), - Zn(() => { - this._tokenizationSupports.get(t) === n && - (this._tokenizationSupports.delete(t), this.handleChange([t])) - }) - ) - } - get(t) { - return this._tokenizationSupports.get(t) || null - } - registerFactory(t, n) { - this._factories.get(t)?.dispose() - let r = new Ml(this, t, n) - return ( - this._factories.set(t, r), - Zn(() => { - let i = this._factories.get(t) - !i || i !== r || (this._factories.delete(t), i.dispose()) - }) - ) - } - async getOrCreate(t) { - let n = this.get(t) - if (n) return n - let r = this._factories.get(t) - return !r || r.isResolved ? null : (await r.resolve(), this.get(t)) - } - isResolved(t) { - if (this.get(t)) return !0 - let r = this._factories.get(t) - return !!(!r || r.isResolved) - } - setColorMap(t) { - ;(this._colorMap = t), - this._onDidChange.fire({ - changedLanguages: Array.from(this._tokenizationSupports.keys()), - changedColorMap: !0 - }) - } - getColorMap() { - return this._colorMap - } - getDefaultBackground() { - return this._colorMap && this._colorMap.length > 2 ? this._colorMap[2] : null - } - }, - Ml = class extends Xt { - get isResolved() { - return this._isResolved - } - constructor(t, n, r) { - super(), - (this._registry = t), - (this._languageId = n), - (this._factory = r), - (this._isDisposed = !1), - (this._resolvePromise = null), - (this._isResolved = !1) - } - dispose() { - ;(this._isDisposed = !0), super.dispose() - } - async resolve() { - return this._resolvePromise || (this._resolvePromise = this._create()), this._resolvePromise - } - async _create() { - let t = await this._factory.tokenizationSupport - ;(this._isResolved = !0), - t && !this._isDisposed && this._register(this._registry.register(this._languageId, t)) - } - } - var Xo = class { - constructor(t, n, r) { - ;(this.offset = t), (this.type = n), (this.language = r), (this._tokenBrand = void 0) - } - toString() { - return '(' + this.offset + ', ' + this.type + ')' - } - } - var Ed - ;(function (e) { - ;(e[(e.Increase = 0)] = 'Increase'), (e[(e.Decrease = 1)] = 'Decrease') - })(Ed || (Ed = {})) - var yd - ;(function (e) { - let t = new Map() - t.set(0, re.symbolMethod), - t.set(1, re.symbolFunction), - t.set(2, re.symbolConstructor), - t.set(3, re.symbolField), - t.set(4, re.symbolVariable), - t.set(5, re.symbolClass), - t.set(6, re.symbolStruct), - t.set(7, re.symbolInterface), - t.set(8, re.symbolModule), - t.set(9, re.symbolProperty), - t.set(10, re.symbolEvent), - t.set(11, re.symbolOperator), - t.set(12, re.symbolUnit), - t.set(13, re.symbolValue), - t.set(15, re.symbolEnum), - t.set(14, re.symbolConstant), - t.set(15, re.symbolEnum), - t.set(16, re.symbolEnumMember), - t.set(17, re.symbolKeyword), - t.set(27, re.symbolSnippet), - t.set(18, re.symbolText), - t.set(19, re.symbolColor), - t.set(20, re.symbolFile), - t.set(21, re.symbolReference), - t.set(22, re.symbolCustomColor), - t.set(23, re.symbolFolder), - t.set(24, re.symbolTypeParameter), - t.set(25, re.account), - t.set(26, re.issues) - function n(s) { - let o = t.get(s) - return ( - o || - (console.info('No codicon found for CompletionItemKind ' + s), (o = re.symbolProperty)), - o - ) - } - e.toIcon = n - let r = new Map() - r.set('method', 0), - r.set('function', 1), - r.set('constructor', 2), - r.set('field', 3), - r.set('variable', 4), - r.set('class', 5), - r.set('struct', 6), - r.set('interface', 7), - r.set('module', 8), - r.set('property', 9), - r.set('event', 10), - r.set('operator', 11), - r.set('unit', 12), - r.set('value', 13), - r.set('constant', 14), - r.set('enum', 15), - r.set('enum-member', 16), - r.set('enumMember', 16), - r.set('keyword', 17), - r.set('snippet', 27), - r.set('text', 18), - r.set('color', 19), - r.set('file', 20), - r.set('reference', 21), - r.set('customcolor', 22), - r.set('folder', 23), - r.set('type-parameter', 24), - r.set('typeParameter', 24), - r.set('account', 25), - r.set('issue', 26) - function i(s, o) { - let a = r.get(s) - return typeof a > 'u' && !o && (a = 9), a - } - e.fromString = i - })(yd || (yd = {})) - var xd - ;(function (e) { - ;(e[(e.Automatic = 0)] = 'Automatic'), (e[(e.Explicit = 1)] = 'Explicit') - })(xd || (xd = {})) - var _d - ;(function (e) { - ;(e[(e.Automatic = 0)] = 'Automatic'), (e[(e.PasteAs = 1)] = 'PasteAs') - })(_d || (_d = {})) - var Nd - ;(function (e) { - ;(e[(e.Invoke = 1)] = 'Invoke'), - (e[(e.TriggerCharacter = 2)] = 'TriggerCharacter'), - (e[(e.ContentChange = 3)] = 'ContentChange') - })(Nd || (Nd = {})) - var Td - ;(function (e) { - ;(e[(e.Text = 0)] = 'Text'), (e[(e.Read = 1)] = 'Read'), (e[(e.Write = 2)] = 'Write') - })(Td || (Td = {})) - var _6 = { - 17: ke('Array', 'array'), - 16: ke('Boolean', 'boolean'), - 4: ke('Class', 'class'), - 13: ke('Constant', 'constant'), - 8: ke('Constructor', 'constructor'), - 9: ke('Enum', 'enumeration'), - 21: ke('EnumMember', 'enumeration member'), - 23: ke('Event', 'event'), - 7: ke('Field', 'field'), - 0: ke('File', 'file'), - 11: ke('Function', 'function'), - 10: ke('Interface', 'interface'), - 19: ke('Key', 'key'), - 5: ke('Method', 'method'), - 1: ke('Module', 'module'), - 2: ke('Namespace', 'namespace'), - 20: ke('Null', 'null'), - 15: ke('Number', 'number'), - 18: ke('Object', 'object'), - 24: ke('Operator', 'operator'), - 3: ke('Package', 'package'), - 6: ke('Property', 'property'), - 14: ke('String', 'string'), - 22: ke('Struct', 'struct'), - 25: ke('TypeParameter', 'type parameter'), - 12: ke('Variable', 'variable') - } - var Sd - ;(function (e) { - let t = new Map() - t.set(0, re.symbolFile), - t.set(1, re.symbolModule), - t.set(2, re.symbolNamespace), - t.set(3, re.symbolPackage), - t.set(4, re.symbolClass), - t.set(5, re.symbolMethod), - t.set(6, re.symbolProperty), - t.set(7, re.symbolField), - t.set(8, re.symbolConstructor), - t.set(9, re.symbolEnum), - t.set(10, re.symbolInterface), - t.set(11, re.symbolFunction), - t.set(12, re.symbolVariable), - t.set(13, re.symbolConstant), - t.set(14, re.symbolString), - t.set(15, re.symbolNumber), - t.set(16, re.symbolBoolean), - t.set(17, re.symbolArray), - t.set(18, re.symbolObject), - t.set(19, re.symbolKey), - t.set(20, re.symbolNull), - t.set(21, re.symbolEnumMember), - t.set(22, re.symbolStruct), - t.set(23, re.symbolEvent), - t.set(24, re.symbolOperator), - t.set(25, re.symbolTypeParameter) - function n(r) { - let i = t.get(r) - return i || (console.info('No codicon found for SymbolKind ' + r), (i = re.symbolProperty)), i - } - e.toIcon = n - })(Sd || (Sd = {})) - var Ad = class e { - static { - this.Comment = new e('comment') - } - static { - this.Imports = new e('imports') - } - static { - this.Region = new e('region') - } - static fromValue(t) { - switch (t) { - case 'comment': - return e.Comment - case 'imports': - return e.Imports - case 'region': - return e.Region - } - return new e(t) - } - constructor(t) { - this.value = t - } - }, - Fd - ;(function (e) { - e[(e.AIGenerated = 1)] = 'AIGenerated' - })(Fd || (Fd = {})) - var wd - ;(function (e) { - ;(e[(e.Invoke = 0)] = 'Invoke'), (e[(e.Automatic = 1)] = 'Automatic') - })(wd || (wd = {})) - var Ld - ;(function (e) { - function t(n) { - return !n || typeof n != 'object' ? !1 : typeof n.id == 'string' && typeof n.title == 'string' - } - e.is = t - })(Ld || (Ld = {})) - var Cd - ;(function (e) { - ;(e[(e.Type = 1)] = 'Type'), (e[(e.Parameter = 2)] = 'Parameter') - })(Cd || (Cd = {})) - var N6 = new Fs(), - T6 = new Fs(), - Id - ;(function (e) { - ;(e[(e.Invoke = 0)] = 'Invoke'), (e[(e.Automatic = 1)] = 'Automatic') - })(Id || (Id = {})) - var Rd - ;(function (e) { - ;(e[(e.Unknown = 0)] = 'Unknown'), - (e[(e.Disabled = 1)] = 'Disabled'), - (e[(e.Enabled = 2)] = 'Enabled') - })(Rd || (Rd = {})) - var kd - ;(function (e) { - ;(e[(e.Invoke = 1)] = 'Invoke'), (e[(e.Auto = 2)] = 'Auto') - })(kd || (kd = {})) - var Od - ;(function (e) { - ;(e[(e.None = 0)] = 'None'), - (e[(e.KeepWhitespace = 1)] = 'KeepWhitespace'), - (e[(e.InsertAsSnippet = 4)] = 'InsertAsSnippet') - })(Od || (Od = {})) - var Md - ;(function (e) { - ;(e[(e.Method = 0)] = 'Method'), - (e[(e.Function = 1)] = 'Function'), - (e[(e.Constructor = 2)] = 'Constructor'), - (e[(e.Field = 3)] = 'Field'), - (e[(e.Variable = 4)] = 'Variable'), - (e[(e.Class = 5)] = 'Class'), - (e[(e.Struct = 6)] = 'Struct'), - (e[(e.Interface = 7)] = 'Interface'), - (e[(e.Module = 8)] = 'Module'), - (e[(e.Property = 9)] = 'Property'), - (e[(e.Event = 10)] = 'Event'), - (e[(e.Operator = 11)] = 'Operator'), - (e[(e.Unit = 12)] = 'Unit'), - (e[(e.Value = 13)] = 'Value'), - (e[(e.Constant = 14)] = 'Constant'), - (e[(e.Enum = 15)] = 'Enum'), - (e[(e.EnumMember = 16)] = 'EnumMember'), - (e[(e.Keyword = 17)] = 'Keyword'), - (e[(e.Text = 18)] = 'Text'), - (e[(e.Color = 19)] = 'Color'), - (e[(e.File = 20)] = 'File'), - (e[(e.Reference = 21)] = 'Reference'), - (e[(e.Customcolor = 22)] = 'Customcolor'), - (e[(e.Folder = 23)] = 'Folder'), - (e[(e.TypeParameter = 24)] = 'TypeParameter'), - (e[(e.User = 25)] = 'User'), - (e[(e.Issue = 26)] = 'Issue'), - (e[(e.Snippet = 27)] = 'Snippet') - })(Md || (Md = {})) - var Pd - ;(function (e) { - e[(e.Deprecated = 1)] = 'Deprecated' - })(Pd || (Pd = {})) - var Bd - ;(function (e) { - ;(e[(e.Invoke = 0)] = 'Invoke'), - (e[(e.TriggerCharacter = 1)] = 'TriggerCharacter'), - (e[(e.TriggerForIncompleteCompletions = 2)] = 'TriggerForIncompleteCompletions') - })(Bd || (Bd = {})) - var Vd - ;(function (e) { - ;(e[(e.EXACT = 0)] = 'EXACT'), (e[(e.ABOVE = 1)] = 'ABOVE'), (e[(e.BELOW = 2)] = 'BELOW') - })(Vd || (Vd = {})) - var Ud - ;(function (e) { - ;(e[(e.NotSet = 0)] = 'NotSet'), - (e[(e.ContentFlush = 1)] = 'ContentFlush'), - (e[(e.RecoverFromMarkers = 2)] = 'RecoverFromMarkers'), - (e[(e.Explicit = 3)] = 'Explicit'), - (e[(e.Paste = 4)] = 'Paste'), - (e[(e.Undo = 5)] = 'Undo'), - (e[(e.Redo = 6)] = 'Redo') - })(Ud || (Ud = {})) - var $d - ;(function (e) { - ;(e[(e.LF = 1)] = 'LF'), (e[(e.CRLF = 2)] = 'CRLF') - })($d || ($d = {})) - var jd - ;(function (e) { - ;(e[(e.Text = 0)] = 'Text'), (e[(e.Read = 1)] = 'Read'), (e[(e.Write = 2)] = 'Write') - })(jd || (jd = {})) - var qd - ;(function (e) { - ;(e[(e.None = 0)] = 'None'), - (e[(e.Keep = 1)] = 'Keep'), - (e[(e.Brackets = 2)] = 'Brackets'), - (e[(e.Advanced = 3)] = 'Advanced'), - (e[(e.Full = 4)] = 'Full') - })(qd || (qd = {})) - var Gd - ;(function (e) { - ;(e[(e.acceptSuggestionOnCommitCharacter = 0)] = 'acceptSuggestionOnCommitCharacter'), - (e[(e.acceptSuggestionOnEnter = 1)] = 'acceptSuggestionOnEnter'), - (e[(e.accessibilitySupport = 2)] = 'accessibilitySupport'), - (e[(e.accessibilityPageSize = 3)] = 'accessibilityPageSize'), - (e[(e.ariaLabel = 4)] = 'ariaLabel'), - (e[(e.ariaRequired = 5)] = 'ariaRequired'), - (e[(e.autoClosingBrackets = 6)] = 'autoClosingBrackets'), - (e[(e.autoClosingComments = 7)] = 'autoClosingComments'), - (e[(e.screenReaderAnnounceInlineSuggestion = 8)] = 'screenReaderAnnounceInlineSuggestion'), - (e[(e.autoClosingDelete = 9)] = 'autoClosingDelete'), - (e[(e.autoClosingOvertype = 10)] = 'autoClosingOvertype'), - (e[(e.autoClosingQuotes = 11)] = 'autoClosingQuotes'), - (e[(e.autoIndent = 12)] = 'autoIndent'), - (e[(e.automaticLayout = 13)] = 'automaticLayout'), - (e[(e.autoSurround = 14)] = 'autoSurround'), - (e[(e.bracketPairColorization = 15)] = 'bracketPairColorization'), - (e[(e.guides = 16)] = 'guides'), - (e[(e.codeLens = 17)] = 'codeLens'), - (e[(e.codeLensFontFamily = 18)] = 'codeLensFontFamily'), - (e[(e.codeLensFontSize = 19)] = 'codeLensFontSize'), - (e[(e.colorDecorators = 20)] = 'colorDecorators'), - (e[(e.colorDecoratorsLimit = 21)] = 'colorDecoratorsLimit'), - (e[(e.columnSelection = 22)] = 'columnSelection'), - (e[(e.comments = 23)] = 'comments'), - (e[(e.contextmenu = 24)] = 'contextmenu'), - (e[(e.copyWithSyntaxHighlighting = 25)] = 'copyWithSyntaxHighlighting'), - (e[(e.cursorBlinking = 26)] = 'cursorBlinking'), - (e[(e.cursorSmoothCaretAnimation = 27)] = 'cursorSmoothCaretAnimation'), - (e[(e.cursorStyle = 28)] = 'cursorStyle'), - (e[(e.cursorSurroundingLines = 29)] = 'cursorSurroundingLines'), - (e[(e.cursorSurroundingLinesStyle = 30)] = 'cursorSurroundingLinesStyle'), - (e[(e.cursorWidth = 31)] = 'cursorWidth'), - (e[(e.disableLayerHinting = 32)] = 'disableLayerHinting'), - (e[(e.disableMonospaceOptimizations = 33)] = 'disableMonospaceOptimizations'), - (e[(e.domReadOnly = 34)] = 'domReadOnly'), - (e[(e.dragAndDrop = 35)] = 'dragAndDrop'), - (e[(e.dropIntoEditor = 36)] = 'dropIntoEditor'), - (e[(e.emptySelectionClipboard = 37)] = 'emptySelectionClipboard'), - (e[(e.experimentalWhitespaceRendering = 38)] = 'experimentalWhitespaceRendering'), - (e[(e.extraEditorClassName = 39)] = 'extraEditorClassName'), - (e[(e.fastScrollSensitivity = 40)] = 'fastScrollSensitivity'), - (e[(e.find = 41)] = 'find'), - (e[(e.fixedOverflowWidgets = 42)] = 'fixedOverflowWidgets'), - (e[(e.folding = 43)] = 'folding'), - (e[(e.foldingStrategy = 44)] = 'foldingStrategy'), - (e[(e.foldingHighlight = 45)] = 'foldingHighlight'), - (e[(e.foldingImportsByDefault = 46)] = 'foldingImportsByDefault'), - (e[(e.foldingMaximumRegions = 47)] = 'foldingMaximumRegions'), - (e[(e.unfoldOnClickAfterEndOfLine = 48)] = 'unfoldOnClickAfterEndOfLine'), - (e[(e.fontFamily = 49)] = 'fontFamily'), - (e[(e.fontInfo = 50)] = 'fontInfo'), - (e[(e.fontLigatures = 51)] = 'fontLigatures'), - (e[(e.fontSize = 52)] = 'fontSize'), - (e[(e.fontWeight = 53)] = 'fontWeight'), - (e[(e.fontVariations = 54)] = 'fontVariations'), - (e[(e.formatOnPaste = 55)] = 'formatOnPaste'), - (e[(e.formatOnType = 56)] = 'formatOnType'), - (e[(e.glyphMargin = 57)] = 'glyphMargin'), - (e[(e.gotoLocation = 58)] = 'gotoLocation'), - (e[(e.hideCursorInOverviewRuler = 59)] = 'hideCursorInOverviewRuler'), - (e[(e.hover = 60)] = 'hover'), - (e[(e.inDiffEditor = 61)] = 'inDiffEditor'), - (e[(e.inlineSuggest = 62)] = 'inlineSuggest'), - (e[(e.inlineEdit = 63)] = 'inlineEdit'), - (e[(e.letterSpacing = 64)] = 'letterSpacing'), - (e[(e.lightbulb = 65)] = 'lightbulb'), - (e[(e.lineDecorationsWidth = 66)] = 'lineDecorationsWidth'), - (e[(e.lineHeight = 67)] = 'lineHeight'), - (e[(e.lineNumbers = 68)] = 'lineNumbers'), - (e[(e.lineNumbersMinChars = 69)] = 'lineNumbersMinChars'), - (e[(e.linkedEditing = 70)] = 'linkedEditing'), - (e[(e.links = 71)] = 'links'), - (e[(e.matchBrackets = 72)] = 'matchBrackets'), - (e[(e.minimap = 73)] = 'minimap'), - (e[(e.mouseStyle = 74)] = 'mouseStyle'), - (e[(e.mouseWheelScrollSensitivity = 75)] = 'mouseWheelScrollSensitivity'), - (e[(e.mouseWheelZoom = 76)] = 'mouseWheelZoom'), - (e[(e.multiCursorMergeOverlapping = 77)] = 'multiCursorMergeOverlapping'), - (e[(e.multiCursorModifier = 78)] = 'multiCursorModifier'), - (e[(e.multiCursorPaste = 79)] = 'multiCursorPaste'), - (e[(e.multiCursorLimit = 80)] = 'multiCursorLimit'), - (e[(e.occurrencesHighlight = 81)] = 'occurrencesHighlight'), - (e[(e.overviewRulerBorder = 82)] = 'overviewRulerBorder'), - (e[(e.overviewRulerLanes = 83)] = 'overviewRulerLanes'), - (e[(e.padding = 84)] = 'padding'), - (e[(e.pasteAs = 85)] = 'pasteAs'), - (e[(e.parameterHints = 86)] = 'parameterHints'), - (e[(e.peekWidgetDefaultFocus = 87)] = 'peekWidgetDefaultFocus'), - (e[(e.placeholder = 88)] = 'placeholder'), - (e[(e.definitionLinkOpensInPeek = 89)] = 'definitionLinkOpensInPeek'), - (e[(e.quickSuggestions = 90)] = 'quickSuggestions'), - (e[(e.quickSuggestionsDelay = 91)] = 'quickSuggestionsDelay'), - (e[(e.readOnly = 92)] = 'readOnly'), - (e[(e.readOnlyMessage = 93)] = 'readOnlyMessage'), - (e[(e.renameOnType = 94)] = 'renameOnType'), - (e[(e.renderControlCharacters = 95)] = 'renderControlCharacters'), - (e[(e.renderFinalNewline = 96)] = 'renderFinalNewline'), - (e[(e.renderLineHighlight = 97)] = 'renderLineHighlight'), - (e[(e.renderLineHighlightOnlyWhenFocus = 98)] = 'renderLineHighlightOnlyWhenFocus'), - (e[(e.renderValidationDecorations = 99)] = 'renderValidationDecorations'), - (e[(e.renderWhitespace = 100)] = 'renderWhitespace'), - (e[(e.revealHorizontalRightPadding = 101)] = 'revealHorizontalRightPadding'), - (e[(e.roundedSelection = 102)] = 'roundedSelection'), - (e[(e.rulers = 103)] = 'rulers'), - (e[(e.scrollbar = 104)] = 'scrollbar'), - (e[(e.scrollBeyondLastColumn = 105)] = 'scrollBeyondLastColumn'), - (e[(e.scrollBeyondLastLine = 106)] = 'scrollBeyondLastLine'), - (e[(e.scrollPredominantAxis = 107)] = 'scrollPredominantAxis'), - (e[(e.selectionClipboard = 108)] = 'selectionClipboard'), - (e[(e.selectionHighlight = 109)] = 'selectionHighlight'), - (e[(e.selectOnLineNumbers = 110)] = 'selectOnLineNumbers'), - (e[(e.showFoldingControls = 111)] = 'showFoldingControls'), - (e[(e.showUnused = 112)] = 'showUnused'), - (e[(e.snippetSuggestions = 113)] = 'snippetSuggestions'), - (e[(e.smartSelect = 114)] = 'smartSelect'), - (e[(e.smoothScrolling = 115)] = 'smoothScrolling'), - (e[(e.stickyScroll = 116)] = 'stickyScroll'), - (e[(e.stickyTabStops = 117)] = 'stickyTabStops'), - (e[(e.stopRenderingLineAfter = 118)] = 'stopRenderingLineAfter'), - (e[(e.suggest = 119)] = 'suggest'), - (e[(e.suggestFontSize = 120)] = 'suggestFontSize'), - (e[(e.suggestLineHeight = 121)] = 'suggestLineHeight'), - (e[(e.suggestOnTriggerCharacters = 122)] = 'suggestOnTriggerCharacters'), - (e[(e.suggestSelection = 123)] = 'suggestSelection'), - (e[(e.tabCompletion = 124)] = 'tabCompletion'), - (e[(e.tabIndex = 125)] = 'tabIndex'), - (e[(e.unicodeHighlighting = 126)] = 'unicodeHighlighting'), - (e[(e.unusualLineTerminators = 127)] = 'unusualLineTerminators'), - (e[(e.useShadowDOM = 128)] = 'useShadowDOM'), - (e[(e.useTabStops = 129)] = 'useTabStops'), - (e[(e.wordBreak = 130)] = 'wordBreak'), - (e[(e.wordSegmenterLocales = 131)] = 'wordSegmenterLocales'), - (e[(e.wordSeparators = 132)] = 'wordSeparators'), - (e[(e.wordWrap = 133)] = 'wordWrap'), - (e[(e.wordWrapBreakAfterCharacters = 134)] = 'wordWrapBreakAfterCharacters'), - (e[(e.wordWrapBreakBeforeCharacters = 135)] = 'wordWrapBreakBeforeCharacters'), - (e[(e.wordWrapColumn = 136)] = 'wordWrapColumn'), - (e[(e.wordWrapOverride1 = 137)] = 'wordWrapOverride1'), - (e[(e.wordWrapOverride2 = 138)] = 'wordWrapOverride2'), - (e[(e.wrappingIndent = 139)] = 'wrappingIndent'), - (e[(e.wrappingStrategy = 140)] = 'wrappingStrategy'), - (e[(e.showDeprecated = 141)] = 'showDeprecated'), - (e[(e.inlayHints = 142)] = 'inlayHints'), - (e[(e.editorClassName = 143)] = 'editorClassName'), - (e[(e.pixelRatio = 144)] = 'pixelRatio'), - (e[(e.tabFocusMode = 145)] = 'tabFocusMode'), - (e[(e.layoutInfo = 146)] = 'layoutInfo'), - (e[(e.wrappingInfo = 147)] = 'wrappingInfo'), - (e[(e.defaultColorDecorators = 148)] = 'defaultColorDecorators'), - (e[(e.colorDecoratorsActivatedOn = 149)] = 'colorDecoratorsActivatedOn'), - (e[(e.inlineCompletionsAccessibilityVerbose = 150)] = 'inlineCompletionsAccessibilityVerbose') - })(Gd || (Gd = {})) - var Hd - ;(function (e) { - ;(e[(e.TextDefined = 0)] = 'TextDefined'), (e[(e.LF = 1)] = 'LF'), (e[(e.CRLF = 2)] = 'CRLF') - })(Hd || (Hd = {})) - var Wd - ;(function (e) { - ;(e[(e.LF = 0)] = 'LF'), (e[(e.CRLF = 1)] = 'CRLF') - })(Wd || (Wd = {})) - var Qd - ;(function (e) { - ;(e[(e.Left = 1)] = 'Left'), (e[(e.Center = 2)] = 'Center'), (e[(e.Right = 3)] = 'Right') - })(Qd || (Qd = {})) - var zd - ;(function (e) { - ;(e[(e.Increase = 0)] = 'Increase'), (e[(e.Decrease = 1)] = 'Decrease') - })(zd || (zd = {})) - var Yd - ;(function (e) { - ;(e[(e.None = 0)] = 'None'), - (e[(e.Indent = 1)] = 'Indent'), - (e[(e.IndentOutdent = 2)] = 'IndentOutdent'), - (e[(e.Outdent = 3)] = 'Outdent') - })(Yd || (Yd = {})) - var Jd - ;(function (e) { - ;(e[(e.Both = 0)] = 'Both'), - (e[(e.Right = 1)] = 'Right'), - (e[(e.Left = 2)] = 'Left'), - (e[(e.None = 3)] = 'None') - })(Jd || (Jd = {})) - var Xd - ;(function (e) { - ;(e[(e.Type = 1)] = 'Type'), (e[(e.Parameter = 2)] = 'Parameter') - })(Xd || (Xd = {})) - var Kd - ;(function (e) { - ;(e[(e.Automatic = 0)] = 'Automatic'), (e[(e.Explicit = 1)] = 'Explicit') - })(Kd || (Kd = {})) - var Zd - ;(function (e) { - ;(e[(e.Invoke = 0)] = 'Invoke'), (e[(e.Automatic = 1)] = 'Automatic') - })(Zd || (Zd = {})) - var Ko - ;(function (e) { - ;(e[(e.DependsOnKbLayout = -1)] = 'DependsOnKbLayout'), - (e[(e.Unknown = 0)] = 'Unknown'), - (e[(e.Backspace = 1)] = 'Backspace'), - (e[(e.Tab = 2)] = 'Tab'), - (e[(e.Enter = 3)] = 'Enter'), - (e[(e.Shift = 4)] = 'Shift'), - (e[(e.Ctrl = 5)] = 'Ctrl'), - (e[(e.Alt = 6)] = 'Alt'), - (e[(e.PauseBreak = 7)] = 'PauseBreak'), - (e[(e.CapsLock = 8)] = 'CapsLock'), - (e[(e.Escape = 9)] = 'Escape'), - (e[(e.Space = 10)] = 'Space'), - (e[(e.PageUp = 11)] = 'PageUp'), - (e[(e.PageDown = 12)] = 'PageDown'), - (e[(e.End = 13)] = 'End'), - (e[(e.Home = 14)] = 'Home'), - (e[(e.LeftArrow = 15)] = 'LeftArrow'), - (e[(e.UpArrow = 16)] = 'UpArrow'), - (e[(e.RightArrow = 17)] = 'RightArrow'), - (e[(e.DownArrow = 18)] = 'DownArrow'), - (e[(e.Insert = 19)] = 'Insert'), - (e[(e.Delete = 20)] = 'Delete'), - (e[(e.Digit0 = 21)] = 'Digit0'), - (e[(e.Digit1 = 22)] = 'Digit1'), - (e[(e.Digit2 = 23)] = 'Digit2'), - (e[(e.Digit3 = 24)] = 'Digit3'), - (e[(e.Digit4 = 25)] = 'Digit4'), - (e[(e.Digit5 = 26)] = 'Digit5'), - (e[(e.Digit6 = 27)] = 'Digit6'), - (e[(e.Digit7 = 28)] = 'Digit7'), - (e[(e.Digit8 = 29)] = 'Digit8'), - (e[(e.Digit9 = 30)] = 'Digit9'), - (e[(e.KeyA = 31)] = 'KeyA'), - (e[(e.KeyB = 32)] = 'KeyB'), - (e[(e.KeyC = 33)] = 'KeyC'), - (e[(e.KeyD = 34)] = 'KeyD'), - (e[(e.KeyE = 35)] = 'KeyE'), - (e[(e.KeyF = 36)] = 'KeyF'), - (e[(e.KeyG = 37)] = 'KeyG'), - (e[(e.KeyH = 38)] = 'KeyH'), - (e[(e.KeyI = 39)] = 'KeyI'), - (e[(e.KeyJ = 40)] = 'KeyJ'), - (e[(e.KeyK = 41)] = 'KeyK'), - (e[(e.KeyL = 42)] = 'KeyL'), - (e[(e.KeyM = 43)] = 'KeyM'), - (e[(e.KeyN = 44)] = 'KeyN'), - (e[(e.KeyO = 45)] = 'KeyO'), - (e[(e.KeyP = 46)] = 'KeyP'), - (e[(e.KeyQ = 47)] = 'KeyQ'), - (e[(e.KeyR = 48)] = 'KeyR'), - (e[(e.KeyS = 49)] = 'KeyS'), - (e[(e.KeyT = 50)] = 'KeyT'), - (e[(e.KeyU = 51)] = 'KeyU'), - (e[(e.KeyV = 52)] = 'KeyV'), - (e[(e.KeyW = 53)] = 'KeyW'), - (e[(e.KeyX = 54)] = 'KeyX'), - (e[(e.KeyY = 55)] = 'KeyY'), - (e[(e.KeyZ = 56)] = 'KeyZ'), - (e[(e.Meta = 57)] = 'Meta'), - (e[(e.ContextMenu = 58)] = 'ContextMenu'), - (e[(e.F1 = 59)] = 'F1'), - (e[(e.F2 = 60)] = 'F2'), - (e[(e.F3 = 61)] = 'F3'), - (e[(e.F4 = 62)] = 'F4'), - (e[(e.F5 = 63)] = 'F5'), - (e[(e.F6 = 64)] = 'F6'), - (e[(e.F7 = 65)] = 'F7'), - (e[(e.F8 = 66)] = 'F8'), - (e[(e.F9 = 67)] = 'F9'), - (e[(e.F10 = 68)] = 'F10'), - (e[(e.F11 = 69)] = 'F11'), - (e[(e.F12 = 70)] = 'F12'), - (e[(e.F13 = 71)] = 'F13'), - (e[(e.F14 = 72)] = 'F14'), - (e[(e.F15 = 73)] = 'F15'), - (e[(e.F16 = 74)] = 'F16'), - (e[(e.F17 = 75)] = 'F17'), - (e[(e.F18 = 76)] = 'F18'), - (e[(e.F19 = 77)] = 'F19'), - (e[(e.F20 = 78)] = 'F20'), - (e[(e.F21 = 79)] = 'F21'), - (e[(e.F22 = 80)] = 'F22'), - (e[(e.F23 = 81)] = 'F23'), - (e[(e.F24 = 82)] = 'F24'), - (e[(e.NumLock = 83)] = 'NumLock'), - (e[(e.ScrollLock = 84)] = 'ScrollLock'), - (e[(e.Semicolon = 85)] = 'Semicolon'), - (e[(e.Equal = 86)] = 'Equal'), - (e[(e.Comma = 87)] = 'Comma'), - (e[(e.Minus = 88)] = 'Minus'), - (e[(e.Period = 89)] = 'Period'), - (e[(e.Slash = 90)] = 'Slash'), - (e[(e.Backquote = 91)] = 'Backquote'), - (e[(e.BracketLeft = 92)] = 'BracketLeft'), - (e[(e.Backslash = 93)] = 'Backslash'), - (e[(e.BracketRight = 94)] = 'BracketRight'), - (e[(e.Quote = 95)] = 'Quote'), - (e[(e.OEM_8 = 96)] = 'OEM_8'), - (e[(e.IntlBackslash = 97)] = 'IntlBackslash'), - (e[(e.Numpad0 = 98)] = 'Numpad0'), - (e[(e.Numpad1 = 99)] = 'Numpad1'), - (e[(e.Numpad2 = 100)] = 'Numpad2'), - (e[(e.Numpad3 = 101)] = 'Numpad3'), - (e[(e.Numpad4 = 102)] = 'Numpad4'), - (e[(e.Numpad5 = 103)] = 'Numpad5'), - (e[(e.Numpad6 = 104)] = 'Numpad6'), - (e[(e.Numpad7 = 105)] = 'Numpad7'), - (e[(e.Numpad8 = 106)] = 'Numpad8'), - (e[(e.Numpad9 = 107)] = 'Numpad9'), - (e[(e.NumpadMultiply = 108)] = 'NumpadMultiply'), - (e[(e.NumpadAdd = 109)] = 'NumpadAdd'), - (e[(e.NUMPAD_SEPARATOR = 110)] = 'NUMPAD_SEPARATOR'), - (e[(e.NumpadSubtract = 111)] = 'NumpadSubtract'), - (e[(e.NumpadDecimal = 112)] = 'NumpadDecimal'), - (e[(e.NumpadDivide = 113)] = 'NumpadDivide'), - (e[(e.KEY_IN_COMPOSITION = 114)] = 'KEY_IN_COMPOSITION'), - (e[(e.ABNT_C1 = 115)] = 'ABNT_C1'), - (e[(e.ABNT_C2 = 116)] = 'ABNT_C2'), - (e[(e.AudioVolumeMute = 117)] = 'AudioVolumeMute'), - (e[(e.AudioVolumeUp = 118)] = 'AudioVolumeUp'), - (e[(e.AudioVolumeDown = 119)] = 'AudioVolumeDown'), - (e[(e.BrowserSearch = 120)] = 'BrowserSearch'), - (e[(e.BrowserHome = 121)] = 'BrowserHome'), - (e[(e.BrowserBack = 122)] = 'BrowserBack'), - (e[(e.BrowserForward = 123)] = 'BrowserForward'), - (e[(e.MediaTrackNext = 124)] = 'MediaTrackNext'), - (e[(e.MediaTrackPrevious = 125)] = 'MediaTrackPrevious'), - (e[(e.MediaStop = 126)] = 'MediaStop'), - (e[(e.MediaPlayPause = 127)] = 'MediaPlayPause'), - (e[(e.LaunchMediaPlayer = 128)] = 'LaunchMediaPlayer'), - (e[(e.LaunchMail = 129)] = 'LaunchMail'), - (e[(e.LaunchApp2 = 130)] = 'LaunchApp2'), - (e[(e.Clear = 131)] = 'Clear'), - (e[(e.MAX_VALUE = 132)] = 'MAX_VALUE') - })(Ko || (Ko = {})) - var Zo - ;(function (e) { - ;(e[(e.Hint = 1)] = 'Hint'), - (e[(e.Info = 2)] = 'Info'), - (e[(e.Warning = 4)] = 'Warning'), - (e[(e.Error = 8)] = 'Error') - })(Zo || (Zo = {})) - var ea - ;(function (e) { - ;(e[(e.Unnecessary = 1)] = 'Unnecessary'), (e[(e.Deprecated = 2)] = 'Deprecated') - })(ea || (ea = {})) - var ep - ;(function (e) { - ;(e[(e.Inline = 1)] = 'Inline'), (e[(e.Gutter = 2)] = 'Gutter') - })(ep || (ep = {})) - var tp - ;(function (e) { - ;(e[(e.Normal = 1)] = 'Normal'), (e[(e.Underlined = 2)] = 'Underlined') - })(tp || (tp = {})) - var np - ;(function (e) { - ;(e[(e.UNKNOWN = 0)] = 'UNKNOWN'), - (e[(e.TEXTAREA = 1)] = 'TEXTAREA'), - (e[(e.GUTTER_GLYPH_MARGIN = 2)] = 'GUTTER_GLYPH_MARGIN'), - (e[(e.GUTTER_LINE_NUMBERS = 3)] = 'GUTTER_LINE_NUMBERS'), - (e[(e.GUTTER_LINE_DECORATIONS = 4)] = 'GUTTER_LINE_DECORATIONS'), - (e[(e.GUTTER_VIEW_ZONE = 5)] = 'GUTTER_VIEW_ZONE'), - (e[(e.CONTENT_TEXT = 6)] = 'CONTENT_TEXT'), - (e[(e.CONTENT_EMPTY = 7)] = 'CONTENT_EMPTY'), - (e[(e.CONTENT_VIEW_ZONE = 8)] = 'CONTENT_VIEW_ZONE'), - (e[(e.CONTENT_WIDGET = 9)] = 'CONTENT_WIDGET'), - (e[(e.OVERVIEW_RULER = 10)] = 'OVERVIEW_RULER'), - (e[(e.SCROLLBAR = 11)] = 'SCROLLBAR'), - (e[(e.OVERLAY_WIDGET = 12)] = 'OVERLAY_WIDGET'), - (e[(e.OUTSIDE_EDITOR = 13)] = 'OUTSIDE_EDITOR') - })(np || (np = {})) - var rp - ;(function (e) { - e[(e.AIGenerated = 1)] = 'AIGenerated' - })(rp || (rp = {})) - var ip - ;(function (e) { - ;(e[(e.Invoke = 0)] = 'Invoke'), (e[(e.Automatic = 1)] = 'Automatic') - })(ip || (ip = {})) - var sp - ;(function (e) { - ;(e[(e.TOP_RIGHT_CORNER = 0)] = 'TOP_RIGHT_CORNER'), - (e[(e.BOTTOM_RIGHT_CORNER = 1)] = 'BOTTOM_RIGHT_CORNER'), - (e[(e.TOP_CENTER = 2)] = 'TOP_CENTER') - })(sp || (sp = {})) - var op - ;(function (e) { - ;(e[(e.Left = 1)] = 'Left'), - (e[(e.Center = 2)] = 'Center'), - (e[(e.Right = 4)] = 'Right'), - (e[(e.Full = 7)] = 'Full') - })(op || (op = {})) - var ap - ;(function (e) { - ;(e[(e.Word = 0)] = 'Word'), (e[(e.Line = 1)] = 'Line'), (e[(e.Suggest = 2)] = 'Suggest') - })(ap || (ap = {})) - var up - ;(function (e) { - ;(e[(e.Left = 0)] = 'Left'), - (e[(e.Right = 1)] = 'Right'), - (e[(e.None = 2)] = 'None'), - (e[(e.LeftOfInjectedText = 3)] = 'LeftOfInjectedText'), - (e[(e.RightOfInjectedText = 4)] = 'RightOfInjectedText') - })(up || (up = {})) - var lp - ;(function (e) { - ;(e[(e.Off = 0)] = 'Off'), - (e[(e.On = 1)] = 'On'), - (e[(e.Relative = 2)] = 'Relative'), - (e[(e.Interval = 3)] = 'Interval'), - (e[(e.Custom = 4)] = 'Custom') - })(lp || (lp = {})) - var cp - ;(function (e) { - ;(e[(e.None = 0)] = 'None'), (e[(e.Text = 1)] = 'Text'), (e[(e.Blocks = 2)] = 'Blocks') - })(cp || (cp = {})) - var fp - ;(function (e) { - ;(e[(e.Smooth = 0)] = 'Smooth'), (e[(e.Immediate = 1)] = 'Immediate') - })(fp || (fp = {})) - var dp - ;(function (e) { - ;(e[(e.Auto = 1)] = 'Auto'), (e[(e.Hidden = 2)] = 'Hidden'), (e[(e.Visible = 3)] = 'Visible') - })(dp || (dp = {})) - var ta - ;(function (e) { - ;(e[(e.LTR = 0)] = 'LTR'), (e[(e.RTL = 1)] = 'RTL') - })(ta || (ta = {})) - var pp - ;(function (e) { - ;(e.Off = 'off'), (e.OnCode = 'onCode'), (e.On = 'on') - })(pp || (pp = {})) - var hp - ;(function (e) { - ;(e[(e.Invoke = 1)] = 'Invoke'), - (e[(e.TriggerCharacter = 2)] = 'TriggerCharacter'), - (e[(e.ContentChange = 3)] = 'ContentChange') - })(hp || (hp = {})) - var mp - ;(function (e) { - ;(e[(e.File = 0)] = 'File'), - (e[(e.Module = 1)] = 'Module'), - (e[(e.Namespace = 2)] = 'Namespace'), - (e[(e.Package = 3)] = 'Package'), - (e[(e.Class = 4)] = 'Class'), - (e[(e.Method = 5)] = 'Method'), - (e[(e.Property = 6)] = 'Property'), - (e[(e.Field = 7)] = 'Field'), - (e[(e.Constructor = 8)] = 'Constructor'), - (e[(e.Enum = 9)] = 'Enum'), - (e[(e.Interface = 10)] = 'Interface'), - (e[(e.Function = 11)] = 'Function'), - (e[(e.Variable = 12)] = 'Variable'), - (e[(e.Constant = 13)] = 'Constant'), - (e[(e.String = 14)] = 'String'), - (e[(e.Number = 15)] = 'Number'), - (e[(e.Boolean = 16)] = 'Boolean'), - (e[(e.Array = 17)] = 'Array'), - (e[(e.Object = 18)] = 'Object'), - (e[(e.Key = 19)] = 'Key'), - (e[(e.Null = 20)] = 'Null'), - (e[(e.EnumMember = 21)] = 'EnumMember'), - (e[(e.Struct = 22)] = 'Struct'), - (e[(e.Event = 23)] = 'Event'), - (e[(e.Operator = 24)] = 'Operator'), - (e[(e.TypeParameter = 25)] = 'TypeParameter') - })(mp || (mp = {})) - var gp - ;(function (e) { - e[(e.Deprecated = 1)] = 'Deprecated' - })(gp || (gp = {})) - var Dp - ;(function (e) { - ;(e[(e.Hidden = 0)] = 'Hidden'), - (e[(e.Blink = 1)] = 'Blink'), - (e[(e.Smooth = 2)] = 'Smooth'), - (e[(e.Phase = 3)] = 'Phase'), - (e[(e.Expand = 4)] = 'Expand'), - (e[(e.Solid = 5)] = 'Solid') - })(Dp || (Dp = {})) - var vp - ;(function (e) { - ;(e[(e.Line = 1)] = 'Line'), - (e[(e.Block = 2)] = 'Block'), - (e[(e.Underline = 3)] = 'Underline'), - (e[(e.LineThin = 4)] = 'LineThin'), - (e[(e.BlockOutline = 5)] = 'BlockOutline'), - (e[(e.UnderlineThin = 6)] = 'UnderlineThin') - })(vp || (vp = {})) - var bp - ;(function (e) { - ;(e[(e.AlwaysGrowsWhenTypingAtEdges = 0)] = 'AlwaysGrowsWhenTypingAtEdges'), - (e[(e.NeverGrowsWhenTypingAtEdges = 1)] = 'NeverGrowsWhenTypingAtEdges'), - (e[(e.GrowsOnlyWhenTypingBefore = 2)] = 'GrowsOnlyWhenTypingBefore'), - (e[(e.GrowsOnlyWhenTypingAfter = 3)] = 'GrowsOnlyWhenTypingAfter') - })(bp || (bp = {})) - var Ep - ;(function (e) { - ;(e[(e.None = 0)] = 'None'), - (e[(e.Same = 1)] = 'Same'), - (e[(e.Indent = 2)] = 'Indent'), - (e[(e.DeepIndent = 3)] = 'DeepIndent') - })(Ep || (Ep = {})) - var Pl = class { - static { - this.CtrlCmd = 2048 - } - static { - this.Shift = 1024 - } - static { - this.Alt = 512 - } - static { - this.WinCtrl = 256 - } - static chord(t, n) { - return gd(t, n) - } - } - function yp() { - return { - editor: void 0, - languages: void 0, - CancellationTokenSource: Ss, - Emitter: lt, - KeyCode: Ko, - KeyMod: Pl, - Position: Se, - Range: oe, - Selection: Jo, - SelectionDirection: ta, - MarkerSeverity: Zo, - MarkerTag: ea, - Uri: _t, - Token: Xo - } - } - var ws = class e { - static { - this.CHANNEL_NAME = 'editorWorkerHost' - } - static getChannel(t) { - return t.getChannel(e.CHANNEL_NAME) - } - static setChannel(t, n) { - t.setChannel(e.CHANNEL_NAME, n) - } - } - var xp, - _p, - Bl = class { - constructor(t, n) { - ;(this.uri = t), (this.value = n) - } - } - function m5(e) { - return Array.isArray(e) - } - var Np = class e { - static { - this.defaultToKey = (t) => t.toString() - } - constructor(t, n) { - if (((this[xp] = 'ResourceMap'), t instanceof e)) - (this.map = new Map(t.map)), (this.toKey = n ?? e.defaultToKey) - else if (m5(t)) { - ;(this.map = new Map()), (this.toKey = n ?? e.defaultToKey) - for (let [r, i] of t) this.set(r, i) - } else (this.map = new Map()), (this.toKey = t ?? e.defaultToKey) - } - set(t, n) { - return this.map.set(this.toKey(t), new Bl(t, n)), this - } - get(t) { - return this.map.get(this.toKey(t))?.value - } - has(t) { - return this.map.has(this.toKey(t)) - } - get size() { - return this.map.size - } - clear() { - this.map.clear() - } - delete(t) { - return this.map.delete(this.toKey(t)) - } - forEach(t, n) { - typeof n < 'u' && (t = t.bind(n)) - for (let [r, i] of this.map) t(i.value, i.uri, this) - } - *values() { - for (let t of this.map.values()) yield t.value - } - *keys() { - for (let t of this.map.values()) yield t.uri - } - *entries() { - for (let t of this.map.values()) yield [t.uri, t.value] - } - *[((xp = Symbol.toStringTag), Symbol.iterator)]() { - for (let [, t] of this.map) yield [t.uri, t.value] - } - }, - Vl = class { - constructor() { - ;(this[_p] = 'LinkedMap'), - (this._map = new Map()), - (this._head = void 0), - (this._tail = void 0), - (this._size = 0), - (this._state = 0) - } - clear() { - this._map.clear(), - (this._head = void 0), - (this._tail = void 0), - (this._size = 0), - this._state++ - } - isEmpty() { - return !this._head && !this._tail - } - get size() { - return this._size - } - get first() { - return this._head?.value - } - get last() { - return this._tail?.value - } - has(t) { - return this._map.has(t) - } - get(t, n = 0) { - let r = this._map.get(t) - if (r) return n !== 0 && this.touch(r, n), r.value - } - set(t, n, r = 0) { - let i = this._map.get(t) - if (i) (i.value = n), r !== 0 && this.touch(i, r) - else { - switch (((i = { key: t, value: n, next: void 0, previous: void 0 }), r)) { - case 0: - this.addItemLast(i) - break - case 1: - this.addItemFirst(i) - break - case 2: - this.addItemLast(i) - break - default: - this.addItemLast(i) - break - } - this._map.set(t, i), this._size++ - } - return this - } - delete(t) { - return !!this.remove(t) - } - remove(t) { - let n = this._map.get(t) - if (n) return this._map.delete(t), this.removeItem(n), this._size--, n.value - } - shift() { - if (!this._head && !this._tail) return - if (!this._head || !this._tail) throw new Error('Invalid list') - let t = this._head - return this._map.delete(t.key), this.removeItem(t), this._size--, t.value - } - forEach(t, n) { - let r = this._state, - i = this._head - for (; i; ) { - if ((n ? t.bind(n)(i.value, i.key, this) : t(i.value, i.key, this), this._state !== r)) - throw new Error('LinkedMap got modified during iteration.') - i = i.next - } - } - keys() { - let t = this, - n = this._state, - r = this._head, - i = { - [Symbol.iterator]() { - return i - }, - next() { - if (t._state !== n) throw new Error('LinkedMap got modified during iteration.') - if (r) { - let s = { value: r.key, done: !1 } - return (r = r.next), s - } else return { value: void 0, done: !0 } - } - } - return i - } - values() { - let t = this, - n = this._state, - r = this._head, - i = { - [Symbol.iterator]() { - return i - }, - next() { - if (t._state !== n) throw new Error('LinkedMap got modified during iteration.') - if (r) { - let s = { value: r.value, done: !1 } - return (r = r.next), s - } else return { value: void 0, done: !0 } - } - } - return i - } - entries() { - let t = this, - n = this._state, - r = this._head, - i = { - [Symbol.iterator]() { - return i - }, - next() { - if (t._state !== n) throw new Error('LinkedMap got modified during iteration.') - if (r) { - let s = { value: [r.key, r.value], done: !1 } - return (r = r.next), s - } else return { value: void 0, done: !0 } - } - } - return i - } - [((_p = Symbol.toStringTag), Symbol.iterator)]() { - return this.entries() - } - trimOld(t) { - if (t >= this.size) return - if (t === 0) { - this.clear() - return - } - let n = this._head, - r = this.size - for (; n && r > t; ) this._map.delete(n.key), (n = n.next), r-- - ;(this._head = n), (this._size = r), n && (n.previous = void 0), this._state++ - } - trimNew(t) { - if (t >= this.size) return - if (t === 0) { - this.clear() - return - } - let n = this._tail, - r = this.size - for (; n && r > t; ) this._map.delete(n.key), (n = n.previous), r-- - ;(this._tail = n), (this._size = r), n && (n.next = void 0), this._state++ - } - addItemFirst(t) { - if (!this._head && !this._tail) this._tail = t - else if (this._head) (t.next = this._head), (this._head.previous = t) - else throw new Error('Invalid list') - ;(this._head = t), this._state++ - } - addItemLast(t) { - if (!this._head && !this._tail) this._head = t - else if (this._tail) (t.previous = this._tail), (this._tail.next = t) - else throw new Error('Invalid list') - ;(this._tail = t), this._state++ - } - removeItem(t) { - if (t === this._head && t === this._tail) (this._head = void 0), (this._tail = void 0) - else if (t === this._head) { - if (!t.next) throw new Error('Invalid list') - ;(t.next.previous = void 0), (this._head = t.next) - } else if (t === this._tail) { - if (!t.previous) throw new Error('Invalid list') - ;(t.previous.next = void 0), (this._tail = t.previous) - } else { - let n = t.next, - r = t.previous - if (!n || !r) throw new Error('Invalid list') - ;(n.previous = r), (r.next = n) - } - ;(t.next = void 0), (t.previous = void 0), this._state++ - } - touch(t, n) { - if (!this._head || !this._tail) throw new Error('Invalid list') - if (!(n !== 1 && n !== 2)) { - if (n === 1) { - if (t === this._head) return - let r = t.next, - i = t.previous - t === this._tail - ? ((i.next = void 0), (this._tail = i)) - : ((r.previous = i), (i.next = r)), - (t.previous = void 0), - (t.next = this._head), - (this._head.previous = t), - (this._head = t), - this._state++ - } else if (n === 2) { - if (t === this._tail) return - let r = t.next, - i = t.previous - t === this._head - ? ((r.previous = void 0), (this._head = r)) - : ((r.previous = i), (i.next = r)), - (t.next = void 0), - (t.previous = this._tail), - (this._tail.next = t), - (this._tail = t), - this._state++ - } - } - } - toJSON() { - let t = [] - return ( - this.forEach((n, r) => { - t.push([r, n]) - }), - t - ) - } - fromJSON(t) { - this.clear() - for (let [n, r] of t) this.set(n, r) - } - }, - Ul = class extends Vl { - constructor(t, n = 1) { - super(), (this._limit = t), (this._ratio = Math.min(Math.max(0, n), 1)) - } - get limit() { - return this._limit - } - set limit(t) { - ;(this._limit = t), this.checkTrim() - } - get(t, n = 2) { - return super.get(t, n) - } - peek(t) { - return super.get(t, 0) - } - set(t, n) { - return super.set(t, n, 2), this - } - checkTrim() { - this.size > this._limit && this.trim(Math.round(this._limit * this._ratio)) - } - }, - na = class extends Ul { - constructor(t, n = 1) { - super(t, n) - } - trim(t) { - this.trimOld(t) - } - set(t, n) { - return super.set(t, n), this.checkTrim(), this - } - } - var ra = class { - constructor() { - this.map = new Map() - } - add(t, n) { - let r = this.map.get(t) - r || ((r = new Set()), this.map.set(t, r)), r.add(n) - } - delete(t, n) { - let r = this.map.get(t) - r && (r.delete(n), r.size === 0 && this.map.delete(t)) - } - forEach(t, n) { - let r = this.map.get(t) - r && r.forEach(n) - } - get(t) { - let n = this.map.get(t) - return n || new Set() - } - } - var U6 = new na(10) - function g5(e) { - let t = [] - for (; Object.prototype !== e; ) - (t = t.concat(Object.getOwnPropertyNames(e))), (e = Object.getPrototypeOf(e)) - return t - } - function $l(e) { - let t = [] - for (let n of g5(e)) typeof e[n] == 'function' && t.push(n) - return t - } - function Tp(e, t) { - let n = (i) => - function () { - let s = Array.prototype.slice.call(arguments, 0) - return t(i, s) - }, - r = {} - for (let i of e) r[i] = n(i) - return r - } - var Sp - ;(function (e) { - ;(e[(e.Left = 1)] = 'Left'), - (e[(e.Center = 2)] = 'Center'), - (e[(e.Right = 4)] = 'Right'), - (e[(e.Full = 7)] = 'Full') - })(Sp || (Sp = {})) - var Ap - ;(function (e) { - ;(e[(e.Left = 1)] = 'Left'), (e[(e.Center = 2)] = 'Center'), (e[(e.Right = 3)] = 'Right') - })(Ap || (Ap = {})) - var Fp - ;(function (e) { - ;(e[(e.Both = 0)] = 'Both'), - (e[(e.Right = 1)] = 'Right'), - (e[(e.Left = 2)] = 'Left'), - (e[(e.None = 3)] = 'None') - })(Fp || (Fp = {})) - function D5(e, t, n, r, i) { - if (r === 0) return !0 - let s = t.charCodeAt(r - 1) - if (e.get(s) !== 0 || s === 13 || s === 10) return !0 - if (i > 0) { - let o = t.charCodeAt(r) - if (e.get(o) !== 0) return !0 - } - return !1 - } - function v5(e, t, n, r, i) { - if (r + i === n) return !0 - let s = t.charCodeAt(r + i) - if (e.get(s) !== 0 || s === 13 || s === 10) return !0 - if (i > 0) { - let o = t.charCodeAt(r + i - 1) - if (e.get(o) !== 0) return !0 - } - return !1 - } - function b5(e, t, n, r, i) { - return D5(e, t, n, r, i) && v5(e, t, n, r, i) - } - var ia = class { - constructor(t, n) { - ;(this._wordSeparators = t), - (this._searchRegex = n), - (this._prevMatchStartIndex = -1), - (this._prevMatchLength = 0) - } - reset(t) { - ;(this._searchRegex.lastIndex = t), - (this._prevMatchStartIndex = -1), - (this._prevMatchLength = 0) - } - next(t) { - let n = t.length, - r - do { - if ( - this._prevMatchStartIndex + this._prevMatchLength === n || - ((r = this._searchRegex.exec(t)), !r) - ) - return null - let i = r.index, - s = r[0].length - if (i === this._prevMatchStartIndex && s === this._prevMatchLength) { - if (s === 0) { - Wf(t, n, this._searchRegex.lastIndex) > 65535 - ? (this._searchRegex.lastIndex += 2) - : (this._searchRegex.lastIndex += 1) - continue - } - return null - } - if ( - ((this._prevMatchStartIndex = i), - (this._prevMatchLength = s), - !this._wordSeparators || b5(this._wordSeparators, t, n, i, s)) - ) - return r - } while (r) - return null - } - } - function wp(e, t = 'Unreachable') { - throw new Error(t) - } - function Nr(e) { - if (!e()) { - debugger - e(), In(new it('Assertion Failed')) - } - } - function Ls(e, t) { - let n = 0 - for (; n < e.length - 1; ) { - let r = e[n], - i = e[n + 1] - if (!t(r, i)) return !1 - n++ - } - return !0 - } - var E5 = '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?' - function y5(e = '') { - let t = '(-?\\d*\\.\\d\\w*)|([^' - for (let n of E5) e.indexOf(n) >= 0 || (t += '\\' + n) - return (t += '\\s]+)'), new RegExp(t, 'g') - } - var jl = y5() - function ql(e) { - let t = jl - if (e && e instanceof RegExp) - if (e.global) t = e - else { - let n = 'g' - e.ignoreCase && (n += 'i'), - e.multiline && (n += 'm'), - e.unicode && (n += 'u'), - (t = new RegExp(e.source, n)) - } - return (t.lastIndex = 0), t - } - var Lp = new gs() - Lp.unshift({ maxLen: 1e3, windowSize: 15, timeBudget: 150 }) - function Cs(e, t, n, r, i) { - if (((t = ql(t)), i || (i = ii.first(Lp)), n.length > i.maxLen)) { - let l = e - i.maxLen / 2 - return l < 0 ? (l = 0) : (r += l), (n = n.substring(l, e + i.maxLen / 2)), Cs(e, t, n, r, i) - } - let s = Date.now(), - o = e - 1 - r, - a = -1, - u = null - for (let l = 1; !(Date.now() - s >= i.timeBudget); l++) { - let c = o - i.windowSize * l - t.lastIndex = Math.max(0, c) - let d = x5(t, n, o, a) - if ((!d && u) || ((u = d), c <= 0)) break - a = c - } - if (u) { - let l = { word: u[0], startColumn: r + 1 + u.index, endColumn: r + 1 + u.index + u[0].length } - return (t.lastIndex = 0), l - } - return null - } - function x5(e, t, n, r) { - let i - for (; (i = e.exec(t)); ) { - let s = i.index || 0 - if (s <= n && e.lastIndex >= n) return i - if (r > 0 && s > r) return null - } - return null - } - var sa = class { - static computeUnicodeHighlights(t, n, r) { - let i = r ? r.startLineNumber : 1, - s = r ? r.endLineNumber : t.getLineCount(), - o = new oa(n), - a = o.getCandidateCodePoints(), - u - a === 'allNonBasicAscii' - ? (u = new RegExp('[^\\t\\n\\r\\x20-\\x7E]', 'g')) - : (u = new RegExp(`${_5(Array.from(a))}`, 'g')) - let l = new ia(null, u), - c = [], - d = !1, - h, - m = 0, - g = 0, - v = 0 - e: for (let N = i, _ = s; N <= _; N++) { - let w = t.getLineContent(N), - C = w.length - l.reset(0) - do - if (((h = l.next(w)), h)) { - let S = h.index, - k = h.index + h[0].length - if (S > 0) { - let L = w.charCodeAt(S - 1) - di(L) && S-- - } - if (k + 1 < C) { - let L = w.charCodeAt(k - 1) - di(L) && k++ - } - let M = w.substring(S, k), - I = Cs(S + 1, jl, w, 0) - I && I.endColumn <= S + 1 && (I = null) - let B = o.shouldHighlightNonBasicASCII(M, I ? I.word : null) - if (B !== 0) { - B === 3 ? m++ : B === 2 ? g++ : B === 1 ? v++ : wp(B) - let L = 1e3 - if (c.length >= L) { - d = !0 - break e - } - c.push(new oe(N, S + 1, N, k + 1)) - } - } - while (h) - } - return { - ranges: c, - hasMore: d, - ambiguousCharacterCount: m, - invisibleCharacterCount: g, - nonBasicAsciiCharacterCount: v - } - } - static computeUnicodeHighlightReason(t, n) { - let r = new oa(n) - switch (r.shouldHighlightNonBasicASCII(t, null)) { - case 0: - return null - case 2: - return { kind: 1 } - case 3: { - let s = t.codePointAt(0), - o = r.ambiguousCharacters.getPrimaryConfusable(s), - a = ci - .getLocales() - .filter((u) => !ci.getInstance(new Set([...n.allowedLocales, u])).isAmbiguous(s)) - return { kind: 0, confusableWith: String.fromCodePoint(o), notAmbiguousInLocales: a } - } - case 1: - return { kind: 2 } - } - } - } - function _5(e, t) { - return `[${jf(e.map((r) => String.fromCodePoint(r)).join(''))}]` - } - var oa = class { - constructor(t) { - ;(this.options = t), - (this.allowedCodePoints = new Set(t.allowedCodePoints)), - (this.ambiguousCharacters = ci.getInstance(new Set(t.allowedLocales))) - } - getCandidateCodePoints() { - if (this.options.nonBasicASCII) return 'allNonBasicAscii' - let t = new Set() - if (this.options.invisibleCharacters) - for (let n of fi.codePoints) Cp(String.fromCodePoint(n)) || t.add(n) - if (this.options.ambiguousCharacters) - for (let n of this.ambiguousCharacters.getConfusableCodePoints()) t.add(n) - for (let n of this.allowedCodePoints) t.delete(n) - return t - } - shouldHighlightNonBasicASCII(t, n) { - let r = t.codePointAt(0) - if (this.allowedCodePoints.has(r)) return 0 - if (this.options.nonBasicASCII) return 1 - let i = !1, - s = !1 - if (n) - for (let o of n) { - let a = o.codePointAt(0), - u = Qf(o) - ;(i = i || u), - !u && - !this.ambiguousCharacters.isAmbiguous(a) && - !fi.isInvisibleCharacter(a) && - (s = !0) - } - return !i && s - ? 0 - : this.options.invisibleCharacters && !Cp(t) && fi.isInvisibleCharacter(r) - ? 2 - : this.options.ambiguousCharacters && this.ambiguousCharacters.isAmbiguous(r) - ? 3 - : 0 - } - } - function Cp(e) { - return ( - e === ' ' || - e === - ` -` || - e === ' ' - ) - } - var ar = class { - constructor(t, n, r) { - ;(this.changes = t), (this.moves = n), (this.hitTimeout = r) - } - }, - aa = class { - constructor(t, n) { - ;(this.lineRangeMapping = t), (this.changes = n) - } - } - var Ee = class e { - static addRange(t, n) { - let r = 0 - for (; r < n.length && n[r].endExclusive < t.start; ) r++ - let i = r - for (; i < n.length && n[i].start <= t.endExclusive; ) i++ - if (r === i) n.splice(r, 0, t) - else { - let s = Math.min(t.start, n[r].start), - o = Math.max(t.endExclusive, n[i - 1].endExclusive) - n.splice(r, i - r, new e(s, o)) - } - } - static tryCreate(t, n) { - if (!(t > n)) return new e(t, n) - } - static ofLength(t) { - return new e(0, t) - } - static ofStartAndLength(t, n) { - return new e(t, t + n) - } - constructor(t, n) { - if (((this.start = t), (this.endExclusive = n), t > n)) - throw new it(`Invalid range: ${this.toString()}`) - } - get isEmpty() { - return this.start === this.endExclusive - } - delta(t) { - return new e(this.start + t, this.endExclusive + t) - } - deltaStart(t) { - return new e(this.start + t, this.endExclusive) - } - deltaEnd(t) { - return new e(this.start, this.endExclusive + t) - } - get length() { - return this.endExclusive - this.start - } - toString() { - return `[${this.start}, ${this.endExclusive})` - } - contains(t) { - return this.start <= t && t < this.endExclusive - } - join(t) { - return new e(Math.min(this.start, t.start), Math.max(this.endExclusive, t.endExclusive)) - } - intersect(t) { - let n = Math.max(this.start, t.start), - r = Math.min(this.endExclusive, t.endExclusive) - if (n <= r) return new e(n, r) - } - intersects(t) { - let n = Math.max(this.start, t.start), - r = Math.min(this.endExclusive, t.endExclusive) - return n < r - } - isBefore(t) { - return this.endExclusive <= t.start - } - isAfter(t) { - return this.start >= t.endExclusive - } - slice(t) { - return t.slice(this.start, this.endExclusive) - } - substring(t) { - return t.substring(this.start, this.endExclusive) - } - clip(t) { - if (this.isEmpty) throw new it(`Invalid clipping range: ${this.toString()}`) - return Math.max(this.start, Math.min(this.endExclusive - 1, t)) - } - clipCyclic(t) { - if (this.isEmpty) throw new it(`Invalid clipping range: ${this.toString()}`) - return t < this.start - ? this.endExclusive - ((this.start - t) % this.length) - : t >= this.endExclusive - ? this.start + ((t - this.start) % this.length) - : t - } - forEach(t) { - for (let n = this.start; n < this.endExclusive; n++) t(n) - } - } - function Mn(e, t) { - let n = Tr(e, t) - return n === -1 ? void 0 : e[n] - } - function Tr(e, t, n = 0, r = e.length) { - let i = n, - s = r - for (; i < s; ) { - let o = Math.floor((i + s) / 2) - t(e[o]) ? (i = o + 1) : (s = o) - } - return i - 1 - } - function Ip(e, t) { - let n = ua(e, t) - return n === e.length ? void 0 : e[n] - } - function ua(e, t, n = 0, r = e.length) { - let i = n, - s = r - for (; i < s; ) { - let o = Math.floor((i + s) / 2) - t(e[o]) ? (s = o) : (i = o + 1) - } - return i - } - var Is = class e { - static { - this.assertInvariants = !1 - } - constructor(t) { - ;(this._array = t), (this._findLastMonotonousLastIdx = 0) - } - findLastMonotonous(t) { - if (e.assertInvariants) { - if (this._prevFindLastPredicate) { - for (let r of this._array) - if (this._prevFindLastPredicate(r) && !t(r)) - throw new Error( - 'MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.' - ) - } - this._prevFindLastPredicate = t - } - let n = Tr(this._array, t, this._findLastMonotonousLastIdx) - return (this._findLastMonotonousLastIdx = n + 1), n === -1 ? void 0 : this._array[n] - } - } - var ge = class e { - static fromRangeInclusive(t) { - return new e(t.startLineNumber, t.endLineNumber + 1) - } - static joinMany(t) { - if (t.length === 0) return [] - let n = new Sr(t[0].slice()) - for (let r = 1; r < t.length; r++) n = n.getUnion(new Sr(t[r].slice())) - return n.ranges - } - static join(t) { - if (t.length === 0) throw new it('lineRanges cannot be empty') - let n = t[0].startLineNumber, - r = t[0].endLineNumberExclusive - for (let i = 1; i < t.length; i++) - (n = Math.min(n, t[i].startLineNumber)), (r = Math.max(r, t[i].endLineNumberExclusive)) - return new e(n, r) - } - static ofLength(t, n) { - return new e(t, t + n) - } - static deserialize(t) { - return new e(t[0], t[1]) - } - constructor(t, n) { - if (t > n) throw new it(`startLineNumber ${t} cannot be after endLineNumberExclusive ${n}`) - ;(this.startLineNumber = t), (this.endLineNumberExclusive = n) - } - contains(t) { - return this.startLineNumber <= t && t < this.endLineNumberExclusive - } - get isEmpty() { - return this.startLineNumber === this.endLineNumberExclusive - } - delta(t) { - return new e(this.startLineNumber + t, this.endLineNumberExclusive + t) - } - deltaLength(t) { - return new e(this.startLineNumber, this.endLineNumberExclusive + t) - } - get length() { - return this.endLineNumberExclusive - this.startLineNumber - } - join(t) { - return new e( - Math.min(this.startLineNumber, t.startLineNumber), - Math.max(this.endLineNumberExclusive, t.endLineNumberExclusive) - ) - } - toString() { - return `[${this.startLineNumber},${this.endLineNumberExclusive})` - } - intersect(t) { - let n = Math.max(this.startLineNumber, t.startLineNumber), - r = Math.min(this.endLineNumberExclusive, t.endLineNumberExclusive) - if (n <= r) return new e(n, r) - } - intersectsStrict(t) { - return ( - this.startLineNumber < t.endLineNumberExclusive && - t.startLineNumber < this.endLineNumberExclusive - ) - } - overlapOrTouch(t) { - return ( - this.startLineNumber <= t.endLineNumberExclusive && - t.startLineNumber <= this.endLineNumberExclusive - ) - } - equals(t) { - return ( - this.startLineNumber === t.startLineNumber && - this.endLineNumberExclusive === t.endLineNumberExclusive - ) - } - toInclusiveRange() { - return this.isEmpty - ? null - : new oe( - this.startLineNumber, - 1, - this.endLineNumberExclusive - 1, - Number.MAX_SAFE_INTEGER - ) - } - toExclusiveRange() { - return new oe(this.startLineNumber, 1, this.endLineNumberExclusive, 1) - } - mapToLineArray(t) { - let n = [] - for (let r = this.startLineNumber; r < this.endLineNumberExclusive; r++) n.push(t(r)) - return n - } - forEach(t) { - for (let n = this.startLineNumber; n < this.endLineNumberExclusive; n++) t(n) - } - serialize() { - return [this.startLineNumber, this.endLineNumberExclusive] - } - includes(t) { - return this.startLineNumber <= t && t < this.endLineNumberExclusive - } - toOffsetRange() { - return new Ee(this.startLineNumber - 1, this.endLineNumberExclusive - 1) - } - }, - Sr = class e { - constructor(t = []) { - this._normalizedRanges = t - } - get ranges() { - return this._normalizedRanges - } - addRange(t) { - if (t.length === 0) return - let n = ua(this._normalizedRanges, (i) => i.endLineNumberExclusive >= t.startLineNumber), - r = Tr(this._normalizedRanges, (i) => i.startLineNumber <= t.endLineNumberExclusive) + 1 - if (n === r) this._normalizedRanges.splice(n, 0, t) - else if (n === r - 1) { - let i = this._normalizedRanges[n] - this._normalizedRanges[n] = i.join(t) - } else { - let i = this._normalizedRanges[n].join(this._normalizedRanges[r - 1]).join(t) - this._normalizedRanges.splice(n, r - n, i) - } - } - contains(t) { - let n = Mn(this._normalizedRanges, (r) => r.startLineNumber <= t) - return !!n && n.endLineNumberExclusive > t - } - intersects(t) { - let n = Mn(this._normalizedRanges, (r) => r.startLineNumber < t.endLineNumberExclusive) - return !!n && n.endLineNumberExclusive > t.startLineNumber - } - getUnion(t) { - if (this._normalizedRanges.length === 0) return t - if (t._normalizedRanges.length === 0) return this - let n = [], - r = 0, - i = 0, - s = null - for (; r < this._normalizedRanges.length || i < t._normalizedRanges.length; ) { - let o = null - if (r < this._normalizedRanges.length && i < t._normalizedRanges.length) { - let a = this._normalizedRanges[r], - u = t._normalizedRanges[i] - a.startLineNumber < u.startLineNumber ? ((o = a), r++) : ((o = u), i++) - } else - r < this._normalizedRanges.length - ? ((o = this._normalizedRanges[r]), r++) - : ((o = t._normalizedRanges[i]), i++) - s === null - ? (s = o) - : s.endLineNumberExclusive >= o.startLineNumber - ? (s = new ge( - s.startLineNumber, - Math.max(s.endLineNumberExclusive, o.endLineNumberExclusive) - )) - : (n.push(s), (s = o)) - } - return s !== null && n.push(s), new e(n) - } - subtractFrom(t) { - let n = ua(this._normalizedRanges, (o) => o.endLineNumberExclusive >= t.startLineNumber), - r = Tr(this._normalizedRanges, (o) => o.startLineNumber <= t.endLineNumberExclusive) + 1 - if (n === r) return new e([t]) - let i = [], - s = t.startLineNumber - for (let o = n; o < r; o++) { - let a = this._normalizedRanges[o] - a.startLineNumber > s && i.push(new ge(s, a.startLineNumber)), - (s = a.endLineNumberExclusive) - } - return s < t.endLineNumberExclusive && i.push(new ge(s, t.endLineNumberExclusive)), new e(i) - } - toString() { - return this._normalizedRanges.map((t) => t.toString()).join(', ') - } - getIntersection(t) { - let n = [], - r = 0, - i = 0 - for (; r < this._normalizedRanges.length && i < t._normalizedRanges.length; ) { - let s = this._normalizedRanges[r], - o = t._normalizedRanges[i], - a = s.intersect(o) - a && !a.isEmpty && n.push(a), - s.endLineNumberExclusive < o.endLineNumberExclusive ? r++ : i++ - } - return new e(n) - } - getWithDelta(t) { - return new e(this._normalizedRanges.map((n) => n.delta(t))) - } - } - var la = class e { - static { - this.zero = new e(0, 0) - } - static betweenPositions(t, n) { - return t.lineNumber === n.lineNumber - ? new e(0, n.column - t.column) - : new e(n.lineNumber - t.lineNumber, n.column - 1) - } - static ofRange(t) { - return e.betweenPositions(t.getStartPosition(), t.getEndPosition()) - } - static ofText(t) { - let n = 0, - r = 0 - for (let i of t) - i === - ` -` - ? (n++, (r = 0)) - : r++ - return new e(n, r) - } - constructor(t, n) { - ;(this.lineCount = t), (this.columnCount = n) - } - isGreaterThanOrEqualTo(t) { - return this.lineCount !== t.lineCount - ? this.lineCount > t.lineCount - : this.columnCount >= t.columnCount - } - createRange(t) { - return this.lineCount === 0 - ? new oe(t.lineNumber, t.column, t.lineNumber, t.column + this.columnCount) - : new oe(t.lineNumber, t.column, t.lineNumber + this.lineCount, this.columnCount + 1) - } - addToPosition(t) { - return this.lineCount === 0 - ? new Se(t.lineNumber, t.column + this.columnCount) - : new Se(t.lineNumber + this.lineCount, this.columnCount + 1) - } - toString() { - return `${this.lineCount},${this.columnCount}` - } - } - var ca = class { - constructor(t, n) { - ;(this.range = t), (this.text = n) - } - toSingleEditOperation() { - return { range: this.range, text: this.text } - } - } - var pn = class e { - static inverse(t, n, r) { - let i = [], - s = 1, - o = 1 - for (let u of t) { - let l = new e(new ge(s, u.original.startLineNumber), new ge(o, u.modified.startLineNumber)) - l.modified.isEmpty || i.push(l), - (s = u.original.endLineNumberExclusive), - (o = u.modified.endLineNumberExclusive) - } - let a = new e(new ge(s, n + 1), new ge(o, r + 1)) - return a.modified.isEmpty || i.push(a), i - } - static clip(t, n, r) { - let i = [] - for (let s of t) { - let o = s.original.intersect(n), - a = s.modified.intersect(r) - o && !o.isEmpty && a && !a.isEmpty && i.push(new e(o, a)) - } - return i - } - constructor(t, n) { - ;(this.original = t), (this.modified = n) - } - toString() { - return `{${this.original.toString()}->${this.modified.toString()}}` - } - flip() { - return new e(this.modified, this.original) - } - join(t) { - return new e(this.original.join(t.original), this.modified.join(t.modified)) - } - toRangeMapping() { - let t = this.original.toInclusiveRange(), - n = this.modified.toInclusiveRange() - if (t && n) return new Ot(t, n) - if (this.original.startLineNumber === 1 || this.modified.startLineNumber === 1) { - if (!(this.modified.startLineNumber === 1 && this.original.startLineNumber === 1)) - throw new it('not a valid diff') - return new Ot( - new oe(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), - new oe(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1) - ) - } else - return new Ot( - new oe( - this.original.startLineNumber - 1, - Number.MAX_SAFE_INTEGER, - this.original.endLineNumberExclusive - 1, - Number.MAX_SAFE_INTEGER - ), - new oe( - this.modified.startLineNumber - 1, - Number.MAX_SAFE_INTEGER, - this.modified.endLineNumberExclusive - 1, - Number.MAX_SAFE_INTEGER - ) - ) - } - toRangeMapping2(t, n) { - if ( - Rp(this.original.endLineNumberExclusive, t) && - Rp(this.modified.endLineNumberExclusive, n) - ) - return new Ot( - new oe(this.original.startLineNumber, 1, this.original.endLineNumberExclusive, 1), - new oe(this.modified.startLineNumber, 1, this.modified.endLineNumberExclusive, 1) - ) - if (!this.original.isEmpty && !this.modified.isEmpty) - return new Ot( - oe.fromPositions( - new Se(this.original.startLineNumber, 1), - mi(new Se(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), t) - ), - oe.fromPositions( - new Se(this.modified.startLineNumber, 1), - mi(new Se(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), n) - ) - ) - if (this.original.startLineNumber > 1 && this.modified.startLineNumber > 1) - return new Ot( - oe.fromPositions( - mi(new Se(this.original.startLineNumber - 1, Number.MAX_SAFE_INTEGER), t), - mi(new Se(this.original.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), t) - ), - oe.fromPositions( - mi(new Se(this.modified.startLineNumber - 1, Number.MAX_SAFE_INTEGER), n), - mi(new Se(this.modified.endLineNumberExclusive - 1, Number.MAX_SAFE_INTEGER), n) - ) - ) - throw new it() - } - } - function mi(e, t) { - if (e.lineNumber < 1) return new Se(1, 1) - if (e.lineNumber > t.length) return new Se(t.length, t[t.length - 1].length + 1) - let n = t[e.lineNumber - 1] - return e.column > n.length + 1 ? new Se(e.lineNumber, n.length + 1) : e - } - function Rp(e, t) { - return e >= 1 && e <= t.length - } - var Pn = class e extends pn { - static fromRangeMappings(t) { - let n = ge.join(t.map((i) => ge.fromRangeInclusive(i.originalRange))), - r = ge.join(t.map((i) => ge.fromRangeInclusive(i.modifiedRange))) - return new e(n, r, t) - } - constructor(t, n, r) { - super(t, n), (this.innerChanges = r) - } - flip() { - return new e( - this.modified, - this.original, - this.innerChanges?.map((t) => t.flip()) - ) - } - withInnerChangesFromLineRanges() { - return new e(this.original, this.modified, [this.toRangeMapping()]) - } - }, - Ot = class e { - static assertSorted(t) { - for (let n = 1; n < t.length; n++) { - let r = t[n - 1], - i = t[n] - if ( - !( - r.originalRange - .getEndPosition() - .isBeforeOrEqual(i.originalRange.getStartPosition()) && - r.modifiedRange.getEndPosition().isBeforeOrEqual(i.modifiedRange.getStartPosition()) - ) - ) - throw new it('Range mappings must be sorted') - } - } - constructor(t, n) { - ;(this.originalRange = t), (this.modifiedRange = n) - } - toString() { - return `{${this.originalRange.toString()}->${this.modifiedRange.toString()}}` - } - flip() { - return new e(this.modifiedRange, this.originalRange) - } - toTextEdit(t) { - let n = t.getValueOfRange(this.modifiedRange) - return new ca(this.originalRange, n) - } - } - var N5 = 3, - fa = class { - computeDiff(t, n, r) { - let s = new Hl(t, n, { - maxComputationTime: r.maxComputationTimeMs, - shouldIgnoreTrimWhitespace: r.ignoreTrimWhitespace, - shouldComputeCharChanges: !0, - shouldMakePrettyDiff: !0, - shouldPostProcessCharChanges: !0 - }).computeDiff(), - o = [], - a = null - for (let u of s.changes) { - let l - u.originalEndLineNumber === 0 - ? (l = new ge(u.originalStartLineNumber + 1, u.originalStartLineNumber + 1)) - : (l = new ge(u.originalStartLineNumber, u.originalEndLineNumber + 1)) - let c - u.modifiedEndLineNumber === 0 - ? (c = new ge(u.modifiedStartLineNumber + 1, u.modifiedStartLineNumber + 1)) - : (c = new ge(u.modifiedStartLineNumber, u.modifiedEndLineNumber + 1)) - let d = new Pn( - l, - c, - u.charChanges?.map( - (h) => - new Ot( - new oe( - h.originalStartLineNumber, - h.originalStartColumn, - h.originalEndLineNumber, - h.originalEndColumn - ), - new oe( - h.modifiedStartLineNumber, - h.modifiedStartColumn, - h.modifiedEndLineNumber, - h.modifiedEndColumn - ) - ) - ) - ) - a && - (a.modified.endLineNumberExclusive === d.modified.startLineNumber || - a.original.endLineNumberExclusive === d.original.startLineNumber) && - ((d = new Pn( - a.original.join(d.original), - a.modified.join(d.modified), - a.innerChanges && d.innerChanges ? a.innerChanges.concat(d.innerChanges) : void 0 - )), - o.pop()), - o.push(d), - (a = d) - } - return ( - Nr(() => - Ls( - o, - (u, l) => - l.original.startLineNumber - u.original.endLineNumberExclusive === - l.modified.startLineNumber - u.modified.endLineNumberExclusive && - u.original.endLineNumberExclusive < l.original.startLineNumber && - u.modified.endLineNumberExclusive < l.modified.startLineNumber - ) - ), - new ar(o, [], s.quitEarly) - ) - } - } - function Op(e, t, n, r) { - return new _s(e, t, n).ComputeDiff(r) - } - var da = class { - constructor(t) { - let n = [], - r = [] - for (let i = 0, s = t.length; i < s; i++) (n[i] = Wl(t[i], 1)), (r[i] = Ql(t[i], 1)) - ;(this.lines = t), (this._startColumns = n), (this._endColumns = r) - } - getElements() { - let t = [] - for (let n = 0, r = this.lines.length; n < r; n++) - t[n] = this.lines[n].substring(this._startColumns[n] - 1, this._endColumns[n] - 1) - return t - } - getStrictElement(t) { - return this.lines[t] - } - getStartLineNumber(t) { - return t + 1 - } - getEndLineNumber(t) { - return t + 1 - } - createCharSequence(t, n, r) { - let i = [], - s = [], - o = [], - a = 0 - for (let u = n; u <= r; u++) { - let l = this.lines[u], - c = t ? this._startColumns[u] : 1, - d = t ? this._endColumns[u] : l.length + 1 - for (let h = c; h < d; h++) (i[a] = l.charCodeAt(h - 1)), (s[a] = u + 1), (o[a] = h), a++ - !t && u < r && ((i[a] = 10), (s[a] = u + 1), (o[a] = l.length + 1), a++) - } - return new Gl(i, s, o) - } - }, - Gl = class { - constructor(t, n, r) { - ;(this._charCodes = t), (this._lineNumbers = n), (this._columns = r) - } - toString() { - return ( - '[' + - this._charCodes - .map( - (t, n) => - (t === 10 ? '\\n' : String.fromCharCode(t)) + - `-(${this._lineNumbers[n]},${this._columns[n]})` - ) - .join(', ') + - ']' - ) - } - _assertIndex(t, n) { - if (t < 0 || t >= n.length) throw new Error('Illegal index') - } - getElements() { - return this._charCodes - } - getStartLineNumber(t) { - return t > 0 && t === this._lineNumbers.length - ? this.getEndLineNumber(t - 1) - : (this._assertIndex(t, this._lineNumbers), this._lineNumbers[t]) - } - getEndLineNumber(t) { - return t === -1 - ? this.getStartLineNumber(t + 1) - : (this._assertIndex(t, this._lineNumbers), - this._charCodes[t] === 10 ? this._lineNumbers[t] + 1 : this._lineNumbers[t]) - } - getStartColumn(t) { - return t > 0 && t === this._columns.length - ? this.getEndColumn(t - 1) - : (this._assertIndex(t, this._columns), this._columns[t]) - } - getEndColumn(t) { - return t === -1 - ? this.getStartColumn(t + 1) - : (this._assertIndex(t, this._columns), - this._charCodes[t] === 10 ? 1 : this._columns[t] + 1) - } - }, - gi = class e { - constructor(t, n, r, i, s, o, a, u) { - ;(this.originalStartLineNumber = t), - (this.originalStartColumn = n), - (this.originalEndLineNumber = r), - (this.originalEndColumn = i), - (this.modifiedStartLineNumber = s), - (this.modifiedStartColumn = o), - (this.modifiedEndLineNumber = a), - (this.modifiedEndColumn = u) - } - static createFromDiffChange(t, n, r) { - let i = n.getStartLineNumber(t.originalStart), - s = n.getStartColumn(t.originalStart), - o = n.getEndLineNumber(t.originalStart + t.originalLength - 1), - a = n.getEndColumn(t.originalStart + t.originalLength - 1), - u = r.getStartLineNumber(t.modifiedStart), - l = r.getStartColumn(t.modifiedStart), - c = r.getEndLineNumber(t.modifiedStart + t.modifiedLength - 1), - d = r.getEndColumn(t.modifiedStart + t.modifiedLength - 1) - return new e(i, s, o, a, u, l, c, d) - } - } - function T5(e) { - if (e.length <= 1) return e - let t = [e[0]], - n = t[0] - for (let r = 1, i = e.length; r < i; r++) { - let s = e[r], - o = s.originalStart - (n.originalStart + n.originalLength), - a = s.modifiedStart - (n.modifiedStart + n.modifiedLength) - Math.min(o, a) < N5 - ? ((n.originalLength = s.originalStart + s.originalLength - n.originalStart), - (n.modifiedLength = s.modifiedStart + s.modifiedLength - n.modifiedStart)) - : (t.push(s), (n = s)) - } - return t - } - var Rs = class e { - constructor(t, n, r, i, s) { - ;(this.originalStartLineNumber = t), - (this.originalEndLineNumber = n), - (this.modifiedStartLineNumber = r), - (this.modifiedEndLineNumber = i), - (this.charChanges = s) - } - static createFromDiffResult(t, n, r, i, s, o, a) { - let u, l, c, d, h - if ( - (n.originalLength === 0 - ? ((u = r.getStartLineNumber(n.originalStart) - 1), (l = 0)) - : ((u = r.getStartLineNumber(n.originalStart)), - (l = r.getEndLineNumber(n.originalStart + n.originalLength - 1))), - n.modifiedLength === 0 - ? ((c = i.getStartLineNumber(n.modifiedStart) - 1), (d = 0)) - : ((c = i.getStartLineNumber(n.modifiedStart)), - (d = i.getEndLineNumber(n.modifiedStart + n.modifiedLength - 1))), - o && - n.originalLength > 0 && - n.originalLength < 20 && - n.modifiedLength > 0 && - n.modifiedLength < 20 && - s()) - ) { - let m = r.createCharSequence(t, n.originalStart, n.originalStart + n.originalLength - 1), - g = i.createCharSequence(t, n.modifiedStart, n.modifiedStart + n.modifiedLength - 1) - if (m.getElements().length > 0 && g.getElements().length > 0) { - let v = Op(m, g, s, !0).changes - a && (v = T5(v)), (h = []) - for (let N = 0, _ = v.length; N < _; N++) h.push(gi.createFromDiffChange(v[N], m, g)) - } - } - return new e(u, l, c, d, h) - } - }, - Hl = class { - constructor(t, n, r) { - ;(this.shouldComputeCharChanges = r.shouldComputeCharChanges), - (this.shouldPostProcessCharChanges = r.shouldPostProcessCharChanges), - (this.shouldIgnoreTrimWhitespace = r.shouldIgnoreTrimWhitespace), - (this.shouldMakePrettyDiff = r.shouldMakePrettyDiff), - (this.originalLines = t), - (this.modifiedLines = n), - (this.original = new da(t)), - (this.modified = new da(n)), - (this.continueLineDiff = kp(r.maxComputationTime)), - (this.continueCharDiff = kp( - r.maxComputationTime === 0 ? 0 : Math.min(r.maxComputationTime, 5e3) - )) - } - computeDiff() { - if (this.original.lines.length === 1 && this.original.lines[0].length === 0) - return this.modified.lines.length === 1 && this.modified.lines[0].length === 0 - ? { quitEarly: !1, changes: [] } - : { - quitEarly: !1, - changes: [ - { - originalStartLineNumber: 1, - originalEndLineNumber: 1, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: this.modified.lines.length, - charChanges: void 0 - } - ] - } - if (this.modified.lines.length === 1 && this.modified.lines[0].length === 0) - return { - quitEarly: !1, - changes: [ - { - originalStartLineNumber: 1, - originalEndLineNumber: this.original.lines.length, - modifiedStartLineNumber: 1, - modifiedEndLineNumber: 1, - charChanges: void 0 - } - ] - } - let t = Op(this.original, this.modified, this.continueLineDiff, this.shouldMakePrettyDiff), - n = t.changes, - r = t.quitEarly - if (this.shouldIgnoreTrimWhitespace) { - let a = [] - for (let u = 0, l = n.length; u < l; u++) - a.push( - Rs.createFromDiffResult( - this.shouldIgnoreTrimWhitespace, - n[u], - this.original, - this.modified, - this.continueCharDiff, - this.shouldComputeCharChanges, - this.shouldPostProcessCharChanges - ) - ) - return { quitEarly: r, changes: a } - } - let i = [], - s = 0, - o = 0 - for (let a = -1, u = n.length; a < u; a++) { - let l = a + 1 < u ? n[a + 1] : null, - c = l ? l.originalStart : this.originalLines.length, - d = l ? l.modifiedStart : this.modifiedLines.length - for (; s < c && o < d; ) { - let h = this.originalLines[s], - m = this.modifiedLines[o] - if (h !== m) { - { - let g = Wl(h, 1), - v = Wl(m, 1) - for (; g > 1 && v > 1; ) { - let N = h.charCodeAt(g - 2), - _ = m.charCodeAt(v - 2) - if (N !== _) break - g--, v-- - } - ;(g > 1 || v > 1) && this._pushTrimWhitespaceCharChange(i, s + 1, 1, g, o + 1, 1, v) - } - { - let g = Ql(h, 1), - v = Ql(m, 1), - N = h.length + 1, - _ = m.length + 1 - for (; g < N && v < _; ) { - let w = h.charCodeAt(g - 1), - C = h.charCodeAt(v - 1) - if (w !== C) break - g++, v++ - } - ;(g < N || v < _) && this._pushTrimWhitespaceCharChange(i, s + 1, g, N, o + 1, v, _) - } - } - s++, o++ - } - l && - (i.push( - Rs.createFromDiffResult( - this.shouldIgnoreTrimWhitespace, - l, - this.original, - this.modified, - this.continueCharDiff, - this.shouldComputeCharChanges, - this.shouldPostProcessCharChanges - ) - ), - (s += l.originalLength), - (o += l.modifiedLength)) - } - return { quitEarly: r, changes: i } - } - _pushTrimWhitespaceCharChange(t, n, r, i, s, o, a) { - if (this._mergeTrimWhitespaceCharChange(t, n, r, i, s, o, a)) return - let u - this.shouldComputeCharChanges && (u = [new gi(n, r, n, i, s, o, s, a)]), - t.push(new Rs(n, n, s, s, u)) - } - _mergeTrimWhitespaceCharChange(t, n, r, i, s, o, a) { - let u = t.length - if (u === 0) return !1 - let l = t[u - 1] - return l.originalEndLineNumber === 0 || l.modifiedEndLineNumber === 0 - ? !1 - : l.originalEndLineNumber === n && l.modifiedEndLineNumber === s - ? (this.shouldComputeCharChanges && - l.charChanges && - l.charChanges.push(new gi(n, r, n, i, s, o, s, a)), - !0) - : l.originalEndLineNumber + 1 === n && l.modifiedEndLineNumber + 1 === s - ? ((l.originalEndLineNumber = n), - (l.modifiedEndLineNumber = s), - this.shouldComputeCharChanges && - l.charChanges && - l.charChanges.push(new gi(n, r, n, i, s, o, s, a)), - !0) - : !1 - } - } - function Wl(e, t) { - let n = Gf(e) - return n === -1 ? t : n + 1 - } - function Ql(e, t) { - let n = Hf(e) - return n === -1 ? t : n + 2 - } - function kp(e) { - if (e === 0) return () => !0 - let t = Date.now() - return () => Date.now() - t < e - } - function Pp(e, t, n = (r, i) => r === i) { - if (e === t) return !0 - if (!e || !t || e.length !== t.length) return !1 - for (let r = 0, i = e.length; r < i; r++) if (!n(e[r], t[r])) return !1 - return !0 - } - function* Bp(e, t) { - let n, r - for (let i of e) r !== void 0 && t(r, i) ? n.push(i) : (n && (yield n), (n = [i])), (r = i) - n && (yield n) - } - function Vp(e, t) { - for (let n = 0; n <= e.length; n++) - t(n === 0 ? void 0 : e[n - 1], n === e.length ? void 0 : e[n]) - } - function Up(e, t) { - for (let n = 0; n < e.length; n++) - t(n === 0 ? void 0 : e[n - 1], e[n], n + 1 === e.length ? void 0 : e[n + 1]) - } - function $p(e, t) { - for (let n of t) e.push(n) - } - var zl - ;(function (e) { - function t(s) { - return s < 0 - } - e.isLessThan = t - function n(s) { - return s <= 0 - } - e.isLessThanOrEqual = n - function r(s) { - return s > 0 - } - e.isGreaterThan = r - function i(s) { - return s === 0 - } - ;(e.isNeitherLessOrGreaterThan = i), - (e.greaterThan = 1), - (e.lessThan = -1), - (e.neitherLessOrGreaterThan = 0) - })(zl || (zl = {})) - function ks(e, t) { - return (n, r) => t(e(n), e(r)) - } - var Os = (e, t) => e - t - function jp(e) { - return (t, n) => -e(t, n) - } - var Mp = class e { - static { - this.empty = new e((t) => {}) - } - constructor(t) { - this.iterate = t - } - toArray() { - let t = [] - return this.iterate((n) => (t.push(n), !0)), t - } - filter(t) { - return new e((n) => this.iterate((r) => (t(r) ? n(r) : !0))) - } - map(t) { - return new e((n) => this.iterate((r) => n(t(r)))) - } - findLast(t) { - let n - return this.iterate((r) => (t(r) && (n = r), !0)), n - } - findLastMaxBy(t) { - let n, - r = !0 - return this.iterate((i) => ((r || zl.isGreaterThan(t(i, n))) && ((r = !1), (n = i)), !0)), n - } - } - var mn = class e { - static trivial(t, n) { - return new e([new Pe(Ee.ofLength(t.length), Ee.ofLength(n.length))], !1) - } - static trivialTimedOut(t, n) { - return new e([new Pe(Ee.ofLength(t.length), Ee.ofLength(n.length))], !0) - } - constructor(t, n) { - ;(this.diffs = t), (this.hitTimeout = n) - } - }, - Pe = class e { - static invert(t, n) { - let r = [] - return ( - Vp(t, (i, s) => { - r.push( - e.fromOffsetPairs( - i ? i.getEndExclusives() : hn.zero, - s - ? s.getStarts() - : new hn(n, (i ? i.seq2Range.endExclusive - i.seq1Range.endExclusive : 0) + n) - ) - ) - }), - r - ) - } - static fromOffsetPairs(t, n) { - return new e(new Ee(t.offset1, n.offset1), new Ee(t.offset2, n.offset2)) - } - static assertSorted(t) { - let n - for (let r of t) { - if ( - n && - !( - n.seq1Range.endExclusive <= r.seq1Range.start && - n.seq2Range.endExclusive <= r.seq2Range.start - ) - ) - throw new it('Sequence diffs must be sorted') - n = r - } - } - constructor(t, n) { - ;(this.seq1Range = t), (this.seq2Range = n) - } - swap() { - return new e(this.seq2Range, this.seq1Range) - } - toString() { - return `${this.seq1Range} <-> ${this.seq2Range}` - } - join(t) { - return new e(this.seq1Range.join(t.seq1Range), this.seq2Range.join(t.seq2Range)) - } - delta(t) { - return t === 0 ? this : new e(this.seq1Range.delta(t), this.seq2Range.delta(t)) - } - deltaStart(t) { - return t === 0 ? this : new e(this.seq1Range.deltaStart(t), this.seq2Range.deltaStart(t)) - } - deltaEnd(t) { - return t === 0 ? this : new e(this.seq1Range.deltaEnd(t), this.seq2Range.deltaEnd(t)) - } - intersect(t) { - let n = this.seq1Range.intersect(t.seq1Range), - r = this.seq2Range.intersect(t.seq2Range) - if (!(!n || !r)) return new e(n, r) - } - getStarts() { - return new hn(this.seq1Range.start, this.seq2Range.start) - } - getEndExclusives() { - return new hn(this.seq1Range.endExclusive, this.seq2Range.endExclusive) - } - }, - hn = class e { - static { - this.zero = new e(0, 0) - } - static { - this.max = new e(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER) - } - constructor(t, n) { - ;(this.offset1 = t), (this.offset2 = n) - } - toString() { - return `${this.offset1} <-> ${this.offset2}` - } - delta(t) { - return t === 0 ? this : new e(this.offset1 + t, this.offset2 + t) - } - equals(t) { - return this.offset1 === t.offset1 && this.offset2 === t.offset2 - } - }, - ur = class e { - static { - this.instance = new e() - } - isValid() { - return !0 - } - }, - pa = class { - constructor(t) { - if (((this.timeout = t), (this.startTime = Date.now()), (this.valid = !0), t <= 0)) - throw new it('timeout must be positive') - } - isValid() { - if (!(Date.now() - this.startTime < this.timeout) && this.valid) { - this.valid = !1 - debugger - } - return this.valid - } - } - var Di = class { - constructor(t, n) { - ;(this.width = t), (this.height = n), (this.array = []), (this.array = new Array(t * n)) - } - get(t, n) { - return this.array[t + n * this.width] - } - set(t, n, r) { - this.array[t + n * this.width] = r - } - } - function Ps(e) { - return e === 32 || e === 9 - } - var Ms = class e { - static { - this.chrKeys = new Map() - } - static getKey(t) { - let n = this.chrKeys.get(t) - return n === void 0 && ((n = this.chrKeys.size), this.chrKeys.set(t, n)), n - } - constructor(t, n, r) { - ;(this.range = t), (this.lines = n), (this.source = r), (this.histogram = []) - let i = 0 - for (let s = t.startLineNumber - 1; s < t.endLineNumberExclusive - 1; s++) { - let o = n[s] - for (let u = 0; u < o.length; u++) { - i++ - let l = o[u], - c = e.getKey(l) - this.histogram[c] = (this.histogram[c] || 0) + 1 - } - i++ - let a = e.getKey(` -`) - this.histogram[a] = (this.histogram[a] || 0) + 1 - } - this.totalCount = i - } - computeSimilarity(t) { - let n = 0, - r = Math.max(this.histogram.length, t.histogram.length) - for (let i = 0; i < r; i++) n += Math.abs((this.histogram[i] ?? 0) - (t.histogram[i] ?? 0)) - return 1 - n / (this.totalCount + t.totalCount) - } - } - var ha = class { - compute(t, n, r = ur.instance, i) { - if (t.length === 0 || n.length === 0) return mn.trivial(t, n) - let s = new Di(t.length, n.length), - o = new Di(t.length, n.length), - a = new Di(t.length, n.length) - for (let g = 0; g < t.length; g++) - for (let v = 0; v < n.length; v++) { - if (!r.isValid()) return mn.trivialTimedOut(t, n) - let N = g === 0 ? 0 : s.get(g - 1, v), - _ = v === 0 ? 0 : s.get(g, v - 1), - w - t.getElement(g) === n.getElement(v) - ? (g === 0 || v === 0 ? (w = 0) : (w = s.get(g - 1, v - 1)), - g > 0 && v > 0 && o.get(g - 1, v - 1) === 3 && (w += a.get(g - 1, v - 1)), - (w += i ? i(g, v) : 1)) - : (w = -1) - let C = Math.max(N, _, w) - if (C === w) { - let S = g > 0 && v > 0 ? a.get(g - 1, v - 1) : 0 - a.set(g, v, S + 1), o.set(g, v, 3) - } else - C === N ? (a.set(g, v, 0), o.set(g, v, 1)) : C === _ && (a.set(g, v, 0), o.set(g, v, 2)) - s.set(g, v, C) - } - let u = [], - l = t.length, - c = n.length - function d(g, v) { - ;(g + 1 !== l || v + 1 !== c) && u.push(new Pe(new Ee(g + 1, l), new Ee(v + 1, c))), - (l = g), - (c = v) - } - let h = t.length - 1, - m = n.length - 1 - for (; h >= 0 && m >= 0; ) - o.get(h, m) === 3 ? (d(h, m), h--, m--) : o.get(h, m) === 1 ? h-- : m-- - return d(-1, -1), u.reverse(), new mn(u, !1) - } - } - var vi = class { - compute(t, n, r = ur.instance) { - if (t.length === 0 || n.length === 0) return mn.trivial(t, n) - let i = t, - s = n - function o(v, N) { - for (; v < i.length && N < s.length && i.getElement(v) === s.getElement(N); ) v++, N++ - return v - } - let a = 0, - u = new Yl() - u.set(0, o(0, 0)) - let l = new Jl() - l.set(0, u.get(0) === 0 ? null : new ma(null, 0, 0, u.get(0))) - let c = 0 - e: for (;;) { - if ((a++, !r.isValid())) return mn.trivialTimedOut(i, s) - let v = -Math.min(a, s.length + (a % 2)), - N = Math.min(a, i.length + (a % 2)) - for (c = v; c <= N; c += 2) { - let _ = 0, - w = c === N ? -1 : u.get(c + 1), - C = c === v ? -1 : u.get(c - 1) + 1 - _++ - let S = Math.min(Math.max(w, C), i.length), - k = S - c - if ((_++, S > i.length || k > s.length)) continue - let M = o(S, k) - u.set(c, M) - let I = S === w ? l.get(c + 1) : l.get(c - 1) - if ( - (l.set(c, M !== S ? new ma(I, S, k, M - S) : I), - u.get(c) === i.length && u.get(c) - c === s.length) - ) - break e - } - } - let d = l.get(c), - h = [], - m = i.length, - g = s.length - for (;;) { - let v = d ? d.x + d.length : 0, - N = d ? d.y + d.length : 0 - if (((v !== m || N !== g) && h.push(new Pe(new Ee(v, m), new Ee(N, g))), !d)) break - ;(m = d.x), (g = d.y), (d = d.prev) - } - return h.reverse(), new mn(h, !1) - } - }, - ma = class { - constructor(t, n, r, i) { - ;(this.prev = t), (this.x = n), (this.y = r), (this.length = i) - } - }, - Yl = class { - constructor() { - ;(this.positiveArr = new Int32Array(10)), (this.negativeArr = new Int32Array(10)) - } - get(t) { - return t < 0 ? ((t = -t - 1), this.negativeArr[t]) : this.positiveArr[t] - } - set(t, n) { - if (t < 0) { - if (((t = -t - 1), t >= this.negativeArr.length)) { - let r = this.negativeArr - ;(this.negativeArr = new Int32Array(r.length * 2)), this.negativeArr.set(r) - } - this.negativeArr[t] = n - } else { - if (t >= this.positiveArr.length) { - let r = this.positiveArr - ;(this.positiveArr = new Int32Array(r.length * 2)), this.positiveArr.set(r) - } - this.positiveArr[t] = n - } - } - }, - Jl = class { - constructor() { - ;(this.positiveArr = []), (this.negativeArr = []) - } - get(t) { - return t < 0 ? ((t = -t - 1), this.negativeArr[t]) : this.positiveArr[t] - } - set(t, n) { - t < 0 ? ((t = -t - 1), (this.negativeArr[t] = n)) : (this.positiveArr[t] = n) - } - } - var lr = class { - constructor(t, n, r) { - ;(this.lines = t), - (this.range = n), - (this.considerWhitespaceChanges = r), - (this.elements = []), - (this.firstElementOffsetByLineIdx = []), - (this.lineStartOffsets = []), - (this.trimmedWsLengthsByLineIdx = []), - this.firstElementOffsetByLineIdx.push(0) - for (let i = this.range.startLineNumber; i <= this.range.endLineNumber; i++) { - let s = t[i - 1], - o = 0 - i === this.range.startLineNumber && - this.range.startColumn > 1 && - ((o = this.range.startColumn - 1), (s = s.substring(o))), - this.lineStartOffsets.push(o) - let a = 0 - if (!r) { - let l = s.trimStart() - ;(a = s.length - l.length), (s = l.trimEnd()) - } - this.trimmedWsLengthsByLineIdx.push(a) - let u = - i === this.range.endLineNumber - ? Math.min(this.range.endColumn - 1 - o - a, s.length) - : s.length - for (let l = 0; l < u; l++) this.elements.push(s.charCodeAt(l)) - i < this.range.endLineNumber && - (this.elements.push( - ` -`.charCodeAt(0) - ), - this.firstElementOffsetByLineIdx.push(this.elements.length)) - } - } - toString() { - return `Slice: "${this.text}"` - } - get text() { - return this.getText(new Ee(0, this.length)) - } - getText(t) { - return this.elements - .slice(t.start, t.endExclusive) - .map((n) => String.fromCharCode(n)) - .join('') - } - getElement(t) { - return this.elements[t] - } - get length() { - return this.elements.length - } - getBoundaryScore(t) { - let n = Gp(t > 0 ? this.elements[t - 1] : -1), - r = Gp(t < this.elements.length ? this.elements[t] : -1) - if (n === 7 && r === 8) return 0 - if (n === 8) return 150 - let i = 0 - return n !== r && ((i += 10), n === 0 && r === 1 && (i += 1)), (i += qp(n)), (i += qp(r)), i - } - translateOffset(t, n = 'right') { - let r = Tr(this.firstElementOffsetByLineIdx, (s) => s <= t), - i = t - this.firstElementOffsetByLineIdx[r] - return new Se( - this.range.startLineNumber + r, - 1 + - this.lineStartOffsets[r] + - i + - (i === 0 && n === 'left' ? 0 : this.trimmedWsLengthsByLineIdx[r]) - ) - } - translateRange(t) { - let n = this.translateOffset(t.start, 'right'), - r = this.translateOffset(t.endExclusive, 'left') - return r.isBefore(n) ? oe.fromPositions(r, r) : oe.fromPositions(n, r) - } - findWordContaining(t) { - if (t < 0 || t >= this.elements.length || !Xl(this.elements[t])) return - let n = t - for (; n > 0 && Xl(this.elements[n - 1]); ) n-- - let r = t - for (; r < this.elements.length && Xl(this.elements[r]); ) r++ - return new Ee(n, r) - } - countLinesIn(t) { - return ( - this.translateOffset(t.endExclusive).lineNumber - this.translateOffset(t.start).lineNumber - ) - } - isStronglyEqual(t, n) { - return this.elements[t] === this.elements[n] - } - extendToFullLines(t) { - let n = Mn(this.firstElementOffsetByLineIdx, (i) => i <= t.start) ?? 0, - r = Ip(this.firstElementOffsetByLineIdx, (i) => t.endExclusive <= i) ?? this.elements.length - return new Ee(n, r) - } - } - function Xl(e) { - return (e >= 97 && e <= 122) || (e >= 65 && e <= 90) || (e >= 48 && e <= 57) - } - var S5 = { 0: 0, 1: 0, 2: 0, 3: 10, 4: 2, 5: 30, 6: 3, 7: 10, 8: 10 } - function qp(e) { - return S5[e] - } - function Gp(e) { - return e === 10 - ? 8 - : e === 13 - ? 7 - : Ps(e) - ? 6 - : e >= 97 && e <= 122 - ? 0 - : e >= 65 && e <= 90 - ? 1 - : e >= 48 && e <= 57 - ? 2 - : e === -1 - ? 3 - : e === 44 || e === 59 - ? 5 - : 4 - } - function Wp(e, t, n, r, i, s) { - let { moves: o, excludedChanges: a } = F5(e, t, n, s) - if (!s.isValid()) return [] - let u = e.filter((c) => !a.has(c)), - l = w5(u, r, i, t, n, s) - return ( - $p(o, l), - (o = L5(o)), - (o = o.filter((c) => { - let d = c.original - .toOffsetRange() - .slice(t) - .map((m) => m.trim()) - return ( - d.join(` -`).length >= 15 && A5(d, (m) => m.length >= 2) >= 2 - ) - })), - (o = C5(e, o)), - o - ) - } - function A5(e, t) { - let n = 0 - for (let r of e) t(r) && n++ - return n - } - function F5(e, t, n, r) { - let i = [], - s = e - .filter((u) => u.modified.isEmpty && u.original.length >= 3) - .map((u) => new Ms(u.original, t, u)), - o = new Set( - e - .filter((u) => u.original.isEmpty && u.modified.length >= 3) - .map((u) => new Ms(u.modified, n, u)) - ), - a = new Set() - for (let u of s) { - let l = -1, - c - for (let d of o) { - let h = u.computeSimilarity(d) - h > l && ((l = h), (c = d)) - } - if ( - (l > 0.9 && - c && - (o.delete(c), i.push(new pn(u.range, c.range)), a.add(u.source), a.add(c.source)), - !r.isValid()) - ) - return { moves: i, excludedChanges: a } - } - return { moves: i, excludedChanges: a } - } - function w5(e, t, n, r, i, s) { - let o = [], - a = new ra() - for (let h of e) - for (let m = h.original.startLineNumber; m < h.original.endLineNumberExclusive - 2; m++) { - let g = `${t[m - 1]}:${t[m + 1 - 1]}:${t[m + 2 - 1]}` - a.add(g, { range: new ge(m, m + 3) }) - } - let u = [] - e.sort(ks((h) => h.modified.startLineNumber, Os)) - for (let h of e) { - let m = [] - for (let g = h.modified.startLineNumber; g < h.modified.endLineNumberExclusive - 2; g++) { - let v = `${n[g - 1]}:${n[g + 1 - 1]}:${n[g + 2 - 1]}`, - N = new ge(g, g + 3), - _ = [] - a.forEach(v, ({ range: w }) => { - for (let S of m) - if ( - S.originalLineRange.endLineNumberExclusive + 1 === w.endLineNumberExclusive && - S.modifiedLineRange.endLineNumberExclusive + 1 === N.endLineNumberExclusive - ) { - ;(S.originalLineRange = new ge( - S.originalLineRange.startLineNumber, - w.endLineNumberExclusive - )), - (S.modifiedLineRange = new ge( - S.modifiedLineRange.startLineNumber, - N.endLineNumberExclusive - )), - _.push(S) - return - } - let C = { modifiedLineRange: N, originalLineRange: w } - u.push(C), _.push(C) - }), - (m = _) - } - if (!s.isValid()) return [] - } - u.sort(jp(ks((h) => h.modifiedLineRange.length, Os))) - let l = new Sr(), - c = new Sr() - for (let h of u) { - let m = h.modifiedLineRange.startLineNumber - h.originalLineRange.startLineNumber, - g = l.subtractFrom(h.modifiedLineRange), - v = c.subtractFrom(h.originalLineRange).getWithDelta(m), - N = g.getIntersection(v) - for (let _ of N.ranges) { - if (_.length < 3) continue - let w = _, - C = _.delta(-m) - o.push(new pn(C, w)), l.addRange(w), c.addRange(C) - } - } - o.sort(ks((h) => h.original.startLineNumber, Os)) - let d = new Is(e) - for (let h = 0; h < o.length; h++) { - let m = o[h], - g = d.findLastMonotonous((M) => M.original.startLineNumber <= m.original.startLineNumber), - v = Mn(e, (M) => M.modified.startLineNumber <= m.modified.startLineNumber), - N = Math.max( - m.original.startLineNumber - g.original.startLineNumber, - m.modified.startLineNumber - v.modified.startLineNumber - ), - _ = d.findLastMonotonous( - (M) => M.original.startLineNumber < m.original.endLineNumberExclusive - ), - w = Mn(e, (M) => M.modified.startLineNumber < m.modified.endLineNumberExclusive), - C = Math.max( - _.original.endLineNumberExclusive - m.original.endLineNumberExclusive, - w.modified.endLineNumberExclusive - m.modified.endLineNumberExclusive - ), - S - for (S = 0; S < N; S++) { - let M = m.original.startLineNumber - S - 1, - I = m.modified.startLineNumber - S - 1 - if ( - M > r.length || - I > i.length || - l.contains(I) || - c.contains(M) || - !Hp(r[M - 1], i[I - 1], s) - ) - break - } - S > 0 && - (c.addRange(new ge(m.original.startLineNumber - S, m.original.startLineNumber)), - l.addRange(new ge(m.modified.startLineNumber - S, m.modified.startLineNumber))) - let k - for (k = 0; k < C; k++) { - let M = m.original.endLineNumberExclusive + k, - I = m.modified.endLineNumberExclusive + k - if ( - M > r.length || - I > i.length || - l.contains(I) || - c.contains(M) || - !Hp(r[M - 1], i[I - 1], s) - ) - break - } - k > 0 && - (c.addRange( - new ge(m.original.endLineNumberExclusive, m.original.endLineNumberExclusive + k) - ), - l.addRange( - new ge(m.modified.endLineNumberExclusive, m.modified.endLineNumberExclusive + k) - )), - (S > 0 || k > 0) && - (o[h] = new pn( - new ge(m.original.startLineNumber - S, m.original.endLineNumberExclusive + k), - new ge(m.modified.startLineNumber - S, m.modified.endLineNumberExclusive + k) - )) - } - return o - } - function Hp(e, t, n) { - if (e.trim() === t.trim()) return !0 - if (e.length > 300 && t.length > 300) return !1 - let i = new vi().compute( - new lr([e], new oe(1, 1, 1, e.length), !1), - new lr([t], new oe(1, 1, 1, t.length), !1), - n - ), - s = 0, - o = Pe.invert(i.diffs, e.length) - for (let c of o) - c.seq1Range.forEach((d) => { - Ps(e.charCodeAt(d)) || s++ - }) - function a(c) { - let d = 0 - for (let h = 0; h < e.length; h++) Ps(c.charCodeAt(h)) || d++ - return d - } - let u = a(e.length > t.length ? e : t) - return s / u > 0.6 && u > 10 - } - function L5(e) { - if (e.length === 0) return e - e.sort(ks((n) => n.original.startLineNumber, Os)) - let t = [e[0]] - for (let n = 1; n < e.length; n++) { - let r = t[t.length - 1], - i = e[n], - s = i.original.startLineNumber - r.original.endLineNumberExclusive, - o = i.modified.startLineNumber - r.modified.endLineNumberExclusive - if (s >= 0 && o >= 0 && s + o <= 2) { - t[t.length - 1] = r.join(i) - continue - } - t.push(i) - } - return t - } - function C5(e, t) { - let n = new Is(e) - return ( - (t = t.filter((r) => { - let i = - n.findLastMonotonous( - (a) => a.original.startLineNumber < r.original.endLineNumberExclusive - ) || new pn(new ge(1, 1), new ge(1, 1)), - s = Mn(e, (a) => a.modified.startLineNumber < r.modified.endLineNumberExclusive) - return i !== s - })), - t - ) - } - function Kl(e, t, n) { - let r = n - return (r = Qp(e, t, r)), (r = Qp(e, t, r)), (r = I5(e, t, r)), r - } - function Qp(e, t, n) { - if (n.length === 0) return n - let r = [] - r.push(n[0]) - for (let s = 1; s < n.length; s++) { - let o = r[r.length - 1], - a = n[s] - if (a.seq1Range.isEmpty || a.seq2Range.isEmpty) { - let u = a.seq1Range.start - o.seq1Range.endExclusive, - l - for ( - l = 1; - l <= u && - !( - e.getElement(a.seq1Range.start - l) !== e.getElement(a.seq1Range.endExclusive - l) || - t.getElement(a.seq2Range.start - l) !== t.getElement(a.seq2Range.endExclusive - l) - ); - l++ - ); - if ((l--, l === u)) { - r[r.length - 1] = new Pe( - new Ee(o.seq1Range.start, a.seq1Range.endExclusive - u), - new Ee(o.seq2Range.start, a.seq2Range.endExclusive - u) - ) - continue - } - a = a.delta(-l) - } - r.push(a) - } - let i = [] - for (let s = 0; s < r.length - 1; s++) { - let o = r[s + 1], - a = r[s] - if (a.seq1Range.isEmpty || a.seq2Range.isEmpty) { - let u = o.seq1Range.start - a.seq1Range.endExclusive, - l - for ( - l = 0; - l < u && - !( - !e.isStronglyEqual(a.seq1Range.start + l, a.seq1Range.endExclusive + l) || - !t.isStronglyEqual(a.seq2Range.start + l, a.seq2Range.endExclusive + l) - ); - l++ - ); - if (l === u) { - r[s + 1] = new Pe( - new Ee(a.seq1Range.start + u, o.seq1Range.endExclusive), - new Ee(a.seq2Range.start + u, o.seq2Range.endExclusive) - ) - continue - } - l > 0 && (a = a.delta(l)) - } - i.push(a) - } - return r.length > 0 && i.push(r[r.length - 1]), i - } - function I5(e, t, n) { - if (!e.getBoundaryScore || !t.getBoundaryScore) return n - for (let r = 0; r < n.length; r++) { - let i = r > 0 ? n[r - 1] : void 0, - s = n[r], - o = r + 1 < n.length ? n[r + 1] : void 0, - a = new Ee(i ? i.seq1Range.endExclusive + 1 : 0, o ? o.seq1Range.start - 1 : e.length), - u = new Ee(i ? i.seq2Range.endExclusive + 1 : 0, o ? o.seq2Range.start - 1 : t.length) - s.seq1Range.isEmpty - ? (n[r] = zp(s, e, t, a, u)) - : s.seq2Range.isEmpty && (n[r] = zp(s.swap(), t, e, u, a).swap()) - } - return n - } - function zp(e, t, n, r, i) { - let o = 1 - for ( - ; - e.seq1Range.start - o >= r.start && - e.seq2Range.start - o >= i.start && - n.isStronglyEqual(e.seq2Range.start - o, e.seq2Range.endExclusive - o) && - o < 100; +`+ac(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` - ) - o++ - o-- - let a = 0 - for ( - ; - e.seq1Range.start + a < r.endExclusive && - e.seq2Range.endExclusive + a < i.endExclusive && - n.isStronglyEqual(e.seq2Range.start + a, e.seq2Range.endExclusive + a) && - a < 100; - - ) - a++ - if (o === 0 && a === 0) return e - let u = 0, - l = -1 - for (let c = -o; c <= a; c++) { - let d = e.seq2Range.start + c, - h = e.seq2Range.endExclusive + c, - m = e.seq1Range.start + c, - g = t.getBoundaryScore(m) + n.getBoundaryScore(d) + n.getBoundaryScore(h) - g > l && ((l = g), (u = c)) - } - return e.delta(u) - } - function Yp(e, t, n) { - let r = [] - for (let i of n) { - let s = r[r.length - 1] - if (!s) { - r.push(i) - continue - } - i.seq1Range.start - s.seq1Range.endExclusive <= 2 || - i.seq2Range.start - s.seq2Range.endExclusive <= 2 - ? (r[r.length - 1] = new Pe(s.seq1Range.join(i.seq1Range), s.seq2Range.join(i.seq2Range))) - : r.push(i) - } - return r - } - function Jp(e, t, n) { - let r = Pe.invert(n, e.length), - i = [], - s = new hn(0, 0) - function o(u, l) { - if (u.offset1 < s.offset1 || u.offset2 < s.offset2) return - let c = e.findWordContaining(u.offset1), - d = t.findWordContaining(u.offset2) - if (!c || !d) return - let h = new Pe(c, d), - m = h.intersect(l), - g = m.seq1Range.length, - v = m.seq2Range.length - for (; r.length > 0; ) { - let N = r[0] - if (!(N.seq1Range.intersects(h.seq1Range) || N.seq2Range.intersects(h.seq2Range))) break - let w = e.findWordContaining(N.seq1Range.start), - C = t.findWordContaining(N.seq2Range.start), - S = new Pe(w, C), - k = S.intersect(N) - if ( - ((g += k.seq1Range.length), - (v += k.seq2Range.length), - (h = h.join(S)), - h.seq1Range.endExclusive >= N.seq1Range.endExclusive) - ) - r.shift() - else break - } - g + v < ((h.seq1Range.length + h.seq2Range.length) * 2) / 3 && i.push(h), - (s = h.getEndExclusives()) - } - for (; r.length > 0; ) { - let u = r.shift() - u.seq1Range.isEmpty || (o(u.getStarts(), u), o(u.getEndExclusives().delta(-1), u)) - } - return R5(n, i) - } - function R5(e, t) { - let n = [] - for (; e.length > 0 || t.length > 0; ) { - let r = e[0], - i = t[0], - s - r && (!i || r.seq1Range.start < i.seq1Range.start) ? (s = e.shift()) : (s = t.shift()), - n.length > 0 && n[n.length - 1].seq1Range.endExclusive >= s.seq1Range.start - ? (n[n.length - 1] = n[n.length - 1].join(s)) - : n.push(s) - } - return n - } - function Xp(e, t, n) { - let r = n - if (r.length === 0) return r - let i = 0, - s - do { - s = !1 - let o = [r[0]] - for (let a = 1; a < r.length; a++) { - let c = function (h, m) { - let g = new Ee(l.seq1Range.endExclusive, u.seq1Range.start) - return ( - e.getText(g).replace(/\s/g, '').length <= 4 && - (h.seq1Range.length + h.seq2Range.length > 5 || - m.seq1Range.length + m.seq2Range.length > 5) - ) - }, - u = r[a], - l = o[o.length - 1] - c(l, u) ? ((s = !0), (o[o.length - 1] = o[o.length - 1].join(u))) : o.push(u) - } - r = o - } while (i++ < 10 && s) - return r - } - function Kp(e, t, n) { - let r = n - if (r.length === 0) return r - let i = 0, - s - do { - s = !1 - let a = [r[0]] - for (let u = 1; u < r.length; u++) { - let d = function (m, g) { - let v = new Ee(c.seq1Range.endExclusive, l.seq1Range.start) - if (e.countLinesIn(v) > 5 || v.length > 500) return !1 - let _ = e.getText(v).trim() - if (_.length > 20 || _.split(/\r\n|\r|\n/).length > 1) return !1 - let w = e.countLinesIn(m.seq1Range), - C = m.seq1Range.length, - S = t.countLinesIn(m.seq2Range), - k = m.seq2Range.length, - M = e.countLinesIn(g.seq1Range), - I = g.seq1Range.length, - B = t.countLinesIn(g.seq2Range), - L = g.seq2Range.length, - A = 2 * 40 + 50 - function X(z) { - return Math.min(z, A) - } - return ( - Math.pow(Math.pow(X(w * 40 + C), 1.5) + Math.pow(X(S * 40 + k), 1.5), 1.5) + - Math.pow(Math.pow(X(M * 40 + I), 1.5) + Math.pow(X(B * 40 + L), 1.5), 1.5) > - (A ** 1.5) ** 1.5 * 1.3 - ) - }, - l = r[u], - c = a[a.length - 1] - d(c, l) ? ((s = !0), (a[a.length - 1] = a[a.length - 1].join(l))) : a.push(l) - } - r = a - } while (i++ < 10 && s) - let o = [] - return ( - Up(r, (a, u, l) => { - let c = u - function d(_) { - return ( - _.length > 0 && _.trim().length <= 3 && u.seq1Range.length + u.seq2Range.length > 100 - ) - } - let h = e.extendToFullLines(u.seq1Range), - m = e.getText(new Ee(h.start, u.seq1Range.start)) - d(m) && (c = c.deltaStart(-m.length)) - let g = e.getText(new Ee(u.seq1Range.endExclusive, h.endExclusive)) - d(g) && (c = c.deltaEnd(g.length)) - let v = Pe.fromOffsetPairs(a ? a.getEndExclusives() : hn.zero, l ? l.getStarts() : hn.max), - N = c.intersect(v) - o.length > 0 && N.getStarts().equals(o[o.length - 1].getEndExclusives()) - ? (o[o.length - 1] = o[o.length - 1].join(N)) - : o.push(N) - }), - o - ) - } - var Bs = class { - constructor(t, n) { - ;(this.trimmedHash = t), (this.lines = n) - } - getElement(t) { - return this.trimmedHash[t] - } - get length() { - return this.trimmedHash.length - } - getBoundaryScore(t) { - let n = t === 0 ? 0 : Zp(this.lines[t - 1]), - r = t === this.lines.length ? 0 : Zp(this.lines[t]) - return 1e3 - (n + r) - } - getText(t) { - return this.lines.slice(t.start, t.endExclusive).join(` -`) - } - isStronglyEqual(t, n) { - return this.lines[t] === this.lines[n] - } - } - function Zp(e) { - let t = 0 - for (; t < e.length && (e.charCodeAt(t) === 32 || e.charCodeAt(t) === 9); ) t++ - return t - } - var ga = class { - constructor() { - ;(this.dynamicProgrammingDiffing = new ha()), (this.myersDiffingAlgorithm = new vi()) - } - computeDiff(t, n, r) { - if (t.length <= 1 && Pp(t, n, (k, M) => k === M)) return new ar([], [], !1) - if ((t.length === 1 && t[0].length === 0) || (n.length === 1 && n[0].length === 0)) - return new ar( - [ - new Pn(new ge(1, t.length + 1), new ge(1, n.length + 1), [ - new Ot( - new oe(1, 1, t.length, t[t.length - 1].length + 1), - new oe(1, 1, n.length, n[n.length - 1].length + 1) - ) - ]) - ], - [], - !1 - ) - let i = r.maxComputationTimeMs === 0 ? ur.instance : new pa(r.maxComputationTimeMs), - s = !r.ignoreTrimWhitespace, - o = new Map() - function a(k) { - let M = o.get(k) - return M === void 0 && ((M = o.size), o.set(k, M)), M - } - let u = t.map((k) => a(k.trim())), - l = n.map((k) => a(k.trim())), - c = new Bs(u, t), - d = new Bs(l, n), - h = (() => - c.length + d.length < 1700 - ? this.dynamicProgrammingDiffing.compute(c, d, i, (k, M) => - t[k] === n[M] ? (n[M].length === 0 ? 0.1 : 1 + Math.log(1 + n[M].length)) : 0.99 - ) - : this.myersDiffingAlgorithm.compute(c, d, i))(), - m = h.diffs, - g = h.hitTimeout - ;(m = Kl(c, d, m)), (m = Xp(c, d, m)) - let v = [], - N = (k) => { - if (s) - for (let M = 0; M < k; M++) { - let I = _ + M, - B = w + M - if (t[I] !== n[B]) { - let L = this.refineDiff(t, n, new Pe(new Ee(I, I + 1), new Ee(B, B + 1)), i, s) - for (let A of L.mappings) v.push(A) - L.hitTimeout && (g = !0) - } - } - }, - _ = 0, - w = 0 - for (let k of m) { - Nr(() => k.seq1Range.start - _ === k.seq2Range.start - w) - let M = k.seq1Range.start - _ - N(M), (_ = k.seq1Range.endExclusive), (w = k.seq2Range.endExclusive) - let I = this.refineDiff(t, n, k, i, s) - I.hitTimeout && (g = !0) - for (let B of I.mappings) v.push(B) - } - N(t.length - _) - let C = eh(v, t, n), - S = [] - return ( - r.computeMoves && (S = this.computeMoves(C, t, n, u, l, i, s)), - Nr(() => { - function k(I, B) { - if (I.lineNumber < 1 || I.lineNumber > B.length) return !1 - let L = B[I.lineNumber - 1] - return !(I.column < 1 || I.column > L.length + 1) - } - function M(I, B) { - return !( - I.startLineNumber < 1 || - I.startLineNumber > B.length + 1 || - I.endLineNumberExclusive < 1 || - I.endLineNumberExclusive > B.length + 1 - ) - } - for (let I of C) { - if (!I.innerChanges) return !1 - for (let B of I.innerChanges) - if ( - !( - k(B.modifiedRange.getStartPosition(), n) && - k(B.modifiedRange.getEndPosition(), n) && - k(B.originalRange.getStartPosition(), t) && - k(B.originalRange.getEndPosition(), t) - ) - ) - return !1 - if (!M(I.modified, n) || !M(I.original, t)) return !1 - } - return !0 - }), - new ar(C, S, g) - ) - } - computeMoves(t, n, r, i, s, o, a) { - return Wp(t, n, r, i, s, o).map((c) => { - let d = this.refineDiff( - n, - r, - new Pe(c.original.toOffsetRange(), c.modified.toOffsetRange()), - o, - a - ), - h = eh(d.mappings, n, r, !0) - return new aa(c, h) - }) - } - refineDiff(t, n, r, i, s) { - let a = O5(r).toRangeMapping2(t, n), - u = new lr(t, a.originalRange, s), - l = new lr(n, a.modifiedRange, s), - c = - u.length + l.length < 500 - ? this.dynamicProgrammingDiffing.compute(u, l, i) - : this.myersDiffingAlgorithm.compute(u, l, i), - d = !1, - h = c.diffs - d && Pe.assertSorted(h), - (h = Kl(u, l, h)), - d && Pe.assertSorted(h), - (h = Jp(u, l, h)), - d && Pe.assertSorted(h), - (h = Yp(u, l, h)), - d && Pe.assertSorted(h), - (h = Kp(u, l, h)), - d && Pe.assertSorted(h) - let m = h.map((g) => new Ot(u.translateRange(g.seq1Range), l.translateRange(g.seq2Range))) - return d && Ot.assertSorted(m), { mappings: m, hitTimeout: c.hitTimeout } - } - } - function eh(e, t, n, r = !1) { - let i = [] - for (let s of Bp( - e.map((o) => k5(o, t, n)), - (o, a) => o.original.overlapOrTouch(a.original) || o.modified.overlapOrTouch(a.modified) - )) { - let o = s[0], - a = s[s.length - 1] - i.push( - new Pn( - o.original.join(a.original), - o.modified.join(a.modified), - s.map((u) => u.innerChanges[0]) - ) - ) - } - return ( - Nr(() => - !r && - i.length > 0 && - (i[0].modified.startLineNumber !== i[0].original.startLineNumber || - n.length - i[i.length - 1].modified.endLineNumberExclusive !== - t.length - i[i.length - 1].original.endLineNumberExclusive) - ? !1 - : Ls( - i, - (s, o) => - o.original.startLineNumber - s.original.endLineNumberExclusive === - o.modified.startLineNumber - s.modified.endLineNumberExclusive && - s.original.endLineNumberExclusive < o.original.startLineNumber && - s.modified.endLineNumberExclusive < o.modified.startLineNumber - ) - ), - i - ) - } - function k5(e, t, n) { - let r = 0, - i = 0 - e.modifiedRange.endColumn === 1 && - e.originalRange.endColumn === 1 && - e.originalRange.startLineNumber + r <= e.originalRange.endLineNumber && - e.modifiedRange.startLineNumber + r <= e.modifiedRange.endLineNumber && - (i = -1), - e.modifiedRange.startColumn - 1 >= n[e.modifiedRange.startLineNumber - 1].length && - e.originalRange.startColumn - 1 >= t[e.originalRange.startLineNumber - 1].length && - e.originalRange.startLineNumber <= e.originalRange.endLineNumber + i && - e.modifiedRange.startLineNumber <= e.modifiedRange.endLineNumber + i && - (r = 1) - let s = new ge(e.originalRange.startLineNumber + r, e.originalRange.endLineNumber + 1 + i), - o = new ge(e.modifiedRange.startLineNumber + r, e.modifiedRange.endLineNumber + 1 + i) - return new Pn(s, o, [e]) - } - function O5(e) { - return new pn( - new ge(e.seq1Range.start + 1, e.seq1Range.endExclusive + 1), - new ge(e.seq2Range.start + 1, e.seq2Range.endExclusive + 1) - ) - } - var Zl = { getLegacy: () => new fa(), getDefault: () => new ga() } - function cr(e, t) { - let n = Math.pow(10, t) - return Math.round(e * n) / n - } - var Je = class { - constructor(t, n, r, i = 1) { - ;(this._rgbaBrand = void 0), - (this.r = Math.min(255, Math.max(0, t)) | 0), - (this.g = Math.min(255, Math.max(0, n)) | 0), - (this.b = Math.min(255, Math.max(0, r)) | 0), - (this.a = cr(Math.max(Math.min(1, i), 0), 3)) - } - static equals(t, n) { - return t.r === n.r && t.g === n.g && t.b === n.b && t.a === n.a - } - }, - gn = class e { - constructor(t, n, r, i) { - ;(this._hslaBrand = void 0), - (this.h = Math.max(Math.min(360, t), 0) | 0), - (this.s = cr(Math.max(Math.min(1, n), 0), 3)), - (this.l = cr(Math.max(Math.min(1, r), 0), 3)), - (this.a = cr(Math.max(Math.min(1, i), 0), 3)) - } - static equals(t, n) { - return t.h === n.h && t.s === n.s && t.l === n.l && t.a === n.a - } - static fromRGBA(t) { - let n = t.r / 255, - r = t.g / 255, - i = t.b / 255, - s = t.a, - o = Math.max(n, r, i), - a = Math.min(n, r, i), - u = 0, - l = 0, - c = (a + o) / 2, - d = o - a - if (d > 0) { - switch (((l = Math.min(c <= 0.5 ? d / (2 * c) : d / (2 - 2 * c), 1)), o)) { - case n: - u = (r - i) / d + (r < i ? 6 : 0) - break - case r: - u = (i - n) / d + 2 - break - case i: - u = (n - r) / d + 4 - break - } - ;(u *= 60), (u = Math.round(u)) - } - return new e(u, l, c, s) - } - static _hue2rgb(t, n, r) { - return ( - r < 0 && (r += 1), - r > 1 && (r -= 1), - r < 1 / 6 - ? t + (n - t) * 6 * r - : r < 1 / 2 - ? n - : r < 2 / 3 - ? t + (n - t) * (2 / 3 - r) * 6 - : t - ) - } - static toRGBA(t) { - let n = t.h / 360, - { s: r, l: i, a: s } = t, - o, - a, - u - if (r === 0) o = a = u = i - else { - let l = i < 0.5 ? i * (1 + r) : i + r - i * r, - c = 2 * i - l - ;(o = e._hue2rgb(c, l, n + 1 / 3)), - (a = e._hue2rgb(c, l, n)), - (u = e._hue2rgb(c, l, n - 1 / 3)) - } - return new Je(Math.round(o * 255), Math.round(a * 255), Math.round(u * 255), s) - } - }, - bi = class e { - constructor(t, n, r, i) { - ;(this._hsvaBrand = void 0), - (this.h = Math.max(Math.min(360, t), 0) | 0), - (this.s = cr(Math.max(Math.min(1, n), 0), 3)), - (this.v = cr(Math.max(Math.min(1, r), 0), 3)), - (this.a = cr(Math.max(Math.min(1, i), 0), 3)) - } - static equals(t, n) { - return t.h === n.h && t.s === n.s && t.v === n.v && t.a === n.a - } - static fromRGBA(t) { - let n = t.r / 255, - r = t.g / 255, - i = t.b / 255, - s = Math.max(n, r, i), - o = Math.min(n, r, i), - a = s - o, - u = s === 0 ? 0 : a / s, - l - return ( - a === 0 - ? (l = 0) - : s === n - ? (l = ((((r - i) / a) % 6) + 6) % 6) - : s === r - ? (l = (i - n) / a + 2) - : (l = (n - r) / a + 4), - new e(Math.round(l * 60), u, s, t.a) - ) - } - static toRGBA(t) { - let { h: n, s: r, v: i, a: s } = t, - o = i * r, - a = o * (1 - Math.abs(((n / 60) % 2) - 1)), - u = i - o, - [l, c, d] = [0, 0, 0] - return ( - n < 60 - ? ((l = o), (c = a)) - : n < 120 - ? ((l = a), (c = o)) - : n < 180 - ? ((c = o), (d = a)) - : n < 240 - ? ((c = a), (d = o)) - : n < 300 - ? ((l = a), (d = o)) - : n <= 360 && ((l = o), (d = a)), - (l = Math.round((l + u) * 255)), - (c = Math.round((c + u) * 255)), - (d = Math.round((d + u) * 255)), - new Je(l, c, d, s) - ) - } - }, - Ar = class e { - static fromHex(t) { - return e.Format.CSS.parseHex(t) || e.red - } - static equals(t, n) { - return !t && !n ? !0 : !t || !n ? !1 : t.equals(n) - } - get hsla() { - return this._hsla ? this._hsla : gn.fromRGBA(this.rgba) - } - get hsva() { - return this._hsva ? this._hsva : bi.fromRGBA(this.rgba) - } - constructor(t) { - if (t) - if (t instanceof Je) this.rgba = t - else if (t instanceof gn) (this._hsla = t), (this.rgba = gn.toRGBA(t)) - else if (t instanceof bi) (this._hsva = t), (this.rgba = bi.toRGBA(t)) - else throw new Error('Invalid color ctor argument') - else throw new Error('Color needs a value') - } - equals(t) { - return ( - !!t && - Je.equals(this.rgba, t.rgba) && - gn.equals(this.hsla, t.hsla) && - bi.equals(this.hsva, t.hsva) - ) - } - getRelativeLuminance() { - let t = e._relativeLuminanceForComponent(this.rgba.r), - n = e._relativeLuminanceForComponent(this.rgba.g), - r = e._relativeLuminanceForComponent(this.rgba.b), - i = 0.2126 * t + 0.7152 * n + 0.0722 * r - return cr(i, 4) - } - static _relativeLuminanceForComponent(t) { - let n = t / 255 - return n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4) - } - isLighter() { - return (this.rgba.r * 299 + this.rgba.g * 587 + this.rgba.b * 114) / 1e3 >= 128 - } - isLighterThan(t) { - let n = this.getRelativeLuminance(), - r = t.getRelativeLuminance() - return n > r - } - isDarkerThan(t) { - let n = this.getRelativeLuminance(), - r = t.getRelativeLuminance() - return n < r - } - lighten(t) { - return new e(new gn(this.hsla.h, this.hsla.s, this.hsla.l + this.hsla.l * t, this.hsla.a)) - } - darken(t) { - return new e(new gn(this.hsla.h, this.hsla.s, this.hsla.l - this.hsla.l * t, this.hsla.a)) - } - transparent(t) { - let { r: n, g: r, b: i, a: s } = this.rgba - return new e(new Je(n, r, i, s * t)) - } - isTransparent() { - return this.rgba.a === 0 - } - isOpaque() { - return this.rgba.a === 1 - } - opposite() { - return new e(new Je(255 - this.rgba.r, 255 - this.rgba.g, 255 - this.rgba.b, this.rgba.a)) - } - makeOpaque(t) { - if (this.isOpaque() || t.rgba.a !== 1) return this - let { r: n, g: r, b: i, a: s } = this.rgba - return new e( - new Je( - t.rgba.r - s * (t.rgba.r - n), - t.rgba.g - s * (t.rgba.g - r), - t.rgba.b - s * (t.rgba.b - i), - 1 - ) - ) - } - toString() { - return this._toString || (this._toString = e.Format.CSS.format(this)), this._toString - } - static getLighterColor(t, n, r) { - if (t.isLighterThan(n)) return t - r = r || 0.5 - let i = t.getRelativeLuminance(), - s = n.getRelativeLuminance() - return (r = (r * (s - i)) / s), t.lighten(r) - } - static getDarkerColor(t, n, r) { - if (t.isDarkerThan(n)) return t - r = r || 0.5 - let i = t.getRelativeLuminance(), - s = n.getRelativeLuminance() - return (r = (r * (i - s)) / i), t.darken(r) - } - static { - this.white = new e(new Je(255, 255, 255, 1)) - } - static { - this.black = new e(new Je(0, 0, 0, 1)) - } - static { - this.red = new e(new Je(255, 0, 0, 1)) - } - static { - this.blue = new e(new Je(0, 0, 255, 1)) - } - static { - this.green = new e(new Je(0, 255, 0, 1)) - } - static { - this.cyan = new e(new Je(0, 255, 255, 1)) - } - static { - this.lightgrey = new e(new Je(211, 211, 211, 1)) - } - static { - this.transparent = new e(new Je(0, 0, 0, 0)) - } - } - ;(function (e) { - let t - ;(function (n) { - let r - ;(function (i) { - function s(v) { - return v.rgba.a === 1 - ? `rgb(${v.rgba.r}, ${v.rgba.g}, ${v.rgba.b})` - : e.Format.CSS.formatRGBA(v) - } - i.formatRGB = s - function o(v) { - return `rgba(${v.rgba.r}, ${v.rgba.g}, ${v.rgba.b}, ${+v.rgba.a.toFixed(2)})` - } - i.formatRGBA = o - function a(v) { - return v.hsla.a === 1 - ? `hsl(${v.hsla.h}, ${(v.hsla.s * 100).toFixed(2)}%, ${(v.hsla.l * 100).toFixed(2)}%)` - : e.Format.CSS.formatHSLA(v) - } - i.formatHSL = a - function u(v) { - return `hsla(${v.hsla.h}, ${(v.hsla.s * 100).toFixed(2)}%, ${(v.hsla.l * 100).toFixed( - 2 - )}%, ${v.hsla.a.toFixed(2)})` - } - i.formatHSLA = u - function l(v) { - let N = v.toString(16) - return N.length !== 2 ? '0' + N : N - } - function c(v) { - return `#${l(v.rgba.r)}${l(v.rgba.g)}${l(v.rgba.b)}` - } - i.formatHex = c - function d(v, N = !1) { - return N && v.rgba.a === 1 - ? e.Format.CSS.formatHex(v) - : `#${l(v.rgba.r)}${l(v.rgba.g)}${l(v.rgba.b)}${l(Math.round(v.rgba.a * 255))}` - } - i.formatHexA = d - function h(v) { - return v.isOpaque() ? e.Format.CSS.formatHex(v) : e.Format.CSS.formatRGBA(v) - } - i.format = h - function m(v) { - let N = v.length - if (N === 0 || v.charCodeAt(0) !== 35) return null - if (N === 7) { - let _ = 16 * g(v.charCodeAt(1)) + g(v.charCodeAt(2)), - w = 16 * g(v.charCodeAt(3)) + g(v.charCodeAt(4)), - C = 16 * g(v.charCodeAt(5)) + g(v.charCodeAt(6)) - return new e(new Je(_, w, C, 1)) - } - if (N === 9) { - let _ = 16 * g(v.charCodeAt(1)) + g(v.charCodeAt(2)), - w = 16 * g(v.charCodeAt(3)) + g(v.charCodeAt(4)), - C = 16 * g(v.charCodeAt(5)) + g(v.charCodeAt(6)), - S = 16 * g(v.charCodeAt(7)) + g(v.charCodeAt(8)) - return new e(new Je(_, w, C, S / 255)) - } - if (N === 4) { - let _ = g(v.charCodeAt(1)), - w = g(v.charCodeAt(2)), - C = g(v.charCodeAt(3)) - return new e(new Je(16 * _ + _, 16 * w + w, 16 * C + C)) - } - if (N === 5) { - let _ = g(v.charCodeAt(1)), - w = g(v.charCodeAt(2)), - C = g(v.charCodeAt(3)), - S = g(v.charCodeAt(4)) - return new e(new Je(16 * _ + _, 16 * w + w, 16 * C + C, (16 * S + S) / 255)) - } - return null - } - i.parseHex = m - function g(v) { - switch (v) { - case 48: - return 0 - case 49: - return 1 - case 50: - return 2 - case 51: - return 3 - case 52: - return 4 - case 53: - return 5 - case 54: - return 6 - case 55: - return 7 - case 56: - return 8 - case 57: - return 9 - case 97: - return 10 - case 65: - return 10 - case 98: - return 11 - case 66: - return 11 - case 99: - return 12 - case 67: - return 12 - case 100: - return 13 - case 68: - return 13 - case 101: - return 14 - case 69: - return 14 - case 102: - return 15 - case 70: - return 15 - } - return 0 - } - })((r = n.CSS || (n.CSS = {}))) - })((t = e.Format || (e.Format = {}))) - })(Ar || (Ar = {})) - function rh(e) { - let t = [] - for (let n of e) { - let r = Number(n) - ;(r || (r === 0 && n.replace(/\s/g, '') !== '')) && t.push(r) - } - return t - } - function ec(e, t, n, r) { - return { red: e / 255, blue: n / 255, green: t / 255, alpha: r } - } - function Vs(e, t) { - let n = t.index, - r = t[0].length - if (!n) return - let i = e.positionAt(n) - return { - startLineNumber: i.lineNumber, - startColumn: i.column, - endLineNumber: i.lineNumber, - endColumn: i.column + r - } - } - function M5(e, t) { - if (!e) return - let n = Ar.Format.CSS.parseHex(t) - if (n) return { range: e, color: ec(n.rgba.r, n.rgba.g, n.rgba.b, n.rgba.a) } - } - function th(e, t, n) { - if (!e || t.length !== 1) return - let i = t[0].values(), - s = rh(i) - return { range: e, color: ec(s[0], s[1], s[2], n ? s[3] : 1) } - } - function nh(e, t, n) { - if (!e || t.length !== 1) return - let i = t[0].values(), - s = rh(i), - o = new Ar(new gn(s[0], s[1] / 100, s[2] / 100, n ? s[3] : 1)) - return { range: e, color: ec(o.rgba.r, o.rgba.g, o.rgba.b, o.rgba.a) } - } - function Us(e, t) { - return typeof e == 'string' ? [...e.matchAll(t)] : e.findMatches(t) - } - function P5(e) { - let t = [], - r = Us( - e, - /\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm - ) - if (r.length > 0) - for (let i of r) { - let s = i.filter((l) => l !== void 0), - o = s[1], - a = s[2] - if (!a) continue - let u - if (o === 'rgb') { - let l = - /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm - u = th(Vs(e, i), Us(a, l), !1) - } else if (o === 'rgba') { - let l = - /^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm - u = th(Vs(e, i), Us(a, l), !0) - } else if (o === 'hsl') { - let l = - /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm - u = nh(Vs(e, i), Us(a, l), !1) - } else if (o === 'hsla') { - let l = - /^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm - u = nh(Vs(e, i), Us(a, l), !0) - } else o === '#' && (u = M5(Vs(e, i), o + a)) - u && t.push(u) - } - return t - } - function ih(e) { - return !e || typeof e.getValue != 'function' || typeof e.positionAt != 'function' ? [] : P5(e) - } - var sh = new RegExp('\\bMARK:\\s*(.*)$', 'd'), - B5 = /^-+|-+$/g - function oh(e, t) { - let n = [] - if (t.findRegionSectionHeaders && t.foldingRules?.markers) { - let r = V5(e, t) - n = n.concat(r) - } - if (t.findMarkSectionHeaders) { - let r = U5(e) - n = n.concat(r) - } - return n - } - function V5(e, t) { - let n = [], - r = e.getLineCount() - for (let i = 1; i <= r; i++) { - let s = e.getLineContent(i), - o = s.match(t.foldingRules.markers.start) - if (o) { - let a = { - startLineNumber: i, - startColumn: o[0].length + 1, - endLineNumber: i, - endColumn: s.length + 1 - } - if (a.endColumn > a.startColumn) { - let u = { range: a, ...ah(s.substring(o[0].length)), shouldBeInComments: !1 } - ;(u.text || u.hasSeparatorLine) && n.push(u) - } - } - } - return n - } - function U5(e) { - let t = [], - n = e.getLineCount() - for (let r = 1; r <= n; r++) { - let i = e.getLineContent(r) - $5(i, r, t) - } - return t - } - function $5(e, t, n) { - sh.lastIndex = 0 - let r = sh.exec(e) - if (r) { - let i = r.indices[1][0] + 1, - s = r.indices[1][1] + 1, - o = { startLineNumber: t, startColumn: i, endLineNumber: t, endColumn: s } - if (o.endColumn > o.startColumn) { - let a = { range: o, ...ah(r[1]), shouldBeInComments: !0 } - ;(a.text || a.hasSeparatorLine) && n.push(a) - } - } - } - function ah(e) { - e = e.trim() - let t = e.startsWith('-') - return (e = e.replace(B5, '')), { text: e, hasSeparatorLine: t } - } - var j5 = Symbol('MicrotaskDelay') - var q5, tc - ;(function () { - typeof globalThis.requestIdleCallback != 'function' || - typeof globalThis.cancelIdleCallback != 'function' - ? (tc = (e, t) => { - Uf(() => { - if (n) return - let r = Date.now() + 15 - t( - Object.freeze({ - didTimeout: !0, - timeRemaining() { - return Math.max(0, r - Date.now()) - } - }) - ) - }) - let n = !1 - return { - dispose() { - n || (n = !0) - } - } - }) - : (tc = (e, t, n) => { - let r = e.requestIdleCallback(t, typeof n == 'number' ? { timeout: n } : void 0), - i = !1 - return { - dispose() { - i || ((i = !0), e.cancelIdleCallback(r)) - } - } - }), - (q5 = (e) => tc(globalThis, e)) - })() - var uh - ;(function (e) { - async function t(r) { - let i, - s = await Promise.all( - r.map((o) => - o.then( - (a) => a, - (a) => { - i || (i = a) - } - ) - ) - ) - if (typeof i < 'u') throw i - return s - } - e.settled = t - function n(r) { - return new Promise(async (i, s) => { - try { - await r(i, s) - } catch (o) { - s(o) - } - }) - } - e.withAsyncBody = n - })(uh || (uh = {})) - var lh = class e { - static fromArray(t) { - return new e((n) => { - n.emitMany(t) - }) - } - static fromPromise(t) { - return new e(async (n) => { - n.emitMany(await t) - }) - } - static fromPromises(t) { - return new e(async (n) => { - await Promise.all(t.map(async (r) => n.emitOne(await r))) - }) - } - static merge(t) { - return new e(async (n) => { - await Promise.all( - t.map(async (r) => { - for await (let i of r) n.emitOne(i) - }) - ) - }) - } - static { - this.EMPTY = e.fromArray([]) - } - constructor(t, n) { - ;(this._state = 0), - (this._results = []), - (this._error = null), - (this._onReturn = n), - (this._onStateChanged = new lt()), - queueMicrotask(async () => { - let r = { - emitOne: (i) => this.emitOne(i), - emitMany: (i) => this.emitMany(i), - reject: (i) => this.reject(i) - } - try { - await Promise.resolve(t(r)), this.resolve() - } catch (i) { - this.reject(i) - } finally { - ;(r.emitOne = void 0), (r.emitMany = void 0), (r.reject = void 0) - } - }) - } - [Symbol.asyncIterator]() { - let t = 0 - return { - next: async () => { - do { - if (this._state === 2) throw this._error - if (t < this._results.length) return { done: !1, value: this._results[t++] } - if (this._state === 1) return { done: !0, value: void 0 } - await ui.toPromise(this._onStateChanged.event) - } while (!0) - }, - return: async () => (this._onReturn?.(), { done: !0, value: void 0 }) - } - } - static map(t, n) { - return new e(async (r) => { - for await (let i of t) r.emitOne(n(i)) - }) - } - map(t) { - return e.map(this, t) - } - static filter(t, n) { - return new e(async (r) => { - for await (let i of t) n(i) && r.emitOne(i) - }) - } - filter(t) { - return e.filter(this, t) - } - static coalesce(t) { - return e.filter(t, (n) => !!n) - } - coalesce() { - return e.coalesce(this) - } - static async toPromise(t) { - let n = [] - for await (let r of t) n.push(r) - return n - } - toPromise() { - return e.toPromise(this) - } - emitOne(t) { - this._state === 0 && (this._results.push(t), this._onStateChanged.fire()) - } - emitMany(t) { - this._state === 0 && ((this._results = this._results.concat(t)), this._onStateChanged.fire()) - } - resolve() { - this._state === 0 && ((this._state = 1), this._onStateChanged.fire()) - } - reject(t) { - this._state === 0 && ((this._state = 2), (this._error = t), this._onStateChanged.fire()) - } - } - var Da = class { - constructor(t) { - ;(this.values = t), - (this.prefixSum = new Uint32Array(t.length)), - (this.prefixSumValidIndex = new Int32Array(1)), - (this.prefixSumValidIndex[0] = -1) - } - insertValues(t, n) { - t = _r(t) - let r = this.values, - i = this.prefixSum, - s = n.length - return s === 0 - ? !1 - : ((this.values = new Uint32Array(r.length + s)), - this.values.set(r.subarray(0, t), 0), - this.values.set(r.subarray(t), t + s), - this.values.set(n, t), - t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), - (this.prefixSum = new Uint32Array(this.values.length)), - this.prefixSumValidIndex[0] >= 0 && - this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), - !0) - } - setValue(t, n) { - return ( - (t = _r(t)), - (n = _r(n)), - this.values[t] === n - ? !1 - : ((this.values[t] = n), - t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), - !0) - ) - } - removeValues(t, n) { - ;(t = _r(t)), (n = _r(n)) - let r = this.values, - i = this.prefixSum - if (t >= r.length) return !1 - let s = r.length - t - return ( - n >= s && (n = s), - n === 0 - ? !1 - : ((this.values = new Uint32Array(r.length - n)), - this.values.set(r.subarray(0, t), 0), - this.values.set(r.subarray(t + n), t), - (this.prefixSum = new Uint32Array(this.values.length)), - t - 1 < this.prefixSumValidIndex[0] && (this.prefixSumValidIndex[0] = t - 1), - this.prefixSumValidIndex[0] >= 0 && - this.prefixSum.set(i.subarray(0, this.prefixSumValidIndex[0] + 1)), - !0) - ) - } - getTotalSum() { - return this.values.length === 0 ? 0 : this._getPrefixSum(this.values.length - 1) - } - getPrefixSum(t) { - return t < 0 ? 0 : ((t = _r(t)), this._getPrefixSum(t)) - } - _getPrefixSum(t) { - if (t <= this.prefixSumValidIndex[0]) return this.prefixSum[t] - let n = this.prefixSumValidIndex[0] + 1 - n === 0 && ((this.prefixSum[0] = this.values[0]), n++), - t >= this.values.length && (t = this.values.length - 1) - for (let r = n; r <= t; r++) this.prefixSum[r] = this.prefixSum[r - 1] + this.values[r] - return ( - (this.prefixSumValidIndex[0] = Math.max(this.prefixSumValidIndex[0], t)), this.prefixSum[t] - ) - } - getIndexOf(t) { - ;(t = Math.floor(t)), this.getTotalSum() - let n = 0, - r = this.values.length - 1, - i = 0, - s = 0, - o = 0 - for (; n <= r; ) - if (((i = (n + (r - n) / 2) | 0), (s = this.prefixSum[i]), (o = s - this.values[i]), t < o)) - r = i - 1 - else if (t >= s) n = i + 1 - else break - return new nc(i, t - o) - } - } - var nc = class { - constructor(t, n) { - ;(this.index = t), - (this.remainder = n), - (this._prefixSumIndexOfResultBrand = void 0), - (this.index = t), - (this.remainder = n) - } - } - var va = class { - constructor(t, n, r, i) { - ;(this._uri = t), - (this._lines = n), - (this._eol = r), - (this._versionId = i), - (this._lineStarts = null), - (this._cachedTextValue = null) - } - dispose() { - this._lines.length = 0 - } - get version() { - return this._versionId - } - getText() { - return ( - this._cachedTextValue === null && (this._cachedTextValue = this._lines.join(this._eol)), - this._cachedTextValue - ) - } - onEvents(t) { - t.eol && t.eol !== this._eol && ((this._eol = t.eol), (this._lineStarts = null)) - let n = t.changes - for (let r of n) - this._acceptDeleteRange(r.range), - this._acceptInsertText(new Se(r.range.startLineNumber, r.range.startColumn), r.text) - ;(this._versionId = t.versionId), (this._cachedTextValue = null) - } - _ensureLineStarts() { - if (!this._lineStarts) { - let t = this._eol.length, - n = this._lines.length, - r = new Uint32Array(n) - for (let i = 0; i < n; i++) r[i] = this._lines[i].length + t - this._lineStarts = new Da(r) - } - } - _setLineText(t, n) { - ;(this._lines[t] = n), - this._lineStarts && this._lineStarts.setValue(t, this._lines[t].length + this._eol.length) - } - _acceptDeleteRange(t) { - if (t.startLineNumber === t.endLineNumber) { - if (t.startColumn === t.endColumn) return - this._setLineText( - t.startLineNumber - 1, - this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + - this._lines[t.startLineNumber - 1].substring(t.endColumn - 1) - ) - return - } - this._setLineText( - t.startLineNumber - 1, - this._lines[t.startLineNumber - 1].substring(0, t.startColumn - 1) + - this._lines[t.endLineNumber - 1].substring(t.endColumn - 1) - ), - this._lines.splice(t.startLineNumber, t.endLineNumber - t.startLineNumber), - this._lineStarts && - this._lineStarts.removeValues(t.startLineNumber, t.endLineNumber - t.startLineNumber) - } - _acceptInsertText(t, n) { - if (n.length === 0) return - let r = qf(n) - if (r.length === 1) { - this._setLineText( - t.lineNumber - 1, - this._lines[t.lineNumber - 1].substring(0, t.column - 1) + - r[0] + - this._lines[t.lineNumber - 1].substring(t.column - 1) - ) - return - } - ;(r[r.length - 1] += this._lines[t.lineNumber - 1].substring(t.column - 1)), - this._setLineText( - t.lineNumber - 1, - this._lines[t.lineNumber - 1].substring(0, t.column - 1) + r[0] - ) - let i = new Uint32Array(r.length - 1) - for (let s = 1; s < r.length; s++) - this._lines.splice(t.lineNumber + s - 1, 0, r[s]), - (i[s - 1] = r[s].length + this._eol.length) - this._lineStarts && this._lineStarts.insertValues(t.lineNumber, i) - } - } - var Nx = 60 * 1e3 - var ba = class { - constructor() { - this._models = Object.create(null) - } - getModel(t) { - return this._models[t] - } - getModels() { - let t = [] - return Object.keys(this._models).forEach((n) => t.push(this._models[n])), t - } - $acceptNewModel(t) { - this._models[t.url] = new rc(_t.parse(t.url), t.lines, t.EOL, t.versionId) - } - $acceptModelChanged(t, n) { - if (!this._models[t]) return - this._models[t].onEvents(n) - } - $acceptRemovedModel(t) { - this._models[t] && delete this._models[t] - } - }, - rc = class extends va { - get uri() { - return this._uri - } - get eol() { - return this._eol - } - getValue() { - return this.getText() - } - findMatches(t) { - let n = [] - for (let r = 0; r < this._lines.length; r++) { - let i = this._lines[r], - s = this.offsetAt(new Se(r + 1, 1)), - o = i.matchAll(t) - for (let a of o) (a.index || a.index === 0) && (a.index = a.index + s), n.push(a) - } - return n - } - getLinesContent() { - return this._lines.slice(0) - } - getLineCount() { - return this._lines.length - } - getLineContent(t) { - return this._lines[t - 1] - } - getWordAtPosition(t, n) { - let r = Cs(t.column, ql(n), this._lines[t.lineNumber - 1], 0) - return r ? new oe(t.lineNumber, r.startColumn, t.lineNumber, r.endColumn) : null - } - words(t) { - let n = this._lines, - r = this._wordenize.bind(this), - i = 0, - s = '', - o = 0, - a = [] - return { - *[Symbol.iterator]() { - for (;;) - if (o < a.length) { - let u = s.substring(a[o].start, a[o].end) - ;(o += 1), yield u - } else if (i < n.length) (s = n[i]), (a = r(s, t)), (o = 0), (i += 1) - else break - } - } - } - getLineWords(t, n) { - let r = this._lines[t - 1], - i = this._wordenize(r, n), - s = [] - for (let o of i) - s.push({ - word: r.substring(o.start, o.end), - startColumn: o.start + 1, - endColumn: o.end + 1 - }) - return s - } - _wordenize(t, n) { - let r = [], - i - for (n.lastIndex = 0; (i = n.exec(t)) && i[0].length !== 0; ) - r.push({ start: i.index, end: i.index + i[0].length }) - return r - } - getValueInRange(t) { - if (((t = this._validateRange(t)), t.startLineNumber === t.endLineNumber)) - return this._lines[t.startLineNumber - 1].substring(t.startColumn - 1, t.endColumn - 1) - let n = this._eol, - r = t.startLineNumber - 1, - i = t.endLineNumber - 1, - s = [] - s.push(this._lines[r].substring(t.startColumn - 1)) - for (let o = r + 1; o < i; o++) s.push(this._lines[o]) - return s.push(this._lines[i].substring(0, t.endColumn - 1)), s.join(n) - } - offsetAt(t) { - return ( - (t = this._validatePosition(t)), - this._ensureLineStarts(), - this._lineStarts.getPrefixSum(t.lineNumber - 2) + (t.column - 1) - ) - } - positionAt(t) { - ;(t = Math.floor(t)), (t = Math.max(0, t)), this._ensureLineStarts() - let n = this._lineStarts.getIndexOf(t), - r = this._lines[n.index].length - return { lineNumber: 1 + n.index, column: 1 + Math.min(n.remainder, r) } - } - _validateRange(t) { - let n = this._validatePosition({ lineNumber: t.startLineNumber, column: t.startColumn }), - r = this._validatePosition({ lineNumber: t.endLineNumber, column: t.endColumn }) - return n.lineNumber !== t.startLineNumber || - n.column !== t.startColumn || - r.lineNumber !== t.endLineNumber || - r.column !== t.endColumn - ? { - startLineNumber: n.lineNumber, - startColumn: n.column, - endLineNumber: r.lineNumber, - endColumn: r.column - } - : t - } - _validatePosition(t) { - if (!Se.isIPosition(t)) throw new Error('bad position') - let { lineNumber: n, column: r } = t, - i = !1 - if (n < 1) (n = 1), (r = 1), (i = !0) - else if (n > this._lines.length) - (n = this._lines.length), (r = this._lines[n - 1].length + 1), (i = !0) - else { - let s = this._lines[n - 1].length + 1 - r < 1 ? ((r = 1), (i = !0)) : r > s && ((r = s), (i = !0)) - } - return i ? { lineNumber: n, column: r } : t - } - } - var G5 = !0, - ic = class { - constructor() { - this._workerTextModelSyncServer = new ba() - } - dispose() {} - _getModel(t) { - return this._workerTextModelSyncServer.getModel(t) - } - _getModels() { - return this._workerTextModelSyncServer.getModels() - } - $acceptNewModel(t) { - this._workerTextModelSyncServer.$acceptNewModel(t) - } - $acceptModelChanged(t, n) { - this._workerTextModelSyncServer.$acceptModelChanged(t, n) - } - $acceptRemovedModel(t) { - this._workerTextModelSyncServer.$acceptRemovedModel(t) - } - async $computeUnicodeHighlights(t, n, r) { - let i = this._getModel(t) - return i - ? sa.computeUnicodeHighlights(i, n, r) - : { - ranges: [], - hasMore: !1, - ambiguousCharacterCount: 0, - invisibleCharacterCount: 0, - nonBasicAsciiCharacterCount: 0 - } - } - async $findSectionHeaders(t, n) { - let r = this._getModel(t) - return r ? oh(r, n) : [] - } - async $computeDiff(t, n, r, i) { - let s = this._getModel(t), - o = this._getModel(n) - return !s || !o ? null : Fr.computeDiff(s, o, r, i) - } - static computeDiff(t, n, r, i) { - let s = i === 'advanced' ? Zl.getDefault() : Zl.getLegacy(), - o = t.getLinesContent(), - a = n.getLinesContent(), - u = s.computeDiff(o, a, r), - l = u.changes.length > 0 ? !1 : this._modelsAreIdentical(t, n) - function c(d) { - return d.map((h) => [ - h.original.startLineNumber, - h.original.endLineNumberExclusive, - h.modified.startLineNumber, - h.modified.endLineNumberExclusive, - h.innerChanges?.map((m) => [ - m.originalRange.startLineNumber, - m.originalRange.startColumn, - m.originalRange.endLineNumber, - m.originalRange.endColumn, - m.modifiedRange.startLineNumber, - m.modifiedRange.startColumn, - m.modifiedRange.endLineNumber, - m.modifiedRange.endColumn - ]) - ]) - } - return { - identical: l, - quitEarly: u.hitTimeout, - changes: c(u.changes), - moves: u.moves.map((d) => [ - d.lineRangeMapping.original.startLineNumber, - d.lineRangeMapping.original.endLineNumberExclusive, - d.lineRangeMapping.modified.startLineNumber, - d.lineRangeMapping.modified.endLineNumberExclusive, - c(d.changes) - ]) - } - } - static _modelsAreIdentical(t, n) { - let r = t.getLineCount(), - i = n.getLineCount() - if (r !== i) return !1 - for (let s = 1; s <= r; s++) { - let o = t.getLineContent(s), - a = n.getLineContent(s) - if (o !== a) return !1 - } - return !0 - } - static { - this._diffLimit = 1e5 - } - async $computeMoreMinimalEdits(t, n, r) { - let i = this._getModel(t) - if (!i) return n - let s = [], - o - n = n.slice(0).sort((u, l) => { - if (u.range && l.range) return oe.compareRangesUsingStarts(u.range, l.range) - let c = u.range ? 0 : 1, - d = l.range ? 0 : 1 - return c - d - }) - let a = 0 - for (let u = 1; u < n.length; u++) - oe.getEndPosition(n[a].range).equals(oe.getStartPosition(n[u].range)) - ? ((n[a].range = oe.fromPositions( - oe.getStartPosition(n[a].range), - oe.getEndPosition(n[u].range) - )), - (n[a].text += n[u].text)) - : (a++, (n[a] = n[u])) - n.length = a + 1 - for (let { range: u, text: l, eol: c } of n) { - if ((typeof c == 'number' && (o = c), oe.isEmpty(u) && !l)) continue - let d = i.getValueInRange(u) - if (((l = l.replace(/\r\n|\n|\r/g, i.eol)), d === l)) continue - if (Math.max(l.length, d.length) > Fr._diffLimit) { - s.push({ range: u, text: l }) - continue - } - let h = fd(d, l, r), - m = i.offsetAt(oe.lift(u).getStartPosition()) - for (let g of h) { - let v = i.positionAt(m + g.originalStart), - N = i.positionAt(m + g.originalStart + g.originalLength), - _ = { - text: l.substr(g.modifiedStart, g.modifiedLength), - range: { - startLineNumber: v.lineNumber, - startColumn: v.column, - endLineNumber: N.lineNumber, - endColumn: N.column - } - } - i.getValueInRange(_.range) !== _.text && s.push(_) - } - } - return ( - typeof o == 'number' && - s.push({ - eol: o, - text: '', - range: { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 } - }), - s - ) - } - async $computeLinks(t) { - let n = this._getModel(t) - return n ? dd(n) : null - } - async $computeDefaultDocumentColors(t) { - let n = this._getModel(t) - return n ? ih(n) : null - } - static { - this._suggestionsLimit = 1e4 - } - async $textualSuggest(t, n, r, i) { - let s = new oi(), - o = new RegExp(r, i), - a = new Set() - e: for (let u of t) { - let l = this._getModel(u) - if (l) { - for (let c of l.words(o)) - if (!(c === n || !isNaN(Number(c))) && (a.add(c), a.size > Fr._suggestionsLimit)) - break e - } - } - return { words: Array.from(a), duration: s.elapsed() } - } - async $computeWordRanges(t, n, r, i) { - let s = this._getModel(t) - if (!s) return Object.create(null) - let o = new RegExp(r, i), - a = Object.create(null) - for (let u = n.startLineNumber; u < n.endLineNumber; u++) { - let l = s.getLineWords(u, o) - for (let c of l) { - if (!isNaN(Number(c.word))) continue - let d = a[c.word] - d || ((d = []), (a[c.word] = d)), - d.push({ - startLineNumber: u, - startColumn: c.startColumn, - endLineNumber: u, - endColumn: c.endColumn - }) - } - } - return a - } - async $navigateValueSet(t, n, r, i, s) { - let o = this._getModel(t) - if (!o) return null - let a = new RegExp(i, s) - n.startColumn === n.endColumn && - (n = { - startLineNumber: n.startLineNumber, - startColumn: n.startColumn, - endLineNumber: n.endLineNumber, - endColumn: n.endColumn + 1 - }) - let u = o.getValueInRange(n), - l = o.getWordAtPosition({ lineNumber: n.startLineNumber, column: n.startColumn }, a) - if (!l) return null - let c = o.getValueInRange(l) - return Qo.INSTANCE.navigateValueSet(n, u, l, c, r) - } - }, - Fr = class extends ic { - constructor(t, n) { - super(), (this._host = t), (this._foreignModuleFactory = n), (this._foreignModule = null) - } - async $ping() { - return 'pong' - } - $loadForeignModule(t, n, r) { - let o = { - host: Tp(r, (a, u) => this._host.$fhr(a, u)), - getMirrorModels: () => this._getModels() - } - return this._foreignModuleFactory - ? ((this._foreignModule = this._foreignModuleFactory(o, n)), - Promise.resolve($l(this._foreignModule))) - : new Promise((a, u) => { - let l = (c) => { - ;(this._foreignModule = c.create(o, n)), a($l(this._foreignModule)) - } - G5 - ? import(`${jo.asBrowserUri(`${t}.js`).toString(!0)}`) - .then(l) - .catch(u) - : Ff([`${t}`], l, u) - }) - } - $fmr(t, n) { - if (!this._foreignModule || typeof this._foreignModule[t] != 'function') - return Promise.reject(new Error('Missing requestHandler or method: ' + t)) - try { - return Promise.resolve(this._foreignModule[t].apply(this._foreignModule, n)) - } catch (r) { - return Promise.reject(r) - } - } - } - typeof importScripts == 'function' && (globalThis.monaco = yp()) - var sc = !1 - function oc(e) { - if (sc) return - sc = !0 - let t = new Go( - (n) => { - globalThis.postMessage(n) - }, - (n) => new Fr(ws.getChannel(n), e) - ) - globalThis.onmessage = (n) => { - t.onmessage(n.data) - } - } - globalThis.onmessage = (e) => { - sc || oc(null) - } - function pe(e, t) { - if (!!!e) throw new Error(t) - } - function Nt(e) { - return typeof e == 'object' && e !== null - } - function Ge(e, t) { - if (!!!e) throw new Error(t ?? 'Unexpected invariant triggered.') - } - var H5 = /\r\n|[\n\r]/g - function Ei(e, t) { - let n = 0, - r = 1 - for (let i of e.body.matchAll(H5)) { - if ((typeof i.index == 'number' || Ge(!1), i.index >= t)) break - ;(n = i.index + i[0].length), (r += 1) - } - return { line: r, column: t + 1 - n } - } - function ac(e) { - return Ea(e.source, Ei(e.source, e.start)) - } - function Ea(e, t) { - let n = e.locationOffset.column - 1, - r = ''.padStart(n) + e.body, - i = t.line - 1, - s = e.locationOffset.line - 1, - o = t.line + s, - a = t.line === 1 ? n : 0, - u = t.column + a, - l = `${e.name}:${o}:${u} -`, - c = r.split(/\r\n|[\n\r]/g), - d = c[i] - if (d.length > 120) { - let h = Math.floor(u / 80), - m = u % 80, - g = [] - for (let v = 0; v < d.length; v += 80) g.push(d.slice(v, v + 80)) - return ( - l + - ch([ - [`${o} |`, g[0]], - ...g.slice(1, h + 1).map((v) => ['|', v]), - ['|', '^'.padStart(m)], - ['|', g[h + 1]] - ]) - ) - } - return ( - l + - ch([ - [`${o - 1} |`, c[i - 1]], - [`${o} |`, d], - ['|', '^'.padStart(u)], - [`${o + 1} |`, c[i + 1]] - ]) - ) - } - function ch(e) { - let t = e.filter(([r, i]) => i !== void 0), - n = Math.max(...t.map(([r]) => r.length)) - return t.map(([r, i]) => r.padStart(n) + (i ? ' ' + i : '')).join(` -`) - } - function W5(e) { - let t = e[0] - return t == null || 'kind' in t || 'length' in t - ? { - nodes: t, - source: e[1], - positions: e[2], - path: e[3], - originalError: e[4], - extensions: e[5] - } - : t - } - var O = class e extends Error { - constructor(t, ...n) { - var r, i, s - let { nodes: o, source: a, positions: u, path: l, originalError: c, extensions: d } = W5(n) - super(t), - (this.name = 'GraphQLError'), - (this.path = l ?? void 0), - (this.originalError = c ?? void 0), - (this.nodes = fh(Array.isArray(o) ? o : o ? [o] : void 0)) - let h = fh( - (r = this.nodes) === null || r === void 0 - ? void 0 - : r.map((g) => g.loc).filter((g) => g != null) - ) - ;(this.source = a ?? (h == null || (i = h[0]) === null || i === void 0 ? void 0 : i.source)), - (this.positions = u ?? h?.map((g) => g.start)), - (this.locations = u && a ? u.map((g) => Ei(a, g)) : h?.map((g) => Ei(g.source, g.start))) - let m = Nt(c?.extensions) ? c?.extensions : void 0 - ;(this.extensions = (s = d ?? m) !== null && s !== void 0 ? s : Object.create(null)), - Object.defineProperties(this, { - message: { writable: !0, enumerable: !0 }, - name: { enumerable: !1 }, - nodes: { enumerable: !1 }, - source: { enumerable: !1 }, - positions: { enumerable: !1 }, - originalError: { enumerable: !1 } - }), - c != null && c.stack - ? Object.defineProperty(this, 'stack', { value: c.stack, writable: !0, configurable: !0 }) - : Error.captureStackTrace - ? Error.captureStackTrace(this, e) - : Object.defineProperty(this, 'stack', { - value: Error().stack, - writable: !0, - configurable: !0 - }) - } - get [Symbol.toStringTag]() { - return 'GraphQLError' - } - toString() { - let t = this.message - if (this.nodes) - for (let n of this.nodes) - n.loc && - (t += - ` - -` + ac(n.loc)) - else if (this.source && this.locations) - for (let n of this.locations) - t += - ` - -` + Ea(this.source, n) - return t - } - toJSON() { - let t = { message: this.message } - return ( - this.locations != null && (t.locations = this.locations), - this.path != null && (t.path = this.path), - this.extensions != null && - Object.keys(this.extensions).length > 0 && - (t.extensions = this.extensions), - t - ) - } - } - function fh(e) { - return e === void 0 || e.length === 0 ? void 0 : e - } - function Xe(e, t, n) { - return new O(`Syntax Error: ${n}`, { source: e, positions: [t] }) - } - var $s = class { - constructor(t, n, r) { - ;(this.start = t.start), - (this.end = n.end), - (this.startToken = t), - (this.endToken = n), - (this.source = r) - } - get [Symbol.toStringTag]() { - return 'Location' - } - toJSON() { - return { start: this.start, end: this.end } - } - }, - yi = class { - constructor(t, n, r, i, s, o) { - ;(this.kind = t), - (this.start = n), - (this.end = r), - (this.line = i), - (this.column = s), - (this.value = o), - (this.prev = null), - (this.next = null) - } - get [Symbol.toStringTag]() { - return 'Token' - } - toJSON() { - return { kind: this.kind, value: this.value, line: this.line, column: this.column } - } - }, - uc = { - Name: [], - Document: ['definitions'], - OperationDefinition: ['name', 'variableDefinitions', 'directives', 'selectionSet'], - VariableDefinition: ['variable', 'type', 'defaultValue', 'directives'], - Variable: ['name'], - SelectionSet: ['selections'], - Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'], - Argument: ['name', 'value'], - FragmentSpread: ['name', 'directives'], - InlineFragment: ['typeCondition', 'directives', 'selectionSet'], - FragmentDefinition: [ - 'name', - 'variableDefinitions', - 'typeCondition', - 'directives', - 'selectionSet' - ], - IntValue: [], - FloatValue: [], - StringValue: [], - BooleanValue: [], - NullValue: [], - EnumValue: [], - ListValue: ['values'], - ObjectValue: ['fields'], - ObjectField: ['name', 'value'], - Directive: ['name', 'arguments'], - NamedType: ['name'], - ListType: ['type'], - NonNullType: ['type'], - SchemaDefinition: ['description', 'directives', 'operationTypes'], - OperationTypeDefinition: ['type'], - ScalarTypeDefinition: ['description', 'name', 'directives'], - ObjectTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'], - InputValueDefinition: ['description', 'name', 'type', 'defaultValue', 'directives'], - InterfaceTypeDefinition: ['description', 'name', 'interfaces', 'directives', 'fields'], - UnionTypeDefinition: ['description', 'name', 'directives', 'types'], - EnumTypeDefinition: ['description', 'name', 'directives', 'values'], - EnumValueDefinition: ['description', 'name', 'directives'], - InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'], - DirectiveDefinition: ['description', 'name', 'arguments', 'locations'], - SchemaExtension: ['directives', 'operationTypes'], - ScalarTypeExtension: ['name', 'directives'], - ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'], - UnionTypeExtension: ['name', 'directives', 'types'], - EnumTypeExtension: ['name', 'directives', 'values'], - InputObjectTypeExtension: ['name', 'directives', 'fields'] - }, - Q5 = new Set(Object.keys(uc)) - function js(e) { - let t = e?.kind - return typeof t == 'string' && Q5.has(t) - } - var st - ;(function (e) { - ;(e.QUERY = 'query'), (e.MUTATION = 'mutation'), (e.SUBSCRIPTION = 'subscription') - })(st || (st = {})) - var K - ;(function (e) { - ;(e.QUERY = 'QUERY'), - (e.MUTATION = 'MUTATION'), - (e.SUBSCRIPTION = 'SUBSCRIPTION'), - (e.FIELD = 'FIELD'), - (e.FRAGMENT_DEFINITION = 'FRAGMENT_DEFINITION'), - (e.FRAGMENT_SPREAD = 'FRAGMENT_SPREAD'), - (e.INLINE_FRAGMENT = 'INLINE_FRAGMENT'), - (e.VARIABLE_DEFINITION = 'VARIABLE_DEFINITION'), - (e.SCHEMA = 'SCHEMA'), - (e.SCALAR = 'SCALAR'), - (e.OBJECT = 'OBJECT'), - (e.FIELD_DEFINITION = 'FIELD_DEFINITION'), - (e.ARGUMENT_DEFINITION = 'ARGUMENT_DEFINITION'), - (e.INTERFACE = 'INTERFACE'), - (e.UNION = 'UNION'), - (e.ENUM = 'ENUM'), - (e.ENUM_VALUE = 'ENUM_VALUE'), - (e.INPUT_OBJECT = 'INPUT_OBJECT'), - (e.INPUT_FIELD_DEFINITION = 'INPUT_FIELD_DEFINITION') - })(K || (K = {})) - var E - ;(function (e) { - ;(e.NAME = 'Name'), - (e.DOCUMENT = 'Document'), - (e.OPERATION_DEFINITION = 'OperationDefinition'), - (e.VARIABLE_DEFINITION = 'VariableDefinition'), - (e.SELECTION_SET = 'SelectionSet'), - (e.FIELD = 'Field'), - (e.ARGUMENT = 'Argument'), - (e.FRAGMENT_SPREAD = 'FragmentSpread'), - (e.INLINE_FRAGMENT = 'InlineFragment'), - (e.FRAGMENT_DEFINITION = 'FragmentDefinition'), - (e.VARIABLE = 'Variable'), - (e.INT = 'IntValue'), - (e.FLOAT = 'FloatValue'), - (e.STRING = 'StringValue'), - (e.BOOLEAN = 'BooleanValue'), - (e.NULL = 'NullValue'), - (e.ENUM = 'EnumValue'), - (e.LIST = 'ListValue'), - (e.OBJECT = 'ObjectValue'), - (e.OBJECT_FIELD = 'ObjectField'), - (e.DIRECTIVE = 'Directive'), - (e.NAMED_TYPE = 'NamedType'), - (e.LIST_TYPE = 'ListType'), - (e.NON_NULL_TYPE = 'NonNullType'), - (e.SCHEMA_DEFINITION = 'SchemaDefinition'), - (e.OPERATION_TYPE_DEFINITION = 'OperationTypeDefinition'), - (e.SCALAR_TYPE_DEFINITION = 'ScalarTypeDefinition'), - (e.OBJECT_TYPE_DEFINITION = 'ObjectTypeDefinition'), - (e.FIELD_DEFINITION = 'FieldDefinition'), - (e.INPUT_VALUE_DEFINITION = 'InputValueDefinition'), - (e.INTERFACE_TYPE_DEFINITION = 'InterfaceTypeDefinition'), - (e.UNION_TYPE_DEFINITION = 'UnionTypeDefinition'), - (e.ENUM_TYPE_DEFINITION = 'EnumTypeDefinition'), - (e.ENUM_VALUE_DEFINITION = 'EnumValueDefinition'), - (e.INPUT_OBJECT_TYPE_DEFINITION = 'InputObjectTypeDefinition'), - (e.DIRECTIVE_DEFINITION = 'DirectiveDefinition'), - (e.SCHEMA_EXTENSION = 'SchemaExtension'), - (e.SCALAR_TYPE_EXTENSION = 'ScalarTypeExtension'), - (e.OBJECT_TYPE_EXTENSION = 'ObjectTypeExtension'), - (e.INTERFACE_TYPE_EXTENSION = 'InterfaceTypeExtension'), - (e.UNION_TYPE_EXTENSION = 'UnionTypeExtension'), - (e.ENUM_TYPE_EXTENSION = 'EnumTypeExtension'), - (e.INPUT_OBJECT_TYPE_EXTENSION = 'InputObjectTypeExtension') - })(E || (E = {})) - function ya(e) { - return e === 9 || e === 32 - } - function xi(e) { - return e >= 48 && e <= 57 - } - function dh(e) { - return (e >= 97 && e <= 122) || (e >= 65 && e <= 90) - } - function qs(e) { - return dh(e) || e === 95 - } - function xa(e) { - return dh(e) || xi(e) || e === 95 - } - function ph(e) { - var t - let n = Number.MAX_SAFE_INTEGER, - r = null, - i = -1 - for (let o = 0; o < e.length; ++o) { - var s - let a = e[o], - u = z5(a) - u !== a.length && - ((r = (s = r) !== null && s !== void 0 ? s : o), (i = o), o !== 0 && u < n && (n = u)) - } - return e - .map((o, a) => (a === 0 ? o : o.slice(n))) - .slice((t = r) !== null && t !== void 0 ? t : 0, i + 1) - } - function z5(e) { - let t = 0 - for (; t < e.length && ya(e.charCodeAt(t)); ) ++t - return t - } - function hh(e, t) { - let n = e.replace(/"""/g, '\\"""'), - r = n.split(/\r\n|[\n\r]/g), - i = r.length === 1, - s = r.length > 1 && r.slice(1).every((m) => m.length === 0 || ya(m.charCodeAt(0))), - o = n.endsWith('\\"""'), - a = e.endsWith('"') && !o, - u = e.endsWith('\\'), - l = a || u, - c = !(t != null && t.minimize) && (!i || e.length > 70 || l || s || o), - d = '', - h = i && ya(e.charCodeAt(0)) - return ( - ((c && !h) || s) && - (d += ` -`), - (d += n), - (c || l) && - (d += ` -`), - '"""' + d + '"""' - ) - } - var U - ;(function (e) { - ;(e.SOF = ''), - (e.EOF = ''), - (e.BANG = '!'), - (e.DOLLAR = '$'), - (e.AMP = '&'), - (e.PAREN_L = '('), - (e.PAREN_R = ')'), - (e.SPREAD = '...'), - (e.COLON = ':'), - (e.EQUALS = '='), - (e.AT = '@'), - (e.BRACKET_L = '['), - (e.BRACKET_R = ']'), - (e.BRACE_L = '{'), - (e.PIPE = '|'), - (e.BRACE_R = '}'), - (e.NAME = 'Name'), - (e.INT = 'Int'), - (e.FLOAT = 'Float'), - (e.STRING = 'String'), - (e.BLOCK_STRING = 'BlockString'), - (e.COMMENT = 'Comment') - })(U || (U = {})) - var Hs = class { - constructor(t) { - let n = new yi(U.SOF, 0, 0, 0, 0) - ;(this.source = t), - (this.lastToken = n), - (this.token = n), - (this.line = 1), - (this.lineStart = 0) - } - get [Symbol.toStringTag]() { - return 'Lexer' - } - advance() { - return (this.lastToken = this.token), (this.token = this.lookahead()) - } - lookahead() { - let t = this.token - if (t.kind !== U.EOF) - do - if (t.next) t = t.next - else { - let n = Y5(this, t.end) - ;(t.next = n), (n.prev = t), (t = n) - } - while (t.kind === U.COMMENT) - return t - } - } - function gh(e) { - return ( - e === U.BANG || - e === U.DOLLAR || - e === U.AMP || - e === U.PAREN_L || - e === U.PAREN_R || - e === U.SPREAD || - e === U.COLON || - e === U.EQUALS || - e === U.AT || - e === U.BRACKET_L || - e === U.BRACKET_R || - e === U.BRACE_L || - e === U.PIPE || - e === U.BRACE_R - ) - } - function _i(e) { - return (e >= 0 && e <= 55295) || (e >= 57344 && e <= 1114111) - } - function _a(e, t) { - return Dh(e.charCodeAt(t)) && vh(e.charCodeAt(t + 1)) - } - function Dh(e) { - return e >= 55296 && e <= 56319 - } - function vh(e) { - return e >= 56320 && e <= 57343 - } - function wr(e, t) { - let n = e.source.body.codePointAt(t) - if (n === void 0) return U.EOF - if (n >= 32 && n <= 126) { - let r = String.fromCodePoint(n) - return r === '"' ? `'"'` : `"${r}"` - } - return 'U+' + n.toString(16).toUpperCase().padStart(4, '0') - } - function ot(e, t, n, r, i) { - let s = e.line, - o = 1 + n - e.lineStart - return new yi(t, n, r, s, o, i) - } - function Y5(e, t) { - let n = e.source.body, - r = n.length, - i = t - for (; i < r; ) { - let s = n.charCodeAt(i) - switch (s) { - case 65279: - case 9: - case 32: - case 44: - ++i - continue - case 10: - ++i, ++e.line, (e.lineStart = i) - continue - case 13: - n.charCodeAt(i + 1) === 10 ? (i += 2) : ++i, ++e.line, (e.lineStart = i) - continue - case 35: - return J5(e, i) - case 33: - return ot(e, U.BANG, i, i + 1) - case 36: - return ot(e, U.DOLLAR, i, i + 1) - case 38: - return ot(e, U.AMP, i, i + 1) - case 40: - return ot(e, U.PAREN_L, i, i + 1) - case 41: - return ot(e, U.PAREN_R, i, i + 1) - case 46: - if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46) - return ot(e, U.SPREAD, i, i + 3) - break - case 58: - return ot(e, U.COLON, i, i + 1) - case 61: - return ot(e, U.EQUALS, i, i + 1) - case 64: - return ot(e, U.AT, i, i + 1) - case 91: - return ot(e, U.BRACKET_L, i, i + 1) - case 93: - return ot(e, U.BRACKET_R, i, i + 1) - case 123: - return ot(e, U.BRACE_L, i, i + 1) - case 124: - return ot(e, U.PIPE, i, i + 1) - case 125: - return ot(e, U.BRACE_R, i, i + 1) - case 34: - return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? n7(e, i) : K5(e, i) - } - if (xi(s) || s === 45) return X5(e, i, s) - if (qs(s)) return r7(e, i) - throw Xe( - e.source, - i, - s === 39 - ? `Unexpected single quote character ('), did you mean to use a double quote (")?` - : _i(s) || _a(n, i) - ? `Unexpected character: ${wr(e, i)}.` - : `Invalid character: ${wr(e, i)}.` - ) - } - return ot(e, U.EOF, r, r) - } - function J5(e, t) { - let n = e.source.body, - r = n.length, - i = t + 1 - for (; i < r; ) { - let s = n.charCodeAt(i) - if (s === 10 || s === 13) break - if (_i(s)) ++i - else if (_a(n, i)) i += 2 - else break - } - return ot(e, U.COMMENT, t, i, n.slice(t + 1, i)) - } - function X5(e, t, n) { - let r = e.source.body, - i = t, - s = n, - o = !1 - if ((s === 45 && (s = r.charCodeAt(++i)), s === 48)) { - if (((s = r.charCodeAt(++i)), xi(s))) - throw Xe(e.source, i, `Invalid number, unexpected digit after 0: ${wr(e, i)}.`) - } else (i = lc(e, i, s)), (s = r.charCodeAt(i)) - if ( - (s === 46 && ((o = !0), (s = r.charCodeAt(++i)), (i = lc(e, i, s)), (s = r.charCodeAt(i))), - (s === 69 || s === 101) && - ((o = !0), - (s = r.charCodeAt(++i)), - (s === 43 || s === 45) && (s = r.charCodeAt(++i)), - (i = lc(e, i, s)), - (s = r.charCodeAt(i))), - s === 46 || qs(s)) - ) - throw Xe(e.source, i, `Invalid number, expected digit but got: ${wr(e, i)}.`) - return ot(e, o ? U.FLOAT : U.INT, t, i, r.slice(t, i)) - } - function lc(e, t, n) { - if (!xi(n)) throw Xe(e.source, t, `Invalid number, expected digit but got: ${wr(e, t)}.`) - let r = e.source.body, - i = t + 1 - for (; xi(r.charCodeAt(i)); ) ++i - return i - } - function K5(e, t) { - let n = e.source.body, - r = n.length, - i = t + 1, - s = i, - o = '' - for (; i < r; ) { - let a = n.charCodeAt(i) - if (a === 34) return (o += n.slice(s, i)), ot(e, U.STRING, t, i + 1, o) - if (a === 92) { - o += n.slice(s, i) - let u = - n.charCodeAt(i + 1) === 117 - ? n.charCodeAt(i + 2) === 123 - ? Z5(e, i) - : e7(e, i) - : t7(e, i) - ;(o += u.value), (i += u.size), (s = i) - continue - } - if (a === 10 || a === 13) break - if (_i(a)) ++i - else if (_a(n, i)) i += 2 - else throw Xe(e.source, i, `Invalid character within String: ${wr(e, i)}.`) - } - throw Xe(e.source, i, 'Unterminated string.') - } - function Z5(e, t) { - let n = e.source.body, - r = 0, - i = 3 - for (; i < 12; ) { - let s = n.charCodeAt(t + i++) - if (s === 125) { - if (i < 5 || !_i(r)) break - return { value: String.fromCodePoint(r), size: i } - } - if (((r = (r << 4) | Gs(s)), r < 0)) break - } - throw Xe(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + i)}".`) - } - function e7(e, t) { - let n = e.source.body, - r = mh(n, t + 2) - if (_i(r)) return { value: String.fromCodePoint(r), size: 6 } - if (Dh(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) { - let i = mh(n, t + 8) - if (vh(i)) return { value: String.fromCodePoint(r, i), size: 12 } - } - throw Xe(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`) - } - function mh(e, t) { - return ( - (Gs(e.charCodeAt(t)) << 12) | - (Gs(e.charCodeAt(t + 1)) << 8) | - (Gs(e.charCodeAt(t + 2)) << 4) | - Gs(e.charCodeAt(t + 3)) - ) - } - function Gs(e) { - return e >= 48 && e <= 57 - ? e - 48 - : e >= 65 && e <= 70 - ? e - 55 - : e >= 97 && e <= 102 - ? e - 87 - : -1 - } - function t7(e, t) { - let n = e.source.body - switch (n.charCodeAt(t + 1)) { - case 34: - return { value: '"', size: 2 } - case 92: - return { value: '\\', size: 2 } - case 47: - return { value: '/', size: 2 } - case 98: - return { value: '\b', size: 2 } - case 102: - return { value: '\f', size: 2 } - case 110: - return { - value: ` -`, - size: 2 - } - case 114: - return { value: '\r', size: 2 } - case 116: - return { value: ' ', size: 2 } - } - throw Xe(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`) - } - function n7(e, t) { - let n = e.source.body, - r = n.length, - i = e.lineStart, - s = t + 3, - o = s, - a = '', - u = [] - for (; s < r; ) { - let l = n.charCodeAt(s) - if (l === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) { - ;(a += n.slice(o, s)), u.push(a) - let c = ot( - e, - U.BLOCK_STRING, - t, - s + 3, - ph(u).join(` -`) - ) - return (e.line += u.length - 1), (e.lineStart = i), c - } - if ( - l === 92 && - n.charCodeAt(s + 1) === 34 && - n.charCodeAt(s + 2) === 34 && - n.charCodeAt(s + 3) === 34 - ) { - ;(a += n.slice(o, s)), (o = s + 1), (s += 4) - continue - } - if (l === 10 || l === 13) { - ;(a += n.slice(o, s)), - u.push(a), - l === 13 && n.charCodeAt(s + 1) === 10 ? (s += 2) : ++s, - (a = ''), - (o = s), - (i = s) - continue - } - if (_i(l)) ++s - else if (_a(n, s)) s += 2 - else throw Xe(e.source, s, `Invalid character within String: ${wr(e, s)}.`) - } - throw Xe(e.source, s, 'Unterminated string.') - } - function r7(e, t) { - let n = e.source.body, - r = n.length, - i = t + 1 - for (; i < r; ) { - let s = n.charCodeAt(i) - if (xa(s)) ++i - else break - } - return ot(e, U.NAME, t, i, n.slice(t, i)) - } - function q(e) { - return Na(e, []) - } - function Na(e, t) { - switch (typeof e) { - case 'string': - return JSON.stringify(e) - case 'function': - return e.name ? `[function ${e.name}]` : '[function]' - case 'object': - return i7(e, t) - default: - return String(e) - } - } - function i7(e, t) { - if (e === null) return 'null' - if (t.includes(e)) return '[Circular]' - let n = [...t, e] - if (s7(e)) { - let r = e.toJSON() - if (r !== e) return typeof r == 'string' ? r : Na(r, n) - } else if (Array.isArray(e)) return a7(e, n) - return o7(e, n) - } - function s7(e) { - return typeof e.toJSON == 'function' - } - function o7(e, t) { - let n = Object.entries(e) - return n.length === 0 - ? '{}' - : t.length > 2 - ? '[' + u7(e) + ']' - : '{ ' + n.map(([i, s]) => i + ': ' + Na(s, t)).join(', ') + ' }' - } - function a7(e, t) { - if (e.length === 0) return '[]' - if (t.length > 2) return '[Array]' - let n = Math.min(10, e.length), - r = e.length - n, - i = [] - for (let s = 0; s < n; ++s) i.push(Na(e[s], t)) - return ( - r === 1 ? i.push('... 1 more item') : r > 1 && i.push(`... ${r} more items`), - '[' + i.join(', ') + ']' - ) - } - function u7(e) { - let t = Object.prototype.toString - .call(e) - .replace(/^\[object /, '') - .replace(/]$/, '') - if (t === 'Object' && typeof e.constructor == 'function') { - let n = e.constructor.name - if (typeof n == 'string' && n !== '') return n - } - return t - } - var l7 = globalThis.process && !0, - Lt = l7 - ? function (t, n) { - return t instanceof n - } - : function (t, n) { - if (t instanceof n) return !0 - if (typeof t == 'object' && t !== null) { - var r - let i = n.prototype[Symbol.toStringTag], - s = - Symbol.toStringTag in t - ? t[Symbol.toStringTag] - : (r = t.constructor) === null || r === void 0 - ? void 0 - : r.name - if (i === s) { - let o = q(t) - throw new Error(`Cannot use ${i} "${o}" from another module or realm. +`+Ea(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function fh(e){return e===void 0||e.length===0?void 0:e}function Xe(e,t,n){return new O(`Syntax Error: ${n}`,{source:e,positions:[t]})}var $s=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},yi=class{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},uc={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Q5=new Set(Object.keys(uc));function js(e){let t=e?.kind;return typeof t=="string"&&Q5.has(t)}var st;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(st||(st={}));var K;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(K||(K={}));var E;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(E||(E={}));function ya(e){return e===9||e===32}function xi(e){return e>=48&&e<=57}function dh(e){return e>=97&&e<=122||e>=65&&e<=90}function qs(e){return dh(e)||e===95}function xa(e){return dh(e)||xi(e)||e===95}function ph(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;oa===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function z5(e){let t=0;for(;t1&&r.slice(1).every(m=>m.length===0||ya(m.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),l=a||u,c=!(t!=null&&t.minimize)&&(!i||e.length>70||l||s||o),d="",h=i&&ya(e.charCodeAt(0));return(c&&!h||s)&&(d+=` +`),d+=n,(c||l)&&(d+=` +`),'"""'+d+'"""'}var U;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(U||(U={}));var Hs=class{constructor(t){let n=new yi(U.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==U.EOF)do if(t.next)t=t.next;else{let n=Y5(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===U.COMMENT);return t}};function gh(e){return e===U.BANG||e===U.DOLLAR||e===U.AMP||e===U.PAREN_L||e===U.PAREN_R||e===U.SPREAD||e===U.COLON||e===U.EQUALS||e===U.AT||e===U.BRACKET_L||e===U.BRACKET_R||e===U.BRACE_L||e===U.PIPE||e===U.BRACE_R}function _i(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function _a(e,t){return Dh(e.charCodeAt(t))&&vh(e.charCodeAt(t+1))}function Dh(e){return e>=55296&&e<=56319}function vh(e){return e>=56320&&e<=57343}function wr(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return U.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function ot(e,t,n,r,i){let s=e.line,o=1+n-e.lineStart;return new yi(t,n,r,s,o,i)}function Y5(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function t7(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Xe(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function n7(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,o=s,a="",u=[];for(;s2?"["+u7(e)+"]":"{ "+n.map(([i,s])=>i+": "+Na(s,t)).join(", ")+" }"}function a7(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function u7(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var l7=globalThis.process&&!0,Lt=l7?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let o=q(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -17987,9371 +95,62 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`) - } - } - return !1 - } - var Ni = class { - constructor(t, n = 'GraphQL request', r = { line: 1, column: 1 }) { - typeof t == 'string' || pe(!1, `Body must be a string. Received: ${q(t)}.`), - (this.body = t), - (this.name = n), - (this.locationOffset = r), - this.locationOffset.line > 0 || - pe(!1, 'line in locationOffset is 1-indexed and must be positive.'), - this.locationOffset.column > 0 || - pe(!1, 'column in locationOffset is 1-indexed and must be positive.') - } - get [Symbol.toStringTag]() { - return 'Source' - } - } - function bh(e) { - return Lt(e, Ni) - } - function Kt(e, t) { - return new Sa(e, t).parseDocument() - } - function Aa(e, t) { - let n = new Sa(e, t) - n.expectToken(U.SOF) - let r = n.parseValueLiteral(!1) - return n.expectToken(U.EOF), r - } - var Sa = class { - constructor(t, n = {}) { - let r = bh(t) ? t : new Ni(t) - ;(this._lexer = new Hs(r)), (this._options = n), (this._tokenCounter = 0) - } - parseName() { - let t = this.expectToken(U.NAME) - return this.node(t, { kind: E.NAME, value: t.value }) - } - parseDocument() { - return this.node(this._lexer.token, { - kind: E.DOCUMENT, - definitions: this.many(U.SOF, this.parseDefinition, U.EOF) - }) - } - parseDefinition() { - if (this.peek(U.BRACE_L)) return this.parseOperationDefinition() - let t = this.peekDescription(), - n = t ? this._lexer.lookahead() : this._lexer.token - if (n.kind === U.NAME) { - switch (n.value) { - case 'schema': - return this.parseSchemaDefinition() - case 'scalar': - return this.parseScalarTypeDefinition() - case 'type': - return this.parseObjectTypeDefinition() - case 'interface': - return this.parseInterfaceTypeDefinition() - case 'union': - return this.parseUnionTypeDefinition() - case 'enum': - return this.parseEnumTypeDefinition() - case 'input': - return this.parseInputObjectTypeDefinition() - case 'directive': - return this.parseDirectiveDefinition() - } - if (t) - throw Xe( - this._lexer.source, - this._lexer.token.start, - 'Unexpected description, descriptions are supported only on type definitions.' - ) - switch (n.value) { - case 'query': - case 'mutation': - case 'subscription': - return this.parseOperationDefinition() - case 'fragment': - return this.parseFragmentDefinition() - case 'extend': - return this.parseTypeSystemExtension() - } - } - throw this.unexpected(n) - } - parseOperationDefinition() { - let t = this._lexer.token - if (this.peek(U.BRACE_L)) - return this.node(t, { - kind: E.OPERATION_DEFINITION, - operation: st.QUERY, - name: void 0, - variableDefinitions: [], - directives: [], - selectionSet: this.parseSelectionSet() - }) - let n = this.parseOperationType(), - r - return ( - this.peek(U.NAME) && (r = this.parseName()), - this.node(t, { - kind: E.OPERATION_DEFINITION, - operation: n, - name: r, - variableDefinitions: this.parseVariableDefinitions(), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - ) - } - parseOperationType() { - let t = this.expectToken(U.NAME) - switch (t.value) { - case 'query': - return st.QUERY - case 'mutation': - return st.MUTATION - case 'subscription': - return st.SUBSCRIPTION - } - throw this.unexpected(t) - } - parseVariableDefinitions() { - return this.optionalMany(U.PAREN_L, this.parseVariableDefinition, U.PAREN_R) - } - parseVariableDefinition() { - return this.node(this._lexer.token, { - kind: E.VARIABLE_DEFINITION, - variable: this.parseVariable(), - type: (this.expectToken(U.COLON), this.parseTypeReference()), - defaultValue: this.expectOptionalToken(U.EQUALS) ? this.parseConstValueLiteral() : void 0, - directives: this.parseConstDirectives() - }) - } - parseVariable() { - let t = this._lexer.token - return this.expectToken(U.DOLLAR), this.node(t, { kind: E.VARIABLE, name: this.parseName() }) - } - parseSelectionSet() { - return this.node(this._lexer.token, { - kind: E.SELECTION_SET, - selections: this.many(U.BRACE_L, this.parseSelection, U.BRACE_R) - }) - } - parseSelection() { - return this.peek(U.SPREAD) ? this.parseFragment() : this.parseField() - } - parseField() { - let t = this._lexer.token, - n = this.parseName(), - r, - i - return ( - this.expectOptionalToken(U.COLON) ? ((r = n), (i = this.parseName())) : (i = n), - this.node(t, { - kind: E.FIELD, - alias: r, - name: i, - arguments: this.parseArguments(!1), - directives: this.parseDirectives(!1), - selectionSet: this.peek(U.BRACE_L) ? this.parseSelectionSet() : void 0 - }) - ) - } - parseArguments(t) { - let n = t ? this.parseConstArgument : this.parseArgument - return this.optionalMany(U.PAREN_L, n, U.PAREN_R) - } - parseArgument(t = !1) { - let n = this._lexer.token, - r = this.parseName() - return ( - this.expectToken(U.COLON), - this.node(n, { kind: E.ARGUMENT, name: r, value: this.parseValueLiteral(t) }) - ) - } - parseConstArgument() { - return this.parseArgument(!0) - } - parseFragment() { - let t = this._lexer.token - this.expectToken(U.SPREAD) - let n = this.expectOptionalKeyword('on') - return !n && this.peek(U.NAME) - ? this.node(t, { - kind: E.FRAGMENT_SPREAD, - name: this.parseFragmentName(), - directives: this.parseDirectives(!1) - }) - : this.node(t, { - kind: E.INLINE_FRAGMENT, - typeCondition: n ? this.parseNamedType() : void 0, - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - } - parseFragmentDefinition() { - let t = this._lexer.token - return ( - this.expectKeyword('fragment'), - this._options.allowLegacyFragmentVariables === !0 - ? this.node(t, { - kind: E.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - variableDefinitions: this.parseVariableDefinitions(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - : this.node(t, { - kind: E.FRAGMENT_DEFINITION, - name: this.parseFragmentName(), - typeCondition: (this.expectKeyword('on'), this.parseNamedType()), - directives: this.parseDirectives(!1), - selectionSet: this.parseSelectionSet() - }) - ) - } - parseFragmentName() { - if (this._lexer.token.value === 'on') throw this.unexpected() - return this.parseName() - } - parseValueLiteral(t) { - let n = this._lexer.token - switch (n.kind) { - case U.BRACKET_L: - return this.parseList(t) - case U.BRACE_L: - return this.parseObject(t) - case U.INT: - return this.advanceLexer(), this.node(n, { kind: E.INT, value: n.value }) - case U.FLOAT: - return this.advanceLexer(), this.node(n, { kind: E.FLOAT, value: n.value }) - case U.STRING: - case U.BLOCK_STRING: - return this.parseStringLiteral() - case U.NAME: - switch ((this.advanceLexer(), n.value)) { - case 'true': - return this.node(n, { kind: E.BOOLEAN, value: !0 }) - case 'false': - return this.node(n, { kind: E.BOOLEAN, value: !1 }) - case 'null': - return this.node(n, { kind: E.NULL }) - default: - return this.node(n, { kind: E.ENUM, value: n.value }) - } - case U.DOLLAR: - if (t) - if ((this.expectToken(U.DOLLAR), this._lexer.token.kind === U.NAME)) { - let r = this._lexer.token.value - throw Xe( - this._lexer.source, - n.start, - `Unexpected variable "$${r}" in constant value.` - ) - } else throw this.unexpected(n) - return this.parseVariable() - default: - throw this.unexpected() - } - } - parseConstValueLiteral() { - return this.parseValueLiteral(!0) - } - parseStringLiteral() { - let t = this._lexer.token - return ( - this.advanceLexer(), - this.node(t, { kind: E.STRING, value: t.value, block: t.kind === U.BLOCK_STRING }) - ) - } - parseList(t) { - let n = () => this.parseValueLiteral(t) - return this.node(this._lexer.token, { - kind: E.LIST, - values: this.any(U.BRACKET_L, n, U.BRACKET_R) - }) - } - parseObject(t) { - let n = () => this.parseObjectField(t) - return this.node(this._lexer.token, { - kind: E.OBJECT, - fields: this.any(U.BRACE_L, n, U.BRACE_R) - }) - } - parseObjectField(t) { - let n = this._lexer.token, - r = this.parseName() - return ( - this.expectToken(U.COLON), - this.node(n, { kind: E.OBJECT_FIELD, name: r, value: this.parseValueLiteral(t) }) - ) - } - parseDirectives(t) { - let n = [] - for (; this.peek(U.AT); ) n.push(this.parseDirective(t)) - return n - } - parseConstDirectives() { - return this.parseDirectives(!0) - } - parseDirective(t) { - let n = this._lexer.token - return ( - this.expectToken(U.AT), - this.node(n, { - kind: E.DIRECTIVE, - name: this.parseName(), - arguments: this.parseArguments(t) - }) - ) - } - parseTypeReference() { - let t = this._lexer.token, - n - if (this.expectOptionalToken(U.BRACKET_L)) { - let r = this.parseTypeReference() - this.expectToken(U.BRACKET_R), (n = this.node(t, { kind: E.LIST_TYPE, type: r })) - } else n = this.parseNamedType() - return this.expectOptionalToken(U.BANG) ? this.node(t, { kind: E.NON_NULL_TYPE, type: n }) : n - } - parseNamedType() { - return this.node(this._lexer.token, { kind: E.NAMED_TYPE, name: this.parseName() }) - } - peekDescription() { - return this.peek(U.STRING) || this.peek(U.BLOCK_STRING) - } - parseDescription() { - if (this.peekDescription()) return this.parseStringLiteral() - } - parseSchemaDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('schema') - let r = this.parseConstDirectives(), - i = this.many(U.BRACE_L, this.parseOperationTypeDefinition, U.BRACE_R) - return this.node(t, { - kind: E.SCHEMA_DEFINITION, - description: n, - directives: r, - operationTypes: i - }) - } - parseOperationTypeDefinition() { - let t = this._lexer.token, - n = this.parseOperationType() - this.expectToken(U.COLON) - let r = this.parseNamedType() - return this.node(t, { kind: E.OPERATION_TYPE_DEFINITION, operation: n, type: r }) - } - parseScalarTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('scalar') - let r = this.parseName(), - i = this.parseConstDirectives() - return this.node(t, { - kind: E.SCALAR_TYPE_DEFINITION, - description: n, - name: r, - directives: i - }) - } - parseObjectTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('type') - let r = this.parseName(), - i = this.parseImplementsInterfaces(), - s = this.parseConstDirectives(), - o = this.parseFieldsDefinition() - return this.node(t, { - kind: E.OBJECT_TYPE_DEFINITION, - description: n, - name: r, - interfaces: i, - directives: s, - fields: o - }) - } - parseImplementsInterfaces() { - return this.expectOptionalKeyword('implements') - ? this.delimitedMany(U.AMP, this.parseNamedType) - : [] - } - parseFieldsDefinition() { - return this.optionalMany(U.BRACE_L, this.parseFieldDefinition, U.BRACE_R) - } - parseFieldDefinition() { - let t = this._lexer.token, - n = this.parseDescription(), - r = this.parseName(), - i = this.parseArgumentDefs() - this.expectToken(U.COLON) - let s = this.parseTypeReference(), - o = this.parseConstDirectives() - return this.node(t, { - kind: E.FIELD_DEFINITION, - description: n, - name: r, - arguments: i, - type: s, - directives: o - }) - } - parseArgumentDefs() { - return this.optionalMany(U.PAREN_L, this.parseInputValueDef, U.PAREN_R) - } - parseInputValueDef() { - let t = this._lexer.token, - n = this.parseDescription(), - r = this.parseName() - this.expectToken(U.COLON) - let i = this.parseTypeReference(), - s - this.expectOptionalToken(U.EQUALS) && (s = this.parseConstValueLiteral()) - let o = this.parseConstDirectives() - return this.node(t, { - kind: E.INPUT_VALUE_DEFINITION, - description: n, - name: r, - type: i, - defaultValue: s, - directives: o - }) - } - parseInterfaceTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('interface') - let r = this.parseName(), - i = this.parseImplementsInterfaces(), - s = this.parseConstDirectives(), - o = this.parseFieldsDefinition() - return this.node(t, { - kind: E.INTERFACE_TYPE_DEFINITION, - description: n, - name: r, - interfaces: i, - directives: s, - fields: o - }) - } - parseUnionTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('union') - let r = this.parseName(), - i = this.parseConstDirectives(), - s = this.parseUnionMemberTypes() - return this.node(t, { - kind: E.UNION_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - types: s - }) - } - parseUnionMemberTypes() { - return this.expectOptionalToken(U.EQUALS) - ? this.delimitedMany(U.PIPE, this.parseNamedType) - : [] - } - parseEnumTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('enum') - let r = this.parseName(), - i = this.parseConstDirectives(), - s = this.parseEnumValuesDefinition() - return this.node(t, { - kind: E.ENUM_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - values: s - }) - } - parseEnumValuesDefinition() { - return this.optionalMany(U.BRACE_L, this.parseEnumValueDefinition, U.BRACE_R) - } - parseEnumValueDefinition() { - let t = this._lexer.token, - n = this.parseDescription(), - r = this.parseEnumValueName(), - i = this.parseConstDirectives() - return this.node(t, { kind: E.ENUM_VALUE_DEFINITION, description: n, name: r, directives: i }) - } - parseEnumValueName() { - if ( - this._lexer.token.value === 'true' || - this._lexer.token.value === 'false' || - this._lexer.token.value === 'null' - ) - throw Xe( - this._lexer.source, - this._lexer.token.start, - `${Ta(this._lexer.token)} is reserved and cannot be used for an enum value.` - ) - return this.parseName() - } - parseInputObjectTypeDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('input') - let r = this.parseName(), - i = this.parseConstDirectives(), - s = this.parseInputFieldsDefinition() - return this.node(t, { - kind: E.INPUT_OBJECT_TYPE_DEFINITION, - description: n, - name: r, - directives: i, - fields: s - }) - } - parseInputFieldsDefinition() { - return this.optionalMany(U.BRACE_L, this.parseInputValueDef, U.BRACE_R) - } - parseTypeSystemExtension() { - let t = this._lexer.lookahead() - if (t.kind === U.NAME) - switch (t.value) { - case 'schema': - return this.parseSchemaExtension() - case 'scalar': - return this.parseScalarTypeExtension() - case 'type': - return this.parseObjectTypeExtension() - case 'interface': - return this.parseInterfaceTypeExtension() - case 'union': - return this.parseUnionTypeExtension() - case 'enum': - return this.parseEnumTypeExtension() - case 'input': - return this.parseInputObjectTypeExtension() - } - throw this.unexpected(t) - } - parseSchemaExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('schema') - let n = this.parseConstDirectives(), - r = this.optionalMany(U.BRACE_L, this.parseOperationTypeDefinition, U.BRACE_R) - if (n.length === 0 && r.length === 0) throw this.unexpected() - return this.node(t, { kind: E.SCHEMA_EXTENSION, directives: n, operationTypes: r }) - } - parseScalarTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('scalar') - let n = this.parseName(), - r = this.parseConstDirectives() - if (r.length === 0) throw this.unexpected() - return this.node(t, { kind: E.SCALAR_TYPE_EXTENSION, name: n, directives: r }) - } - parseObjectTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('type') - let n = this.parseName(), - r = this.parseImplementsInterfaces(), - i = this.parseConstDirectives(), - s = this.parseFieldsDefinition() - if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected() - return this.node(t, { - kind: E.OBJECT_TYPE_EXTENSION, - name: n, - interfaces: r, - directives: i, - fields: s - }) - } - parseInterfaceTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('interface') - let n = this.parseName(), - r = this.parseImplementsInterfaces(), - i = this.parseConstDirectives(), - s = this.parseFieldsDefinition() - if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected() - return this.node(t, { - kind: E.INTERFACE_TYPE_EXTENSION, - name: n, - interfaces: r, - directives: i, - fields: s - }) - } - parseUnionTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('union') - let n = this.parseName(), - r = this.parseConstDirectives(), - i = this.parseUnionMemberTypes() - if (r.length === 0 && i.length === 0) throw this.unexpected() - return this.node(t, { kind: E.UNION_TYPE_EXTENSION, name: n, directives: r, types: i }) - } - parseEnumTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('enum') - let n = this.parseName(), - r = this.parseConstDirectives(), - i = this.parseEnumValuesDefinition() - if (r.length === 0 && i.length === 0) throw this.unexpected() - return this.node(t, { kind: E.ENUM_TYPE_EXTENSION, name: n, directives: r, values: i }) - } - parseInputObjectTypeExtension() { - let t = this._lexer.token - this.expectKeyword('extend'), this.expectKeyword('input') - let n = this.parseName(), - r = this.parseConstDirectives(), - i = this.parseInputFieldsDefinition() - if (r.length === 0 && i.length === 0) throw this.unexpected() - return this.node(t, { - kind: E.INPUT_OBJECT_TYPE_EXTENSION, - name: n, - directives: r, - fields: i - }) - } - parseDirectiveDefinition() { - let t = this._lexer.token, - n = this.parseDescription() - this.expectKeyword('directive'), this.expectToken(U.AT) - let r = this.parseName(), - i = this.parseArgumentDefs(), - s = this.expectOptionalKeyword('repeatable') - this.expectKeyword('on') - let o = this.parseDirectiveLocations() - return this.node(t, { - kind: E.DIRECTIVE_DEFINITION, - description: n, - name: r, - arguments: i, - repeatable: s, - locations: o - }) - } - parseDirectiveLocations() { - return this.delimitedMany(U.PIPE, this.parseDirectiveLocation) - } - parseDirectiveLocation() { - let t = this._lexer.token, - n = this.parseName() - if (Object.prototype.hasOwnProperty.call(K, n.value)) return n - throw this.unexpected(t) - } - node(t, n) { - return ( - this._options.noLocation !== !0 && - (n.loc = new $s(t, this._lexer.lastToken, this._lexer.source)), - n - ) - } - peek(t) { - return this._lexer.token.kind === t - } - expectToken(t) { - let n = this._lexer.token - if (n.kind === t) return this.advanceLexer(), n - throw Xe(this._lexer.source, n.start, `Expected ${Eh(t)}, found ${Ta(n)}.`) - } - expectOptionalToken(t) { - return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1 - } - expectKeyword(t) { - let n = this._lexer.token - if (n.kind === U.NAME && n.value === t) this.advanceLexer() - else throw Xe(this._lexer.source, n.start, `Expected "${t}", found ${Ta(n)}.`) - } - expectOptionalKeyword(t) { - let n = this._lexer.token - return n.kind === U.NAME && n.value === t ? (this.advanceLexer(), !0) : !1 - } - unexpected(t) { - let n = t ?? this._lexer.token - return Xe(this._lexer.source, n.start, `Unexpected ${Ta(n)}.`) - } - any(t, n, r) { - this.expectToken(t) - let i = [] - for (; !this.expectOptionalToken(r); ) i.push(n.call(this)) - return i - } - optionalMany(t, n, r) { - if (this.expectOptionalToken(t)) { - let i = [] - do i.push(n.call(this)) - while (!this.expectOptionalToken(r)) - return i - } - return [] - } - many(t, n, r) { - this.expectToken(t) - let i = [] - do i.push(n.call(this)) - while (!this.expectOptionalToken(r)) - return i - } - delimitedMany(t, n) { - this.expectOptionalToken(t) - let r = [] - do r.push(n.call(this)) - while (this.expectOptionalToken(t)) - return r - } - advanceLexer() { - let { maxTokens: t } = this._options, - n = this._lexer.advance() - if (t !== void 0 && n.kind !== U.EOF && (++this._tokenCounter, this._tokenCounter > t)) - throw Xe( - this._lexer.source, - n.start, - `Document contains more that ${t} tokens. Parsing aborted.` - ) - } - } - function Ta(e) { - let t = e.value - return Eh(e.kind) + (t != null ? ` "${t}"` : '') - } - function Eh(e) { - return gh(e) ? `"${e}"` : e - } - function Mt(e, t) { - let [n, r] = t ? [e, t] : [void 0, e], - i = ' Did you mean ' - n && (i += n + ' ') - let s = r.map((u) => `"${u}"`) - switch (s.length) { - case 0: - return '' - case 1: - return i + s[0] + '?' - case 2: - return i + s[0] + ' or ' + s[1] + '?' - } - let o = s.slice(0, 5), - a = o.pop() - return i + o.join(', ') + ', or ' + a + '?' - } - function cc(e) { - return e - } - function qt(e, t) { - let n = Object.create(null) - for (let r of e) n[t(r)] = r - return n - } - function Dn(e, t, n) { - let r = Object.create(null) - for (let i of e) r[t(i)] = n(i) - return r - } - function on(e, t) { - let n = Object.create(null) - for (let r of Object.keys(e)) n[r] = t(e[r], r) - return n - } - function Ti(e, t) { - let n = 0, - r = 0 - for (; n < e.length && r < t.length; ) { - let i = e.charCodeAt(n), - s = t.charCodeAt(r) - if (Fa(i) && Fa(s)) { - let o = 0 - do ++n, (o = o * 10 + i - fc), (i = e.charCodeAt(n)) - while (Fa(i) && o > 0) - let a = 0 - do ++r, (a = a * 10 + s - fc), (s = t.charCodeAt(r)) - while (Fa(s) && a > 0) - if (o < a) return -1 - if (o > a) return 1 - } else { - if (i < s) return -1 - if (i > s) return 1 - ++n, ++r - } - } - return e.length - t.length - } - var fc = 48, - c7 = 57 - function Fa(e) { - return !isNaN(e) && fc <= e && e <= c7 - } - function Gt(e, t) { - let n = Object.create(null), - r = new dc(e), - i = Math.floor(e.length * 0.4) + 1 - for (let s of t) { - let o = r.measure(s, i) - o !== void 0 && (n[s] = o) - } - return Object.keys(n).sort((s, o) => { - let a = n[s] - n[o] - return a !== 0 ? a : Ti(s, o) - }) - } - var dc = class { - constructor(t) { - ;(this._input = t), - (this._inputLowerCase = t.toLowerCase()), - (this._inputArray = yh(this._inputLowerCase)), - (this._rows = [ - new Array(t.length + 1).fill(0), - new Array(t.length + 1).fill(0), - new Array(t.length + 1).fill(0) - ]) - } - measure(t, n) { - if (this._input === t) return 0 - let r = t.toLowerCase() - if (this._inputLowerCase === r) return 1 - let i = yh(r), - s = this._inputArray - if (i.length < s.length) { - let c = i - ;(i = s), (s = c) - } - let o = i.length, - a = s.length - if (o - a > n) return - let u = this._rows - for (let c = 0; c <= a; c++) u[0][c] = c - for (let c = 1; c <= o; c++) { - let d = u[(c - 1) % 3], - h = u[c % 3], - m = (h[0] = c) - for (let g = 1; g <= a; g++) { - let v = i[c - 1] === s[g - 1] ? 0 : 1, - N = Math.min(d[g] + 1, h[g - 1] + 1, d[g - 1] + v) - if (c > 1 && g > 1 && i[c - 1] === s[g - 2] && i[c - 2] === s[g - 1]) { - let _ = u[(c - 2) % 3][g - 2] - N = Math.min(N, _ + 1) - } - N < m && (m = N), (h[g] = N) - } - if (m > n) return - } - let l = u[o % 3][a] - return l <= n ? l : void 0 - } - } - function yh(e) { - let t = e.length, - n = new Array(t) - for (let r = 0; r < t; ++r) n[r] = e.charCodeAt(r) - return n - } - function Ct(e) { - if (e == null) return Object.create(null) - if (Object.getPrototypeOf(e) === null) return e - let t = Object.create(null) - for (let [n, r] of Object.entries(e)) t[n] = r - return t - } - function xh(e) { - return `"${e.replace(f7, d7)}"` - } - var f7 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g - function d7(e) { - return p7[e.charCodeAt(0)] - } - var p7 = [ - '\\u0000', - '\\u0001', - '\\u0002', - '\\u0003', - '\\u0004', - '\\u0005', - '\\u0006', - '\\u0007', - '\\b', - '\\t', - '\\n', - '\\u000B', - '\\f', - '\\r', - '\\u000E', - '\\u000F', - '\\u0010', - '\\u0011', - '\\u0012', - '\\u0013', - '\\u0014', - '\\u0015', - '\\u0016', - '\\u0017', - '\\u0018', - '\\u0019', - '\\u001A', - '\\u001B', - '\\u001C', - '\\u001D', - '\\u001E', - '\\u001F', - '', - '', - '\\"', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '\\\\', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '', - '\\u007F', - '\\u0080', - '\\u0081', - '\\u0082', - '\\u0083', - '\\u0084', - '\\u0085', - '\\u0086', - '\\u0087', - '\\u0088', - '\\u0089', - '\\u008A', - '\\u008B', - '\\u008C', - '\\u008D', - '\\u008E', - '\\u008F', - '\\u0090', - '\\u0091', - '\\u0092', - '\\u0093', - '\\u0094', - '\\u0095', - '\\u0096', - '\\u0097', - '\\u0098', - '\\u0099', - '\\u009A', - '\\u009B', - '\\u009C', - '\\u009D', - '\\u009E', - '\\u009F' - ] - var Bn = Object.freeze({}) - function ht(e, t, n = uc) { - let r = new Map() - for (let _ of Object.values(E)) r.set(_, Lr(t, _)) - let i, - s = Array.isArray(e), - o = [e], - a = -1, - u = [], - l = e, - c, - d, - h = [], - m = [] - do { - a++ - let _ = a === o.length, - w = _ && u.length !== 0 - if (_) { - if (((c = m.length === 0 ? void 0 : h[h.length - 1]), (l = d), (d = m.pop()), w)) - if (s) { - l = l.slice() - let S = 0 - for (let [k, M] of u) { - let I = k - S - M === null ? (l.splice(I, 1), S++) : (l[I] = M) - } - } else { - l = Object.defineProperties({}, Object.getOwnPropertyDescriptors(l)) - for (let [S, k] of u) l[S] = k - } - ;(a = i.index), (o = i.keys), (u = i.edits), (s = i.inArray), (i = i.prev) - } else if (d) { - if (((c = s ? a : o[a]), (l = d[c]), l == null)) continue - h.push(c) - } - let C - if (!Array.isArray(l)) { - var g, v - js(l) || pe(!1, `Invalid AST Node: ${q(l)}.`) - let S = _ - ? (g = r.get(l.kind)) === null || g === void 0 - ? void 0 - : g.leave - : (v = r.get(l.kind)) === null || v === void 0 - ? void 0 - : v.enter - if (((C = S?.call(t, l, c, d, h, m)), C === Bn)) break - if (C === !1) { - if (!_) { - h.pop() - continue - } - } else if (C !== void 0 && (u.push([c, C]), !_)) - if (js(C)) l = C - else { - h.pop() - continue - } - } - if ((C === void 0 && w && u.push([c, l]), _)) h.pop() - else { - var N - ;(i = { inArray: s, index: a, keys: o, edits: u, prev: i }), - (s = Array.isArray(l)), - (o = s ? l : (N = n[l.kind]) !== null && N !== void 0 ? N : []), - (a = -1), - (u = []), - d && m.push(d), - (d = l) - } - } while (i !== void 0) - return u.length !== 0 ? u[u.length - 1][1] : e - } - function Ws(e) { - let t = new Array(e.length).fill(null), - n = Object.create(null) - for (let r of Object.values(E)) { - let i = !1, - s = new Array(e.length).fill(void 0), - o = new Array(e.length).fill(void 0) - for (let u = 0; u < e.length; ++u) { - let { enter: l, leave: c } = Lr(e[u], r) - i || (i = l != null || c != null), (s[u] = l), (o[u] = c) - } - if (!i) continue - let a = { - enter(...u) { - let l = u[0] - for (let d = 0; d < e.length; d++) - if (t[d] === null) { - var c - let h = (c = s[d]) === null || c === void 0 ? void 0 : c.apply(e[d], u) - if (h === !1) t[d] = l - else if (h === Bn) t[d] = Bn - else if (h !== void 0) return h - } - }, - leave(...u) { - let l = u[0] - for (let d = 0; d < e.length; d++) - if (t[d] === null) { - var c - let h = (c = o[d]) === null || c === void 0 ? void 0 : c.apply(e[d], u) - if (h === Bn) t[d] = Bn - else if (h !== void 0 && h !== !1) return h - } else t[d] === l && (t[d] = null) - } - } - n[r] = a - } - return n - } - function Lr(e, t) { - let n = e[t] - return typeof n == 'object' - ? n - : typeof n == 'function' - ? { enter: n, leave: void 0 } - : { enter: e.enter, leave: e.leave } - } - function Le(e) { - return ht(e, m7) - } - var h7 = 80, - m7 = { - Name: { leave: (e) => e.value }, - Variable: { leave: (e) => '$' + e.name }, - Document: { - leave: (e) => - te( - e.definitions, - ` +spurious results.`)}}return!1};var Ni=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||pe(!1,`Body must be a string. Received: ${q(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||pe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||pe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function bh(e){return Lt(e,Ni)}function Kt(e,t){return new Sa(e,t).parseDocument()}function Aa(e,t){let n=new Sa(e,t);n.expectToken(U.SOF);let r=n.parseValueLiteral(!1);return n.expectToken(U.EOF),r}var Sa=class{constructor(t,n={}){let r=bh(t)?t:new Ni(t);this._lexer=new Hs(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(U.NAME);return this.node(t,{kind:E.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:E.DOCUMENT,definitions:this.many(U.SOF,this.parseDefinition,U.EOF)})}parseDefinition(){if(this.peek(U.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===U.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw Xe(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(U.BRACE_L))return this.node(t,{kind:E.OPERATION_DEFINITION,operation:st.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(U.NAME)&&(r=this.parseName()),this.node(t,{kind:E.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(U.NAME);switch(t.value){case"query":return st.QUERY;case"mutation":return st.MUTATION;case"subscription":return st.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(U.PAREN_L,this.parseVariableDefinition,U.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:E.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(U.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(U.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(U.DOLLAR),this.node(t,{kind:E.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:E.SELECTION_SET,selections:this.many(U.BRACE_L,this.parseSelection,U.BRACE_R)})}parseSelection(){return this.peek(U.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(U.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:E.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(U.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(U.PAREN_L,n,U.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(U.COLON),this.node(n,{kind:E.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(U.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(U.NAME)?this.node(t,{kind:E.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:E.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:E.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case U.BRACKET_L:return this.parseList(t);case U.BRACE_L:return this.parseObject(t);case U.INT:return this.advanceLexer(),this.node(n,{kind:E.INT,value:n.value});case U.FLOAT:return this.advanceLexer(),this.node(n,{kind:E.FLOAT,value:n.value});case U.STRING:case U.BLOCK_STRING:return this.parseStringLiteral();case U.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:E.BOOLEAN,value:!0});case"false":return this.node(n,{kind:E.BOOLEAN,value:!1});case"null":return this.node(n,{kind:E.NULL});default:return this.node(n,{kind:E.ENUM,value:n.value})}case U.DOLLAR:if(t)if(this.expectToken(U.DOLLAR),this._lexer.token.kind===U.NAME){let r=this._lexer.token.value;throw Xe(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:E.STRING,value:t.value,block:t.kind===U.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:E.LIST,values:this.any(U.BRACKET_L,n,U.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:E.OBJECT,fields:this.any(U.BRACE_L,n,U.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(U.COLON),this.node(n,{kind:E.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(U.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(U.AT),this.node(n,{kind:E.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(U.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(U.BRACKET_R),n=this.node(t,{kind:E.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(U.BANG)?this.node(t,{kind:E.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:E.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(U.STRING)||this.peek(U.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(U.BRACE_L,this.parseOperationTypeDefinition,U.BRACE_R);return this.node(t,{kind:E.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(U.COLON);let r=this.parseNamedType();return this.node(t,{kind:E.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:E.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:E.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(U.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(U.BRACE_L,this.parseFieldDefinition,U.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(U.COLON);let s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:E.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(U.PAREN_L,this.parseInputValueDef,U.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(U.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(U.EQUALS)&&(s=this.parseConstValueLiteral());let o=this.parseConstDirectives();return this.node(t,{kind:E.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:E.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:E.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(U.EQUALS)?this.delimitedMany(U.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:E.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(U.BRACE_L,this.parseEnumValueDefinition,U.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:E.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Xe(this._lexer.source,this._lexer.token.start,`${Ta(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(U.BRACE_L,this.parseInputValueDef,U.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===U.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(U.BRACE_L,this.parseOperationTypeDefinition,U.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:E.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:E.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:E.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:E.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:E.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:E.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:E.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(U.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let o=this.parseDirectiveLocations();return this.node(t,{kind:E.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(U.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(K,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new $s(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Xe(this._lexer.source,n.start,`Expected ${Eh(t)}, found ${Ta(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===U.NAME&&n.value===t)this.advanceLexer();else throw Xe(this._lexer.source,n.start,`Expected "${t}", found ${Ta(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===U.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return Xe(this._lexer.source,n.start,`Unexpected ${Ta(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==U.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Xe(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function Ta(e){let t=e.value;return Eh(e.kind)+(t!=null?` "${t}"`:"")}function Eh(e){return gh(e)?`"${e}"`:e}function Mt(e,t){let[n,r]=t?[e,t]:[void 0,e],i=" Did you mean ";n&&(i+=n+" ");let s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}let o=s.slice(0,5),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function cc(e){return e}function qt(e,t){let n=Object.create(null);for(let r of e)n[t(r)]=r;return n}function Dn(e,t,n){let r=Object.create(null);for(let i of e)r[t(i)]=n(i);return r}function on(e,t){let n=Object.create(null);for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function Ti(e,t){let n=0,r=0;for(;n0);let a=0;do++r,a=a*10+s-fc,s=t.charCodeAt(r);while(Fa(s)&&a>0);if(oa)return 1}else{if(is)return 1;++n,++r}}return e.length-t.length}var fc=48,c7=57;function Fa(e){return!isNaN(e)&&fc<=e&&e<=c7}function Gt(e,t){let n=Object.create(null),r=new dc(e),i=Math.floor(e.length*.4)+1;for(let s of t){let o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{let a=n[s]-n[o];return a!==0?a:Ti(s,o)})}var dc=class{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=yh(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;let r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=yh(r),s=this._inputArray;if(i.lengthn)return;let u=this._rows;for(let c=0;c<=a;c++)u[0][c]=c;for(let c=1;c<=o;c++){let d=u[(c-1)%3],h=u[c%3],m=h[0]=c;for(let g=1;g<=a;g++){let v=i[c-1]===s[g-1]?0:1,N=Math.min(d[g]+1,h[g-1]+1,d[g-1]+v);if(c>1&&g>1&&i[c-1]===s[g-2]&&i[c-2]===s[g-1]){let _=u[(c-2)%3][g-2];N=Math.min(N,_+1)}Nn)return}let l=u[o%3][a];return l<=n?l:void 0}};function yh(e){let t=e.length,n=new Array(t);for(let r=0;re.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>te(e.definitions,` -` - ) - }, - OperationDefinition: { - leave(e) { - let t = ye('(', te(e.variableDefinitions, ', '), ')'), - n = te([e.operation, te([e.name, t]), te(e.directives, ' ')], ' ') - return (n === 'query' ? '' : n + ' ') + e.selectionSet - } - }, - VariableDefinition: { - leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => - e + ': ' + t + ye(' = ', n) + ye(' ', te(r, ' ')) - }, - SelectionSet: { leave: ({ selections: e }) => an(e) }, - Field: { - leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) { - let s = ye('', e, ': ') + t, - o = s + ye('(', te(n, ', '), ')') - return ( - o.length > h7 && - (o = - s + - ye( - `( -`, - wa( - te( - n, - ` -` - ) - ), - ` -)` - )), - te([o, te(r, ' '), i], ' ') - ) - } - }, - Argument: { leave: ({ name: e, value: t }) => e + ': ' + t }, - FragmentSpread: { leave: ({ name: e, directives: t }) => '...' + e + ye(' ', te(t, ' ')) }, - InlineFragment: { - leave: ({ typeCondition: e, directives: t, selectionSet: n }) => - te(['...', ye('on ', e), te(t, ' '), n], ' ') - }, - FragmentDefinition: { - leave: ({ - name: e, - typeCondition: t, - variableDefinitions: n, - directives: r, - selectionSet: i - }) => `fragment ${e}${ye('(', te(n, ', '), ')')} on ${t} ${ye('', te(r, ' '), ' ')}` + i - }, - IntValue: { leave: ({ value: e }) => e }, - FloatValue: { leave: ({ value: e }) => e }, - StringValue: { leave: ({ value: e, block: t }) => (t ? hh(e) : xh(e)) }, - BooleanValue: { leave: ({ value: e }) => (e ? 'true' : 'false') }, - NullValue: { leave: () => 'null' }, - EnumValue: { leave: ({ value: e }) => e }, - ListValue: { leave: ({ values: e }) => '[' + te(e, ', ') + ']' }, - ObjectValue: { leave: ({ fields: e }) => '{' + te(e, ', ') + '}' }, - ObjectField: { leave: ({ name: e, value: t }) => e + ': ' + t }, - Directive: { leave: ({ name: e, arguments: t }) => '@' + e + ye('(', te(t, ', '), ')') }, - NamedType: { leave: ({ name: e }) => e }, - ListType: { leave: ({ type: e }) => '[' + e + ']' }, - NonNullType: { leave: ({ type: e }) => e + '!' }, - SchemaDefinition: { - leave: ({ description: e, directives: t, operationTypes: n }) => - ye( - '', - e, - ` -` - ) + te(['schema', te(t, ' '), an(n)], ' ') - }, - OperationTypeDefinition: { leave: ({ operation: e, type: t }) => e + ': ' + t }, - ScalarTypeDefinition: { - leave: ({ description: e, name: t, directives: n }) => - ye( - '', - e, - ` -` - ) + te(['scalar', t, te(n, ' ')], ' ') - }, - ObjectTypeDefinition: { - leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => - ye( - '', - e, - ` -` - ) + te(['type', t, ye('implements ', te(n, ' & ')), te(r, ' '), an(i)], ' ') - }, - FieldDefinition: { - leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => - ye( - '', - e, - ` -` - ) + - t + - (_h(n) - ? ye( - `( -`, - wa( - te( - n, - ` -` - ) - ), - ` -)` - ) - : ye('(', te(n, ', '), ')')) + - ': ' + - r + - ye(' ', te(i, ' ')) - }, - InputValueDefinition: { - leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => - ye( - '', - e, - ` -` - ) + te([t + ': ' + n, ye('= ', r), te(i, ' ')], ' ') - }, - InterfaceTypeDefinition: { - leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => - ye( - '', - e, - ` -` - ) + te(['interface', t, ye('implements ', te(n, ' & ')), te(r, ' '), an(i)], ' ') - }, - UnionTypeDefinition: { - leave: ({ description: e, name: t, directives: n, types: r }) => - ye( - '', - e, - ` -` - ) + te(['union', t, te(n, ' '), ye('= ', te(r, ' | '))], ' ') - }, - EnumTypeDefinition: { - leave: ({ description: e, name: t, directives: n, values: r }) => - ye( - '', - e, - ` -` - ) + te(['enum', t, te(n, ' '), an(r)], ' ') - }, - EnumValueDefinition: { - leave: ({ description: e, name: t, directives: n }) => - ye( - '', - e, - ` -` - ) + te([t, te(n, ' ')], ' ') - }, - InputObjectTypeDefinition: { - leave: ({ description: e, name: t, directives: n, fields: r }) => - ye( - '', - e, - ` -` - ) + te(['input', t, te(n, ' '), an(r)], ' ') - }, - DirectiveDefinition: { - leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => - ye( - '', - e, - ` -` - ) + - 'directive @' + - t + - (_h(n) - ? ye( - `( -`, - wa( - te( - n, - ` -` - ) - ), - ` -)` - ) - : ye('(', te(n, ', '), ')')) + - (r ? ' repeatable' : '') + - ' on ' + - te(i, ' | ') - }, - SchemaExtension: { - leave: ({ directives: e, operationTypes: t }) => - te(['extend schema', te(e, ' '), an(t)], ' ') - }, - ScalarTypeExtension: { - leave: ({ name: e, directives: t }) => te(['extend scalar', e, te(t, ' ')], ' ') - }, - ObjectTypeExtension: { - leave: ({ name: e, interfaces: t, directives: n, fields: r }) => - te(['extend type', e, ye('implements ', te(t, ' & ')), te(n, ' '), an(r)], ' ') - }, - InterfaceTypeExtension: { - leave: ({ name: e, interfaces: t, directives: n, fields: r }) => - te(['extend interface', e, ye('implements ', te(t, ' & ')), te(n, ' '), an(r)], ' ') - }, - UnionTypeExtension: { - leave: ({ name: e, directives: t, types: n }) => - te(['extend union', e, te(t, ' '), ye('= ', te(n, ' | '))], ' ') - }, - EnumTypeExtension: { - leave: ({ name: e, directives: t, values: n }) => - te(['extend enum', e, te(t, ' '), an(n)], ' ') - }, - InputObjectTypeExtension: { - leave: ({ name: e, directives: t, fields: n }) => - te(['extend input', e, te(t, ' '), an(n)], ' ') - } - } - function te(e, t = '') { - var n - return (n = e?.filter((r) => r).join(t)) !== null && n !== void 0 ? n : '' - } - function an(e) { - return ye( - `{ -`, - wa( - te( - e, - ` -` - ) - ), - ` -}` - ) - } - function ye(e, t, n = '') { - return t != null && t !== '' ? e + t + n : '' - } - function wa(e) { - return ye( - ' ', - e.replace( - /\n/g, - ` - ` - ) - ) - } - function _h(e) { - var t - return (t = e?.some((n) => - n.includes(` -`) - )) !== null && t !== void 0 - ? t - : !1 - } - function Qs(e, t) { - switch (e.kind) { - case E.NULL: - return null - case E.INT: - return parseInt(e.value, 10) - case E.FLOAT: - return parseFloat(e.value) - case E.STRING: - case E.ENUM: - case E.BOOLEAN: - return e.value - case E.LIST: - return e.values.map((n) => Qs(n, t)) - case E.OBJECT: - return Dn( - e.fields, - (n) => n.name.value, - (n) => Qs(n.value, t) - ) - case E.VARIABLE: - return t?.[e.name.value] - } - } - function Pt(e) { - if ( - (e != null || pe(!1, 'Must provide name.'), - typeof e == 'string' || pe(!1, 'Expected name to be a string.'), - e.length === 0) - ) - throw new O('Expected name to be a non-empty string.') - for (let t = 1; t < e.length; ++t) - if (!xa(e.charCodeAt(t))) - throw new O(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`) - if (!qs(e.charCodeAt(0))) throw new O(`Names must start with [_a-zA-Z] but "${e}" does not.`) - return e - } - function pc(e) { - if (e === 'true' || e === 'false' || e === 'null') - throw new O(`Enum values cannot be named: ${e}`) - return Pt(e) - } - function Ai(e) { - return ct(e) || me(e) || De(e) || Ze(e) || Be(e) || be(e) || Fe(e) || ce(e) - } - function ct(e) { - return Lt(e, Tt) - } - function me(e) { - return Lt(e, Ke) - } - function Ca(e) { - if (!me(e)) throw new Error(`Expected ${q(e)} to be a GraphQL Object type.`) - return e - } - function De(e) { - return Lt(e, St) - } - function Ia(e) { - if (!De(e)) throw new Error(`Expected ${q(e)} to be a GraphQL Interface type.`) - return e - } - function Ze(e) { - return Lt(e, vn) - } - function Be(e) { - return Lt(e, bt) - } - function be(e) { - return Lt(e, Zt) - } - function Fe(e) { - return Lt(e, Me) - } - function ce(e) { - return Lt(e, ae) - } - function et(e) { - return ct(e) || Be(e) || be(e) || (zs(e) && et(e.ofType)) - } - function Ht(e) { - return ct(e) || me(e) || De(e) || Ze(e) || Be(e) || (zs(e) && Ht(e.ofType)) - } - function Wt(e) { - return ct(e) || Be(e) - } - function at(e) { - return me(e) || De(e) || Ze(e) - } - function mt(e) { - return De(e) || Ze(e) - } - function Ra(e) { - if (!mt(e)) throw new Error(`Expected ${q(e)} to be a GraphQL abstract type.`) - return e - } - var Me = class { - constructor(t) { - Ai(t) || pe(!1, `Expected ${q(t)} to be a GraphQL type.`), (this.ofType = t) - } - get [Symbol.toStringTag]() { - return 'GraphQLList' - } - toString() { - return '[' + String(this.ofType) + ']' - } - toJSON() { - return this.toString() - } - }, - ae = class { - constructor(t) { - ka(t) || pe(!1, `Expected ${q(t)} to be a GraphQL nullable type.`), (this.ofType = t) - } - get [Symbol.toStringTag]() { - return 'GraphQLNonNull' - } - toString() { - return String(this.ofType) + '!' - } - toJSON() { - return this.toString() - } - } - function zs(e) { - return Fe(e) || ce(e) - } - function ka(e) { - return Ai(e) && !ce(e) - } - function Oa(e) { - if (!ka(e)) throw new Error(`Expected ${q(e)} to be a GraphQL nullable type.`) - return e - } - function fr(e) { - if (e) return ce(e) ? e.ofType : e - } - function Ma(e) { - return ct(e) || me(e) || De(e) || Ze(e) || Be(e) || be(e) - } - function we(e) { - if (e) { - let t = e - for (; zs(t); ) t = t.ofType - return t - } - } - function Pa(e) { - return typeof e == 'function' ? e() : e - } - function Ba(e) { - return typeof e == 'function' ? e() : e - } - var Tt = class { - constructor(t) { - var n, r, i, s - let o = (n = t.parseValue) !== null && n !== void 0 ? n : cc - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.specifiedByURL = t.specifiedByURL), - (this.serialize = (r = t.serialize) !== null && r !== void 0 ? r : cc), - (this.parseValue = o), - (this.parseLiteral = - (i = t.parseLiteral) !== null && i !== void 0 ? i : (a, u) => o(Qs(a, u))), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (s = t.extensionASTNodes) !== null && s !== void 0 ? s : []), - t.specifiedByURL == null || - typeof t.specifiedByURL == 'string' || - pe( - !1, - `${this.name} must provide "specifiedByURL" as a string, but got: ${q( - t.specifiedByURL - )}.` - ), - t.serialize == null || - typeof t.serialize == 'function' || - pe( - !1, - `${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.` - ), - t.parseLiteral && - ((typeof t.parseValue == 'function' && typeof t.parseLiteral == 'function') || - pe(!1, `${this.name} must provide both "parseValue" and "parseLiteral" functions.`)) - } - get [Symbol.toStringTag]() { - return 'GraphQLScalarType' - } - toConfig() { - return { - name: this.name, - description: this.description, - specifiedByURL: this.specifiedByURL, - serialize: this.serialize, - parseValue: this.parseValue, - parseLiteral: this.parseLiteral, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - }, - Ke = class { - constructor(t) { - var n - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.isTypeOf = t.isTypeOf), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this._fields = () => Sh(t)), - (this._interfaces = () => Th(t)), - t.isTypeOf == null || - typeof t.isTypeOf == 'function' || - pe(!1, `${this.name} must provide "isTypeOf" as a function, but got: ${q(t.isTypeOf)}.`) - } - get [Symbol.toStringTag]() { - return 'GraphQLObjectType' - } - getFields() { - return typeof this._fields == 'function' && (this._fields = this._fields()), this._fields - } - getInterfaces() { - return ( - typeof this._interfaces == 'function' && (this._interfaces = this._interfaces()), - this._interfaces - ) - } - toConfig() { - return { - name: this.name, - description: this.description, - interfaces: this.getInterfaces(), - fields: Ah(this.getFields()), - isTypeOf: this.isTypeOf, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - } - function Th(e) { - var t - let n = Pa((t = e.interfaces) !== null && t !== void 0 ? t : []) - return ( - Array.isArray(n) || - pe(!1, `${e.name} interfaces must be an Array or a function which returns an Array.`), - n - ) - } - function Sh(e) { - let t = Ba(e.fields) - return ( - Si(t) || - pe( - !1, - `${e.name} fields must be an object with field names as keys or a function which returns such an object.` - ), - on(t, (n, r) => { - var i - Si(n) || pe(!1, `${e.name}.${r} field config must be an object.`), - n.resolve == null || - typeof n.resolve == 'function' || - pe( - !1, - `${e.name}.${r} field resolver must be a function if provided, but got: ${q( - n.resolve - )}.` - ) - let s = (i = n.args) !== null && i !== void 0 ? i : {} - return ( - Si(s) || pe(!1, `${e.name}.${r} args must be an object with argument names as keys.`), - { - name: Pt(r), - description: n.description, - type: n.type, - args: hc(s), - resolve: n.resolve, - subscribe: n.subscribe, - deprecationReason: n.deprecationReason, - extensions: Ct(n.extensions), - astNode: n.astNode - } - ) - }) - ) - } - function hc(e) { - return Object.entries(e).map(([t, n]) => ({ - name: Pt(t), - description: n.description, - type: n.type, - defaultValue: n.defaultValue, - deprecationReason: n.deprecationReason, - extensions: Ct(n.extensions), - astNode: n.astNode - })) - } - function Si(e) { - return Nt(e) && !Array.isArray(e) - } - function Ah(e) { - return on(e, (t) => ({ - description: t.description, - type: t.type, - args: mc(t.args), - resolve: t.resolve, - subscribe: t.subscribe, - deprecationReason: t.deprecationReason, - extensions: t.extensions, - astNode: t.astNode - })) - } - function mc(e) { - return Dn( - e, - (t) => t.name, - (t) => ({ - description: t.description, - type: t.type, - defaultValue: t.defaultValue, - deprecationReason: t.deprecationReason, - extensions: t.extensions, - astNode: t.astNode - }) - ) - } - function Vn(e) { - return ce(e.type) && e.defaultValue === void 0 - } - var St = class { - constructor(t) { - var n - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.resolveType = t.resolveType), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this._fields = Sh.bind(void 0, t)), - (this._interfaces = Th.bind(void 0, t)), - t.resolveType == null || - typeof t.resolveType == 'function' || - pe( - !1, - `${this.name} must provide "resolveType" as a function, but got: ${q(t.resolveType)}.` - ) - } - get [Symbol.toStringTag]() { - return 'GraphQLInterfaceType' - } - getFields() { - return typeof this._fields == 'function' && (this._fields = this._fields()), this._fields - } - getInterfaces() { - return ( - typeof this._interfaces == 'function' && (this._interfaces = this._interfaces()), - this._interfaces - ) - } - toConfig() { - return { - name: this.name, - description: this.description, - interfaces: this.getInterfaces(), - fields: Ah(this.getFields()), - resolveType: this.resolveType, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - }, - vn = class { - constructor(t) { - var n - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.resolveType = t.resolveType), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this._types = g7.bind(void 0, t)), - t.resolveType == null || - typeof t.resolveType == 'function' || - pe( - !1, - `${this.name} must provide "resolveType" as a function, but got: ${q(t.resolveType)}.` - ) - } - get [Symbol.toStringTag]() { - return 'GraphQLUnionType' - } - getTypes() { - return typeof this._types == 'function' && (this._types = this._types()), this._types - } - toConfig() { - return { - name: this.name, - description: this.description, - types: this.getTypes(), - resolveType: this.resolveType, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - } - function g7(e) { - let t = Pa(e.types) - return ( - Array.isArray(t) || - pe( - !1, - `Must provide Array of types or a function which returns such an array for Union ${e.name}.` - ), - t - ) - } - var bt = class { - constructor(t) { - var n - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this._values = typeof t.values == 'function' ? t.values : Nh(this.name, t.values)), - (this._valueLookup = null), - (this._nameLookup = null) - } - get [Symbol.toStringTag]() { - return 'GraphQLEnumType' - } - getValues() { - return ( - typeof this._values == 'function' && (this._values = Nh(this.name, this._values())), - this._values - ) - } - getValue(t) { - return ( - this._nameLookup === null && (this._nameLookup = qt(this.getValues(), (n) => n.name)), - this._nameLookup[t] - ) - } - serialize(t) { - this._valueLookup === null && - (this._valueLookup = new Map(this.getValues().map((r) => [r.value, r]))) - let n = this._valueLookup.get(t) - if (n === void 0) throw new O(`Enum "${this.name}" cannot represent value: ${q(t)}`) - return n.name - } - parseValue(t) { - if (typeof t != 'string') { - let r = q(t) - throw new O(`Enum "${this.name}" cannot represent non-string value: ${r}.` + La(this, r)) - } - let n = this.getValue(t) - if (n == null) - throw new O(`Value "${t}" does not exist in "${this.name}" enum.` + La(this, t)) - return n.value - } - parseLiteral(t, n) { - if (t.kind !== E.ENUM) { - let i = Le(t) - throw new O(`Enum "${this.name}" cannot represent non-enum value: ${i}.` + La(this, i), { - nodes: t - }) - } - let r = this.getValue(t.value) - if (r == null) { - let i = Le(t) - throw new O(`Value "${i}" does not exist in "${this.name}" enum.` + La(this, i), { - nodes: t - }) - } - return r.value - } - toConfig() { - let t = Dn( - this.getValues(), - (n) => n.name, - (n) => ({ - description: n.description, - value: n.value, - deprecationReason: n.deprecationReason, - extensions: n.extensions, - astNode: n.astNode - }) - ) - return { - name: this.name, - description: this.description, - values: t, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - } - function La(e, t) { - let n = e.getValues().map((i) => i.name), - r = Gt(t, n) - return Mt('the enum value', r) - } - function Nh(e, t) { - return ( - Si(t) || pe(!1, `${e} values must be an object with value names as keys.`), - Object.entries(t).map( - ([n, r]) => ( - Si(r) || - pe( - !1, - `${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${q( - r - )}.` - ), - { - name: pc(n), - description: r.description, - value: r.value !== void 0 ? r.value : n, - deprecationReason: r.deprecationReason, - extensions: Ct(r.extensions), - astNode: r.astNode - } - ) - ) - ) - } - var Zt = class { - constructor(t) { - var n, r - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this.isOneOf = (r = t.isOneOf) !== null && r !== void 0 ? r : !1), - (this._fields = D7.bind(void 0, t)) - } - get [Symbol.toStringTag]() { - return 'GraphQLInputObjectType' - } - getFields() { - return typeof this._fields == 'function' && (this._fields = this._fields()), this._fields - } - toConfig() { - let t = on(this.getFields(), (n) => ({ - description: n.description, - type: n.type, - defaultValue: n.defaultValue, - deprecationReason: n.deprecationReason, - extensions: n.extensions, - astNode: n.astNode - })) - return { - name: this.name, - description: this.description, - fields: t, - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes, - isOneOf: this.isOneOf - } - } - toString() { - return this.name - } - toJSON() { - return this.toString() - } - } - function D7(e) { - let t = Ba(e.fields) - return ( - Si(t) || - pe( - !1, - `${e.name} fields must be an object with field names as keys or a function which returns such an object.` - ), - on( - t, - (n, r) => ( - !('resolve' in n) || - pe( - !1, - `${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.` - ), - { - name: Pt(r), - description: n.description, - type: n.type, - defaultValue: n.defaultValue, - deprecationReason: n.deprecationReason, - extensions: Ct(n.extensions), - astNode: n.astNode - } - ) - ) - ) - } - function Fi(e) { - return ce(e.type) && e.defaultValue === void 0 - } - function wi(e, t) { - return e === t ? !0 : (ce(e) && ce(t)) || (Fe(e) && Fe(t)) ? wi(e.ofType, t.ofType) : !1 - } - function bn(e, t, n) { - return t === n - ? !0 - : ce(n) - ? ce(t) - ? bn(e, t.ofType, n.ofType) - : !1 - : ce(t) - ? bn(e, t.ofType, n) - : Fe(n) - ? Fe(t) - ? bn(e, t.ofType, n.ofType) - : !1 - : Fe(t) - ? !1 - : mt(n) && (De(t) || me(t)) && e.isSubType(n, t) - } - function Cr(e, t, n) { - return t === n - ? !0 - : mt(t) - ? mt(n) - ? e.getPossibleTypes(t).some((r) => e.isSubType(n, r)) - : e.isSubType(t, n) - : mt(n) - ? e.isSubType(n, t) - : !1 - } - var Ys = 2147483647, - Js = -2147483648, - gc = new Tt({ - name: 'Int', - description: - 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', - serialize(e) { - let t = Zs(e) - if (typeof t == 'boolean') return t ? 1 : 0 - let n = t - if ( - (typeof t == 'string' && t !== '' && (n = Number(t)), - typeof n != 'number' || !Number.isInteger(n)) - ) - throw new O(`Int cannot represent non-integer value: ${q(t)}`) - if (n > Ys || n < Js) - throw new O('Int cannot represent non 32-bit signed integer value: ' + q(t)) - return n - }, - parseValue(e) { - if (typeof e != 'number' || !Number.isInteger(e)) - throw new O(`Int cannot represent non-integer value: ${q(e)}`) - if (e > Ys || e < Js) - throw new O(`Int cannot represent non 32-bit signed integer value: ${e}`) - return e - }, - parseLiteral(e) { - if (e.kind !== E.INT) - throw new O(`Int cannot represent non-integer value: ${Le(e)}`, { nodes: e }) - let t = parseInt(e.value, 10) - if (t > Ys || t < Js) - throw new O(`Int cannot represent non 32-bit signed integer value: ${e.value}`, { - nodes: e - }) - return t - } - }), - Xs = new Tt({ - name: 'Float', - description: - 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', - serialize(e) { - let t = Zs(e) - if (typeof t == 'boolean') return t ? 1 : 0 - let n = t - if ( - (typeof t == 'string' && t !== '' && (n = Number(t)), - typeof n != 'number' || !Number.isFinite(n)) - ) - throw new O(`Float cannot represent non numeric value: ${q(t)}`) - return n - }, - parseValue(e) { - if (typeof e != 'number' || !Number.isFinite(e)) - throw new O(`Float cannot represent non numeric value: ${q(e)}`) - return e - }, - parseLiteral(e) { - if (e.kind !== E.FLOAT && e.kind !== E.INT) - throw new O(`Float cannot represent non numeric value: ${Le(e)}`, e) - return parseFloat(e.value) - } - }), - je = new Tt({ - name: 'String', - description: - 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', - serialize(e) { - let t = Zs(e) - if (typeof t == 'string') return t - if (typeof t == 'boolean') return t ? 'true' : 'false' - if (typeof t == 'number' && Number.isFinite(t)) return t.toString() - throw new O(`String cannot represent value: ${q(e)}`) - }, - parseValue(e) { - if (typeof e != 'string') throw new O(`String cannot represent a non string value: ${q(e)}`) - return e - }, - parseLiteral(e) { - if (e.kind !== E.STRING) - throw new O(`String cannot represent a non string value: ${Le(e)}`, { nodes: e }) - return e.value - } - }), - He = new Tt({ - name: 'Boolean', - description: 'The `Boolean` scalar type represents `true` or `false`.', - serialize(e) { - let t = Zs(e) - if (typeof t == 'boolean') return t - if (Number.isFinite(t)) return t !== 0 - throw new O(`Boolean cannot represent a non boolean value: ${q(t)}`) - }, - parseValue(e) { - if (typeof e != 'boolean') - throw new O(`Boolean cannot represent a non boolean value: ${q(e)}`) - return e - }, - parseLiteral(e) { - if (e.kind !== E.BOOLEAN) - throw new O(`Boolean cannot represent a non boolean value: ${Le(e)}`, { nodes: e }) - return e.value - } - }), - Ks = new Tt({ - name: 'ID', - description: - 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', - serialize(e) { - let t = Zs(e) - if (typeof t == 'string') return t - if (Number.isInteger(t)) return String(t) - throw new O(`ID cannot represent value: ${q(e)}`) - }, - parseValue(e) { - if (typeof e == 'string') return e - if (typeof e == 'number' && Number.isInteger(e)) return e.toString() - throw new O(`ID cannot represent value: ${q(e)}`) - }, - parseLiteral(e) { - if (e.kind !== E.STRING && e.kind !== E.INT) - throw new O('ID cannot represent a non-string and non-integer value: ' + Le(e), { - nodes: e - }) - return e.value - } - }), - Un = Object.freeze([je, gc, Xs, He, Ks]) - function Va(e) { - return Un.some(({ name: t }) => e.name === t) - } - function Zs(e) { - if (Nt(e)) { - if (typeof e.valueOf == 'function') { - let t = e.valueOf() - if (!Nt(t)) return t - } - if (typeof e.toJSON == 'function') return e.toJSON() - } - return e - } - function eo(e) { - return Lt(e, Bt) - } - var Bt = class { - constructor(t) { - var n, r - ;(this.name = Pt(t.name)), - (this.description = t.description), - (this.locations = t.locations), - (this.isRepeatable = (n = t.isRepeatable) !== null && n !== void 0 ? n : !1), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - Array.isArray(t.locations) || pe(!1, `@${t.name} locations must be an Array.`) - let i = (r = t.args) !== null && r !== void 0 ? r : {} - ;(Nt(i) && !Array.isArray(i)) || - pe(!1, `@${t.name} args must be an object with argument names as keys.`), - (this.args = hc(i)) - } - get [Symbol.toStringTag]() { - return 'GraphQLDirective' - } - toConfig() { - return { - name: this.name, - description: this.description, - locations: this.locations, - args: mc(this.args), - isRepeatable: this.isRepeatable, - extensions: this.extensions, - astNode: this.astNode - } - } - toString() { - return '@' + this.name - } - toJSON() { - return this.toString() - } - }, - Ua = new Bt({ - name: 'include', - description: - 'Directs the executor to include this field or fragment only when the `if` argument is true.', - locations: [K.FIELD, K.FRAGMENT_SPREAD, K.INLINE_FRAGMENT], - args: { if: { type: new ae(He), description: 'Included when true.' } } - }), - $a = new Bt({ - name: 'skip', - description: - 'Directs the executor to skip this field or fragment when the `if` argument is true.', - locations: [K.FIELD, K.FRAGMENT_SPREAD, K.INLINE_FRAGMENT], - args: { if: { type: new ae(He), description: 'Skipped when true.' } } - }), - Fh = 'No longer supported', - Li = new Bt({ - name: 'deprecated', - description: 'Marks an element of a GraphQL schema as no longer supported.', - locations: [ - K.FIELD_DEFINITION, - K.ARGUMENT_DEFINITION, - K.INPUT_FIELD_DEFINITION, - K.ENUM_VALUE - ], - args: { - reason: { - type: je, - description: - 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).', - defaultValue: Fh - } - } - }), - ja = new Bt({ - name: 'specifiedBy', - description: 'Exposes a URL that specifies the behavior of this scalar.', - locations: [K.SCALAR], - args: { - url: { - type: new ae(je), - description: 'The URL that specifies the behavior of this scalar.' - } - } - }), - qa = new Bt({ - name: 'oneOf', - description: - 'Indicates exactly one field must be supplied and this field must not be `null`.', - locations: [K.INPUT_OBJECT], - args: {} - }), - Qt = Object.freeze([Ua, $a, Li, ja, qa]) - function wh(e) { - return typeof e == 'object' && typeof e?.[Symbol.iterator] == 'function' - } - function Ir(e, t) { - if (ce(t)) { - let n = Ir(e, t.ofType) - return n?.kind === E.NULL ? null : n - } - if (e === null) return { kind: E.NULL } - if (e === void 0) return null - if (Fe(t)) { - let n = t.ofType - if (wh(e)) { - let r = [] - for (let i of e) { - let s = Ir(i, n) - s != null && r.push(s) - } - return { kind: E.LIST, values: r } - } - return Ir(e, n) - } - if (be(t)) { - if (!Nt(e)) return null - let n = [] - for (let r of Object.values(t.getFields())) { - let i = Ir(e[r.name], r.type) - i && n.push({ kind: E.OBJECT_FIELD, name: { kind: E.NAME, value: r.name }, value: i }) - } - return { kind: E.OBJECT, fields: n } - } - if (Wt(t)) { - let n = t.serialize(e) - if (n == null) return null - if (typeof n == 'boolean') return { kind: E.BOOLEAN, value: n } - if (typeof n == 'number' && Number.isFinite(n)) { - let r = String(n) - return Lh.test(r) ? { kind: E.INT, value: r } : { kind: E.FLOAT, value: r } - } - if (typeof n == 'string') - return Be(t) - ? { kind: E.ENUM, value: n } - : t === Ks && Lh.test(n) - ? { kind: E.INT, value: n } - : { kind: E.STRING, value: n } - throw new TypeError(`Cannot convert value to AST: ${q(n)}.`) - } - Ge(!1, 'Unexpected input type: ' + q(t)) - } - var Lh = /^-?(?:0|[1-9][0-9]*)$/ - var Ci = new Ke({ - name: '__Schema', - description: - 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', - fields: () => ({ - description: { type: je, resolve: (e) => e.description }, - types: { - description: 'A list of all types supported by this server.', - type: new ae(new Me(new ae(zt))), - resolve(e) { - return Object.values(e.getTypeMap()) - } - }, - queryType: { - description: 'The type that query operations will be rooted at.', - type: new ae(zt), - resolve: (e) => e.getQueryType() - }, - mutationType: { - description: - 'If this server supports mutation, the type that mutation operations will be rooted at.', - type: zt, - resolve: (e) => e.getMutationType() - }, - subscriptionType: { - description: - 'If this server support subscription, the type that subscription operations will be rooted at.', - type: zt, - resolve: (e) => e.getSubscriptionType() - }, - directives: { - description: 'A list of all directives supported by this server.', - type: new ae(new Me(new ae(Ga))), - resolve: (e) => e.getDirectives() - } - }) - }), - Ga = new Ke({ - name: '__Directive', - description: `A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +`)},OperationDefinition:{leave(e){let t=ye("(",te(e.variableDefinitions,", "),")"),n=te([e.operation,te([e.name,t]),te(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ye(" = ",n)+ye(" ",te(r," "))},SelectionSet:{leave:({selections:e})=>an(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let s=ye("",e,": ")+t,o=s+ye("(",te(n,", "),")");return o.length>h7&&(o=s+ye(`( +`,wa(te(n,` +`)),` +)`)),te([o,te(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ye(" ",te(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>te(["...",ye("on ",e),te(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ye("(",te(n,", "),")")} on ${t} ${ye("",te(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?hh(e):xh(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+te(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+te(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ye("(",te(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>ye("",e,` +`)+te(["schema",te(t," "),an(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ye("",e,` +`)+te(["scalar",t,te(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ye("",e,` +`)+te(["type",t,ye("implements ",te(n," & ")),te(r," "),an(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ye("",e,` +`)+t+(_h(n)?ye(`( +`,wa(te(n,` +`)),` +)`):ye("(",te(n,", "),")"))+": "+r+ye(" ",te(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ye("",e,` +`)+te([t+": "+n,ye("= ",r),te(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ye("",e,` +`)+te(["interface",t,ye("implements ",te(n," & ")),te(r," "),an(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ye("",e,` +`)+te(["union",t,te(n," "),ye("= ",te(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ye("",e,` +`)+te(["enum",t,te(n," "),an(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ye("",e,` +`)+te([t,te(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ye("",e,` +`)+te(["input",t,te(n," "),an(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ye("",e,` +`)+"directive @"+t+(_h(n)?ye(`( +`,wa(te(n,` +`)),` +)`):ye("(",te(n,", "),")"))+(r?" repeatable":"")+" on "+te(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>te(["extend schema",te(e," "),an(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>te(["extend scalar",e,te(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>te(["extend type",e,ye("implements ",te(t," & ")),te(n," "),an(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>te(["extend interface",e,ye("implements ",te(t," & ")),te(n," "),an(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>te(["extend union",e,te(t," "),ye("= ",te(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>te(["extend enum",e,te(t," "),an(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>te(["extend input",e,te(t," "),an(n)]," ")}};function te(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function an(e){return ye(`{ +`,wa(te(e,` +`)),` +}`)}function ye(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function wa(e){return ye(" ",e.replace(/\n/g,` + `))}function _h(e){var t;return(t=e?.some(n=>n.includes(` +`)))!==null&&t!==void 0?t:!1}function Qs(e,t){switch(e.kind){case E.NULL:return null;case E.INT:return parseInt(e.value,10);case E.FLOAT:return parseFloat(e.value);case E.STRING:case E.ENUM:case E.BOOLEAN:return e.value;case E.LIST:return e.values.map(n=>Qs(n,t));case E.OBJECT:return Dn(e.fields,n=>n.name.value,n=>Qs(n.value,t));case E.VARIABLE:return t?.[e.name.value]}}function Pt(e){if(e!=null||pe(!1,"Must provide name."),typeof e=="string"||pe(!1,"Expected name to be a string."),e.length===0)throw new O("Expected name to be a non-empty string.");for(let t=1;to(Qs(a,u)),this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||pe(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${q(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||pe(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||pe(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},Ke=class{constructor(t){var n;this.name=Pt(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>Sh(t),this._interfaces=()=>Th(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||pe(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${q(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ah(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function Th(e){var t;let n=Pa((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||pe(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Sh(e){let t=Ba(e.fields);return Si(t)||pe(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),on(t,(n,r)=>{var i;Si(n)||pe(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||pe(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${q(n.resolve)}.`);let s=(i=n.args)!==null&&i!==void 0?i:{};return Si(s)||pe(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Pt(r),description:n.description,type:n.type,args:hc(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Ct(n.extensions),astNode:n.astNode}})}function hc(e){return Object.entries(e).map(([t,n])=>({name:Pt(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Ct(n.extensions),astNode:n.astNode}))}function Si(e){return Nt(e)&&!Array.isArray(e)}function Ah(e){return on(e,t=>({description:t.description,type:t.type,args:mc(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function mc(e){return Dn(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Vn(e){return ce(e.type)&&e.defaultValue===void 0}var St=class{constructor(t){var n;this.name=Pt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Sh.bind(void 0,t),this._interfaces=Th.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||pe(!1,`${this.name} must provide "resolveType" as a function, but got: ${q(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Ah(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}},vn=class{constructor(t){var n;this.name=Pt(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=g7.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||pe(!1,`${this.name} must provide "resolveType" as a function, but got: ${q(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function g7(e){let t=Pa(e.types);return Array.isArray(t)||pe(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}var bt=class{constructor(t){var n;this.name=Pt(t.name),this.description=t.description,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:Nh(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=Nh(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=qt(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(r=>[r.value,r])));let n=this._valueLookup.get(t);if(n===void 0)throw new O(`Enum "${this.name}" cannot represent value: ${q(t)}`);return n.name}parseValue(t){if(typeof t!="string"){let r=q(t);throw new O(`Enum "${this.name}" cannot represent non-string value: ${r}.`+La(this,r))}let n=this.getValue(t);if(n==null)throw new O(`Value "${t}" does not exist in "${this.name}" enum.`+La(this,t));return n.value}parseLiteral(t,n){if(t.kind!==E.ENUM){let i=Le(t);throw new O(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+La(this,i),{nodes:t})}let r=this.getValue(t.value);if(r==null){let i=Le(t);throw new O(`Value "${i}" does not exist in "${this.name}" enum.`+La(this,i),{nodes:t})}return r.value}toConfig(){let t=Dn(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}};function La(e,t){let n=e.getValues().map(i=>i.name),r=Gt(t,n);return Mt("the enum value",r)}function Nh(e,t){return Si(t)||pe(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(Si(r)||pe(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${q(r)}.`),{name:pc(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Ct(r.extensions),astNode:r.astNode}))}var Zt=class{constructor(t){var n,r;this.name=Pt(t.name),this.description=t.description,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(r=t.isOneOf)!==null&&r!==void 0?r:!1,this._fields=D7.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){let t=on(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}};function D7(e){let t=Ba(e.fields);return Si(t)||pe(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),on(t,(n,r)=>(!("resolve"in n)||pe(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Pt(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Ct(n.extensions),astNode:n.astNode}))}function Fi(e){return ce(e.type)&&e.defaultValue===void 0}function wi(e,t){return e===t?!0:ce(e)&&ce(t)||Fe(e)&&Fe(t)?wi(e.ofType,t.ofType):!1}function bn(e,t,n){return t===n?!0:ce(n)?ce(t)?bn(e,t.ofType,n.ofType):!1:ce(t)?bn(e,t.ofType,n):Fe(n)?Fe(t)?bn(e,t.ofType,n.ofType):!1:Fe(t)?!1:mt(n)&&(De(t)||me(t))&&e.isSubType(n,t)}function Cr(e,t,n){return t===n?!0:mt(t)?mt(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):mt(n)?e.isSubType(n,t):!1}var Ys=2147483647,Js=-2147483648,gc=new Tt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){let t=Zs(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new O(`Int cannot represent non-integer value: ${q(t)}`);if(n>Ys||nYs||eYs||te.name===t)}function Zs(e){if(Nt(e)){if(typeof e.valueOf=="function"){let t=e.valueOf();if(!Nt(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function eo(e){return Lt(e,Bt)}var Bt=class{constructor(t){var n,r;this.name=Pt(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Ct(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||pe(!1,`@${t.name} locations must be an Array.`);let i=(r=t.args)!==null&&r!==void 0?r:{};Nt(i)&&!Array.isArray(i)||pe(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=hc(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:mc(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}},Ua=new Bt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[K.FIELD,K.FRAGMENT_SPREAD,K.INLINE_FRAGMENT],args:{if:{type:new ae(He),description:"Included when true."}}}),$a=new Bt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[K.FIELD,K.FRAGMENT_SPREAD,K.INLINE_FRAGMENT],args:{if:{type:new ae(He),description:"Skipped when true."}}}),Fh="No longer supported",Li=new Bt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[K.FIELD_DEFINITION,K.ARGUMENT_DEFINITION,K.INPUT_FIELD_DEFINITION,K.ENUM_VALUE],args:{reason:{type:je,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Fh}}}),ja=new Bt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[K.SCALAR],args:{url:{type:new ae(je),description:"The URL that specifies the behavior of this scalar."}}}),qa=new Bt({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[K.INPUT_OBJECT],args:{}}),Qt=Object.freeze([Ua,$a,Li,ja,qa]);function wh(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function Ir(e,t){if(ce(t)){let n=Ir(e,t.ofType);return n?.kind===E.NULL?null:n}if(e===null)return{kind:E.NULL};if(e===void 0)return null;if(Fe(t)){let n=t.ofType;if(wh(e)){let r=[];for(let i of e){let s=Ir(i,n);s!=null&&r.push(s)}return{kind:E.LIST,values:r}}return Ir(e,n)}if(be(t)){if(!Nt(e))return null;let n=[];for(let r of Object.values(t.getFields())){let i=Ir(e[r.name],r.type);i&&n.push({kind:E.OBJECT_FIELD,name:{kind:E.NAME,value:r.name},value:i})}return{kind:E.OBJECT,fields:n}}if(Wt(t)){let n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:E.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){let r=String(n);return Lh.test(r)?{kind:E.INT,value:r}:{kind:E.FLOAT,value:r}}if(typeof n=="string")return Be(t)?{kind:E.ENUM,value:n}:t===Ks&&Lh.test(n)?{kind:E.INT,value:n}:{kind:E.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${q(n)}.`)}Ge(!1,"Unexpected input type: "+q(t))}var Lh=/^-?(?:0|[1-9][0-9]*)$/;var Ci=new Ke({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:je,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ae(new Me(new ae(zt))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ae(zt),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:zt,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:zt,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ae(new Me(new ae(Ga))),resolve:e=>e.getDirectives()}})}),Ga=new Ke({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`, - fields: () => ({ - name: { type: new ae(je), resolve: (e) => e.name }, - description: { type: je, resolve: (e) => e.description }, - isRepeatable: { type: new ae(He), resolve: (e) => e.isRepeatable }, - locations: { type: new ae(new Me(new ae(Ha))), resolve: (e) => e.locations }, - args: { - type: new ae(new Me(new ae(Ii))), - args: { includeDeprecated: { type: He, defaultValue: !1 } }, - resolve(e, { includeDeprecated: t }) { - return t ? e.args : e.args.filter((n) => n.deprecationReason == null) - } - } - }) - }), - Ha = new bt({ - name: '__DirectiveLocation', - description: - 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', - values: { - QUERY: { value: K.QUERY, description: 'Location adjacent to a query operation.' }, - MUTATION: { value: K.MUTATION, description: 'Location adjacent to a mutation operation.' }, - SUBSCRIPTION: { - value: K.SUBSCRIPTION, - description: 'Location adjacent to a subscription operation.' - }, - FIELD: { value: K.FIELD, description: 'Location adjacent to a field.' }, - FRAGMENT_DEFINITION: { - value: K.FRAGMENT_DEFINITION, - description: 'Location adjacent to a fragment definition.' - }, - FRAGMENT_SPREAD: { - value: K.FRAGMENT_SPREAD, - description: 'Location adjacent to a fragment spread.' - }, - INLINE_FRAGMENT: { - value: K.INLINE_FRAGMENT, - description: 'Location adjacent to an inline fragment.' - }, - VARIABLE_DEFINITION: { - value: K.VARIABLE_DEFINITION, - description: 'Location adjacent to a variable definition.' - }, - SCHEMA: { value: K.SCHEMA, description: 'Location adjacent to a schema definition.' }, - SCALAR: { value: K.SCALAR, description: 'Location adjacent to a scalar definition.' }, - OBJECT: { value: K.OBJECT, description: 'Location adjacent to an object type definition.' }, - FIELD_DEFINITION: { - value: K.FIELD_DEFINITION, - description: 'Location adjacent to a field definition.' - }, - ARGUMENT_DEFINITION: { - value: K.ARGUMENT_DEFINITION, - description: 'Location adjacent to an argument definition.' - }, - INTERFACE: { - value: K.INTERFACE, - description: 'Location adjacent to an interface definition.' - }, - UNION: { value: K.UNION, description: 'Location adjacent to a union definition.' }, - ENUM: { value: K.ENUM, description: 'Location adjacent to an enum definition.' }, - ENUM_VALUE: { - value: K.ENUM_VALUE, - description: 'Location adjacent to an enum value definition.' - }, - INPUT_OBJECT: { - value: K.INPUT_OBJECT, - description: 'Location adjacent to an input object type definition.' - }, - INPUT_FIELD_DEFINITION: { - value: K.INPUT_FIELD_DEFINITION, - description: 'Location adjacent to an input object field definition.' - } - } - }), - zt = new Ke({ - name: '__Type', - description: - 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.', - fields: () => ({ - kind: { - type: new ae(za), - resolve(e) { - if (ct(e)) return Ce.SCALAR - if (me(e)) return Ce.OBJECT - if (De(e)) return Ce.INTERFACE - if (Ze(e)) return Ce.UNION - if (Be(e)) return Ce.ENUM - if (be(e)) return Ce.INPUT_OBJECT - if (Fe(e)) return Ce.LIST - if (ce(e)) return Ce.NON_NULL - Ge(!1, `Unexpected type: "${q(e)}".`) - } - }, - name: { type: je, resolve: (e) => ('name' in e ? e.name : void 0) }, - description: { type: je, resolve: (e) => ('description' in e ? e.description : void 0) }, - specifiedByURL: { - type: je, - resolve: (e) => ('specifiedByURL' in e ? e.specifiedByURL : void 0) - }, - fields: { - type: new Me(new ae(Wa)), - args: { includeDeprecated: { type: He, defaultValue: !1 } }, - resolve(e, { includeDeprecated: t }) { - if (me(e) || De(e)) { - let n = Object.values(e.getFields()) - return t ? n : n.filter((r) => r.deprecationReason == null) - } - } - }, - interfaces: { - type: new Me(new ae(zt)), - resolve(e) { - if (me(e) || De(e)) return e.getInterfaces() - } - }, - possibleTypes: { - type: new Me(new ae(zt)), - resolve(e, t, n, { schema: r }) { - if (mt(e)) return r.getPossibleTypes(e) - } - }, - enumValues: { - type: new Me(new ae(Qa)), - args: { includeDeprecated: { type: He, defaultValue: !1 } }, - resolve(e, { includeDeprecated: t }) { - if (Be(e)) { - let n = e.getValues() - return t ? n : n.filter((r) => r.deprecationReason == null) - } - } - }, - inputFields: { - type: new Me(new ae(Ii)), - args: { includeDeprecated: { type: He, defaultValue: !1 } }, - resolve(e, { includeDeprecated: t }) { - if (be(e)) { - let n = Object.values(e.getFields()) - return t ? n : n.filter((r) => r.deprecationReason == null) - } - } - }, - ofType: { type: zt, resolve: (e) => ('ofType' in e ? e.ofType : void 0) }, - isOneOf: { - type: He, - resolve: (e) => { - if (be(e)) return e.isOneOf - } - } - }) - }), - Wa = new Ke({ - name: '__Field', - description: - 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', - fields: () => ({ - name: { type: new ae(je), resolve: (e) => e.name }, - description: { type: je, resolve: (e) => e.description }, - args: { - type: new ae(new Me(new ae(Ii))), - args: { includeDeprecated: { type: He, defaultValue: !1 } }, - resolve(e, { includeDeprecated: t }) { - return t ? e.args : e.args.filter((n) => n.deprecationReason == null) - } - }, - type: { type: new ae(zt), resolve: (e) => e.type }, - isDeprecated: { type: new ae(He), resolve: (e) => e.deprecationReason != null }, - deprecationReason: { type: je, resolve: (e) => e.deprecationReason } - }) - }), - Ii = new Ke({ - name: '__InputValue', - description: - 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', - fields: () => ({ - name: { type: new ae(je), resolve: (e) => e.name }, - description: { type: je, resolve: (e) => e.description }, - type: { type: new ae(zt), resolve: (e) => e.type }, - defaultValue: { - type: je, - description: - 'A GraphQL-formatted string representing the default value for this input value.', - resolve(e) { - let { type: t, defaultValue: n } = e, - r = Ir(n, t) - return r ? Le(r) : null - } - }, - isDeprecated: { type: new ae(He), resolve: (e) => e.deprecationReason != null }, - deprecationReason: { type: je, resolve: (e) => e.deprecationReason } - }) - }), - Qa = new Ke({ - name: '__EnumValue', - description: - 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', - fields: () => ({ - name: { type: new ae(je), resolve: (e) => e.name }, - description: { type: je, resolve: (e) => e.description }, - isDeprecated: { type: new ae(He), resolve: (e) => e.deprecationReason != null }, - deprecationReason: { type: je, resolve: (e) => e.deprecationReason } - }) - }), - Ce - ;(function (e) { - ;(e.SCALAR = 'SCALAR'), - (e.OBJECT = 'OBJECT'), - (e.INTERFACE = 'INTERFACE'), - (e.UNION = 'UNION'), - (e.ENUM = 'ENUM'), - (e.INPUT_OBJECT = 'INPUT_OBJECT'), - (e.LIST = 'LIST'), - (e.NON_NULL = 'NON_NULL') - })(Ce || (Ce = {})) - var za = new bt({ - name: '__TypeKind', - description: 'An enum describing what kind of type a given `__Type` is.', - values: { - SCALAR: { value: Ce.SCALAR, description: 'Indicates this type is a scalar.' }, - OBJECT: { - value: Ce.OBJECT, - description: - 'Indicates this type is an object. `fields` and `interfaces` are valid fields.' - }, - INTERFACE: { - value: Ce.INTERFACE, - description: - 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.' - }, - UNION: { - value: Ce.UNION, - description: 'Indicates this type is a union. `possibleTypes` is a valid field.' - }, - ENUM: { - value: Ce.ENUM, - description: 'Indicates this type is an enum. `enumValues` is a valid field.' - }, - INPUT_OBJECT: { - value: Ce.INPUT_OBJECT, - description: 'Indicates this type is an input object. `inputFields` is a valid field.' - }, - LIST: { - value: Ce.LIST, - description: 'Indicates this type is a list. `ofType` is a valid field.' - }, - NON_NULL: { - value: Ce.NON_NULL, - description: 'Indicates this type is a non-null. `ofType` is a valid field.' - } - } - }), - En = { - name: '__schema', - type: new ae(Ci), - description: 'Access the current type schema of this server.', - args: [], - resolve: (e, t, n, { schema: r }) => r, - deprecationReason: void 0, - extensions: Object.create(null), - astNode: void 0 - }, - yn = { - name: '__type', - type: zt, - description: 'Request the type information of a single type.', - args: [ - { - name: 'name', - description: void 0, - type: new ae(je), - defaultValue: void 0, - deprecationReason: void 0, - extensions: Object.create(null), - astNode: void 0 - } - ], - resolve: (e, { name: t }, n, { schema: r }) => r.getType(t), - deprecationReason: void 0, - extensions: Object.create(null), - astNode: void 0 - }, - xn = { - name: '__typename', - type: new ae(je), - description: 'The name of the current Object type at runtime.', - args: [], - resolve: (e, t, n, { parentType: r }) => r.name, - deprecationReason: void 0, - extensions: Object.create(null), - astNode: void 0 - }, - $n = Object.freeze([Ci, Ga, Ha, zt, Wa, Ii, Qa, za]) - function Ri(e) { - return $n.some(({ name: t }) => e.name === t) - } - function Ch(e) { - return Lt(e, dr) - } - function Dc(e) { - if (!Ch(e)) throw new Error(`Expected ${q(e)} to be a GraphQL schema.`) - return e - } - var dr = class { - constructor(t) { - var n, r - ;(this.__validationErrors = t.assumeValid === !0 ? [] : void 0), - Nt(t) || pe(!1, 'Must provide configuration object.'), - !t.types || - Array.isArray(t.types) || - pe(!1, `"types" must be Array if provided but got: ${q(t.types)}.`), - !t.directives || - Array.isArray(t.directives) || - pe(!1, `"directives" must be Array if provided but got: ${q(t.directives)}.`), - (this.description = t.description), - (this.extensions = Ct(t.extensions)), - (this.astNode = t.astNode), - (this.extensionASTNodes = (n = t.extensionASTNodes) !== null && n !== void 0 ? n : []), - (this._queryType = t.query), - (this._mutationType = t.mutation), - (this._subscriptionType = t.subscription), - (this._directives = (r = t.directives) !== null && r !== void 0 ? r : Qt) - let i = new Set(t.types) - if (t.types != null) for (let s of t.types) i.delete(s), un(s, i) - this._queryType != null && un(this._queryType, i), - this._mutationType != null && un(this._mutationType, i), - this._subscriptionType != null && un(this._subscriptionType, i) - for (let s of this._directives) if (eo(s)) for (let o of s.args) un(o.type, i) - un(Ci, i), - (this._typeMap = Object.create(null)), - (this._subTypeMap = Object.create(null)), - (this._implementationsMap = Object.create(null)) - for (let s of i) { - if (s == null) continue - let o = s.name - if ( - (o || pe(!1, 'One of the provided types for building the Schema is missing a name.'), - this._typeMap[o] !== void 0) - ) - throw new Error( - `Schema must contain uniquely named types but contains multiple types named "${o}".` - ) - if (((this._typeMap[o] = s), De(s))) { - for (let a of s.getInterfaces()) - if (De(a)) { - let u = this._implementationsMap[a.name] - u === void 0 && - (u = this._implementationsMap[a.name] = { objects: [], interfaces: [] }), - u.interfaces.push(s) - } - } else if (me(s)) { - for (let a of s.getInterfaces()) - if (De(a)) { - let u = this._implementationsMap[a.name] - u === void 0 && - (u = this._implementationsMap[a.name] = { objects: [], interfaces: [] }), - u.objects.push(s) - } - } - } - } - get [Symbol.toStringTag]() { - return 'GraphQLSchema' - } - getQueryType() { - return this._queryType - } - getMutationType() { - return this._mutationType - } - getSubscriptionType() { - return this._subscriptionType - } - getRootType(t) { - switch (t) { - case st.QUERY: - return this.getQueryType() - case st.MUTATION: - return this.getMutationType() - case st.SUBSCRIPTION: - return this.getSubscriptionType() - } - } - getTypeMap() { - return this._typeMap - } - getType(t) { - return this.getTypeMap()[t] - } - getPossibleTypes(t) { - return Ze(t) ? t.getTypes() : this.getImplementations(t).objects - } - getImplementations(t) { - let n = this._implementationsMap[t.name] - return n ?? { objects: [], interfaces: [] } - } - isSubType(t, n) { - let r = this._subTypeMap[t.name] - if (r === void 0) { - if (((r = Object.create(null)), Ze(t))) for (let i of t.getTypes()) r[i.name] = !0 - else { - let i = this.getImplementations(t) - for (let s of i.objects) r[s.name] = !0 - for (let s of i.interfaces) r[s.name] = !0 - } - this._subTypeMap[t.name] = r - } - return r[n.name] !== void 0 - } - getDirectives() { - return this._directives - } - getDirective(t) { - return this.getDirectives().find((n) => n.name === t) - } - toConfig() { - return { - description: this.description, - query: this.getQueryType(), - mutation: this.getMutationType(), - subscription: this.getSubscriptionType(), - types: Object.values(this.getTypeMap()), - directives: this.getDirectives(), - extensions: this.extensions, - astNode: this.astNode, - extensionASTNodes: this.extensionASTNodes, - assumeValid: this.__validationErrors !== void 0 - } - } - } - function un(e, t) { - let n = we(e) - if (!t.has(n)) { - if ((t.add(n), Ze(n))) for (let r of n.getTypes()) un(r, t) - else if (me(n) || De(n)) { - for (let r of n.getInterfaces()) un(r, t) - for (let r of Object.values(n.getFields())) { - un(r.type, t) - for (let i of r.args) un(i.type, t) - } - } else if (be(n)) for (let r of Object.values(n.getFields())) un(r.type, t) - } - return t - } - function Oh(e) { - if ((Dc(e), e.__validationErrors)) return e.__validationErrors - let t = new bc(e) - v7(t), b7(t), E7(t) - let n = t.getErrors() - return (e.__validationErrors = n), n - } - function Ec(e) { - let t = Oh(e) - if (t.length !== 0) - throw new Error( - t.map((n) => n.message).join(` +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new ae(je),resolve:e=>e.name},description:{type:je,resolve:e=>e.description},isRepeatable:{type:new ae(He),resolve:e=>e.isRepeatable},locations:{type:new ae(new Me(new ae(Ha))),resolve:e=>e.locations},args:{type:new ae(new Me(new ae(Ii))),args:{includeDeprecated:{type:He,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),Ha=new bt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:K.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:K.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:K.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:K.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:K.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:K.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:K.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:K.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:K.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:K.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:K.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:K.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:K.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:K.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:K.UNION,description:"Location adjacent to a union definition."},ENUM:{value:K.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:K.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:K.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:K.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),zt=new Ke({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ae(za),resolve(e){if(ct(e))return Ce.SCALAR;if(me(e))return Ce.OBJECT;if(De(e))return Ce.INTERFACE;if(Ze(e))return Ce.UNION;if(Be(e))return Ce.ENUM;if(be(e))return Ce.INPUT_OBJECT;if(Fe(e))return Ce.LIST;if(ce(e))return Ce.NON_NULL;Ge(!1,`Unexpected type: "${q(e)}".`)}},name:{type:je,resolve:e=>"name"in e?e.name:void 0},description:{type:je,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:je,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Me(new ae(Wa)),args:{includeDeprecated:{type:He,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(me(e)||De(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new Me(new ae(zt)),resolve(e){if(me(e)||De(e))return e.getInterfaces()}},possibleTypes:{type:new Me(new ae(zt)),resolve(e,t,n,{schema:r}){if(mt(e))return r.getPossibleTypes(e)}},enumValues:{type:new Me(new ae(Qa)),args:{includeDeprecated:{type:He,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Be(e)){let n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new Me(new ae(Ii)),args:{includeDeprecated:{type:He,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(be(e)){let n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:zt,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:He,resolve:e=>{if(be(e))return e.isOneOf}}})}),Wa=new Ke({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ae(je),resolve:e=>e.name},description:{type:je,resolve:e=>e.description},args:{type:new ae(new Me(new ae(Ii))),args:{includeDeprecated:{type:He,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new ae(zt),resolve:e=>e.type},isDeprecated:{type:new ae(He),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:je,resolve:e=>e.deprecationReason}})}),Ii=new Ke({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ae(je),resolve:e=>e.name},description:{type:je,resolve:e=>e.description},type:{type:new ae(zt),resolve:e=>e.type},defaultValue:{type:je,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){let{type:t,defaultValue:n}=e,r=Ir(n,t);return r?Le(r):null}},isDeprecated:{type:new ae(He),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:je,resolve:e=>e.deprecationReason}})}),Qa=new Ke({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ae(je),resolve:e=>e.name},description:{type:je,resolve:e=>e.description},isDeprecated:{type:new ae(He),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:je,resolve:e=>e.deprecationReason}})}),Ce;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(Ce||(Ce={}));var za=new bt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:Ce.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:Ce.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:Ce.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:Ce.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:Ce.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:Ce.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:Ce.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:Ce.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),En={name:"__schema",type:new ae(Ci),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},yn={name:"__type",type:zt,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ae(je),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},xn={name:"__typename",type:new ae(je),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},$n=Object.freeze([Ci,Ga,Ha,zt,Wa,Ii,Qa,za]);function Ri(e){return $n.some(({name:t})=>e.name===t)}function Ch(e){return Lt(e,dr)}function Dc(e){if(!Ch(e))throw new Error(`Expected ${q(e)} to be a GraphQL schema.`);return e}var dr=class{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,Nt(t)||pe(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||pe(!1,`"types" must be Array if provided but got: ${q(t.types)}.`),!t.directives||Array.isArray(t.directives)||pe(!1,`"directives" must be Array if provided but got: ${q(t.directives)}.`),this.description=t.description,this.extensions=Ct(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:Qt;let i=new Set(t.types);if(t.types!=null)for(let s of t.types)i.delete(s),un(s,i);this._queryType!=null&&un(this._queryType,i),this._mutationType!=null&&un(this._mutationType,i),this._subscriptionType!=null&&un(this._subscriptionType,i);for(let s of this._directives)if(eo(s))for(let o of s.args)un(o.type,i);un(Ci,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(let s of i){if(s==null)continue;let o=s.name;if(o||pe(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=s,De(s)){for(let a of s.getInterfaces())if(De(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s)}}else if(me(s)){for(let a of s.getInterfaces())if(De(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case st.QUERY:return this.getQueryType();case st.MUTATION:return this.getMutationType();case st.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ze(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){let n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Ze(t))for(let i of t.getTypes())r[i.name]=!0;else{let i=this.getImplementations(t);for(let s of i.objects)r[s.name]=!0;for(let s of i.interfaces)r[s.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}};function un(e,t){let n=we(e);if(!t.has(n)){if(t.add(n),Ze(n))for(let r of n.getTypes())un(r,t);else if(me(n)||De(n)){for(let r of n.getInterfaces())un(r,t);for(let r of Object.values(n.getFields())){un(r.type,t);for(let i of r.args)un(i.type,t)}}else if(be(n))for(let r of Object.values(n.getFields()))un(r.type,t)}return t}function Oh(e){if(Dc(e),e.__validationErrors)return e.__validationErrors;let t=new bc(e);v7(t),b7(t),E7(t);let n=t.getErrors();return e.__validationErrors=n,n}function Ec(e){let t=Oh(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`) - ) - } - var bc = class { - constructor(t) { - ;(this._errors = []), (this.schema = t) - } - reportError(t, n) { - let r = Array.isArray(n) ? n.filter(Boolean) : n - this._errors.push(new O(t, { nodes: r })) - } - getErrors() { - return this._errors - } - } - function v7(e) { - let t = e.schema, - n = t.getQueryType() - if (!n) e.reportError('Query root type must be provided.', t.astNode) - else if (!me(n)) { - var r - e.reportError( - `Query root type must be Object type, it cannot be ${q(n)}.`, - (r = vc(t, st.QUERY)) !== null && r !== void 0 ? r : n.astNode - ) - } - let i = t.getMutationType() - if (i && !me(i)) { - var s - e.reportError( - `Mutation root type must be Object type if provided, it cannot be ${q(i)}.`, - (s = vc(t, st.MUTATION)) !== null && s !== void 0 ? s : i.astNode - ) - } - let o = t.getSubscriptionType() - if (o && !me(o)) { - var a - e.reportError( - `Subscription root type must be Object type if provided, it cannot be ${q(o)}.`, - (a = vc(t, st.SUBSCRIPTION)) !== null && a !== void 0 ? a : o.astNode - ) - } - } - function vc(e, t) { - var n - return (n = [e.astNode, ...e.extensionASTNodes] - .flatMap((r) => { - var i - return (i = r?.operationTypes) !== null && i !== void 0 ? i : [] - }) - .find((r) => r.operation === t)) === null || n === void 0 - ? void 0 - : n.type - } - function b7(e) { - for (let n of e.schema.getDirectives()) { - if (!eo(n)) { - e.reportError(`Expected directive but got: ${q(n)}.`, n?.astNode) - continue - } - Rr(e, n) - for (let r of n.args) - if ( - (Rr(e, r), - et(r.type) || - e.reportError( - `The type of @${n.name}(${r.name}:) must be Input Type but got: ${q(r.type)}.`, - r.astNode - ), - Vn(r) && r.deprecationReason != null) - ) { - var t - e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`, [ - yc(r.astNode), - (t = r.astNode) === null || t === void 0 ? void 0 : t.type - ]) - } - } - } - function Rr(e, t) { - t.name.startsWith('__') && - e.reportError( - `Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`, - t.astNode - ) - } - function E7(e) { - let t = A7(e), - n = e.schema.getTypeMap() - for (let r of Object.values(n)) { - if (!Ma(r)) { - e.reportError(`Expected GraphQL named type but got: ${q(r)}.`, r.astNode) - continue - } - Ri(r) || Rr(e, r), - me(r) || De(r) - ? (Ih(e, r), Rh(e, r)) - : Ze(r) - ? _7(e, r) - : Be(r) - ? N7(e, r) - : be(r) && (T7(e, r), t(r)) - } - } - function Ih(e, t) { - let n = Object.values(t.getFields()) - n.length === 0 && - e.reportError(`Type ${t.name} must define one or more fields.`, [ - t.astNode, - ...t.extensionASTNodes - ]) - for (let o of n) { - if ((Rr(e, o), !Ht(o.type))) { - var r - e.reportError( - `The type of ${t.name}.${o.name} must be Output Type but got: ${q(o.type)}.`, - (r = o.astNode) === null || r === void 0 ? void 0 : r.type - ) - } - for (let a of o.args) { - let u = a.name - if ((Rr(e, a), !et(a.type))) { - var i - e.reportError( - `The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${q(a.type)}.`, - (i = a.astNode) === null || i === void 0 ? void 0 : i.type - ) - } - if (Vn(a) && a.deprecationReason != null) { - var s - e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`, [ - yc(a.astNode), - (s = a.astNode) === null || s === void 0 ? void 0 : s.type - ]) - } - } - } - } - function Rh(e, t) { - let n = Object.create(null) - for (let r of t.getInterfaces()) { - if (!De(r)) { - e.reportError( - `Type ${q(t)} must only implement Interface types, it cannot implement ${q(r)}.`, - to(t, r) - ) - continue - } - if (t === r) { - e.reportError( - `Type ${t.name} cannot implement itself because it would create a circular reference.`, - to(t, r) - ) - continue - } - if (n[r.name]) { - e.reportError(`Type ${t.name} can only implement ${r.name} once.`, to(t, r)) - continue - } - ;(n[r.name] = !0), x7(e, t, r), y7(e, t, r) - } - } - function y7(e, t, n) { - let r = t.getFields() - for (let u of Object.values(n.getFields())) { - let l = u.name, - c = r[l] - if (!c) { - e.reportError( - `Interface field ${n.name}.${l} expected but ${t.name} does not provide it.`, - [u.astNode, t.astNode, ...t.extensionASTNodes] - ) - continue - } - if (!bn(e.schema, c.type, u.type)) { - var i, s - e.reportError( - `Interface field ${n.name}.${l} expects type ${q(u.type)} but ${t.name}.${l} is type ${q( - c.type - )}.`, - [ - (i = u.astNode) === null || i === void 0 ? void 0 : i.type, - (s = c.astNode) === null || s === void 0 ? void 0 : s.type - ] - ) - } - for (let d of u.args) { - let h = d.name, - m = c.args.find((g) => g.name === h) - if (!m) { - e.reportError( - `Interface field argument ${n.name}.${l}(${h}:) expected but ${t.name}.${l} does not provide it.`, - [d.astNode, c.astNode] - ) - continue - } - if (!wi(d.type, m.type)) { - var o, a - e.reportError( - `Interface field argument ${n.name}.${l}(${h}:) expects type ${q(d.type)} but ${ - t.name - }.${l}(${h}:) is type ${q(m.type)}.`, - [ - (o = d.astNode) === null || o === void 0 ? void 0 : o.type, - (a = m.astNode) === null || a === void 0 ? void 0 : a.type - ] - ) - } - } - for (let d of c.args) { - let h = d.name - !u.args.find((g) => g.name === h) && - Vn(d) && - e.reportError( - `Object field ${t.name}.${l} includes required argument ${h} that is missing from the Interface field ${n.name}.${l}.`, - [d.astNode, u.astNode] - ) - } - } - } - function x7(e, t, n) { - let r = t.getInterfaces() - for (let i of n.getInterfaces()) - r.includes(i) || - e.reportError( - i === t - ? `Type ${t.name} cannot implement ${n.name} because it would create a circular reference.` - : `Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`, - [...to(n, i), ...to(t, n)] - ) - } - function _7(e, t) { - let n = t.getTypes() - n.length === 0 && - e.reportError(`Union type ${t.name} must define one or more member types.`, [ - t.astNode, - ...t.extensionASTNodes - ]) - let r = Object.create(null) - for (let i of n) { - if (r[i.name]) { - e.reportError(`Union type ${t.name} can only include type ${i.name} once.`, kh(t, i.name)) - continue - } - ;(r[i.name] = !0), - me(i) || - e.reportError( - `Union type ${t.name} can only include Object types, it cannot include ${q(i)}.`, - kh(t, String(i)) - ) - } - } - function N7(e, t) { - let n = t.getValues() - n.length === 0 && - e.reportError(`Enum type ${t.name} must define one or more values.`, [ - t.astNode, - ...t.extensionASTNodes - ]) - for (let r of n) Rr(e, r) - } - function T7(e, t) { - let n = Object.values(t.getFields()) - n.length === 0 && - e.reportError(`Input Object type ${t.name} must define one or more fields.`, [ - t.astNode, - ...t.extensionASTNodes - ]) - for (let s of n) { - if ((Rr(e, s), !et(s.type))) { - var r - e.reportError( - `The type of ${t.name}.${s.name} must be Input Type but got: ${q(s.type)}.`, - (r = s.astNode) === null || r === void 0 ? void 0 : r.type - ) - } - if (Fi(s) && s.deprecationReason != null) { - var i - e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`, [ - yc(s.astNode), - (i = s.astNode) === null || i === void 0 ? void 0 : i.type - ]) - } - t.isOneOf && S7(t, s, e) - } - } - function S7(e, t, n) { - if (ce(t.type)) { - var r - n.reportError( - `OneOf input field ${e.name}.${t.name} must be nullable.`, - (r = t.astNode) === null || r === void 0 ? void 0 : r.type - ) - } - t.defaultValue !== void 0 && - n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`, t.astNode) - } - function A7(e) { - let t = Object.create(null), - n = [], - r = Object.create(null) - return i - function i(s) { - if (t[s.name]) return - ;(t[s.name] = !0), (r[s.name] = n.length) - let o = Object.values(s.getFields()) - for (let a of o) - if (ce(a.type) && be(a.type.ofType)) { - let u = a.type.ofType, - l = r[u.name] - if ((n.push(a), l === void 0)) i(u) - else { - let c = n.slice(l), - d = c.map((h) => h.name).join('.') - e.reportError( - `Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`, - c.map((h) => h.astNode) - ) - } - n.pop() - } - r[s.name] = void 0 - } - } - function to(e, t) { - let { astNode: n, extensionASTNodes: r } = e - return (n != null ? [n, ...r] : r) - .flatMap((s) => { - var o - return (o = s.interfaces) !== null && o !== void 0 ? o : [] - }) - .filter((s) => s.name.value === t.name) - } - function kh(e, t) { - let { astNode: n, extensionASTNodes: r } = e - return (n != null ? [n, ...r] : r) - .flatMap((s) => { - var o - return (o = s.types) !== null && o !== void 0 ? o : [] - }) - .filter((s) => s.name.value === t) - } - function yc(e) { - var t - return e == null || (t = e.directives) === null || t === void 0 - ? void 0 - : t.find((n) => n.name.value === Li.name) - } - function We(e, t) { - switch (t.kind) { - case E.LIST_TYPE: { - let n = We(e, t.type) - return n && new Me(n) - } - case E.NON_NULL_TYPE: { - let n = We(e, t.type) - return n && new ae(n) - } - case E.NAMED_TYPE: - return e.getType(t.name.value) - } - } - var kr = class { - constructor(t, n, r) { - ;(this._schema = t), - (this._typeStack = []), - (this._parentTypeStack = []), - (this._inputTypeStack = []), - (this._fieldDefStack = []), - (this._defaultValueStack = []), - (this._directive = null), - (this._argument = null), - (this._enumValue = null), - (this._getFieldDef = r ?? F7), - n && - (et(n) && this._inputTypeStack.push(n), - at(n) && this._parentTypeStack.push(n), - Ht(n) && this._typeStack.push(n)) - } - get [Symbol.toStringTag]() { - return 'TypeInfo' - } - getType() { - if (this._typeStack.length > 0) return this._typeStack[this._typeStack.length - 1] - } - getParentType() { - if (this._parentTypeStack.length > 0) - return this._parentTypeStack[this._parentTypeStack.length - 1] - } - getInputType() { - if (this._inputTypeStack.length > 0) - return this._inputTypeStack[this._inputTypeStack.length - 1] - } - getParentInputType() { - if (this._inputTypeStack.length > 1) - return this._inputTypeStack[this._inputTypeStack.length - 2] - } - getFieldDef() { - if (this._fieldDefStack.length > 0) return this._fieldDefStack[this._fieldDefStack.length - 1] - } - getDefaultValue() { - if (this._defaultValueStack.length > 0) - return this._defaultValueStack[this._defaultValueStack.length - 1] - } - getDirective() { - return this._directive - } - getArgument() { - return this._argument - } - getEnumValue() { - return this._enumValue - } - enter(t) { - let n = this._schema - switch (t.kind) { - case E.SELECTION_SET: { - let i = we(this.getType()) - this._parentTypeStack.push(at(i) ? i : void 0) - break - } - case E.FIELD: { - let i = this.getParentType(), - s, - o - i && ((s = this._getFieldDef(n, i, t)), s && (o = s.type)), - this._fieldDefStack.push(s), - this._typeStack.push(Ht(o) ? o : void 0) - break - } - case E.DIRECTIVE: - this._directive = n.getDirective(t.name.value) - break - case E.OPERATION_DEFINITION: { - let i = n.getRootType(t.operation) - this._typeStack.push(me(i) ? i : void 0) - break - } - case E.INLINE_FRAGMENT: - case E.FRAGMENT_DEFINITION: { - let i = t.typeCondition, - s = i ? We(n, i) : we(this.getType()) - this._typeStack.push(Ht(s) ? s : void 0) - break - } - case E.VARIABLE_DEFINITION: { - let i = We(n, t.type) - this._inputTypeStack.push(et(i) ? i : void 0) - break - } - case E.ARGUMENT: { - var r - let i, - s, - o = (r = this.getDirective()) !== null && r !== void 0 ? r : this.getFieldDef() - o && ((i = o.args.find((a) => a.name === t.name.value)), i && (s = i.type)), - (this._argument = i), - this._defaultValueStack.push(i ? i.defaultValue : void 0), - this._inputTypeStack.push(et(s) ? s : void 0) - break - } - case E.LIST: { - let i = fr(this.getInputType()), - s = Fe(i) ? i.ofType : i - this._defaultValueStack.push(void 0), this._inputTypeStack.push(et(s) ? s : void 0) - break - } - case E.OBJECT_FIELD: { - let i = we(this.getInputType()), - s, - o - be(i) && ((o = i.getFields()[t.name.value]), o && (s = o.type)), - this._defaultValueStack.push(o ? o.defaultValue : void 0), - this._inputTypeStack.push(et(s) ? s : void 0) - break - } - case E.ENUM: { - let i = we(this.getInputType()), - s - Be(i) && (s = i.getValue(t.value)), (this._enumValue = s) - break - } - default: - } - } - leave(t) { - switch (t.kind) { - case E.SELECTION_SET: - this._parentTypeStack.pop() - break - case E.FIELD: - this._fieldDefStack.pop(), this._typeStack.pop() - break - case E.DIRECTIVE: - this._directive = null - break - case E.OPERATION_DEFINITION: - case E.INLINE_FRAGMENT: - case E.FRAGMENT_DEFINITION: - this._typeStack.pop() - break - case E.VARIABLE_DEFINITION: - this._inputTypeStack.pop() - break - case E.ARGUMENT: - ;(this._argument = null), this._defaultValueStack.pop(), this._inputTypeStack.pop() - break - case E.LIST: - case E.OBJECT_FIELD: - this._defaultValueStack.pop(), this._inputTypeStack.pop() - break - case E.ENUM: - this._enumValue = null - break - default: - } - } - } - function F7(e, t, n) { - let r = n.name.value - if (r === En.name && e.getQueryType() === t) return En - if (r === yn.name && e.getQueryType() === t) return yn - if (r === xn.name && at(t)) return xn - if (me(t) || De(t)) return t.getFields()[r] - } - function no(e, t) { - return { - enter(...n) { - let r = n[0] - e.enter(r) - let i = Lr(t, r.kind).enter - if (i) { - let s = i.apply(t, n) - return s !== void 0 && (e.leave(r), js(s) && e.enter(s)), s - } - }, - leave(...n) { - let r = n[0], - i = Lr(t, r.kind).leave, - s - return i && (s = i.apply(t, n)), e.leave(r), s - } - } - } - function xc(e) { - return e.kind === E.OPERATION_DEFINITION || e.kind === E.FRAGMENT_DEFINITION - } - function _c(e) { - return e.kind === E.SCHEMA_DEFINITION || _n(e) || e.kind === E.DIRECTIVE_DEFINITION - } - function _n(e) { - return ( - e.kind === E.SCALAR_TYPE_DEFINITION || - e.kind === E.OBJECT_TYPE_DEFINITION || - e.kind === E.INTERFACE_TYPE_DEFINITION || - e.kind === E.UNION_TYPE_DEFINITION || - e.kind === E.ENUM_TYPE_DEFINITION || - e.kind === E.INPUT_OBJECT_TYPE_DEFINITION - ) - } - function Nc(e) { - return e.kind === E.SCHEMA_EXTENSION || ki(e) - } - function ki(e) { - return ( - e.kind === E.SCALAR_TYPE_EXTENSION || - e.kind === E.OBJECT_TYPE_EXTENSION || - e.kind === E.INTERFACE_TYPE_EXTENSION || - e.kind === E.UNION_TYPE_EXTENSION || - e.kind === E.ENUM_TYPE_EXTENSION || - e.kind === E.INPUT_OBJECT_TYPE_EXTENSION - ) - } - function Oi(e) { - return { - Document(t) { - for (let n of t.definitions) - if (!xc(n)) { - let r = - n.kind === E.SCHEMA_DEFINITION || n.kind === E.SCHEMA_EXTENSION - ? 'schema' - : '"' + n.name.value + '"' - e.reportError(new O(`The ${r} definition is not executable.`, { nodes: n })) - } - return !1 - } - } - } - function Tc(e) { - return { - Field(t) { - let n = e.getParentType() - if (n && !e.getFieldDef()) { - let i = e.getSchema(), - s = t.name.value, - o = Mt('to use an inline fragment on', w7(i, n, s)) - o === '' && (o = Mt(L7(n, s))), - e.reportError(new O(`Cannot query field "${s}" on type "${n.name}".` + o, { nodes: t })) - } - } - } - } - function w7(e, t, n) { - if (!mt(t)) return [] - let r = new Set(), - i = Object.create(null) - for (let o of e.getPossibleTypes(t)) - if (o.getFields()[n]) { - r.add(o), (i[o.name] = 1) - for (let a of o.getInterfaces()) { - var s - a.getFields()[n] && - (r.add(a), (i[a.name] = ((s = i[a.name]) !== null && s !== void 0 ? s : 0) + 1)) - } - } - return [...r] - .sort((o, a) => { - let u = i[a.name] - i[o.name] - return u !== 0 - ? u - : De(o) && e.isSubType(o, a) - ? -1 - : De(a) && e.isSubType(a, o) - ? 1 - : Ti(o.name, a.name) - }) - .map((o) => o.name) - } - function L7(e, t) { - if (me(e) || De(e)) { - let n = Object.keys(e.getFields()) - return Gt(t, n) - } - return [] - } - function Mi(e) { - return { - InlineFragment(t) { - let n = t.typeCondition - if (n) { - let r = We(e.getSchema(), n) - if (r && !at(r)) { - let i = Le(n) - e.reportError( - new O(`Fragment cannot condition on non composite type "${i}".`, { nodes: n }) - ) - } - } - }, - FragmentDefinition(t) { - let n = We(e.getSchema(), t.typeCondition) - if (n && !at(n)) { - let r = Le(t.typeCondition) - e.reportError( - new O(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`, { - nodes: t.typeCondition - }) - ) - } - } - } - } - function Sc(e) { - return { - ...Ac(e), - Argument(t) { - let n = e.getArgument(), - r = e.getFieldDef(), - i = e.getParentType() - if (!n && r && i) { - let s = t.name.value, - o = r.args.map((u) => u.name), - a = Gt(s, o) - e.reportError( - new O(`Unknown argument "${s}" on field "${i.name}.${r.name}".` + Mt(a), { nodes: t }) - ) - } - } - } - } - function Ac(e) { - let t = Object.create(null), - n = e.getSchema(), - r = n ? n.getDirectives() : Qt - for (let o of r) t[o.name] = o.args.map((a) => a.name) - let i = e.getDocument().definitions - for (let o of i) - if (o.kind === E.DIRECTIVE_DEFINITION) { - var s - let a = (s = o.arguments) !== null && s !== void 0 ? s : [] - t[o.name.value] = a.map((u) => u.name.value) - } - return { - Directive(o) { - let a = o.name.value, - u = t[a] - if (o.arguments && u) - for (let l of o.arguments) { - let c = l.name.value - if (!u.includes(c)) { - let d = Gt(c, u) - e.reportError( - new O(`Unknown argument "${c}" on directive "@${a}".` + Mt(d), { nodes: l }) - ) - } - } - return !1 - } - } - } - function Or(e) { - let t = Object.create(null), - n = e.getSchema(), - r = n ? n.getDirectives() : Qt - for (let s of r) t[s.name] = s.locations - let i = e.getDocument().definitions - for (let s of i) - s.kind === E.DIRECTIVE_DEFINITION && (t[s.name.value] = s.locations.map((o) => o.value)) - return { - Directive(s, o, a, u, l) { - let c = s.name.value, - d = t[c] - if (!d) { - e.reportError(new O(`Unknown directive "@${c}".`, { nodes: s })) - return - } - let h = C7(l) - h && - !d.includes(h) && - e.reportError(new O(`Directive "@${c}" may not be used on ${h}.`, { nodes: s })) - } - } - } - function C7(e) { - let t = e[e.length - 1] - switch (('kind' in t || Ge(!1), t.kind)) { - case E.OPERATION_DEFINITION: - return I7(t.operation) - case E.FIELD: - return K.FIELD - case E.FRAGMENT_SPREAD: - return K.FRAGMENT_SPREAD - case E.INLINE_FRAGMENT: - return K.INLINE_FRAGMENT - case E.FRAGMENT_DEFINITION: - return K.FRAGMENT_DEFINITION - case E.VARIABLE_DEFINITION: - return K.VARIABLE_DEFINITION - case E.SCHEMA_DEFINITION: - case E.SCHEMA_EXTENSION: - return K.SCHEMA - case E.SCALAR_TYPE_DEFINITION: - case E.SCALAR_TYPE_EXTENSION: - return K.SCALAR - case E.OBJECT_TYPE_DEFINITION: - case E.OBJECT_TYPE_EXTENSION: - return K.OBJECT - case E.FIELD_DEFINITION: - return K.FIELD_DEFINITION - case E.INTERFACE_TYPE_DEFINITION: - case E.INTERFACE_TYPE_EXTENSION: - return K.INTERFACE - case E.UNION_TYPE_DEFINITION: - case E.UNION_TYPE_EXTENSION: - return K.UNION - case E.ENUM_TYPE_DEFINITION: - case E.ENUM_TYPE_EXTENSION: - return K.ENUM - case E.ENUM_VALUE_DEFINITION: - return K.ENUM_VALUE - case E.INPUT_OBJECT_TYPE_DEFINITION: - case E.INPUT_OBJECT_TYPE_EXTENSION: - return K.INPUT_OBJECT - case E.INPUT_VALUE_DEFINITION: { - let n = e[e.length - 3] - return ( - 'kind' in n || Ge(!1), - n.kind === E.INPUT_OBJECT_TYPE_DEFINITION - ? K.INPUT_FIELD_DEFINITION - : K.ARGUMENT_DEFINITION - ) - } - default: - Ge(!1, 'Unexpected kind: ' + q(t.kind)) - } - } - function I7(e) { - switch (e) { - case st.QUERY: - return K.QUERY - case st.MUTATION: - return K.MUTATION - case st.SUBSCRIPTION: - return K.SUBSCRIPTION - } - } - function Pi(e) { - return { - FragmentSpread(t) { - let n = t.name.value - e.getFragment(n) || e.reportError(new O(`Unknown fragment "${n}".`, { nodes: t.name })) - } - } - } - function Mr(e) { - let t = e.getSchema(), - n = t ? t.getTypeMap() : Object.create(null), - r = Object.create(null) - for (let s of e.getDocument().definitions) _n(s) && (r[s.name.value] = !0) - let i = [...Object.keys(n), ...Object.keys(r)] - return { - NamedType(s, o, a, u, l) { - let c = s.name.value - if (!n[c] && !r[c]) { - var d - let h = (d = l[2]) !== null && d !== void 0 ? d : a, - m = h != null && R7(h) - if (m && Mh.includes(c)) return - let g = Gt(c, m ? Mh.concat(i) : i) - e.reportError(new O(`Unknown type "${c}".` + Mt(g), { nodes: s })) - } - } - } - } - var Mh = [...Un, ...$n].map((e) => e.name) - function R7(e) { - return 'kind' in e && (_c(e) || Nc(e)) - } - function Fc(e) { - let t = 0 - return { - Document(n) { - t = n.definitions.filter((r) => r.kind === E.OPERATION_DEFINITION).length - }, - OperationDefinition(n) { - !n.name && - t > 1 && - e.reportError( - new O('This anonymous operation must be the only defined operation.', { nodes: n }) - ) - } - } - } - function Bi(e) { - var t, n, r - let i = e.getSchema(), - s = - (t = - (n = (r = i?.astNode) !== null && r !== void 0 ? r : i?.getQueryType()) !== null && - n !== void 0 - ? n - : i?.getMutationType()) !== null && t !== void 0 - ? t - : i?.getSubscriptionType(), - o = 0 - return { - SchemaDefinition(a) { - if (s) { - e.reportError( - new O('Cannot define a new schema within a schema extension.', { nodes: a }) - ) - return - } - o > 0 && e.reportError(new O('Must provide only one schema definition.', { nodes: a })), ++o - } - } - } - var k7 = 3 - function wc(e) { - function t(n, r = Object.create(null), i = 0) { - if (n.kind === E.FRAGMENT_SPREAD) { - let s = n.name.value - if (r[s] === !0) return !1 - let o = e.getFragment(s) - if (!o) return !1 - try { - return (r[s] = !0), t(o, r, i) - } finally { - r[s] = void 0 - } - } - if ( - n.kind === E.FIELD && - (n.name.value === 'fields' || - n.name.value === 'interfaces' || - n.name.value === 'possibleTypes' || - n.name.value === 'inputFields') && - (i++, i >= k7) - ) - return !0 - if ('selectionSet' in n && n.selectionSet) { - for (let s of n.selectionSet.selections) if (t(s, r, i)) return !0 - } - return !1 - } - return { - Field(n) { - if ((n.name.value === '__schema' || n.name.value === '__type') && t(n)) - return e.reportError(new O('Maximum introspection depth exceeded', { nodes: [n] })), !1 - } - } - } - function Lc(e) { - let t = Object.create(null), - n = [], - r = Object.create(null) - return { - OperationDefinition: () => !1, - FragmentDefinition(s) { - return i(s), !1 - } - } - function i(s) { - if (t[s.name.value]) return - let o = s.name.value - t[o] = !0 - let a = e.getFragmentSpreads(s.selectionSet) - if (a.length !== 0) { - r[o] = n.length - for (let u of a) { - let l = u.name.value, - c = r[l] - if ((n.push(u), c === void 0)) { - let d = e.getFragment(l) - d && i(d) - } else { - let d = n.slice(c), - h = d - .slice(0, -1) - .map((m) => '"' + m.name.value + '"') - .join(', ') - e.reportError( - new O( - `Cannot spread fragment "${l}" within itself` + (h !== '' ? ` via ${h}.` : '.'), - { nodes: d } - ) - ) - } - n.pop() - } - r[o] = void 0 - } - } - } - function Cc(e) { - let t = Object.create(null) - return { - OperationDefinition: { - enter() { - t = Object.create(null) - }, - leave(n) { - let r = e.getRecursiveVariableUsages(n) - for (let { node: i } of r) { - let s = i.name.value - t[s] !== !0 && - e.reportError( - new O( - n.name - ? `Variable "$${s}" is not defined by operation "${n.name.value}".` - : `Variable "$${s}" is not defined.`, - { nodes: [i, n] } - ) - ) - } - } - }, - VariableDefinition(n) { - t[n.variable.name.value] = !0 - } - } - } - function Vi(e) { - let t = [], - n = [] - return { - OperationDefinition(r) { - return t.push(r), !1 - }, - FragmentDefinition(r) { - return n.push(r), !1 - }, - Document: { - leave() { - let r = Object.create(null) - for (let i of t) - for (let s of e.getRecursivelyReferencedFragments(i)) r[s.name.value] = !0 - for (let i of n) { - let s = i.name.value - r[s] !== !0 && e.reportError(new O(`Fragment "${s}" is never used.`, { nodes: i })) - } - } - } - } - } - function Ic(e) { - let t = [] - return { - OperationDefinition: { - enter() { - t = [] - }, - leave(n) { - let r = Object.create(null), - i = e.getRecursiveVariableUsages(n) - for (let { node: s } of i) r[s.name.value] = !0 - for (let s of t) { - let o = s.variable.name.value - r[o] !== !0 && - e.reportError( - new O( - n.name - ? `Variable "$${o}" is never used in operation "${n.name.value}".` - : `Variable "$${o}" is never used.`, - { nodes: s } - ) - ) - } - } - }, - VariableDefinition(n) { - t.push(n) - } - } - } - function Ya(e) { - switch (e.kind) { - case E.OBJECT: - return { ...e, fields: O7(e.fields) } - case E.LIST: - return { ...e, values: e.values.map(Ya) } - case E.INT: - case E.FLOAT: - case E.STRING: - case E.BOOLEAN: - case E.NULL: - case E.ENUM: - case E.VARIABLE: - return e - } - } - function O7(e) { - return e - .map((t) => ({ ...t, value: Ya(t.value) })) - .sort((t, n) => Ti(t.name.value, n.name.value)) - } - function Bh(e) { - return Array.isArray(e) - ? e.map(([t, n]) => `subfields "${t}" conflict because ` + Bh(n)).join(' and ') - : e - } - function Mc(e) { - let t = new Oc(), - n = new Map() - return { - SelectionSet(r) { - let i = M7(e, n, t, e.getParentType(), r) - for (let [[s, o], a, u] of i) { - let l = Bh(o) - e.reportError( - new O( - `Fields "${s}" conflict because ${l}. Use different aliases on the fields to fetch both if this was intentional.`, - { nodes: a.concat(u) } - ) - ) - } - } - } - } - function M7(e, t, n, r, i) { - let s = [], - [o, a] = Ka(e, t, r, i) - if ((B7(e, s, t, n, o), a.length !== 0)) - for (let u = 0; u < a.length; u++) { - Ja(e, s, t, n, !1, o, a[u]) - for (let l = u + 1; l < a.length; l++) Xa(e, s, t, n, !1, a[u], a[l]) - } - return s - } - function Ja(e, t, n, r, i, s, o) { - let a = e.getFragment(o) - if (!a) return - let [u, l] = kc(e, n, a) - if (s !== u) { - Pc(e, t, n, r, i, s, u) - for (let c of l) r.has(c, o, i) || (r.add(c, o, i), Ja(e, t, n, r, i, s, c)) - } - } - function Xa(e, t, n, r, i, s, o) { - if (s === o || r.has(s, o, i)) return - r.add(s, o, i) - let a = e.getFragment(s), - u = e.getFragment(o) - if (!a || !u) return - let [l, c] = kc(e, n, a), - [d, h] = kc(e, n, u) - Pc(e, t, n, r, i, l, d) - for (let m of h) Xa(e, t, n, r, i, s, m) - for (let m of c) Xa(e, t, n, r, i, m, o) - } - function P7(e, t, n, r, i, s, o, a) { - let u = [], - [l, c] = Ka(e, t, i, s), - [d, h] = Ka(e, t, o, a) - Pc(e, u, t, n, r, l, d) - for (let m of h) Ja(e, u, t, n, r, l, m) - for (let m of c) Ja(e, u, t, n, r, d, m) - for (let m of c) for (let g of h) Xa(e, u, t, n, r, m, g) - return u - } - function B7(e, t, n, r, i) { - for (let [s, o] of Object.entries(i)) - if (o.length > 1) - for (let a = 0; a < o.length; a++) - for (let u = a + 1; u < o.length; u++) { - let l = Vh(e, n, r, !1, s, o[a], o[u]) - l && t.push(l) - } - } - function Pc(e, t, n, r, i, s, o) { - for (let [a, u] of Object.entries(s)) { - let l = o[a] - if (l) - for (let c of u) - for (let d of l) { - let h = Vh(e, n, r, i, a, c, d) - h && t.push(h) - } - } - } - function Vh(e, t, n, r, i, s, o) { - let [a, u, l] = s, - [c, d, h] = o, - m = r || (a !== c && me(a) && me(c)) - if (!m) { - let w = u.name.value, - C = d.name.value - if (w !== C) return [[i, `"${w}" and "${C}" are different fields`], [u], [d]] - if (!V7(u, d)) return [[i, 'they have differing arguments'], [u], [d]] - } - let g = l?.type, - v = h?.type - if (g && v && Rc(g, v)) - return [[i, `they return conflicting types "${q(g)}" and "${q(v)}"`], [u], [d]] - let N = u.selectionSet, - _ = d.selectionSet - if (N && _) { - let w = P7(e, t, n, m, we(g), N, we(v), _) - return U7(w, i, u, d) - } - } - function V7(e, t) { - let n = e.arguments, - r = t.arguments - if (n === void 0 || n.length === 0) return r === void 0 || r.length === 0 - if (r === void 0 || r.length === 0 || n.length !== r.length) return !1 - let i = new Map(r.map(({ name: s, value: o }) => [s.value, o])) - return n.every((s) => { - let o = s.value, - a = i.get(s.name.value) - return a === void 0 ? !1 : Ph(o) === Ph(a) - }) - } - function Ph(e) { - return Le(Ya(e)) - } - function Rc(e, t) { - return Fe(e) - ? Fe(t) - ? Rc(e.ofType, t.ofType) - : !0 - : Fe(t) - ? !0 - : ce(e) - ? ce(t) - ? Rc(e.ofType, t.ofType) - : !0 - : ce(t) - ? !0 - : Wt(e) || Wt(t) - ? e !== t - : !1 - } - function Ka(e, t, n, r) { - let i = t.get(r) - if (i) return i - let s = Object.create(null), - o = Object.create(null) - Uh(e, n, r, s, o) - let a = [s, Object.keys(o)] - return t.set(r, a), a - } - function kc(e, t, n) { - let r = t.get(n.selectionSet) - if (r) return r - let i = We(e.getSchema(), n.typeCondition) - return Ka(e, t, i, n.selectionSet) - } - function Uh(e, t, n, r, i) { - for (let s of n.selections) - switch (s.kind) { - case E.FIELD: { - let o = s.name.value, - a - ;(me(t) || De(t)) && (a = t.getFields()[o]) - let u = s.alias ? s.alias.value : o - r[u] || (r[u] = []), r[u].push([t, s, a]) - break - } - case E.FRAGMENT_SPREAD: - i[s.name.value] = !0 - break - case E.INLINE_FRAGMENT: { - let o = s.typeCondition, - a = o ? We(e.getSchema(), o) : t - Uh(e, a, s.selectionSet, r, i) - break - } - } - } - function U7(e, t, n, r) { - if (e.length > 0) - return [ - [t, e.map(([i]) => i)], - [n, ...e.map(([, i]) => i).flat()], - [r, ...e.map(([, , i]) => i).flat()] - ] - } - var Oc = class { - constructor() { - this._data = new Map() - } - has(t, n, r) { - var i - let [s, o] = t < n ? [t, n] : [n, t], - a = (i = this._data.get(s)) === null || i === void 0 ? void 0 : i.get(o) - return a === void 0 ? !1 : r ? !0 : r === a - } - add(t, n, r) { - let [i, s] = t < n ? [t, n] : [n, t], - o = this._data.get(i) - o === void 0 ? this._data.set(i, new Map([[s, r]])) : o.set(s, r) - } - } - function Bc(e) { - return { - InlineFragment(t) { - let n = e.getType(), - r = e.getParentType() - if (at(n) && at(r) && !Cr(e.getSchema(), n, r)) { - let i = q(r), - s = q(n) - e.reportError( - new O( - `Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`, - { nodes: t } - ) - ) - } - }, - FragmentSpread(t) { - let n = t.name.value, - r = $7(e, n), - i = e.getParentType() - if (r && i && !Cr(e.getSchema(), r, i)) { - let s = q(i), - o = q(r) - e.reportError( - new O( - `Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`, - { nodes: t } - ) - ) - } - } - } - } - function $7(e, t) { - let n = e.getFragment(t) - if (n) { - let r = We(e.getSchema(), n.typeCondition) - if (at(r)) return r - } - } - function Ui(e) { - let t = e.getSchema(), - n = Object.create(null) - for (let i of e.getDocument().definitions) _n(i) && (n[i.name.value] = i) - return { - ScalarTypeExtension: r, - ObjectTypeExtension: r, - InterfaceTypeExtension: r, - UnionTypeExtension: r, - EnumTypeExtension: r, - InputObjectTypeExtension: r - } - function r(i) { - let s = i.name.value, - o = n[s], - a = t?.getType(s), - u - if ((o ? (u = j7[o.kind]) : a && (u = q7(a)), u)) { - if (u !== i.kind) { - let l = G7(i.kind) - e.reportError(new O(`Cannot extend non-${l} type "${s}".`, { nodes: o ? [o, i] : i })) - } - } else { - let l = Object.keys({ ...n, ...t?.getTypeMap() }), - c = Gt(s, l) - e.reportError( - new O(`Cannot extend type "${s}" because it is not defined.` + Mt(c), { nodes: i.name }) - ) - } - } - } - var j7 = { - [E.SCALAR_TYPE_DEFINITION]: E.SCALAR_TYPE_EXTENSION, - [E.OBJECT_TYPE_DEFINITION]: E.OBJECT_TYPE_EXTENSION, - [E.INTERFACE_TYPE_DEFINITION]: E.INTERFACE_TYPE_EXTENSION, - [E.UNION_TYPE_DEFINITION]: E.UNION_TYPE_EXTENSION, - [E.ENUM_TYPE_DEFINITION]: E.ENUM_TYPE_EXTENSION, - [E.INPUT_OBJECT_TYPE_DEFINITION]: E.INPUT_OBJECT_TYPE_EXTENSION - } - function q7(e) { - if (ct(e)) return E.SCALAR_TYPE_EXTENSION - if (me(e)) return E.OBJECT_TYPE_EXTENSION - if (De(e)) return E.INTERFACE_TYPE_EXTENSION - if (Ze(e)) return E.UNION_TYPE_EXTENSION - if (Be(e)) return E.ENUM_TYPE_EXTENSION - if (be(e)) return E.INPUT_OBJECT_TYPE_EXTENSION - Ge(!1, 'Unexpected type: ' + q(e)) - } - function G7(e) { - switch (e) { - case E.SCALAR_TYPE_EXTENSION: - return 'scalar' - case E.OBJECT_TYPE_EXTENSION: - return 'object' - case E.INTERFACE_TYPE_EXTENSION: - return 'interface' - case E.UNION_TYPE_EXTENSION: - return 'union' - case E.ENUM_TYPE_EXTENSION: - return 'enum' - case E.INPUT_OBJECT_TYPE_EXTENSION: - return 'input object' - default: - Ge(!1, 'Unexpected kind: ' + q(e)) - } - } - function $i(e) { - return { - ...Vc(e), - Field: { - leave(t) { - var n - let r = e.getFieldDef() - if (!r) return !1 - let i = new Set( - (n = t.arguments) === null || n === void 0 ? void 0 : n.map((s) => s.name.value) - ) - for (let s of r.args) - if (!i.has(s.name) && Vn(s)) { - let o = q(s.type) - e.reportError( - new O( - `Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`, - { nodes: t } - ) - ) - } - } - } - } - } - function Vc(e) { - var t - let n = Object.create(null), - r = e.getSchema(), - i = (t = r?.getDirectives()) !== null && t !== void 0 ? t : Qt - for (let a of i) n[a.name] = qt(a.args.filter(Vn), (u) => u.name) - let s = e.getDocument().definitions - for (let a of s) - if (a.kind === E.DIRECTIVE_DEFINITION) { - var o - let u = (o = a.arguments) !== null && o !== void 0 ? o : [] - n[a.name.value] = qt(u.filter(H7), (l) => l.name.value) - } - return { - Directive: { - leave(a) { - let u = a.name.value, - l = n[u] - if (l) { - var c - let d = (c = a.arguments) !== null && c !== void 0 ? c : [], - h = new Set(d.map((m) => m.name.value)) - for (let [m, g] of Object.entries(l)) - if (!h.has(m)) { - let v = Ai(g.type) ? q(g.type) : Le(g.type) - e.reportError( - new O( - `Directive "@${u}" argument "${m}" of type "${v}" is required, but it was not provided.`, - { nodes: a } - ) - ) - } - } - } - } - } - } - function H7(e) { - return e.type.kind === E.NON_NULL_TYPE && e.defaultValue == null - } - function Uc(e) { - return { - Field(t) { - let n = e.getType(), - r = t.selectionSet - if (n) { - if (Wt(we(n))) { - if (r) { - let i = t.name.value, - s = q(n) - e.reportError( - new O( - `Field "${i}" must not have a selection since type "${s}" has no subfields.`, - { nodes: r } - ) - ) - } - } else if (!r) { - let i = t.name.value, - s = q(n) - e.reportError( - new O( - `Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`, - { nodes: t } - ) - ) - } - } - } - } - } - function en(e, t, n) { - if (e) { - if (e.kind === E.VARIABLE) { - let r = e.name.value - if (n == null || n[r] === void 0) return - let i = n[r] - return i === null && ce(t) ? void 0 : i - } - if (ce(t)) return e.kind === E.NULL ? void 0 : en(e, t.ofType, n) - if (e.kind === E.NULL) return null - if (Fe(t)) { - let r = t.ofType - if (e.kind === E.LIST) { - let s = [] - for (let o of e.values) - if ($h(o, n)) { - if (ce(r)) return - s.push(null) - } else { - let a = en(o, r, n) - if (a === void 0) return - s.push(a) - } - return s - } - let i = en(e, r, n) - return i === void 0 ? void 0 : [i] - } - if (be(t)) { - if (e.kind !== E.OBJECT) return - let r = Object.create(null), - i = qt(e.fields, (s) => s.name.value) - for (let s of Object.values(t.getFields())) { - let o = i[s.name] - if (!o || $h(o.value, n)) { - if (s.defaultValue !== void 0) r[s.name] = s.defaultValue - else if (ce(s.type)) return - continue - } - let a = en(o.value, s.type, n) - if (a === void 0) return - r[s.name] = a - } - if (t.isOneOf) { - let s = Object.keys(r) - if (s.length !== 1 || r[s[0]] === null) return - } - return r - } - if (Wt(t)) { - let r - try { - r = t.parseLiteral(e, n) - } catch { - return - } - return r === void 0 ? void 0 : r - } - Ge(!1, 'Unexpected input type: ' + q(t)) - } - } - function $h(e, t) { - return e.kind === E.VARIABLE && (t == null || t[e.name.value] === void 0) - } - function W7(e, t, n) { - var r - let i = {}, - s = (r = t.arguments) !== null && r !== void 0 ? r : [], - o = qt(s, (a) => a.name.value) - for (let a of e.args) { - let u = a.name, - l = a.type, - c = o[u] - if (!c) { - if (a.defaultValue !== void 0) i[u] = a.defaultValue - else if (ce(l)) - throw new O(`Argument "${u}" of required type "${q(l)}" was not provided.`, { nodes: t }) - continue - } - let d = c.value, - h = d.kind === E.NULL - if (d.kind === E.VARIABLE) { - let g = d.name.value - if (n == null || !Q7(n, g)) { - if (a.defaultValue !== void 0) i[u] = a.defaultValue - else if (ce(l)) - throw new O( - `Argument "${u}" of required type "${q( - l - )}" was provided the variable "$${g}" which was not provided a runtime value.`, - { nodes: d } - ) - continue - } - h = n[g] == null - } - if (h && ce(l)) - throw new O(`Argument "${u}" of non-null type "${q(l)}" must not be null.`, { nodes: d }) - let m = en(d, l, n) - if (m === void 0) throw new O(`Argument "${u}" has invalid value ${Le(d)}.`, { nodes: d }) - i[u] = m - } - return i - } - function Pr(e, t, n) { - var r - let i = - (r = t.directives) === null || r === void 0 ? void 0 : r.find((s) => s.name.value === e.name) - if (i) return W7(e, i, n) - } - function Q7(e, t) { - return Object.prototype.hasOwnProperty.call(e, t) - } - function qh(e, t, n, r, i) { - let s = new Map() - return jc(e, t, n, r, i, s, new Set()), s - } - function jc(e, t, n, r, i, s, o) { - for (let a of i.selections) - switch (a.kind) { - case E.FIELD: { - if (!$c(n, a)) continue - let u = z7(a), - l = s.get(u) - l !== void 0 ? l.push(a) : s.set(u, [a]) - break - } - case E.INLINE_FRAGMENT: { - if (!$c(n, a) || !jh(e, a, r)) continue - jc(e, t, n, r, a.selectionSet, s, o) - break - } - case E.FRAGMENT_SPREAD: { - let u = a.name.value - if (o.has(u) || !$c(n, a)) continue - o.add(u) - let l = t[u] - if (!l || !jh(e, l, r)) continue - jc(e, t, n, r, l.selectionSet, s, o) - break - } - } - } - function $c(e, t) { - let n = Pr($a, t, e) - if (n?.if === !0) return !1 - let r = Pr(Ua, t, e) - return r?.if !== !1 - } - function jh(e, t, n) { - let r = t.typeCondition - if (!r) return !0 - let i = We(e, r) - return i === n ? !0 : mt(i) ? e.isSubType(i, n) : !1 - } - function z7(e) { - return e.alias ? e.alias.value : e.name.value - } - function qc(e) { - return { - OperationDefinition(t) { - if (t.operation === 'subscription') { - let n = e.getSchema(), - r = n.getSubscriptionType() - if (r) { - let i = t.name ? t.name.value : null, - s = Object.create(null), - o = e.getDocument(), - a = Object.create(null) - for (let l of o.definitions) l.kind === E.FRAGMENT_DEFINITION && (a[l.name.value] = l) - let u = qh(n, a, s, r, t.selectionSet) - if (u.size > 1) { - let d = [...u.values()].slice(1).flat() - e.reportError( - new O( - i != null - ? `Subscription "${i}" must select only one top level field.` - : 'Anonymous Subscription must select only one top level field.', - { nodes: d } - ) - ) - } - for (let l of u.values()) - l[0].name.value.startsWith('__') && - e.reportError( - new O( - i != null - ? `Subscription "${i}" must not select an introspection top level field.` - : 'Anonymous Subscription must not select an introspection top level field.', - { nodes: l } - ) - ) - } - } - } - } - } - function ji(e, t) { - let n = new Map() - for (let r of e) { - let i = t(r), - s = n.get(i) - s === void 0 ? n.set(i, [r]) : s.push(r) - } - return n - } - function Gc(e) { - return { - DirectiveDefinition(r) { - var i - let s = (i = r.arguments) !== null && i !== void 0 ? i : [] - return n(`@${r.name.value}`, s) - }, - InterfaceTypeDefinition: t, - InterfaceTypeExtension: t, - ObjectTypeDefinition: t, - ObjectTypeExtension: t - } - function t(r) { - var i - let s = r.name.value, - o = (i = r.fields) !== null && i !== void 0 ? i : [] - for (let u of o) { - var a - let l = u.name.value, - c = (a = u.arguments) !== null && a !== void 0 ? a : [] - n(`${s}.${l}`, c) - } - return !1 - } - function n(r, i) { - let s = ji(i, (o) => o.name.value) - for (let [o, a] of s) - a.length > 1 && - e.reportError( - new O(`Argument "${r}(${o}:)" can only be defined once.`, { - nodes: a.map((u) => u.name) - }) - ) - return !1 - } - } - function Br(e) { - return { Field: t, Directive: t } - function t(n) { - var r - let i = (r = n.arguments) !== null && r !== void 0 ? r : [], - s = ji(i, (o) => o.name.value) - for (let [o, a] of s) - a.length > 1 && - e.reportError( - new O(`There can be only one argument named "${o}".`, { nodes: a.map((u) => u.name) }) - ) - } - } - function qi(e) { - let t = Object.create(null), - n = e.getSchema() - return { - DirectiveDefinition(r) { - let i = r.name.value - if (n != null && n.getDirective(i)) { - e.reportError( - new O(`Directive "@${i}" already exists in the schema. It cannot be redefined.`, { - nodes: r.name - }) - ) - return - } - return ( - t[i] - ? e.reportError( - new O(`There can be only one directive named "@${i}".`, { nodes: [t[i], r.name] }) - ) - : (t[i] = r.name), - !1 - ) - } - } - } - function Vr(e) { - let t = Object.create(null), - n = e.getSchema(), - r = n ? n.getDirectives() : Qt - for (let a of r) t[a.name] = !a.isRepeatable - let i = e.getDocument().definitions - for (let a of i) a.kind === E.DIRECTIVE_DEFINITION && (t[a.name.value] = !a.repeatable) - let s = Object.create(null), - o = Object.create(null) - return { - enter(a) { - if (!('directives' in a) || !a.directives) return - let u - if (a.kind === E.SCHEMA_DEFINITION || a.kind === E.SCHEMA_EXTENSION) u = s - else if (_n(a) || ki(a)) { - let l = a.name.value - ;(u = o[l]), u === void 0 && (o[l] = u = Object.create(null)) - } else u = Object.create(null) - for (let l of a.directives) { - let c = l.name.value - t[c] && - (u[c] - ? e.reportError( - new O(`The directive "@${c}" can only be used once at this location.`, { - nodes: [u[c], l] - }) - ) - : (u[c] = l)) - } - } - } - } - function Gi(e) { - let t = e.getSchema(), - n = t ? t.getTypeMap() : Object.create(null), - r = Object.create(null) - return { EnumTypeDefinition: i, EnumTypeExtension: i } - function i(s) { - var o - let a = s.name.value - r[a] || (r[a] = Object.create(null)) - let u = (o = s.values) !== null && o !== void 0 ? o : [], - l = r[a] - for (let c of u) { - let d = c.name.value, - h = n[a] - Be(h) && h.getValue(d) - ? e.reportError( - new O( - `Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`, - { nodes: c.name } - ) - ) - : l[d] - ? e.reportError( - new O(`Enum value "${a}.${d}" can only be defined once.`, { nodes: [l[d], c.name] }) - ) - : (l[d] = c.name) - } - return !1 - } - } - function Hi(e) { - let t = e.getSchema(), - n = t ? t.getTypeMap() : Object.create(null), - r = Object.create(null) - return { - InputObjectTypeDefinition: i, - InputObjectTypeExtension: i, - InterfaceTypeDefinition: i, - InterfaceTypeExtension: i, - ObjectTypeDefinition: i, - ObjectTypeExtension: i - } - function i(s) { - var o - let a = s.name.value - r[a] || (r[a] = Object.create(null)) - let u = (o = s.fields) !== null && o !== void 0 ? o : [], - l = r[a] - for (let c of u) { - let d = c.name.value - Y7(n[a], d) - ? e.reportError( - new O( - `Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`, - { nodes: c.name } - ) - ) - : l[d] - ? e.reportError( - new O(`Field "${a}.${d}" can only be defined once.`, { nodes: [l[d], c.name] }) - ) - : (l[d] = c.name) - } - return !1 - } - } - function Y7(e, t) { - return me(e) || De(e) || be(e) ? e.getFields()[t] != null : !1 - } - function Hc(e) { - let t = Object.create(null) - return { - OperationDefinition: () => !1, - FragmentDefinition(n) { - let r = n.name.value - return ( - t[r] - ? e.reportError( - new O(`There can be only one fragment named "${r}".`, { nodes: [t[r], n.name] }) - ) - : (t[r] = n.name), - !1 - ) - } - } - } - function Ur(e) { - let t = [], - n = Object.create(null) - return { - ObjectValue: { - enter() { - t.push(n), (n = Object.create(null)) - }, - leave() { - let r = t.pop() - r || Ge(!1), (n = r) - } - }, - ObjectField(r) { - let i = r.name.value - n[i] - ? e.reportError( - new O(`There can be only one input field named "${i}".`, { nodes: [n[i], r.name] }) - ) - : (n[i] = r.name) - } - } - } - function Wc(e) { - let t = Object.create(null) - return { - OperationDefinition(n) { - let r = n.name - return ( - r && - (t[r.value] - ? e.reportError( - new O(`There can be only one operation named "${r.value}".`, { - nodes: [t[r.value], r] - }) - ) - : (t[r.value] = r)), - !1 - ) - }, - FragmentDefinition: () => !1 - } - } - function Wi(e) { - let t = e.getSchema(), - n = Object.create(null), - r = t - ? { - query: t.getQueryType(), - mutation: t.getMutationType(), - subscription: t.getSubscriptionType() - } - : {} - return { SchemaDefinition: i, SchemaExtension: i } - function i(s) { - var o - let a = (o = s.operationTypes) !== null && o !== void 0 ? o : [] - for (let u of a) { - let l = u.operation, - c = n[l] - r[l] - ? e.reportError( - new O(`Type for ${l} already defined in the schema. It cannot be redefined.`, { - nodes: u - }) - ) - : c - ? e.reportError(new O(`There can be only one ${l} type in schema.`, { nodes: [c, u] })) - : (n[l] = u) - } - return !1 - } - } - function Qi(e) { - let t = Object.create(null), - n = e.getSchema() - return { - ScalarTypeDefinition: r, - ObjectTypeDefinition: r, - InterfaceTypeDefinition: r, - UnionTypeDefinition: r, - EnumTypeDefinition: r, - InputObjectTypeDefinition: r - } - function r(i) { - let s = i.name.value - if (n != null && n.getType(s)) { - e.reportError( - new O( - `Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`, - { nodes: i.name } - ) - ) - return - } - return ( - t[s] - ? e.reportError( - new O(`There can be only one type named "${s}".`, { nodes: [t[s], i.name] }) - ) - : (t[s] = i.name), - !1 - ) - } - } - function zi(e) { - return { - OperationDefinition(t) { - var n - let r = (n = t.variableDefinitions) !== null && n !== void 0 ? n : [], - i = ji(r, (s) => s.variable.name.value) - for (let [s, o] of i) - o.length > 1 && - e.reportError( - new O(`There can be only one variable named "$${s}".`, { - nodes: o.map((a) => a.variable.name) - }) - ) - } - } - } - function Qc(e) { - let t = {} - return { - OperationDefinition: { - enter() { - t = {} - } - }, - VariableDefinition(n) { - t[n.variable.name.value] = n - }, - ListValue(n) { - let r = fr(e.getParentInputType()) - if (!Fe(r)) return $r(e, n), !1 - }, - ObjectValue(n) { - let r = we(e.getInputType()) - if (!be(r)) return $r(e, n), !1 - let i = qt(n.fields, (s) => s.name.value) - for (let s of Object.values(r.getFields())) - if (!i[s.name] && Fi(s)) { - let a = q(s.type) - e.reportError( - new O(`Field "${r.name}.${s.name}" of required type "${a}" was not provided.`, { - nodes: n - }) - ) - } - r.isOneOf && J7(e, n, r, i, t) - }, - ObjectField(n) { - let r = we(e.getParentInputType()) - if (!e.getInputType() && be(r)) { - let s = Gt(n.name.value, Object.keys(r.getFields())) - e.reportError( - new O(`Field "${n.name.value}" is not defined by type "${r.name}".` + Mt(s), { - nodes: n - }) - ) - } - }, - NullValue(n) { - let r = e.getInputType() - ce(r) && - e.reportError(new O(`Expected value of type "${q(r)}", found ${Le(n)}.`, { nodes: n })) - }, - EnumValue: (n) => $r(e, n), - IntValue: (n) => $r(e, n), - FloatValue: (n) => $r(e, n), - StringValue: (n) => $r(e, n), - BooleanValue: (n) => $r(e, n) - } - } - function $r(e, t) { - let n = e.getInputType() - if (!n) return - let r = we(n) - if (!Wt(r)) { - let i = q(n) - e.reportError(new O(`Expected value of type "${i}", found ${Le(t)}.`, { nodes: t })) - return - } - try { - if (r.parseLiteral(t, void 0) === void 0) { - let s = q(n) - e.reportError(new O(`Expected value of type "${s}", found ${Le(t)}.`, { nodes: t })) - } - } catch (i) { - let s = q(n) - i instanceof O - ? e.reportError(i) - : e.reportError( - new O(`Expected value of type "${s}", found ${Le(t)}; ` + i.message, { - nodes: t, - originalError: i - }) - ) - } - } - function J7(e, t, n, r, i) { - var s - let o = Object.keys(r) - if (o.length !== 1) { - e.reportError( - new O(`OneOf Input Object "${n.name}" must specify exactly one key.`, { nodes: [t] }) - ) - return - } - let u = (s = r[o[0]]) === null || s === void 0 ? void 0 : s.value, - l = !u || u.kind === E.NULL, - c = u?.kind === E.VARIABLE - if (l) { - e.reportError(new O(`Field "${n.name}.${o[0]}" must be non-null.`, { nodes: [t] })) - return - } - if (c) { - let d = u.name.value - i[d].type.kind !== E.NON_NULL_TYPE && - e.reportError( - new O( - `Variable "${d}" must be non-nullable to be used for OneOf Input Object "${n.name}".`, - { nodes: [t] } - ) - ) - } - } - function zc(e) { - return { - VariableDefinition(t) { - let n = We(e.getSchema(), t.type) - if (n !== void 0 && !et(n)) { - let r = t.variable.name.value, - i = Le(t.type) - e.reportError( - new O(`Variable "$${r}" cannot be non-input type "${i}".`, { nodes: t.type }) - ) - } - } - } - } - function Yc(e) { - let t = Object.create(null) - return { - OperationDefinition: { - enter() { - t = Object.create(null) - }, - leave(n) { - let r = e.getRecursiveVariableUsages(n) - for (let { node: i, type: s, defaultValue: o } of r) { - let a = i.name.value, - u = t[a] - if (u && s) { - let l = e.getSchema(), - c = We(l, u.type) - if (c && !X7(l, c, u.defaultValue, s, o)) { - let d = q(c), - h = q(s) - e.reportError( - new O(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`, { - nodes: [u, i] - }) - ) - } - } - } - } - }, - VariableDefinition(n) { - t[n.variable.name.value] = n - } - } - } - function X7(e, t, n, r, i) { - if (ce(r) && !ce(t)) { - if (!(n != null && n.kind !== E.NULL) && !(i !== void 0)) return !1 - let a = r.ofType - return bn(e, t, a) - } - return bn(e, t, r) - } - var Jc = Object.freeze([wc]), - Yi = Object.freeze([ - Oi, - Wc, - Fc, - qc, - Mr, - Mi, - zc, - Uc, - Tc, - Hc, - Pi, - Vi, - Bc, - Lc, - zi, - Cc, - Ic, - Or, - Vr, - Sc, - Br, - Qc, - $i, - Yc, - Mc, - Ur, - ...Jc - ]), - Gh = Object.freeze([Bi, Wi, Qi, Gi, Hi, Gc, qi, Mr, Or, Vr, Ui, Ac, Br, Ur, Vc]) - var Za = class { - constructor(t, n) { - ;(this._ast = t), - (this._fragments = void 0), - (this._fragmentSpreads = new Map()), - (this._recursivelyReferencedFragments = new Map()), - (this._onError = n) - } - get [Symbol.toStringTag]() { - return 'ASTValidationContext' - } - reportError(t) { - this._onError(t) - } - getDocument() { - return this._ast - } - getFragment(t) { - let n - if (this._fragments) n = this._fragments - else { - n = Object.create(null) - for (let r of this.getDocument().definitions) - r.kind === E.FRAGMENT_DEFINITION && (n[r.name.value] = r) - this._fragments = n - } - return n[t] - } - getFragmentSpreads(t) { - let n = this._fragmentSpreads.get(t) - if (!n) { - n = [] - let r = [t], - i - for (; (i = r.pop()); ) - for (let s of i.selections) - s.kind === E.FRAGMENT_SPREAD ? n.push(s) : s.selectionSet && r.push(s.selectionSet) - this._fragmentSpreads.set(t, n) - } - return n - } - getRecursivelyReferencedFragments(t) { - let n = this._recursivelyReferencedFragments.get(t) - if (!n) { - n = [] - let r = Object.create(null), - i = [t.selectionSet], - s - for (; (s = i.pop()); ) - for (let o of this.getFragmentSpreads(s)) { - let a = o.name.value - if (r[a] !== !0) { - r[a] = !0 - let u = this.getFragment(a) - u && (n.push(u), i.push(u.selectionSet)) - } - } - this._recursivelyReferencedFragments.set(t, n) - } - return n - } - }, - eu = class extends Za { - constructor(t, n, r) { - super(t, r), (this._schema = n) - } - get [Symbol.toStringTag]() { - return 'SDLValidationContext' - } - getSchema() { - return this._schema - } - }, - ro = class extends Za { - constructor(t, n, r, i) { - super(n, i), - (this._schema = t), - (this._typeInfo = r), - (this._variableUsages = new Map()), - (this._recursiveVariableUsages = new Map()) - } - get [Symbol.toStringTag]() { - return 'ValidationContext' - } - getSchema() { - return this._schema - } - getVariableUsages(t) { - let n = this._variableUsages.get(t) - if (!n) { - let r = [], - i = new kr(this._schema) - ht( - t, - no(i, { - VariableDefinition: () => !1, - Variable(s) { - r.push({ node: s, type: i.getInputType(), defaultValue: i.getDefaultValue() }) - } - }) - ), - (n = r), - this._variableUsages.set(t, n) - } - return n - } - getRecursiveVariableUsages(t) { - let n = this._recursiveVariableUsages.get(t) - if (!n) { - n = this.getVariableUsages(t) - for (let r of this.getRecursivelyReferencedFragments(t)) - n = n.concat(this.getVariableUsages(r)) - this._recursiveVariableUsages.set(t, n) - } - return n - } - getType() { - return this._typeInfo.getType() - } - getParentType() { - return this._typeInfo.getParentType() - } - getInputType() { - return this._typeInfo.getInputType() - } - getParentInputType() { - return this._typeInfo.getParentInputType() - } - getFieldDef() { - return this._typeInfo.getFieldDef() - } - getDirective() { - return this._typeInfo.getDirective() - } - getArgument() { - return this._typeInfo.getArgument() - } - getEnumValue() { - return this._typeInfo.getEnumValue() - } - } - function Ji(e, t, n = Yi, r, i = new kr(e)) { - var s - let o = (s = r?.maxErrors) !== null && s !== void 0 ? s : 100 - t || pe(!1, 'Must provide document.'), Ec(e) - let a = Object.freeze({}), - u = [], - l = new ro(e, t, i, (d) => { - if (u.length >= o) - throw ( - (u.push(new O('Too many validation errors, error limit reached. Validation aborted.')), - a) - ) - u.push(d) - }), - c = Ws(n.map((d) => d(l))) - try { - ht(t, no(i, c)) - } catch (d) { - if (d !== a) throw d - } - return u - } - function K7(e, t, n = Gh) { - let r = [], - i = new eu(e, t, (o) => { - r.push(o) - }), - s = n.map((o) => o(i)) - return ht(e, Ws(s)), r - } - function Hh(e) { - let t = K7(e) - if (t.length !== 0) - throw new Error( - t.map((n) => n.message).join(` +`))}var bc=class{constructor(t){this._errors=[],this.schema=t}reportError(t,n){let r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new O(t,{nodes:r}))}getErrors(){return this._errors}};function v7(e){let t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!me(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${q(n)}.`,(r=vc(t,st.QUERY))!==null&&r!==void 0?r:n.astNode)}let i=t.getMutationType();if(i&&!me(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${q(i)}.`,(s=vc(t,st.MUTATION))!==null&&s!==void 0?s:i.astNode)}let o=t.getSubscriptionType();if(o&&!me(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${q(o)}.`,(a=vc(t,st.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function vc(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r?.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function b7(e){for(let n of e.schema.getDirectives()){if(!eo(n)){e.reportError(`Expected directive but got: ${q(n)}.`,n?.astNode);continue}Rr(e,n);for(let r of n.args)if(Rr(e,r),et(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${q(r.type)}.`,r.astNode),Vn(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[yc(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function Rr(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function E7(e){let t=A7(e),n=e.schema.getTypeMap();for(let r of Object.values(n)){if(!Ma(r)){e.reportError(`Expected GraphQL named type but got: ${q(r)}.`,r.astNode);continue}Ri(r)||Rr(e,r),me(r)||De(r)?(Ih(e,r),Rh(e,r)):Ze(r)?_7(e,r):Be(r)?N7(e,r):be(r)&&(T7(e,r),t(r))}}function Ih(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let o of n){if(Rr(e,o),!Ht(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${q(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(let a of o.args){let u=a.name;if(Rr(e,a),!et(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${q(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type)}if(Vn(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[yc(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Rh(e,t){let n=Object.create(null);for(let r of t.getInterfaces()){if(!De(r)){e.reportError(`Type ${q(t)} must only implement Interface types, it cannot implement ${q(r)}.`,to(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,to(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,to(t,r));continue}n[r.name]=!0,x7(e,t,r),y7(e,t,r)}}function y7(e,t,n){let r=t.getFields();for(let u of Object.values(n.getFields())){let l=u.name,c=r[l];if(!c){e.reportError(`Interface field ${n.name}.${l} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!bn(e.schema,c.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${l} expects type ${q(u.type)} but ${t.name}.${l} is type ${q(c.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=c.astNode)===null||s===void 0?void 0:s.type])}for(let d of u.args){let h=d.name,m=c.args.find(g=>g.name===h);if(!m){e.reportError(`Interface field argument ${n.name}.${l}(${h}:) expected but ${t.name}.${l} does not provide it.`,[d.astNode,c.astNode]);continue}if(!wi(d.type,m.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${l}(${h}:) expects type ${q(d.type)} but ${t.name}.${l}(${h}:) is type ${q(m.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=m.astNode)===null||a===void 0?void 0:a.type])}}for(let d of c.args){let h=d.name;!u.args.find(g=>g.name===h)&&Vn(d)&&e.reportError(`Object field ${t.name}.${l} includes required argument ${h} that is missing from the Interface field ${n.name}.${l}.`,[d.astNode,u.astNode])}}}function x7(e,t,n){let r=t.getInterfaces();for(let i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...to(n,i),...to(t,n)])}function _7(e,t){let n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);let r=Object.create(null);for(let i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,kh(t,i.name));continue}r[i.name]=!0,me(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${q(i)}.`,kh(t,String(i)))}}function N7(e,t){let n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(let r of n)Rr(e,r)}function T7(e,t){let n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(let s of n){if(Rr(e,s),!et(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${q(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(Fi(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[yc(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}t.isOneOf&&S7(t,s,e)}}function S7(e,t,n){if(ce(t.type)){var r;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(r=t.astNode)===null||r===void 0?void 0:r.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function A7(e){let t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;let o=Object.values(s.getFields());for(let a of o)if(ce(a.type)&&be(a.type.ofType)){let u=a.type.ofType,l=r[u.name];if(n.push(a),l===void 0)i(u);else{let c=n.slice(l),d=c.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,c.map(h=>h.astNode))}n.pop()}r[s.name]=void 0}}function to(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function kh(e,t){let{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function yc(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Li.name)}function We(e,t){switch(t.kind){case E.LIST_TYPE:{let n=We(e,t.type);return n&&new Me(n)}case E.NON_NULL_TYPE:{let n=We(e,t.type);return n&&new ae(n)}case E.NAMED_TYPE:return e.getType(t.name.value)}}var kr=class{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??F7,n&&(et(n)&&this._inputTypeStack.push(n),at(n)&&this._parentTypeStack.push(n),Ht(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){let n=this._schema;switch(t.kind){case E.SELECTION_SET:{let i=we(this.getType());this._parentTypeStack.push(at(i)?i:void 0);break}case E.FIELD:{let i=this.getParentType(),s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(Ht(o)?o:void 0);break}case E.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case E.OPERATION_DEFINITION:{let i=n.getRootType(t.operation);this._typeStack.push(me(i)?i:void 0);break}case E.INLINE_FRAGMENT:case E.FRAGMENT_DEFINITION:{let i=t.typeCondition,s=i?We(n,i):we(this.getType());this._typeStack.push(Ht(s)?s:void 0);break}case E.VARIABLE_DEFINITION:{let i=We(n,t.type);this._inputTypeStack.push(et(i)?i:void 0);break}case E.ARGUMENT:{var r;let i,s,o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(et(s)?s:void 0);break}case E.LIST:{let i=fr(this.getInputType()),s=Fe(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(et(s)?s:void 0);break}case E.OBJECT_FIELD:{let i=we(this.getInputType()),s,o;be(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(et(s)?s:void 0);break}case E.ENUM:{let i=we(this.getInputType()),s;Be(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}default:}}leave(t){switch(t.kind){case E.SELECTION_SET:this._parentTypeStack.pop();break;case E.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case E.DIRECTIVE:this._directive=null;break;case E.OPERATION_DEFINITION:case E.INLINE_FRAGMENT:case E.FRAGMENT_DEFINITION:this._typeStack.pop();break;case E.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case E.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case E.LIST:case E.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case E.ENUM:this._enumValue=null;break;default:}}};function F7(e,t,n){let r=n.name.value;if(r===En.name&&e.getQueryType()===t)return En;if(r===yn.name&&e.getQueryType()===t)return yn;if(r===xn.name&&at(t))return xn;if(me(t)||De(t))return t.getFields()[r]}function no(e,t){return{enter(...n){let r=n[0];e.enter(r);let i=Lr(t,r.kind).enter;if(i){let s=i.apply(t,n);return s!==void 0&&(e.leave(r),js(s)&&e.enter(s)),s}},leave(...n){let r=n[0],i=Lr(t,r.kind).leave,s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function xc(e){return e.kind===E.OPERATION_DEFINITION||e.kind===E.FRAGMENT_DEFINITION}function _c(e){return e.kind===E.SCHEMA_DEFINITION||_n(e)||e.kind===E.DIRECTIVE_DEFINITION}function _n(e){return e.kind===E.SCALAR_TYPE_DEFINITION||e.kind===E.OBJECT_TYPE_DEFINITION||e.kind===E.INTERFACE_TYPE_DEFINITION||e.kind===E.UNION_TYPE_DEFINITION||e.kind===E.ENUM_TYPE_DEFINITION||e.kind===E.INPUT_OBJECT_TYPE_DEFINITION}function Nc(e){return e.kind===E.SCHEMA_EXTENSION||ki(e)}function ki(e){return e.kind===E.SCALAR_TYPE_EXTENSION||e.kind===E.OBJECT_TYPE_EXTENSION||e.kind===E.INTERFACE_TYPE_EXTENSION||e.kind===E.UNION_TYPE_EXTENSION||e.kind===E.ENUM_TYPE_EXTENSION||e.kind===E.INPUT_OBJECT_TYPE_EXTENSION}function Oi(e){return{Document(t){for(let n of t.definitions)if(!xc(n)){let r=n.kind===E.SCHEMA_DEFINITION||n.kind===E.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new O(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function Tc(e){return{Field(t){let n=e.getParentType();if(n&&!e.getFieldDef()){let i=e.getSchema(),s=t.name.value,o=Mt("to use an inline fragment on",w7(i,n,s));o===""&&(o=Mt(L7(n,s))),e.reportError(new O(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function w7(e,t,n){if(!mt(t))return[];let r=new Set,i=Object.create(null);for(let o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(let a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,a)=>{let u=i[a.name]-i[o.name];return u!==0?u:De(o)&&e.isSubType(o,a)?-1:De(a)&&e.isSubType(a,o)?1:Ti(o.name,a.name)}).map(o=>o.name)}function L7(e,t){if(me(e)||De(e)){let n=Object.keys(e.getFields());return Gt(t,n)}return[]}function Mi(e){return{InlineFragment(t){let n=t.typeCondition;if(n){let r=We(e.getSchema(),n);if(r&&!at(r)){let i=Le(n);e.reportError(new O(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){let n=We(e.getSchema(),t.typeCondition);if(n&&!at(n)){let r=Le(t.typeCondition);e.reportError(new O(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function Sc(e){return{...Ac(e),Argument(t){let n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){let s=t.name.value,o=r.args.map(u=>u.name),a=Gt(s,o);e.reportError(new O(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+Mt(a),{nodes:t}))}}}}function Ac(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Qt;for(let o of r)t[o.name]=o.args.map(a=>a.name);let i=e.getDocument().definitions;for(let o of i)if(o.kind===E.DIRECTIVE_DEFINITION){var s;let a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){let a=o.name.value,u=t[a];if(o.arguments&&u)for(let l of o.arguments){let c=l.name.value;if(!u.includes(c)){let d=Gt(c,u);e.reportError(new O(`Unknown argument "${c}" on directive "@${a}".`+Mt(d),{nodes:l}))}}return!1}}}function Or(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Qt;for(let s of r)t[s.name]=s.locations;let i=e.getDocument().definitions;for(let s of i)s.kind===E.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,u,l){let c=s.name.value,d=t[c];if(!d){e.reportError(new O(`Unknown directive "@${c}".`,{nodes:s}));return}let h=C7(l);h&&!d.includes(h)&&e.reportError(new O(`Directive "@${c}" may not be used on ${h}.`,{nodes:s}))}}}function C7(e){let t=e[e.length-1];switch("kind"in t||Ge(!1),t.kind){case E.OPERATION_DEFINITION:return I7(t.operation);case E.FIELD:return K.FIELD;case E.FRAGMENT_SPREAD:return K.FRAGMENT_SPREAD;case E.INLINE_FRAGMENT:return K.INLINE_FRAGMENT;case E.FRAGMENT_DEFINITION:return K.FRAGMENT_DEFINITION;case E.VARIABLE_DEFINITION:return K.VARIABLE_DEFINITION;case E.SCHEMA_DEFINITION:case E.SCHEMA_EXTENSION:return K.SCHEMA;case E.SCALAR_TYPE_DEFINITION:case E.SCALAR_TYPE_EXTENSION:return K.SCALAR;case E.OBJECT_TYPE_DEFINITION:case E.OBJECT_TYPE_EXTENSION:return K.OBJECT;case E.FIELD_DEFINITION:return K.FIELD_DEFINITION;case E.INTERFACE_TYPE_DEFINITION:case E.INTERFACE_TYPE_EXTENSION:return K.INTERFACE;case E.UNION_TYPE_DEFINITION:case E.UNION_TYPE_EXTENSION:return K.UNION;case E.ENUM_TYPE_DEFINITION:case E.ENUM_TYPE_EXTENSION:return K.ENUM;case E.ENUM_VALUE_DEFINITION:return K.ENUM_VALUE;case E.INPUT_OBJECT_TYPE_DEFINITION:case E.INPUT_OBJECT_TYPE_EXTENSION:return K.INPUT_OBJECT;case E.INPUT_VALUE_DEFINITION:{let n=e[e.length-3];return"kind"in n||Ge(!1),n.kind===E.INPUT_OBJECT_TYPE_DEFINITION?K.INPUT_FIELD_DEFINITION:K.ARGUMENT_DEFINITION}default:Ge(!1,"Unexpected kind: "+q(t.kind))}}function I7(e){switch(e){case st.QUERY:return K.QUERY;case st.MUTATION:return K.MUTATION;case st.SUBSCRIPTION:return K.SUBSCRIPTION}}function Pi(e){return{FragmentSpread(t){let n=t.name.value;e.getFragment(n)||e.reportError(new O(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function Mr(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(let s of e.getDocument().definitions)_n(s)&&(r[s.name.value]=!0);let i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,a,u,l){let c=s.name.value;if(!n[c]&&!r[c]){var d;let h=(d=l[2])!==null&&d!==void 0?d:a,m=h!=null&&R7(h);if(m&&Mh.includes(c))return;let g=Gt(c,m?Mh.concat(i):i);e.reportError(new O(`Unknown type "${c}".`+Mt(g),{nodes:s}))}}}}var Mh=[...Un,...$n].map(e=>e.name);function R7(e){return"kind"in e&&(_c(e)||Nc(e))}function Fc(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===E.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new O("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function Bi(e){var t,n,r;let i=e.getSchema(),s=(t=(n=(r=i?.astNode)!==null&&r!==void 0?r:i?.getQueryType())!==null&&n!==void 0?n:i?.getMutationType())!==null&&t!==void 0?t:i?.getSubscriptionType(),o=0;return{SchemaDefinition(a){if(s){e.reportError(new O("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new O("Must provide only one schema definition.",{nodes:a})),++o}}}var k7=3;function wc(e){function t(n,r=Object.create(null),i=0){if(n.kind===E.FRAGMENT_SPREAD){let s=n.name.value;if(r[s]===!0)return!1;let o=e.getFragment(s);if(!o)return!1;try{return r[s]=!0,t(o,r,i)}finally{r[s]=void 0}}if(n.kind===E.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(i++,i>=k7))return!0;if("selectionSet"in n&&n.selectionSet){for(let s of n.selectionSet.selections)if(t(s,r,i))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new O("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function Lc(e){let t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;let o=s.name.value;t[o]=!0;let a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(let u of a){let l=u.name.value,c=r[l];if(n.push(u),c===void 0){let d=e.getFragment(l);d&&i(d)}else{let d=n.slice(c),h=d.slice(0,-1).map(m=>'"'+m.name.value+'"').join(", ");e.reportError(new O(`Cannot spread fragment "${l}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function Cc(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i}of r){let s=i.name.value;t[s]!==!0&&e.reportError(new O(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Vi(e){let t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){let r=Object.create(null);for(let i of t)for(let s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(let i of n){let s=i.name.value;r[s]!==!0&&e.reportError(new O(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function Ic(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){let r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(let{node:s}of i)r[s.name.value]=!0;for(let s of t){let o=s.variable.name.value;r[o]!==!0&&e.reportError(new O(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function Ya(e){switch(e.kind){case E.OBJECT:return{...e,fields:O7(e.fields)};case E.LIST:return{...e,values:e.values.map(Ya)};case E.INT:case E.FLOAT:case E.STRING:case E.BOOLEAN:case E.NULL:case E.ENUM:case E.VARIABLE:return e}}function O7(e){return e.map(t=>({...t,value:Ya(t.value)})).sort((t,n)=>Ti(t.name.value,n.name.value))}function Bh(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+Bh(n)).join(" and "):e}function Mc(e){let t=new Oc,n=new Map;return{SelectionSet(r){let i=M7(e,n,t,e.getParentType(),r);for(let[[s,o],a,u]of i){let l=Bh(o);e.reportError(new O(`Fields "${s}" conflict because ${l}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function M7(e,t,n,r,i){let s=[],[o,a]=Ka(e,t,r,i);if(B7(e,s,t,n,o),a.length!==0)for(let u=0;u1)for(let a=0;a[s.value,o]));return n.every(s=>{let o=s.value,a=i.get(s.name.value);return a===void 0?!1:Ph(o)===Ph(a)})}function Ph(e){return Le(Ya(e))}function Rc(e,t){return Fe(e)?Fe(t)?Rc(e.ofType,t.ofType):!0:Fe(t)?!0:ce(e)?ce(t)?Rc(e.ofType,t.ofType):!0:ce(t)?!0:Wt(e)||Wt(t)?e!==t:!1}function Ka(e,t,n,r){let i=t.get(r);if(i)return i;let s=Object.create(null),o=Object.create(null);Uh(e,n,r,s,o);let a=[s,Object.keys(o)];return t.set(r,a),a}function kc(e,t,n){let r=t.get(n.selectionSet);if(r)return r;let i=We(e.getSchema(),n.typeCondition);return Ka(e,t,i,n.selectionSet)}function Uh(e,t,n,r,i){for(let s of n.selections)switch(s.kind){case E.FIELD:{let o=s.name.value,a;(me(t)||De(t))&&(a=t.getFields()[o]);let u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case E.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case E.INLINE_FRAGMENT:{let o=s.typeCondition,a=o?We(e.getSchema(),o):t;Uh(e,a,s.selectionSet,r,i);break}}}function U7(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}var Oc=class{constructor(){this._data=new Map}has(t,n,r){var i;let[s,o]=ts.name.value));for(let s of r.args)if(!i.has(s.name)&&Vn(s)){let o=q(s.type);e.reportError(new O(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function Vc(e){var t;let n=Object.create(null),r=e.getSchema(),i=(t=r?.getDirectives())!==null&&t!==void 0?t:Qt;for(let a of i)n[a.name]=qt(a.args.filter(Vn),u=>u.name);let s=e.getDocument().definitions;for(let a of s)if(a.kind===E.DIRECTIVE_DEFINITION){var o;let u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=qt(u.filter(H7),l=>l.name.value)}return{Directive:{leave(a){let u=a.name.value,l=n[u];if(l){var c;let d=(c=a.arguments)!==null&&c!==void 0?c:[],h=new Set(d.map(m=>m.name.value));for(let[m,g]of Object.entries(l))if(!h.has(m)){let v=Ai(g.type)?q(g.type):Le(g.type);e.reportError(new O(`Directive "@${u}" argument "${m}" of type "${v}" is required, but it was not provided.`,{nodes:a}))}}}}}}function H7(e){return e.type.kind===E.NON_NULL_TYPE&&e.defaultValue==null}function Uc(e){return{Field(t){let n=e.getType(),r=t.selectionSet;if(n){if(Wt(we(n))){if(r){let i=t.name.value,s=q(n);e.reportError(new O(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){let i=t.name.value,s=q(n);e.reportError(new O(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function en(e,t,n){if(e){if(e.kind===E.VARIABLE){let r=e.name.value;if(n==null||n[r]===void 0)return;let i=n[r];return i===null&&ce(t)?void 0:i}if(ce(t))return e.kind===E.NULL?void 0:en(e,t.ofType,n);if(e.kind===E.NULL)return null;if(Fe(t)){let r=t.ofType;if(e.kind===E.LIST){let s=[];for(let o of e.values)if($h(o,n)){if(ce(r))return;s.push(null)}else{let a=en(o,r,n);if(a===void 0)return;s.push(a)}return s}let i=en(e,r,n);return i===void 0?void 0:[i]}if(be(t)){if(e.kind!==E.OBJECT)return;let r=Object.create(null),i=qt(e.fields,s=>s.name.value);for(let s of Object.values(t.getFields())){let o=i[s.name];if(!o||$h(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(ce(s.type))return;continue}let a=en(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}if(t.isOneOf){let s=Object.keys(r);if(s.length!==1||r[s[0]]===null)return}return r}if(Wt(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}Ge(!1,"Unexpected input type: "+q(t))}}function $h(e,t){return e.kind===E.VARIABLE&&(t==null||t[e.name.value]===void 0)}function W7(e,t,n){var r;let i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=qt(s,a=>a.name.value);for(let a of e.args){let u=a.name,l=a.type,c=o[u];if(!c){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(ce(l))throw new O(`Argument "${u}" of required type "${q(l)}" was not provided.`,{nodes:t});continue}let d=c.value,h=d.kind===E.NULL;if(d.kind===E.VARIABLE){let g=d.name.value;if(n==null||!Q7(n,g)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(ce(l))throw new O(`Argument "${u}" of required type "${q(l)}" was provided the variable "$${g}" which was not provided a runtime value.`,{nodes:d});continue}h=n[g]==null}if(h&&ce(l))throw new O(`Argument "${u}" of non-null type "${q(l)}" must not be null.`,{nodes:d});let m=en(d,l,n);if(m===void 0)throw new O(`Argument "${u}" has invalid value ${Le(d)}.`,{nodes:d});i[u]=m}return i}function Pr(e,t,n){var r;let i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return W7(e,i,n)}function Q7(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function qh(e,t,n,r,i){let s=new Map;return jc(e,t,n,r,i,s,new Set),s}function jc(e,t,n,r,i,s,o){for(let a of i.selections)switch(a.kind){case E.FIELD:{if(!$c(n,a))continue;let u=z7(a),l=s.get(u);l!==void 0?l.push(a):s.set(u,[a]);break}case E.INLINE_FRAGMENT:{if(!$c(n,a)||!jh(e,a,r))continue;jc(e,t,n,r,a.selectionSet,s,o);break}case E.FRAGMENT_SPREAD:{let u=a.name.value;if(o.has(u)||!$c(n,a))continue;o.add(u);let l=t[u];if(!l||!jh(e,l,r))continue;jc(e,t,n,r,l.selectionSet,s,o);break}}}function $c(e,t){let n=Pr($a,t,e);if(n?.if===!0)return!1;let r=Pr(Ua,t,e);return r?.if!==!1}function jh(e,t,n){let r=t.typeCondition;if(!r)return!0;let i=We(e,r);return i===n?!0:mt(i)?e.isSubType(i,n):!1}function z7(e){return e.alias?e.alias.value:e.name.value}function qc(e){return{OperationDefinition(t){if(t.operation==="subscription"){let n=e.getSchema(),r=n.getSubscriptionType();if(r){let i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(let l of o.definitions)l.kind===E.FRAGMENT_DEFINITION&&(a[l.name.value]=l);let u=qh(n,a,s,r,t.selectionSet);if(u.size>1){let d=[...u.values()].slice(1).flat();e.reportError(new O(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(let l of u.values())l[0].name.value.startsWith("__")&&e.reportError(new O(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:l}))}}}}}function ji(e,t){let n=new Map;for(let r of e){let i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function Gc(e){return{DirectiveDefinition(r){var i;let s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;let s=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(let u of o){var a;let l=u.name.value,c=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${s}.${l}`,c)}return!1}function n(r,i){let s=ji(i,o=>o.name.value);for(let[o,a]of s)a.length>1&&e.reportError(new O(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function Br(e){return{Field:t,Directive:t};function t(n){var r;let i=(r=n.arguments)!==null&&r!==void 0?r:[],s=ji(i,o=>o.name.value);for(let[o,a]of s)a.length>1&&e.reportError(new O(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function qi(e){let t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){let i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new O(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new O(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Vr(e){let t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():Qt;for(let a of r)t[a.name]=!a.isRepeatable;let i=e.getDocument().definitions;for(let a of i)a.kind===E.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);let s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===E.SCHEMA_DEFINITION||a.kind===E.SCHEMA_EXTENSION)u=s;else if(_n(a)||ki(a)){let l=a.name.value;u=o[l],u===void 0&&(o[l]=u=Object.create(null))}else u=Object.create(null);for(let l of a.directives){let c=l.name.value;t[c]&&(u[c]?e.reportError(new O(`The directive "@${c}" can only be used once at this location.`,{nodes:[u[c],l]})):u[c]=l)}}}}function Gi(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;let a=s.name.value;r[a]||(r[a]=Object.create(null));let u=(o=s.values)!==null&&o!==void 0?o:[],l=r[a];for(let c of u){let d=c.name.value,h=n[a];Be(h)&&h.getValue(d)?e.reportError(new O(`Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name})):l[d]?e.reportError(new O(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[l[d],c.name]})):l[d]=c.name}return!1}}function Hi(e){let t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var o;let a=s.name.value;r[a]||(r[a]=Object.create(null));let u=(o=s.fields)!==null&&o!==void 0?o:[],l=r[a];for(let c of u){let d=c.name.value;Y7(n[a],d)?e.reportError(new O(`Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:c.name})):l[d]?e.reportError(new O(`Field "${a}.${d}" can only be defined once.`,{nodes:[l[d],c.name]})):l[d]=c.name}return!1}}function Y7(e,t){return me(e)||De(e)||be(e)?e.getFields()[t]!=null:!1}function Hc(e){let t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){let r=n.name.value;return t[r]?e.reportError(new O(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Ur(e){let t=[],n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){let r=t.pop();r||Ge(!1),n=r}},ObjectField(r){let i=r.name.value;n[i]?e.reportError(new O(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Wc(e){let t=Object.create(null);return{OperationDefinition(n){let r=n.name;return r&&(t[r.value]?e.reportError(new O(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Wi(e){let t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var o;let a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(let u of a){let l=u.operation,c=n[l];r[l]?e.reportError(new O(`Type for ${l} already defined in the schema. It cannot be redefined.`,{nodes:u})):c?e.reportError(new O(`There can be only one ${l} type in schema.`,{nodes:[c,u]})):n[l]=u}return!1}}function Qi(e){let t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){let s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new O(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new O(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function zi(e){return{OperationDefinition(t){var n;let r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=ji(r,s=>s.variable.name.value);for(let[s,o]of i)o.length>1&&e.reportError(new O(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function Qc(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){let r=fr(e.getParentInputType());if(!Fe(r))return $r(e,n),!1},ObjectValue(n){let r=we(e.getInputType());if(!be(r))return $r(e,n),!1;let i=qt(n.fields,s=>s.name.value);for(let s of Object.values(r.getFields()))if(!i[s.name]&&Fi(s)){let a=q(s.type);e.reportError(new O(`Field "${r.name}.${s.name}" of required type "${a}" was not provided.`,{nodes:n}))}r.isOneOf&&J7(e,n,r,i,t)},ObjectField(n){let r=we(e.getParentInputType());if(!e.getInputType()&&be(r)){let s=Gt(n.name.value,Object.keys(r.getFields()));e.reportError(new O(`Field "${n.name.value}" is not defined by type "${r.name}".`+Mt(s),{nodes:n}))}},NullValue(n){let r=e.getInputType();ce(r)&&e.reportError(new O(`Expected value of type "${q(r)}", found ${Le(n)}.`,{nodes:n}))},EnumValue:n=>$r(e,n),IntValue:n=>$r(e,n),FloatValue:n=>$r(e,n),StringValue:n=>$r(e,n),BooleanValue:n=>$r(e,n)}}function $r(e,t){let n=e.getInputType();if(!n)return;let r=we(n);if(!Wt(r)){let i=q(n);e.reportError(new O(`Expected value of type "${i}", found ${Le(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){let s=q(n);e.reportError(new O(`Expected value of type "${s}", found ${Le(t)}.`,{nodes:t}))}}catch(i){let s=q(n);i instanceof O?e.reportError(i):e.reportError(new O(`Expected value of type "${s}", found ${Le(t)}; `+i.message,{nodes:t,originalError:i}))}}function J7(e,t,n,r,i){var s;let o=Object.keys(r);if(o.length!==1){e.reportError(new O(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}let u=(s=r[o[0]])===null||s===void 0?void 0:s.value,l=!u||u.kind===E.NULL,c=u?.kind===E.VARIABLE;if(l){e.reportError(new O(`Field "${n.name}.${o[0]}" must be non-null.`,{nodes:[t]}));return}if(c){let d=u.name.value;i[d].type.kind!==E.NON_NULL_TYPE&&e.reportError(new O(`Variable "${d}" must be non-nullable to be used for OneOf Input Object "${n.name}".`,{nodes:[t]}))}}function zc(e){return{VariableDefinition(t){let n=We(e.getSchema(),t.type);if(n!==void 0&&!et(n)){let r=t.variable.name.value,i=Le(t.type);e.reportError(new O(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Yc(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){let r=e.getRecursiveVariableUsages(n);for(let{node:i,type:s,defaultValue:o}of r){let a=i.name.value,u=t[a];if(u&&s){let l=e.getSchema(),c=We(l,u.type);if(c&&!X7(l,c,u.defaultValue,s,o)){let d=q(c),h=q(s);e.reportError(new O(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function X7(e,t,n,r,i){if(ce(r)&&!ce(t)){if(!(n!=null&&n.kind!==E.NULL)&&!(i!==void 0))return!1;let a=r.ofType;return bn(e,t,a)}return bn(e,t,r)}var Jc=Object.freeze([wc]),Yi=Object.freeze([Oi,Wc,Fc,qc,Mr,Mi,zc,Uc,Tc,Hc,Pi,Vi,Bc,Lc,zi,Cc,Ic,Or,Vr,Sc,Br,Qc,$i,Yc,Mc,Ur,...Jc]),Gh=Object.freeze([Bi,Wi,Qi,Gi,Hi,Gc,qi,Mr,Or,Vr,Ui,Ac,Br,Ur,Vc]);var Za=class{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(let r of this.getDocument().definitions)r.kind===E.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],i;for(;i=r.pop();)for(let s of i.selections)s.kind===E.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),i=[t.selectionSet],s;for(;s=i.pop();)for(let o of this.getFragmentSpreads(s)){let a=o.name.value;if(r[a]!==!0){r[a]=!0;let u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}},eu=class extends Za{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}},ro=class extends Za{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){let r=[],i=new kr(this._schema);ht(t,no(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(let r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}};function Ji(e,t,n=Yi,r,i=new kr(e)){var s;let o=(s=r?.maxErrors)!==null&&s!==void 0?s:100;t||pe(!1,"Must provide document."),Ec(e);let a=Object.freeze({}),u=[],l=new ro(e,t,i,d=>{if(u.length>=o)throw u.push(new O("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),c=Ws(n.map(d=>d(l)));try{ht(t,no(i,c))}catch(d){if(d!==a)throw d}return u}function K7(e,t,n=Gh){let r=[],i=new eu(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return ht(e,Ws(s)),r}function Hh(e){let t=K7(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(` -`) - ) - } - function tu(e) { - return { - Field(t) { - let n = e.getFieldDef(), - r = n?.deprecationReason - if (n && r != null) { - let i = e.getParentType() - i != null || Ge(!1), - e.reportError(new O(`The field ${i.name}.${n.name} is deprecated. ${r}`, { nodes: t })) - } - }, - Argument(t) { - let n = e.getArgument(), - r = n?.deprecationReason - if (n && r != null) { - let i = e.getDirective() - if (i != null) - e.reportError( - new O(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`, { nodes: t }) - ) - else { - let s = e.getParentType(), - o = e.getFieldDef() - ;(s != null && o != null) || Ge(!1), - e.reportError( - new O(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`, { - nodes: t - }) - ) - } - } - }, - ObjectField(t) { - let n = we(e.getParentInputType()) - if (be(n)) { - let r = n.getFields()[t.name.value], - i = r?.deprecationReason - i != null && - e.reportError( - new O(`The input field ${n.name}.${r.name} is deprecated. ${i}`, { nodes: t }) - ) - } - }, - EnumValue(t) { - let n = e.getEnumValue(), - r = n?.deprecationReason - if (n && r != null) { - let i = we(e.getInputType()) - i != null || Ge(!1), - e.reportError( - new O(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`, { nodes: t }) - ) - } - } - } - } - function io(e, t) { - ;(Nt(e) && Nt(e.__schema)) || - pe( - !1, - `Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${q( - e - )}.` - ) - let n = e.__schema, - r = Dn( - n.types, - (L) => L.name, - (L) => h(L) - ) - for (let L of [...Un, ...$n]) r[L.name] && (r[L.name] = L) - let i = n.queryType ? c(n.queryType) : null, - s = n.mutationType ? c(n.mutationType) : null, - o = n.subscriptionType ? c(n.subscriptionType) : null, - a = n.directives ? n.directives.map(B) : [] - return new dr({ - description: n.description, - query: i, - mutation: s, - subscription: o, - types: Object.values(r), - directives: a, - assumeValid: t?.assumeValid - }) - function u(L) { - if (L.kind === Ce.LIST) { - let A = L.ofType - if (!A) throw new Error('Decorated type deeper than introspection query.') - return new Me(u(A)) - } - if (L.kind === Ce.NON_NULL) { - let A = L.ofType - if (!A) throw new Error('Decorated type deeper than introspection query.') - let X = u(A) - return new ae(Oa(X)) - } - return l(L) - } - function l(L) { - let A = L.name - if (!A) throw new Error(`Unknown type reference: ${q(L)}.`) - let X = r[A] - if (!X) - throw new Error( - `Invalid or incomplete schema, unknown type: ${A}. Ensure that a full introspection query is used in order to build a client schema.` - ) - return X - } - function c(L) { - return Ca(l(L)) - } - function d(L) { - return Ia(l(L)) - } - function h(L) { - if (L != null && L.name != null && L.kind != null) - switch (L.kind) { - case Ce.SCALAR: - return m(L) - case Ce.OBJECT: - return v(L) - case Ce.INTERFACE: - return N(L) - case Ce.UNION: - return _(L) - case Ce.ENUM: - return w(L) - case Ce.INPUT_OBJECT: - return C(L) - } - let A = q(L) - throw new Error( - `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${A}.` - ) - } - function m(L) { - return new Tt({ name: L.name, description: L.description, specifiedByURL: L.specifiedByURL }) - } - function g(L) { - if (L.interfaces === null && L.kind === Ce.INTERFACE) return [] - if (!L.interfaces) { - let A = q(L) - throw new Error(`Introspection result missing interfaces: ${A}.`) - } - return L.interfaces.map(d) - } - function v(L) { - return new Ke({ - name: L.name, - description: L.description, - interfaces: () => g(L), - fields: () => S(L) - }) - } - function N(L) { - return new St({ - name: L.name, - description: L.description, - interfaces: () => g(L), - fields: () => S(L) - }) - } - function _(L) { - if (!L.possibleTypes) { - let A = q(L) - throw new Error(`Introspection result missing possibleTypes: ${A}.`) - } - return new vn({ - name: L.name, - description: L.description, - types: () => L.possibleTypes.map(c) - }) - } - function w(L) { - if (!L.enumValues) { - let A = q(L) - throw new Error(`Introspection result missing enumValues: ${A}.`) - } - return new bt({ - name: L.name, - description: L.description, - values: Dn( - L.enumValues, - (A) => A.name, - (A) => ({ description: A.description, deprecationReason: A.deprecationReason }) - ) - }) - } - function C(L) { - if (!L.inputFields) { - let A = q(L) - throw new Error(`Introspection result missing inputFields: ${A}.`) - } - return new Zt({ - name: L.name, - description: L.description, - fields: () => M(L.inputFields), - isOneOf: L.isOneOf - }) - } - function S(L) { - if (!L.fields) throw new Error(`Introspection result missing fields: ${q(L)}.`) - return Dn(L.fields, (A) => A.name, k) - } - function k(L) { - let A = u(L.type) - if (!Ht(A)) { - let X = q(A) - throw new Error(`Introspection must provide output type for fields, but received: ${X}.`) - } - if (!L.args) { - let X = q(L) - throw new Error(`Introspection result missing field args: ${X}.`) - } - return { - description: L.description, - deprecationReason: L.deprecationReason, - type: A, - args: M(L.args) - } - } - function M(L) { - return Dn(L, (A) => A.name, I) - } - function I(L) { - let A = u(L.type) - if (!et(A)) { - let z = q(A) - throw new Error(`Introspection must provide input type for arguments, but received: ${z}.`) - } - let X = L.defaultValue != null ? en(Aa(L.defaultValue), A) : void 0 - return { - description: L.description, - type: A, - defaultValue: X, - deprecationReason: L.deprecationReason - } - } - function B(L) { - if (!L.args) { - let A = q(L) - throw new Error(`Introspection result missing directive args: ${A}.`) - } - if (!L.locations) { - let A = q(L) - throw new Error(`Introspection result missing directive locations: ${A}.`) - } - return new Bt({ - name: L.name, - description: L.description, - isRepeatable: L.isRepeatable, - locations: L.locations.slice(), - args: M(L.args) - }) - } - } - function zh(e, t, n) { - var r, i, s, o - let a = [], - u = Object.create(null), - l = [], - c, - d = [] - for (let P of t.definitions) - if (P.kind === E.SCHEMA_DEFINITION) c = P - else if (P.kind === E.SCHEMA_EXTENSION) d.push(P) - else if (_n(P)) a.push(P) - else if (ki(P)) { - let Z = P.name.value, - J = u[Z] - u[Z] = J ? J.concat([P]) : [P] - } else P.kind === E.DIRECTIVE_DEFINITION && l.push(P) - if ( - Object.keys(u).length === 0 && - a.length === 0 && - l.length === 0 && - d.length === 0 && - c == null - ) - return e - let h = Object.create(null) - for (let P of e.types) h[P.name] = w(P) - for (let P of a) { - var m - let Z = P.name.value - h[Z] = (m = Wh[Z]) !== null && m !== void 0 ? m : Ie(P) - } - let g = { - query: e.query && N(e.query), - mutation: e.mutation && N(e.mutation), - subscription: e.subscription && N(e.subscription), - ...(c && X([c])), - ...X(d) - } - return { - description: - (r = c) === null || r === void 0 || (i = r.description) === null || i === void 0 - ? void 0 - : i.value, - ...g, - types: Object.values(h), - directives: [...e.directives.map(_), ...l.map(F)], - extensions: Object.create(null), - astNode: (s = c) !== null && s !== void 0 ? s : e.astNode, - extensionASTNodes: e.extensionASTNodes.concat(d), - assumeValid: (o = n?.assumeValid) !== null && o !== void 0 ? o : !1 - } - function v(P) { - return Fe(P) ? new Me(v(P.ofType)) : ce(P) ? new ae(v(P.ofType)) : N(P) - } - function N(P) { - return h[P.name] - } - function _(P) { - let Z = P.toConfig() - return new Bt({ ...Z, args: on(Z.args, A) }) - } - function w(P) { - if (Ri(P) || Va(P)) return P - if (ct(P)) return k(P) - if (me(P)) return M(P) - if (De(P)) return I(P) - if (Ze(P)) return B(P) - if (Be(P)) return S(P) - if (be(P)) return C(P) - Ge(!1, 'Unexpected type: ' + q(P)) - } - function C(P) { - var Z - let J = P.toConfig(), - G = (Z = u[J.name]) !== null && Z !== void 0 ? Z : [] - return new Zt({ - ...J, - fields: () => ({ ...on(J.fields, (_e) => ({ ..._e, type: v(_e.type) })), ...$(G) }), - extensionASTNodes: J.extensionASTNodes.concat(G) - }) - } - function S(P) { - var Z - let J = P.toConfig(), - G = (Z = u[P.name]) !== null && Z !== void 0 ? Z : [] - return new bt({ - ...J, - values: { ...J.values, ...ee(G) }, - extensionASTNodes: J.extensionASTNodes.concat(G) - }) - } - function k(P) { - var Z - let J = P.toConfig(), - G = (Z = u[J.name]) !== null && Z !== void 0 ? Z : [], - _e = J.specifiedByURL - for (let H of G) { - var Re - _e = (Re = Qh(H)) !== null && Re !== void 0 ? Re : _e - } - return new Tt({ ...J, specifiedByURL: _e, extensionASTNodes: J.extensionASTNodes.concat(G) }) - } - function M(P) { - var Z - let J = P.toConfig(), - G = (Z = u[J.name]) !== null && Z !== void 0 ? Z : [] - return new Ke({ - ...J, - interfaces: () => [...P.getInterfaces().map(N), ...ne(G)], - fields: () => ({ ...on(J.fields, L), ...T(G) }), - extensionASTNodes: J.extensionASTNodes.concat(G) - }) - } - function I(P) { - var Z - let J = P.toConfig(), - G = (Z = u[J.name]) !== null && Z !== void 0 ? Z : [] - return new St({ - ...J, - interfaces: () => [...P.getInterfaces().map(N), ...ne(G)], - fields: () => ({ ...on(J.fields, L), ...T(G) }), - extensionASTNodes: J.extensionASTNodes.concat(G) - }) - } - function B(P) { - var Z - let J = P.toConfig(), - G = (Z = u[J.name]) !== null && Z !== void 0 ? Z : [] - return new vn({ - ...J, - types: () => [...P.getTypes().map(N), ...se(G)], - extensionASTNodes: J.extensionASTNodes.concat(G) - }) - } - function L(P) { - return { ...P, type: v(P.type), args: P.args && on(P.args, A) } - } - function A(P) { - return { ...P, type: v(P.type) } - } - function X(P) { - let Z = {} - for (let G of P) { - var J - let _e = (J = G.operationTypes) !== null && J !== void 0 ? J : [] - for (let Re of _e) Z[Re.operation] = z(Re.type) - } - return Z - } - function z(P) { - var Z - let J = P.name.value, - G = (Z = Wh[J]) !== null && Z !== void 0 ? Z : h[J] - if (G === void 0) throw new Error(`Unknown type: "${J}".`) - return G - } - function fe(P) { - return P.kind === E.LIST_TYPE - ? new Me(fe(P.type)) - : P.kind === E.NON_NULL_TYPE - ? new ae(fe(P.type)) - : z(P) - } - function F(P) { - var Z - return new Bt({ - name: P.name.value, - description: (Z = P.description) === null || Z === void 0 ? void 0 : Z.value, - locations: P.locations.map(({ value: J }) => J), - isRepeatable: P.repeatable, - args: Q(P.arguments), - astNode: P - }) - } - function T(P) { - let Z = Object.create(null) - for (let _e of P) { - var J - let Re = (J = _e.fields) !== null && J !== void 0 ? J : [] - for (let H of Re) { - var G - Z[H.name.value] = { - type: fe(H.type), - description: (G = H.description) === null || G === void 0 ? void 0 : G.value, - args: Q(H.arguments), - deprecationReason: nu(H), - astNode: H - } - } - } - return Z - } - function Q(P) { - let Z = P ?? [], - J = Object.create(null) - for (let _e of Z) { - var G - let Re = fe(_e.type) - J[_e.name.value] = { - type: Re, - description: (G = _e.description) === null || G === void 0 ? void 0 : G.value, - defaultValue: en(_e.defaultValue, Re), - deprecationReason: nu(_e), - astNode: _e - } - } - return J - } - function $(P) { - let Z = Object.create(null) - for (let _e of P) { - var J - let Re = (J = _e.fields) !== null && J !== void 0 ? J : [] - for (let H of Re) { - var G - let Ne = fe(H.type) - Z[H.name.value] = { - type: Ne, - description: (G = H.description) === null || G === void 0 ? void 0 : G.value, - defaultValue: en(H.defaultValue, Ne), - deprecationReason: nu(H), - astNode: H - } - } - } - return Z - } - function ee(P) { - let Z = Object.create(null) - for (let _e of P) { - var J - let Re = (J = _e.values) !== null && J !== void 0 ? J : [] - for (let H of Re) { - var G - Z[H.name.value] = { - description: (G = H.description) === null || G === void 0 ? void 0 : G.value, - deprecationReason: nu(H), - astNode: H - } - } - } - return Z - } - function ne(P) { - return P.flatMap((Z) => { - var J, G - return (J = (G = Z.interfaces) === null || G === void 0 ? void 0 : G.map(z)) !== null && - J !== void 0 - ? J - : [] - }) - } - function se(P) { - return P.flatMap((Z) => { - var J, G - return (J = (G = Z.types) === null || G === void 0 ? void 0 : G.map(z)) !== null && - J !== void 0 - ? J - : [] - }) - } - function Ie(P) { - var Z - let J = P.name.value, - G = (Z = u[J]) !== null && Z !== void 0 ? Z : [] - switch (P.kind) { - case E.OBJECT_TYPE_DEFINITION: { - var _e - let Te = [P, ...G] - return new Ke({ - name: J, - description: (_e = P.description) === null || _e === void 0 ? void 0 : _e.value, - interfaces: () => ne(Te), - fields: () => T(Te), - astNode: P, - extensionASTNodes: G - }) - } - case E.INTERFACE_TYPE_DEFINITION: { - var Re - let Te = [P, ...G] - return new St({ - name: J, - description: (Re = P.description) === null || Re === void 0 ? void 0 : Re.value, - interfaces: () => ne(Te), - fields: () => T(Te), - astNode: P, - extensionASTNodes: G - }) - } - case E.ENUM_TYPE_DEFINITION: { - var H - let Te = [P, ...G] - return new bt({ - name: J, - description: (H = P.description) === null || H === void 0 ? void 0 : H.value, - values: ee(Te), - astNode: P, - extensionASTNodes: G - }) - } - case E.UNION_TYPE_DEFINITION: { - var Ne - let Te = [P, ...G] - return new vn({ - name: J, - description: (Ne = P.description) === null || Ne === void 0 ? void 0 : Ne.value, - types: () => se(Te), - astNode: P, - extensionASTNodes: G - }) - } - case E.SCALAR_TYPE_DEFINITION: { - var Y - return new Tt({ - name: J, - description: (Y = P.description) === null || Y === void 0 ? void 0 : Y.value, - specifiedByURL: Qh(P), - astNode: P, - extensionASTNodes: G - }) - } - case E.INPUT_OBJECT_TYPE_DEFINITION: { - var de - let Te = [P, ...G] - return new Zt({ - name: J, - description: (de = P.description) === null || de === void 0 ? void 0 : de.value, - fields: () => $(Te), - astNode: P, - extensionASTNodes: G, - isOneOf: D9(P) - }) - } - } - } - } - var Wh = qt([...Un, ...$n], (e) => e.name) - function nu(e) { - let t = Pr(Li, e) - return t?.reason - } - function Qh(e) { - let t = Pr(ja, e) - return t?.url - } - function D9(e) { - return !!Pr(qa, e) - } - function so(e, t) { - ;(e != null && e.kind === E.DOCUMENT) || pe(!1, 'Must provide valid Document AST.'), - t?.assumeValid !== !0 && t?.assumeValidSDL !== !0 && Hh(e) - let r = zh( - { - description: void 0, - types: [], - directives: [], - extensions: Object.create(null), - extensionASTNodes: [], - assumeValid: !1 - }, - e, - t - ) - if (r.astNode == null) - for (let s of r.types) - switch (s.name) { - case 'Query': - r.query = s - break - case 'Mutation': - r.mutation = s - break - case 'Subscription': - r.subscription = s - break - } - let i = [...r.directives, ...Qt.filter((s) => r.directives.every((o) => o.name !== s.name))] - return new dr({ ...r, directives: i }) - } - function pr(e) { - let t = Object.keys(e), - n = t.length, - r = new Array(n) - for (let i = 0; i < n; ++i) r[i] = e[t[i]] - return r - } - function Ve(e, t) { - return b9(t, Yh(e.string)) - } - function b9(e, t) { - if (!t || t.trim() === '' || t.trim() === ':' || t.trim() === '{') - return Xc(e, (r) => !r.isDeprecated) - let n = e.map((r) => ({ proximity: E9(Yh(r.label), t), entry: r })) - return Xc( - Xc(n, (r) => r.proximity <= 2), - (r) => !r.entry.isDeprecated - ) - .sort( - (r, i) => - (r.entry.isDeprecated ? 1 : 0) - (i.entry.isDeprecated ? 1 : 0) || - r.proximity - i.proximity || - r.entry.label.length - i.entry.label.length - ) - .map((r) => r.entry) - } - function Xc(e, t) { - let n = e.filter(t) - return n.length === 0 ? e : n - } - function Yh(e) { - return e.toLowerCase().replaceAll(/\W/g, '') - } - function E9(e, t) { - let n = y9(t, e) - return ( - e.length > t.length && ((n -= e.length - t.length - 1), (n += e.indexOf(t) === 0 ? 0 : 0.5)), - n - ) - } - function y9(e, t) { - let n, - r, - i = [], - s = e.length, - o = t.length - for (n = 0; n <= s; n++) i[n] = [n] - for (r = 1; r <= o; r++) i[0][r] = r - for (n = 1; n <= s; n++) - for (r = 1; r <= o; r++) { - let a = e[n - 1] === t[r - 1] ? 0 : 1 - ;(i[n][r] = Math.min(i[n - 1][r] + 1, i[n][r - 1] + 1, i[n - 1][r - 1] + a)), - n > 1 && - r > 1 && - e[n - 1] === t[r - 2] && - e[n - 2] === t[r - 1] && - (i[n][r] = Math.min(i[n][r], i[n - 2][r - 2] + a)) - } - return i[s][o] - } - var x9 = (e) => ` { - $${e ?? 1} -}`, - oo = (e, t, n) => { - if (!t) return n ?? e - let r = we(t) - return me(r) || be(r) || Fe(r) || mt(r) ? e + x9() : n ?? e - }, - Kc = (e, t, n) => { - if (Fe(t)) { - let r = we(t.ofType) - return e + `[${oo('', r, '$1')}]` - } - return oo(e, t, n) - }, - Jh = (e) => { - let t = e.args.filter((n) => n.type.toString().endsWith('!')) - if (t.length) - return ( - e.name + - `(${t.map((n, r) => `${n.name}: $${r + 1}`)}) ${oo( - '', - e.type, - ` -` - )}` - ) - } - var Xh - ;(function (e) { - function t(n) { - return typeof n == 'string' - } - e.is = t - })(Xh || (Xh = {})) - var Zc - ;(function (e) { - function t(n) { - return typeof n == 'string' - } - e.is = t - })(Zc || (Zc = {})) - var Kh - ;(function (e) { - ;(e.MIN_VALUE = -2147483648), (e.MAX_VALUE = 2147483647) - function t(n) { - return typeof n == 'number' && e.MIN_VALUE <= n && n <= e.MAX_VALUE - } - e.is = t - })(Kh || (Kh = {})) - var iu - ;(function (e) { - ;(e.MIN_VALUE = 0), (e.MAX_VALUE = 2147483647) - function t(n) { - return typeof n == 'number' && e.MIN_VALUE <= n && n <= e.MAX_VALUE - } - e.is = t - })(iu || (iu = {})) - var ln - ;(function (e) { - function t(r, i) { - return ( - r === Number.MAX_VALUE && (r = iu.MAX_VALUE), - i === Number.MAX_VALUE && (i = iu.MAX_VALUE), - { line: r, character: i } - ) - } - e.create = t - function n(r) { - var i = r - return R.objectLiteral(i) && R.uinteger(i.line) && R.uinteger(i.character) - } - e.is = n - })(ln || (ln = {})) - var tt - ;(function (e) { - function t(r, i, s, o) { - if (R.uinteger(r) && R.uinteger(i) && R.uinteger(s) && R.uinteger(o)) - return { start: ln.create(r, i), end: ln.create(s, o) } - if (ln.is(r) && ln.is(i)) return { start: r, end: i } - throw new Error( - 'Range#create called with invalid arguments[' - .concat(r, ', ') - .concat(i, ', ') - .concat(s, ', ') - .concat(o, ']') - ) - } - e.create = t - function n(r) { - var i = r - return R.objectLiteral(i) && ln.is(i.start) && ln.is(i.end) - } - e.is = n - })(tt || (tt = {})) - var su - ;(function (e) { - function t(r, i) { - return { uri: r, range: i } - } - e.create = t - function n(r) { - var i = r - return R.objectLiteral(i) && tt.is(i.range) && (R.string(i.uri) || R.undefined(i.uri)) - } - e.is = n - })(su || (su = {})) - var Zh - ;(function (e) { - function t(r, i, s, o) { - return { targetUri: r, targetRange: i, targetSelectionRange: s, originSelectionRange: o } - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - tt.is(i.targetRange) && - R.string(i.targetUri) && - tt.is(i.targetSelectionRange) && - (tt.is(i.originSelectionRange) || R.undefined(i.originSelectionRange)) - ) - } - e.is = n - })(Zh || (Zh = {})) - var e1 - ;(function (e) { - function t(r, i, s, o) { - return { red: r, green: i, blue: s, alpha: o } - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - R.numberRange(i.red, 0, 1) && - R.numberRange(i.green, 0, 1) && - R.numberRange(i.blue, 0, 1) && - R.numberRange(i.alpha, 0, 1) - ) - } - e.is = n - })(e1 || (e1 = {})) - var e0 - ;(function (e) { - function t(r, i) { - return { range: r, color: i } - } - e.create = t - function n(r) { - var i = r - return R.objectLiteral(i) && tt.is(i.range) && e1.is(i.color) - } - e.is = n - })(e0 || (e0 = {})) - var t0 - ;(function (e) { - function t(r, i, s) { - return { label: r, textEdit: i, additionalTextEdits: s } - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - R.string(i.label) && - (R.undefined(i.textEdit) || jn.is(i)) && - (R.undefined(i.additionalTextEdits) || R.typedArray(i.additionalTextEdits, jn.is)) - ) - } - e.is = n - })(t0 || (t0 = {})) - var n0 - ;(function (e) { - ;(e.Comment = 'comment'), (e.Imports = 'imports'), (e.Region = 'region') - })(n0 || (n0 = {})) - var r0 - ;(function (e) { - function t(r, i, s, o, a, u) { - var l = { startLine: r, endLine: i } - return ( - R.defined(s) && (l.startCharacter = s), - R.defined(o) && (l.endCharacter = o), - R.defined(a) && (l.kind = a), - R.defined(u) && (l.collapsedText = u), - l - ) - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - R.uinteger(i.startLine) && - R.uinteger(i.startLine) && - (R.undefined(i.startCharacter) || R.uinteger(i.startCharacter)) && - (R.undefined(i.endCharacter) || R.uinteger(i.endCharacter)) && - (R.undefined(i.kind) || R.string(i.kind)) - ) - } - e.is = n - })(r0 || (r0 = {})) - var t1 - ;(function (e) { - function t(r, i) { - return { location: r, message: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && su.is(i.location) && R.string(i.message) - } - e.is = n - })(t1 || (t1 = {})) - var i0 - ;(function (e) { - ;(e.Error = 1), (e.Warning = 2), (e.Information = 3), (e.Hint = 4) - })(i0 || (i0 = {})) - var s0 - ;(function (e) { - ;(e.Unnecessary = 1), (e.Deprecated = 2) - })(s0 || (s0 = {})) - var o0 - ;(function (e) { - function t(n) { - var r = n - return R.objectLiteral(r) && R.string(r.href) - } - e.is = t - })(o0 || (o0 = {})) - var ou - ;(function (e) { - function t(r, i, s, o, a, u) { - var l = { range: r, message: i } - return ( - R.defined(s) && (l.severity = s), - R.defined(o) && (l.code = o), - R.defined(a) && (l.source = a), - R.defined(u) && (l.relatedInformation = u), - l - ) - } - e.create = t - function n(r) { - var i, - s = r - return ( - R.defined(s) && - tt.is(s.range) && - R.string(s.message) && - (R.number(s.severity) || R.undefined(s.severity)) && - (R.integer(s.code) || R.string(s.code) || R.undefined(s.code)) && - (R.undefined(s.codeDescription) || - R.string((i = s.codeDescription) === null || i === void 0 ? void 0 : i.href)) && - (R.string(s.source) || R.undefined(s.source)) && - (R.undefined(s.relatedInformation) || R.typedArray(s.relatedInformation, t1.is)) - ) - } - e.is = n - })(ou || (ou = {})) - var Ki - ;(function (e) { - function t(r, i) { - for (var s = [], o = 2; o < arguments.length; o++) s[o - 2] = arguments[o] - var a = { title: r, command: i } - return R.defined(s) && s.length > 0 && (a.arguments = s), a - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && R.string(i.title) && R.string(i.command) - } - e.is = n - })(Ki || (Ki = {})) - var jn - ;(function (e) { - function t(s, o) { - return { range: s, newText: o } - } - e.replace = t - function n(s, o) { - return { range: { start: s, end: s }, newText: o } - } - e.insert = n - function r(s) { - return { range: s, newText: '' } - } - e.del = r - function i(s) { - var o = s - return R.objectLiteral(o) && R.string(o.newText) && tt.is(o.range) - } - e.is = i - })(jn || (jn = {})) - var Xi - ;(function (e) { - function t(r, i, s) { - var o = { label: r } - return i !== void 0 && (o.needsConfirmation = i), s !== void 0 && (o.description = s), o - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - R.string(i.label) && - (R.boolean(i.needsConfirmation) || i.needsConfirmation === void 0) && - (R.string(i.description) || i.description === void 0) - ) - } - e.is = n - })(Xi || (Xi = {})) - var At - ;(function (e) { - function t(n) { - var r = n - return R.string(r) - } - e.is = t - })(At || (At = {})) - var hr - ;(function (e) { - function t(s, o, a) { - return { range: s, newText: o, annotationId: a } - } - e.replace = t - function n(s, o, a) { - return { range: { start: s, end: s }, newText: o, annotationId: a } - } - e.insert = n - function r(s, o) { - return { range: s, newText: '', annotationId: o } - } - e.del = r - function i(s) { - var o = s - return jn.is(o) && (Xi.is(o.annotationId) || At.is(o.annotationId)) - } - e.is = i - })(hr || (hr = {})) - var au - ;(function (e) { - function t(r, i) { - return { textDocument: r, edits: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && uu.is(i.textDocument) && Array.isArray(i.edits) - } - e.is = n - })(au || (au = {})) - var ao - ;(function (e) { - function t(r, i, s) { - var o = { kind: 'create', uri: r } - return ( - i !== void 0 && (i.overwrite !== void 0 || i.ignoreIfExists !== void 0) && (o.options = i), - s !== void 0 && (o.annotationId = s), - o - ) - } - e.create = t - function n(r) { - var i = r - return ( - i && - i.kind === 'create' && - R.string(i.uri) && - (i.options === void 0 || - ((i.options.overwrite === void 0 || R.boolean(i.options.overwrite)) && - (i.options.ignoreIfExists === void 0 || R.boolean(i.options.ignoreIfExists)))) && - (i.annotationId === void 0 || At.is(i.annotationId)) - ) - } - e.is = n - })(ao || (ao = {})) - var uo - ;(function (e) { - function t(r, i, s, o) { - var a = { kind: 'rename', oldUri: r, newUri: i } - return ( - s !== void 0 && (s.overwrite !== void 0 || s.ignoreIfExists !== void 0) && (a.options = s), - o !== void 0 && (a.annotationId = o), - a - ) - } - e.create = t - function n(r) { - var i = r - return ( - i && - i.kind === 'rename' && - R.string(i.oldUri) && - R.string(i.newUri) && - (i.options === void 0 || - ((i.options.overwrite === void 0 || R.boolean(i.options.overwrite)) && - (i.options.ignoreIfExists === void 0 || R.boolean(i.options.ignoreIfExists)))) && - (i.annotationId === void 0 || At.is(i.annotationId)) - ) - } - e.is = n - })(uo || (uo = {})) - var lo - ;(function (e) { - function t(r, i, s) { - var o = { kind: 'delete', uri: r } - return ( - i !== void 0 && - (i.recursive !== void 0 || i.ignoreIfNotExists !== void 0) && - (o.options = i), - s !== void 0 && (o.annotationId = s), - o - ) - } - e.create = t - function n(r) { - var i = r - return ( - i && - i.kind === 'delete' && - R.string(i.uri) && - (i.options === void 0 || - ((i.options.recursive === void 0 || R.boolean(i.options.recursive)) && - (i.options.ignoreIfNotExists === void 0 || R.boolean(i.options.ignoreIfNotExists)))) && - (i.annotationId === void 0 || At.is(i.annotationId)) - ) - } - e.is = n - })(lo || (lo = {})) - var n1 - ;(function (e) { - function t(n) { - var r = n - return ( - r && - (r.changes !== void 0 || r.documentChanges !== void 0) && - (r.documentChanges === void 0 || - r.documentChanges.every(function (i) { - return R.string(i.kind) ? ao.is(i) || uo.is(i) || lo.is(i) : au.is(i) - })) - ) - } - e.is = t - })(n1 || (n1 = {})) - var ru = (function () { - function e(t, n) { - ;(this.edits = t), (this.changeAnnotations = n) - } - return ( - (e.prototype.insert = function (t, n, r) { - var i, s - if ( - (r === void 0 - ? (i = jn.insert(t, n)) - : At.is(r) - ? ((s = r), (i = hr.insert(t, n, r))) - : (this.assertChangeAnnotations(this.changeAnnotations), - (s = this.changeAnnotations.manage(r)), - (i = hr.insert(t, n, s))), - this.edits.push(i), - s !== void 0) - ) - return s - }), - (e.prototype.replace = function (t, n, r) { - var i, s - if ( - (r === void 0 - ? (i = jn.replace(t, n)) - : At.is(r) - ? ((s = r), (i = hr.replace(t, n, r))) - : (this.assertChangeAnnotations(this.changeAnnotations), - (s = this.changeAnnotations.manage(r)), - (i = hr.replace(t, n, s))), - this.edits.push(i), - s !== void 0) - ) - return s - }), - (e.prototype.delete = function (t, n) { - var r, i - if ( - (n === void 0 - ? (r = jn.del(t)) - : At.is(n) - ? ((i = n), (r = hr.del(t, n))) - : (this.assertChangeAnnotations(this.changeAnnotations), - (i = this.changeAnnotations.manage(n)), - (r = hr.del(t, i))), - this.edits.push(r), - i !== void 0) - ) - return i - }), - (e.prototype.add = function (t) { - this.edits.push(t) - }), - (e.prototype.all = function () { - return this.edits - }), - (e.prototype.clear = function () { - this.edits.splice(0, this.edits.length) - }), - (e.prototype.assertChangeAnnotations = function (t) { - if (t === void 0) - throw new Error('Text edit change is not configured to manage change annotations.') - }), - e - ) - })(), - a0 = (function () { - function e(t) { - ;(this._annotations = t === void 0 ? Object.create(null) : t), - (this._counter = 0), - (this._size = 0) - } - return ( - (e.prototype.all = function () { - return this._annotations - }), - Object.defineProperty(e.prototype, 'size', { - get: function () { - return this._size - }, - enumerable: !1, - configurable: !0 - }), - (e.prototype.manage = function (t, n) { - var r - if ( - (At.is(t) ? (r = t) : ((r = this.nextId()), (n = t)), this._annotations[r] !== void 0) - ) - throw new Error('Id '.concat(r, ' is already in use.')) - if (n === void 0) throw new Error('No annotation provided for id '.concat(r)) - return (this._annotations[r] = n), this._size++, r - }), - (e.prototype.nextId = function () { - return this._counter++, this._counter.toString() - }), - e - ) - })(), - UC = (function () { - function e(t) { - var n = this - ;(this._textEditChanges = Object.create(null)), - t !== void 0 - ? ((this._workspaceEdit = t), - t.documentChanges - ? ((this._changeAnnotations = new a0(t.changeAnnotations)), - (t.changeAnnotations = this._changeAnnotations.all()), - t.documentChanges.forEach(function (r) { - if (au.is(r)) { - var i = new ru(r.edits, n._changeAnnotations) - n._textEditChanges[r.textDocument.uri] = i - } - })) - : t.changes && - Object.keys(t.changes).forEach(function (r) { - var i = new ru(t.changes[r]) - n._textEditChanges[r] = i - })) - : (this._workspaceEdit = {}) - } - return ( - Object.defineProperty(e.prototype, 'edit', { - get: function () { - return ( - this.initDocumentChanges(), - this._changeAnnotations !== void 0 && - (this._changeAnnotations.size === 0 - ? (this._workspaceEdit.changeAnnotations = void 0) - : (this._workspaceEdit.changeAnnotations = this._changeAnnotations.all())), - this._workspaceEdit - ) - }, - enumerable: !1, - configurable: !0 - }), - (e.prototype.getTextEditChange = function (t) { - if (uu.is(t)) { - if ((this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)) - throw new Error('Workspace edit is not configured for document changes.') - var n = { uri: t.uri, version: t.version }, - r = this._textEditChanges[n.uri] - if (!r) { - var i = [], - s = { textDocument: n, edits: i } - this._workspaceEdit.documentChanges.push(s), - (r = new ru(i, this._changeAnnotations)), - (this._textEditChanges[n.uri] = r) - } - return r - } else { - if ((this.initChanges(), this._workspaceEdit.changes === void 0)) - throw new Error('Workspace edit is not configured for normal text edit changes.') - var r = this._textEditChanges[t] - if (!r) { - var i = [] - ;(this._workspaceEdit.changes[t] = i), (r = new ru(i)), (this._textEditChanges[t] = r) - } - return r - } - }), - (e.prototype.initDocumentChanges = function () { - this._workspaceEdit.documentChanges === void 0 && - this._workspaceEdit.changes === void 0 && - ((this._changeAnnotations = new a0()), - (this._workspaceEdit.documentChanges = []), - (this._workspaceEdit.changeAnnotations = this._changeAnnotations.all())) - }), - (e.prototype.initChanges = function () { - this._workspaceEdit.documentChanges === void 0 && - this._workspaceEdit.changes === void 0 && - (this._workspaceEdit.changes = Object.create(null)) - }), - (e.prototype.createFile = function (t, n, r) { - if ((this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)) - throw new Error('Workspace edit is not configured for document changes.') - var i - Xi.is(n) || At.is(n) ? (i = n) : (r = n) - var s, o - if ( - (i === void 0 - ? (s = ao.create(t, r)) - : ((o = At.is(i) ? i : this._changeAnnotations.manage(i)), (s = ao.create(t, r, o))), - this._workspaceEdit.documentChanges.push(s), - o !== void 0) - ) - return o - }), - (e.prototype.renameFile = function (t, n, r, i) { - if ((this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)) - throw new Error('Workspace edit is not configured for document changes.') - var s - Xi.is(r) || At.is(r) ? (s = r) : (i = r) - var o, a - if ( - (s === void 0 - ? (o = uo.create(t, n, i)) - : ((a = At.is(s) ? s : this._changeAnnotations.manage(s)), - (o = uo.create(t, n, i, a))), - this._workspaceEdit.documentChanges.push(o), - a !== void 0) - ) - return a - }), - (e.prototype.deleteFile = function (t, n, r) { - if ((this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)) - throw new Error('Workspace edit is not configured for document changes.') - var i - Xi.is(n) || At.is(n) ? (i = n) : (r = n) - var s, o - if ( - (i === void 0 - ? (s = lo.create(t, r)) - : ((o = At.is(i) ? i : this._changeAnnotations.manage(i)), (s = lo.create(t, r, o))), - this._workspaceEdit.documentChanges.push(s), - o !== void 0) - ) - return o - }), - e - ) - })() - var u0 - ;(function (e) { - function t(r) { - return { uri: r } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && R.string(i.uri) - } - e.is = n - })(u0 || (u0 = {})) - var l0 - ;(function (e) { - function t(r, i) { - return { uri: r, version: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && R.string(i.uri) && R.integer(i.version) - } - e.is = n - })(l0 || (l0 = {})) - var uu - ;(function (e) { - function t(r, i) { - return { uri: r, version: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && R.string(i.uri) && (i.version === null || R.integer(i.version)) - } - e.is = n - })(uu || (uu = {})) - var c0 - ;(function (e) { - function t(r, i, s, o) { - return { uri: r, languageId: i, version: s, text: o } - } - e.create = t - function n(r) { - var i = r - return ( - R.defined(i) && - R.string(i.uri) && - R.string(i.languageId) && - R.integer(i.version) && - R.string(i.text) - ) - } - e.is = n - })(c0 || (c0 = {})) - var r1 - ;(function (e) { - ;(e.PlainText = 'plaintext'), (e.Markdown = 'markdown') - function t(n) { - var r = n - return r === e.PlainText || r === e.Markdown - } - e.is = t - })(r1 || (r1 = {})) - var co - ;(function (e) { - function t(n) { - var r = n - return R.objectLiteral(n) && r1.is(r.kind) && R.string(r.value) - } - e.is = t - })(co || (co = {})) - var f0 - ;(function (e) { - ;(e.Text = 1), - (e.Method = 2), - (e.Function = 3), - (e.Constructor = 4), - (e.Field = 5), - (e.Variable = 6), - (e.Class = 7), - (e.Interface = 8), - (e.Module = 9), - (e.Property = 10), - (e.Unit = 11), - (e.Value = 12), - (e.Enum = 13), - (e.Keyword = 14), - (e.Snippet = 15), - (e.Color = 16), - (e.File = 17), - (e.Reference = 18), - (e.Folder = 19), - (e.EnumMember = 20), - (e.Constant = 21), - (e.Struct = 22), - (e.Event = 23), - (e.Operator = 24), - (e.TypeParameter = 25) - })(f0 || (f0 = {})) - var mr - ;(function (e) { - ;(e.PlainText = 1), (e.Snippet = 2) - })(mr || (mr = {})) - var d0 - ;(function (e) { - e.Deprecated = 1 - })(d0 || (d0 = {})) - var p0 - ;(function (e) { - function t(r, i, s) { - return { newText: r, insert: i, replace: s } - } - e.create = t - function n(r) { - var i = r - return i && R.string(i.newText) && tt.is(i.insert) && tt.is(i.replace) - } - e.is = n - })(p0 || (p0 = {})) - var gr - ;(function (e) { - ;(e.asIs = 1), (e.adjustIndentation = 2) - })(gr || (gr = {})) - var h0 - ;(function (e) { - function t(n) { - var r = n - return ( - r && - (R.string(r.detail) || r.detail === void 0) && - (R.string(r.description) || r.description === void 0) - ) - } - e.is = t - })(h0 || (h0 = {})) - var m0 - ;(function (e) { - function t(n) { - return { label: n } - } - e.create = t - })(m0 || (m0 = {})) - var g0 - ;(function (e) { - function t(n, r) { - return { items: n || [], isIncomplete: !!r } - } - e.create = t - })(g0 || (g0 = {})) - var lu - ;(function (e) { - function t(r) { - return r.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&') - } - e.fromPlainText = t - function n(r) { - var i = r - return R.string(i) || (R.objectLiteral(i) && R.string(i.language) && R.string(i.value)) - } - e.is = n - })(lu || (lu = {})) - var D0 - ;(function (e) { - function t(n) { - var r = n - return ( - !!r && - R.objectLiteral(r) && - (co.is(r.contents) || lu.is(r.contents) || R.typedArray(r.contents, lu.is)) && - (n.range === void 0 || tt.is(n.range)) - ) - } - e.is = t - })(D0 || (D0 = {})) - var v0 - ;(function (e) { - function t(n, r) { - return r ? { label: n, documentation: r } : { label: n } - } - e.create = t - })(v0 || (v0 = {})) - var b0 - ;(function (e) { - function t(n, r) { - for (var i = [], s = 2; s < arguments.length; s++) i[s - 2] = arguments[s] - var o = { label: n } - return ( - R.defined(r) && (o.documentation = r), - R.defined(i) ? (o.parameters = i) : (o.parameters = []), - o - ) - } - e.create = t - })(b0 || (b0 = {})) - var E0 - ;(function (e) { - ;(e.Text = 1), (e.Read = 2), (e.Write = 3) - })(E0 || (E0 = {})) - var y0 - ;(function (e) { - function t(n, r) { - var i = { range: n } - return R.number(r) && (i.kind = r), i - } - e.create = t - })(y0 || (y0 = {})) - var x0 - ;(function (e) { - ;(e.File = 1), - (e.Module = 2), - (e.Namespace = 3), - (e.Package = 4), - (e.Class = 5), - (e.Method = 6), - (e.Property = 7), - (e.Field = 8), - (e.Constructor = 9), - (e.Enum = 10), - (e.Interface = 11), - (e.Function = 12), - (e.Variable = 13), - (e.Constant = 14), - (e.String = 15), - (e.Number = 16), - (e.Boolean = 17), - (e.Array = 18), - (e.Object = 19), - (e.Key = 20), - (e.Null = 21), - (e.EnumMember = 22), - (e.Struct = 23), - (e.Event = 24), - (e.Operator = 25), - (e.TypeParameter = 26) - })(x0 || (x0 = {})) - var _0 - ;(function (e) { - e.Deprecated = 1 - })(_0 || (_0 = {})) - var N0 - ;(function (e) { - function t(n, r, i, s, o) { - var a = { name: n, kind: r, location: { uri: s, range: i } } - return o && (a.containerName = o), a - } - e.create = t - })(N0 || (N0 = {})) - var T0 - ;(function (e) { - function t(n, r, i, s) { - return s !== void 0 - ? { name: n, kind: r, location: { uri: i, range: s } } - : { name: n, kind: r, location: { uri: i } } - } - e.create = t - })(T0 || (T0 = {})) - var S0 - ;(function (e) { - function t(r, i, s, o, a, u) { - var l = { name: r, detail: i, kind: s, range: o, selectionRange: a } - return u !== void 0 && (l.children = u), l - } - e.create = t - function n(r) { - var i = r - return ( - i && - R.string(i.name) && - R.number(i.kind) && - tt.is(i.range) && - tt.is(i.selectionRange) && - (i.detail === void 0 || R.string(i.detail)) && - (i.deprecated === void 0 || R.boolean(i.deprecated)) && - (i.children === void 0 || Array.isArray(i.children)) && - (i.tags === void 0 || Array.isArray(i.tags)) - ) - } - e.is = n - })(S0 || (S0 = {})) - var A0 - ;(function (e) { - ;(e.Empty = ''), - (e.QuickFix = 'quickfix'), - (e.Refactor = 'refactor'), - (e.RefactorExtract = 'refactor.extract'), - (e.RefactorInline = 'refactor.inline'), - (e.RefactorRewrite = 'refactor.rewrite'), - (e.Source = 'source'), - (e.SourceOrganizeImports = 'source.organizeImports'), - (e.SourceFixAll = 'source.fixAll') - })(A0 || (A0 = {})) - var cu - ;(function (e) { - ;(e.Invoked = 1), (e.Automatic = 2) - })(cu || (cu = {})) - var F0 - ;(function (e) { - function t(r, i, s) { - var o = { diagnostics: r } - return i != null && (o.only = i), s != null && (o.triggerKind = s), o - } - e.create = t - function n(r) { - var i = r - return ( - R.defined(i) && - R.typedArray(i.diagnostics, ou.is) && - (i.only === void 0 || R.typedArray(i.only, R.string)) && - (i.triggerKind === void 0 || i.triggerKind === cu.Invoked || i.triggerKind === cu.Automatic) - ) - } - e.is = n - })(F0 || (F0 = {})) - var w0 - ;(function (e) { - function t(r, i, s) { - var o = { title: r }, - a = !0 - return ( - typeof i == 'string' ? ((a = !1), (o.kind = i)) : Ki.is(i) ? (o.command = i) : (o.edit = i), - a && s !== void 0 && (o.kind = s), - o - ) - } - e.create = t - function n(r) { - var i = r - return ( - i && - R.string(i.title) && - (i.diagnostics === void 0 || R.typedArray(i.diagnostics, ou.is)) && - (i.kind === void 0 || R.string(i.kind)) && - (i.edit !== void 0 || i.command !== void 0) && - (i.command === void 0 || Ki.is(i.command)) && - (i.isPreferred === void 0 || R.boolean(i.isPreferred)) && - (i.edit === void 0 || n1.is(i.edit)) - ) - } - e.is = n - })(w0 || (w0 = {})) - var L0 - ;(function (e) { - function t(r, i) { - var s = { range: r } - return R.defined(i) && (s.data = i), s - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && tt.is(i.range) && (R.undefined(i.command) || Ki.is(i.command)) - } - e.is = n - })(L0 || (L0 = {})) - var C0 - ;(function (e) { - function t(r, i) { - return { tabSize: r, insertSpaces: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && R.uinteger(i.tabSize) && R.boolean(i.insertSpaces) - } - e.is = n - })(C0 || (C0 = {})) - var I0 - ;(function (e) { - function t(r, i, s) { - return { range: r, target: i, data: s } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && tt.is(i.range) && (R.undefined(i.target) || R.string(i.target)) - } - e.is = n - })(I0 || (I0 = {})) - var R0 - ;(function (e) { - function t(r, i) { - return { range: r, parent: i } - } - e.create = t - function n(r) { - var i = r - return R.objectLiteral(i) && tt.is(i.range) && (i.parent === void 0 || e.is(i.parent)) - } - e.is = n - })(R0 || (R0 = {})) - var k0 - ;(function (e) { - ;(e.namespace = 'namespace'), - (e.type = 'type'), - (e.class = 'class'), - (e.enum = 'enum'), - (e.interface = 'interface'), - (e.struct = 'struct'), - (e.typeParameter = 'typeParameter'), - (e.parameter = 'parameter'), - (e.variable = 'variable'), - (e.property = 'property'), - (e.enumMember = 'enumMember'), - (e.event = 'event'), - (e.function = 'function'), - (e.method = 'method'), - (e.macro = 'macro'), - (e.keyword = 'keyword'), - (e.modifier = 'modifier'), - (e.comment = 'comment'), - (e.string = 'string'), - (e.number = 'number'), - (e.regexp = 'regexp'), - (e.operator = 'operator'), - (e.decorator = 'decorator') - })(k0 || (k0 = {})) - var O0 - ;(function (e) { - ;(e.declaration = 'declaration'), - (e.definition = 'definition'), - (e.readonly = 'readonly'), - (e.static = 'static'), - (e.deprecated = 'deprecated'), - (e.abstract = 'abstract'), - (e.async = 'async'), - (e.modification = 'modification'), - (e.documentation = 'documentation'), - (e.defaultLibrary = 'defaultLibrary') - })(O0 || (O0 = {})) - var M0 - ;(function (e) { - function t(n) { - var r = n - return ( - R.objectLiteral(r) && - (r.resultId === void 0 || typeof r.resultId == 'string') && - Array.isArray(r.data) && - (r.data.length === 0 || typeof r.data[0] == 'number') - ) - } - e.is = t - })(M0 || (M0 = {})) - var P0 - ;(function (e) { - function t(r, i) { - return { range: r, text: i } - } - e.create = t - function n(r) { - var i = r - return i != null && tt.is(i.range) && R.string(i.text) - } - e.is = n - })(P0 || (P0 = {})) - var B0 - ;(function (e) { - function t(r, i, s) { - return { range: r, variableName: i, caseSensitiveLookup: s } - } - e.create = t - function n(r) { - var i = r - return ( - i != null && - tt.is(i.range) && - R.boolean(i.caseSensitiveLookup) && - (R.string(i.variableName) || i.variableName === void 0) - ) - } - e.is = n - })(B0 || (B0 = {})) - var V0 - ;(function (e) { - function t(r, i) { - return { range: r, expression: i } - } - e.create = t - function n(r) { - var i = r - return i != null && tt.is(i.range) && (R.string(i.expression) || i.expression === void 0) - } - e.is = n - })(V0 || (V0 = {})) - var U0 - ;(function (e) { - function t(r, i) { - return { frameId: r, stoppedLocation: i } - } - e.create = t - function n(r) { - var i = r - return R.defined(i) && tt.is(r.stoppedLocation) - } - e.is = n - })(U0 || (U0 = {})) - var i1 - ;(function (e) { - ;(e.Type = 1), (e.Parameter = 2) - function t(n) { - return n === 1 || n === 2 - } - e.is = t - })(i1 || (i1 = {})) - var s1 - ;(function (e) { - function t(r) { - return { value: r } - } - e.create = t - function n(r) { - var i = r - return ( - R.objectLiteral(i) && - (i.tooltip === void 0 || R.string(i.tooltip) || co.is(i.tooltip)) && - (i.location === void 0 || su.is(i.location)) && - (i.command === void 0 || Ki.is(i.command)) - ) - } - e.is = n - })(s1 || (s1 = {})) - var $0 - ;(function (e) { - function t(r, i, s) { - var o = { position: r, label: i } - return s !== void 0 && (o.kind = s), o - } - e.create = t - function n(r) { - var i = r - return ( - (R.objectLiteral(i) && - ln.is(i.position) && - (R.string(i.label) || R.typedArray(i.label, s1.is)) && - (i.kind === void 0 || i1.is(i.kind)) && - i.textEdits === void 0) || - (R.typedArray(i.textEdits, jn.is) && - (i.tooltip === void 0 || R.string(i.tooltip) || co.is(i.tooltip)) && - (i.paddingLeft === void 0 || R.boolean(i.paddingLeft)) && - (i.paddingRight === void 0 || R.boolean(i.paddingRight))) - ) - } - e.is = n - })($0 || ($0 = {})) - var j0 - ;(function (e) { - function t(n) { - var r = n - return R.objectLiteral(r) && Zc.is(r.uri) && R.string(r.name) - } - e.is = t - })(j0 || (j0 = {})) - var q0 - ;(function (e) { - function t(s, o, a, u) { - return new _9(s, o, a, u) - } - e.create = t - function n(s) { - var o = s - return !!( - R.defined(o) && - R.string(o.uri) && - (R.undefined(o.languageId) || R.string(o.languageId)) && - R.uinteger(o.lineCount) && - R.func(o.getText) && - R.func(o.positionAt) && - R.func(o.offsetAt) - ) - } - e.is = n - function r(s, o) { - for ( - var a = s.getText(), - u = i(o, function (g, v) { - var N = g.range.start.line - v.range.start.line - return N === 0 ? g.range.start.character - v.range.start.character : N - }), - l = a.length, - c = u.length - 1; - c >= 0; - c-- - ) { - var d = u[c], - h = s.offsetAt(d.range.start), - m = s.offsetAt(d.range.end) - if (m <= l) a = a.substring(0, h) + d.newText + a.substring(m, a.length) - else throw new Error('Overlapping edit') - l = h - } - return a - } - e.applyEdits = r - function i(s, o) { - if (s.length <= 1) return s - var a = (s.length / 2) | 0, - u = s.slice(0, a), - l = s.slice(a) - i(u, o), i(l, o) - for (var c = 0, d = 0, h = 0; c < u.length && d < l.length; ) { - var m = o(u[c], l[d]) - m <= 0 ? (s[h++] = u[c++]) : (s[h++] = l[d++]) - } - for (; c < u.length; ) s[h++] = u[c++] - for (; d < l.length; ) s[h++] = l[d++] - return s - } - })(q0 || (q0 = {})) - var _9 = (function () { - function e(t, n, r, i) { - ;(this._uri = t), - (this._languageId = n), - (this._version = r), - (this._content = i), - (this._lineOffsets = void 0) - } - return ( - Object.defineProperty(e.prototype, 'uri', { - get: function () { - return this._uri - }, - enumerable: !1, - configurable: !0 - }), - Object.defineProperty(e.prototype, 'languageId', { - get: function () { - return this._languageId - }, - enumerable: !1, - configurable: !0 - }), - Object.defineProperty(e.prototype, 'version', { - get: function () { - return this._version - }, - enumerable: !1, - configurable: !0 - }), - (e.prototype.getText = function (t) { - if (t) { - var n = this.offsetAt(t.start), - r = this.offsetAt(t.end) - return this._content.substring(n, r) - } - return this._content - }), - (e.prototype.update = function (t, n) { - ;(this._content = t.text), (this._version = n), (this._lineOffsets = void 0) - }), - (e.prototype.getLineOffsets = function () { - if (this._lineOffsets === void 0) { - for (var t = [], n = this._content, r = !0, i = 0; i < n.length; i++) { - r && (t.push(i), (r = !1)) - var s = n.charAt(i) - ;(r = - s === '\r' || - s === - ` -`), - s === '\r' && - i + 1 < n.length && - n.charAt(i + 1) === - ` -` && - i++ - } - r && n.length > 0 && t.push(n.length), (this._lineOffsets = t) - } - return this._lineOffsets - }), - (e.prototype.positionAt = function (t) { - t = Math.max(Math.min(t, this._content.length), 0) - var n = this.getLineOffsets(), - r = 0, - i = n.length - if (i === 0) return ln.create(0, t) - for (; r < i; ) { - var s = Math.floor((r + i) / 2) - n[s] > t ? (i = s) : (r = s + 1) - } - var o = r - 1 - return ln.create(o, t - n[o]) - }), - (e.prototype.offsetAt = function (t) { - var n = this.getLineOffsets() - if (t.line >= n.length) return this._content.length - if (t.line < 0) return 0 - var r = n[t.line], - i = t.line + 1 < n.length ? n[t.line + 1] : this._content.length - return Math.max(Math.min(r + t.character, i), r) - }), - Object.defineProperty(e.prototype, 'lineCount', { - get: function () { - return this.getLineOffsets().length - }, - enumerable: !1, - configurable: !0 - }), - e - ) - })(), - R - ;(function (e) { - var t = Object.prototype.toString - function n(m) { - return typeof m < 'u' - } - e.defined = n - function r(m) { - return typeof m > 'u' - } - e.undefined = r - function i(m) { - return m === !0 || m === !1 - } - e.boolean = i - function s(m) { - return t.call(m) === '[object String]' - } - e.string = s - function o(m) { - return t.call(m) === '[object Number]' - } - e.number = o - function a(m, g, v) { - return t.call(m) === '[object Number]' && g <= m && m <= v - } - e.numberRange = a - function u(m) { - return t.call(m) === '[object Number]' && -2147483648 <= m && m <= 2147483647 - } - e.integer = u - function l(m) { - return t.call(m) === '[object Number]' && 0 <= m && m <= 2147483647 - } - e.uinteger = l - function c(m) { - return t.call(m) === '[object Function]' - } - e.func = c - function d(m) { - return m !== null && typeof m == 'object' - } - e.objectLiteral = d - function h(m, g) { - return Array.isArray(m) && m.every(g) - } - e.typedArray = h - })(R || (R = {})) - var Nn = class { - constructor(t) { - ;(this._start = 0), - (this._pos = 0), - (this.getStartOfToken = () => this._start), - (this.getCurrentPosition = () => this._pos), - (this.eol = () => this._sourceText.length === this._pos), - (this.sol = () => this._pos === 0), - (this.peek = () => this._sourceText.charAt(this._pos) || null), - (this.next = () => { - let n = this._sourceText.charAt(this._pos) - return this._pos++, n - }), - (this.eat = (n) => { - if (this._testNextCharacter(n)) - return (this._start = this._pos), this._pos++, this._sourceText.charAt(this._pos - 1) - }), - (this.eatWhile = (n) => { - let r = this._testNextCharacter(n), - i = !1 - for (r && ((i = r), (this._start = this._pos)); r; ) - this._pos++, (r = this._testNextCharacter(n)), (i = !0) - return i - }), - (this.eatSpace = () => this.eatWhile(/[\s\u00a0]/)), - (this.skipToEnd = () => { - this._pos = this._sourceText.length - }), - (this.skipTo = (n) => { - this._pos = n - }), - (this.match = (n, r = !0, i = !1) => { - let s = null, - o = null - return ( - typeof n == 'string' - ? ((o = new RegExp(n, i ? 'i' : 'g').test( - this._sourceText.slice(this._pos, this._pos + n.length) - )), - (s = n)) - : n instanceof RegExp && - ((o = this._sourceText.slice(this._pos).match(n)), (s = o?.[0])), - o != null && - (typeof n == 'string' || - (o instanceof Array && this._sourceText.startsWith(o[0], this._pos))) - ? (r && ((this._start = this._pos), s && s.length && (this._pos += s.length)), o) - : !1 - ) - }), - (this.backUp = (n) => { - this._pos -= n - }), - (this.column = () => this._pos), - (this.indentation = () => { - let n = this._sourceText.match(/\s*/), - r = 0 - if (n && n.length !== 0) { - let i = n[0], - s = 0 - for (; i.length > s; ) i.charCodeAt(s) === 9 ? (r += 2) : r++, s++ - } - return r - }), - (this.current = () => this._sourceText.slice(this._start, this._pos)), - (this._sourceText = t) - } - _testNextCharacter(t) { - let n = this._sourceText.charAt(this._pos), - r = !1 - return typeof t == 'string' ? (r = n === t) : (r = t instanceof RegExp ? t.test(n) : t(n)), r - } - } - function qe(e) { - return { ofRule: e } - } - function xe(e, t) { - return { ofRule: e, isList: !0, separator: t } - } - function o1(e, t) { - let n = e.match - return ( - (e.match = (r) => { - let i = !1 - return n && (i = n(r)), i && t.every((s) => s.match && !s.match(r)) - }), - e - ) - } - function Zi(e, t) { - return { style: t, match: (n) => n.kind === e } - } - function le(e, t) { - return { style: t || 'punctuation', match: (n) => n.kind === 'Punctuation' && n.value === e } - } - var fu = (e) => - e === ' ' || - e === ' ' || - e === ',' || - e === - ` -` || - e === '\r' || - e === '\uFEFF' || - e === '\xA0', - du = { - Name: /^[_A-Za-z][_0-9A-Za-z]*/, - Punctuation: /^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/, - Number: /^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/, - String: - /^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/, - Comment: /^#.*/ - }, - pu = { - Document: [xe('Definition')], - Definition(e) { - switch (e.value) { - case '{': - return 'ShortQuery' - case 'query': - return 'Query' - case 'mutation': - return 'Mutation' - case 'subscription': - return 'Subscription' - case 'fragment': - return E.FRAGMENT_DEFINITION - case 'schema': - return 'SchemaDef' - case 'scalar': - return 'ScalarDef' - case 'type': - return 'ObjectTypeDef' - case 'interface': - return 'InterfaceDef' - case 'union': - return 'UnionDef' - case 'enum': - return 'EnumDef' - case 'input': - return 'InputDef' - case 'extend': - return 'ExtendDef' - case 'directive': - return 'DirectiveDef' - } - }, - ShortQuery: ['SelectionSet'], - Query: [ - Et('query'), - qe(Ue('def')), - qe('VariableDefinitions'), - xe('Directive'), - 'SelectionSet' - ], - Mutation: [ - Et('mutation'), - qe(Ue('def')), - qe('VariableDefinitions'), - xe('Directive'), - 'SelectionSet' - ], - Subscription: [ - Et('subscription'), - qe(Ue('def')), - qe('VariableDefinitions'), - xe('Directive'), - 'SelectionSet' - ], - VariableDefinitions: [le('('), xe('VariableDefinition'), le(')')], - VariableDefinition: ['Variable', le(':'), 'Type', qe('DefaultValue')], - Variable: [le('$', 'variable'), Ue('variable')], - DefaultValue: [le('='), 'Value'], - SelectionSet: [le('{'), xe('Selection'), le('}')], - Selection(e, t) { - return e.value === '...' - ? t.match(/[\s\u00a0,]*(on\b|@|{)/, !1) - ? 'InlineFragment' - : 'FragmentSpread' - : t.match(/[\s\u00a0,]*:/, !1) - ? 'AliasedField' - : 'Field' - }, - AliasedField: [ - Ue('property'), - le(':'), - Ue('qualifier'), - qe('Arguments'), - xe('Directive'), - qe('SelectionSet') - ], - Field: [Ue('property'), qe('Arguments'), xe('Directive'), qe('SelectionSet')], - Arguments: [le('('), xe('Argument'), le(')')], - Argument: [Ue('attribute'), le(':'), 'Value'], - FragmentSpread: [le('...'), Ue('def'), xe('Directive')], - InlineFragment: [le('...'), qe('TypeCondition'), xe('Directive'), 'SelectionSet'], - FragmentDefinition: [ - Et('fragment'), - qe(o1(Ue('def'), [Et('on')])), - 'TypeCondition', - xe('Directive'), - 'SelectionSet' - ], - TypeCondition: [Et('on'), 'NamedType'], - Value(e) { - switch (e.kind) { - case 'Number': - return 'NumberValue' - case 'String': - return 'StringValue' - case 'Punctuation': - switch (e.value) { - case '[': - return 'ListValue' - case '{': - return 'ObjectValue' - case '$': - return 'Variable' - case '&': - return 'NamedType' - } - return null - case 'Name': - switch (e.value) { - case 'true': - case 'false': - return 'BooleanValue' - } - return e.value === 'null' ? 'NullValue' : 'EnumValue' - } - }, - NumberValue: [Zi('Number', 'number')], - StringValue: [ - { - style: 'string', - match: (e) => e.kind === 'String', - update(e, t) { - t.value.startsWith('"""') && (e.inBlockstring = !t.value.slice(3).endsWith('"""')) - } - } - ], - BooleanValue: [Zi('Name', 'builtin')], - NullValue: [Zi('Name', 'keyword')], - EnumValue: [Ue('string-2')], - ListValue: [le('['), xe('Value'), le(']')], - ObjectValue: [le('{'), xe('ObjectField'), le('}')], - ObjectField: [Ue('attribute'), le(':'), 'Value'], - Type(e) { - return e.value === '[' ? 'ListType' : 'NonNullType' - }, - ListType: [le('['), 'Type', le(']'), qe(le('!'))], - NonNullType: ['NamedType', qe(le('!'))], - NamedType: [N9('atom')], - Directive: [le('@', 'meta'), Ue('meta'), qe('Arguments')], - DirectiveDef: [ - Et('directive'), - le('@', 'meta'), - Ue('meta'), - qe('ArgumentsDef'), - Et('on'), - xe('DirectiveLocation', le('|')) - ], - InterfaceDef: [ - Et('interface'), - Ue('atom'), - qe('Implements'), - xe('Directive'), - le('{'), - xe('FieldDef'), - le('}') - ], - Implements: [Et('implements'), xe('NamedType', le('&'))], - DirectiveLocation: [Ue('string-2')], - SchemaDef: [Et('schema'), xe('Directive'), le('{'), xe('OperationTypeDef'), le('}')], - OperationTypeDef: [Ue('keyword'), le(':'), Ue('atom')], - ScalarDef: [Et('scalar'), Ue('atom'), xe('Directive')], - ObjectTypeDef: [ - Et('type'), - Ue('atom'), - qe('Implements'), - xe('Directive'), - le('{'), - xe('FieldDef'), - le('}') - ], - FieldDef: [Ue('property'), qe('ArgumentsDef'), le(':'), 'Type', xe('Directive')], - ArgumentsDef: [le('('), xe('InputValueDef'), le(')')], - InputValueDef: [Ue('attribute'), le(':'), 'Type', qe('DefaultValue'), xe('Directive')], - UnionDef: [Et('union'), Ue('atom'), xe('Directive'), le('='), xe('UnionMember', le('|'))], - UnionMember: ['NamedType'], - EnumDef: [Et('enum'), Ue('atom'), xe('Directive'), le('{'), xe('EnumValueDef'), le('}')], - EnumValueDef: [Ue('string-2'), xe('Directive')], - InputDef: [Et('input'), Ue('atom'), xe('Directive'), le('{'), xe('InputValueDef'), le('}')], - ExtendDef: [Et('extend'), 'ExtensionDefinition'], - ExtensionDefinition(e) { - switch (e.value) { - case 'schema': - return E.SCHEMA_EXTENSION - case 'scalar': - return E.SCALAR_TYPE_EXTENSION - case 'type': - return E.OBJECT_TYPE_EXTENSION - case 'interface': - return E.INTERFACE_TYPE_EXTENSION - case 'union': - return E.UNION_TYPE_EXTENSION - case 'enum': - return E.ENUM_TYPE_EXTENSION - case 'input': - return E.INPUT_OBJECT_TYPE_EXTENSION - } - }, - [E.SCHEMA_EXTENSION]: ['SchemaDef'], - [E.SCALAR_TYPE_EXTENSION]: ['ScalarDef'], - [E.OBJECT_TYPE_EXTENSION]: ['ObjectTypeDef'], - [E.INTERFACE_TYPE_EXTENSION]: ['InterfaceDef'], - [E.UNION_TYPE_EXTENSION]: ['UnionDef'], - [E.ENUM_TYPE_EXTENSION]: ['EnumDef'], - [E.INPUT_OBJECT_TYPE_EXTENSION]: ['InputDef'] - } - function Et(e) { - return { style: 'keyword', match: (t) => t.kind === 'Name' && t.value === e } - } - function Ue(e) { - return { - style: e, - match: (t) => t.kind === 'Name', - update(t, n) { - t.name = n.value - } - } - } - function N9(e) { - return { - style: e, - match: (t) => t.kind === 'Name', - update(t, n) { - var r - !((r = t.prevState) === null || r === void 0) && - r.prevState && - ((t.name = n.value), (t.prevState.prevState.type = n.value)) - } - } - } - function jr( - e = { eatWhitespace: (t) => t.eatWhile(fu), lexRules: du, parseRules: pu, editorConfig: {} } - ) { - return { - startState() { - let t = { - level: 0, - step: 0, - name: null, - kind: null, - type: null, - rule: null, - needsSeparator: !1, - prevState: null - } - return fo(e.parseRules, t, E.DOCUMENT), t - }, - token(t, n) { - return T9(t, n, e) - } - } - } - function T9(e, t, n) { - var r - if (t.inBlockstring) - return e.match(/.*"""/) ? ((t.inBlockstring = !1), 'string') : (e.skipToEnd(), 'string') - let { lexRules: i, parseRules: s, eatWhitespace: o, editorConfig: a } = n - if ( - (t.rule && t.rule.length === 0 ? l1(t) : t.needsAdvance && ((t.needsAdvance = !1), u1(t, !0)), - e.sol()) - ) { - let c = a?.tabSize || 2 - t.indentLevel = Math.floor(e.indentation() / c) - } - if (o(e)) return 'ws' - let u = A9(i, e) - if (!u) return e.match(/\S+/) || e.match(/\s/), fo(a1, t, 'Invalid'), 'invalidchar' - if (u.kind === 'Comment') return fo(a1, t, 'Comment'), 'comment' - let l = G0({}, t) - if (u.kind === 'Punctuation') { - if (/^[{([]/.test(u.value)) - t.indentLevel !== void 0 && (t.levels = (t.levels || []).concat(t.indentLevel + 1)) - else if (/^[})\]]/.test(u.value)) { - let c = (t.levels = (t.levels || []).slice(0, -1)) - t.indentLevel && c.length > 0 && c.at(-1) < t.indentLevel && (t.indentLevel = c.at(-1)) - } - } - for (; t.rule; ) { - let c = typeof t.rule == 'function' ? (t.step === 0 ? t.rule(u, e) : null) : t.rule[t.step] - if ((t.needsSeparator && (c = c?.separator), c)) { - if ((c.ofRule && (c = c.ofRule), typeof c == 'string')) { - fo(s, t, c) - continue - } - if (!((r = c.match) === null || r === void 0) && r.call(c, u)) - return ( - c.update && c.update(t, u), - u.kind === 'Punctuation' ? u1(t, !0) : (t.needsAdvance = !0), - c.style - ) - } - S9(t) - } - return G0(t, l), fo(a1, t, 'Invalid'), 'invalidchar' - } - function G0(e, t) { - let n = Object.keys(t) - for (let r = 0; r < n.length; r++) e[n[r]] = t[n[r]] - return e - } - var a1 = { Invalid: [], Comment: [] } - function fo(e, t, n) { - if (!e[n]) throw new TypeError('Unknown rule: ' + n) - ;(t.prevState = Object.assign({}, t)), - (t.kind = n), - (t.name = null), - (t.type = null), - (t.rule = e[n]), - (t.step = 0), - (t.needsSeparator = !1) - } - function l1(e) { - e.prevState && - ((e.kind = e.prevState.kind), - (e.name = e.prevState.name), - (e.type = e.prevState.type), - (e.rule = e.prevState.rule), - (e.step = e.prevState.step), - (e.needsSeparator = e.prevState.needsSeparator), - (e.prevState = e.prevState.prevState)) - } - function u1(e, t) { - var n - if (H0(e) && e.rule) { - let r = e.rule[e.step] - if (r.separator) { - let { separator: i } = r - if (((e.needsSeparator = !e.needsSeparator), !e.needsSeparator && i.ofRule)) return - } - if (t) return - } - for ( - e.needsSeparator = !1, e.step++; - e.rule && !(Array.isArray(e.rule) && e.step < e.rule.length); +`))}function tu(e){return{Field(t){let n=e.getFieldDef(),r=n?.deprecationReason;if(n&&r!=null){let i=e.getParentType();i!=null||Ge(!1),e.reportError(new O(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){let n=e.getArgument(),r=n?.deprecationReason;if(n&&r!=null){let i=e.getDirective();if(i!=null)e.reportError(new O(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{let s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||Ge(!1),e.reportError(new O(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){let n=we(e.getParentInputType());if(be(n)){let r=n.getFields()[t.name.value],i=r?.deprecationReason;i!=null&&e.reportError(new O(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){let n=e.getEnumValue(),r=n?.deprecationReason;if(n&&r!=null){let i=we(e.getInputType());i!=null||Ge(!1),e.reportError(new O(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function io(e,t){Nt(e)&&Nt(e.__schema)||pe(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${q(e)}.`);let n=e.__schema,r=Dn(n.types,L=>L.name,L=>h(L));for(let L of[...Un,...$n])r[L.name]&&(r[L.name]=L);let i=n.queryType?c(n.queryType):null,s=n.mutationType?c(n.mutationType):null,o=n.subscriptionType?c(n.subscriptionType):null,a=n.directives?n.directives.map(B):[];return new dr({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:a,assumeValid:t?.assumeValid});function u(L){if(L.kind===Ce.LIST){let A=L.ofType;if(!A)throw new Error("Decorated type deeper than introspection query.");return new Me(u(A))}if(L.kind===Ce.NON_NULL){let A=L.ofType;if(!A)throw new Error("Decorated type deeper than introspection query.");let X=u(A);return new ae(Oa(X))}return l(L)}function l(L){let A=L.name;if(!A)throw new Error(`Unknown type reference: ${q(L)}.`);let X=r[A];if(!X)throw new Error(`Invalid or incomplete schema, unknown type: ${A}. Ensure that a full introspection query is used in order to build a client schema.`);return X}function c(L){return Ca(l(L))}function d(L){return Ia(l(L))}function h(L){if(L!=null&&L.name!=null&&L.kind!=null)switch(L.kind){case Ce.SCALAR:return m(L);case Ce.OBJECT:return v(L);case Ce.INTERFACE:return N(L);case Ce.UNION:return _(L);case Ce.ENUM:return w(L);case Ce.INPUT_OBJECT:return C(L)}let A=q(L);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${A}.`)}function m(L){return new Tt({name:L.name,description:L.description,specifiedByURL:L.specifiedByURL})}function g(L){if(L.interfaces===null&&L.kind===Ce.INTERFACE)return[];if(!L.interfaces){let A=q(L);throw new Error(`Introspection result missing interfaces: ${A}.`)}return L.interfaces.map(d)}function v(L){return new Ke({name:L.name,description:L.description,interfaces:()=>g(L),fields:()=>S(L)})}function N(L){return new St({name:L.name,description:L.description,interfaces:()=>g(L),fields:()=>S(L)})}function _(L){if(!L.possibleTypes){let A=q(L);throw new Error(`Introspection result missing possibleTypes: ${A}.`)}return new vn({name:L.name,description:L.description,types:()=>L.possibleTypes.map(c)})}function w(L){if(!L.enumValues){let A=q(L);throw new Error(`Introspection result missing enumValues: ${A}.`)}return new bt({name:L.name,description:L.description,values:Dn(L.enumValues,A=>A.name,A=>({description:A.description,deprecationReason:A.deprecationReason}))})}function C(L){if(!L.inputFields){let A=q(L);throw new Error(`Introspection result missing inputFields: ${A}.`)}return new Zt({name:L.name,description:L.description,fields:()=>M(L.inputFields),isOneOf:L.isOneOf})}function S(L){if(!L.fields)throw new Error(`Introspection result missing fields: ${q(L)}.`);return Dn(L.fields,A=>A.name,k)}function k(L){let A=u(L.type);if(!Ht(A)){let X=q(A);throw new Error(`Introspection must provide output type for fields, but received: ${X}.`)}if(!L.args){let X=q(L);throw new Error(`Introspection result missing field args: ${X}.`)}return{description:L.description,deprecationReason:L.deprecationReason,type:A,args:M(L.args)}}function M(L){return Dn(L,A=>A.name,I)}function I(L){let A=u(L.type);if(!et(A)){let z=q(A);throw new Error(`Introspection must provide input type for arguments, but received: ${z}.`)}let X=L.defaultValue!=null?en(Aa(L.defaultValue),A):void 0;return{description:L.description,type:A,defaultValue:X,deprecationReason:L.deprecationReason}}function B(L){if(!L.args){let A=q(L);throw new Error(`Introspection result missing directive args: ${A}.`)}if(!L.locations){let A=q(L);throw new Error(`Introspection result missing directive locations: ${A}.`)}return new Bt({name:L.name,description:L.description,isRepeatable:L.isRepeatable,locations:L.locations.slice(),args:M(L.args)})}}function zh(e,t,n){var r,i,s,o;let a=[],u=Object.create(null),l=[],c,d=[];for(let P of t.definitions)if(P.kind===E.SCHEMA_DEFINITION)c=P;else if(P.kind===E.SCHEMA_EXTENSION)d.push(P);else if(_n(P))a.push(P);else if(ki(P)){let Z=P.name.value,J=u[Z];u[Z]=J?J.concat([P]):[P]}else P.kind===E.DIRECTIVE_DEFINITION&&l.push(P);if(Object.keys(u).length===0&&a.length===0&&l.length===0&&d.length===0&&c==null)return e;let h=Object.create(null);for(let P of e.types)h[P.name]=w(P);for(let P of a){var m;let Z=P.name.value;h[Z]=(m=Wh[Z])!==null&&m!==void 0?m:Ie(P)}let g={query:e.query&&N(e.query),mutation:e.mutation&&N(e.mutation),subscription:e.subscription&&N(e.subscription),...c&&X([c]),...X(d)};return{description:(r=c)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...g,types:Object.values(h),directives:[...e.directives.map(_),...l.map(F)],extensions:Object.create(null),astNode:(s=c)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(o=n?.assumeValid)!==null&&o!==void 0?o:!1};function v(P){return Fe(P)?new Me(v(P.ofType)):ce(P)?new ae(v(P.ofType)):N(P)}function N(P){return h[P.name]}function _(P){let Z=P.toConfig();return new Bt({...Z,args:on(Z.args,A)})}function w(P){if(Ri(P)||Va(P))return P;if(ct(P))return k(P);if(me(P))return M(P);if(De(P))return I(P);if(Ze(P))return B(P);if(Be(P))return S(P);if(be(P))return C(P);Ge(!1,"Unexpected type: "+q(P))}function C(P){var Z;let J=P.toConfig(),G=(Z=u[J.name])!==null&&Z!==void 0?Z:[];return new Zt({...J,fields:()=>({...on(J.fields,_e=>({..._e,type:v(_e.type)})),...$(G)}),extensionASTNodes:J.extensionASTNodes.concat(G)})}function S(P){var Z;let J=P.toConfig(),G=(Z=u[P.name])!==null&&Z!==void 0?Z:[];return new bt({...J,values:{...J.values,...ee(G)},extensionASTNodes:J.extensionASTNodes.concat(G)})}function k(P){var Z;let J=P.toConfig(),G=(Z=u[J.name])!==null&&Z!==void 0?Z:[],_e=J.specifiedByURL;for(let H of G){var Re;_e=(Re=Qh(H))!==null&&Re!==void 0?Re:_e}return new Tt({...J,specifiedByURL:_e,extensionASTNodes:J.extensionASTNodes.concat(G)})}function M(P){var Z;let J=P.toConfig(),G=(Z=u[J.name])!==null&&Z!==void 0?Z:[];return new Ke({...J,interfaces:()=>[...P.getInterfaces().map(N),...ne(G)],fields:()=>({...on(J.fields,L),...T(G)}),extensionASTNodes:J.extensionASTNodes.concat(G)})}function I(P){var Z;let J=P.toConfig(),G=(Z=u[J.name])!==null&&Z!==void 0?Z:[];return new St({...J,interfaces:()=>[...P.getInterfaces().map(N),...ne(G)],fields:()=>({...on(J.fields,L),...T(G)}),extensionASTNodes:J.extensionASTNodes.concat(G)})}function B(P){var Z;let J=P.toConfig(),G=(Z=u[J.name])!==null&&Z!==void 0?Z:[];return new vn({...J,types:()=>[...P.getTypes().map(N),...se(G)],extensionASTNodes:J.extensionASTNodes.concat(G)})}function L(P){return{...P,type:v(P.type),args:P.args&&on(P.args,A)}}function A(P){return{...P,type:v(P.type)}}function X(P){let Z={};for(let G of P){var J;let _e=(J=G.operationTypes)!==null&&J!==void 0?J:[];for(let Re of _e)Z[Re.operation]=z(Re.type)}return Z}function z(P){var Z;let J=P.name.value,G=(Z=Wh[J])!==null&&Z!==void 0?Z:h[J];if(G===void 0)throw new Error(`Unknown type: "${J}".`);return G}function fe(P){return P.kind===E.LIST_TYPE?new Me(fe(P.type)):P.kind===E.NON_NULL_TYPE?new ae(fe(P.type)):z(P)}function F(P){var Z;return new Bt({name:P.name.value,description:(Z=P.description)===null||Z===void 0?void 0:Z.value,locations:P.locations.map(({value:J})=>J),isRepeatable:P.repeatable,args:Q(P.arguments),astNode:P})}function T(P){let Z=Object.create(null);for(let _e of P){var J;let Re=(J=_e.fields)!==null&&J!==void 0?J:[];for(let H of Re){var G;Z[H.name.value]={type:fe(H.type),description:(G=H.description)===null||G===void 0?void 0:G.value,args:Q(H.arguments),deprecationReason:nu(H),astNode:H}}}return Z}function Q(P){let Z=P??[],J=Object.create(null);for(let _e of Z){var G;let Re=fe(_e.type);J[_e.name.value]={type:Re,description:(G=_e.description)===null||G===void 0?void 0:G.value,defaultValue:en(_e.defaultValue,Re),deprecationReason:nu(_e),astNode:_e}}return J}function $(P){let Z=Object.create(null);for(let _e of P){var J;let Re=(J=_e.fields)!==null&&J!==void 0?J:[];for(let H of Re){var G;let Ne=fe(H.type);Z[H.name.value]={type:Ne,description:(G=H.description)===null||G===void 0?void 0:G.value,defaultValue:en(H.defaultValue,Ne),deprecationReason:nu(H),astNode:H}}}return Z}function ee(P){let Z=Object.create(null);for(let _e of P){var J;let Re=(J=_e.values)!==null&&J!==void 0?J:[];for(let H of Re){var G;Z[H.name.value]={description:(G=H.description)===null||G===void 0?void 0:G.value,deprecationReason:nu(H),astNode:H}}}return Z}function ne(P){return P.flatMap(Z=>{var J,G;return(J=(G=Z.interfaces)===null||G===void 0?void 0:G.map(z))!==null&&J!==void 0?J:[]})}function se(P){return P.flatMap(Z=>{var J,G;return(J=(G=Z.types)===null||G===void 0?void 0:G.map(z))!==null&&J!==void 0?J:[]})}function Ie(P){var Z;let J=P.name.value,G=(Z=u[J])!==null&&Z!==void 0?Z:[];switch(P.kind){case E.OBJECT_TYPE_DEFINITION:{var _e;let Te=[P,...G];return new Ke({name:J,description:(_e=P.description)===null||_e===void 0?void 0:_e.value,interfaces:()=>ne(Te),fields:()=>T(Te),astNode:P,extensionASTNodes:G})}case E.INTERFACE_TYPE_DEFINITION:{var Re;let Te=[P,...G];return new St({name:J,description:(Re=P.description)===null||Re===void 0?void 0:Re.value,interfaces:()=>ne(Te),fields:()=>T(Te),astNode:P,extensionASTNodes:G})}case E.ENUM_TYPE_DEFINITION:{var H;let Te=[P,...G];return new bt({name:J,description:(H=P.description)===null||H===void 0?void 0:H.value,values:ee(Te),astNode:P,extensionASTNodes:G})}case E.UNION_TYPE_DEFINITION:{var Ne;let Te=[P,...G];return new vn({name:J,description:(Ne=P.description)===null||Ne===void 0?void 0:Ne.value,types:()=>se(Te),astNode:P,extensionASTNodes:G})}case E.SCALAR_TYPE_DEFINITION:{var Y;return new Tt({name:J,description:(Y=P.description)===null||Y===void 0?void 0:Y.value,specifiedByURL:Qh(P),astNode:P,extensionASTNodes:G})}case E.INPUT_OBJECT_TYPE_DEFINITION:{var de;let Te=[P,...G];return new Zt({name:J,description:(de=P.description)===null||de===void 0?void 0:de.value,fields:()=>$(Te),astNode:P,extensionASTNodes:G,isOneOf:D9(P)})}}}}var Wh=qt([...Un,...$n],e=>e.name);function nu(e){let t=Pr(Li,e);return t?.reason}function Qh(e){let t=Pr(ja,e);return t?.url}function D9(e){return!!Pr(qa,e)}function so(e,t){e!=null&&e.kind===E.DOCUMENT||pe(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&Hh(e);let r=zh({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(let s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}let i=[...r.directives,...Qt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new dr({...r,directives:i})}function pr(e){let t=Object.keys(e),n=t.length,r=new Array(n);for(let i=0;i!r.isDeprecated);let n=e.map(r=>({proximity:E9(Yh(r.label),t),entry:r}));return Xc(Xc(n,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,i)=>(r.entry.isDeprecated?1:0)-(i.entry.isDeprecated?1:0)||r.proximity-i.proximity||r.entry.label.length-i.entry.label.length).map(r=>r.entry)}function Xc(e,t){let n=e.filter(t);return n.length===0?e:n}function Yh(e){return e.toLowerCase().replaceAll(/\W/g,"")}function E9(e,t){let n=y9(t,e);return e.length>t.length&&(n-=e.length-t.length-1,n+=e.indexOf(t)===0?0:.5),n}function y9(e,t){let n,r,i=[],s=e.length,o=t.length;for(n=0;n<=s;n++)i[n]=[n];for(r=1;r<=o;r++)i[0][r]=r;for(n=1;n<=s;n++)for(r=1;r<=o;r++){let a=e[n-1]===t[r-1]?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+a),n>1&&r>1&&e[n-1]===t[r-2]&&e[n-2]===t[r-1]&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+a))}return i[s][o]}var x9=e=>` { + $${e??1} +}`,oo=(e,t,n)=>{if(!t)return n??e;let r=we(t);return me(r)||be(r)||Fe(r)||mt(r)?e+x9():n??e},Kc=(e,t,n)=>{if(Fe(t)){let r=we(t.ofType);return e+`[${oo("",r,"$1")}]`}return oo(e,t,n)},Jh=e=>{let t=e.args.filter(n=>n.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((n,r)=>`${n.name}: $${r+1}`)}) ${oo("",e.type,` +`)}`};var Xh;(function(e){function t(n){return typeof n=="string"}e.is=t})(Xh||(Xh={}));var Zc;(function(e){function t(n){return typeof n=="string"}e.is=t})(Zc||(Zc={}));var Kh;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(Kh||(Kh={}));var iu;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(iu||(iu={}));var ln;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=iu.MAX_VALUE),i===Number.MAX_VALUE&&(i=iu.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&R.uinteger(i.line)&&R.uinteger(i.character)}e.is=n})(ln||(ln={}));var tt;(function(e){function t(r,i,s,o){if(R.uinteger(r)&&R.uinteger(i)&&R.uinteger(s)&&R.uinteger(o))return{start:ln.create(r,i),end:ln.create(s,o)};if(ln.is(r)&&ln.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments[".concat(r,", ").concat(i,", ").concat(s,", ").concat(o,"]"))}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&ln.is(i.start)&&ln.is(i.end)}e.is=n})(tt||(tt={}));var su;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&tt.is(i.range)&&(R.string(i.uri)||R.undefined(i.uri))}e.is=n})(su||(su={}));var Zh;(function(e){function t(r,i,s,o){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:o}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&tt.is(i.targetRange)&&R.string(i.targetUri)&&tt.is(i.targetSelectionRange)&&(tt.is(i.originSelectionRange)||R.undefined(i.originSelectionRange))}e.is=n})(Zh||(Zh={}));var e1;(function(e){function t(r,i,s,o){return{red:r,green:i,blue:s,alpha:o}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&R.numberRange(i.red,0,1)&&R.numberRange(i.green,0,1)&&R.numberRange(i.blue,0,1)&&R.numberRange(i.alpha,0,1)}e.is=n})(e1||(e1={}));var e0;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&tt.is(i.range)&&e1.is(i.color)}e.is=n})(e0||(e0={}));var t0;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.undefined(i.textEdit)||jn.is(i))&&(R.undefined(i.additionalTextEdits)||R.typedArray(i.additionalTextEdits,jn.is))}e.is=n})(t0||(t0={}));var n0;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(n0||(n0={}));var r0;(function(e){function t(r,i,s,o,a,u){var l={startLine:r,endLine:i};return R.defined(s)&&(l.startCharacter=s),R.defined(o)&&(l.endCharacter=o),R.defined(a)&&(l.kind=a),R.defined(u)&&(l.collapsedText=u),l}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&R.uinteger(i.startLine)&&R.uinteger(i.startLine)&&(R.undefined(i.startCharacter)||R.uinteger(i.startCharacter))&&(R.undefined(i.endCharacter)||R.uinteger(i.endCharacter))&&(R.undefined(i.kind)||R.string(i.kind))}e.is=n})(r0||(r0={}));var t1;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){var i=r;return R.defined(i)&&su.is(i.location)&&R.string(i.message)}e.is=n})(t1||(t1={}));var i0;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(i0||(i0={}));var s0;(function(e){e.Unnecessary=1,e.Deprecated=2})(s0||(s0={}));var o0;(function(e){function t(n){var r=n;return R.objectLiteral(r)&&R.string(r.href)}e.is=t})(o0||(o0={}));var ou;(function(e){function t(r,i,s,o,a,u){var l={range:r,message:i};return R.defined(s)&&(l.severity=s),R.defined(o)&&(l.code=o),R.defined(a)&&(l.source=a),R.defined(u)&&(l.relatedInformation=u),l}e.create=t;function n(r){var i,s=r;return R.defined(s)&&tt.is(s.range)&&R.string(s.message)&&(R.number(s.severity)||R.undefined(s.severity))&&(R.integer(s.code)||R.string(s.code)||R.undefined(s.code))&&(R.undefined(s.codeDescription)||R.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(R.string(s.source)||R.undefined(s.source))&&(R.undefined(s.relatedInformation)||R.typedArray(s.relatedInformation,t1.is))}e.is=n})(ou||(ou={}));var Ki;(function(e){function t(r,i){for(var s=[],o=2;o0&&(a.arguments=s),a}e.create=t;function n(r){var i=r;return R.defined(i)&&R.string(i.title)&&R.string(i.command)}e.is=n})(Ki||(Ki={}));var jn;(function(e){function t(s,o){return{range:s,newText:o}}e.replace=t;function n(s,o){return{range:{start:s,end:s},newText:o}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){var o=s;return R.objectLiteral(o)&&R.string(o.newText)&&tt.is(o.range)}e.is=i})(jn||(jn={}));var Xi;(function(e){function t(r,i,s){var o={label:r};return i!==void 0&&(o.needsConfirmation=i),s!==void 0&&(o.description=s),o}e.create=t;function n(r){var i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}e.is=n})(Xi||(Xi={}));var At;(function(e){function t(n){var r=n;return R.string(r)}e.is=t})(At||(At={}));var hr;(function(e){function t(s,o,a){return{range:s,newText:o,annotationId:a}}e.replace=t;function n(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}e.insert=n;function r(s,o){return{range:s,newText:"",annotationId:o}}e.del=r;function i(s){var o=s;return jn.is(o)&&(Xi.is(o.annotationId)||At.is(o.annotationId))}e.is=i})(hr||(hr={}));var au;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return R.defined(i)&&uu.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(au||(au={}));var ao;(function(e){function t(r,i,s){var o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){var i=r;return i&&i.kind==="create"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||At.is(i.annotationId))}e.is=n})(ao||(ao={}));var uo;(function(e){function t(r,i,s,o){var a={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}e.create=t;function n(r){var i=r;return i&&i.kind==="rename"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||At.is(i.annotationId))}e.is=n})(uo||(uo={}));var lo;(function(e){function t(r,i,s){var o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),s!==void 0&&(o.annotationId=s),o}e.create=t;function n(r){var i=r;return i&&i.kind==="delete"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||At.is(i.annotationId))}e.is=n})(lo||(lo={}));var n1;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return R.string(i.kind)?ao.is(i)||uo.is(i)||lo.is(i):au.is(i)}))}e.is=t})(n1||(n1={}));var ru=function(){function e(t,n){this.edits=t,this.changeAnnotations=n}return e.prototype.insert=function(t,n,r){var i,s;if(r===void 0?i=jn.insert(t,n):At.is(r)?(s=r,i=hr.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=hr.insert(t,n,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,n,r){var i,s;if(r===void 0?i=jn.replace(t,n):At.is(r)?(s=r,i=hr.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=hr.replace(t,n,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,n){var r,i;if(n===void 0?r=jn.del(t):At.is(n)?(i=n,r=hr.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=hr.del(t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),a0=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,n){var r;if(At.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error("Id ".concat(r," is already in use."));if(n===void 0)throw new Error("No annotation provided for id ".concat(r));return this._annotations[r]=n,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),UC=function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new a0(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(au.is(r)){var i=new ru(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new ru(t.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(uu.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){var i=[],s={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(s),r=new ru(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new ru(i),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new a0,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Xi.is(n)||At.is(n)?i=n:r=n;var s,o;if(i===void 0?s=ao.create(t,r):(o=At.is(i)?i:this._changeAnnotations.manage(i),s=ao.create(t,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},e.prototype.renameFile=function(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Xi.is(r)||At.is(r)?s=r:i=r;var o,a;if(s===void 0?o=uo.create(t,n,i):(a=At.is(s)?s:this._changeAnnotations.manage(s),o=uo.create(t,n,i,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},e.prototype.deleteFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Xi.is(n)||At.is(n)?i=n:r=n;var s,o;if(i===void 0?s=lo.create(t,r):(o=At.is(i)?i:this._changeAnnotations.manage(i),s=lo.create(t,r,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},e}();var u0;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return R.defined(i)&&R.string(i.uri)}e.is=n})(u0||(u0={}));var l0;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}e.is=n})(l0||(l0={}));var uu;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}e.is=n})(uu||(uu={}));var c0;(function(e){function t(r,i,s,o){return{uri:r,languageId:i,version:s,text:o}}e.create=t;function n(r){var i=r;return R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}e.is=n})(c0||(c0={}));var r1;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(r1||(r1={}));var co;(function(e){function t(n){var r=n;return R.objectLiteral(n)&&r1.is(r.kind)&&R.string(r.value)}e.is=t})(co||(co={}));var f0;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(f0||(f0={}));var mr;(function(e){e.PlainText=1,e.Snippet=2})(mr||(mr={}));var d0;(function(e){e.Deprecated=1})(d0||(d0={}));var p0;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){var i=r;return i&&R.string(i.newText)&&tt.is(i.insert)&&tt.is(i.replace)}e.is=n})(p0||(p0={}));var gr;(function(e){e.asIs=1,e.adjustIndentation=2})(gr||(gr={}));var h0;(function(e){function t(n){var r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}e.is=t})(h0||(h0={}));var m0;(function(e){function t(n){return{label:n}}e.create=t})(m0||(m0={}));var g0;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(g0||(g0={}));var lu;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}e.is=n})(lu||(lu={}));var D0;(function(e){function t(n){var r=n;return!!r&&R.objectLiteral(r)&&(co.is(r.contents)||lu.is(r.contents)||R.typedArray(r.contents,lu.is))&&(n.range===void 0||tt.is(n.range))}e.is=t})(D0||(D0={}));var v0;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(v0||(v0={}));var b0;(function(e){function t(n,r){for(var i=[],s=2;s=0;c--){var d=u[c],h=s.offsetAt(d.range.start),m=s.offsetAt(d.range.end);if(m<=l)a=a.substring(0,h)+d.newText+a.substring(m,a.length);else throw new Error("Overlapping edit");l=h}return a}e.applyEdits=r;function i(s,o){if(s.length<=1)return s;var a=s.length/2|0,u=s.slice(0,a),l=s.slice(a);i(u,o),i(l,o);for(var c=0,d=0,h=0;c0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ln.create(0,t);for(;rt?i=s:r=s+1}var o=r-1;return ln.create(o,t-n[o])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1"u"}e.undefined=r;function i(m){return m===!0||m===!1}e.boolean=i;function s(m){return t.call(m)==="[object String]"}e.string=s;function o(m){return t.call(m)==="[object Number]"}e.number=o;function a(m,g,v){return t.call(m)==="[object Number]"&&g<=m&&m<=v}e.numberRange=a;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}e.integer=u;function l(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}e.uinteger=l;function c(m){return t.call(m)==="[object Function]"}e.func=c;function d(m){return m!==null&&typeof m=="object"}e.objectLiteral=d;function h(m,g){return Array.isArray(m)&&m.every(g)}e.typedArray=h})(R||(R={}));var Nn=class{constructor(t){this._start=0,this._pos=0,this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>this._pos===0,this.peek=()=>this._sourceText.charAt(this._pos)||null,this.next=()=>{let n=this._sourceText.charAt(this._pos);return this._pos++,n},this.eat=n=>{if(this._testNextCharacter(n))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=n=>{let r=this._testNextCharacter(n),i=!1;for(r&&(i=r,this._start=this._pos);r;)this._pos++,r=this._testNextCharacter(n),i=!0;return i},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=n=>{this._pos=n},this.match=(n,r=!0,i=!1)=>{let s=null,o=null;return typeof n=="string"?(o=new RegExp(n,i?"i":"g").test(this._sourceText.slice(this._pos,this._pos+n.length)),s=n):n instanceof RegExp&&(o=this._sourceText.slice(this._pos).match(n),s=o?.[0]),o!=null&&(typeof n=="string"||o instanceof Array&&this._sourceText.startsWith(o[0],this._pos))?(r&&(this._start=this._pos,s&&s.length&&(this._pos+=s.length)),o):!1},this.backUp=n=>{this._pos-=n},this.column=()=>this._pos,this.indentation=()=>{let n=this._sourceText.match(/\s*/),r=0;if(n&&n.length!==0){let i=n[0],s=0;for(;i.length>s;)i.charCodeAt(s)===9?r+=2:r++,s++}return r},this.current=()=>this._sourceText.slice(this._start,this._pos),this._sourceText=t}_testNextCharacter(t){let n=this._sourceText.charAt(this._pos),r=!1;return typeof t=="string"?r=n===t:r=t instanceof RegExp?t.test(n):t(n),r}};function qe(e){return{ofRule:e}}function xe(e,t){return{ofRule:e,isList:!0,separator:t}}function o1(e,t){let n=e.match;return e.match=r=>{let i=!1;return n&&(i=n(r)),i&&t.every(s=>s.match&&!s.match(r))},e}function Zi(e,t){return{style:t,match:n=>n.kind===e}}function le(e,t){return{style:t||"punctuation",match:n=>n.kind==="Punctuation"&&n.value===e}}var fu=e=>e===" "||e===" "||e===","||e===` +`||e==="\r"||e==="\uFEFF"||e==="\xA0",du={Name:/^[_A-Za-z][_0-9A-Za-z]*/,Punctuation:/^(?:!|\$|\(|\)|\.\.\.|:|=|&|@|\[|]|\{|\||\})/,Number:/^-?(?:0|(?:[1-9][0-9]*))(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?/,String:/^(?:"""(?:\\"""|[^"]|"[^"]|""[^"])*(?:""")?|"(?:[^"\\]|\\(?:"|\/|\\|b|f|n|r|t|u[0-9a-fA-F]{4}))*"?)/,Comment:/^#.*/},pu={Document:[xe("Definition")],Definition(e){switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return E.FRAGMENT_DEFINITION;case"schema":return"SchemaDef";case"scalar":return"ScalarDef";case"type":return"ObjectTypeDef";case"interface":return"InterfaceDef";case"union":return"UnionDef";case"enum":return"EnumDef";case"input":return"InputDef";case"extend":return"ExtendDef";case"directive":return"DirectiveDef"}},ShortQuery:["SelectionSet"],Query:[Et("query"),qe(Ue("def")),qe("VariableDefinitions"),xe("Directive"),"SelectionSet"],Mutation:[Et("mutation"),qe(Ue("def")),qe("VariableDefinitions"),xe("Directive"),"SelectionSet"],Subscription:[Et("subscription"),qe(Ue("def")),qe("VariableDefinitions"),xe("Directive"),"SelectionSet"],VariableDefinitions:[le("("),xe("VariableDefinition"),le(")")],VariableDefinition:["Variable",le(":"),"Type",qe("DefaultValue")],Variable:[le("$","variable"),Ue("variable")],DefaultValue:[le("="),"Value"],SelectionSet:[le("{"),xe("Selection"),le("}")],Selection(e,t){return e.value==="..."?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?"InlineFragment":"FragmentSpread":t.match(/[\s\u00a0,]*:/,!1)?"AliasedField":"Field"},AliasedField:[Ue("property"),le(":"),Ue("qualifier"),qe("Arguments"),xe("Directive"),qe("SelectionSet")],Field:[Ue("property"),qe("Arguments"),xe("Directive"),qe("SelectionSet")],Arguments:[le("("),xe("Argument"),le(")")],Argument:[Ue("attribute"),le(":"),"Value"],FragmentSpread:[le("..."),Ue("def"),xe("Directive")],InlineFragment:[le("..."),qe("TypeCondition"),xe("Directive"),"SelectionSet"],FragmentDefinition:[Et("fragment"),qe(o1(Ue("def"),[Et("on")])),"TypeCondition",xe("Directive"),"SelectionSet"],TypeCondition:[Et("on"),"NamedType"],Value(e){switch(e.kind){case"Number":return"NumberValue";case"String":return"StringValue";case"Punctuation":switch(e.value){case"[":return"ListValue";case"{":return"ObjectValue";case"$":return"Variable";case"&":return"NamedType"}return null;case"Name":switch(e.value){case"true":case"false":return"BooleanValue"}return e.value==="null"?"NullValue":"EnumValue"}},NumberValue:[Zi("Number","number")],StringValue:[{style:"string",match:e=>e.kind==="String",update(e,t){t.value.startsWith('"""')&&(e.inBlockstring=!t.value.slice(3).endsWith('"""'))}}],BooleanValue:[Zi("Name","builtin")],NullValue:[Zi("Name","keyword")],EnumValue:[Ue("string-2")],ListValue:[le("["),xe("Value"),le("]")],ObjectValue:[le("{"),xe("ObjectField"),le("}")],ObjectField:[Ue("attribute"),le(":"),"Value"],Type(e){return e.value==="["?"ListType":"NonNullType"},ListType:[le("["),"Type",le("]"),qe(le("!"))],NonNullType:["NamedType",qe(le("!"))],NamedType:[N9("atom")],Directive:[le("@","meta"),Ue("meta"),qe("Arguments")],DirectiveDef:[Et("directive"),le("@","meta"),Ue("meta"),qe("ArgumentsDef"),Et("on"),xe("DirectiveLocation",le("|"))],InterfaceDef:[Et("interface"),Ue("atom"),qe("Implements"),xe("Directive"),le("{"),xe("FieldDef"),le("}")],Implements:[Et("implements"),xe("NamedType",le("&"))],DirectiveLocation:[Ue("string-2")],SchemaDef:[Et("schema"),xe("Directive"),le("{"),xe("OperationTypeDef"),le("}")],OperationTypeDef:[Ue("keyword"),le(":"),Ue("atom")],ScalarDef:[Et("scalar"),Ue("atom"),xe("Directive")],ObjectTypeDef:[Et("type"),Ue("atom"),qe("Implements"),xe("Directive"),le("{"),xe("FieldDef"),le("}")],FieldDef:[Ue("property"),qe("ArgumentsDef"),le(":"),"Type",xe("Directive")],ArgumentsDef:[le("("),xe("InputValueDef"),le(")")],InputValueDef:[Ue("attribute"),le(":"),"Type",qe("DefaultValue"),xe("Directive")],UnionDef:[Et("union"),Ue("atom"),xe("Directive"),le("="),xe("UnionMember",le("|"))],UnionMember:["NamedType"],EnumDef:[Et("enum"),Ue("atom"),xe("Directive"),le("{"),xe("EnumValueDef"),le("}")],EnumValueDef:[Ue("string-2"),xe("Directive")],InputDef:[Et("input"),Ue("atom"),xe("Directive"),le("{"),xe("InputValueDef"),le("}")],ExtendDef:[Et("extend"),"ExtensionDefinition"],ExtensionDefinition(e){switch(e.value){case"schema":return E.SCHEMA_EXTENSION;case"scalar":return E.SCALAR_TYPE_EXTENSION;case"type":return E.OBJECT_TYPE_EXTENSION;case"interface":return E.INTERFACE_TYPE_EXTENSION;case"union":return E.UNION_TYPE_EXTENSION;case"enum":return E.ENUM_TYPE_EXTENSION;case"input":return E.INPUT_OBJECT_TYPE_EXTENSION}},[E.SCHEMA_EXTENSION]:["SchemaDef"],[E.SCALAR_TYPE_EXTENSION]:["ScalarDef"],[E.OBJECT_TYPE_EXTENSION]:["ObjectTypeDef"],[E.INTERFACE_TYPE_EXTENSION]:["InterfaceDef"],[E.UNION_TYPE_EXTENSION]:["UnionDef"],[E.ENUM_TYPE_EXTENSION]:["EnumDef"],[E.INPUT_OBJECT_TYPE_EXTENSION]:["InputDef"]};function Et(e){return{style:"keyword",match:t=>t.kind==="Name"&&t.value===e}}function Ue(e){return{style:e,match:t=>t.kind==="Name",update(t,n){t.name=n.value}}}function N9(e){return{style:e,match:t=>t.kind==="Name",update(t,n){var r;!((r=t.prevState)===null||r===void 0)&&r.prevState&&(t.name=n.value,t.prevState.prevState.type=n.value)}}}function jr(e={eatWhitespace:t=>t.eatWhile(fu),lexRules:du,parseRules:pu,editorConfig:{}}){return{startState(){let t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return fo(e.parseRules,t,E.DOCUMENT),t},token(t,n){return T9(t,n,e)}}}function T9(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");let{lexRules:i,parseRules:s,eatWhitespace:o,editorConfig:a}=n;if(t.rule&&t.rule.length===0?l1(t):t.needsAdvance&&(t.needsAdvance=!1,u1(t,!0)),e.sol()){let c=a?.tabSize||2;t.indentLevel=Math.floor(e.indentation()/c)}if(o(e))return"ws";let u=A9(i,e);if(!u)return e.match(/\S+/)||e.match(/\s/),fo(a1,t,"Invalid"),"invalidchar";if(u.kind==="Comment")return fo(a1,t,"Comment"),"comment";let l=G0({},t);if(u.kind==="Punctuation"){if(/^[{([]/.test(u.value))t.indentLevel!==void 0&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(u.value)){let c=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&c.length>0&&c.at(-1){let t=tn.UNKNOWN;if(e)try{ht(Kt(e),{enter(n){if(n.kind==="Document"){t=tn.EXECUTABLE;return}return F9.includes(n.kind)?(t=tn.TYPE_SYSTEM,Bn):!1}})}catch{return t}return t};function W0(e,t){return t?.endsWith(".graphqls")?tn.TYPE_SYSTEM:w9(e)}function c1(e,t,n=0){let r=null,i=null,s=null,o=es(e,(a,u,l,c)=>{if(!(c!==t.line||a.getCurrentPosition()+n=0;i--)t(n[i])}function mu(e){let t;return Q0(e,n=>{switch(n.kind){case"Query":case"ShortQuery":case"Mutation":case"Subscription":case"FragmentDefinition":t=n;break}}),t}function ho(e,t){let n,r,i,s,o,a,u,l,c,d,h;return Q0(t,m=>{var g;switch(m.kind){case W.QUERY:case"ShortQuery":d=e.getQueryType();break;case W.MUTATION:d=e.getMutationType();break;case W.SUBSCRIPTION:d=e.getSubscriptionType();break;case W.INLINE_FRAGMENT:case W.FRAGMENT_DEFINITION:m.type&&(d=e.getType(m.type));break;case W.FIELD:case W.ALIASED_FIELD:{!d||!m.name?o=null:(o=c?hu(e,c,m.name):null,d=o?o.type:null);break}case W.SELECTION_SET:c=we(d);break;case W.DIRECTIVE:i=m.name?e.getDirective(m.name):null;break;case W.INTERFACE_DEF:m.name&&(u=null,h=new St({name:m.name,interfaces:[],fields:{}}));break;case W.OBJECT_TYPE_DEF:m.name&&(h=null,u=new Ke({name:m.name,interfaces:[],fields:{}}));break;case W.ARGUMENTS:{if(m.prevState)switch(m.prevState.kind){case W.FIELD:r=o&&o.args;break;case W.DIRECTIVE:r=i&&i.args;break;case W.ALIASED_FIELD:{let C=(g=m.prevState)===null||g===void 0?void 0:g.name;if(!C){r=null;break}let S=c?hu(e,c,C):null;if(!S){r=null;break}r=S.args;break}default:r=null;break}else r=null;break}case W.ARGUMENT:if(r){for(let C=0;CC.value===m.name):null;break;case W.LIST_VALUE:let N=fr(a);a=N instanceof Me?N.ofType:null;break;case W.OBJECT_VALUE:let _=we(a);l=_ instanceof Zt?_.getFields():null;break;case W.OBJECT_FIELD:let w=m.name&&l?l[m.name]:null;a=w?.type,o=w,d=o?o.type:null;break;case W.NAMED_TYPE:m.name&&(d=e.getType(m.name));break}}),{argDef:n,argDefs:r,directiveDef:i,enumValue:s,fieldDef:o,inputType:a,objectFieldDefs:l,parentType:c,type:d,interfaceDef:h,objectTypeDef:u}}var L9={ALIASED_FIELD:"AliasedField",ARGUMENTS:"Arguments",SHORT_QUERY:"ShortQuery",QUERY:"Query",MUTATION:"Mutation",SUBSCRIPTION:"Subscription",TYPE_CONDITION:"TypeCondition",INVALID:"Invalid",COMMENT:"Comment",SCHEMA_DEF:"SchemaDef",SCALAR_DEF:"ScalarDef",OBJECT_TYPE_DEF:"ObjectTypeDef",OBJECT_VALUE:"ObjectValue",LIST_VALUE:"ListValue",INTERFACE_DEF:"InterfaceDef",UNION_DEF:"UnionDef",ENUM_DEF:"EnumDef",ENUM_VALUE:"EnumValue",FIELD_DEF:"FieldDef",INPUT_DEF:"InputDef",INPUT_VALUE_DEF:"InputValueDef",ARGUMENTS_DEF:"ArgumentsDef",EXTEND_DEF:"ExtendDef",EXTENSION_DEFINITION:"ExtensionDefinition",DIRECTIVE_DEF:"DirectiveDef",IMPLEMENTS:"Implements",VARIABLE_DEFINITIONS:"VariableDefinitions",TYPE:"Type",VARIABLE:"Variable"},W=Object.assign(Object.assign({},E),L9);var ve;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ve||(ve={}));var gu={command:"editor.action.triggerSuggest",title:"Suggestions"},C9=e=>{let t=[];if(e)try{ht(Kt(e),{FragmentDefinition(n){t.push(n)}})}catch{return[]}return t};function f1(e,t,n,r,i,s){var o;let a=Object.assign(Object.assign({},s),{schema:e}),u=po(t,n,e,r,s);if(!u)return[];let{state:l,typeInfo:c,mode:d,token:h}=u,{kind:m,step:g,prevState:v}=l;if(m===W.DOCUMENT)return d===tn.TYPE_SYSTEM?I9(h):d===tn.EXECUTABLE?R9(h):k9(h);if(m===W.EXTEND_DEF)return O9(h);if(((o=v?.prevState)===null||o===void 0?void 0:o.kind)===W.EXTENSION_DEFINITION&&l.name)return Ve(h,[]);if(v?.kind===E.SCALAR_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(ct).map(_=>({label:_.name,kind:ve.Function})));if(v?.kind===E.OBJECT_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(_=>me(_)&&!_.name.startsWith("__")).map(_=>({label:_.name,kind:ve.Function})));if(v?.kind===E.INTERFACE_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(De).map(_=>({label:_.name,kind:ve.Function})));if(v?.kind===E.UNION_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(Ze).map(_=>({label:_.name,kind:ve.Function})));if(v?.kind===E.ENUM_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(_=>Be(_)&&!_.name.startsWith("__")).map(_=>({label:_.name,kind:ve.Function})));if(v?.kind===E.INPUT_OBJECT_TYPE_EXTENSION)return Ve(h,Object.values(e.getTypeMap()).filter(be).map(_=>({label:_.name,kind:ve.Function})));if(m===W.IMPLEMENTS||m===W.NAMED_TYPE&&v?.kind===W.IMPLEMENTS)return B9(h,l,e,t,c);if(m===W.SELECTION_SET||m===W.FIELD||m===W.ALIASED_FIELD)return M9(h,c,a);if(m===W.ARGUMENTS||m===W.ARGUMENT&&g===0){let{argDefs:_}=c;if(_)return Ve(h,_.map(w=>{var C;return{label:w.name,insertText:Kc(w.name+": ",w.type),insertTextMode:gr.adjustIndentation,insertTextFormat:mr.Snippet,command:gu,labelDetails:{detail:" "+String(w.type)},documentation:(C=w.description)!==null&&C!==void 0?C:void 0,kind:ve.Variable,type:w.type}}))}if((m===W.OBJECT_VALUE||m===W.OBJECT_FIELD&&g===0)&&c.objectFieldDefs){let _=pr(c.objectFieldDefs),w=m===W.OBJECT_VALUE?ve.Value:ve.Field;return Ve(h,_.map(C=>{var S;return{label:C.name,detail:String(C.type),documentation:(S=C?.description)!==null&&S!==void 0?S:void 0,kind:w,type:C.type,insertText:Kc(C.name+": ",C.type),insertTextMode:gr.adjustIndentation,insertTextFormat:mr.Snippet,command:gu}}))}if(m===W.ENUM_VALUE||m===W.LIST_VALUE&&g===1||m===W.OBJECT_FIELD&&g===2||m===W.ARGUMENT&&g===2)return P9(h,c,t,e);if(m===W.VARIABLE&&g===1){let _=we(c.inputType),w=p1(t,e,h);return Ve(h,w.filter(C=>C.detail===_?.name))}if(m===W.TYPE_CONDITION&&g===1||m===W.NAMED_TYPE&&v!=null&&v.kind===W.TYPE_CONDITION)return V9(h,c,e,m);if(m===W.FRAGMENT_SPREAD&&g===1)return U9(h,c,e,t,Array.isArray(i)?i:C9(i));let N=X0(l);return N.kind===W.FIELD_DEF?Ve(h,Object.values(e.getTypeMap()).filter(_=>Ht(_)&&!_.name.startsWith("__")).map(_=>({label:_.name,kind:ve.Function,insertText:s?.fillLeafsOnComplete?_.name+` +`:_.name,insertTextMode:gr.adjustIndentation}))):N.kind===W.INPUT_VALUE_DEF&&g===2?Ve(h,Object.values(e.getTypeMap()).filter(_=>et(_)&&!_.name.startsWith("__")).map(_=>({label:_.name,kind:ve.Function,insertText:s?.fillLeafsOnComplete?_.name+` +$1`:_.name,insertTextMode:gr.adjustIndentation,insertTextFormat:mr.Snippet}))):m===W.VARIABLE_DEFINITION&&g===2||m===W.LIST_TYPE&&g===1||m===W.NAMED_TYPE&&v&&(v.kind===W.VARIABLE_DEFINITION||v.kind===W.LIST_TYPE||v.kind===W.NON_NULL_TYPE)?j9(h,e,m):m===W.DIRECTIVE?q9(h,l,e,m):m===W.DIRECTIVE_DEF?G9(h,l,e,m):[]}var d1=[{label:"type",kind:ve.Function},{label:"interface",kind:ve.Function},{label:"union",kind:ve.Function},{label:"input",kind:ve.Function},{label:"scalar",kind:ve.Function},{label:"schema",kind:ve.Function}],z0=[{label:"query",kind:ve.Function},{label:"mutation",kind:ve.Function},{label:"subscription",kind:ve.Function},{label:"fragment",kind:ve.Function},{label:"{",kind:ve.Constructor}];function I9(e){return Ve(e,[{label:"extend",kind:ve.Function},...d1])}function R9(e){return Ve(e,z0)}function k9(e){return Ve(e,[{label:"extend",kind:ve.Function},...z0,...d1])}function O9(e){return Ve(e,d1)}function M9(e,t,n){var r;if(t.parentType){let{parentType:i}=t,s=[];return"getFields"in i&&(s=pr(i.getFields())),at(i)&&s.push(xn),i===((r=n?.schema)===null||r===void 0?void 0:r.getQueryType())&&s.push(En,yn),Ve(e,s.map((o,a)=>{var u;let l={sortText:String(a)+o.name,label:o.name,detail:String(o.type),documentation:(u=o.description)!==null&&u!==void 0?u:void 0,deprecated:!!o.deprecationReason,isDeprecated:!!o.deprecationReason,deprecationReason:o.deprecationReason,kind:ve.Field,labelDetails:{detail:" "+o.type.toString()},type:o.type};return n?.fillLeafsOnComplete&&(l.insertText=Jh(o),l.insertText||(l.insertText=oo(o.name,o.type,o.name+(e.state.needsAdvance?"":` +`))),l.insertText&&(l.insertTextFormat=mr.Snippet,l.insertTextMode=gr.adjustIndentation,l.command=gu)),l}))}return[]}function P9(e,t,n,r){let i=we(t.inputType),s=p1(n,r,e).filter(o=>o.detail===i?.name);if(i instanceof bt){let o=i.getValues();return Ve(e,o.map(a=>{var u;return{label:a.name,detail:String(i),documentation:(u=a.description)!==null&&u!==void 0?u:void 0,deprecated:!!a.deprecationReason,isDeprecated:!!a.deprecationReason,deprecationReason:a.deprecationReason,kind:ve.EnumMember,type:i}}).concat(s))}return i===He?Ve(e,s.concat([{label:"true",detail:String(He),documentation:"Not false.",kind:ve.Variable,type:He},{label:"false",detail:String(He),documentation:"Not true.",kind:ve.Variable,type:He}])):s}function B9(e,t,n,r,i){if(t.needsSeparator)return[];let s=n.getTypeMap(),o=pr(s).filter(De),a=o.map(({name:m})=>m),u=new Set;es(r,(m,g)=>{var v,N,_,w,C;if(g.name&&(g.kind===W.INTERFACE_DEF&&!a.includes(g.name)&&u.add(g.name),g.kind===W.NAMED_TYPE&&((v=g.prevState)===null||v===void 0?void 0:v.kind)===W.IMPLEMENTS)){if(i.interfaceDef){if((N=i.interfaceDef)===null||N===void 0?void 0:N.getInterfaces().find(({name:I})=>I===g.name))return;let k=n.getType(g.name),M=(_=i.interfaceDef)===null||_===void 0?void 0:_.toConfig();i.interfaceDef=new St(Object.assign(Object.assign({},M),{interfaces:[...M.interfaces,k||new St({name:g.name,fields:{}})]}))}else if(i.objectTypeDef){if((w=i.objectTypeDef)===null||w===void 0?void 0:w.getInterfaces().find(({name:I})=>I===g.name))return;let k=n.getType(g.name),M=(C=i.objectTypeDef)===null||C===void 0?void 0:C.toConfig();i.objectTypeDef=new Ke(Object.assign(Object.assign({},M),{interfaces:[...M.interfaces,k||new St({name:g.name,fields:{}})]}))}}});let l=i.interfaceDef||i.objectTypeDef,d=(l?.getInterfaces()||[]).map(({name:m})=>m),h=o.concat([...u].map(m=>({name:m}))).filter(({name:m})=>m!==l?.name&&!d.includes(m));return Ve(e,h.map(m=>{let g={label:m.name,kind:ve.Interface,type:m};return m?.description&&(g.documentation=m.description),g}))}function V9(e,t,n,r){let i;if(t.parentType)if(mt(t.parentType)){let s=Ra(t.parentType),o=n.getPossibleTypes(s),a=Object.create(null);for(let u of o)for(let l of u.getInterfaces())a[l.name]=l;i=o.concat(pr(a))}else i=[t.parentType];else{let s=n.getTypeMap();i=pr(s).filter(o=>at(o)&&!o.name.startsWith("__"))}return Ve(e,i.map(s=>{let o=we(s);return{label:String(s),documentation:o?.description||"",kind:ve.Field}}))}function U9(e,t,n,r,i){if(!r)return[];let s=n.getTypeMap(),o=mu(e.state),a=Y0(r);i&&i.length>0&&a.push(...i);let u=a.filter(l=>s[l.typeCondition.name.value]&&!(o&&o.kind===W.FRAGMENT_DEFINITION&&o.name===l.name.value)&&at(t.parentType)&&at(s[l.typeCondition.name.value])&&Cr(n,t.parentType,s[l.typeCondition.name.value]));return Ve(e,u.map(l=>({label:l.name.value,detail:String(s[l.typeCondition.name.value]),documentation:`fragment ${l.name.value} on ${l.typeCondition.name.value}`,labelDetails:{detail:`fragment ${l.name.value} on ${l.typeCondition.name.value}`},kind:ve.Field,type:s[l.typeCondition.name.value]})))}var $9=(e,t)=>{var n,r,i,s,o,a,u,l,c,d;if(((n=e.prevState)===null||n===void 0?void 0:n.kind)===t)return e.prevState;if(((i=(r=e.prevState)===null||r===void 0?void 0:r.prevState)===null||i===void 0?void 0:i.kind)===t)return e.prevState.prevState;if(((a=(o=(s=e.prevState)===null||s===void 0?void 0:s.prevState)===null||o===void 0?void 0:o.prevState)===null||a===void 0?void 0:a.kind)===t)return e.prevState.prevState.prevState;if(((d=(c=(l=(u=e.prevState)===null||u===void 0?void 0:u.prevState)===null||l===void 0?void 0:l.prevState)===null||c===void 0?void 0:c.prevState)===null||d===void 0?void 0:d.kind)===t)return e.prevState.prevState.prevState.prevState};function p1(e,t,n){let r=null,i,s=Object.create({});return es(e,(o,a)=>{var u;if(a?.kind===W.VARIABLE&&a.name&&(r=a.name),a?.kind===W.NAMED_TYPE&&r){let l=$9(a,W.TYPE);l?.type&&(i=t.getType(l?.type))}if(r&&i&&!s[r]){let l=n.string==="$"||((u=n?.state)===null||u===void 0?void 0:u.kind)==="Variable"?r:"$"+r;s[r]={detail:i.toString(),insertText:l,label:"$"+r,rawInsert:l,type:i,kind:ve.Variable},r=null,i=null}}),pr(s)}function Y0(e){let t=[];return es(e,(n,r)=>{r.kind===W.FRAGMENT_DEFINITION&&r.name&&r.type&&t.push({kind:W.FRAGMENT_DEFINITION,name:{kind:E.NAME,value:r.name},selectionSet:{kind:W.SELECTION_SET,selections:[]},typeCondition:{kind:W.NAMED_TYPE,name:{kind:E.NAME,value:r.type}}})}),t}function j9(e,t,n){let r=t.getTypeMap(),i=pr(r).filter(et);return Ve(e,i.map(s=>({label:s.name,documentation:s?.description||"",kind:ve.Variable})))}function q9(e,t,n,r){var i;if(!((i=t.prevState)===null||i===void 0)&&i.kind){let s=n.getDirectives().filter(o=>J0(t.prevState,o));return Ve(e,s.map(o=>({label:o.name,documentation:o?.description||"",kind:ve.Function})))}return[]}function G9(e,t,n,r){let i=n.getDirectives().find(s=>s.name===t.name);return Ve(e,i?.args.map(s=>({label:s.name,documentation:s.description||"",kind:ve.Field}))||[])}function J0(e,t){if(!e?.kind)return!1;let{kind:n,prevState:r}=e,{locations:i}=t;switch(n){case W.QUERY:return i.includes(K.QUERY);case W.MUTATION:return i.includes(K.MUTATION);case W.SUBSCRIPTION:return i.includes(K.SUBSCRIPTION);case W.FIELD:case W.ALIASED_FIELD:return i.includes(K.FIELD);case W.FRAGMENT_DEFINITION:return i.includes(K.FRAGMENT_DEFINITION);case W.FRAGMENT_SPREAD:return i.includes(K.FRAGMENT_SPREAD);case W.INLINE_FRAGMENT:return i.includes(K.INLINE_FRAGMENT);case W.SCHEMA_DEF:return i.includes(K.SCHEMA);case W.SCALAR_DEF:return i.includes(K.SCALAR);case W.OBJECT_TYPE_DEF:return i.includes(K.OBJECT);case W.FIELD_DEF:return i.includes(K.FIELD_DEFINITION);case W.INTERFACE_DEF:return i.includes(K.INTERFACE);case W.UNION_DEF:return i.includes(K.UNION);case W.ENUM_DEF:return i.includes(K.ENUM);case W.ENUM_VALUE:return i.includes(K.ENUM_VALUE);case W.INPUT_DEF:return i.includes(K.INPUT_OBJECT);case W.INPUT_VALUE_DEF:switch(r?.kind){case W.ARGUMENTS_DEF:return i.includes(K.ARGUMENT_DEFINITION);case W.INPUT_DEF:return i.includes(K.INPUT_FIELD_DEFINITION)}}return!1}function X0(e){return e.prevState&&e.kind&&[W.NAMED_TYPE,W.LIST_TYPE,W.TYPE,W.NON_NULL_TYPE].includes(e.kind)?X0(e.prevState):e}var H9=Xu(Z0());function It(e,t){e.push(t)}function h1(e,t){ce(t)?(h1(e,t.ofType),It(e,"!")):Fe(t)?(It(e,"["),h1(e,t.ofType),It(e,"]")):It(e,t.name)}function vu(e,t,n){let r=[],i="type"in e?e.type:e;return"type"in e&&e.description&&(It(r,e.description),It(r,` - ) - l1(e), - e.rule && - (H0(e) - ? !((n = e.rule) === null || n === void 0) && - n[e.step].separator && - (e.needsSeparator = !e.needsSeparator) - : ((e.needsSeparator = !1), e.step++)) - } - function H0(e) { - let t = Array.isArray(e.rule) && typeof e.rule[e.step] != 'string' && e.rule[e.step] - return t && t.isList - } - function S9(e) { - for (; e.rule && !(Array.isArray(e.rule) && e.rule[e.step].ofRule); ) l1(e) - e.rule && u1(e, !1) - } - function A9(e, t) { - let n = Object.keys(e) - for (let r = 0; r < n.length; r++) { - let i = t.match(e[n[r]]) - if (i && i instanceof Array) return { kind: n[r], value: i[0] } - } - } - function es(e, t) { - let n = e.split(` -`), - r = jr(), - i = r.startState(), - s = '', - o = new Nn('') - for (let a = 0; a < n.length; a++) { - for (o = new Nn(n[a]); !o.eol() && ((s = r.token(o, i)), t(o, i, s, a) !== 'BREAK'); ); - t(o, i, s, a), i.kind || (i = r.startState()) - } - return { - start: o.getStartOfToken(), - end: o.getCurrentPosition(), - string: o.current(), - state: i, - style: s - } - } - var tn - ;(function (e) { - ;(e.TYPE_SYSTEM = 'TYPE_SYSTEM'), (e.EXECUTABLE = 'EXECUTABLE'), (e.UNKNOWN = 'UNKNOWN') - })(tn || (tn = {})) - var F9 = [ - E.SCHEMA_DEFINITION, - E.OPERATION_TYPE_DEFINITION, - E.SCALAR_TYPE_DEFINITION, - E.OBJECT_TYPE_DEFINITION, - E.INTERFACE_TYPE_DEFINITION, - E.UNION_TYPE_DEFINITION, - E.ENUM_TYPE_DEFINITION, - E.INPUT_OBJECT_TYPE_DEFINITION, - E.DIRECTIVE_DEFINITION, - E.SCHEMA_EXTENSION, - E.SCALAR_TYPE_EXTENSION, - E.OBJECT_TYPE_EXTENSION, - E.INTERFACE_TYPE_EXTENSION, - E.UNION_TYPE_EXTENSION, - E.ENUM_TYPE_EXTENSION, - E.INPUT_OBJECT_TYPE_EXTENSION - ], - w9 = (e) => { - let t = tn.UNKNOWN - if (e) - try { - ht(Kt(e), { - enter(n) { - if (n.kind === 'Document') { - t = tn.EXECUTABLE - return - } - return F9.includes(n.kind) ? ((t = tn.TYPE_SYSTEM), Bn) : !1 - } - }) - } catch { - return t - } - return t - } - function W0(e, t) { - return t?.endsWith('.graphqls') ? tn.TYPE_SYSTEM : w9(e) - } - function c1(e, t, n = 0) { - let r = null, - i = null, - s = null, - o = es(e, (a, u, l, c) => { - if (!(c !== t.line || a.getCurrentPosition() + n < t.character + 1)) - return (r = l), (i = Object.assign({}, u)), (s = a.current()), 'BREAK' - }) - return { - start: o.start, - end: o.end, - string: s || o.string, - state: i || o.state, - style: r || o.style - } - } - function po(e, t, n, r, i) { - let s = r || c1(e, t, 1) - if (!s) return null - let o = s.state.kind === 'Invalid' ? s.state.prevState : s.state - if (!o) return null - let a = ho(n, s.state), - u = i?.mode || W0(e, i?.uri) - return { token: s, state: o, typeInfo: a, mode: u } - } - function hu(e, t, n) { - return n === En.name && e.getQueryType() === t - ? En - : n === yn.name && e.getQueryType() === t - ? yn - : n === xn.name && at(t) - ? xn - : 'getFields' in t - ? t.getFields()[n] - : null - } - function Q0(e, t) { - let n = [], - r = e - for (; r?.kind; ) n.push(r), (r = r.prevState) - for (let i = n.length - 1; i >= 0; i--) t(n[i]) - } - function mu(e) { - let t - return ( - Q0(e, (n) => { - switch (n.kind) { - case 'Query': - case 'ShortQuery': - case 'Mutation': - case 'Subscription': - case 'FragmentDefinition': - t = n - break - } - }), - t - ) - } - function ho(e, t) { - let n, r, i, s, o, a, u, l, c, d, h - return ( - Q0(t, (m) => { - var g - switch (m.kind) { - case W.QUERY: - case 'ShortQuery': - d = e.getQueryType() - break - case W.MUTATION: - d = e.getMutationType() - break - case W.SUBSCRIPTION: - d = e.getSubscriptionType() - break - case W.INLINE_FRAGMENT: - case W.FRAGMENT_DEFINITION: - m.type && (d = e.getType(m.type)) - break - case W.FIELD: - case W.ALIASED_FIELD: { - !d || !m.name - ? (o = null) - : ((o = c ? hu(e, c, m.name) : null), (d = o ? o.type : null)) - break - } - case W.SELECTION_SET: - c = we(d) - break - case W.DIRECTIVE: - i = m.name ? e.getDirective(m.name) : null - break - case W.INTERFACE_DEF: - m.name && ((u = null), (h = new St({ name: m.name, interfaces: [], fields: {} }))) - break - case W.OBJECT_TYPE_DEF: - m.name && ((h = null), (u = new Ke({ name: m.name, interfaces: [], fields: {} }))) - break - case W.ARGUMENTS: { - if (m.prevState) - switch (m.prevState.kind) { - case W.FIELD: - r = o && o.args - break - case W.DIRECTIVE: - r = i && i.args - break - case W.ALIASED_FIELD: { - let C = (g = m.prevState) === null || g === void 0 ? void 0 : g.name - if (!C) { - r = null - break - } - let S = c ? hu(e, c, C) : null - if (!S) { - r = null - break - } - r = S.args - break - } - default: - r = null - break - } - else r = null - break - } - case W.ARGUMENT: - if (r) { - for (let C = 0; C < r.length; C++) - if (r[C].name === m.name) { - n = r[C] - break - } - } - a = n?.type - break - case W.VARIABLE_DEFINITION: - case W.VARIABLE: - d = a - break - case W.ENUM_VALUE: - let v = we(a) - s = v instanceof bt ? v.getValues().find((C) => C.value === m.name) : null - break - case W.LIST_VALUE: - let N = fr(a) - a = N instanceof Me ? N.ofType : null - break - case W.OBJECT_VALUE: - let _ = we(a) - l = _ instanceof Zt ? _.getFields() : null - break - case W.OBJECT_FIELD: - let w = m.name && l ? l[m.name] : null - ;(a = w?.type), (o = w), (d = o ? o.type : null) - break - case W.NAMED_TYPE: - m.name && (d = e.getType(m.name)) - break - } - }), - { - argDef: n, - argDefs: r, - directiveDef: i, - enumValue: s, - fieldDef: o, - inputType: a, - objectFieldDefs: l, - parentType: c, - type: d, - interfaceDef: h, - objectTypeDef: u - } - ) - } - var L9 = { - ALIASED_FIELD: 'AliasedField', - ARGUMENTS: 'Arguments', - SHORT_QUERY: 'ShortQuery', - QUERY: 'Query', - MUTATION: 'Mutation', - SUBSCRIPTION: 'Subscription', - TYPE_CONDITION: 'TypeCondition', - INVALID: 'Invalid', - COMMENT: 'Comment', - SCHEMA_DEF: 'SchemaDef', - SCALAR_DEF: 'ScalarDef', - OBJECT_TYPE_DEF: 'ObjectTypeDef', - OBJECT_VALUE: 'ObjectValue', - LIST_VALUE: 'ListValue', - INTERFACE_DEF: 'InterfaceDef', - UNION_DEF: 'UnionDef', - ENUM_DEF: 'EnumDef', - ENUM_VALUE: 'EnumValue', - FIELD_DEF: 'FieldDef', - INPUT_DEF: 'InputDef', - INPUT_VALUE_DEF: 'InputValueDef', - ARGUMENTS_DEF: 'ArgumentsDef', - EXTEND_DEF: 'ExtendDef', - EXTENSION_DEFINITION: 'ExtensionDefinition', - DIRECTIVE_DEF: 'DirectiveDef', - IMPLEMENTS: 'Implements', - VARIABLE_DEFINITIONS: 'VariableDefinitions', - TYPE: 'Type', - VARIABLE: 'Variable' - }, - W = Object.assign(Object.assign({}, E), L9) - var ve - ;(function (e) { - ;(e.Text = 1), - (e.Method = 2), - (e.Function = 3), - (e.Constructor = 4), - (e.Field = 5), - (e.Variable = 6), - (e.Class = 7), - (e.Interface = 8), - (e.Module = 9), - (e.Property = 10), - (e.Unit = 11), - (e.Value = 12), - (e.Enum = 13), - (e.Keyword = 14), - (e.Snippet = 15), - (e.Color = 16), - (e.File = 17), - (e.Reference = 18), - (e.Folder = 19), - (e.EnumMember = 20), - (e.Constant = 21), - (e.Struct = 22), - (e.Event = 23), - (e.Operator = 24), - (e.TypeParameter = 25) - })(ve || (ve = {})) - var gu = { command: 'editor.action.triggerSuggest', title: 'Suggestions' }, - C9 = (e) => { - let t = [] - if (e) - try { - ht(Kt(e), { - FragmentDefinition(n) { - t.push(n) - } - }) - } catch { - return [] - } - return t - } - function f1(e, t, n, r, i, s) { - var o - let a = Object.assign(Object.assign({}, s), { schema: e }), - u = po(t, n, e, r, s) - if (!u) return [] - let { state: l, typeInfo: c, mode: d, token: h } = u, - { kind: m, step: g, prevState: v } = l - if (m === W.DOCUMENT) return d === tn.TYPE_SYSTEM ? I9(h) : d === tn.EXECUTABLE ? R9(h) : k9(h) - if (m === W.EXTEND_DEF) return O9(h) - if ( - ((o = v?.prevState) === null || o === void 0 ? void 0 : o.kind) === W.EXTENSION_DEFINITION && - l.name - ) - return Ve(h, []) - if (v?.kind === E.SCALAR_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter(ct) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (v?.kind === E.OBJECT_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter((_) => me(_) && !_.name.startsWith('__')) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (v?.kind === E.INTERFACE_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter(De) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (v?.kind === E.UNION_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter(Ze) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (v?.kind === E.ENUM_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter((_) => Be(_) && !_.name.startsWith('__')) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (v?.kind === E.INPUT_OBJECT_TYPE_EXTENSION) - return Ve( - h, - Object.values(e.getTypeMap()) - .filter(be) - .map((_) => ({ label: _.name, kind: ve.Function })) - ) - if (m === W.IMPLEMENTS || (m === W.NAMED_TYPE && v?.kind === W.IMPLEMENTS)) - return B9(h, l, e, t, c) - if (m === W.SELECTION_SET || m === W.FIELD || m === W.ALIASED_FIELD) return M9(h, c, a) - if (m === W.ARGUMENTS || (m === W.ARGUMENT && g === 0)) { - let { argDefs: _ } = c - if (_) - return Ve( - h, - _.map((w) => { - var C - return { - label: w.name, - insertText: Kc(w.name + ': ', w.type), - insertTextMode: gr.adjustIndentation, - insertTextFormat: mr.Snippet, - command: gu, - labelDetails: { detail: ' ' + String(w.type) }, - documentation: (C = w.description) !== null && C !== void 0 ? C : void 0, - kind: ve.Variable, - type: w.type - } - }) - ) - } - if ((m === W.OBJECT_VALUE || (m === W.OBJECT_FIELD && g === 0)) && c.objectFieldDefs) { - let _ = pr(c.objectFieldDefs), - w = m === W.OBJECT_VALUE ? ve.Value : ve.Field - return Ve( - h, - _.map((C) => { - var S - return { - label: C.name, - detail: String(C.type), - documentation: (S = C?.description) !== null && S !== void 0 ? S : void 0, - kind: w, - type: C.type, - insertText: Kc(C.name + ': ', C.type), - insertTextMode: gr.adjustIndentation, - insertTextFormat: mr.Snippet, - command: gu - } - }) - ) - } - if ( - m === W.ENUM_VALUE || - (m === W.LIST_VALUE && g === 1) || - (m === W.OBJECT_FIELD && g === 2) || - (m === W.ARGUMENT && g === 2) - ) - return P9(h, c, t, e) - if (m === W.VARIABLE && g === 1) { - let _ = we(c.inputType), - w = p1(t, e, h) - return Ve( - h, - w.filter((C) => C.detail === _?.name) - ) - } - if ( - (m === W.TYPE_CONDITION && g === 1) || - (m === W.NAMED_TYPE && v != null && v.kind === W.TYPE_CONDITION) - ) - return V9(h, c, e, m) - if (m === W.FRAGMENT_SPREAD && g === 1) return U9(h, c, e, t, Array.isArray(i) ? i : C9(i)) - let N = X0(l) - return N.kind === W.FIELD_DEF - ? Ve( - h, - Object.values(e.getTypeMap()) - .filter((_) => Ht(_) && !_.name.startsWith('__')) - .map((_) => ({ - label: _.name, - kind: ve.Function, - insertText: s?.fillLeafsOnComplete - ? _.name + - ` -` - : _.name, - insertTextMode: gr.adjustIndentation - })) - ) - : N.kind === W.INPUT_VALUE_DEF && g === 2 - ? Ve( - h, - Object.values(e.getTypeMap()) - .filter((_) => et(_) && !_.name.startsWith('__')) - .map((_) => ({ - label: _.name, - kind: ve.Function, - insertText: s?.fillLeafsOnComplete - ? _.name + - ` -$1` - : _.name, - insertTextMode: gr.adjustIndentation, - insertTextFormat: mr.Snippet - })) - ) - : (m === W.VARIABLE_DEFINITION && g === 2) || - (m === W.LIST_TYPE && g === 1) || - (m === W.NAMED_TYPE && - v && - (v.kind === W.VARIABLE_DEFINITION || - v.kind === W.LIST_TYPE || - v.kind === W.NON_NULL_TYPE)) - ? j9(h, e, m) - : m === W.DIRECTIVE - ? q9(h, l, e, m) - : m === W.DIRECTIVE_DEF - ? G9(h, l, e, m) - : [] - } - var d1 = [ - { label: 'type', kind: ve.Function }, - { label: 'interface', kind: ve.Function }, - { label: 'union', kind: ve.Function }, - { label: 'input', kind: ve.Function }, - { label: 'scalar', kind: ve.Function }, - { label: 'schema', kind: ve.Function } - ], - z0 = [ - { label: 'query', kind: ve.Function }, - { label: 'mutation', kind: ve.Function }, - { label: 'subscription', kind: ve.Function }, - { label: 'fragment', kind: ve.Function }, - { label: '{', kind: ve.Constructor } - ] - function I9(e) { - return Ve(e, [{ label: 'extend', kind: ve.Function }, ...d1]) - } - function R9(e) { - return Ve(e, z0) - } - function k9(e) { - return Ve(e, [{ label: 'extend', kind: ve.Function }, ...z0, ...d1]) - } - function O9(e) { - return Ve(e, d1) - } - function M9(e, t, n) { - var r - if (t.parentType) { - let { parentType: i } = t, - s = [] - return ( - 'getFields' in i && (s = pr(i.getFields())), - at(i) && s.push(xn), - i === ((r = n?.schema) === null || r === void 0 ? void 0 : r.getQueryType()) && - s.push(En, yn), - Ve( - e, - s.map((o, a) => { - var u - let l = { - sortText: String(a) + o.name, - label: o.name, - detail: String(o.type), - documentation: (u = o.description) !== null && u !== void 0 ? u : void 0, - deprecated: !!o.deprecationReason, - isDeprecated: !!o.deprecationReason, - deprecationReason: o.deprecationReason, - kind: ve.Field, - labelDetails: { detail: ' ' + o.type.toString() }, - type: o.type - } - return ( - n?.fillLeafsOnComplete && - ((l.insertText = Jh(o)), - l.insertText || - (l.insertText = oo( - o.name, - o.type, - o.name + - (e.state.needsAdvance - ? '' - : ` -`) - )), - l.insertText && - ((l.insertTextFormat = mr.Snippet), - (l.insertTextMode = gr.adjustIndentation), - (l.command = gu))), - l - ) - }) - ) - ) - } - return [] - } - function P9(e, t, n, r) { - let i = we(t.inputType), - s = p1(n, r, e).filter((o) => o.detail === i?.name) - if (i instanceof bt) { - let o = i.getValues() - return Ve( - e, - o - .map((a) => { - var u - return { - label: a.name, - detail: String(i), - documentation: (u = a.description) !== null && u !== void 0 ? u : void 0, - deprecated: !!a.deprecationReason, - isDeprecated: !!a.deprecationReason, - deprecationReason: a.deprecationReason, - kind: ve.EnumMember, - type: i - } - }) - .concat(s) - ) - } - return i === He - ? Ve( - e, - s.concat([ - { - label: 'true', - detail: String(He), - documentation: 'Not false.', - kind: ve.Variable, - type: He - }, - { - label: 'false', - detail: String(He), - documentation: 'Not true.', - kind: ve.Variable, - type: He - } - ]) - ) - : s - } - function B9(e, t, n, r, i) { - if (t.needsSeparator) return [] - let s = n.getTypeMap(), - o = pr(s).filter(De), - a = o.map(({ name: m }) => m), - u = new Set() - es(r, (m, g) => { - var v, N, _, w, C - if ( - g.name && - (g.kind === W.INTERFACE_DEF && !a.includes(g.name) && u.add(g.name), - g.kind === W.NAMED_TYPE && - ((v = g.prevState) === null || v === void 0 ? void 0 : v.kind) === W.IMPLEMENTS) - ) { - if (i.interfaceDef) { - if ( - (N = i.interfaceDef) === null || N === void 0 - ? void 0 - : N.getInterfaces().find(({ name: I }) => I === g.name) - ) - return - let k = n.getType(g.name), - M = (_ = i.interfaceDef) === null || _ === void 0 ? void 0 : _.toConfig() - i.interfaceDef = new St( - Object.assign(Object.assign({}, M), { - interfaces: [...M.interfaces, k || new St({ name: g.name, fields: {} })] - }) - ) - } else if (i.objectTypeDef) { - if ( - (w = i.objectTypeDef) === null || w === void 0 - ? void 0 - : w.getInterfaces().find(({ name: I }) => I === g.name) - ) - return - let k = n.getType(g.name), - M = (C = i.objectTypeDef) === null || C === void 0 ? void 0 : C.toConfig() - i.objectTypeDef = new Ke( - Object.assign(Object.assign({}, M), { - interfaces: [...M.interfaces, k || new St({ name: g.name, fields: {} })] - }) - ) - } - } - }) - let l = i.interfaceDef || i.objectTypeDef, - d = (l?.getInterfaces() || []).map(({ name: m }) => m), - h = o - .concat([...u].map((m) => ({ name: m }))) - .filter(({ name: m }) => m !== l?.name && !d.includes(m)) - return Ve( - e, - h.map((m) => { - let g = { label: m.name, kind: ve.Interface, type: m } - return m?.description && (g.documentation = m.description), g - }) - ) - } - function V9(e, t, n, r) { - let i - if (t.parentType) - if (mt(t.parentType)) { - let s = Ra(t.parentType), - o = n.getPossibleTypes(s), - a = Object.create(null) - for (let u of o) for (let l of u.getInterfaces()) a[l.name] = l - i = o.concat(pr(a)) - } else i = [t.parentType] - else { - let s = n.getTypeMap() - i = pr(s).filter((o) => at(o) && !o.name.startsWith('__')) - } - return Ve( - e, - i.map((s) => { - let o = we(s) - return { label: String(s), documentation: o?.description || '', kind: ve.Field } - }) - ) - } - function U9(e, t, n, r, i) { - if (!r) return [] - let s = n.getTypeMap(), - o = mu(e.state), - a = Y0(r) - i && i.length > 0 && a.push(...i) - let u = a.filter( - (l) => - s[l.typeCondition.name.value] && - !(o && o.kind === W.FRAGMENT_DEFINITION && o.name === l.name.value) && - at(t.parentType) && - at(s[l.typeCondition.name.value]) && - Cr(n, t.parentType, s[l.typeCondition.name.value]) - ) - return Ve( - e, - u.map((l) => ({ - label: l.name.value, - detail: String(s[l.typeCondition.name.value]), - documentation: `fragment ${l.name.value} on ${l.typeCondition.name.value}`, - labelDetails: { detail: `fragment ${l.name.value} on ${l.typeCondition.name.value}` }, - kind: ve.Field, - type: s[l.typeCondition.name.value] - })) - ) - } - var $9 = (e, t) => { - var n, r, i, s, o, a, u, l, c, d - if (((n = e.prevState) === null || n === void 0 ? void 0 : n.kind) === t) return e.prevState - if ( - ((i = (r = e.prevState) === null || r === void 0 ? void 0 : r.prevState) === null || - i === void 0 - ? void 0 - : i.kind) === t - ) - return e.prevState.prevState - if ( - ((a = - (o = (s = e.prevState) === null || s === void 0 ? void 0 : s.prevState) === null || - o === void 0 - ? void 0 - : o.prevState) === null || a === void 0 - ? void 0 - : a.kind) === t - ) - return e.prevState.prevState.prevState - if ( - ((d = - (c = - (l = (u = e.prevState) === null || u === void 0 ? void 0 : u.prevState) === null || - l === void 0 - ? void 0 - : l.prevState) === null || c === void 0 - ? void 0 - : c.prevState) === null || d === void 0 - ? void 0 - : d.kind) === t - ) - return e.prevState.prevState.prevState.prevState - } - function p1(e, t, n) { - let r = null, - i, - s = Object.create({}) - return ( - es(e, (o, a) => { - var u - if ((a?.kind === W.VARIABLE && a.name && (r = a.name), a?.kind === W.NAMED_TYPE && r)) { - let l = $9(a, W.TYPE) - l?.type && (i = t.getType(l?.type)) - } - if (r && i && !s[r]) { - let l = - n.string === '$' || - ((u = n?.state) === null || u === void 0 ? void 0 : u.kind) === 'Variable' - ? r - : '$' + r - ;(s[r] = { - detail: i.toString(), - insertText: l, - label: '$' + r, - rawInsert: l, - type: i, - kind: ve.Variable - }), - (r = null), - (i = null) - } - }), - pr(s) - ) - } - function Y0(e) { - let t = [] - return ( - es(e, (n, r) => { - r.kind === W.FRAGMENT_DEFINITION && - r.name && - r.type && - t.push({ - kind: W.FRAGMENT_DEFINITION, - name: { kind: E.NAME, value: r.name }, - selectionSet: { kind: W.SELECTION_SET, selections: [] }, - typeCondition: { kind: W.NAMED_TYPE, name: { kind: E.NAME, value: r.type } } - }) - }), - t - ) - } - function j9(e, t, n) { - let r = t.getTypeMap(), - i = pr(r).filter(et) - return Ve( - e, - i.map((s) => ({ label: s.name, documentation: s?.description || '', kind: ve.Variable })) - ) - } - function q9(e, t, n, r) { - var i - if (!((i = t.prevState) === null || i === void 0) && i.kind) { - let s = n.getDirectives().filter((o) => J0(t.prevState, o)) - return Ve( - e, - s.map((o) => ({ label: o.name, documentation: o?.description || '', kind: ve.Function })) - ) - } - return [] - } - function G9(e, t, n, r) { - let i = n.getDirectives().find((s) => s.name === t.name) - return Ve( - e, - i?.args.map((s) => ({ label: s.name, documentation: s.description || '', kind: ve.Field })) || - [] - ) - } - function J0(e, t) { - if (!e?.kind) return !1 - let { kind: n, prevState: r } = e, - { locations: i } = t - switch (n) { - case W.QUERY: - return i.includes(K.QUERY) - case W.MUTATION: - return i.includes(K.MUTATION) - case W.SUBSCRIPTION: - return i.includes(K.SUBSCRIPTION) - case W.FIELD: - case W.ALIASED_FIELD: - return i.includes(K.FIELD) - case W.FRAGMENT_DEFINITION: - return i.includes(K.FRAGMENT_DEFINITION) - case W.FRAGMENT_SPREAD: - return i.includes(K.FRAGMENT_SPREAD) - case W.INLINE_FRAGMENT: - return i.includes(K.INLINE_FRAGMENT) - case W.SCHEMA_DEF: - return i.includes(K.SCHEMA) - case W.SCALAR_DEF: - return i.includes(K.SCALAR) - case W.OBJECT_TYPE_DEF: - return i.includes(K.OBJECT) - case W.FIELD_DEF: - return i.includes(K.FIELD_DEFINITION) - case W.INTERFACE_DEF: - return i.includes(K.INTERFACE) - case W.UNION_DEF: - return i.includes(K.UNION) - case W.ENUM_DEF: - return i.includes(K.ENUM) - case W.ENUM_VALUE: - return i.includes(K.ENUM_VALUE) - case W.INPUT_DEF: - return i.includes(K.INPUT_OBJECT) - case W.INPUT_VALUE_DEF: - switch (r?.kind) { - case W.ARGUMENTS_DEF: - return i.includes(K.ARGUMENT_DEFINITION) - case W.INPUT_DEF: - return i.includes(K.INPUT_FIELD_DEFINITION) - } - } - return !1 - } - function X0(e) { - return e.prevState && - e.kind && - [W.NAMED_TYPE, W.LIST_TYPE, W.TYPE, W.NON_NULL_TYPE].includes(e.kind) - ? X0(e.prevState) - : e - } - var H9 = Xu(Z0()) - function It(e, t) { - e.push(t) - } - function h1(e, t) { - ce(t) - ? (h1(e, t.ofType), It(e, '!')) - : Fe(t) - ? (It(e, '['), h1(e, t.ofType), It(e, ']')) - : It(e, t.name) - } - function vu(e, t, n) { - let r = [], - i = 'type' in e ? e.type : e - return ( - 'type' in e && - e.description && - (It(r, e.description), - It( - r, - ` +`)),It(r,W9(i,t)),n?(It(r,` +`),It(r,n)):!ct(i)&&"description"in i&&i.description?(It(r,` +`),It(r,i.description)):"ofType"in i&&!ct(i.ofType)&&"description"in i.ofType&&i.ofType.description&&(It(r,` +`),It(r,i.ofType.description)),r.join("")}function W9(e,t){let n=[];return t&&It(n,"```graphql\n"),h1(n,e),t&&It(n,"\n```"),n.join("")}var Q9={Int:{type:"integer"},String:{type:"string"},Float:{type:"number"},ID:{type:"string"},Boolean:{type:"boolean"},DateTime:{type:"string"}},m1=class{constructor(){this.set=new Set}mark(t){return this.set.has(t)?!1:(this.set.add(t),!0)}};function g1(e,t){var n,r;let i=Object.create(null),s=Object.create(null),a="type"in e?e.type:e,u=ce(a)?a.ofType:a,l=ce(a);if(ct(u))!((n=t?.scalarSchemas)===null||n===void 0)&&n[u.name]?i=JSON.parse(JSON.stringify(t.scalarSchemas[u.name])):i.type=["string","number","boolean","integer"],l||(Array.isArray(i.type)?i.type.push("null"):i.type?i.type=[i.type,"null"]:i.enum?i.enum.push(null):i.oneOf?i.oneOf.push({type:"null"}):i={oneOf:[i,{type:"null"}]});else if(Be(u))i.enum=u.getValues().map(d=>d.name),l||i.enum.push(null);else if(Fe(u)){l?i.type="array":i.type=["array","null"];let{definition:d,definitions:h}=g1(u.ofType,t);if(i.items=d,h)for(let m of Object.keys(h))s[m]=h[m]}else if(be(u)&&(l?i.$ref=`#/definitions/${u.name}`:i.oneOf=[{$ref:`#/definitions/${u.name}`},{type:"null"}],!((r=t?.definitionMarker)===null||r===void 0)&&r.mark(u.name))){let d=u.getFields(),h={type:"object",properties:{},required:[]};h.description=vu(u),t?.useMarkdownDescription&&(h.markdownDescription=vu(u,!0));for(let m of Object.keys(d)){let g=d[m],{required:v,definition:N,definitions:_}=g1(g,t);if(h.properties[m]=N,v&&h.required.push(m),_)for(let[w,C]of Object.entries(_))s[w]=C}s[u.name]=h}"defaultValue"in e&&e.defaultValue!==void 0&&(i.default=e.defaultValue);let{description:c}=i;return i.description=vu(e,!1,c),t?.useMarkdownDescription&&(i.markdownDescription=vu(e,!0,c)),{required:l,definition:i,definitions:s}}function bu(e,t){var n;let r={$schema:"http://json-schema.org/draft-04/schema",type:"object",properties:{},required:[]},i=Object.assign(Object.assign({},t),{definitionMarker:new m1,scalarSchemas:Object.assign(Object.assign({},Q9),t?.scalarSchemas)});if(e)for(let[s,o]of Object.entries(e)){let{definition:a,required:u,definitions:l}=g1(o,i);r.properties[s]=a,u&&((n=r.required)===null||n===void 0||n.push(s)),l&&(r.definitions=Object.assign(Object.assign({},r?.definitions),l))}return r}var qr=class{constructor(t,n){this.containsPosition=r=>this.start.line===r.line?this.start.character<=r.character:this.end.line===r.line?this.end.character>=r.character:this.start.line<=r.line&&this.end.line>=r.line,this.start=t,this.end=n}setStart(t,n){this.start=new Yt(t,n)}setEnd(t,n){this.end=new Yt(t,n)}},Yt=class{constructor(t,n){this.lessThanOrEqualTo=r=>this.line!(a===Vi||a===Oi||r&&a===Pi));return n&&Array.prototype.push.apply(s,n),i&&Array.prototype.push.apply(s,z9),Ji(e,t,s).filter(a=>{if(a.message.includes("Unknown directive")&&a.nodes){let u=a.nodes[0];if(u&&u.kind===E.DIRECTIVE){let l=u.name.value;if(l==="arguments"||l==="argumentDefinitions")return!1}}return!0})}function yu(e,t){let n=Object.create(null);for(let r of t.definitions)if(r.kind==="OperationDefinition"){let{variableDefinitions:i}=r;if(i)for(let{variable:s,type:o}of i){let a=We(e,o);a?n[s.name.value]=a:o.kind===E.NAMED_TYPE&&o.name.value==="Float"&&(n[s.name.value]=Xs)}}return n}function xu(e,t){let n=t?yu(t,e):void 0,r=[];return ht(e,{OperationDefinition(i){r.push(i)}}),{variableToType:n,operations:r}}var mo={Error:"Error",Warning:"Warning",Information:"Information",Hint:"Hint"},_u={[mo.Error]:1,[mo.Warning]:2,[mo.Information]:3,[mo.Hint]:4},Nu=(e,t)=>{if(!e)throw new Error(t)};function v1(e,t=null,n,r,i){var s,o;let a=null,u="";i&&(u=typeof i=="string"?i:i.reduce((c,d)=>c+Le(d)+` -` - )), - It(r, W9(i, t)), - n - ? (It( - r, - ` -` - ), - It(r, n)) - : !ct(i) && 'description' in i && i.description - ? (It( - r, - ` -` - ), - It(r, i.description)) - : 'ofType' in i && - !ct(i.ofType) && - 'description' in i.ofType && - i.ofType.description && - (It( - r, - ` -` - ), - It(r, i.ofType.description)), - r.join('') - ) - } - function W9(e, t) { - let n = [] - return t && It(n, '```graphql\n'), h1(n, e), t && It(n, '\n```'), n.join('') - } - var Q9 = { - Int: { type: 'integer' }, - String: { type: 'string' }, - Float: { type: 'number' }, - ID: { type: 'string' }, - Boolean: { type: 'boolean' }, - DateTime: { type: 'string' } - }, - m1 = class { - constructor() { - this.set = new Set() - } - mark(t) { - return this.set.has(t) ? !1 : (this.set.add(t), !0) - } - } - function g1(e, t) { - var n, r - let i = Object.create(null), - s = Object.create(null), - a = 'type' in e ? e.type : e, - u = ce(a) ? a.ofType : a, - l = ce(a) - if (ct(u)) - !((n = t?.scalarSchemas) === null || n === void 0) && n[u.name] - ? (i = JSON.parse(JSON.stringify(t.scalarSchemas[u.name]))) - : (i.type = ['string', 'number', 'boolean', 'integer']), - l || - (Array.isArray(i.type) - ? i.type.push('null') - : i.type - ? (i.type = [i.type, 'null']) - : i.enum - ? i.enum.push(null) - : i.oneOf - ? i.oneOf.push({ type: 'null' }) - : (i = { oneOf: [i, { type: 'null' }] })) - else if (Be(u)) (i.enum = u.getValues().map((d) => d.name)), l || i.enum.push(null) - else if (Fe(u)) { - l ? (i.type = 'array') : (i.type = ['array', 'null']) - let { definition: d, definitions: h } = g1(u.ofType, t) - if (((i.items = d), h)) for (let m of Object.keys(h)) s[m] = h[m] - } else if ( - be(u) && - (l - ? (i.$ref = `#/definitions/${u.name}`) - : (i.oneOf = [{ $ref: `#/definitions/${u.name}` }, { type: 'null' }]), - !((r = t?.definitionMarker) === null || r === void 0) && r.mark(u.name)) - ) { - let d = u.getFields(), - h = { type: 'object', properties: {}, required: [] } - ;(h.description = vu(u)), t?.useMarkdownDescription && (h.markdownDescription = vu(u, !0)) - for (let m of Object.keys(d)) { - let g = d[m], - { required: v, definition: N, definitions: _ } = g1(g, t) - if (((h.properties[m] = N), v && h.required.push(m), _)) - for (let [w, C] of Object.entries(_)) s[w] = C - } - s[u.name] = h - } - 'defaultValue' in e && e.defaultValue !== void 0 && (i.default = e.defaultValue) - let { description: c } = i - return ( - (i.description = vu(e, !1, c)), - t?.useMarkdownDescription && (i.markdownDescription = vu(e, !0, c)), - { required: l, definition: i, definitions: s } - ) - } - function bu(e, t) { - var n - let r = { - $schema: 'http://json-schema.org/draft-04/schema', - type: 'object', - properties: {}, - required: [] - }, - i = Object.assign(Object.assign({}, t), { - definitionMarker: new m1(), - scalarSchemas: Object.assign(Object.assign({}, Q9), t?.scalarSchemas) - }) - if (e) - for (let [s, o] of Object.entries(e)) { - let { definition: a, required: u, definitions: l } = g1(o, i) - ;(r.properties[s] = a), - u && ((n = r.required) === null || n === void 0 || n.push(s)), - l && (r.definitions = Object.assign(Object.assign({}, r?.definitions), l)) - } - return r - } - var qr = class { - constructor(t, n) { - ;(this.containsPosition = (r) => - this.start.line === r.line - ? this.start.character <= r.character - : this.end.line === r.line - ? this.end.character >= r.character - : this.start.line <= r.line && this.end.line >= r.line), - (this.start = t), - (this.end = n) - } - setStart(t, n) { - this.start = new Yt(t, n) - } - setEnd(t, n) { - this.end = new Yt(t, n) - } - }, - Yt = class { - constructor(t, n) { - ;(this.lessThanOrEqualTo = (r) => - this.line < r.line || (this.line === r.line && this.character <= r.character)), - (this.line = t), - (this.character = n) - } - setLine(t) { - this.line = t - } - setCharacter(t) { - this.character = t - } - } - var z9 = [Bi, Wi, Qi, Gi, Hi, qi, Mr, Or, Vr, Ui, Br, Ur, zi, Mi, $i] - function Eu(e, t, n, r, i) { - let s = Yi.filter((a) => !(a === Vi || a === Oi || (r && a === Pi))) - return ( - n && Array.prototype.push.apply(s, n), - i && Array.prototype.push.apply(s, z9), - Ji(e, t, s).filter((a) => { - if (a.message.includes('Unknown directive') && a.nodes) { - let u = a.nodes[0] - if (u && u.kind === E.DIRECTIVE) { - let l = u.name.value - if (l === 'arguments' || l === 'argumentDefinitions') return !1 - } - } - return !0 - }) - ) - } - function yu(e, t) { - let n = Object.create(null) - for (let r of t.definitions) - if (r.kind === 'OperationDefinition') { - let { variableDefinitions: i } = r - if (i) - for (let { variable: s, type: o } of i) { - let a = We(e, o) - a - ? (n[s.name.value] = a) - : o.kind === E.NAMED_TYPE && o.name.value === 'Float' && (n[s.name.value] = Xs) - } - } - return n - } - function xu(e, t) { - let n = t ? yu(t, e) : void 0, - r = [] - return ( - ht(e, { - OperationDefinition(i) { - r.push(i) - } - }), - { variableToType: n, operations: r } - ) - } - var mo = { Error: 'Error', Warning: 'Warning', Information: 'Information', Hint: 'Hint' }, - _u = { [mo.Error]: 1, [mo.Warning]: 2, [mo.Information]: 3, [mo.Hint]: 4 }, - Nu = (e, t) => { - if (!e) throw new Error(t) - } - function v1(e, t = null, n, r, i) { - var s, o - let a = null, - u = '' - i && - (u = - typeof i == 'string' - ? i - : i.reduce( - (c, d) => - c + - Le(d) + - ` +`,""));let l=u?`${e} -`, - '' - )) - let l = u - ? `${e} +${u}`:e;try{a=Kt(l)}catch(c){if(c instanceof O){let d=Tu((o=(s=c.locations)===null||s===void 0?void 0:s[0])!==null&&o!==void 0?o:{line:0,column:0},l);return[{severity:_u.Error,message:c.message,source:"GraphQL: Syntax",range:d}]}throw c}return tm(a,t,n,r)}function tm(e,t=null,n,r){if(!t)return[];let i=Eu(t,e,n,r).flatMap(o=>em(o,_u.Error,"Validation")),s=Ji(t,e,[tu]).flatMap(o=>em(o,_u.Warning,"Deprecation"));return i.concat(s)}function em(e,t,n){if(!e.nodes)return[];let r=[];for(let[i,s]of e.nodes.entries()){let o=s.kind!=="Variable"&&"name"in s&&s.name!==void 0?s.name:"variable"in s&&s.variable!==void 0?s.variable:s;if(o){Nu(e.locations,"GraphQL validation error requires locations.");let a=e.locations[i],u=nD(o),l=a.column+(u.end-u.start);r.push({source:`GraphQL: ${n}`,message:e.message,severity:t,range:new qr(new Yt(a.line-1,a.column-1),new Yt(a.line-1,l))})}}return r}function Tu(e,t){let n=jr(),r=n.startState(),i=t.split(` +`);Nu(i.length>=e.line,"Query text must have more lines than where the error happened");let s=null;for(let l=0;l em(o, _u.Error, 'Validation')), - s = Ji(t, e, [tu]).flatMap((o) => em(o, _u.Warning, 'Deprecation')) - return i.concat(s) - } - function em(e, t, n) { - if (!e.nodes) return [] - let r = [] - for (let [i, s] of e.nodes.entries()) { - let o = - s.kind !== 'Variable' && 'name' in s && s.name !== void 0 - ? s.name - : 'variable' in s && s.variable !== void 0 - ? s.variable - : s - if (o) { - Nu(e.locations, 'GraphQL validation error requires locations.') - let a = e.locations[i], - u = nD(o), - l = a.column + (u.end - u.start) - r.push({ - source: `GraphQL: ${n}`, - message: e.message, - severity: t, - range: new qr(new Yt(a.line - 1, a.column - 1), new Yt(a.line - 1, l)) - }) - } - } - return r - } - function Tu(e, t) { - let n = jr(), - r = n.startState(), - i = t.split(` -`) - Nu(i.length >= e.line, 'Query text must have more lines than where the error happened') - let s = null - for (let l = 0; l < e.line; l++) - for (s = new Nn(i[l]); !s.eol() && n.token(s, r) !== 'invalidchar'; ); - Nu(s, 'Expected Parser stream to be available.') - let o = e.line - 1, - a = s.getStartOfToken(), - u = s.getCurrentPosition() - return new qr(new Yt(o, a), new Yt(o, u)) - } - function nD(e) { - let n = e.loc - return Nu(n, 'Expected ASTNode to have a location.'), n - } - var { INLINE_FRAGMENT: JI } = E - function Su(e, t, n, r, i) { - let s = Object.assign(Object.assign({}, i), { schema: e }), - o = po(t, n, e, r) - if (!o) return '' - let { typeInfo: a, token: u } = o, - { kind: l, step: c } = u.state - if ( - (l === 'Field' && c === 0 && a.fieldDef) || - (l === 'AliasedField' && c === 2 && a.fieldDef) || - (l === 'ObjectField' && c === 0 && a.fieldDef) - ) { - let d = [] - return ts(d, s), rD(d, a, s), ns(d, s), rs(d, s, a.fieldDef), d.join('').trim() - } - if (l === 'Directive' && c === 1 && a.directiveDef) { - let d = [] - return ts(d, s), rm(d, a, s), ns(d, s), rs(d, s, a.directiveDef), d.join('').trim() - } - if (l === 'Variable' && a.type) { - let d = [] - return ts(d, s), Gr(d, a, s, a.type), ns(d, s), rs(d, s, a.type), d.join('').trim() - } - if (l === 'Argument' && c === 0 && a.argDef) { - let d = [] - return ts(d, s), iD(d, a, s), ns(d, s), rs(d, s, a.argDef), d.join('').trim() - } - if (l === 'EnumValue' && a.enumValue && 'description' in a.enumValue) { - let d = [] - return ts(d, s), sD(d, a, s), ns(d, s), rs(d, s, a.enumValue), d.join('').trim() - } - if (l === 'NamedType' && a.type && 'description' in a.type) { - let d = [] - return ts(d, s), Gr(d, a, s, a.type), ns(d, s), rs(d, s, a.type), d.join('').trim() - } - return '' - } - function ts(e, t) { - t.useMarkdown && ut(e, '```graphql\n') - } - function ns(e, t) { - t.useMarkdown && ut(e, '\n```') - } - function rD(e, t, n) { - nm(e, t, n), im(e, t, n, t.type) - } - function nm(e, t, n) { - if (!t.fieldDef) return - let r = t.fieldDef.name - r.slice(0, 2) !== '__' && (Gr(e, t, n, t.parentType), ut(e, '.')), ut(e, r) - } - function rm(e, t, n) { - if (!t.directiveDef) return - let r = '@' + t.directiveDef.name - ut(e, r) - } - function iD(e, t, n) { - if ((t.directiveDef ? rm(e, t, n) : t.fieldDef && nm(e, t, n), !t.argDef)) return - let { name: r } = t.argDef - ut(e, '('), ut(e, r), im(e, t, n, t.inputType), ut(e, ')') - } - function im(e, t, n, r) { - ut(e, ': '), Gr(e, t, n, r) - } - function sD(e, t, n) { - if (!t.enumValue) return - let { name: r } = t.enumValue - Gr(e, t, n, t.inputType), ut(e, '.'), ut(e, r) - } - function Gr(e, t, n, r) { - r && - (r instanceof ae - ? (Gr(e, t, n, r.ofType), ut(e, '!')) - : r instanceof Me - ? (ut(e, '['), Gr(e, t, n, r.ofType), ut(e, ']')) - : ut(e, r.name)) - } - function rs(e, t, n) { - if (!n) return - let r = typeof n.description == 'string' ? n.description : null - r && - (ut( - e, - ` +`),ut(e,r)),oD(e,t,n)}function oD(e,t,n){if(!n)return;let r=n.deprecationReason||null;r&&(ut(e,` -` - ), - ut(e, r)), - oD(e, t, n) - } - function oD(e, t, n) { - if (!n) return - let r = n.deprecationReason || null - r && - (ut( - e, - ` - -` - ), - ut(e, 'Deprecated: '), - ut(e, r)) - } - function ut(e, t) { - e.push(t) - } - var Fm = Xu(Am()) - var S1 = (e, t) => { - let { - schema: n, - documentAST: r, - introspectionJSON: i, - introspectionJSONString: s, - buildSchemaOptions: o, - documentString: a - } = e - if (n) return n - if (s) { - let u = JSON.parse(s) - return io(u, o) - } - if (a && t) { - let u = t(a) - return so(u, o) - } - if (i) return io(i, o) - if (r) return so(r, o) - throw new Error('no schema supplied') - } - var BD = new Map(), - Cu = class { - _parser = Kt - _schemas = [] - _schemaCache = BD - _schemaLoader = S1 - _parseOptions = void 0 - _customValidationRules = void 0 - _externalFragmentDefinitionNodes = null - _externalFragmentDefinitionsString = null - _completionSettings - constructor({ - parser: t, - schemas: n, - parseOptions: r, - externalFragmentDefinitions: i, - customValidationRules: s, - fillLeafsOnComplete: o, - completionSettings: a - }) { - ;(this._schemaLoader = S1), - n && ((this._schemas = n), this._cacheSchemas()), - t && (this._parser = t), - (this._completionSettings = { ...a, fillLeafsOnComplete: a?.fillLeafsOnComplete ?? o }), - r && (this._parseOptions = r), - s && (this._customValidationRules = s), - i && - (Array.isArray(i) - ? (this._externalFragmentDefinitionNodes = i) - : (this._externalFragmentDefinitionsString = i)) - } - _cacheSchemas() { - for (let t of this._schemas) this._cacheSchema(t) - } - _cacheSchema(t) { - let n = this._schemaLoader(t, this.parse.bind(this)) - return this._schemaCache.set(t.uri, { ...t, schema: n }) - } - getSchemaForFile(t) { - if (!this._schemas?.length) return - if (this._schemas.length === 1) return this._schemaCache.get(this._schemas[0].uri) - let n = this._schemas.find((r) => - r.fileMatch ? r.fileMatch.some((i) => (0, Fm.default)(i)(t)) : !1 - ) - if (n) { - let r = this._schemaCache.get(n.uri) - return r || this._cacheSchema(n).get(n.uri) - } - } - getExternalFragmentDefinitions() { - if (!this._externalFragmentDefinitionNodes && this._externalFragmentDefinitionsString) { - let t = [] - try { - ht(this._parser(this._externalFragmentDefinitionsString), { - FragmentDefinition(n) { - t.push(n) - } - }) - } catch { - throw new Error(`Failed parsing externalFragmentDefinitions string: -${this._externalFragmentDefinitionsString}`) - } - this._externalFragmentDefinitionNodes = t - } - return this._externalFragmentDefinitionNodes - } - async updateSchemas(t) { - ;(this._schemas = t), this._cacheSchemas() - } - updateSchema(t) { - let n = this._schemas.findIndex((r) => r.uri === t.uri) - if (n < 0) { - console.warn('updateSchema could not find a schema in your config by that URI', t.uri) - return - } - ;(this._schemas[n] = t), this._cacheSchema(t) - } - addSchema(t) { - this._schemas.push(t), this._cacheSchema(t) - } - parse(t, n) { - return this._parser(t, n || this._parseOptions) - } - getCompletion = (t, n, r) => { - let i = this.getSchemaForFile(t) - return !n || n.length < 1 || !i?.schema - ? [] - : f1(i.schema, n, r, void 0, this.getExternalFragmentDefinitions(), { - uri: t, - ...this._completionSettings - }) - } - getDiagnostics = (t, n, r) => { - let i = this.getSchemaForFile(t) - return !n || n.trim().length < 2 || !i?.schema - ? [] - : v1( - n, - i.schema, - r ?? this._customValidationRules, - !1, - this.getExternalFragmentDefinitions() - ) - } - getHover = (t, n, r, i) => { - let s = this.getSchemaForFile(t) - if (s && n?.length > 3) return Su(s.schema, n, r, void 0, { useMarkdown: !0, ...i }) - } - getVariablesJSONSchema = (t, n, r) => { - let i = this.getSchemaForFile(t) - if (i && n.length > 3) - try { - let s = this.parse(n), - o = xu(s, i.schema) - if (o?.variableToType) - return bu(o.variableToType, { ...r, scalarSchemas: i.customScalarSchemas }) - } catch {} - return null - } - } - function A1(e) { - return { - startLineNumber: e.start.line + 1, - startColumn: e.start.character + 1, - endLineNumber: e.end.line + 1, - endColumn: e.end.character + 1 - } - } - function F1(e) { - return new Yt(e.lineNumber - 1, e.column - 1) - } - function wm(e, t) { - let n = { - label: e.label, - insertText: e?.insertText, - sortText: e.sortText, - filterText: e?.filterText, - documentation: e.documentation, - detail: e.detail, - range: t ? A1(t) : void 0, - kind: e.kind - } - return ( - e.insertTextFormat && (n.insertTextFormat = e.insertTextFormat), - e.insertTextMode && (n.insertTextMode = e.insertTextMode), - e.command && (n.command = { ...e.command, id: e.command.command }), - e.labelDetails && (n.labelDetails = e.labelDetails), - n - ) - } - function Lm(e) { - return { - startLineNumber: e.range.start.line + 1, - endLineNumber: e.range.end.line + 1, - startColumn: e.range.start.character + 1, - endColumn: e.range.end.character, - message: e.message, - severity: 5, - code: e.code || void 0 - } - } - var Gu = class { - _ctx - _languageService - _formattingOptions - constructor(t, n) { - ;(this._ctx = t), - (this._languageService = new Cu(n.languageConfig)), - (this._formattingOptions = n.formattingOptions) - } - async doValidation(t) { - try { - let r = this._getTextModel(t)?.getValue() - return r ? this._languageService.getDiagnostics(t, r).map(Lm) : [] - } catch (n) { - return console.error(n), [] - } - } - async doComplete(t, n) { - try { - let i = this._getTextModel(t)?.getValue() - if (!i) return [] - let s = F1(n) - return this._languageService.getCompletion(t, i, s).map((a) => wm(a)) - } catch (r) { - return console.error(r), [] - } - } - async doHover(t, n) { - try { - let i = this._getTextModel(t)?.getValue() - if (!i) return null - let s = F1(n) - return { - content: this._languageService.getHover(t, i, s), - range: A1(Tu({ column: s.character, line: s.line }, i)) - } - } catch (r) { - return console.error(r), null - } - } - async doGetVariablesJSONSchema(t) { - let n = this._getTextModel(t), - r = n?.getValue() - if (!n || !r) return null - let i = this._languageService.getVariablesJSONSchema(t, r, { useMarkdownDescription: !0 }) - return i - ? ((i.$id = 'monaco://variables-schema.json'), (i.title = 'GraphQL Variables'), i) - : null - } - async doFormat(t) { - let n = this._getTextModel(t), - r = n?.getValue() - if (!n || !r) return null - let i = await Promise.resolve().then(() => (X2(), J2)), - s = await Promise.resolve().then(() => Xu(eg())) - return i.format(r, { - parser: 'graphql', - plugins: [s], - ...this._formattingOptions?.prettierConfig - }) - } - _getTextModel(t) { - let n = this._ctx.getMirrorModels() - for (let r of n) if (r.uri.toString() === t) return r - return null - } - doUpdateSchema(t) { - return this._languageService.updateSchema(t) - } - doUpdateSchemas(t) { - return this._languageService.updateSchemas(t) - } - } - self.onmessage = () => { - oc((e, t) => new Gu(e, t)) - } -})() +`),ut(e,"Deprecated: "),ut(e,r))}function ut(e,t){e.push(t)}var Fm=Xu(Am());var S1=(e,t)=>{let{schema:n,documentAST:r,introspectionJSON:i,introspectionJSONString:s,buildSchemaOptions:o,documentString:a}=e;if(n)return n;if(s){let u=JSON.parse(s);return io(u,o)}if(a&&t){let u=t(a);return so(u,o)}if(i)return io(i,o);if(r)return so(r,o);throw new Error("no schema supplied")};var BD=new Map,Cu=class{_parser=Kt;_schemas=[];_schemaCache=BD;_schemaLoader=S1;_parseOptions=void 0;_customValidationRules=void 0;_externalFragmentDefinitionNodes=null;_externalFragmentDefinitionsString=null;_completionSettings;constructor({parser:t,schemas:n,parseOptions:r,externalFragmentDefinitions:i,customValidationRules:s,fillLeafsOnComplete:o,completionSettings:a}){this._schemaLoader=S1,n&&(this._schemas=n,this._cacheSchemas()),t&&(this._parser=t),this._completionSettings={...a,fillLeafsOnComplete:a?.fillLeafsOnComplete??o},r&&(this._parseOptions=r),s&&(this._customValidationRules=s),i&&(Array.isArray(i)?this._externalFragmentDefinitionNodes=i:this._externalFragmentDefinitionsString=i)}_cacheSchemas(){for(let t of this._schemas)this._cacheSchema(t)}_cacheSchema(t){let n=this._schemaLoader(t,this.parse.bind(this));return this._schemaCache.set(t.uri,{...t,schema:n})}getSchemaForFile(t){if(!this._schemas?.length)return;if(this._schemas.length===1)return this._schemaCache.get(this._schemas[0].uri);let n=this._schemas.find(r=>r.fileMatch?r.fileMatch.some(i=>(0,Fm.default)(i)(t)):!1);if(n){let r=this._schemaCache.get(n.uri);return r||this._cacheSchema(n).get(n.uri)}}getExternalFragmentDefinitions(){if(!this._externalFragmentDefinitionNodes&&this._externalFragmentDefinitionsString){let t=[];try{ht(this._parser(this._externalFragmentDefinitionsString),{FragmentDefinition(n){t.push(n)}})}catch{throw new Error(`Failed parsing externalFragmentDefinitions string: +${this._externalFragmentDefinitionsString}`)}this._externalFragmentDefinitionNodes=t}return this._externalFragmentDefinitionNodes}async updateSchemas(t){this._schemas=t,this._cacheSchemas()}updateSchema(t){let n=this._schemas.findIndex(r=>r.uri===t.uri);if(n<0){console.warn("updateSchema could not find a schema in your config by that URI",t.uri);return}this._schemas[n]=t,this._cacheSchema(t)}addSchema(t){this._schemas.push(t),this._cacheSchema(t)}parse(t,n){return this._parser(t,n||this._parseOptions)}getCompletion=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||n.length<1||!i?.schema?[]:f1(i.schema,n,r,void 0,this.getExternalFragmentDefinitions(),{uri:t,...this._completionSettings})};getDiagnostics=(t,n,r)=>{let i=this.getSchemaForFile(t);return!n||n.trim().length<2||!i?.schema?[]:v1(n,i.schema,r??this._customValidationRules,!1,this.getExternalFragmentDefinitions())};getHover=(t,n,r,i)=>{let s=this.getSchemaForFile(t);if(s&&n?.length>3)return Su(s.schema,n,r,void 0,{useMarkdown:!0,...i})};getVariablesJSONSchema=(t,n,r)=>{let i=this.getSchemaForFile(t);if(i&&n.length>3)try{let s=this.parse(n),o=xu(s,i.schema);if(o?.variableToType)return bu(o.variableToType,{...r,scalarSchemas:i.customScalarSchemas})}catch{}return null}};function A1(e){return{startLineNumber:e.start.line+1,startColumn:e.start.character+1,endLineNumber:e.end.line+1,endColumn:e.end.character+1}}function F1(e){return new Yt(e.lineNumber-1,e.column-1)}function wm(e,t){let n={label:e.label,insertText:e?.insertText,sortText:e.sortText,filterText:e?.filterText,documentation:e.documentation,detail:e.detail,range:t?A1(t):void 0,kind:e.kind};return e.insertTextFormat&&(n.insertTextFormat=e.insertTextFormat),e.insertTextMode&&(n.insertTextMode=e.insertTextMode),e.command&&(n.command={...e.command,id:e.command.command}),e.labelDetails&&(n.labelDetails=e.labelDetails),n}function Lm(e){return{startLineNumber:e.range.start.line+1,endLineNumber:e.range.end.line+1,startColumn:e.range.start.character+1,endColumn:e.range.end.character,message:e.message,severity:5,code:e.code||void 0}}var Gu=class{_ctx;_languageService;_formattingOptions;constructor(t,n){this._ctx=t,this._languageService=new Cu(n.languageConfig),this._formattingOptions=n.formattingOptions}async doValidation(t){try{let r=this._getTextModel(t)?.getValue();return r?this._languageService.getDiagnostics(t,r).map(Lm):[]}catch(n){return console.error(n),[]}}async doComplete(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return[];let s=F1(n);return this._languageService.getCompletion(t,i,s).map(a=>wm(a))}catch(r){return console.error(r),[]}}async doHover(t,n){try{let i=this._getTextModel(t)?.getValue();if(!i)return null;let s=F1(n);return{content:this._languageService.getHover(t,i,s),range:A1(Tu({column:s.character,line:s.line},i))}}catch(r){return console.error(r),null}}async doGetVariablesJSONSchema(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=this._languageService.getVariablesJSONSchema(t,r,{useMarkdownDescription:!0});return i?(i.$id="monaco://variables-schema.json",i.title="GraphQL Variables",i):null}async doFormat(t){let n=this._getTextModel(t),r=n?.getValue();if(!n||!r)return null;let i=await Promise.resolve().then(()=>(X2(),J2)),s=await Promise.resolve().then(()=>Xu(eg()));return i.format(r,{parser:"graphql",plugins:[s],...this._formattingOptions?.prettierConfig})}_getTextModel(t){let n=this._ctx.getMirrorModels();for(let r of n)if(r.uri.toString()===t)return r;return null}doUpdateSchema(t){return this._languageService.updateSchema(t)}doUpdateSchemas(t){return this._languageService.updateSchemas(t)}};self.onmessage=()=>{oc((e,t)=>new Gu(e,t))};})(); diff --git a/frontend/src/lib/schema.ts b/frontend/src/lib/schema.ts index b01c18a628..800de326aa 100644 --- a/frontend/src/lib/schema.ts +++ b/frontend/src/lib/schema.ts @@ -32,7 +32,7 @@ export function schemaToTsType(schema: Schema | SchemaProperty): string { return `${prefix}: ${type}` }) - .join(';') + .join('; ') return `{ ${types} }` } diff --git a/frontend/src/lib/script_helpers.ts b/frontend/src/lib/script_helpers.ts index a32f31e5ee..9e90ebe74c 100644 --- a/frontend/src/lib/script_helpers.ts +++ b/frontend/src/lib/script_helpers.ts @@ -634,7 +634,7 @@ export const TS_PREPROCESSOR_SCRIPT_INTRO = `/** * The preprocessor receives trigger metadata (\`wm_trigger\`) along with the main trigger arguments. * The structure of \`wm_trigger\` and the main trigger arguments are specific to each trigger type: * - Webhook/HTTP: \`(wm_trigger: { kind: 'http' | 'webhook', http?: { ... } }, body_key_1: any, body_key_2: any, ...)\` - * - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, row: any)\` + * - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, old_row?: any, row: any)\` * - WebSocket/Kafka/NATS/SQS: \`(wm_trigger: { kind: 'websocket' | 'kafka' | 'nats' | 'sqs', [kind]: { ... } }, msg: string)\` * - MQTT: \`(wm_trigger: { kind: 'mqtt', [kind]: { ... } }, payload: Array)\` * - GCP: \`(wm_trigger: { kind: 'gcp', [kind]: { ... } }, payload: string)\` @@ -656,7 +656,7 @@ export const TS_PREPROCESSOR_FLOW_INTRO = `/** * The preprocessor receives trigger metadata (\`wm_trigger\`) along with the main trigger arguments. * The structure of \`wm_trigger\` and the main trigger arguments are specific to each trigger type: * - Webhook/HTTP: \`(wm_trigger: { kind: 'http' | 'webhook', http?: { ... } }, body_key_1: any, body_key_2: any, ...)\` - * - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, row: any)\` + * - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, old_row?: any, row: any)\` * - WebSocket/Kafka/NATS/SQS: \`(wm_trigger: { kind: 'websocket' | 'kafka' | 'nats' | 'sqs', [kind]: { ... } }, msg: string)\` * - MQTT: \`(wm_trigger: { kind: 'mqtt', [kind]: { ... } }, payload: Array)\` * - GCP: \`(wm_trigger: { kind: 'gcp', [kind]: { ... } }, payload: string)\`* @@ -781,7 +781,7 @@ export const PYTHON_PREPROCESSOR_SCRIPT_INTRO = `# Trigger preprocessor # The preprocessor receives trigger metadata (\`wm_trigger\`) along with the main trigger arguments. # The structure of \`wm_trigger\` and the main trigger arguments are specific to each trigger type: # - Webhook/HTTP: \`(wm_trigger: { kind: 'http' | 'webhook', http?: { ... } }, body_key_1: any, body_key_2: any, ...)\` -# - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, row: any)\` +# - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, old_row?: any, row: any)\` # - WebSocket/Kafka/NATS/SQS: \`(wm_trigger: { kind: 'websocket' | 'kafka' | 'nats' | 'sqs', [kind]: { ... } }, msg: string)\` # - MQTT: \`(wm_trigger: { kind: 'mqtt', [kind]: { ... } }, payload: Array)\` # - GCP: \`(wm_trigger: { kind: 'gcp', [kind]: { ... } }, payload: string)\` @@ -801,7 +801,7 @@ export const PYTHON_PREPROCESSOR_FLOW_INTRO = `# Trigger preprocessor # The preprocessor receives the same data the flow would if no preprocessor was used, # plus trigger metadata in the \`wm_trigger\` object: # - Webhook/HTTP: \`(wm_trigger: { kind: 'http' | 'webhook', http?: { ... } }, body_key_1: any, body_key_2: any, ...)\` -# - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, row: any)\` +# - Postgres: \`(wm_trigger: { kind: 'postgres' }, transaction_type: string, schema_name: string, table_name: string, old_row?:any, row: any)\` # - WebSocket/Kafka/NATS/SQS: \`(wm_trigger: { kind: 'websocket' | 'kafka' | 'nats' | 'sqs', [kind]: { ... } }, msg: string)\` # - MQTT: \`(wm_trigger: { kind: 'mqtt', [kind]: { ... } }, payload: Array)\` # - GCP: \`(wm_trigger: { kind: 'gcp', [kind]: { ... } }, payload: string)\` diff --git a/frontend/src/lib/scripts.ts b/frontend/src/lib/scripts.ts index d5516a69bc..61b19dcca4 100644 --- a/frontend/src/lib/scripts.ts +++ b/frontend/src/lib/scripts.ts @@ -5,16 +5,27 @@ import { FlowService, type Script, ScriptService, ScheduleService } from './gen' import { workspaceStore } from './stores' export function scriptLangToEditorLang( - lang: Script['language'] | 'bunnative' | 'frontend' | undefined + lang: + | Script['language'] + | 'bunnative' + | 'javascript' + | 'frontend' + | 'jsx' + | 'tsx' + | 'text' + | 'json' + | undefined ) { if (lang == 'deno') { return 'typescript' - } else if (lang == 'bun' || lang == 'bunnative' || lang == 'frontend') { + } else if (lang == 'bun' || lang == 'bunnative' || lang == 'frontend' || lang == 'tsx') { return 'typescript' } else if (lang == 'nativets') { return 'typescript' - // } else if (lang == 'graphql') { - // return 'typescript' + } else if (lang == 'text') { + return 'text' + } else if (lang == 'javascript' || lang == 'jsx') { + return 'javascript' } else if (lang == 'postgresql') { return 'sql' } else if (lang == 'mysql') { @@ -47,7 +58,7 @@ export function scriptLangToEditorLang( return 'nu' } else if (lang == 'java') { return 'java' - // for related places search: ADD_NEW_LANG + // for related places search: ADD_NEW_LANG } else if (lang == undefined) { return 'typescript' } else { @@ -130,7 +141,7 @@ const scriptLanguagesArray: [SupportedLanguage | 'docker' | 'bunnative', string] ['docker', 'Docker'], ['nu', 'Nu'], ['java', 'Java'] - // for related places search: ADD_NEW_LANG + // for related places search: ADD_NEW_LANG ] export function processLangs(selected: string | undefined, langs: string[]): string[] { if (selected === 'nativets') { @@ -140,7 +151,7 @@ export function processLangs(selected: string | undefined, langs: string[]): str //those languages are newer and may not be in the saved list let nl = ['bunnative', 'rust', 'ansible', 'csharp', 'nu', 'java'] - // for related places search: ADD_NEW_LANG + // for related places search: ADD_NEW_LANG nl.forEach((lang) => { if (!ls.includes(lang)) { ls.push(lang) @@ -162,6 +173,7 @@ export async function getScriptByPath(path: string): Promise<{ concurrency_time_window_s: number | undefined lock?: string created_at?: string + hash?: string }> { if (path.startsWith('hub/')) { const { content, language, schema, lockfile } = await ScriptService.getHubScriptByPath({ path }) @@ -190,6 +202,7 @@ export async function getScriptByPath(path: string): Promise<{ concurrent_limit: script.concurrent_limit, concurrency_time_window_s: script.concurrency_time_window_s, lock: script.lock, + hash: script.hash, created_at: script.created_at } } diff --git a/frontend/src/lib/stores.ts b/frontend/src/lib/stores.ts index 5168b184c4..20e48d235c 100644 --- a/frontend/src/lib/stores.ts +++ b/frontend/src/lib/stores.ts @@ -9,7 +9,8 @@ import { type OperatorSettings, type TokenResponse, type UserWorkspaceList, - type WorkspaceDefaultScripts + type WorkspaceDefaultScripts, + WorkspaceService } from './gen' import { getLocalSetting } from './utils' @@ -202,3 +203,32 @@ export const dbSchemas = writable({}) export const instanceSettingsSelectedTab = writable('Core') export const isCriticalAlertsUIOpen = writable(false) + +export const workspaceColor: Readable = derived( + [workspaceStore, usersWorkspaceStore, superadmin], + ([workspaceStore, usersWorkspaceStore, superadmin], set: (value: string | undefined) => void) => { + if (!workspaceStore) { + set(undefined) + return + } + + // First try to get the color from usersWorkspaceStore + const color = usersWorkspaceStore?.workspaces.find((w) => w.id === workspaceStore)?.color + + if (color) { + set(color) + return + } + + // If not found and user is superadmin, try to get it from superadmin list + if (!superadmin) { + set(undefined) + return + } + + WorkspaceService.listWorkspacesAsSuperAdmin().then((workspaces) => { + const superadminColor = workspaces.find((w) => w.id === workspaceStore)?.color + set(superadminColor) + }) + } +) diff --git a/frontend/src/lib/svelteMonarch.ts b/frontend/src/lib/svelteMonarch.ts new file mode 100644 index 0000000000..7fd438655c --- /dev/null +++ b/frontend/src/lib/svelteMonarch.ts @@ -0,0 +1,313 @@ +// taken from node_modules/monaco-editor/dev/vs/basic-languages/html/html.js +// modifications: +// 1: replaced 'monaco_editor_core_1.' with '' (added import) +// 2: replaced 'exports.' with 'export const ' +// 3: replaced 'text/javascript' with 'text/typescript' +// 4: added basic moustache keywords + +import { languages } from 'monaco-editor' +var EMPTY_ELEMENTS = [ + 'area', + 'base', + 'br', + 'col', + 'embed', + 'hr', + 'img', + 'input', + 'keygen', + 'link', + 'menuitem', + 'meta', + 'param', + 'source', + 'track', + 'wbr' +] +export const conf = { + wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g, + comments: { + blockComment: [''] + }, + + brackets: [ + [''], + ['<', '>'], + ['{', '}'], + ['(', ')'] + ], + autoClosingPairs: [ + { open: '{', close: '}' }, + { open: '[', close: ']' }, + { open: '(', close: ')' }, + { open: '"', close: '"' }, + { open: "'", close: "'" } + ], + surroundingPairs: [ + { open: '"', close: '"' }, + { open: "'", close: "'" }, + { open: '{', close: '}' }, + { open: '[', close: ']' }, + { open: '(', close: ')' }, + { open: '<', close: '>' } + ], + onEnterRules: [ + { + beforeText: new RegExp( + '<(?!(?:' + EMPTY_ELEMENTS.join('|') + '))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$', + 'i' + ), + afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i, + action: { + indentAction: languages.IndentAction.IndentOutdent + } + }, + { + beforeText: new RegExp( + '<(?!(?:' + EMPTY_ELEMENTS.join('|') + '))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$', + 'i' + ), + action: { indentAction: languages.IndentAction.Indent } + } + ], + folding: { + markers: { + start: new RegExp('^\\s*'), + end: new RegExp('^\\s*') + } + } +} +export const language = { + defaultToken: '', + tokenPostfix: '.html', + ignoreCase: true, + + moustkeys: [ + '#if', + '/if', + ':else if', + ':else', + 'as', + '#each', + '/each', + '#await', + ':then', + ':catch', + '/await', + '#key', + '/key', + '@html', + '@debug' + ], + + // The main tokenizer for our languages + tokenizer: { + root: [ + [/)/, ['delimiter', 'tag', '', 'delimiter']], + [/(<)(script)/, ['delimiter', { token: 'tag', next: '@script' }]], + [/(<)(style)/, ['delimiter', { token: 'tag', next: '@style' }]], + [/(<)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]], + [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, ['delimiter', { token: 'tag', next: '@otherTag' }]], + [/]+/, 'metatag.content'], + [/>/, 'metatag', '@pop'] + ], + comment: [ + [/-->/, 'comment', '@pop'], + [/[^-]+/, 'comment.content'], + [/./, 'comment.content'] + ], + curly: [ + [/[ \t\r\n]+/], + [/{/, 'delimiter', '@push'], + [ + /[^}\s]+/, + { + cases: { + '@moustkeys': 'keyword', + '@default': 'tag' + } + } + ], + [/}/, 'delimiter', '@pop'] + ], + otherTag: [ + [/\/?>/, 'delimiter', '@pop'], + [/"([^"]*)"/, 'attribute.value'], + [/'([^']*)'/, 'attribute.value'], + [/[\w\-]+/, 'attribute.name'], + [/=/, 'delimiter'], + [/[ \t\r\n]+/] // whitespace + ], + // -- BEGIN ' }, + { open: '' } + ], + surroundingPairs: [ + { open: '{', close: '}' }, + { open: '[', close: ']' }, + { open: '(', close: ')' }, + { open: '"', close: '"' }, + { open: "'", close: "'" }, + { open: '`', close: '`' }, + { open: '<', close: '>' } + ], + comments: { + lineComment: '//', + blockComment: ['/*', '*/'] + }, + brackets: [ + ['{', '}'], + ['[', ']'], + ['(', ')'], + ['<', '>'] + ] +} + +// Define Vue tokens and language rules +export const language = { + defaultToken: '', + tokenPostfix: '.vue', + + exponent: /[eE][\-+]?\d+/, + // Regular expressions for different token types + brackets: [ + { open: '{', close: '}', token: 'delimiter.curly' }, + { open: '[', close: ']', token: 'delimiter.square' }, + { open: '(', close: ')', token: 'delimiter.parenthesis' }, + { open: '<', close: '>', token: 'delimiter.angle' } + ], + + keywords: [ + 'template', + 'script', + 'style', + 'props', + 'setup', + 'emit', + 'computed', + 'ref', + 'reactive', + 'watch', + 'watchEffect', + 'onMounted', + 'onUpdated', + 'onUnmounted', + 'defineProps', + 'defineEmits', + 'defineExpose', + 'withDefaults' + ], + + typeKeywords: ['boolean', 'number', 'string', 'object', 'array'], + + operators: [ + '=', + '>', + '<', + '!', + '~', + '?', + ':', + '==', + '<=', + '>=', + '!=', + '&&', + '||', + '++', + '--', + '+', + '-', + '*', + '/', + '&', + '|', + '^', + '%', + '<<', + '>>', + '>>>', + '+=', + '-=', + '*=', + '/=', + '&=', + '|=', + '^=', + '%=', + '<<=', + '>>=', + '>>>=' + ], + + // Symbols that can be used in identifiers + symbols: /[=>/, { token: 'tag', next: '@template' }], + // Script block + [//, { token: 'tag', next: '@script' }], + // Style block + [//, { token: 'tag', next: '@style' }], + // Other content + { include: '@whitespace' }, + { include: '@tags' } + ], + + // Template section + template: [ + [/<\/template>/, { token: 'tag', next: '@pop' }], + [/{{/, { token: 'delimiter.bracket', next: '@templateExpression' }], + [/<\/?[\w\-:.]+/, 'tag'], + [/\s+/, ''], + [/[^<{]+/, 'html'] + ], + + // Script section + script: [[/<\/script>/, { token: 'tag', next: '@pop' }], { include: '@javascript' }], + + // Style section + style: [[/<\/style>/, { token: 'tag', next: '@pop' }], { include: '@css' }], + + // Template expressions (inside {{ }}) + templateExpression: [ + [/}}/, { token: 'delimiter.bracket', next: '@pop' }], + [/[a-zA-Z_]\w*/, 'identifier'], + { include: '@javascript' } + ], + + // JavaScript rules + javascript: [ + [/[{}]/, 'delimiter.bracket'], + [/[\[\]]/, 'delimiter.square'], + [/[()]/, 'delimiter.parenthesis'], + [ + /[a-zA-Z_]\w*/, + { + cases: { + '@keywords': 'keyword', + '@typeKeywords': 'type', + '@default': 'identifier' + } + } + ], + [/[<>](?!@symbols)/, 'tag'], + [ + /@symbols/, + { + cases: { + '@operators': 'operator', + '@default': '' + } + } + ], + [/\d+\.\d*(@exponent)?/, 'number.float'], + [/\.\d+(@exponent)?/, 'number.float'], + [/\d+@exponent/, 'number.float'], + [/\d+/, 'number'], + [/[;,.]/, 'delimiter'], + [/"([^"\\]|\\.)*$/, 'string.invalid'], + [/'([^'\\]|\\.)*$/, 'string.invalid'], + [/"/, 'string', '@string_double'], + [/'/, 'string', '@string_single'] + ], + + // CSS rules + css: [ + [/[{}]/, 'delimiter.bracket'], + [/[\[\]]/, 'delimiter.square'], + [/[()]/, 'delimiter.parenthesis'], + [/[-a-zA-Z_][\w-]*/, 'attribute.name'], + [/(url\()([^)]]*)(\))/, ['tag', 'string', 'tag']], + [/[@.][-a-zA-Z_][\w-]*/, 'tag'], + [/[<>](?!@symbols)/, 'tag'], + [/#[-a-zA-Z_][\w-]*/, 'tag'], + [/\d+\.\d*(@exponent)?/, 'number.float'], + [/\.\d+(@exponent)?/, 'number.float'], + [/\d+@exponent/, 'number.float'], + [/\d+/, 'number'], + [/[;,.]/, 'delimiter'] + ], + + whitespace: [ + [/[ \t\r\n]+/, 'white'], + [/\/\*/, 'comment', '@comment'], + [/\/\/.*$/, 'comment'] + ], + + comment: [ + [/[^\/*]+/, 'comment'], + [/\*\//, 'comment', '@pop'], + [/[\/*]/, 'comment'] + ], + + string_double: [ + [/[^\\"]+/, 'string'], + [/@escapes/, 'string.escape'], + [/\\./, 'string.escape.invalid'], + [/"/, 'string', '@pop'] + ], + + string_single: [ + [/[^\\']+/, 'string'], + [/@escapes/, 'string.escape'], + [/\\./, 'string.escape.invalid'], + [/'/, 'string', '@pop'] + ], + + tags: [[/<\/?[\w\-:.]+/, 'tag']] + } +} diff --git a/frontend/src/routes/(root)/(logged)/apps/edit/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/apps/edit/[...path]/+page.svelte index 38846ddde2..187ffcee15 100644 --- a/frontend/src/routes/(root)/(logged)/apps/edit/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/apps/edit/[...path]/+page.svelte @@ -36,7 +36,8 @@ } }) const initialState = nodraft ? undefined : localStorage.getItem(`app-${$page.params.path}`) - let stateLoadedFromUrl = initialState != undefined ? decodeState(initialState) : undefined + let stateLoadedFromLocalStorage = + initialState != undefined ? decodeState(initialState) : undefined async function loadApp(): Promise { const app_w_draft = await AppService.getAppByPathWithDraft({ @@ -65,14 +66,14 @@ custom_path: app_w_draft_.custom_path } - if (stateLoadedFromUrl) { + if (stateLoadedFromLocalStorage) { const reloadAction = async () => { - stateLoadedFromUrl = undefined + stateLoadedFromLocalStorage = undefined await loadApp() redraw++ } const actions: ToastAction[] = [] - if (stateLoadedFromUrl) { + if (stateLoadedFromLocalStorage) { actions.push({ label: 'Discard browser autosave and reload', callback: reloadAction @@ -81,7 +82,7 @@ const draftOrDeployed = cleanValueProperties(savedApp.draft || savedApp) const urlScript = { ...draftOrDeployed, - value: stateLoadedFromUrl + value: stateLoadedFromLocalStorage } actions.push({ label: 'Show diff', @@ -99,7 +100,7 @@ } sendUserToast('App restored from browser storage', false, actions) - app_w_draft.value = stateLoadedFromUrl + app_w_draft.value = stateLoadedFromLocalStorage app = app_w_draft } else if (app_w_draft.draft) { if (app_w_draft.summary !== undefined) { @@ -117,7 +118,7 @@ if (!app_w_draft.draft_only) { const reloadAction = () => { - stateLoadedFromUrl = undefined + stateLoadedFromLocalStorage = undefined app = app_w_draft redraw++ } diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/add/+page.svelte b/frontend/src/routes/(root)/(logged)/apps_raw/add/+page.svelte new file mode 100644 index 0000000000..b547827fc0 --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/add/+page.svelte @@ -0,0 +1,190 @@ + + +{#if templatePicker} + +
+ {#each templates as t} + + {/each} +
+
+{/if} +{#if !hide} + { + goto(`/apps_raw/edit/${event.detail}`) + }} + initFiles={files} + initRunnables={runnables} + {policy} + path={''} + {summary} + newApp + /> +{/if} diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/add/templates.ts b/frontend/src/routes/(root)/(logged)/apps_raw/add/templates.ts new file mode 100644 index 0000000000..afa1057dab --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/add/templates.ts @@ -0,0 +1,585 @@ +const reactIndex = ` +import React from 'react' + +import { createRoot } from 'react-dom/client' +import App from './App' + +const root = createRoot(document.getElementById('root')!); +root.render(); +` +const appTsx = `import React, { useState } from 'react' +import { runBg } from './wmill' +import './index.css' + +const App = () => { + const [value, setValue] = useState(undefined as string | undefined) + const [loading, setLoading] = useState(false) + + async function runA() { + setLoading(true) + try { + setValue(await runBg.a({ x: 42 })) + } catch (e) { + console.error() + } + setLoading(false) + } + + return
+

hello world

+ + + +
+ {loading ? 'Loading ...' : value ?? 'Click button to see value here'} +
+
; +}; + +export default App; +`; + +const appSvelte = ` + +
+

Hello {name}

+
+ +` + +const indexSvelte = ` +import { mount } from 'svelte'; +import App from './App.svelte' +import './index.css' + +const app = mount(App, { target: document.getElementById("root")! }); + +export default app; +` + +const appVue = ` + +` + +const indexVue = `import { createApp } from 'vue' +import App from './App.vue' +import "./index.css"; + +createApp(App).mount('#root')` + +const indexCss = `.myclass { + border: 1px solid gray; + padding: 2px; +}`; + +export const react19Template = { + '/index.tsx': reactIndex, + '/App.tsx': appTsx, + '/index.css': indexCss, + '/package.json': `{ + "dependencies": { + "react": "19.0.0", + "react-dom": "19.0.0", + "windmill-client": "^1" + }, + "devDependencies": { + "@types/react-dom": "^19.0.0", + "@types/react": "^19.0.0" + } +}`, +} + +export const react18Template = { + '/index.tsx': reactIndex, + '/App.tsx': appTsx, + '/index.css': indexCss, + '/package.json': `{ + "dependencies": { + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "devDependencies": { + "@types/react-dom": "^19.0.0", + "@types/react": "^19.0.0" + } +}`, +} + +export const svelte5Template = { + '/index.ts': indexSvelte, + '/App.svelte': appSvelte, + '/index.css': indexCss, + '/package.json': `{ + "dependencies": { + "svelte": "5.16.1", + "windmill-client": "^1" + } +}`, +} + +export const vueTemplate = { + '/index.ts': indexVue, + '/App.vue': appVue, + '/index.css': indexCss, + '/package.json': `{ + "dependencies": { + "core-js": "3.26.1", + "vue": "3.5.13" + } +}`, +} + +export const appVueRouter = ` + + + + +` + +export const appSvelteRouter = ` + + +
+ + + + +
+ {#if currentTab === 'home'} +
+

Home

+

Welcome to the home tab!

+ + +
+ {:else if currentTab === 'about'} +
+

About

+

This is the about section

+
+ {:else if currentTab === 'contact'} +
+

Contact

+

Contact information here

+
+ {/if} +
+ + +
+

Current Tab: {currentTab}

+

Current Sort: {currentSort}

+

Current Hash: {currentHash}

+
+
+ +` + +export const appReactRouter = ` +import React, { useState, useEffect } from 'react'; + +const tabs = [ + { id: 'home', name: 'Home' }, + { id: 'about', name: 'About' }, + { id: 'contact', name: 'Contact' } +]; + +const App = () => { + const [currentTab, setCurrentTab] = useState('home'); + const [currentSort, setCurrentSort] = useState('latest'); + const [currentHash, setCurrentHash] = useState(''); + + const updateHash = (newTab?: string, newSort?: string) => { + const params = new URLSearchParams(); + params.set('tab', newTab ?? currentTab); + if ((newSort ?? currentSort) !== 'latest') { + params.set('sort', newSort ?? currentSort); + } + window.location.hash = params.toString(); + setCurrentHash(window.location.hash); + if (newTab) setCurrentTab(newTab); + if (newSort) setCurrentSort(newSort); + }; + + const parseHash = () => { + const params = new URLSearchParams(window.location.hash.slice(1)); + setCurrentTab(params.get('tab') || 'home'); + setCurrentSort(params.get('sort') || 'latest'); + setCurrentHash(window.location.hash); + }; + + useEffect(() => { + if (!window.location.hash) { + updateHash(currentTab, currentSort); + } else { + parseHash(); + } + + const handleHashChange = () => parseHash(); + window.addEventListener('hashchange', handleHashChange); + return () => window.removeEventListener('hashchange', handleHashChange); + }, []); + + return ( +
+ + +
+ {currentTab === 'home' && ( +
+

Home

+

Welcome to the home tab!

+ +
+ {['latest', 'popular'].map(sort => ( + + ))} +
+
+ )} + + {currentTab === 'about' && ( +
+

About

+

This is the about section

+
+ )} + + {currentTab === 'contact' && ( +
+

Contact

+

Contact information here

+
+ )} +
+ +
+

Current Tab: {currentTab}

+

Current Sort: {currentSort}

+

Current Hash: {currentHash}

+
+
+ ); +}; + +export default App +` diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.js b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.js new file mode 100644 index 0000000000..1ae579cdc7 --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.js @@ -0,0 +1,5 @@ +export function load({ params }) { + return { + stuff: { title: `Edit App ${params.path}` } + } +} diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte new file mode 100644 index 0000000000..02e3fde199 --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/edit/[...path]/+page.svelte @@ -0,0 +1,226 @@ + + + + +{#if files} + {#key redraw} +
+ { + goto(`/apps_raw/edit/${event.detail}`) + newPath = event.detail + }} + on:restore={onRestore} + initFiles={files} + initRunnables={runnables} + {summary} + {newPath} + path={$page.params.path} + {policy} + bind:savedApp + {diffDrawer} + version={lastVersion} + newApp={false} + /> +
+ {/key} +{/if} diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.js b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.js new file mode 100644 index 0000000000..5b680f2fd0 --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.js @@ -0,0 +1,5 @@ +export function load({ params }) { + return { + stuff: { title: `App ${params.path}` } + } +} diff --git a/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte new file mode 100644 index 0000000000..e563537341 --- /dev/null +++ b/frontend/src/routes/(root)/(logged)/apps_raw/get/[...path]/+page.svelte @@ -0,0 +1,58 @@ + + +
+ {#if !$workspaceStore || !$userStore || !app} + + {:else} + + {/if} + {#if can_write && !hideEditBtn} +
+ +
+ {/if} +
diff --git a/frontend/src/routes/(root)/(logged)/gcp_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/gcp_triggers/+page.svelte index c5fadefa4e..9fcaa0f202 100644 --- a/frontend/src/routes/(root)/(logged)/gcp_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/gcp_triggers/+page.svelte @@ -11,7 +11,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -21,7 +22,7 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores' + import { enterpriseLicense, usedTriggerKinds, userStore, workspaceStore } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp, ClipboardCopy } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -64,6 +65,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'gcp', $usedTriggerKinds) loading = false } diff --git a/frontend/src/routes/(root)/(logged)/kafka_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/kafka_triggers/+page.svelte index 14a9c4b6f5..5d8c6ba86e 100644 --- a/frontend/src/routes/(root)/(logged)/kafka_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/kafka_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,13 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { userStore, workspaceStore, userWorkspaces, enterpriseLicense } from '$lib/stores' + import { + userStore, + workspaceStore, + userWorkspaces, + enterpriseLicense, + usedTriggerKinds + } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -62,6 +69,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'kafka', $usedTriggerKinds) loading = false } @@ -160,15 +168,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -178,10 +186,10 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set(filteredItems?.map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -380,7 +388,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -427,7 +435,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/(root)/(logged)/mqtt_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/mqtt_triggers/+page.svelte index 7c2cc2a87e..4a78f7e35e 100644 --- a/frontend/src/routes/(root)/(logged)/mqtt_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/mqtt_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,7 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores' + import { enterpriseLicense, usedTriggerKinds, userStore, workspaceStore } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -62,6 +63,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'mqtt', $usedTriggerKinds) loading = false } @@ -160,15 +162,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -178,10 +180,10 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set(filteredItems?.map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -360,7 +362,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -407,7 +409,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/(root)/(logged)/nats_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/nats_triggers/+page.svelte index 54d8496cb3..9e18225165 100644 --- a/frontend/src/routes/(root)/(logged)/nats_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/nats_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,13 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { userStore, workspaceStore, userWorkspaces, enterpriseLicense } from '$lib/stores' + import { + userStore, + workspaceStore, + userWorkspaces, + enterpriseLicense, + usedTriggerKinds + } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -61,6 +68,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'nats', $usedTriggerKinds) loading = false } @@ -159,15 +167,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -177,10 +185,10 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set(filteredItems?.map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -379,7 +387,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -426,7 +434,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte index 7af681c309..a23c23381e 100644 --- a/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/postgres_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,7 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores' + import { enterpriseLicense, usedTriggerKinds, userStore, workspaceStore } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, Database, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -61,6 +62,7 @@ ).map((x) => { return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } }) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'postgres', $usedTriggerKinds) loading = false } diff --git a/frontend/src/routes/(root)/(logged)/routes/+page.svelte b/frontend/src/routes/(root)/(logged)/routes/+page.svelte index 1a33fae1be..89163b464a 100644 --- a/frontend/src/routes/(root)/(logged)/routes/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/routes/+page.svelte @@ -10,7 +10,8 @@ copyToClipboard, displayDate, getLocalSetting, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,13 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { userStore, workspaceStore, userWorkspaces, enterpriseLicense } from '$lib/stores' + import { + userStore, + workspaceStore, + userWorkspaces, + enterpriseLicense, + usedTriggerKinds + } from '$lib/stores' import { Route, Code, Eye, Pen, Plus, Share, Trash, FileUp, ClipboardCopy } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -60,6 +67,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'routes', $usedTriggerKinds) loading = false } @@ -115,15 +123,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -133,14 +141,14 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set( filteredItems ?.filter((x) => x.script_path) .map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? [] ) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -299,7 +307,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -347,7 +355,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte index 5049bf5661..2160d7adc7 100644 --- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte @@ -955,18 +955,22 @@ class="py-4 max-w-7xl mx-auto px-4" />
- { - job = detail - }} - on:done={(e) => { - job = e.detail - }} - initialJob={job} - workspaceId={$workspaceStore} - bind:selectedJobStep - /> + {#if job?.id} + { + job = detail + }} + on:done={(e) => { + job = e.detail + }} + initialJob={job} + workspaceId={$workspaceStore} + bind:selectedJobStep + /> + {:else} + + {/if}
{/if}
diff --git a/frontend/src/routes/(root)/(logged)/sqs_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/sqs_triggers/+page.svelte index 91869fc2a5..b5a5522652 100644 --- a/frontend/src/routes/(root)/(logged)/sqs_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/sqs_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,7 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores' + import { enterpriseLicense, usedTriggerKinds, userStore, workspaceStore } from '$lib/stores' import { Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -61,6 +62,7 @@ return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } } ) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'sqs', $usedTriggerKinds) loading = false } @@ -159,15 +161,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -177,10 +179,10 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set(filteredItems?.map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -357,7 +359,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -408,7 +410,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte b/frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte index 9aaa45728f..ceaf3950c4 100644 --- a/frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/websocket_triggers/+page.svelte @@ -10,7 +10,8 @@ displayDate, getLocalSetting, sendUserToast, - storeLocalSetting + storeLocalSetting, + removeTriggerKindIfUnused } from '$lib/utils' import { base } from '$app/paths' import CenteredPage from '$lib/components/CenteredPage.svelte' @@ -20,7 +21,7 @@ import SharedBadge from '$lib/components/SharedBadge.svelte' import ShareModal from '$lib/components/ShareModal.svelte' import Toggle from '$lib/components/Toggle.svelte' - import { enterpriseLicense, userStore, workspaceStore } from '$lib/stores' + import { enterpriseLicense, usedTriggerKinds, userStore, workspaceStore } from '$lib/stores' import { Unplug, Code, Eye, Pen, Plus, Share, Trash, Circle, FileUp } from 'lucide-svelte' import { goto } from '$lib/navigation' import SearchItems from '$lib/components/SearchItems.svelte' @@ -60,6 +61,7 @@ ).map((x) => { return { canWrite: canWrite(x.path, x.extra_perms!, $userStore), ...x } }) + $usedTriggerKinds = removeTriggerKindIfUnused(triggers.length, 'websockets', $usedTriggerKinds) loading = false } @@ -158,15 +160,15 @@ (x) => x.path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter( (x) => x.script_path.startsWith(ownerFilter + '/') && filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) : triggers?.filter((x) => filterItemsPathsBaseOnUserFilters(x, selectedFilterKind, filterUserFolders) - ) + ) $: if ($workspaceStore) { ownerFilter = undefined @@ -176,10 +178,10 @@ selectedFilterKind === 'trigger' ? Array.from( new Set(filteredItems?.map((x) => x.path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() : Array.from( new Set(filteredItems?.map((x) => x.script_path.split('/').slice(0, 2).join('/')) ?? []) - ).sort() + ).sort() $: items = filter !== '' ? filteredItems : preFilteredItems @@ -304,8 +306,8 @@ {url.startsWith('$script:') ? 'URL: ' + url.replace('$script:', 'result of script ') : url.startsWith('$flow:') - ? 'URL: ' + url.replace('$flow:', 'result of flow ') - : url} + ? 'URL: ' + url.replace('$flow:', 'result of flow ') + : url} {/if}
@@ -370,7 +372,7 @@ ? { icon: Pen } : { icon: Eye - }} + }} color="dark" > {canWrite ? 'Edit' : 'View'} @@ -417,7 +419,7 @@ }) } } - ] + ] : []), { displayName: 'Audit logs', diff --git a/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte b/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte index 826e0f0bb4..bdb984fdc8 100644 --- a/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte +++ b/frontend/src/routes/approve/[workspace]/[job]/[resume]/[hmac]/+page.svelte @@ -266,7 +266,7 @@ >
{/if} - {#if !completed && !alreadyResumed && job?.raw_flow?.modules?.[approvalStep]?.suspend?.user_auth_required && job?.raw_flow?.modules?.[approvalStep]?.suspend?.self_approval_disabled && $userStore && $userStore.email === job.email && $userStore.is_admin} + {#if !completed && !alreadyResumed && job?.raw_flow?.modules?.[approvalStep]?.suspend?.user_auth_required && job?.raw_flow?.modules?.[approvalStep]?.suspend?.self_approval_disabled && $userStore && $userStore.email === job.email && ($userStore.is_admin || $userStore.is_super_admin)}
As an administrator, by resuming or cancelling this stage of the flow, you bypass the diff --git a/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.js b/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.js new file mode 100644 index 0000000000..42a8b51427 --- /dev/null +++ b/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.js @@ -0,0 +1,5 @@ +export function load({ params }) { + return { + stuff: { title: `Public App` } + } +} diff --git a/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.svelte b/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.svelte new file mode 100644 index 0000000000..dcbd614a7a --- /dev/null +++ b/frontend/src/routes/apps_raw/[workspace]/[...version]/+page.svelte @@ -0,0 +1,11 @@ + + + diff --git a/frontend/src/routes/test_dev_page_2/+page.svelte b/frontend/src/routes/test_dev_page_2/+page.svelte index 1d37caa52b..872eb7f3d2 100644 --- a/frontend/src/routes/test_dev_page_2/+page.svelte +++ b/frontend/src/routes/test_dev_page_2/+page.svelte @@ -1,4 +1,4 @@ diff --git a/frontend/static/_headers b/frontend/static/_headers new file mode 100644 index 0000000000..c3720e5180 --- /dev/null +++ b/frontend/static/_headers @@ -0,0 +1,3 @@ +/* + Cross-Origin-Opener-Policy: same-origin + Cross-Origin-Embedder-Policy: require-corp diff --git a/frontend/svelte.config.js b/frontend/svelte.config.js index 12eae9d139..afda85f8eb 100644 --- a/frontend/svelte.config.js +++ b/frontend/svelte.config.js @@ -10,8 +10,8 @@ const config = { preprocess({ postcss: true }), - preprocessMeltUI() - ]), + preprocessMeltUI() + ]), kit: { adapter: @@ -22,7 +22,7 @@ const config = { pages: 'build', assets: 'build', fallback: '200.html' - }), + }), prerender: { entries: [] }, paths: { base: process.env.VITE_BASE_URL ?? '' diff --git a/frontend/use_latest_ui_builder.sh b/frontend/use_latest_ui_builder.sh new file mode 100755 index 0000000000..e858de69c6 --- /dev/null +++ b/frontend/use_latest_ui_builder.sh @@ -0,0 +1,5 @@ +cd ../../windmill-ui-code-builder +HASH=$(git rev-parse --short HEAD) +HASH=${HASH::-1} + +sed -i "s/ui_builder-[^.]*\.tar\.gz/ui_builder-${HASH}.tar.gz/" ../windmill/frontend/scripts/untar_ui_builder.js diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 873a68c042..463bb00661 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -1,8 +1,7 @@ import { sveltekit } from '@sveltejs/kit/vite' import { readFileSync } from 'fs' import { fileURLToPath } from 'url' -import circleDependency from 'vite-plugin-circular-dependency' -// import mkcert from 'vite-plugin-mkcert' +import mkcert from 'vite-plugin-mkcert' import importMetaUrlPlugin from '@windmill-labs/esbuild-import-meta-url-plugin' const file = fileURLToPath(new URL('package.json', import.meta.url)) @@ -12,7 +11,7 @@ const version = JSON.parse(json) /** @type {import('vite').UserConfig} */ const config = { server: { - https: false, + https: process.env.HTTPS === 'true', port: 3000, proxy: { '^/api/.*': { @@ -29,13 +28,22 @@ const config = { target: process.env.REMOTE_MP ?? 'https://app.windmill.dev', changeOrigin: true, ws: true + }, + '^/ui_builder/.*': { + target: 'http://localhost:4000', + changeOrigin: true, + headers: { + 'Cross-Origin-Opener-Policy': 'same-origin', + 'Cross-Origin-Embedder-Policy': 'require-corp', + 'Cross-Origin-Resource-Policy': 'cross-origin' + } } } }, preview: { port: 3000 }, - plugins: [sveltekit(), circleDependency({ circleImportThrowErr: false })], + plugins: [sveltekit(), ...(process.env.HTTPS === 'true' ? [mkcert()] : [])], define: { __pkg__: version }, @@ -49,6 +57,9 @@ const config = { plugins: [importMetaUrlPlugin] } }, + worker: { + format: 'es' + }, resolve: { alias: { path: 'path-browserify', @@ -57,9 +68,6 @@ const config = { }, dedupe: ['vscode', 'monaco-editor'] }, - worker: { - format: 'es' - }, assetsInclude: ['**/*.wasm'] } diff --git a/functions/api/[[path]].ts b/functions/api/[[path]].ts index 4ec6873720..62a8ac80d4 100644 --- a/functions/api/[[path]].ts +++ b/functions/api/[[path]].ts @@ -30,6 +30,10 @@ export async function onRequest(context) { ?.split("token") .pop() ?? "" ); + + newResponse.headers.set("Cross-Origin-Resource-Policy", "cross-origin"); + newResponse.headers.set("Cross-Origin-Opener-Policy", "same-origin"); + newResponse.headers.set("Cross-Origin-Embedder-Policy", "require-corp"); return newResponse; } catch (e) { return new Response(e.message, { status: 500 }); diff --git a/lsp/Pipfile b/lsp/Pipfile index 4128f31f60..a261d308a7 100644 --- a/lsp/Pipfile +++ b/lsp/Pipfile @@ -4,8 +4,8 @@ verify_ssl = true name = "pypi" [packages] -wmill = ">=1.481.0" -wmill_pg = ">=1.481.0" +wmill = ">=1.483.2" +wmill_pg = ">=1.483.2" sendgrid = "*" mysql-connector-python = "*" pymongo = "*" diff --git a/openflow.openapi.yaml b/openflow.openapi.yaml index de1b475a94..1be14fd156 100644 --- a/openflow.openapi.yaml +++ b/openflow.openapi.yaml @@ -1,7 +1,7 @@ openapi: "3.0.3" info: - version: 1.481.0 + version: 1.483.2 title: OpenFlow Spec contact: name: Ruben Fiszel diff --git a/powershell-client/WindmillClient/WindmillClient.psd1 b/powershell-client/WindmillClient/WindmillClient.psd1 index 7a205b98f7..9dbaba6de3 100644 --- a/powershell-client/WindmillClient/WindmillClient.psd1 +++ b/powershell-client/WindmillClient/WindmillClient.psd1 @@ -12,7 +12,7 @@ RootModule = 'WindmillClient.psm1' # Version number of this module. - ModuleVersion = '1.481.0' + ModuleVersion = '1.483.2' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/python-client/wmill/pyproject.toml b/python-client/wmill/pyproject.toml index aa01391777..58adf9b51e 100644 --- a/python-client/wmill/pyproject.toml +++ b/python-client/wmill/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill" -version = "1.481.0" +version = "1.483.2" description = "A client library for accessing Windmill server wrapping the Windmill client API" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/python-client/wmill_pg/pyproject.toml b/python-client/wmill_pg/pyproject.toml index 60c0cbd728..1d155b23e0 100644 --- a/python-client/wmill_pg/pyproject.toml +++ b/python-client/wmill_pg/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "wmill-pg" -version = "1.481.0" +version = "1.483.2" description = "An extension client for the wmill client library focused on pg" license = "Apache-2.0" homepage = "https://windmill.dev" diff --git a/typescript-client/jsr.json b/typescript-client/jsr.json index e37ca23e7f..071d935988 100644 --- a/typescript-client/jsr.json +++ b/typescript-client/jsr.json @@ -1,6 +1,6 @@ { "name": "@windmill/windmill", - "version": "1.481.0", + "version": "1.483.2", "exports": "./src/index.ts", "publish": { "exclude": ["!src", "./s3Types.ts", "./client.ts"] diff --git a/typescript-client/package.json b/typescript-client/package.json index 14be6fa471..e7c9f89a25 100644 --- a/typescript-client/package.json +++ b/typescript-client/package.json @@ -1,7 +1,7 @@ { "name": "windmill-client", "description": "Windmill SDK client for browsers and Node.js", - "version": "1.481.0", + "version": "1.483.2", "author": "Ruben Fiszel", "license": "Apache 2.0", "devDependencies": { diff --git a/version.txt b/version.txt index 11ccffe4f9..236eaf0673 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.481.0 +1.483.2