@pyric/cli 0.1.0-alpha.27 → 0.1.0-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assurance/.generated/conformance-verdicts.d.ts +16 -0
- package/dist/assurance/.generated/conformance-verdicts.d.ts.map +1 -1
- package/dist/assurance/.generated/conformance-verdicts.js +16 -0
- package/dist/assurance/.generated/conformance-verdicts.js.map +1 -1
- package/dist/bridge/surface/arguments/assurance.d.ts +6 -6
- package/dist/bridge/surface/arguments/messaging.d.ts +2 -2
- package/dist/bridge/surface/methods/assurance/map.d.ts +6 -6
- package/dist/bridge/surface/methods/assurance/replaySession.d.ts.map +1 -1
- package/dist/bridge/surface/methods/assurance/replaySession.js +18 -6
- package/dist/bridge/surface/methods/assurance/replaySession.js.map +1 -1
- package/dist/bridge/surface/methods/messaging/send.d.ts +4 -4
- package/dist/bridge/surface/render/discriminator-schemas.d.ts +4 -4
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +15 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/run.d.ts +42 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +115 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/conformance/.generated/can-i-use.d.ts.map +1 -1
- package/dist/conformance/.generated/can-i-use.js +1 -1
- package/dist/conformance/.generated/can-i-use.js.map +1 -1
- package/dist/conformance/.generated/conformance-docs.d.ts.map +1 -1
- package/dist/conformance/.generated/conformance-docs.js +1 -1
- package/dist/conformance/.generated/conformance-docs.js.map +1 -1
- package/dist/remote/local-storage-url.d.ts +2 -15
- package/dist/remote/local-storage-url.d.ts.map +1 -1
- package/dist/remote/local-storage-url.js +1 -60
- package/dist/remote/local-storage-url.js.map +1 -1
- package/dist/serve/assets/avatar-route.d.ts.map +1 -1
- package/dist/serve/assets/avatar-route.js +6 -6
- package/dist/serve/assets/avatar-route.js.map +1 -1
- package/dist/serve/assets/resolver.d.ts +3 -0
- package/dist/serve/assets/resolver.d.ts.map +1 -1
- package/dist/serve/assets/resolver.js +1 -1
- package/dist/serve/assets/resolver.js.map +1 -1
- package/dist/serve/entries/app-client.d.ts.map +1 -1
- package/dist/serve/entries/app-client.js +6 -0
- package/dist/serve/entries/app-client.js.map +1 -1
- package/dist/serve/site-ui/_astro/{RulesCodeEditor.kBYcclwV.js → RulesCodeEditor.Cp_-FK3b.js} +1 -1
- package/dist/serve/site-ui/_astro/app.C--T2qDK.js +151 -0
- package/dist/serve/site-ui/_astro/app.DqyhRyrU.js +1 -0
- package/dist/serve/site-ui/_astro/{chess-showcase.CZe_3fJZ.js → chess-showcase.CVhCNUi_.js} +1 -1
- package/dist/serve/site-ui/_astro/{example-runtime.CXSZXHZF.js → example-runtime.zC1l-Yka.js} +1 -1
- package/dist/serve/site-ui/_astro/{sandbox-controls.Bp5PoonS.js → sandbox-controls.Bv6lfpIe.js} +39 -39
- package/dist/serve/site-ui/_astro/{seed.BpXSRzLo.js → seed.B4vza_Bv.js} +1 -1
- package/dist/serve/site-ui/_astro/{writes.DHSW22XD.js → writes.Bg0YEEA7.js} +1 -1
- package/dist/serve/site-ui/auth/index.html +1 -1
- package/dist/serve/site-ui/docs/_rhythm/index.html +1 -1
- package/dist/serve/site-ui/docs/agent/set-up-your-agent/index.html +1 -1
- package/dist/serve/site-ui/docs/agent/watch-and-review/index.html +1 -1
- package/dist/serve/site-ui/docs/agent/work-with-an-agent/index.html +1 -1
- package/dist/serve/site-ui/docs/ai-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/api-reference/index.html +2 -1
- package/dist/serve/site-ui/docs/api-reference.md +1 -0
- package/dist/serve/site-ui/docs/app-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/auth-compat/index.html +2 -2
- package/dist/serve/site-ui/docs/auth-compat.md +1 -1
- package/dist/serve/site-ui/docs/auth-flutter-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/auth-kotlin-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/auth-swift-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/build/ai-logic/index.html +1 -1
- package/dist/serve/site-ui/docs/build/authentication/index.html +1 -1
- package/dist/serve/site-ui/docs/build/cloud-firestore/index.html +1 -1
- package/dist/serve/site-ui/docs/build/cloud-messaging/index.html +1 -1
- package/dist/serve/site-ui/docs/build/cloud-storage/index.html +13 -2
- package/dist/serve/site-ui/docs/build/cloud-storage.md +23 -0
- package/dist/serve/site-ui/docs/build/default-avatars/index.html +1 -1
- package/dist/serve/site-ui/docs/build/inspect-activity/index.html +1 -1
- package/dist/serve/site-ui/docs/build/realtime-database/index.html +1 -1
- package/dist/serve/site-ui/docs/conformance-scores/index.html +1 -1
- package/dist/serve/site-ui/docs/create-pyric-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/database-compat/index.html +18 -18
- package/dist/serve/site-ui/docs/database-compat.md +17 -17
- package/dist/serve/site-ui/docs/examples/chess/index.html +1 -1
- package/dist/serve/site-ui/docs/examples/index.html +1 -1
- package/dist/serve/site-ui/docs/firestore-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/firestore-flutter-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/firestore-kotlin-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/firestore-swift-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/functions-rtdb-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/backend-bundlers/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/flutter/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/how-the-swap-works/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/nextjs/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/node-host/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/start-building/index.html +1 -1
- package/dist/serve/site-ui/docs/get-started/vite/index.html +4 -2
- package/dist/serve/site-ui/docs/get-started/vite.md +4 -0
- package/dist/serve/site-ui/docs/index.json +60 -10
- package/dist/serve/site-ui/docs/messaging-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/observe/resolve-runtime-status/index.html +1 -1
- package/dist/serve/site-ui/docs/observe/see-whats-happening/index.html +1 -1
- package/dist/serve/site-ui/docs/observe/shape-your-data/index.html +1 -1
- package/dist/serve/site-ui/docs/observe/switch-and-impersonate-identities/index.html +1 -1
- package/dist/serve/site-ui/docs/overview/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-app-check-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-app-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-auth-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-data-connect-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-database-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-eventarc-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-extensions-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-firestore-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-functions-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-installations-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-instance-id-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-machine-learning-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-messaging-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-phone-number-verification-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-project-management-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-remote-config-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-security-rules-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-admin-storage-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ai-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ai-scripting-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-analytics-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-app-check-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-app-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-auth-reference-api/index.html +2 -2
- package/dist/serve/site-ui/docs/pyric-auth-reference-api.md +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-assurance-browser-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-assurance-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-bridge-client-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-bridge-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-bundler-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-conformance-browser-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-conformance-docs-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-conformance-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-credentials-node-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-discover-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-flow-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-next-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-app-bridge-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-app-bridge-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-app-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-auth-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-database-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-firestore-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-client-storage-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-register-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-remote-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-repro-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-serve-worker-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-verify-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-cli-vite-reference-api/index.html +17 -3
- package/dist/serve/site-ui/docs/pyric-cli-vite-reference-api.md +7 -5
- package/dist/serve/site-ui/docs/pyric-cli-vite-ssr-loader-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-database-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-firestore-lite-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-firestore-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-functions-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-messaging-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-messaging-sw-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-performance-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-remote-config-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-rules-reference-api/index.html +120 -120
- package/dist/serve/site-ui/docs/pyric-rules-reference-api.md +53 -53
- package/dist/serve/site-ui/docs/pyric-sandbox-branches-store-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-sandbox-checkpoints-directory-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-sandbox-checkpoints-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-sandbox-database-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-sandbox-firestore-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-sandbox-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-storage-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-storage-sw-reference-api/index.html +102 -0
- package/dist/serve/site-ui/docs/pyric-storage-sw-reference-api.md +76 -0
- package/dist/serve/site-ui/docs/pyric-ui-agents-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-auth-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-auth-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-events-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-events-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-firestore-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-firestore-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-listener-owner-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-primitives-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-rtdb-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-rules-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-rules-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-storage-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-storage-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-traffic-hooks-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/pyric-ui-traffic-reference-api/index.html +1 -1
- package/dist/serve/site-ui/docs/reference/cli/index.html +12 -2
- package/dist/serve/site-ui/docs/reference/cli.md +24 -0
- package/dist/serve/site-ui/docs/rtdb-flutter-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/rtdb-kotlin-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/rtdb-swift-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/rules-compat/index.html +68 -4
- package/dist/serve/site-ui/docs/rules-compat.md +67 -3
- package/dist/serve/site-ui/docs/secure/audit-your-rules/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/firestore-rules-limits/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/read-a-denial/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/rtdb-rules-in-typescript/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/rtdb-rules-standard-library/index.html +18 -5
- package/dist/serve/site-ui/docs/secure/rtdb-rules-standard-library.md +19 -4
- package/dist/serve/site-ui/docs/secure/rules-standard-library/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/secure-it-with-rules/index.html +1 -1
- package/dist/serve/site-ui/docs/secure/simulate-and-lint/index.html +5 -5
- package/dist/serve/site-ui/docs/secure/simulate-and-lint.md +8 -8
- package/dist/serve/site-ui/docs/secure/write-a-rules-test-suite/index.html +1 -1
- package/dist/serve/site-ui/docs/ship/ship-to-production/index.html +1 -1
- package/dist/serve/site-ui/docs/ship/test-in-node/index.html +1 -1
- package/dist/serve/site-ui/docs/storage-compat/index.html +1 -1
- package/dist/serve/site-ui/docs/trust/how-we-know-it-matches-firebase/index.html +1 -1
- package/dist/serve/site-ui/docs/trust/rules-standard-library/index.html +1 -1
- package/dist/serve/site-ui/docs/trust/versioning-and-compatibility/index.html +1 -1
- package/dist/serve/site-ui/docs/tutorial/index.html +1 -1
- package/dist/serve/site-ui/examples/chess/index.html +1 -1
- package/dist/serve/site-ui/firestore/index.html +1 -1
- package/dist/serve/site-ui/llms.txt +1 -0
- package/dist/serve/site-ui/rtdb/index.html +1 -1
- package/dist/serve/site-ui/settings/index.html +1 -1
- package/dist/serve/site-ui/storage/index.html +1 -1
- package/dist/serve/site-ui/studio/index.html +1 -1
- package/dist/serve/site-ui/traffic/index.html +1 -1
- package/dist/serve/vite-plugin.d.ts +6 -0
- package/dist/serve/vite-plugin.d.ts.map +1 -1
- package/dist/serve/vite-plugin.js +11 -1
- package/dist/serve/vite-plugin.js.map +1 -1
- package/dist/serve/vite-service-worker.d.ts +12 -0
- package/dist/serve/vite-service-worker.d.ts.map +1 -0
- package/dist/serve/vite-service-worker.js +33 -0
- package/dist/serve/vite-service-worker.js.map +1 -0
- package/dist/serve/worker/client/auth.d.ts.map +1 -1
- package/dist/serve/worker/client/auth.js +4 -3
- package/dist/serve/worker/client/auth.js.map +1 -1
- package/dist/serve/worker/client/rtdb-info.d.ts +0 -2
- package/dist/serve/worker/client/rtdb-info.d.ts.map +1 -1
- package/dist/serve/worker/client/rtdb-info.js +4 -17
- package/dist/serve/worker/client/rtdb-info.js.map +1 -1
- package/dist/serve/worker/client/rtdb-reads.d.ts.map +1 -1
- package/dist/serve/worker/client/rtdb-reads.js +3 -5
- package/dist/serve/worker/client/rtdb-reads.js.map +1 -1
- package/dist/serve/worker/host/auth-action-codes.js +2 -2
- package/dist/serve/worker/host/auth-action-codes.js.map +1 -1
- package/dist/serve/worker/host/auth-custom-token.d.ts.map +1 -1
- package/dist/serve/worker/host/auth-custom-token.js +4 -2
- package/dist/serve/worker/host/auth-custom-token.js.map +1 -1
- package/dist/serve/worker/host/dispatch.d.ts.map +1 -1
- package/dist/serve/worker/host/dispatch.js +3 -1
- package/dist/serve/worker/host/dispatch.js.map +1 -1
- package/dist/serve/worker/host-auth.d.ts +6 -0
- package/dist/serve/worker/host-auth.d.ts.map +1 -1
- package/dist/serve/worker/host-auth.js +16 -5
- package/dist/serve/worker/host-auth.js.map +1 -1
- package/dist/serve/worker/inbound-validation.d.ts.map +1 -1
- package/dist/serve/worker/inbound-validation.js +1 -0
- package/dist/serve/worker/inbound-validation.js.map +1 -1
- package/dist/serve/worker/protocol/storage.d.ts +1 -8
- package/dist/serve/worker/protocol/storage.d.ts.map +1 -1
- package/dist/serve/worker/protocol/storage.js +2 -14
- package/dist/serve/worker/protocol/storage.js.map +1 -1
- package/dist/serve/worker/protocol.d.ts +2 -0
- package/dist/serve/worker/protocol.d.ts.map +1 -1
- package/dist/serve/worker/protocol.js.map +1 -1
- package/package.json +12 -8
- package/src/assurance/.generated/conformance-verdicts.ts +16 -0
- package/src/bridge/surface/methods/assurance/replaySession.ts +19 -6
- package/src/cli/index.ts +15 -1
- package/src/cli/run.ts +139 -0
- package/src/conformance/.generated/can-i-use.ts +1 -1
- package/src/conformance/.generated/conformance-docs.ts +1 -1
- package/src/remote/local-storage-url.ts +1 -58
- package/src/serve/assets/avatar-route.ts +6 -7
- package/src/serve/assets/resolver.ts +4 -1
- package/src/serve/entries/app-client.ts +7 -0
- package/src/serve/vite-plugin.ts +15 -1
- package/src/serve/vite-service-worker.ts +44 -0
- package/src/serve/worker/client/auth.ts +4 -3
- package/src/serve/worker/client/rtdb-info.ts +4 -17
- package/src/serve/worker/client/rtdb-reads.ts +3 -4
- package/src/serve/worker/host/auth-action-codes.ts +2 -2
- package/src/serve/worker/host/auth-custom-token.ts +4 -2
- package/src/serve/worker/host/dispatch.ts +2 -0
- package/src/serve/worker/host-auth.ts +18 -5
- package/src/serve/worker/inbound-validation.ts +1 -0
- package/src/serve/worker/protocol/storage.ts +2 -14
- package/src/serve/worker/protocol.ts +2 -0
- package/dist/serve/site-ui/_astro/app.CiMHEvEW.js +0 -147
- package/dist/serve/site-ui/_astro/app.DpzsBfos.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conformance-docs.js","sourceRoot":"","sources":["../../../src/conformance/.generated/conformance-docs.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,sBAAsB,GAAmC,CAAC,EAAC,MAAM,EAAC,oBAAoB,EAAC,OAAO,EAAC,oBAAoB,EAAC,OAAO,EAAC,oBAAoB,EAAC,UAAU,EAAC,87PAA87P,EAAC,EAAC,EAAC,MAAM,EAAC,YAAY,EAAC,OAAO,EAAC,KAAK,EAAC,OAAO,EAAC,gCAAgC,EAAC,UAAU,EAAC,i2rBAAi2rB,EAAC,EAAC,EAAC,MAAM,EAAC,WAAW,EAAC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BAA4yyB,EAAC,EAAC,EAAC,MAAM,EAAC,mBAAmB,EAAC,OAAO,EAAC,2BAA2B,EAAC,OAAO,EAAC,yCAAyC,EAAC,UAAU,EAAC,+1xBAA+1xB,EAAC,CAAC,CAAC"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
* download URL names.
|
|
4
|
-
*
|
|
5
|
-
* It takes the download URL form
|
|
6
|
-
* (`https://firebasestorage.googleapis.com/v0/b/<bucket>/o/<path>?alt=media&token=…`)
|
|
7
|
-
* and the Cloud Storage forms (`https://storage.googleapis.com/<bucket>/<path>`,
|
|
8
|
-
* `storage.cloud.google.com`), names the same bucket and object on the host's
|
|
9
|
-
* byte route, and keeps the URL's `token`. A token set through
|
|
10
|
-
* `firebaseStorageDownloadTokens` therefore grants the local URL as it granted
|
|
11
|
-
* the production one. Other query parameters, such as `generation`, name
|
|
12
|
-
* production state and are dropped. A Cloud Storage URL carries no token, so
|
|
13
|
-
* the host grants its local URL only once a token is added to it.
|
|
14
|
-
*
|
|
15
|
-
* Returns undefined for a URL that names no object on those hosts.
|
|
2
|
+
* The host's URL for an object an app server holds a production download URL for.
|
|
16
3
|
*/
|
|
17
|
-
export
|
|
4
|
+
export { localStorageUrl } from 'pyric/storage/internal';
|
|
18
5
|
//# sourceMappingURL=local-storage-url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage-url.d.ts","sourceRoot":"","sources":["../../src/remote/local-storage-url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-storage-url.d.ts","sourceRoot":"","sources":["../../src/remote/local-storage-url.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,64 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The host's URL for an object an app server holds a production download URL for.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
import { storageObjectPath } from '../serve/worker/protocol.js';
|
|
6
|
-
/** The hosts production serves Storage objects from. */
|
|
7
|
-
const PRODUCTION_STORAGE_HOSTS = new Set([
|
|
8
|
-
'firebasestorage.googleapis.com',
|
|
9
|
-
'storage.googleapis.com',
|
|
10
|
-
'storage.cloud.google.com',
|
|
11
|
-
]);
|
|
12
|
-
/** Cloud Storage's JSON API paths, which share `storage.googleapis.com` but do not start with a bucket. */
|
|
13
|
-
const JSON_API_PATH = /^\/(?:download\/|upload\/)?storage\/v1\//;
|
|
14
|
-
/** The bucket and object a production URL names, or undefined when it names none. */
|
|
15
|
-
function productionLocationOf(url) {
|
|
16
|
-
const isProductionHost = PRODUCTION_STORAGE_HOSTS.has(url.hostname);
|
|
17
|
-
if (!isProductionHost)
|
|
18
|
-
return undefined;
|
|
19
|
-
const isJsonApi = JSON_API_PATH.test(url.pathname);
|
|
20
|
-
if (isJsonApi)
|
|
21
|
-
return undefined;
|
|
22
|
-
let location;
|
|
23
|
-
try {
|
|
24
|
-
location = parseStorageUrl(url.href);
|
|
25
|
-
}
|
|
26
|
-
catch {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
const namesAnObject = location.path !== '';
|
|
30
|
-
if (!namesAnObject)
|
|
31
|
-
return undefined;
|
|
32
|
-
return location;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The byte route URL, on the host at `hostOrigin`, for the object a production
|
|
36
|
-
* download URL names.
|
|
37
|
-
*
|
|
38
|
-
* It takes the download URL form
|
|
39
|
-
* (`https://firebasestorage.googleapis.com/v0/b/<bucket>/o/<path>?alt=media&token=…`)
|
|
40
|
-
* and the Cloud Storage forms (`https://storage.googleapis.com/<bucket>/<path>`,
|
|
41
|
-
* `storage.cloud.google.com`), names the same bucket and object on the host's
|
|
42
|
-
* byte route, and keeps the URL's `token`. A token set through
|
|
43
|
-
* `firebaseStorageDownloadTokens` therefore grants the local URL as it granted
|
|
44
|
-
* the production one. Other query parameters, such as `generation`, name
|
|
45
|
-
* production state and are dropped. A Cloud Storage URL carries no token, so
|
|
46
|
-
* the host grants its local URL only once a token is added to it.
|
|
47
|
-
*
|
|
48
|
-
* Returns undefined for a URL that names no object on those hosts.
|
|
49
|
-
*/
|
|
50
|
-
export function localStorageUrl(productionUrl, hostOrigin) {
|
|
51
|
-
let url;
|
|
52
|
-
try {
|
|
53
|
-
url = new URL(productionUrl);
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
const location = productionLocationOf(url);
|
|
59
|
-
if (location === undefined)
|
|
60
|
-
return undefined;
|
|
61
|
-
const token = url.searchParams.get('token') ?? undefined;
|
|
62
|
-
return new URL(storageObjectPath(location.bucket, location.path, token), hostOrigin).href;
|
|
63
|
-
}
|
|
4
|
+
export { localStorageUrl } from 'pyric/storage/internal';
|
|
64
5
|
//# sourceMappingURL=local-storage-url.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage-url.js","sourceRoot":"","sources":["../../src/remote/local-storage-url.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"local-storage-url.js","sourceRoot":"","sources":["../../src/remote/local-storage-url.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-route.d.ts","sourceRoot":"","sources":["../../../src/serve/assets/avatar-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,KAAK,EAA6B,aAAa,EAAE,MAAM,eAAe,CAAC;AAS9E;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAejE;
|
|
1
|
+
{"version":3,"file":"avatar-route.d.ts","sourceRoot":"","sources":["../../../src/serve/assets/avatar-route.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGjE,OAAO,KAAK,EAA6B,aAAa,EAAE,MAAM,eAAe,CAAC;AAS9E;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAejE;AA2CD;;;GAGG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,aAAa,EACvB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,IAAI,CAAC,CA4Cf"}
|
|
@@ -44,7 +44,11 @@ export function avatarUidFromPath(pathname) {
|
|
|
44
44
|
* invokes the configured source, which may cost money and writes a cache
|
|
45
45
|
* file. `Sec-Fetch-Site` is set by the browser, not the page, so a
|
|
46
46
|
* `cross-site` value is a reliable statement that the application under
|
|
47
|
-
* development did not
|
|
47
|
+
* development did not start the source. Such a request is still answered
|
|
48
|
+
* from the cache, the pool, or the generated fallback, because the
|
|
49
|
+
* application's own opaque-origin documents (a sandboxed blob-URL or srcdoc
|
|
50
|
+
* iframe showing `user.photoURL`) are cross-site too, and a production photo
|
|
51
|
+
* URL loads anywhere.
|
|
48
52
|
*
|
|
49
53
|
* Absence means allow: native clients, `curl`, and older browsers send no
|
|
50
54
|
* such header, and this route is not the place to break them.
|
|
@@ -85,14 +89,10 @@ export async function handleAvatar(resolver, req, res, url) {
|
|
|
85
89
|
.end('method not allowed');
|
|
86
90
|
return;
|
|
87
91
|
}
|
|
88
|
-
if (isCrossSiteRequest(req)) {
|
|
89
|
-
res.writeHead(403, { 'content-type': 'text/plain; charset=utf-8' })
|
|
90
|
-
.end('cross-site avatar requests are refused');
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
92
|
const assetRequest = {
|
|
94
93
|
key: uid,
|
|
95
94
|
seed: seedFor(uid, url.searchParams.get('d')),
|
|
95
|
+
...(isCrossSiteRequest(req) ? { sourceAllowed: false } : {}),
|
|
96
96
|
context: {
|
|
97
97
|
uid,
|
|
98
98
|
displayName: url.searchParams.get('n'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-route.js","sourceRoot":"","sources":["../../../src/serve/assets/avatar-route.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD;;+DAE+D;AAC/D,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAExC;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAE/D,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,6BAA6B;IAC5C,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,cAAc;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI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,CAAC;IACH,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -2,6 +2,9 @@ export interface AssetRequest {
|
|
|
2
2
|
key: string;
|
|
3
3
|
seed: string;
|
|
4
4
|
context: Record<string, unknown>;
|
|
5
|
+
/** `false` answers from the cache, the pool, or the fallback and never
|
|
6
|
+
* starts the source. Absent means the source may run. */
|
|
7
|
+
sourceAllowed?: boolean;
|
|
5
8
|
}
|
|
6
9
|
export type AssetResult = {
|
|
7
10
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/serve/assets/resolver.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/serve/assets/resolver.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;8DAC0D;IAC1D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtF,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEpF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;mEAG+D;IAC/D,QAAQ,EAAE,CACR,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,UAAU,GAAG,SAAS,KACzB;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB;;;;;;;;;;sEAUkE;IAClE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;kFAM8E;IAC9E,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;;sDAKkD;IAClD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;8BAE0B;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACpD;AAkED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,oBAAoB,GAAG,aAAa,CAkJ7E"}
|
|
@@ -174,7 +174,7 @@ export function createAssetResolver(opts) {
|
|
|
174
174
|
return { ...hit, origin: 'cache' };
|
|
175
175
|
// Missing/unreadable file: fall through as a miss, same as no entry.
|
|
176
176
|
}
|
|
177
|
-
if (opts.source) {
|
|
177
|
+
if (opts.source && req.sourceAllowed !== false) {
|
|
178
178
|
let pending = inFlight.get(req.key);
|
|
179
179
|
if (!pending) {
|
|
180
180
|
// Counted per new invocation, not per request: joining an in-flight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/serve/assets/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,YAAY,GAGb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/serve/assets/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,YAAY,GAGb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAwElE;wEACwE;AACxE,SAAS,OAAO,CAAC,KAAa;IAC5B,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,CAAC;QACb,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,CAAC;AACpB,CAAC;AAED;;;yBAGyB;AACzB,SAAS,iBAAiB,CACxB,GAAW,EACX,KAAyB;IAEzB,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,cAAc,CAAC,KAAK,CAAC,I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../src/serve/entries/app-client.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-client.d.ts","sourceRoot":"","sources":["../../../src/serve/entries/app-client.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAQpD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,WAAW,GAAG,QAAQ,CAiB7D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { registerAppCleanup } from 'pyric/app/internal';
|
|
2
2
|
import { ownClientUntilPagehide } from '../worker/client/pagehide.js';
|
|
3
3
|
import { openWorkerDb } from './worker-runtime.js';
|
|
4
|
+
import { realmOrigin } from 'pyric/sandbox/internal';
|
|
4
5
|
const clients = new WeakMap();
|
|
5
6
|
export function workerClientForApp(app) {
|
|
6
7
|
const existing = clients.get(app);
|
|
@@ -16,8 +17,13 @@ export function workerClientForApp(app) {
|
|
|
16
17
|
client.port.postMessage({
|
|
17
18
|
t: 'appConfig',
|
|
18
19
|
options: app.options,
|
|
20
|
+
...pageOriginScope(),
|
|
19
21
|
});
|
|
20
22
|
clients.set(app, client);
|
|
21
23
|
return client;
|
|
22
24
|
}
|
|
25
|
+
function pageOriginScope() {
|
|
26
|
+
const origin = realmOrigin();
|
|
27
|
+
return origin === null ? {} : { origin };
|
|
28
|
+
}
|
|
23
29
|
//# sourceMappingURL=app-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-client.js","sourceRoot":"","sources":["../../../src/serve/entries/app-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxD,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AM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;AAC3C,CAAC"}
|
package/dist/serve/site-ui/_astro/{RulesCodeEditor.kBYcclwV.js → RulesCodeEditor.Cp_-FK3b.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as $c}from"./sandbox-controls.
|
|
1
|
+
import{j as $c}from"./sandbox-controls.Bv6lfpIe.js";import{r as nt}from"./index.DBy5LfQW.js";let Tr=[],Ll=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?Ll:Tr).push(t=t+n[e])})();function Pc(n){if(n<768)return!1;for(let e=0,t=Tr.length;;){let i=e+t>>1;if(n<Tr[i])t=i;else if(n>=Ll[i])e=i+1;else return!0;if(e==t)return!1}}function to(n){return n>=127462&&n<=127487}const io=8205;function vc(n,e,t=!0,i=!0){return(t?zl:Zc)(n,e,i)}function zl(n,e,t){if(e==n.length)return e;e&&Dl(n.charCodeAt(e))&&Yl(n.charCodeAt(e-1))&&e--;let i=er(n,e);for(e+=no(i);e<n.length;){let r=er(n,e);if(i==io||r==io||t&&Pc(r))e+=no(r),i=r;else if(to(r)){let s=0,o=e-2;for(;o>=0&&to(er(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function Zc(n,e,t){for(;e>1;){let i=zl(n,e-2,t);if(i<e)return i;e--}return 0}function er(n,e){let t=n.charCodeAt(e);if(!Yl(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Dl(i)?(t-55296<<10)+(i-56320)+65536:t}function Dl(n){return n>=56320&&n<57344}function Yl(n){return n>=55296&&n<56320}function no(n){return n<65536?1:2}class L{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=qt(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),qe.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=qt(this,e,t);let i=[];return this.decompose(e,t,i,0),qe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new ui(this),s=new ui(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new ui(this,e)}iterRange(e,t=this.length){return new El(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new _l(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?L.empty:e.length<=32?new F(e):qe.from(F.split(e,[]))}}class F extends L{constructor(e,t=Tc(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new Cc(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new F(ro(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=an(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new F(l,o.length+s.length));else{let a=l.length>>1;i.push(new F(l.slice(0,a)),new F(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof F))return super.replace(e,t,i);[e,t]=qt(this,e,t);let r=an(this.text,an(i.text,ro(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new F(r,s):qe.from(F.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
2
2
|
`){[e,t]=qt(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new F(i,r)),i=[],r=-1);return r>-1&&t.push(new F(i,r)),t}}class qe extends L{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=qt(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[r]=a,new qe(c,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
3
3
|
`){[e,t]=qt(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof qe))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let O of e)i+=O.lines;if(i<32){let O=[];for(let d of e)d.flatten(O);return new F(O,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,c=[];function f(O){let d;if(O.lines>s&&O instanceof qe)for(let p of O.children)f(p);else O.lines>o&&(a>o||!a)?(u(),l.push(O)):O instanceof F&&a&&(d=c[c.length-1])instanceof F&&O.lines+d.lines<=32?(a+=O.lines,h+=O.length+1,c[c.length-1]=new F(d.text.concat(O.text),d.length+1+O.length)):(a+O.lines>r&&u(),a+=O.lines,h+=O.length+1,c.push(O))}function u(){a!=0&&(l.push(c.length==1?c[0]:qe.from(c,h)),h=-1,a=c.length=0)}for(let O of e)f(O);return u(),l.length==1?l[0]:new qe(l,t)}}L.empty=new F([""],0);function Tc(n){let e=-1;for(let t of n)e+=t.length+1;return e}function an(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function ro(n,e,t){return an(n,[""],e,t)}class ui{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof F?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof F?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;e--}else if(r instanceof F){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof F?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class El{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ui(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class _l{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(L.prototype[Symbol.iterator]=function(){return this.iter()},ui.prototype[Symbol.iterator]=El.prototype[Symbol.iterator]=_l.prototype[Symbol.iterator]=function(){return this});class Cc{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}function qt(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function te(n,e,t=!0,i=!0){return vc(n,e,t,i)}function Ac(n){return n>=56320&&n<57344}function Mc(n){return n>=55296&&n<56320}function Tt(n,e){let t=n.charCodeAt(e);if(!Mc(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ac(i)?(t-55296<<10)+(i-56320)+65536:t}function Bl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ai(n){return n<65536?1:2}const Cr=/\r\n?|\n/;var le=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(le||(le={}));class Fe{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){Ar(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new Fe(e)}composeDesc(e){return this.empty?e:e.empty?this:ql(this,e)}mapDesc(e,t=!1){return e.empty?this:Mr(this,e,t)}mapPos(e,t=-1,i=le.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=le.Simple&&h>=e&&(i==le.TrackDel&&r<e&&h>e||i==le.TrackBefore&&r<e||i==le.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Fe(e)}static create(e){return new Fe(e)}}class J extends Fe{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ar(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return Mr(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(L.empty);i.push(o?e.slice(s,s+o):L.empty)}s+=o}return new J(t,i)}compose(e){return this.empty?e:e.empty?this:ql(this,e,!0)}map(e,t=!1){return e.empty?this:Mr(this,e,t,!0)}iterChanges(e,t=!1){Ar(this,e,t)}get desc(){return Fe.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new Si(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);oe(r,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;oe(t,c,f),f>0&&at(i,t,s.text),s.forward(c),l+=c}let h=e[o++];for(;l<h;){if(s.done)break e;let c=Math.min(s.len,h-l);oe(t,c,-1),oe(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new J(t,i),filtered:Fe.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!r.length)return;o<t&&oe(r,t-o,-1);let f=new J(r,s);l=l?l.compose(f.map(l)):f,r=[],s=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof J){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:O}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let d=O?typeof O=="string"?L.of(O.split(i||Cr)):O:L.empty,p=d.length;if(f==u&&p==0)return;f<o&&a(),f>o&&oe(r,f-o,-1),oe(r,u-f,p),at(s,r,d),o=u}}return h(e),a(!l),l}static empty(e){return new J(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(L.empty);i[r]=L.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new J(t,i)}static createSet(e,t){return new J(e,t)}}function oe(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:r>=0&&e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function at(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(L.empty);n.push(t)}}function Ar(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,c=s,f=L.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,c,f),r=h,s=c}}}function Mr(n,e,t,i=!1){let r=[],s=i?[]:null,o=new Si(n),l=new Si(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);oe(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(oe(r,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(oe(r,0,o.ins),s&&at(s,r,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;oe(r,h,a<o.i?o.ins:0),s&&a<o.i&&at(s,r,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?J.createSet(r,s):Fe.create(r);throw new Error("Mismatched change set lengths")}}}function ql(n,e,t=!1){let i=[],r=t?[]:null,s=new Si(n),o=new Si(e);for(let l=!1;;){if(s.done&&o.done)return r?J.createSet(i,r):Fe.create(i);if(s.ins==0)oe(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)oe(i,0,o.ins,l),r&&at(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;oe(i,a,c,l),r&&c&&at(r,i,o.text)}else o.ins==-1?(oe(i,s.off?0:s.len,a,l),r&&at(r,i,s.textBit(a))):(oe(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&at(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class Si{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?L.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?L.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ot{constructor(e,t,i,r){this.from=e,this.to=t,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new ot(i,r,this.flags,this.goalColumn)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return Q.range(e,t,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Q.range(this.anchor,r,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return Q.range(e.anchor,e.head)}static create(e,t,i,r){return new ot(e,t,i,r)}}class Q{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Q.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new Q([this.main],0)}addRange(e,t=!0){return Q.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,Q.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Q(e.ranges.map(t=>ot.fromJSON(t)),e.main)}static single(e,t=e){return new Q([Q.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return Q.normalized(e.slice(),t);i=s.to}return new Q(e,t)}static cursor(e,t=0,i,r){return ot.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i)),r)}static range(e,t,i,r,s){let o=r==null?7:Math.min(6,r);return!s&&e!=t&&(s=t<e?1:-1),s&&(o|=s<0?8:16),t<e?ot.create(t,e,o|32,i):ot.create(e,t,o,i)}static undirectionalRange(e,t){return ot.create(e,t,64,void 0)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?Q.range(a,l):Q.range(l,a))}}return new Q(e,t)}}function Vl(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let xs=0;class v{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=xs++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new v(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:bs),!!e.static,e.enables)}of(e){return new hn([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new hn(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new hn(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function bs(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class hn{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=xs++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Rr(f,c)){let O=i(f);if(l?!so(O,f.values[o],r):!r(O,f.values[o]))return f.values[o]=O,1}return 0},reconfigure:(f,u)=>{let O,d=u.config.address[s];if(d!=null){let p=gn(u,d);if(this.dependencies.every(g=>g instanceof v?u.facet(g)===f.facet(g):g instanceof Qe?u.field(g,!1)==f.field(g,!1):!0)||(l?so(O=i(f),p,r):r(O=i(f),p)))return f.values[o]=p,0}else O=i(f);return f.values[o]=O,1}}}get extension(){return this}}function so(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Rr(n,e){let t=!1;for(let i of e)Oi(n,i)&1&&(t=!0);return t}function Rc(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=gn(a,i[c]);if(r[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)Oi(a,h);return a.values[o]=l(a),1},update(a,h){if(!Rr(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Rr(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&bs(t,f))return a.values[o]=u,0;let O=l(a);return e.compare(O,u)?(a.values[o]=u,0):(a.values[o]=O,1)}}}const Bi=v.define({static:!0});class Qe{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new Qe(xs++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Bi).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>{let s=i.facet(Bi),o=r.facet(Bi),l;return(l=s.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,Bi.of({field:this,create:e})]}get extension(){return this}}const yt={lowest:4,low:3,default:2,high:1,highest:0};function ni(n){return e=>new jl(e,n)}const Kt={highest:ni(yt.highest),high:ni(yt.high),default:ni(yt.default),low:ni(yt.low),lowest:ni(yt.lowest)};class jl{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class Mi{of(e){return new Xr(this,e)}reconfigure(e){return Mi.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Xr{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class pn{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let u of Xc(e,t,o))u instanceof Qe?r.push(u):(s[u.facet.id]||(s[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of r)l[u.id]=h.length<<1,h.push(O=>u.slot(O));let c=i?.config.facets;for(let u in s){let O=s[u],d=O[0].facet,p=c&&c[u]||[];if(O.every(g=>g.type==0))if(l[d.id]=a.length<<1|1,bs(p,O))a.push(i.facet(d));else{let g=d.combine(O.map(S=>S.value));a.push(i&&d.compare(g,i.facet(d))?i.facet(d):g)}else{for(let g of O)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(S=>g.dynamicSlot(S)));l[d.id]=h.length<<1,h.push(g=>Rc(g,d,O))}}let f=h.map(u=>u(l));return new pn(e,o,f,l,a,s)}}function Xc(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Xr&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof Xr){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof jl)s(o.inner,o.prec);else if(o instanceof Qe)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof hn)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,yt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}).`);if(h==o)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,yt.default),i.reduce((o,l)=>o.concat(l))}function Oi(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function gn(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Il=v.define(),Wr=v.define({combine:n=>n.some(e=>e),static:!0}),Gl=v.define({combine:n=>n.length?n[0]:void 0,static:!0}),Nl=v.define(),Ul=v.define(),Fl=v.define(),Hl=v.define({combine:n=>n.length?n[0]:!1});class it{constructor(e,t){this.type=e,this.value=t}static define(){return new Wc}}class Wc{of(e){return new it(this,e)}}class Lc{constructor(e){this.map=e}of(e){return new E(this,e)}}class E{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new E(this.type,t)}is(e){return this.type==e}static define(e={}){return new Lc(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}E.reconfigure=E.define();E.appendConfig=E.define();class K{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Vl(i,t.newLength),s.some(l=>l.type==K.time)||(this.annotations=s.concat(K.time.of(Date.now())))}static create(e,t,i,r,s,o){return new K(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(K.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}K.time=it.define();K.userEvent=it.define();K.addToHistory=it.define();K.remote=it.define();function zc(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Kl(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=J.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:E.mapEffects(n.effects,r).concat(E.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Lr(n,e,t){let i=e.selection,r=zt(e.annotations);return e.userEvent&&(r=r.concat(K.userEvent.of(e.userEvent))),{changes:e.changes instanceof J?e.changes:J.of(e.changes||[],t,n.facet(Gl)),selection:i&&(i instanceof Q?i:Q.single(i.anchor,i.head)),effects:zt(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Jl(n,e,t){let i=Lr(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Kl(i,Lr(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=K.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Yc(t?Dc(r):r)}function Dc(n){let e=n.startState,t=!0;for(let r of e.facet(Nl)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:zc(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=J.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=K.create(e,r,n.selection&&n.selection.map(s),E.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(Ul);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof K?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof K?n=s[0]:n=Jl(e,zt(s),!1)}return n}function Yc(n){let e=n.startState,t=e.facet(Fl),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Kl(i,Lr(e,s,n.changes.newLength),!0))}return i==n?n:K.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Ec=[];function zt(n){return n==null?Ec:Array.isArray(n)?n:[n]}var I=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(I||(I={}));const _c=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let zr;try{zr=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Bc(n){if(zr)return zr.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>""&&(t.toUpperCase()!=t.toLowerCase()||_c.test(t)))return!0}return!1}function qc(n){return e=>{if(!/\S/.test(e))return I.Space;if(Bc(e))return I.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return I.Word;return I.Other}}class D{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Oi(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Oi(this,i),gn(this,i)}update(...e){return Jl(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let l of e.effects)l.is(Mi.reconfigure)?(t&&(r=new Map,t.compartments.forEach((a,h)=>r.set(h,a)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(E.reconfigure)?(t=null,i=l.value):l.is(E.appendConfig)&&(t=null,i=zt(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=pn.resolve(i,r,this),s=new D(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Wr)?e.newSelection:e.newSelection.asSingle();new D(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:Q.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=zt(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(r);for(let u=0;u<l;u++)s[u]=s[u].map(c);let f=r.mapDesc(h,!0);s.push(a.range.map(f)),r=r.compose(c),o=E.mapEffects(o,c).concat(E.mapEffects(zt(a.effects),f))}return{changes:r,selection:Q.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof J?e:J.of(e,this.doc.length,this.facet(D.lineSeparator))}toText(e){return L.of(e.split(this.facet(D.lineSeparator)||Cr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Oi(this,t),gn(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof Qe&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return D.create({doc:e.doc,selection:Q.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=pn.resolve(e.extensions||[],new Map),i=e.doc instanceof L?e.doc:L.of((e.doc||"").split(t.staticFacet(D.lineSeparator)||Cr)),r=e.selection?e.selection instanceof Q?e.selection:Q.single(e.selection.anchor,e.selection.head):Q.single(0);return Vl(r,i.length),t.staticFacet(Wr)||(r=r.asSingle()),new D(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(D.tabSize)}get lineBreak(){return this.facet(D.lineSeparator)||`
|